[
  {
    "path": ".claude/launch.json",
    "content": "{\n  \"version\": \"0.0.1\",\n  \"configurations\": [\n    {\n      \"name\": \"amy-docs\",\n      \"runtimeExecutable\": \"python3\",\n      \"runtimeArgs\": [\"-m\", \"http.server\", \"8080\", \"-d\", \"docs\"],\n      \"port\": 8080\n    }\n  ]\n}\n"
  },
  {
    "path": ".github/workflows/arduino.yml",
    "content": "name: Arduino CI\n\non:\n  push:\n    branches: [ \"main\" ]\n  pull_request:\n    branches: [ \"main\" ]\n\njobs:\n  compile:\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - name: \"ESP32-S3\"\n            fqbn: \"esp32:esp32:esp32s3\"\n            platforms: |\n              - name: esp32:esp32\n                source-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json\n          - name: \"RP2040 (Pico)\"\n            fqbn: \"rp2040:rp2040:rpipico\"\n            platforms: |\n              - name: rp2040:rp2040\n                source-url: https://github.com/earlephilhower/arduino-pico/releases/download/4.5.3/package_rp2040_index.json\n          - name: \"RP2350 (Pico 2)\"\n            fqbn: \"rp2040:rp2040:rpipico2\"\n            platforms: |\n              - name: rp2040:rp2040\n                source-url: https://github.com/earlephilhower/arduino-pico/releases/download/4.5.3/package_rp2040_index.json\n          - name: \"Teensy 4.1\"\n            fqbn: \"teensy:avr:teensy41\"\n            platforms: |\n              - name: teensy:avr\n                source-url: https://www.pjrc.com/teensy/package_teensy_index.json\n\n    name: ${{ matrix.name }}\n    steps:\n      - uses: actions/checkout@v4\n\n      - uses: arduino/compile-sketches@v1\n        with:\n          fqbn: ${{ matrix.fqbn }}\n          platforms: ${{ matrix.platforms }}\n          sketch-paths: |\n            - examples/BillieJeanDrums\n          enable-deltas-report: false\n"
  },
  {
    "path": ".github/workflows/c-cpp.yml",
    "content": "name: C/C++ CI\n\non:\n  push:\n    branches: [ \"main\" ]\n  pull_request:\n    branches: [ \"main\" ]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n\n    strategy:\n      fail-fast: false\n      matrix:\n        python-version: ['3.12', '3.13', '3.14']\n\n    steps:\n    - uses: actions/checkout@v4\n\n    - uses: actions/setup-python@v5\n      with:\n        python-version: ${{ matrix.python-version }}\n\n    - name: Install dependencies\n      run: pip install numpy scipy\n\n    - name: Build and test\n      env:\n        AMY_TEST_THRESHOLD_DB: \"-70.0\"\n      run: make test\n"
  },
  {
    "path": ".github/workflows/godot-addon.yml",
    "content": "name: Build Godot Addon\n\non:\n  push:\n    tags:\n      - '*'\n  workflow_dispatch:\n\npermissions:\n  contents: write\n\njobs:\n  build:\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - name: macOS\n            runner: macos-latest\n            platform: macos\n            arch: universal\n          - name: Linux\n            runner: ubuntu-22.04\n            platform: linux\n            arch: x86_64\n          - name: Windows\n            runner: windows-latest\n            platform: windows\n            arch: x86_64\n\n    runs-on: ${{ matrix.runner }}\n    name: Build ${{ matrix.name }}\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - uses: actions/setup-python@v5\n        with:\n          python-version: '3.12'\n\n      - name: Install scons\n        run: pip install scons\n\n      - name: Checkout godot-cpp\n        uses: actions/checkout@v4\n        with:\n          repository: godotengine/godot-cpp\n          ref: godot-4.4-stable\n          path: godot-cpp\n          submodules: true\n\n      - name: Build debug\n        working-directory: godot\n        run: scons platform=${{ matrix.platform }} arch=${{ matrix.arch }} target=template_debug -j4\n        env:\n          GODOT_CPP_PATH: ${{ github.workspace }}/godot-cpp\n          AMY_SRC_PATH: ${{ github.workspace }}/src\n\n      - name: Build release\n        working-directory: godot\n        run: scons platform=${{ matrix.platform }} arch=${{ matrix.arch }} target=template_release -j4\n        env:\n          GODOT_CPP_PATH: ${{ github.workspace }}/godot-cpp\n          AMY_SRC_PATH: ${{ github.workspace }}/src\n\n      - name: Upload build artifacts\n        uses: actions/upload-artifact@v4\n        with:\n          name: bin-${{ matrix.platform }}\n          path: godot/bin/\n\n  package:\n    needs: build\n    runs-on: ubuntu-latest\n    name: Package Addon\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Download all build artifacts\n        uses: actions/download-artifact@v4\n        with:\n          path: collected-bins/\n\n      - name: Assemble addon zip\n        run: |\n          mkdir -p addons/amy/bin\n\n          # Copy compiled binaries from all platforms\n          cp -r collected-bins/bin-macos/* addons/amy/bin/\n          cp -r collected-bins/bin-linux/* addons/amy/bin/\n          cp -r collected-bins/bin-windows/* addons/amy/bin/\n\n          # Copy GDExtension config and scripts\n          cp godot/amy.gdextension addons/amy/\n          cp godot/amy.gd addons/amy/\n          cp godot/install.gd addons/amy/\n\n          # Copy web export files\n          mkdir -p addons/amy/web\n          cp godot/web/godot_amy_bridge.js addons/amy/web/\n          cp godot/web/custom_shell.html addons/amy/web/\n          cp docs/amy.js addons/amy/web/\n          cp docs/amy.wasm addons/amy/web/\n          cp docs/amy.aw.js addons/amy/web/\n          cp docs/amy.ww.js addons/amy/web/\n          cp docs/enable-threads.js addons/amy/web/\n          cp docs/enable-threads.js addons/amy/web/enable-threads-root.js\n\n          # Create the zip\n          zip -r amy-godot-addon.zip addons/\n\n      - name: Upload addon zip\n        uses: actions/upload-artifact@v4\n        with:\n          name: amy-godot-addon\n          path: amy-godot-addon.zip\n\n  release:\n    needs: package\n    runs-on: ubuntu-latest\n    if: startsWith(github.ref, 'refs/tags/')\n    name: Create Release\n\n    steps:\n      - name: Download addon zip\n        uses: actions/download-artifact@v4\n        with:\n          name: amy-godot-addon\n\n      - name: Attach addon to release\n        uses: softprops/action-gh-release@v2\n        with:\n          files: amy-godot-addon.zip\n"
  },
  {
    "path": ".gitignore",
    "content": "uv.lock\namy-example\namy-message\ntests/tst\namy-piano\nsrc/build/\n*.DS_Store*\nloris-1.8/\n__pycache__/\nsrc/dist/\nsrc/amy.egg-info/\n.python-version\namy.egg-info/\nbuild/\n\n\n# Prerequisites\n*.d\n\n# Object files\n*.o\n*.ko\n*.obj\n*.elf\n\n# Linker output\n*.ilk\n*.map\n*.exp\n\n# Precompiled Headers\n*.gch\n*.pch\n\n# Libraries\n*.lib\n*.a\n*.la\n*.lo\n\n# Shared objects (inc. Windows DLLs)\n*.dll\n*.so\n*.so.*\n*.dylib\n\n# Executables\n*.exe\n*.out\n*.app\n*.i*86\n*.x86_64\n*.hex\n\n# Debug files\n*.dSYM/\n*.su\n*.idb\n*.pdb\n\n# Kernel Module Compile Results\n*.mod*\n*.cmd\n.tmp_versions/\nmodules.order\nModule.symvers\nMkfile.old\ndkms.conf\ngodot/.sconsign.dblite\ngodot/src/*.os\n"
  },
  {
    "path": "CLAUDE.md",
    "content": "# AMY Development Notes\n\n## Releases\n\nWhen creating a new release:\n1. Update the version in `library.properties` to match the release tag\n2. Create the GitHub release with a plain version tag (e.g. `1.2.3`, NOT `v1.2.3`) — Arduino requires this format\n3. The Godot addon build workflow triggers automatically on tag push and attaches `amy-godot-addon.zip` to the release\n\n## Godot GDExtension\n\n- Local builds use `setup_godot.sh` which generates the SConstruct, C++ source, and GDScript wrapper inline\n- CI builds use the `godot/` directory (SConstruct, src/, etc.) directly via `.github/workflows/godot-addon.yml`\n- `amy_midi.c` is excluded from the Godot build because it conflicts with platform stubs. Any new functions added to `amy_midi.c` (or other excluded files) that are called from core AMY code need stub implementations added in both:\n  - `godot/src/amy_platform_stubs.c` (for CI builds)\n  - The `amy_platform_stubs.c` section of `setup_godot.sh` (for local builds)\n- macOS builds produce a `.framework` bundle; the `gh auth` token needs `workflow` scope to push workflow file changes\n\n## Web REPL (tutorial & docs)\n\nThe live Python REPL at `docs/tutorial.html` runs MicroPython in the browser with the `amy` Python module frozen in. Updating it requires rebuilding MicroPython from the `shorepine/tulipcc` repo:\n\n1. In `tulipcc`, update the amy submodule to latest: `cd tulipcc && git submodule update --remote amy`\n2. Rebuild MicroPython: `cd tulip/amyrepl && make clean && make`\n3. Copy the output to amy's docs: `cp build-standard/tulip/obj/micropython.mjs build-standard/tulip/obj/micropython.wasm <amy-repo>/docs/`\n4. If the AMY C code or JS API also changed, rebuild those too: `cd <amy-repo> && make web && make deploy-web`\n\nThe `docs/amy.js` file is a concatenation of the Emscripten build (`build/amy.js`), `src/amy_connector.js`, and `build/amy_api.generated.js`. The JS API is auto-generated from `amy/__init__.py` by `scripts/gen_amy_js_api.py`.\n\n## GitHub Auth\n\n- The `bwhitman` account needs `workflow` scope on its token to push changes to `.github/workflows/` files. Run `gh auth refresh -h github.com -s workflow` if pushes are rejected.\n- SSH pushes to `shorepine/amy` use the `brianklay` key by default; use HTTPS with `gh auth token` for `bwhitman` access.\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\n advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at brian@variogr.am. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see\nhttps://www.contributor-covenant.org/faq\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2022 Brian Whitman and Daniel PW Ellis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "Makefile",
    "content": "# Makefile for AMY , including an example\n\nTARGET = amy-example amy-message amy-piano\nLIBS =  -lm  -pthread\n\nUNAME_S := $(shell uname -s)\nifeq ($(UNAME_S),Darwin)\n\tSOURCES = src/macos_midi.m\n\tCFLAGS += -DMACOS\n\tLIBS = -framework AudioUnit -framework CoreAudio -framework CoreFoundation -framework CoreMIDI -framework Cocoa -lstdc++ \n\t# Needed for brew's python3.12+ on MacOS\n\tEXTRA_PIP_ENV = PIP_BREAK_SYSTEM_PACKAGES=1 \n\tCC = clang\nelse\n\tCC = gcc\nendif\n\n\n# on Raspberry Pi, at least under 32-bit mode, libatomic and libdl are needed.\nifeq ($(shell uname -m), armv7l)\nLIBS += -ldl  -latomic\nendif\n\nifeq ($(shell uname -m), armv6l)\nLIBS += -ldl  -latomic\nendif\n\nCFLAGS += -O3 -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wpointer-arith -Wno-float-conversion -Wno-missing-declarations -DAMY_WAVETABLE\n#CFLAGS += -DAMY_DEBUG\n# -Wdouble-promotion\nEMSCRIPTEN_OPTIONS = -s WASM=1 --bind \\\n-DMA_ENABLE_AUDIO_WORKLETS -sAUDIO_WORKLET=1 -sWASM_WORKERS=1  \\\n-sSTACK_SIZE=128000\\\n-sMODULARIZE -s 'EXPORT_NAME=\"amyModule\"' \\\n-s EXPORTED_RUNTIME_METHODS=\"['cwrap','ccall', 'HEAPU8']\" \\\n-s EXPORTED_FUNCTIONS=\"['_amy_add_message', '_amy_add_event', '_amy_reset_sysclock', '_amy_sysclock', '_amy_process_single_midi_byte', \\\n\t '_amy_live_stop', '_amy_get_input_buffer', '_amy_get_output_buffer', '_amy_set_external_input_buffer', '_amy_live_start_web', '_amy_live_start_web_audioin',\\\n\t  '_amy_start_web', '_amy_start_web_no_synths', '_sequencer_ticks', '_malloc', '_free', '_amy_bleep', '_yield_patch_events', '_size_of_amy_event', '_yield_synth_commands', '_amy_dump_state_to_string']\" \\\n-s SUPPORT_LONGJMP=emscripten \\\n-s INITIAL_MEMORY=128mb -s TOTAL_STACK=64mb -s ALLOW_MEMORY_GROWTH=1  \\\n-s ASYNCIFY -s ASYNCIFY_STACK_SIZE=128000\nPYTHON = python3\n\n.PHONY: default all clean amy-module test web deploy-web\n\ndefault: $(TARGET)\nall: default\n\nSOURCES += src/algorithms.c src/amy.c src/envelope.c src/examples.c src/parse.c \\\n\tsrc/filters.c src/oscillators.c src/pcm.c src/interp_partials.c src/custom.c \\\n\tsrc/delay.c src/log2_exp2.c src/patches.c src/transfer.c src/sequencer.c \\\n\tsrc/libminiaudio-audio.c src/instrument.c src/amy_midi.c src/api.c src/midi_mappings.c\n\nOBJECTS = $(patsubst %.c, %.o, $(SOURCES)) \n\nHEADERS = $(wildcard src/*.h)\nHEADERS_BUILD := $(filter-out src/patches.h,$(HEADERS))\n\nPYTHONS = $(wildcard *.py)\n\nsrc/patches.h: $(PYTHONS) $(HEADERS_BUILD)\n\tcat src/amy.h  | sed -e 's@^//.*@@' | egrep 'define +[^ ]+ +[.0-9-]+' | sed -e 's/\\([.0-9]\\)f$$/\\1/' | awk '{print $$2 \"=\" $$3}' > amy/constants.py\n\t${PYTHON} -m amy.headers\n\n%.o: %.c $(HEADERS) src/patches.h\n\t$(CC) $(CFLAGS) -c $< -o $@\n\n%.o: %.mm $(HEADERS)\n\tclang $(CFLAGS) -c $< -o $@\n\n%.o: %.m\n\tclang  -I$(INC) $(CFLAGS) -c -o $@ $<\n\n.PRECIOUS: $(TARGET) $(OBJECTS)\n\namy-example: $(OBJECTS) src/amy-example.o\n\t$(CC) $(CFLAGS) $(OBJECTS) src/amy-example.o -Wall $(LIBS) -o $@\n\n\namy-piano: $(OBJECTS) src/amy-piano.o\n\t$(CC) $(CFLAGS) $(OBJECTS) src/amy-piano.o -Wall $(LIBS) -o $@\n\namy-message: $(OBJECTS) src/amy-message.o\n\t$(CC) $(CFLAGS) $(OBJECTS) src/amy-message.o -Wall $(LIBS) -o $@\n\namy-module: amy-example\n\t${EXTRA_PIP_ENV} ${PYTHON} -m pip install -r requirements.txt; touch src/amy.c; ${EXTRA_PIP_ENV} ${PYTHON} -m pip install . --force-reinstall --no-deps; cd ..\n\ntest: amy-module\n\t${PYTHON} -m amy.test\n\nqtest: amy-module\n\t${PYTHON} -m amy.test quiet\n\n# Report the median FILTER_PROCESS timing over 50 runs.\ntiming: amy-module\n\tfor a in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40; do ${PYTHON} -m amy.timing 2>&1 ; done > /tmp/timings.txt\n\tcat /tmp/timings.txt | grep AMY_RENDER: | sed -e 's/us//' | sort -n | awk ' { a[i++]=$$4; } END { print a[int(i/2)]; }'\n\tcat /tmp/timings.txt | grep FILTER_PROCESS: | sed -e 's/us//' | sort -n | awk ' { a[i++]=$$4; } END { print a[int(i/2)]; }'\n\tcat /tmp/timings.txt | grep PARAMETRIC_EQ_PROCESS: | sed -e 's/us//' | sort -n | awk ' { a[i++]=$$4; } END { print a[int(i/2)]; }'\n\nvalgrind: amy-example\n\tvalgrind --leak-check=full --show-reachable=yes --suppressions=valgrind.suppressions ./amy-example\n\nbuild/amy.js: $(TARGET)\n\tmkdir -p build\n\temcc $(SOURCES) $(CFLAGS) $(EMSCRIPTEN_OPTIONS) -O3 -o $@\n\nbuild/amy_api.generated.js: scripts/gen_amy_js_api.py amy/__init__.py src/patches.h\n\tmkdir -p build\n\t$(PYTHON) scripts/gen_amy_js_api.py\n\nbuild/patches.generated.js: scripts/gen_patches_js.py src/patches.h\n\tmkdir -p build\n\t$(PYTHON) scripts/gen_patches_js.py\n\nweb: build/amy.js build/amy_api.generated.js build/patches.generated.js\n\ndeploy-web: web\n\tcat build/amy.js src/amy_connector.js build/amy_api.generated.js > docs/amy.js\n\tcp build/amy.wasm build/amy.aw.js build/amy.ww.js docs/\n\nclean:\n\t-rm -f src/*.o\n\t-rm -r src/patches.h\n\t-rm -f amy/constants.py\n\t-rm -f $(TARGET)\n"
  },
  {
    "path": "README.md",
    "content": "# AMY - The high-performance fixed-point music synthesizer library\n\nAMY is a fast and small music synthesizer library written in C with (so far) Python, Arduino, Javascript and GDScript bindings. It can easily be embedded into almost any program, architecture or microcontroller. \n\nIt can be used as a very good analog-type synthesizer (Juno-6 style) a FM synthesizer (DX7 style), a partial breakpoint synthesizer (Alles machine or Atari AMY), a [very good synthesized piano](https://shorepine.github.io/amy/piano.html), a sampler or wavetable synth (where you load in your own PCM data), a drum machine (808-style PCM samples are included), or as a lower level toolkit to make your own combinations of oscillators, filters, LFOs and effects. AMY supports MIDI internally and can manage synthesizer note messages for you, including voice stealing and assigning controller changes. \n\nWe've run AMY on:\n * [the web](https://shorepine.github.io/amy/)\n * Mac, Linux, and [Windows](windows/README.md), and small Linux devices like the Raspberry Pi\n * ESP32, ESP32S3 (Xtensa)\n * ESP32-P4, ESP32-C3, C6 (RISC-V)\n * Pi Pico RP2040, the Pi Pico 2 RP2350\n * [NRF52 series](https://github.com/jgartrel/amy_synth_nrf52_example)\n * Teensy 3.6, Teensy 4.1\n * Playdate and Electro-Smith Daisy (ARM Cortex M7)\n * iOS devices\n * [Godot game engine](docs/godot.md)\n * And certainly much more\n\nAMY is highly optimized for polyphony and poly-timbral operation on even the lowest power and constrained RAM microcontroller but can scale to as many oscillators as you want. \n\nAMY powers the multi-speaker mesh synthesizer [Alles](https://github.com/shorepine/alles), as well as the [Tulip Creative Computer](https:/tulip.computer). Let us know if you use AMY for your own projects and we'll add it here!\n\nAMY was built by [DAn Ellis](https://research.google/people/DanEllis/) and [Brian Whitman](https://notes.variogram.com), and would love your contributions.\n\n[![shore pine sound systems discord](https://raw.githubusercontent.com/shorepine/tulipcc/main/docs/pics/shorepine100.png) **Chat about AMY on our Discord!**](https://discord.gg/TzBFkUb8pG)\n\n## More information\n\n * [**Interactive AMY tutorial**](https://shorepine.github.io/amy/tutorial.html)\n * [**AMY API**](docs/api.md)\n * [**AMY Synthesizer Details**](docs/synth.md)\n * [**AMY's MIDI specification**](docs/midi.md)\n * [**AMY in Arduino Getting Started**](docs/arduino.md)\n * [**Other AMY web demos**](https://shorepine.github.io/amy/)\n\nAMY supports\n\n * MIDI input support and synthesizer voice management, including voice stealing, controllers and per-channel multi-timbral operation\n * A strong Juno-6 style analog synthesizer\n * An operator / algorithm-based frequency modulation (FM) synth, modeled after the DX-7\n * PCM sampler, reading from a baked-in buffer of percussive and misc samples, or by loading samples into RAM, or playing from files on disk directly, with loop points and base midi note\n * Wavetable oscillator\n * karplus-strong string with adjustable feedback \n * An arbitrary number of band-limited oscillators, each with adjustable frequency, pan, phase, amplitude:\n   * pulse (+ adjustable duty cycle), sine, saw (up and down), triangle, noise \n * Stereo audio input or audio buffers in code can be used as an oscillator for real time audio effects\n * Biquad low-pass, bandpass or hi-pass filters with cutoff and resonance, can be assigned to any oscillator\n * Reverb, echo and chorus effects, set globally\n * An additive partial synthesizer\n * Each oscillator has 2 envelope generators, which can modify any combination of amplitude, frequency, PWM duty, filter cutoff, or pan over time\n * Each oscillator can also act as an modulator to modify any combination of parameters of another oscillator, for example, a bass drum can be indicated via a half phase sine wave at 0.25Hz modulating the frequency of another sine wave. \n * Control of overall gain and 3-band EQ\n * 300+ built in preset patches for PCM, DX7, piano and Juno-6\n * A front end for DX7 and Juno-6 SYSEX patches and conversion setup commands \n * Built-in event clock and pattern sequencer, using hardware real time timers on microcontrollers\n * Multi-core (including microcontrollers) for rendering if available\n * File transfer to the host \n\nThe FM synth provides a Python library, [`fm.py`](https://github.com/shorepine/amy/blob/main/amy/fm.py) that can convert any DX7 patch into an AMY patch.\n\nThe Juno-6 emulation provides [`juno.py`](https://github.com/shorepine/amy/blob/main/amy/juno.py) and can read in Juno-6 SYSEX patches and convert them into AMY patches.\n\n[The partials-driven piano voice and the code to generate the partials are described here](https://shorepine.github.io/amy/piano.html).\n\n## Using AMY in Arduino\n\nAMY will run on many modern microcontrollers under Arduino. On most platforms, we handle sending audio out to an I2S interface and handling MIDI input. Some platforms support more features than others. \n\n**Please see our more detailed [Getting Started on Arduino](docs/arduino.md) page for more details.**\n\n## Using AMY in Python on any platform\n\nYou can `import amy` in Python and have it render either out to your speakers or to a buffer of samples you can process on your own. To install the `amy` library, run `pip install .`. You can also run `make test` to install the library and run a series of tests.\n\n[**Please see our interactive AMY tutorial for more tips on using AMY**](https://shorepine.github.io/amy/tutorial.html)\n\n## Using AMY on the web\n\nWe provide an `emscripten` port of AMY that runs in Javascript. [See the AMY web demos](https://shorepine.github.io/amy/). To build for the web, use `make docs/amy.js`. It will generate `amy.js` in `docs/`.  \n\n## Using AMY in any other software\n\nTo use AMY in your own software, simply copy the .c and .h files in `src` to your program and compile them. No other libraries should be required to synthesize audio in AMY. \n\nTo run a simple C example on many platforms:\n\n```\nmake\n./amy-example # you should hear tones out your default speaker, use ./amy-example -h for options\n```\n\n# AMY quickstart\n\n[**Please see our interactive AMY tutorial for more tips on using AMY**](https://shorepine.github.io/amy/tutorial.html)\n\n## MIDI mode\n\nAMY provides a [MIDI mode](docs/midi.md) by default that lets you control many parts of AMY over MIDI. You can even control the underlying oscillators over SYSEX. See our [MIDI documentation](docs/midi.md) for more details. The simplest way to use AMY is to start it and them play MIDI notes to it. By default, AMY boots with a Juno-6 patch 0 on MIDI channel 1.\n\nIn Python:\n\n```python\n>>> import amy; amy.live(default_synths=1)\n>>> # play MIDI notes using system MIDI\n```\n\nIn C: \n\n```c\namy_config = amy_default_config()\namy_start(amy_config);\namy_live_start();\n// play MIDI notes using system MIDI or UART MIDI on microcontrollers\n```\n\nIn Javascript (see [minimal.html](docs/minimal.html) for the full example): \n\n```html\n<script type=\"text/javascript\" src=\"amy.js\"></script>\n<script type=\"text/javascript\" src=\"amy_connector.js\"></script>\n<script>\n    // You have to start AMY on a user click for audio to work \n    document.body.addEventListener('click', amy_js_start, true); \n</script>\n<!-- Now play MIDI notes over webMIDI -->\n```\n\nAMY supports [note commands, some MIDI controllers, and program changes to change the patch.](docs/midi.md)\n\n\n## Controlling AMY in code\n\nPresumably you'd like to explicitly tell AMY what to play. You can control AMY from almost anything. We mostly work in Python, C or Javascript, but AMY has been built to work with anything that can send a string.\n\nAMY has two API interfaces: _wire messages_ and `amy_event`. An AMY wire message is a string that looks like `v0n50l1K130r0Z`, with each letter corresponding to a field (like `v0` means `oscillator 0`, `n50` means midi note 50, `K130` means patch number 130, etc.) Wire messages are converted into `amy_event`s within AMY once received. \n\nSo in C, or JS, you'd fill an `amy_event` struct to define a single event of the synthesizer. For example, that wire message above is:\n\n```c\namy_event e = amy_default_event();\ne.osc = 0;\ne.patch_number = 130;\ne.velocity = 1;\ne.midi_note = 50;\ne.voices[0] = 0;\namy_add_event(&e);\n```\n\nIn Python, we provide the `amy` package that generates wire messages from a Pythonic `amy.send(**kwargs)`. In Python, you'd do\n\n```python\namy.send(osc=0, patch = 130, vel = 1, note = 50, voices = [0])\n```\n\nWire messages are used in AMY as a compact serialization of AMY events and become useful when communicating between AMY and other programs that may not be linked together. For example, [Alles](https://github.com/shorepine/alles) uses wire messages over Wi-Fi UDP to control a mesh of AMY synthesizers. [Tulip Web](https://tulip.computer/run) sends wire messages from the Micropython web process to the AudioWorklet running AMY on the web. We also store the Juno-6 and DX7 patches within AMY itself using wire messages, which helps keep the code size down. \n\nYou can also send wire messages over SYSEX to AMY, if you want to control AMY over MIDI beyond the default MIDI mode. [See our MIDI documentation for more details.](docs/midi.md)\n\nIt's good to understand what wire messages are but you don't need to construct them directly if you're linking AMY in your software. Use `amy_event` or `amy.send()` in Python to control AMY for almost all use cases.\n\n# More information\n\n * [**Interactive AMY tutorial**](https://shorepine.github.io/amy/tutorial.html)\n * [**AMY API**](docs/api.md)\n * [**AMY Synthesizer Details**](docs/synth.md)\n * [**AMY's MIDI specification**](docs/midi.md)\n * [**AMY in Arduino Getting Started**](docs/arduino.md)\n * [**AMY in Godot**](docs/godot.md)\n * [**AMY on Windows**](windows/README.md)\n * [**Other AMY web demos**](https://shorepine.github.io/amy/)\n\n [![shore pine sound systems discord](https://raw.githubusercontent.com/shorepine/tulipcc/main/docs/pics/shorepine100.png) **Chat about AMY on our Discord!**](https://discord.gg/TzBFkUb8pG)\n"
  },
  {
    "path": "amy/__init__.py",
    "content": "# AMY module\nfrom .constants import *\nfrom . import examples\nimport collections\nimport time\ndef _get_synth_commands_stub(synth):\n    return []\n\n_get_synth_commands = _get_synth_commands_stub\ntry:\n    import c_amy as _amy  # Import the C module\n    live = _amy.live\n    _get_synth_commands = _amy.get_synth_commands\nexcept (ImportError, AttributeError):\n    # C module is not required? not available?\n    # I'm guessing this might mean we're on Micropython?\n    try:\n        import tulip\n        _get_synth_commands = tulip.amy_get_synth_commands\n    except (ImportError, AttributeError):\n        pass  # Not available (e.g. web build); _get_synth_commands returns []\n\n\n# If set, inserts func as time for every call to send(). Will not override an explicitly set time\ninsert_time = None\n\n# If set, calls this instead of amy.send()\noverride_send = None\n\nmess = []\nlog = False\n\nshow_warnings = True\n\nblock_cb = None\n\n# Return a millis() epoch number for use in AMY timing\n# On most computers, this uses ms since midnight using datetime\n# On things like Tulip, this use ms since boot\ndef millis():\n    try:\n        import datetime\n        d = datetime.datetime.now()\n        return int((datetime.datetime.utcnow() - datetime.datetime(d.year, d.month, d.day)).total_seconds()*1000)\n    except ImportError:\n        import tulip\n        return tulip.ticks_ms()\n\n\n# Removes trailing 0s and x.0000s from floating point numbers to trim wire message size\n# Fun historical trivia: this function caused a bug so bad that Dan had to file a week-long PR for micropython\n# https://github.com/micropython/micropython/pull/8905\ndef trunc(number):\n    if type(number) == str:\n        if number.strip() == '':\n            return ''\n        number = float(number)\n    if(type(number)==float):\n        return ('%.6f' % number).rstrip('0').rstrip('.')\n    return str(number)\n\ndef trunc3(number):\n    if(type(number)==float):\n        return ('%.3f' % number).rstrip('0').rstrip('.')\n    return str(number)\n\ndef trim_trailing(vals, pred):\n    \"\"\"Remove any contiguous suffix of values that return False under pred.\"\"\"\n    bools = [pred(x) for x in vals[::-1]]\n    suffix_len = bools.index(True)\n    if suffix_len:\n        return vals[:-suffix_len]\n    return vals\n\ndef parse_ctrl_coefs(coefs):\n    \"\"\"Convert various acceptable forms of ControlCoefficient specs to the canonical string.\n\n    ControlCoefficients determine how amplitude, frequency, filter frequency, PWM duty, and pan\n    are calculated from underlying parameters on the fly.  For each control input, they specify\n    nine coefficients which are multiplied by (0) a constant value of 1, (1) the log-frequency from\n    the note-on command, (2) the velocity from the note-on command, (3) Envelope Generator 0's value,\n    (4) Envelope Generator 1's value, (5) the modulating oscillator input, (6) the global pitch\n    bend value, (7) external input 0, and (8) external input 1.  The sum of these scaled values is used as the control input. (Amplitude is a special\n    case where the individual values are *multiplied* rather than added, and values whose coefficients\n    are zero are skipped).\n\n    The wire protocol expects these coefficients to be specified as a single vector, e.g. \"f220,1,0,0,0,0,1\".\n    It also accepts some values to be left unspecified; only the specified values are changed.  So \"f,,,,0.01\"\n    will add EG1 modulation to pitch but not change its base value etc.  As a special case, a single value\n    (e.g. \"f440\") will change the constant offset for a parameter but leave its other modulations in place.\n\n    The Python API accepts multiple kinds of input:\n     * A scalar numeric value: freq=440\n     * A list of values in the format accepted by the wire protocol: freq=',,,,0.01'.\n     * A Python list of values, where None can be used to indicate \"unspecified\": freq=[None, None, None, None, 0.01].  Where the list is shorter than the expected 7 values, the remainder are treated as None (analogous to the wire-protocol string).\n     * A Python dict providing values for some subset of the coefficients.  The only acceptable keys are 'const', 'note', 'vel', 'eg0', 'eg1', 'mod', 'bend', 'ext0', and 'ext1'.\n    \"\"\"\n    # Pass through ready-formed strings, and convert single values to single value strings\n    if isinstance(coefs, str):\n        return ','.join(trunc(x) for x in coefs.split(','))\n    if isinstance(coefs, int) or isinstance(coefs, float):\n        return trunc(coefs)\n    # Convert a dict into a list of values.\n    dict_fields = ['const', 'note', 'vel', 'eg0', 'eg1', 'mod', 'bend', 'ext0', 'ext1']\n    if isinstance(coefs, dict):\n        coef_list = [None] * len(dict_fields)\n        for key, value in coefs.items():\n            if key not in dict_fields:\n                raise ValueError('\\'%s\\' is not a recognized CtrlCoef field %s' % (key, str(dict_fields)))\n            coef_list[dict_fields.index(key)] = value\n        coefs = coef_list\n    assert isinstance(coefs, list)\n    coefs = trim_trailing(coefs, lambda x: x is not None)\n\n    def to_str(x):\n        if x is None:\n            return ''\n        return str(x)\n\n    return ','.join([to_str(x) for x in coefs])\n\ndef parse_list_or_comma_string(obj):\n\n    def str_none_is_empty(s):\n        if s is None:\n            return \"\"\n        return str(s)\n\n    if isinstance(obj, list):\n        return ','.join(map(str_none_is_empty, obj))\n    return str(obj)\n\ndef str_of_int(arg):\n    \"\"\"Cast arg to an int, but then convert it to a str for the wire string.\"\"\"\n    return str(int(arg))\n\n\n_KW_MAP_LIST = [   # Order matters because patch_string must come last.\n    ('osc', 'vI'), ('wave', 'wI'), ('note', 'nF'), ('vel', 'lF'), ('amp', 'aC'), ('freq', 'fC'), ('duty', 'dC'), \n    ('feedback', 'bF'), ('time', 'tI'),  ('reset', 'SI'), ('phase', 'PF'), ('pan', 'QC'), ('client', 'gI'), \n    ('volume', 'VF'), ('pitch_bend', 'sF'), ('filter_freq', 'FC'), ('resonance', 'RF'),\n    ('bp0', 'AL'), ('bp1', 'BL'),\n    ('eg0', 'AL'), ('eg1', 'BL'),  # Aliases for bp0 and bp1\n    ('eg0_type', 'TI'), ('eg1_type', 'XI'), ('debug', 'DI'), ('chained_osc', 'cI'),\n    ('mod_source', 'LI'),  ('eq', 'xL'), ('filter_type', 'GI'), ('ratio', 'IF'), ('latency_ms', 'NI'),\n    ('algo_source', 'OL'), ('load_sample', 'zL'), ('transfer_file', 'zTL'), ('disk_sample', 'zFL'), \n    ('algorithm', 'oI'), ('chorus', 'kL'), ('reverb', 'hL'), ('echo', 'ML'), ('patch', 'KI'), ('voices', 'rL'),\n    ('external_channel', 'WI'), ('portamento', 'mI'), ('sequence', 'HL'), ('tempo', 'jF'),\n    ('synth', 'iI'), ('pedal', 'ipI'), ('synth_flags', 'ifI'), ('num_voices', 'ivI'), ('oscs_per_voice', 'inI'),\n    ('to_synth', 'itI'), ('grab_midi_notes', 'imI'),  ('synth_delay', 'idI'),\n    ('preset', 'pI'), ('num_partials', 'pI'), # note aliasing\n    ('start_sample', 'zSL'), ('stop_sample', 'zOI'),\n    ('midi_cc', 'icL'),\n    ('patch_string', 'uS'),  # patch_string MUST be last because we can't identify when it ends except by end-of-message.\n]\n_KW_PRIORITY = {k: i for i, (k, _) in enumerate(_KW_MAP_LIST)}   # Maps each key to its index within _KW_MAP_LIST.\n_KW_MAP = dict(_KW_MAP_LIST)\n\n_ARG_HANDLERS = {\n    'I': str_of_int, 'F': trunc, 'S': str, 'L': parse_list_or_comma_string, 'C': parse_ctrl_coefs,\n}\n\n# Construct an AMY message\ndef message(**kwargs):\n    #print(\"message:\", kwargs)\n    # Each keyword maps to two or three chars, first one or two are the wire protocol prefix, last is an arg type code\n    # I=int, F=float, S=str, L=list, C=ctrl_coefs\n    global show_warnings, _KW_MAP, _KW_PRIORITY, _ARG_HANDLERS\n    if show_warnings:\n        # Check for possible user confusions.\n        if 'voices' in kwargs and 'preset' in kwargs and 'osc' not in kwargs:\n            print('You specified \\'voices\\' and \\'preset\\' but not \\'osc\\' so your command will apply to the voice\\'s osc 0.')\n        if 'voices' in kwargs and 'synth' in kwargs and not ('patch' in kwargs or 'patch_string' in kwargs):\n            print('You specified both \\'synth\\' and \\'voices\\' in a non-\\'patch\\'/\\'patch_string\\' message, but \\'synth\\' defines the voices.')\n        if 'patch_string' in kwargs and not ('patch' in kwargs or 'synth' in kwargs or 'voices' in kwargs):\n            print('\\'patch_string\\' is only valid with a \\'patch\\' or to define a new \\'synth\\' or \\'voices\\'.')\n            # And yet we plow ahead...\n        if 'patch_string' in kwargs:\n            # Try to avoid mistakenly calling 'patch_string' when you meant 'patch'.\n            if not isinstance(kwargs['patch_string'], str):\n                raise ValueError('\\'patch_string\\' should be a wire command string, not \\'' + str(kwargs['patch_string']) + '\\'.')\n        if 'num_partials' in kwargs:\n            if 'preset' in kwargs:\n                raise ValueError('You cannot use \\'num_partials\\' and \\'preset\\' in the same message.')\n            if 'wave' not in kwargs or kwargs['wave'] != BYO_PARTIALS:\n                raise ValueError('\\'num_partials\\' must be used with \\'wave\\'=BYO_PARTIALS.')\n\n    if(insert_time is not None and 'time' not in kwargs):\n        kwargs['time'] = insert_time()\n\n    # Validity check all the passed args.\n    prioritized_keys = []\n    for key, arg in kwargs.items():\n        if key not in _KW_MAP:\n            raise ValueError('Unknown keyword ' + key)\n        priority = _KW_PRIORITY[key]\n        if arg is None:\n            # Ignore time=None or sequence=None\n            if key != 'time' and key != 'sequence':\n                raise ValueError('No arg for key ' + key)\n        else:\n            prioritized_keys.append((priority, key))\n    # Sort by priority, then strip the priority value.\n    prioritized_keys = [e[1] for e in sorted(prioritized_keys)]\n    # We process the passed args by testing each entry in the known keys in order, to make sure 'patch_string' is added last.\n    m = ''\n    for key in prioritized_keys:\n        map_code = _KW_MAP[key]\n        arg = kwargs[key]\n        type_code = map_code[-1]\n        wire_code = map_code[:-1]\n        m += wire_code + _ARG_HANDLERS[type_code](arg)\n    #print(\"message:\", m)\n    return m + 'Z'\n\n\ndef send_raw(m):\n    # override_send is used by e.g. Tulip, to send messages in a different way than C or UDP\n    global mess, log\n    global override_send\n    if(override_send is not None):\n        override_send(m)\n    else:\n        _amy.send_wire(m)\n    if(log): mess.append(m)\n\ndef log_patch():\n    global mess, log\n    # start recording a patch\n    log = True\n    mess = []\n\ndef retrieve_patch():\n    global mess, log\n    log = False\n    s = \"\".join(mess)\n    mess =[]\n    return s\n\n\n# Convenience function to store an in-memory AMY patch\n# Call this, then call stop_store_patch(patch_number) when you're done\nsaved_override = None\n\ndef amy_do_nothing(message):\n    return\n\ndef start_store_patch():\n    global saved_override, override_send\n    saved_override = override_send\n    override_send = amy_do_nothing\n    log_patch()\n\ndef stop_store_patch(patch):\n    global saved_override, override_send\n    override_send = saved_override\n\n    m = \"u\"+str(patch)+retrieve_patch()\n    send_raw(m)\n\n# Send an AMY message to amy\ndef send(**kwargs):\n    m = message(**kwargs)\n\n    send_raw(m)\n\n\n# Plots a time domain and spectra of audio\ndef show(data):\n    import matplotlib.pyplot as plt\n    import numpy as np\n    fftsize = len(data)\n    windowlength = fftsize\n    window = np.hanning(windowlength)\n    wavepart = data[:len(window)]\n    logspecmag = 20 * np.log10(np.maximum(1e-10, \n        np.abs(np.fft.fft(wavepart * window)))[:(fftsize // 2 + 1)])\n    freqs = AMY_SAMPLE_RATE * np.arange(len(logspecmag)) / fftsize\n    plt.subplot(211)\n    times = np.arange(len(wavepart)) / AMY_SAMPLE_RATE\n    plt.plot(times, wavepart, '.')\n    plt.subplot(212)\n    plt.plot(freqs, logspecmag, '.-')\n    plt.ylim(np.array([-100, 0]) + np.max(logspecmag))\n    plt.show()\n\n# Writes a WAV file of rendered data\ndef write(data, filename):\n    import scipy.io.wavfile as wav\n    import numpy as np\n    wav.write(filename, int(AMY_SAMPLE_RATE), (32768.0 * data).astype(np.int16))\n\n# Play a rendered sound out of default sounddevice\ndef play(samples):\n    import sounddevice as sd\n    sd.play(samples)\n\n# Render AMY's internal buffer to a numpy array of floats\ndef render(seconds):\n    import numpy as np\n    # Output a npy array of samples\n    frame_count = int((seconds*AMY_SAMPLE_RATE)/AMY_BLOCK_SIZE)\n    frames = []\n    for f in range(frame_count):\n        frames.append( np.array(_amy.render_to_list())/32768.0 )\n    return np.hstack(frames).reshape((-1, AMY_NCHANS))\n\ndef restart(default_synths=0):\n    _amy.stop()\n    _amy.start(default_synths)\n\ndef inject_midi(a, b, c, d=None):\n    if d is None:\n        _amy.inject_midi(a, b, c)\n    else:\n        _amy.inject_midi(a, b, c, d)\n    \ndef unload_sample(patch=0):\n    s= \"%d,%d\" % (patch, 0)\n    send(load_sample=s)\n    print(\"Patch %d unloaded from RAM\" % (patch))\n\n# For AMYBoard and other AMYs that can get messages over MIDI sysex\n# AMYboard is the name of the default AMYboard USB over MIDI device. \n# If you're using another MIDI device, set output_name to it \n# Use this like amy.override_send = sysex_write\ndef sysex_write(message, output_name='AMYboard'):\n    import mido\n    outputs = mido.get_output_names()\n    target_name = None\n    for name in outputs:\n        if output_name in name:\n            target_name = name\n            break\n    if target_name is None:\n        print(\"Could not find %s MIDI\")\n    if isinstance(message, str):\n        payload = message.encode('ascii')\n    elif isinstance(message, bytes):\n        payload = message\n    # AMY sysex message\n    data = [0x00, 0x03, 0x45] + list(payload)\n    with mido.open_output(target_name) as out:\n        m = mido.Message('sysex', data=data)\n        out.send(m)\n    # This sleep is because there's not really a buffer per-se for SYSEX over CDC\n    time.sleep(0.01)\n\n\ntry:\n    import base64\n    def b64(b):\n        return base64.b64encode(b)\nexcept ImportError:\n    import ubinascii\n    def b64(b):\n        return ubinascii.b2a_base64(b)[:-1]\n\ndef start_sample(preset=0, bus=1,  max_frames=0, midinote=60, loopstart=0, loopend=0):\n    s = \"%d,%d,%d,%d,%d,%d\" % (preset, bus, max_frames, midinote, loopstart, loopend)\n    send(start_sample=s)\n\ndef stop_sample():\n    send(stop_sample=1)\n\ndef load_sample_bytes(b, stereo=False, preset=0, midinote=60, loopstart=0, loopend=0, sr=AMY_SAMPLE_RATE):\n    # takes in a python bytes obj instead of filename\n    from math import ceil\n    if(stereo):\n        # just choose first channel\n        b = bytes([b[j] for i in range(0,len(b),4) for j in (i,i+1)])\n    n_frames = len(b)/2\n    s = \"%d,%d,%d,%d,%d,%d\" % (preset, n_frames, sr, midinote, loopstart, loopend)\n    send(load_sample=s)\n    last_f = 0\n    for i in range(ceil(n_frames/94)):\n        frames_bytes = b[last_f:last_f+188]\n        message = b64(frames_bytes)\n        send_raw(message.decode('ascii'))\n        last_f = last_f + 188\n\ndef disk_sample(wavfilename, preset=0, midinote=60):\n    try:\n        from tulip import board\n        if board() == \"WEB\":\n            # On web, we just use memorypcm as we can't directly accesss FS from amy-web\n            load_sample(wavfilename, preset, midinote)\n            return\n    except ImportError:\n        pass # It's ok, just means we are not under tulip or amyboard web\n    s = \"%d,%s,%d\" % (preset, wavfilename, midinote)\n    send(disk_sample=s)\n\ndef transfer_file(source_filename, dest_filename=None):\n    import os\n    from math import ceil\n    if(dest_filename is None):\n        dest_filename = source_filename\n    file_size = os.path.getsize(source_filename)\n    s = \"%s,%d\" % (dest_filename, file_size)\n    send(transfer_file=s)\n\n    # Now generate the base64 encoded segments, 188 bytes at a time\n    # why 188? that generates 252 bytes of base64 text. amy's max message size is currently 255.\n    # Use the _from_sysex variant so the chunks are routed to\n    # parse_transfer_message via the amy_parsing_from_sysex flag. Internal\n    # amy.send() calls from other contexts (e.g. a sketch's loop() on\n    # AMYboard hardware running during a live transfer) use the regular\n    # path and won't be mis-interpreted as transfer data.\n    w = open(source_filename, 'rb')\n    for i in range(ceil(file_size/188)):\n        file_bytes = w.read(188)\n        message = b64(file_bytes)\n        if override_send is not None:\n            override_send(message.decode('ascii'))\n        else:\n            _amy.send_wire_from_sysex(message.decode('ascii'))\n    w.close()\n\ndef load_sample(wavfilename, preset=0, midinote=0, loopstart=0, loopend=0):\n    from math import ceil\n    from . import wave\n    # tulip has ubinascii, normal has base64\n    w = wave.open(wavfilename, 'r')\n    \n    if(loopstart==0): \n        if(hasattr(w,'_loopstart')): \n            loopstart = w._loopstart\n    if(loopend==0): \n        if(hasattr(w,'_loopend')): \n            loopend = w._loopend\n    if(midinote==0): \n        if(hasattr(w,'_midinote')): \n            midinote = w._midinote\n        else:\n            midinote=60\n\n    # Tell AMY we're sending over a sample\n    s = \"%d,%d,%d,%d,%d,%d\" % (preset, w.getnframes(), w.getframerate(), midinote, loopstart, loopend)\n    send(load_sample=s)\n    # Now generate the base64 encoded segments, 188 bytes / 94 frames at a time\n    # why 188? that generates 252 bytes of base64 text. amy's max message size is currently 255.\n    for i in range(ceil(w.getnframes()/94)):\n        frames_bytes = w.readframes(94)\n        if(w.getnchannels()==2):\n            # de-interleave and just choose the first channel\n            frames_bytes = bytes([frames_bytes[j] for i in range(0,len(frames_bytes),4) for j in (i,i+1)])\n        message = b64(frames_bytes)\n        send_raw(message.decode('ascii'))\n    print(\"Loaded sample over wire protocol. Preset #%d. %d bytes, %d frames, midinote %d\" % (preset, w.getnframes()*2, w.getnframes(), midinote))\n\n\n\"\"\"\n    Convenience functions\n\"\"\"\n\ndef reset(osc=None, **kwargs):\n    if(osc is not None):\n        send(reset=osc, **kwargs)\n    else:\n        send(reset=RESET_ALL_OSCS, **kwargs) \n\n\n\n\n\n\"\"\"\n    Chorus control\n\"\"\"\ndef chorus(level=-1, max_delay=-1, freq=-1, amp=-1):\n    chorus_level = ''\n    chorus_delay = ''\n    chorus_freq = ''\n    chorus_depth = ''\n    if (level >= 0):\n        chorus_level = str(level)\n    if (max_delay >= 0):\n        chorus_delay = str(max_delay)\n    if (freq >= 0):\n        chorus_freq = str(freq)\n    if (amp >= 0):\n        chorus_depth = str(amp)\n    chorus_arg = \"%s,%s,%s,%s\" % (chorus_level, chorus_delay, chorus_freq, chorus_depth)\n    send(chorus=chorus_arg)\n\n\"\"\"\n    Reverb control\n\"\"\"\ndef reverb(level=-1, liveness=-1, damping=-1, xover_hz=-1):\n    reverb_level = ''\n    reverb_liveness = ''\n    reverb_damping = ''\n    reverb_xover = ''\n    if (level >= 0):\n        reverb_level = str(level)\n    if (liveness >= 0):\n        reverb_liveness = str(liveness)\n    if (damping >= 0):\n        reverb_damping = str(damping)\n    if (xover_hz >= 0):\n        reverb_xover = str(xover_hz)\n    reverb_arg = \"%s,%s,%s,%s\" % (reverb_level, reverb_liveness, reverb_damping, reverb_xover)\n    send(reverb=reverb_arg)\n\n\"\"\"\n    Echo control\n\"\"\"\ndef echo(level=None, delay_ms=None, max_delay_ms=None, feedback=None, filter_coef=None):\n    echo_level = ''\n    echo_delay_ms = ''\n    echo_max_delay_ms = ''\n    echo_feedback = ''\n    echo_filter_coef = ''\n    if level is not None:\n        echo_level = str(level)\n    if delay_ms is not None:\n        echo_delay_ms = str(delay_ms)\n    if max_delay_ms is not None:\n        echo_max_delay_ms = str(max_delay_ms)\n    if feedback is not None:\n        echo_feedback = str(feedback)\n    if filter_coef is not None:\n        echo_filter_coef = str(filter_coef)\n    echo_arg = '%s,%s,%s,%s,%s' % (echo_level, echo_delay_ms, echo_max_delay_ms, echo_feedback, echo_filter_coef)\n    send(echo=echo_arg)\n\n\"\"\"\n    Reading back synth configuration\n\"\"\"\ndef get_synth_commands(synth, patch_num=None, dest_synth=None, num_voices=6, include_fx=True, time=None):\n    if patch_num is not None and dest_synth is not None:\n        raise ValueError(\"At most one of patch_num and dest_synth can be specified\")\n    commands = _get_synth_commands(synth, include_fx)\n\n    def len_digit_prefix(s):\n        len = 0\n        while s[len] in '0123456789':\n            len += 1\n        return len\n\n    # Scan for number of oscs\n    num_oscs = 0\n    for command in commands:\n        if command[0] == 'v':\n            osc_num = int(command[1: 1 + len_digit_prefix(command[1:])])\n            if num_oscs < osc_num + 1:\n                num_oscs = osc_num + 1\n    # Build total command string including prefix depending on use.\n    prefix = \"t%d\" % time if time is not None else \"\"\n    prologue = []\n    if patch_num:\n        # Start by resetting the patch.\n        prologue = [prefix + \"S%dk%dZ\" % (RESET_PATCH, patch_num)]\n        prefix += \"K%d\" % patch_num\n    if dest_synth:\n        # Prepend command to reset the synth.\n        prologue = [prefix + \"i%div%din%dZ\" % (dest_synth, num_voices, num_oscs)]\n        prefix += \"i%d\" % dest_synth\n    return \"\\n\".join(prologue + [prefix + command for command in commands])\n"
  },
  {
    "path": "amy/constants.py",
    "content": "MAX_FILENAME_LEN=127\nAMY_BLOCK_SIZE=128\nBLOCK_SIZE_BITS=7\nAMY_BLOCK_SIZE=256\nBLOCK_SIZE_BITS=8\nAMY_SAMPLE_RATE=48000\nAMY_SAMPLE_RATE=48000\nAMY_SAMPLE_RATE=44100\nPCM_AMY_SAMPLE_RATE=22050\nAMY_TRANSFER_TYPE_NONE=0\nAMY_TRANSFER_TYPE_AUDIO=1\nAMY_TRANSFER_TYPE_FILE=2\nAMY_TRANSFER_TYPE_SAMPLE=3\nAMY_PCM_TYPE_ROM=0\nAMY_PCM_TYPE_FILE=1\nAMY_PCM_TYPE_MEMORY=2\nPCM_FILE_BUFFER_MULT=8\nAMY_BUS_OUTPUT=1\nAMY_BUS_AUDIO_IN=2\nAMY_MAX_CORES=2\nAMY_MAX_CHANNELS=2\nAMY_NCHANS=2\nAMY_CORES=2\nAMY_CORES=1\nAMY_MIDI_CHANNEL_DRUMS=10\nMALLOC_CAP_DEFAULT=0\nCHORUS_DEFAULT_LFO_FREQ=0.5\nCHORUS_DEFAULT_MOD_DEPTH=0.5\nCHORUS_DEFAULT_LEVEL=0\nCHORUS_DEFAULT_MAX_DELAY=320\nEQ_CENTER_LOW=800.0\nEQ_CENTER_MED=2500.0\nEQ_CENTER_HIGH=7000.0\nREVERB_DEFAULT_LEVEL=0\nREVERB_DEFAULT_LIVENESS=0.85\nREVERB_DEFAULT_DAMPING=0.5\nREVERB_DEFAULT_XOVER_HZ=3000.0\nECHO_DEFAULT_LEVEL=0\nECHO_DEFAULT_DELAY_MS=500.\nECHO_DEFAULT_MAX_DELAY_MS=743.\nECHO_DEFAULT_FEEDBACK=0\nECHO_DEFAULT_FILTER_COEF=0\nAMY_SEQUENCER_PPQ=48\nDELAY_LINE_LEN=512\nCLIP_D=0.1\nMAX_VOLUME=11.0\nAMP_THRESH=0.001\nAMP_THRESH_PLUS=0.0011\nSAMPLE_MAX=32767\nMAX_ALGO_OPS=6\nDEFAULT_NUM_BREAKPOINTS=8\nMAX_BREAKPOINTS=24\nMAX_BREAKPOINT_SETS=2\nTHREAD_USLEEP=500\nAMY_BYTES_PER_SAMPLE=2\nMAX_VOICES_PER_INSTRUMENT=32\nFILT_NUM_DELAYS=4\nZERO_HZ_LOG_VAL=-99.0\nZERO_LOGFREQ_IN_HZ=440.0\nZERO_MIDI_NOTE=69\nMIN_FILTER_LOGFREQ=-2.75\nNUM_COMBO_COEFS=9\nMAX_MESSAGE_LEN=1024\nMAX_PARAM_LEN=256\nFILTER_NONE=0\nFILTER_LPF=1\nFILTER_BPF=2\nFILTER_HPF=3\nFILTER_LPF24=4\nSINE=0\nPULSE=1\nSAW_DOWN=2\nSAW_UP=3\nTRIANGLE=4\nNOISE=5\nKS=6\nPCM=7\nALGO=8\nPARTIAL=9\nBYO_PARTIALS=10\nINTERP_PARTIALS=11\nAUDIO_IN0=12\nAUDIO_IN1=13\nAUDIO_EXT0=14\nAUDIO_EXT1=15\nAMY_MIDI=16\nPCM_LEFT=17\nPCM_RIGHT=18\nPCM_MIX=7\nWAVETABLE=19\nSILENT=20\nCUSTOM=21\nWAVE_OFF=22\nSYNTH_OFF=0\nSYNTH_AUDIBLE=1\nSYNTH_INAUDIBLE=2\nSYNTH_IS_MOD_SOURCE=3\nSYNTH_IS_ALGO_SOURCE=4\nEVENT_EMPTY=0\nEVENT_SCHEDULED=1\nEVENT_TRANSFER_DATA=2\nEVENT_SEQUENCE=3\nNOTE_SOURCE_MIDI=2\nENVELOPE_NORMAL=0\nENVELOPE_LINEAR=1\nENVELOPE_DX7=2\nENVELOPE_TRUE_EXPONENTIAL=3\nSEQUENCE_TICK=0\nSEQUENCE_PERIOD=1\nSEQUENCE_TAG=2\nRESET_SEQUENCER=4096\nRESET_ALL_OSCS=8192\nRESET_TIMEBASE=16384\nRESET_AMY=32768\nRESET_EVENTS=65536\nRESET_ALL_NOTES=131072\nRESET_SYNTHS=262144\nRESET_PATCH=524288\nRESET_QUEUE=1048576\ntrue=1\nfalse=0\nAMY_OK=0\nAMY_AUDIO_IS_NONE=0x00\nAMY_AUDIO_IS_I2S=0x01\nAMY_AUDIO_IS_USB_GADGET=0x02\nAMY_AUDIO_IS_MINIAUDIO=0x04\nAMY_MIDI_IS_NONE=0x0\nAMY_MIDI_IS_UART=0x01\nAMY_MIDI_IS_USB_GADGET=0x02\nAMY_MIDI_IS_MACOS=0x04\nAMY_MIDI_IS_WEBMIDI=0x08\nAMYBOARD_LRC=2\nAMYBOARD_BCLK=8\nAMYBOARD_DOUT=6\nAMYBOARD_DIN=9\nAMYBOARD_MCLK=3\nAMYBOARD_MIDI_OUT_TYPE_A=14\nAMYBOARD_MIDI_OUT_TYPE_B=15\nAMYBOARD_MIDI_IN=21\n"
  },
  {
    "path": "amy/examples.py",
    "content": "#!/usr/bin/env python3\n# examples.py\n# sound examples and patch examples\n\nimport amy\nfrom time import sleep\n\n\nclass Patch:\n    \"\"\"\n        Provides a collection of illustrations of different voice configurations with AMY.\n\n        You use them like this:\n\n        amy.send(synth=0, num_voices=4, patch=patches.filter_bass())\n    \"\"\"\n    next_patch_number = 1024\n\n    @classmethod\n    def _new_patch_number(cls):\n        # just keep a global patch num around for these patches\n        new_num = cls.next_patch_number\n        cls.next_patch_number = cls.next_patch_number + 1\n        return new_num\n\n    @classmethod\n    def reset(cls):\n        cls.next_patch_number = 1024\n\n    def __init__(self, **kwargs):\n        self.patch_number = Patch._new_patch_number()\n        self.setup(**kwargs)\n\n    def __int__(self):\n        # When amy.message() tries to convert this into an int, just return the patch number.\n        return self.patch_number\n\n    def setup(self, **kwargs):\n        raise ValueError('Subclasses of Patch must define a setup(self, **kwargs) method.')\n\n\nclass simple_sine(Patch):\n    def setup(self, **kwargs):\n        amy.send(patchr=self.patch_number,\n                 wave=amy.SINE, bp0=\"10,1,240,0.7,500,0\",\n                 **kwargs)\n\nclass filter_bass(Patch):\n    def setup(self, **kwargs):\n        amy.send(patch=self.patch_number,\n                 osc=0, filter_freq=\"100,0,0,5\", resonance=5, wave=amy.SAW_DOWN,\n                 filter_type=amy.FILTER_LPF, bp0=\"0,1,1000,0,100,0\",\n                 **kwargs)\n\nclass amp_lfo(Patch):\n    def setup(self, **kwargs):\n        # Not clear what to do with kwargs.  They probably don't want to apply to both oscs.\n        amy.send(patch=self.patch_number,\n                 osc=1, wave=amy.SINE, amp=0.50, freq=1.5,\n                 **kwargs)\n        amy.send(patch=self.patch_number,\n                 osc=0, wave=amy.PULSE, bp0=\"150,1,1850,0.25,250,0\", amp=\"0,0,1,1,0,1\", mod_source=1,\n                 **kwargs)\n\nclass pitch_lfo(Patch):\n    def setup(self, **kwargs):\n        amy.send(patch=self.patch_number,\n                 osc=1, wave=amy.SINE, amp=0.50, freq=0.25,\n                 **kwargs)\n        amy.send(patch=self.patch_number,\n                 osc=0, wave=amy.PULSE, bp0=\"150,1,250,0,0,0\", freq=\"261.63,1,0,0,0,1\", mod_source=1,\n                 **kwargs)\n\nclass bass_drum(Patch):\n    def setup(self, **kwargs):\n        # Uses a 0.25Hz sine wave at 0.5 phase (going down) to modify frequency of another sine wave\n        amy.send(patch=self.patch_number,\n                 osc=1, wave=amy.SINE, amp=0.50, freq=0.25, phase=0.5,\n                 **kwargs)\n        amy.send(patch=self.patch_number,\n                 osc=0, wave=amy.SINE, bp0=\"0,1,500,0,0,0\", freq=\"261.63,1,0,0,0,1\",  mod_source=1,\n                 **kwargs)\n\nclass noise_snare(Patch):\n    def setup(self, **kwargs):\n        amy.send(patch=self.patch_number,\n                 osc=0, wave=amy.NOISE, bp0=\"0,1,250,0,0,0\",\n                 **kwargs)\n\nclass closed_hat(Patch):\n    def setup(self, **kwargs):\n        amy.send(patch=self.patch_number,\n                 osc=0, wave=amy.NOISE, bp0=\"5,1,30,0,0,0\", filter_type=amy.FILTER_HPF, filter_freq=6000,\n                 **kwargs)\n\n\n\n\n\"\"\"\n    Various python examples of using AMY, including the port of all the C examples.c \n\"\"\"\n\n\n# Plays the example patches defined in this file\ndef play_example_patches(wait=1, **kwargs):\n    from . import examples\n    try:\n        patchClasses = examples.Patch.__subclasses__()\n    except AttributeError:\n        # micropython does not have __subclasses__\n        patchClasses = [\n            examples.simple_sine,\n            examples.filter_bass,\n            examples.amp_lfo,\n            examples.pitch_lfo,\n            examples.bass_drum,\n            examples.noise_snare,\n            examples.closed_hat,\n        ]\n    for patchClass in patchClasses:\n        print(\"Patch\", patchClass.__name__)\n        send(synth=0, num_voices=1, patch=patchClass())\n        time.sleep(wait/4.0)            \n        send(synth=0, note=50, vel=1, **kwargs)\n        time.sleep(wait)\n        send(synth=0, vel=0)\n        time.sleep(wait/4.0)\n\n# Plays the baked in Juno, DX7 and piano patches\ndef play_baked_patches(wait=1, patch_total = 256, **kwargs):\n    import random\n    patch_count = 0\n    while True:\n        patch = random.randint(0,256) #patch_count % patch_total\n        print(\"Sending patch %d\" % patch)\n        send(synth=0, num_voices=1, patch=patch)\n        time.sleep(wait/4.0)            \n        send(synth=0, note=50, vel=1, **kwargs)\n        time.sleep(wait)\n        send(synth=0, vel=0)\n        time.sleep(wait/4.0)\n\ndef example_multimbral_synth():\n    amy.send(patch=4, num_voices=6, synth=1)  # juno-6 preset 4 on MIDI channel 1\n    amy.send(patch=129, num_voices=2, synth=2) # dx7 preset 1 on MIDI channel 2\n    amy.send(synth=3, num_voices=4, patch=filter_bass()) # filter bass user patch on MIDI channel 3\n    amy.send(synth=4, num_voices=4, patch=pitch_lfo()) # pitch LFO user patch on MIDI channel 4\n\ndef example_reset(start=0):\n    amy.send(osc=0, reset=amy.RESET_ALL_OSCS, time=start)\n\ndef example_voice_alloc():\n    # alloc 2 juno voices, then try to alloc a dx7 voice on voice 0\n    amy.send(patch=1, voices=[0, 1])\n    sleep(0.25)\n\n    amy.send(patch=131, voices=[0])\n    sleep(0.25)\n\n    # play the same note on both\n    amy.send(vel=1, note=60, voices=[0])\n    sleep(2)\n\n    amy.send(vel=1, note=60, voices=[1])\n    sleep(2)\n\n    # now try to alloc voice 0 with a juno, should use oscs 0-4 again\n    amy.send(patch=2, voices=[0])\n    sleep(0.25)\n\ndef example_voice_chord(patch=0):\n    amy.send(patch=patch, voices=[0, 1, 2])\n    sleep(.250)\n\n    amy.send(vel=0.5, voices=[0], note=50)\n    sleep(1)\n\n    amy.send(vel=0.5, voices=[1], note=54)\n    sleep(1)\n\n    amy.send(vel=0.5, voices=[2], note=56)\n    sleep(2)\n\n    amy.send(vel=0, voices=[0, 1, 2])\n\ndef example_synth_chord(patch=0):\n    # Like example_voice_chord, but use 'synth' to avoid having to keep track of voices\n    amy.send(patch=patch, num_voices=3, synth=0)\n    sleep(1)\n\n    amy.send(vel=0.5, synth=0, note=50)\n    sleep(1)\n\n    amy.send(vel=0.5, synth=0, note=54)\n    sleep(1)\n\n    amy.send(vel=0.5, synth=0, note=56)\n    sleep(1)\n\n    # Voices are referenced only by their note, so have to turn them off individually\n    amy.send(vel=0, synth=0, note=50)\n    amy.send(vel=0, synth=0, note=54)\n    amy.send(vel=0, synth=0, note=56)\n\ndef example_sustain_pedal(patch=0):\n    # Reset all oscillators first\n    amy.send(reset=amy.RESET_ALL_OSCS)\n\n    amy.send(synth=1, num_voices=4, patch=patch)\n    sleep(0.05)\n\n    amy.send(synth=1, note=76, vel=1.0)\n\n    sleep(0.05)\n    amy.send(synth=1, note=76, vel=0)\n\n    sleep(0.05)\n    amy.send(synth=1, pedal=127)\n\n    sleep(0.05)\n    amy.send(synth=1, note=63, vel=1.0)\n\n    sleep(0.05)\n    amy.send(synth=1, note=63, vel=0)\n\n    sleep(0.05)\n    amy.send(synth=1, note=67, vel=1.0)\n\n    sleep(0.05)\n    amy.send(synth=1, note=67, vel=0)\n\n    sleep(0.05)\n    amy.send(synth=1, note=72, vel=1.0)\n\n    sleep(0.05)\n    amy.send(synth=1, pedal=0)\n\n    sleep(0.05)\n    amy.send(synth=1, note=72, vel=0)\n\ndef example_patches():\n    for i in range(256):\n        amy.send(patch=i, voices=[0])\n        print(f\"sending patch {i}\")\n        sleep(0.25)\n\n        amy.send(voices=[0], osc=0, note=50, vel=0.5)\n        sleep(1)\n\n        amy.send(voices=[0], vel=0)\n        sleep(0.25)\n\n        amy.reset()\n\ndef example_reverb():\n    amy.reverb(2, amy.REVERB_DEFAULT_LIVENESS, amy.REVERB_DEFAULT_DAMPING, amy.REVERB_DEFAULT_XOVER_HZ)\n\ndef example_chorus():\n    amy.chorus(0.8, amy.CHORUS_DEFAULT_MAX_DELAY, amy.CHORUS_DEFAULT_LFO_FREQ, amy.CHORUS_DEFAULT_MOD_DEPTH)\n\ndef example_ks():\n    amy.send(vel=1, wave=amy.KS, feedback=0.996, preset=15, osc=0, note=60)\n\ndef example_sine():\n    amy.send(freq=[440], wave=amy.SINE, vel=1)\n\ndef example_multimbral_fm():\n    notes = [60, 70, 64, 68, 72, 82]\n    for i, note in enumerate(notes):\n        # Two amy sends, one to load the patch, one to play it\n        amy.send(voices=[i], patch=128+i)\n        amy.send(voices=[i], note=note, vel=0.5, pan=[i*2])\n        sleep(1)\n\n\ndef example_sequencer_drums():\n    # Reset all oscillators\n    amy.send(reset=amy.RESET_ALL_OSCS)\n\n    amy.send(tempo=120.0)\n\n    # Setup oscs for bd, snare, hat, cow, hicow\n    oscs = [0, 1, 2, 3, 4]\n    presets = [1, 5, 0, 10, 10]\n\n    for osc, preset in zip(oscs, presets):\n        amy.send(osc=osc, wave=amy.PCM, preset=preset)\n\n    # Update high cowbell\n    amy.send(osc=4, note=70)\n\n    # Add patterns\n    # Hi hat every 1/8th note\n    amy.send(sequence=[0, 24, 0], osc=2, vel=2.0)\n\n    # Bass drum every quarter note\n    amy.send(sequence=[0, 96, 1], osc=0, vel=1.0)\n\n    # Snare every quarter note, counterphase to BD\n    amy.send(sequence=[24, 96, 2], osc=1, vel=1.0)\n\n    # Cow once every other cycle\n    amy.send(sequence=[0, 192, 3], osc=3, vel=1.0)\n\ndef example_fm():\n    amy.reset()\n    # Modulating oscillator (op 2)\n    amy.send(osc=9, wave=amy.SINE, ratio=1.0,\n            amp=[1.0, None, 0, 0])  \n\n    # Output oscillator (op 1)\n    amy.send(osc=8, wave=amy.SINE, ratio=0.2,\n            amp=[1.0, None, 0, 1.0], \n            bp0=\"0,1,1000,0,0,0\")\n\n    # ALGO control oscillator\n    amy.send(osc=7, wave=amy.ALGO, algorithm=1,\n            algo_source=[0, 0, 0, 0, 9, 8])  # Only indices 4 and 5 matter here\n\n    # Add a note on event\n    sleep(.1)\n    amy.send(osc=7, note=60, vel=2.0)\n\ndef example_patch_from_events():\n    number = 1039\n\n    amy.send(patch=number, reset=amy.RESET_PATCH)\n\n    amy.send(patch=number, osc=0, wave=amy.SAW_DOWN,\n            chained_osc=1, bp0=\"0,1,1000,0.1,200,0\")\n\n    amy.send(patch=number, osc=1, wave=amy.SINE,\n            freq=[131.0], bp0=\"0,1,500,0,200,0\")\n\n    amy.send(synth=0, num_voices=4, patch=number)\n    sleep(.1)\n    amy.send(synth=0, note=60, vel=1.0)\n    sleep(.3)\n    amy.send(synth=0, note=64, vel=1.0)\n    sleep(.2)\n    amy.send(synth=0, note=67, vel=1.0)\n    sleep(.3)\n    amy.send(synth=0, vel=0.0) \n"
  },
  {
    "path": "amy/fm.py",
    "content": "# fm.py\n# Some code to try to convert DX7 patches into AMY commands\n\nimport numpy as np\nimport time\nimport amy\nfrom dataclasses import dataclass\nfrom typing import List\n\n@dataclass\nclass DX7Operator:\n    \"\"\"Per-operator parameters for DX7 patches.\"\"\"\n    opnum: int = 0\n    rates: List[int] = None  # 4\n    levels: List[int] = None # 4\n    breakpoint: int = 0\n    bp_depths: List[int] = None # 2\n    bp_curves: List[int] = None # 2\n    kbdratescaling: int = 0\n    ampmodsens: int = 0\n    keyvelsens: int = 0\n    ratiotuning: bool = False\n    freq_coarse: int = 0\n    freq_fine: int = 0\n    freq_detune: int = 0\n    opamp: int = 0\n\n@dataclass\nclass DX7Patch:\n    \"\"\"Encapsulates information in a DX7 Patch.\"\"\"\n    ops: List[DX7Operator] = None\n    pitch_rates: List[int] = None # 4\n    pitch_levels: List[int] = None # 4\n    algo: int = 0  # 1-32\n    feedback: int = 0\n    oscsync: int = 0\n    lfospeed: int = 0\n    lfodelay: int = 0\n    lfopitchmoddepth: int = 0\n    lfoampmoddepth: int = 0\n    lfosync: int = 0\n    lfowaveform: int = 0\n    pitchmodsens: int = 0\n    transpose: int = 0\n    name: str = \"\"\n\n    @staticmethod\n    def from_patch_number(patch_number):\n        # returns a patch (as in patches.h) from \n        # default-dx7-patches.bin generated by dx7db, see https://github.com/bwhitman/learnfm\n        f = bytes(open(\"amy/default-dx7-patches.bin\", mode=\"rb\").read())\n        patch_data = f[patch_number*156:patch_number*156+156]\n        return DX7Patch.from_bytestream(bytearray(patch_data))\n\n    @staticmethod\n    def from_bytestream(bytestream):\n        \"\"\"Simply reformat the bytestream into parameters.\"\"\"\n        result = DX7Patch()\n\n        bytestream = bytes(bytestream)\n        byteno = 0\n\n        def nextbyte(count=1):\n            nonlocal byteno\n            if count > 1:\n                # Return a list.\n                return [nextbyte() for _ in range(count)]\n            b = bytestream[byteno]\n            byteno += 1\n            # Return a bare byte.\n            return b\n\n        ops = []\n        # Starts at op 6\n        for i in range(6, 0, -1):\n            op = DX7Operator(opnum=i)\n            op.rates = nextbyte(4)\n            op.levels = nextbyte(4)\n            op.breakpoint = nextbyte()\n            op.bp_depths = nextbyte(2)\n            op.bp_curves = nextbyte(2)\n            op.kbdratescaling = nextbyte()\n            op.ampmodsens = nextbyte()\n            op.keyvelsens = nextbyte()\n            op.opamp = nextbyte()\n            op.ratiotuning = False if nextbyte() == 1 else True\n            op.freq_coarse = nextbyte()\n            op.freq_fine = nextbyte()\n            op.freq_detune = nextbyte()\n            ops.append(op)\n        result.ops = ops\n        result.pitch_rates = nextbyte(4)\n        result.pitch_levels = nextbyte(4)\n        result.algo = 1 + nextbyte()\n        result.feedback = nextbyte()\n        result.oscsync = nextbyte()\n        result.lfospeed = nextbyte()\n        result.lfodelay = nextbyte()\n        result.lfopitchmoddepth = nextbyte()\n        result.lfoampmoddepth = nextbyte()\n        result.lfosync = nextbyte()\n        result.lfowaveform = nextbyte()\n        result.pitchmodsens = nextbyte()\n        result.transpose = nextbyte()\n        result.name =  ''.join(chr(i) for i in nextbyte(10))\n        return result\n\n    def get_bytestream(self):\n        \"\"\"Convert a decoded patch dict back to a bytestream.\"\"\"\n        bytestream = []\n        for op in self.ops:\n            # Assume ordering is right in ops list.\n            bytestream.extend(op.rates)\n            bytestream.extend(op.levels)\n            bytestream.append(op.breakpoint)\n            bytestream.extend(op.bp_depths)\n            bytestream.extend(op.bp_curves)\n            bytestream.append(op.kbdratescaling)\n            bytestream.append(op.ampmodsens)\n            bytestream.append(op.keyvelsens)\n            bytestream.append(op.opamp)\n            bytestream.append(0 if op.ratiotuning else 1)\n            bytestream.append(op.freq_coarse)\n            bytestream.append(op.freq_fine)\n            bytestream.append(op.freq_detune)\n        bytestream.extend(self.pitch_rates)\n        bytestream.extend(self.pitch_levels)\n        bytestream.append(self.algo - 1)\n        bytestream.append(self.feedback)\n        bytestream.append(self.oscsync)\n        bytestream.append(self.lfospeed)\n        bytestream.append(self.lfodelay)\n        bytestream.append(self.lfopitchmoddepth)\n        bytestream.append(self.lfoampmoddepth)\n        bytestream.append(self.lfosync)\n        bytestream.append(self.lfowaveform)\n        bytestream.append(self.pitchmodsens)\n        bytestream.append(self.transpose)\n        bytestream.extend(ord(c) for c in self.name)\n        return bytes(bytestream)\n\n@dataclass\nclass AMYOscillator:\n    op_num: int = 0\n    amp_levels: List[float] = None\n    amp_times: List[float] = None\n    op_amp: float = 0\n    ampmodsens: float = 0\n    frequency: float = 0\n    freq_is_ratio: bool = False\n\n    @staticmethod\n    def from_dx7_op(op):\n        result = AMYOscillator()\n        result.op_num = op.opnum\n        result.amp_levels, result.amp_times = eg_to_bp(op.rates, op.levels)\n        result.op_amp = 2 * dx7level_to_linear(op.opamp)\n        if op.ratiotuning:\n            result.frequency = coarse_fine_ratio(op.freq_coarse, op.freq_fine, op.freq_detune)\n            result.freq_is_ratio = True\n        else:\n            result.frequency = coarse_fine_fixed_hz(op.freq_coarse, op.freq_fine, op.freq_detune)\n            result.freq_is_ratio = False\n        result.ampmodsens = float(op.ampmodsens)  # Don't know scaling, just 0/nonzero.\n        return result\n\ndef fm_trunc(number):\n    if(type(number)==float or type(number)==np.float64):\n        return ('%.6f' % number).rstrip('0').rstrip('.')\n    return str(number)\n\n@dataclass\nclass AMYPatch:\n    oscs: List[AMYOscillator] = None\n    pitch_levels: List[float] = None\n    pitch_times: List[float] = None\n    algo: int = 0\n    feedback: float = 0\n    lfo_freq: float = 0\n    lfo_delay: float = 0\n    lfo_pitchmoddepth: float = 0\n    lfo_ampmoddepth: float = 0\n    lfo_waveform: int = 0\n    name: str = \"\"\n    amp_lfo_amp: float = 0 \n    pitch_lfo_amp: float = 0\n\n    @staticmethod\n    def from_dx7(dx7_patch):\n        result = AMYPatch()\n        result.oscs = []\n        for op in dx7_patch.ops:\n            result.oscs.append(AMYOscillator.from_dx7_op(op))\n        result.pitch_levels, result.pitch_times = eg_to_bp_pitch(\n            dx7_patch.pitch_rates, dx7_patch.pitch_levels)\n        result.algo = dx7_patch.algo\n        result.feedback = 0.00125 * (2 ** dx7_patch.feedback)\n        result.lfo_freq = lfo_speed_to_hz(dx7_patch.lfospeed)\n        result.lfo_delay = dx7_patch.lfodelay\n        #result.lfo_pitchmoddepth = dx7_patch.lfopitchmoddepth\n        result.lfo_ampmoddepth = dx7_patch.lfoampmoddepth\n        result.lfo_waveform = lfo_wave(dx7_patch.lfowaveform)\n        result.amp_lfo_amp = dx7level_to_linear(result.lfo_ampmoddepth)\n        # With pitchmodsens at max (7), and PMD at max (99), the pitch mod is +/- 1 octave (24 semis range)\n        # PMS 7 / PMD 50 is 12 semis range\n        # PMS 7 / PMD 25 is 6 semis\n        # PMS 7 / PMD 12 is 2 semis\n        # PMS 7 / PMD 6 is 1 semi  .. really does look linear.\n        # PMS 6 / PMD 99 is 14 semis range\n        # PMS 5 / PMD 99 is ~8.5 semis\n        # PMS 4 / PMD 99 is ~5.5 semis range\n        # PMS 3 / PMD 99 is ~3.5\n        # PMS 2 / PMD 99 is ~2 semi\n        # PMS 1 / PMD 99 is ~1.5 semi\n        # PMS 0 is no semi\n        # Finally, matching K128 by ear, PMS 3/PDM 05 should give pitch_lfo_amp about 0.008.\n        # So total range is about 1.7 ^ (PMS - 1) * (PMD / 99) semis\n        # So scaling from +/-1 LFO to octaves is pow(1.7, (PMS - 1)) * (PMD / 99) / 12\n        # 0.6 is a fudge factor.  Seems way too large for small values of PMD, so maybe PMD is exp-lin or smt\n        result.pitch_lfo_amp = (\n            0 if dx7_patch.pitchmodsens == 0\n            else 0.6 * (1.7 ** (dx7_patch.pitchmodsens - 1)) * dx7_patch.lfopitchmoddepth / 1188.0\n        )\n        result.name = dx7_patch.name\n        return result\n    \n    def send_to_AMY(self, reset=True):\n        # Take a FM patch and output AMY commands to set up the patch.\n        # Send amy.send(vel=1,osc=0,note=50) after\n        t = fm_trunc\n        if(reset): amy.reset()\n        pitch_levels, pitch_times = self.pitch_levels, self.pitch_times\n        pitchbp = \"%d,%s,%d,%s,%d,%s,%d,%s,%d,%s\" % (\n            pitch_times[0], t(pitch_levels[0]), pitch_times[1], t(pitch_levels[1]),\n            pitch_times[2], t(pitch_levels[2]), pitch_times[3], t(pitch_levels[3]),\n            pitch_times[4], t(pitch_levels[4])\n        )\n        # Set up each operator.\n        last_release_time = 0\n        last_release_value = 0\n        # Oscs: 0 is algo, 1 is pitch LFO, 2 is amp LFO, 3-8 are ops 1-6\n        main_osc = 0\n        lfo_osc = 1\n        # The osc of op0 (they go up from here)\n        op0_osc = 2\n        for op_num_from_0, osc in enumerate(self.oscs):\n            osc_num = op0_osc + op_num_from_0\n            amp_levels, amp_times = osc.amp_levels, osc.amp_times\n            oscbp = \"%d,%s,%d,%s,%d,%s,%d,%s,%d,%s\" % (\n                amp_times[0], t(amp_levels[0]), amp_times[1], t(amp_levels[1]),\n                amp_times[2], t(amp_levels[2]), amp_times[3], t(amp_levels[3]),\n                amp_times[4], t(amp_levels[4])\n            )\n            oscbpfmt = \"%d,%s/%d,%s/%d,%s/%d,%s/%d,%s\" % (\n                amp_times[0], t(amp_levels[0]), amp_times[1], t(amp_levels[1]),\n                amp_times[2], t(amp_levels[2]), amp_times[3], t(amp_levels[3]),\n                amp_times[4], t(amp_levels[4])\n            )\n            if(amp_times[4] > last_release_time):\n                last_release_time = amp_times[4]\n                last_release_value = amp_levels[4]\n            #print(\"osc %d (op %d) freq %.6f ratio %d env %s amp %.6f amp_mod %d\" % \\\n            #      (osc_num, osc.op_num_from_0, osc.frequency, osc.freq_is_ratio, oscbpfmt,\n            #       osc.op_amp, osc.ampmodsens))\n\n            # Make them all in cosine phase, to be like DX7.  Important for slow oscs\n            args = {\"osc\": osc_num,\n                    \"bp0\": oscbp, \"phase\": 0.25}\n            if osc.freq_is_ratio:\n                args[\"ratio\"] = t(osc.frequency)\n            else:\n                args[\"freq\"] = t(osc.frequency)\n            # TODO: we xignore intensity of amp mod sens, just on/off\n            args.update({\"mod_source\": lfo_osc, \"amp\": \"%s,0,0,1,0,%s\" % (t(osc.op_amp), t(self.amp_lfo_amp * (osc.ampmodsens > 0)))})\n\n            # We are _NOT_ updating operators with pitch bp, per dan tuesday 7/5 morning (but not monday 7/4 morning)\n            #args.update({\"bp1\": pitchbp})\n\n            amy.send(**args)\n\n        # Set up the LFO x\n        #print(\"osc %d amp lfo wave %d freq %f amp %f\" % (\n        #    lfo_osc, self.lfo_waveform, self.lfo_freq, 1)\n        amy.send(osc=lfo_osc, wave=self.lfo_waveform, freq=t(self.lfo_freq),\n                 amp=1, phase=0.25)\n\n        #print(\"not used: lfo delay %d \" % self.lfo_delay)\n\n        #ampbp = \"0,1,%d,%f\" % (last_release_time, last_release_value)\n        #print(\"osc 0 (main)  algo %d feedback %f pitchenv %s ampenv %s\" % (\n        #    self.algo, self.feedback, pitchbp, ampbp))\n        amy.send(osc=main_osc, wave=amy.ALGO, algorithm=self.algo, feedback=t(self.feedback),\n                 algo_source=\",\".join(str(o) for o in range(op0_osc, op0_osc + 6)),\n                 #bp0=ampbp,\n                 #bp1=pitchbp,\n                 #freq=\"0,1,0,0,1,1\",\n                 bp0=pitchbp,\n                 # bp1 is now ununsed.\n                 amp=\"1,0,1,0,0,0\",  # Turn off EG0 for amp\n                 freq=\"0,1,0,1,0,%s\" % t(self.pitch_lfo_amp),  # Turn on EG0 and LFO for freq\n                 mod_source=lfo_osc)\n\ndef dx7level_to_linear(dx7level):\n    \"\"\"Map the dx7 0..99 levels to linear amplitude.\"\"\"\n    return 2 ** ((dx7level - 99) / 8)\n\ndef linear_to_dx7level(linear):\n    \"\"\"Map a linear amplitude to the dx7 0..99 scale.\"\"\"\n    return np.log2(np.maximum(dx7level_to_linear(0), linear)) * 8 + 99\n    \ndef pitchval_to_ratio(pitchval):\n    \"\"\"Map 0..99 DX7 pitch vals (e.g. from pitch_env) into f0 ratios.\"\"\"\n    # Pitch map 0..99 actually becomes -128..127 via a symmetric map with 50->0, linear from 15 to 85, then \n    # quadratic in the remainder.\n    pitchsign = -1 + 2*(pitchval >= 50)\n    semipitchval = np.abs(pitchval - 50).astype(float)\n    # Above (50 + 36), Quadratic to reach 127 at level 99.\n    semipitchval += (semipitchval > 36) * (((semipitchval - 34)**2) * 93/225 - semipitchval + 34)\n    # DX7 manual states pitchmod range is +/- 4 octaves, so 32 steps/oct sounds right.\n    return 2 ** ((pitchsign * semipitchval) / 32)\n\ndef ratio_to_pitchval(ratio):\n    semipitchval = 32 * np.log2(ratio)\n    pitchsign = -1 + 2*(semipitchval >= 0)\n    semipitchval = np.abs(semipitchval)\n    # Vectorized conditional treatment of outside -36 to 36.\n    semipitchval += (semipitchval > 36) * (34 + np.sqrt(np.abs(semipitchval - 34) * (225/93)) - semipitchval)\n    return 50 + pitchsign * semipitchval\n\ndef calc_loglin_eg_breakpoints(rates, levels, dx7_attacks=True, \n                               rate_double_interval=6, rate_scale=0.5, rate_offset=0.5):\n    \"\"\"Convert the DX7 rates/levels into (time, target) pairs (for amy)\"\"\"\n    if dx7_attacks:\n        level_to_lin_fn = dx7level_to_linear\n    else:\n        level_to_lin_fn = pitchval_to_ratio\n    # This is the part we precompute in fm.py to get breakpoints to send to amy.\n    current_level = levels[-1]\n    # EG at time 0 has final value from release.\n    breakpoints = [(0, level_to_lin_fn(current_level))]\n\n    MIN_LEVEL = 34\n    ATTACK_RANGE = 75\n\n    def level_to_attack_time(level, t_const):\n        \"\"\"Return the time at which a paradigmatic DX7 attack envelope will reach a level (0..99 range)\"\"\"\n        # Return the t0 that solves level = MIN_LEVEL + ATTACK_RANGE * (1 - exp(-t0 / t_const))\n        return -t_const * np.log((MIN_LEVEL + ATTACK_RANGE - np.maximum(MIN_LEVEL, level))/ATTACK_RANGE)\n\n    for segment, (rate, target_level) in enumerate(zip(rates, levels)):\n        release_segment = (segment == len(rates)-1)\n        if dx7_attacks and target_level > current_level:   # Attack segment\n            # The attack envelopes L(t) appear to be ~ 34 + 75 * (1 - exp(t / t_const)), starting from L = 34\n            # i.e. they are rising exponentials (as in analog ADSR, but here in the log(amp) domain) \n            # with an asymptote at 109 (i.e., 10 higher than the highest possible amp).\n            # The time constant depends on the R (rate) parameter, and is well fit by:\n            t_const = 0.008 * (2 ** ((65 - rate)/6))\n            # Total time for this segment is t1 - t0 where t0 and t1 solve\n            # effective_start = 34 + 75 * (1 - np.exp(-t0 / t_const)) = 109 - 75 exp(-t0 / t_c)\n            # target_level = 34 + 75 * (1 - np.exp(-t1 / t_const)) = 109 - 75 exp(-t1 / t_c)\n            # so t1 - t0 = -t_c * [log((34 + 75 - target_level)/75) - log((34 + 75 - effective_start)/75)]\n            effective_start_level = np.maximum(current_level, MIN_LEVEL)\n            t0 = level_to_attack_time(effective_start_level, t_const)\n            segment_duration = level_to_attack_time(target_level, t_const) - t0\n            #print(\"eff_st=\", effective_start_level, \"t_c=\", t_const, \"t0=\", t0, \"dur=\", segment_duration)\n            # Now amy's task will be to recover t0 and t_const from (time, target) pairs\n        else:\n            # Decay segment, or TRUE_EXPONENTIAL attack segment.\n            direction = 1 if target_level > current_level else -1\n            # \"A falling segment takes 3.5 mins\"\n            # so delta = 99 in 210 seconds -> level_change_per_sec =  0.5\n            # I think just offset everything by 0.5, avoids div0.          \n            level_change_per_sec = direction*(rate_offset + rate_scale * (2 ** (rate / rate_double_interval)))\n            level_difference = target_level - current_level\n            # Hack to cover for sustain = 0, release = 0 release segments which look like they should be zero long\n            if release_segment and level_difference == 0:\n                level_difference = direction * 60  # e.g. from a decayed level of 80 to zero.\n                #print(\"** Goosing release amp\")\n            segment_duration = level_difference / level_change_per_sec\n            #print(\"lcps=\", level_change_per_sec, \"dur=\", segment_duration)\n        breakpoints.append((segment_duration, level_to_lin_fn(target_level)))\n        current_level = target_level\n    return breakpoints\n\ndef eg_to_bp(egrate, eglevel, calc_eg_args={}):\n    breakpoints = calc_loglin_eg_breakpoints(egrate, eglevel, **calc_eg_args)\n    rates = []\n    times = []\n    for time, level in breakpoints:\n        times.append(int(1000 * time))\n        rates.append(level)\n    return rates, times\n\ndef eg_to_bp_pitch(egrate, eglevel):\n    # Additional args to make breakpoint calculation to the right thing for pitch.\n    calc_pitch_eg_args = {'dx7_attacks': False, 'rate_double_interval': 20, 'rate_scale': 11, 'rate_offset': -6}\n    return eg_to_bp(egrate, eglevel, calc_pitch_eg_args)\n    \ndef coarse_fine_fixed_hz(coarse, fine, detune=7):\n    coarse = coarse & 3\n    return 10 ** (coarse + (fine + ((detune - 7) / 8)) / 100 )\n    \ndef coarse_fine_ratio(coarse, fine, detune=7):\n    coarse = coarse & 31\n    if(coarse == 0):\n        coarse = 0.5\n    return coarse * (1 + (fine + ((detune - 7) / 8)) / 100)\n\ndef lfo_speed_to_hz(byte):\n    # Measured values from TX802, linear fit by eye\n    if byte == 0:\n        return 0.064\n    if byte <= 64:\n        return byte / 6.0\n    if byte <= 85:\n        return byte - 64.0 * 5.0/6.0\n    # Byte > 85\n    return 31.67 + (byte - 85.0) * 1.33\n\ndef lfo_wave(byte):\n    if byte > 5:\n        return None\n    return [\n        amy.TRIANGLE, amy.SAW_DOWN, amy.SAW_UP, \n        amy.PULSE, amy.SINE, amy.NOISE\n    ][byte]\n\n\n# Play a numpy array on an Apple Silicon mac without having to use an external library\n# (sounddevice is currently broken on AS macs)\ndef play_np_array(np_array, samplerate=amy.AMY_SAMPLE_RATE):\n    import wave, tempfile , os, struct\n    tf = tempfile.NamedTemporaryFile()\n    obj = wave.open(tf,'wb')\n    obj.setnchannels(1) # mono\n    obj.setsampwidth(2)\n    obj.setframerate(samplerate)\n    for i in range(np_array.shape[0]):\n        value = int(np_array[i] * 32767.0)\n        data = struct.pack('<h', value)\n        obj.writeframesraw( data )\n    obj.close()\n    os.system(\"afplay \" + tf.name)\n    tf.close()\n\n\n\n"
  },
  {
    "path": "amy/headers.py",
    "content": "# headers.py\n# Generate headers for AMY\nimport sys\nimport glob\nimport numpy as np\nimport amy\n\nfrom . import constants\n\ndef _read_wavetables(wavetable_files):\n    tables = []\n    wavetable_len = None\n    for wavfile in wavetable_files:\n        with open(wavfile, 'rb') as f:\n            samplerate, wav_data = wav.read(f)\n        if getattr(wav_data, \"ndim\", 1) != 1:\n            raise ValueError(f\"{wavfile} is not mono\")\n        wav_data = wav_data.astype(np.int16)\n        if wavetable_len is None:\n            wavetable_len = len(wav_data)\n        elif len(wav_data) != wavetable_len:\n            raise ValueError(f\"{wavfile} length {len(wav_data)} != {wavetable_len}\")\n        tables.append((wavfile, wav_data))\n    return tables, wavetable_len\n\n\ndef generate_amy_pcm_header(sample_set, name, pcm_AMY_SAMPLE_RATE=22050, wavetable_files=None):\n    from sf2utils.sf2parse import Sf2File\n    import resampy\n    import struct\n    # Download the sf2 file here\n    # https://github.com/vigliensoni/soundfonts/blob/master/hs_tr808/HS-TR-808-Drums.sf2\n    fn = \"sounds/HS-TR-808-Drums.sf2\"\n    offsets = []\n    offset = 0\n    int16s = []\n    samples = []\n    sample_counter = 0\n    my_sample_counter = 0\n    orig_map = {}\n    try:\n        sf2 = Sf2File(open(fn, 'rb'))\n    except Exception as e:\n        print(\"For PCM presets, download the sf2 files first. See comment in amy.headers.generate_amy_pcm_header()\")\n        return\n    for sample in sf2.samples[:-1]:\n        if(sample_counter in sample_set):\n            samples.append(sample)\n            orig_map[my_sample_counter] = sample_counter\n            my_sample_counter += 1\n        sample_counter += 1\n \n    for sample in samples:\n        try:\n            s = {}\n            s[\"name\"] = sample.name\n            floaty =(np.frombuffer(bytes(sample.raw_sample_data),dtype='int16'))/32768.0\n            resampled = resampy.resample(floaty, sample.sample_rate, pcm_AMY_SAMPLE_RATE)\n            # Make sure the float value doesn't cause overflow in int.  resampling can cause overshoot.\n            samples_int16 = np.int16(np.minimum(32767.0, np.maximum(-32768.0, resampled*32768.0)))\n            #floats.append(resampled)\n            int16s.append(samples_int16)\n            s[\"offset\"] = offset \n            s[\"length\"] = resampled.shape[0]\n            s[\"loopstart\"] = int(float(sample.start_loop) / float(sample.sample_rate / pcm_AMY_SAMPLE_RATE))\n            s[\"loopend\"] = int(float(sample.end_loop) / float(sample.sample_rate / pcm_AMY_SAMPLE_RATE))\n            s[\"midinote\"] = sample.original_pitch\n            offset = offset + resampled.shape[0]\n            offsets.append(s)\n        except AttributeError:\n            print(\"skipping %s\" % (sample.name))\n    \n    all_samples = np.hstack(int16s)\n    wavetable_tables = []\n    wavetable_len = 0\n    if wavetable_files is not None and len(wavetable_files) > 0:\n        wavetable_tables, wavetable_len = _read_wavetables(wavetable_files)\n    wavetable_count = len(wavetable_tables)\n    base_samples = len(offsets)\n    base_length = all_samples.shape[0]\n\n    p = open(\"src/pcm_%s.h\" % (name), \"w\")\n    p.write(\"// Automatically generated by amy.headers.generate_pcm_header()\\n\")\n    p.write(\"#ifndef __PCM_H\\n#define __PCM_H\\n\")\n    p.write(\"#define PCM_AMY_SAMPLE_RATE %d\\n\" % (pcm_AMY_SAMPLE_RATE))\n    p.write(\"#define PCM_BASE_SAMPLES %d\\n\" % (base_samples))\n    p.write(\"#define PCM_BASE_LENGTH %d\\n\" % (base_length))\n    if wavetable_count > 0:\n        p.write(\"#if defined(AMY_WAVETABLE)\\n\")\n        p.write(\"#define PCM_WAVETABLE_BASE PCM_BASE_SAMPLES\\n\")\n        p.write(\"#define PCM_WAVETABLE_SAMPLES %d\\n\" % (wavetable_count))\n        p.write(\"#define PCM_WAVETABLE_LEN %d\\n\" % (wavetable_len))\n        p.write(\"#define PCM_LENGTH (PCM_BASE_LENGTH + (PCM_WAVETABLE_SAMPLES * PCM_WAVETABLE_LEN))\\n\")\n        p.write(\"#define PCM_MAP_ENTRIES (PCM_BASE_SAMPLES + PCM_WAVETABLE_SAMPLES)\\n\")\n        p.write(\"#else\\n\")\n        p.write(\"#define PCM_WAVETABLE_BASE PCM_BASE_SAMPLES\\n\")\n        p.write(\"#define PCM_WAVETABLE_SAMPLES 0\\n\")\n        p.write(\"#define PCM_WAVETABLE_LEN 0\\n\")\n        p.write(\"#define PCM_LENGTH PCM_BASE_LENGTH\\n\")\n        p.write(\"#define PCM_MAP_ENTRIES PCM_BASE_SAMPLES\\n\")\n        p.write(\"#endif\\n\")\n    else:\n        p.write(\"#define PCM_WAVETABLE_BASE PCM_BASE_SAMPLES\\n\")\n        p.write(\"#define PCM_WAVETABLE_SAMPLES 0\\n\")\n        p.write(\"#define PCM_WAVETABLE_LEN 0\\n\")\n        p.write(\"#define PCM_LENGTH PCM_BASE_LENGTH\\n\")\n        p.write(\"#define PCM_MAP_ENTRIES PCM_BASE_SAMPLES\\n\")\n    p.write(\"#include \\\"pcm_samples_%s.h\\\"\\n\" % (name))\n    p.write(\"const uint16_t pcm_samples = PCM_MAP_ENTRIES;\\n\")\n    p.write(\"const uint16_t pcm_wavetable_base = PCM_WAVETABLE_BASE;\\n\")\n    p.write(\"const uint16_t pcm_wavetable_samples = PCM_WAVETABLE_SAMPLES;\\n\")\n    p.write(\"const uint32_t pcm_wavetable_len = PCM_WAVETABLE_LEN;\\n\")\n    p.write(\"const pcm_map_t pcm_map[PCM_MAP_ENTRIES] PROGMEM = {\\n\")\n    for i,o in enumerate(offsets):\n        p.write(\"    /* [%d] %d */ {%d, %d, %d, %d, %d}, /* %s */\\n\" %(i, orig_map[i], o[\"offset\"], o[\"length\"], o[\"loopstart\"], o[\"loopend\"], o[\"midinote\"], o[\"name\"]))\n    if wavetable_count > 0:\n        p.write(\"#if defined(AMY_WAVETABLE)\\n\")\n        for i, (wavfile, wav_data) in enumerate(wavetable_tables):\n            wav_index = base_samples + i\n            wav_offset = base_length + i * wavetable_len\n            wav_name = os.path.basename(wavfile)\n            p.write(\"    /* [%d] WT */ {%d, %d, %d, %d, %d}, /* %s */\\n\" % (\n                wav_index, wav_offset, wavetable_len, 0, wavetable_len, 69, wav_name))\n        p.write(\"#endif\\n\")\n    p.write(\"};\\n\")\n    p.write(\"\\n#endif  // __PCM_H\\n\")\n    p.close()\n\n    p = open(\"src/pcm_samples_%s.h\" % (name), 'w')\n    p.write(\"// Automatically generated by amy.headers.generate_pcm_header()\\n\")\n    p.write(\"#ifndef __PCM_SAMPLES_H\\n#define __PCM_SAMPLES_H\\n\")\n    p.write(\"const int16_t pcm[PCM_LENGTH] PROGMEM = {\\n\")\n\n    column = 15\n    count = 0\n    for i in range(int(all_samples.shape[0]/column)):\n        p.write(\"    %s,\\n\" % (\",\".join([(\"%d\" % (d)).ljust(8) for d in all_samples[i*column:(i+1)*column]])))\n        count = count + column\n    print(\"count %d all_samples.shape %d\" % (count, all_samples.shape[0]))\n    if(count != all_samples.shape[0]):\n        p.write(\"    %s\\n\" % (\",\".join([(\"%d\" % (d)).ljust(8) for d in all_samples[count:]])))\n    if wavetable_count > 0:\n        p.write(\"#if defined(AMY_WAVETABLE)\\n\")\n        for wavfile, wav_data in wavetable_tables:\n            p.write(\"    // %s\\n\" % (wavfile))\n            for i in range(int(len(wav_data)/column)):\n                p.write(\"    %s,\\n\" % (\",\".join([(\"%d\" % (d)).ljust(8) for d in wav_data[i*column:(i+1)*column]])))\n            rem = int(len(wav_data) % column)\n            if rem != 0:\n                p.write(\"    %s,\\n\" % (\",\".join([(\"%d\" % (d)).ljust(8) for d in wav_data[-rem:]])))\n        p.write(\"#endif\\n\")\n    p.write(\"};\\n\")\n    p.write(\"\\n#endif  // __PCM_SAMPLES_H\\n\")\n\n\ndef generate_pcm_headers():\n    tiny = [0, 3, 8, 11, 14, 16, 17, 18, 20, 23, 25]\n    wavetable_files = sorted(glob.glob('sounds/wavetables/*.WAV'))\n    generate_amy_pcm_header(tiny, \"tiny\", wavetable_files=wavetable_files)\n\ndef cos_lut(table_size, harmonics_weights, harmonics_phases=None):\n    if harmonics_phases is None:\n        harmonics_phases = np.zeros(len(harmonics_weights))\n    table = np.zeros(table_size)\n    phases = np.arange(table_size) * 2 * np.pi / table_size\n    for harmonic_number, harmonic_weight in enumerate(harmonics_weights):\n        table += harmonic_weight * np.cos(\n            phases * harmonic_number + harmonics_phases[harmonic_number])\n    return table\n\n\n# A LUTset is a list of LUTentries describing downsampled versions of the same\n# basic waveform, sorted with the longest (highest-bandwidth) first.\ndef create_lutset(LUTentry, harmonic_weights, harmonic_phases=None, \n                  length_factor=8, bandwidth_factor=None):\n    if bandwidth_factor is None:\n        bandwidth_factor = np.sqrt(0.5)\n    \"\"\"Create an ordered list of LUTs with decreasing harmonic content.\n\n    These can then be used in interp_from_lutset to make an adaptive-bandwidth\n    interpolation.\n\n    Args:\n        harmonic_weights: vector of amplitudes for cosine harmonic components.\n        harmonic_phases: initial phases for each harmonic, in radians. Zero \n            (default) indicates cosine phase.\n        length_factor: Each table's length is at least this factor times the order\n            of the highest harmonic it contains. Thus, this is a lower bound on the\n            number of samples per cycle for the highest harmonic. Higher factors make\n            the interpolation easier.\n        bandwidth_factor: Target ratio between the highest harmonics in successive\n            table entries. Default is sqrt(0.5), so after two tables, bandwidth is\n            reduced by 1/2 (and length with follow).\n\n    Returns:\n        A list of LUTentry objects, sorted in decreasing order of the highest \n        harmonic they contain. Each LUT's length is a power of 2, and as small as\n        possible while respecting the length_factor for the highest contained \n        harmonic.\n    \"\"\"\n    if harmonic_phases is None:\n        harmonic_phases = np.zeros(len(harmonic_weights))\n    # Calculate the length of the longest LUT we need. Must be a power of 2, \n    # must have at least length_factor * highest_harmonic samples.\n    # Harmonic 0 (dc) doesn't count.\n    float_num_harmonics = float(len(harmonic_weights))\n    lutsets = []\n    done = False\n    # harmonic 0 is DC; there's no point in generating that table.\n    while float_num_harmonics >= 2:\n        num_harmonics = int(round(float_num_harmonics))\n        highest_harmonic = num_harmonics - 1    # because zero doesn't count.\n        lut_size = int(2 ** np.ceil(np.log(length_factor * highest_harmonic) / np.log(2)))\n        lutsets.append(LUTentry(\n                table=cos_lut(lut_size, harmonic_weights[:num_harmonics], \n                                harmonic_phases[:num_harmonics]),    # / lut_size,\n                highest_harmonic=highest_harmonic))\n        float_num_harmonics = bandwidth_factor * float_num_harmonics\n    return lutsets\n\n\ndef make_table(min_val, max_val, fn, table_size=257, dtype=np.int16):\n    # The table includes the final value, so the actual number of steps is table_size - 1.\n    steps = table_size - 1\n    stepsize = (max_val - min_val) / steps\n    return fn(np.arange(min_val, max_val + stepsize, stepsize)).astype(dtype)\n\n\ndef create_exp2_lut(npts):\n    exp2_int16_fn = lambda x: np.round(-32768.0 * (np.exp2(x) - 1.0))\n    return make_table(0, 1, exp2_int16_fn, table_size=npts, dtype=np.int16)\n\n\ndef create_log2_lut(npts):\n    log2_int16_fn = lambda x: np.round(-32768.0 * (np.log2(x + 1.0)))\n    return make_table(0, 1, log2_int16_fn, table_size=npts, dtype=np.int16)\n\n\ndef write_lutset_to_h(filename, variable_base, lutset):\n    \"\"\"Savi out a lutset as a C-compatible header file.\"\"\"\n    num_luts = len(lutset)\n    with open(filename, \"w\") as f:\n        f.write(\"// Automatically-generated LUTset\\n\")\n        f.write(\"#ifndef LUTSET_{:s}_DEFINED\\n\".format(variable_base.upper()))\n        f.write(\"#define LUTSET_{:s}_DEFINED\\n\".format(variable_base.upper()))\n        f.write(\"\\n\")\n        # Define the structure.\n        f.write(\"#ifndef LUTENTRY_DEFINED\\n\")\n        f.write(\"#define LUTENTRY_DEFINED\\n\")\n        f.write(\"typedef struct {\\n\")\n        f.write(\"    const float *table;\\n\")\n        f.write(\"    int table_size;\\n\")\n        f.write(\"    int highest_harmonic;\\n\")\n        f.write(\"} lut_entry;\\n\")\n        f.write(\"#endif // LUTENTRY_DEFINED\\n\")\n        f.write(\"\\n\")\n        # Define the content of the individual tables.\n        samples_per_row = 8\n        for i in range(num_luts):\n            table_size = len(lutset[i].table)\n            f.write(\"const float {:s}_lutable_{:d}[{:d}] PROGMEM = {{\\n\".format(\n                variable_base, i, table_size))\n            for row_start in range(0, table_size, samples_per_row):\n                for sample_index in range(row_start,\n                        min(row_start + samples_per_row, table_size)):\n                    f.write(\"{:f},\".format(lutset[i].table[sample_index]))\n                f.write(\"\\n\")\n            f.write(\"};\\n\")\n            f.write(\"\\n\")\n        # Define the table of LUTs.\n        f.write(\"lut_entry {:s}_lutset[{:d}] = {{\\n\".format(\n            variable_base, num_luts + 1))\n        for i in range(num_luts):\n            f.write(\"    {{{:s}_lutable_{:d}, {:d}, {:d}}},\\n\".format(\n                variable_base, i, len(lutset[i].table), \n                lutset[i].highest_harmonic))\n        # Final entry is null to indicate end of table.\n        f.write(\"    {NULL, 0, 0},\\n\")\n        f.write(\"};\\n\")\n        f.write(\"\\n\")\n        f.write(\"#endif // LUTSET_x_DEFINED\\n\")\n    print(\"wrote\", filename)\n\n\ndef write_fxpt_lutable(f, lutable, name, samples_per_row=8):\n    \"\"\"Write a single lutable to an open file.\"\"\"\n    table_size = len(lutable)\n    scale_factor = np.max(np.abs(lutable.astype(float)))\n    f.write(\"const int16_t {:s}[{:d}] PROGMEM = {{\\n\".format(\n        name, table_size))\n    for row_start in range(0, table_size, samples_per_row):\n        for sample_index in range(row_start,\n                                  min(row_start + samples_per_row, table_size)):\n            f.write(\"{:d},\".format(\n                min(32767,\n                    max(-32768,\n                        int(round(32768 / scale_factor * lutable[sample_index]))))))\n        f.write(\"\\n\")\n    f.write(\"};\\n\")\n    f.write(\"\\n\")\n    return scale_factor\n\n\ndef write_lutset_to_h_as_fxpt(filename, variable_base, lutset):\n    \"\"\"Save out a lutset as a C-compatible header file using ints.\"\"\"\n    import math\n    num_luts = len(lutset)\n    with open(filename, \"w\") as f:\n        f.write(\"// Automatically-generated LUTset\\n\")\n        f.write(\"#ifndef LUTSET_{:s}_FXPT_DEFINED\\n\".format(variable_base.upper()))\n        f.write(\"#define LUTSET_{:s}_FXPT_DEFINED\\n\".format(variable_base.upper()))\n        f.write(\"\\n\")\n        # Define the structure.\n        f.write(\"#ifndef LUTENTRY_FXPT_DEFINED\\n\")\n        f.write(\"#define LUTENTRY_FXPT_DEFINED\\n\")\n        f.write(\"typedef struct {\\n\")\n        f.write(\"    const int16_t *table;\\n\")\n        f.write(\"    int table_size;\\n\")\n        f.write(\"    int log_2_table_size;\\n\")\n        f.write(\"    int highest_harmonic;\\n\")\n        f.write(\"    float scale_factor;\\n\")\n        f.write(\"} lut_entry_fxpt;\\n\")\n        f.write(\"#endif // LUTENTRY_FXPT_DEFINED\\n\")\n        f.write(\"\\n\")\n        # Define the content of the individual tables.\n        scale_factors = []\n        for i in range(num_luts):\n            scale_factor = write_fxpt_lutable(\n                f, lutset[i].table,\n                '{:s}_fxpt_lutable_{:d}'.format(variable_base, i)\n            )\n            scale_factors.append(scale_factor)\n        # Define the table of LUTs.\n        f.write(\"lut_entry_fxpt {:s}_fxpt_lutset[{:d}] = {{\\n\".format(\n            variable_base, num_luts + 1))\n        for i in range(num_luts):\n            table_size = len(lutset[i].table)\n            # Provide the shift size corresponding to the lutset.\n            log_2_table_size = int(round(math.log(table_size) / math.log(2.0)))\n            f.write(\"    {{{:s}_fxpt_lutable_{:d}, {:d}, {:d}, {:d}, {:f}}},\\n\".format(\n                variable_base, i, table_size, log_2_table_size,\n                lutset[i].highest_harmonic, scale_factors[i]))\n        # Final entry is null to indicate end of table.\n        f.write(\"    {NULL, 0, 0, 0, 0.0},\\n\")\n        f.write(\"};\\n\")\n        f.write(\"\\n\")\n        f.write(\"#endif // LUTSET_x_DEFINED\\n\")\n    print(\"wrote\", filename)\n\n\ndef make_log2_exp2_luts(filename):\n    \"\"\"Write the fixed-point exp2 and log2 lookup tables.\"\"\"\n    variable_base = 'exp_lut'\n    with open(filename, \"w\") as f:\n        f.write(\"// Automatically-generated LUTset\\n\")\n        f.write(\"#ifndef LUTSET_{:s}_FXPT_DEFINED\\n\".format(variable_base.upper()))\n        f.write(\"#define LUTSET_{:s}_FXPT_DEFINED\\n\".format(variable_base.upper()))\n        f.write(\"\\n\")\n        # Define the content of the individual tables.\n        write_fxpt_lutable(f, create_log2_lut(257), 'log2_fxpt_lutable')\n        write_fxpt_lutable(f, create_exp2_lut(257), 'exp2_fxpt_lutable')\n        f.write(\"\\n\")\n        f.write(\"#endif // LUTSET_x_DEFINED\\n\")\n    print(\"wrote\", filename)\n\n\ndef make_clipping_lut(filename):\n    # Soft clipping lookup table scratchpad.\n    SAMPLE_MAX = 32767\n    linear_proportion = 0.9  # I tried 0.6 and you could hear the difference but not enough to matter.\n    LIN_MAX = int(round(linear_proportion * 32768))  # 29491\n    NONLIN_RANGE = round(1.5 * (32767 - LIN_MAX))  # size of nonlinearity lookup table = 4915\n\n    clipping_lookup_table = np.arange(LIN_MAX + NONLIN_RANGE)\n\n    for x in range(NONLIN_RANGE):\n        x_dash = float(x) / NONLIN_RANGE\n        clipping_lookup_table[x + LIN_MAX] = LIN_MAX + int(np.floor(NONLIN_RANGE * (x_dash - x_dash * x_dash * x_dash / 3.0)))\n\n    with open(filename, \"w\") as f:\n        f.write(\"// Automatically generated.\\n// Clipping lookup table\\n\")\n        f.write(\"#ifndef __CLIPPING_TABLE\\n#define __CLIPPING_TABLE\\n\")\n        f.write(\"#define FIRST_NONLIN %d\\n\" % LIN_MAX)\n        f.write(\"#define NONLIN_RANGE %d\\n\" % NONLIN_RANGE)\n        f.write(\"// First sample value beyond end of table (just clip to max).\\n\")\n        f.write(\"#define FIRST_HARDCLIP (FIRST_NONLIN + NONLIN_RANGE)\\n\")\n        f.write(\"const uint16_t clipping_lookup_table[NONLIN_RANGE] PROGMEM = {\\n\")\n        samples_per_row = 8\n        for row_start in range(0, NONLIN_RANGE, samples_per_row):\n            for sample in range(row_start, min(NONLIN_RANGE, row_start + samples_per_row)):\n                f.write(\"%d,\" % clipping_lookup_table[LIN_MAX + sample])\n            f.write(\"\\n\")\n        f.write(\"};\\n\")\n        f.write(\"#endif\\n\")\n    print(\"wrote\", filename)\n\n\ndef make_piano_patch():\n    import amy\n    # This just allocates the 20 oscs needed for a INTERP_PARTIALS patch\n    # dpwe wants to add a `num_suboscs` field to fix this behavior soon\n    amy.send(chorus=0) # Piano sounds weird with chorus on\n    amy.send(osc=0, wave=amy.INTERP_PARTIALS, preset=0, amp='1,0,0,0')  # Parent osc amp applies, disconnect vel and eg0.\n    #amy.send(osc=20, wave=amy.PARTIAL)  # it's not 20, but it doesn't matter, voice is reallocated by interp_partials.c\n    return 25  # We now use up to 24 partials per voice + 1 control osc.\n\ndef make_amyboard_patch():\n    import amy\n    # Modified for \"silent control osc\"\n    ctl_osc = 0\n    lfo_osc = 1\n    osc_a = 2\n    osc_b = 3\n    message = amy.message(osc=ctl_osc, wave=amy.SILENT, mod_source=lfo_osc, chained_osc=osc_a,\n                          filter_type=amy.FILTER_LPF24, filter_freq={'const': 200.0, 'note': 1.0, 'eg1': 5.0},\n                          resonance=0.7, bp0='0,1,1000,0.2,100,0', bp1='0,1,1000,0.2,1000,0')\n    message += amy.message(osc=osc_a, wave=amy.PULSE, amp={'vel': 0, 'eg0': 0}, mod_source=lfo_osc, chained_osc=osc_b)\n    message += amy.message(osc=osc_b, wave=amy.SAW_DOWN, amp={'vel': 0, 'eg0': 0}, mod_source=lfo_osc, freq={'const': constants.ZERO_LOGFREQ_IN_HZ / 2})\n    message += amy.message(osc=lfo_osc, wave=amy.TRIANGLE, amp={'vel': 0}, freq={'const': 4.0, 'note': 0, 'bend': 0}, bp0='0,1.0,10000,0')\n    message += amy.message(eq=[0, 0, 0], chorus='0,,0.5,0.5')\n    return 4, message # 4 oscs\n\ndef make_patches(filename):\n    def nothing(message):\n        return\n    from . import juno, fm\n    num_oscs =[]\n    # Don't make any noise\n    amy.override_send = nothing\n\n    with open(filename, \"w\") as f:\n        f.write(\"// Automatically generated.\\n// DX7 and juno 106 and custom patch table\\n\")\n        f.write(\"#ifndef __PATCHESH\\n#define __PATCHESH\\n\")\n        f.write(\"static const char * const patch_commands[258] PROGMEM = {\\n\")\n        # Do juno\n        for i in range(128):\n            amy.log_patch()\n            j = juno.JunoPatch()\n            j.set_patch(i)\n            f.write(\"\\t/* %d: Juno %s */ \\\"%s\\\",\\n\" % (i, j.name, amy.retrieve_patch()))  \n            num_oscs.append(6)\n        # Do dx7\n        for i in range(128):\n            amy.log_patch()\n            p = fm.AMYPatch.from_dx7(fm.DX7Patch.from_patch_number(i))\n            p.send_to_AMY(reset=False)\n            f.write(\"\\t/* %d: DX7 %s */ \\\"%s\\\",\\n\" % (i+128, p.name, amy.retrieve_patch()))  \n            num_oscs.append(8)\n\n        # do piano\n        amy.log_patch()\n        num_osc_piano = make_piano_patch()\n        f.write(\"\\t/* 256: dpwe piano */ \\\"%s\\\",\\n\" % (amy.retrieve_patch()))  \n        num_oscs.append(num_osc_piano)\n\n        # do amyboard patch\n        num_osc_amyboard, patch_string  = make_amyboard_patch()\n        f.write(\"\\t/* 257: amyboard default */ \\\"%s\\\",\\n\" % (patch_string))\n        num_oscs.append(num_osc_amyboard)\n\n        f.write(\"};\\n\")\n        f.write(\"const uint16_t patch_oscs[258] PROGMEM = {\\n\")\n        for i in num_oscs:\n            f.write(\"%d,\" % (i))\n        f.write(\"\\n};\\n#endif\\n\")\n    amy.override_send = None\n    print(\"wrote\", filename)\n\n\ndef write_vector_as_c(f, data, name, dtype='uint8_t', items_per_row=20):\n    num_name = \"NUM_%s\" % name.upper()\n    f.write(\"#define %s %d\\n\" % (num_name, len(data)))\n    f.write(\"const %s %s[%s] PROGMEM = {\\n\" % (dtype, name, num_name))\n    for start in range(0, len(data), items_per_row):\n        data_row = data[start : start + items_per_row]\n        f.write(\"    \" + \", \".join(\"%d\" % d for d in data_row) + \",\\n\")\n    f.write(\"};\\n\\n\")\n\n\ndef make_interp_partials(filename, data_dict):\n    \"\"\"Write the json data from experiments/piano_heterodyne.ipynb into a C header.\"\"\"\n    import itertools\n    # data_dict is {instrument_tag: {'sample_times_ms': [], 'notes': [], 'velocities': [], 'num_harmonics': xx, 'harmonics_freq': [], 'harmonics_mags': []}, ...}\n    with open(filename, \"w\") as f:\n        f.write(\"// Automatically generated.\\n// Piano interpolated partials data table\\n\")\n        f.write(\"#ifndef __INTERP_PARTIALS_H\\n#define __INTERP_PARTIALS_H\\n\\n\")\n        f.write(\"#define NUM_INTERP_PARTIALS_PRESETS %d\\n\\n\" % len(data_dict))\n        map_contents = \"\"\n        for tag, data in data_dict.items():\n            for varname, dtype in [('sample_times_ms', 'uint16_t'),\n                                   ('velocities', 'uint8_t'),\n                                   ('notes', 'uint8_t'),\n                                   ('num_harmonics', 'uint8_t'),\n                                   ('harmonics_freq', 'uint16_t')]:\n                write_vector_as_c(f, data[varname], tag + \"_\" + varname, dtype=dtype)\n            harmonics_mags = list(itertools.chain(*data['harmonics_mags']))\n            write_vector_as_c(f, harmonics_mags, tag + \"_harmonics_mags\")\n            TAG = tag.upper()\n            map_contents += \"\"\"    {\n        NUM_%s_SAMPLE_TIMES_MS,\n        %s_sample_times_ms,\n        NUM_%s_VELOCITIES,\n        %s_velocities,\n        NUM_%s_NOTES,\n        %s_notes,\n        %s_num_harmonics,\n        %s_harmonics_freq,\n        %s_harmonics_mags,\n    },\n\"\"\" % (TAG, tag, TAG, tag, TAG, tag, tag, tag, tag)\n\n        f.write(\"const interp_partials_voice_t interp_partials_map[NUM_INTERP_PARTIALS_PRESETS] PROGMEM = {\\n\")\n        f.write(map_contents)\n        f.write(\"};\\n\\n\")\n        f.write(\"#endif // ndef __INTERP_PARTIALS_H\\n\\n\")\n\n    print(\"wrote\", filename)\n\n\nimport scipy.io.wavfile as wav\nimport os\n\n\"\"\"\n    Generate all the headers except for the partials headers\n\"\"\"\ndef generate_all():\n    from . import fm\n    import collections\n    import json\n    # Implement the multiple lookup tables.\n    # A LUT is stored as an array of values (table) and the harmonic number of the\n    # highest harmonic they contain (i.e., the number of cycles it completes in the\n    # entire table, so must be <= len(table)/2.)\n    LUTentry = collections.namedtuple('LUTentry', ['table', 'highest_harmonic'])\n\n    # Impulses.\n    #impulse_lutset = create_lutset(LUTentry, np.ones(128))\n    ##write_lutset_to_h('src/impulse_lutset.h', 'impulse', impulse_lutset)\n    #write_lutset_to_h_as_fxpt('src/impulse_lutset_fxpt.h', 'impulse', impulse_lutset)\n\n    # Saw_up.\n    saw_lutset = create_lutset(LUTentry, [0] + list(-1 / np.arange(1, 256)), -np.pi/2 * np.ones(256))\n    #write_lutset_to_h('src/saw_lutset.h', 'saw', saw_lutset)\n    write_lutset_to_h_as_fxpt('src/saw_lutset_fxpt.h', 'saw', saw_lutset)\n\n    # Triangle wave lutset\n    n_harms = 64\n    coefs = (np.arange(n_harms) % 2) * (\n        np.maximum(1, np.arange(n_harms, dtype=float))**(-2))\n    triangle_lutset = create_lutset(LUTentry, coefs, np.arange(len(coefs)) * -np.pi / 2)\n    #write_lutset_to_h('src/triangle_lutset.h', 'triangle', triangle_lutset)\n    write_lutset_to_h_as_fxpt('src/triangle_lutset_fxpt.h', 'triangle', triangle_lutset)\n\n    # Sinusoid \"lutset\" (only one table)\n    sine_lutset = create_lutset(LUTentry, np.array([0, 1]),  harmonic_phases = -np.pi / 2 * np.ones(2), length_factor=256)\n    #write_lutset_to_h('src/sine_lutset.h', 'sine', sine_lutset)\n    write_lutset_to_h_as_fxpt('src/sine_lutset_fxpt.h', 'sine', sine_lutset)\n\n    # log2/exp2 LUTs\n    make_log2_exp2_luts('src/log2_exp2_fxpt_lutable.h')\n\n    # Clipping LUT\n    make_clipping_lut('src/clipping_lookup_table.h')\n\n    # PCM LUT\n    try:\n        generate_pcm_headers()\n    except ImportError:\n        print(\"If you want to regenerate the PCM headers (not required!) you need to `pip install resampy sf2utils`.\")\n\n    # Juno & FM patches\n    make_patches(\"src/patches.h\")\n\n    # interp_partials data table\n    make_interp_partials(\"src/interp_partials.h\",\n                         {'piano': json.load(open(\"experiments/piano-params.json\", \"r\"))})\n\n    # Wavetable samples are appended to tiny PCM headers in generate_pcm_headers().\n\n\ndef main():\n    print(\"Generating all headers needed for AMY...\")\n    generate_all()\n    print(\"Done.\")\n\nif __name__ == '__main__':\n    main()\n"
  },
  {
    "path": "amy/juno.py",
    "content": "# juno.py\n# Convert juno-106 sysex patches to Amy\n\n\nimport amy\nimport json\nimport math\nimport time\n\nfrom . import constants\n\ntry:\n  math.exp2(1)\n  def exp2(x):\n    return math.exp2(x)\nexcept AttributeError:\n  def exp2(x):\n    return math.pow(2.0, x)\n\n  # Range is from 10 ms to 12 sec i.e. 1200.\n  # (12 sec is allegedly the max decay time of the EG, see\n  # page 32 of Juno-106 owner's manual,\n  # https://cdn.roland.com/assets/media/pdf/JUNO-106_OM.pdf .)\n  # Return int value in ms\n  #time = 0.01 * np.exp(np.log(1e3) * midi / 127.0)\n  # midi 30 is ~ 200 ms, 50 is ~ 1 sec, so\n  #        D=30\n  #\n  # from demo at https://www.synthmania.com/Roland%20Juno-106/Audio/Juno-106%20Factory%20Preset%20Group%20A/14%20Flutes.mp3\n  # A11 Brass set        A=3  D=49  S=45 R=32 ->\n  # A14 Flute            A=23 D=81  S=0  R=18 -> A=200ms, R=200ms, D=0.22 to 0.11 in 0.830 s / 0.28 to 0.14 in 0.92     R = 0.2 to 0.1 in 0.046\n  # A16 Brass & Strings  A=44 D=66  S=53 R=44 -> A=355ms, R=\n  # A15 Moving Strings   A=13 D=87       R=35 -> A=100ms, R=600ms,\n  # A26 Celeste          A=0  D=44  S=0  R=81 -> A=2ms             D=0.48 to 0.24 in 0.340 s                           R = 0.9 to 0.5 in 0.1s; R clearly faster than D\n  # A27 Elect Piano      A=1  D=85  S=43 R=40 -> A=14ms,  R=300ms\n  # A28 Elect. Piano II  A=0  D=68  S=0  R=22 ->                   D=0.30 to 0.15 in 0.590 s  R same as D?\n  # A32 Steel Drums      A=0  D=26  S=0  R=37 ->                   D=0.54 to 0.27 in 0.073 s\n  # A34 Brass III        A=58 D=100 S=94 R=37 -> A=440ms, R=1000ms\n  # A35 Fanfare          A=72 D=104 S=75 R=49 -> A=600ms, R=1200ms\n  # A37 Pizzicato        A=0  D=11  S=0  R=12 -> A=6ms,   R=86ms   D=0.66 to 0.33 in 0.013 s\n  # A41 Bass Clarinet    A=11 D=75  S=0  R=25 -> A=92ms,  R=340ms, D=0.20 to 0.10 in 0.820 s /                            R = 0.9 to 0.45 in 0.070\n  # A42 English Horn     A=8  D=81  S=21 R=16 -> A=68ms,  R=240ms,\n  # A45 Koto             A=0  D=56  S=0  R=39 ->                   D=0.20 to 0.10 in 0.160 s\n  # A46 Dark Pluck       A=0  D=52  S=15 R=63 ->\n  # A48 Synth Bass I     A=0  D=34  S=0  R=36 ->                   D=0.60 to 0.30 in 0.096 s\n  # A56 Funky III        A=0  D=24  S=0  R=2                       D 1/2 in 0.206\n  # A61 Piano II         A=0  D=98  S=0  R=32                      D 1/2 in 1.200\n  # A  0   1   8   11   13   23   44  58\n  # ms 6   14  68  92   100  200  355 440\n  # D            11  24  26  34  44  56  68  75  81  98\n  # 1/2 time ms  13  206 73  96  340 160 590 830 920 1200\n  # R  12  16  18  25   35   37   40\n  # ms 86  240 200 340  600  1000 300\n\n# Notes from video https://www.youtube.com/watch?v=zWOs16ccB3M\n# A 0 -> 1ms  1.9 -> 30ms  3.1 -> 57ms  3.7 -> 68ms  5.4  -> 244 ms  6.0 -> 323ms  6.3 -> 462ms  6.5 -> 502ms\n# D 3.3 -> 750ms\n\n# Addendum: See online emulation\n# https://github.com/pendragon-andyh/junox\n# based on set of isolated samples\n# https://github.com/pendragon-andyh/Juno60\n\n\ndef to_attack_time(val):\n  \"\"\"Convert a midi value (0..127) to a time for ADSR.\"\"\"\n  # From regression of sound examples\n  return 6 + 8 * val * 127\n  # from Arturia video\n  #return 12 * exp2(0.066 * midi) - 12\n\n\ndef to_decay_time(val):\n  \"\"\"Convert a midi value (0..127) to a time for ADSR.\"\"\"\n  # time = 12 * np.exp(np.log(120) * midi/100)\n  # time is time to decay to 1/2; Amy envelope times are to decay to exp(-3) = 0.05\n  # return np.log(0.05) / np.log(0.5) * time\n  # from Arturia video\n  #return 80 * exp2(0.066 * val * 127) - 80\n  return 80 * exp2(0.085 * val * 127) - 80\n\n\ndef to_release_time(val):\n  \"\"\"Convert a midi value (0..127) to a time for ADSR.\"\"\"\n  #time = 100 * np.exp(np.log(16) * midi/100)\n  #return np.log(0.05) / np.log(0.5) * time\n  # from Arturia video\n  #return 70 * exp2(0.066 * val * 127) - 70\n  return 70 * exp2(0.066 * val * 127) - 70\n\n\ndef to_level(val):\n  # Map midi to 0..1, linearly.\n  return val\n\n\ndef level_to_amp(level):\n  # level is 0.0 to 1.0; amp is 0.001 to 1.0\n  if level == 0.0:\n    return 0.0\n  return float(\"%.3f\" % (0.001 * np.exp(level * np.log(1000.0))))\n\n\ndef to_lfo_freq(val):\n  # LFO frequency in Hz varies from 0.5 to 30\n  # from Arturia video\n  return float(\"%.3f\" % (0.6 * exp2(0.04 * val * 127) - 0.1))\n\n\ndef to_lfo_delay(val):\n  \"\"\"Convert a midi value (0..127) to a time for lfo_delay.\"\"\"\n  #time = 100 * np.exp(np.log(16) * midi/100)\n  #return float(\"%.3f\" % (np.log(0.05) / np.log(0.5) * time))\n  # from Arturia video\n  return float(\"%.3f\" % (18 * exp2(0.066 * val * 127) - 13))\n\n\ndef to_resonance(val):\n  # Q goes from 0.5 to 16 exponentially\n  return float(\"%.3f\" % (0.7 * exp2(4.0 * val)))\n\n\ndef to_filter_freq(val):\n  # filter_freq goes from ? 100 to 6400 Hz with 18 steps/octave\n  #return float(\"%.3f\" % (100 * np.exp2(midi / 20.0)))\n  # from Arturia video\n  #return float(\"%.3f\" % (6.5 * exp2(0.11 * val * 127)))\n  #return float(\"%.3f\" % (25 * exp2(0.055 * val * 127)))\n  #return float(\"%.3f\" % (25 * exp2(0.083 * val * 127)))\n  return float(\"%.3f\" % (13 * exp2(0.0938 * val * 127)))\n\n\ndef ffmt(val):\n  \"\"\"Format float values as max 3 dp, but less if possible.\"\"\"\n  return \"%.5g\" % float(\"%.3f\" % val)\n\n\n_PATCHES = [[\"A11 Brass Set 1\", [20, 49, 0, 102, 0, 35, 13, 58, 0, 86, 108, 3, 49, 45, 32, 0, 81, 17]], [\"A12 Brass Swell\", [6, 48, 0, 56, 0, 43, 17, 26, 0, 84, 75, 64, 118, 38, 37, 70, 82, 25]], [\"A13 Trumpet\", [52, 45, 8, 102, 0, 55, 34, 24, 1, 59, 127, 5, 66, 48, 16, 0, 50, 9]], [\"A14 Flutes\", [60, 43, 1, 0, 0, 55, 32, 10, 11, 41, 127, 23, 81, 0, 18, 0, 50, 1]], [\"A15 Moving Strings\", [63, 0, 0, 39, 0, 77, 20, 4, 0, 111, 34, 13, 87, 88, 35, 14, 26, 16]], [\"A16 Brass & Strings\", [35, 0, 0, 56, 0, 76, 17, 4, 0, 41, 78, 44, 66, 53, 44, 23, 73, 24]], [\"A17 Choir\", [59, 14, 13, 25, 0, 59, 94, 2, 0, 62, 127, 68, 11, 127, 48, 0, 74, 9]], [\"A18 Piano I\", [20, 49, 0, 80, 0, 65, 12, 10, 0, 27, 103, 0, 66, 0, 30, 86, 42, 17]], [\"A21 Organ I\", [54, 15, 0, 53, 0, 43, 76, 14, 1, 127, 100, 0, 10, 82, 0, 23, 41, 28]], [\"A22 Organ II\", [44, 15, 0, 53, 0, 53, 76, 14, 1, 85, 74, 0, 10, 82, 0, 58, 74, 28]], [\"A23 Combo Organ\", [75, 21, 9, 57, 0, 63, 70, 4, 0, 109, 96, 0, 48, 43, 46, 61, 44, 13]], [\"A24 Calliope\", [82, 40, 11, 0, 0, 87, 27, 17, 0, 56, 89, 7, 127, 127, 6, 48, 74, 11]], [\"A25 Donald Pluck\", [76, 21, 9, 57, 0, 73, 105, 15, 0, 78, 82, 2, 5, 43, 10, 127, 44, 7]], [\"A26 Celeste* (1 oct.up)\", [28, 0, 0, 0, 0, 33, 24, 54, 0, 38, 96, 0, 44, 0, 81, 15, 44, 25]], [\"A27 Elect. Piano I\", [59, 0, 0, 0, 0, 16, 31, 61, 6, 35, 127, 1, 85, 43, 40, 0, 41, 1]], [\"A28 Elect. Piano II\", [0, 0, 0, 71, 0, 50, 69, 7, 0, 80, 102, 0, 68, 0, 22, 0, 73, 17]], [\"A31 Clock Chimes* (1 oct. up)\", [59, 0, 0, 0, 22, 44, 127, 0, 0, 127, 104, 0, 48, 0, 51, 127, 68, 27]], [\"A32 Steel Drums\", [33, 53, 0, 32, 9, 71, 46, 26, 0, 127, 127, 0, 26, 0, 37, 33, 74, 27]], [\"A33 Xylophone\", [0, 0, 0, 0, 0, 29, 24, 54, 0, 51, 127, 0, 29, 29, 38, 15, 44, 25]], [\"A34 Brass III\", [52, 20, 0, 35, 0, 66, 24, 11, 0, 12, 127, 58, 100, 94, 37, 22, 82, 25]], [\"A35 Fanfare\", [47, 0, 0, 70, 0, 44, 0, 32, 0, 67, 33, 72, 104, 75, 49, 50, 89, 24]], [\"A36 String III\", [48, 27, 0, 102, 0, 71, 14, 0, 0, 84, 73, 63, 31, 127, 45, 0, 26, 16]], [\"A37 Pizzicato\", [60, 18, 0, 102, 0, 66, 2, 5, 0, 42, 127, 0, 11, 0, 12, 0, 90, 0]], [\"A38 High Strings\", [58, 14, 0, 102, 0, 84, 8, 2, 0, 71, 77, 18, 44, 127, 40, 0, 12, 8]], [\"A41 Bass clarinet\", [52, 45, 8, 0, 0, 48, 36, 25, 8, 58, 104, 11, 75, 0, 25, 0, 41, 17]], [\"A42 English Horn\", [47, 45, 9, 102, 0, 70, 48, 7, 0, 27, 127, 8, 81, 26, 16, 0, 42, 1]], [\"A43 Brass Ensemble\", [52, 45, 0, 102, 0, 46, 44, 29, 1, 59, 103, 16, 103, 97, 34, 31, 82, 17]], [\"A44 Guitar\", [86, 58, 0, 65, 0, 12, 15, 71, 0, 30, 96, 0, 52, 54, 31, 0, 57, 17]], [\"A45 Koto\", [90, 28, 0, 94, 0, 40, 58, 29, 0, 75, 127, 0, 56, 0, 39, 2, 74, 1]], [\"A46 Dark Pluck\", [31, 0, 0, 87, 0, 38, 61, 27, 0, 71, 90, 0, 52, 15, 63, 97, 10, 25]], [\"A47 Funky I\", [4, 0, 0, 73, 0, 31, 23, 51, 0, 41, 71, 0, 30, 36, 2, 64, 89, 29]], [\"A48 Synth Bass I (unison)\", [58, 16, 1, 57, 50, 32, 0, 66, 0, 35, 75, 0, 34, 0, 36, 102, 41, 25]], [\"A51 Lead I\", [72, 88, 18, 0, 0, 40, 97, 36, 0, 52, 99, 0, 45, 73, 0, 0, 42, 29]], [\"A52 Lead II\", [24, 88, 0, 53, 0, 45, 0, 43, 0, 52, 56, 1, 23, 91, 75, 79, 57, 20]], [\"A53 Lead III\", [86, 71, 21, 102, 0, 60, 31, 18, 1, 76, 127, 0, 66, 48, 11, 0, 50, 21]], [\"A54 Funky II\", [4, 0, 0, 48, 0, 5, 23, 81, 0, 41, 100, 0, 30, 39, 2, 57, 74, 21]], [\"A55 Synth Bass II\", [90, 21, 0, 0, 0, 43, 0, 47, 0, 0, 78, 0, 37, 9, 22, 45, 49, 28]], [\"A56 Funky III\", [4, 0, 0, 9, 101, 38, 54, 45, 0, 10, 79, 0, 24, 0, 2, 127, 57, 29]], [\"A57 Thud Wah\", [62, 0, 0, 102, 8, 78, 89, 34, 0, 0, 106, 0, 0, 102, 45, 32, 26, 26]], [\"A58 Going Up\", [0, 0, 0, 100, 28, 79, 127, 37, 0, 65, 75, 0, 108, 18, 127, 0, 34, 19]], [\"A61 Piano II\", [1, 0, 0, 72, 0, 47, 0, 39, 0, 5, 78, 0, 98, 0, 32, 115, 42, 16]], [\"A62 Clav\", [66, 15, 1, 102, 0, 7, 11, 86, 2, 0, 120, 0, 39, 48, 14, 0, 73, 21]], [\"A63 Frontier Organ\", [79, 15, 3, 85, 0, 69, 54, 0, 0, 52, 127, 0, 0, 127, 0, 29, 42, 28]], [\"A64 Snare Drum (unison)\", [52, 27, 0, 0, 91, 94, 11, 17, 0, 0, 101, 0, 25, 0, 30, 64, 34, 17]], [\"A65 Tom Toms (unison)\", [62, 16, 8, 0, 127, 53, 4, 40, 0, 21, 101, 0, 30, 15, 40, 58, 33, 24]], [\"A66 Timpani (unison)\", [0, 0, 0, 35, 127, 25, 0, 54, 0, 24, 127, 1, 56, 26, 71, 47, 33, 17]], [\"A67 Shaker\", [21, 71, 0, 58, 127, 89, 45, 1, 17, 80, 127, 10, 9, 0, 0, 0, 34, 1]], [\"A68 Synth Pad\", [56, 0, 5, 43, 0, 37, 0, 84, 0, 127, 51, 0, 85, 75, 62, 37, 10, 24]], [\"A71 Sweep I\", [78, 0, 0, 102, 28, 115, 40, 67, 0, 0, 97, 0, 63, 127, 82, 42, 12, 18]], [\"A72 Pluck Sweep\", [68, 48, 0, 68, 0, 60, 111, 9, 6, 98, 45, 0, 91, 0, 77, 125, 26, 8]], [\"A73 Repeater\", [77, 20, 9, 101, 0, 97, 30, 56, 0, 57, 87, 14, 0, 41, 0, 44, 74, 23]], [\"A74 Sweep II\", [88, 72, 15, 97, 0, 66, 102, 68, 0, 70, 101, 0, 89, 53, 78, 48, 74, 25]], [\"A75 Pluck Bell\", [51, 0, 5, 17, 0, 39, 0, 49, 0, 127, 49, 0, 85, 75, 53, 49, 12, 24]], [\"A76 Dark Synth Piano\", [127, 0, 0, 0, 0, 56, 86, 6, 0, 71, 79, 0, 47, 0, 50, 127, 26, 26]], [\"A77 Sustainer\", [71, 0, 5, 46, 0, 39, 0, 84, 0, 127, 57, 0, 85, 75, 70, 49, 42, 24]], [\"A78 Wah Release\", [89, 14, 1, 25, 0, 72, 88, 19, 0, 66, 104, 0, 84, 0, 29, 87, 10, 19]], [\"A81 Gong (play low chords)\", [127, 0, 0, 102, 56, 70, 107, 5, 0, 72, 91, 3, 48, 127, 98, 0, 73, 19]], [\"A82 Resonance Funk\", [59, 0, 0, 0, 0, 26, 127, 45, 0, 89, 127, 0, 19, 0, 22, 0, 33, 17]], [\"A83 Drum Booms* (1 oct. down)\", [0, 0, 0, 102, 127, 42, 0, 34, 0, 58, 127, 0, 36, 15, 49, 46, 33, 25]], [\"A84 Dust Storm\", [0, 0, 0, 0, 127, 52, 85, 0, 44, 94, 127, 88, 91, 28, 85, 0, 33, 17]], [\"A85 Rocket Men\", [8, 32, 0, 102, 97, 73, 114, 8, 0, 56, 127, 0, 89, 127, 104, 0, 36, 3]], [\"A86 Hand Claps\", [59, 0, 0, 0, 127, 17, 88, 54, 0, 55, 127, 1, 11, 0, 8, 0, 33, 5]], [\"A87 FX Sweep\", [127, 65, 116, 102, 127, 71, 44, 83, 0, 94, 127, 0, 94, 0, 112, 127, 41, 18]], [\"A88 Caverns\", [0, 0, 0, 102, 127, 68, 118, 0, 0, 69, 107, 0, 13, 38, 47, 0, 33, 8]], [\"B11 Strings\", [57, 45, 0, 55, 0, 85, 0, 0, 0, 108, 52, 59, 32, 86, 40, 0, 26, 24]], [\"B12 Violin\", [66, 45, 20, 0, 0, 77, 0, 0, 0, 120, 110, 43, 45, 57, 26, 0, 50, 24]], [\"B13 Chorus Vibes\", [72, 45, 0, 0, 0, 10, 0, 59, 0, 23, 88, 0, 89, 47, 74, 0, 74, 25]], [\"B14 Organ 1\", [45, 42, 0, 73, 0, 60, 72, 14, 0, 127, 58, 0, 0, 0, 0, 97, 10, 29]], [\"B15 Harpsichord 1\", [23, 0, 0, 54, 0, 127, 127, 90, 0, 86, 125, 0, 60, 0, 31, 35, 44, 0]], [\"B16 Recorder\", [78, 0, 0, 8, 0, 6, 0, 46, 0, 127, 127, 5, 21, 127, 30, 0, 42, 17]], [\"B17 Perc. Pluck\", [62, 38, 8, 0, 0, 0, 0, 90, 0, 73, 65, 0, 16, 78, 116, 0, 74, 25]], [\"B18 Noise Sweep\", [127, 0, 0, 0, 127, 2, 0, 77, 0, 104, 92, 14, 78, 108, 120, 0, 33, 24]], [\"B21 Space Chimes\", [99, 0, 0, 0, 0, 70, 127, 0, 0, 74, 85, 0, 25, 0, 60, 0, 76, 24]], [\"B22 Nylon Guitar\", [72, 45, 0, 29, 0, 57, 0, 26, 0, 25, 115, 0, 89, 0, 32, 0, 42, 1]], [\"B23 Orchestral Pad\", [22, 45, 0, 105, 0, 33, 0, 55, 0, 36, 0, 29, 88, 50, 52, 127, 26, 24]], [\"B24 Bright Pluck\", [0, 0, 0, 58, 0, 57, 0, 40, 0, 86, 104, 0, 25, 42, 44, 0, 42, 17]], [\"B25 Organ Bell\", [78, 0, 6, 68, 0, 61, 0, 0, 0, 127, 62, 0, 0, 127, 26, 85, 90, 25]], [\"B26 Accordion\", [0, 0, 0, 64, 0, 77, 0, 14, 0, 74, 66, 8, 11, 110, 9, 80, 90, 1]], [\"B27 FX Rise 1\", [116, 0, 0, 0, 0, 108, 127, 16, 127, 64, 0, 0, 0, 127, 84, 0, 68, 26]], [\"B28 FX Rise 2\", [108, 0, 0, 0, 0, 94, 127, 80, 23, 127, 0, 0, 127, 51, 71, 0, 2, 26]], [\"B31 Brass\", [51, 127, 0, 73, 0, 0, 0, 94, 0, 127, 72, 3, 44, 51, 11, 0, 82, 28]], [\"B32 Helicopter\", [106, 0, 0, 48, 0, 82, 5, 93, 127, 0, 72, 0, 0, 35, 76, 127, 10, 27]], [\"B33 Lute\", [52, 0, 2, 105, 0, 29, 0, 35, 0, 86, 127, 0, 48, 34, 87, 0, 42, 25]], [\"B34 Chorus Funk\", [77, 94, 0, 73, 0, 47, 34, 53, 0, 65, 42, 0, 11, 34, 0, 79, 90, 29]], [\"B35 Tomita\", [78, 0, 0, 105, 0, 49, 125, 15, 2, 127, 57, 0, 14, 79, 0, 0, 36, 31]], [\"B36 FX Sweep 1\", [127, 0, 0, 0, 0, 58, 127, 16, 76, 64, 0, 0, 0, 127, 85, 0, 68, 24]], [\"B37 Sharp Reed\", [21, 0, 0, 73, 0, 33, 0, 53, 0, 65, 55, 2, 18, 112, 0, 0, 60, 28]], [\"B38 Bass Pluck\", [0, 0, 0, 60, 0, 37, 29, 28, 0, 43, 92, 0, 42, 35, 0, 0, 57, 24]], [\"B41 Resonant Rise\", [52, 0, 15, 0, 0, 66, 107, 31, 0, 73, 62, 0, 52, 39, 0, 0, 17, 30]], [\"B42 Harpsichord 2\", [0, 0, 0, 105, 0, 127, 95, 0, 0, 127, 107, 0, 45, 0, 0, 35, 60, 17]], [\"B43 Dark Ensemble\", [0, 0, 0, 57, 0, 55, 0, 0, 0, 107, 67, 21, 0, 127, 35, 75, 90, 27]], [\"B44 Contact Wah\", [78, 0, 0, 81, 0, 61, 101, 46, 0, 127, 127, 0, 0, 0, 0, 0, 42, 23]], [\"B45 Noise Sweep 2\", [127, 0, 0, 0, 127, 127, 0, 83, 0, 104, 116, 127, 79, 26, 83, 0, 68, 26]], [\"B46 Glassy Wah\", [0, 94, 0, 28, 0, 24, 34, 61, 0, 65, 112, 6, 18, 50, 38, 0, 42, 25]], [\"B47 Phase Ensemble\", [11, 45, 5, 105, 0, 79, 0, 0, 0, 127, 99, 84, 45, 57, 49, 0, 10, 24]], [\"B48 Chorused Bell\", [0, 11, 0, 105, 0, 59, 127, 0, 0, 127, 62, 0, 62, 0, 57, 101, 76, 24]], [\"B51 Clav\", [50, 11, 0, 91, 0, 32, 0, 63, 0, 0, 108, 0, 43, 55, 0, 7, 41, 9]], [\"B52 Organ 2\", [81, 0, 0, 104, 0, 54, 106, 7, 0, 127, 79, 0, 0, 0, 0, 0, 81, 29]], [\"B53 Bassoon\", [84, 38, 9, 90, 0, 35, 0, 43, 9, 98, 127, 5, 127, 106, 2, 0, 41, 1]], [\"B54 Auto Release Noise Sweep\", [127, 0, 0, 0, 127, 127, 0, 127, 0, 104, 107, 0, 79, 57, 83, 0, 68, 26]], [\"B55 Brass Ensemble\", [25, 94, 0, 73, 0, 47, 34, 35, 0, 65, 39, 6, 68, 67, 38, 0, 90, 24]], [\"B56 Ethereal\", [69, 0, 0, 105, 0, 47, 120, 0, 0, 127, 60, 92, 50, 127, 55, 59, 26, 24]], [\"B57 Chorus Bell 2\", [72, 45, 0, 29, 0, 0, 102, 62, 0, 90, 30, 0, 117, 0, 120, 0, 90, 25]], [\"B58 Blizzard\", [1, 0, 0, 105, 127, 56, 89, 7, 38, 121, 127, 78, 98, 87, 78, 0, 36, 0]], [\"B61 E. Piano with Tremolo\", [44, 0, 0, 21, 0, 22, 0, 35, 7, 107, 103, 0, 65, 60, 98, 127, 44, 16]], [\"B62 Clarinet\", [69, 22, 9, 0, 0, 35, 0, 43, 7, 98, 104, 5, 127, 106, 7, 0, 42, 1]], [\"B63 Thunder\", [127, 0, 0, 0, 127, 2, 0, 77, 0, 104, 107, 0, 22, 108, 120, 0, 33, 24]], [\"B64 Reedy Organ\", [35, 18, 0, 73, 0, 33, 0, 53, 0, 65, 69, 3, 44, 109, 0, 0, 42, 28]], [\"B65 Flute / Horn\", [34, 0, 0, 59, 0, 25, 0, 42, 0, 65, 22, 21, 73, 71, 48, 0, 25, 24]], [\"B66 Toy Rhodes\", [30, 45, 127, 0, 0, 58, 127, 0, 0, 127, 107, 0, 89, 0, 39, 0, 36, 0]], [\"B67 Surf's Up\", [1, 0, 0, 105, 127, 84, 11, 0, 49, 54, 75, 33, 97, 127, 121, 0, 36, 10]], [\"B68 OW Bass\", [50, 0, 0, 50, 0, 63, 84, 65, 0, 127, 70, 127, 0, 107, 0, 47, 57, 31]], [\"B71 Piccolo\", [70, 28, 0, 14, 0, 4, 0, 63, 16, 98, 87, 16, 103, 106, 21, 0, 60, 9]], [\"B72 Melodic Taps\", [99, 0, 0, 0, 127, 72, 112, 0, 0, 127, 127, 0, 24, 0, 24, 0, 65, 0]], [\"B73 Meow Brass\", [51, 127, 0, 73, 0, 45, 100, 35, 0, 65, 84, 4, 90, 0, 27, 0, 50, 28]], [\"B74 Violin (high)\", [71, 45, 22, 0, 0, 89, 0, 0, 3, 120, 85, 43, 45, 57, 26, 0, 52, 24]], [\"B75 High Bells\", [30, 45, 127, 0, 0, 76, 127, 0, 0, 127, 111, 0, 22, 52, 59, 0, 36, 0]], [\"B76 Rolling Wah\", [36, 0, 0, 105, 0, 60, 9, 0, 127, 0, 77, 34, 55, 127, 105, 0, 42, 24]], [\"B77 Ping Bell\", [0, 11, 0, 104, 0, 76, 127, 0, 0, 127, 83, 0, 23, 23, 57, 0, 76, 24]], [\"B78 Brassy Organ\", [16, 0, 0, 68, 0, 8, 0, 87, 0, 52, 14, 0, 36, 109, 0, 56, 89, 24]], [\"B81 Low Dark Strings\", [21, 45, 5, 81, 0, 71, 0, 0, 0, 103, 40, 83, 23, 109, 42, 0, 25, 24]], [\"B82 Piccolo Trumpet\", [51, 127, 0, 73, 0, 0, 0, 94, 0, 127, 97, 3, 44, 51, 11, 0, 50, 28]], [\"B83 Cello\", [57, 45, 21, 0, 0, 75, 0, 3, 1, 45, 109, 48, 65, 90, 34, 0, 49, 24]], [\"B84 High Strings\", [80, 0, 10, 70, 0, 92, 0, 0, 0, 71, 48, 27, 57, 57, 41, 0, 28, 24]], [\"B85 Rocket Men\", [108, 0, 0, 0, 0, 110, 127, 80, 63, 127, 0, 0, 127, 51, 89, 0, 2, 26]], [\"B86 Forbidden Planet\", [50, 11, 0, 44, 0, 29, 4, 88, 5, 95, 79, 0, 48, 23, 42, 9, 76, 1]], [\"B87 Froggy\", [78, 0, 0, 0, 0, 55, 127, 43, 0, 127, 77, 0, 0, 0, 0, 127, 41, 23]], [\"B88 Owgan\", [50, 0, 0, 45, 0, 38, 84, 32, 0, 127, 101, 0, 49, 55, 0, 56, 57, 25]]]\ndef get_juno_patch(patch_number):\n  # json was created by:\n  # import javaobj, json\n  # pobj = javaobj.load(open('juno106_factory_patches.ser', 'rb'))\n  # patches = [(p.name, list(p.sysex)) for p in pobj.v.elementData if p is not None]\n  # with open('juno106patches.json', 'w') as f:\n  #   f.write(json.dumps(patches))\n  #pobj = javaobj.load(open('juno106_factory_patches.ser', 'rb'))\n  #patch = pobj.v.elementData[patch_number]\n  global _PATCHES\n  name, sysex = _PATCHES[patch_number]\n  return name, bytes(sysex)\n\n\nclass JunoPatch:\n  \"\"\"Encapsulates information in a Juno Patch.\"\"\"\n  name = \"\"\n  lfo_rate = 0\n  lfo_delay_time = 0\n  dco_lfo = 0\n  dco_pwm = 0\n  dco_noise = 0\n  vcf_freq = 0\n  vcf_res = 0\n  vcf_env = 0\n  vcf_lfo = 0\n  vcf_kbd = 0\n  vca_level = 0\n  env_a = 0\n  env_d = 0\n  env_s = 0\n  env_r = 0\n  dco_sub = 0\n  stop_16 = False\n  stop_8 = False\n  stop_4 = False\n  pulse = False\n  saw = False\n  chorus = 0\n  pwm_manual = False  # else lfo\n  vca_gate = False  # else env\n  vcf_neg = False  # else pos\n  hpf = 0\n  portamento = 0\n  # Map of setup_fn: [params triggering setup]\n  post_set_fn = {'lfo': ['lfo_rate', 'lfo_delay_time'],\n                 'dco': ['dco_lfo', 'dco_pwm', 'dco_noise', 'dco_sub',\n                         'stop_16', 'stop_8', 'stop_4',\n                         'pulse', 'saw', 'pwm_manual', 'portamento'],\n                 'vcf': ['vcf_neg', 'vcf_env', 'vcf_freq', 'vcf_lfo', 'vcf_res', 'vcf_kbd', 'vca_gate'],\n                 'env': ['env_a', 'env_d', 'env_s', 'env_r', 'vca_level', 'vca_gate'],\n                 'cho': ['chorus', 'hpf']}\n\n  # These lists name the fields in the order they appear in the sysex.\n  FIELDS = ['lfo_rate', 'lfo_delay_time', 'dco_lfo', 'dco_pwm', 'dco_noise',\n           'vcf_freq', 'vcf_res', 'vcf_env', 'vcf_lfo', 'vcf_kbd', 'vca_level',\n           'env_a', 'env_d', 'env_s', 'env_r', 'dco_sub']\n  # After the 16 integer values, there are two bytes of bits.\n  BITS1 = ['stop_16', 'stop_8', 'stop_4', 'pulse', 'saw']\n  BITS2 = ['pwm_manual', 'vcf_neg', 'vca_gate']\n  # Non-sysex state: Do we use the cheaper 12 dB/oct VCF?\n  cheap_filter = False\n\n  # Patch number we're based on, if any.\n  patch_number = None\n  # Name, if any\n  name = None\n  # Params that have been changed since last send_to_AMY.\n  dirty_params = set()\n  # Flag to defer param updates.\n  defer_param_updates = False\n  # Amy synth\n  amy_synth = None\n\n  @staticmethod\n  def from_patch_number(patch_number):\n    name, sysexbytes = get_juno_patch(patch_number)\n    return JunoPatch.from_sysex(sysexbytes, name, patch_number)\n\n  @classmethod\n  def from_sysex(cls, sysexbytes, name=None, patch_number=None):\n    \"\"\"Decode sysex bytestream into JunoPatch fields.\"\"\"\n    assert len(sysexbytes) == 18\n    result = JunoPatch()\n    result.name = name\n    result.patch_number = patch_number\n    result._init_from_sysex(sysexbytes)\n    return result\n\n  def _init_from_patch_number(self, patch_number):\n    self.patch_number = patch_number\n    self.name, sysexbytes = get_juno_patch(patch_number)\n    self._init_from_sysex(sysexbytes)\n\n  def _init_from_sysex(self, sysexbytes):\n    # The first 16 bytes are sliders.\n    for index, field in enumerate(self.FIELDS):\n      setattr(self, field, int(sysexbytes[index])/127.0)\n    # Then there are two bytes of switches.\n    for index, field in enumerate(self.BITS1):\n      setattr(self, field, (int(sysexbytes[16]) & (1 << index)) > 0)\n    # Chorus has a weird mapping.  Bit 5 is ~Chorus, bit 6 is ChorusI-notII\n    setattr(self, 'chorus', [2, 0, 1, 0][int(sysexbytes[16]) >> 5])\n    for index, field in enumerate(self.BITS2):\n      setattr(self, field, (int(sysexbytes[17]) & (1 << index)) > 0)\n    # Bits 3 & 4 also have flipped endianness & sense.\n    setattr(self, 'hpf', [3, 2, 1, 0][int(sysexbytes[17]) >> 3])\n    # Nonstandard extension: Put \"cheap\" flag in bit 5 of byte 2.\n    self.cheap_filter = int(sysexbytes[17] & (1 << 5)) > 0\n\n  def to_sysex(self):\n    \"\"\"Return the 18 byte SYSEX corresponding to current object state.\"\"\"\n    byte_values = []\n    # 16 continuous values in order specified by self.FIELDS.\n    for field in self.FIELDS:\n      byte_values.append(int(round(127.0 * getattr(self, field))))\n    # 2 bytes of booleans.\n    val = 0\n    for index, field in enumerate(self.BITS1):\n      val |= (1 << index) if getattr(self, field) else 0\n    # Chorus has a weird mapping.  Bit 5 is ~Chorus, bit 6 is ChorusI-notII\n    val |= ([1, 2, 0][getattr(self, 'chorus')]) << 5\n    byte_values.append(val)\n    val = 0\n    for index, field in enumerate(self.BITS2):\n      val |= (1 << index) if getattr(self, field) else 0\n    # Bits 3 & 4 also have flipped endianness & sense.\n    val |= ([3, 2, 1, 0][getattr(self, 'hpf')]) << 3\n    # Nonstandard extension: Put \"cheap\" flag in bit 5 of byte 2.\n    if self.cheap_filter:\n      val |= (1 << 5)\n    byte_values.append(val)\n    return bytes(byte_values)\n\n  def set_synth(self, amy_synth):\n    self.amy_synth = amy_synth\n\n  def _breakpoint_string(self):\n    \"\"\"Format a breakpoint string from the ADSR parameters reaching a peak.\"\"\"\n    return \"%d,%s,%d,%s,%d,0\" % (\n      to_attack_time(self.env_a), ffmt(1.0), to_decay_time(self.env_d),\n      ffmt(to_level(self.env_s)), to_release_time(self.env_r)\n    )\n\n  def _amp_coef_string(self, level):\n    return '%s,,1,1,0' % ffmt(to_level(level))\n\n  def _freq_coef_string(self, base_freq):\n    return '%s,1,,,,%s,1' % (\n      ffmt(base_freq), ffmt(0.03 * to_level(self.dco_lfo)))\n\n  def base_freq(self):\n    # Only one of stop_{16,8,4} should be set.\n    base_freq = constants.ZERO_LOGFREQ_IN_HZ # 261.63  # The mid note\n    if self.stop_16:\n      base_freq /= 2\n    elif self.stop_4:\n      base_freq *= 2\n    return base_freq\n\n  def _portamento_ms(self, port_val):\n    # Portamento maps exponentially from 1 = 10 ms to 127 = 2560 ms\n    if port_val == 0:\n      return 0\n    return int(round(20 * math.pow(2, port_val * 127 / 30)))\n\n  def init_AMY(self):\n    \"\"\"Output AMY commands to set up patches on all the allocated synth.\n    Send amy.send(osc=0, note=50, vel=1) afterwards.\"\"\"\n    #amy.reset()\n    # base_osc is filter/VCA (AMYboard standard)\n    # base_osc + 1 is LFO  (AMYboard standard)\n    # base_osc + 2 is pulse/PWM\n    # base_osc + 3 is SAW\n    # base_osc + 4 is SUBOCTAVE\n    # base_osc + 5 is NOISE\n    #   env0 is VCA (on base_osc only)\n    #   env1 is VCF (on base_osc only)\n    # These are the canonical oscs (to add to amy.send(synth=..)).\n    self.ctl_osc = 0\n    self.pwm_osc = 2\n    self.saw_osc = 3\n    self.sub_osc = 4\n    self.nse_osc = 5\n    self.lfo_osc = 1\n    # One-time setup of oscs.\n    self.amy_send(osc=self.lfo_osc, wave=amy.TRIANGLE, amp='1,,0,1')\n    filter_type = amy.FILTER_LPF if self.cheap_filter else amy.FILTER_LPF24\n    self.amy_send(osc=self.ctl_osc, wave=amy.SILENT, filter_type=filter_type,\n                  mod_source=self.lfo_osc, chained_osc=self.pwm_osc)\n    self.amy_send(osc=self.pwm_osc, wave=amy.PULSE,\n                  mod_source=self.lfo_osc, chained_osc=self.saw_osc)\n    self.amy_send(osc=self.saw_osc, wave=amy.SAW_UP,\n                  mod_source=self.lfo_osc, chained_osc=self.sub_osc)\n    self.amy_send(osc=self.sub_osc, wave=amy.PULSE,\n                  mod_source=self.lfo_osc, chained_osc=self.nse_osc)\n    self.amy_send(osc=self.nse_osc, wave=amy.NOISE,\n                  mod_source=self.lfo_osc)\n    # Setup all the variable params.\n    self.update_lfo()\n    self.update_dco()\n    self.update_vcf()\n    self.update_env()\n    self.update_cho()\n    \n  def update_lfo(self):\n    lfo_args = {'freq': to_lfo_freq(self.lfo_rate),\n                'bp0': '%i,1.0,10000,0' % to_lfo_delay(self.lfo_delay_time)}\n    self.amy_send(osc=self.lfo_osc, **lfo_args)\n\n  def update_dco(self):\n    base_freq = self.base_freq()\n    freq_str = self._freq_coef_string(base_freq)\n    # PWM square wave.\n    const_duty = 0\n    lfo_duty = to_level(self.dco_pwm)\n    port_ms = self._portamento_ms(self.portamento)\n    if self.pwm_manual:\n      # Swap duty parameters.\n      const_duty, lfo_duty = lfo_duty, const_duty\n    self.amy_send(\n      osc=self.pwm_osc,\n      amp='%s,,0,0' % ffmt(to_level(self.pulse)),\n      freq=freq_str,\n      portamento=port_ms,\n      duty='%s,,,,,%s' % (\n        ffmt(0.5 + 0.5 * const_duty), ffmt(0.5 * lfo_duty)\n      ),\n    )\n    self.amy_send(\n      osc=self.saw_osc,\n      amp='%s,,0,0' % ffmt(to_level(self.saw)),\n      freq=freq_str,\n      portamento=port_ms,\n    )\n    self.amy_send(\n      osc=self.sub_osc,\n      amp='%s,,0,0' % ffmt(to_level(self.dco_sub)),\n      freq=self._freq_coef_string(base_freq / 2.0),\n      portamento=port_ms,\n    )\n    self.amy_send(\n      osc=self.nse_osc,\n      amp='%s,,0,0' % ffmt(to_level(self.dco_noise)),\n    )\n\n  def update_vcf(self):\n    vcf_env_polarity = -1.0 if self.vcf_neg else 1.0\n    vcf_kbd_level = to_level(self.vcf_kbd)\n    vcf_freq_hz = to_filter_freq(self.vcf_freq)\n    # The Juno VCF kbd value is 0 for C4 (MIDI 60), but our scale has 0 at A4 (MIDI 69)\n    # So when the filter freq depends on kbd contribution, it will be wrong.\n    # We want log2(uncooked vcf_freq_hz) + vcf_kbd_level * (midi_note - 60) / 12\n    # to equal log2(cooked vcf_freq_hz) + vcf_kbd_level * (midi_note - 69) / 12\n    # So, cooked / uncooked) = exp2(vcf_kbd_level * 9 / 12)\n    vcf_freq_hz *= (2.0 ** (0.75 * vcf_kbd_level))\n    eg0_coef = 11 * vcf_env_polarity * to_level(self.vcf_env)\n    eg1_coef = 0\n    if self.vca_gate:\n      eg1_coef = eg0_coef\n      eg0_coef = 0\n    self.amy_send(osc=self.ctl_osc, resonance=to_resonance(self.vcf_res),\n                  filter_freq='%s,%s,,%s,%s,%s' % (\n                    ffmt(vcf_freq_hz),\n                    ffmt(vcf_kbd_level),\n                    ffmt(eg0_coef), ffmt(eg1_coef),\n                    ffmt(1.25 * to_level(self.vcf_lfo))))\n\n  def update_env(self):\n    coefs = {'osc': self.ctl_osc, 'amp': self._amp_coef_string(self.vca_level)}\n    bp_coefs = self._breakpoint_string()\n    if self.vca_gate:\n      coefs |= {'bp0': '0,1,0,1,0,0', 'bp1': bp_coefs}\n    else:\n      coefs |= {'bp0': bp_coefs}\n    self.amy_send(**coefs)\n\n  def update_cho(self):\n    # Chorus & HPF\n    eq_l = eq_m = eq_h = 0\n    if self.hpf == 0:\n      eq_l = 7\n      eq_m = -3\n      eq_h = -3\n    elif self.hpf == 1:\n      pass\n    elif self.hpf == 2:\n      eq_l = -8\n    elif self.hpf == 3:\n      eq_l = -15\n      eq_m = 8\n      eq_h = 8\n    cho_args = {\n      'eq': '%s,%s,%s' % (str(eq_l), str(eq_m), str(eq_h)),\n    }\n    if self.chorus == 0:\n      cho_args['chorus'] = '0'\n    else:\n      # We choose juno 60-style I+II for chorus=3.  Juno 6-style would be freq=8 depth=0.25\n      cho_args['chorus'] = '1,,%s,%s' % (\n        (0, 0.5, 0.83, 1)[self.chorus],  # chorus_freq\n        (0, 0.5, 0.5, 0.08)[self.chorus],  # chorus_depth\n      )\n    # *Don't* send to oscs, these ones are global.\n    amy.send(**cho_args)\n\n  # Setters for each Juno UI control\n  def set_param(self, param, val):\n    setattr(self, param,  val)\n    if self.defer_param_updates:\n      self.dirty_params.add(param)\n    else:\n      for group, params in self.post_set_fn.items():\n        if param in params:\n          getattr(self, 'update_' + group)()\n\n  def send_deferred_params(self):\n    for group, params in self.post_set_fn.items():\n      if self.dirty_params.intersection(params):\n        getattr(self, 'update_' + group)()\n    self.dirty_params = set()\n    self.defer_param_updates = False\n\n  def set_patch(self, patch):\n    self._init_from_patch_number(patch)\n    #print(\"New patch\", patch, \":\", self.name)\n    self.init_AMY()\n\n  def set_sysex(self, sysex):\n    self._init_from_sysex(sysex)\n    #print(\"New patch\", patch, \":\", self.name)\n    self.init_AMY()\n\n  def set_pitch_bend(self, value):\n    # Global, not osc-specific.\n    amy.send(pitch_bend=value)\n\n  def amy_send(self, osc, **kwargs):\n    if self.amy_synth:\n      amy.send(synth=self.amy_synth, osc=osc, **kwargs)\n    else:\n      amy.send(osc=osc, **kwargs)\n"
  },
  {
    "path": "amy/piano.py",
    "content": "\n# piano.py\n# examples from piano.html\nimport amy\nfrom . import piano_params\n\ndef piano_example(base_note=72, volume=5, send_command=amy.send, init_command=lambda: None):\n    amy.send(reset=amy.RESET_TIMEBASE)\n    amy.send(time=0, volume=volume)\n    init_command()\n    send_command(time=50, voices='0', note=base_note, vel=0.05)\n    send_command(time=435, voices='0', note=base_note, vel=0)\n    send_command(time=450, voices='0', note=base_note, vel=0.63)\n    send_command(time=835, voices='0', note=base_note, vel=0)\n    send_command(time=850, voices='0', note=base_note, vel=1.0)\n    send_command(time=1485, voices='0', note=base_note, vel=0)\n    send_command(time=1500, voices='1', note=base_note - 24, vel=0.6)\n    send_command(time=2100, voices='2', note=base_note + 24, vel=1.0)\n    send_command(time=3000, voices='1', note=base_note - 24, vel=0)\n    send_command(time=3000, voices='2', note=base_note + 24, vel=0)\n\n\ndef juno_example():\n\tpiano_example(base_note=74, volume=10, \n\t\tinit_command=lambda: amy.send(time=0, voices='0,1,2', patch=7))\n\ndef dx7_example():\n\tpiano_example(base_note=50, volume=25, \n              init_command=lambda: amy.send(time=0, voices='0,1,2', patch=137))\n\n\n\"\"\"Piano notes generated on amy/tulip.\"\"\"\n# Uses the partials amplitude breakpoints and residual written by piano_heterodyne.ipynb.\ntry:\n    from ulab import numpy as np\nexcept ImportError:\n    import numpy as np\n\n# Read in the params file written by piano_heterodyne.ipynb\n# Contents:\n#   sample_times_ms - single vector of fixed log-spaced envelope sample times (in int16 integer ms).\n#   notes - the MIDI numbers corresponding to each note described.\n#   velocities - The (MIDI) strike velocities available for each note, the same for all notes.\n#   num_harmonics - Array of (num_notes * num_velocities) counts of how many harmonics are defined for each note+vel combination.\n#   harmonics_freq - Vector of (total_num_harmonics) int16s giving freq for each harmonic in \"MIDI cents\" i.e. 6900 = 440 Hz.\n#   harmonics_mags - Array of (total_num_harmonics, num_sample_times) uint8s giving envelope samples for each harmonic.  In dB, between 0 and 100.\n\nfrom amy.piano_params import notes_params\n\nNOTES = np.array(notes_params['notes'], dtype=np.int8)\nVELOCITIES = np.array(notes_params['velocities'], dtype=np.int8)\nNUM_HARMONICS = np.array(notes_params['num_harmonics'], dtype=np.int16)\nassert len(NUM_HARMONICS) == len(NOTES) * len(VELOCITIES)\nNUM_MAGS = len(notes_params['harmonics_mags'][0])\n# Add in a derived diff-times and start-harmonic fields\n# Reintroduce the initial zero-time...\nSAMPLE_TIMES = np.array([0] + notes_params['sample_times_ms'])\n#.. so we can neatly calculate the time-deltas needed for BP strings.\nDIFF_TIMES = SAMPLE_TIMES[1:] - SAMPLE_TIMES[:-1]\n# Lookup to find first harmonic for nth note.\nSTART_HARMONIC = np.zeros(len(NUM_HARMONICS), dtype=np.int16)\nfor i in range(len(NUM_HARMONICS)):  # No cumsum in ulab.numpy\n    START_HARMONIC[i] = np.sum(NUM_HARMONICS[:i])\n# We build a single array for all the harmonics with the frequency as the\n# first column, followed by the envelope magnitudes.  Then, we can pull\n# out the entire description for a given note/velocity pair simply by\n# pulling out NUM_HARMONICS[harmonic_index] rows starting at\n# START_HARMONIC[harmonic_index]\nFREQ_MAGS = np.zeros((np.sum(NUM_HARMONICS), 1 + NUM_MAGS), dtype=np.int16)\nFREQ_MAGS[:, 0] = np.array(notes_params['harmonics_freq'], dtype=np.int16)\nFREQ_MAGS[:, 1:] = np.array(notes_params['harmonics_mags'], dtype=np.int16)\n\ndef harms_params_from_note_index_vel_index(note_index, vel_index):\n    \"\"\"Retrieve a (log-domain) harms_params list for a given note/vel index pair.\"\"\"\n    # A harmonic is represented as a [freq_cents, mag1_db, mag2_db, .. mag20_db] row.\n    # A note is represented as NUM_HARMONICS (usually 20) rows.\n    note_vel_index = note_index * len(VELOCITIES) + vel_index\n    num_harmonics = NUM_HARMONICS[note_vel_index]\n    start_harmonic = START_HARMONIC[note_vel_index]\n    harms_params = FREQ_MAGS[start_harmonic : start_harmonic + num_harmonics, :]\n    return harms_params\n\ndef interp_harms_params(hp0, hp1, alpha):\n    \"\"\"Return harm_param list that is alpha of the way to hp1 from hp0.\"\"\"\n    # hp_ is [[freq_h1, mag1, mag2, ...], [freq_h2, mag1, mag2, ..], ...]\n    num_harmonics = min(hp0.shape[0], hp1.shape[0])\n    # Assume the units are log-scale, so linear interpolation is good.\n    return hp0[:num_harmonics] + alpha * (hp1[:num_harmonics] - hp0[:num_harmonics])\n\ndef cents_to_hz(cents):\n    \"\"\"Convert 'Midi cents' frequency to Hz.  6900 cents -> 440 Hz\"\"\"\n    return 440 * (2 ** ((cents - 6900) / 1200.0))\n  \ndef db_to_lin(d):\n    \"\"\"Convert the db-scale magnitudes to linear.  0 dB -> 0.00001, so 100 dB -> 1.0.\"\"\"\n    # Clip anything below 0.001 to zero.\n    return np.maximum(0, 10.0 ** ((d - 100) / 20.0) - 0.001)\n\ndef harms_params_for_note_vel(note, vel):\n    \"\"\"Convert midi note and velocity into an interpolated harms_params list of harmonic specifications.\"\"\"\n    note = np.clip(note, NOTES[0], NOTES[-1])\n    vel = np.clip(vel, VELOCITIES[0], VELOCITIES[-1])\n    note_index = -1 + np.sum(NOTES[:-1] <= note)  # at most the last-but-one value.\n    strike_index = -1 + np.sum(VELOCITIES[:-1] <= vel)\n    lower_note = NOTES[note_index]\n    upper_note = NOTES[note_index + 1]\n    note_alpha = (note - lower_note) / (upper_note - lower_note)\n    lower_strike = VELOCITIES[strike_index]\n    upper_strike = VELOCITIES[strike_index + 1]\n    strike_alpha = (vel - lower_strike) / (upper_strike - lower_strike)\n    # We interpolate to describe a note at both strike indices,\n    # then interpolate those to get the strike.\n    harms_params = interp_harms_params(\n        interp_harms_params(\n            harms_params_from_note_index_vel_index(note_index, strike_index),\n            harms_params_from_note_index_vel_index(note_index + 1, strike_index),\n            note_alpha,\n        ),\n        interp_harms_params(\n            harms_params_from_note_index_vel_index(note_index, strike_index + 1),\n            harms_params_from_note_index_vel_index(note_index + 1, strike_index + 1),\n            note_alpha,\n        ),\n        strike_alpha,\n    )\n    return harms_params\n\n\ndef init_piano_voice(num_partials, base_osc=0, **kwargs):\n    \"\"\"One-time initialization of the unchanging parts of the partials voices.\"\"\"\n    amy.send(osc=base_osc, wave=amy.BYO_PARTIALS, num_partials=num_partials, amp={'eg0': 0}, **kwargs)\n    for partial in range(1, num_partials + 1):\n        bp_string = '0,0,' + ','.join(\"%d,0\" % t for t in DIFF_TIMES)\n        # We append a release segment to die away to silence over 200ms on note-off.\n        bp_string += ',200,0'\n        amy.send(osc=base_osc + partial, wave=amy.PARTIAL, bp0=bp_string, eg0_type=amy.ENVELOPE_TRUE_EXPONENTIAL, **kwargs)\n\ndef setup_piano_voice(harms_params, base_osc=0, **kwargs):\n    \"\"\"Configure a set of PARTIALs oscs to play a particular note and velocity.\"\"\"\n    num_partials = len(harms_params)\n    amy.send(osc=base_osc, wave=amy.BYO_PARTIALS, num_partials=num_partials, **kwargs)\n    for i in range(num_partials):\n        f0_hz = cents_to_hz(harms_params[i, 0])\n        env_vals = db_to_lin(harms_params[i, 1:])\n        # Omit the time-deltas from the list to save space.  The osc will keep the ones we set up in init_piano_voice.\n        bp_string = ',,' + ','.join(\",%.3f\" % val for val in env_vals)\n        # Add final release.\n        bp_string += ',200,0'\n        amy.send(osc=base_osc + 1 + i, freq=f0_hz, bp0=bp_string, **kwargs)\n\npatch_string = 'v0w10Zv%dw%dZ' % (NUM_HARMONICS[0] + 1, amy.PARTIAL)\n\n# The lowest note provides an upper-bound on the number of partials we need to allocate.\ndef init_piano_voices(num_partials=NUM_HARMONICS[0]):\n    amy.send(patch='1024', patch_string=patch_string)\n    amy.send(voices='0,1,2', patch=1024)\n    init_piano_voice(num_partials, voices='0,1,2')\n    # piano_note_on (below) overwrites these settings before each note,\n    # but pre-configure each note to C4.mf so we can experiment.\n    setup_piano_voice(harms_params_for_note_vel(note=60, vel=80), voices='0,1,2')\n\ndef play_piano_partials_1():\n\tpiano_example(base_note=62, volume=5, init_command=init_piano_voices)\n\n\ndef piano_note_on(note=60, vel=1, **kwargs):\n    if vel == 0:\n        # Note off.\n        amy.send(vel=0, **kwargs)\n    else:\n        setup_piano_voice(harms_params_for_note_vel(note, round(vel * 127)), **kwargs)\n        # We already configured the pitches and magnitudes in setup, so\n        # the note and vel of the note-on are always the same.\n        amy.send(note=60, vel=1, **kwargs)\n\ndef play_piano_partials_2():\n\tpiano_example(base_note=62,\n              init_command=init_piano_voices,\n              send_command=piano_note_on)\n\n\n\n"
  },
  {
    "path": "amy/piano_params.py",
    "content": "# Notes params generated by piano_heterodyne.ipynb\nnotes_params = {\"sample_times_ms\": [4, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096], \"notes\": [24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104], \"velocities\": [40, 80, 120], \"num_harmonics\": [20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 17, 17, 17, 13, 13, 13, 11, 11, 11, 9, 8, 9, 7, 7, 7, 6, 5, 5, 3, 4, 4], \"harmonics_freq\": [2363, 3491, 4191, 4691, 5081, 5398, 5667, 5899, 6109, 6297, 6466, 6621, 6765, 6899, 7024, 7142, 7255, 7361, 7462, 7559, 2172, 3587, 4287, 4787, 5175, 5493, 5762, 5996, 6205, 6393, 6561, 6716, 6860, 6993, 7118, 7238, 7349, 7456, 7556, 7653, 2394, 3588, 4289, 4787, 5176, 5495, 5764, 5998, 6207, 6395, 6564, 6717, 6862, 6995, 7120, 7241, 7351, 7458, 7557, 7654, 2851, 3989, 4692, 5187, 5576, 5893, 6161, 6394, 6600, 6785, 6952, 7105, 7246, 7379, 7501, 7616, 7724, 7828, 7925, 8019, 3069, 3987, 4692, 5187, 5577, 5892, 6161, 6393, 6600, 6784, 6952, 7105, 7246, 7379, 7501, 7616, 7725, 7828, 7926, 8019, 3008, 3989, 4693, 5188, 5577, 5894, 6162, 6395, 6601, 6785, 6953, 7106, 7247, 7379, 7502, 7617, 7726, 7829, 7927, 8019, 3114, 4391, 5094, 5596, 5984, 6300, 6567, 6804, 7008, 7191, 7358, 7512, 7653, 7784, 7906, 8022, 8130, 8233, 8330, 8424, 3224, 4390, 5096, 5595, 5983, 6299, 6567, 6800, 7006, 7190, 7358, 7512, 7653, 7784, 7906, 8022, 8130, 8232, 8330, 8422, 3275, 4391, 5099, 5598, 5985, 6300, 6567, 6805, 7008, 7191, 7358, 7513, 7654, 7785, 7907, 8022, 8130, 8233, 8330, 8423, 3610, 4789, 5497, 5999, 6386, 6702, 6972, 7205, 7411, 7596, 7763, 7916, 8055, 8189, 8314, 8427, 8551, 8655, 8819, 8852, 3623, 4792, 5493, 5999, 6385, 6702, 6972, 7205, 7411, 7596, 7763, 7916, 8054, 8189, 8313, 8426, 8538, 8639, 8737, 8831, 3646, 4792, 5491, 6000, 6386, 6703, 6973, 7206, 7412, 7597, 7764, 7919, 8054, 8190, 8313, 8427, 8540, 8641, 8739, 8832, 4008, 5200, 5904, 6402, 6790, 7106, 7376, 7608, 7815, 7998, 8165, 8318, 8460, 8591, 8716, 8828, 8942, 9042, 9140, 9229, 4008, 5200, 5903, 6403, 6789, 7106, 7376, 7607, 7815, 7999, 8165, 8318, 8460, 8591, 8714, 8828, 8937, 9040, 9137, 9228, 4010, 5201, 5903, 6404, 6790, 7108, 7376, 7608, 7816, 7999, 8166, 8318, 8461, 8592, 8714, 8829, 8938, 9040, 9137, 9228, 4398, 5600, 6302, 6802, 7189, 7506, 7774, 8007, 8213, 8398, 8566, 8720, 8860, 8992, 9130, 9234, 9347, 9448, 9543, 9645, 4398, 5599, 6303, 6801, 7188, 7507, 7773, 8006, 8213, 8397, 8565, 8717, 8858, 8990, 9112, 9227, 9334, 9438, 9536, 9629, 4400, 5598, 6304, 6803, 7190, 7508, 7775, 8008, 8215, 8398, 8566, 8718, 8860, 8991, 9113, 9228, 9337, 9440, 9536, 9629, 4782, 6001, 6703, 7203, 7591, 7907, 8175, 8410, 8623, 8800, 8966, 9124, 9265, 9407, 9526, 9658, 9778, 9886, 9995, 10084, 4797, 6000, 6702, 7204, 7591, 7907, 8174, 8407, 8615, 8797, 8964, 9117, 9258, 9389, 9511, 9625, 9735, 9837, 9934, 10027, 4801, 6002, 6703, 7205, 7592, 7908, 8176, 8408, 8616, 8798, 8966, 9118, 9259, 9390, 9512, 9626, 9736, 9838, 9934, 10028, 5204, 6408, 7107, 7608, 7994, 8311, 8580, 8812, 9020, 9202, 9373, 9527, 9666, 9802, 9927, 10042, 10158, 10256, 10348, 10446, 5206, 6408, 7107, 7608, 7994, 8311, 8580, 8812, 9019, 9205, 9372, 9526, 9667, 9799, 9916, 10038, 10147, 10251, 10349, 10444, 5208, 6409, 7108, 7609, 7995, 8312, 8581, 8812, 9020, 9205, 9373, 9527, 9668, 9800, 9921, 10039, 10147, 10252, 10351, 10443, 5606, 6807, 7508, 8009, 8396, 8714, 8994, 9205, 9428, 9629, 9787, 9941, 10072, 10212, 10347, 10463, 10569, 10668, 10765, 10858, 5603, 6807, 7509, 8009, 8396, 8714, 8983, 9216, 9423, 9609, 9778, 9932, 10072, 10209, 10335, 10452, 10563, 10667, 10767, 10863, 5599, 6808, 7510, 8010, 8397, 8715, 8984, 9217, 9425, 9611, 9779, 9934, 10075, 10210, 10334, 10451, 10562, 10667, 10767, 10862, 6002, 7204, 7909, 8408, 8797, 9126, 9394, 9638, 9844, 10034, 10201, 10348, 10493, 10621, 10748, 10862, 10970, 11069, 11174, 11257, 6003, 7204, 7908, 8408, 8796, 9115, 9385, 9621, 9828, 10021, 10187, 10345, 10491, 10627, 10753, 10871, 10986, 11088, 11192, 11288, 6004, 7205, 7909, 8408, 8797, 9115, 9386, 9621, 9829, 10018, 10187, 10344, 10489, 10624, 10751, 10871, 10984, 11092, 11195, 11293, 6406, 7603, 8310, 8811, 9197, 9528, 9807, 10043, 10310, 10430, 10611, 10767, 10911, 11047, 11174, 11285, 11400, 11508, 11611, 11699, 6409, 7602, 8310, 8811, 9201, 9522, 9794, 10031, 10263, 10429, 10610, 10767, 10921, 11054, 11187, 11305, 11406, 11526, 11633, 11728, 6410, 7602, 8310, 8812, 9202, 9522, 9795, 10031, 10241, 10432, 10606, 10764, 10909, 11053, 11183, 11307, 11421, 11535, 11641, 11743, 6806, 8006, 8712, 9210, 9616, 9933, 10237, 10412, 10652, 10840, 11011, 11164, 11299, 11410, 11549, 11675, 11779, 11888, 11975, 12073, 6807, 8006, 8713, 9214, 9606, 9928, 10202, 10441, 10658, 10855, 11030, 11209, 11350, 11483, 11616, 11733, 11855, 11956, 12071, 12180, 6808, 8007, 8714, 9215, 9607, 9929, 10203, 10442, 10656, 10850, 11025, 11260, 11338, 11485, 11618, 11744, 11868, 11975, 12091, 12198, 7203, 8404, 9117, 9628, 10035, 10354, 10659, 10914, 11147, 11380, 11552, 11716, 11904, 12052, 12205, 12350, 12490, 12629, 12753, 12885, 7203, 8405, 9112, 9616, 10012, 10339, 10621, 10863, 11067, 11254, 11419, 11587, 11729, 11876, 12000, 12124, 12241, 12353, 12456, 12562, 7203, 8406, 9112, 9617, 10012, 10337, 10615, 10859, 11077, 11248, 11460, 11652, 11791, 11940, 12076, 12212, 12324, 12430, 12541, 12648, 7606, 8805, 9529, 10039, 10389, 10754, 11037, 11275, 11460, 11674, 11852, 12002, 12155, 12296, 12430, 12553, 12680, 12791, 12898, 13007, 7607, 8809, 9516, 10022, 10413, 10745, 11028, 11274, 11465, 11672, 11849, 12002, 12160, 12296, 12430, 12553, 12673, 12793, 12899, 13003, 7607, 8809, 9516, 10020, 10415, 10744, 11025, 11273, 11492, 11680, 11880, 12068, 12212, 12358, 12494, 12627, 12752, 12878, 12993, 13110, 8006, 9206, 9946, 10405, 10854, 11193, 11444, 11706, 11936, 12136, 12320, 12490, 12660, 12814, 12959, 13093, 13237, 8007, 9203, 9925, 10423, 10846, 11183, 11436, 11694, 11926, 12117, 12295, 12461, 12621, 12767, 12911, 13051, 13177, 8008, 9212, 9921, 10428, 10830, 11162, 11443, 11703, 11930, 12135, 12321, 12495, 12659, 12815, 12960, 13102, 13241, 8400, 9616, 10349, 10895, 11315, 11634, 11922, 12169, 12402, 12618, 12813, 13015, 13183, 8398, 9607, 10331, 10859, 11293, 11620, 11911, 12158, 12386, 12597, 12790, 12979, 13148, 8400, 9614, 10323, 10842, 11255, 11606, 11902, 12163, 12395, 12617, 12820, 13012, 13186, 8802, 10047, 10789, 11338, 11714, 12032, 12335, 12599, 12833, 13055, 13264, 8809, 10024, 10758, 11307, 11704, 12027, 12332, 12600, 12838, 13051, 13262, 8810, 10018, 10730, 11263, 11677, 12025, 12336, 12607, 12848, 13066, 13282, 9119, 10411, 11221, 11722, 12116, 12449, 12735, 13015, 13246, 9211, 10418, 11212, 11719, 12131, 12476, 12767, 13048, 9216, 10420, 11163, 11688, 12105, 12453, 12745, 13030, 13271, 9341, 10828, 11588, 12106, 12512, 12830, 13106, 9578, 10866, 11617, 12155, 12598, 12960, 13292, 9613, 10827, 11575, 12112, 12547, 12902, 13211, 9520, 11256, 12011, 12541, 12935, 13269, 9943, 11276, 12039, 12603, 13022, 9996, 11242, 12016, 12585, 13016, 8908, 11863, 12902, 10199, 11574, 12376, 12924, 10409, 11646, 12421, 12947], \"harmonics_mags\": [[39, 40, 41, 41, 38, 38, 39, 40, 40, 46, 43, 40, 22, 40, 32, 31, 36, 34, 44, 37], [52, 53, 55, 56, 56, 52, 45, 53, 47, 50, 50, 53, 52, 53, 52, 52, 52, 50, 47, 46], [65, 68, 70, 72, 73, 73, 72, 73, 72, 72, 72, 73, 72, 72, 71, 71, 70, 70, 68, 67], [69, 71, 72, 73, 75, 76, 77, 77, 75, 75, 76, 75, 75, 74, 73, 71, 69, 68, 64, 59], [69, 71, 72, 73, 74, 73, 74, 74, 75, 74, 74, 74, 73, 73, 71, 70, 67, 64, 59, 55], [68, 70, 72, 73, 75, 76, 77, 76, 73, 73, 73, 73, 72, 72, 71, 70, 68, 66, 63, 59], [52, 52, 52, 52, 53, 53, 50, 52, 53, 51, 52, 52, 52, 52, 52, 51, 50, 50, 48, 44], [42, 41, 42, 47, 53, 56, 56, 57, 59, 59, 56, 55, 51, 47, 44, 44, 38, 31, 19, 32], [48, 52, 54, 56, 58, 60, 61, 63, 62, 63, 63, 63, 62, 62, 60, 59, 56, 54, 49, 43], [56, 57, 57, 58, 59, 60, 61, 62, 64, 64, 64, 63, 62, 61, 59, 57, 53, 51, 46, 43], [47, 44, 50, 56, 62, 65, 67, 67, 66, 65, 64, 63, 62, 62, 60, 58, 54, 50, 42, 36], [60, 63, 64, 65, 68, 69, 71, 71, 71, 72, 71, 71, 70, 70, 69, 67, 64, 61, 51, 43], [58, 60, 61, 62, 63, 64, 64, 64, 66, 66, 66, 66, 65, 64, 63, 62, 59, 56, 50, 43], [44, 50, 54, 57, 60, 62, 63, 63, 62, 62, 62, 61, 61, 60, 60, 59, 57, 55, 49, 44], [51, 53, 54, 56, 57, 58, 58, 58, 61, 61, 61, 61, 60, 59, 57, 55, 52, 48, 36, 44], [45, 46, 47, 47, 47, 47, 47, 47, 44, 39, 50, 51, 47, 44, 45, 45, 44, 43, 40, 38], [46, 48, 49, 50, 49, 48, 45, 41, 42, 43, 43, 37, 37, 34, 34, 29, 23, 33, 35, 34], [48, 49, 51, 52, 53, 54, 54, 55, 54, 54, 54, 55, 53, 53, 51, 49, 46, 40, 28, 38], [50, 51, 52, 53, 53, 53, 53, 53, 53, 52, 52, 52, 51, 51, 50, 49, 46, 43, 32, 25], [49, 51, 52, 53, 53, 53, 51, 49, 48, 49, 49, 48, 48, 48, 47, 46, 45, 44, 43, 42], [38, 36, 36, 36, 33, 30, 34, 44, 47, 42, 41, 35, 41, 39, 42, 37, 44, 42, 40, 38], [55, 59, 62, 64, 67, 66, 59, 57, 61, 59, 59, 59, 60, 58, 58, 57, 57, 56, 56, 53], [70, 73, 76, 79, 81, 82, 79, 79, 81, 80, 80, 79, 79, 79, 78, 77, 75, 74, 71, 68], [73, 76, 77, 78, 79, 79, 79, 76, 78, 77, 77, 77, 76, 76, 75, 75, 73, 71, 67, 61], [74, 77, 79, 81, 83, 84, 84, 82, 84, 83, 83, 83, 83, 82, 81, 80, 79, 77, 73, 69], [71, 73, 75, 76, 78, 79, 78, 79, 79, 79, 78, 78, 78, 78, 77, 76, 75, 74, 72, 69], [66, 68, 69, 69, 69, 68, 65, 64, 66, 69, 69, 69, 68, 68, 67, 66, 65, 63, 61, 58], [62, 62, 62, 62, 65, 68, 70, 71, 72, 71, 69, 68, 67, 65, 63, 61, 57, 51, 44, 43], [54, 58, 61, 64, 67, 66, 65, 67, 66, 66, 67, 66, 66, 65, 64, 63, 61, 59, 55, 51], [62, 63, 65, 66, 63, 50, 63, 61, 49, 44, 52, 50, 48, 50, 49, 48, 50, 51, 51, 51], [59, 62, 65, 67, 72, 75, 77, 77, 76, 74, 72, 70, 69, 68, 65, 63, 58, 52, 40, 47], [66, 68, 69, 70, 70, 70, 70, 72, 73, 74, 73, 72, 71, 70, 68, 66, 62, 60, 56, 52], [57, 60, 64, 67, 71, 72, 69, 67, 69, 71, 73, 72, 72, 71, 70, 69, 67, 64, 59, 54], [61, 64, 67, 69, 71, 73, 75, 74, 74, 75, 74, 74, 74, 73, 72, 71, 68, 66, 66, 64], [48, 48, 46, 44, 53, 59, 62, 64, 58, 56, 57, 52, 54, 53, 52, 53, 54, 54, 53, 49], [53, 55, 56, 58, 62, 65, 68, 67, 63, 42, 57, 46, 54, 57, 57, 50, 54, 51, 50, 48], [56, 59, 61, 62, 62, 58, 43, 50, 52, 51, 49, 47, 47, 47, 45, 45, 44, 44, 33, 34], [59, 60, 60, 60, 59, 55, 44, 48, 41, 44, 45, 46, 45, 43, 42, 44, 40, 39, 39, 32], [56, 59, 61, 63, 64, 65, 65, 64, 63, 63, 63, 62, 62, 62, 63, 62, 60, 57, 57, 51], [51, 55, 59, 61, 63, 64, 64, 62, 56, 50, 52, 54, 54, 52, 54, 52, 52, 51, 49, 45], [45, 45, 44, 49, 54, 58, 57, 42, 53, 50, 57, 43, 48, 54, 29, 47, 47, 48, 42, 42], [67, 70, 74, 76, 79, 80, 76, 69, 73, 71, 68, 69, 70, 69, 69, 69, 67, 66, 65, 63], [77, 81, 84, 86, 90, 92, 92, 91, 93, 92, 92, 91, 91, 91, 90, 89, 88, 86, 83, 80], [79, 84, 86, 88, 90, 90, 90, 88, 88, 87, 88, 87, 86, 86, 85, 84, 83, 81, 77, 72], [76, 82, 86, 89, 93, 95, 96, 95, 96, 96, 96, 95, 95, 94, 93, 92, 90, 88, 84, 80], [81, 84, 86, 88, 90, 91, 90, 89, 90, 89, 89, 88, 88, 88, 87, 87, 86, 85, 83, 81], [77, 79, 81, 82, 82, 81, 78, 76, 79, 80, 81, 80, 80, 79, 79, 78, 76, 74, 71, 68], [76, 77, 78, 78, 77, 79, 83, 85, 86, 85, 83, 83, 81, 79, 77, 75, 70, 62, 56, 52], [69, 69, 70, 73, 79, 81, 78, 76, 80, 78, 79, 78, 78, 78, 76, 75, 73, 70, 65, 61], [76, 78, 78, 79, 78, 69, 77, 76, 67, 67, 68, 70, 67, 67, 62, 58, 55, 57, 60, 62], [74, 76, 78, 80, 83, 85, 89, 89, 89, 88, 85, 83, 82, 81, 79, 78, 74, 70, 61, 54], [66, 72, 76, 79, 82, 84, 86, 87, 86, 86, 85, 85, 84, 83, 81, 80, 76, 74, 68, 64], [66, 67, 71, 76, 82, 85, 85, 82, 83, 84, 84, 83, 83, 83, 82, 80, 79, 76, 72, 67], [63, 68, 73, 76, 81, 84, 87, 87, 86, 86, 86, 87, 86, 85, 84, 83, 80, 76, 75, 75], [56, 56, 56, 55, 59, 67, 73, 77, 80, 79, 78, 70, 73, 73, 71, 66, 67, 67, 65, 61], [56, 53, 53, 61, 72, 78, 82, 80, 73, 77, 72, 74, 75, 76, 74, 56, 70, 64, 63, 61], [71, 74, 76, 78, 79, 77, 57, 70, 70, 70, 64, 63, 65, 66, 61, 63, 61, 59, 50, 50], [72, 74, 75, 76, 75, 73, 67, 72, 69, 68, 69, 70, 67, 66, 64, 64, 60, 58, 56, 51], [67, 71, 75, 77, 80, 81, 82, 82, 82, 81, 81, 80, 80, 80, 79, 78, 76, 73, 71, 66], [60, 65, 71, 74, 79, 81, 82, 81, 81, 79, 79, 77, 78, 76, 74, 71, 70, 68, 64, 61], [41, 41, 40, 38, 39, 38, 32, 40, 38, 46, 42, 32, 43, 38, 23, 41, 45, 37, 35, 45], [58, 63, 66, 69, 70, 70, 73, 73, 75, 76, 76, 76, 75, 74, 69, 63, 50, 43, 29, 34], [67, 70, 72, 73, 75, 76, 77, 77, 74, 74, 76, 75, 74, 73, 72, 70, 68, 65, 59, 52], [64, 68, 71, 72, 74, 74, 73, 72, 74, 74, 74, 74, 73, 73, 72, 72, 70, 69, 66, 64], [65, 67, 69, 70, 71, 71, 71, 71, 71, 71, 72, 71, 71, 70, 69, 68, 66, 64, 59, 51], [62, 64, 66, 67, 67, 66, 63, 65, 68, 68, 69, 70, 70, 69, 68, 66, 63, 60, 55, 50], [63, 65, 66, 67, 68, 67, 68, 67, 66, 67, 67, 67, 67, 66, 65, 64, 63, 61, 57, 53], [39, 39, 42, 45, 49, 50, 45, 44, 47, 48, 47, 48, 46, 46, 44, 45, 42, 39, 37, 33], [43, 44, 45, 47, 50, 51, 50, 52, 53, 50, 50, 50, 50, 47, 46, 46, 47, 43, 41, 40], [44, 43, 39, 24, 45, 50, 54, 54, 54, 55, 55, 56, 55, 54, 54, 53, 52, 51, 48, 45], [36, 46, 51, 55, 58, 60, 61, 63, 63, 63, 64, 63, 63, 63, 62, 61, 59, 57, 53, 50], [51, 54, 56, 57, 58, 59, 60, 60, 59, 60, 60, 59, 59, 58, 58, 56, 54, 53, 49, 46], [45, 48, 50, 52, 51, 53, 58, 58, 58, 59, 59, 59, 59, 59, 59, 58, 57, 54, 48, 40], [43, 46, 49, 51, 56, 60, 62, 61, 62, 62, 61, 60, 59, 58, 56, 55, 53, 49, 21, 35], [46, 47, 48, 49, 49, 50, 51, 52, 53, 53, 53, 53, 52, 51, 49, 47, 41, 35, 42, 42], [38, 40, 40, 41, 40, 40, 41, 38, 37, 39, 37, 35, 35, 33, 29, 19, 28, 32, 31, 14], [28, 28, 26, 23, 25, 28, 32, 30, 34, 31, 31, 29, 21, 31, 27, 18, 13, 19, 14, 10], [38, 40, 41, 41, 41, 42, 43, 43, 43, 43, 43, 43, 41, 38, 31, 18, 37, 38, 24, 30], [34, 37, 39, 40, 42, 41, 39, 41, 40, 40, 39, 38, 38, 36, 29, 26, 35, 33, 25, 22], [24, 27, 29, 30, 29, 29, 31, 28, 28, 30, 30, 32, 30, 32, 26, 20, 24, 24, 25, 21], [47, 48, 46, 41, 45, 42, 48, 47, 47, 48, 46, 51, 47, 43, 48, 38, 42, 27, 42, 34], [47, 60, 67, 71, 76, 77, 79, 80, 81, 82, 82, 81, 80, 78, 76, 73, 65, 51, 42, 38], [65, 71, 75, 77, 80, 82, 83, 83, 81, 81, 82, 81, 81, 79, 78, 76, 72, 70, 65, 60], [63, 69, 73, 76, 80, 81, 81, 79, 80, 81, 80, 80, 80, 79, 79, 78, 77, 75, 73, 71], [67, 71, 73, 75, 77, 78, 78, 78, 78, 78, 79, 78, 78, 77, 77, 76, 74, 72, 66, 59], [65, 69, 72, 74, 75, 75, 73, 72, 75, 77, 78, 78, 78, 78, 77, 75, 72, 69, 63, 57], [68, 71, 73, 75, 76, 76, 76, 76, 75, 76, 76, 76, 75, 75, 74, 73, 71, 69, 65, 62], [47, 45, 35, 42, 56, 59, 57, 53, 56, 55, 54, 55, 54, 55, 53, 52, 51, 50, 47, 44], [56, 56, 57, 57, 59, 60, 60, 62, 61, 61, 59, 60, 60, 59, 57, 58, 55, 54, 51, 48], [55, 57, 58, 56, 46, 57, 63, 65, 65, 66, 67, 66, 66, 66, 65, 64, 63, 62, 58, 55], [43, 51, 57, 62, 67, 70, 71, 73, 74, 74, 75, 74, 74, 74, 73, 72, 70, 69, 65, 61], [56, 61, 64, 67, 69, 70, 72, 72, 71, 71, 71, 71, 71, 70, 70, 69, 68, 66, 63, 60], [55, 58, 61, 63, 65, 63, 70, 71, 71, 72, 72, 72, 72, 72, 72, 71, 69, 67, 61, 56], [53, 56, 58, 61, 66, 71, 76, 76, 76, 76, 75, 75, 73, 72, 70, 69, 67, 62, 37, 51], [55, 59, 61, 63, 64, 64, 66, 66, 67, 67, 67, 67, 66, 65, 62, 60, 52, 50, 55, 56], [52, 54, 56, 57, 56, 55, 56, 55, 53, 54, 52, 52, 50, 49, 43, 31, 45, 48, 44, 28], [46, 47, 48, 47, 43, 44, 48, 49, 49, 48, 49, 47, 46, 45, 39, 28, 38, 42, 34, 34], [53, 57, 59, 61, 61, 61, 62, 62, 62, 61, 61, 60, 57, 55, 45, 45, 55, 54, 46, 46], [51, 54, 57, 59, 61, 62, 61, 61, 61, 60, 59, 59, 57, 55, 45, 46, 55, 52, 47, 42], [45, 48, 51, 52, 54, 55, 57, 56, 58, 59, 59, 59, 59, 57, 51, 47, 56, 48, 51, 47], [60, 59, 58, 56, 60, 63, 63, 44, 60, 60, 54, 53, 46, 40, 43, 44, 41, 40, 44, 47], [67, 73, 79, 82, 87, 88, 89, 92, 93, 93, 92, 91, 89, 87, 86, 85, 81, 76, 60, 44], [69, 77, 82, 86, 89, 92, 94, 94, 93, 93, 94, 93, 92, 92, 90, 88, 84, 80, 73, 66], [73, 78, 82, 86, 90, 92, 92, 90, 90, 92, 91, 91, 91, 90, 90, 88, 87, 86, 83, 80], [74, 78, 81, 83, 86, 88, 89, 89, 90, 89, 90, 89, 89, 88, 88, 87, 85, 84, 79, 72], [66, 74, 79, 82, 86, 88, 87, 84, 86, 87, 87, 88, 88, 87, 86, 84, 82, 80, 74, 68], [80, 83, 85, 87, 90, 90, 91, 90, 89, 90, 90, 90, 89, 89, 88, 87, 85, 83, 79, 76], [56, 56, 63, 68, 74, 77, 74, 67, 69, 69, 68, 68, 68, 68, 67, 65, 63, 62, 59, 55], [71, 73, 74, 75, 75, 75, 73, 74, 73, 75, 72, 72, 72, 71, 67, 71, 67, 65, 63, 60], [65, 68, 70, 70, 71, 76, 77, 79, 79, 80, 80, 80, 80, 80, 79, 78, 76, 75, 72, 68], [65, 70, 73, 76, 81, 83, 86, 87, 88, 89, 89, 88, 87, 87, 86, 85, 84, 83, 79, 76], [67, 73, 77, 80, 83, 83, 85, 86, 85, 84, 84, 84, 84, 83, 82, 81, 79, 78, 74, 72], [66, 70, 73, 77, 81, 80, 83, 86, 86, 84, 86, 85, 85, 84, 84, 83, 82, 80, 74, 68], [64, 69, 72, 76, 83, 88, 93, 93, 93, 93, 92, 92, 90, 88, 86, 85, 84, 80, 54, 66], [71, 76, 79, 81, 83, 83, 85, 85, 87, 87, 86, 85, 84, 82, 78, 74, 62, 70, 73, 71], [69, 72, 74, 75, 76, 76, 75, 73, 72, 69, 67, 64, 64, 61, 47, 51, 62, 64, 58, 50], [65, 67, 67, 66, 63, 64, 68, 69, 70, 71, 70, 69, 68, 67, 61, 44, 61, 64, 55, 55], [70, 74, 77, 79, 81, 81, 81, 80, 81, 81, 81, 81, 79, 77, 69, 61, 75, 75, 65, 67], [70, 73, 75, 77, 79, 80, 80, 79, 80, 78, 78, 76, 74, 72, 60, 64, 71, 69, 63, 58], [64, 68, 72, 74, 76, 77, 77, 74, 75, 75, 75, 75, 75, 75, 71, 67, 69, 66, 65, 59], [54, 54, 53, 50, 43, 45, 53, 42, 41, 37, 38, 44, 34, 43, 47, 41, 46, 45, 44, 45], [68, 72, 74, 75, 77, 77, 76, 75, 74, 75, 73, 72, 72, 71, 70, 68, 64, 61, 62, 63], [65, 67, 68, 67, 63, 60, 62, 61, 60, 56, 58, 56, 59, 58, 57, 56, 54, 55, 52, 50], [68, 70, 71, 72, 71, 70, 70, 70, 69, 68, 68, 68, 67, 66, 63, 60, 53, 52, 52, 47], [70, 72, 73, 73, 74, 75, 76, 76, 77, 77, 77, 77, 75, 74, 71, 68, 59, 55, 63, 63], [65, 66, 67, 67, 67, 67, 67, 69, 70, 70, 70, 70, 69, 68, 67, 66, 62, 54, 52, 57], [54, 56, 58, 59, 60, 61, 60, 58, 53, 53, 55, 55, 53, 53, 50, 48, 42, 32, 38, 41], [46, 48, 50, 49, 45, 44, 44, 36, 37, 38, 40, 39, 38, 37, 38, 32, 35, 32, 19, 24], [54, 54, 54, 55, 56, 57, 54, 50, 47, 48, 48, 48, 48, 45, 45, 42, 39, 34, 34, 40], [62, 64, 65, 65, 66, 67, 66, 67, 67, 67, 67, 66, 66, 65, 63, 62, 58, 55, 46, 38], [62, 63, 64, 64, 63, 62, 60, 60, 60, 60, 60, 59, 57, 55, 49, 31, 50, 52, 46, 43], [60, 61, 62, 63, 63, 63, 61, 61, 62, 61, 61, 60, 58, 56, 51, 44, 42, 47, 44, 36], [55, 56, 57, 58, 58, 58, 56, 56, 55, 55, 54, 52, 52, 50, 46, 42, 34, 38, 42, 40], [51, 52, 52, 52, 52, 51, 51, 51, 52, 53, 52, 52, 52, 52, 50, 49, 46, 46, 42, 10], [47, 49, 50, 51, 51, 50, 51, 51, 51, 50, 49, 48, 47, 45, 41, 38, 31, 36, 37, 34], [36, 37, 38, 38, 37, 37, 37, 36, 38, 37, 38, 38, 36, 33, 31, 30, 25, 22, 24, 23], [25, 26, 27, 27, 29, 28, 26, 29, 28, 26, 21, 23, 23, 20, 16, 16, 15, 21, 17, 18], [34, 35, 36, 37, 37, 36, 34, 35, 36, 36, 36, 35, 34, 34, 31, 28, 23, 20, 19, 20], [34, 35, 36, 36, 36, 37, 36, 35, 36, 34, 33, 32, 30, 24, 24, 27, 28, 27, 19, 18], [29, 31, 32, 32, 31, 31, 29, 33, 33, 30, 29, 31, 30, 30, 26, 27, 26, 16, 15, 19], [53, 60, 62, 64, 63, 58, 59, 56, 47, 56, 50, 56, 50, 53, 50, 48, 50, 41, 48, 44], [62, 69, 74, 78, 83, 85, 86, 84, 82, 83, 81, 81, 80, 79, 78, 76, 71, 68, 71, 70], [57, 62, 70, 74, 76, 72, 70, 69, 68, 64, 63, 64, 65, 65, 64, 63, 63, 62, 61, 59], [68, 74, 77, 79, 81, 81, 78, 78, 78, 76, 76, 75, 74, 73, 71, 68, 61, 58, 61, 58], [71, 76, 80, 82, 83, 84, 86, 86, 88, 87, 87, 86, 85, 84, 82, 79, 68, 66, 74, 74], [64, 70, 74, 77, 78, 78, 78, 79, 81, 81, 80, 80, 80, 79, 78, 76, 72, 66, 60, 67], [66, 68, 69, 70, 71, 72, 73, 72, 68, 65, 66, 66, 65, 65, 64, 62, 59, 54, 41, 50], [57, 59, 61, 61, 61, 57, 57, 53, 51, 53, 51, 53, 54, 50, 50, 49, 45, 40, 31, 29], [64, 67, 68, 68, 69, 70, 70, 67, 60, 61, 62, 62, 62, 59, 58, 57, 53, 50, 47, 52], [68, 73, 76, 78, 80, 81, 82, 82, 83, 83, 82, 82, 81, 80, 79, 77, 74, 70, 63, 57], [70, 75, 77, 78, 79, 79, 75, 75, 76, 75, 75, 74, 73, 71, 64, 53, 65, 66, 58, 57], [71, 75, 77, 78, 79, 80, 79, 78, 79, 79, 78, 78, 76, 74, 70, 64, 56, 63, 61, 55], [66, 71, 73, 75, 76, 77, 76, 72, 75, 73, 73, 73, 72, 71, 69, 65, 59, 42, 56, 56], [64, 68, 71, 72, 73, 73, 71, 71, 70, 71, 72, 72, 72, 72, 71, 70, 68, 67, 62, 49], [61, 65, 68, 70, 73, 73, 73, 74, 73, 73, 73, 72, 71, 69, 67, 63, 52, 51, 57, 54], [59, 61, 61, 61, 61, 62, 63, 63, 63, 63, 62, 62, 60, 59, 56, 53, 48, 29, 52, 49], [54, 56, 56, 56, 55, 53, 51, 54, 52, 52, 52, 51, 50, 49, 48, 45, 40, 38, 42, 39], [58, 61, 63, 63, 62, 61, 61, 62, 62, 62, 62, 61, 60, 58, 55, 52, 43, 44, 46, 45], [60, 64, 67, 68, 69, 69, 68, 67, 67, 66, 65, 64, 62, 60, 54, 48, 53, 55, 53, 43], [48, 55, 60, 62, 63, 63, 64, 64, 63, 62, 62, 62, 61, 60, 56, 56, 56, 46, 44, 35], [59, 67, 71, 73, 73, 68, 66, 67, 48, 65, 55, 66, 55, 63, 58, 53, 59, 47, 49, 54], [74, 80, 85, 88, 93, 95, 95, 93, 91, 92, 91, 91, 89, 89, 87, 85, 79, 77, 79, 77], [70, 73, 79, 84, 86, 83, 77, 80, 73, 65, 65, 65, 59, 64, 65, 68, 71, 72, 71, 69], [72, 80, 84, 87, 90, 91, 89, 90, 89, 87, 86, 85, 84, 82, 79, 74, 66, 63, 66, 64], [81, 86, 89, 91, 92, 93, 95, 96, 96, 96, 95, 94, 93, 92, 90, 87, 75, 75, 83, 83], [71, 78, 83, 86, 88, 88, 88, 88, 90, 90, 90, 89, 89, 88, 87, 86, 82, 77, 67, 75], [75, 78, 79, 81, 83, 84, 84, 83, 79, 79, 77, 78, 76, 74, 72, 69, 66, 61, 59, 62], [68, 70, 71, 70, 70, 69, 65, 67, 62, 65, 65, 66, 65, 64, 62, 60, 57, 53, 31, 47], [73, 77, 79, 80, 80, 81, 82, 78, 73, 75, 75, 74, 73, 72, 71, 68, 64, 60, 58, 61], [78, 83, 87, 89, 91, 92, 93, 93, 94, 94, 93, 93, 92, 91, 89, 87, 84, 80, 74, 69], [80, 85, 88, 89, 90, 90, 87, 87, 87, 87, 87, 85, 84, 82, 75, 67, 75, 77, 67, 66], [82, 86, 88, 89, 91, 91, 90, 89, 91, 91, 90, 89, 87, 86, 81, 74, 67, 74, 71, 65], [78, 82, 85, 87, 89, 90, 91, 86, 87, 83, 85, 84, 84, 82, 80, 76, 69, 55, 66, 67], [75, 81, 84, 85, 85, 85, 83, 82, 82, 84, 84, 85, 85, 85, 85, 84, 81, 79, 72, 59], [74, 79, 82, 85, 87, 87, 87, 87, 87, 86, 84, 84, 82, 81, 78, 75, 64, 60, 67, 64], [73, 75, 76, 76, 76, 78, 78, 77, 77, 76, 76, 75, 73, 71, 67, 65, 61, 53, 63, 61], [68, 70, 70, 70, 68, 66, 67, 69, 69, 68, 67, 68, 66, 65, 64, 60, 53, 53, 56, 51], [72, 76, 78, 78, 78, 77, 78, 79, 79, 79, 79, 77, 75, 74, 70, 67, 56, 58, 61, 62], [75, 79, 82, 83, 84, 84, 83, 83, 83, 83, 82, 81, 79, 77, 71, 55, 67, 69, 67, 55], [63, 71, 76, 79, 80, 80, 81, 81, 81, 81, 81, 81, 79, 78, 74, 73, 73, 65, 61, 52], [59, 63, 66, 67, 65, 61, 57, 44, 54, 53, 52, 53, 53, 51, 51, 48, 47, 50, 43, 39], [60, 62, 68, 70, 72, 74, 70, 70, 71, 69, 68, 68, 67, 65, 62, 58, 58, 50, 44, 42], [69, 73, 75, 76, 78, 79, 79, 78, 75, 73, 68, 67, 63, 58, 48, 43, 21, 36, 40, 43], [65, 69, 71, 71, 71, 72, 73, 73, 74, 74, 74, 73, 71, 69, 67, 65, 65, 62, 58, 56], [57, 59, 62, 64, 65, 64, 68, 71, 70, 71, 72, 71, 70, 68, 65, 62, 51, 53, 57, 55], [60, 62, 61, 57, 55, 60, 64, 65, 61, 62, 62, 61, 60, 59, 57, 55, 49, 45, 51, 52], [58, 61, 63, 66, 68, 69, 71, 71, 71, 71, 70, 69, 67, 64, 51, 60, 68, 66, 58, 59], [48, 52, 56, 60, 64, 63, 61, 60, 59, 59, 57, 55, 53, 53, 48, 41, 38, 27, 35, 37], [54, 56, 58, 57, 54, 53, 56, 54, 52, 48, 51, 51, 50, 47, 41, 41, 47, 48, 40, 42], [52, 53, 50, 42, 48, 52, 51, 51, 52, 54, 54, 53, 52, 51, 48, 46, 45, 45, 33, 34], [51, 53, 53, 55, 56, 57, 56, 55, 50, 46, 47, 49, 47, 47, 45, 44, 41, 38, 31, 21], [53, 56, 57, 57, 56, 52, 46, 33, 43, 41, 44, 47, 46, 45, 43, 41, 29, 20, 26, 26], [51, 52, 54, 56, 59, 59, 60, 60, 60, 61, 58, 60, 59, 58, 54, 51, 34, 32, 36, 41], [50, 54, 56, 57, 58, 58, 58, 58, 58, 59, 58, 57, 54, 50, 47, 49, 50, 48, 42, 39], [37, 42, 45, 46, 46, 45, 44, 44, 46, 46, 45, 44, 45, 44, 39, 36, 38, 28, 37, 36], [39, 42, 43, 44, 44, 43, 44, 45, 45, 45, 44, 44, 41, 37, 36, 39, 35, 39, 34, 29], [32, 33, 33, 30, 11, 20, 22, 21, 20, 25, 23, 20, 23, 10, 20, 11, 13, 18, 12, 9], [24, 23, 22, 22, 26, 28, 26, 25, 20, 23, 24, 22, 19, 17, 10, 18, 13, 20, 17, 7], [26, 30, 32, 34, 31, 27, 29, 32, 28, 27, 27, 13, 31, 30, 28, 21, 19, 26, 8, 12], [31, 33, 30, 19, 30, 13, 30, 29, 31, 26, 24, 25, 26, 23, 24, 23, 11, 22, 13, 0], [55, 63, 71, 75, 77, 73, 73, 45, 68, 65, 60, 60, 63, 64, 62, 62, 61, 58, 54, 54], [69, 71, 70, 77, 84, 85, 84, 82, 84, 82, 81, 80, 80, 78, 76, 73, 67, 59, 44, 50], [74, 81, 85, 87, 89, 90, 90, 90, 88, 84, 80, 77, 72, 66, 62, 54, 46, 33, 54, 59], [72, 79, 82, 84, 83, 83, 85, 86, 86, 86, 86, 86, 85, 84, 82, 80, 78, 74, 69, 63], [70, 71, 73, 76, 80, 79, 82, 84, 85, 85, 86, 86, 85, 84, 82, 79, 69, 64, 72, 68], [69, 75, 78, 77, 71, 73, 80, 81, 78, 78, 78, 77, 76, 76, 74, 73, 68, 63, 66, 67], [68, 74, 77, 79, 84, 86, 87, 87, 87, 86, 85, 85, 83, 80, 68, 72, 82, 80, 70, 71], [63, 67, 70, 73, 79, 81, 78, 78, 76, 76, 74, 70, 71, 70, 66, 59, 43, 49, 53, 54], [67, 72, 76, 77, 76, 75, 76, 75, 71, 69, 70, 69, 67, 64, 56, 56, 62, 64, 57, 61], [68, 73, 75, 73, 48, 70, 72, 72, 72, 73, 74, 74, 73, 72, 69, 66, 64, 65, 57, 52], [67, 72, 74, 74, 75, 77, 77, 75, 71, 66, 65, 68, 65, 67, 64, 62, 59, 57, 49, 40], [67, 73, 76, 77, 76, 73, 68, 62, 65, 59, 51, 62, 55, 52, 55, 50, 44, 43, 50, 53], [68, 72, 73, 75, 81, 83, 82, 82, 84, 85, 79, 85, 84, 82, 78, 77, 68, 60, 63, 58], [69, 74, 78, 81, 83, 83, 83, 83, 82, 83, 82, 80, 76, 67, 71, 69, 76, 70, 65, 62], [60, 62, 68, 72, 73, 73, 72, 71, 71, 70, 69, 68, 67, 64, 57, 59, 62, 61, 58, 60], [63, 68, 70, 71, 73, 73, 73, 73, 73, 73, 72, 70, 66, 57, 67, 69, 63, 66, 60, 52], [64, 67, 68, 68, 63, 56, 56, 57, 56, 58, 56, 54, 49, 40, 53, 52, 50, 42, 36, 40], [46, 50, 51, 43, 54, 56, 55, 55, 53, 51, 35, 38, 46, 50, 51, 37, 56, 49, 45, 44], [41, 52, 58, 58, 54, 55, 56, 58, 52, 51, 57, 59, 58, 54, 50, 50, 54, 50, 19, 44], [65, 70, 72, 73, 74, 74, 73, 72, 71, 70, 61, 66, 70, 63, 70, 68, 61, 66, 62, 55], [69, 73, 78, 82, 86, 84, 79, 61, 73, 61, 64, 53, 67, 67, 66, 67, 65, 64, 61, 57], [78, 82, 82, 84, 90, 92, 89, 86, 89, 88, 86, 86, 85, 84, 81, 79, 73, 66, 35, 56], [79, 85, 89, 91, 94, 95, 95, 93, 92, 87, 83, 81, 76, 70, 67, 61, 52, 29, 58, 63], [75, 82, 86, 87, 88, 89, 90, 91, 91, 91, 92, 92, 91, 90, 89, 88, 84, 81, 73, 67], [76, 78, 77, 77, 83, 85, 87, 89, 89, 89, 91, 90, 89, 88, 86, 83, 74, 71, 76, 73], [75, 80, 83, 84, 76, 78, 84, 86, 82, 80, 80, 80, 80, 79, 78, 76, 73, 68, 70, 72], [72, 78, 82, 84, 89, 92, 93, 93, 93, 92, 91, 91, 89, 86, 74, 78, 87, 86, 76, 76], [66, 70, 74, 78, 85, 87, 85, 85, 83, 84, 82, 80, 80, 76, 71, 66, 55, 53, 60, 62], [71, 78, 81, 83, 83, 82, 82, 81, 77, 78, 76, 76, 74, 70, 62, 63, 69, 70, 63, 66], [74, 79, 82, 81, 71, 75, 79, 78, 80, 81, 83, 83, 82, 81, 79, 75, 71, 70, 61, 58], [73, 78, 80, 81, 82, 84, 84, 83, 80, 78, 77, 80, 77, 78, 75, 75, 69, 67, 57, 53], [71, 78, 82, 83, 81, 79, 72, 58, 59, 66, 66, 68, 58, 61, 57, 47, 50, 51, 58, 59], [73, 77, 77, 78, 87, 90, 85, 86, 91, 92, 84, 90, 89, 87, 82, 82, 74, 63, 67, 65], [73, 79, 84, 87, 90, 90, 90, 89, 90, 89, 88, 87, 82, 72, 77, 75, 83, 77, 69, 66], [65, 68, 74, 78, 81, 81, 80, 80, 80, 79, 80, 79, 77, 74, 68, 69, 70, 70, 66, 68], [71, 76, 79, 80, 81, 81, 81, 82, 82, 82, 81, 80, 75, 65, 75, 77, 70, 75, 69, 63], [73, 76, 77, 77, 71, 65, 65, 64, 65, 65, 63, 61, 54, 51, 58, 56, 57, 51, 41, 46], [60, 60, 58, 52, 53, 61, 58, 61, 57, 48, 56, 56, 61, 59, 58, 37, 64, 53, 51, 51], [60, 57, 62, 64, 64, 67, 67, 68, 63, 68, 69, 68, 71, 67, 42, 53, 64, 62, 46, 56], [73, 78, 80, 81, 81, 82, 80, 80, 78, 77, 68, 72, 76, 71, 77, 74, 68, 72, 68, 61], [62, 67, 71, 73, 73, 73, 76, 76, 77, 78, 78, 77, 72, 62, 56, 48, 40, 43, 46, 45], [69, 70, 71, 71, 71, 70, 71, 68, 69, 70, 69, 67, 64, 60, 48, 50, 57, 56, 42, 37], [66, 70, 72, 73, 73, 72, 74, 74, 73, 72, 70, 69, 67, 66, 61, 56, 58, 61, 60, 50], [66, 70, 71, 71, 67, 56, 63, 67, 58, 54, 61, 58, 58, 58, 58, 57, 53, 50, 50, 46], [68, 71, 71, 68, 68, 66, 66, 65, 68, 68, 68, 67, 66, 65, 62, 59, 55, 48, 46, 48], [56, 53, 55, 65, 71, 73, 73, 70, 71, 69, 68, 66, 63, 60, 48, 52, 59, 59, 50, 43], [53, 56, 59, 62, 63, 64, 64, 64, 63, 63, 62, 62, 61, 60, 58, 56, 51, 43, 36, 33], [38, 37, 38, 41, 45, 42, 42, 43, 44, 44, 43, 38, 27, 26, 38, 39, 35, 30, 26, 23], [50, 53, 53, 53, 53, 52, 53, 51, 49, 49, 48, 45, 41, 34, 23, 36, 40, 38, 31, 25], [55, 56, 57, 57, 56, 55, 54, 54, 53, 52, 51, 51, 49, 47, 42, 33, 34, 29, 34, 33], [48, 50, 53, 55, 56, 52, 54, 53, 51, 50, 47, 41, 40, 47, 49, 45, 42, 45, 37, 37], [44, 46, 44, 39, 34, 42, 33, 40, 34, 31, 20, 25, 30, 33, 35, 33, 30, 30, 17, 18], [36, 38, 37, 36, 34, 32, 31, 33, 29, 27, 26, 31, 38, 41, 40, 37, 35, 31, 13, 31], [33, 37, 38, 39, 41, 40, 40, 40, 40, 38, 35, 30, 20, 33, 33, 21, 28, 15, 3, 21], [26, 30, 32, 33, 32, 33, 30, 31, 30, 31, 29, 24, 22, 25, 24, 19, 12, 21, 19, 17], [21, 24, 23, 16, 26, 32, 29, 26, 27, 25, 22, 19, 20, 16, 23, 25, 8, 24, 9, 9], [18, 14, 20, 21, 20, 21, 20, 18, 18, 21, 19, 21, 17, 10, 19, 17, 17, 19, 16, 0], [26, 27, 26, 28, 27, 28, 15, 26, 21, 19, 18, 14, 22, 23, 22, 22, 0, 13, 17, 12], [27, 24, 24, 24, 27, 18, 18, 21, 18, 26, 27, 29, 23, 16, 18, 15, 24, 19, 17, 5], [33, 32, 33, 34, 31, 26, 30, 28, 26, 23, 25, 26, 27, 28, 25, 22, 17, 17, 9, 11], [66, 72, 76, 79, 84, 84, 85, 86, 88, 89, 88, 87, 81, 76, 69, 59, 48, 45, 43, 46], [69, 78, 81, 83, 83, 82, 84, 83, 83, 85, 83, 82, 80, 77, 66, 65, 74, 73, 54, 55], [73, 76, 80, 83, 85, 85, 85, 86, 84, 83, 81, 79, 78, 77, 73, 67, 66, 71, 72, 66], [65, 75, 80, 82, 82, 77, 71, 78, 74, 73, 77, 76, 74, 73, 71, 68, 63, 60, 60, 59], [70, 78, 83, 84, 81, 80, 77, 78, 80, 81, 81, 80, 79, 77, 75, 72, 68, 64, 59, 58], [68, 73, 72, 60, 83, 87, 88, 86, 86, 84, 82, 81, 79, 76, 68, 55, 71, 73, 66, 60], [61, 69, 73, 76, 81, 82, 82, 82, 82, 80, 80, 80, 79, 77, 75, 74, 69, 63, 49, 53], [61, 62, 59, 59, 63, 64, 63, 66, 63, 62, 59, 57, 52, 42, 56, 57, 52, 47, 43, 45], [62, 71, 75, 77, 76, 76, 75, 73, 70, 71, 70, 68, 65, 60, 41, 51, 58, 58, 49, 45], [69, 77, 80, 81, 82, 80, 79, 79, 77, 76, 75, 74, 71, 69, 64, 61, 54, 44, 48, 50], [68, 73, 75, 78, 82, 81, 80, 79, 78, 78, 77, 73, 64, 61, 70, 68, 53, 67, 55, 52], [66, 72, 73, 71, 65, 66, 68, 70, 66, 61, 58, 50, 38, 53, 56, 54, 44, 48, 28, 33], [61, 68, 74, 77, 78, 77, 77, 78, 76, 76, 74, 72, 65, 58, 50, 66, 69, 65, 62, 45], [60, 68, 74, 76, 78, 79, 80, 79, 79, 79, 77, 76, 72, 69, 68, 67, 62, 64, 59, 48], [52, 49, 62, 67, 69, 70, 69, 70, 71, 70, 69, 68, 64, 60, 53, 47, 59, 60, 52, 44], [55, 60, 63, 65, 65, 64, 63, 64, 64, 63, 61, 58, 38, 53, 56, 58, 46, 54, 47, 36], [42, 44, 48, 52, 54, 57, 59, 58, 57, 56, 54, 52, 43, 39, 45, 49, 47, 38, 37, 26], [47, 49, 49, 48, 48, 46, 22, 48, 41, 49, 48, 49, 43, 36, 43, 48, 29, 27, 27, 0], [53, 55, 53, 49, 47, 52, 50, 52, 54, 53, 52, 53, 47, 30, 39, 36, 36, 38, 34, 24], [48, 56, 59, 61, 60, 58, 57, 57, 56, 54, 49, 43, 47, 53, 49, 49, 46, 37, 33, 30], [68, 74, 80, 85, 90, 91, 92, 94, 96, 95, 95, 94, 87, 82, 76, 68, 57, 40, 48, 41], [80, 87, 89, 90, 90, 91, 94, 92, 92, 93, 91, 90, 88, 85, 74, 71, 82, 81, 62, 63], [82, 85, 88, 91, 93, 93, 93, 94, 92, 90, 88, 87, 86, 85, 80, 73, 75, 80, 79, 70], [75, 84, 89, 91, 89, 85, 80, 85, 77, 78, 79, 76, 75, 75, 74, 72, 70, 68, 67, 66], [78, 86, 90, 92, 88, 87, 84, 85, 89, 88, 88, 88, 86, 85, 82, 79, 73, 69, 66, 66], [77, 81, 80, 65, 91, 96, 97, 95, 95, 94, 92, 90, 88, 85, 75, 68, 81, 81, 71, 67], [70, 78, 82, 85, 90, 91, 91, 90, 89, 89, 88, 88, 86, 84, 82, 81, 77, 69, 59, 56], [70, 72, 69, 70, 72, 75, 75, 78, 75, 75, 72, 69, 61, 49, 67, 68, 62, 57, 47, 51], [75, 83, 87, 87, 87, 87, 86, 85, 83, 82, 80, 78, 74, 69, 46, 62, 68, 67, 57, 51], [80, 88, 92, 93, 94, 92, 91, 91, 90, 89, 88, 87, 84, 81, 77, 73, 57, 64, 64, 63], [79, 84, 87, 91, 95, 93, 92, 90, 90, 90, 89, 86, 77, 70, 81, 80, 71, 79, 68, 66], [77, 82, 83, 81, 77, 77, 78, 78, 76, 74, 72, 69, 58, 58, 65, 68, 60, 61, 53, 36], [74, 79, 85, 88, 89, 88, 88, 89, 89, 89, 86, 85, 79, 72, 64, 79, 81, 72, 73, 64], [74, 82, 87, 90, 92, 93, 93, 92, 92, 92, 90, 89, 85, 82, 81, 80, 77, 77, 70, 61], [71, 70, 77, 81, 82, 83, 83, 84, 84, 82, 81, 79, 76, 73, 67, 67, 74, 73, 52, 63], [72, 77, 80, 81, 81, 80, 78, 80, 79, 78, 76, 74, 57, 67, 71, 71, 47, 67, 61, 53], [58, 60, 64, 65, 65, 70, 72, 72, 71, 70, 67, 66, 58, 54, 60, 63, 57, 47, 45, 42], [66, 66, 64, 60, 59, 63, 56, 63, 57, 66, 66, 69, 65, 53, 64, 68, 50, 50, 48, 33], [69, 73, 72, 70, 72, 73, 70, 73, 74, 74, 76, 75, 69, 60, 61, 58, 60, 61, 50, 48], [71, 75, 76, 77, 75, 72, 70, 70, 70, 70, 66, 62, 62, 67, 61, 61, 55, 53, 50, 43], [63, 70, 73, 74, 78, 80, 78, 76, 75, 78, 75, 73, 73, 73, 71, 70, 67, 65, 63, 57], [72, 74, 71, 60, 45, 51, 66, 64, 69, 66, 65, 65, 66, 65, 64, 62, 56, 52, 50, 47], [66, 68, 66, 61, 59, 64, 70, 66, 71, 70, 70, 70, 69, 68, 65, 63, 60, 53, 42, 53], [62, 66, 67, 66, 68, 68, 68, 69, 69, 69, 69, 68, 67, 66, 63, 59, 38, 55, 56, 51], [51, 51, 53, 60, 65, 66, 64, 64, 64, 63, 63, 62, 60, 59, 53, 44, 45, 47, 42, 50], [51, 49, 44, 39, 51, 56, 56, 53, 49, 46, 45, 47, 40, 30, 33, 37, 42, 39, 44, 43], [50, 50, 53, 56, 59, 57, 60, 58, 56, 56, 56, 54, 50, 44, 36, 46, 46, 38, 50, 43], [49, 51, 48, 45, 48, 45, 46, 48, 47, 46, 46, 44, 41, 39, 32, 33, 28, 30, 32, 33], [40, 42, 42, 44, 45, 46, 45, 45, 43, 42, 42, 39, 36, 31, 30, 34, 26, 31, 34, 28], [31, 37, 41, 43, 46, 46, 47, 46, 44, 43, 40, 33, 27, 36, 40, 38, 18, 38, 32, 19], [31, 31, 32, 32, 33, 33, 28, 30, 30, 30, 31, 27, 27, 31, 33, 21, 23, 24, 9, 18], [30, 24, 18, 15, 10, 25, 28, 30, 26, 20, 26, 26, 17, 13, 16, 13, 16, 21, 21, 8], [32, 35, 35, 35, 35, 34, 34, 32, 33, 29, 27, 18, 19, 12, 7, 27, 23, 23, 23, 20], [25, 21, 20, 22, 21, 17, 24, 24, 23, 23, 23, 14, 22, 24, 15, 14, 15, 19, 0, 5], [25, 21, 14, 5, 19, 20, 15, 22, 14, 20, 12, 23, 25, 24, 22, 9, 17, 12, 14, 14], [10, 15, 15, 20, 21, 19, 20, 13, 19, 19, 10, 21, 16, 3, 17, 13, 10, 0, 16, 17], [20, 17, 16, 10, 12, 24, 16, 15, 9, 9, 8, 10, 3, 13, 3, 4, 5, 5, 12, 7], [21, 16, 12, 21, 19, 17, 20, 16, 18, 20, 14, 9, 13, 4, 13, 0, 16, 0, 9, 9], [16, 22, 26, 26, 21, 23, 25, 24, 24, 25, 22, 23, 15, 14, 15, 14, 18, 13, 8, 7], [8, 14, 13, 13, 10, 16, 15, 13, 16, 13, 8, 6, 11, 16, 7, 5, 9, 7, 6, 8], [55, 68, 77, 82, 84, 89, 88, 87, 84, 87, 84, 84, 83, 82, 81, 79, 76, 74, 69, 63], [68, 79, 85, 85, 72, 65, 75, 79, 79, 78, 76, 77, 77, 76, 75, 72, 67, 62, 59, 59], [64, 75, 80, 80, 66, 71, 81, 76, 82, 80, 80, 80, 79, 78, 76, 74, 71, 66, 54, 64], [64, 72, 77, 78, 79, 79, 81, 81, 81, 81, 81, 80, 79, 77, 75, 71, 50, 65, 67, 60], [54, 61, 63, 65, 75, 78, 77, 77, 77, 77, 77, 76, 75, 74, 70, 64, 50, 61, 55, 62], [61, 66, 66, 64, 60, 69, 72, 68, 67, 69, 70, 68, 65, 62, 53, 33, 53, 52, 55, 56], [58, 67, 68, 70, 77, 78, 79, 79, 76, 76, 76, 75, 73, 69, 58, 61, 64, 58, 65, 59], [63, 68, 70, 70, 66, 69, 66, 68, 68, 67, 66, 64, 61, 58, 50, 49, 42, 46, 50, 52], [48, 60, 65, 67, 69, 68, 69, 69, 67, 65, 65, 64, 61, 57, 49, 55, 52, 52, 57, 49], [51, 44, 60, 66, 71, 74, 74, 76, 74, 73, 70, 67, 60, 52, 61, 63, 55, 60, 58, 46], [44, 51, 58, 61, 62, 64, 62, 62, 61, 62, 63, 62, 56, 47, 59, 56, 56, 50, 41, 37], [51, 52, 41, 52, 57, 57, 59, 60, 55, 56, 53, 53, 48, 43, 38, 31, 39, 45, 41, 24], [54, 62, 64, 65, 64, 64, 64, 64, 64, 62, 60, 57, 48, 39, 49, 47, 52, 47, 42, 40], [54, 59, 62, 62, 63, 61, 60, 57, 55, 53, 50, 48, 40, 45, 48, 40, 52, 41, 42, 20], [50, 56, 63, 64, 64, 63, 59, 60, 63, 63, 58, 56, 48, 47, 51, 49, 49, 41, 39, 34], [53, 58, 62, 62, 61, 60, 60, 61, 59, 59, 58, 55, 46, 36, 42, 50, 51, 37, 39, 26], [40, 50, 55, 55, 49, 58, 60, 54, 50, 43, 38, 45, 34, 37, 38, 36, 37, 20, 26, 9], [42, 47, 38, 47, 49, 46, 51, 49, 48, 42, 41, 42, 39, 33, 42, 35, 39, 30, 25, 23], [41, 49, 51, 51, 53, 53, 51, 52, 50, 47, 44, 45, 49, 50, 41, 37, 45, 39, 37, 27], [41, 47, 46, 42, 44, 41, 36, 32, 26, 27, 29, 30, 26, 29, 16, 36, 25, 17, 23, 19], [69, 87, 93, 96, 97, 102, 101, 99, 97, 97, 96, 96, 95, 94, 92, 90, 86, 83, 78, 70], [83, 93, 98, 96, 84, 81, 83, 88, 85, 86, 82, 83, 84, 83, 82, 80, 75, 67, 69, 69], [78, 89, 92, 91, 68, 85, 91, 84, 93, 94, 94, 94, 92, 91, 88, 86, 82, 76, 66, 75], [78, 86, 91, 92, 92, 92, 94, 95, 94, 94, 94, 94, 92, 91, 88, 84, 63, 77, 75, 72], [73, 78, 76, 76, 87, 89, 87, 86, 85, 84, 83, 83, 82, 80, 76, 70, 61, 68, 53, 70], [74, 79, 78, 74, 74, 81, 85, 82, 67, 71, 78, 75, 72, 68, 59, 53, 64, 60, 65, 65], [66, 75, 77, 83, 91, 92, 94, 93, 90, 88, 86, 84, 82, 78, 69, 71, 74, 68, 77, 66], [77, 82, 85, 86, 78, 83, 83, 83, 82, 83, 82, 81, 78, 74, 65, 63, 60, 63, 68, 65], [70, 73, 82, 85, 84, 83, 85, 86, 81, 80, 81, 79, 74, 71, 62, 65, 57, 67, 68, 58], [76, 73, 77, 82, 86, 89, 88, 90, 89, 88, 86, 84, 77, 63, 76, 78, 63, 78, 71, 54], [67, 71, 76, 77, 79, 81, 74, 73, 75, 75, 75, 73, 71, 71, 76, 76, 63, 55, 59, 54], [72, 74, 69, 57, 68, 70, 78, 79, 75, 77, 74, 72, 67, 65, 58, 53, 59, 70, 54, 52], [75, 80, 81, 80, 79, 79, 80, 81, 80, 79, 77, 76, 69, 60, 64, 63, 65, 64, 57, 57], [70, 75, 78, 80, 80, 77, 79, 81, 79, 81, 78, 76, 68, 61, 62, 64, 57, 68, 41, 53], [68, 78, 84, 86, 86, 85, 83, 81, 84, 81, 78, 77, 71, 47, 71, 70, 75, 67, 61, 52], [78, 82, 85, 85, 84, 83, 83, 85, 82, 81, 79, 75, 64, 54, 64, 68, 72, 64, 60, 49], [63, 75, 81, 80, 76, 83, 85, 78, 72, 76, 56, 66, 61, 43, 58, 55, 59, 50, 50, 44], [73, 76, 69, 76, 73, 73, 77, 74, 75, 71, 68, 66, 68, 68, 69, 64, 61, 48, 42, 45], [71, 77, 78, 77, 80, 81, 76, 81, 80, 79, 75, 69, 65, 73, 56, 68, 68, 58, 43, 52], [69, 73, 73, 72, 72, 66, 68, 71, 71, 69, 62, 57, 56, 54, 56, 62, 47, 52, 34, 20], [67, 71, 75, 76, 75, 73, 69, 67, 71, 67, 67, 66, 66, 64, 60, 58, 47, 28, 35, 25], [73, 75, 76, 78, 79, 79, 80, 81, 81, 81, 80, 80, 78, 77, 75, 72, 68, 61, 54, 59], [71, 74, 74, 74, 70, 68, 71, 69, 70, 70, 69, 68, 67, 65, 60, 55, 29, 46, 52, 50], [66, 66, 65, 68, 72, 72, 70, 68, 65, 64, 63, 61, 59, 56, 53, 52, 40, 47, 49, 24], [50, 52, 49, 47, 49, 44, 47, 36, 32, 49, 50, 49, 47, 46, 43, 35, 38, 41, 31, 35], [55, 56, 55, 54, 55, 56, 56, 53, 53, 50, 49, 48, 45, 43, 37, 28, 37, 38, 18, 32], [56, 58, 59, 59, 59, 59, 59, 59, 58, 58, 57, 56, 54, 52, 45, 34, 41, 36, 38, 34], [37, 38, 38, 40, 40, 42, 39, 40, 39, 41, 40, 38, 34, 34, 29, 26, 21, 25, 22, 21], [20, 29, 33, 34, 35, 31, 28, 19, 16, 27, 16, 8, 22, 21, 23, 20, 23, 25, 14, 20], [32, 36, 37, 34, 29, 33, 30, 29, 31, 33, 30, 27, 21, 16, 12, 27, 25, 18, 16, 7], [33, 37, 39, 38, 37, 38, 38, 38, 36, 35, 34, 31, 26, 12, 27, 31, 22, 16, 13, 0], [33, 38, 39, 38, 38, 36, 36, 36, 35, 35, 35, 33, 27, 10, 20, 17, 24, 15, 17, 18], [26, 28, 27, 25, 28, 27, 26, 27, 23, 27, 19, 23, 23, 11, 19, 20, 19, 17, 6, 13], [25, 21, 25, 18, 19, 22, 18, 21, 16, 18, 19, 20, 2, 14, 12, 11, 7, 15, 2, 0], [31, 30, 24, 26, 24, 26, 21, 25, 21, 20, 17, 18, 12, 12, 14, 10, 7, 11, 4, 17], [15, 11, 19, 13, 0, 0, 13, 11, 10, 12, 11, 4, 11, 12, 13, 11, 0, 10, 14, 11], [12, 11, 5, 10, 1, 9, 0, 18, 5, 14, 16, 13, 12, 0, 10, 11, 4, 7, 0, 12], [16, 13, 4, 0, 15, 7, 15, 0, 13, 18, 9, 9, 11, 9, 0, 0, 9, 13, 4, 10], [11, 13, 15, 12, 9, 8, 6, 16, 16, 7, 8, 8, 6, 1, 0, 7, 14, 15, 11, 1], [13, 19, 11, 10, 2, 3, 0, 11, 9, 0, 14, 1, 6, 7, 14, 1, 10, 0, 11, 16], [62, 78, 82, 86, 88, 85, 82, 82, 83, 80, 80, 78, 77, 76, 73, 70, 65, 60, 48, 43], [72, 83, 89, 89, 92, 92, 93, 93, 95, 94, 93, 93, 92, 91, 89, 86, 80, 72, 68, 73], [53, 81, 88, 89, 88, 84, 86, 85, 85, 86, 86, 84, 82, 80, 76, 70, 57, 63, 65, 63], [69, 80, 83, 82, 87, 88, 86, 86, 82, 81, 79, 77, 74, 72, 66, 65, 61, 53, 63, 53], [52, 66, 69, 67, 62, 62, 57, 56, 60, 67, 67, 67, 65, 64, 59, 53, 49, 55, 50, 41], [66, 74, 75, 76, 73, 75, 76, 73, 73, 69, 68, 67, 65, 63, 57, 41, 56, 57, 46, 52], [66, 78, 82, 83, 84, 83, 84, 84, 83, 83, 82, 81, 79, 76, 67, 62, 68, 64, 61, 58], [57, 61, 69, 65, 65, 66, 67, 68, 69, 69, 68, 68, 66, 62, 51, 52, 53, 34, 49, 43], [58, 60, 63, 67, 61, 64, 57, 53, 53, 54, 54, 52, 51, 47, 37, 42, 49, 43, 41, 32], [59, 68, 74, 76, 75, 74, 75, 74, 73, 72, 72, 70, 67, 63, 60, 63, 62, 53, 50, 41], [55, 65, 68, 70, 70, 70, 71, 70, 69, 68, 66, 64, 58, 45, 61, 63, 56, 45, 42, 42], [53, 61, 67, 68, 69, 68, 66, 67, 67, 67, 66, 66, 63, 59, 56, 54, 51, 45, 44, 29], [42, 59, 62, 60, 60, 59, 61, 64, 63, 60, 57, 57, 53, 40, 42, 41, 48, 42, 20, 25], [54, 68, 72, 72, 72, 71, 71, 71, 71, 71, 69, 67, 62, 52, 41, 54, 54, 46, 45, 38], [57, 68, 69, 63, 65, 64, 66, 67, 67, 63, 60, 56, 49, 47, 52, 54, 47, 41, 37, 29], [52, 52, 54, 56, 45, 49, 47, 49, 46, 33, 29, 33, 40, 44, 42, 40, 33, 29, 24, 19], [42, 47, 45, 46, 43, 43, 49, 46, 48, 47, 47, 45, 38, 40, 37, 35, 36, 28, 19, 9], [40, 48, 49, 49, 48, 48, 47, 44, 41, 42, 41, 35, 35, 36, 36, 33, 30, 24, 19, 11], [43, 49, 52, 51, 52, 54, 51, 52, 48, 50, 46, 40, 41, 47, 50, 47, 37, 35, 19, 20], [35, 30, 32, 35, 43, 45, 46, 47, 47, 46, 45, 43, 37, 34, 36, 35, 33, 18, 13, 13], [72, 86, 89, 94, 96, 93, 94, 89, 89, 89, 87, 87, 86, 85, 83, 80, 74, 68, 64, 55], [81, 91, 97, 97, 100, 101, 102, 102, 103, 103, 102, 102, 101, 99, 97, 95, 89, 80, 76, 80], [65, 91, 97, 98, 97, 94, 95, 94, 93, 93, 92, 91, 89, 87, 81, 75, 60, 69, 71, 72], [78, 89, 92, 91, 96, 97, 95, 95, 92, 93, 92, 91, 88, 86, 81, 77, 74, 68, 73, 62], [54, 75, 78, 78, 75, 73, 62, 68, 62, 72, 75, 72, 70, 68, 63, 55, 56, 61, 58, 50], [77, 82, 82, 83, 81, 83, 84, 80, 82, 80, 79, 79, 77, 75, 70, 62, 66, 68, 52, 60], [76, 88, 93, 94, 95, 94, 94, 94, 94, 94, 93, 92, 90, 87, 77, 73, 77, 73, 71, 68], [67, 74, 80, 74, 75, 79, 80, 80, 80, 79, 79, 79, 76, 72, 61, 63, 64, 45, 59, 51], [73, 76, 74, 80, 73, 78, 75, 72, 69, 66, 59, 49, 55, 51, 42, 60, 65, 61, 54, 39], [72, 81, 87, 89, 88, 87, 88, 87, 87, 87, 86, 85, 81, 76, 71, 76, 75, 66, 57, 59], [67, 78, 80, 82, 81, 81, 81, 81, 80, 79, 77, 76, 70, 63, 71, 73, 65, 55, 48, 48], [67, 76, 82, 84, 86, 85, 84, 84, 83, 82, 81, 80, 77, 71, 69, 68, 67, 62, 57, 34], [53, 72, 75, 76, 75, 75, 71, 74, 80, 74, 74, 74, 66, 58, 57, 60, 64, 56, 45, 37], [72, 83, 87, 87, 87, 86, 87, 87, 86, 85, 83, 81, 75, 62, 65, 70, 67, 61, 57, 51], [76, 86, 86, 79, 82, 80, 85, 84, 84, 80, 76, 70, 62, 66, 72, 70, 69, 53, 53, 36], [72, 70, 72, 75, 67, 68, 67, 65, 68, 63, 58, 29, 58, 62, 62, 58, 51, 50, 42, 36], [65, 71, 69, 69, 69, 68, 71, 71, 72, 72, 71, 68, 58, 59, 61, 55, 56, 50, 41, 25], [59, 69, 71, 73, 73, 73, 71, 70, 68, 68, 65, 61, 58, 59, 56, 54, 57, 45, 43, 34], [61, 68, 70, 69, 70, 74, 69, 70, 65, 68, 64, 60, 56, 64, 66, 62, 52, 52, 36, 30], [52, 45, 59, 63, 65, 67, 66, 68, 66, 64, 63, 61, 49, 56, 61, 58, 47, 40, 25, 35], [69, 79, 79, 76, 82, 80, 80, 78, 76, 79, 77, 77, 75, 74, 70, 65, 55, 49, 50, 51], [65, 74, 79, 79, 81, 83, 82, 83, 84, 84, 81, 79, 75, 70, 57, 58, 60, 55, 47, 34], [56, 53, 59, 67, 73, 75, 77, 76, 76, 75, 73, 73, 71, 69, 66, 62, 57, 61, 59, 56], [58, 66, 69, 67, 64, 61, 65, 64, 63, 65, 65, 64, 62, 60, 54, 43, 53, 42, 46, 34], [59, 57, 61, 64, 65, 65, 66, 67, 68, 68, 68, 67, 66, 63, 55, 51, 51, 52, 42, 40], [56, 64, 66, 67, 66, 66, 66, 67, 65, 65, 65, 64, 62, 60, 51, 50, 37, 52, 36, 40], [49, 51, 52, 52, 54, 55, 56, 56, 56, 56, 56, 56, 55, 53, 50, 50, 45, 37, 38, 32], [43, 40, 45, 45, 44, 44, 42, 43, 45, 44, 41, 39, 38, 29, 33, 34, 29, 21, 18, 16], [37, 40, 40, 43, 44, 44, 44, 45, 45, 44, 45, 42, 38, 30, 36, 32, 30, 24, 15, 17], [25, 29, 25, 12, 23, 23, 26, 23, 25, 21, 28, 28, 31, 30, 8, 23, 22, 20, 20, 0], [18, 31, 34, 35, 35, 37, 38, 39, 39, 40, 41, 41, 38, 30, 28, 17, 23, 15, 14, 7], [27, 33, 33, 31, 33, 33, 33, 33, 34, 34, 34, 34, 31, 21, 20, 21, 21, 18, 19, 9], [22, 25, 25, 28, 26, 23, 24, 24, 25, 25, 21, 24, 18, 18, 26, 12, 20, 7, 2, 8], [17, 6, 25, 28, 22, 27, 28, 27, 30, 31, 32, 32, 27, 14, 11, 14, 18, 5, 11, 2], [9, 19, 23, 21, 25, 25, 25, 22, 17, 19, 25, 9, 10, 19, 11, 5, 0, 0, 8, 5], [9, 1, 13, 10, 12, 8, 14, 9, 8, 11, 5, 15, 17, 6, 15, 3, 10, 8, 8, 15], [7, 7, 9, 1, 9, 20, 12, 14, 14, 8, 11, 11, 9, 14, 15, 1, 8, 7, 0, 7], [16, 20, 19, 23, 23, 21, 20, 23, 22, 21, 15, 12, 7, 0, 15, 14, 11, 8, 12, 6], [25, 22, 19, 22, 19, 15, 22, 14, 19, 12, 16, 10, 13, 14, 18, 18, 16, 18, 18, 17], [10, 3, 1, 14, 18, 15, 19, 4, 13, 9, 13, 13, 8, 8, 6, 8, 8, 11, 0, 15], [70, 84, 89, 87, 90, 90, 91, 88, 85, 89, 87, 87, 85, 83, 79, 75, 62, 60, 63, 54], [74, 81, 90, 91, 92, 94, 94, 94, 95, 95, 92, 90, 86, 81, 72, 71, 70, 66, 56, 52], [64, 74, 67, 79, 85, 88, 89, 88, 88, 87, 85, 84, 81, 77, 68, 64, 67, 68, 66, 65], [64, 78, 84, 85, 80, 79, 81, 81, 80, 81, 79, 77, 74, 70, 56, 61, 67, 51, 54, 55], [73, 73, 76, 79, 80, 80, 80, 82, 82, 82, 81, 80, 77, 72, 60, 69, 53, 68, 58, 60], [67, 79, 83, 84, 84, 84, 84, 85, 83, 83, 82, 80, 76, 69, 66, 68, 62, 65, 53, 45], [64, 73, 75, 74, 76, 76, 78, 79, 78, 77, 76, 76, 72, 69, 67, 58, 70, 58, 61, 54], [69, 67, 69, 74, 71, 73, 71, 71, 71, 70, 67, 61, 55, 57, 58, 44, 51, 42, 40, 41], [62, 72, 74, 75, 77, 76, 76, 77, 77, 76, 74, 71, 61, 63, 63, 60, 54, 53, 52, 43], [56, 58, 52, 59, 63, 65, 66, 65, 66, 66, 65, 63, 55, 53, 56, 50, 55, 53, 46, 34], [52, 64, 68, 69, 70, 70, 70, 70, 71, 70, 69, 67, 57, 52, 46, 59, 50, 42, 39, 33], [55, 65, 67, 66, 66, 66, 65, 66, 66, 66, 64, 61, 48, 55, 50, 49, 43, 33, 27, 29], [50, 60, 62, 63, 63, 65, 65, 63, 65, 65, 60, 52, 52, 56, 53, 44, 40, 38, 35, 20], [54, 48, 63, 64, 63, 64, 66, 66, 66, 67, 66, 63, 48, 51, 40, 43, 45, 43, 22, 27], [53, 53, 54, 59, 57, 61, 48, 55, 42, 52, 54, 49, 41, 49, 44, 41, 42, 29, 19, 19], [46, 43, 48, 46, 43, 44, 42, 40, 40, 40, 30, 21, 25, 25, 23, 12, 8, 12, 10, 11], [39, 37, 40, 39, 38, 36, 41, 41, 39, 41, 39, 31, 33, 35, 17, 29, 26, 14, 15, 8], [35, 45, 46, 46, 48, 48, 50, 50, 51, 51, 50, 45, 31, 40, 33, 37, 29, 25, 19, 7], [40, 46, 40, 38, 41, 34, 30, 29, 38, 40, 41, 41, 32, 24, 33, 26, 24, 11, 13, 14], [29, 32, 30, 27, 30, 34, 31, 32, 30, 23, 28, 30, 34, 33, 19, 24, 21, 18, 0, 14], [79, 89, 95, 94, 96, 99, 98, 98, 93, 95, 94, 94, 92, 91, 88, 84, 71, 67, 71, 62], [80, 88, 97, 98, 100, 102, 102, 103, 104, 103, 100, 98, 94, 89, 80, 80, 78, 73, 61, 56], [68, 82, 75, 86, 92, 95, 95, 95, 94, 93, 92, 90, 86, 80, 71, 74, 74, 74, 74, 71], [72, 86, 91, 92, 88, 88, 88, 87, 85, 87, 85, 83, 80, 75, 53, 70, 72, 48, 61, 57], [80, 82, 84, 87, 90, 89, 88, 90, 89, 89, 89, 88, 84, 78, 73, 78, 65, 77, 64, 68], [75, 87, 90, 91, 91, 91, 90, 90, 88, 88, 86, 84, 78, 67, 74, 71, 73, 70, 61, 55], [74, 82, 85, 83, 85, 86, 88, 88, 88, 88, 87, 86, 82, 79, 78, 62, 79, 71, 72, 63], [80, 77, 80, 85, 83, 84, 82, 82, 82, 81, 76, 65, 66, 63, 57, 56, 41, 55, 44, 32], [72, 84, 86, 87, 89, 88, 88, 88, 87, 86, 84, 80, 73, 77, 70, 75, 70, 62, 60, 55], [69, 72, 54, 71, 74, 78, 79, 79, 80, 80, 78, 73, 47, 69, 69, 62, 65, 66, 53, 51], [64, 77, 80, 81, 82, 82, 82, 83, 82, 81, 79, 75, 62, 69, 60, 72, 63, 57, 50, 44], [69, 79, 82, 80, 81, 81, 80, 80, 80, 80, 77, 72, 64, 71, 51, 65, 60, 56, 48, 41], [65, 73, 76, 76, 75, 76, 79, 75, 78, 76, 74, 66, 68, 66, 67, 54, 50, 38, 47, 26], [70, 68, 78, 79, 77, 77, 79, 78, 79, 79, 77, 73, 63, 67, 64, 62, 57, 36, 35, 31], [71, 69, 75, 79, 76, 82, 75, 79, 72, 67, 71, 63, 68, 69, 61, 57, 60, 49, 40, 22], [65, 65, 69, 68, 64, 66, 63, 64, 62, 57, 32, 51, 46, 53, 47, 42, 28, 36, 17, 12], [61, 62, 55, 57, 60, 47, 61, 61, 61, 61, 58, 50, 56, 48, 41, 47, 42, 31, 17, 11], [57, 64, 67, 69, 69, 69, 68, 68, 67, 65, 60, 55, 59, 50, 46, 51, 48, 17, 25, 22], [58, 63, 55, 50, 58, 57, 56, 61, 60, 58, 54, 55, 51, 38, 48, 50, 35, 36, 24, 22], [44, 54, 52, 53, 55, 56, 54, 54, 52, 52, 52, 54, 51, 50, 45, 47, 38, 30, 16, 1], [74, 74, 58, 70, 67, 62, 62, 67, 64, 64, 64, 65, 65, 64, 64, 63, 59, 56, 54, 55], [63, 71, 74, 72, 74, 75, 77, 77, 76, 75, 73, 71, 67, 63, 58, 56, 54, 57, 55, 51], [48, 53, 59, 63, 64, 63, 61, 62, 63, 61, 58, 54, 40, 51, 56, 55, 49, 48, 44, 47], [50, 53, 52, 51, 51, 51, 53, 54, 56, 56, 56, 56, 56, 52, 46, 48, 47, 32, 41, 41], [30, 40, 44, 47, 49, 50, 50, 49, 45, 40, 36, 44, 50, 52, 50, 45, 45, 46, 38, 36], [45, 48, 48, 50, 51, 50, 49, 49, 49, 48, 46, 45, 44, 43, 42, 41, 33, 39, 29, 28], [33, 26, 23, 30, 27, 29, 23, 31, 30, 27, 16, 14, 19, 22, 25, 23, 17, 17, 16, 8], [15, 2, 25, 19, 26, 26, 24, 22, 18, 20, 17, 23, 20, 21, 15, 15, 4, 19, 12, 21], [14, 10, 17, 9, 16, 15, 19, 13, 18, 19, 16, 18, 0, 9, 14, 18, 0, 5, 16, 0], [21, 19, 19, 24, 23, 22, 19, 17, 19, 14, 16, 16, 16, 17, 9, 8, 10, 9, 16, 8], [19, 22, 22, 25, 24, 24, 23, 21, 22, 22, 18, 16, 17, 13, 0, 0, 15, 5, 12, 8], [21, 21, 23, 17, 18, 20, 9, 9, 15, 20, 19, 17, 0, 14, 0, 9, 2, 8, 4, 3], [11, 20, 20, 21, 14, 17, 20, 20, 18, 14, 8, 0, 4, 9, 3, 16, 8, 15, 11, 7], [15, 20, 12, 8, 11, 14, 14, 15, 18, 15, 18, 8, 16, 5, 15, 8, 2, 8, 12, 7], [10, 17, 20, 21, 22, 15, 21, 18, 23, 21, 7, 18, 18, 16, 16, 18, 20, 11, 12, 0], [7, 12, 10, 16, 16, 10, 0, 13, 16, 1, 11, 4, 8, 9, 14, 0, 12, 3, 8, 7], [14, 13, 5, 7, 15, 15, 7, 2, 0, 16, 13, 18, 0, 9, 0, 7, 10, 11, 11, 4], [12, 11, 2, 12, 8, 9, 13, 15, 12, 15, 12, 17, 17, 4, 8, 6, 13, 13, 5, 2], [5, 14, 15, 17, 17, 13, 16, 14, 9, 0, 3, 12, 0, 4, 15, 7, 4, 3, 13, 13], [19, 19, 16, 11, 13, 16, 18, 7, 11, 15, 14, 13, 10, 8, 15, 2, 13, 9, 13, 0], [80, 87, 79, 80, 76, 66, 71, 80, 73, 70, 73, 73, 73, 73, 72, 71, 69, 65, 65, 67], [71, 84, 90, 90, 88, 92, 93, 93, 93, 92, 90, 89, 85, 80, 68, 54, 56, 67, 66, 59], [70, 59, 77, 81, 83, 83, 81, 82, 83, 82, 79, 77, 71, 62, 63, 65, 57, 66, 49, 52], [74, 80, 80, 80, 79, 77, 79, 80, 80, 77, 78, 78, 77, 74, 71, 71, 65, 60, 60, 59], [67, 68, 70, 68, 74, 78, 78, 78, 77, 76, 75, 75, 74, 73, 68, 68, 68, 62, 56, 42], [68, 71, 72, 73, 75, 75, 73, 75, 74, 73, 71, 67, 60, 52, 57, 48, 58, 57, 51, 47], [60, 52, 67, 63, 55, 58, 61, 61, 58, 56, 58, 60, 62, 60, 54, 53, 57, 50, 44, 42], [55, 53, 58, 60, 60, 60, 58, 57, 57, 57, 54, 54, 51, 50, 46, 26, 32, 31, 30, 16], [53, 56, 63, 65, 65, 63, 62, 61, 61, 60, 59, 57, 48, 53, 55, 45, 49, 32, 34, 30], [50, 52, 55, 57, 52, 51, 50, 51, 43, 38, 41, 40, 23, 35, 34, 41, 33, 32, 22, 19], [54, 59, 61, 60, 59, 60, 60, 60, 59, 58, 55, 45, 53, 55, 41, 49, 45, 38, 28, 24], [48, 52, 51, 51, 51, 51, 48, 49, 46, 46, 37, 25, 46, 50, 42, 41, 36, 29, 18, 16], [45, 51, 51, 49, 49, 34, 48, 33, 43, 46, 46, 46, 42, 36, 41, 20, 34, 24, 22, 12], [30, 27, 36, 39, 47, 49, 48, 50, 48, 42, 33, 27, 38, 41, 31, 37, 31, 26, 16, 13], [42, 39, 37, 35, 37, 45, 44, 45, 47, 46, 44, 36, 42, 35, 36, 25, 26, 20, 23, 17], [26, 31, 34, 32, 32, 31, 28, 27, 31, 30, 31, 32, 30, 26, 21, 17, 3, 1, 14, 10], [31, 36, 34, 30, 25, 29, 27, 21, 19, 24, 30, 31, 31, 21, 21, 18, 0, 11, 15, 11], [27, 40, 40, 38, 37, 38, 36, 35, 32, 33, 33, 32, 16, 26, 14, 19, 13, 16, 7, 5], [30, 33, 31, 30, 28, 28, 31, 29, 25, 22, 31, 32, 31, 24, 24, 17, 14, 13, 8, 6], [27, 26, 17, 25, 30, 30, 30, 28, 28, 30, 27, 23, 9, 22, 19, 5, 6, 6, 9, 10], [86, 96, 89, 93, 86, 80, 86, 82, 80, 78, 80, 81, 83, 82, 81, 81, 78, 75, 73, 75], [77, 93, 99, 99, 97, 101, 102, 101, 102, 101, 100, 99, 94, 89, 76, 69, 61, 75, 72, 70], [80, 67, 85, 90, 93, 93, 91, 91, 92, 89, 87, 84, 76, 64, 74, 72, 68, 73, 53, 55], [85, 89, 89, 91, 91, 90, 91, 92, 91, 89, 88, 87, 84, 82, 78, 80, 73, 71, 68, 66], [77, 81, 83, 80, 87, 90, 90, 90, 90, 88, 87, 84, 82, 81, 74, 76, 77, 69, 65, 53], [79, 83, 84, 84, 85, 86, 84, 84, 82, 81, 77, 72, 58, 62, 69, 61, 64, 62, 54, 50], [74, 64, 78, 73, 73, 72, 69, 74, 70, 63, 70, 72, 69, 65, 58, 63, 63, 50, 44, 43], [71, 64, 78, 78, 74, 76, 73, 72, 72, 70, 69, 66, 56, 55, 50, 51, 36, 40, 37, 28], [70, 75, 81, 84, 84, 81, 79, 77, 75, 69, 62, 59, 65, 70, 69, 49, 60, 42, 42, 39], [67, 71, 74, 75, 74, 72, 72, 72, 66, 70, 65, 58, 43, 51, 58, 55, 53, 47, 39, 33], [74, 79, 81, 79, 79, 79, 79, 79, 77, 74, 71, 66, 69, 70, 63, 58, 57, 50, 44, 28], [68, 70, 67, 68, 69, 68, 65, 66, 68, 67, 64, 58, 61, 63, 53, 55, 47, 39, 32, 19], [65, 73, 74, 72, 76, 70, 73, 61, 66, 70, 66, 61, 58, 59, 59, 49, 52, 45, 34, 26], [66, 70, 65, 67, 70, 70, 70, 72, 70, 67, 65, 55, 61, 63, 39, 57, 51, 45, 34, 22], [71, 68, 67, 67, 66, 74, 73, 73, 75, 74, 64, 59, 66, 56, 66, 47, 43, 36, 26, 21], [56, 62, 65, 66, 65, 64, 63, 62, 58, 55, 57, 58, 57, 55, 52, 44, 24, 20, 0, 4], [56, 63, 64, 57, 61, 59, 58, 56, 54, 52, 50, 55, 55, 34, 47, 37, 33, 28, 19, 3], [55, 61, 60, 61, 62, 61, 60, 59, 56, 47, 53, 53, 43, 48, 43, 32, 31, 24, 14, 15], [54, 57, 56, 59, 60, 58, 53, 52, 54, 51, 50, 51, 52, 41, 43, 31, 31, 22, 10, 7], [52, 58, 57, 56, 61, 62, 62, 62, 62, 60, 54, 55, 56, 49, 47, 36, 30, 27, 15, 13], [77, 82, 86, 87, 86, 86, 86, 87, 86, 85, 82, 80, 76, 73, 66, 59, 46, 52, 56, 52], [52, 57, 51, 62, 64, 65, 68, 68, 69, 69, 68, 66, 64, 65, 67, 66, 58, 56, 53, 36], [49, 37, 39, 42, 48, 51, 54, 54, 53, 52, 50, 48, 42, 40, 36, 37, 31, 32, 38, 34], [46, 49, 50, 53, 55, 55, 55, 55, 55, 54, 53, 50, 45, 46, 47, 40, 24, 40, 38, 27], [42, 47, 49, 50, 50, 51, 51, 50, 50, 48, 46, 44, 42, 42, 39, 39, 32, 31, 28, 25], [16, 21, 25, 29, 18, 28, 28, 25, 26, 29, 33, 31, 16, 27, 22, 18, 27, 20, 21, 13], [5, 24, 21, 27, 26, 22, 26, 29, 28, 29, 27, 27, 26, 22, 17, 16, 14, 8, 14, 10], [14, 21, 18, 17, 17, 8, 10, 19, 13, 7, 17, 17, 20, 16, 12, 8, 15, 12, 12, 18], [20, 23, 27, 28, 24, 26, 22, 20, 13, 21, 20, 21, 20, 17, 8, 16, 10, 13, 8, 12], [20, 18, 26, 23, 16, 23, 12, 10, 8, 5, 14, 13, 14, 10, 13, 15, 17, 14, 15, 18], [20, 22, 27, 12, 21, 12, 16, 21, 15, 14, 17, 12, 17, 15, 6, 17, 16, 14, 3, 5], [19, 22, 20, 22, 19, 23, 19, 22, 11, 22, 9, 23, 13, 14, 6, 14, 17, 18, 7, 17], [25, 14, 25, 24, 15, 22, 11, 22, 17, 9, 17, 14, 13, 10, 12, 14, 10, 14, 0, 4], [12, 7, 19, 22, 16, 8, 10, 0, 19, 6, 13, 5, 15, 17, 10, 13, 12, 7, 9, 6], [11, 10, 13, 24, 13, 20, 12, 12, 12, 5, 9, 10, 12, 12, 18, 17, 11, 8, 14, 11], [11, 14, 10, 18, 11, 13, 4, 3, 6, 14, 16, 14, 15, 11, 12, 12, 8, 0, 0, 12], [6, 15, 9, 13, 0, 12, 9, 2, 5, 12, 10, 5, 0, 11, 1, 16, 9, 18, 13, 7], [6, 16, 8, 17, 13, 14, 4, 4, 11, 11, 0, 9, 18, 6, 0, 6, 9, 18, 16, 10], [17, 9, 15, 21, 10, 10, 5, 14, 8, 11, 14, 8, 0, 9, 1, 6, 10, 6, 12, 2], [16, 19, 16, 10, 15, 14, 20, 8, 12, 9, 15, 15, 11, 17, 7, 16, 8, 5, 13, 15], [86, 91, 96, 99, 97, 97, 97, 97, 97, 96, 93, 91, 88, 84, 77, 69, 62, 58, 64, 62], [70, 72, 74, 80, 85, 85, 89, 89, 89, 89, 88, 86, 81, 77, 75, 75, 73, 73, 65, 56], [71, 66, 64, 67, 70, 75, 77, 78, 76, 76, 74, 72, 68, 66, 63, 58, 58, 45, 50, 43], [69, 70, 72, 76, 78, 78, 77, 77, 77, 76, 74, 72, 68, 68, 68, 62, 51, 57, 59, 47], [72, 77, 79, 80, 81, 82, 81, 81, 80, 79, 78, 76, 71, 63, 51, 52, 58, 52, 49, 44], [57, 59, 61, 66, 63, 66, 67, 67, 67, 67, 65, 63, 58, 51, 46, 41, 46, 48, 36, 30], [51, 62, 62, 62, 65, 66, 66, 67, 67, 67, 66, 65, 60, 52, 51, 44, 51, 35, 38, 31], [46, 47, 50, 45, 47, 47, 50, 50, 50, 49, 50, 49, 45, 40, 37, 33, 27, 26, 17, 17], [45, 53, 51, 50, 50, 48, 47, 45, 39, 45, 40, 40, 38, 25, 39, 32, 25, 17, 11, 8], [28, 38, 38, 36, 35, 36, 35, 29, 25, 25, 33, 32, 27, 20, 23, 22, 11, 9, 9, 17], [40, 38, 40, 44, 41, 41, 39, 37, 36, 35, 38, 43, 42, 34, 17, 29, 21, 23, 13, 11], [23, 32, 37, 41, 41, 42, 40, 40, 38, 32, 32, 37, 31, 32, 20, 25, 21, 23, 13, 21], [33, 29, 23, 32, 32, 37, 36, 35, 32, 29, 22, 21, 25, 26, 17, 23, 6, 12, 15, 9], [35, 38, 35, 16, 32, 27, 34, 28, 32, 25, 24, 20, 21, 18, 13, 18, 11, 13, 13, 11], [24, 31, 33, 34, 33, 33, 34, 33, 33, 29, 18, 16, 24, 8, 13, 9, 8, 3, 9, 3], [17, 16, 21, 16, 19, 22, 21, 22, 21, 20, 20, 18, 17, 8, 14, 11, 2, 13, 16, 8], [17, 1, 17, 15, 20, 17, 16, 19, 14, 16, 12, 15, 11, 0, 13, 4, 8, 9, 7, 11], [18, 20, 26, 24, 23, 22, 26, 23, 19, 20, 15, 16, 4, 17, 15, 14, 17, 13, 7, 3], [20, 14, 9, 15, 11, 15, 20, 19, 26, 23, 16, 10, 17, 11, 2, 17, 14, 5, 10, 14], [21, 24, 27, 27, 23, 27, 26, 27, 25, 22, 16, 21, 23, 10, 19, 10, 14, 11, 12, 16], [98, 105, 110, 112, 111, 111, 111, 111, 110, 109, 106, 105, 102, 98, 90, 81, 77, 73, 72, 72], [87, 85, 90, 94, 101, 103, 105, 106, 105, 104, 103, 101, 97, 92, 88, 88, 87, 87, 77, 71], [88, 82, 81, 85, 84, 90, 91, 91, 91, 89, 87, 85, 81, 78, 74, 63, 71, 62, 60, 57], [87, 87, 88, 93, 95, 95, 95, 95, 95, 93, 91, 88, 85, 83, 83, 79, 74, 63, 77, 64], [90, 95, 97, 99, 99, 100, 100, 99, 99, 97, 95, 93, 87, 80, 75, 76, 76, 66, 67, 60], [78, 79, 82, 86, 83, 87, 87, 83, 82, 81, 79, 76, 70, 60, 62, 63, 48, 63, 50, 39], [76, 85, 85, 83, 86, 85, 86, 87, 89, 88, 86, 84, 77, 76, 77, 63, 70, 60, 56, 48], [73, 78, 81, 77, 71, 75, 79, 76, 78, 78, 79, 77, 73, 67, 63, 61, 58, 46, 43, 38], [77, 86, 85, 82, 84, 83, 80, 67, 77, 77, 75, 78, 69, 73, 64, 68, 52, 51, 32, 14], [76, 68, 71, 70, 71, 76, 74, 75, 73, 75, 75, 74, 61, 54, 62, 52, 51, 46, 40, 28], [74, 74, 67, 74, 70, 70, 66, 61, 62, 66, 70, 72, 71, 62, 47, 56, 55, 46, 39, 32], [61, 62, 70, 75, 77, 76, 75, 74, 69, 63, 61, 64, 58, 56, 56, 51, 34, 42, 32, 20], [72, 70, 69, 69, 63, 73, 74, 75, 73, 71, 62, 48, 62, 59, 57, 56, 48, 44, 33, 25], [66, 75, 75, 68, 70, 70, 69, 72, 69, 68, 65, 63, 58, 57, 38, 51, 40, 31, 12, 16], [70, 74, 74, 75, 75, 76, 76, 76, 75, 75, 60, 62, 65, 59, 53, 51, 36, 36, 24, 15], [70, 71, 68, 66, 68, 68, 68, 64, 53, 55, 63, 65, 58, 52, 36, 38, 32, 26, 12, 6], [63, 58, 61, 59, 62, 63, 63, 61, 59, 52, 51, 57, 44, 45, 29, 36, 25, 11, 5, 19], [61, 67, 65, 66, 66, 66, 64, 62, 59, 55, 55, 53, 49, 47, 49, 36, 25, 27, 7, 12], [57, 60, 61, 62, 65, 65, 65, 65, 64, 61, 51, 50, 44, 35, 39, 39, 21, 13, 9, 5], [65, 66, 64, 63, 63, 64, 61, 60, 58, 58, 54, 50, 47, 47, 33, 36, 16, 12, 13, 14], [82, 78, 79, 83, 84, 83, 77, 82, 79, 80, 75, 74, 71, 67, 62, 47, 56, 54, 45, 51], [62, 72, 69, 69, 50, 44, 60, 58, 58, 54, 56, 58, 60, 61, 60, 58, 57, 54, 45, 47], [59, 63, 64, 65, 67, 67, 65, 65, 65, 63, 62, 60, 57, 55, 50, 49, 42, 43, 40, 45], [54, 56, 57, 57, 55, 54, 55, 54, 53, 51, 45, 42, 42, 38, 37, 37, 38, 36, 35, 27], [20, 33, 25, 22, 33, 34, 33, 30, 14, 26, 26, 26, 16, 26, 25, 21, 27, 29, 22, 15], [31, 34, 38, 35, 37, 35, 31, 34, 27, 26, 25, 22, 25, 29, 28, 26, 22, 5, 14, 13], [26, 20, 13, 12, 11, 15, 2, 7, 18, 16, 13, 21, 15, 13, 16, 8, 13, 3, 10, 21], [18, 14, 22, 12, 11, 8, 6, 16, 16, 14, 7, 14, 9, 15, 15, 15, 15, 9, 7, 17], [19, 19, 26, 18, 21, 19, 16, 19, 11, 10, 22, 1, 11, 19, 7, 16, 13, 16, 15, 20], [9, 20, 17, 23, 17, 19, 12, 17, 8, 19, 13, 4, 0, 16, 16, 8, 7, 12, 7, 17], [10, 22, 20, 10, 16, 15, 15, 14, 17, 7, 16, 7, 0, 14, 13, 12, 14, 10, 12, 13], [18, 21, 22, 16, 19, 16, 6, 20, 17, 21, 16, 11, 16, 12, 12, 12, 15, 8, 10, 7], [20, 20, 16, 22, 19, 14, 7, 7, 8, 15, 17, 14, 13, 13, 4, 15, 10, 0, 10, 11], [22, 22, 23, 13, 19, 19, 4, 15, 16, 1, 17, 7, 12, 14, 18, 6, 12, 14, 0, 10], [23, 22, 20, 22, 20, 23, 19, 22, 23, 18, 17, 15, 16, 6, 13, 3, 7, 15, 10, 9], [15, 10, 17, 15, 12, 16, 6, 15, 9, 10, 5, 15, 10, 11, 16, 11, 16, 16, 14, 3], [10, 23, 26, 17, 22, 20, 17, 12, 16, 18, 16, 12, 12, 8, 14, 13, 20, 16, 10, 20], [12, 21, 17, 16, 3, 1, 8, 17, 13, 7, 11, 4, 0, 10, 4, 8, 13, 4, 5, 14], [19, 16, 20, 18, 22, 18, 17, 19, 6, 9, 14, 8, 8, 11, 14, 2, 12, 15, 12, 2], [17, 23, 17, 18, 20, 19, 18, 4, 13, 10, 3, 17, 14, 6, 17, 11, 9, 12, 9, 13], [89, 86, 85, 91, 91, 91, 85, 89, 87, 88, 83, 82, 79, 75, 68, 61, 60, 60, 26, 55], [74, 83, 85, 82, 65, 67, 75, 75, 75, 74, 72, 69, 66, 67, 69, 67, 66, 65, 55, 57], [74, 81, 82, 83, 85, 85, 83, 83, 82, 81, 80, 79, 75, 72, 64, 67, 62, 49, 56, 54], [74, 78, 78, 79, 76, 76, 77, 77, 76, 75, 71, 68, 65, 62, 63, 62, 52, 40, 51, 46], [64, 68, 67, 70, 68, 69, 68, 67, 66, 65, 62, 59, 50, 47, 53, 51, 46, 40, 45, 32], [63, 64, 66, 65, 67, 67, 67, 67, 65, 64, 60, 56, 45, 34, 47, 46, 48, 41, 25, 23], [55, 51, 57, 60, 57, 59, 59, 59, 59, 57, 55, 52, 48, 48, 44, 46, 29, 39, 17, 23], [48, 56, 55, 52, 52, 50, 50, 51, 49, 46, 43, 39, 33, 36, 31, 17, 28, 21, 9, 17], [23, 41, 38, 37, 36, 35, 36, 37, 34, 34, 29, 27, 26, 25, 16, 17, 2, 8, 11, 17], [28, 32, 39, 38, 36, 37, 36, 33, 34, 29, 24, 14, 27, 27, 24, 0, 11, 14, 7, 14], [35, 38, 38, 33, 34, 35, 30, 27, 28, 26, 25, 26, 21, 18, 15, 20, 8, 8, 5, 14], [31, 33, 32, 31, 34, 33, 33, 33, 31, 30, 28, 26, 19, 12, 7, 15, 9, 13, 6, 9], [30, 30, 28, 26, 20, 8, 22, 20, 22, 18, 17, 18, 7, 10, 3, 15, 17, 14, 8, 11], [30, 29, 29, 30, 31, 30, 26, 19, 16, 15, 20, 19, 19, 17, 6, 6, 15, 15, 10, 0], [29, 28, 26, 25, 28, 28, 24, 23, 21, 16, 18, 10, 14, 17, 15, 13, 13, 7, 7, 6], [27, 25, 24, 22, 17, 12, 23, 15, 17, 14, 7, 14, 12, 18, 6, 11, 12, 14, 6, 13], [13, 15, 18, 12, 22, 13, 16, 15, 20, 17, 18, 9, 20, 5, 11, 15, 15, 0, 17, 5], [23, 24, 21, 26, 25, 22, 21, 23, 5, 18, 11, 14, 14, 15, 8, 10, 14, 12, 2, 2], [26, 27, 27, 27, 27, 22, 21, 19, 19, 20, 17, 17, 8, 8, 14, 18, 17, 11, 20, 0], [26, 30, 30, 29, 30, 24, 23, 18, 9, 20, 12, 13, 17, 13, 19, 19, 6, 9, 11, 11], [101, 97, 97, 103, 104, 103, 97, 102, 99, 101, 95, 95, 91, 88, 80, 68, 71, 70, 53, 66], [87, 96, 99, 95, 83, 82, 89, 91, 90, 90, 87, 85, 78, 71, 77, 77, 75, 76, 63, 66], [89, 96, 97, 98, 99, 100, 97, 97, 96, 95, 93, 91, 88, 83, 72, 78, 75, 59, 66, 65], [90, 94, 94, 95, 93, 93, 93, 94, 93, 91, 86, 83, 79, 70, 75, 75, 52, 67, 60, 57], [82, 86, 86, 88, 86, 87, 85, 85, 86, 85, 83, 81, 75, 67, 70, 70, 59, 53, 60, 46], [84, 86, 87, 87, 88, 88, 90, 88, 87, 85, 81, 77, 64, 55, 61, 64, 64, 62, 45, 37], [75, 78, 81, 82, 79, 81, 81, 80, 80, 78, 74, 68, 64, 68, 66, 64, 39, 55, 24, 39], [75, 87, 86, 83, 82, 81, 80, 81, 77, 77, 75, 74, 65, 61, 61, 45, 57, 48, 24, 33], [59, 79, 76, 75, 75, 73, 73, 70, 68, 63, 59, 57, 48, 56, 47, 53, 42, 33, 20, 22], [70, 79, 79, 79, 78, 78, 77, 76, 74, 72, 68, 63, 53, 60, 61, 40, 40, 35, 16, 13], [66, 72, 70, 65, 66, 64, 63, 63, 58, 58, 50, 38, 53, 52, 45, 38, 36, 30, 22, 0], [64, 68, 70, 70, 72, 72, 72, 71, 71, 68, 62, 61, 59, 52, 41, 40, 32, 11, 0, 5], [67, 72, 71, 73, 68, 65, 62, 59, 58, 58, 55, 40, 46, 40, 36, 32, 14, 7, 11, 4], [75, 76, 77, 76, 74, 74, 71, 66, 53, 59, 59, 47, 52, 55, 41, 46, 33, 27, 11, 7], [68, 65, 64, 66, 64, 64, 62, 60, 54, 48, 53, 51, 46, 39, 33, 27, 0, 22, 10, 12], [67, 65, 64, 63, 61, 59, 61, 61, 58, 58, 55, 47, 43, 39, 28, 26, 6, 8, 13, 12], [53, 56, 58, 59, 59, 51, 53, 50, 44, 47, 39, 42, 36, 31, 24, 25, 7, 15, 15, 10], [56, 57, 56, 53, 53, 54, 54, 53, 49, 48, 45, 39, 29, 27, 21, 15, 7, 13, 8, 12], [58, 59, 59, 59, 59, 58, 57, 55, 50, 46, 42, 29, 34, 28, 12, 17, 5, 6, 5, 6], [52, 53, 55, 54, 51, 48, 46, 40, 19, 28, 28, 29, 24, 21, 12, 15, 11, 12, 6, 8], [82, 86, 87, 89, 89, 91, 91, 91, 90, 89, 87, 85, 81, 77, 67, 43, 59, 55, 53, 56], [65, 69, 67, 67, 62, 62, 62, 61, 57, 55, 53, 55, 56, 55, 50, 51, 52, 45, 45, 41], [47, 51, 48, 52, 45, 50, 46, 47, 48, 47, 48, 46, 44, 41, 34, 31, 35, 33, 18, 27], [41, 49, 47, 48, 47, 47, 47, 47, 46, 46, 44, 39, 26, 18, 29, 22, 18, 23, 19, 16], [36, 37, 25, 34, 33, 32, 36, 38, 35, 30, 22, 29, 23, 13, 12, 18, 23, 10, 6, 12], [42, 44, 45, 45, 45, 46, 45, 45, 43, 41, 37, 29, 14, 22, 27, 22, 24, 21, 9, 15], [29, 31, 33, 33, 32, 31, 29, 30, 29, 24, 16, 22, 17, 17, 13, 15, 10, 14, 0, 9], [28, 28, 31, 33, 32, 28, 29, 29, 27, 25, 21, 21, 16, 10, 17, 11, 7, 6, 13, 13], [16, 16, 14, 20, 0, 11, 18, 6, 17, 18, 20, 0, 10, 10, 13, 2, 11, 10, 6, 19], [12, 21, 20, 16, 19, 9, 5, 4, 14, 16, 4, 9, 17, 10, 2, 11, 11, 12, 8, 4], [23, 18, 22, 15, 19, 7, 17, 18, 13, 16, 10, 13, 18, 14, 21, 8, 15, 14, 12, 10], [14, 7, 11, 16, 10, 0, 14, 11, 7, 17, 9, 10, 14, 11, 14, 14, 5, 8, 11, 16], [17, 16, 13, 18, 22, 21, 20, 18, 4, 11, 9, 14, 17, 14, 9, 15, 6, 7, 7, 15], [14, 10, 11, 16, 20, 13, 18, 4, 8, 17, 15, 15, 12, 12, 19, 8, 11, 20, 15, 19], [17, 10, 15, 5, 14, 10, 5, 7, 16, 0, 10, 16, 15, 13, 7, 12, 0, 17, 0, 14], [23, 20, 22, 14, 16, 15, 17, 16, 10, 10, 12, 18, 17, 18, 20, 19, 16, 10, 15, 0], [13, 13, 1, 2, 8, 12, 16, 19, 14, 16, 3, 10, 6, 13, 9, 11, 14, 12, 16, 14], [7, 16, 8, 13, 18, 11, 1, 1, 14, 18, 8, 7, 16, 14, 15, 1, 11, 19, 10, 14], [9, 11, 15, 17, 13, 22, 18, 7, 14, 17, 3, 17, 18, 10, 15, 10, 4, 16, 13, 13], [9, 13, 15, 10, 14, 14, 4, 13, 12, 11, 14, 13, 19, 13, 13, 10, 13, 6, 7, 9], [95, 98, 99, 103, 102, 104, 105, 104, 103, 102, 100, 98, 94, 90, 81, 67, 68, 66, 65, 66], [82, 88, 90, 87, 86, 87, 88, 88, 86, 85, 82, 79, 75, 71, 65, 63, 65, 61, 57, 52], [83, 81, 76, 80, 78, 76, 78, 78, 78, 77, 75, 73, 70, 65, 55, 56, 59, 54, 41, 41], [71, 78, 76, 76, 77, 76, 76, 76, 74, 72, 72, 68, 59, 58, 59, 55, 48, 44, 35, 22], [71, 71, 63, 71, 70, 70, 69, 70, 69, 67, 66, 63, 57, 48, 52, 53, 44, 38, 33, 28], [75, 79, 79, 79, 79, 79, 79, 79, 77, 76, 73, 69, 63, 60, 62, 56, 39, 44, 35, 30], [60, 63, 58, 61, 59, 59, 61, 62, 64, 64, 63, 61, 52, 36, 44, 39, 33, 27, 19, 6], [61, 65, 66, 67, 67, 66, 65, 64, 62, 60, 56, 51, 39, 47, 30, 33, 18, 20, 19, 14], [45, 48, 48, 43, 44, 43, 44, 43, 41, 41, 38, 30, 19, 19, 19, 16, 21, 15, 4, 9], [40, 39, 30, 36, 34, 25, 27, 33, 32, 33, 28, 23, 9, 23, 12, 13, 10, 0, 17, 21], [42, 45, 43, 41, 41, 41, 41, 41, 39, 36, 32, 25, 25, 21, 13, 9, 8, 13, 8, 20], [36, 33, 34, 35, 37, 38, 34, 31, 29, 27, 21, 23, 22, 19, 13, 14, 13, 12, 15, 20], [45, 48, 47, 46, 44, 46, 38, 39, 37, 33, 30, 23, 13, 17, 12, 3, 18, 17, 14, 16], [42, 42, 42, 40, 39, 38, 35, 32, 27, 8, 25, 25, 19, 18, 11, 3, 18, 15, 12, 16], [32, 31, 34, 32, 31, 32, 30, 28, 22, 17, 20, 16, 10, 13, 19, 6, 8, 3, 9, 16], [16, 24, 21, 28, 30, 23, 21, 17, 27, 24, 8, 19, 20, 11, 7, 12, 0, 20, 16, 7], [24, 12, 19, 5, 22, 11, 18, 12, 9, 9, 17, 15, 14, 20, 12, 15, 14, 7, 16, 11], [8, 12, 6, 15, 18, 18, 15, 8, 7, 17, 18, 7, 7, 14, 12, 11, 10, 3, 9, 11], [13, 19, 19, 25, 7, 18, 8, 12, 13, 7, 6, 6, 17, 16, 6, 5, 14, 15, 19, 8], [29, 24, 21, 25, 15, 14, 11, 9, 16, 14, 11, 13, 9, 0, 19, 8, 16, 3, 7, 7], [105, 109, 111, 114, 114, 115, 116, 115, 114, 113, 112, 110, 105, 100, 90, 75, 77, 75, 73, 74], [94, 99, 104, 100, 101, 100, 100, 100, 99, 98, 94, 91, 86, 84, 79, 76, 78, 74, 69, 60], [96, 96, 91, 93, 91, 91, 95, 96, 97, 95, 93, 91, 87, 82, 71, 70, 73, 69, 58, 55], [83, 88, 87, 88, 89, 89, 87, 87, 85, 82, 80, 80, 69, 69, 70, 67, 58, 54, 47, 29], [88, 88, 83, 90, 90, 89, 88, 89, 88, 85, 84, 81, 76, 64, 66, 68, 59, 54, 48, 39], [92, 96, 97, 97, 97, 97, 97, 97, 96, 94, 92, 88, 79, 72, 75, 69, 63, 55, 55, 39], [76, 82, 77, 78, 77, 74, 73, 76, 80, 80, 78, 75, 66, 54, 62, 52, 52, 38, 37, 3], [83, 87, 87, 89, 87, 87, 85, 84, 81, 79, 76, 73, 61, 66, 53, 50, 39, 33, 30, 13], [77, 77, 80, 75, 77, 76, 77, 78, 75, 72, 68, 62, 40, 46, 42, 42, 36, 26, 22, 10], [74, 79, 79, 78, 77, 77, 77, 77, 73, 68, 65, 65, 65, 61, 43, 40, 28, 13, 12, 8], [68, 73, 71, 70, 68, 68, 68, 67, 61, 61, 52, 53, 50, 50, 26, 32, 28, 22, 10, 12], [62, 75, 75, 76, 75, 73, 66, 64, 66, 53, 53, 55, 55, 42, 42, 25, 25, 8, 14, 14], [78, 80, 76, 74, 79, 74, 75, 72, 68, 61, 37, 38, 48, 43, 39, 31, 21, 17, 3, 10], [79, 77, 75, 77, 75, 71, 74, 68, 65, 60, 53, 49, 47, 36, 23, 7, 13, 6, 17, 16], [70, 70, 73, 70, 71, 72, 72, 69, 66, 62, 49, 50, 47, 42, 35, 28, 17, 17, 11, 9], [47, 65, 65, 67, 64, 56, 53, 57, 56, 53, 44, 47, 26, 23, 12, 13, 16, 19, 16, 15], [55, 47, 53, 56, 58, 48, 34, 51, 52, 48, 29, 36, 20, 17, 12, 14, 10, 10, 15, 3], [53, 48, 44, 47, 43, 34, 28, 32, 30, 23, 18, 18, 19, 13, 15, 3, 11, 16, 19, 19], [52, 45, 44, 43, 45, 22, 29, 33, 31, 27, 20, 5, 20, 18, 13, 16, 5, 16, 18, 12], [48, 46, 51, 47, 46, 41, 35, 32, 26, 24, 26, 12, 18, 18, 10, 16, 3, 8, 10, 18], [82, 87, 90, 92, 93, 93, 94, 94, 91, 90, 88, 85, 80, 73, 71, 75, 71, 68, 57, 59], [55, 51, 48, 51, 53, 57, 55, 56, 55, 55, 51, 45, 45, 46, 43, 40, 41, 29, 34, 26], [40, 40, 44, 44, 45, 48, 48, 48, 46, 45, 43, 40, 28, 32, 24, 26, 30, 16, 11, 22], [39, 43, 41, 36, 39, 39, 34, 37, 33, 33, 32, 26, 30, 33, 24, 9, 26, 7, 17, 21], [35, 32, 36, 33, 33, 31, 31, 30, 17, 26, 21, 24, 22, 13, 22, 17, 25, 11, 18, 12], [22, 33, 36, 33, 31, 28, 26, 28, 24, 21, 20, 19, 22, 11, 22, 16, 21, 19, 16, 22], [18, 19, 24, 21, 19, 18, 23, 20, 18, 19, 5, 15, 10, 9, 6, 16, 21, 11, 14, 22], [9, 19, 15, 19, 19, 19, 21, 15, 18, 18, 14, 18, 18, 6, 15, 18, 19, 16, 18, 5], [22, 12, 15, 9, 16, 16, 17, 17, 10, 21, 4, 13, 14, 10, 17, 9, 23, 7, 11, 17], [21, 13, 18, 16, 13, 11, 18, 16, 22, 14, 7, 14, 15, 11, 13, 17, 16, 20, 11, 6], [19, 3, 8, 16, 18, 12, 15, 11, 2, 7, 13, 18, 0, 12, 14, 19, 23, 6, 3, 13], [14, 21, 16, 13, 18, 11, 14, 13, 16, 17, 14, 13, 15, 17, 15, 19, 15, 9, 12, 8], [8, 10, 15, 10, 20, 18, 13, 13, 17, 10, 0, 12, 12, 11, 14, 12, 8, 8, 6, 18], [18, 16, 10, 13, 16, 16, 17, 18, 13, 14, 19, 6, 2, 12, 5, 9, 19, 15, 17, 14], [5, 18, 12, 17, 15, 16, 17, 20, 4, 16, 10, 15, 0, 20, 16, 11, 4, 0, 13, 13], [19, 17, 12, 18, 18, 15, 15, 13, 14, 20, 13, 14, 4, 1, 11, 7, 18, 14, 16, 13], [19, 15, 7, 15, 12, 20, 19, 9, 17, 19, 15, 16, 18, 16, 12, 22, 9, 17, 10, 12], [3, 5, 16, 0, 19, 19, 12, 15, 22, 15, 17, 14, 1, 13, 4, 13, 18, 4, 17, 12], [18, 15, 17, 17, 18, 12, 18, 17, 19, 7, 17, 20, 19, 16, 17, 6, 18, 15, 6, 11], [9, 13, 10, 19, 15, 15, 14, 9, 11, 7, 9, 5, 18, 5, 23, 10, 11, 21, 17, 18], [93, 98, 101, 103, 105, 104, 106, 105, 103, 102, 99, 96, 90, 82, 84, 87, 83, 77, 70, 71], [73, 76, 79, 77, 78, 78, 78, 77, 76, 76, 73, 70, 64, 70, 65, 69, 58, 63, 51, 48], [65, 72, 74, 74, 75, 75, 74, 72, 70, 68, 58, 55, 63, 60, 62, 54, 56, 51, 36, 31], [59, 62, 59, 56, 55, 55, 53, 55, 42, 38, 40, 37, 39, 46, 41, 38, 29, 23, 19, 16], [61, 63, 63, 62, 61, 60, 57, 56, 51, 49, 38, 44, 47, 51, 39, 49, 40, 34, 19, 13], [54, 50, 48, 49, 46, 47, 43, 43, 40, 35, 40, 35, 32, 40, 22, 31, 24, 23, 20, 18], [32, 36, 40, 39, 35, 36, 36, 36, 32, 30, 28, 31, 13, 21, 21, 17, 8, 8, 18, 17], [35, 38, 39, 39, 38, 38, 37, 35, 29, 23, 30, 26, 12, 9, 15, 16, 15, 14, 3, 8], [17, 20, 20, 22, 18, 22, 8, 10, 16, 17, 17, 12, 20, 15, 3, 13, 15, 9, 12, 0], [13, 18, 23, 13, 2, 21, 18, 19, 16, 17, 18, 14, 11, 22, 2, 15, 10, 9, 14, 19], [21, 6, 20, 16, 17, 20, 24, 19, 25, 24, 13, 20, 20, 0, 7, 7, 9, 10, 18, 18], [16, 3, 9, 11, 20, 11, 0, 9, 4, 4, 17, 17, 13, 12, 11, 9, 12, 14, 11, 18], [26, 19, 17, 19, 16, 6, 19, 14, 10, 14, 0, 20, 3, 12, 17, 20, 10, 10, 15, 0], [23, 20, 16, 10, 20, 4, 17, 17, 17, 1, 3, 14, 1, 12, 22, 11, 13, 13, 20, 8], [12, 10, 9, 17, 19, 8, 12, 16, 16, 16, 17, 19, 10, 20, 15, 15, 16, 12, 5, 19], [16, 17, 20, 15, 19, 15, 12, 16, 21, 12, 14, 19, 6, 17, 12, 15, 7, 11, 14, 10], [0, 26, 24, 19, 16, 9, 10, 16, 18, 5, 21, 13, 14, 16, 16, 14, 14, 14, 13, 7], [22, 3, 6, 18, 18, 12, 19, 16, 20, 8, 17, 4, 6, 12, 16, 13, 2, 11, 14, 19], [16, 22, 20, 16, 20, 18, 14, 13, 5, 13, 15, 10, 11, 17, 12, 21, 9, 14, 1, 13], [4, 8, 23, 14, 16, 16, 11, 12, 2, 18, 6, 16, 12, 22, 17, 9, 20, 1, 0, 5], [106, 110, 114, 117, 118, 117, 119, 118, 115, 114, 111, 108, 100, 84, 99, 99, 93, 85, 81, 81], [89, 91, 95, 92, 95, 92, 91, 92, 91, 90, 89, 85, 82, 88, 80, 83, 75, 71, 69, 63], [87, 94, 97, 97, 98, 98, 98, 97, 96, 93, 85, 82, 85, 82, 76, 63, 70, 66, 52, 34], [83, 91, 89, 87, 87, 85, 86, 85, 78, 77, 66, 70, 63, 70, 59, 61, 53, 48, 38, 21], [87, 91, 93, 92, 93, 91, 89, 88, 84, 80, 76, 79, 77, 68, 57, 71, 60, 44, 31, 21], [85, 85, 85, 84, 81, 79, 72, 75, 67, 66, 71, 72, 51, 65, 57, 58, 31, 35, 25, 5], [64, 69, 71, 69, 68, 62, 64, 65, 66, 64, 56, 53, 47, 49, 51, 38, 24, 24, 1, 8], [81, 83, 82, 82, 83, 81, 79, 77, 61, 65, 60, 61, 61, 59, 50, 51, 32, 25, 9, 6], [67, 61, 69, 66, 64, 65, 63, 63, 60, 58, 52, 44, 39, 42, 36, 30, 16, 17, 19, 18], [57, 59, 54, 52, 51, 48, 53, 57, 50, 50, 50, 43, 40, 38, 20, 27, 9, 17, 14, 17], [69, 71, 71, 70, 69, 68, 66, 63, 59, 54, 47, 44, 46, 49, 30, 29, 17, 14, 14, 10], [58, 61, 56, 47, 56, 56, 43, 49, 43, 42, 38, 44, 41, 44, 16, 12, 5, 19, 10, 10], [68, 68, 66, 64, 53, 51, 56, 56, 56, 52, 43, 32, 37, 43, 21, 19, 18, 11, 14, 18], [54, 59, 60, 61, 60, 58, 53, 38, 36, 39, 47, 43, 38, 42, 24, 10, 18, 9, 16, 16], [45, 50, 49, 48, 50, 46, 38, 42, 41, 32, 26, 22, 16, 41, 20, 8, 17, 17, 17, 12], [53, 56, 54, 52, 52, 51, 45, 42, 45, 37, 31, 31, 27, 41, 6, 20, 5, 11, 7, 13], [25, 31, 16, 33, 30, 22, 29, 34, 34, 28, 6, 16, 11, 40, 10, 12, 12, 18, 19, 16], [21, 31, 14, 25, 32, 22, 21, 16, 16, 24, 10, 13, 18, 40, 11, 11, 19, 11, 8, 15], [29, 25, 32, 29, 22, 23, 17, 5, 8, 23, 18, 13, 17, 40, 14, 7, 13, 1, 12, 11], [13, 24, 34, 24, 23, 12, 16, 18, 6, 9, 15, 12, 14, 40, 2, 14, 21, 16, 14, 15], [85, 88, 91, 93, 93, 93, 92, 90, 90, 88, 82, 78, 77, 75, 64, 59, 51, 70, 54, 60], [52, 48, 50, 55, 51, 50, 50, 48, 47, 45, 48, 47, 45, 43, 34, 32, 32, 37, 24, 30], [41, 47, 31, 20, 37, 36, 34, 28, 19, 25, 30, 30, 30, 21, 29, 21, 15, 13, 17, 4], [40, 35, 33, 36, 39, 40, 39, 39, 32, 27, 24, 28, 28, 24, 18, 23, 16, 17, 16, 12], [41, 36, 35, 29, 28, 26, 22, 30, 29, 28, 28, 18, 23, 19, 23, 18, 16, 18, 13, 14], [16, 27, 27, 22, 26, 25, 22, 24, 23, 24, 22, 24, 20, 9, 18, 18, 13, 15, 14, 12], [23, 27, 18, 26, 24, 24, 20, 7, 18, 23, 11, 20, 15, 16, 18, 16, 15, 10, 12, 18], [13, 13, 17, 21, 12, 18, 12, 0, 16, 18, 20, 17, 18, 10, 11, 8, 12, 12, 16, 19], [20, 12, 18, 12, 9, 14, 10, 15, 14, 16, 9, 1, 0, 10, 13, 8, 16, 12, 15, 19], [8, 13, 15, 13, 18, 21, 12, 16, 14, 23, 17, 16, 23, 15, 11, 10, 6, 11, 20, 8], [14, 13, 14, 15, 11, 11, 17, 21, 12, 12, 13, 8, 17, 13, 6, 14, 8, 21, 16, 7], [16, 12, 21, 23, 11, 22, 15, 22, 13, 4, 18, 20, 16, 15, 9, 20, 14, 12, 6, 8], [15, 13, 1, 2, 20, 21, 17, 6, 16, 8, 12, 17, 13, 20, 5, 18, 6, 16, 8, 16], [21, 23, 12, 18, 11, 15, 6, 20, 11, 12, 9, 12, 11, 15, 16, 17, 18, 8, 1, 15], [19, 18, 14, 18, 16, 13, 21, 12, 14, 7, 9, 16, 14, 15, 17, 15, 11, 12, 20, 16], [18, 16, 21, 17, 16, 15, 18, 7, 11, 19, 14, 16, 17, 14, 18, 0, 13, 20, 21, 20], [13, 15, 14, 17, 10, 18, 12, 5, 17, 22, 14, 11, 18, 4, 15, 10, 23, 15, 16, 12], [20, 15, 19, 7, 12, 11, 1, 20, 12, 18, 12, 15, 10, 22, 12, 18, 17, 8, 18, 16], [10, 12, 7, 8, 15, 7, 10, 6, 17, 0, 19, 8, 5, 12, 15, 7, 11, 18, 16, 13], [3, 11, 17, 19, 13, 11, 8, 11, 9, 19, 17, 8, 15, 18, 15, 18, 15, 5, 17, 16], [99, 102, 105, 107, 107, 106, 106, 105, 104, 102, 96, 90, 90, 89, 80, 74, 70, 82, 68, 70], [77, 80, 81, 83, 82, 83, 84, 82, 81, 80, 72, 73, 75, 63, 67, 64, 63, 64, 42, 41], [75, 66, 63, 63, 72, 72, 64, 67, 64, 58, 61, 60, 56, 49, 58, 52, 41, 34, 22, 18], [67, 57, 58, 61, 63, 63, 63, 62, 57, 48, 53, 48, 47, 46, 41, 41, 17, 23, 22, 13], [65, 63, 59, 55, 57, 57, 55, 54, 54, 47, 50, 49, 31, 46, 41, 22, 17, 21, 8, 21], [55, 59, 61, 60, 59, 58, 58, 57, 47, 47, 48, 40, 42, 29, 32, 18, 21, 16, 8, 4], [55, 54, 55, 56, 53, 53, 49, 46, 42, 36, 38, 38, 26, 30, 24, 18, 13, 14, 10, 1], [34, 44, 41, 40, 38, 42, 28, 30, 32, 27, 26, 30, 18, 24, 20, 15, 14, 6, 14, 14], [38, 18, 30, 21, 28, 23, 26, 23, 19, 24, 14, 18, 23, 12, 15, 18, 21, 17, 12, 9], [23, 27, 16, 24, 19, 17, 18, 22, 16, 16, 12, 18, 16, 18, 9, 17, 16, 19, 19, 15], [20, 22, 15, 19, 11, 18, 20, 14, 14, 19, 17, 9, 19, 8, 10, 13, 16, 19, 12, 15], [21, 26, 10, 17, 17, 2, 8, 21, 21, 21, 6, 16, 14, 13, 19, 15, 14, 18, 8, 0], [22, 26, 27, 25, 16, 17, 20, 14, 19, 19, 5, 23, 14, 11, 19, 18, 15, 17, 9, 15], [19, 15, 21, 20, 20, 12, 14, 12, 16, 16, 13, 12, 20, 21, 14, 18, 18, 7, 16, 12], [19, 19, 22, 17, 25, 18, 10, 19, 20, 11, 22, 8, 15, 21, 14, 15, 19, 18, 17, 14], [14, 20, 17, 14, 9, 21, 10, 16, 19, 16, 19, 16, 19, 6, 15, 16, 17, 18, 10, 16], [22, 19, 23, 17, 19, 17, 4, 17, 0, 8, 21, 3, 14, 18, 23, 1, 17, 0, 20, 9], [14, 14, 13, 8, 21, 10, 17, 16, 11, 15, 15, 12, 15, 17, 17, 14, 18, 21, 15, 20], [12, 13, 19, 17, 10, 16, 11, 18, 15, 4, 11, 8, 17, 14, 13, 17, 10, 21, 16, 18], [17, 17, 19, 18, 17, 15, 13, 14, 16, 20, 4, 16, 18, 14, 17, 10, 7, 11, 12, 18], [108, 111, 115, 116, 116, 116, 115, 113, 112, 110, 104, 99, 97, 97, 89, 87, 80, 88, 80, 75], [87, 92, 92, 94, 94, 95, 95, 93, 91, 89, 82, 84, 83, 77, 80, 76, 75, 71, 58, 50], [89, 81, 70, 72, 83, 84, 74, 77, 68, 73, 72, 70, 72, 67, 68, 62, 45, 46, 30, 24], [83, 78, 77, 80, 81, 80, 79, 78, 58, 70, 62, 64, 53, 63, 56, 55, 39, 37, 17, 22], [83, 82, 77, 72, 73, 70, 67, 59, 60, 69, 65, 60, 56, 62, 48, 49, 40, 28, 22, 18], [71, 76, 79, 79, 76, 76, 71, 70, 65, 69, 62, 56, 59, 48, 48, 36, 28, 24, 24, 18], [75, 75, 76, 77, 75, 75, 72, 68, 61, 64, 61, 53, 56, 51, 49, 32, 29, 23, 9, 12], [62, 63, 66, 67, 63, 62, 54, 61, 55, 51, 52, 50, 42, 26, 22, 19, 21, 6, 14, 14], [69, 66, 66, 64, 62, 62, 61, 63, 58, 55, 53, 47, 37, 36, 32, 25, 15, 17, 15, 18], [52, 51, 57, 48, 55, 51, 41, 43, 45, 37, 33, 23, 11, 18, 13, 14, 7, 18, 7, 16], [54, 46, 48, 50, 48, 44, 29, 43, 38, 21, 22, 18, 23, 23, 10, 11, 20, 22, 9, 18], [49, 49, 43, 50, 45, 42, 47, 46, 35, 39, 25, 28, 22, 19, 13, 14, 8, 15, 10, 6], [43, 46, 47, 51, 50, 50, 41, 27, 36, 29, 28, 20, 17, 23, 15, 18, 13, 19, 5, 6], [44, 46, 45, 46, 44, 41, 36, 34, 21, 16, 19, 15, 13, 21, 15, 20, 17, 15, 18, 12], [38, 31, 36, 34, 33, 23, 23, 13, 20, 11, 21, 18, 17, 19, 15, 18, 17, 4, 3, 7], [34, 26, 25, 16, 15, 16, 17, 12, 9, 17, 19, 14, 3, 16, 17, 0, 22, 9, 15, 19], [15, 29, 22, 25, 12, 20, 19, 13, 16, 20, 14, 15, 21, 0, 17, 16, 6, 10, 2, 10], [23, 27, 14, 21, 23, 13, 20, 24, 16, 12, 15, 13, 18, 18, 13, 12, 0, 19, 22, 11], [20, 19, 24, 17, 11, 16, 20, 21, 21, 10, 21, 21, 12, 13, 2, 19, 19, 19, 18, 10], [14, 28, 21, 21, 19, 18, 18, 9, 12, 3, 5, 14, 18, 18, 18, 6, 4, 18, 16, 11], [87, 88, 85, 85, 87, 86, 86, 85, 83, 78, 68, 71, 77, 76, 59, 68, 62, 58, 55, 40], [51, 48, 45, 51, 35, 46, 44, 45, 28, 40, 45, 41, 39, 39, 35, 24, 27, 16, 22, 21], [39, 35, 39, 38, 34, 32, 41, 38, 33, 36, 34, 30, 15, 28, 24, 16, 18, 22, 21, 7], [43, 43, 42, 40, 39, 38, 37, 33, 24, 15, 17, 26, 24, 22, 21, 23, 19, 23, 18, 13], [24, 25, 25, 12, 27, 20, 13, 22, 17, 23, 11, 15, 19, 11, 15, 19, 18, 13, 13, 9], [14, 23, 24, 16, 24, 21, 23, 12, 18, 21, 26, 17, 16, 3, 15, 11, 16, 13, 9, 20], [17, 29, 18, 22, 9, 11, 15, 17, 21, 20, 16, 16, 14, 16, 15, 8, 16, 12, 13, 15], [19, 17, 18, 26, 25, 8, 13, 9, 16, 12, 8, 11, 7, 16, 15, 9, 17, 18, 19, 16], [13, 13, 20, 11, 20, 19, 13, 19, 10, 13, 7, 19, 11, 17, 19, 16, 16, 21, 12, 20], [11, 14, 19, 15, 21, 15, 20, 10, 15, 18, 10, 16, 15, 13, 19, 9, 18, 13, 7, 18], [19, 12, 12, 17, 6, 18, 22, 20, 9, 22, 16, 16, 19, 7, 19, 9, 14, 18, 21, 19], [14, 16, 17, 17, 23, 17, 15, 18, 4, 15, 16, 6, 15, 18, 9, 13, 16, 15, 14, 3], [19, 18, 11, 12, 14, 22, 17, 9, 10, 10, 18, 23, 1, 18, 16, 8, 16, 7, 13, 21], [15, 12, 1, 22, 14, 16, 15, 22, 18, 19, 20, 19, 25, 14, 18, 13, 22, 20, 18, 18], [15, 13, 25, 13, 18, 18, 18, 13, 15, 17, 15, 9, 13, 14, 7, 13, 18, 12, 16, 10], [18, 17, 11, 15, 22, 18, 18, 11, 14, 16, 9, 22, 6, 14, 11, 11, 16, 24, 6, 13], [17, 16, 17, 16, 16, 20, 12, 13, 20, 21, 2, 20, 14, 18, 18, 16, 2, 14, 19, 19], [73, 98, 95, 94, 96, 95, 95, 95, 92, 88, 79, 81, 87, 85, 66, 76, 71, 67, 65, 53], [63, 60, 66, 68, 62, 64, 58, 63, 54, 39, 50, 49, 46, 44, 40, 36, 30, 22, 16, 24], [54, 42, 52, 39, 39, 42, 48, 42, 37, 42, 43, 23, 42, 38, 30, 24, 20, 18, 14, 15], [51, 60, 56, 55, 53, 49, 49, 45, 45, 44, 44, 41, 32, 26, 27, 26, 22, 22, 8, 14], [33, 29, 20, 31, 29, 13, 28, 36, 32, 27, 30, 11, 24, 18, 21, 12, 17, 19, 12, 16], [20, 24, 30, 22, 22, 21, 18, 23, 24, 12, 16, 15, 15, 15, 13, 17, 16, 10, 12, 21], [15, 25, 25, 21, 19, 16, 22, 24, 16, 15, 16, 17, 15, 16, 16, 18, 18, 19, 18, 12], [12, 22, 21, 11, 24, 15, 17, 18, 6, 14, 9, 17, 18, 16, 11, 15, 13, 10, 14, 10], [19, 18, 22, 7, 17, 18, 6, 21, 22, 10, 21, 14, 15, 10, 17, 14, 23, 17, 16, 16], [14, 16, 12, 22, 24, 21, 20, 13, 17, 19, 13, 14, 15, 8, 9, 18, 5, 6, 11, 21], [25, 21, 24, 12, 0, 20, 18, 13, 19, 22, 20, 22, 18, 19, 19, 16, 10, 15, 11, 16], [25, 17, 21, 20, 17, 19, 23, 10, 18, 23, 19, 16, 14, 7, 19, 11, 7, 19, 18, 5], [11, 12, 20, 11, 18, 13, 15, 15, 19, 10, 19, 20, 19, 15, 5, 18, 17, 19, 21, 15], [16, 13, 19, 12, 19, 20, 21, 12, 22, 12, 10, 18, 20, 18, 24, 13, 13, 16, 12, 13], [14, 16, 8, 17, 12, 20, 23, 19, 9, 9, 14, 16, 14, 16, 23, 21, 18, 13, 0, 20], [18, 12, 18, 11, 16, 15, 19, 19, 19, 15, 16, 8, 12, 16, 18, 10, 10, 18, 23, 18], [20, 4, 10, 21, 6, 14, 20, 17, 20, 20, 6, 21, 13, 16, 19, 23, 17, 14, 5, 6], [59, 105, 113, 108, 108, 109, 109, 108, 106, 101, 84, 96, 101, 97, 85, 88, 83, 80, 73, 64], [35, 87, 79, 83, 93, 87, 82, 85, 78, 81, 74, 84, 64, 69, 69, 60, 57, 52, 42, 35], [26, 79, 71, 81, 67, 75, 74, 65, 65, 72, 57, 68, 59, 44, 56, 47, 34, 29, 19, 16], [19, 84, 82, 78, 72, 72, 71, 69, 72, 72, 60, 53, 46, 39, 38, 35, 25, 22, 15, 18], [20, 65, 67, 67, 70, 66, 65, 64, 63, 60, 57, 49, 44, 41, 23, 14, 16, 22, 13, 11], [9, 59, 44, 58, 62, 60, 59, 57, 57, 53, 38, 38, 32, 19, 12, 22, 0, 5, 13, 19], [19, 66, 65, 63, 54, 51, 40, 58, 56, 50, 47, 47, 35, 14, 19, 10, 20, 18, 19, 20], [13, 60, 60, 50, 34, 38, 44, 36, 45, 42, 35, 28, 22, 17, 18, 2, 18, 12, 20, 13], [10, 55, 55, 56, 51, 49, 45, 42, 35, 38, 32, 35, 25, 20, 20, 16, 21, 16, 11, 18], [19, 44, 43, 48, 45, 40, 31, 16, 27, 19, 11, 10, 0, 19, 4, 10, 5, 11, 7, 4], [3, 33, 40, 38, 35, 34, 22, 31, 24, 22, 24, 13, 13, 12, 14, 23, 12, 19, 22, 18], [13, 35, 39, 41, 35, 31, 28, 28, 23, 22, 19, 14, 18, 18, 19, 21, 17, 20, 14, 22], [20, 32, 38, 34, 27, 21, 17, 9, 8, 15, 11, 18, 21, 13, 11, 25, 16, 12, 13, 15], [7, 32, 31, 28, 36, 33, 16, 25, 11, 17, 14, 10, 15, 19, 21, 18, 16, 12, 18, 17], [20, 21, 15, 19, 24, 21, 23, 22, 13, 20, 7, 10, 25, 17, 21, 21, 22, 19, 21, 9], [14, 25, 22, 20, 14, 12, 8, 13, 15, 23, 14, 23, 7, 10, 15, 19, 19, 14, 10, 7], [6, 27, 28, 24, 26, 11, 21, 16, 18, 13, 12, 15, 24, 11, 13, 18, 14, 12, 13, 13], [78, 77, 78, 78, 72, 63, 73, 72, 72, 72, 69, 67, 67, 68, 62, 61, 54, 35, 41, 38], [46, 47, 49, 53, 53, 52, 52, 51, 49, 45, 38, 42, 42, 36, 24, 29, 19, 19, 23, 12], [32, 37, 31, 26, 36, 27, 29, 28, 27, 19, 36, 34, 31, 21, 21, 26, 20, 17, 17, 14], [26, 28, 25, 23, 19, 20, 25, 24, 17, 21, 13, 23, 11, 21, 19, 16, 13, 13, 16, 20], [18, 22, 18, 21, 6, 16, 14, 11, 16, 11, 3, 18, 8, 20, 15, 19, 9, 26, 21, 15], [16, 16, 21, 15, 19, 13, 17, 7, 13, 20, 11, 11, 17, 11, 18, 14, 14, 20, 17, 10], [23, 23, 19, 18, 21, 13, 8, 13, 22, 6, 20, 20, 19, 14, 7, 10, 18, 8, 15, 19], [23, 20, 11, 14, 8, 16, 16, 13, 20, 9, 23, 18, 15, 17, 7, 13, 14, 11, 13, 14], [19, 15, 23, 19, 18, 23, 18, 26, 15, 16, 19, 17, 14, 6, 16, 19, 8, 23, 18, 18], [9, 14, 16, 11, 19, 7, 13, 16, 6, 21, 19, 18, 16, 19, 22, 19, 7, 6, 19, 22], [10, 7, 10, 20, 13, 12, 16, 13, 14, 23, 16, 15, 8, 21, 14, 16, 7, 19, 21, 7], [17, 4, 18, 12, 19, 15, 22, 23, 17, 7, 18, 7, 13, 23, 20, 17, 14, 18, 21, 21], [11, 10, 17, 9, 15, 8, 8, 20, 21, 16, 14, 22, 9, 18, 17, 11, 17, 15, 20, 11], [94, 92, 91, 93, 88, 80, 77, 75, 75, 72, 73, 72, 77, 76, 68, 70, 64, 47, 50, 43], [53, 59, 50, 59, 60, 55, 52, 50, 48, 54, 54, 41, 47, 49, 41, 35, 34, 26, 17, 24], [59, 51, 53, 55, 55, 52, 56, 55, 50, 51, 53, 45, 41, 41, 18, 22, 7, 0, 20, 20], [39, 41, 41, 37, 41, 41, 39, 39, 36, 33, 31, 9, 24, 6, 19, 9, 12, 20, 6, 19], [31, 33, 33, 25, 24, 30, 30, 23, 16, 13, 13, 19, 17, 16, 20, 12, 21, 17, 13, 9], [26, 20, 21, 20, 24, 18, 20, 16, 15, 17, 19, 20, 14, 8, 21, 15, 20, 14, 4, 11], [24, 22, 16, 20, 23, 17, 17, 22, 20, 16, 16, 20, 2, 15, 8, 19, 21, 21, 17, 14], [23, 26, 13, 12, 17, 19, 18, 21, 13, 20, 20, 13, 14, 8, 21, 9, 22, 14, 4, 14], [23, 14, 16, 18, 22, 16, 10, 13, 17, 22, 12, 19, 18, 22, 14, 16, 21, 19, 9, 15], [20, 22, 19, 22, 17, 13, 19, 17, 19, 22, 15, 19, 16, 20, 10, 18, 11, 21, 21, 12], [16, 16, 19, 16, 11, 13, 20, 9, 15, 18, 21, 17, 17, 19, 17, 21, 12, 10, 11, 24], [21, 14, 15, 15, 14, 14, 18, 14, 22, 21, 13, 18, 18, 19, 14, 16, 19, 21, 18, 9], [23, 21, 16, 23, 7, 19, 20, 19, 21, 18, 11, 18, 15, 10, 18, 20, 6, 17, 12, 23], [54, 103, 98, 103, 101, 100, 92, 89, 91, 89, 77, 86, 87, 85, 80, 78, 75, 66, 52, 51], [32, 88, 87, 86, 86, 86, 84, 86, 85, 80, 71, 68, 78, 70, 67, 63, 54, 41, 40, 30], [23, 80, 69, 69, 74, 70, 71, 67, 57, 63, 62, 58, 50, 51, 43, 44, 34, 27, 25, 24], [19, 65, 58, 65, 66, 66, 66, 59, 56, 45, 57, 51, 21, 42, 30, 29, 16, 16, 14, 20], [24, 58, 62, 61, 55, 46, 56, 51, 46, 49, 50, 47, 42, 29, 27, 23, 10, 22, 24, 18], [21, 51, 51, 32, 41, 36, 33, 31, 37, 36, 29, 25, 17, 20, 9, 20, 17, 12, 11, 18], [16, 55, 52, 50, 41, 42, 37, 42, 28, 29, 21, 21, 6, 10, 11, 18, 16, 17, 14, 16], [20, 38, 44, 43, 40, 42, 35, 36, 25, 32, 22, 23, 20, 8, 12, 16, 10, 17, 18, 20], [10, 48, 44, 39, 34, 21, 20, 26, 24, 27, 21, 21, 19, 13, 21, 17, 15, 19, 17, 16], [22, 34, 36, 30, 26, 27, 25, 13, 16, 22, 18, 17, 20, 18, 13, 21, 18, 9, 17, 18], [19, 18, 27, 21, 25, 20, 14, 13, 1, 10, 17, 20, 11, 21, 1, 15, 17, 19, 8, 26], [12, 28, 29, 23, 22, 16, 20, 24, 18, 10, 1, 21, 17, 17, 17, 8, 21, 12, 16, 18], [12, 27, 19, 19, 17, 16, 21, 15, 10, 20, 20, 17, 12, 20, 15, 20, 20, 24, 15, 19], [67, 70, 78, 81, 81, 78, 78, 78, 73, 71, 68, 63, 66, 67, 60, 56, 51, 50, 29, 37], [47, 52, 53, 56, 56, 55, 54, 53, 47, 40, 40, 41, 27, 30, 27, 25, 7, 16, 22, 18], [22, 33, 35, 36, 34, 37, 36, 35, 24, 17, 22, 18, 21, 23, 7, 16, 16, 19, 8, 15], [24, 26, 23, 20, 18, 18, 22, 24, 17, 17, 16, 19, 21, 13, 12, 16, 21, 24, 0, 12], [18, 20, 15, 26, 21, 22, 22, 16, 21, 11, 15, 17, 18, 17, 25, 24, 23, 18, 9, 12], [21, 7, 17, 16, 15, 16, 17, 20, 18, 13, 20, 16, 19, 20, 14, 8, 11, 18, 15, 18], [14, 13, 19, 18, 20, 19, 7, 15, 23, 21, 19, 18, 15, 16, 17, 18, 22, 15, 16, 13], [16, 26, 23, 21, 23, 9, 14, 22, 12, 16, 17, 23, 14, 16, 15, 13, 18, 21, 19, 15], [17, 6, 6, 15, 21, 25, 17, 23, 17, 20, 19, 16, 27, 18, 12, 14, 21, 10, 23, 11], [22, 11, 8, 20, 6, 21, 23, 17, 22, 20, 24, 22, 18, 24, 16, 11, 25, 17, 19, 20], [21, 14, 20, 22, 19, 26, 14, 18, 16, 12, 19, 24, 19, 24, 12, 20, 17, 23, 16, 21], [85, 90, 94, 96, 95, 95, 95, 95, 92, 89, 83, 77, 78, 79, 73, 72, 63, 63, 32, 46], [62, 61, 63, 63, 66, 65, 63, 63, 56, 46, 47, 52, 34, 38, 37, 34, 19, 18, 15, 21], [38, 48, 49, 49, 44, 43, 43, 41, 31, 31, 38, 35, 18, 30, 27, 22, 21, 17, 19, 23], [40, 40, 36, 30, 28, 24, 24, 30, 31, 27, 24, 21, 14, 17, 24, 10, 15, 13, 14, 22], [23, 34, 21, 26, 23, 28, 19, 20, 25, 20, 16, 15, 9, 12, 23, 3, 25, 7, 22, 7], [23, 19, 18, 20, 25, 16, 16, 19, 26, 20, 21, 18, 11, 19, 23, 21, 19, 17, 18, 22], [23, 26, 13, 20, 21, 18, 12, 9, 12, 12, 19, 19, 8, 19, 19, 16, 19, 18, 17, 19], [12, 20, 19, 18, 19, 14, 24, 15, 26, 16, 21, 8, 15, 16, 17, 20, 13, 15, 17, 20], [21, 17, 13, 18, 20, 17, 19, 23, 17, 22, 24, 1, 23, 14, 11, 12, 17, 16, 12, 12], [16, 5, 15, 20, 15, 14, 11, 20, 18, 14, 14, 12, 13, 19, 16, 13, 21, 5, 13, 11], [14, 21, 15, 20, 19, 17, 15, 19, 21, 18, 23, 7, 21, 8, 15, 17, 22, 14, 21, 22], [102, 107, 110, 112, 111, 111, 111, 111, 108, 105, 98, 91, 94, 93, 89, 84, 77, 76, 57, 57], [86, 86, 88, 89, 92, 91, 86, 77, 79, 68, 69, 74, 64, 67, 62, 56, 31, 37, 21, 16], [66, 72, 65, 53, 67, 64, 65, 60, 57, 47, 44, 49, 47, 42, 37, 29, 15, 20, 17, 18], [63, 64, 60, 37, 47, 52, 57, 55, 52, 49, 47, 47, 42, 24, 25, 18, 22, 13, 20, 16], [53, 52, 48, 45, 51, 52, 50, 49, 27, 42, 40, 29, 23, 12, 21, 8, 12, 22, 23, 10], [41, 44, 43, 38, 38, 28, 34, 30, 22, 21, 24, 18, 16, 10, 17, 17, 15, 20, 20, 12], [46, 43, 40, 29, 21, 30, 24, 28, 25, 23, 22, 11, 15, 16, 15, 18, 14, 16, 13, 18], [31, 37, 36, 35, 24, 29, 21, 20, 9, 20, 21, 16, 20, 16, 13, 20, 18, 20, 24, 22], [29, 25, 30, 18, 24, 12, 20, 24, 20, 18, 15, 19, 17, 13, 19, 10, 22, 8, 14, 20], [24, 28, 20, 18, 21, 16, 19, 2, 19, 13, 11, 21, 19, 20, 17, 25, 15, 20, 12, 14], [26, 28, 23, 23, 14, 18, 21, 23, 16, 13, 18, 23, 20, 14, 15, 19, 23, 19, 18, 19], [65, 73, 67, 72, 69, 67, 65, 65, 58, 54, 57, 48, 56, 37, 40, 42, 36, 31, 24, 19], [45, 45, 43, 42, 43, 40, 42, 41, 43, 42, 30, 36, 23, 15, 23, 8, 23, 21, 19, 22], [26, 21, 28, 26, 24, 20, 22, 20, 22, 14, 21, 20, 15, 20, 22, 11, 16, 21, 13, 18], [30, 32, 34, 35, 31, 32, 19, 18, 27, 15, 15, 11, 21, 18, 13, 12, 16, 18, 15, 11], [21, 25, 23, 22, 6, 12, 19, 12, 21, 21, 17, 20, 7, 19, 10, 23, 18, 17, 16, 10], [24, 25, 25, 26, 22, 18, 25, 23, 14, 21, 15, 21, 10, 15, 12, 12, 13, 17, 15, 19], [22, 13, 10, 21, 19, 22, 22, 21, 24, 8, 18, 19, 20, 14, 12, 19, 8, 19, 13, 16], [21, 25, 17, 13, 20, 18, 17, 23, 23, 23, 21, 14, 15, 20, 23, 16, 21, 18, 21, 21], [17, 14, 14, 12, 23, 15, 16, 15, 22, 13, 26, 23, 18, 23, 14, 12, 16, 19, 13, 19], [89, 93, 90, 92, 90, 87, 88, 85, 85, 82, 62, 72, 77, 71, 64, 58, 51, 41, 25, 26], [43, 59, 52, 46, 52, 48, 46, 50, 48, 50, 20, 46, 34, 13, 22, 26, 20, 22, 16, 18], [27, 36, 33, 37, 28, 31, 33, 31, 32, 21, 19, 20, 16, 17, 15, 20, 13, 23, 10, 13], [32, 42, 28, 27, 29, 32, 35, 33, 28, 31, 23, 19, 16, 20, 23, 23, 21, 16, 22, 20], [29, 22, 26, 33, 27, 24, 22, 24, 10, 15, 14, 16, 18, 17, 14, 5, 19, 14, 16, 23], [10, 22, 20, 13, 19, 21, 25, 20, 21, 23, 13, 9, 17, 17, 15, 20, 20, 21, 19, 10], [23, 18, 18, 22, 24, 29, 18, 15, 23, 21, 20, 20, 10, 15, 22, 16, 23, 17, 21, 18], [24, 11, 7, 8, 18, 17, 21, 16, 19, 24, 21, 23, 13, 22, 18, 19, 21, 16, 21, 27], [105, 107, 106, 106, 105, 104, 103, 101, 101, 97, 77, 91, 91, 86, 77, 70, 64, 54, 46, 40], [83, 80, 79, 68, 63, 78, 75, 73, 68, 72, 63, 66, 56, 56, 46, 31, 15, 8, 15, 18], [55, 51, 52, 56, 48, 51, 53, 47, 41, 40, 20, 34, 36, 28, 19, 20, 20, 19, 21, 19], [56, 53, 50, 40, 47, 54, 54, 49, 28, 50, 39, 40, 35, 30, 19, 26, 25, 28, 16, 21], [38, 43, 37, 41, 39, 39, 41, 40, 29, 20, 19, 20, 21, 21, 15, 12, 14, 17, 18, 11], [46, 38, 38, 33, 30, 29, 28, 22, 17, 17, 14, 12, 12, 15, 24, 18, 16, 19, 17, 15], [31, 38, 25, 27, 13, 21, 20, 19, 12, 15, 19, 24, 17, 13, 17, 20, 17, 18, 21, 16], [16, 23, 23, 27, 18, 26, 16, 15, 12, 8, 13, 22, 15, 15, 16, 18, 14, 22, 23, 22], [18, 24, 19, 25, 25, 21, 13, 12, 15, 19, 18, 23, 22, 12, 22, 16, 16, 26, 17, 20], [61, 58, 51, 66, 50, 61, 47, 51, 45, 56, 52, 50, 39, 48, 35, 37, 27, 31, 28, 25], [42, 43, 39, 37, 37, 42, 40, 29, 33, 23, 35, 29, 23, 23, 14, 21, 17, 17, 23, 21], [32, 23, 15, 21, 28, 32, 23, 25, 14, 25, 21, 20, 18, 23, 21, 18, 16, 8, 19, 12], [16, 18, 26, 24, 20, 24, 23, 19, 22, 17, 18, 19, 3, 19, 23, 18, 9, 11, 19, 14], [21, 24, 24, 14, 22, 13, 21, 24, 16, 25, 9, 16, 16, 20, 22, 18, 8, 23, 18, 15], [14, 21, 17, 25, 21, 18, 20, 20, 20, 24, 19, 18, 23, 20, 22, 15, 25, 18, 21, 18], [18, 18, 19, 23, 18, 16, 19, 14, 20, 22, 13, 19, 24, 19, 20, 23, 27, 20, 20, 23], [83, 78, 76, 78, 69, 69, 74, 77, 67, 77, 70, 70, 66, 66, 53, 52, 42, 32, 26, 23], [52, 53, 49, 49, 43, 35, 47, 42, 42, 40, 36, 37, 29, 23, 22, 19, 24, 25, 18, 19], [37, 39, 33, 34, 28, 33, 28, 27, 27, 27, 12, 24, 26, 19, 23, 20, 17, 18, 20, 14], [28, 24, 23, 28, 24, 22, 26, 26, 23, 24, 26, 26, 20, 20, 19, 22, 24, 13, 17, 20], [28, 15, 22, 23, 28, 25, 15, 25, 22, 20, 21, 20, 23, 21, 20, 27, 16, 19, 16, 19], [8, 19, 22, 25, 21, 25, 16, 21, 20, 20, 22, 26, 26, 19, 21, 14, 23, 23, 13, 16], [19, 14, 23, 25, 24, 24, 15, 26, 22, 20, 22, 22, 19, 21, 23, 22, 14, 18, 19, 21], [108, 106, 101, 101, 89, 89, 96, 101, 94, 98, 88, 90, 87, 76, 72, 69, 51, 51, 25, 21], [81, 73, 80, 81, 70, 77, 73, 64, 58, 60, 61, 52, 42, 46, 35, 28, 21, 20, 19, 15], [64, 60, 58, 61, 63, 56, 61, 52, 46, 43, 43, 23, 27, 21, 16, 23, 21, 21, 21, 11], [49, 54, 48, 58, 55, 33, 46, 48, 46, 25, 32, 27, 23, 20, 22, 18, 21, 12, 20, 13], [39, 43, 47, 37, 38, 29, 35, 32, 28, 20, 10, 16, 17, 12, 23, 13, 20, 17, 22, 22], [33, 32, 23, 34, 27, 29, 21, 16, 21, 18, 20, 14, 9, 19, 18, 22, 11, 21, 15, 20], [18, 27, 17, 24, 27, 18, 25, 24, 23, 20, 22, 16, 19, 24, 18, 21, 20, 21, 25, 16], [61, 71, 70, 72, 63, 58, 56, 54, 58, 50, 46, 50, 46, 34, 37, 28, 25, 26, 26, 25], [30, 40, 37, 38, 33, 31, 34, 31, 27, 30, 22, 22, 19, 25, 21, 21, 14, 17, 20, 25], [25, 30, 22, 26, 28, 24, 28, 24, 14, 20, 19, 19, 15, 23, 14, 18, 16, 16, 20, 18], [26, 19, 25, 22, 21, 20, 27, 16, 22, 15, 19, 18, 14, 22, 22, 22, 22, 18, 18, 22], [17, 23, 20, 20, 26, 21, 14, 23, 17, 8, 24, 21, 20, 8, 17, 20, 20, 20, 19, 24], [22, 23, 24, 23, 21, 20, 16, 27, 27, 18, 20, 18, 17, 19, 18, 14, 15, 19, 16, 19], [72, 82, 85, 83, 81, 79, 73, 68, 75, 69, 67, 69, 58, 51, 53, 46, 40, 35, 29, 25], [49, 49, 54, 52, 39, 45, 46, 37, 29, 40, 35, 28, 29, 26, 17, 23, 20, 27, 17, 20], [33, 36, 31, 33, 32, 35, 32, 35, 28, 28, 24, 23, 18, 22, 13, 19, 19, 22, 17, 19], [28, 28, 29, 27, 27, 25, 28, 21, 17, 20, 20, 24, 20, 23, 22, 19, 21, 15, 19, 22], [25, 26, 26, 22, 9, 24, 19, 20, 22, 23, 18, 14, 16, 22, 19, 26, 22, 22, 23, 21], [82, 93, 96, 100, 99, 94, 90, 83, 91, 79, 81, 80, 69, 66, 62, 54, 43, 35, 17, 21], [68, 66, 71, 61, 53, 64, 63, 57, 45, 51, 44, 40, 33, 28, 17, 25, 20, 24, 14, 16], [41, 51, 49, 50, 47, 48, 42, 39, 32, 29, 20, 23, 23, 22, 19, 20, 17, 27, 14, 12], [39, 43, 43, 37, 34, 36, 26, 26, 20, 17, 24, 21, 18, 21, 14, 11, 23, 16, 15, 23], [32, 30, 31, 26, 25, 21, 24, 23, 18, 16, 25, 25, 20, 17, 24, 24, 13, 19, 17, 23], [63, 69, 56, 66, 51, 62, 55, 47, 48, 45, 37, 37, 30, 28, 28, 23, 28, 23, 17, 25], [29, 28, 28, 34, 25, 32, 29, 28, 27, 21, 17, 20, 19, 22, 23, 19, 25, 16, 23, 21], [22, 23, 28, 28, 22, 27, 28, 20, 24, 22, 21, 23, 24, 24, 24, 25, 26, 15, 19, 27], [70, 84, 83, 83, 78, 70, 67, 64, 77, 66, 70, 66, 55, 52, 47, 35, 30, 26, 26, 25], [45, 55, 40, 47, 42, 46, 42, 36, 37, 37, 32, 22, 17, 24, 19, 14, 21, 27, 22, 18], [31, 32, 36, 34, 24, 23, 22, 19, 21, 24, 24, 20, 22, 23, 19, 15, 15, 20, 21, 21], [23, 24, 25, 29, 28, 22, 26, 22, 19, 25, 23, 22, 24, 24, 22, 23, 19, 18, 25, 23], [83, 91, 97, 98, 91, 90, 93, 89, 89, 78, 80, 76, 65, 65, 55, 41, 36, 27, 18, 22], [70, 68, 58, 58, 66, 61, 62, 53, 48, 47, 46, 33, 18, 24, 26, 20, 17, 16, 19, 16], [46, 52, 51, 47, 39, 41, 41, 27, 32, 29, 26, 22, 25, 17, 18, 19, 21, 16, 26, 24], [34, 36, 36, 36, 32, 27, 29, 23, 21, 21, 27, 17, 13, 26, 23, 19, 20, 25, 24, 18]]}\n"
  },
  {
    "path": "amy/sineclock.py",
    "content": "import amy, math, datetime\n\ntry:\n  amy.live(playback_device_id=1)\n  running_amyboard = False\nexcept:\n  running_amyboard = True\n\n# Reserve 3 oscs x 3 \"hands\"\namy.send(synth=16, num_voices=1, oscs_per_voice=9)\n\ndef setup_triple(\n    synth=16, base_osc=0, base_freq=200.0, freq_dev=5.0, period_sec=60, phase=0, vel=1\n):\n  # Osc+2 is the mod osc\n  amy.send(synth=synth, osc=base_osc + 2, freq=1.0/period_sec,\n           phase=phase - 0.25)  # Want it at lowest value when phase = now.\n  # Osc+1 is the moving sine\n  mid_freq = base_freq + freq_dev / 2\n  mod_depth = math.log2(mid_freq / base_freq)  # -1 x this deviation brings down to base_freq\n  amy.send(synth=synth, osc=base_osc + 1, mod_source=base_osc + 2,\n           freq={'const': mid_freq, 'mod': mod_depth})\n  # Osc+0 is the fixed sine\n  amy.send(synth=synth, osc=base_osc, freq=base_freq)\n  # Start the two sounding oscs\n  amy.send(synth=synth, osc=base_osc, phase=0, vel=vel)\n  amy.send(synth=synth, osc=base_osc + 1, phase=0, vel=vel)\n\ndef start_sine_clock(hour, minute, second, vel=0.1):\n  # One-minute cycle\n  setup_triple(base_osc=0, vel=vel, base_freq=200,\n               period_sec=60, phase=second / 60)\n  # One-hour cycle\n  setup_triple(base_osc=3, vel=vel, base_freq=300,\n               period_sec=60 * 60,\n               phase=(60 * minute + second) / (60 * 60))\n  # One day cycle\n  setup_triple(base_osc=6, vel=vel, base_freq=450,\n               period_sec=60 * 60 * 24,\n               phase=(3600 * hour + 60 * minute + second) / (60 * 60 * 24))\n\ntry:\n  import datetime\n  vel = 0.1\n  now = datetime.datetime.now()\n  print(now)\n  start_sine_clock(hour=now.hour, minute=now.minute, second=now.second, vel=vel)\nexcept ImportError:\n  pass\n\n                   \n"
  },
  {
    "path": "amy/test.py",
    "content": "import sys\nimport os\nimport random\nimport string\nimport tempfile\n\nimport numpy as np\nimport scipy.io.wavfile as wav\n\nimport amy\nimport c_amy as _amy\nimport time\n\nfrom . import constants\n\ndef wavread(filename):\n  \"\"\"Read in audio data from a wav file.  Return d, sr.\"\"\"\n  # Read in wav file.\n  file_handle = open(filename, 'rb')\n  samplerate, wave_data = wav.read(file_handle)\n  # Normalize short ints to floats in range [-1..1).\n  data = (wave_data.astype(np.float32)) / 32768.0\n  return data, samplerate\n\n\ndef rms(samples):\n  return np.sqrt(np.mean(samples ** 2))\n\n\ndef dB(level):\n  return 20 * np.log10(level + 1e-5)\n\n\n\nclass AmyTest:\n\n  ref_dir = './tests/ref'\n  test_dir = './tests/tst'\n\n  def __init__(self):\n    self.default_synths = False\n\n  def test(self):\n    name = self.__class__.__name__\n    _amy.stop()\n    _amy.start(1 if self.default_synths else 0)\n    self.run()\n\n    samples = amy.render(1.0)\n    amy.write(samples, os.path.join(self.test_dir, name + '.wav'))\n    rms_x = dB(rms(samples))\n    message = ('%-32s:' % name) + (' signal=%5.1f dB' % rms_x)\n\n    ref_file = os.path.join(self.ref_dir, name + '.wav')\n    try:\n      expected_samples, _ = wavread(ref_file)\n\n      rms_n = dB(rms(samples - expected_samples))\n      message += (' err=%.1f dB' % rms_n)\n\n    except FileNotFoundError:\n      message += ' / Unable to read ' + ref_file\n      rms_n = 0\n\n    # For now, any value above this threshold counts as a failed test\n    threshold = float(os.environ.get('AMY_TEST_THRESHOLD_DB', '-100.0'))\n    test_passed = (rms_n <= threshold)\n    return test_passed, message\n\n\nclass TestSineOsc(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SINE, freq=1000)\n    amy.send(time=100, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestPulseOsc(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.PULSE, freq=1000)\n    amy.send(time=100, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestSawDownOsc(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN)\n    amy.send(time=100, note=48, vel=1)\n    amy.send(time=900, vel=0)\n\n\nclass TestSawUpOsc(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SAW_UP)\n    amy.send(time=100, note=46, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestTriangleOsc(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.TRIANGLE, freq=1000)\n    amy.send(time=100, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestNoiseOsc(AmyTest):\n\n  def run(self):\n    # If this is the first time noise is called, the waveform should be deterministic.\n    amy.send(time=0, osc=0, wave=amy.NOISE, freq=1000)\n    amy.send(time=100, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestPcm(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.PCM, preset=1)\n    amy.send(time=100, vel=1)\n\n\nclass TestPcmShift(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.PCM, preset=10)\n    # Cowbell with no note should play at \"default\" pitch, midi 69 (for that preset)\n    amy.send(time=100, vel=1)\n    # Specifying a note should shift its pitch.\n    amy.send(time=500, note=70, vel=1)\n\n\nclass TestPcmPatchChange(AmyTest):\n  \"\"\"There was a bug where switching PCM preset would persist the base note of the preceding preset.\"\"\"\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.PCM, preset=9)  # Clap\n    amy.send(time=100, vel=1)\n    amy.send(time=450, preset=10)  # Cowbell\n    amy.send(time=500, vel=1)\n\n\nclass TestPcmLoop(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.PCM, preset=10, feedback=1)\n    amy.send(time=100, osc=0, vel=1)\n    amy.send(time=500, osc=0, vel=0)\n\n\nclass TestPcmLoopEnvFilt(AmyTest):\n  \"\"\"Check that filter, amp-env, and pitch mod apply to PCM.\"\"\"\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.PCM, preset=10, feedback=1)\n    amy.send(time=0, osc=0, filter_type=amy.FILTER_LPF24, filter_freq='200,0,0,0,3', bp1='0,1,500,0,200,0')\n    amy.send(time=0, osc=0, bp0='100,1,1000,0,1000,0')\n    amy.send(time=0, osc=1, freq='1')\n    amy.send(time=0, osc=0, mod_source=1, freq=',,,,,-0.2')\n    amy.send(time=100, osc=0, note=64, vel=5)\n    amy.send(time=500, osc=0, vel=0)\n\n\nclass TestBuildYourOwnPartials(AmyTest):\n\n  def run(self):\n    # PARTIALS but you have to configure the freq and amp of each partial yourself\n    num_partials = 16\n    base_freq = constants.ZERO_LOGFREQ_IN_HZ\n    base_osc = 0\n    amy.send(time=0, osc=base_osc, wave=amy.BYO_PARTIALS, num_partials=num_partials, eg0='0,1,30000,0')\n    for i in range(1, num_partials + 1):\n      # Set up each partial as the corresponding harmonic of the base_freq, with an amplitude of 1/N, 50ms attack, and a decay of 1 sec / N\n      # Note that \"vel sentivity\" in amp actually means \"Sensitivity to parent osc amplitude\", since it is passed down through a modified vel.\n      amy.send(osc=base_osc + i, wave=amy.PARTIAL, freq=base_freq * i, eg0='50,1,%d,0,50,0' % (1000 // i),\n               amp='%.2f,0,1,1' % (1.0 / i))\n    amy.send(time=100, osc=0, note=60, vel=0.5)\n    amy.send(time=200, osc=0, note=72, vel=1)\n    amy.send(time=800, osc=0, note=72, vel=0)\n\n\nclass TestBYOPVoices(AmyTest):\n\n  def run(self):\n    # Does build-your-own-partials work with the voices mechanism?\n    num_partials = 4\n    base_freq = constants.ZERO_LOGFREQ_IN_HZ\n    s = 'v0w%dp%dZ' % (amy.BYO_PARTIALS, num_partials) + ''.join(['v%dw%dZ' % (i + 1, amy.PARTIAL) for i in range(num_partials)])\n    #amy.send(patchr=1024, patch_string=s)\n    #amy.send(time=0, voices='0,1,2,3', patch=1024)\n    amy.send(time=0, voices='0,1,2,3', patch_string=s)\n    for i in range(num_partials):\n      amy.send(voices='0,1,2,3', osc=i + 1, freq=base_freq * (i + 1), bp0='50,1,%d,0,50,0' % (600 // (i + 1)))\n    amy.send(time=100, voices=0, note=60, vel=1)\n    amy.send(time=200, voices=1, note=63, vel=1)\n    amy.send(time=300, voices=2, note=67, vel=1)\n    amy.send(time=400, voices=3, note=70, vel=1)\n\n\nclass TestBYOPNoteOff(AmyTest):\n\n  def run(self):\n    # Partials were not seeing note-offs.\n    num_partials = 8\n    base_freq = constants.ZERO_LOGFREQ_IN_HZ\n    s = 'v0w%dp%dZ' % (amy.BYO_PARTIALS, num_partials) + ''.join(['v%dw%dZ' % (i + 1, amy.PARTIAL) for i in range(num_partials)])\n    amy.send(patch=1024, patch_string=s)\n    amy.send(time=0, voices='0,1', patch=1024)\n    for i in range(num_partials):\n      amy.send(voices='0,1', osc=i + 1, freq=base_freq * (i + 1), bp0='50,1,%d,%f,200,0' % (1000 // (i + 1), 1 / (i + 1)))\n    amy.send(voices='0,1', bp0='0,1,1000,0')  # Parent osc env is slow release to be able to see partials.\n    amy.send(time=100, voices=1, note=60, vel=1)\n    amy.send(time=700, voices=1, vel=0)\n\n\nclass TestInterpPartials(AmyTest):\n\n  def run(self):\n    # PARTIALS but each partial is interpolated from a table of pre-analyzed harmonic-sets.\n    base_osc = 0\n    num_partials = 25  # Doesn't do anything?\n    amy.send(time=0, osc=base_osc, wave=amy.INTERP_PARTIALS, preset=0, amp='1,0,0,0')\n    for i in range(1, num_partials + 1):\n      amy.send(osc=base_osc + i, wave=amy.PARTIAL, amp='1,0,1,1')\n    amy.send(time=50, osc=0, note=60, vel=0.1)\n    amy.send(time=300, osc=0, note=67, vel=0.6)\n    amy.send(time=550, osc=0, note=72, vel=1)\n    amy.send(time=800, osc=0, vel=0)\n\n\nclass TestInterpPartialsRetrigger(AmyTest):\n\n  def run(self):\n    base_osc = 0\n    num_partials = 20\n    amy.send(time=0, osc=base_osc, wave=amy.INTERP_PARTIALS, preset=0, amp='1,0,0,0')\n    for i in range(1, num_partials + 1):\n      amy.send(osc=base_osc + i, wave=amy.PARTIAL)\n    amy.send(time=50, osc=0, note=52, vel=0.7)\n    amy.send(time=200, osc=0, note=52, vel=0.8)\n    amy.send(time=350, osc=0, note=52, vel=0.9)\n    amy.send(time=500, osc=0, vel=0)\n    amy.send(time=510, osc=100, wave=amy.SINE, bp0='3,1,500,0,50,0')\n    amy.send(time=550, osc=100, note=76, vel=1)\n    amy.send(time=700, osc=100, note=76, vel=1)\n    amy.send(time=850, osc=100, vel=0)\n\n\nclass TestSineEnv(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SINE, freq=1000)\n    amy.send(time=0, osc=0, amp='1,0,1,1,0,0', bp0='50,1,200,0.1,50,0')\n    amy.send(time=100, vel=.85)\n    amy.send(time=500, vel=0)\n\n\nclass TestSineEnv2(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SINE, freq=1000)\n    amy.send(time=0, osc=0, amp='1.0,0,1,1,0,0', bp0='0,0,200,5,200,0,0,0')\n    amy.send(time=100, vel=1)\n    amy.send(time=500, vel=0)\n    # The DX7 algo is weird - attack is different from decay, envelope is clipped to 1.\n    amy.send(time=500, osc=0, eg0_type=amy.ENVELOPE_DX7)\n    amy.send(time=550, vel=1)\n    amy.send(time=950, vel=0)\n\n\nclass TestSineAM(AmyTest):\n  \"\"\"Amplitude modulation was messed up by log-combination amp.\"\"\"\n\n  def run(self):\n    amy.send(time=0, osc=1, wave=amy.SINE, freq=5)\n    amy.send(time=0, osc=0, wave=amy.SINE, freq=1000, mod_source=1, amp='1,0,0,0,0,0.05')\n    amy.send(time=100, vel=1)  # Needed to wake up osc, even though vel value is ignored\n    amy.send(time=500, vel=0)  # Will not turn off osc since vel value is ignored / eg0 not engaged.\n    amy.send(time=600, amp=0)  # Should silence osc.\n    amy.send(time=800, amp=1)  # osc ready to go, but will still wait for nonzero vel note-on\n\n\nclass TestAlgo(AmyTest):\n\n  def run(self):\n    amy.send(time=0, voices=\"0\",  patch=21+128)\n    amy.send(time=100, voices=\"0\", note=58, vel=1)\n    amy.send(time=500, voices=\"0\", vel=0)\n\n\nclass TestAlgo2(AmyTest):\n\n  def run(self):\n    amy.send(time=0, volume=0.5)  # To counteract vel=2 without rewriting ref.\n    amy.send(time=0, voices=\"0\", patch=128+24)\n    amy.send(time=100, voices=\"0\", note=58, vel=2)\n    amy.send(time=500, voices=\"0\", vel=0)\n\n\nclass TestWoodPiano(AmyTest):\n  \"\"\"Test 4-op FM voice to check unassigned voices behave OK.\"\"\"\n\n  def run(self):\n    # The four-op WOOD PIANO patch\n    amy.send(time=0, synth=1, num_voices=6, oscs_per_voice=5)\n    amy.send(time=0, synth=1, osc=4, wave=amy.SINE, ratio=1, bp0='10,1,1000,0.8,100,0', amp='0.4,0,0,1', eg0_type=2, phase=0)\n    amy.send(time=0, synth=1, osc=3, wave=amy.SINE, ratio=0.5, bp0='0,1,1000,0,100,0', amp='1,0,0,1', eg0_type=2, phase=0)\n    amy.send(time=0, synth=1, osc=2, wave=amy.SINE, ratio=1, bp0='0,1,300,0.5,500,0.3,1000,0', amp='0.8,0,0,1,0,0', eg0_type=2, phase=0)\n    amy.send(time=0, synth=1, osc=1, wave=amy.SINE, ratio=0.495, bp0='0,1,2000,0,300,0', amp='1,0,0,1,0,0', eg0_type=2, phase=0)\n    # Osc 0 amp envelope is just to avoid truncating the FM output.\n    amy.send(time=0, synth=1, osc=0, wave=amy.ALGO, algorithm=2, algo_source=',,4,3,2,1', bp0='0,1,1000,1,300,0', amp='4,0,1,1', freq='220,1,0,0,0,0')\n    # Notes\n    amy.send(time=100, synth=1, note=48, vel=1)\n    amy.send(time=350, synth=1, note=48, vel=0)\n    amy.send(time=400, synth=1, note=48, vel=1)\n    amy.send(time=650, synth=1, note=48, vel=0)\n    amy.send(time=700, synth=1, note=58, vel=1)\n    amy.send(time=800, synth=1, note=58, vel=0)\n    amy.send(time=800, synth=1, note=60, vel=1)\n    amy.send(time=900, synth=1, note=60, vel=0)\n\n\nclass TestFMRepeat(AmyTest):\n  \"\"\"Douglas reports that the DX7 Marimba sometimes clicks at onset.\"\"\"\n\n  def run(self):\n    amy.send(time=0, voices=\"0\", patch=128+21)\n    for i in range(5):\n      t = 100 + round(i * 51200 / 441)\n      amy.send(time=t, voices=\"0\", note=32, vel=1)\n      amy.send(time=t + 20, voices=\"0\", vel=0)\n\n\nclass TestXanaduFM(AmyTest):\n  \"\"\"The Xanadu custom FM voice stopped working.\"\"\"\n\n  def run(self):\n    amy.send(volume=100)\n    #amy.send(time=0, osc=3, wave=amy.SINE, freq=1/7.5, phase=0.75, amp=.99)\n    amy.send(time=0, osc=2, wave=amy.SINE, ratio=1, amp='0.5,0,0,0,0,0') #, mod_source=3)\n    amy.send(time=0, osc=1, wave=amy.SINE, ratio=1, amp='1,0,0,1', bp0='1000,1,1000,0')\n    amy.send(time=0, osc=0, wave=amy.ALGO, algorithm=1, algo_source=',,,,2,1', bp0='0,1,1000,1,2000,0')\n    amy.send(time=100, osc=0, note=49, vel=1)\n    amy.send(time=450, osc=0, note=49, vel=0)\n    amy.send(time=550, osc=0, note=49, vel=1)\n    amy.send(time=900, osc=0, note=49, vel=0)\n\n\nclass TestFilter(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN, filter_type=amy.FILTER_LPF, resonance=8.0, filter_freq='300,0,0,0,3', bp1='0,1,800,0.1,50,0.0')\n    amy.send(time=100, note=48, vel=1.0)\n    amy.send(time=900, vel=0)\n\n\nclass TestFilter24(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN, filter_type=amy.FILTER_LPF24, resonance=8.0, filter_freq='300,0,0,0,3', bp1='0,1,800,0.1,50,0.0')\n    amy.send(time=100, note=48, vel=1.0)\n    amy.send(time=900, vel=0)\n\n\nclass TestFilterLFO(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=1, wave=amy.SINE, freq=6, amp=1.0)\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN, filter_type=amy.FILTER_LPF, resonance=8.0, mod_source=1, filter_freq='400,0,0,0,3,0.5', bp1='0,1,500,0,100,0')\n    amy.send(time=100, note=48, vel=1.0)\n    amy.send(time=500, vel=0)\n\n\nclass TestLFO(AmyTest):\n\n  def run(self):\n    # LFO mod used to be 1+x i.e. 0.9..1.1\n    #amy.send(time=0, osc=1, wave=amy.SINE, freq=4, amp=0.1)\n    # With unit-per-octave scaling, that's approx log2(0.9) = -0.152, log2(1.1) = 0.138\n    amy.send(time=0, osc=1, wave=amy.SINE, freq=4, amp=0.138)\n    amy.send(time=0, osc=0, wave=amy.SINE, mod_source=1, freq='0,1,0,0,0,1')\n    amy.send(time=100, note=70, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestDuty(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.PULSE, duty=0.1)\n    amy.send(time=100, note=70, vel=1)\n    amy.send(time=200, vel=0)\n    amy.send(time=300, osc=0, wave=amy.PULSE, duty=0.9)\n    amy.send(time=300, note=70, vel=1)\n    amy.send(time=400, vel=0)\n\n\nclass TestPWM(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.PULSE, mod_source=1, duty='0.5,0,0,0,0,0.25')\n    amy.send(time=0, osc=1, wave=amy.SINE, freq=4, amp=1)\n    amy.send(time=100, note=70, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestGlobalEQ(AmyTest):\n\n  def run(self):\n    amy.send(time=0, eq=\"-10,10,3\")\n    amy.send(time=0, osc=0, wave=amy.SAW_UP)\n    amy.send(time=100, note=46, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestChorus(AmyTest):\n\n  def run(self):\n    # Turn on chorus.\n    amy.send(chorus=1)\n    # Note from TestFilter.\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN, filter_type=amy.FILTER_LPF, resonance=8.0, filter_freq='300,0,0,0,3', bp1='0,1,800,0.1,50,0.0')\n    amy.send(time=100, note=48, vel=1.0)\n    amy.send(time=900, vel=0)\n\n\nclass TestBrass(AmyTest):\n  \"\"\"One of the Juno-6 patches, spelled out.\"\"\"\n\n  def run(self):\n    #amy.send(time=0, osc=0, wave=amy.SAW_UP, amp='0.85,0,1,1,0,0', freq='130.81,1,0,0,0,0', filter_type=amy.FILTER_LPF,\n    #         resonance=0.167, bp0='60,1,740,0.9,200,0', filter_freq='6000,0.5,0,0,1,0',\n    #         bp1='60,1,740,0.9,200,0')\n    #amy.send(time=0, osc=0, wave=amy.SAW_UP, amp='0.85,0,1,1,0,0', freq='130.81,1,0,0,0,0', filter_type=amy.FILTER_LPF24,\n    #         resonance=0.167, bp0='60,1,340,0.3,200,0', filter_freq='2000,0.5,0,0,4,0',\n    #         bp1='60,1,340,0.3,200,0')\n    osc_freq_str = str(constants.ZERO_LOGFREQ_IN_HZ / 2)\n    amy.send(time=0, osc=1, wave=amy.SAW_UP, freq=osc_freq_str + ',1,0,0,0,0.02',\n             amp='0.85,0,1,1,0,0', bp0='30,1,672,0.354,100,0',\n             filter_type=amy.FILTER_LPF24, resonance=0.167,\n             filter_freq='93.73,0.677,0,0,9.133,0', bp1='30,1,672,0.354,100,0',\n             mod_source=2,\n             )\n    # Osc 2 is LFO for vibrato\n    amy.send(time=0, osc=2, wave=amy.SINE, freq=3, bp0='156,1.0,100,1.0,100,0')\n    amy.send(time=100, osc=1, note=76, vel=1.0)\n    amy.send(time=300, osc=1, vel=0)\n    amy.send(time=600, osc=1, note=76, vel=1.0)\n    amy.send(time=800, osc=1, vel=0)\n    # 'filter_freq': '93.73,0.677,0,0,4.567,0', 'bp1': '30,1,672,0.354,232,0'\n\n\nclass TestBrassAlt(AmyTest):\n  \"\"\"Reproduce TestBrass using the VCA on a SILENT osc.\"\"\"\n\n  def run(self):\n    osc_freq_str = str(constants.ZERO_LOGFREQ_IN_HZ / 2)\n    # Osc 1 is waveform, with vibrato mod but no amp env\n    amy.send(time=0, osc=1, wave=amy.SAW_UP, freq=osc_freq_str + ',1,0,0,0,0.02',\n             amp='1,0,0,0,0,0', mod_source=2)\n    # Osc 2 is LFO for vibrato\n    amy.send(time=0, osc=2, wave=amy.SINE, freq=3, bp0='156,1.0,100,1.0,100,0')\n    # Osc 0 is VCF and amplitude env\n    amy.send(time=0, osc=0, wave=amy.SILENT,\n             amp='0.85,0,1,1,0,0', bp0='30,1,672,0.354,100,0',\n             filter_type=amy.FILTER_LPF24, resonance=0.167,\n             filter_freq='93.73,0.677,0,0,9.133,0', bp1='30,1,672,0.354,100,0',\n             mod_source=2, chained_osc=1)\n    amy.send(time=100, osc=0, note=76, vel=1.0)\n    amy.send(time=300, osc=0, vel=0)\n    amy.send(time=600, osc=0, note=76, vel=1.0)\n    amy.send(time=800, osc=0, vel=0)\n\n\nclass TestBrass2(AmyTest):\n  \"\"\"Trying to catch the note-off thump.\"\"\"\n\n  def run(self):\n    osc_freq_str = str(constants.ZERO_LOGFREQ_IN_HZ / 2)\n    amy.send(time=0, osc=0, wave=amy.SAW_UP, amp='0.85,0,1,1', freq=osc_freq_str + ',1',\n             resonance=0.713, filter_type=amy.FILTER_LPF24, filter_freq='93.726,0.677,0,0,9.134',\n             bp0='30,1,672,0.354,232,0', bp1='30,1,672,0.354,232,0')\n    amy.send(time=100, osc=0, note=60, vel=1.0)\n    amy.send(time=600, osc=0, vel=0)\n\n\nclass TestGuitar(AmyTest):\n  \"\"\"Trying to catch the note-off zzzzzip.\"\"\"\n\n  def run(self):\n    base_freq_str = str(constants.ZERO_LOGFREQ_IN_HZ / 2)\n    amy.send(time=0, osc=0, wave=amy.SAW_UP, amp='0.756,0,1,1', freq=base_freq_str + ',1',\n             filter_freq='16.23,0.236,0,0,11.181', resonance=0.753, filter_type=amy.FILTER_LPF24,\n             bp0='6,1,51,0.425,153,0',\n             bp1='6,1,51,0.425,153,0')\n    amy.send(time=100, osc=0, note=60, vel=4.0)\n    amy.send(time=150, osc=0, vel=0)\n    amy.send(time=500, osc=0, note=60, vel=4.0)\n    amy.send(time=550, osc=0, vel=0)\n\n\nclass TestBleep(AmyTest):\n  \"\"\"Test the tulip start-up beep.\"\"\"\n\n  def run(self):\n    amy.send(time=0, wave=amy.SINE, freq=220)\n    amy.send(time=0, osc=0, pan=0.9, vel=1)\n    amy.send(time=150, osc=0, pan=0.1, freq=440)\n    amy.send(time=300, osc=0, pan=0.5, vel=0)\n\n\nclass TestOverload(AmyTest):\n  \"\"\"Run the output very hot to check for clipping.\"\"\"\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN, filter_type=amy.FILTER_LPF, resonance=8.0, filter_freq='300,0,0,0,3', bp1='0,1,800,0.1,50,0.0')\n    amy.send(time=0, eq=\"12\")\n    amy.send(time=0, chorus=1)\n    amy.send(time=100, note=48, vel=8.0)\n    amy.send(time=900, vel=0)\n\n\nclass TestJunoPatch(AmyTest):\n  \"\"\"Known Juno patch.\"\"\"\n\n  def run(self):\n    # Also test the synth mechanism.\n    amy.send(time=0, synth=1, num_voices=4, patch=20)\n    amy.send(time=50, synth=1, note=48, vel=1)\n    amy.send(time=150, synth=1, note=60, vel=1)\n    amy.send(time=250, synth=1, note=63, vel=1)\n    amy.send(time=350, synth=1, note=67, vel=1)\n    amy.send(time=600, synth=1, note=48, vel=0)\n    amy.send(time=700, synth=1, note=60, vel=0)\n    amy.send(time=800, synth=1, note=63, vel=0)\n    amy.send(time=900, synth=1, note=67, vel=0)\n\n\nclass TestJunoClip(AmyTest):\n  \"\"\"Juno patch that clips.\"\"\"\n\n  def run(self):\n    amy.send(time=0, voices=\"0,1,2,3\", patch=9)\n    amy.send(time=50, voices=\"0\", note=60, vel=1)\n    amy.send(time=50, voices=\"1\", note=57, vel=1)\n    amy.send(time=50, voices=\"2\", note=55, vel=1)\n    amy.send(time=50, voices=\"3\", note=52, vel=1)\n    amy.send(time=800, voices=\"0\", vel=0)\n    amy.send(time=800, voices=\"1\", vel=0)\n    amy.send(time=800, voices=\"2\", vel=0)\n    amy.send(time=800, voices=\"3\", vel=0)\n\n\nclass TestLowVcf(AmyTest):\n  \"\"\"Weird fxpt warble when hitting fundamental.\"\"\"\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN,\n             filter_type=amy.FILTER_LPF24, resonance=1.0,\n             amp='0.85,0,1,1',\n             filter_freq='161.28,0,0,0,5',\n             bp0='0,1,0,0',\n             bp1='0,1,600,0,1,0')\n    amy.send(time=100, osc=0, note=48, vel=3)\n    amy.send(time=800, osc=0, vel=0)\n\n\nclass TestLowerVcf(AmyTest):\n  \"\"\"Top16 LPF24 has issues with cf below fundamental?\"\"\"\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN,\n             filter_type=amy.FILTER_LPF24, resonance=4.0,\n             amp='0.85,0,1,1',\n             filter_freq='50,0,0,0,6',\n             bp0='0,1,0,0',\n             bp1='0,1,300,0,1,0')\n    amy.send(time=100, osc=0, note=48, vel=3)\n    amy.send(time=800, osc=0, vel=0)\n\n\nclass TestFlutesEq(AmyTest):\n  \"\"\"VCF leaving almost pure sine + HPF2 -> noise, clicks?\"\"\"\n\n  def run(self):\n    amy.send(time=0, eq=\"-15,8,8\")\n    osc_args = {'time':0, 'wave':amy.SAW_UP, 'filter_type':amy.FILTER_LPF24, 'resonance':1.75, \n        'bp0':'200,1,9800,0,100,0', 'bp1':'200,1,9800,0,100,0', 'filter_freq':'242,0.323'}\n    amy.send(osc=0, **osc_args)\n    amy.send(osc=1, **osc_args)\n    amy.send(osc=2, **osc_args)\n    amy.send(time=100, osc=0, note=48, vel=0.5)\n    amy.send(time=200, osc=1, note=52, vel=0.5)\n    amy.send(time=300, osc=2, note=55, vel=0.5)\n    amy.send(time=900, osc=0, vel=0)\n    amy.send(time=900, osc=1, vel=0)\n    amy.send(time=900, osc=2, vel=0)\n\n\nclass TestOscBD(AmyTest):\n  \"\"\"Bass Drum as modulated sine-tone. amy.py:preset(5). \"\"\"\n\n  def run(self):\n    # Uses a 0.25Hz sine wave at 0.5 phase (going down) to modify frequency of another sine wave\n    amy.send(time=0, osc=1, wave=amy.SINE, amp=1, freq=0.25, phase=0.5)\n    # Sine waveform always starts at phase 0 after retrigger.\n    amy.send(time=0, osc=0, wave=amy.SINE, phase=0, bp0=\"0,1,500,0,0,0\", freq=str(constants.ZERO_LOGFREQ_IN_HZ) + \",1,0,0,0,2\", mod_source=1)\n    amy.send(time=100, osc=0, note=84, vel=1)\n    amy.send(time=350, osc=0, note=84, vel=1)\n    amy.send(time=600, osc=0, note=84, vel=1)\n\n\nclass TestChainedOsc(AmyTest):\n  \"\"\"Two oscillators chained together behind a silent_osc.\"\"\"\n\n  def run(self):\n    # TestFilter but on Saw + subosc with same envelope.\n    osc_freq_str = str(constants.ZERO_LOGFREQ_IN_HZ / 2)\n    #amy.send(time=0, osc=0, wave=amy.SAW_DOWN, filter_type=amy.FILTER_LPF, resonance=8.0, filter_freq='300,0,0,0,3', bp1='0,1,800,0.1,50,0.0')\n    #amy.send(time=0, osc=1, wave=amy.PULSE, filter_type=amy.FILTER_LPF, resonance=8.0, amp=\"0.2,0,1,1\", freq=\"130.81,1\", filter_freq='300,0,0,0,3', bp1='0,1,800,0.1,50,0.0')\n    #amy.send(time=100, osc=0, note=48, vel=1.0)\n    #amy.send(time=100, osc=1, note=48, vel=1.0)\n    amy.send(time=0, osc=0, wave=amy.SILENT, filter_type=amy.FILTER_LPF, resonance=8.0, filter_freq='300,0,0,0,3', bp1='0,1,800,0.1,50,0.0', chained_osc=1)\n    amy.send(time=0, osc=1, wave=amy.SAW_DOWN, chained_osc=2)\n    amy.send(time=0, osc=2, wave=amy.PULSE, amp=\"0.2,0,1,1\", freq=osc_freq_str + ',1,0,0,0,0,1')\n    amy.send(time=100, osc=0, note=48, vel=1.0)\n    #amy.send(time=100, osc=1, note=48, vel=1.0)\n    amy.send(time=900, osc=0, vel=0)\n    #amy.send(time=900, osc=1, vel=0)\n\n\nclass TestJunoTrumpetPatch(AmyTest):\n  \"\"\"I'm hearing a click in the Juno Trumpet patch.  Catch it.\"\"\"\n\n  def run(self):\n    amy.send(time=0, voices=\"0,1\", patch=2)\n    amy.send(time=50, voices=\"0\", note=60, vel=1)\n    amy.send(time=200, voices=\"0\", vel=0)\n    amy.send(time=300, voices=\"1\", note=60, vel=1)\n    amy.send(time=450, voices=\"1\", vel=0)\n\n\nclass TestJunoCheapTrumpetPatch(AmyTest):\n  \"\"\"Try out the 'cheap' LPF hack.\"\"\"\n\n  def run(self):\n    amy.send(time=0, voices=\"0,1\", patch=2)\n    amy.send(time=0, voices=\"0,1\", filter_type=amy.FILTER_LPF)\n    amy.send(time=50, voices=\"0\", note=60, vel=1)\n    amy.send(time=200, voices=\"0\", vel=0)\n    amy.send(time=300, voices=\"1\", note=60, vel=1)\n    amy.send(time=450, voices=\"1\", vel=0)\n\n\nclass TestFilterReleaseGlitch(AmyTest):\n  \"\"\"See https://github.com/shorepine/amy/issues/126.\"\"\"\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN, filter_type=amy.FILTER_LPF24, filter_freq='100,0,0,6')\n    amy.send(time=100, note=64, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestPortamento(AmyTest):\n\n  def run(self):\n    amy.send(time=0, voices=\"0,1,2\", patch=0)\n\n    # Starting-point pitches...\n    amy.send(time=50, voices=\"0\", note=60, vel=1)\n    amy.send(time=50, voices=\"1\", note=64, vel=1)\n    amy.send(time=50, voices=\"2\", note=67, vel=1)\n\n    # .. immediately start bending towards final pitches.\n    amy.send(time=60, voices=\"0,1,2\", osc=2, portamento=100)\n    amy.send(time=60, voices=\"0,1,2\", osc=3, portamento=100)\n    amy.send(time=60, voices=\"0,1,2\", osc=4, portamento=100)\n    amy.send(time=60, voices=\"0\", note=65)\n    amy.send(time=60, voices=\"1\", note=69)\n    amy.send(time=60, voices=\"2\", note=72)\n\n    amy.send(time=800, voices=\"0,1,2\", vel=0)\n\n\nclass TestEcho(AmyTest):\n\n  def run(self):\n    amy.echo(level=0.5, delay_ms=200, feedback=0.7)\n    amy.send(time=0, osc=0, bp0=\"0,1,200,0,0,0\")\n\n    amy.send(time=100, osc=0, note=48, vel=1)\n\n\nclass TestEchoLPF(AmyTest):\n\n  def run(self):\n    amy.echo(level=0.5, delay_ms=200, feedback=0.7, filter_coef=0.9)\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN, bp0=\"0,1,200,0,0,0\")\n\n    amy.send(time=100, osc=0, note=48, vel=1)\n\n\nclass TestEchoHPF(AmyTest):\n\n  def run(self):\n    amy.echo(level=0.5, delay_ms=200, feedback=0.7, filter_coef=-0.9)\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN, bp0=\"0,1,200,0,0,0\")\n\n    amy.send(time=100, osc=0, note=48, vel=1)\n\n\nclass TestVoiceManagement(AmyTest):\n  \"\"\"The 'synth' structure manages a set of voices.\"\"\"\n\n  def run(self):\n    # Patch is bare sinewave oscillator but with a 100ms release.\n    #amy.send(patch=1024, patch_string=amy.message(osc=0, wave=amy.SINE, bp0='0,1,1000,1,100,0'))\n    #amy.send(time=10, synth=0, num_voices=3, patch=1024)\n    patch_string = amy.message(osc=0, wave=amy.SINE, bp0='0,1,1000,0,100,0')\n    amy.send(time=10, synth=0, num_voices=2, patch_string=patch_string)\n    amy.send(time=100, synth=0, note=60, vel=1)\n    amy.send(time=200, synth=0, note=72, vel=1)\n    # Check if using the same string for a second synth reuses the same memory_patch (based on debug fprintfs).\n    amy.send(time=200, synth=1, num_voices=1, patch_string=patch_string)\n    amy.send(time=300, synth=1, note=84, vel=1)\n    # We ran out of voices, this should steal the first one\n    amy.send(time=400, synth=0, note=96, vel=1)\n    # Stop one\n    amy.send(time=500, synth=1, note=84, vel=0)\n    # Stop all the rest - vel=0 without note= means all notes off.\n    amy.send(time=600, synth=0, vel=0)\n\n\nclass TestVoiceStealing(AmyTest):\n  \"\"\"There's a bug with the default 6 voices.\"\"\"\n\n  def __init__(self):\n    super().__init__()\n    self.default_synths = True\n\n  def run(self):\n    # Default juno synth.\n    amy.send(time=40, synth=1, note=60, vel=1)\n    amy.send(time=120, synth=1, note=64, vel=1)\n    amy.send(time=200, synth=1, note=67, vel=1)\n    amy.send(time=280, synth=1, note=70, vel=1)\n    amy.send(time=360, synth=1, note=72, vel=1)\n    amy.send(time=440, synth=1, note=76, vel=1)\n    amy.send(time=520, synth=1, note=79, vel=1)\n    amy.send(time=600, synth=1, note=82, vel=1)\n    amy.send(time=800, synth=1, note=60, vel=0)\n    amy.send(time=820, synth=1, note=64, vel=0)\n    amy.send(time=840, synth=1, note=67, vel=0)\n    amy.send(time=860, synth=1, note=70, vel=0)\n    amy.send(time=880, synth=1, note=72, vel=0)\n    amy.send(time=900, synth=1, note=76, vel=0)\n    amy.send(time=920, synth=1, note=79, vel=0)\n    amy.send(time=940, synth=1, note=82, vel=0)\n    # Sent spurious note-offs, just to check that error report works\n    print(\"expect to see excess note-off for notes 64, 82, 99\")\n    amy.send(time=940, synth=1, note=64, vel=0)\n    amy.send(time=940, synth=1, note=82, vel=0)\n    amy.send(time=940, synth=1, note=99, vel=0)\n\n\nclass TestVoiceStealDecay(AmyTest):\n  \"\"\"Issue #470 - voice stealing can cause clicks as note changes abruptly.\"\"\"\n\n  def run(self):\n    amy.send(\n      synth=0, num_voices=2,\n      patch_string=amy.message(osc=0, wave=amy.SINE, bp0='50,1,200,0.5,50,0'),\n    )\n    amy.send(time=100, synth=0, note=40, vel=10)  # voice 0\n    amy.send(time=200, synth=0, note=50, vel=2)   # voice 1\n    amy.send(time=300, synth=0, note=60, vel=2)   # Steal voice 0, big click at t=0.3\n    amy.send(time=400, synth=0, note=65, vel=2)   # Steal voice 1\n    amy.send(time=500, synth=0, note=45, vel=10)  # Steal voice 0\n    # Now add synth_delay\n    amy.send(time=550, synth=0, synth_delay=50)\n    amy.send(time=600, synth=0, note=70, vel=2)   # Steal voice 1\n    amy.send(time=700, synth=0, note=75, vel=2)   # Steal voice 0, but no big click (at t=0.75)\n    amy.send(time=800, synth=0, note=80, vel=2)   # Steal voice 1\n    amy.send(time=900, synth=0, vel=0)  # All notes off\n\n\nclass TestVoiceStealClick(AmyTest):\n  \"\"\"There are still clicks on voice stealing and it's not cool.\"\"\"\n\n  def run(self):\n    amy.send(time=0, synth=0, num_voices=1, oscs_per_voice=1)\n    amy.send(time=0, synth=0, osc=0, wave=amy.SINE, bp0='0,0,100,1,200,0.8,500,0')\n    # It's the filter being reset that's hurting us?\n    amy.send(time=0, synth=0, osc=0, filter_type=amy.FILTER_LPF24, filter_freq='8000,0,0,0,0,0')\n    # Send first chords\n    amy.send(time=100, synth=0, note=60, vel=10)\n    # Send second chords\n    amy.send(time=500, synth=0, note=60, vel=10)\n    # Notes off\n    amy.send(time=800, synth=0, vel=0)\n\nclass TestOwBassClick(AmyTest):\n  \"\"\"Hearing clicks on OwBass??.  See https://github.com/shorepine/amy/issues/629. \"\"\"\n\n  def run(self):\n    amy.send(time=0, synth=0, num_voices=1, oscs_per_voice=4)\n    # Ow Bass reproduced by hand on AMYboard Editor.\n    amy.send(time=10, synth=0, osc=0, wave=amy.SILENT, amp='1,,1,1', freq=220, filter_freq='20,1,,,5.443', resonance=4.381,\n             filter_type=amy.FILTER_LPF24, bp0='13,1,0,1,16,0', bp1='16,1,0,0.878,52,0', mod_source=1, chained_osc=2)\n    amy.send(time=10, synth=0, osc=1, wave=amy.TRIANGLE, amp=',,0', freq='2.3,0,,,,,0', bp0='5,1,100,1,10000,0')\n    amy.send(time=10, synth=0, osc=2, wave=amy.PULSE, amp='0.551,,0', freq=220, duty=0.697, chained_osc=3, mod_source=1)\n    amy.send(time=10, synth=0, osc=3, wave=amy.SAW_UP, amp='0.551,,0', freq=110, mod_source=1)\n    amy.send(time=10, eq='7,-3,-3', echo='M0,500,,0,0', chorus='0,320,0.5,0.5')\n    # Rapid repeated notes.\n    amy.send(time=100, synth=0, note=48, vel=1)\n    amy.send(time=250, synth=0, note=48, vel=0)\n    amy.send(time=350, synth=0, note=48, vel=1)\n    amy.send(time=500, synth=0, note=48, vel=0)\n    amy.send(time=600, synth=0, note=48, vel=1)\n    amy.send(time=750, synth=0, note=48, vel=0)\n\n\nclass TestMidiDrums(AmyTest):\n  \"\"\"Test MIDI drums on channel 10 via injection.\"\"\"\n\n  def __init__(self):\n    super().__init__()\n    self.default_synths = True\n\n  def run(self):\n    # inject_midi args are (time, midi_event_chan, midi_note, midi_vel)\n    amy.inject_midi(100, 0x99, 35, 100)  # bass\n    amy.inject_midi(400, 0x99, 35, 100)  # bass\n    amy.inject_midi(400, 0x99, 37, 100)  # snare\n    amy.inject_midi(700, 0x99, 37, 100)  # snare\n    amy.inject_midi(900, 0x89, 37, 100)  # snare note off\n\n\nclass TestDrumsVoiceStealing(AmyTest):\n  \"\"\"Drums ignore missing note offs, but should still notice excess note-offs.\"\"\"\n\n  def __init__(self):\n    super().__init__()\n    self.default_synths = True\n\n  def run(self):\n    for i in range(14):\n      amy.send(time=100 + i * 20, synth=10, note=40 + i // 2, vel=1)\n    for i in range(14):\n      amy.send(time=400 + i * 20, synth=10, note=40 + i // 2, vel=0)\n    print(\"expect to see excess note-off for note 40\")\n    amy.send(time=900, synth=10, note=40, vel=0)\n\n  \nclass TestDefaultChan1Synth(AmyTest):\n  \"\"\"Test default setup of Juno synth on synth 1 (MIDI channel 1).\"\"\"\n\n  def __init__(self):\n    super().__init__()\n    self.default_synths = True\n\n  def run(self):\n    amy.send(time=100, synth=1, note=60, vel=1)\n    amy.send(time=300, synth=1, note=63, vel=1)\n    amy.send(time=500, synth=1, note=67, vel=1)\n    amy.send(time=700, synth=1, note=74, vel=1)\n    amy.send(time=800, synth=1, note=60, vel=0)\n    amy.send(time=850, synth=1, note=63, vel=0)\n    amy.send(time=900, synth=1, note=67, vel=0)\n    amy.send(time=950, synth=1, note=74, vel=0)\n\n\nclass TestSynthProgChange(AmyTest):\n  \"\"\"Test switchting default synth to DX7, do oscs allocate OK?\"\"\"\n\n  def __init__(self):\n    super().__init__()\n    self.default_synths = True\n\n  def run(self):\n    # DX7 first patch, uses 9 oscs/voice, num_voices is inherited from previous init.\n    amy.send(time=0, synth=1, patch=128)\n    amy.send(time=100, synth=1, note=60, vel=1)\n    amy.send(time=300, synth=1, note=63, vel=1)\n    amy.send(time=500, synth=1, note=67, vel=1)\n    amy.send(time=700, synth=1, note=74, vel=1)\n    amy.send(time=800, synth=1, note=60, vel=0)\n    amy.send(time=850, synth=1, note=63, vel=0)\n    amy.send(time=900, synth=1, note=67, vel=0)\n    amy.send(time=950, synth=1, note=74, vel=0)\n\n\nclass TestSynthDrums(AmyTest):\n  \"\"\"Test MIDI drums using synth-level note translation.\"\"\"\n\n  def __init__(self):\n    super().__init__()\n    self.default_synths = True\n\n  def run(self):\n    amy.send(time=100, synth=10, note=35, vel=100/127)  # bass\n    amy.send(time=400, synth=10, note=35, vel=100/127)  # bass\n    amy.send(time=400, synth=10, note=37, vel=100/127)  # snare\n    amy.send(time=700, synth=10, note=37, vel=100/127)  # snare\n    amy.send(time=900, synth=10, note=37, vel=0)  # snare note off - ignored with current setup.\n\n\nclass TestSynthFlags(AmyTest):\n  \"\"\"Test setting up MIDI drums using synth_flags (alias).  Slightly different waveform than TestSynthDrums because chorus is off.\"\"\"\n\n  def run(self):\n    # The default config is NOT set, set up MIDI drums on instrument 1 here.\n    # synth_flags=3 means do MIDI drums note translation and ignore note-offs.\n    amy.send(synth=1, synth_flags=3, num_voices=4, oscs_per_voice=1)\n    amy.send(time=100, synth=1, note=35, vel=100/127)  # bass\n    amy.send(time=400, synth=1, note=35, vel=100/127)  # bass\n    amy.send(time=400, synth=1, note=37, vel=100/127)  # snare\n    amy.send(time=700, synth=1, note=37, vel=100/127)  # snare\n    amy.send(time=900, synth=1, note=37, vel=0)  # snare note off - ignored with current setup.\n\n\nclass TestDoubleNoteOff(AmyTest):\n  \"\"\"Test for bug where release restarts if a second note-off is received (#319).\"\"\"\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SINE, bp0='0,1,100,1,1000,0')\n    amy.send(time=100, osc=0, note=60, vel=1)\n    amy.send(time=200, osc=0, vel=0)\n    amy.send(time=600, osc=0, vel=0)\n\n\nclass TestSustainPedal(AmyTest):\n  \"\"\"Test sustain pedal.\"\"\"\n\n  def run(self):\n    amy.send(time=0, reset=amy.RESET_SYNTHS)\n    amy.send(time=0, synth=1, num_voices=4, patch=256)\n    amy.send(time=50, synth=1, note=76, vel=1)\n    amy.send(time=100, synth=1, note=76, vel=0)\n    amy.send(time=150, synth=1, pedal=127)\n    amy.send(time=250, synth=1, note=63, vel=1)\n    amy.send(time=300, synth=1, note=63, vel=0)\n    amy.send(time=450, synth=1, note=67, vel=1)\n    amy.send(time=500, synth=1, note=67, vel=0)\n    amy.send(time=650, synth=1, note=72, vel=1)   # This note is held across the pedal release\n    amy.send(time=750, synth=1, pedal=0)\n    amy.send(time=900, synth=1, note=72, vel=0)\n\n\nclass TestPatchFromEvents(AmyTest):\n  \"\"\"Test defining a patch from events with patch_number.\"\"\"\n\n  def __init__(self):\n    super().__init__()\n    self.default_synths = True   # So that the patch space is already partly populated.\n\n  def run(self):\n    osc_freq = constants.ZERO_LOGFREQ_IN_HZ / 2\n    amy.send(time=0, patch=1039, reset=amy.RESET_PATCH)\n    amy.send(time=0, patch=1039, osc=0, wave=amy.SAW_DOWN, bp0='0,1,1000,0.1,200,0', chained_osc=1)\n    amy.send(time=0, patch=1039, osc=1, wave=amy.SINE, freq=osc_freq, bp0='0,1,500,0,200,0')\n    amy.send(time=0, synth=0, num_voices=4, patch=1039)\n    amy.send(time=100, synth=0, note=60, vel=1)\n    amy.send(time=300, synth=0, note=64, vel=1)\n    amy.send(time=500, synth=0, note=67, vel=1)\n    amy.send(time=800, synth=0, vel=0)\n\n\nclass TestInvalidPatchNumber(AmyTest):\n  \"\"\"Test for crash with patch number out of range.\"\"\"\n\n  def run(self):\n    patch = 25\n    osc_freq = constants.ZERO_LOGFREQ_IN_HZ / 2\n    print(\"expect to see 'patch number %d is out of range' twice\" % patch)\n    amy.send(time=0, patch=patch, osc=0, wave=amy.SAW_DOWN, bp0='0,1,1000,0.1,200,0', chained_osc=1)\n    amy.send(time=0, patch=patch, osc=1, wave=amy.SINE, freq=osc_freq, bp0='0,1,500,0,200,0')\n    amy.send(time=0, synth=0, num_voices=4, patch=patch)\n    amy.send(time=100, synth=0, note=60, vel=1)\n    amy.send(time=300, synth=0, note=64, vel=1)\n    amy.send(time=500, synth=0, note=67, vel=1)\n    amy.send(time=800, synth=0, vel=0)\n\n\nclass TestBreakpointsRealloc(AmyTest):\n  \"\"\"A default osc has only 8 breakpoints, but it should realloc to 24 if you try to set a long bpset.\"\"\"\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SINE, bp0='100,1,100,0,100,1,100,0,100,1,100,0,100,1,100,0')\n    amy.send(time=100, osc=0, note=60, vel=1)\n    amy.send(time=900, osc=0, vel=0)\n\n\nclass TestFileTransfer(AmyTest):\n\n  def test(self):\n    _amy.stop()\n    _amy.start(0)\n    payload = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(2048))\n    with tempfile.NamedTemporaryFile(mode='w', delete=True) as f:\n      with tempfile.NamedTemporaryFile(mode='w+', delete=True) as g:\n        f.write(payload)\n        f.flush()\n        os.fsync(f.fileno())\n        amy.transfer_file(f.name, g.name)\n        amy.render(0.1)\n        g.seek(0)\n        transferred = g.read()\n        if transferred != payload:\n          is_ok = False\n          message = 'transfer file contents mismatch'\n        else:\n          is_ok = True\n          message = 'TestFileTransfer: ok'\n        return is_ok, message\n\n\nclass TestDiskSample(AmyTest):\n\n  def run(self):\n    amy.disk_sample('sounds/partial_sources/CL SHCI A3.wav', preset=1024, midinote=57)\n    amy.send(time=50, osc=0, preset=1024, wave=amy.PCM_MIX, vel=2, note=57)\n\n\nclass TestDiskSampleWithSilentGap(AmyTest):\n\n  def run(self):\n    amy.disk_sample('sounds/partial_sources/CL SHCI A3 with gap.wav', preset=1024, midinote=57)\n    amy.send(time=50, osc=0, preset=1024, wave=amy.PCM_MIX, vel=2, note=63)\n\n\nclass TestRestartFileSample(AmyTest):\n\n  def run(self):\n    amy.disk_sample('sounds/partial_sources/CL SHCI A3.wav', preset=1024, midinote=60)\n    amy.send(time=50, osc=0, preset=1024, wave=amy.PCM_MIX, vel=2, note=72)\n    amy.send(time=500, osc=0, preset=1024, wave=amy.PCM_MIX, vel=2, note=50)\n\n\nclass TestDiskSampleStereo(AmyTest):\n\n  def run(self):\n    amy.disk_sample('sounds/220_440_stereo.wav', preset=1024, midinote=60)\n    amy.disk_sample('sounds/220_440_stereo.wav', preset=1025, midinote=60)\n    amy.send(time=50, osc=0, preset=1024, wave=amy.PCM_LEFT, pan=0, vel=1, note=60)\n    amy.send(time=500, osc=1, preset=1025, wave=amy.PCM_RIGHT, pan=1, vel=1, note=60)\n\n\nclass TestLoadSample(AmyTest):\n  \"\"\"amy.load_sample streams base64 chunks via send_raw -> amy_add_message\n  (no sysex flag). Regression coverage for the parse.c transfer-routing\n  guard: AUDIO transfers must route to parse_transfer_message even when\n  amy_parsing_from_sysex is false, otherwise every chunk gets dropped as\n  an \"Unrecognized transfer-level command\".\"\"\"\n\n  def run(self):\n    amy.load_sample('sounds/partial_sources/CL SHCI A3.wav', preset=1024, midinote=57)\n    amy.send(time=50, osc=0, preset=1024, wave=amy.PCM_MIX, vel=2, note=57)\n\n\nclass TestSample(AmyTest):\n\n  def run(self):\n    amy.start_sample(preset=1024,bus=1,max_frames=22050, midinote=60)\n    amy.send(time=0, synth=1, num_voices=4, patch=20)\n    amy.send(time=50, synth=1, note=48, vel=1)\n    amy.send(time=150, synth=1, note=60, vel=1)\n    amy.send(time=250, synth=1, note=63, vel=1)\n    # notes off\n    amy.send(time=400, synth=1, note=48, vel=0)\n    amy.send(time=400, synth=1, note=60, vel=0)\n    amy.send(time=400, synth=1, note=63, vel=0)\n\n    # play a pitched up version\n    amy.send(osc=116, time=400, preset=1024, wave=amy.PCM_MIX, vel=1, note=72)\n    amy.send(osc=116, time=700, preset=1024, wave=amy.PCM_MIX, vel=2, note=84)\n\n\nclass TestParamsInPatchCmd(AmyTest):\n\n  def run(self):\n    # Is it possible to *modify* a patch in the same command we install it?\n    amy.send(time=0, synth=1, patch=0, num_voices=4, resonance=4)\n    amy.send(time=50, synth=1, note=48, vel=1)\n    amy.send(time=150, synth=1, note=60, vel=1)\n    amy.send(time=250, synth=1, note=63, vel=1)\n    # notes off\n    amy.send(time=400, synth=1, note=48, vel=0)\n    amy.send(time=400, synth=1, note=60, vel=0)\n    amy.send(time=400, synth=1, note=63, vel=0)\n\n\nclass TestHPFHighBaseFreq(AmyTest):\n\n  def run(self):\n    amy.send(time=0, synth=1, patch=0, num_voices=4)\n    amy.send(time=10, synth=1, filter_type=amy.FILTER_HPF, filter_freq=1000)\n    amy.send(time=50, synth=1, note=48, vel=10)\n    amy.send(time=150, synth=1, note=60, vel=10)\n    amy.send(time=250, synth=1, note=63, vel=10)\n    # notes off\n    amy.send(time=400, synth=1, note=48, vel=0)\n    amy.send(time=400, synth=1, note=60, vel=0)\n    amy.send(time=400, synth=1, note=63, vel=0)\n\n\nclass TestWavetable(AmyTest):\n  \"\"\"Simple exercise of the wavetable oscillator, using default wavetable.\"\"\"\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.WAVETABLE, preset=0, duty='0.25,0,0,0,0.5', bp1='0,0,800,1,100,1', bp0='50,1,50,0')\n    amy.send(time=50, note=50, vel=1)\n    amy.send(time=850, vel=0)\n\n\nclass TestCopyingSynthConfig(AmyTest):\n  \"\"\"Duplicates TestJunoPatch, but after copying synth 1 to synth 3.\"\"\"\n\n  def __init__(self):\n    super().__init__()\n    self.default_synths = True\n\n  def run(self):\n    amy.render(1)  # Let the system config commands play out, else get_synth_commands won't find anything\n    commands = amy.get_synth_commands(synth=1, dest_synth=3, num_voices=4, time=0)\n    #print(commands)\n    amy.send_raw(commands)\n    amy.send(time=1050, synth=3, note=48, vel=1)\n    amy.send(time=1150, synth=3, note=60, vel=1)\n    amy.send(time=1250, synth=3, note=63, vel=1)\n    amy.send(time=1350, synth=3, note=67, vel=1)\n    amy.send(time=1600, synth=3, note=48, vel=0)\n    amy.send(time=1700, synth=3, note=60, vel=0)\n    amy.send(time=1800, synth=3, note=63, vel=0)\n    amy.send(time=1900, synth=3, note=67, vel=0)\n\n\nclass TestGetSynthCommandsGetsMidiCcs(AmyTest):\n\n  def test(self):\n    _amy.stop()\n    _amy.start(0)\n    amy.send(time=0, synth=1, num_voices=4, oscs_per_voice=2)\n    amy.send(time=0, synth=1, osc=0, wave=amy.SINE, freq=110, chained_osc=1)\n    amy.send(time=0, synth=1, osc=1, wave=amy.SAW_UP, freq=500)\n    amy.send_raw('i1ic5,0,0,10,0,hello')\n    amy.send_raw('i1ic10,1,1,100,1,i%id%v')\n    amy.render(1)  # Let the events execute.\n    commands = amy.get_synth_commands(1)\n    expected = \"\"\"v0f110.000c1T2X3Z\nv1w3f500.000Z\nV1.000x0.000,0.000,0.000M0.000,500.000,,0.000,0.000k0.000,320.000,0.500,0.500h0.000,0.850,0.500,3000.000Z\nic5,0,0.000,10.000,0.000,helloZ\nic10,1,1.000,100.000,1.000,i%id%vZ\"\"\"\n    if commands != expected:\n      is_ok = False\n      message = 'TestGetSynthCommandsGetsMidiCcs: get_synth_commands mismatch: expected:\\n++\\n%s\\n--\\n;saw:\\n++\\n%s\\n--;' % (expected, commands)\n    else:\n      is_ok = True\n      message = 'TestGetSynthCommandsGetsMidiCcs : ok'\n    return is_ok, message\n\n\nclass TestClearMidiCCs(AmyTest):\n  \"\"\"Test that ic255 clears the MIDI CC settings.\"\"\"\n\n  def test(self):\n    _amy.stop()\n    _amy.start(0)\n    amy.send(time=0, synth=1, num_voices=4, oscs_per_voice=2)\n    amy.send(time=0, synth=1, osc=0, wave=amy.SINE, freq=110, chained_osc=1)\n    amy.send(time=0, synth=1, osc=1, wave=amy.SAW_UP, freq=500)\n    amy.send_raw('i1ic5,0,0,10,0,hello')\n    amy.send_raw('i1ic10,1,1,100,1,i%id%v')\n    # Test that you can have other commands after the ic255 too.\n    amy.send_raw('i1ic255v0f999')\n    amy.render(1)  # Let the events execute.\n    commands = amy.get_synth_commands(1)\n    expected = \"\"\"v0f999.000c1T2X3Z\nv1w3f500.000Z\nV1.000x0.000,0.000,0.000M0.000,500.000,,0.000,0.000k0.000,320.000,0.500,0.500h0.000,0.850,0.500,3000.000Z\"\"\"\n    if commands != expected:\n      is_ok = False\n      message = 'TestClearMidiCcs : get_synth_commands mismatch: expected:\\n++\\n%s\\n--\\n;saw:\\n++\\n%s\\n--;' % (expected, commands)\n    else:\n      is_ok = True\n      message = 'TestClearMidiCcs : ok'\n    return is_ok, message\n\nclass TestClearOneMidiCC(AmyTest):\n  \"\"\"Test that ic5 with no further args clears that MIDI CC.\"\"\"\n\n  def test(self):\n    _amy.stop()\n    _amy.start(0)\n    amy.send(time=0, synth=1, num_voices=4, oscs_per_voice=2)\n    amy.send(time=0, synth=1, osc=0, wave=amy.SINE, freq=110, chained_osc=1)\n    amy.send(time=0, synth=1, osc=1, wave=amy.SAW_UP, freq=500)\n    amy.send_raw('i1ic5,0,0,10,0,hello')\n    amy.send_raw('i1ic10,1,1,100,1,i%id%v')\n    amy.send_raw('i1ic5v0f999')\n    amy.render(1)  # Let the events execute.\n    commands = amy.get_synth_commands(1)\n    expected = \"\"\"v0f999.000c1T2X3Z\nv1w3f500.000Z\nV1.000x0.000,0.000,0.000M0.000,500.000,,0.000,0.000k0.000,320.000,0.500,0.500h0.000,0.850,0.500,3000.000Z\nic10,1,1.000,100.000,1.000,i%id%vZ\"\"\"\n    if commands != expected:\n      is_ok = False\n      message = 'TestClearOneMidiCC : get_synth_commands mismatch: expected:\\n++\\n%s\\n--\\n;saw:\\n++\\n%s\\n--;' % (expected, commands)\n    else:\n      is_ok = True\n      message = 'TestClearOneMidiCC : ok'\n    return is_ok, message\n\n\nclass TestResetOscs(AmyTest):\n  \"\"\"Test that setting the number of oscs per voice resets the oscs.\"\"\"\n\n  def run(self):\n    amy.send(time=0, synth=1, patch=0, num_voices=4)\n    amy.send(time=10, synth=1, oscs_per_voice=5)  # Should cause oscs to reset.\n    amy.send(time=50, synth=1, note=48, vel=1)\n    amy.send(time=400, synth=1, note=48, vel=0)\n\n\nclass TestPreset257(AmyTest):\n  \"\"\"There was a bug in the setting of K257 (amyboard web editor baseline).\"\"\"\n\n  def run(self):\n    amy.send(time=0, synth=1, patch=257, num_voices=4)\n    amy.send(time=100, synth=1, note=48, vel=1)\n    amy.send(time=500, synth=1, vel=0)\n\n\nclass TestChangeSustain(AmyTest):\n  \"\"\"Check that you can rewrite just the sustain level in an EG without rewriting it all.\"\"\"\n\n  def run(self):\n    amy.send(time=0, synth=1, patch=257, num_voices=4)\n    amy.send(time=10, synth=1, bp0=',,,0.8', bp1=',,,0.8')\n    amy.send(time=100, synth=1, note=48, vel=1)\n    amy.send(time=500, synth=1, vel=0)\n\n\ndef float_or_val(str, error_val=None):\n  \"\"\"Like float, but returns None if string doesn't parse.\"\"\"\n  try:\n    return float(str)\n  except ValueError:\n    return error_val\n\n\nclass TestResetPreset(AmyTest):\n  \"\"\"Setting a synth to a patch should rewrite all the params even if it's the same patch.\"\"\"\n\n  def run(self):\n    amy.send(time=0, synth=1, patch=257, num_voices=4)\n    amy.send(time=10, synth=1, bp0=',,,0.8', bp1=',,,0.8')\n    amy.send(time=20, synth=1, patch=257)\n    amy.send(time=100, synth=1, note=48, vel=1)\n    amy.send(time=500, synth=1, vel=0)\n    amy.send(time=750, synth=1, note=48, vel=1)\n    amy.send(time=950, synth=1, vel=0)\n\ndef main(argv):\n  if len(argv) > 1 and argv[1] == 'quiet':\n    quiet = True\n    del argv[1]\n  else:\n    quiet = False\n\n  if len(argv) > 1:\n    # Override location of reference files.\n    AmyTest.ref_dir = argv[1]\n\n  do_all_tests = True\n\n  oks = []\n  errors = []\n\n  if do_all_tests:\n    for testClass in AmyTest.__subclasses__():\n      test_object = testClass()\n      is_ok, message = test_object.test()\n      if not quiet:\n        print(message)\n      if is_ok:\n        oks.append(message)\n      else:\n        errors.append(message)\n  else:\n    #TestPcmShift().test()\n    #TestChorus().test()\n    #TestBleep().test()\n    #TestBrass().test()\n    #TestBrass2().test()\n    #print(TestSineEnv().test()[1])\n    #TestSawDownOsc().test()\n    print(TestGuitar().test()[1])\n    #TestFilter().test()\n    #print(TestAlgo().test()[1])\n    #TestBleep().test()\n    #TestChainedOsc().test()\n    #TestJunoPatch().test()\n    #TestJunoTrumpetPatch().test()\n    #TestPcmLoop().test()\n    #TestBYOPNoteOff().test()\n    #TestInterpPartials().test()\n    #TestVoiceStealing().test()\n    #TestSustainPedal().test()\n    #TestPatchFromEvents().test()\n    #TestVoiceStealDecay().test()\n    #TestRestartFileSample().test()\n    #TestDiskSample().test()\n    #print(TestFileTransfer().test()[1])\n    #print(TestVoiceStealClick().test()[1])\n    #print(TestOwBassClick().test()[1])\n    #print(TestXanaduFM().test()[1])\n    #print(TestInterpPartials().test()[1])\n\n  if not quiet:\n    amy.send(debug=0)\n\n  if errors:\n    print(len(oks), \"tests pass,\", len(errors), \"tests failed:\")\n    print('\\n'.join(sorted(errors, key=lambda x: float_or_val(x.split(' ')[-2].split('=')[-1], error_val=1000), reverse=True)))\n    sys.exit(1)\n  else:\n    print(len(oks), \"tests pass\")\n\n\nif __name__ == \"__main__\":\n  main(sys.argv)\n\n"
  },
  {
    "path": "amy/timing.py",
    "content": "import sys\nimport os\n\nimport numpy as np\nimport scipy.io.wavfile as wav\n\nimport amy\n\n\ndef wavread(filename):\n  \"\"\"Read in audio data from a wav file.  Return d, sr.\"\"\"\n  # Read in wav file.\n  file_handle = open(filename, 'rb')\n  samplerate, wave_data = wav.read(file_handle)\n  # Normalize short ints to floats in range [-1..1).\n  data = (wave_data.astype(np.float32)) / 32768.0\n  return data, samplerate\n\n\ndef rms(samples):\n  return np.sqrt(np.mean(samples ** 2))\n\n\ndef dB(level):\n  return 20 * np.log10(level + 1e-5)\n\n\n\nclass AmyTest:\n\n  ref_dir = './tests/ref'\n  test_dir = './tests/tst'\n\n  def __init__(self):\n    amy.restart()\n    amy.send(reset=amy.RESET_TIMEBASE)  # start from 0\n\n  def test(self):\n\n    name = self.__class__.__name__\n\n    self.run()\n    \n    samples = amy.render(1.0)\n    amy.write(samples, os.path.join(self.test_dir, name + '.wav'))\n    rms_x = dB(rms(samples))\n    message = ('%-16s:' % name) + (' signal=%.1f dB' % rms_x)\n\n    ref_file = os.path.join(self.ref_dir, name + '.wav')\n    try:\n      expected_samples, _ = wavread(ref_file)\n\n      rms_n = dB(rms(samples - expected_samples))\n      message += (' err=%.1f dB' % rms_n)\n\n    except FileNotFoundError:\n      message += ' / Unable to read ' + ref_file\n\n    print(message)\n\nclass TestSineOsc(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SINE, freq=1000)\n    amy.send(time=100, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestPulseOsc(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.PULSE, freq=1000)\n    amy.send(time=100, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestSawDownOsc(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN)\n    amy.send(time=100, note=48, vel=1)\n    amy.send(time=900, vel=0)\n\n\nclass TestSawUpOsc(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SAW_UP)\n    amy.send(time=100, note=46, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestTriangleOsc(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.TRIANGLE, freq=1000)\n    amy.send(time=100, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestNoiseOsc(AmyTest):\n\n  def run(self):\n    # If this is the first time noise is called, the waveform should be deterministic.\n    amy.send(time=0, osc=0, wave=amy.NOISE, freq=1000)\n    amy.send(time=100, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestPcm(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.PCM, preset=1)\n    amy.send(time=100, vel=1)\n\n\nclass TestPcmShift(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.PCM, preset=10)\n    # Cowbell with no note should play at \"default\" pitch, midi 69 (for that preset)\n    amy.send(time=100, vel=1)\n    # Specifying a note should shift its pitch.\n    amy.send(time=500, note=70, vel=1)\n\n\n\nclass TestSineEnv(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SINE, freq=1000)\n    # amy.send(time=0, osc=0, bp0_target=amy.TARGET_AMP, bp0='50,1,250,0.1,50,0')\n    amy.send(time=0, osc=0, amp='0,0,0.85,1,0,0', bp0='50,1,250,0.1,50,0')\n    amy.send(time=100, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestFilter(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN, filter_type=amy.FILTER_LPF, resonance=8.0, filter_freq='300,0,0,0,3', bp1='0,1,800,0.1,50,0.0')\n    amy.send(time=100, note=48, vel=1.0)\n    amy.send(time=900, vel=0)\n\n\nclass TestFilterLFO(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=1, wave=amy.SINE, freq=6, amp=1.0)\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN, filter_type=amy.FILTER_LPF, resonance=8.0, mod_source=1, filter_freq='400,0,0,0,3,0.5', bp1='0,1,500,0,100,0')\n    amy.send(time=100, note=48, vel=1.0)\n    amy.send(time=500, vel=0)\n\n\nclass TestLFO(AmyTest):\n\n  def run(self):\n    # LFO mod used to be 1+x i.e. 0.9..1.1\n    #amy.send(time=0, osc=1, wave=amy.SINE, freq=4, amp=0.1)\n    # With unit-per-octave scaling, that's approx log2(0.9) = -0.152, log2(1.1) = 0.138\n    amy.send(time=0, osc=1, wave=amy.SINE, freq=4, amp=0.138)\n    amy.send(time=0, osc=0, wave=amy.SINE, mod_source=1, mod_target=amy.TARGET_FREQ)\n    amy.send(time=100, note=70, vel=1)\n    amy.send(time=500, vel=0)\n    \n\nclass TestDuty(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.PULSE, duty=0.1)\n    amy.send(time=100, note=70, vel=1)\n    amy.send(time=200, vel=0)\n    amy.send(time=300, osc=0, wave=amy.PULSE, duty=0.9)\n    amy.send(time=300, note=70, vel=1)\n    amy.send(time=400, vel=0)\n    \n\nclass TestPWM(AmyTest):\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.PULSE, mod_source=1, duty='0.5,0,0,0,0,0.25')\n    amy.send(time=0, osc=1, wave=amy.SINE, freq=4, amp=1)\n    amy.send(time=100, note=70, vel=1)\n    amy.send(time=500, vel=0)\n    \n\nclass TestGlobalEQ(AmyTest):\n\n  def run(self):\n    amy.send(time=0, eq_l=-10, eq_m=10, eq_h=3)\n    amy.send(time=0, osc=0, wave=amy.SAW_UP)\n    amy.send(time=100, note=46, vel=1)\n    amy.send(time=500, vel=0)\n\n\nclass TestChorus(AmyTest):\n\n  def run(self):\n    # Turn on chorus.\n    amy.send(chorus=1)\n    # Note from TestFilter.\n    amy.send(time=0, osc=0, wave=amy.SAW_DOWN, filter_type=amy.FILTER_LPF, resonance=8.0, filter_freq='300,0,0,0,3', bp1='0,1,800,0.1,50,0.0')\n    amy.send(time=100, note=48, vel=1.0)\n    amy.send(time=900, vel=0)\n\n\nclass TestBrass(AmyTest):\n  \"\"\"One of the Juno-6 patches, spelled out.\"\"\"\n\n  def run(self):\n    #amy.send(time=0, osc=0, wave=amy.SAW_UP, amp='0,0,0.85,1,0,0', freq='130.81,1,0,0,0,0', filter_type=amy.FILTER_LPF,\n    #         resonance=0.167, bp0='60,1,800,0.9,200,0', filter_freq='6000,0.5,0,0,1,0',\n    #         bp1='60,1,800,0.9,200,0')\n    #amy.send(time=0, osc=0, wave=amy.SAW_UP, amp='0,0,0.85,1,0,0', freq='130.81,1,0,0,0,0', filter_type=amy.FILTER_LPF24,\n    #         resonance=0.167, bp0='60,1,400,0.3,200,0', filter_freq='2000,0.5,0,0,4,0',\n    #         bp1='60,1,400,0.3,200,0')\n    amy.send(time=0, osc=1, wave=amy.SAW_UP, freq='130.81,1,0,0,0,0.0',\n             amp='0,0,0.85,1,0,0', bp0='30,1,702,0.354,100,0',\n             filter_type=amy.FILTER_LPF24, resonance=0.167,\n             filter_freq='93.73,0.677,0,0,9.133,0', bp1='30,1,702,0.354,100,0',\n             mod_source=2,\n             )\n    amy.send(time=0, osc=2,\n             wave=amy.SINE, freq=0.974, bp0='156,1.0,256,1.0,100,0')  # amp='1,0,0,0,0,0') #\n    amy.send(time=100, osc=1, note=76, vel=1.0)\n    amy.send(time=300, osc=1, vel=0)\n    amy.send(time=600, osc=1, note=76, vel=1.0)\n    amy.send(time=800, osc=1, vel=0)\n    # 'filter_freq': '93.73,0.677,0,0,4.567,0', 'bp1': '30,1,702,0.354,232,0'\n\n\nclass TestBrass2(AmyTest):\n  \"\"\"Trying to catch the note-off thump.\"\"\"\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SAW_UP, amp='0,0,0.85,1', freq='130.815,1', \n             resonance=0.713, filter_type=amy.FILTER_LPF24, filter_freq='93.726,0.677,0,0,9.134',\n             bp0='30,1,702,0.354,232,0', bp1='30,1,702,0.354,232,0')\n    amy.send(time=100, osc=0, note=60, vel=1.0)\n    amy.send(time=600, osc=0, vel=0)\n\nclass TestGuitar(AmyTest):\n  \"\"\"Trying to catch the note-off zzzzzip.\"\"\"\n\n  def run(self):\n    amy.send(time=0, osc=0, wave=amy.SAW_UP, amp='0,0,0.756,1', freq='130.815,1',\n             filter_freq='16.23,0.236,0,0,11.181', resonance=0.753, filter_type=amy.FILTER_LPF24,\n             bp0='6,1,57,0.425,153,0',\n             bp1='6,1,57,0.425,153,0')\n    amy.send(time=100, osc=0, note=60, vel=4.0)\n    amy.send(time=150, osc=0, vel=0)\n    amy.send(time=500, osc=0, note=60, vel=4.0)\n    amy.send(time=550, osc=0, vel=0)\n\nclass TestBleep(AmyTest):\n  \"\"\"Test the tulip start-up beep.\"\"\"\n\n  def run(self):\n    amy.send(time=0, wave=amy.SINE, freq=220)\n    amy.send(time=100, osc=0, pan=0.9, vel=1)\n    amy.send(time=250, osc=0, pan=0.1, freq=440)\n    amy.send(time=300, osc=0, pan=0.5, vel=0)\n\nclass TestTiming(AmyTest):\n  \"\"\"Run LPF24 to see how it times.\"\"\"\n\n  def run(self):\n    osc_args = {\"time\":0, 'wave':amy.SAW_UP, 'filter_freq':'16,0,0,0,10', 'resonance':0.75, 'filter_type':amy.FILTER_LPF24,\n        'bp1':'3,1,200,0.5,200,0'}\n    amy.send(osc=0, **osc_args)\n    amy.send(osc=1, **osc_args)\n    amy.send(osc=2, **osc_args)\n    amy.send(osc=3, **osc_args)\n    amy.send(osc=4, **osc_args)\n    amy.send(time=50, osc=0, note=48, vel=1)\n    amy.send(time=100, osc=1, note=51, vel=1)\n    amy.send(time=150, osc=2, note=54, vel=1)\n    amy.send(time=200, osc=3, note=57, vel=1)\n    amy.send(time=250, osc=4, note=60, vel=1)\n    amy.send(time=800, osc=0, vel=0)\n    amy.send(time=820, osc=1, vel=0)\n    amy.send(time=840, osc=2, vel=0)\n    amy.send(time=860, osc=3, vel=0)\n    amy.send(time=880, osc=4, vel=0)\n\nclass TestJunoPatch(AmyTest):\n  \"\"\"Known Juno patch.\"\"\"\n\n  def run(self):\n    amy.send(time=0, voices=\"0,1,2,3\", patch=20)\n    amy.send(time=50, voices=\"0\", note=48, vel=1)\n    amy.send(time=50, voices=\"1\", note=60, vel=1)\n    amy.send(time=50, voices=\"2\", note=63, vel=1)\n    amy.send(time=50, voices=\"3\", note=67, vel=1)\n    amy.send(time=600, voices=\"0\", vel=0)\n    amy.send(time=600, voices=\"1\", vel=0)\n    amy.send(time=600, voices=\"2\", vel=0)\n    amy.send(time=600, voices=\"3\", vel=0)\n\nclass TestJunoPatch3(AmyTest):\n  \"\"\"Known Juno patch with parametric EQ.\"\"\"\n\n  def run(self):\n    amy.send(time=0, voices=\"0\", patch=3)\n    amy.send(time=50, voices=\"0\", note=60, vel=1)\n    amy.send(time=900, voices=\"0\", vel=0)\n\n\ndef main(argv):\n  if len(argv) > 1:\n    # Override location of reference files.\n    AmyTest.ref_dir = argv[1]\n\n  do_all_tests = False\n\n  if do_all_tests:\n    for testClass in AmyTest.__subclasses__():\n      test_object = testClass()\n      test_object.test()\n  else:\n    #TestPcmShift().test()\n    #TestChorus().test()\n    #TestBleep().test()\n    #TestBrass().test()\n    #TestBrass2().test()\n    #TestSineEnv().test()\n    #TestSawDownOsc().test()\n    #TestGuitar().test()\n    #TestFilter().test()\n    for _ in range(5):\n      #TestTiming().test()\n      TestJunoPatch3().test()\n\n    amy.send(time=1001, debug=0)\n    amy.render(0.01)\n    \n  print(\"tests done.\")\n\n\nif __name__ == \"__main__\":\n  main(sys.argv)\n\n  \n"
  },
  {
    "path": "amy/wave.py",
    "content": "\"\"\"Stuff to parse WAVE files.\n\nUsage.\n\nReading WAVE files:\n      f = wave.open(file, 'r')\nwhere file is either the name of a file or an open file pointer.\nThe open file pointer must have methods read(), seek(), and close().\nWhen the setpos() and rewind() methods are not used, the seek()\nmethod is not  necessary.\n\nThis returns an instance of a class with the following public methods:\n      getnchannels()  -- returns number of audio channels (1 for\n                         mono, 2 for stereo)\n      getsampwidth()  -- returns sample width in bytes\n      getframerate()  -- returns sampling frequency\n      getnframes()    -- returns number of audio frames\n      getcomptype()   -- returns compression type ('NONE' for linear samples)\n      getcompname()   -- returns human-readable version of\n                         compression type ('not compressed' linear samples)\n      getparams()     -- returns a namedtuple consisting of all of the\n                         above in the above order\n      getmarkers()    -- returns None (for compatibility with the\n                         aifc module)\n      getmark(id)     -- raises an error since the mark does not\n                         exist (for compatibility with the aifc module)\n      readframes(n)   -- returns at most n frames of audio\n      rewind()        -- rewind to the beginning of the audio stream\n      setpos(pos)     -- seek to the specified position\n      tell()          -- return the current position\n      close()         -- close the instance (make it unusable)\nThe position returned by tell() and the position given to setpos()\nare compatible and have nothing to do with the actual position in the\nfile.\nThe close() method is called automatically when the class instance\nis destroyed.\n\nWriting WAVE files:\n      f = wave.open(file, 'w')\nwhere file is either the name of a file or an open file pointer.\nThe open file pointer must have methods write(), tell(), seek(), and\nclose().\n\nThis returns an instance of a class with the following public methods:\n      setnchannels(n) -- set the number of channels\n      setsampwidth(n) -- set the sample width\n      setframerate(n) -- set the frame rate\n      setnframes(n)   -- set the number of frames\n      setcomptype(type, name)\n                      -- set the compression type and the\n                         human-readable compression type\n      setparams(tuple)\n                      -- set all parameters at once\n      tell()          -- return current position in output file\n      writeframesraw(data)\n                      -- write audio frames without pathing up the\n                         file header\n      writeframes(data)\n                      -- write audio frames and patch up the file header\n      close()         -- patch up the file header and close the\n                         output file\nYou should set the parameters before the first writeframesraw or\nwriteframes.  The total number of frames does not need to be set,\nbut when it is set to the correct value, the header does not have to\nbe patched up.\nIt is best to first set all parameters, perhaps possibly the\ncompression type, and then write audio frames using writeframesraw.\nWhen all frames have been written, either call writeframes('') or\nclose() to patch up the sizes in the header.\nThe close() method is called automatically when the class instance\nis destroyed.\n\"\"\"\n\nimport builtins\n\n__all__ = [\"open\", \"openfp\", \"Error\"]\n\nclass Error(Exception):\n    pass\n\nWAVE_FORMAT_PCM = 0x0001\n\n_array_fmts = None, 'b', 'h', None, 'i'\n\n#import audioop\nimport struct\nimport sys\nfrom collections import namedtuple\n\n\n# Vendored from CPython's chunk.py (removed in Python 3.13 by PEP 594).\n# Reads IFF-style chunks: 4-byte ID, 4-byte size, then `size` bytes of data.\nclass Chunk:\n    def __init__(self, file, align=True, bigendian=True, inclheader=False):\n        self.closed = False\n        self.align = align\n        strflag = '>' if bigendian else '<'\n        self.file = file\n        self.chunkname = file.read(4)\n        if len(self.chunkname) < 4:\n            raise EOFError\n        try:\n            self.chunksize = struct.unpack_from(strflag + 'L', file.read(4))[0]\n        except struct.error:\n            raise EOFError\n        if inclheader:\n            self.chunksize = self.chunksize - 8\n        self.size_read = 0\n        try:\n            self.offset = self.file.tell()\n        except (AttributeError, OSError):\n            self.seekable = False\n        else:\n            self.seekable = True\n\n    def getname(self):\n        return self.chunkname\n\n    def getsize(self):\n        return self.chunksize\n\n    def close(self):\n        if not self.closed:\n            try:\n                self.skip()\n            finally:\n                self.closed = True\n\n    def isatty(self):\n        if self.closed:\n            raise ValueError(\"I/O operation on closed file\")\n        return False\n\n    def seek(self, pos, whence=0):\n        if self.closed:\n            raise ValueError(\"I/O operation on closed file\")\n        if not self.seekable:\n            raise OSError(\"cannot seek\")\n        if whence == 1:\n            pos = pos + self.size_read\n        elif whence == 2:\n            pos = pos + self.chunksize\n        if pos < 0 or pos > self.chunksize:\n            raise RuntimeError\n        self.file.seek(self.offset + pos, 0)\n        self.size_read = pos\n\n    def tell(self):\n        if self.closed:\n            raise ValueError(\"I/O operation on closed file\")\n        return self.size_read\n\n    def read(self, size=-1):\n        if self.closed:\n            raise ValueError(\"I/O operation on closed file\")\n        if self.size_read >= self.chunksize:\n            return b''\n        if size < 0:\n            size = self.chunksize - self.size_read\n        if size > self.chunksize - self.size_read:\n            size = self.chunksize - self.size_read\n        data = self.file.read(size)\n        self.size_read = self.size_read + len(data)\n        if (self.size_read == self.chunksize and\n                self.align and (self.chunksize & 1)):\n            dummy = self.file.read(1)\n            self.size_read = self.size_read + len(dummy)\n        return data\n\n    def skip(self):\n        if self.closed:\n            raise ValueError(\"I/O operation on closed file\")\n        if self.seekable:\n            try:\n                n = self.chunksize - self.size_read\n                if self.align and (self.chunksize & 1):\n                    n = n + 1\n                self.file.seek(n, 1)\n                self.size_read = self.size_read + n\n                return\n            except OSError:\n                pass\n        while self.size_read < self.chunksize:\n            n = min(8192, self.chunksize - self.size_read)\n            dummy = self.read(n)\n            if not dummy:\n                raise EOFError\n\n_wave_params = namedtuple('_wave_params',\n                     'nchannels sampwidth framerate nframes comptype compname')\n\nclass Wave_read:\n    \"\"\"Variables used in this class:\n\n    These variables are available to the user though appropriate\n    methods of this class:\n    _file -- the open file with methods read(), close(), and seek()\n              set through the __init__() method\n    _nchannels -- the number of audio channels\n              available through the getnchannels() method\n    _nframes -- the number of audio frames\n              available through the getnframes() method\n    _sampwidth -- the number of bytes per audio sample\n              available through the getsampwidth() method\n    _framerate -- the sampling frequency\n              available through the getframerate() method\n    _comptype -- the AIFF-C compression type ('NONE' if AIFF)\n              available through the getcomptype() method\n    _compname -- the human-readable AIFF-C compression type\n              available through the getcomptype() method\n    _soundpos -- the position in the audio stream\n              available through the tell() method, set through the\n              setpos() method\n\n    These variables are used internally only:\n    _fmt_chunk_read -- 1 iff the FMT chunk has been read\n    _data_seek_needed -- 1 iff positioned correctly in audio\n              file for readframes()\n    _data_chunk -- instantiation of a chunk class for the DATA chunk\n    _framesize -- size of one frame in the file\n    \"\"\"\n\n    def initfp(self, file):\n        self._convert = None\n        self._soundpos = 0\n        self._file = Chunk(file, bigendian = 0)\n        if self._file.getname() != b'RIFF':\n            raise Error('file does not start with RIFF id')\n        if self._file.read(4) != b'WAVE':\n            raise Error('not a WAVE file')\n        self._fmt_chunk_read = 0\n        self._data_chunk = None\n        while 1:\n            self._data_seek_needed = 1\n            try:\n                chunk = Chunk(self._file, bigendian = 0)\n            except EOFError:\n                break\n            chunkname = chunk.getname()\n            if chunkname == b'fmt ':\n                self._read_fmt_chunk(chunk)\n                self._fmt_chunk_read = 1\n            elif chunkname == b'data':\n                if not self._fmt_chunk_read:\n                    raise Error('data chunk before fmt chunk')\n                self._data_chunk = chunk\n                self._nframes = chunk.chunksize // self._framesize\n                self._data_seek_needed = 0\n                break\n            elif chunkname == b'smpl':\n                self._read_smpl_chunk(chunk)\n            chunk.skip()\n        if not self._fmt_chunk_read or not self._data_chunk:\n            raise Error('fmt chunk and/or data chunk missing')\n\n    def __init__(self, f):\n        self._i_opened_the_file = None\n        if isinstance(f, str):\n            f = builtins.open(f, 'rb')\n            self._i_opened_the_file = f\n        # else, assume it is an open file object already\n        try:\n            self.initfp(f)\n        except:\n            if self._i_opened_the_file:\n                f.close()\n            raise\n\n    def __del__(self):\n        self.close()\n\n    def __enter__(self):\n        return self\n\n    def __exit__(self, *args):\n        self.close()\n\n    #\n    # User visible methods.\n    #\n    def getfp(self):\n        return self._file\n\n    def rewind(self):\n        self._data_seek_needed = 1\n        self._soundpos = 0\n\n    def close(self):\n        if self._i_opened_the_file:\n            self._i_opened_the_file.close()\n            self._i_opened_the_file = None\n        self._file = None\n\n    def tell(self):\n        return self._soundpos\n\n    def getnchannels(self):\n        return self._nchannels\n\n    def getnframes(self):\n        return self._nframes\n\n    def getsampwidth(self):\n        return self._sampwidth\n\n    def getframerate(self):\n        return self._framerate\n\n    def getcomptype(self):\n        return self._comptype\n\n    def getcompname(self):\n        return self._compname\n\n    def getparams(self):\n        return _wave_params(self.getnchannels(), self.getsampwidth(),\n                       self.getframerate(), self.getnframes(),\n                       self.getcomptype(), self.getcompname())\n\n    def getmarkers(self):\n        return None\n\n    def getmark(self, id):\n        raise Error('no marks')\n\n    def setpos(self, pos):\n        if pos < 0 or pos > self._nframes:\n            raise Error('position not in range')\n        self._soundpos = pos\n        self._data_seek_needed = 1\n\n    def readframes(self, nframes):\n        if self._data_seek_needed:\n            self._data_chunk.seek(0, 0)\n            pos = self._soundpos * self._framesize\n            if pos:\n                self._data_chunk.seek(pos, 0)\n            self._data_seek_needed = 0\n        if nframes == 0:\n            return b''\n        data = self._data_chunk.read(nframes * self._framesize)\n        if self._sampwidth != 1 and sys.byteorder == 'big':\n            data = audioop.byteswap(data, self._sampwidth)\n        if self._convert and data:\n            data = self._convert(data)\n        self._soundpos = self._soundpos + len(data) // (self._nchannels * self._sampwidth)\n        return data\n\n    #\n    # Internal methods.\n    #\n    def _read_smpl_chunk(self, chunk):\n        _, _,_, self._midinote, _, _, _, self._loops, _ = struct.unpack('<LLLLLLLLL', chunk.read(36))\n        if(self._loops>0):  # read first loop\n            _, _, self._loopstart, self._loopend = struct.unpack('<LLLL', chunk.read(16))\n\n    def _read_fmt_chunk(self, chunk):\n        wFormatTag, self._nchannels, self._framerate, dwAvgBytesPerSec, wBlockAlign = struct.unpack('<HHLLH', chunk.read(14))\n        if wFormatTag == WAVE_FORMAT_PCM:\n            sampwidth = struct.unpack('<H', chunk.read(2))[0]\n            self._sampwidth = (sampwidth + 7) // 8\n        else:\n            raise Error('unknown format: %r' % (wFormatTag,))\n        self._framesize = self._nchannels * self._sampwidth\n        self._comptype = 'NONE'\n        self._compname = 'not compressed'\n\nclass Wave_write:\n    \"\"\"Variables used in this class:\n\n    These variables are user settable through appropriate methods\n    of this class:\n    _file -- the open file with methods write(), close(), tell(), seek()\n              set through the __init__() method\n    _comptype -- the AIFF-C compression type ('NONE' in AIFF)\n              set through the setcomptype() or setparams() method\n    _compname -- the human-readable AIFF-C compression type\n              set through the setcomptype() or setparams() method\n    _nchannels -- the number of audio channels\n              set through the setnchannels() or setparams() method\n    _sampwidth -- the number of bytes per audio sample\n              set through the setsampwidth() or setparams() method\n    _framerate -- the sampling frequency\n              set through the setframerate() or setparams() method\n    _nframes -- the number of audio frames written to the header\n              set through the setnframes() or setparams() method\n\n    These variables are used internally only:\n    _datalength -- the size of the audio samples written to the header\n    _nframeswritten -- the number of frames actually written\n    _datawritten -- the size of the audio samples actually written\n    \"\"\"\n\n    def __init__(self, f):\n        self._i_opened_the_file = None\n        if isinstance(f, str):\n            f = builtins.open(f, 'wb')\n            self._i_opened_the_file = f\n        try:\n            self.initfp(f)\n        except:\n            if self._i_opened_the_file:\n                f.close()\n            raise\n\n    def initfp(self, file):\n        self._file = file\n        self._convert = None\n        self._nchannels = 0\n        self._sampwidth = 0\n        self._framerate = 0\n        self._nframes = 0\n        self._nframeswritten = 0\n        self._datawritten = 0\n        self._datalength = 0\n        self._headerwritten = False\n\n    def __del__(self):\n        self.close()\n\n    def __enter__(self):\n        return self\n\n    def __exit__(self, *args):\n        self.close()\n\n    #\n    # User visible methods.\n    #\n    def setnchannels(self, nchannels):\n        if self._datawritten:\n            raise Error('cannot change parameters after starting to write')\n        if nchannels < 1:\n            raise Error('bad # of channels')\n        self._nchannels = nchannels\n\n    def getnchannels(self):\n        if not self._nchannels:\n            raise Error('number of channels not set')\n        return self._nchannels\n\n    def setsampwidth(self, sampwidth):\n        if self._datawritten:\n            raise Error('cannot change parameters after starting to write')\n        if sampwidth < 1 or sampwidth > 4:\n            raise Error('bad sample width')\n        self._sampwidth = sampwidth\n\n    def getsampwidth(self):\n        if not self._sampwidth:\n            raise Error('sample width not set')\n        return self._sampwidth\n\n    def setframerate(self, framerate):\n        if self._datawritten:\n            raise Error('cannot change parameters after starting to write')\n        if framerate <= 0:\n            raise Error('bad frame rate')\n        self._framerate = int(round(framerate))\n\n    def getframerate(self):\n        if not self._framerate:\n            raise Error('frame rate not set')\n        return self._framerate\n\n    def setnframes(self, nframes):\n        if self._datawritten:\n            raise Error('cannot change parameters after starting to write')\n        self._nframes = nframes\n\n    def getnframes(self):\n        return self._nframeswritten\n\n    def setcomptype(self, comptype, compname):\n        if self._datawritten:\n            raise Error('cannot change parameters after starting to write')\n        if comptype not in ('NONE',):\n            raise Error('unsupported compression type')\n        self._comptype = comptype\n        self._compname = compname\n\n    def getcomptype(self):\n        return self._comptype\n\n    def getcompname(self):\n        return self._compname\n\n    def setparams(self, params):\n        nchannels, sampwidth, framerate, nframes, comptype, compname = params\n        if self._datawritten:\n            raise Error('cannot change parameters after starting to write')\n        self.setnchannels(nchannels)\n        self.setsampwidth(sampwidth)\n        self.setframerate(framerate)\n        self.setnframes(nframes)\n        self.setcomptype(comptype, compname)\n\n    def getparams(self):\n        if not self._nchannels or not self._sampwidth or not self._framerate:\n            raise Error('not all parameters set')\n        return _wave_params(self._nchannels, self._sampwidth, self._framerate,\n              self._nframes, self._comptype, self._compname)\n\n    def setmark(self, id, pos, name):\n        raise Error('setmark() not supported')\n\n    def getmark(self, id):\n        raise Error('no marks')\n\n    def getmarkers(self):\n        return None\n\n    def tell(self):\n        return self._nframeswritten\n\n    def writeframesraw(self, data):\n        if not isinstance(data, (bytes, bytearray)):\n            data = memoryview(data).cast('B')\n        self._ensure_header_written(len(data))\n        nframes = len(data) // (self._sampwidth * self._nchannels)\n        if self._convert:\n            data = self._convert(data)\n        if self._sampwidth != 1 and sys.byteorder == 'big':\n            data = audioop.byteswap(data, self._sampwidth)\n        self._file.write(data)\n        self._datawritten += len(data)\n        self._nframeswritten = self._nframeswritten + nframes\n\n    def writeframes(self, data):\n        self.writeframesraw(data)\n        if self._datalength != self._datawritten:\n            self._patchheader()\n\n    def close(self):\n        if self._file:\n            try:\n                self._ensure_header_written(0)\n                if self._datalength != self._datawritten:\n                    self._patchheader()\n                self._file.flush()\n            finally:\n                self._file = None\n        if self._i_opened_the_file:\n            self._i_opened_the_file.close()\n            self._i_opened_the_file = None\n\n    #\n    # Internal methods.\n    #\n\n    def _ensure_header_written(self, datasize):\n        if not self._headerwritten:\n            if not self._nchannels:\n                raise Error('# channels not specified')\n            if not self._sampwidth:\n                raise Error('sample width not specified')\n            if not self._framerate:\n                raise Error('sampling rate not specified')\n            self._write_header(datasize)\n\n    def _write_header(self, initlength):\n        assert not self._headerwritten\n        self._file.write(b'RIFF')\n        if not self._nframes:\n            self._nframes = initlength // (self._nchannels * self._sampwidth)\n        self._datalength = self._nframes * self._nchannels * self._sampwidth\n        try:\n            self._form_length_pos = self._file.tell()\n        except (AttributeError, OSError):\n            self._form_length_pos = None\n        self._file.write(struct.pack('<L4s4sLHHLLHH4s',\n            36 + self._datalength, b'WAVE', b'fmt ', 16,\n            WAVE_FORMAT_PCM, self._nchannels, self._framerate,\n            self._nchannels * self._framerate * self._sampwidth,\n            self._nchannels * self._sampwidth,\n            self._sampwidth * 8, b'data'))\n        if self._form_length_pos is not None:\n            self._data_length_pos = self._file.tell()\n        self._file.write(struct.pack('<L', self._datalength))\n        self._headerwritten = True\n\n    def _patchheader(self):\n        assert self._headerwritten\n        if self._datawritten == self._datalength:\n            return\n        curpos = self._file.tell()\n        self._file.seek(self._form_length_pos, 0)\n        self._file.write(struct.pack('<L', 36 + self._datawritten))\n        self._file.seek(self._data_length_pos, 0)\n        self._file.write(struct.pack('<L', self._datawritten))\n        self._file.seek(curpos, 0)\n        self._datalength = self._datawritten\n\ndef open(f, mode=None):\n    if mode is None:\n        if hasattr(f, 'mode'):\n            mode = f.mode\n        else:\n            mode = 'rb'\n    if mode in ('r', 'rb'):\n        return Wave_read(f)\n    elif mode in ('w', 'wb'):\n        return Wave_write(f)\n    else:\n        raise Error(\"mode must be 'r', 'rb', 'w', or 'wb'\")\n\nopenfp = open # B/W compatibility\n"
  },
  {
    "path": "amy/xanadu.py",
    "content": "# AMYboard Sketch\n# Top-level code runs once at boot. loop() runs repeatedly (~60ms).\n\n\n\"\"\"Joseph T. Kung's XANADU, implemented for tulipcc.\n\nSee https://github.com/csound/examples/blob/master/csd/xanadu.csd for original.\n\"\"\"\n\nimport math\nimport amy\n\n# You can run this from the AMY Python module with:\n# $ python3\n# >>> from amy import xanadu\ntry:\n  amy.live(playback_device_id=1)\n  running_amyboard = False\nexcept:\n  running_amyboard = True\n\nC0_FREQ = 440.0 / math.pow(2.0, 4 + 9/12)\n\ndef pitch2freq(pitch):\n    \"\"\"Convert pitch in OCT.(STEP/100) to Hz.\"\"\"\n    oct = math.floor(pitch)\n    step = 100 * (pitch - oct)\n    freq = C0_FREQ * math.pow(2.0, oct + step/12)\n    return freq\n\n\ndef pitch2note(pitch):\n    \"\"\"Convert pitch in OCT.(STEP/100) to midi.\"\"\"\n    return int(round(12.0 * math.log2(pitch2freq(pitch) / C0_FREQ)))\n\n\ndef shift_pitch(pitch, shift):\n    \"\"\"Shift a OCT.(STEP/100) pitch by shift (also OCT.STEP).\"\"\"\n    oct = math.floor(pitch)\n    step = 100 * (pitch - oct)\n    s_oct = math.floor(shift)\n    s_step = 100 * (shift - s_oct)\n    final_step = step + s_step\n    final_oct = oct + s_oct + (final_step // 12)\n    final_step = final_step % 12\n    return final_oct + (final_step / 100)\n\n\ndef amy_message_of_send_args(list_of_arg_dicts):\n    \"\"\"Convert a list of amy.send args into a message string.\"\"\"\n    message = []\n    for arg_dict in list_of_arg_dicts:\n        message.append(amy.message(**arg_dict))\n    return ''.join(message)\n\n\ndef note1_patch(pan=0.5):\n    \"\"\"Return the setup string for note1 (guitar string).\"\"\"\n    osc = 0\n    modosc = 1\n    message = []\n    return amy_message_of_send_args([\n        {'osc': modosc, 'wave': amy.SINE, 'freq': 5, 'amp': 0.005},\n        {'osc': osc, 'wave': amy.SAW_DOWN, 'freq': '440,1,0,0,0,1', 'mod_source': modosc,\n         'filter_freq': '200,0,0,0,4', 'filter_type': amy.FILTER_LPF24, 'resonance': 0.7,\n         'pan': pan},\n        {'osc': osc, 'bp0': '0,1,8000,0,100,0'},\n        {'osc': osc, 'bp1': '0,1,3000,0.1,100,0'},\n    ])\n\n\ndef note2_patch(pitch_dev=0.1, pan=0.5):\n    \"\"\"Return the setup string for note2 (guitar echo with pitch sigh).\"\"\"\n    osc = 0\n    modosc = 1\n    return amy_message_of_send_args([\n        {'osc': modosc, 'wave': amy.SINE, 'freq': 0.1, 'phase': 0, 'amp': pitch_dev},\n        {'osc': osc, 'wave': amy.SAW_DOWN, 'freq': '440,1,0,0,0,-1', 'mod_source': modosc,\n         'filter_freq': '200,0,0,0,4', 'filter_type': amy.FILTER_LPF24, 'resonance': 0.7,\n         'pan': pan},\n        {'osc': osc, 'bp0': '0,1,8000,0,100,0'},\n        {'osc': osc, 'bp1': '0,1,3000,0.1,100,0'},\n    ])\n\n\ndef fm_note_patch(duration=7.5):\n    \"\"\"Patch for hand-made 2-operator FM note.\"\"\"\n    return amy_message_of_send_args([\n        {'osc': 3, 'wave': amy.SINE, 'freq': '6.0,0.5', 'phase': 0.75, 'amp': 1},\n        {'osc': 2, 'wave': amy.SINE, 'ratio': 1, 'amp': '1.5,0,0,0.4,0,0.01', 'mod_source': 3, 'bp0': '4000,1,4000,0,1000,0'},\n        {'osc': 1, 'wave': amy.SINE, 'ratio': 1, 'amp': '1,0,0,1,', 'bp0': '0,0.1,1000,1,4000,0'},\n        {'osc': 0, 'wave': amy.ALGO, 'algorithm': 1, 'algo_source': ',,,,2,1', 'bp0': '0,1,1000,1,2000,0'},\n    ])\n\n\ndef synth_note_on(synth=0, note=60, vel=1, timestamp=0):\n    amy.send(time=timestamp, synth=synth, note=note, vel=vel)\n\ndef Note(pitch, vel=1.0, time=0, pitch_shift=0, second_delay=200, use_third=False):\n    \"\"\"Composite 'note' triggers up to 3 delayed instances.\"\"\"\n    timestamp = time\n    pitch += 1.0  # 1 octave up\n    note = pitch2note(pitch)\n    synth_note_on(0, note, vel, timestamp)\n    if use_third:\n        synth_note_on(1, pitch2note(shift_pitch(pitch, pitch_shift)), vel * 0.5, timestamp + second_delay)\n        synth_note_on(2, pitch2note(pitch), vel * 0.25, timestamp + 2000)\n\ndef NoteFM(pitch, vel=1.0, time=0, duration=8000):\n    \"\"\"Play a note on the FM voice.\"\"\"\n    global synths\n    synth_note_on(3, pitch2note(pitch), vel, time)\n    # Note off\n    synth_note_on(3, pitch2note(pitch), 0, time + duration)  # Note off\n\n\ndef broken_chord(base_pitch, intervals, start_time, **kwargs):\n    \"\"\"Emit a set of notes as a staggered chord.\"\"\"\n    for index, interval in enumerate([0] + intervals):\n        pitch = shift_pitch(base_pitch, interval)\n        NoteFM(pitch - 1.0, 1, start_time)\n        Note(pitch, 1, start_time + 100 * index, **kwargs)\n\ndef xanadu_init():\n    amy.chorus(1)\n    amy.send(synth=0, num_voices=6, patch_string=note1_patch())\n    amy.send(synth=1, num_voices=6, patch_string=note1_patch(pan=0.8))\n    amy.send(synth=2, num_voices=6, patch_string=note2_patch(pan=0.2))\n    amy.send(synth=3, num_voices=12, patch_string=fm_note_patch())\n    amy.send(volume=0.5)\n\nchords = [\n  # F#7addB chord on a guitar\n  {'base_pitch': 4.06, 'intervals': [.07, 1.0, 1.04, 1.05, 1.10],\n   'start_time': 2000, 'pitch_shift': 0.029, 'second_delay': 1000, 'use_third' :True},\n  # D6add9 chord on a guitar\n  {'base_pitch': 4.02, 'intervals': [.07, 1.0, 1.04, 0.09, 1.02],\n   'start_time': 9500},\n  # Bmajadd11 chord on a guitar\n  {'base_pitch': 4.11, 'intervals': [.07, 1.0, 1.04, 2.00, 1.05],\n   'start_time': 17000},\n  # Amajadd9 chord on a guitar\n  {'base_pitch': 4.09, 'intervals': [.07, 2.0, 1.04, 1.02, 1.07],\n   'start_time': 24500},\n  # Bmajadd11 chord on a guitar\n  {'base_pitch': 4.11, 'intervals': [.07, 1.0, 1.04, 2.0, 1.05],\n   'start_time': 32000},\n  # Gmaj6 chord on a guitar\n  {'base_pitch': 4.07, 'intervals': [.07, 1.0, 1.04, 2.04, 1.09],\n   'start_time': 39500},\n  # F#7addB chord on a guitar\n  {'base_pitch': 5.06, 'intervals': [.07, 1.0, 1.04, 1.05, 1.10],\n   'start_time': 47000, 'pitch_shift': 0.029, 'second_delay': 1000, 'use_third': True},\n]\n\namy.send(reset=amy.RESET_TIMEBASE)\n\nxanadu_init()\n\nchord_iterator = iter(chords)\nnext_chord = next(chord_iterator)\nbase_time = amy.millis()\n\ndef loop():\n    global base_time, next_chord, chord_iterator\n    time_ms = amy.millis()\n    if next_chord and time_ms >= base_time + next_chord['start_time']:\n        print(next_chord)\n        broken_chord(**next_chord)\n        try:\n            next_chord = next(chord_iterator)\n        except StopIteration:\n            next_chord = None\n\n\nif not running_amyboard:\n    # I think we are running in CPython AMY, so no-one is calling loop() for us.\n    import time\n\n    while next_chord:\n        loop()\n        time.sleep(0.02)\n\n# Do not edit. Set automatically by the knobs on AMYboard Online.\n_auto_generated_knobs = \"\"\"\n\"\"\"\n"
  },
  {
    "path": "daisy/Makefile",
    "content": "# Project Name\nTARGET = amy_daisy\nAMY = ${HOME}/github/shorepine/tulipcc/amy/src\nAPP_TYPE=BOOT_SRAM\nOPT = -O3\n\n\n# Sources\nCPP_SOURCES = amy_daisy.cpp\nC_SOURCES = ${AMY}/amy.c ${AMY}/oscillators.c ${AMY}/algorithms.c ${AMY}/envelope.c ${AMY}/examples.c ${AMY}/filters.c ${AMY}/pcm.c ${AMY}/custom.c ${AMY}/delay.c ${AMY}/log2_exp2.c ${AMY}/patches.c ${AMY}/api.c ${AMY}/sequencer.c ${AMY}/amy_midi.c ${AMY}/instrument.c ${AMY}/parse.c ${AMY}/transfer.c ${AMY}/interp_partials.c ${AMY}/midi_mappings.c\n\n\nC_INCLUDES += -I${AMY} -DAMY_DAISY -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wpointer-arith -Wno-float-conversion -Wno-missing-declarations\n\n# Library Locations\nLIBDAISY_DIR = ${HOME}/Desktop/DaisyExamples/libDaisy\nDAISYSP_DIR = ${HOME}/Desktop/DaisyExamples/DaisySP\n\n# Core location, and generic makefile.\nSYSTEM_FILES_DIR = $(LIBDAISY_DIR)/core\ninclude $(SYSTEM_FILES_DIR)/Makefile\n\n"
  },
  {
    "path": "daisy/amy_daisy.cpp",
    "content": "// amy_daisy.cpp\n// Core daisy function to run AMY on the Daisy hardware/firmware environment.\n\n#include \"daisy_seed.h\"\n#include \"daisysp.h\"\n\nextern \"C\" {\n    #include \"amy.h\"\n    #include \"examples.h\"\n    extern void sequencer_check_and_fill();\n}\n\nusing namespace daisy;\nusing namespace daisysp;\n\nDaisySeed  hardware;\nMidiUartHandler midi;\n\nvoid AudioCallback(AudioHandle::InterleavingInputBuffer  in,\n                   AudioHandle::InterleavingOutputBuffer out,\n                   size_t                                size)\n{\n    amy_render(0, AMY_OSCS, 0);\n    short int * block = amy_fill_buffer();\n\n    // Fill the block with samples.\n    for(size_t i = 0; i < size; i += 2)\n    {\n        // Set the left and right outputs.\n        out[i]     = (block[i]/32767.0);\n        out[i + 1] = (block[i+1]/32767.0);\n\t// Copy the inputs.\n\tamy_in_block[i] = (short int)(in[i] * 32767.0);\n\tamy_in_block[i + 1] = (short int)(in[i + 1] * 32767.0);\n    }\n}\n\nvoid test_audio_in() {\n    amy_event e = amy_default_event();\n    e.reset_osc = RESET_SYNTHS;\n    amy_add_event(&e);\n    e = amy_default_event();\n    e.osc = 80;\n    e.wave = AUDIO_IN0;\n    e.pan_coefs[COEF_CONST] = 0;\n    e.velocity = 10.0f;\n    amy_add_event(&e);\n    e.osc = 81;\n    e.wave = AUDIO_IN1;\n    e.pan_coefs[COEF_CONST] = 1.0f;\n    amy_add_event(&e);\n}\n\nvoid midi_polyphony(uint32_t start, uint16_t patch) {\n    // Play mulitple notes via note-ons to MIDI channel 1.\n    uint8_t data[3] = {0x90, 0x00, 0x7f};\n    uint8_t note = 40;\n    for(uint8_t i=0;i<15;i++) {\n\tdata[1] = note;\n\tamy_event_midi_message_received(data, 3, 0, start);\n        start += 1000;\n        note += 2;\n    }\n}\n\n#define MAX_POLYPHONY 17\n\nvoid event_polyphony(uint32_t start, uint16_t patch) {\n    // Verify polyphony by directly configuring a lot of voices and playing them all at once.\n    amy_event e = amy_default_event();\n    e.time = start;\n    e.patch_number = patch;\n    for (int i = 0; i < MAX_POLYPHONY; ++i)\n\te.voices[i] = i;\n    amy_add_event(&e);\n    start += 250;\n    uint8_t note = 40;\n    for(uint8_t i=0;i<MAX_POLYPHONY;i++) {\n        e = amy_default_event();\n        e.time = start;\n        e.velocity = 0.5;\n        e.voices[0] = i;\n        e.midi_note = note;\n        amy_add_event(&e);\n        start += 1000;\n        note += 2;\n    }\n}   \n\n\nvoid HandleMidiMessage(MidiEvent m) {\n    // MIDI message already part-digested by libDaisy, work back to raw bytes for AMY.\n    uint8_t data[3];\n    data[0] = m.channel;\n    data[1] = m.data[0];\n    data[2] = m.data[1];\n    bool good_event = true;\n    switch(m.type)\n    {\n        case NoteOff:\n\t    data[0] |= 0x80;\n\t    break;\n        case NoteOn:\n\t    data[0] |= 0x90;\n\t    break;\n        case ControlChange:\n\t    data[0] |= 0xB0;\n\t    break;\n        case ProgramChange:\n\t    data[0] |= 0xC0;\n            break;\n        case PitchBend:\n\t    data[0] |= 0xE0;\n            break;\n        default:\n\t    good_event = false;\n\t    break;\n    }\n    if (good_event) {\n\tuint32_t time = UINT32_MAX;\n\tamy_event_midi_message_received(data, 3, 0, time);\n    }\n}\n\nvoid sequencer_timer_callback(void* arg) {\n    sequencer_check_and_fill();\n}\n\nvoid init_sequencer() {\n    // Platform support of sequencer is to call sequencer_check_and_fill() every 0.5 ms.\n    TimerHandle         tim5;\n    TimerHandle::Config tim_cfg;\n\n    /** TIM5 with IRQ enabled */\n    tim_cfg.periph     = TimerHandle::Config::Peripheral::TIM_5;\n    tim_cfg.enable_irq = true;\n\n    /** Configure frequency (2000Hz) */\n    auto tim_target_freq = 2000;\n    auto tim_base_freq   = System::GetPClk2Freq();\n    tim_cfg.period       = tim_base_freq / tim_target_freq;\n\n    /** Initialize timer */\n    tim5.Init(tim_cfg);\n    tim5.SetCallback(sequencer_timer_callback);\n\n    /** Start the timer, and generate callbacks at the end of each period */\n    tim5.Start();\n}\n\nint main(void)\n{\n    // Configure and Initialize the Daisy Seed\n    hardware.Configure();\n    hardware.Init();\n    hardware.SetAudioBlockSize(128);\n\n    //How many samples we'll output per second\n    float samplerate = hardware.AudioSampleRate();\n\n    //Create an ADC configuration\n    AdcChannelConfig adcConfig;\n    //Add pin 21 as an analog input in this config. We'll use this to read the knob\n    adcConfig.InitSingle(hardware.GetPin(21));\n\n    //Set the ADC to use our configuration\n    hardware.adc.Init(&adcConfig, 1);\n\n    //Start the adc\n    hardware.adc.Start();\n\n    // Initialize Amy\n    amy_config_t amy_config = amy_default_config();\n    amy_config.features.startup_bleep = 1; \n    amy_start(amy_config); // initializes amy \n\n    // Start the sequencer timer for AMY.\n    init_sequencer();\n\n    //example_sequencer_drums_synth(1000);\n    //event_polyphony(0, 0);\n    //test_audio_in();\n\n    // Switch midi chan 1 voice to piano.\n    //amy_event e = amy_default_event();\n    //e.synth = 1;\n    //e.patch_number = 256;\n    //e.num_voices = 6;\n    //e.time = 1000;\n    //amy_add_event(&e);\n\n    //config_echo(0.1f, 500.0f, 500.0f, 0.5f, 0.3f);\n\n    //Start calling the audio callback\n    hardware.StartAudio(AudioCallback);\n\n    // Loop forever while forwarding MIDI messages.\n    MidiUartHandler::Config midi_config;\n    midi.Init(midi_config);\n    midi.StartReceive();\n    for(;;) {\n        amy_execute_deltas();\n        midi.Listen();\n        while(midi.HasEvents()) {\n            HandleMidiMessage(midi.PopEvent());\n        }\n    }\n}\n"
  },
  {
    "path": "docs/amy.aw.js",
    "content": "// This file is the main bootstrap script for Wasm Audio Worklets loaded in an\n// Emscripten application.  Build with -sAUDIO_WORKLET=1 linker flag to enable\n// targeting Audio Worklets.\n\n// AudioWorkletGlobalScope does not have a onmessage/postMessage() functionality\n// at the global scope, which means that after creating an\n// AudioWorkletGlobalScope and loading this script into it, we cannot\n// postMessage() information into it like one would do with Web Workers.\n\n// Instead, we must create an AudioWorkletProcessor class, then instantiate a\n// Web Audio graph node from it on the main thread. Using its message port and\n// the node constructor's \"processorOptions\" field, we can share the necessary\n// bootstrap information from the main thread to the AudioWorkletGlobalScope.\n\nfunction createWasmAudioWorkletProcessor(audioParams) {\n  class WasmAudioWorkletProcessor extends AudioWorkletProcessor {\n    constructor(args) {\n      super();\n\n      // Copy needed stack allocation functions from the Module object\n      // to global scope, these will be accessed in hot paths, so maybe\n      // they'll be a bit faster to access directly, rather than referencing\n      // them as properties of the Module object.\n      globalThis.stackAlloc = Module['stackAlloc'];\n      globalThis.stackSave = Module['stackSave'];\n      globalThis.stackRestore = Module['stackRestore'];\n      globalThis.HEAPU32 = Module['HEAPU32'];\n      globalThis.HEAPF32 = Module['HEAPF32'];\n\n      // Capture the Wasm function callback to invoke.\n      let opts = args.processorOptions;\n      this.callbackFunction = Module['wasmTable'].get(opts['cb']);\n      this.userData = opts['ud'];\n      // Then the samples per channel to process, fixed for the lifetime of the\n      // context that created this processor. Note for when moving to Web Audio\n      // 1.1: the typed array passed to process() should be the same size as this\n      // 'render quantum size', and this exercise of passing in the value\n      // shouldn't be required (to be verified).\n      this.samplesPerChannel = opts['sc'];\n    }\n\n    static get parameterDescriptors() {\n      return audioParams;\n    }\n\n    process(inputList, outputList, parameters) {\n      // Marshal all inputs and parameters to the Wasm memory on the thread stack,\n      // then perform the wasm audio worklet call,\n      // and finally marshal audio output data back.\n\n      let numInputs = inputList.length,\n        numOutputs = outputList.length,\n        numParams = 0, i, j, k, dataPtr,\n        bytesPerChannel = this.samplesPerChannel * 4,\n        stackMemoryNeeded = (numInputs + numOutputs) * 12,\n        oldStackPtr = stackSave(),\n        inputsPtr, outputsPtr, outputDataPtr, paramsPtr,\n        didProduceAudio, paramArray;\n\n      // Calculate how much stack space is needed.\n      for (i of inputList) stackMemoryNeeded += i.length * bytesPerChannel;\n      for (i of outputList) stackMemoryNeeded += i.length * bytesPerChannel;\n      for (i in parameters) stackMemoryNeeded += parameters[i].byteLength + 8, ++numParams;\n\n      // Allocate the necessary stack space.\n      inputsPtr = stackAlloc(stackMemoryNeeded);\n\n      // Copy input audio descriptor structs and data to Wasm\n      k = inputsPtr >> 2;\n      dataPtr = inputsPtr + numInputs * 12;\n      for (i of inputList) {\n        // Write the AudioSampleFrame struct instance\n        HEAPU32[k + 0] = i.length;\n        HEAPU32[k + 1] = this.samplesPerChannel;\n        HEAPU32[k + 2] = dataPtr;\n        k += 3;\n        // Marshal the input audio sample data for each audio channel of this input\n        for (j of i) {\n          HEAPF32.set(j, dataPtr>>2);\n          dataPtr += bytesPerChannel;\n        }\n      }\n\n      // Copy output audio descriptor structs to Wasm\n      outputsPtr = dataPtr;\n      k = outputsPtr >> 2;\n      outputDataPtr = (dataPtr += numOutputs * 12) >> 2;\n      for (i of outputList) {\n        // Write the AudioSampleFrame struct instance\n        HEAPU32[k + 0] = i.length;\n        HEAPU32[k + 1] = this.samplesPerChannel;\n        HEAPU32[k + 2] = dataPtr;\n        k += 3;\n        // Reserve space for the output data\n        dataPtr += bytesPerChannel * i.length;\n      }\n\n      // Copy parameters descriptor structs and data to Wasm\n      paramsPtr = dataPtr;\n      k = paramsPtr >> 2;\n      dataPtr += numParams * 8;\n      for (i = 0; paramArray = parameters[i++];) {\n        // Write the AudioParamFrame struct instance\n        HEAPU32[k + 0] = paramArray.length;\n        HEAPU32[k + 1] = dataPtr;\n        k += 2;\n        // Marshal the audio parameters array\n        HEAPF32.set(paramArray, dataPtr>>2);\n        dataPtr += paramArray.length*4;\n      }\n\n      // Call out to Wasm callback to perform audio processing\n      if (didProduceAudio = this.callbackFunction(numInputs, inputsPtr, numOutputs, outputsPtr, numParams, paramsPtr, this.userData)) {\n        // Read back the produced audio data to all outputs and their channels.\n        // (A garbage-free function TypedArray.copy(dstTypedArray, dstOffset,\n        // srcTypedArray, srcOffset, count) would sure be handy..  but web does\n        // not have one, so manually copy all bytes in)\n        for (i of outputList) {\n          for (j of i) {\n            for (k = 0; k < this.samplesPerChannel; ++k) {\n              j[k] = HEAPF32[outputDataPtr++];\n            }\n          }\n        }\n      }\n\n      stackRestore(oldStackPtr);\n\n      // Return 'true' to tell the browser to continue running this processor.\n      // (Returning 1 or any other truthy value won't work in Chrome)\n      return !!didProduceAudio;\n    }\n  }\n  return WasmAudioWorkletProcessor;\n}\n\n// Specify a worklet processor that will be used to receive messages to this\n// AudioWorkletGlobalScope.  We never connect this initial AudioWorkletProcessor\n// to the audio graph to do any audio processing.\nclass BootstrapMessages extends AudioWorkletProcessor {\n  constructor(arg) {\n    super();\n    // Initialize the global Emscripten Module object that contains e.g. the\n    // Wasm Module and Memory objects.  After this we are ready to load in the\n    // main application JS script, which the main thread will addModule()\n    // to this scope.\n    globalThis.Module = arg['processorOptions'];\n    // Default runtime relies on an injected instantiateWasm() function to\n    // initialize the Wasm Module.\n    globalThis.Module['instantiateWasm'] = (info, receiveInstance) => {\n      var instance = new WebAssembly.Instance(Module['wasm'], info);\n      return receiveInstance(instance, Module['wasm']);\n    };\n    // Listen to messages from the main thread. These messages will ask this\n    // scope to create the real AudioWorkletProcessors that call out to Wasm to\n    // do audio processing.\n    let p = globalThis['messagePort'] = this.port;\n    p.onmessage = async (msg) => {\n      let d = msg.data;\n      if (d['_wpn']) {\n        // '_wpn' is short for 'Worklet Processor Node', using an identifier\n        // that will never conflict with user messages\n        // Instantiate the MODULARIZEd Module function, which is stored for us\n        // under the special global name AudioWorkletModule in\n        // MODULARIZE+AUDIO_WORKLET builds.\n        if (globalThis.AudioWorkletModule) {\n          // This populates the Module object with all the Wasm properties\n          globalThis.Module = await AudioWorkletModule(Module);\n          // We have now instantiated the Module function, can discard it from\n          // global scope\n          delete globalThis.AudioWorkletModule;\n        }\n        // Register a real AudioWorkletProcessor that will actually do audio processing.\n        // 'ap' being the audio params\n        registerProcessor(d['_wpn'], createWasmAudioWorkletProcessor(d['ap']));\n        // Post a Wasm Call message back telling that we have now registered the\n        // AudioWorkletProcessor, and should trigger the user onSuccess callback\n        // of the emscripten_create_wasm_audio_worklet_processor_async() call.\n        //\n        // '_wsc' is short for 'wasm call', using an identifier that will never\n        // conflict with user messages\n        // 'cb' the callback function\n        // 'ch' the context handle\n        // 'ud' the passed user data\n        p.postMessage({'_wsc': d['cb'], 'x': [d['ch'], 1/*EM_TRUE*/, d['ud']] });\n      } else if (d['_wsc']) {\n        var ptr = d['_wsc'];\n        Module['wasmTable'].get(ptr)(...d['x']);\n      };\n    }\n  }\n\n  // No-op, not doing audio processing in this processor. It is just for\n  // receiving bootstrap messages.  However browsers require it to still be\n  // present. It should never be called because we never add a node to the graph\n  // with this processor, although it does look like Chrome does still call this\n  // function.\n  process() {\n    // keep this function a no-op. Chrome redundantly wants to call this even\n    // though this processor is never added to the graph.\n  }\n};\n\n// Register the dummy processor that will just receive messages.\nregisterProcessor('message', BootstrapMessages);\n"
  },
  {
    "path": "docs/amy.js",
    "content": "var amyModule=(()=>{var _scriptName=globalThis.document?.currentScript?.src;return async function(moduleArg={}){var moduleRtn;var Module=moduleArg;var ENVIRONMENT_IS_WASM_WORKER=globalThis.name==\"em-ww\";var ENVIRONMENT_IS_AUDIO_WORKLET=!!globalThis.AudioWorkletGlobalScope;if(ENVIRONMENT_IS_AUDIO_WORKLET)ENVIRONMENT_IS_WASM_WORKER=true;var ENVIRONMENT_IS_WEB=!!globalThis.window;var ENVIRONMENT_IS_WORKER=!!globalThis.WorkerGlobalScope;var ENVIRONMENT_IS_NODE=globalThis.process?.versions?.node&&globalThis.process?.type!=\"renderer\";if(ENVIRONMENT_IS_NODE){var worker_threads=require(\"worker_threads\");global.Worker=worker_threads.Worker;ENVIRONMENT_IS_WORKER=!worker_threads.isMainThread;ENVIRONMENT_IS_WASM_WORKER=ENVIRONMENT_IS_WORKER&&worker_threads[\"workerData\"]==\"em-ww\"}var arguments_=[];var thisProgram=\"./this.program\";var quit_=(status,toThrow)=>{throw toThrow};if(typeof __filename!=\"undefined\"){_scriptName=__filename}else if(ENVIRONMENT_IS_WORKER){_scriptName=self.location.href}var scriptDirectory=\"\";function locateFile(path){if(Module[\"locateFile\"]){return Module[\"locateFile\"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require(\"fs\");scriptDirectory=__dirname+\"/\";readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:\"utf8\");return ret};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\\\/g,\"/\")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(\".\",_scriptName).href}catch{}{if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.responseType=\"arraybuffer\";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=async url=>{if(isFileURI(url)){return new Promise((resolve,reject)=>{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,true);xhr.responseType=\"arraybuffer\";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){resolve(xhr.response);return}reject(xhr.status)};xhr.onerror=reject;xhr.send(null)})}var response=await fetch(url,{credentials:\"same-origin\"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+\" : \"+response.url)}}}else{}var defaultPrint=console.log.bind(console);var defaultPrintErr=console.error.bind(console);if(ENVIRONMENT_IS_NODE){var utils=require(\"util\");var stringify=a=>typeof a==\"object\"?utils.inspect(a):a;defaultPrint=(...args)=>fs.writeSync(1,args.map(stringify).join(\" \")+\"\\n\");defaultPrintErr=(...args)=>fs.writeSync(2,args.map(stringify).join(\" \")+\"\\n\")}var out=defaultPrint;var err=defaultPrintErr;var wasmBinary;var wasmModule;var ABORT=false;var EXITSTATUS;var isFileURI=filename=>filename.startsWith(\"file://\");function growMemViews(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}}var readyPromiseResolve,readyPromiseReject;if(ENVIRONMENT_IS_NODE&&ENVIRONMENT_IS_WASM_WORKER){var parentPort=worker_threads[\"parentPort\"];parentPort.on(\"message\",msg=>global.onmessage?.({data:msg}));Object.assign(globalThis,{self:global,postMessage:msg=>parentPort[\"postMessage\"](msg)});process.on(\"uncaughtException\",err=>{postMessage({cmd:\"uncaughtException\",error:err});process.exit(1)})}var wwParams;function startWasmWorker(props){wwParams=props;wasmMemory=props.wasmMemory;updateMemoryViews();wasmModule=props.wasm;createWasm();run();props.wasm=props.memMemory=0}if(ENVIRONMENT_IS_WASM_WORKER&&!ENVIRONMENT_IS_AUDIO_WORKLET){if(ENVIRONMENT_IS_NODE){var wrappedHandlers=new WeakMap;globalThis.onmessage=null;function wrapMsgHandler(h){var f=wrappedHandlers.get(h);if(!f){f=msg=>h({data:msg});wrappedHandlers.set(h,f)}return f}Object.assign(globalThis,{addEventListener:(name,handler)=>parentPort[\"on\"](name,wrapMsgHandler(handler)),removeEventListener:(name,handler)=>parentPort[\"off\"](name,wrapMsgHandler(handler))})}onmessage=d=>{onmessage=null;startWasmWorker(d.data)}}if(ENVIRONMENT_IS_AUDIO_WORKLET){function createWasmAudioWorkletProcessor(audioParams){class WasmAudioWorkletProcessor extends AudioWorkletProcessor{constructor(args){super();let opts=args.processorOptions;this.callback=(a1,a2,a3,a4,a5,a6,a7)=>dynCall_iiiiiiii(opts.callback,a1,a2,a3,a4,a5,a6,a7);this.userData=opts.userData;this.samplesPerChannel=opts.samplesPerChannel;this.bytesPerChannel=this.samplesPerChannel*4;this.outputViews=new Array(Math.min((wwParams.stackSize-16)/this.bytesPerChannel|0,64));this.createOutputViews()}createOutputViews(){var oldStackPtr=stackSave();var viewDataIdx=stackAlloc(this.outputViews.length*this.bytesPerChannel)>>2;for(var n=this.outputViews.length-1;n>=0;n--){this.outputViews[n]=(growMemViews(),HEAPF32).subarray(viewDataIdx,viewDataIdx+=this.samplesPerChannel)}stackRestore(oldStackPtr)}static get parameterDescriptors(){return audioParams}process(inputList,outputList,parameters){if((growMemViews(),HEAPF32).buffer!=this.outputViews[0].buffer){this.createOutputViews()}var numInputs=inputList.length;var numOutputs=outputList.length;var entry;var subentry;var stackMemoryStruct=(numInputs+numOutputs)*12;var stackMemoryData=0;for(entry of inputList){stackMemoryData+=entry.length}stackMemoryData*=this.bytesPerChannel;var outputViewsNeeded=0;for(entry of outputList){outputViewsNeeded+=entry.length}stackMemoryData+=outputViewsNeeded*this.bytesPerChannel;var numParams=0;for(entry in parameters){++numParams;stackMemoryStruct+=8;stackMemoryData+=parameters[entry].byteLength}var oldStackPtr=stackSave();var stackMemoryAligned=stackMemoryStruct+stackMemoryData+15&~15;var structPtr=stackAlloc(stackMemoryAligned);var dataPtr=structPtr+(stackMemoryAligned-stackMemoryData);var inputsPtr=structPtr;for(entry of inputList){(growMemViews(),HEAPU32)[structPtr>>2]=entry.length;(growMemViews(),HEAPU32)[structPtr+4>>2]=this.samplesPerChannel;(growMemViews(),HEAPU32)[structPtr+8>>2]=dataPtr;structPtr+=12;for(subentry of entry){(growMemViews(),HEAPF32).set(subentry,dataPtr>>2);dataPtr+=this.bytesPerChannel}}var paramsPtr=structPtr;for(entry=0;subentry=parameters[entry++];){(growMemViews(),HEAPU32)[structPtr>>2]=subentry.length;(growMemViews(),HEAPU32)[structPtr+4>>2]=dataPtr;structPtr+=8;(growMemViews(),HEAPF32).set(subentry,dataPtr>>2);dataPtr+=subentry.length*4}var outputsPtr=structPtr;for(entry of outputList){(growMemViews(),HEAPU32)[structPtr>>2]=entry.length;(growMemViews(),HEAPU32)[structPtr+4>>2]=this.samplesPerChannel;(growMemViews(),HEAPU32)[structPtr+8>>2]=dataPtr;structPtr+=12;dataPtr+=this.bytesPerChannel*entry.length}var didProduceAudio=this.callback(numInputs,inputsPtr,numOutputs,outputsPtr,numParams,paramsPtr,this.userData);if(didProduceAudio){for(entry of outputList){for(subentry of entry){subentry.set(this.outputViews[--outputViewsNeeded])}}}stackRestore(oldStackPtr);return!!didProduceAudio}}return WasmAudioWorkletProcessor}var port=globalThis.port||{};class BootstrapMessages extends AudioWorkletProcessor{constructor(arg){super();startWasmWorker(arg.processorOptions);if(!(port instanceof MessagePort)){this.port.onmessage=port.onmessage;port=this.port}}process(){}}registerProcessor(\"em-bootstrap\",BootstrapMessages);port.onmessage=async msg=>{let d=msg.data;if(d[\"_boot\"]){startWasmWorker(d)}else if(d[\"_wpn\"]){registerProcessor(d[\"_wpn\"],createWasmAudioWorkletProcessor(d.audioParams));port.postMessage({_wsc:d.callback,args:[d.contextHandle,1,d.userData]})}else if(d[\"_wsc\"]){getWasmTableEntry(d[\"_wsc\"])(...d.args)}}}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var HEAP64,HEAPU64;var runtimeInitialized=false;function updateMemoryViews(){var b=wasmMemory.buffer;HEAP8=new Int8Array(b);HEAP16=new Int16Array(b);Module[\"HEAPU8\"]=HEAPU8=new Uint8Array(b);HEAPU16=new Uint16Array(b);HEAP32=new Int32Array(b);HEAPU32=new Uint32Array(b);HEAPF32=new Float32Array(b);HEAPF64=new Float64Array(b);HEAP64=new BigInt64Array(b);HEAPU64=new BigUint64Array(b)}function initMemory(){if(ENVIRONMENT_IS_WASM_WORKER){return}if(Module[\"wasmMemory\"]){wasmMemory=Module[\"wasmMemory\"]}else{var INITIAL_MEMORY=Module[\"INITIAL_MEMORY\"]||134217728;wasmMemory=new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:32768,shared:true})}updateMemoryViews()}function preRun(){if(Module[\"preRun\"]){if(typeof Module[\"preRun\"]==\"function\")Module[\"preRun\"]=[Module[\"preRun\"]];while(Module[\"preRun\"].length){addOnPreRun(Module[\"preRun\"].shift())}}callRuntimeCallbacks(onPreRuns)}function initRuntime(){runtimeInitialized=true;if(ENVIRONMENT_IS_WASM_WORKER)return _wasmWorkerInitializeRuntime();wasmExports[\"D\"]()}function postRun(){if(ENVIRONMENT_IS_WASM_WORKER){return}if(Module[\"postRun\"]){if(typeof Module[\"postRun\"]==\"function\")Module[\"postRun\"]=[Module[\"postRun\"]];while(Module[\"postRun\"].length){addOnPostRun(Module[\"postRun\"].shift())}}callRuntimeCallbacks(onPostRuns)}function abort(what){Module[\"onAbort\"]?.(what);what=\"Aborted(\"+what+\")\";err(what);ABORT=true;what+=\". Build with -sASSERTIONS for more info.\";var e=new WebAssembly.RuntimeError(what);readyPromiseReject?.(e);throw e}var wasmBinaryFile;function findWasmBinary(){return locateFile(\"amy.wasm\")}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw\"both async and sync fetching of the wasm failed\"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE){try{var response=fetch(binaryFile,{credentials:\"same-origin\"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err(\"falling back to ArrayBuffer instantiation\")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){assignWasmImports();var imports={a:wasmImports};return imports}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;wasmExports=Asyncify.instrumentWasmExports(wasmExports);assignWasmExports(wasmExports);wasmModule=module;return wasmExports}function receiveInstantiationResult(result){return receiveInstance(result[\"instance\"],result[\"module\"])}var info=getWasmImports();if(Module[\"instantiateWasm\"]){return new Promise((resolve,reject)=>{Module[\"instantiateWasm\"](info,(inst,mod)=>{resolve(receiveInstance(inst,mod))})})}if(ENVIRONMENT_IS_WASM_WORKER){var instance=new WebAssembly.Instance(wasmModule,getWasmImports());return receiveInstance(instance,wasmModule)}wasmBinaryFile??=findWasmBinary();var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);var exports=receiveInstantiationResult(result);return exports}class ExitStatus{name=\"ExitStatus\";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var _wasmWorkerDelayedMessageQueue=[];var handleException=e=>{if(e instanceof ExitStatus||e==\"unwind\"){return EXITSTATUS}quit_(1,e)};var runtimeKeepaliveCounter=0;var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){Module[\"onExit\"]?.(code);ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=(status,implicit)=>{EXITSTATUS=status;_proc_exit(status)};var _exit=exitJS;var maybeExit=()=>{if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var wasmTableMirror=[];var getWasmTableEntry=funcPtr=>{var func=wasmTableMirror[funcPtr];if(!func){wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};var _wasmWorkerRunPostMessage=e=>{let data=e.data;let wasmCall=data[\"_wsc\"];wasmCall&&callUserCallback(()=>getWasmTableEntry(wasmCall)(...data[\"x\"]))};var _wasmWorkerAppendToQueue=e=>{_wasmWorkerDelayedMessageQueue.push(e)};var _wasmWorkerInitializeRuntime=()=>{noExitRuntime=1;__emscripten_wasm_worker_initialize(wwParams.stackLowestAddress,wwParams.stackSize);__embind_initialize_bindings();if(!ENVIRONMENT_IS_AUDIO_WORKLET){removeEventListener(\"message\",_wasmWorkerAppendToQueue);_wasmWorkerDelayedMessageQueue=_wasmWorkerDelayedMessageQueue.forEach(_wasmWorkerRunPostMessage);addEventListener(\"message\",_wasmWorkerRunPostMessage)}};var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var onPostRuns=[];var addOnPostRun=cb=>onPostRuns.push(cb);var onPreRuns=[];var addOnPreRun=cb=>onPreRuns.push(cb);var dynCalls={};var noExitRuntime=true;var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var wasmMemory;var UTF8Decoder=globalThis.TextDecoder&&new TextDecoder;var findStringEnd=(heapOrArray,idx,maxBytesToRead,ignoreNul)=>{var maxIdx=idx+maxBytesToRead;if(ignoreNul)return maxIdx;while(heapOrArray[idx]&&!(idx>=maxIdx))++idx;return idx};var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead,ignoreNul)=>{var endPtr=findStringEnd(heapOrArray,idx,maxBytesToRead,ignoreNul);if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.buffer instanceof ArrayBuffer?heapOrArray.subarray(idx,endPtr):heapOrArray.slice(idx,endPtr))}var str=\"\";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead,ignoreNul)=>ptr?UTF8ArrayToString((growMemViews(),HEAPU8),ptr,maxBytesToRead,ignoreNul):\"\";var ___assert_fail=(condition,filename,line,func)=>abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):\"unknown filename\",line,func?UTF8ToString(func):\"unknown function\"]);var __abort_js=()=>abort(\"\");var AsciiToString=ptr=>{var str=\"\";while(1){var ch=(growMemViews(),HEAPU8)[ptr++];if(!ch)return str;str+=String.fromCharCode(ch)}};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError=class BindingError extends Error{constructor(message){super(message);this.name=\"BindingError\"}};var throwBindingError=message=>{throw new BindingError(message)};function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type \"${name}\" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){return sharedRegisterType(rawType,registeredInstance,options)}var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>(growMemViews(),HEAP8)[pointer]:pointer=>(growMemViews(),HEAPU8)[pointer];case 2:return signed?pointer=>(growMemViews(),HEAP16)[pointer>>1]:pointer=>(growMemViews(),HEAPU16)[pointer>>1];case 4:return signed?pointer=>(growMemViews(),HEAP32)[pointer>>2]:pointer=>(growMemViews(),HEAPU32)[pointer>>2];case 8:return signed?pointer=>(growMemViews(),HEAP64)[pointer>>3]:pointer=>(growMemViews(),HEAPU64)[pointer>>3];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{name=AsciiToString(name);const isUnsignedType=minRange===0n;let fromWireType=value=>value;if(isUnsignedType){const bitSize=size*8;fromWireType=value=>BigInt.asUintN(bitSize,value);maxRange=fromWireType(maxRange)}registerType(primitiveType,{name,fromWireType,toWireType:(destructors,value)=>{if(typeof value==\"number\"){value=BigInt(value)}return value},readValueFromPointer:integerReadValueFromPointer(name,size,!isUnsignedType),destructorFunction:null})};var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=AsciiToString(name);registerType(rawType,{name,fromWireType:function(wt){return!!wt},toWireType:function(destructors,o){return o?trueValue:falseValue},readValueFromPointer:function(pointer){return this.fromWireType((growMemViews(),HEAPU8)[pointer])},destructorFunction:null})};var emval_freelist=[];var emval_handles=[0,1,,1,null,1,true,1,false,1];var __emval_decref=handle=>{if(handle>9&&0===--emval_handles[handle+1]){emval_handles[handle]=undefined;emval_freelist.push(handle)}};var Emval={toValue:handle=>{if(!handle){throwBindingError(`Cannot use deleted val. handle = ${handle}`)}return emval_handles[handle]},toHandle:value=>{switch(value){case undefined:return 2;case null:return 4;case true:return 6;case false:return 8;default:{const handle=emval_freelist.pop()||emval_handles.length;emval_handles[handle]=value;emval_handles[handle+1]=1;return handle}}}};function readPointer(pointer){return this.fromWireType((growMemViews(),HEAPU32)[pointer>>2])}var EmValType={name:\"emscripten::val\",fromWireType:handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},toWireType:(destructors,value)=>Emval.toHandle(value),readValueFromPointer:readPointer,destructorFunction:null};var __embind_register_emval=rawType=>registerType(rawType,EmValType);var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this.fromWireType((growMemViews(),HEAPF32)[pointer>>2])};case 8:return function(pointer){return this.fromWireType((growMemViews(),HEAPF64)[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=AsciiToString(name);registerType(rawType,{name,fromWireType:value=>value,toWireType:(destructors,value)=>value,readValueFromPointer:floatReadValueFromPointer(name,size),destructorFunction:null})};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=AsciiToString(name);const isUnsignedType=minRange===0;let fromWireType=value=>value;if(isUnsignedType){var bitshift=32-8*size;fromWireType=value=>value<<bitshift>>>bitshift;maxRange=fromWireType(maxRange)}registerType(primitiveType,{name,fromWireType,toWireType:(destructors,value)=>value,readValueFromPointer:integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=(growMemViews(),HEAPU32)[handle>>2];var data=(growMemViews(),HEAPU32)[handle+4>>2];return new TA((growMemViews(),HEAP8).buffer,data,size)}name=AsciiToString(name);registerType(rawType,{name,fromWireType:decodeMemoryView,readValueFromPointer:decodeMemoryView},{ignoreDuplicateRegistrations:true})};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.codePointAt(i);if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63;i++}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,(growMemViews(),HEAPU8),outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++}else if(c<=2047){len+=2}else if(c>=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var __embind_register_std_string=(rawType,name)=>{name=AsciiToString(name);var stdStringIsUTF8=true;registerType(rawType,{name,fromWireType(value){var length=(growMemViews(),HEAPU32)[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){str=UTF8ToString(payload,length,true)}else{str=\"\";for(var i=0;i<length;++i){str+=String.fromCharCode((growMemViews(),HEAPU8)[payload+i])}}_free(value);return str},toWireType(destructors,value){if(value instanceof ArrayBuffer){value=new Uint8Array(value)}var length;var valueIsOfTypeString=typeof value==\"string\";if(!(valueIsOfTypeString||ArrayBuffer.isView(value)&&value.BYTES_PER_ELEMENT==1)){throwBindingError(\"Cannot pass non-string to std::string\")}if(stdStringIsUTF8&&valueIsOfTypeString){length=lengthBytesUTF8(value)}else{length=value.length}var base=_malloc(4+length+1);var ptr=base+4;(growMemViews(),HEAPU32)[base>>2]=length;if(valueIsOfTypeString){if(stdStringIsUTF8){stringToUTF8(value,ptr,length+1)}else{for(var i=0;i<length;++i){var charCode=value.charCodeAt(i);if(charCode>255){_free(base);throwBindingError(\"String has UTF-16 code units that do not fit in 8 bits\")}(growMemViews(),HEAPU8)[ptr+i]=charCode}}}else{(growMemViews(),HEAPU8).set(value,ptr)}if(destructors!==null){destructors.push(_free,base)}return base},readValueFromPointer:readPointer,destructorFunction(ptr){_free(ptr)}})};var UTF16Decoder=globalThis.TextDecoder?new TextDecoder(\"utf-16le\"):undefined;var UTF16ToString=(ptr,maxBytesToRead,ignoreNul)=>{var idx=ptr>>1;var endIdx=findStringEnd((growMemViews(),HEAPU16),idx,maxBytesToRead/2,ignoreNul);if(endIdx-idx>16&&UTF16Decoder)return UTF16Decoder.decode((growMemViews(),HEAPU16).slice(idx,endIdx));var str=\"\";for(var i=idx;i<endIdx;++i){var codeUnit=(growMemViews(),HEAPU16)[i];str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite<str.length*2?maxBytesToWrite/2:str.length;for(var i=0;i<numCharsToWrite;++i){var codeUnit=str.charCodeAt(i);(growMemViews(),HEAP16)[outPtr>>1]=codeUnit;outPtr+=2}(growMemViews(),HEAP16)[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead,ignoreNul)=>{var str=\"\";var startIdx=ptr>>2;for(var i=0;!(i>=maxBytesToRead/4);i++){var utf32=(growMemViews(),HEAPU32)[startIdx+i];if(!utf32&&!ignoreNul)break;str+=String.fromCodePoint(utf32)}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i<str.length;++i){var codePoint=str.codePointAt(i);if(codePoint>65535){i++}(growMemViews(),HEAP32)[outPtr>>2]=codePoint;outPtr+=4;if(outPtr+4>endPtr)break}(growMemViews(),HEAP32)[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i<str.length;++i){var codePoint=str.codePointAt(i);if(codePoint>65535){i++}len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=AsciiToString(name);var decodeString,encodeString,lengthBytesUTF;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16}else{decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32}registerType(rawType,{name,fromWireType:value=>{var length=(growMemViews(),HEAPU32)[value>>2];var str=decodeString(value+4,length*charSize,true);_free(value);return str},toWireType:(destructors,value)=>{if(!(typeof value==\"string\")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);(growMemViews(),HEAPU32)[ptr>>2]=length/charSize;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},readValueFromPointer:readPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=AsciiToString(name);registerType(rawType,{isVoid:true,name,fromWireType:()=>undefined,toWireType:(destructors,o)=>undefined})};var _emscripten_get_now;if(globalThis.performance&&performance.now){_emscripten_get_now=()=>performance.now()}else{_emscripten_get_now=Date.now}var nowIsMonotonic=!!globalThis.performance?.now;var INT53_MAX=9007199254740992;var INT53_MIN=-9007199254740992;var bigintToI53Checked=num=>num<INT53_MIN||num>INT53_MAX?NaN:Number(num);var readEmAsmArgsArray=[];var readEmAsmArgs=(sigPtr,buf)=>{readEmAsmArgsArray.length=0;var ch;while(ch=(growMemViews(),HEAPU8)[sigPtr++]){var wide=ch!=105;wide&=ch!=112;buf+=wide&&buf%8?4:0;readEmAsmArgsArray.push(ch==112?(growMemViews(),HEAPU32)[buf>>2]:ch==106?(growMemViews(),HEAP64)[buf>>3]:ch==105?(growMemViews(),HEAP32)[buf>>2]:(growMemViews(),HEAPF64)[buf>>3]);buf+=wide?8:4}return readEmAsmArgsArray};var runEmAsmFunction=(code,sigPtr,argbuf)=>{var args=readEmAsmArgs(sigPtr,argbuf);return ASM_CONSTS[code](...args)};var _emscripten_asm_const_double=(code,sigPtr,argbuf)=>runEmAsmFunction(code,sigPtr,argbuf);var _emscripten_asm_const_int=(code,sigPtr,argbuf)=>runEmAsmFunction(code,sigPtr,argbuf);var _emscripten_set_main_loop_timing=(mode,value)=>{MainLoop.timingMode=mode;MainLoop.timingValue=value;if(!MainLoop.func){return 1}if(!MainLoop.running){MainLoop.running=true}if(mode==0){MainLoop.scheduler=function MainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,MainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(MainLoop.runner,timeUntilNextTick)};MainLoop.method=\"timeout\"}else if(mode==1){MainLoop.scheduler=function MainLoop_scheduler_rAF(){MainLoop.requestAnimationFrame(MainLoop.runner)};MainLoop.method=\"rAF\"}else if(mode==2){if(!MainLoop.setImmediate){if(globalThis.setImmediate){MainLoop.setImmediate=setImmediate}else{var setImmediates=[];var emscriptenMainLoopMessageId=\"setimmediate\";var MainLoop_setImmediate_messageHandler=event=>{if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener(\"message\",MainLoop_setImmediate_messageHandler,true);MainLoop.setImmediate=func=>{setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){Module[\"setImmediates\"]??=[];Module[\"setImmediates\"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,\"*\")}}}MainLoop.scheduler=function MainLoop_scheduler_setImmediate(){MainLoop.setImmediate(MainLoop.runner)};MainLoop.method=\"immediate\"}return 0};var setMainLoop=(iterFunc,fps,simulateInfiniteLoop,arg,noSetTiming)=>{MainLoop.func=iterFunc;MainLoop.arg=arg;var thisMainLoopId=MainLoop.currentlyRunningMainloop;function checkIsRunning(){if(thisMainLoopId<MainLoop.currentlyRunningMainloop){maybeExit();return false}return true}MainLoop.running=false;MainLoop.runner=function MainLoop_runner(){if(ABORT)return;if(MainLoop.queue.length>0){var start=Date.now();var blocker=MainLoop.queue.shift();blocker.func(blocker.arg);if(MainLoop.remainingBlockers){var remaining=MainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){MainLoop.remainingBlockers=next}else{next=next+.5;MainLoop.remainingBlockers=(8*remaining+next)/9}}MainLoop.updateStatus();if(!checkIsRunning())return;setTimeout(MainLoop.runner,0);return}if(!checkIsRunning())return;MainLoop.currentFrameNumber=MainLoop.currentFrameNumber+1|0;if(MainLoop.timingMode==1&&MainLoop.timingValue>1&&MainLoop.currentFrameNumber%MainLoop.timingValue!=0){MainLoop.scheduler();return}else if(MainLoop.timingMode==0){MainLoop.tickStartTime=_emscripten_get_now()}MainLoop.runIter(iterFunc);if(!checkIsRunning())return;MainLoop.scheduler()};if(!noSetTiming){if(fps>0){_emscripten_set_main_loop_timing(0,1e3/fps)}else{_emscripten_set_main_loop_timing(1,1)}MainLoop.scheduler()}if(simulateInfiniteLoop){throw\"unwind\"}};var MainLoop={running:false,scheduler:null,method:\"\",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],preMainLoop:[],postMainLoop:[],pause(){MainLoop.scheduler=null;MainLoop.currentlyRunningMainloop++},resume(){MainLoop.currentlyRunningMainloop++;var timingMode=MainLoop.timingMode;var timingValue=MainLoop.timingValue;var func=MainLoop.func;MainLoop.func=null;setMainLoop(func,0,false,MainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);MainLoop.scheduler()},updateStatus(){if(Module[\"setStatus\"]){var message=Module[\"statusMessage\"]||\"Please wait...\";var remaining=MainLoop.remainingBlockers??0;var expected=MainLoop.expectedBlockers??0;if(remaining){if(remaining<expected){Module[\"setStatus\"](`{message} ({expected - remaining}/{expected})`)}else{Module[\"setStatus\"](message)}}else{Module[\"setStatus\"](\"\")}}},init(){Module[\"preMainLoop\"]&&MainLoop.preMainLoop.push(Module[\"preMainLoop\"]);Module[\"postMainLoop\"]&&MainLoop.postMainLoop.push(Module[\"postMainLoop\"])},runIter(func){if(ABORT)return;for(var pre of MainLoop.preMainLoop){if(pre()===false){return}}callUserCallback(func);for(var post of MainLoop.postMainLoop){post()}},nextRAF:0,fakeRequestAnimationFrame(func){var now=Date.now();if(MainLoop.nextRAF===0){MainLoop.nextRAF=now+1e3/60}else{while(now+2>=MainLoop.nextRAF){MainLoop.nextRAF+=1e3/60}}var delay=Math.max(MainLoop.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame(func){if(globalThis.requestAnimationFrame){requestAnimationFrame(func)}else{MainLoop.fakeRequestAnimationFrame(func)}}};var _emscripten_cancel_main_loop=()=>{MainLoop.pause();MainLoop.func=null};var emAudio={};var emAudioCounter=0;var emscriptenRegisterAudioObject=object=>{emAudio[++emAudioCounter]=object;return emAudioCounter};var emscriptenGetAudioObject=objectHandle=>emAudio[objectHandle];var _emscripten_create_audio_context=options=>{var ctx=window.AudioContext||window.webkitAudioContext;function readRenderSizeHint(val){return val<0?\"hardware\":val||\"default\"}var opts=options?{latencyHint:UTF8ToString((growMemViews(),HEAPU32)[options>>2])||undefined,sampleRate:(growMemViews(),HEAPU32)[options+4>>2]||undefined,renderSizeHint:readRenderSizeHint((growMemViews(),HEAP32)[options+8>>2])}:undefined;return ctx&&emscriptenRegisterAudioObject(new ctx(opts))};var emscriptenGetContextQuantumSize=contextHandle=>emAudio[contextHandle][\"renderQuantumSize\"]||128;var _emscripten_create_wasm_audio_worklet_node=(contextHandle,name,options,callback,userData)=>{function readChannelCountArray(heapIndex,numOutputs){if(!heapIndex)return undefined;heapIndex=heapIndex>>2;var channelCounts=[];while(numOutputs--)channelCounts.push((growMemViews(),HEAPU32)[heapIndex++]);return channelCounts}var optionsOutputs=options?(growMemViews(),HEAP32)[options+4>>2]:0;var opts=options?{numberOfInputs:(growMemViews(),HEAP32)[options>>2],numberOfOutputs:optionsOutputs,outputChannelCount:readChannelCountArray((growMemViews(),HEAPU32)[options+8>>2],optionsOutputs),channelCount:(growMemViews(),HEAPU32)[options+12>>2]||undefined,channelCountMode:[,\"clamped-max\",\"explicit\"][(growMemViews(),HEAP32)[options+16>>2]],channelInterpretation:[,\"discrete\"][(growMemViews(),HEAP32)[options+20>>2]],processorOptions:{callback,userData,samplesPerChannel:emscriptenGetContextQuantumSize(contextHandle)}}:undefined;return emscriptenRegisterAudioObject(new AudioWorkletNode(emAudio[contextHandle],UTF8ToString(name),opts))};var _emscripten_create_wasm_audio_worklet_processor_async=(contextHandle,options,callback,userData)=>{var processorName=UTF8ToString((growMemViews(),HEAPU32)[options>>2]);var numAudioParams=(growMemViews(),HEAP32)[options+4>>2];var audioParamDescriptors=(growMemViews(),HEAPU32)[options+8>>2];var audioParams=[];var paramIndex=0;while(numAudioParams--){audioParams.push({name:paramIndex++,defaultValue:(growMemViews(),HEAPF32)[audioParamDescriptors>>2],minValue:(growMemViews(),HEAPF32)[audioParamDescriptors+4>>2],maxValue:(growMemViews(),HEAPF32)[audioParamDescriptors+8>>2],automationRate:((growMemViews(),HEAP32)[audioParamDescriptors+12>>2]?\"k\":\"a\")+\"-rate\"});audioParamDescriptors+=16}emAudio[contextHandle].audioWorklet[\"port\"].postMessage({_wpn:processorName,audioParams,contextHandle,callback,userData})};var _emscripten_destroy_audio_context=contextHandle=>{emAudio[contextHandle].suspend();delete emAudio[contextHandle]};var _emscripten_destroy_web_audio_node=objectHandle=>{emAudio[objectHandle].disconnect();delete emAudio[objectHandle]};var getHeapMax=()=>2147483648;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var oldHeapSize=wasmMemory.buffer.byteLength;var pages=(size-oldHeapSize+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=(growMemViews(),HEAPU8).length;requestedSize>>>=0;if(requestedSize<=oldSize){return false}var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var _emscripten_set_main_loop=(func,fps,simulateInfiniteLoop)=>{var iterFunc=()=>dynCall_v(func);setMainLoop(iterFunc,fps,simulateInfiniteLoop)};var safeSetTimeout=(func,timeout)=>setTimeout(()=>{callUserCallback(func)},timeout);var _emscripten_sleep=ms=>Asyncify.handleSleep(wakeUp=>safeSetTimeout(wakeUp,ms));_emscripten_sleep.isAsync=true;var _wasmWorkersID=1;var _emAudioDispatchProcessorCallback=e=>{var data=e.data;var wasmCall=data[\"_wsc\"];wasmCall&&getWasmTableEntry(wasmCall)(...data.args)};var stackAlloc=sz=>__emscripten_stack_alloc(sz);var _emscripten_start_wasm_audio_worklet_thread_async=(contextHandle,stackLowestAddress,stackSize,callback,userData)=>{var audioContext=emAudio[contextHandle];var audioWorklet=audioContext.audioWorklet;var audioWorkletCreationFailed=()=>{((a1,a2,a3)=>dynCall_viii(callback,a1,a2,a3))(contextHandle,0,userData)};if(!audioWorklet){return audioWorkletCreationFailed()}audioWorklet.addModule(locateFile(\"amy.js\")).then(()=>{if(!audioWorklet[\"port\"]){audioWorklet[\"port\"]={postMessage:msg=>{if(msg[\"_boot\"]){audioWorklet.bootstrapMessage=new AudioWorkletNode(audioContext,\"em-bootstrap\",{processorOptions:msg});audioWorklet.bootstrapMessage[\"port\"].onmessage=msg=>{audioWorklet[\"port\"].onmessage(msg)}}else{audioWorklet.bootstrapMessage[\"port\"].postMessage(msg)}}}}audioWorklet[\"port\"].postMessage({_boot:1,wwID:_wasmWorkersID++,wasm:wasmModule,wasmMemory,stackLowestAddress,stackSize});audioWorklet[\"port\"].onmessage=_emAudioDispatchProcessorCallback;((a1,a2,a3)=>dynCall_viii(callback,a1,a2,a3))(contextHandle,1,userData)}).catch(audioWorkletCreationFailed)};var _fd_close=fd=>52;function _fd_seek(fd,offset,whence,newOffset){offset=bigintToI53Checked(offset);return 70}var printCharBuffers=[null,[],[]];var printChar=(stream,curr)=>{var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer));buffer.length=0}else{buffer.push(curr)}};var _fd_write=(fd,iov,iovcnt,pnum)=>{var num=0;for(var i=0;i<iovcnt;i++){var ptr=(growMemViews(),HEAPU32)[iov>>2];var len=(growMemViews(),HEAPU32)[iov+4>>2];iov+=8;for(var j=0;j<len;j++){printChar(fd,(growMemViews(),HEAPU8)[ptr+j])}num+=len}(growMemViews(),HEAPU32)[pnum>>2]=num;return 0};var runAndAbortIfError=func=>{try{return func()}catch(e){abort(e)}};var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};var runtimeKeepalivePop=()=>{runtimeKeepaliveCounter-=1};var Asyncify={instrumentWasmImports(imports){var importPattern=/^(invoke_.*|__asyncjs__.*)$/;for(let[x,original]of Object.entries(imports)){if(typeof original==\"function\"){let isAsyncifyImport=original.isAsync||importPattern.test(x)}}},instrumentFunction(original){var wrapper=(...args)=>{Asyncify.exportCallStack.push(original);try{return original(...args)}finally{if(!ABORT){var top=Asyncify.exportCallStack.pop();Asyncify.maybeStopUnwind()}}};Asyncify.funcWrappers.set(original,wrapper);return wrapper},instrumentWasmExports(exports){var ret={};for(let[x,original]of Object.entries(exports)){if(typeof original==\"function\"){var wrapper=Asyncify.instrumentFunction(original);ret[x]=wrapper}else{ret[x]=original}}return ret},State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:128e3,currData:null,handleSleepReturnValue:0,exportCallStack:[],callstackFuncToId:new Map,callStackIdToFunc:new Map,funcWrappers:new Map,callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId(func){if(!Asyncify.callstackFuncToId.has(func)){var id=Asyncify.callStackId++;Asyncify.callstackFuncToId.set(func,id);Asyncify.callStackIdToFunc.set(id,func)}return Asyncify.callstackFuncToId.get(func)},maybeStopUnwind(){if(Asyncify.currData&&Asyncify.state===Asyncify.State.Unwinding&&Asyncify.exportCallStack.length===0){Asyncify.state=Asyncify.State.Normal;runAndAbortIfError(_asyncify_stop_unwind);if(typeof Fibers!=\"undefined\"){Fibers.trampoline()}}},whenDone(){return new Promise((resolve,reject)=>{Asyncify.asyncPromiseHandlers={resolve,reject}})},allocateData(){var ptr=_malloc(12+Asyncify.StackSize);Asyncify.setDataHeader(ptr,ptr+12,Asyncify.StackSize);Asyncify.setDataRewindFunc(ptr);return ptr},setDataHeader(ptr,stack,stackSize){(growMemViews(),HEAPU32)[ptr>>2]=stack;(growMemViews(),HEAPU32)[ptr+4>>2]=stack+stackSize},setDataRewindFunc(ptr){var bottomOfCallStack=Asyncify.exportCallStack[0];var rewindId=Asyncify.getCallStackId(bottomOfCallStack);(growMemViews(),HEAP32)[ptr+8>>2]=rewindId},getDataRewindFunc(ptr){var id=(growMemViews(),HEAP32)[ptr+8>>2];var func=Asyncify.callStackIdToFunc.get(id);return func},doRewind(ptr){var original=Asyncify.getDataRewindFunc(ptr);var func=Asyncify.funcWrappers.get(original);return func()},handleSleep(startAsync){if(ABORT)return;if(Asyncify.state===Asyncify.State.Normal){var reachedCallback=false;var reachedAfterCallback=false;startAsync((handleSleepReturnValue=0)=>{if(ABORT)return;Asyncify.handleSleepReturnValue=handleSleepReturnValue;reachedCallback=true;if(!reachedAfterCallback){return}Asyncify.state=Asyncify.State.Rewinding;runAndAbortIfError(()=>_asyncify_start_rewind(Asyncify.currData));if(typeof MainLoop!=\"undefined\"&&MainLoop.func){MainLoop.resume()}var asyncWasmReturnValue,isError=false;try{asyncWasmReturnValue=Asyncify.doRewind(Asyncify.currData)}catch(err){asyncWasmReturnValue=err;isError=true}var handled=false;if(!Asyncify.currData){var asyncPromiseHandlers=Asyncify.asyncPromiseHandlers;if(asyncPromiseHandlers){Asyncify.asyncPromiseHandlers=null;(isError?asyncPromiseHandlers.reject:asyncPromiseHandlers.resolve)(asyncWasmReturnValue);handled=true}}if(isError&&!handled){throw asyncWasmReturnValue}});reachedAfterCallback=true;if(!reachedCallback){Asyncify.state=Asyncify.State.Unwinding;Asyncify.currData=Asyncify.allocateData();if(typeof MainLoop!=\"undefined\"&&MainLoop.func){MainLoop.pause()}runAndAbortIfError(()=>_asyncify_start_unwind(Asyncify.currData))}}else if(Asyncify.state===Asyncify.State.Rewinding){Asyncify.state=Asyncify.State.Normal;runAndAbortIfError(_asyncify_stop_rewind);_free(Asyncify.currData);Asyncify.currData=null;Asyncify.sleepCallbacks.forEach(callUserCallback)}else{abort(`invalid state: ${Asyncify.state}`)}return Asyncify.handleSleepReturnValue},handleAsync:startAsync=>Asyncify.handleSleep(wakeUp=>{startAsync().then(wakeUp)})};var getCFunc=ident=>{var func=Module[\"_\"+ident];return func};var writeArrayToMemory=(array,buffer)=>{(growMemViews(),HEAP8).set(array,buffer)};var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var ccall=(ident,returnType,argTypes,args,opts)=>{var toC={string:str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=stringToUTF8OnStack(str)}return ret},array:arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType===\"string\"){return UTF8ToString(ret)}if(returnType===\"boolean\")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var previousAsync=Asyncify.currData;var ret=func(...cArgs);function onDone(ret){runtimeKeepalivePop();if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}var asyncMode=opts?.async;runtimeKeepalivePush();if(Asyncify.currData!=previousAsync){return Asyncify.whenDone().then(onDone)}ret=onDone(ret);if(asyncMode)return Promise.resolve(ret);return ret};var cwrap=(ident,returnType,argTypes,opts)=>{var numericArgs=!argTypes||argTypes.every(type=>type===\"number\"||type===\"boolean\");var numericRet=returnType!==\"string\";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return(...args)=>ccall(ident,returnType,argTypes,args,opts)};Module[\"requestAnimationFrame\"]=MainLoop.requestAnimationFrame;Module[\"pauseMainLoop\"]=MainLoop.pause;Module[\"resumeMainLoop\"]=MainLoop.resume;MainLoop.init();{initMemory();if(Module[\"noExitRuntime\"])noExitRuntime=Module[\"noExitRuntime\"];if(Module[\"print\"])out=Module[\"print\"];if(Module[\"printErr\"])err=Module[\"printErr\"];if(Module[\"wasmBinary\"])wasmBinary=Module[\"wasmBinary\"];if(Module[\"arguments\"])arguments_=Module[\"arguments\"];if(Module[\"thisProgram\"])thisProgram=Module[\"thisProgram\"];if(Module[\"preInit\"]){if(typeof Module[\"preInit\"]==\"function\")Module[\"preInit\"]=[Module[\"preInit\"]];while(Module[\"preInit\"].length>0){Module[\"preInit\"].shift()()}}}Module[\"ccall\"]=ccall;Module[\"cwrap\"]=cwrap;var ASM_CONSTS={480908:$0=>{if(typeof amy_shared_open===\"function\"){return amy_shared_open(UTF8ToString($0))}return 0},481011:$0=>{if(typeof amy_shared_close===\"function\"){amy_shared_close($0)}},481085:($0,$1,$2,$3)=>{if(typeof amy_shared_read===\"function\"){return amy_shared_read($0,$1,$2,$3)}return 0},481186:$0=>{if(typeof amy_shared_close===\"function\"){amy_shared_close($0)}},481260:$0=>{if(typeof amy_sequencer_js_hook===\"function\"){amy_sequencer_js_hook($0)}},481343:()=>{if(typeof cv_1_voltage!=\"undefined\"){return cv_1_voltage}else{return 0}},481430:()=>{if(typeof cv_2_voltage!=\"undefined\"){return cv_2_voltage}else{return 0}},481517:($0,$1,$2,$3,$4)=>{if(typeof window===\"undefined\"||(window.AudioContext||window.webkitAudioContext)===undefined){return 0}if(typeof window.miniaudio===\"undefined\"){window.miniaudio={referenceCount:0};window.miniaudio.device_type={};window.miniaudio.device_type.playback=$0;window.miniaudio.device_type.capture=$1;window.miniaudio.device_type.duplex=$2;window.miniaudio.device_state={};window.miniaudio.device_state.stopped=$3;window.miniaudio.device_state.started=$4;miniaudio.devices=[];miniaudio.track_device=function(device){for(var iDevice=0;iDevice<miniaudio.devices.length;++iDevice){if(miniaudio.devices[iDevice]==null){miniaudio.devices[iDevice]=device;return iDevice}}miniaudio.devices.push(device);return miniaudio.devices.length-1};miniaudio.untrack_device_by_index=function(deviceIndex){miniaudio.devices[deviceIndex]=null;while(miniaudio.devices.length>0){if(miniaudio.devices[miniaudio.devices.length-1]==null){miniaudio.devices.pop()}else{break}}};miniaudio.untrack_device=function(device){for(var iDevice=0;iDevice<miniaudio.devices.length;++iDevice){if(miniaudio.devices[iDevice]==device){return miniaudio.untrack_device_by_index(iDevice)}}};miniaudio.get_device_by_index=function(deviceIndex){return miniaudio.devices[deviceIndex]};miniaudio.unlock_event_types=function(){return[\"touchend\",\"click\"]}();miniaudio.unlock=function(){for(var i=0;i<miniaudio.devices.length;++i){var device=miniaudio.devices[i];if(device!=null&&device.webaudio!=null&&device.state===window.miniaudio.device_state.started){device.webaudio.resume().then(()=>{Module._ma_device__on_notification_unlocked(device.pDevice)},error=>{console.error(\"Failed to resume audiocontext\",error)})}}miniaudio.unlock_event_types.map(function(event_type){document.removeEventListener(event_type,miniaudio.unlock,true)})};miniaudio.unlock_event_types.map(function(event_type){document.addEventListener(event_type,miniaudio.unlock,true)})}window.miniaudio.referenceCount+=1;return 1},483675:()=>{if(typeof window.miniaudio!==\"undefined\"){window.miniaudio.referenceCount-=1;if(window.miniaudio.referenceCount===0){delete window.miniaudio}}},483839:()=>navigator.mediaDevices!==undefined&&navigator.mediaDevices.getUserMedia!==undefined,483943:()=>{try{var temp=new(window.AudioContext||window.webkitAudioContext);var sampleRate=temp.sampleRate;temp.close();return sampleRate}catch(e){return 0}},484114:$0=>miniaudio.track_device({webaudio:emscriptenGetAudioObject($0),state:1}),484203:($0,$1)=>{var getUserMediaResult=0;var audioWorklet=emscriptenGetAudioObject($0);var audioContext=emscriptenGetAudioObject($1);navigator.mediaDevices.getUserMedia({audio:true,video:false}).then(function(stream){audioContext.streamNode=audioContext.createMediaStreamSource(stream);audioContext.streamNode.connect(audioWorklet);audioWorklet.connect(audioContext.destination);getUserMediaResult=0}).catch(function(error){console.log(\"navigator.mediaDevices.getUserMedia Failed: \"+error);getUserMediaResult=-1});return getUserMediaResult},484765:($0,$1)=>{var audioWorklet=emscriptenGetAudioObject($0);var audioContext=emscriptenGetAudioObject($1);audioWorklet.connect(audioContext.destination);return 0},484925:$0=>emscriptenGetAudioObject($0).sampleRate,484977:$0=>{var device=miniaudio.get_device_by_index($0);if(device.streamNode!==undefined){device.streamNode.disconnect();device.streamNode=undefined}},485133:$0=>{miniaudio.untrack_device_by_index($0)},485176:$0=>{var device=miniaudio.get_device_by_index($0);device.webaudio.resume();device.state=miniaudio.device_state.started},485301:$0=>{var device=miniaudio.get_device_by_index($0);device.webaudio.suspend();device.state=miniaudio.device_state.stopped},485427:($0,$1,$2)=>{if(typeof amy_external_midi_input_js_hook===\"function\"){amy_external_midi_input_js_hook((growMemViews(),HEAPU8).subarray($0,$0+$1),$1,$2)}},485558:($0,$1)=>{if(midiOutputDevice!=null){midiOutputDevice.send((growMemViews(),HEAPU8).subarray($0,$0+$1))}}};var _free,_malloc,_amy_sysclock,_amy_reset_sysclock,_amy_add_event,_yield_patch_events,_yield_synth_commands,_size_of_amy_event,_sequencer_ticks,_ma_device__on_notification_unlocked,_ma_malloc_emscripten,_ma_free_emscripten,_ma_device_process_pcm_frames_capture__webaudio,_ma_device_process_pcm_frames_playback__webaudio,_amy_live_start_web_audioin,_amy_live_start_web,_amy_live_stop,_amy_add_message,_amy_process_single_midi_byte,_amy_get_input_buffer,_amy_set_external_input_buffer,_amy_start_web,_amy_bleep,_amy_start_web_no_synths,__embind_initialize_bindings,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current,__emscripten_wasm_worker_initialize,dynCall_iiii,dynCall_iii,dynCall_vi,dynCall_vii,dynCall_ii,dynCall_iiiii,dynCall_viii,dynCall_viiii,dynCall_v,dynCall_iiiiiiii,dynCall_iiiji,dynCall_iiiiiii,dynCall_jii,dynCall_jiji,dynCall_iidiiii,dynCall_viiiiii,dynCall_viiiii,_asyncify_start_unwind,_asyncify_stop_unwind,_asyncify_start_rewind,_asyncify_stop_rewind,__indirect_function_table,wasmTable;function assignWasmExports(wasmExports){_free=Module[\"_free\"]=wasmExports[\"E\"];_malloc=Module[\"_malloc\"]=wasmExports[\"F\"];_amy_sysclock=Module[\"_amy_sysclock\"]=wasmExports[\"H\"];_amy_reset_sysclock=Module[\"_amy_reset_sysclock\"]=wasmExports[\"I\"];_amy_add_event=Module[\"_amy_add_event\"]=wasmExports[\"J\"];_yield_patch_events=Module[\"_yield_patch_events\"]=wasmExports[\"K\"];_yield_synth_commands=Module[\"_yield_synth_commands\"]=wasmExports[\"L\"];_size_of_amy_event=Module[\"_size_of_amy_event\"]=wasmExports[\"M\"];_sequencer_ticks=Module[\"_sequencer_ticks\"]=wasmExports[\"N\"];_ma_device__on_notification_unlocked=Module[\"_ma_device__on_notification_unlocked\"]=wasmExports[\"O\"];_ma_malloc_emscripten=Module[\"_ma_malloc_emscripten\"]=wasmExports[\"P\"];_ma_free_emscripten=Module[\"_ma_free_emscripten\"]=wasmExports[\"Q\"];_ma_device_process_pcm_frames_capture__webaudio=Module[\"_ma_device_process_pcm_frames_capture__webaudio\"]=wasmExports[\"R\"];_ma_device_process_pcm_frames_playback__webaudio=Module[\"_ma_device_process_pcm_frames_playback__webaudio\"]=wasmExports[\"S\"];_amy_live_start_web_audioin=Module[\"_amy_live_start_web_audioin\"]=wasmExports[\"T\"];_amy_live_start_web=Module[\"_amy_live_start_web\"]=wasmExports[\"U\"];_amy_live_stop=Module[\"_amy_live_stop\"]=wasmExports[\"V\"];_amy_add_message=Module[\"_amy_add_message\"]=wasmExports[\"W\"];_amy_process_single_midi_byte=Module[\"_amy_process_single_midi_byte\"]=wasmExports[\"X\"];_amy_get_input_buffer=Module[\"_amy_get_input_buffer\"]=wasmExports[\"Y\"];_amy_set_external_input_buffer=Module[\"_amy_set_external_input_buffer\"]=wasmExports[\"Z\"];_amy_start_web=Module[\"_amy_start_web\"]=wasmExports[\"_\"];_amy_bleep=Module[\"_amy_bleep\"]=wasmExports[\"$\"];_amy_start_web_no_synths=Module[\"_amy_start_web_no_synths\"]=wasmExports[\"aa\"];__embind_initialize_bindings=wasmExports[\"ba\"];__emscripten_stack_restore=wasmExports[\"ca\"];__emscripten_stack_alloc=wasmExports[\"da\"];_emscripten_stack_get_current=wasmExports[\"ea\"];__emscripten_wasm_worker_initialize=wasmExports[\"fa\"];dynCall_iiii=dynCalls[\"iiii\"]=wasmExports[\"ga\"];dynCall_iii=dynCalls[\"iii\"]=wasmExports[\"ha\"];dynCall_vi=dynCalls[\"vi\"]=wasmExports[\"ia\"];dynCall_vii=dynCalls[\"vii\"]=wasmExports[\"ja\"];dynCall_ii=dynCalls[\"ii\"]=wasmExports[\"ka\"];dynCall_iiiii=dynCalls[\"iiiii\"]=wasmExports[\"la\"];dynCall_viii=dynCalls[\"viii\"]=wasmExports[\"ma\"];dynCall_viiii=dynCalls[\"viiii\"]=wasmExports[\"na\"];dynCall_v=dynCalls[\"v\"]=wasmExports[\"oa\"];dynCall_iiiiiiii=dynCalls[\"iiiiiiii\"]=wasmExports[\"pa\"];dynCall_iiiji=dynCalls[\"iiiji\"]=wasmExports[\"qa\"];dynCall_iiiiiii=dynCalls[\"iiiiiii\"]=wasmExports[\"ra\"];dynCall_jii=dynCalls[\"jii\"]=wasmExports[\"sa\"];dynCall_jiji=dynCalls[\"jiji\"]=wasmExports[\"ta\"];dynCall_iidiiii=dynCalls[\"iidiiii\"]=wasmExports[\"ua\"];dynCall_viiiiii=dynCalls[\"viiiiii\"]=wasmExports[\"va\"];dynCall_viiiii=dynCalls[\"viiiii\"]=wasmExports[\"wa\"];_asyncify_start_unwind=wasmExports[\"xa\"];_asyncify_stop_unwind=wasmExports[\"ya\"];_asyncify_start_rewind=wasmExports[\"za\"];_asyncify_stop_rewind=wasmExports[\"Aa\"];__indirect_function_table=wasmTable=wasmExports[\"G\"]}var wasmImports;function assignWasmImports(){wasmImports={b:___assert_fail,A:__abort_js,l:__embind_register_bigint,v:__embind_register_bool,t:__embind_register_emval,k:__embind_register_float,f:__embind_register_integer,d:__embind_register_memory_view,u:__embind_register_std_string,i:__embind_register_std_wstring,w:__embind_register_void,m:_emscripten_asm_const_double,c:_emscripten_asm_const_int,h:_emscripten_cancel_main_loop,r:_emscripten_create_audio_context,B:_emscripten_create_wasm_audio_worklet_node,C:_emscripten_create_wasm_audio_worklet_processor_async,g:_emscripten_destroy_audio_context,o:_emscripten_destroy_web_audio_node,e:_emscripten_get_now,x:_emscripten_resize_heap,j:_emscripten_set_main_loop,p:_emscripten_sleep,q:_emscripten_start_wasm_audio_worklet_thread_async,s:_exit,z:_fd_close,y:_fd_seek,n:_fd_write,a:wasmMemory}}function run(){if(ENVIRONMENT_IS_WASM_WORKER){readyPromiseResolve?.(Module);initRuntime();return}preRun();function doRun(){Module[\"calledRun\"]=true;if(ABORT)return;initRuntime();readyPromiseResolve?.(Module);Module[\"onRuntimeInitialized\"]?.();postRun()}if(Module[\"setStatus\"]){Module[\"setStatus\"](\"Running...\");setTimeout(()=>{setTimeout(()=>Module[\"setStatus\"](\"\"),1);doRun()},1)}else{doRun()}}var wasmExports;if(!ENVIRONMENT_IS_WASM_WORKER){wasmExports=await (createWasm());run()}if(runtimeInitialized){moduleRtn=Module}else{moduleRtn=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject})}\n;return moduleRtn}})();if(typeof exports===\"object\"&&typeof module===\"object\"){module.exports=amyModule;module.exports.default=amyModule}else if(typeof define===\"function\"&&define[\"amd\"])define([],()=>amyModule);var isWW=globalThis.self?.name==\"em-ww\";var isNode=globalThis.process?.versions?.node&&globalThis.process?.type!=\"renderer\";if(isNode)isWW=require(\"worker_threads\").workerData===\"em-ww\";isWW||=!!globalThis.AudioWorkletGlobalScope;isWW&&amyModule();\n// amy_connector.js\n// helpers for JS to communicate with AMY, including webMIDI\n\nvar amy_add_message = null;\nvar amy_reset_sysclock = null\nvar amy_module = null;\nvar amy_started = false;\nvar amy_live_start_web = null;\nvar audio_started = false;\nvar amy_sysclock = null;\nvar amy_module = null;\nvar midiOutputDevice = null;\nvar midiInputDevice = null;\nvar amy_audioin_toggle = false;\n\n\n\n\n// Once AMY module is loaded, register its functions and start AMY (not yet audio, you need to click for that)\namyModule().then(async function(am) {\n  amy_live_start_web = am.cwrap(\n    'amy_live_start_web', null, null, {async: true}    \n  );\n  amy_live_start_web_audioin = am.cwrap(\n    'amy_live_start_web_audioin', null, null, {async: true}    \n  );\n  amy_live_stop = am.cwrap(\n    'amy_live_stop', null,  null, {async: true}    \n  );\n  amy_start_web = am.cwrap(\n    'amy_start_web', null, null\n  );\n  amy_start_web_no_synths = am.cwrap(\n    'amy_start_web_no_synths', null, null\n  );\n  amy_add_message = am.cwrap(\n    'amy_add_message', null, ['string']\n  );\n  amy_reset_sysclock = am.cwrap(\n    'amy_reset_sysclock', null, null\n  );\n  amy_ticks = am.cwrap(\n    'sequencer_ticks', 'number', [null]\n  );\n  amy_sysclock = am.cwrap(\n    'amy_sysclock', 'number', [null]\n  );\n  amy_process_single_midi_byte = am.cwrap(\n    'amy_process_single_midi_byte', null, ['number, number']\n  );\n  // If Godot bridge is present, let it control startup with config.\n  // Otherwise start with defaults (standalone REPL mode).\n  if (typeof window !== 'undefined' && window._amy_godot_bridge) {\n    window._amy_godot_start_web = amy_start_web;\n    window._amy_godot_start_web_no_synths = amy_start_web_no_synths;\n  } else {\n    amy_start_web();\n  }\n  amy_module = am;\n});\n\n\nasync function amy_js_start() {\n  // Don't run this twice\n  if(amy_started) return;\n  await start_midi();\t\n  await sleep_ms(200);\n  // Start the audio worklet (miniaudio)\n  if (amy_audioin_toggle) {\n      await amy_live_start_web_audioin();\n  } else {\n      await amy_live_start_web();    \n  }\n  await sleep_ms(200);\n  amy_started = true;\n}\n\n\n\nasync function setup_midi_devices() {\n    var midi_in = document.amyboard_settings.midi_input;\n    var midi_out = document.amyboard_settings.midi_output;\n    if(WebMidi.inputs.length > midi_in.selectedIndex) {\n      if(midiInputDevice != null) midiInputDevice.destroy();\n      midiInputDevice = WebMidi.getInputById(WebMidi.inputs[midi_in.selectedIndex].id);\n      midiInputDevice.addListener(\"midimessage\", e => {\n        for(byte in e.message.data) {\n          amy_process_single_midi_byte(e.message.data[byte], 1);\n        }\n      });\n    }\n    if(WebMidi.outputs.length > midi_out.selectedIndex) {\n      if(midiOutputDevice != null) midiOutputDevice.destroy();\n      midiOutputDevice = WebMidi.getOutputById(WebMidi.outputs[midi_out.selectedIndex].id);\n    }\n}\n\nasync function start_midi() {\n  function onEnabled() {\n    // Populate the dropdowns\n    var midi_in = document.amyboard_settings.midi_input;\n    var midi_out = document.amyboard_settings.midi_output;\n\n    if(WebMidi.inputs.length>0) {\n      midi_in.options.length = 0;\n      WebMidi.inputs.forEach(input => {\n        midi_in.options[midi_in.options.length] = new Option(\"MIDI in: \" + input.name);\n      });\n    }\n\n    if(WebMidi.outputs.length>0) {\n      midi_out.options.length = 0;\n      WebMidi.outputs.forEach(output => {\n        midi_out.options[midi_out.options.length] = new Option(\"MIDI out: \"+ output.name);\n      });\n    }\n    // First run setup \n    setup_midi_devices();\n  }\n  if(typeof WebMidi != 'undefined') {\n    if(WebMidi.supported) {\n      WebMidi\n        .enable({sysex:true})\n        .then(onEnabled)\n        .catch(err => console.log(\"MIDI: \" + err));\n    } else {\n      document.getElementById('midi-input-panel').style.display='none';\n      document.getElementById('midi-output-panel').style.display='none';\n    }\n  }\n}\n\n\nasync function sleep_ms(ms) {\n    await new Promise((r) => setTimeout(r, ms));\n}\n\n\nasync function toggle_audioin() {\n    if(!amy_started) await sleep_ms(1000);\n    await amy_live_stop();\n    if (document.getElementById('amy_audioin').checked) {\n        amy_audioin_toggle = true;\n        await amy_live_start_web_audioin();\n    } else {\n        amy_audioin_toggle = false;\n        await amy_live_start_web();\n    }\n}\n\n\n// AUTO-GENERATED by scripts/gen_amy_js_api.py — do not edit by hand.\n// Source: amy/__init__.py\n(function() {\n\"use strict\";\n\nvar AMY_KW_MAP = {\n  osc: {wire: \"v\", type: \"I\"},\n  wave: {wire: \"w\", type: \"I\"},\n  note: {wire: \"n\", type: \"F\"},\n  vel: {wire: \"l\", type: \"F\"},\n  amp: {wire: \"a\", type: \"C\"},\n  freq: {wire: \"f\", type: \"C\"},\n  duty: {wire: \"d\", type: \"C\"},\n  feedback: {wire: \"b\", type: \"F\"},\n  time: {wire: \"t\", type: \"I\"},\n  reset: {wire: \"S\", type: \"I\"},\n  phase: {wire: \"P\", type: \"F\"},\n  pan: {wire: \"Q\", type: \"C\"},\n  client: {wire: \"g\", type: \"I\"},\n  volume: {wire: \"V\", type: \"F\"},\n  pitch_bend: {wire: \"s\", type: \"F\"},\n  filter_freq: {wire: \"F\", type: \"C\"},\n  resonance: {wire: \"R\", type: \"F\"},\n  bp0: {wire: \"A\", type: \"L\"},\n  bp1: {wire: \"B\", type: \"L\"},\n  eg0_type: {wire: \"T\", type: \"I\"},\n  eg1_type: {wire: \"X\", type: \"I\"},\n  debug: {wire: \"D\", type: \"I\"},\n  chained_osc: {wire: \"c\", type: \"I\"},\n  mod_source: {wire: \"L\", type: \"I\"},\n  eq: {wire: \"x\", type: \"L\"},\n  filter_type: {wire: \"G\", type: \"I\"},\n  ratio: {wire: \"I\", type: \"F\"},\n  latency_ms: {wire: \"N\", type: \"I\"},\n  algo_source: {wire: \"O\", type: \"L\"},\n  load_sample: {wire: \"z\", type: \"L\"},\n  transfer_file: {wire: \"zT\", type: \"L\"},\n  disk_sample: {wire: \"zF\", type: \"L\"},\n  algorithm: {wire: \"o\", type: \"I\"},\n  chorus: {wire: \"k\", type: \"L\"},\n  reverb: {wire: \"h\", type: \"L\"},\n  echo: {wire: \"M\", type: \"L\"},\n  patch: {wire: \"K\", type: \"I\"},\n  voices: {wire: \"r\", type: \"L\"},\n  external_channel: {wire: \"W\", type: \"I\"},\n  portamento: {wire: \"m\", type: \"I\"},\n  sequence: {wire: \"H\", type: \"L\"},\n  tempo: {wire: \"j\", type: \"F\"},\n  synth: {wire: \"i\", type: \"I\"},\n  pedal: {wire: \"ip\", type: \"I\"},\n  synth_flags: {wire: \"if\", type: \"I\"},\n  num_voices: {wire: \"iv\", type: \"I\"},\n  oscs_per_voice: {wire: \"in\", type: \"I\"},\n  to_synth: {wire: \"it\", type: \"I\"},\n  grab_midi_notes: {wire: \"im\", type: \"I\"},\n  synth_delay: {wire: \"id\", type: \"I\"},\n  preset: {wire: \"p\", type: \"I\"},\n  num_partials: {wire: \"p\", type: \"I\"},\n  start_sample: {wire: \"zS\", type: \"L\"},\n  stop_sample: {wire: \"zO\", type: \"I\"},\n  midi_cc: {wire: \"ic\", type: \"L\"},\n  patch_string: {wire: \"u\", type: \"S\"}\n};\n\nvar AMY_KW_PRIORITY = {\n  osc: 0,\n  wave: 1,\n  note: 2,\n  vel: 3,\n  amp: 4,\n  freq: 5,\n  duty: 6,\n  feedback: 7,\n  time: 8,\n  reset: 9,\n  phase: 10,\n  pan: 11,\n  client: 12,\n  volume: 13,\n  pitch_bend: 14,\n  filter_freq: 15,\n  resonance: 16,\n  bp0: 17,\n  bp1: 18,\n  eg0_type: 19,\n  eg1_type: 20,\n  debug: 21,\n  chained_osc: 22,\n  mod_source: 23,\n  eq: 24,\n  filter_type: 25,\n  ratio: 26,\n  latency_ms: 27,\n  algo_source: 28,\n  load_sample: 29,\n  transfer_file: 30,\n  disk_sample: 31,\n  algorithm: 32,\n  chorus: 33,\n  reverb: 34,\n  echo: 35,\n  patch: 36,\n  voices: 37,\n  external_channel: 38,\n  portamento: 39,\n  sequence: 40,\n  tempo: 41,\n  synth: 42,\n  pedal: 43,\n  synth_flags: 44,\n  num_voices: 45,\n  oscs_per_voice: 46,\n  to_synth: 47,\n  grab_midi_notes: 48,\n  synth_delay: 49,\n  preset: 50,\n  num_partials: 51,\n  start_sample: 52,\n  stop_sample: 53,\n  midi_cc: 54,\n  patch_string: 55\n};\n\nvar AMY_COEF_FIELDS = [\"const\", \"note\", \"vel\", \"eg0\", \"eg1\", \"mod\", \"bend\", \"ext0\", \"ext1\"];\n\n// --- type handlers (mirror Python's str_of_int, trunc, parse_list_or_comma_string, parse_ctrl_coefs) ---\n\nfunction _str_of_int(arg) {\n  return String(Math.trunc(Number(arg)));\n}\n\nfunction _trunc(number) {\n  if (typeof number === \"string\") {\n    if (number.trim() === \"\") return \"\";\n    number = parseFloat(number);\n  }\n  if (typeof number === \"number\") {\n    var s = number.toFixed(6);\n    s = s.replace(/0+$/, \"\");\n    s = s.replace(/\\.$/, \"\");\n    return s;\n  }\n  return String(number);\n}\n\nfunction _parse_list(obj) {\n  if (Array.isArray(obj)) {\n    return obj.map(function(v) { return v == null ? \"\" : String(v); }).join(\",\");\n  }\n  return String(obj);\n}\n\nfunction _trim_trailing(arr) {\n  var end = arr.length;\n  while (end > 0 && arr[end - 1] == null) end--;\n  return arr.slice(0, end);\n}\n\nfunction _parse_ctrl_coefs(coefs) {\n  if (typeof coefs === \"string\") {\n    return coefs.split(\",\").map(function(x) { return _trunc(x); }).join(\",\");\n  }\n  if (typeof coefs === \"number\") {\n    return _trunc(coefs);\n  }\n  if (!Array.isArray(coefs) && typeof coefs === \"object\" && coefs !== null) {\n    var list = new Array(AMY_COEF_FIELDS.length).fill(null);\n    for (var key in coefs) {\n      if (!coefs.hasOwnProperty(key)) continue;\n      var idx = AMY_COEF_FIELDS.indexOf(key);\n      if (idx < 0) throw new Error(\"Unknown ctrl_coef field: \" + key + \". Valid: \" + AMY_COEF_FIELDS.join(\", \"));\n      list[idx] = coefs[key];\n    }\n    coefs = list;\n  }\n  if (!Array.isArray(coefs)) {\n    return String(coefs);\n  }\n  coefs = _trim_trailing(coefs);\n  return coefs.map(function(v) { return v == null ? \"\" : _trunc(v); }).join(\",\");\n}\n\nvar _ARG_HANDLERS = {\n  I: _str_of_int,\n  F: _trunc,\n  S: String,\n  L: _parse_list,\n  C: _parse_ctrl_coefs\n};\n\n/**\n * Build an AMY wire code string from named parameters.\n *\n *   amy_message({osc: 0, wave: 1, freq: 440})  =>  \"v0w1f440Z\"\n *   amy_message({synth: 1, patch: 257, num_voices: 6})  =>  \"K257i1iv6Z\"\n *\n * Control coefficient params (amp, freq, duty, pan, filter_freq) accept:\n *   - A number:  freq: 440\n *   - An array:  freq: [440, 1, null, null, null, null, 1]\n *   - An object: freq: {const: 440, bend: 1}\n */\nfunction amy_message(params) {\n  if (!params || typeof params !== \"object\") {\n    throw new Error(\"amy_message requires an object of parameters\");\n  }\n  var keys = [];\n  for (var key in params) {\n    if (!params.hasOwnProperty(key)) continue;\n    if (!(key in AMY_KW_MAP)) {\n      throw new Error(\"Unknown AMY parameter: \" + key);\n    }\n    var arg = params[key];\n    if (arg == null) {\n      if (key !== \"time\" && key !== \"sequence\") {\n        throw new Error(\"Null value for AMY parameter: \" + key);\n      }\n      continue;\n    }\n    keys.push(key);\n  }\n  keys.sort(function(a, b) {\n    return (AMY_KW_PRIORITY[a] || 0) - (AMY_KW_PRIORITY[b] || 0);\n  });\n  var m = \"\";\n  for (var i = 0; i < keys.length; i++) {\n    var k = keys[i];\n    var mapping = AMY_KW_MAP[k];\n    var handler = _ARG_HANDLERS[mapping.type];\n    m += mapping.wire + handler(params[k]);\n  }\n  return m + \"Z\";\n}\n\n/**\n * Build and send an AMY wire code message.\n * Equivalent to Python's amy.send().\n */\nfunction amy_send(params, log) {\n  var msg = amy_message(params);\n  if (log && typeof amy_add_log_message === \"function\") {\n    amy_add_log_message(msg);\n  } else if (typeof amy_add_message === \"function\") {\n    amy_add_message(msg);\n  } else {\n    console.warn(\"amy_send: no AMY message handler found (is amy.js loaded?)\");\n  }\n  return msg;\n}\n\n// Constants from amy/constants.py (mirrors amy.SINE, amy.FILTER_LPF, etc.)\nvar AMY = {\n  MAX_FILENAME_LEN: 127,\n  AMY_BLOCK_SIZE: 256,\n  BLOCK_SIZE_BITS: 8,\n  AMY_SAMPLE_RATE: 44100,\n  PCM_AMY_SAMPLE_RATE: 22050,\n  AMY_TRANSFER_TYPE_NONE: 0,\n  AMY_TRANSFER_TYPE_AUDIO: 1,\n  AMY_TRANSFER_TYPE_FILE: 2,\n  AMY_TRANSFER_TYPE_SAMPLE: 3,\n  AMY_PCM_TYPE_ROM: 0,\n  AMY_PCM_TYPE_FILE: 1,\n  AMY_PCM_TYPE_MEMORY: 2,\n  PCM_FILE_BUFFER_MULT: 8,\n  AMY_BUS_OUTPUT: 1,\n  AMY_BUS_AUDIO_IN: 2,\n  AMY_MAX_CORES: 2,\n  AMY_MAX_CHANNELS: 2,\n  AMY_NCHANS: 2,\n  AMY_CORES: 1,\n  AMY_MIDI_CHANNEL_DRUMS: 10,\n  MALLOC_CAP_DEFAULT: 0,\n  CHORUS_DEFAULT_LFO_FREQ: 0.5,\n  CHORUS_DEFAULT_MOD_DEPTH: 0.5,\n  CHORUS_DEFAULT_LEVEL: 0,\n  CHORUS_DEFAULT_MAX_DELAY: 320,\n  EQ_CENTER_LOW: 800.0,\n  EQ_CENTER_MED: 2500.0,\n  EQ_CENTER_HIGH: 7000.0,\n  REVERB_DEFAULT_LEVEL: 0,\n  REVERB_DEFAULT_LIVENESS: 0.85,\n  REVERB_DEFAULT_DAMPING: 0.5,\n  REVERB_DEFAULT_XOVER_HZ: 3000.0,\n  ECHO_DEFAULT_LEVEL: 0,\n  ECHO_DEFAULT_DELAY_MS: 500.0,\n  ECHO_DEFAULT_MAX_DELAY_MS: 743.0,\n  ECHO_DEFAULT_FEEDBACK: 0,\n  ECHO_DEFAULT_FILTER_COEF: 0,\n  AMY_SEQUENCER_PPQ: 48,\n  DELAY_LINE_LEN: 512,\n  CLIP_D: 0.1,\n  MAX_VOLUME: 11.0,\n  AMP_THRESH: 0.001,\n  AMP_THRESH_PLUS: 0.0011,\n  SAMPLE_MAX: 32767,\n  MAX_ALGO_OPS: 6,\n  DEFAULT_NUM_BREAKPOINTS: 8,\n  MAX_BREAKPOINTS: 24,\n  MAX_BREAKPOINT_SETS: 2,\n  THREAD_USLEEP: 500,\n  AMY_BYTES_PER_SAMPLE: 2,\n  MAX_VOICES_PER_INSTRUMENT: 32,\n  FILT_NUM_DELAYS: 4,\n  ZERO_HZ_LOG_VAL: -99.0,\n  ZERO_LOGFREQ_IN_HZ: 440.0,\n  ZERO_MIDI_NOTE: 69,\n  MIN_FILTER_LOGFREQ: -2.75,\n  NUM_COMBO_COEFS: 9,\n  MAX_MESSAGE_LEN: 1024,\n  MAX_PARAM_LEN: 256,\n  FILTER_NONE: 0,\n  FILTER_LPF: 1,\n  FILTER_BPF: 2,\n  FILTER_HPF: 3,\n  FILTER_LPF24: 4,\n  SINE: 0,\n  PULSE: 1,\n  SAW_DOWN: 2,\n  SAW_UP: 3,\n  TRIANGLE: 4,\n  NOISE: 5,\n  KS: 6,\n  PCM: 7,\n  ALGO: 8,\n  PARTIAL: 9,\n  BYO_PARTIALS: 10,\n  INTERP_PARTIALS: 11,\n  AUDIO_IN0: 12,\n  AUDIO_IN1: 13,\n  AUDIO_EXT0: 14,\n  AUDIO_EXT1: 15,\n  AMY_MIDI: 16,\n  PCM_LEFT: 17,\n  PCM_RIGHT: 18,\n  PCM_MIX: 7,\n  WAVETABLE: 19,\n  CUSTOM: 20,\n  WAVE_OFF: 21,\n  SYNTH_OFF: 0,\n  SYNTH_AUDIBLE: 1,\n  SYNTH_AUDIBLE_SUSPENDED: 2,\n  SYNTH_IS_MOD_SOURCE: 3,\n  SYNTH_IS_ALGO_SOURCE: 4,\n  EVENT_EMPTY: 0,\n  EVENT_SCHEDULED: 1,\n  EVENT_TRANSFER_DATA: 2,\n  EVENT_SEQUENCE: 3,\n  NOTE_SOURCE_MIDI: 2,\n  ENVELOPE_NORMAL: 0,\n  ENVELOPE_LINEAR: 1,\n  ENVELOPE_DX7: 2,\n  ENVELOPE_TRUE_EXPONENTIAL: 3,\n  SEQUENCE_TICK: 0,\n  SEQUENCE_PERIOD: 1,\n  SEQUENCE_TAG: 2,\n  RESET_SEQUENCER: 4096,\n  RESET_ALL_OSCS: 8192,\n  RESET_TIMEBASE: 16384,\n  RESET_AMY: 32768,\n  RESET_EVENTS: 65536,\n  RESET_ALL_NOTES: 131072,\n  RESET_SYNTHS: 262144,\n  RESET_PATCH: 524288,\n  AMY_OK: 0,\n  AMY_AUDIO_IS_NONE: 0,\n  AMY_AUDIO_IS_I2S: 1,\n  AMY_AUDIO_IS_USB_GADGET: 2,\n  AMY_AUDIO_IS_MINIAUDIO: 4,\n  AMY_MIDI_IS_NONE: 0,\n  AMY_MIDI_IS_UART: 1,\n  AMY_MIDI_IS_USB_GADGET: 2,\n  AMY_MIDI_IS_MACOS: 4,\n  AMY_MIDI_IS_WEBMIDI: 8,\n  AMYBOARD_LRC: 2,\n  AMYBOARD_BCLK: 8,\n  AMYBOARD_DOUT: 6,\n  AMYBOARD_DIN: 9,\n  AMYBOARD_MCLK: 3,\n  AMYBOARD_MIDI_OUT_TYPE_A: 14,\n  AMYBOARD_MIDI_OUT_TYPE_B: 15,\n  AMYBOARD_MIDI_IN: 21\n};\n\nif (typeof globalThis !== \"undefined\") {\n  globalThis.amy_message = amy_message;\n  globalThis.amy_send = amy_send;\n  globalThis.AMY = AMY;\n  globalThis.AMY_KW_MAP = AMY_KW_MAP;\n  globalThis.AMY_COEF_FIELDS = AMY_COEF_FIELDS;\n}\n\n})();\n"
  },
  {
    "path": "docs/amy.ww.js",
    "content": "// N.B. The contents of this file are duplicated in src/library_wasm_worker.js\n// in variable \"_wasmWorkerBlobUrl\" (where the contents are pre-minified) If\n// doing any changes to this file, be sure to update the contents there too.\n\n'use strict';\n\n// Node.js support\nvar ENVIRONMENT_IS_NODE = typeof process == 'object' && typeof process.versions == 'object' && typeof process.versions.node == 'string' && process.type != 'renderer';\nif (ENVIRONMENT_IS_NODE) {\n  // Create as web-worker-like an environment as we can.\n\n  var nodeWorkerThreads = require('worker_threads');\n\n  var parentPort = nodeWorkerThreads.parentPort;\n\n  parentPort.on('message', (msg) => global.onmessage?.({ data: msg }));\n\n  // Weak map of handle functions to their wrapper. Used to implement\n  // addEventListener/removeEventListener.\n  var wrappedHandlers = new WeakMap();\n  function wrapMsgHandler(h) {\n    var f = wrappedHandlers.get(h)\n    if (!f) {\n      f = (msg) => h({data: msg});\n      wrappedHandlers.set(h, f);\n    }\n    return f;\n  }\n\n  var fs = require('fs');\n  var vm = require('vm');\n\n  Object.assign(global, {\n    self: global,\n    require,\n    __filename,\n    __dirname,\n    Worker: nodeWorkerThreads.Worker,\n    importScripts: (f) => vm.runInThisContext(fs.readFileSync(f, 'utf8'), {filename: f}),\n    postMessage: (msg) => parentPort.postMessage(msg),\n    performance: global.performance || { now: Date.now },\n    addEventListener: (name, handler) => parentPort.on(name, wrapMsgHandler(handler)),\n    removeEventListener: (name, handler) => parentPort.off(name, wrapMsgHandler(handler)),\n  });\n}\n\nself.onmessage = function(d) {\n  // The first message sent to the Worker is always the bootstrap message.\n  // Drop this message listener, it served its purpose of bootstrapping\n  // the Wasm Module load, and is no longer needed. Let user code register\n  // any desired message handlers from now on.\n  self.onmessage = null;\n  d = d.data;\n  d['instantiateWasm'] = (info, receiveInstance) => { var instance = new WebAssembly.Instance(d['wasm'], info); return receiveInstance(instance, d['wasm']); }\n  importScripts(d.js);\n  amyModule(d);\n  // Drop now unneeded references to from the Module object in this Worker,\n  // these are not needed anymore.\n  d.wasm = d.mem = d.js = 0;\n}\n"
  },
  {
    "path": "docs/amyrepl.css",
    "content": "\n/*.modal-backdrop.fade.show { z-index: inherit; }*/\n\n\n/*\nSolarized theme for code-mirror\nhttp://ethanschoonover.com/solarized\n*/\n\n/*\nSolarized color palette\nhttp://ethanschoonover.com/solarized/img/solarized-palette.png\n*/\n\n.solarized.base03 { color: #002b36; }\n.solarized.base02 { color: #073642; }\n.solarized.base01 { color: #586e75; }\n.solarized.base00 { color: #657b83; }\n.solarized.base0 { color: #839496; }\n.solarized.base1 { color: #93a1a1; }\n.solarized.base2 { color: #eee8d5; }\n.solarized.base3  { color: #fdf6e3; }\n.solarized.solar-yellow  { color: #b58900; }\n.solarized.solar-orange  { color: #cb4b16; }\n.solarized.solar-red { color: #dc322f; }\n.solarized.solar-magenta { color: #d33682; }\n.solarized.solar-violet  { color: #6c71c4; }\n.solarized.solar-blue { color: #268bd2; }\n.solarized.solar-cyan { color: #2aa198; }\n.solarized.solar-green { color: #859900; }\n\n/* Color scheme for code-mirror */\n\n.cm-s-solarized {\n  line-height: 1.45em;\n  color-profile: sRGB;\n  rendering-intent: auto;\n}\n.cm-s-solarized.cm-s-dark {\n  color: #839496;\n  background-color: #002b36;\n}\n.cm-s-solarized.cm-s-light {\n  background-color: #fdf6e3;\n  color: #657b83;\n}\n\n.cm-s-solarized .CodeMirror-widget {\n  text-shadow: none;\n}\n\n.cm-s-solarized .cm-header { color: #586e75; }\n.cm-s-solarized .cm-quote { color: #93a1a1; }\n\n.cm-s-solarized .cm-keyword { color: #cb4b16; }\n.cm-s-solarized .cm-atom { color: #d33682; }\n.cm-s-solarized .cm-number { color: #d33682; }\n.cm-s-solarized .cm-def { color: #2aa198; }\n\n.cm-s-solarized .cm-variable { color: #839496; }\n.cm-s-solarized .cm-variable-2 { color: #b58900; }\n.cm-s-solarized .cm-variable-3, .cm-s-solarized .cm-type { color: #6c71c4; }\n\n.cm-s-solarized .cm-property { color: #2aa198; }\n.cm-s-solarized .cm-operator { color: #6c71c4; }\n\n.cm-s-solarized .cm-comment { color: #586e75; font-style:italic; }\n\n.cm-s-solarized .cm-string { color: #859900; }\n.cm-s-solarized .cm-string-2 { color: #b58900; }\n\n.cm-s-solarized .cm-meta { color: #859900; }\n.cm-s-solarized .cm-qualifier { color: #b58900; }\n.cm-s-solarized .cm-builtin { color: #d33682; }\n.cm-s-solarized .cm-bracket { color: #cb4b16; }\n.cm-s-solarized .CodeMirror-matchingbracket { color: #859900; }\n.cm-s-solarized .CodeMirror-nonmatchingbracket { color: #dc322f; }\n.cm-s-solarized .cm-tag { color: #93a1a1; }\n.cm-s-solarized .cm-attribute { color: #2aa198; }\n.cm-s-solarized .cm-hr {\n  color: transparent;\n  border-top: 1px solid #586e75;\n  display: block;\n}\n.cm-s-solarized .cm-link { color: #93a1a1; cursor: pointer; }\n.cm-s-solarized .cm-special { color: #6c71c4; }\n.cm-s-solarized .cm-em {\n  color: #999;\n  text-decoration: underline;\n  text-decoration-style: dotted;\n}\n.cm-s-solarized .cm-error,\n.cm-s-solarized .cm-invalidchar {\n/*  \n  color: #586e75;\n  border-bottom: 1px dotted #dc322f;\n  */\n}\n\n.cm-s-solarized.cm-s-dark div.CodeMirror-selected { background: #073642; }\n.cm-s-solarized.cm-s-dark.CodeMirror ::selection { background: rgba(7, 54, 66, 0.99); }\n.cm-s-solarized.cm-s-dark .CodeMirror-line::-moz-selection, .cm-s-dark .CodeMirror-line > span::-moz-selection, .cm-s-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(7, 54, 66, 0.99); }\n\n.cm-s-solarized.cm-s-light div.CodeMirror-selected { background: #eee8d5; }\n.cm-s-solarized.cm-s-light .CodeMirror-line::selection, .cm-s-light .CodeMirror-line > span::selection, .cm-s-light .CodeMirror-line > span > span::selection { background: #eee8d5; }\n.cm-s-solarized.cm-s-light .CodeMirror-line::-moz-selection, .cm-s-light .CodeMirror-line > span::-moz-selection, .cm-s-light .CodeMirror-line > span > span::-moz-selection { background: #eee8d5; }\n\n/* Editor styling */\n\n\n\n/* Little shadow on the view-port of the buffer view */\n.cm-s-solarized.CodeMirror {\n  -moz-box-shadow: inset 7px 0 12px -6px #000;\n  -webkit-box-shadow: inset 7px 0 12px -6px #000;\n  box-shadow: inset 7px 0 12px -6px #000;\n}\n\n/* Remove gutter border */\n.cm-s-solarized .CodeMirror-gutters {\n  border-right: 0;\n}\n\n/* Gutter colors and line number styling based of color scheme (dark / light) */\n\n/* Dark */\n.cm-s-solarized.cm-s-dark .CodeMirror-gutters {\n  background-color: #073642;\n}\n\n.cm-s-solarized.cm-s-dark .CodeMirror-linenumber {\n  color: #586e75;\n}\n\n/* Light */\n.cm-s-solarized.cm-s-light .CodeMirror-gutters {\n  background-color: #eee8d5;\n}\n\n.cm-s-solarized.cm-s-light .CodeMirror-linenumber {\n  color: #839496;\n}\n\n/* Common */\n.cm-s-solarized .CodeMirror-linenumber {\n  padding: 0 5px;\n}\n.cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; }\n.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker { color: #ddd; }\n.cm-s-solarized.cm-s-light .CodeMirror-guttermarker { color: #cb4b16; }\n\n.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text {\n  color: #586e75;\n}\n\n/* Cursor */\n.cm-s-solarized .CodeMirror-cursor { border-left: 1px solid #819090; }\n\n/* Fat cursor */\n.cm-s-solarized.cm-s-light.cm-fat-cursor .CodeMirror-cursor { background: #77ee77; }\n.cm-s-solarized.cm-s-light .cm-animate-fat-cursor { background-color: #77ee77; }\n.cm-s-solarized.cm-s-dark.cm-fat-cursor .CodeMirror-cursor { background: #586e75; }\n.cm-s-solarized.cm-s-dark .cm-animate-fat-cursor { background-color: #586e75; }\n\n/* Active line */\n.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background {\n  background: rgba(255, 255, 255, 0.06);\n}\n.cm-s-solarized.cm-s-light .CodeMirror-activeline-background {\n  background: rgba(0, 0, 0, 0.06);\n}"
  },
  {
    "path": "docs/amyrepl.js",
    "content": "\n// Manage Micropython and AMY running together, for a web REPL experience\nvar mp = null;\nvar editors = [];\nvar run_at_starts = [];\nvar python_started = false;\n\n\nasync function start_python_and_amy() {\n  await amy_js_start();\n  await start_python();\n}\n\nasync function run_async(code) {\n  await mp.runPythonAsync(code);\n}\n\n\nasync function start_python() {\n  // Don't run this twice\n  if(python_started) return;\n  // Let micropython call an exported AMY function\n  await mp.registerJsModule('amy_js_message', amy_add_message);\n\n  // time.sleep on this would block the browser from executing anything, so we override it to a JS thing\n  mp.registerJsModule(\"time\", {\n    sleep: async (s) => await new Promise((r) => setTimeout(r, s * 1000)),\n  });\n\n  // Set up the micropython context, like _boot.py. \n  await mp.runPythonAsync(`\n    import amy, amy_js_message, time\n    amy.override_send = amy_js_message\n  `);\n  await sleep_ms(200);\n  python_started = true;\n\n  for(i=0;i<run_at_starts.length;i++) {\n    if(run_at_starts[i]) {\n      await runCodeBlock(i);\n    }\n  }\n}\n\nasync function resetAMY() {\n  if(python_started && amy_started) {\n    await mp.runPythonAsync('amy.reset()\\n');\n  }\n}      \n\nasync function print_error(text) {\n    document.getElementById(\"python-output-text\").innerHTML = \"<pre>\"+text+\"</pre>\";\n    let myModal = new bootstrap.Modal(document.getElementById('myModal'), {backdrop:false});\n    myModal.show();            \n};\n\nasync function runCodeBlock(index) {\n  // This is the case that someone clicks the green run button as their first click, so we have to wait for python/amy to start up\n  if(!(python_started && amy_started)) await sleep_ms(1000);\n  var py = editors[index].getValue();\n  await amy_add_message(\"S16384Z\");\n  try {\n    mp.runPythonAsync(py);\n  } catch (e) {\n    await print_error(e.message);\n  }\n}\n\n// Create editor block for notebook mode.\nfunction create_editor(element, index) {\n  code = element.textContent;\n  element.innerHTML = `\n  <div>\n    <section class=\"input\">\n      <div><textarea id=\"code-${index}\" name=\"code-${index}\"></textarea></div> \n    </section>\n    <div class=\"align-self-center my-3\"> \n      <button type=\"button\" class=\"btn btn-sm btn-success\" onclick=\"runCodeBlock(${index})\">►</button> \n      <button type=\"button\" class=\"btn btn-sm btn-danger\" onclick=\"resetAMY()\">Reset</button> \n    </div>\n  </div>`;\n\n  const editor = CodeMirror.fromTextArea(document.getElementById(`code-${index}`), { \n    mode: { \n      name: \"python\", \n      version: 3, \n      singleLineStringErrors: false,\n      lint: false\n    }, \n    lineNumbers: true, \n    indentUnit: 4, \n    matchBrackets: true,\n    spellCheck: false,\n    autocorrect: false,\n    theme: \"solarized dark\",\n    lint: false,\n  }); \n\n  run_at_start = false;\n  if(element.classList.contains(\"preload-python\")) {\n    run_at_start = true;\n  }\n  editor.setSize(null,150);\n  editor.setValue(code.trim()); \n  run_at_starts.push(run_at_start);\n  editors.push(editor);\n}\n\n\n// Called from AMY to update AMYboard about what tick it is, for the sequencer\nfunction amy_sequencer_js_hook(tick) {\n    mp.tulipTick(tick);\n}\n\n\n"
  },
  {
    "path": "docs/api.md",
    "content": "# AMY synthesizer API\n\nThis page collects the current API for [AMY](https://github.com/shorepine/amy).\n\n[**Please see our interactive AMY tutorial for more tips on using AMY**](https://shorepine.github.io/amy/tutorial.html)\n\n## C / Arduino API\n\nParsing, creating and adding events to AMY:\n\n```c\n// returns default empty amy_event\namy_event amy_default_event();\n\n// clears an existing AMY event\namy_clear_event(amy_event *e);\n\n// given an event play / schedule the event directly\namy_add_event(amy_event *e);\n\n// given a wire message string play / schedule the event directly\namy_add_message(char *message);\n```\n\nGet and set external audio buffers:\n```c\n\n// get AUDIO_IN0 and AUDIO_IN1\namy_get_input_buffer(output_sample_type * samples);\n\n// set AUDIO_EXT0 and AUDIO_EXT1\namy_set_external_input_buffer(output_sample_type * samples);\n```\n\nIf not running live, render a new block of AMY audio into a int16_t buffer:\n\n```c\noutput_sample_type * amy_simple_fill_buffer();\n```\n\nGet the AMY time:\n```c\n// on all platforms, sysclock is based on total samples played, using audio out (i2s or etc) as system clock\nuint32_t amy_sysclock();\n```\n\n\nStart and stop AMY:\n```c\n// Emscripten web start\namy_start_web();\namy_start_web_no_synths();\n\n// Start AMY with a config.  If c.audio is set, will attempt to start live audio\namy_start(amy_config_t c);\n\n// Stop AMY including any live audio output\namy_stop();\n\n```\n\nDefault MIDI handlers:\n```c\nvoid amy_enable_juno_filter_midi_handler(); // assigns the Juno-6 MIDI CC handler\n```\n\n## JavaScript API\n\nAMY provides a high-level JavaScript API (`amy_send`) that mirrors the Python `amy.send()` interface. It is auto-generated from the same source of truth (`amy/__init__.py` and `amy/constants.py`) so parameter names are always identical to Python. The connector and API are bundled into `amy.js`, so you only need two includes:\n\n```html\n<script src=\"enable-threads.js\"></script>\n<script src=\"amy.js\"></script>\n```\n\n### `amy_send(params)`\n\nBuild and send an AMY wire message from a JS object. Parameter names and types are the same as Python `amy.send()`.\n\n```js\n// Play a sine wave at 440 Hz\namy_send({osc: 0, wave: AMY.SINE, freq: 440, vel: 1})\n\n// Load a Juno-6 patch\namy_send({patch: 0, synth: 1, num_voices: 6})\namy_send({synth: 1, vel: 1, note: 60})\n\n// FM synthesis with CtrlCoef dict\namy_send({osc: 0, amp: {const: 1, vel: 0, eg0: 2}, bp0: '0,0,5000,1,0,0'})\n```\n\n### `amy_message(params)`\n\nLike `amy_send` but returns the wire string without sending it. Useful for debugging or building messages to send later.\n\n```js\namy_message({osc: 0, wave: AMY.SINE, freq: 440})  // => \"v0w0f440Z\"\n```\n\n### `AMY` constants\n\nAll constants from `amy/constants.py` are available on the global `AMY` object:\n\n```js\nAMY.SINE         // 0\nAMY.SAW_DOWN     // 2\nAMY.PULSE        // 1\nAMY.FILTER_LPF   // 1\nAMY.ALGO         // 8\n// ... all constants from amy/constants.py\n```\n\n### Regenerating\n\nThe JS API is generated during `make web` and bundled into `docs/amy.js` by `make deploy-web`. To regenerate after changing `amy/__init__.py` or `amy/constants.py`:\n\n```bash\nmake deploy-web\n```\n\n### Try it live\n\n[**AMY JavaScript REPL**](https://shorepine.github.io/amy/repl.html) — write and run `amy_send()` commands in your browser.\n\n## `amy_config_t`\n\nUse like:\n\n```c\namy_config_t amy_config = amy_default_config()\namy_config.max_sequencer_tags = 128;\namy_start(amy_config);\n```\n\n| Field   | Values | Default   |  Notes                                 |\n| ------  | ------ | --------  |  --------                              |\n| `features.chorus` | `0=off, 1=on` | On | If chorus is enabled (uses RAM) |\n| `features.reverb` | `0=off, 1=on` | On | If reverb is enabled (uses RAM) |\n| `features.echo` | `0=off, 1=on` | On | If echo is enabled (uses RAM) |\n| `features.partials` | `0=off, 1=on` | On | If partials are enabled |\n| `features.custom` | `0=off, 1=on` | On | If custom C oscillators are enabled |\n| `features.audio_in` | `0=off, 1=on` | Off | If audio_in gets processed via the audio interface. Must be 1 for AUDIO_IS_MINIAUDIO |\n| `features.default_synths` | `0=off, 1=on` | Off| If AMY boots with Juno-6 on `synth` 1 and GM drums on `synth` 10 |\n| `features.startup_bleep` | `0=off, 1=on` | Off | If AMY plays a startup sound on boot |\n| `platform.multicore` | `0=off, 1=on` | On | Attempts to use 2nd core if available |\n| `platform.multithread` | `0=off, 1=on` | On | Attempts to multithreading if available (ESP/RTOS) |\n| `midi` | `AMY_MIDI_IS_NONE`, `AMY_MIDI_IS_UART`, `AMY_MIDI_IS_USB_GADGET`, `AMY_MIDI_IS_WEBMIDI` | `AMY_MIDI_IS_NONE` | Which MIDI interface(s) are active |\n| `audio` | `AMY_AUDIO_IS_NONE`, `AMY_AUDIO_IS_I2S`, `AMY_AUDIO_IS_USB_GADGET`, `AMY_AUDIO_IS_MINIAUDIO`| I2S or miniaudio | Which audio interface(s) are active |\n| `write_samples_fn` | fn ptr | `NULL` | If provided, `amy_update` will call this with each new block of samples | \n| `max_oscs` | Int | 180 | How many oscillators to support |\n| `max_sequencer_tags` | Int | 256 | How many sequencer items to handle |\n| `max_voices` | Int | 64 | How many voices |\n| `max_synths` | Int | 64 | How many synths |\n| `max_memory_patches` | Int | 32 | How many in memory patches to supprot |\n| `i2s_lrc`, `i2s_dout`, `i2s_din`, `i2s_bclk`, `i2s_mclk` | Int | -1 | Pin numbers for the I2S interface |\n| `midi_out`, `midi_in` | Int | -1 | Pin number for the MIDI UART pins |\n| `midi_uart` | 0,1,[2] | -1 | UART device index for MCU. Default 1 (`UART1`) on Pi Pico and ESP. Teensy is always `8` |\n| `capture_device_id`, `playback_device_id` | Int | -1 | Which miniaudio device to use, -1 is auto |\n\n\n## Hooks\n\nHooks are configured on `amy_config_t` before calling `amy_start`:\n\n```c\namy_config_t amy_config = amy_default_config();\namy_config.amy_external_midi_input_hook = my_midi_hook;\namy_config.amy_external_render_hook = my_render_hook;\namy_start(amy_config);\n```\n\nHook fields in `amy_config_t`:\n\n| Hook | Signature | Used by | Description |\n| ---- | --------- | ------- | ----------- |\n| `amy_external_render_hook` | `uint8_t (uint16_t osc, SAMPLE *buf, uint16_t len)` | — | Custom oscillator renderer for redirecting the output waveforms on an osc-by-osc level. Return 1 if handled, in which case that osc does not contribute to the normal output. |\n| `amy_external_coef_hook` | `float (uint16_t channel)` | — | Provide external coefficient values (e.g. CV input). |\n| `amy_external_block_done_hook` | `void (void)` | — | Called after each audio block is rendered. |\n| `amy_external_midi_input_hook` | `void (uint8_t *bytes, uint16_t len, uint8_t is_sysex)` | — | Called when MIDI bytes are received. |\n| `amy_external_sequencer_hook` | `void (uint32_t tick_count)` | — | Called on each sequencer tick. |\n| `amy_external_fopen_hook` | `uint32_t (char *filename, const char *mode)` | `zT`, `zD`, `zF` | Open a file on host disk. Returns opaque handle. |\n| `amy_external_fwrite_hook` | `uint32_t (uint32_t fptr, uint8_t *bytes, uint32_t len)` | `zT` | Write bytes to a file opened via fopen hook. |\n| `amy_external_fread_hook` | `uint32_t (uint32_t fptr, uint8_t *bytes, uint32_t len)` | `zD` | Read bytes from a file opened via fopen hook. |\n| `amy_external_fseek_hook` | `void (uint32_t fptr, uint32_t pos)` | `zD` | Seek to position in a file opened via fopen hook. |\n| `amy_external_fclose_hook` | `void (uint32_t fptr)` | `zT`, `zD`, `zF` | Close a file opened via fopen hook. |\n| `amy_external_file_transfer_done_hook` | `void (const char *filename)` | `zT` | Called after a `zT` file transfer completes. On AMYboard, restarts sketch.py. |\n| `amy_external_update_file_hook` | `void (const char *filename)` | `zA` | Called by `zA` to update a file with current AMY state. On AMYboard, splices live knob state into sketch.py. |\n| `amy_external_exec_hook` | `void (const char *code)` | `zP` | Called by `zP` to execute a string on the host. On AMYboard, runs the string as Python via `exec()`. |\n| `amy_external_reboot_hook` | `void (uint8_t mode)` | `zB` | Called by `zB` to reboot the host. `mode` selects which post-reboot state: `0` = bootloader (skip sketch on next boot), `1` = normal reboot (run sketch), `2` = ROM download / flash mode. Handled in pure C before `mp_sched_schedule`. On AMYboard, sets an RTC flag with the requested mode and calls `esp_restart()`. |\n\nAll hook fields default to `NULL` in `amy_default_config()`.\n\n\n## `amy_event`, `amy.send`, and `amy_send` API:\n\nAMY parameters can be set via three interfaces:\n- **C**: Set fields on `amy_event` structs\n- **Python**: `amy.send(param=value, ...)`\n- **JavaScript**: `amy_send({param: value, ...})`\n\nPython and JavaScript use identical parameter names (shown in the **Python / JS** column below). A few parameters are not yet available via C `amy_event` (marked **TODO**).\n\nPlease see [AMY synthesizer details](synth.md) for more explanation on the synthesizer parameters.\n\n[**Please see our interactive AMY tutorial for more tips on using AMY**](https://shorepine.github.io/amy/tutorial.html)\n\nA note on list parameters:  When an argument is a list of parameters, you can in general set any subset of those parameters by omitting the values you don't want to change - either by leaving them in their initial `AMY_UNSET` value in C, or by having missing values in Python lists.  For instance, you can set up an envelope that moves immediately to 1, then decase to a sutain level of 0.5 over 200ms, then has a 300ms decay to zero on note-off, with `bp0='0,1,200,0.5,300,0'.  Subsequently, you could change just the sustain level (the 4th value in the list) to 0.2 with `bp0=,,,0.2`.  However, there's at present no way to say \".. and the list should now only be 4 items long.  This only affects breakpoint sets which are variable length, but the net result is that once you have a certain number of breakpoints in a list, you cannot shorten it except by resetting the whole osc and building it all up again.\n\n\n### `synth`s and `voice`s:\n\n| Wire code   | C `amy_event` | Python / JS   | Type-range  | Notes                                 |\n| ------ | -------- | ---------- | ----------  | ------------------------------------- |\n| `i`    | `synth` | `synth`  | 0-31  | Define a set of voices for voice management. |\n| `ic`   | **TODO** | `midi_cc`  | C,L,N,X,O,CMD | MIDI Control Code command for this synth (1-16).  `C`=MIDI CC (0-127), `L`=log mapping (0/1), `N`=min val, `X`=max val, `O`=offset, `CMD`=wire command to execute, where `%i` is replaced by the channel number and `%v` is replaced by the value after min/max/offset/log mapping.  Providing `C` with no further args deletes that CC.  `C=255` deletes all CC mappings for the specified synth. See [#524](https://github.com/shorepine/amy/issues/524) |\n| `if`   | `synth_flags` | `synth_flags` | uint | Flags for synth creation: 1 = Use MIDI drum note->preset translation; 2 = Drop note-off events. |\n| `id`   | `synth_delay_ms` | `synth_delay` | uint | Delay (in ms) applied to synth note-ons.  Gives time for decay of 'stolen' notes. |\n| `it`   | `to_synth` |  `to_synth` | 0-31 | New synth number, when changing the number (MIDI channel for n=1..16) of an entire synth. |\n| `iv`   | `num_voices` | `num_voices` | int | The number of voices to allocate when defining a synth, alternative to directly specifying voice numbers with `voices=`.  Only valid with `synth=X, patch[_number]=Y`. |\n| `in`   | `oscs_per_voice`  | `oscs_per_voice`  | >0  | Reserve this many oscs for each voice.  Needed when initializing a synth (or voice) withouth an initial patch. Setting `oscs_per_voice` on an existing synth resets all oscs to their default state. |\n| `im`   | `grab_midi_notes` | `grab_midi_notes` | 0/1 | Use `amy.send(synth=CHANNEL, grab_midi_notes=0)` to prevent the default direct forwarding of MIDI note-on/offs to synth CHANNEL. |\n| `ip`   | `pedal` | `pedal` | int | Non-zero means pedal is down (i.e., sustain).  Must be used with `synth`. |\n| `K`    | `patch_number` | `patch` | uint 0-X | Apply a saved or user patch to a specified synth or voice. |\n| `r`    | `voices[]` | `voices` | int[,int] | Comma separated list of voices to send message to, or load patch into. |\n| `u`    | **TODO**| `patch_string` | string | Provide AMY message to define up to 32 patches in RAM with ID numbers (1024-1055) provided via `patch_number`, or directly configure a `synth`. |\n\n\n### Oscillator control\n\n| Wire code   | C `amy_event` | Python / JS   | Type-range  | Notes                                 |\n| ------ | -------- | ---------- | ----------  | ------------------------------------- |\n| `v`    | `osc` | `osc` | uint 0 to OSCS-1 | Which oscillator to control |\n| `w`    | `wave` | `wave` | uint 0-21 | Waveform: [0=SINE, PULSE, SAW_DOWN, SAW_UP, TRIANGLE, NOISE, KS, PCM, ALGO, PARTIAL, BYO_PARTIALS, INTERP_PARTIALS, AUDIO_IN0, AUDIO_IN1, AUDIO_EXT0, AUDIO_EXT1, AMY_MIDI, PCM_LEFT, PCM_RIGHT, WAVETABLE, CUSTOM, OFF]. default: 0/SINE |\n| `S`    | `reset_osc`| `reset`  | uint | Resets given oscillator. set to RESET_ALL_OSCS to reset all oscillators, gain and EQ. RESET_TIMEBASE resets the clock (immediately, ignoring `time`). RESET_AMY restarts AMY. RESET_SEQUENCER clears the sequencer.|\n| `A`    | `eg0_times[]`, `eg0_values[]` | `bp0`    | string (wire) / arrays (`amy_event`)      | Envelope Generator 0 breakpoints as time(ms),value pairs. Wire/Python format remains comma-separated, e.g. `100,0.5,50,0.25,200,0`. In C `amy_event`, use typed arrays (`eg0_times[i]`, `eg0_values[i]`). The last pair is release (triggers on note off). |\n| `B`    | `eg1_times[]`, `eg1_values[]` | `bp1`    | string (wire) / arrays (`amy_event`)      | Envelope Generator 1 breakpoints. Wire/Python format remains comma-separated; in C `amy_event`, use typed arrays (`eg1_times[i]`, `eg1_values[i]`). |\n| `b`    | `feedback` | `feedback` | float 0-1 | Use for the ALGO synthesis type in FM or for karplus-strong, or to indicate PCM looping (0 off, >0, on) |\n| `c`    | `chained_osc` | `chained_osc` |  uint 0 to OSCS-1 | Chained oscillator.  Note/velocity events to this oscillator will propagate to chained oscillators.  VCF is run only for first osc in chain, but applies to all oscs in chain. |\n| `G`    | `filter_type` | `filter_type` | 0-4 | Filter type: 0 = none (default.) 1 = lowpass, 2 = bandpass, 3 = highpass, 4 = double-order lowpass. |\n| `I`    | `ratio` | `ratio`  | float | For ALGO types, ratio of modulator frequency to  base note frequency  |\n| `L`    | `mod_source` | `mod_source` | 0 to OSCS-1 | Which oscillator is used as an modulation/LFO source for this oscillator. Source oscillator will be silent. |\n| `m`    | `portamento`| `portamento` | uint | Time constant (in ms) for pitch changes when note is changed without intervening note-off.  default 0 (immediate), 100 is good. |\n| `n`    | `midi_note` | `note` | float, but typ. uint 0-127 | Midi note, sets frequency.  Fractional Midi notes are allowed. |\n| `o`    | `algorithm` | `algorithm` | uint 1-32 | DX7 FM algorithm to use for ALGO type |\n| `O`    | `algo_source[]`| `algo_source` | string | Which oscillators to use for the FM algorithm. list of six (starting with op 6), use empty for not used, e.g 0,1,2 or 0,1,2,,, |\n| `p`    | `preset` | `preset` | int | Which predefined PCM or wavetable preset patch to use, or number of partials if < 0. For `wave=WAVETABLE`, use the wavetable presets appended to PCM. (Juno/DX7 patches are different - see `patch_number`). |\n| `p`    | `preset` | `num_partials` | int | Alias for `preset`. Must be used with `wave=BYO_PARTIALS`. Cannot be combined with `preset` in the same message. |\n| `P`    | `phase` | `phase` | float 0-1 | Where in the oscillator's cycle to begin the waveform (also works on the PCM buffer). default 0 |\n| `R`    | `resonance` | `resonance` | float | Q factor of variable filter, 0.5-16.0. default 0.7 |\n| `T`    | `eg_type[0]` | `eg0_type` | uint 0-3 | Type for Envelope Generator 0 - 0: Normal (RC-like) / 1: Linear / 2: DX7-style / 3: True exponential. |\n| `X`    | `eg_type[1]` | `eg1_type` | uint 0-3 | Type for Envelope Generator 1 - 0: Normal (RC-like) / 1: Linear / 2: DX7-style / 3: True exponential. |\n| `l`    | `velocity` | `vel` | float | Note on velocity. Use to start an envelope or set amplitude |\n\n### CtrlCoefs\n\nThese per-oscillator parameters use [CtrlCoefs](synth.md) notation\n\n| Wire code   | C `amy_event` | Python / JS   | Type-range  | Notes                                 |\n| ------ | -------- | ---------- | ----------  | ------------------------------------- |\n| `Q`    | `pan_coefs[]` | `pan`   | float[,float...] | Panning index ControlCoefficients (for stereo output), 0.0=left, 1.0=right. default 0.5. |\n| `a`    | `amp_coefs[]` | `amp`    | float[,float...]  | Control the amplitude of a note; a set of ControlCoefficients. Default is 0,0,1,1  (i.e. the amplitude comes from the note velocity multiplied by by Envelope Generator 0.) |\n| `d`    | `duty_coefs[]` | `duty`   |  float[,float...] | Duty cycle for pulse wave, ControlCoefficients, defaults to 0.5 |\n| `f`    | `freq_coefs[]` | `freq`   |  float[,float...]      | Frequency of oscillator, set of ControlCoefficients.  Default is 0,1,0,0,0,0,1 (from `note` pitch plus `pitch_bend`) |\n| `F`    | `filter_freq_coefs[]` | `filter_freq` | float[,float...]  | Center/break frequency for variable filter, set of ControlCoefficients |\n\n### PCM sampling\n\n| Wire code   | C `amy_event` | Python / JS   | Type-range  | Notes                                 |\n| ------ | -------- | ---------- | ----------  | ------------------------------------- |\n| `z`    | **TODO**| `load_sample` | uint x 6 | Signal to start loading sample. preset number, length(frames), samplerate, channels, midinote, loopstart, loopend. All subsequent messages are base64 encoded WAVE-style frames of audio until `length` is reached. Set `preset` and `length=0` to unload a sample from RAM. |\n| `zF`   | **TODO**| `disk_sample` | uint,string,uint | Set a PCM preset to play live from a WAV filename on AMY host disk. Params: preset number, filename, midinote. See `hooks` for reading files on host disk. **Only one file sample can be played at once per preset number. Use multiple presets if you want polyphony from a single sample.** |\n| `zS`   | **TODO**| `start_sample` | uint x 6 | Start sampling to a stereo PCM preset from bus. Params: preset number,  bus, max length in frames, midinote, loopstart, loopend. bus = 1 is AMY mixed output. bus = 2 is AUDIO_IN0 + 1.  Will sample until max length is reached, `stop_sample` is issued, or a new `start_sample` is issued. | \n| `zO`   | **TODO**| `stop_sample` | uint | Stop sampling. Does nothing if no sampling active. param ignored. | \n\n### WAVETABLE wave type\n\n`wave=WAVETABLE` is available when AMY is built with `-DAMY_WAVETABLE`.\n\n- Wavetable samples are baked into `pcm_tiny` and exposed as contiguous PCM presets.\n- The preset range is dynamic at runtime:\n  - start: `pcm_wavetable_base`\n  - count: `pcm_wavetable_samples`\n  - valid presets: `pcm_wavetable_base ... pcm_wavetable_base + pcm_wavetable_samples - 1`\n- Each wavetable preset is expected to be one 64-cycle table (normally `16384` samples total, `256` samples per cycle).\n- `duty` crossfades across the 64 cycles inside the selected wavetable preset.\n\n### Other\n\n| Wire code   | C `amy_event` | Python / JS   | Type-range  | Notes                                 |\n| ------ | -------- | ---------- | ----------  | ------------------------------------- |\n| `H`    | `sequence[3]` | `sequence` | int,int,int | Tick offset, period, tag for sequencing | \n| `h`    | `reverb_level, reverb_liveness, reverb_damping, reverb_xover_hz` | `reverb` | float[,float,float,float] | Reverb parameters -- level, liveness, damping, xover: Level is for output mix; liveness controls decay time, 1 = longest, default 0.85; damping is extra decay of high frequencies, default 0.5; xover is damping crossover frequency, default 3000 Hz. |\n| `j`    | `tempo` | `tempo`  | float | The tempo (BPM, quarter notes) of the sequencer. Defaults to 108.0. |\n| `k`    | `chorus_level, chorus_max_delay, chorus_lfo_freq, chorus_depth` | `chorus` | float[,float,float,float] | Chorus parameters -- level, delay, freq, depth: Level is for output mix (0 to turn off); delay is max in samples (320); freq is LFO rate in Hz (0.5); depth is proportion of max delay (0.5). |\n| `M`    | `echo_level, echo_delay_ms, echo_max_delay_ms, echo_feedback, echo_filter_coef` | `echo` | float[,int,int,float,float] | Echo parameters --  level, delay_ms, max_delay_ms, feedback, filter_coef (-1 is HPF, 0 is flat, +1 is LPF). |\n| `N`    | `latency_ms`| `latency_ms` | uint | Sets latency in ms. default 0 (see LATENCY) |\n| `s`    | `pitch_bend` | `pitch_bend` | float | Sets the global pitch bend, by default modifying all note frequencies by (fractional) octaves up or down |\n| `t`    | `time` | `time` | uint | Request playback time relative to some fixed start point on your host, in ms. Allows precise future scheduling. |\n| `V`    | `volume`| `volume` | float 0-10 | Volume knob for entire synth, default 1.0 |\n| `x`    | `eq_l, eq_m, eq_h` |`eq` | float,float,float | Equalization in dB low (~800Hz) / med (~2500Hz) / high (~7500Gz) -15 to 15. 0 is off. default 0. |\n| `g`    | `client` | `client` | uint | Client number for Alles distributed synthesis. |\n| `W`    | `external_channel` | `external_channel` | uint | External channel routing (used by Tulip for CV output). |\n| `D`    | **TODO** | `debug`  |  uint, 2-4  | 2 shows queue sample, 3 shows oscillator data, 4 shows modified oscillator. Will interrupt audio! |\n| `zT`   | **TODO**| `transfer_file` | string,uint | Transfer a file to the host. Params: destination filename, file size. See `hooks` for writing files on host disk. |\n| `zA`   | **TODO**| `update_file` | string (optional) | Update a file on disk with current AMY state via `update_file_hook`. Default path: `/user/current/sketch.py`. On AMYboard, splices `_auto_generated_knobs` section with live state. The filename is \"rest of message\": a trailing `Z` end-of-message marker is stripped, so interior capital-`Z` characters (e.g. `/user/ZFILE.py`) are preserved. Filenames whose last character is `Z` are not addressable. |\n| `zD`   | **TODO**| `dump_sysex` | string (optional) | Dump data over MIDI sysex (base64-encoded, wrapped with SPSS manufacturer ID `00 03 45`). With no params (`zDZ`): dumps all active instrument state. With a filename (`zD/user/current/sketch.pyZ`): reads file and sends it. The filename is \"rest of message\": a trailing `Z` end-of-message marker is stripped, so interior capital-`Z` characters (e.g. `/user/ZFILE.py`) are preserved. Filenames whose last character is `Z` are not addressable. |\n| `zP`   | **TODO**| `exec` | string | Execute code on the host via `amy_external_exec_hook`. On AMYboard, runs the string as Python (e.g. `zPimport amyboard; amyboard.restart_sketch()`). Max 255 chars. The code string is \"rest of message\": a trailing `Z` end-of-message marker is stripped, so interior capital-`Z` characters in the code are preserved. Code whose last character is `Z` is not expressible. |\n| `zI`   | **TODO**| `ping` | (none) | Ping the host. Replies with a short sysex frame `F0 00 03 45 'O' 'K' F7` so the caller can confirm the board is alive and sysex is flowing. Handled entirely in pure C (no scheduler needed). |\n| `zB`   | **TODO**| `reboot` | uint (optional) | Reboot the host via `amy_external_reboot_hook`. Optional `mode` argument selects the post-reboot state: `zBZ` / `zB0Z` = bootloader mode (skip sketch on next boot), `zB1Z` = normal reboot (run sketch), `zB2Z` = ROM download / flash mode. Handled in pure C (no scheduler needed). On AMYboard, sets an RTC flag with the mode and calls `esp_restart()`. |\n"
  },
  {
    "path": "docs/arduino.md",
    "content": "# Arduino Setup for AMY\n\nAMY is on the Arduino Libraries repository. Simply search for \"AMY\" in the Library Manager and you should find us!\n\nYou can run AMY on many types of Arduino boards. The simplest way is to get our new [AMYboard](https://amyboard.com) which is only US$29 and has a lot of great built-in features. But AMY also runs great on \n - Any esp32, esp32-s3, esp32-p4 or esp32-c6\n - Teensy 4.x\n - Pi Pico RP2350 or RP2040\n\n<img src=\"https://github.com/shorepine/amy/raw/main/docs/arduino1.png\" width=\"400\"/>\n\nWe recommend always using the latest released version in the Arduino Library Manager. \n\nHowever, if you are directed to a bleeding edge release of AMY, you can simply copy this repository to your `Arduino/libraries` folder as `Arduino/libraries/amy`. (Make sure you delete whatever you already had in `libraries/amy`.)\n\nTo use AMY in Arduino, just `#include <AMY-Arduino.h>`. You need at a minimum the following code in your sketch, a call to `amy_start` with some options set in an `amy_config_t`, and then a call to `amy_update()` somewhere in your `loop()`. \n\n```c\n#include <AMY-Arduino.h>\n\nvoid setup() {\n  // .. in your setup ...\n  amy_config_t amy_config = amy_default_config();\n  // set your pins, etc -- see the AMY_MIDI_Synth example\n  amy_start(amy_config);\n}\n\nvoid loop() {\n  // Your loop() must contain this call to amy:\n  amy_update(); \n}\n```\n\nAMY in Arduino handles MIDI input and output as well as I2S and USB (where supported) audio. You do not need to set up an I2S interface, just the pins in `amy_config`.\n\n(For experts: if you're rendering AMY audio to your own audio hardware, you can set `amy_config.audio = AMY_AUDIO_IS_NONE` before calling `amy_start()`, then use the return value from `amy_update()` as a pointer to the next block of `AMY_BLOCK_SIZE` 16 bit stereo sample frames, to send out to whatever interface you set up.)\n\n[Please see our latest matrix of supported features per chip/board.](https://github.com/shorepine/amy/issues/354)\n\nWe ship a single example in the Examples folder for AMY called `AMY_MIDI_Synth`. It receives MIDI input and plays a Juno-6 patch 0 in response. should work on all our supported boards. Make sure you've installed the board support package for the board / chip you are using:\n\n * RP2040 / RP2350 / Pi Pico: [`arduino-pico`](https://arduino-pico.readthedocs.io/en/latest/install.html#installing-via-arduino-boards-manager)\n * Teensy: [`teensyduino`](https://www.pjrc.com/teensy/td_download.html)\n * ESP32 / ESP32-S3 / etc: [`arduino-esp32`](https://espressif-docs.readthedocs-hosted.com/projects/arduino-esp32/en/latest/installing.html)\n\nYou can use both cores of supported chips (RP2040, RP2350 or ESP32 variants) for more oscillators and voices.\n\nOnce you've confirmed AMY is running on your chip, read our [tutorial](tutorial.html) or our [getting started](../README.md) page on how to control AMY in Arduino:\n\n```c\n// Will play MIDI note 50 on patch 130\namy_event e = amy_default_event();\ne.osc = 0;\ne.patch_number = 130;\ne.velocity = 1;\ne.midi_note = 50;\ne.voices[0] = 0;\namy_add_event(&e);\n```\n\n## Recommended DAC / ADC configurations\n\nThe supported microcontrollers (excepting the Daisy, which is built in) use I2S as the default audio interface. I2S is a standard but some chips / boards may require setup beyond just wiring up the pins. For example, the [`WM8960`](https://www.waveshare.com/wiki/WM8960_Audio_HAT) and the `PCM9211` require registers to be set to route audio signals and amplification. \n\nWe can recommend simpler audio out DACs that \"just work\" with AMY with no extra setup:\n\n * [PCM5101 / PCM5102](https://www.amazon.com/dp/B0DCGF2TN1?th=1)\n * [UDA1334](https://www.adafruit.com/product/3678)\n\n\n### Audio input DACs\n\nHere's an example of a PCM1808 and PCM5101 working together to provide audio in and out for AMY on an ESP32S3:\n\n<img src=\"AMY-Arduino-ESP32S3_bb.png\" width=\"600\"/>\n\n\n## Per-board notes\n\n### AMYboard\n\nOur built-for-AMY board [AMYboard](https://amyboard.com) should just work out of the box. You can find AMYboard in the Boards list of the espressif arduino-esp32 package. See the specific [AMYboard Arduino details](https://github.com/shorepine/tulipcc/blob/main/docs/amyboard/arduino.md) for more information. \n\n### ESP32, ESP32-S3, ESP32-P4\n\nTested: Arduino IDE 2.3.6 (mac) + arduino-esp32 3.2.0\n\n\n### Teensy 4.0, 4.1\n\nTested: Arduino IDE 2.3.6 (mac) + [Teensy 1.59.0](https://www.pjrc.com/teensy/teensyduino.html)\n\nUSB audio and i2s audio output happen at the same time\n\nif you set USB Type to Audio, it will appear as a USB audio device on your computer, called \"AMY Synthesizer\"\n\nNote: USB audio from Teensy is fiddly and often slow to enumerate, i have to wait a minute or two before it shows up on my Mac. This seems to be unrelated to AMY. Please ask on the Teensy forums if you're having trouble with USB Audio. Once it is enumerated and running, it does seem stable.\n\nFor I2S, you have to use the default i2s1 pins. The pins you set in AMY config are ignored. That's `21 -> BLCK`, `20 -> LRC`, `DOUT -> 7`. This works with the [Teensy Audio Shield](https://www.pjrc.com/store/teensy3_audio.html) and the simpler [PT8211](https://www.pjrc.com/store/pt8211_kit.html). It will also work with other I2S DAC boards. \n\nFor UART MIDI, we use Serial8, the pins you set in AMY config are ignored. That's `MIDI_OUT -> 35`, `MIDI_IN -> 34`.\n\n\n\n### Pi Pico RP2040 and Pi Pico 2 RP2350\n\nTested: Arduino IDE 2.3.6 (mac)\n\nThe `i2s_lrc` pin has to be `i2s_bclk` + 1.\n\n\n### Electro-Smith Daisy Seed\n\nThe Daisy works great with AMY.  However, it does not work with the Arduino [DaisyDuino](https://daisy.audio/tutorials/arduino-dev-env/#welcome-to-daisyduino). The size of AMY plus the size of the DaisyDuino support exceeds the segment size that DaisyDuino currently supports. We hope they fix this! [See this thread for more information.](https://forum.electro-smith.com/t/arduino-how-to-use-512k-ram-area-for-program-space/4839). \n\nTo use your Daisy with AMY, [you first have to set up the C/C++ toolchain.](https://daisy.audio/tutorials/cpp-dev-env/#follow-along-with-the-video-guide)\n\nIt supports audio in, serial MIDI in, AMY sequencer.\n\nTo use, get our [amy_daisy.cpp](https://github.com/shorepine/amy/raw/main/daisy/amy_daisy.cpp) and [Makefile](https://github.com/shorepine/amy/raw/main/daisy/Makefile), set your location of AMY in the `Makefile`, then set up your Daisy dev environment, then put the board into DFU mode, and run\n\n```\nmake clean && make && make program-boot; sleep 1.5; make program-dfu\n```\n\nAfter it flashes, you should hear the AMY startup chime from the Daisy's line out.  If you have a MIDI serial interface hooked up to the Daisy (D14 USART1Rx) you should be able to play the default Juno synth on channel 1.\n\n"
  },
  {
    "path": "docs/billie_jean.md",
    "content": "# Making \"Billie Jean\" with AMY_Arduino\ndan.ellis@gmail.com 2025-11-03\n\nAMY is a music synthesizer library that allows you to generate studio-quality music with your microcontroller.  It consists of a flexible synthesis engine capable of analog synthesizer emulation, FM-style sounds, additive synthesis, etc., as well as higher-level functions like MIDI input and polyphonic voice management.  AMY can be controlled via a Micropython interface (it’s an important part of the [Tulip Creative Computer](https://tulip.computer)), but you can also drive it directly from C/C++.  This tutorial shows you how to use AMY from Arduino to generate music audio. It’s inspired by the “Billie Jean” example that Floyd Steinberg [demo’d on the original Alles](https://youtu.be/8CmcsQXHVEo?si=VAA65qPmHA-Fq4k9).\n\n## AMY Concepts\n\nAt the highest level, AMY provides a “synth” interface where you send note events and configuration commands to individual polyphonic synthesizers, which also automatically handle MIDI events if MIDI input is configured.\n\nEach synth manages a set of a specific number of “voices”; A voice can generate one note event at a time.  If the synth is configured with one voice, it is monophonic, so each successive note event changes its pitch.  But you can configure each synth to have more voices so it can play chords polyphonically.  The synth layer handles the reallocation of the voices (“voice stealing”) if there are too many active notes for the number of voices.\n\nA single voice consists of one or more “oscs” (oscillators).  Oscillators are the basic building block in AMY, and include a single waveform generator (oscillator with a specific waveform, PCM sample, or external audio input) along with modulation, filtering, etc.  Depending on your hardware and the complexity of processing, AMY can support more than 100 simultaneously-sounding oscillators, which might be configured as 12 analog synth voices, or six, 24-partial additive piano voices.\n\nEach osc within a voice may have a lot of individual parameters, but all the voices managed by a single synth will be identically configured, and you send the osc configuration commands to the synth, which then updates the oscs in all its voices.\n\nIt’s possible to directly address individual oscs and voices using the AMY interface, but in most cases it’s easiest to control AMY through the synth layer.\n\n## Playing a repeating pattern\n\n[Arduino Setup for AMY](https://github.com/shorepine/amy/blob/main/docs/arduino.md) covers configuring a microcontroller board to run AMY under the Arduino IDE.\n\nOnce you have that ready, you should see three sketches with names beginning `BillieJean` in the Arduino `Examples > AMY Synthesizer` submenu.  Open [BillieJeanDrums](https://github.com/shorepine/amy//blob/main/examples/BillieJeanDrums/BillieJeanDrums.ino), our first example sketch.  This sketch uses AMY to play a simple repeating drum pattern using AMY’s built-in PCM drum samples.\n\nThe `setup()` function configures and starts the AMY engine.  We select the `default_synths`, which includes emulation of a MIDI drum machine on synth 10:\n\n```C\n// BillieJeanDrums - Making a simple drum pattern with AMY.\n#include <AMY-Arduino.h>\n\nvoid setup() {\n  amy_config_t amy_config = amy_default_config();\n  amy_config.features.startup_bleep = 1;\n  // Install the default_synths on synths (MIDI chans) 1, 2, and 10.\n  amy_config.features.default_synths = 1;\n\n  amy_config.audio = AMY_AUDIO_IS_I2S;\n  // Pins for i2s board\n  amy_config.i2s_bclk = 8;\n  amy_config.i2s_lrc = 9;\n  amy_config.i2s_dout = 10;\n\n  amy_start(amy_config);\n}\n```\nNow AMY is ready to play notes in response to note-on events:\n```C\n    // Time to play the note.\n    amy_event e = amy_default_event();\n    e.synth = 10;  // drums channel\n    e.midi_note = midi_note;\n    e.velocity = velocity;\n    amy_add_event(&e);\n```\nThe `midi_note` is usually a number that sets the pitch of a note, using the MIDI convention where 60 is middle C, 61 is C#, etc.  For the drums channel, though, each note number corresponds to a different drum sound, so 35 is the bass drum, 42 is the closed hi-hat, etc.  The `velocity` is how “hard” the note is played, i.e. it determines how loud it is.  `amy_add_event()` is the main way to send commands (both note events and configuration) to AMY.\n\nTo play a drum pattern, we need to send a series of events to AMY to command each note event at the appropriate time.  We’ll need a table of data defining our desired pattern:\n\n```C\nstruct timed_note {\n  float start_time;  // In ticks\n  int note;\n  float velocity;\n};\n\n// 35 is kick, 37 is snare, 42 is closed hat, 46 is open hat\n// Notes must be sorted in start_time order.\ntimed_note notes[] = {\n  { 0.0, 42, 1.0},  //  0 HH + BD\n  { 0.0, 35, 1.0},\n  { 1.0, 42, 1.0},  //  1 HH\n  { 2.0, 42, 1.0},  //  2 HH + SN\n  { 2.0, 37, 1.0},\n  { 3.0, 42, 1.0},  //  3 HH\n  { 4.0, 42, 1.0},  //  4 HH + BD\n  { 4.0, 35, 1.0},\n  { 5.0, 42, 1.0},  //  5 HH\n  { 6.0, 42, 1.0},  //  6 HH + SN\n  { 6.0, 37, 1.0},\n  { 7.0, 46, 1.0},  //  7 OH\n};\n// Time (in ticks) at which we reset to the start of the table.\nfloat cycle_len = 8.0;\n```\n\nWe define a `timed_note` data structure to hold the time, the note number, and the velocity for each event, then we set up a table with a simple drum pattern using bass drum (kick), snare drum, and closed and open hi-hat.  The times of each event are specified in “ticks”, corresponding to a quarter-note in this 2 bar pattern.  We also specify that the pattern repeats after 8 ticks in `cycle_len`.  Note that there are multiple events at some times (0, 2, 4, 6 ticks).  Also notice that the table is sorted by `start_time` - this means we can step through it note by note without having to check for out-of-sequence notes.\n\nNow we can set up the loop to keep “tick” time and step through the note table, sending the note events to AMY at the appropriate times:\n\n```C\nfloat millis_per_tick = 250;\nfloat base_tick = 0;  // Time of beginning of current cycle.\n\nint note_tab_index = 0;\nint note_tab_len = sizeof(notes) / sizeof(timed_note);\n\nvoid loop() {\n  // Your loop() must contain this call to amy:\n  amy_update();\n\n  // Calculate \"tick time\" and choose note.\n  float tick_in_cycle = millis() / millis_per_tick - base_tick;\n  if (tick_in_cycle >= cycle_len) {\n    // Start the next cycle - reset the cycle base_tick, reset the note_tab index.\n    tick_in_cycle -= cycle_len;\n    base_tick += cycle_len;\n    note_tab_index = 0;\n  }\n```\n\n`millis_per_tick` sets the tempo of our pattern, setting the duration of each tick.  Here, we’ve defined a tick to be 250 milliseconds (a quarter of a second), for a 120 bpm feel.  In the `loop()` function, we calculate `tick_in_cycle` - the current time relative to the start of the current cycle - by scaling Arduino’s `millis()` counter by `millis_per_tick`, then subtracting `base_tick`, the absolute time, in ticks, of the start of the currently-playing cycle.  If `tick_in_cycle` is equal or larger than the `cycle_len`, we reset our index into the notes table, `note_tab_index`, to the beginning of the table, and move on the `base_tick` by one complete `cycle_len`.\n\nFinally, we send any note events from the table whose time has come:\n\n```C\n  // Play any notes for this moment from the note table.\n  while(note_tab_index < note_tab_len \n        && tick_in_cycle >= notes[note_tab_index].start_time) {\n    // Grab the note parameters\n    int midi_note = notes[note_tab_index].note;\n    float velocity = notes[note_tab_index].velocity;\n    // Time to play the note.\n    amy_event e = amy_default_event();\n    e.synth = 10;  // drums channel\n    e.midi_note = midi_note;\n    e.velocity = velocity;\n    amy_add_event(&e);\n    note_tab_index++;\n  }\n```\n\nAs long as our `note_tab_index` hasn’t run off the end of the table (as held in `note_tab_len`), and if the current `tick_in_cycle` is equal to or just past the `start_time` of that event from the table, we send an event with the corresponding `midi_note` and `velocity` to `amy_add_event()`, and move on to look at the next entry in the table by incrementing `note_tab_index`.\n\nThat’s it!  Running this sketch should immediately start a short drum pattern which will repeat indefinitely.\n\n## Adding another instrument\n\nDrums are great, but we need more.  Open the sketch [BillieJeanDrumsBass](https://github.com/shorepine/amy/blob/main/examples/BillieJeanDrumsBass/BillieJeanDrumsBass.ino) to see how we add the bass line.\n\nFirstly, we extend our setup to define `synth` 2 as a monophonic synth configured with one of the built-in Juno bass patches:\n\n```C\n  // Set up synth 2 as monophonic bass\n  amy_event e = amy_default_event();\n  e.synth = 2;\n  e.patch_number = 30;  // Juno A47 Funky I\n  e.num_voices = 1;\n  amy_add_event(&e);\n```\n\nWe’re now going to have multiple instruments in our table, so we add a `channel` field to our `timed_note` structure, and add the bass notes to the table:\n\n```C\nstruct timed_note {\n  float start_time;  // In ticks\n  int channel;       // 10 = drums, 2 = bass\n  int note;\n  float velocity;\n};\n\n// Notes must be sorted in start_time order.\ntimed_note notes[] = {\n  { 0.0, 2, 43, 0.2},   // bass G2\n  { 0.0, 10, 42, 1.0},  //  0 HH + BD\n  { 0.0, 10, 35, 1.0},\n  { 1.0, 2, 38, 0.2},   // bass D2\n  { 1.0, 10, 42, 1.0},  //  1 HH\n  { 2.0, 2, 41, 0.2},   // bass F2\n  { 2.0, 10, 42, 1.0},  //  2 HH + SN\n  { 2.0, 10, 37, 1.0},\n  { 3.0, 2, 43, 0.2},   // bass G2\n  { 3.0, 10, 42, 1.0},  //  3 HH\n  { 4.0, 2, 41, 0.2},   // bass F2\n  { 4.0, 10, 42, 1.0},  //  4 HH + BD\n  { 4.0, 10, 35, 1.0},\n  { 5.0, 2, 38, 0.2},   // bass D2\n  { 5.0, 10, 42, 1.0},  //  5 HH\n  { 6.0, 2, 36, 0.2},   // bass C2\n  { 6.0, 10, 42, 1.0},  //  6 HH + SN\n  { 6.0, 10, 37, 1.0},\n  { 7.0, 2, 38, 0.2},   // bass D2\n  { 7.0, 10, 46, 1.0},  //  7 OH\n};\n// Time (in ticks) at which we reset to the start of the table.\nfloat cycle_len = 8.0;\n```\n\nNow we simply modify the code that sends the AMY events to also read the channel (i.e., the synth to which the note is directed) from the table:\n\n```C\n  // Play any notes for this moment from the note table.\n  while(note_tab_index < note_tab_len \n        && tick_in_cycle >= notes[note_tab_index].start_time) {\n    // Time to play the note.\n    amy_event e = amy_default_event();\n    e.synth = notes[note_tab_index].channel;\n    e.midi_note = notes[note_tab_index].note;\n    e.velocity = notes[note_tab_index].velocity;\n    amy_add_event(&e);\n    note_tab_index++;\n  }\n```\n\nThat’s it.  Now we have both bass and drums.\n\n## Using the AMY scheduler\n\nSo far, we’ve been using AMY in “real time” - we time the note events by sending the `amy_add_event()` command just when we want the note to occur.  This is not always convenient or precise, so AMY includes a scheduler so you can specify exactly *when* your new event is supposed to occur.  Using the scheduler, we can send a bunch of note events all at once, including their timing, then sit back and wait as AMY works through the timeline - we don’t have to worry about implementing the timing in our `loop()` function.\n\nThe third version, [BillieJeanScheduled](https://github.com/shorepine/amy/blob/main/examples/BillieJeanScheduled/BillieJeanScheduled.ino), uses AMY scheduling.  Because we’re adding chords, we need to configure an additional synth.  And just to make it sound a little more like the original, we also turn on AMY’s built-in reverb:\n\n```C\n  // Reconfigure synth 1 as a 6-note polyphonic synth (for chords)\n  amy_event e = amy_default_event();\n  e.synth = 1;\n  e.patch_number = 5;  // Juno A16 Brass & Strings\n  e.num_voices = 6;\n  amy_add_event(&e);\n\n  // Reconfigure synth 2 as monophonic bass\n  e = amy_default_event();\n  e.synth = 2;\n  e.patch_number = 30;  // Juno A47 Funky I\n  e.num_voices = 1;\n  amy_add_event(&e);\n\n  // Turn on reverb\n  config_reverb(0.5f, 0.85f, 0.5f, 3000.0f);\n```\n\nThis version tells AMY exactly what time (in milliseconds) it wants each note to occur.  Because of this, we can send all the notes for an entire cycle at once (we could probably send an entire track at once, but for convenience we do it one cycle at a time), and we don’t have to worry about issuing them in order, so we can have different tables for the different instruments.  This means we don’t store the channel (synth) number in the table, but it also means we can specify the duration for the non-drum notes because we can also schedule note-offs for each note we send:\n\n```C\nstruct timed_note {\n  float start_time;  // In ticks\n  float duration;    // In ticks\n  int note;\n  float velocity;\n};\n\n// Cycle length (in ticks) for drums + bass\nfloat cycle_len = 8.0;\n\n// Drum notes have durations of 0 for no note-off\ntimed_note drum_notes[] = {\n  { 0.0, 0.0, 42, 1.0},  //  0 HH + BD\n  { 0.0, 0.0, 35, 1.0},\n  { 1.0, 0.0, 42, 1.0},  //  1 HH\n  { 2.0, 0.0, 42, 1.0},  //  2 HH + SN\n  { 2.0, 0.0, 37, 1.0},\n  { 3.0, 0.0, 42, 1.0},  //  3 HH\n  { 4.0, 0.0, 42, 1.0},  //  4 HH + BD\n  { 4.0, 0.0, 35, 1.0},\n  { 5.0, 0.0, 42, 1.0},  //  5 HH\n  { 6.0, 0.0, 42, 1.0},  //  6 HH + SN\n  { 6.0, 0.0, 37, 1.0},\n  { 7.0, 0.0, 46, 1.0},  //  7 OH\n};\n\ntimed_note bass_notes[] = {\n  { 0.0, 0.6, 43, 0.2},   // bass G2\n  { 1.0, 0.6, 38, 0.2},   // bass D2\n  { 2.0, 0.6, 41, 0.2},   // bass F2\n  { 3.0, 0.6, 43, 0.2},   // bass G2\n  { 4.0, 0.6, 41, 0.2},   // bass F2\n  { 5.0, 0.6, 38, 0.2},   // bass D2\n  { 6.0, 0.6, 36, 0.2},   // bass C2\n  { 7.0, 0.6, 38, 0.2},   // bass D2\n};\n\ntimed_note chord_notes[] = {\n  { 0.0, 0.2, 70, 1.0},  // Fmin:1\n  { 0.0, 0.2, 74, 1.0},\n  { 0.0, 0.2, 79, 1.0},\n  { 3.0, 0.2, 72, 1.0},  // Amin:1\n  { 3.0, 0.2, 76, 1.0},\n  { 3.0, 0.2, 81, 1.0},\n  { 8.0, 0.2, 74, 1.0},  // Bb:1\n  { 8.0, 0.2, 77, 1.0},\n  { 8.0, 0.2, 82, 1.0},\n  { 11.0, 0.2, 72, 1.0},  // Amin:1\n  { 11.0, 0.2, 76, 1.0},\n  { 11.0, 0.2, 81, 1.0},\n};\n```\n\nWe have a new function that takes an entire table of `timed_notes` along with a start time offset and a channel (synth), and schedules them all, including note-offs if the table includes nonzero note durations.  Note we reuse some fields in the `amy_event` structure.\n\n```C\nvoid schedule_notes(int time, int channel, struct timed_note *notes, int num_notes) {\n  amy_event e = amy_default_event();\n  e.synth = channel;\n  for (int i = 0; i < num_notes; ++i) {\n    e.midi_note = notes[i].note;\n    e.velocity = notes[i].velocity;\n    e.time = time + millis_per_tick * notes[i].start_time;\n    amy_add_event(&e);\n    // Add note-off too if duration > 0\n    if (notes[i].duration > 0) {\n      e.time += millis_per_tick * notes[i].duration;\n      e.velocity = 0;\n      amy_add_event(&e);\n    }\n  }\n}\n```\n\nNow the main `loop()` simply spins (while calling `amy_update()`) until the timing indicates that we’re beginning a new cycle of the music, then issues all the notes associated with that cycle as it begins.  We take advantage of this to gradually build the music, starting with the drums, then bringing in the bass, then finally the chords:\n\n```C\nint start_millis = 3000;\nint last_cycle = -1;\n\nvoid loop() {\n  // Let amy do its processing for this moment.\n  amy_update();\n\n  int now = millis();\n  int current_cycle = floor((now - start_millis) / (millis_per_tick * cycle_len));\n  if (current_cycle > last_cycle) {\n    // A new cycle began, issue notes.\n    // Drums\n    schedule_notes(now, 10, drum_notes, sizeof(drum_notes) / sizeof(timed_note));\n    // Bass comes in after two cycles of drums\n    if (current_cycle >= 2)\n      schedule_notes(now, 2, bass_notes, sizeof(bass_notes) / sizeof(timed_note));\n    // Chord sequence is 2 cycles long, so only schedule every other cycle\n    if ((current_cycle >= 4) && ((current_cycle % 2) == 0))\n      schedule_notes(now, 1, chord_notes, sizeof(chord_notes) / sizeof(timed_note));\n    last_cycle = current_cycle;\n  }\n}\n```\nAnd that’s really it!  We now have a program that generates a serviceable reproduction of the opening of Billie Jean using just AMY for all the instruments.\n"
  },
  {
    "path": "docs/chunk.py",
    "content": "\"\"\"Simple class to read IFF chunks.\n\nAn IFF chunk (used in formats such as AIFF, TIFF, RMFF (RealMedia File\nFormat)) has the following structure:\n\n+----------------+\n| ID (4 bytes)   |\n+----------------+\n| size (4 bytes) |\n+----------------+\n| data           |\n| ...            |\n+----------------+\n\nThe ID is a 4-byte string which identifies the type of chunk.\n\nThe size field (a 32-bit value, encoded using big-endian byte order)\ngives the size of the whole chunk, including the 8-byte header.\n\nUsually an IFF-type file consists of one or more chunks.  The proposed\nusage of the Chunk class defined here is to instantiate an instance at\nthe start of each chunk and read from the instance until it reaches\nthe end, after which a new instance can be instantiated.  At the end\nof the file, creating a new instance will fail with a EOFError\nexception.\n\nUsage:\nwhile True:\n    try:\n        chunk = Chunk(file)\n    except EOFError:\n        break\n    chunktype = chunk.getname()\n    while True:\n        data = chunk.read(nbytes)\n        if not data:\n            pass\n        # do something with data\n\nThe interface is file-like.  The implemented methods are:\nread, close, seek, tell, isatty.\nExtra methods are: skip() (called by close, skips to the end of the chunk),\ngetname() (returns the name (ID) of the chunk)\n\nThe __init__ method has one required argument, a file-like object\n(including a chunk instance), and one optional argument, a flag which\nspecifies whether or not chunks are aligned on 2-byte boundaries.  The\ndefault is 1, i.e. aligned.\n\"\"\"\n\nclass Chunk:\n    def __init__(self, file, align=True, bigendian=True, inclheader=False):\n        import struct\n        self.closed = False\n        self.align = align      # whether to align to word (2-byte) boundaries\n        if bigendian:\n            strflag = '>'\n        else:\n            strflag = '<'\n        self.file = file\n        self.chunkname = file.read(4)\n        if len(self.chunkname) < 4:\n            raise EOFError\n        try:\n            data = file.read(4)\n            self.chunksize = struct.unpack(strflag+'L', data)[0]\n        except:# struct.error:\n            raise EOFError\n        if inclheader:\n            self.chunksize = self.chunksize - 8 # subtract header\n        self.size_read = 0\n        try:\n            self.offset = self.file.tell()\n        except:\n            self.seekable = False\n        else:\n            self.seekable = True\n\n    def getname(self):\n        \"\"\"Return the name (ID) of the current chunk.\"\"\"\n        return self.chunkname\n\n    def getsize(self):\n        \"\"\"Return the size of the current chunk.\"\"\"\n        return self.chunksize\n\n    def close(self):\n        if not self.closed:\n            self.skip()\n            self.closed = True\n\n    def isatty(self):\n        if self.closed:\n            raise ValueError(\"I/O operation on closed file\")\n        return False\n\n    def seek(self, pos, whence=0):\n        \"\"\"Seek to specified position into the chunk.\n        Default position is 0 (start of chunk).\n        If the file is not seekable, this will result in an error.\n        \"\"\"\n\n        if self.closed:\n            raise ValueError(\"I/O operation on closed file\")\n        if not self.seekable:\n            raise OSError(\"cannot seek\")\n        if whence == 1:\n            pos = pos + self.size_read\n        elif whence == 2:\n            pos = pos + self.chunksize\n        if pos < 0 or pos > self.chunksize:\n            raise RuntimeError\n        self.file.seek(self.offset + pos, 0)\n        self.size_read = pos\n\n    def tell(self):\n        if self.closed:\n            raise ValueError(\"I/O operation on closed file\")\n        return self.size_read\n\n    def read(self, size=-1):\n        \"\"\"Read at most size bytes from the chunk.\n        If size is omitted or negative, read until the end\n        of the chunk.\n        \"\"\"\n\n        if self.closed:\n            raise ValueError(\"I/O operation on closed file\")\n        if self.size_read >= self.chunksize:\n            return ''\n        if size < 0:\n            size = self.chunksize - self.size_read\n        if size > self.chunksize - self.size_read:\n            size = self.chunksize - self.size_read\n        data = self.file.read(size)\n        self.size_read = self.size_read + len(data)\n        if self.size_read == self.chunksize and \\\n           self.align and \\\n           (self.chunksize & 1):\n            dummy = self.file.read(1)\n            self.size_read = self.size_read + len(dummy)\n        return data\n\n    def skip(self):\n        \"\"\"Skip the rest of the chunk.\n        If you are not interested in the contents of the chunk,\n        this method should be called so that the file points to\n        the start of the next chunk.\n        \"\"\"\n\n        if self.closed:\n            raise ValueError(\"I/O operation on closed file\")\n        if self.seekable:\n            try:\n                n = self.chunksize - self.size_read\n                # maybe fix alignment\n                if self.align and (self.chunksize & 1):\n                    n = n + 1\n                self.file.seek(n, 1)\n                self.size_read = self.size_read + n\n                return\n            except OSError:\n                pass\n        while self.size_read < self.chunksize:\n            n = min(8192, self.chunksize - self.size_read)\n            dummy = self.read(n)\n            if not dummy:\n                raise EOFError\n"
  },
  {
    "path": "docs/enable-threads.js",
    "content": "// NOTE: This file creates a service worker that cross-origin-isolates the page (read more here: https://web.dev/coop-coep/) which allows us to use wasm threads.\n// Normally you would set the COOP and COEP headers on the server to do this, but Github Pages doesn't allow this, so this is a hack to do that.\n\n/* Edited version of: coi-serviceworker v0.1.6 - Guido Zuidhof, licensed under MIT */\n// From here: https://github.com/gzuidhof/coi-serviceworker\nif(typeof window === 'undefined') {\n  self.addEventListener(\"install\", () => self.skipWaiting());\n  self.addEventListener(\"activate\", e => e.waitUntil(self.clients.claim()));\n\n  async function handleFetch(request) {\n    if(request.cache === \"only-if-cached\" && request.mode !== \"same-origin\") {\n      return;\n    }\n    \n    if(request.mode === \"no-cors\") { // We need to set `credentials` to \"omit\" for no-cors requests, per this comment: https://bugs.chromium.org/p/chromium/issues/detail?id=1309901#c7\n      request = new Request(request.url, {\n        cache: request.cache,\n        credentials: \"omit\",\n        headers: request.headers,\n        integrity: request.integrity,\n        destination: request.destination,\n        keepalive: request.keepalive,\n        method: request.method,\n        mode: request.mode,\n        redirect: request.redirect,\n        referrer: request.referrer,\n        referrerPolicy: request.referrerPolicy,\n        signal: request.signal,\n      });\n    }\n    \n    let r = await fetch(request).catch(e => console.error(e));\n    \n    if(r.status === 0) {\n      return r;\n    }\n\n    const headers = new Headers(r.headers);\n    headers.set(\"Cross-Origin-Embedder-Policy\", \"require-corp\"); // or: require-corp\n    headers.set(\"Cross-Origin-Opener-Policy\", \"same-origin\");\n    \n    return new Response(r.body, { status: r.status, statusText: r.statusText, headers });\n  }\n\n  self.addEventListener(\"fetch\", function(e) {\n    e.respondWith(handleFetch(e.request)); // respondWith must be executed synchonously (but can be passed a Promise)\n  });\n  \n} else {\n  (async function() {\n    if(window.crossOriginIsolated !== false) return;\n\n    let registration = await navigator.serviceWorker.register(window.document.currentScript.src).catch(e => console.error(\"COOP/COEP Service Worker failed to register:\", e));\n    if(registration) {\n      console.log(\"COOP/COEP Service Worker registered\", registration.scope);\n\n      registration.addEventListener(\"updatefound\", () => {\n        console.log(\"Reloading page to make use of updated COOP/COEP Service Worker.\");\n        window.location.reload();\n      });\n\n      // If the registration is active, but it's not controlling the page\n      if(registration.active && !navigator.serviceWorker.controller) {\n        console.log(\"Reloading page to make use of COOP/COEP Service Worker.\");\n        window.location.reload();\n      }\n    }\n  })();\n}\n\n// Code to deregister:\n// let registrations = await navigator.serviceWorker.getRegistrations();\n// for(let registration of registrations) {\n//   await registration.unregister();\n// }"
  },
  {
    "path": "docs/godot.md",
    "content": "# AMY in Godot\n\nThe AMY synthesizer engine works as a [GDExtension](https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/index.html) addon for Godot 4.3+, with support for both **native** (macOS, Linux, Windows) and **web** exports.\n\nOn native platforms, AMY runs as a C library via GDExtension and routes audio through Godot's `AudioStreamGenerator`. On web, AMY runs its own WASM module with AudioWorklet and the GDScript wrapper sends wire messages via `JavaScriptBridge`.\n\n## Quick Start\n\n### Option A: Download pre-built addon (easiest)\n\nDownload [`amy-godot-addon.zip`](https://github.com/shorepine/amy/releases/latest/download/amy-godot-addon.zip) and unzip it into your Godot project root so you have `your_project/addons/amy/`.\n\nOn **macOS**, you need to remove the quarantine flag from the downloaded binary:\n\n```bash\nxattr -dr com.apple.quarantine addons/amy/bin/*\n```\n\nIf you don't do this, you'll see a Godot error like \"Apple could not verify 'libamy.macos.template_debug.universal.dylib' is free of malware that may harm your Mac or compromise your privacy.\" This command tells macOS you've chosen to trust the software yourself.\n\n### Option B: Build from source\n\nClone AMY and [godot-cpp](https://github.com/godotengine/godot-cpp), then run the setup script:\n\n```bash\ngit clone https://github.com/shorepine/amy.git\ncd amy\n\n# Clone godot-cpp next to your project (or wherever you like)\ngit clone --branch godot-4.4-stable https://github.com/godotengine/godot-cpp.git ../godot-cpp\n\n# Build the addon and install it into your Godot project\n./setup_godot.sh /path/to/your/godot/project\n```\n\nThe script builds the native GDExtension library and copies everything into `your_project/addons/amy/`.\n\nIf you want to point to a `godot-cpp` checkout in a different location:\n\n```bash\nGODOT_CPP_PATH=/path/to/godot-cpp ./setup_godot.sh /path/to/your/godot/project\n```\n\n### 2. Open the project in the Godot editor\n\nOpen or reimport the project so Godot registers the `Amy` class.\n\n### 3. Use AMY in your scripts\n\n```gdscript\nvar amy: Amy\n\nfunc _ready():\n    amy = Amy.new()\n    add_child(amy)\n    await get_tree().process_frame  # let AMY initialize\n\n    # Play a 440 Hz sine wave\n    amy.send({\"osc\": 0, \"wave\": Amy.SINE, \"freq\": 440, \"vel\": 1.0})\n\n    # Play a MIDI note on a triangle wave\n    amy.send({\"osc\": 1, \"wave\": Amy.TRIANGLE, \"note\": 60, \"vel\": 0.5})\n\n    # Stop oscillator 0\n    amy.send({\"osc\": 0, \"vel\": 0})\n\n    # Use a patch (preset instrument)\n    amy.send({\"synth\": 1, \"patch\": 1, \"num_voices\": 6, \"note\": 48, \"vel\": 0.8})\n\n    # Or use wire protocol directly\n    amy.send_raw(\"v3w0f880l0.5\")\n```\n\n### 4. Configure AMY (optional)\n\nSet [config properties](api.md)  on the `Amy` node **before** adding it to the tree:\n\n```gdscript\nvar amy: Amy\n\nfunc _ready():\n    amy = Amy.new()\n    amy.startup_bleep = false\n    amy.default_synths = true\n    add_child(amy)  # config is applied when AMY starts in _ready()\n```\n\n## Web Export\n\nAMY works on web exports. The native GDExtension isn't used on web — instead, AMY's pre-built WASM module runs via JavaScript and the `Amy` class automatically switches to using `JavaScriptBridge`.\n\n### Setup steps\n\n1. **Run the install script** in the Godot editor:\n   - Open `addons/amy/install.gd` in the Script Editor\n   - Run it via **File > Run** (or `Ctrl/Cmd+Shift+X`)\n   - This copies web audio files to the right locations\n\n2. **Configure the web export preset**:\n   - Open **Project > Export > Web**\n   - Set **Custom HTML Shell** to `res://export/custom_shell.html`\n   - Set **Exclude Filter** to `addons/amy/bin/*,addons/amy/src/*,addons/amy/amy_src/*,addons/amy/web/*,addons/amy/SConstruct,addons/amy/install.gd,addons/amy/amy.gdextension` (exclude native libraries and build files, but keep `amy.gd`)\n\n3. **Export to a separate folder** (e.g. `dist/` inside your project):\n   - Click **Export Project** and save the `.html` file into a new folder (e.g. `dist/YourGame.html`)\n   - Godot will place all its export files there automatically\n\n4. **Copy AMY's web audio files** into the export folder:\n   ```bash\n   cp -r addons/amy/web/ dist/web_audio/\n   cp addons/amy/web/enable-threads.js dist/\n   ```\n\n5. **Deploy** — upload the contents of `dist/` to your web server. The folder should contain:\n   ```\n   YourGame.html                       # main page\n   YourGame.js                         # Godot engine\n   YourGame.wasm                       # Godot WASM binary\n   YourGame.pck                        # packed game assets\n   YourGame.audio.worklet.js           # Godot audio worklet\n   YourGame.audio.position.worklet.js  # Godot audio position worklet\n   enable-threads.js                   # COOP/COEP service worker for AudioWorklet support\n   web_audio/                          # AMY audio engine\n     amy.js\n     amy.wasm\n     amy.aw.js\n     amy.ww.js\n     godot_amy_bridge.js\n     enable-threads.js\n   ```\n\nOr run locally: `python3 -m http.server` from your `dist`  folder and go to `localhost:8000`.\n\n\n## How It Works\n\n- **Native (macOS/Linux/Windows):** AMY runs as a GDExtension (`AmySynth` C++ class) compiled with `-DAMY_NO_MINIAUDIO` and `AMY_AUDIO_IS_NONE`. Audio is rendered via `amy_simple_fill_buffer()` and routed through Godot's `AudioStreamGenerator` at 44100 Hz.\n\n- **Web:** AMY runs as its own WASM module with Web Audio API AudioWorklets. The `Amy` GDScript class detects `OS.get_name() == \"Web\"` and sends wire messages via `JavaScriptBridge` instead of the native extension.\n\n\n## API Reference\n\n### `amy.send(params: Dictionary)`\n\nSend a message to AMY using named parameters. This mirrors AMY's Python API — the parameter names are the same as `amy.send()` in Python.\n\n**Common parameters:**\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `osc` | int | Oscillator number (0-63) |\n| `wave` | int | Wave type (use constants like `Amy.SINE`) |\n| `freq` | float | Frequency in Hz |\n| `note` | int/float | MIDI note number |\n| `vel` | float | Velocity / volume (0.0 = off, 1.0 = max) |\n| `amp` | float | Amplitude |\n| `duty` | float | Pulse width duty cycle |\n| `pan` | float | Stereo panning |\n| `patch` | int | Preset patch number |\n| `filter_freq` | float | Filter cutoff frequency |\n| `filter_type` | int | Filter type (use `Amy.FILTER_LPF` etc.) |\n| `resonance` | float | Filter resonance / Q |\n| `feedback` | float | FM feedback amount |\n| `ratio` | float | FM frequency ratio |\n| `algorithm` | int | FM algorithm number |\n| `bp0` | string | Breakpoint envelope 0 (time,val pairs) |\n| `bp1` | string | Breakpoint envelope 1 |\n| `volume` | float | Global volume |\n| `tempo` | float | Sequencer tempo in BPM |\n| `chorus` | string | Chorus settings |\n| `reverb` | string | Reverb settings |\n| `echo` | string | Echo/delay settings |\n\nSee the full [AMY API reference](api.md) for all available parameters.\n\n### `amy.send_raw(msg: String)`\n\nSend a raw AMY wire-protocol message (e.g. `\"v0w0f440l1\"`).\n\n### `amy.panic()`\n\nStop all sound immediately.\n\n### Constants\n\n**Wave types:** `Amy.SINE`, `Amy.PULSE`, `Amy.SAW_DOWN`, `Amy.SAW_UP`, `Amy.TRIANGLE`, `Amy.NOISE`, `Amy.KS`, `Amy.PCM`, `Amy.ALGO`, `Amy.PARTIAL`, `Amy.WAVETABLE`, `Amy.CUSTOM`, `Amy.WAVE_OFF`\n\n**Filter types:** `Amy.FILTER_NONE`, `Amy.FILTER_LPF`, `Amy.FILTER_BPF`, `Amy.FILTER_HPF`, `Amy.FILTER_LPF24`\n\n**Envelope types:** `Amy.ENVELOPE_NORMAL`, `Amy.ENVELOPE_LINEAR`, `Amy.ENVELOPE_DX7`, `Amy.ENVELOPE_TRUE_EXPONENTIAL`\n"
  },
  {
    "path": "docs/index.html",
    "content": "<!-- thank you to https://github.com/elf-audio/cpp-to-webaudio-example -->\n<!doctype html>\n<html lang=\"en-us\">\n    <head>\n        <meta charset=\"utf-8\">\n        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n        <title>AMY web examples</title>\n        <link href=\"https://fonts.googleapis.com/css?family=Quicksand:500\" rel=\"stylesheet\">\n        <link href=\"style.css\" rel=\"stylesheet\">\n        </script>\n    </head>\n    <body>\n        <div id=\"content\">\n            <h2>AMY - A high-performance fixed-point Music synthesizer librarY for microcontrollers</h2>\n            <P>Try out some <A href=\"https://github.com/shorepine/amy\">AMY</A> examples on the web\n            <hr/>\n            <h2>AMY JavaScript REPL</h2>\n            <p><A HREF=\"repl.html\">Try AMY with JavaScript — write and run <code>amy_send()</code> commands live</A>\n            <h2>AMY interactive tutorial</h2>\n            <p><A HREF=\"tutorial.html\">Python interactive AMY tutorial</A>\n            <h2>Minimal AMY web synth</h2>\n            <p><A HREF=\"minimal.html\">All you need to boot a synthesizer</A>\n            <h2>Try Tulip voices app</h2>\n            <p><A HREF=\"https://tulip.computer/run/?fn=&share=H4sIAAAAAAAAEysqzdNQKsvPTE4tVtIEAPbV%2FcINAAAA&run=true\">Try AMY voices with a UI on the web</A>\n            <h2>Try Tulip drums app</h2>\n            <p><A HREF=\"https://tulip.computer/run/?fn=&share=H4sIAAAAAAAAEyspzcks0CsqzdNQTykqzS1W1%2BQCAJKcoU8TAAAA&run=true\">Try the AMY sampler on the web</A>\n            <h2>Read about our piano voice in an interactive Python REPL</h2>\n            <P><A HREF=\"piano.html\">See a great blog post about our additive piano voice with live code.</A>\n        </div>\n    </body>  \n</html>\n"
  },
  {
    "path": "docs/juno_patches.md",
    "content": "# Understanding Juno Patches\n\n[AMY](https://github.com/shorepine/amy) can be used to simulate many analog synthesizers, and it comes pre-installed with emulations\nof the 128 factory patches that came with the Juno-60 (the first MIDI-enabled Juno).  This page explains how the Juno patches work, both\nfor users who want to modify or manipulate Juno patches, but also as a case-study in how complex voices can be built from basic AMY\noscillators.\n\nYou may also want to look at the page on [AMY Synthesizer Details](synth.md) for a more detailed introduction of oscs, voices, synths, and parameters in AMY.\n\n## Juno patches\n\nYou can quickly configure a polyphonic Juno synthesizer by loading one of the Juno patches:\n\n```python\n# Load the Juno A12 Brass Swell patch onto synth 1 with 6-note polyphony\namy.send(synth=1, num_voices=6, patch=1)\n# Play a C major chord\namy.send(synth=1, note=60, vel=1)\namy.send(synth=1, note=64, vel=1)\namy.send(synth=1, note=67, vel=1)\n# Stop the chord\namy.send(synth=1, vel=0)  # velocity of zero with no note means 'all notes off'\n```\n\nThe `patch` argument refers to a set of \"wire command strings\" in [patches.h](https://github.com/shorepine/amy/blob/main/src/patches.h).\n(That file is itself written by [headers.py](https://github.com/shorepine/amy/blob/main/amy/headers.py),\nwhich uses [juno.py](https://github.com/shorepine/amy/blob/main/amy/juno.py) to translate the original Juno SYSEX strings into AMY commands).\nThe wire string for patch 1 is:\n```\nv1w4a1,,0,1Z\nv0w20c2L1G4Z\nv2w1c3L1Z\nv3w3c4L1Z\nv4w1c5L1Z\nv5w5L1Z\nv1f0.609A148,1.0,10000,0Z\nv2a0.001,0,0,0,0,0f440,1,,,,0,1d0.72,,,,,0m0Z\nv3a1,0,0,0,0,0f440,1,,,,0,1m0Z\nv4a0.551,0,0,0,0,0f220,1,,,,0,1m0Z\nv5a0.001,0,0,0,0,0Z\nv0F300.23,0.661,,2.252,0,0R1.015Z\nv0a0.591,,1,1,0A518,1,83561,0.299,310,0Z\nx7,-3,-3k1,,0.5,0.5Z\"\n```\nWire strings consist of one or two-letter commands followed by an argument (documented on the [API page](api.md)),\noften a single numerical value, or a comma-separated list.\n`Z` is a separator, so I've broken the string into separate `Z`-terminated phrases; the stored string does not include any line breaks.\nAll the settings in a single, `Z`-separated phrase apply to a single osc as specified (or zero by default; some commands like EQ and chorus\napply to all oscs at once, so no osc needs to be indicated).\nBut even broken up this way, the command strings are not very readable.  However, each command phrase is equivalent to a single `amy.send()`\ncommand in the Python interface.  Thus, the wire strings above correspond to:\n```Python\namy.send(osc=1, wave=amy.TRIANGLE, amp={'const':1, 'vel': 0, 'eg0': 1})\namy.send(osc=0, wave=amy.SILENT, chained_osc=2, mod_source=1, filter_type=amy.FILTER_LPF24)\namy.send(osc=2, wave=amy.PULSE, chained_osc=3, mod_source=1)\namy.send(osc=3, wave=amy.SAW_UP, chained_osc=4, mod_source=1)\namy.send(osc=4, wave=amy.PULSE, chained_osc=5, mod_source=1)\namy.send(osc=5, wave=amy.NOISE, mod_source=1)\namy.send(osc=1, freq=0.609, bp1='148,1.0,10000,0')\namy.send(osc=2, amp={'const': 0.001, 'note': 0, 'vel': 0, 'eg0': 0, 'eg1': 0, 'mod': 0'},\n         freq={'const': 440, 'note': 1, 'mod': 0, 'bend': 1}, duty={'const': 0.72, 'mod': 0}, portamento=0)\namy.send(osc=3, amp={'const': 1, 'note': 0, 'vel': 0, 'eg0': 0, 'eg1': 0, 'mod': 0'},\n         freq={'const': 440, 'note': 1, 'mod': 0, 'bend': 1}, portamento=0)\namy.send(osc=4, amp={'const': 0.551, 'note': 0, 'vel': 0, 'eg0': 0, 'eg1': 0, 'mod': 0'},\n         freq={'const': 220, 'note': 1, 'mod': 0, 'bend': 1}, portamento=0)\namy.send(osc=5, amp={'const': 0.001, 'note': 0, 'vel': 0, 'eg0': 0, 'eg1': 0, 'mod': 0'})\namy.send(osc=0, amp={'const': 0.591, 'vel': 1, 'eg0': 1, 'eg1': 0}, bp0='518,1,83561,0.299,310,0')\namy.send(eq='7,-3,-3', chorus='1,,0.5,0.5')\n```\nNow we can begin to understand how this patch works.  The patch consists of six oscs:\n\n* Osc 0 is the `SILENT` osc, a special osc with gathers the summed outputs of all the oscs connected to it via a `chained_osc` chain.\n  The first osc in its chain is 2.\n* Osc 1 is the LFO: It has a `TRIANGLE` waveform and a frequency of 0.609 Hz\n* Osc 2 (which is part of the chain starting with osc 0) has a `PULSE` waveform and continues the chain with osc 3.\nHowever it also a `const` term in its amplitude (`amp`) of 0.001, or -60 dB relative to 1.0, which makes it inaudible.\n* Osc 3 is a `SAW` (sawtooth), and chains forward to osc 4.\n* Osc 4 is another `PULSE` oscillator, but with a base frequency of 220 Hz, in contrast to the 440 Hz of oscs 2 and 3.  It chains forward to osc 5.\n* Osc 5 has a `NOISE` waveform.  Its amp is also 0.001, i.e. silenced.\n\nOscs 2-5 correspond to the four waveform sources on the Juno: pulse/PWM, sawtooth, subosc (pulse one octave below), and noise.\n\nWe see a chain: Osc 0 > Osc 2 > Osc 3 > Osc 4 > Osc 5.  \"Chaining\" is a convenience to allow a single note-on/off event to be passed to multiple\noscs in a single event.  So `note` and `vel` parameters sent to osc 0 will propagate down the chain until all of oscs 2-5 see the same event.\n\n`SILENT` oscs, such as osc 0, are special-cases that gather the summed waveforms of all their chained oscs, then apply a single amplitude envelope\n(`bp0`, which contributes to `amp` via the `eg0` coefficient) and a filter (`filter_type`).  We *could* put filters and envelopes\non each osc indidually before they get summed through the chain, but its more efficient to do it once after summing the waveforms, since,\nfor a Juno, all oscillator waveforms are subject to the same envelope and filtering.\n\nEach of the \"sounding\" oscs, 2-5, has its overall level set by its `amp['const']` coefficient, but no amplitude envelope or velocity scaling\n(since the envelope and velocity scaling are applied by osc 0).\n\nThe LFO, osc 1, is connected to each of the sounding oscs by their `mod_source` argument.  However, in this patch neither pitch, PWM duty,\nor filter frequency, are influenced by the LFO, because in each case their `mod` coefficients are zero.  The LFO does have an amplitude\nenvelope provided by `bp0`: it fades in over 148 ms (called 'LFO Delay Time' on the original Junos), then decays over 10 seconds, which stands in\nfor endless sustain.  Modulation oscs (i.e., those named as `mod_source` by some other osc) receive note-on events when the oscs they are modulating\nreceive note-ons.\n\nThe pitched sounding oscs, 2-4, have `portamento` time (in ms) set to 0, i.e., there's no pitch-slide portamento.\n\nFinally, the patch sets stationary EQ, in this case with a 7 dB boost for the low band, and -3 dB for the mid and high bands.  The chorus is\nmixed at full amplitude (1), with 0.5 Hz modulating and a delay modulation depth of 0.5 of its maximum length.  This corresponds to mode I of\nthe Juno chorus.\n\nAll Juno patches have the same structure, and vary only in the values of their parameters, corresponding more or less to the positioning of the\nsliders on the original Juno front-panel.\n\nNote that the commands above address explicit osc numbers.  But when used to set up a synth (e.g., by including `synth=1` in each `amy.send()`),\nthe commands refer to an osc relative to the base osc for each voice of the synth, and are thus applied to `num_voices` distinct oscs, one\nwithin each voice of the synth.\n"
  },
  {
    "path": "docs/micropython.mjs",
    "content": "// This code implements the `-sMODULARIZE` settings by taking the generated\n// JS program code (INNER_JS_CODE) and wrapping it in a factory function.\n\n// When targetting node and ES6 we use `await import ..` in the generated code\n// so the outer function needs to be marked as async.\nasync function _createMicroPythonModule(moduleArg = {}) {\n  var moduleRtn;\n\n// include: shell.js\n// include: minimum_runtime_check.js\n(function() {\n  // \"30.0.0\" -> 300000\n  function humanReadableVersionToPacked(str) {\n    str = str.split('-')[0]; // Remove any trailing part from e.g. \"12.53.3-alpha\"\n    var vers = str.split('.').slice(0, 3);\n    while(vers.length < 3) vers.push('00');\n    vers = vers.map((n, i, arr) => n.padStart(2, '0'));\n    return vers.join('');\n  }\n  // 300000 -> \"30.0.0\"\n  var packedVersionToHumanReadable = n => [n / 10000 | 0, (n / 100 | 0) % 100, n % 100].join('.');\n\n  var TARGET_NOT_SUPPORTED = 2147483647;\n\n  // Note: We use a typeof check here instead of optional chaining using\n  // globalThis because older browsers might not have globalThis defined.\n  var currentNodeVersion = typeof process !== 'undefined' && process.versions?.node ? humanReadableVersionToPacked(process.versions.node) : TARGET_NOT_SUPPORTED;\n  if (currentNodeVersion < 160000) {\n    throw new Error(`This emscripten-generated code requires node v${ packedVersionToHumanReadable(160000) } (detected v${packedVersionToHumanReadable(currentNodeVersion)})`);\n  }\n\n  var userAgent = typeof navigator !== 'undefined' && navigator.userAgent;\n  if (!userAgent) {\n    return;\n  }\n\n  var currentSafariVersion = userAgent.includes(\"Safari/\") && !userAgent.includes(\"Chrome/\") && userAgent.match(/Version\\/(\\d+\\.?\\d*\\.?\\d*)/) ? humanReadableVersionToPacked(userAgent.match(/Version\\/(\\d+\\.?\\d*\\.?\\d*)/)[1]) : TARGET_NOT_SUPPORTED;\n  if (currentSafariVersion < 150000) {\n    throw new Error(`This emscripten-generated code requires Safari v${ packedVersionToHumanReadable(150000) } (detected v${currentSafariVersion})`);\n  }\n\n  var currentFirefoxVersion = userAgent.match(/Firefox\\/(\\d+(?:\\.\\d+)?)/) ? parseFloat(userAgent.match(/Firefox\\/(\\d+(?:\\.\\d+)?)/)[1]) : TARGET_NOT_SUPPORTED;\n  if (currentFirefoxVersion < 79) {\n    throw new Error(`This emscripten-generated code requires Firefox v79 (detected v${currentFirefoxVersion})`);\n  }\n\n  var currentChromeVersion = userAgent.match(/Chrome\\/(\\d+(?:\\.\\d+)?)/) ? parseFloat(userAgent.match(/Chrome\\/(\\d+(?:\\.\\d+)?)/)[1]) : TARGET_NOT_SUPPORTED;\n  if (currentChromeVersion < 85) {\n    throw new Error(`This emscripten-generated code requires Chrome v85 (detected v${currentChromeVersion})`);\n  }\n})();\n\n// end include: minimum_runtime_check.js\n// The Module object: Our interface to the outside world. We import\n// and export values on it. There are various ways Module can be used:\n// 1. Not defined. We create it here\n// 2. A function parameter, function(moduleArg) => Promise<Module>\n// 3. pre-run appended it, var Module = {}; ..generated code..\n// 4. External script tag defines var Module.\n// We need to check if Module already exists (e.g. case 3 above).\n// Substitution will be replaced with actual code on later stage of the build,\n// this way Closure Compiler will not mangle it (e.g. case 4. above).\n// Note that if you want to run closure, and also to use Module\n// after the generated code, you will need to define   var Module = {};\n// before the code. Then that object will be used in the code, and you\n// can continue to use Module afterwards as well.\nvar Module = moduleArg;\n\n// Determine the runtime environment we are in. You can customize this by\n// setting the ENVIRONMENT setting at compile time (see settings.js).\n\n// Attempt to auto-detect the environment\nvar ENVIRONMENT_IS_WEB = !!globalThis.window;\nvar ENVIRONMENT_IS_WORKER = !!globalThis.WorkerGlobalScope;\n// N.b. Electron.js environment is simultaneously a NODE-environment, but\n// also a web environment.\nvar ENVIRONMENT_IS_NODE = globalThis.process?.versions?.node && globalThis.process?.type != 'renderer';\nvar ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;\n\nif (ENVIRONMENT_IS_NODE) {\n  // When building an ES module `require` is not normally available.\n  // We need to use `createRequire()` to construct the require()` function.\n  const { createRequire } = await import('module');\n  /** @suppress{duplicate} */\n  var require = createRequire(import.meta.url);\n\n}\n\n// --pre-jses are emitted after the Module integration code, so that they can\n// refer to Module (if they choose; they can also define Module)\n\n\nvar arguments_ = [];\nvar thisProgram = './this.program';\nvar quit_ = (status, toThrow) => {\n  throw toThrow;\n};\n\nvar _scriptName = import.meta.url;\n\n// `/` should be present at the end if `scriptDirectory` is not empty\nvar scriptDirectory = '';\nfunction locateFile(path) {\n  if (Module['locateFile']) {\n    return Module['locateFile'](path, scriptDirectory);\n  }\n  return scriptDirectory + path;\n}\n\n// Hooks that are implemented differently in different runtime environments.\nvar readAsync, readBinary;\n\nif (ENVIRONMENT_IS_NODE) {\n  const isNode = globalThis.process?.versions?.node && globalThis.process?.type != 'renderer';\n  if (!isNode) throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');\n\n  // These modules will usually be used on Node.js. Load them eagerly to avoid\n  // the complexity of lazy-loading.\n  var fs = require('fs');\n\n  if (_scriptName.startsWith('file:')) {\n    scriptDirectory = require('path').dirname(require('url').fileURLToPath(_scriptName)) + '/';\n  }\n\n// include: node_shell_read.js\nreadBinary = (filename) => {\n  // We need to re-wrap `file://` strings to URLs.\n  filename = isFileURI(filename) ? new URL(filename) : filename;\n  var ret = fs.readFileSync(filename);\n  assert(Buffer.isBuffer(ret));\n  return ret;\n};\n\nreadAsync = async (filename, binary = true) => {\n  // See the comment in the `readBinary` function.\n  filename = isFileURI(filename) ? new URL(filename) : filename;\n  var ret = fs.readFileSync(filename, binary ? undefined : 'utf8');\n  assert(binary ? Buffer.isBuffer(ret) : typeof ret == 'string');\n  return ret;\n};\n// end include: node_shell_read.js\n  if (process.argv.length > 1) {\n    thisProgram = process.argv[1].replace(/\\\\/g, '/');\n  }\n\n  arguments_ = process.argv.slice(2);\n\n  quit_ = (status, toThrow) => {\n    process.exitCode = status;\n    throw toThrow;\n  };\n\n} else\nif (ENVIRONMENT_IS_SHELL) {\n\n} else\n\n// Note that this includes Node.js workers when relevant (pthreads is enabled).\n// Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and\n// ENVIRONMENT_IS_NODE.\nif (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {\n  try {\n    scriptDirectory = new URL('.', _scriptName).href; // includes trailing slash\n  } catch {\n    // Must be a `blob:` or `data:` URL (e.g. `blob:http://site.com/etc/etc`), we cannot\n    // infer anything from them.\n  }\n\n  if (!(globalThis.window || globalThis.WorkerGlobalScope)) throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');\n\n  {\n// include: web_or_worker_shell_read.js\nif (ENVIRONMENT_IS_WORKER) {\n    readBinary = (url) => {\n      var xhr = new XMLHttpRequest();\n      xhr.open('GET', url, false);\n      xhr.responseType = 'arraybuffer';\n      xhr.send(null);\n      return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response));\n    };\n  }\n\n  readAsync = async (url) => {\n    // Fetch has some additional restrictions over XHR, like it can't be used on a file:// url.\n    // See https://github.com/github/fetch/pull/92#issuecomment-140665932\n    // Cordova or Electron apps are typically loaded from a file:// url.\n    // So use XHR on webview if URL is a file URL.\n    if (isFileURI(url)) {\n      return new Promise((resolve, reject) => {\n        var xhr = new XMLHttpRequest();\n        xhr.open('GET', url, true);\n        xhr.responseType = 'arraybuffer';\n        xhr.onload = () => {\n          if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0\n            resolve(xhr.response);\n            return;\n          }\n          reject(xhr.status);\n        };\n        xhr.onerror = reject;\n        xhr.send(null);\n      });\n    }\n    var response = await fetch(url, { credentials: 'same-origin' });\n    if (response.ok) {\n      return response.arrayBuffer();\n    }\n    throw new Error(response.status + ' : ' + response.url);\n  };\n// end include: web_or_worker_shell_read.js\n  }\n} else\n{\n  throw new Error('environment detection error');\n}\n\nvar out = console.log.bind(console);\nvar err = console.error.bind(console);\n\nvar IDBFS = 'IDBFS is no longer included by default; build with -lidbfs.js';\nvar PROXYFS = 'PROXYFS is no longer included by default; build with -lproxyfs.js';\nvar WORKERFS = 'WORKERFS is no longer included by default; build with -lworkerfs.js';\nvar FETCHFS = 'FETCHFS is no longer included by default; build with -lfetchfs.js';\nvar ICASEFS = 'ICASEFS is no longer included by default; build with -licasefs.js';\nvar JSFILEFS = 'JSFILEFS is no longer included by default; build with -ljsfilefs.js';\nvar OPFS = 'OPFS is no longer included by default; build with -lopfs.js';\n\nvar NODEFS = 'NODEFS is no longer included by default; build with -lnodefs.js';\n\n// perform assertions in shell.js after we set up out() and err(), as otherwise\n// if an assertion fails it cannot print the message\n\nassert(!ENVIRONMENT_IS_SHELL, 'shell environment detected but not enabled at build time.  Add `shell` to `-sENVIRONMENT` to enable.');\n\n// end include: shell.js\n\n// include: preamble.js\n// === Preamble library stuff ===\n\n// Documentation for the public APIs defined in this file must be updated in:\n//    site/source/docs/api_reference/preamble.js.rst\n// A prebuilt local version of the documentation is available at:\n//    site/build/text/docs/api_reference/preamble.js.txt\n// You can also build docs locally as HTML or other formats in site/\n// An online HTML version (which may be of a different version of Emscripten)\n//    is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html\n\nvar wasmBinary;\n\nif (!globalThis.WebAssembly) {\n  err('no native wasm support detected');\n}\n\n// Wasm globals\n\n//========================================\n// Runtime essentials\n//========================================\n\n// whether we are quitting the application. no code should run after this.\n// set in exit() and abort()\nvar ABORT = false;\n\n// set by exit() and abort().  Passed to 'onExit' handler.\n// NOTE: This is also used as the process return code code in shell environments\n// but only when noExitRuntime is false.\nvar EXITSTATUS;\n\n// In STRICT mode, we only define assert() when ASSERTIONS is set.  i.e. we\n// don't define it at all in release modes.  This matches the behaviour of\n// MINIMAL_RUNTIME.\n// TODO(sbc): Make this the default even without STRICT enabled.\n/** @type {function(*, string=)} */\nfunction assert(condition, text) {\n  if (!condition) {\n    abort('Assertion failed' + (text ? ': ' + text : ''));\n  }\n}\n\n// We used to include malloc/free by default in the past. Show a helpful error in\n// builds with assertions.\n\n/**\n * Indicates whether filename is delivered via file protocol (as opposed to http/https)\n * @noinline\n */\nvar isFileURI = (filename) => filename.startsWith('file://');\n\n// include: runtime_common.js\n// include: runtime_stack_check.js\n// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode.\nfunction writeStackCookie() {\n  var max = _emscripten_stack_get_end();\n  assert((max & 3) == 0);\n  // If the stack ends at address zero we write our cookies 4 bytes into the\n  // stack.  This prevents interference with SAFE_HEAP and ASAN which also\n  // monitor writes to address zero.\n  if (max == 0) {\n    max += 4;\n  }\n  // The stack grow downwards towards _emscripten_stack_get_end.\n  // We write cookies to the final two words in the stack and detect if they are\n  // ever overwritten.\n  HEAPU32[((max)>>2)] = 0x02135467;\n  HEAPU32[(((max)+(4))>>2)] = 0x89BACDFE;\n  // Also test the global address 0 for integrity.\n  HEAPU32[((0)>>2)] = 1668509029;\n}\n\nfunction checkStackCookie() {\n  if (ABORT) return;\n  var max = _emscripten_stack_get_end();\n  // See writeStackCookie().\n  if (max == 0) {\n    max += 4;\n  }\n  var cookie1 = HEAPU32[((max)>>2)];\n  var cookie2 = HEAPU32[(((max)+(4))>>2)];\n  if (cookie1 != 0x02135467 || cookie2 != 0x89BACDFE) {\n    abort(`Stack overflow! Stack cookie has been overwritten at ${ptrToString(max)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ptrToString(cookie2)} ${ptrToString(cookie1)}`);\n  }\n  // Also test the global address 0 for integrity.\n  if (HEAPU32[((0)>>2)] != 0x63736d65 /* 'emsc' */) {\n    abort('Runtime error: The application has corrupted its heap memory area (address zero)!');\n  }\n}\n// end include: runtime_stack_check.js\n// include: runtime_exceptions.js\n// end include: runtime_exceptions.js\n// include: runtime_debug.js\nvar runtimeDebug = true; // Switch to false at runtime to disable logging at the right times\n\n// Used by XXXXX_DEBUG settings to output debug messages.\nfunction dbg(...args) {\n  if (!runtimeDebug && typeof runtimeDebug != 'undefined') return;\n  // TODO(sbc): Make this configurable somehow.  Its not always convenient for\n  // logging to show up as warnings.\n  console.warn(...args);\n}\n\n// Endianness check\n(() => {\n  var h16 = new Int16Array(1);\n  var h8 = new Int8Array(h16.buffer);\n  h16[0] = 0x6373;\n  if (h8[0] !== 0x73 || h8[1] !== 0x63) abort('Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)');\n})();\n\nfunction consumedModuleProp(prop) {\n  if (!Object.getOwnPropertyDescriptor(Module, prop)) {\n    Object.defineProperty(Module, prop, {\n      configurable: true,\n      set() {\n        abort(`Attempt to set \\`Module.${prop}\\` after it has already been processed.  This can happen, for example, when code is injected via '--post-js' rather than '--pre-js'`);\n\n      }\n    });\n  }\n}\n\nfunction makeInvalidEarlyAccess(name) {\n  return () => assert(false, `call to '${name}' via reference taken before Wasm module initialization`);\n\n}\n\nfunction ignoredModuleProp(prop) {\n  if (Object.getOwnPropertyDescriptor(Module, prop)) {\n    abort(`\\`Module.${prop}\\` was supplied but \\`${prop}\\` not included in INCOMING_MODULE_JS_API`);\n  }\n}\n\n// forcing the filesystem exports a few things by default\nfunction isExportedByForceFilesystem(name) {\n  return name === 'FS_createPath' ||\n         name === 'FS_createDataFile' ||\n         name === 'FS_createPreloadedFile' ||\n         name === 'FS_preloadFile' ||\n         name === 'FS_unlink' ||\n         name === 'addRunDependency' ||\n         // The old FS has some functionality that WasmFS lacks.\n         name === 'FS_createLazyFile' ||\n         name === 'FS_createDevice' ||\n         name === 'removeRunDependency';\n}\n\nfunction missingLibrarySymbol(sym) {\n\n  // Any symbol that is not included from the JS library is also (by definition)\n  // not exported on the Module object.\n  unexportedRuntimeSymbol(sym);\n}\n\nfunction unexportedRuntimeSymbol(sym) {\n  if (!Object.getOwnPropertyDescriptor(Module, sym)) {\n    Object.defineProperty(Module, sym, {\n      configurable: true,\n      get() {\n        var msg = `'${sym}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;\n        if (isExportedByForceFilesystem(sym)) {\n          msg += '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you';\n        }\n        abort(msg);\n      },\n    });\n  }\n}\n\n// end include: runtime_debug.js\nvar readyPromiseResolve, readyPromiseReject;\n\n// Memory management\nvar\n/** @type {!Int8Array} */\n  HEAP8,\n/** @type {!Uint8Array} */\n  HEAPU8,\n/** @type {!Int16Array} */\n  HEAP16,\n/** @type {!Uint16Array} */\n  HEAPU16,\n/** @type {!Int32Array} */\n  HEAP32,\n/** @type {!Uint32Array} */\n  HEAPU32,\n/** @type {!Float32Array} */\n  HEAPF32,\n/** @type {!Float64Array} */\n  HEAPF64;\n\n// BigInt64Array type is not correctly defined in closure\nvar\n/** not-@type {!BigInt64Array} */\n  HEAP64,\n/* BigUint64Array type is not correctly defined in closure\n/** not-@type {!BigUint64Array} */\n  HEAPU64;\n\nvar runtimeInitialized = false;\n\n\n\nfunction updateMemoryViews() {\n  var b = wasmMemory.buffer;\n  HEAP8 = new Int8Array(b);\n  HEAP16 = new Int16Array(b);\n  HEAPU8 = new Uint8Array(b);\n  HEAPU16 = new Uint16Array(b);\n  HEAP32 = new Int32Array(b);\n  HEAPU32 = new Uint32Array(b);\n  HEAPF32 = new Float32Array(b);\n  HEAPF64 = new Float64Array(b);\n  HEAP64 = new BigInt64Array(b);\n  HEAPU64 = new BigUint64Array(b);\n}\n\n// include: memoryprofiler.js\n// end include: memoryprofiler.js\n// end include: runtime_common.js\nassert(globalThis.Int32Array && globalThis.Float64Array && Int32Array.prototype.subarray && Int32Array.prototype.set,\n       'JS engine does not provide full typed array support');\n\nfunction preRun() {\n  if (Module['preRun']) {\n    if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];\n    while (Module['preRun'].length) {\n      addOnPreRun(Module['preRun'].shift());\n    }\n  }\n  consumedModuleProp('preRun');\n  // Begin ATPRERUNS hooks\n  callRuntimeCallbacks(onPreRuns);\n  // End ATPRERUNS hooks\n}\n\nfunction initRuntime() {\n  assert(!runtimeInitialized);\n  runtimeInitialized = true;\n\n  checkStackCookie();\n\n  // Begin ATINITS hooks\n  if (!Module['noFSInit'] && !FS.initialized) FS.init();\nTTY.init();\n  // End ATINITS hooks\n\n  wasmExports['__wasm_call_ctors']();\n\n  // Begin ATPOSTCTORS hooks\n  FS.ignorePermissions = false;\n  // End ATPOSTCTORS hooks\n}\n\nfunction postRun() {\n  checkStackCookie();\n   // PThreads reuse the runtime from the main thread.\n\n  if (Module['postRun']) {\n    if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']];\n    while (Module['postRun'].length) {\n      addOnPostRun(Module['postRun'].shift());\n    }\n  }\n  consumedModuleProp('postRun');\n\n  // Begin ATPOSTRUNS hooks\n  callRuntimeCallbacks(onPostRuns);\n  // End ATPOSTRUNS hooks\n}\n\n/** @param {string|number=} what */\nfunction abort(what) {\n  Module['onAbort']?.(what);\n\n  what = 'Aborted(' + what + ')';\n  // TODO(sbc): Should we remove printing and leave it up to whoever\n  // catches the exception?\n  err(what);\n\n  ABORT = true;\n\n  if (what.indexOf('RuntimeError: unreachable') >= 0) {\n    what += '. \"unreachable\" may be due to ASYNCIFY_STACK_SIZE not being large enough (try increasing it)';\n  }\n\n  // Use a wasm runtime error, because a JS error might be seen as a foreign\n  // exception, which means we'd run destructors on it. We need the error to\n  // simply make the program stop.\n  // FIXME This approach does not work in Wasm EH because it currently does not assume\n  // all RuntimeErrors are from traps; it decides whether a RuntimeError is from\n  // a trap or not based on a hidden field within the object. So at the moment\n  // we don't have a way of throwing a wasm trap from JS. TODO Make a JS API that\n  // allows this in the wasm spec.\n\n  // Suppress closure compiler warning here. Closure compiler's builtin extern\n  // definition for WebAssembly.RuntimeError claims it takes no arguments even\n  // though it can.\n  // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure gets fixed.\n  /** @suppress {checkTypes} */\n  var e = new WebAssembly.RuntimeError(what);\n\n  readyPromiseReject?.(e);\n  // Throw the error whether or not MODULARIZE is set because abort is used\n  // in code paths apart from instantiation where an exception is expected\n  // to be thrown when abort is called.\n  throw e;\n}\n\nfunction createExportWrapper(name, nargs) {\n  return (...args) => {\n    assert(runtimeInitialized, `native function \\`${name}\\` called before runtime initialization`);\n    var f = wasmExports[name];\n    assert(f, `exported native function \\`${name}\\` not found`);\n    // Only assert for too many arguments. Too few can be valid since the missing arguments will be zero filled.\n    assert(args.length <= nargs, `native function \\`${name}\\` called with ${args.length} args but expects ${nargs}`);\n    return f(...args);\n  };\n}\n\nvar wasmBinaryFile;\n\nfunction findWasmBinary() {\n\n  if (Module['locateFile']) {\n    return locateFile('micropython.wasm');\n  }\n\n  // Use bundler-friendly `new URL(..., import.meta.url)` pattern; works in browsers too.\n  return new URL('micropython.wasm', import.meta.url).href;\n\n}\n\nfunction getBinarySync(file) {\n  if (file == wasmBinaryFile && wasmBinary) {\n    return new Uint8Array(wasmBinary);\n  }\n  if (readBinary) {\n    return readBinary(file);\n  }\n  // Throwing a plain string here, even though it not normally adviables since\n  // this gets turning into an `abort` in instantiateArrayBuffer.\n  throw 'both async and sync fetching of the wasm failed';\n}\n\nasync function getWasmBinary(binaryFile) {\n  // If we don't have the binary yet, load it asynchronously using readAsync.\n  if (!wasmBinary) {\n    // Fetch the binary using readAsync\n    try {\n      var response = await readAsync(binaryFile);\n      return new Uint8Array(response);\n    } catch {\n      // Fall back to getBinarySync below;\n    }\n  }\n\n  // Otherwise, getBinarySync should be able to get it synchronously\n  return getBinarySync(binaryFile);\n}\n\nasync function instantiateArrayBuffer(binaryFile, imports) {\n  try {\n    var binary = await getWasmBinary(binaryFile);\n    var instance = await WebAssembly.instantiate(binary, imports);\n    return instance;\n  } catch (reason) {\n    err(`failed to asynchronously prepare wasm: ${reason}`);\n\n    // Warn on some common problems.\n    if (isFileURI(binaryFile)) {\n      err(`warning: Loading from a file URI (${binaryFile}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`);\n    }\n    abort(reason);\n  }\n}\n\nasync function instantiateAsync(binary, binaryFile, imports) {\n  if (!binary\n      // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously.\n      && !isFileURI(binaryFile)\n      // Avoid instantiateStreaming() on Node.js environment for now, as while\n      // Node.js v18.1.0 implements it, it does not have a full fetch()\n      // implementation yet.\n      //\n      // Reference:\n      //   https://github.com/emscripten-core/emscripten/pull/16917\n      && !ENVIRONMENT_IS_NODE\n     ) {\n    try {\n      var response = fetch(binaryFile, { credentials: 'same-origin' });\n      var instantiationResult = await WebAssembly.instantiateStreaming(response, imports);\n      return instantiationResult;\n    } catch (reason) {\n      // We expect the most common failure cause to be a bad MIME type for the binary,\n      // in which case falling back to ArrayBuffer instantiation should work.\n      err(`wasm streaming compile failed: ${reason}`);\n      err('falling back to ArrayBuffer instantiation');\n      // fall back of instantiateArrayBuffer below\n    };\n  }\n  return instantiateArrayBuffer(binaryFile, imports);\n}\n\nfunction getWasmImports() {\n  // instrumenting imports is used in asyncify in two ways: to add assertions\n  // that check for proper import use, and for ASYNCIFY=2 we use them to set up\n  // the Promise API on the import side.\n  Asyncify.instrumentWasmImports(wasmImports);\n  // prepare imports\n  var imports = {\n    'env': wasmImports,\n    'wasi_snapshot_preview1': wasmImports,\n  };\n  return imports;\n}\n\n// Create the wasm instance.\n// Receives the wasm imports, returns the exports.\nasync function createWasm() {\n  // Load the wasm module and create an instance of using native support in the JS engine.\n  // handle a generated wasm instance, receiving its exports and\n  // performing other necessary setup\n  /** @param {WebAssembly.Module=} module*/\n  function receiveInstance(instance, module) {\n    wasmExports = instance.exports;\n\n    wasmExports = Asyncify.instrumentWasmExports(wasmExports);\n\n    assignWasmExports(wasmExports);\n\n    updateMemoryViews();\n\n    return wasmExports;\n  }\n\n  // Prefer streaming instantiation if available.\n  // Async compilation can be confusing when an error on the page overwrites Module\n  // (for example, if the order of elements is wrong, and the one defining Module is\n  // later), so we save Module and check it later.\n  var trueModule = Module;\n  function receiveInstantiationResult(result) {\n    // 'result' is a ResultObject object which has both the module and instance.\n    // receiveInstance() will swap in the exports (to Module.asm) so they can be called\n    assert(Module === trueModule, 'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?');\n    trueModule = null;\n    // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line.\n    // When the regression is fixed, can restore the above PTHREADS-enabled path.\n    return receiveInstance(result['instance']);\n  }\n\n  var info = getWasmImports();\n\n  // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback\n  // to manually instantiate the Wasm module themselves. This allows pages to\n  // run the instantiation parallel to any other async startup actions they are\n  // performing.\n  // Also pthreads and wasm workers initialize the wasm instance through this\n  // path.\n  if (Module['instantiateWasm']) {\n    return new Promise((resolve, reject) => {\n      try {\n        Module['instantiateWasm'](info, (inst, mod) => {\n          resolve(receiveInstance(inst, mod));\n        });\n      } catch(e) {\n        err(`Module.instantiateWasm callback failed with error: ${e}`);\n        reject(e);\n      }\n    });\n  }\n\n  wasmBinaryFile ??= findWasmBinary();\n  var result = await instantiateAsync(wasmBinary, wasmBinaryFile, info);\n  var exports = receiveInstantiationResult(result);\n  return exports;\n}\n\n// end include: preamble.js\n\n// Begin JS library code\n\n\n  class ExitStatus {\n      name = 'ExitStatus';\n      constructor(status) {\n        this.message = `Program terminated with exit(${status})`;\n        this.status = status;\n      }\n    }\n\n  var callRuntimeCallbacks = (callbacks) => {\n      while (callbacks.length > 0) {\n        // Pass the module as the first argument.\n        callbacks.shift()(Module);\n      }\n    };\n  var onPostRuns = [];\n  var addOnPostRun = (cb) => onPostRuns.push(cb);\n\n  var onPreRuns = [];\n  var addOnPreRun = (cb) => onPreRuns.push(cb);\n\n\n  var dynCalls = {\n  };\n  var dynCallLegacy = (sig, ptr, args) => {\n      sig = sig.replace(/p/g, 'i')\n      assert(sig in dynCalls, `bad function pointer type - sig is not in dynCalls: '${sig}'`);\n      if (args?.length) {\n        // j (64-bit integer) is fine, and is implemented as a BigInt. Without\n        // legalization, the number of parameters should match (j is not expanded\n        // into two i's).\n        assert(args.length === sig.length - 1);\n      } else {\n        assert(sig.length == 1);\n      }\n      var f = dynCalls[sig];\n      return f(ptr, ...args);\n    };\n  var dynCall = (sig, ptr, args = [], promising = false) => {\n      assert(ptr, `null function pointer in dynCall`);\n      assert(!promising, 'async dynCall is not supported in this mode')\n      var rtn = dynCallLegacy(sig, ptr, args);\n  \n      function convert(rtn) {\n        return rtn;\n      }\n  \n      return convert(rtn);\n    };\n\n  \n    /**\n     * @param {number} ptr\n     * @param {string} type\n     */\n  function getValue(ptr, type = 'i8') {\n    if (type.endsWith('*')) type = '*';\n    switch (type) {\n      case 'i1': return HEAP8[ptr];\n      case 'i8': return HEAP8[ptr];\n      case 'i16': return HEAP16[((ptr)>>1)];\n      case 'i32': return HEAP32[((ptr)>>2)];\n      case 'i64': return HEAP64[((ptr)>>3)];\n      case 'float': return HEAPF32[((ptr)>>2)];\n      case 'double': return HEAPF64[((ptr)>>3)];\n      case '*': return HEAPU32[((ptr)>>2)];\n      default: abort(`invalid type for getValue: ${type}`);\n    }\n  }\n\n  var noExitRuntime = true;\n\n  var ptrToString = (ptr) => {\n      assert(typeof ptr === 'number', `ptrToString expects a number, got ${typeof ptr}`);\n      // Convert to 32-bit unsigned value\n      ptr >>>= 0;\n      return '0x' + ptr.toString(16).padStart(8, '0');\n    };\n\n  \n    /**\n     * @param {number} ptr\n     * @param {number} value\n     * @param {string} type\n     */\n  function setValue(ptr, value, type = 'i8') {\n    if (type.endsWith('*')) type = '*';\n    switch (type) {\n      case 'i1': HEAP8[ptr] = value; break;\n      case 'i8': HEAP8[ptr] = value; break;\n      case 'i16': HEAP16[((ptr)>>1)] = value; break;\n      case 'i32': HEAP32[((ptr)>>2)] = value; break;\n      case 'i64': HEAP64[((ptr)>>3)] = BigInt(value); break;\n      case 'float': HEAPF32[((ptr)>>2)] = value; break;\n      case 'double': HEAPF64[((ptr)>>3)] = value; break;\n      case '*': HEAPU32[((ptr)>>2)] = value; break;\n      default: abort(`invalid type for setValue: ${type}`);\n    }\n  }\n\n  var stackRestore = (val) => __emscripten_stack_restore(val);\n\n  var stackSave = () => _emscripten_stack_get_current();\n\n  var warnOnce = (text) => {\n      warnOnce.shown ||= {};\n      if (!warnOnce.shown[text]) {\n        warnOnce.shown[text] = 1;\n        if (ENVIRONMENT_IS_NODE) text = 'warning: ' + text;\n        err(text);\n      }\n    };\n\n  \n\n  var PATH = {\n  isAbs:(path) => path.charAt(0) === '/',\n  splitPath:(filename) => {\n        var splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\n        return splitPathRe.exec(filename).slice(1);\n      },\n  normalizeArray:(parts, allowAboveRoot) => {\n        // if the path tries to go above the root, `up` ends up > 0\n        var up = 0;\n        for (var i = parts.length - 1; i >= 0; i--) {\n          var last = parts[i];\n          if (last === '.') {\n            parts.splice(i, 1);\n          } else if (last === '..') {\n            parts.splice(i, 1);\n            up++;\n          } else if (up) {\n            parts.splice(i, 1);\n            up--;\n          }\n        }\n        // if the path is allowed to go above the root, restore leading ..s\n        if (allowAboveRoot) {\n          for (; up; up--) {\n            parts.unshift('..');\n          }\n        }\n        return parts;\n      },\n  normalize:(path) => {\n        var isAbsolute = PATH.isAbs(path),\n            trailingSlash = path.slice(-1) === '/';\n        // Normalize the path\n        path = PATH.normalizeArray(path.split('/').filter((p) => !!p), !isAbsolute).join('/');\n        if (!path && !isAbsolute) {\n          path = '.';\n        }\n        if (path && trailingSlash) {\n          path += '/';\n        }\n        return (isAbsolute ? '/' : '') + path;\n      },\n  dirname:(path) => {\n        var result = PATH.splitPath(path),\n            root = result[0],\n            dir = result[1];\n        if (!root && !dir) {\n          // No dirname whatsoever\n          return '.';\n        }\n        if (dir) {\n          // It has a dirname, strip trailing slash\n          dir = dir.slice(0, -1);\n        }\n        return root + dir;\n      },\n  basename:(path) => path && path.match(/([^\\/]+|\\/)\\/*$/)[1],\n  join:(...paths) => PATH.normalize(paths.join('/')),\n  join2:(l, r) => PATH.normalize(l + '/' + r),\n  };\n  \n  var initRandomFill = () => {\n      // This block is not needed on v19+ since crypto.getRandomValues is builtin\n      if (ENVIRONMENT_IS_NODE) {\n        var nodeCrypto = require('crypto');\n        return (view) => nodeCrypto.randomFillSync(view);\n      }\n  \n      return (view) => crypto.getRandomValues(view);\n    };\n  var randomFill = (view) => {\n      // Lazily init on the first invocation.\n      (randomFill = initRandomFill())(view);\n    };\n  \n  \n  \n  var PATH_FS = {\n  resolve:(...args) => {\n        var resolvedPath = '',\n          resolvedAbsolute = false;\n        for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n          var path = (i >= 0) ? args[i] : FS.cwd();\n          // Skip empty and invalid entries\n          if (typeof path != 'string') {\n            throw new TypeError('Arguments to path.resolve must be strings');\n          } else if (!path) {\n            return ''; // an invalid portion invalidates the whole thing\n          }\n          resolvedPath = path + '/' + resolvedPath;\n          resolvedAbsolute = PATH.isAbs(path);\n        }\n        // At this point the path should be resolved to a full absolute path, but\n        // handle relative paths to be safe (might happen when process.cwd() fails)\n        resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter((p) => !!p), !resolvedAbsolute).join('/');\n        return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n      },\n  relative:(from, to) => {\n        from = PATH_FS.resolve(from).slice(1);\n        to = PATH_FS.resolve(to).slice(1);\n        function trim(arr) {\n          var start = 0;\n          for (; start < arr.length; start++) {\n            if (arr[start] !== '') break;\n          }\n          var end = arr.length - 1;\n          for (; end >= 0; end--) {\n            if (arr[end] !== '') break;\n          }\n          if (start > end) return [];\n          return arr.slice(start, end - start + 1);\n        }\n        var fromParts = trim(from.split('/'));\n        var toParts = trim(to.split('/'));\n        var length = Math.min(fromParts.length, toParts.length);\n        var samePartsLength = length;\n        for (var i = 0; i < length; i++) {\n          if (fromParts[i] !== toParts[i]) {\n            samePartsLength = i;\n            break;\n          }\n        }\n        var outputParts = [];\n        for (var i = samePartsLength; i < fromParts.length; i++) {\n          outputParts.push('..');\n        }\n        outputParts = outputParts.concat(toParts.slice(samePartsLength));\n        return outputParts.join('/');\n      },\n  };\n  \n  \n  var UTF8Decoder = globalThis.TextDecoder && new TextDecoder();\n  \n  var findStringEnd = (heapOrArray, idx, maxBytesToRead, ignoreNul) => {\n      var maxIdx = idx + maxBytesToRead;\n      if (ignoreNul) return maxIdx;\n      // TextDecoder needs to know the byte length in advance, it doesn't stop on\n      // null terminator by itself.\n      // As a tiny code save trick, compare idx against maxIdx using a negation,\n      // so that maxBytesToRead=undefined/NaN means Infinity.\n      while (heapOrArray[idx] && !(idx >= maxIdx)) ++idx;\n      return idx;\n    };\n  \n  \n    /**\n     * Given a pointer 'idx' to a null-terminated UTF8-encoded string in the given\n     * array that contains uint8 values, returns a copy of that string as a\n     * Javascript String object.\n     * heapOrArray is either a regular array, or a JavaScript typed array view.\n     * @param {number=} idx\n     * @param {number=} maxBytesToRead\n     * @param {boolean=} ignoreNul - If true, the function will not stop on a NUL character.\n     * @return {string}\n     */\n  var UTF8ArrayToString = (heapOrArray, idx = 0, maxBytesToRead, ignoreNul) => {\n  \n      var endPtr = findStringEnd(heapOrArray, idx, maxBytesToRead, ignoreNul);\n  \n      // When using conditional TextDecoder, skip it for short strings as the overhead of the native call is not worth it.\n      if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {\n        return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));\n      }\n      var str = '';\n      while (idx < endPtr) {\n        // For UTF8 byte structure, see:\n        // http://en.wikipedia.org/wiki/UTF-8#Description\n        // https://www.ietf.org/rfc/rfc2279.txt\n        // https://tools.ietf.org/html/rfc3629\n        var u0 = heapOrArray[idx++];\n        if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }\n        var u1 = heapOrArray[idx++] & 63;\n        if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }\n        var u2 = heapOrArray[idx++] & 63;\n        if ((u0 & 0xF0) == 0xE0) {\n          u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;\n        } else {\n          if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte ' + ptrToString(u0) + ' encountered when deserializing a UTF-8 string in wasm memory to a JS string!');\n          u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63);\n        }\n  \n        if (u0 < 0x10000) {\n          str += String.fromCharCode(u0);\n        } else {\n          var ch = u0 - 0x10000;\n          str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));\n        }\n      }\n      return str;\n    };\n  \n  var FS_stdin_getChar_buffer = [];\n  \n  var lengthBytesUTF8 = (str) => {\n      var len = 0;\n      for (var i = 0; i < str.length; ++i) {\n        // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code\n        // unit, not a Unicode code point of the character! So decode\n        // UTF16->UTF32->UTF8.\n        // See http://unicode.org/faq/utf_bom.html#utf16-3\n        var c = str.charCodeAt(i); // possibly a lead surrogate\n        if (c <= 0x7F) {\n          len++;\n        } else if (c <= 0x7FF) {\n          len += 2;\n        } else if (c >= 0xD800 && c <= 0xDFFF) {\n          len += 4; ++i;\n        } else {\n          len += 3;\n        }\n      }\n      return len;\n    };\n  \n  var stringToUTF8Array = (str, heap, outIdx, maxBytesToWrite) => {\n      assert(typeof str === 'string', `stringToUTF8Array expects a string (got ${typeof str})`);\n      // Parameter maxBytesToWrite is not optional. Negative values, 0, null,\n      // undefined and false each don't write out any bytes.\n      if (!(maxBytesToWrite > 0))\n        return 0;\n  \n      var startIdx = outIdx;\n      var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator.\n      for (var i = 0; i < str.length; ++i) {\n        // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description\n        // and https://www.ietf.org/rfc/rfc2279.txt\n        // and https://tools.ietf.org/html/rfc3629\n        var u = str.codePointAt(i);\n        if (u <= 0x7F) {\n          if (outIdx >= endIdx) break;\n          heap[outIdx++] = u;\n        } else if (u <= 0x7FF) {\n          if (outIdx + 1 >= endIdx) break;\n          heap[outIdx++] = 0xC0 | (u >> 6);\n          heap[outIdx++] = 0x80 | (u & 63);\n        } else if (u <= 0xFFFF) {\n          if (outIdx + 2 >= endIdx) break;\n          heap[outIdx++] = 0xE0 | (u >> 12);\n          heap[outIdx++] = 0x80 | ((u >> 6) & 63);\n          heap[outIdx++] = 0x80 | (u & 63);\n        } else {\n          if (outIdx + 3 >= endIdx) break;\n          if (u > 0x10FFFF) warnOnce('Invalid Unicode code point ' + ptrToString(u) + ' encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).');\n          heap[outIdx++] = 0xF0 | (u >> 18);\n          heap[outIdx++] = 0x80 | ((u >> 12) & 63);\n          heap[outIdx++] = 0x80 | ((u >> 6) & 63);\n          heap[outIdx++] = 0x80 | (u & 63);\n          // Gotcha: if codePoint is over 0xFFFF, it is represented as a surrogate pair in UTF-16.\n          // We need to manually skip over the second code unit for correct iteration.\n          i++;\n        }\n      }\n      // Null-terminate the pointer to the buffer.\n      heap[outIdx] = 0;\n      return outIdx - startIdx;\n    };\n  /** @type {function(string, boolean=, number=)} */\n  var intArrayFromString = (stringy, dontAddNull, length) => {\n      var len = length > 0 ? length : lengthBytesUTF8(stringy)+1;\n      var u8array = new Array(len);\n      var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length);\n      if (dontAddNull) u8array.length = numBytesWritten;\n      return u8array;\n    };\n  var FS_stdin_getChar = () => {\n      if (!FS_stdin_getChar_buffer.length) {\n        var result = null;\n        if (ENVIRONMENT_IS_NODE) {\n          // we will read data by chunks of BUFSIZE\n          var BUFSIZE = 256;\n          var buf = Buffer.alloc(BUFSIZE);\n          var bytesRead = 0;\n  \n          // For some reason we must suppress a closure warning here, even though\n          // fd definitely exists on process.stdin, and is even the proper way to\n          // get the fd of stdin,\n          // https://github.com/nodejs/help/issues/2136#issuecomment-523649904\n          // This started to happen after moving this logic out of library_tty.js,\n          // so it is related to the surrounding code in some unclear manner.\n          /** @suppress {missingProperties} */\n          var fd = process.stdin.fd;\n  \n          try {\n            bytesRead = fs.readSync(fd, buf, 0, BUFSIZE);\n          } catch(e) {\n            // Cross-platform differences: on Windows, reading EOF throws an\n            // exception, but on other OSes, reading EOF returns 0. Uniformize\n            // behavior by treating the EOF exception to return 0.\n            if (e.toString().includes('EOF')) bytesRead = 0;\n            else throw e;\n          }\n  \n          if (bytesRead > 0) {\n            result = buf.slice(0, bytesRead).toString('utf-8');\n          }\n        } else\n        if (globalThis.window?.prompt) {\n          // Browser.\n          result = window.prompt('Input: ');  // returns null on cancel\n          if (result !== null) {\n            result += '\\n';\n          }\n        } else\n        {}\n        if (!result) {\n          return null;\n        }\n        FS_stdin_getChar_buffer = intArrayFromString(result, true);\n      }\n      return FS_stdin_getChar_buffer.shift();\n    };\n  var TTY = {\n  ttys:[],\n  init() {\n        // https://github.com/emscripten-core/emscripten/pull/1555\n        // if (ENVIRONMENT_IS_NODE) {\n        //   // currently, FS.init does not distinguish if process.stdin is a file or TTY\n        //   // device, it always assumes it's a TTY device. because of this, we're forcing\n        //   // process.stdin to UTF8 encoding to at least make stdin reading compatible\n        //   // with text files until FS.init can be refactored.\n        //   process.stdin.setEncoding('utf8');\n        // }\n      },\n  shutdown() {\n        // https://github.com/emscripten-core/emscripten/pull/1555\n        // if (ENVIRONMENT_IS_NODE) {\n        //   // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)?\n        //   // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation\n        //   // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists?\n        //   // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle\n        //   // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call\n        //   process.stdin.pause();\n        // }\n      },\n  register(dev, ops) {\n        TTY.ttys[dev] = { input: [], output: [], ops: ops };\n        FS.registerDevice(dev, TTY.stream_ops);\n      },\n  stream_ops:{\n  open(stream) {\n          var tty = TTY.ttys[stream.node.rdev];\n          if (!tty) {\n            throw new FS.ErrnoError(43);\n          }\n          stream.tty = tty;\n          stream.seekable = false;\n        },\n  close(stream) {\n          // flush any pending line data\n          stream.tty.ops.fsync(stream.tty);\n        },\n  fsync(stream) {\n          stream.tty.ops.fsync(stream.tty);\n        },\n  read(stream, buffer, offset, length, pos /* ignored */) {\n          if (!stream.tty || !stream.tty.ops.get_char) {\n            throw new FS.ErrnoError(60);\n          }\n          var bytesRead = 0;\n          for (var i = 0; i < length; i++) {\n            var result;\n            try {\n              result = stream.tty.ops.get_char(stream.tty);\n            } catch (e) {\n              throw new FS.ErrnoError(29);\n            }\n            if (result === undefined && bytesRead === 0) {\n              throw new FS.ErrnoError(6);\n            }\n            if (result === null || result === undefined) break;\n            bytesRead++;\n            buffer[offset+i] = result;\n          }\n          if (bytesRead) {\n            stream.node.atime = Date.now();\n          }\n          return bytesRead;\n        },\n  write(stream, buffer, offset, length, pos) {\n          if (!stream.tty || !stream.tty.ops.put_char) {\n            throw new FS.ErrnoError(60);\n          }\n          try {\n            for (var i = 0; i < length; i++) {\n              stream.tty.ops.put_char(stream.tty, buffer[offset+i]);\n            }\n          } catch (e) {\n            throw new FS.ErrnoError(29);\n          }\n          if (length) {\n            stream.node.mtime = stream.node.ctime = Date.now();\n          }\n          return i;\n        },\n  },\n  default_tty_ops:{\n  get_char(tty) {\n          return FS_stdin_getChar();\n        },\n  put_char(tty, val) {\n          if (val === null || val === 10) {\n            out(UTF8ArrayToString(tty.output));\n            tty.output = [];\n          } else {\n            if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle.\n          }\n        },\n  fsync(tty) {\n          if (tty.output?.length > 0) {\n            out(UTF8ArrayToString(tty.output));\n            tty.output = [];\n          }\n        },\n  ioctl_tcgets(tty) {\n          // typical setting\n          return {\n            c_iflag: 25856,\n            c_oflag: 5,\n            c_cflag: 191,\n            c_lflag: 35387,\n            c_cc: [\n              0x03, 0x1c, 0x7f, 0x15, 0x04, 0x00, 0x01, 0x00, 0x11, 0x13, 0x1a, 0x00,\n              0x12, 0x0f, 0x17, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n              0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n            ]\n          };\n        },\n  ioctl_tcsets(tty, optional_actions, data) {\n          // currently just ignore\n          return 0;\n        },\n  ioctl_tiocgwinsz(tty) {\n          return [24, 80];\n        },\n  },\n  default_tty1_ops:{\n  put_char(tty, val) {\n          if (val === null || val === 10) {\n            err(UTF8ArrayToString(tty.output));\n            tty.output = [];\n          } else {\n            if (val != 0) tty.output.push(val);\n          }\n        },\n  fsync(tty) {\n          if (tty.output?.length > 0) {\n            err(UTF8ArrayToString(tty.output));\n            tty.output = [];\n          }\n        },\n  },\n  };\n  \n  \n  var mmapAlloc = (size) => {\n      abort('internal error: mmapAlloc called but `emscripten_builtin_memalign` native symbol not exported');\n    };\n  var MEMFS = {\n  ops_table:null,\n  mount(mount) {\n        return MEMFS.createNode(null, '/', 16895, 0);\n      },\n  createNode(parent, name, mode, dev) {\n        if (FS.isBlkdev(mode) || FS.isFIFO(mode)) {\n          // no supported\n          throw new FS.ErrnoError(63);\n        }\n        MEMFS.ops_table ||= {\n          dir: {\n            node: {\n              getattr: MEMFS.node_ops.getattr,\n              setattr: MEMFS.node_ops.setattr,\n              lookup: MEMFS.node_ops.lookup,\n              mknod: MEMFS.node_ops.mknod,\n              rename: MEMFS.node_ops.rename,\n              unlink: MEMFS.node_ops.unlink,\n              rmdir: MEMFS.node_ops.rmdir,\n              readdir: MEMFS.node_ops.readdir,\n              symlink: MEMFS.node_ops.symlink\n            },\n            stream: {\n              llseek: MEMFS.stream_ops.llseek\n            }\n          },\n          file: {\n            node: {\n              getattr: MEMFS.node_ops.getattr,\n              setattr: MEMFS.node_ops.setattr\n            },\n            stream: {\n              llseek: MEMFS.stream_ops.llseek,\n              read: MEMFS.stream_ops.read,\n              write: MEMFS.stream_ops.write,\n              mmap: MEMFS.stream_ops.mmap,\n              msync: MEMFS.stream_ops.msync\n            }\n          },\n          link: {\n            node: {\n              getattr: MEMFS.node_ops.getattr,\n              setattr: MEMFS.node_ops.setattr,\n              readlink: MEMFS.node_ops.readlink\n            },\n            stream: {}\n          },\n          chrdev: {\n            node: {\n              getattr: MEMFS.node_ops.getattr,\n              setattr: MEMFS.node_ops.setattr\n            },\n            stream: FS.chrdev_stream_ops\n          }\n        };\n        var node = FS.createNode(parent, name, mode, dev);\n        if (FS.isDir(node.mode)) {\n          node.node_ops = MEMFS.ops_table.dir.node;\n          node.stream_ops = MEMFS.ops_table.dir.stream;\n          node.contents = {};\n        } else if (FS.isFile(node.mode)) {\n          node.node_ops = MEMFS.ops_table.file.node;\n          node.stream_ops = MEMFS.ops_table.file.stream;\n          node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity.\n          // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred\n          // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size\n          // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme.\n          node.contents = null; \n        } else if (FS.isLink(node.mode)) {\n          node.node_ops = MEMFS.ops_table.link.node;\n          node.stream_ops = MEMFS.ops_table.link.stream;\n        } else if (FS.isChrdev(node.mode)) {\n          node.node_ops = MEMFS.ops_table.chrdev.node;\n          node.stream_ops = MEMFS.ops_table.chrdev.stream;\n        }\n        node.atime = node.mtime = node.ctime = Date.now();\n        // add the new node to the parent\n        if (parent) {\n          parent.contents[name] = node;\n          parent.atime = parent.mtime = parent.ctime = node.atime;\n        }\n        return node;\n      },\n  getFileDataAsTypedArray(node) {\n        if (!node.contents) return new Uint8Array(0);\n        if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes.\n        return new Uint8Array(node.contents);\n      },\n  expandFileStorage(node, newCapacity) {\n        var prevCapacity = node.contents ? node.contents.length : 0;\n        if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough.\n        // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity.\n        // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to\n        // avoid overshooting the allocation cap by a very large margin.\n        var CAPACITY_DOUBLING_MAX = 1024 * 1024;\n        newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) >>> 0);\n        if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding.\n        var oldContents = node.contents;\n        node.contents = new Uint8Array(newCapacity); // Allocate new storage.\n        if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage.\n      },\n  resizeFileStorage(node, newSize) {\n        if (node.usedBytes == newSize) return;\n        if (newSize == 0) {\n          node.contents = null; // Fully decommit when requesting a resize to zero.\n          node.usedBytes = 0;\n        } else {\n          var oldContents = node.contents;\n          node.contents = new Uint8Array(newSize); // Allocate new storage.\n          if (oldContents) {\n            node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage.\n          }\n          node.usedBytes = newSize;\n        }\n      },\n  node_ops:{\n  getattr(node) {\n          var attr = {};\n          // device numbers reuse inode numbers.\n          attr.dev = FS.isChrdev(node.mode) ? node.id : 1;\n          attr.ino = node.id;\n          attr.mode = node.mode;\n          attr.nlink = 1;\n          attr.uid = 0;\n          attr.gid = 0;\n          attr.rdev = node.rdev;\n          if (FS.isDir(node.mode)) {\n            attr.size = 4096;\n          } else if (FS.isFile(node.mode)) {\n            attr.size = node.usedBytes;\n          } else if (FS.isLink(node.mode)) {\n            attr.size = node.link.length;\n          } else {\n            attr.size = 0;\n          }\n          attr.atime = new Date(node.atime);\n          attr.mtime = new Date(node.mtime);\n          attr.ctime = new Date(node.ctime);\n          // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize),\n          //       but this is not required by the standard.\n          attr.blksize = 4096;\n          attr.blocks = Math.ceil(attr.size / attr.blksize);\n          return attr;\n        },\n  setattr(node, attr) {\n          for (const key of [\"mode\", \"atime\", \"mtime\", \"ctime\"]) {\n            if (attr[key] != null) {\n              node[key] = attr[key];\n            }\n          }\n          if (attr.size !== undefined) {\n            MEMFS.resizeFileStorage(node, attr.size);\n          }\n        },\n  lookup(parent, name) {\n          throw new FS.ErrnoError(44);\n        },\n  mknod(parent, name, mode, dev) {\n          return MEMFS.createNode(parent, name, mode, dev);\n        },\n  rename(old_node, new_dir, new_name) {\n          var new_node;\n          try {\n            new_node = FS.lookupNode(new_dir, new_name);\n          } catch (e) {}\n          if (new_node) {\n            if (FS.isDir(old_node.mode)) {\n              // if we're overwriting a directory at new_name, make sure it's empty.\n              for (var i in new_node.contents) {\n                throw new FS.ErrnoError(55);\n              }\n            }\n            FS.hashRemoveNode(new_node);\n          }\n          // do the internal rewiring\n          delete old_node.parent.contents[old_node.name];\n          new_dir.contents[new_name] = old_node;\n          old_node.name = new_name;\n          new_dir.ctime = new_dir.mtime = old_node.parent.ctime = old_node.parent.mtime = Date.now();\n        },\n  unlink(parent, name) {\n          delete parent.contents[name];\n          parent.ctime = parent.mtime = Date.now();\n        },\n  rmdir(parent, name) {\n          var node = FS.lookupNode(parent, name);\n          for (var i in node.contents) {\n            throw new FS.ErrnoError(55);\n          }\n          delete parent.contents[name];\n          parent.ctime = parent.mtime = Date.now();\n        },\n  readdir(node) {\n          return ['.', '..', ...Object.keys(node.contents)];\n        },\n  symlink(parent, newname, oldpath) {\n          var node = MEMFS.createNode(parent, newname, 0o777 | 40960, 0);\n          node.link = oldpath;\n          return node;\n        },\n  readlink(node) {\n          if (!FS.isLink(node.mode)) {\n            throw new FS.ErrnoError(28);\n          }\n          return node.link;\n        },\n  },\n  stream_ops:{\n  read(stream, buffer, offset, length, position) {\n          var contents = stream.node.contents;\n          if (position >= stream.node.usedBytes) return 0;\n          var size = Math.min(stream.node.usedBytes - position, length);\n          assert(size >= 0);\n          if (size > 8 && contents.subarray) { // non-trivial, and typed array\n            buffer.set(contents.subarray(position, position + size), offset);\n          } else {\n            for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i];\n          }\n          return size;\n        },\n  write(stream, buffer, offset, length, position, canOwn) {\n          // The data buffer should be a typed array view\n          assert(!(buffer instanceof ArrayBuffer));\n  \n          if (!length) return 0;\n          var node = stream.node;\n          node.mtime = node.ctime = Date.now();\n  \n          if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array?\n            if (canOwn) {\n              assert(position === 0, 'canOwn must imply no weird position inside the file');\n              node.contents = buffer.subarray(offset, offset + length);\n              node.usedBytes = length;\n              return length;\n            } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data.\n              node.contents = buffer.slice(offset, offset + length);\n              node.usedBytes = length;\n              return length;\n            } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file?\n              node.contents.set(buffer.subarray(offset, offset + length), position);\n              return length;\n            }\n          }\n  \n          // Appending to an existing file and we need to reallocate, or source data did not come as a typed array.\n          MEMFS.expandFileStorage(node, position+length);\n          if (node.contents.subarray && buffer.subarray) {\n            // Use typed array write which is available.\n            node.contents.set(buffer.subarray(offset, offset + length), position);\n          } else {\n            for (var i = 0; i < length; i++) {\n             node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not.\n            }\n          }\n          node.usedBytes = Math.max(node.usedBytes, position + length);\n          return length;\n        },\n  llseek(stream, offset, whence) {\n          var position = offset;\n          if (whence === 1) {\n            position += stream.position;\n          } else if (whence === 2) {\n            if (FS.isFile(stream.node.mode)) {\n              position += stream.node.usedBytes;\n            }\n          }\n          if (position < 0) {\n            throw new FS.ErrnoError(28);\n          }\n          return position;\n        },\n  mmap(stream, length, position, prot, flags) {\n          if (!FS.isFile(stream.node.mode)) {\n            throw new FS.ErrnoError(43);\n          }\n          var ptr;\n          var allocated;\n          var contents = stream.node.contents;\n          // Only make a new copy when MAP_PRIVATE is specified.\n          if (!(flags & 2) && contents && contents.buffer === HEAP8.buffer) {\n            // We can't emulate MAP_SHARED when the file is not backed by the\n            // buffer we're mapping to (e.g. the HEAP buffer).\n            allocated = false;\n            ptr = contents.byteOffset;\n          } else {\n            allocated = true;\n            ptr = mmapAlloc(length);\n            if (!ptr) {\n              throw new FS.ErrnoError(48);\n            }\n            if (contents) {\n              // Try to avoid unnecessary slices.\n              if (position > 0 || position + length < contents.length) {\n                if (contents.subarray) {\n                  contents = contents.subarray(position, position + length);\n                } else {\n                  contents = Array.prototype.slice.call(contents, position, position + length);\n                }\n              }\n              HEAP8.set(contents, ptr);\n            }\n          }\n          return { ptr, allocated };\n        },\n  msync(stream, buffer, offset, length, mmapFlags) {\n          MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false);\n          // should we check if bytesWritten and length are the same?\n          return 0;\n        },\n  },\n  };\n  \n  var FS_modeStringToFlags = (str) => {\n      var flagModes = {\n        'r': 0,\n        'r+': 2,\n        'w': 512 | 64 | 1,\n        'w+': 512 | 64 | 2,\n        'a': 1024 | 64 | 1,\n        'a+': 1024 | 64 | 2,\n      };\n      var flags = flagModes[str];\n      if (typeof flags == 'undefined') {\n        throw new Error(`Unknown file open mode: ${str}`);\n      }\n      return flags;\n    };\n  \n  var FS_getMode = (canRead, canWrite) => {\n      var mode = 0;\n      if (canRead) mode |= 292 | 73;\n      if (canWrite) mode |= 146;\n      return mode;\n    };\n  \n  \n  \n  \n    /**\n     * Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the\n     * emscripten HEAP, returns a copy of that string as a Javascript String object.\n     *\n     * @param {number} ptr\n     * @param {number=} maxBytesToRead - An optional length that specifies the\n     *   maximum number of bytes to read. You can omit this parameter to scan the\n     *   string until the first 0 byte. If maxBytesToRead is passed, and the string\n     *   at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the\n     *   string will cut short at that byte index.\n     * @param {boolean=} ignoreNul - If true, the function will not stop on a NUL character.\n     * @return {string}\n     */\n  var UTF8ToString = (ptr, maxBytesToRead, ignoreNul) => {\n      assert(typeof ptr == 'number', `UTF8ToString expects a number (got ${typeof ptr})`);\n      return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead, ignoreNul) : '';\n    };\n  \n  var strError = (errno) => UTF8ToString(_strerror(errno));\n  \n  var ERRNO_CODES = {\n      'EPERM': 63,\n      'ENOENT': 44,\n      'ESRCH': 71,\n      'EINTR': 27,\n      'EIO': 29,\n      'ENXIO': 60,\n      'E2BIG': 1,\n      'ENOEXEC': 45,\n      'EBADF': 8,\n      'ECHILD': 12,\n      'EAGAIN': 6,\n      'EWOULDBLOCK': 6,\n      'ENOMEM': 48,\n      'EACCES': 2,\n      'EFAULT': 21,\n      'ENOTBLK': 105,\n      'EBUSY': 10,\n      'EEXIST': 20,\n      'EXDEV': 75,\n      'ENODEV': 43,\n      'ENOTDIR': 54,\n      'EISDIR': 31,\n      'EINVAL': 28,\n      'ENFILE': 41,\n      'EMFILE': 33,\n      'ENOTTY': 59,\n      'ETXTBSY': 74,\n      'EFBIG': 22,\n      'ENOSPC': 51,\n      'ESPIPE': 70,\n      'EROFS': 69,\n      'EMLINK': 34,\n      'EPIPE': 64,\n      'EDOM': 18,\n      'ERANGE': 68,\n      'ENOMSG': 49,\n      'EIDRM': 24,\n      'ECHRNG': 106,\n      'EL2NSYNC': 156,\n      'EL3HLT': 107,\n      'EL3RST': 108,\n      'ELNRNG': 109,\n      'EUNATCH': 110,\n      'ENOCSI': 111,\n      'EL2HLT': 112,\n      'EDEADLK': 16,\n      'ENOLCK': 46,\n      'EBADE': 113,\n      'EBADR': 114,\n      'EXFULL': 115,\n      'ENOANO': 104,\n      'EBADRQC': 103,\n      'EBADSLT': 102,\n      'EDEADLOCK': 16,\n      'EBFONT': 101,\n      'ENOSTR': 100,\n      'ENODATA': 116,\n      'ETIME': 117,\n      'ENOSR': 118,\n      'ENONET': 119,\n      'ENOPKG': 120,\n      'EREMOTE': 121,\n      'ENOLINK': 47,\n      'EADV': 122,\n      'ESRMNT': 123,\n      'ECOMM': 124,\n      'EPROTO': 65,\n      'EMULTIHOP': 36,\n      'EDOTDOT': 125,\n      'EBADMSG': 9,\n      'ENOTUNIQ': 126,\n      'EBADFD': 127,\n      'EREMCHG': 128,\n      'ELIBACC': 129,\n      'ELIBBAD': 130,\n      'ELIBSCN': 131,\n      'ELIBMAX': 132,\n      'ELIBEXEC': 133,\n      'ENOSYS': 52,\n      'ENOTEMPTY': 55,\n      'ENAMETOOLONG': 37,\n      'ELOOP': 32,\n      'EOPNOTSUPP': 138,\n      'EPFNOSUPPORT': 139,\n      'ECONNRESET': 15,\n      'ENOBUFS': 42,\n      'EAFNOSUPPORT': 5,\n      'EPROTOTYPE': 67,\n      'ENOTSOCK': 57,\n      'ENOPROTOOPT': 50,\n      'ESHUTDOWN': 140,\n      'ECONNREFUSED': 14,\n      'EADDRINUSE': 3,\n      'ECONNABORTED': 13,\n      'ENETUNREACH': 40,\n      'ENETDOWN': 38,\n      'ETIMEDOUT': 73,\n      'EHOSTDOWN': 142,\n      'EHOSTUNREACH': 23,\n      'EINPROGRESS': 26,\n      'EALREADY': 7,\n      'EDESTADDRREQ': 17,\n      'EMSGSIZE': 35,\n      'EPROTONOSUPPORT': 66,\n      'ESOCKTNOSUPPORT': 137,\n      'EADDRNOTAVAIL': 4,\n      'ENETRESET': 39,\n      'EISCONN': 30,\n      'ENOTCONN': 53,\n      'ETOOMANYREFS': 141,\n      'EUSERS': 136,\n      'EDQUOT': 19,\n      'ESTALE': 72,\n      'ENOTSUP': 138,\n      'ENOMEDIUM': 148,\n      'EILSEQ': 25,\n      'EOVERFLOW': 61,\n      'ECANCELED': 11,\n      'ENOTRECOVERABLE': 56,\n      'EOWNERDEAD': 62,\n      'ESTRPIPE': 135,\n    };\n  \n  var asyncLoad = async (url) => {\n      var arrayBuffer = await readAsync(url);\n      assert(arrayBuffer, `Loading data file \"${url}\" failed (no arrayBuffer).`);\n      return new Uint8Array(arrayBuffer);\n    };\n  \n  \n  var FS_createDataFile = (...args) => FS.createDataFile(...args);\n  \n  var getUniqueRunDependency = (id) => {\n      var orig = id;\n      while (1) {\n        if (!runDependencyTracking[id]) return id;\n        id = orig + Math.random();\n      }\n    };\n  \n  var runDependencies = 0;\n  \n  \n  var dependenciesFulfilled = null;\n  \n  var runDependencyTracking = {\n  };\n  \n  var runDependencyWatcher = null;\n  var removeRunDependency = (id) => {\n      runDependencies--;\n  \n      Module['monitorRunDependencies']?.(runDependencies);\n  \n      assert(id, 'removeRunDependency requires an ID');\n      assert(runDependencyTracking[id]);\n      delete runDependencyTracking[id];\n      if (runDependencies == 0) {\n        if (runDependencyWatcher !== null) {\n          clearInterval(runDependencyWatcher);\n          runDependencyWatcher = null;\n        }\n        if (dependenciesFulfilled) {\n          var callback = dependenciesFulfilled;\n          dependenciesFulfilled = null;\n          callback(); // can add another dependenciesFulfilled\n        }\n      }\n    };\n  \n  \n  var addRunDependency = (id) => {\n      runDependencies++;\n  \n      Module['monitorRunDependencies']?.(runDependencies);\n  \n      assert(id, 'addRunDependency requires an ID')\n      assert(!runDependencyTracking[id]);\n      runDependencyTracking[id] = 1;\n      if (runDependencyWatcher === null && globalThis.setInterval) {\n        // Check for missing dependencies every few seconds\n        runDependencyWatcher = setInterval(() => {\n          if (ABORT) {\n            clearInterval(runDependencyWatcher);\n            runDependencyWatcher = null;\n            return;\n          }\n          var shown = false;\n          for (var dep in runDependencyTracking) {\n            if (!shown) {\n              shown = true;\n              err('still waiting on run dependencies:');\n            }\n            err(`dependency: ${dep}`);\n          }\n          if (shown) {\n            err('(end of list)');\n          }\n        }, 10000);\n        // Prevent this timer from keeping the runtime alive if nothing\n        // else is.\n        runDependencyWatcher.unref?.()\n      }\n    };\n  \n  \n  var preloadPlugins = [];\n  var FS_handledByPreloadPlugin = async (byteArray, fullname) => {\n      // Ensure plugins are ready.\n      if (typeof Browser != 'undefined') Browser.init();\n  \n      for (var plugin of preloadPlugins) {\n        if (plugin['canHandle'](fullname)) {\n          assert(plugin['handle'].constructor.name === 'AsyncFunction', 'Filesystem plugin handlers must be async functions (See #24914)')\n          return plugin['handle'](byteArray, fullname);\n        }\n      }\n      // In no plugin handled this file then return the original/unmodified\n      // byteArray.\n      return byteArray;\n    };\n  var FS_preloadFile = async (parent, name, url, canRead, canWrite, dontCreateFile, canOwn, preFinish) => {\n      // TODO we should allow people to just pass in a complete filename instead\n      // of parent and name being that we just join them anyways\n      var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent;\n      var dep = getUniqueRunDependency(`cp ${fullname}`); // might have several active requests for the same fullname\n      addRunDependency(dep);\n  \n      try {\n        var byteArray = url;\n        if (typeof url == 'string') {\n          byteArray = await asyncLoad(url);\n        }\n  \n        byteArray = await FS_handledByPreloadPlugin(byteArray, fullname);\n        preFinish?.();\n        if (!dontCreateFile) {\n          FS_createDataFile(parent, name, byteArray, canRead, canWrite, canOwn);\n        }\n      } finally {\n        removeRunDependency(dep);\n      }\n    };\n  var FS_createPreloadedFile = (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) => {\n      FS_preloadFile(parent, name, url, canRead, canWrite, dontCreateFile, canOwn, preFinish).then(onload).catch(onerror);\n    };\n  var FS = {\n  root:null,\n  mounts:[],\n  devices:{\n  },\n  streams:[],\n  nextInode:1,\n  nameTable:null,\n  currentPath:\"/\",\n  initialized:false,\n  ignorePermissions:true,\n  filesystems:null,\n  syncFSRequests:0,\n  readFiles:{\n  },\n  ErrnoError:class extends Error {\n        name = 'ErrnoError';\n        // We set the `name` property to be able to identify `FS.ErrnoError`\n        // - the `name` is a standard ECMA-262 property of error objects. Kind of good to have it anyway.\n        // - when using PROXYFS, an error can come from an underlying FS\n        // as different FS objects have their own FS.ErrnoError each,\n        // the test `err instanceof FS.ErrnoError` won't detect an error coming from another filesystem, causing bugs.\n        // we'll use the reliable test `err.name == \"ErrnoError\"` instead\n        constructor(errno) {\n          super(runtimeInitialized ? strError(errno) : '');\n          this.errno = errno;\n          for (var key in ERRNO_CODES) {\n            if (ERRNO_CODES[key] === errno) {\n              this.code = key;\n              break;\n            }\n          }\n        }\n      },\n  FSStream:class {\n        shared = {};\n        get object() {\n          return this.node;\n        }\n        set object(val) {\n          this.node = val;\n        }\n        get isRead() {\n          return (this.flags & 2097155) !== 1;\n        }\n        get isWrite() {\n          return (this.flags & 2097155) !== 0;\n        }\n        get isAppend() {\n          return (this.flags & 1024);\n        }\n        get flags() {\n          return this.shared.flags;\n        }\n        set flags(val) {\n          this.shared.flags = val;\n        }\n        get position() {\n          return this.shared.position;\n        }\n        set position(val) {\n          this.shared.position = val;\n        }\n      },\n  FSNode:class {\n        node_ops = {};\n        stream_ops = {};\n        readMode = 292 | 73;\n        writeMode = 146;\n        mounted = null;\n        constructor(parent, name, mode, rdev) {\n          if (!parent) {\n            parent = this;  // root node sets parent to itself\n          }\n          this.parent = parent;\n          this.mount = parent.mount;\n          this.id = FS.nextInode++;\n          this.name = name;\n          this.mode = mode;\n          this.rdev = rdev;\n          this.atime = this.mtime = this.ctime = Date.now();\n        }\n        get read() {\n          return (this.mode & this.readMode) === this.readMode;\n        }\n        set read(val) {\n          val ? this.mode |= this.readMode : this.mode &= ~this.readMode;\n        }\n        get write() {\n          return (this.mode & this.writeMode) === this.writeMode;\n        }\n        set write(val) {\n          val ? this.mode |= this.writeMode : this.mode &= ~this.writeMode;\n        }\n        get isFolder() {\n          return FS.isDir(this.mode);\n        }\n        get isDevice() {\n          return FS.isChrdev(this.mode);\n        }\n      },\n  lookupPath(path, opts = {}) {\n        if (!path) {\n          throw new FS.ErrnoError(44);\n        }\n        opts.follow_mount ??= true\n  \n        if (!PATH.isAbs(path)) {\n          path = FS.cwd() + '/' + path;\n        }\n  \n        // limit max consecutive symlinks to 40 (SYMLOOP_MAX).\n        linkloop: for (var nlinks = 0; nlinks < 40; nlinks++) {\n          // split the absolute path\n          var parts = path.split('/').filter((p) => !!p);\n  \n          // start at the root\n          var current = FS.root;\n          var current_path = '/';\n  \n          for (var i = 0; i < parts.length; i++) {\n            var islast = (i === parts.length-1);\n            if (islast && opts.parent) {\n              // stop resolving\n              break;\n            }\n  \n            if (parts[i] === '.') {\n              continue;\n            }\n  \n            if (parts[i] === '..') {\n              current_path = PATH.dirname(current_path);\n              if (FS.isRoot(current)) {\n                path = current_path + '/' + parts.slice(i + 1).join('/');\n                // We're making progress here, don't let many consecutive ..'s\n                // lead to ELOOP\n                nlinks--;\n                continue linkloop;\n              } else {\n                current = current.parent;\n              }\n              continue;\n            }\n  \n            current_path = PATH.join2(current_path, parts[i]);\n            try {\n              current = FS.lookupNode(current, parts[i]);\n            } catch (e) {\n              // if noent_okay is true, suppress a ENOENT in the last component\n              // and return an object with an undefined node. This is needed for\n              // resolving symlinks in the path when creating a file.\n              if ((e?.errno === 44) && islast && opts.noent_okay) {\n                return { path: current_path };\n              }\n              throw e;\n            }\n  \n            // jump to the mount's root node if this is a mountpoint\n            if (FS.isMountpoint(current) && (!islast || opts.follow_mount)) {\n              current = current.mounted.root;\n            }\n  \n            // by default, lookupPath will not follow a symlink if it is the final path component.\n            // setting opts.follow = true will override this behavior.\n            if (FS.isLink(current.mode) && (!islast || opts.follow)) {\n              if (!current.node_ops.readlink) {\n                throw new FS.ErrnoError(52);\n              }\n              var link = current.node_ops.readlink(current);\n              if (!PATH.isAbs(link)) {\n                link = PATH.dirname(current_path) + '/' + link;\n              }\n              path = link + '/' + parts.slice(i + 1).join('/');\n              continue linkloop;\n            }\n          }\n          return { path: current_path, node: current };\n        }\n        throw new FS.ErrnoError(32);\n      },\n  getPath(node) {\n        var path;\n        while (true) {\n          if (FS.isRoot(node)) {\n            var mount = node.mount.mountpoint;\n            if (!path) return mount;\n            return mount[mount.length-1] !== '/' ? `${mount}/${path}` : mount + path;\n          }\n          path = path ? `${node.name}/${path}` : node.name;\n          node = node.parent;\n        }\n      },\n  hashName(parentid, name) {\n        var hash = 0;\n  \n        for (var i = 0; i < name.length; i++) {\n          hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0;\n        }\n        return ((parentid + hash) >>> 0) % FS.nameTable.length;\n      },\n  hashAddNode(node) {\n        var hash = FS.hashName(node.parent.id, node.name);\n        node.name_next = FS.nameTable[hash];\n        FS.nameTable[hash] = node;\n      },\n  hashRemoveNode(node) {\n        var hash = FS.hashName(node.parent.id, node.name);\n        if (FS.nameTable[hash] === node) {\n          FS.nameTable[hash] = node.name_next;\n        } else {\n          var current = FS.nameTable[hash];\n          while (current) {\n            if (current.name_next === node) {\n              current.name_next = node.name_next;\n              break;\n            }\n            current = current.name_next;\n          }\n        }\n      },\n  lookupNode(parent, name) {\n        var errCode = FS.mayLookup(parent);\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        var hash = FS.hashName(parent.id, name);\n        for (var node = FS.nameTable[hash]; node; node = node.name_next) {\n          var nodeName = node.name;\n          if (node.parent.id === parent.id && nodeName === name) {\n            return node;\n          }\n        }\n        // if we failed to find it in the cache, call into the VFS\n        return FS.lookup(parent, name);\n      },\n  createNode(parent, name, mode, rdev) {\n        assert(typeof parent == 'object')\n        var node = new FS.FSNode(parent, name, mode, rdev);\n  \n        FS.hashAddNode(node);\n  \n        return node;\n      },\n  destroyNode(node) {\n        FS.hashRemoveNode(node);\n      },\n  isRoot(node) {\n        return node === node.parent;\n      },\n  isMountpoint(node) {\n        return !!node.mounted;\n      },\n  isFile(mode) {\n        return (mode & 61440) === 32768;\n      },\n  isDir(mode) {\n        return (mode & 61440) === 16384;\n      },\n  isLink(mode) {\n        return (mode & 61440) === 40960;\n      },\n  isChrdev(mode) {\n        return (mode & 61440) === 8192;\n      },\n  isBlkdev(mode) {\n        return (mode & 61440) === 24576;\n      },\n  isFIFO(mode) {\n        return (mode & 61440) === 4096;\n      },\n  isSocket(mode) {\n        return (mode & 49152) === 49152;\n      },\n  flagsToPermissionString(flag) {\n        var perms = ['r', 'w', 'rw'][flag & 3];\n        if ((flag & 512)) {\n          perms += 'w';\n        }\n        return perms;\n      },\n  nodePermissions(node, perms) {\n        if (FS.ignorePermissions) {\n          return 0;\n        }\n        // return 0 if any user, group or owner bits are set.\n        if (perms.includes('r') && !(node.mode & 292)) {\n          return 2;\n        } else if (perms.includes('w') && !(node.mode & 146)) {\n          return 2;\n        } else if (perms.includes('x') && !(node.mode & 73)) {\n          return 2;\n        }\n        return 0;\n      },\n  mayLookup(dir) {\n        if (!FS.isDir(dir.mode)) return 54;\n        var errCode = FS.nodePermissions(dir, 'x');\n        if (errCode) return errCode;\n        if (!dir.node_ops.lookup) return 2;\n        return 0;\n      },\n  mayCreate(dir, name) {\n        if (!FS.isDir(dir.mode)) {\n          return 54;\n        }\n        try {\n          var node = FS.lookupNode(dir, name);\n          return 20;\n        } catch (e) {\n        }\n        return FS.nodePermissions(dir, 'wx');\n      },\n  mayDelete(dir, name, isdir) {\n        var node;\n        try {\n          node = FS.lookupNode(dir, name);\n        } catch (e) {\n          return e.errno;\n        }\n        var errCode = FS.nodePermissions(dir, 'wx');\n        if (errCode) {\n          return errCode;\n        }\n        if (isdir) {\n          if (!FS.isDir(node.mode)) {\n            return 54;\n          }\n          if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) {\n            return 10;\n          }\n        } else {\n          if (FS.isDir(node.mode)) {\n            return 31;\n          }\n        }\n        return 0;\n      },\n  mayOpen(node, flags) {\n        if (!node) {\n          return 44;\n        }\n        if (FS.isLink(node.mode)) {\n          return 32;\n        } else if (FS.isDir(node.mode)) {\n          if (FS.flagsToPermissionString(flags) !== 'r' // opening for write\n              || (flags & (512 | 64))) { // TODO: check for O_SEARCH? (== search for dir only)\n            return 31;\n          }\n        }\n        return FS.nodePermissions(node, FS.flagsToPermissionString(flags));\n      },\n  checkOpExists(op, err) {\n        if (!op) {\n          throw new FS.ErrnoError(err);\n        }\n        return op;\n      },\n  MAX_OPEN_FDS:4096,\n  nextfd() {\n        for (var fd = 0; fd <= FS.MAX_OPEN_FDS; fd++) {\n          if (!FS.streams[fd]) {\n            return fd;\n          }\n        }\n        throw new FS.ErrnoError(33);\n      },\n  getStreamChecked(fd) {\n        var stream = FS.getStream(fd);\n        if (!stream) {\n          throw new FS.ErrnoError(8);\n        }\n        return stream;\n      },\n  getStream:(fd) => FS.streams[fd],\n  createStream(stream, fd = -1) {\n        assert(fd >= -1);\n  \n        // clone it, so we can return an instance of FSStream\n        stream = Object.assign(new FS.FSStream(), stream);\n        if (fd == -1) {\n          fd = FS.nextfd();\n        }\n        stream.fd = fd;\n        FS.streams[fd] = stream;\n        return stream;\n      },\n  closeStream(fd) {\n        FS.streams[fd] = null;\n      },\n  dupStream(origStream, fd = -1) {\n        var stream = FS.createStream(origStream, fd);\n        stream.stream_ops?.dup?.(stream);\n        return stream;\n      },\n  doSetAttr(stream, node, attr) {\n        var setattr = stream?.stream_ops.setattr;\n        var arg = setattr ? stream : node;\n        setattr ??= node.node_ops.setattr;\n        FS.checkOpExists(setattr, 63)\n        setattr(arg, attr);\n      },\n  chrdev_stream_ops:{\n  open(stream) {\n          var device = FS.getDevice(stream.node.rdev);\n          // override node's stream ops with the device's\n          stream.stream_ops = device.stream_ops;\n          // forward the open call\n          stream.stream_ops.open?.(stream);\n        },\n  llseek() {\n          throw new FS.ErrnoError(70);\n        },\n  },\n  major:(dev) => ((dev) >> 8),\n  minor:(dev) => ((dev) & 0xff),\n  makedev:(ma, mi) => ((ma) << 8 | (mi)),\n  registerDevice(dev, ops) {\n        FS.devices[dev] = { stream_ops: ops };\n      },\n  getDevice:(dev) => FS.devices[dev],\n  getMounts(mount) {\n        var mounts = [];\n        var check = [mount];\n  \n        while (check.length) {\n          var m = check.pop();\n  \n          mounts.push(m);\n  \n          check.push(...m.mounts);\n        }\n  \n        return mounts;\n      },\n  syncfs(populate, callback) {\n        if (typeof populate == 'function') {\n          callback = populate;\n          populate = false;\n        }\n  \n        FS.syncFSRequests++;\n  \n        if (FS.syncFSRequests > 1) {\n          err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);\n        }\n  \n        var mounts = FS.getMounts(FS.root.mount);\n        var completed = 0;\n  \n        function doCallback(errCode) {\n          assert(FS.syncFSRequests > 0);\n          FS.syncFSRequests--;\n          return callback(errCode);\n        }\n  \n        function done(errCode) {\n          if (errCode) {\n            if (!done.errored) {\n              done.errored = true;\n              return doCallback(errCode);\n            }\n            return;\n          }\n          if (++completed >= mounts.length) {\n            doCallback(null);\n          }\n        };\n  \n        // sync all mounts\n        for (var mount of mounts) {\n          if (mount.type.syncfs) {\n            mount.type.syncfs(mount, populate, done);\n          } else {\n            done(null);\n          }\n        }\n      },\n  mount(type, opts, mountpoint) {\n        if (typeof type == 'string') {\n          // The filesystem was not included, and instead we have an error\n          // message stored in the variable.\n          throw type;\n        }\n        var root = mountpoint === '/';\n        var pseudo = !mountpoint;\n        var node;\n  \n        if (root && FS.root) {\n          throw new FS.ErrnoError(10);\n        } else if (!root && !pseudo) {\n          var lookup = FS.lookupPath(mountpoint, { follow_mount: false });\n  \n          mountpoint = lookup.path;  // use the absolute path\n          node = lookup.node;\n  \n          if (FS.isMountpoint(node)) {\n            throw new FS.ErrnoError(10);\n          }\n  \n          if (!FS.isDir(node.mode)) {\n            throw new FS.ErrnoError(54);\n          }\n        }\n  \n        var mount = {\n          type,\n          opts,\n          mountpoint,\n          mounts: []\n        };\n  \n        // create a root node for the fs\n        var mountRoot = type.mount(mount);\n        mountRoot.mount = mount;\n        mount.root = mountRoot;\n  \n        if (root) {\n          FS.root = mountRoot;\n        } else if (node) {\n          // set as a mountpoint\n          node.mounted = mount;\n  \n          // add the new mount to the current mount's children\n          if (node.mount) {\n            node.mount.mounts.push(mount);\n          }\n        }\n  \n        return mountRoot;\n      },\n  unmount(mountpoint) {\n        var lookup = FS.lookupPath(mountpoint, { follow_mount: false });\n  \n        if (!FS.isMountpoint(lookup.node)) {\n          throw new FS.ErrnoError(28);\n        }\n  \n        // destroy the nodes for this mount, and all its child mounts\n        var node = lookup.node;\n        var mount = node.mounted;\n        var mounts = FS.getMounts(mount);\n  \n        for (var [hash, current] of Object.entries(FS.nameTable)) {\n          while (current) {\n            var next = current.name_next;\n  \n            if (mounts.includes(current.mount)) {\n              FS.destroyNode(current);\n            }\n  \n            current = next;\n          }\n        }\n  \n        // no longer a mountpoint\n        node.mounted = null;\n  \n        // remove this mount from the child mounts\n        var idx = node.mount.mounts.indexOf(mount);\n        assert(idx !== -1);\n        node.mount.mounts.splice(idx, 1);\n      },\n  lookup(parent, name) {\n        return parent.node_ops.lookup(parent, name);\n      },\n  mknod(path, mode, dev) {\n        var lookup = FS.lookupPath(path, { parent: true });\n        var parent = lookup.node;\n        var name = PATH.basename(path);\n        if (!name) {\n          throw new FS.ErrnoError(28);\n        }\n        if (name === '.' || name === '..') {\n          throw new FS.ErrnoError(20);\n        }\n        var errCode = FS.mayCreate(parent, name);\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        if (!parent.node_ops.mknod) {\n          throw new FS.ErrnoError(63);\n        }\n        return parent.node_ops.mknod(parent, name, mode, dev);\n      },\n  statfs(path) {\n        return FS.statfsNode(FS.lookupPath(path, {follow: true}).node);\n      },\n  statfsStream(stream) {\n        // We keep a separate statfsStream function because noderawfs overrides\n        // it. In noderawfs, stream.node is sometimes null. Instead, we need to\n        // look at stream.path.\n        return FS.statfsNode(stream.node);\n      },\n  statfsNode(node) {\n        // NOTE: None of the defaults here are true. We're just returning safe and\n        //       sane values. Currently nodefs and rawfs replace these defaults,\n        //       other file systems leave them alone.\n        var rtn = {\n          bsize: 4096,\n          frsize: 4096,\n          blocks: 1e6,\n          bfree: 5e5,\n          bavail: 5e5,\n          files: FS.nextInode,\n          ffree: FS.nextInode - 1,\n          fsid: 42,\n          flags: 2,\n          namelen: 255,\n        };\n  \n        if (node.node_ops.statfs) {\n          Object.assign(rtn, node.node_ops.statfs(node.mount.opts.root));\n        }\n        return rtn;\n      },\n  create(path, mode = 0o666) {\n        mode &= 4095;\n        mode |= 32768;\n        return FS.mknod(path, mode, 0);\n      },\n  mkdir(path, mode = 0o777) {\n        mode &= 511 | 512;\n        mode |= 16384;\n        return FS.mknod(path, mode, 0);\n      },\n  mkdirTree(path, mode) {\n        var dirs = path.split('/');\n        var d = '';\n        for (var dir of dirs) {\n          if (!dir) continue;\n          if (d || PATH.isAbs(path)) d += '/';\n          d += dir;\n          try {\n            FS.mkdir(d, mode);\n          } catch(e) {\n            if (e.errno != 20) throw e;\n          }\n        }\n      },\n  mkdev(path, mode, dev) {\n        if (typeof dev == 'undefined') {\n          dev = mode;\n          mode = 0o666;\n        }\n        mode |= 8192;\n        return FS.mknod(path, mode, dev);\n      },\n  symlink(oldpath, newpath) {\n        if (!PATH_FS.resolve(oldpath)) {\n          throw new FS.ErrnoError(44);\n        }\n        var lookup = FS.lookupPath(newpath, { parent: true });\n        var parent = lookup.node;\n        if (!parent) {\n          throw new FS.ErrnoError(44);\n        }\n        var newname = PATH.basename(newpath);\n        var errCode = FS.mayCreate(parent, newname);\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        if (!parent.node_ops.symlink) {\n          throw new FS.ErrnoError(63);\n        }\n        return parent.node_ops.symlink(parent, newname, oldpath);\n      },\n  rename(old_path, new_path) {\n        var old_dirname = PATH.dirname(old_path);\n        var new_dirname = PATH.dirname(new_path);\n        var old_name = PATH.basename(old_path);\n        var new_name = PATH.basename(new_path);\n        // parents must exist\n        var lookup, old_dir, new_dir;\n  \n        // let the errors from non existent directories percolate up\n        lookup = FS.lookupPath(old_path, { parent: true });\n        old_dir = lookup.node;\n        lookup = FS.lookupPath(new_path, { parent: true });\n        new_dir = lookup.node;\n  \n        if (!old_dir || !new_dir) throw new FS.ErrnoError(44);\n        // need to be part of the same mount\n        if (old_dir.mount !== new_dir.mount) {\n          throw new FS.ErrnoError(75);\n        }\n        // source must exist\n        var old_node = FS.lookupNode(old_dir, old_name);\n        // old path should not be an ancestor of the new path\n        var relative = PATH_FS.relative(old_path, new_dirname);\n        if (relative.charAt(0) !== '.') {\n          throw new FS.ErrnoError(28);\n        }\n        // new path should not be an ancestor of the old path\n        relative = PATH_FS.relative(new_path, old_dirname);\n        if (relative.charAt(0) !== '.') {\n          throw new FS.ErrnoError(55);\n        }\n        // see if the new path already exists\n        var new_node;\n        try {\n          new_node = FS.lookupNode(new_dir, new_name);\n        } catch (e) {\n          // not fatal\n        }\n        // early out if nothing needs to change\n        if (old_node === new_node) {\n          return;\n        }\n        // we'll need to delete the old entry\n        var isdir = FS.isDir(old_node.mode);\n        var errCode = FS.mayDelete(old_dir, old_name, isdir);\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        // need delete permissions if we'll be overwriting.\n        // need create permissions if new doesn't already exist.\n        errCode = new_node ?\n          FS.mayDelete(new_dir, new_name, isdir) :\n          FS.mayCreate(new_dir, new_name);\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        if (!old_dir.node_ops.rename) {\n          throw new FS.ErrnoError(63);\n        }\n        if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) {\n          throw new FS.ErrnoError(10);\n        }\n        // if we are going to change the parent, check write permissions\n        if (new_dir !== old_dir) {\n          errCode = FS.nodePermissions(old_dir, 'w');\n          if (errCode) {\n            throw new FS.ErrnoError(errCode);\n          }\n        }\n        // remove the node from the lookup hash\n        FS.hashRemoveNode(old_node);\n        // do the underlying fs rename\n        try {\n          old_dir.node_ops.rename(old_node, new_dir, new_name);\n          // update old node (we do this here to avoid each backend\n          // needing to)\n          old_node.parent = new_dir;\n        } catch (e) {\n          throw e;\n        } finally {\n          // add the node back to the hash (in case node_ops.rename\n          // changed its name)\n          FS.hashAddNode(old_node);\n        }\n      },\n  rmdir(path) {\n        var lookup = FS.lookupPath(path, { parent: true });\n        var parent = lookup.node;\n        var name = PATH.basename(path);\n        var node = FS.lookupNode(parent, name);\n        var errCode = FS.mayDelete(parent, name, true);\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        if (!parent.node_ops.rmdir) {\n          throw new FS.ErrnoError(63);\n        }\n        if (FS.isMountpoint(node)) {\n          throw new FS.ErrnoError(10);\n        }\n        parent.node_ops.rmdir(parent, name);\n        FS.destroyNode(node);\n      },\n  readdir(path) {\n        var lookup = FS.lookupPath(path, { follow: true });\n        var node = lookup.node;\n        var readdir = FS.checkOpExists(node.node_ops.readdir, 54);\n        return readdir(node);\n      },\n  unlink(path) {\n        var lookup = FS.lookupPath(path, { parent: true });\n        var parent = lookup.node;\n        if (!parent) {\n          throw new FS.ErrnoError(44);\n        }\n        var name = PATH.basename(path);\n        var node = FS.lookupNode(parent, name);\n        var errCode = FS.mayDelete(parent, name, false);\n        if (errCode) {\n          // According to POSIX, we should map EISDIR to EPERM, but\n          // we instead do what Linux does (and we must, as we use\n          // the musl linux libc).\n          throw new FS.ErrnoError(errCode);\n        }\n        if (!parent.node_ops.unlink) {\n          throw new FS.ErrnoError(63);\n        }\n        if (FS.isMountpoint(node)) {\n          throw new FS.ErrnoError(10);\n        }\n        parent.node_ops.unlink(parent, name);\n        FS.destroyNode(node);\n      },\n  readlink(path) {\n        var lookup = FS.lookupPath(path);\n        var link = lookup.node;\n        if (!link) {\n          throw new FS.ErrnoError(44);\n        }\n        if (!link.node_ops.readlink) {\n          throw new FS.ErrnoError(28);\n        }\n        return link.node_ops.readlink(link);\n      },\n  stat(path, dontFollow) {\n        var lookup = FS.lookupPath(path, { follow: !dontFollow });\n        var node = lookup.node;\n        var getattr = FS.checkOpExists(node.node_ops.getattr, 63);\n        return getattr(node);\n      },\n  fstat(fd) {\n        var stream = FS.getStreamChecked(fd);\n        var node = stream.node;\n        var getattr = stream.stream_ops.getattr;\n        var arg = getattr ? stream : node;\n        getattr ??= node.node_ops.getattr;\n        FS.checkOpExists(getattr, 63)\n        return getattr(arg);\n      },\n  lstat(path) {\n        return FS.stat(path, true);\n      },\n  doChmod(stream, node, mode, dontFollow) {\n        FS.doSetAttr(stream, node, {\n          mode: (mode & 4095) | (node.mode & ~4095),\n          ctime: Date.now(),\n          dontFollow\n        });\n      },\n  chmod(path, mode, dontFollow) {\n        var node;\n        if (typeof path == 'string') {\n          var lookup = FS.lookupPath(path, { follow: !dontFollow });\n          node = lookup.node;\n        } else {\n          node = path;\n        }\n        FS.doChmod(null, node, mode, dontFollow);\n      },\n  lchmod(path, mode) {\n        FS.chmod(path, mode, true);\n      },\n  fchmod(fd, mode) {\n        var stream = FS.getStreamChecked(fd);\n        FS.doChmod(stream, stream.node, mode, false);\n      },\n  doChown(stream, node, dontFollow) {\n        FS.doSetAttr(stream, node, {\n          timestamp: Date.now(),\n          dontFollow\n          // we ignore the uid / gid for now\n        });\n      },\n  chown(path, uid, gid, dontFollow) {\n        var node;\n        if (typeof path == 'string') {\n          var lookup = FS.lookupPath(path, { follow: !dontFollow });\n          node = lookup.node;\n        } else {\n          node = path;\n        }\n        FS.doChown(null, node, dontFollow);\n      },\n  lchown(path, uid, gid) {\n        FS.chown(path, uid, gid, true);\n      },\n  fchown(fd, uid, gid) {\n        var stream = FS.getStreamChecked(fd);\n        FS.doChown(stream, stream.node, false);\n      },\n  doTruncate(stream, node, len) {\n        if (FS.isDir(node.mode)) {\n          throw new FS.ErrnoError(31);\n        }\n        if (!FS.isFile(node.mode)) {\n          throw new FS.ErrnoError(28);\n        }\n        var errCode = FS.nodePermissions(node, 'w');\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        FS.doSetAttr(stream, node, {\n          size: len,\n          timestamp: Date.now()\n        });\n      },\n  truncate(path, len) {\n        if (len < 0) {\n          throw new FS.ErrnoError(28);\n        }\n        var node;\n        if (typeof path == 'string') {\n          var lookup = FS.lookupPath(path, { follow: true });\n          node = lookup.node;\n        } else {\n          node = path;\n        }\n        FS.doTruncate(null, node, len);\n      },\n  ftruncate(fd, len) {\n        var stream = FS.getStreamChecked(fd);\n        if (len < 0 || (stream.flags & 2097155) === 0) {\n          throw new FS.ErrnoError(28);\n        }\n        FS.doTruncate(stream, stream.node, len);\n      },\n  utime(path, atime, mtime) {\n        var lookup = FS.lookupPath(path, { follow: true });\n        var node = lookup.node;\n        var setattr = FS.checkOpExists(node.node_ops.setattr, 63);\n        setattr(node, {\n          atime: atime,\n          mtime: mtime\n        });\n      },\n  open(path, flags, mode = 0o666) {\n        if (path === \"\") {\n          throw new FS.ErrnoError(44);\n        }\n        flags = typeof flags == 'string' ? FS_modeStringToFlags(flags) : flags;\n        if ((flags & 64)) {\n          mode = (mode & 4095) | 32768;\n        } else {\n          mode = 0;\n        }\n        var node;\n        var isDirPath;\n        if (typeof path == 'object') {\n          node = path;\n        } else {\n          isDirPath = path.endsWith(\"/\");\n          // noent_okay makes it so that if the final component of the path\n          // doesn't exist, lookupPath returns `node: undefined`. `path` will be\n          // updated to point to the target of all symlinks.\n          var lookup = FS.lookupPath(path, {\n            follow: !(flags & 131072),\n            noent_okay: true\n          });\n          node = lookup.node;\n          path = lookup.path;\n        }\n        // perhaps we need to create the node\n        var created = false;\n        if ((flags & 64)) {\n          if (node) {\n            // if O_CREAT and O_EXCL are set, error out if the node already exists\n            if ((flags & 128)) {\n              throw new FS.ErrnoError(20);\n            }\n          } else if (isDirPath) {\n            throw new FS.ErrnoError(31);\n          } else {\n            // node doesn't exist, try to create it\n            // Ignore the permission bits here to ensure we can `open` this new\n            // file below. We use chmod below the apply the permissions once the\n            // file is open.\n            node = FS.mknod(path, mode | 0o777, 0);\n            created = true;\n          }\n        }\n        if (!node) {\n          throw new FS.ErrnoError(44);\n        }\n        // can't truncate a device\n        if (FS.isChrdev(node.mode)) {\n          flags &= ~512;\n        }\n        // if asked only for a directory, then this must be one\n        if ((flags & 65536) && !FS.isDir(node.mode)) {\n          throw new FS.ErrnoError(54);\n        }\n        // check permissions, if this is not a file we just created now (it is ok to\n        // create and write to a file with read-only permissions; it is read-only\n        // for later use)\n        if (!created) {\n          var errCode = FS.mayOpen(node, flags);\n          if (errCode) {\n            throw new FS.ErrnoError(errCode);\n          }\n        }\n        // do truncation if necessary\n        if ((flags & 512) && !created) {\n          FS.truncate(node, 0);\n        }\n        // we've already handled these, don't pass down to the underlying vfs\n        flags &= ~(128 | 512 | 131072);\n  \n        // register the stream with the filesystem\n        var stream = FS.createStream({\n          node,\n          path: FS.getPath(node),  // we want the absolute path to the node\n          flags,\n          seekable: true,\n          position: 0,\n          stream_ops: node.stream_ops,\n          // used by the file family libc calls (fopen, fwrite, ferror, etc.)\n          ungotten: [],\n          error: false\n        });\n        // call the new stream's open function\n        if (stream.stream_ops.open) {\n          stream.stream_ops.open(stream);\n        }\n        if (created) {\n          FS.chmod(node, mode & 0o777);\n        }\n        if (Module['logReadFiles'] && !(flags & 1)) {\n          if (!(path in FS.readFiles)) {\n            FS.readFiles[path] = 1;\n          }\n        }\n        return stream;\n      },\n  close(stream) {\n        if (FS.isClosed(stream)) {\n          throw new FS.ErrnoError(8);\n        }\n        if (stream.getdents) stream.getdents = null; // free readdir state\n        try {\n          if (stream.stream_ops.close) {\n            stream.stream_ops.close(stream);\n          }\n        } catch (e) {\n          throw e;\n        } finally {\n          FS.closeStream(stream.fd);\n        }\n        stream.fd = null;\n      },\n  isClosed(stream) {\n        return stream.fd === null;\n      },\n  llseek(stream, offset, whence) {\n        if (FS.isClosed(stream)) {\n          throw new FS.ErrnoError(8);\n        }\n        if (!stream.seekable || !stream.stream_ops.llseek) {\n          throw new FS.ErrnoError(70);\n        }\n        if (whence != 0 && whence != 1 && whence != 2) {\n          throw new FS.ErrnoError(28);\n        }\n        stream.position = stream.stream_ops.llseek(stream, offset, whence);\n        stream.ungotten = [];\n        return stream.position;\n      },\n  read(stream, buffer, offset, length, position) {\n        assert(offset >= 0);\n        if (length < 0 || position < 0) {\n          throw new FS.ErrnoError(28);\n        }\n        if (FS.isClosed(stream)) {\n          throw new FS.ErrnoError(8);\n        }\n        if ((stream.flags & 2097155) === 1) {\n          throw new FS.ErrnoError(8);\n        }\n        if (FS.isDir(stream.node.mode)) {\n          throw new FS.ErrnoError(31);\n        }\n        if (!stream.stream_ops.read) {\n          throw new FS.ErrnoError(28);\n        }\n        var seeking = typeof position != 'undefined';\n        if (!seeking) {\n          position = stream.position;\n        } else if (!stream.seekable) {\n          throw new FS.ErrnoError(70);\n        }\n        var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position);\n        if (!seeking) stream.position += bytesRead;\n        return bytesRead;\n      },\n  write(stream, buffer, offset, length, position, canOwn) {\n        assert(offset >= 0);\n        if (length < 0 || position < 0) {\n          throw new FS.ErrnoError(28);\n        }\n        if (FS.isClosed(stream)) {\n          throw new FS.ErrnoError(8);\n        }\n        if ((stream.flags & 2097155) === 0) {\n          throw new FS.ErrnoError(8);\n        }\n        if (FS.isDir(stream.node.mode)) {\n          throw new FS.ErrnoError(31);\n        }\n        if (!stream.stream_ops.write) {\n          throw new FS.ErrnoError(28);\n        }\n        if (stream.seekable && stream.flags & 1024) {\n          // seek to the end before writing in append mode\n          FS.llseek(stream, 0, 2);\n        }\n        var seeking = typeof position != 'undefined';\n        if (!seeking) {\n          position = stream.position;\n        } else if (!stream.seekable) {\n          throw new FS.ErrnoError(70);\n        }\n        var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn);\n        if (!seeking) stream.position += bytesWritten;\n        return bytesWritten;\n      },\n  mmap(stream, length, position, prot, flags) {\n        // User requests writing to file (prot & PROT_WRITE != 0).\n        // Checking if we have permissions to write to the file unless\n        // MAP_PRIVATE flag is set. According to POSIX spec it is possible\n        // to write to file opened in read-only mode with MAP_PRIVATE flag,\n        // as all modifications will be visible only in the memory of\n        // the current process.\n        if ((prot & 2) !== 0\n            && (flags & 2) === 0\n            && (stream.flags & 2097155) !== 2) {\n          throw new FS.ErrnoError(2);\n        }\n        if ((stream.flags & 2097155) === 1) {\n          throw new FS.ErrnoError(2);\n        }\n        if (!stream.stream_ops.mmap) {\n          throw new FS.ErrnoError(43);\n        }\n        if (!length) {\n          throw new FS.ErrnoError(28);\n        }\n        return stream.stream_ops.mmap(stream, length, position, prot, flags);\n      },\n  msync(stream, buffer, offset, length, mmapFlags) {\n        assert(offset >= 0);\n        if (!stream.stream_ops.msync) {\n          return 0;\n        }\n        return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags);\n      },\n  ioctl(stream, cmd, arg) {\n        if (!stream.stream_ops.ioctl) {\n          throw new FS.ErrnoError(59);\n        }\n        return stream.stream_ops.ioctl(stream, cmd, arg);\n      },\n  readFile(path, opts = {}) {\n        opts.flags = opts.flags || 0;\n        opts.encoding = opts.encoding || 'binary';\n        if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') {\n          abort(`Invalid encoding type \"${opts.encoding}\"`);\n        }\n        var stream = FS.open(path, opts.flags);\n        var stat = FS.stat(path);\n        var length = stat.size;\n        var buf = new Uint8Array(length);\n        FS.read(stream, buf, 0, length, 0);\n        if (opts.encoding === 'utf8') {\n          buf = UTF8ArrayToString(buf);\n        }\n        FS.close(stream);\n        return buf;\n      },\n  writeFile(path, data, opts = {}) {\n        opts.flags = opts.flags || 577;\n        var stream = FS.open(path, opts.flags, opts.mode);\n        if (typeof data == 'string') {\n          data = new Uint8Array(intArrayFromString(data, true));\n        }\n        if (ArrayBuffer.isView(data)) {\n          FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn);\n        } else {\n          abort('Unsupported data type');\n        }\n        FS.close(stream);\n      },\n  cwd:() => FS.currentPath,\n  chdir(path) {\n        var lookup = FS.lookupPath(path, { follow: true });\n        if (lookup.node === null) {\n          throw new FS.ErrnoError(44);\n        }\n        if (!FS.isDir(lookup.node.mode)) {\n          throw new FS.ErrnoError(54);\n        }\n        var errCode = FS.nodePermissions(lookup.node, 'x');\n        if (errCode) {\n          throw new FS.ErrnoError(errCode);\n        }\n        FS.currentPath = lookup.path;\n      },\n  createDefaultDirectories() {\n        FS.mkdir('/tmp');\n        FS.mkdir('/home');\n        FS.mkdir('/home/web_user');\n      },\n  createDefaultDevices() {\n        // create /dev\n        FS.mkdir('/dev');\n        // setup /dev/null\n        FS.registerDevice(FS.makedev(1, 3), {\n          read: () => 0,\n          write: (stream, buffer, offset, length, pos) => length,\n          llseek: () => 0,\n        });\n        FS.mkdev('/dev/null', FS.makedev(1, 3));\n        // setup /dev/tty and /dev/tty1\n        // stderr needs to print output using err() rather than out()\n        // so we register a second tty just for it.\n        TTY.register(FS.makedev(5, 0), TTY.default_tty_ops);\n        TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops);\n        FS.mkdev('/dev/tty', FS.makedev(5, 0));\n        FS.mkdev('/dev/tty1', FS.makedev(6, 0));\n        // setup /dev/[u]random\n        // use a buffer to avoid overhead of individual crypto calls per byte\n        var randomBuffer = new Uint8Array(1024), randomLeft = 0;\n        var randomByte = () => {\n          if (randomLeft === 0) {\n            randomFill(randomBuffer);\n            randomLeft = randomBuffer.byteLength;\n          }\n          return randomBuffer[--randomLeft];\n        };\n        FS.createDevice('/dev', 'random', randomByte);\n        FS.createDevice('/dev', 'urandom', randomByte);\n        // we're not going to emulate the actual shm device,\n        // just create the tmp dirs that reside in it commonly\n        FS.mkdir('/dev/shm');\n        FS.mkdir('/dev/shm/tmp');\n      },\n  createSpecialDirectories() {\n        // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the\n        // name of the stream for fd 6 (see test_unistd_ttyname)\n        FS.mkdir('/proc');\n        var proc_self = FS.mkdir('/proc/self');\n        FS.mkdir('/proc/self/fd');\n        FS.mount({\n          mount() {\n            var node = FS.createNode(proc_self, 'fd', 16895, 73);\n            node.stream_ops = {\n              llseek: MEMFS.stream_ops.llseek,\n            };\n            node.node_ops = {\n              lookup(parent, name) {\n                var fd = +name;\n                var stream = FS.getStreamChecked(fd);\n                var ret = {\n                  parent: null,\n                  mount: { mountpoint: 'fake' },\n                  node_ops: { readlink: () => stream.path },\n                  id: fd + 1,\n                };\n                ret.parent = ret; // make it look like a simple root node\n                return ret;\n              },\n              readdir() {\n                return Array.from(FS.streams.entries())\n                  .filter(([k, v]) => v)\n                  .map(([k, v]) => k.toString());\n              }\n            };\n            return node;\n          }\n        }, {}, '/proc/self/fd');\n      },\n  createStandardStreams(input, output, error) {\n        // TODO deprecate the old functionality of a single\n        // input / output callback and that utilizes FS.createDevice\n        // and instead require a unique set of stream ops\n  \n        // by default, we symlink the standard streams to the\n        // default tty devices. however, if the standard streams\n        // have been overwritten we create a unique device for\n        // them instead.\n        if (input) {\n          FS.createDevice('/dev', 'stdin', input);\n        } else {\n          FS.symlink('/dev/tty', '/dev/stdin');\n        }\n        if (output) {\n          FS.createDevice('/dev', 'stdout', null, output);\n        } else {\n          FS.symlink('/dev/tty', '/dev/stdout');\n        }\n        if (error) {\n          FS.createDevice('/dev', 'stderr', null, error);\n        } else {\n          FS.symlink('/dev/tty1', '/dev/stderr');\n        }\n  \n        // open default streams for the stdin, stdout and stderr devices\n        var stdin = FS.open('/dev/stdin', 0);\n        var stdout = FS.open('/dev/stdout', 1);\n        var stderr = FS.open('/dev/stderr', 1);\n        assert(stdin.fd === 0, `invalid handle for stdin (${stdin.fd})`);\n        assert(stdout.fd === 1, `invalid handle for stdout (${stdout.fd})`);\n        assert(stderr.fd === 2, `invalid handle for stderr (${stderr.fd})`);\n      },\n  staticInit() {\n        FS.nameTable = new Array(4096);\n  \n        FS.mount(MEMFS, {}, '/');\n  \n        FS.createDefaultDirectories();\n        FS.createDefaultDevices();\n        FS.createSpecialDirectories();\n  \n        FS.filesystems = {\n          'MEMFS': MEMFS,\n        };\n      },\n  init(input, output, error) {\n        assert(!FS.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)');\n        FS.initialized = true;\n  \n        // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here\n        input ??= Module['stdin'];\n        output ??= Module['stdout'];\n        error ??= Module['stderr'];\n  \n        FS.createStandardStreams(input, output, error);\n      },\n  quit() {\n        FS.initialized = false;\n        // force-flush all streams, so we get musl std streams printed out\n        _fflush(0);\n        // close all of our streams\n        for (var stream of FS.streams) {\n          if (stream) {\n            FS.close(stream);\n          }\n        }\n      },\n  findObject(path, dontResolveLastLink) {\n        var ret = FS.analyzePath(path, dontResolveLastLink);\n        if (!ret.exists) {\n          return null;\n        }\n        return ret.object;\n      },\n  analyzePath(path, dontResolveLastLink) {\n        // operate from within the context of the symlink's target\n        try {\n          var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });\n          path = lookup.path;\n        } catch (e) {\n        }\n        var ret = {\n          isRoot: false, exists: false, error: 0, name: null, path: null, object: null,\n          parentExists: false, parentPath: null, parentObject: null\n        };\n        try {\n          var lookup = FS.lookupPath(path, { parent: true });\n          ret.parentExists = true;\n          ret.parentPath = lookup.path;\n          ret.parentObject = lookup.node;\n          ret.name = PATH.basename(path);\n          lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });\n          ret.exists = true;\n          ret.path = lookup.path;\n          ret.object = lookup.node;\n          ret.name = lookup.node.name;\n          ret.isRoot = lookup.path === '/';\n        } catch (e) {\n          ret.error = e.errno;\n        };\n        return ret;\n      },\n  createPath(parent, path, canRead, canWrite) {\n        parent = typeof parent == 'string' ? parent : FS.getPath(parent);\n        var parts = path.split('/').reverse();\n        while (parts.length) {\n          var part = parts.pop();\n          if (!part) continue;\n          var current = PATH.join2(parent, part);\n          try {\n            FS.mkdir(current);\n          } catch (e) {\n            if (e.errno != 20) throw e;\n          }\n          parent = current;\n        }\n        return current;\n      },\n  createFile(parent, name, properties, canRead, canWrite) {\n        var path = PATH.join2(typeof parent == 'string' ? parent : FS.getPath(parent), name);\n        var mode = FS_getMode(canRead, canWrite);\n        return FS.create(path, mode);\n      },\n  createDataFile(parent, name, data, canRead, canWrite, canOwn) {\n        var path = name;\n        if (parent) {\n          parent = typeof parent == 'string' ? parent : FS.getPath(parent);\n          path = name ? PATH.join2(parent, name) : parent;\n        }\n        var mode = FS_getMode(canRead, canWrite);\n        var node = FS.create(path, mode);\n        if (data) {\n          if (typeof data == 'string') {\n            var arr = new Array(data.length);\n            for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i);\n            data = arr;\n          }\n          // make sure we can write to the file\n          FS.chmod(node, mode | 146);\n          var stream = FS.open(node, 577);\n          FS.write(stream, data, 0, data.length, 0, canOwn);\n          FS.close(stream);\n          FS.chmod(node, mode);\n        }\n      },\n  createDevice(parent, name, input, output) {\n        var path = PATH.join2(typeof parent == 'string' ? parent : FS.getPath(parent), name);\n        var mode = FS_getMode(!!input, !!output);\n        FS.createDevice.major ??= 64;\n        var dev = FS.makedev(FS.createDevice.major++, 0);\n        // Create a fake device that a set of stream ops to emulate\n        // the old behavior.\n        FS.registerDevice(dev, {\n          open(stream) {\n            stream.seekable = false;\n          },\n          close(stream) {\n            // flush any pending line data\n            if (output?.buffer?.length) {\n              output(10);\n            }\n          },\n          read(stream, buffer, offset, length, pos /* ignored */) {\n            var bytesRead = 0;\n            for (var i = 0; i < length; i++) {\n              var result;\n              try {\n                result = input();\n              } catch (e) {\n                throw new FS.ErrnoError(29);\n              }\n              if (result === undefined && bytesRead === 0) {\n                throw new FS.ErrnoError(6);\n              }\n              if (result === null || result === undefined) break;\n              bytesRead++;\n              buffer[offset+i] = result;\n            }\n            if (bytesRead) {\n              stream.node.atime = Date.now();\n            }\n            return bytesRead;\n          },\n          write(stream, buffer, offset, length, pos) {\n            for (var i = 0; i < length; i++) {\n              try {\n                output(buffer[offset+i]);\n              } catch (e) {\n                throw new FS.ErrnoError(29);\n              }\n            }\n            if (length) {\n              stream.node.mtime = stream.node.ctime = Date.now();\n            }\n            return i;\n          }\n        });\n        return FS.mkdev(path, mode, dev);\n      },\n  forceLoadFile(obj) {\n        if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true;\n        if (globalThis.XMLHttpRequest) {\n          abort(\"Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.\");\n        } else { // Command-line.\n          try {\n            obj.contents = readBinary(obj.url);\n          } catch (e) {\n            throw new FS.ErrnoError(29);\n          }\n        }\n      },\n  createLazyFile(parent, name, url, canRead, canWrite) {\n        // Lazy chunked Uint8Array (implements get and length from Uint8Array).\n        // Actual getting is abstracted away for eventual reuse.\n        class LazyUint8Array {\n          lengthKnown = false;\n          chunks = []; // Loaded chunks. Index is the chunk number\n          get(idx) {\n            if (idx > this.length-1 || idx < 0) {\n              return undefined;\n            }\n            var chunkOffset = idx % this.chunkSize;\n            var chunkNum = (idx / this.chunkSize)|0;\n            return this.getter(chunkNum)[chunkOffset];\n          }\n          setDataGetter(getter) {\n            this.getter = getter;\n          }\n          cacheLength() {\n            // Find length\n            var xhr = new XMLHttpRequest();\n            xhr.open('HEAD', url, false);\n            xhr.send(null);\n            if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) abort(\"Couldn't load \" + url + \". Status: \" + xhr.status);\n            var datalength = Number(xhr.getResponseHeader(\"Content-length\"));\n            var header;\n            var hasByteServing = (header = xhr.getResponseHeader(\"Accept-Ranges\")) && header === \"bytes\";\n            var usesGzip = (header = xhr.getResponseHeader(\"Content-Encoding\")) && header === \"gzip\";\n  \n            var chunkSize = 1024*1024; // Chunk size in bytes\n  \n            if (!hasByteServing) chunkSize = datalength;\n  \n            // Function to get a range from the remote URL.\n            var doXHR = (from, to) => {\n              if (from > to) abort(\"invalid range (\" + from + \", \" + to + \") or no bytes requested!\");\n              if (to > datalength-1) abort(\"only \" + datalength + \" bytes available! programmer error!\");\n  \n              // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available.\n              var xhr = new XMLHttpRequest();\n              xhr.open('GET', url, false);\n              if (datalength !== chunkSize) xhr.setRequestHeader(\"Range\", \"bytes=\" + from + \"-\" + to);\n  \n              // Some hints to the browser that we want binary data.\n              xhr.responseType = 'arraybuffer';\n              if (xhr.overrideMimeType) {\n                xhr.overrideMimeType('text/plain; charset=x-user-defined');\n              }\n  \n              xhr.send(null);\n              if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) abort(\"Couldn't load \" + url + \". Status: \" + xhr.status);\n              if (xhr.response !== undefined) {\n                return new Uint8Array(/** @type{Array<number>} */(xhr.response || []));\n              }\n              return intArrayFromString(xhr.responseText || '', true);\n            };\n            var lazyArray = this;\n            lazyArray.setDataGetter((chunkNum) => {\n              var start = chunkNum * chunkSize;\n              var end = (chunkNum+1) * chunkSize - 1; // including this byte\n              end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block\n              if (typeof lazyArray.chunks[chunkNum] == 'undefined') {\n                lazyArray.chunks[chunkNum] = doXHR(start, end);\n              }\n              if (typeof lazyArray.chunks[chunkNum] == 'undefined') abort('doXHR failed!');\n              return lazyArray.chunks[chunkNum];\n            });\n  \n            if (usesGzip || !datalength) {\n              // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length\n              chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file\n              datalength = this.getter(0).length;\n              chunkSize = datalength;\n              out(\"LazyFiles on gzip forces download of the whole file when length is accessed\");\n            }\n  \n            this._length = datalength;\n            this._chunkSize = chunkSize;\n            this.lengthKnown = true;\n          }\n          get length() {\n            if (!this.lengthKnown) {\n              this.cacheLength();\n            }\n            return this._length;\n          }\n          get chunkSize() {\n            if (!this.lengthKnown) {\n              this.cacheLength();\n            }\n            return this._chunkSize;\n          }\n        }\n  \n        if (globalThis.XMLHttpRequest) {\n          if (!ENVIRONMENT_IS_WORKER) abort('Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc');\n          var lazyArray = new LazyUint8Array();\n          var properties = { isDevice: false, contents: lazyArray };\n        } else {\n          var properties = { isDevice: false, url: url };\n        }\n  \n        var node = FS.createFile(parent, name, properties, canRead, canWrite);\n        // This is a total hack, but I want to get this lazy file code out of the\n        // core of MEMFS. If we want to keep this lazy file concept I feel it should\n        // be its own thin LAZYFS proxying calls to MEMFS.\n        if (properties.contents) {\n          node.contents = properties.contents;\n        } else if (properties.url) {\n          node.contents = null;\n          node.url = properties.url;\n        }\n        // Add a function that defers querying the file size until it is asked the first time.\n        Object.defineProperties(node, {\n          usedBytes: {\n            get: function() { return this.contents.length; }\n          }\n        });\n        // override each stream op with one that tries to force load the lazy file first\n        var stream_ops = {};\n        for (const [key, fn] of Object.entries(node.stream_ops)) {\n          stream_ops[key] = (...args) => {\n            FS.forceLoadFile(node);\n            return fn(...args);\n          };\n        }\n        function writeChunks(stream, buffer, offset, length, position) {\n          var contents = stream.node.contents;\n          if (position >= contents.length)\n            return 0;\n          var size = Math.min(contents.length - position, length);\n          assert(size >= 0);\n          if (contents.slice) { // normal array\n            for (var i = 0; i < size; i++) {\n              buffer[offset + i] = contents[position + i];\n            }\n          } else {\n            for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR\n              buffer[offset + i] = contents.get(position + i);\n            }\n          }\n          return size;\n        }\n        // use a custom read function\n        stream_ops.read = (stream, buffer, offset, length, position) => {\n          FS.forceLoadFile(node);\n          return writeChunks(stream, buffer, offset, length, position)\n        };\n        // use a custom mmap function\n        stream_ops.mmap = (stream, length, position, prot, flags) => {\n          FS.forceLoadFile(node);\n          var ptr = mmapAlloc(length);\n          if (!ptr) {\n            throw new FS.ErrnoError(48);\n          }\n          writeChunks(stream, HEAP8, ptr, length, position);\n          return { ptr, allocated: true };\n        };\n        node.stream_ops = stream_ops;\n        return node;\n      },\n  absolutePath() {\n        abort('FS.absolutePath has been removed; use PATH_FS.resolve instead');\n      },\n  createFolder() {\n        abort('FS.createFolder has been removed; use FS.mkdir instead');\n      },\n  createLink() {\n        abort('FS.createLink has been removed; use FS.symlink instead');\n      },\n  joinPath() {\n        abort('FS.joinPath has been removed; use PATH.join instead');\n      },\n  mmapAlloc() {\n        abort('FS.mmapAlloc has been replaced by the top level function mmapAlloc');\n      },\n  standardizePath() {\n        abort('FS.standardizePath has been removed; use PATH.normalize instead');\n      },\n  };\n  \n  var SYSCALLS = {\n  DEFAULT_POLLMASK:5,\n  calculateAt(dirfd, path, allowEmpty) {\n        if (PATH.isAbs(path)) {\n          return path;\n        }\n        // relative path\n        var dir;\n        if (dirfd === -100) {\n          dir = FS.cwd();\n        } else {\n          var dirstream = SYSCALLS.getStreamFromFD(dirfd);\n          dir = dirstream.path;\n        }\n        if (path.length == 0) {\n          if (!allowEmpty) {\n            throw new FS.ErrnoError(44);;\n          }\n          return dir;\n        }\n        return dir + '/' + path;\n      },\n  writeStat(buf, stat) {\n        HEAPU32[((buf)>>2)] = stat.dev;\n        HEAPU32[(((buf)+(4))>>2)] = stat.mode;\n        HEAPU32[(((buf)+(8))>>2)] = stat.nlink;\n        HEAPU32[(((buf)+(12))>>2)] = stat.uid;\n        HEAPU32[(((buf)+(16))>>2)] = stat.gid;\n        HEAPU32[(((buf)+(20))>>2)] = stat.rdev;\n        HEAP64[(((buf)+(24))>>3)] = BigInt(stat.size);\n        HEAP32[(((buf)+(32))>>2)] = 4096;\n        HEAP32[(((buf)+(36))>>2)] = stat.blocks;\n        var atime = stat.atime.getTime();\n        var mtime = stat.mtime.getTime();\n        var ctime = stat.ctime.getTime();\n        HEAP64[(((buf)+(40))>>3)] = BigInt(Math.floor(atime / 1000));\n        HEAPU32[(((buf)+(48))>>2)] = (atime % 1000) * 1000 * 1000;\n        HEAP64[(((buf)+(56))>>3)] = BigInt(Math.floor(mtime / 1000));\n        HEAPU32[(((buf)+(64))>>2)] = (mtime % 1000) * 1000 * 1000;\n        HEAP64[(((buf)+(72))>>3)] = BigInt(Math.floor(ctime / 1000));\n        HEAPU32[(((buf)+(80))>>2)] = (ctime % 1000) * 1000 * 1000;\n        HEAP64[(((buf)+(88))>>3)] = BigInt(stat.ino);\n        return 0;\n      },\n  writeStatFs(buf, stats) {\n        HEAPU32[(((buf)+(4))>>2)] = stats.bsize;\n        HEAPU32[(((buf)+(60))>>2)] = stats.bsize;\n        HEAP64[(((buf)+(8))>>3)] = BigInt(stats.blocks);\n        HEAP64[(((buf)+(16))>>3)] = BigInt(stats.bfree);\n        HEAP64[(((buf)+(24))>>3)] = BigInt(stats.bavail);\n        HEAP64[(((buf)+(32))>>3)] = BigInt(stats.files);\n        HEAP64[(((buf)+(40))>>3)] = BigInt(stats.ffree);\n        HEAPU32[(((buf)+(48))>>2)] = stats.fsid;\n        HEAPU32[(((buf)+(64))>>2)] = stats.flags;  // ST_NOSUID\n        HEAPU32[(((buf)+(56))>>2)] = stats.namelen;\n      },\n  doMsync(addr, stream, len, flags, offset) {\n        if (!FS.isFile(stream.node.mode)) {\n          throw new FS.ErrnoError(43);\n        }\n        if (flags & 2) {\n          // MAP_PRIVATE calls need not to be synced back to underlying fs\n          return 0;\n        }\n        var buffer = HEAPU8.slice(addr, addr + len);\n        FS.msync(stream, buffer, offset, len, flags);\n      },\n  getStreamFromFD(fd) {\n        var stream = FS.getStreamChecked(fd);\n        return stream;\n      },\n  varargs:undefined,\n  getStr(ptr) {\n        var ret = UTF8ToString(ptr);\n        return ret;\n      },\n  };\n  function ___syscall_chdir(path) {\n  try {\n  \n      path = SYSCALLS.getStr(path);\n      FS.chdir(path);\n      return 0;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  function ___syscall_fstat64(fd, buf) {\n  try {\n  \n      return SYSCALLS.writeStat(buf, FS.fstat(fd));\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  \n  var stringToUTF8 = (str, outPtr, maxBytesToWrite) => {\n      assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!');\n      return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);\n    };\n  function ___syscall_getcwd(buf, size) {\n  try {\n  \n      if (size === 0) return -28;\n      var cwd = FS.cwd();\n      var cwdLengthInBytes = lengthBytesUTF8(cwd) + 1;\n      if (size < cwdLengthInBytes) return -68;\n      stringToUTF8(cwd, buf, size);\n      return cwdLengthInBytes;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  \n  function ___syscall_getdents64(fd, dirp, count) {\n  try {\n  \n      var stream = SYSCALLS.getStreamFromFD(fd)\n      stream.getdents ||= FS.readdir(stream.path);\n  \n      var struct_size = 280;\n      var pos = 0;\n      var off = FS.llseek(stream, 0, 1);\n  \n      var startIdx = Math.floor(off / struct_size);\n      var endIdx = Math.min(stream.getdents.length, startIdx + Math.floor(count/struct_size))\n      for (var idx = startIdx; idx < endIdx; idx++) {\n        var id;\n        var type;\n        var name = stream.getdents[idx];\n        if (name === '.') {\n          id = stream.node.id;\n          type = 4; // DT_DIR\n        }\n        else if (name === '..') {\n          var lookup = FS.lookupPath(stream.path, { parent: true });\n          id = lookup.node.id;\n          type = 4; // DT_DIR\n        }\n        else {\n          var child;\n          try {\n            child = FS.lookupNode(stream.node, name);\n          } catch (e) {\n            // If the entry is not a directory, file, or symlink, nodefs\n            // lookupNode will raise EINVAL. Skip these and continue.\n            if (e?.errno === 28) {\n              continue;\n            }\n            throw e;\n          }\n          id = child.id;\n          type = FS.isChrdev(child.mode) ? 2 :  // DT_CHR, character device.\n                 FS.isDir(child.mode) ? 4 :     // DT_DIR, directory.\n                 FS.isLink(child.mode) ? 10 :   // DT_LNK, symbolic link.\n                 8;                             // DT_REG, regular file.\n        }\n        assert(id);\n        HEAP64[((dirp + pos)>>3)] = BigInt(id);\n        HEAP64[(((dirp + pos)+(8))>>3)] = BigInt((idx + 1) * struct_size);\n        HEAP16[(((dirp + pos)+(16))>>1)] = 280;\n        HEAP8[(dirp + pos)+(18)] = type;\n        stringToUTF8(name, dirp + pos + 19, 256);\n        pos += struct_size;\n      }\n      FS.llseek(stream, idx * struct_size, 0);\n      return pos;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  function ___syscall_lstat64(path, buf) {\n  try {\n  \n      path = SYSCALLS.getStr(path);\n      return SYSCALLS.writeStat(buf, FS.lstat(path));\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  function ___syscall_mkdirat(dirfd, path, mode) {\n  try {\n  \n      path = SYSCALLS.getStr(path);\n      path = SYSCALLS.calculateAt(dirfd, path);\n      FS.mkdir(path, mode, 0);\n      return 0;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  function ___syscall_newfstatat(dirfd, path, buf, flags) {\n  try {\n  \n      path = SYSCALLS.getStr(path);\n      var nofollow = flags & 256;\n      var allowEmpty = flags & 4096;\n      flags = flags & (~6400);\n      assert(!flags, `unknown flags in __syscall_newfstatat: ${flags}`);\n      path = SYSCALLS.calculateAt(dirfd, path, allowEmpty);\n      return SYSCALLS.writeStat(buf, nofollow ? FS.lstat(path) : FS.stat(path));\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  var syscallGetVarargI = () => {\n      assert(SYSCALLS.varargs != undefined);\n      // the `+` prepended here is necessary to convince the JSCompiler that varargs is indeed a number.\n      var ret = HEAP32[((+SYSCALLS.varargs)>>2)];\n      SYSCALLS.varargs += 4;\n      return ret;\n    };\n  \n  function ___syscall_openat(dirfd, path, flags, varargs) {\n  SYSCALLS.varargs = varargs;\n  try {\n  \n      path = SYSCALLS.getStr(path);\n      path = SYSCALLS.calculateAt(dirfd, path);\n      var mode = varargs ? syscallGetVarargI() : 0;\n      return FS.open(path, flags, mode).fd;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  function ___syscall_poll(fds, nfds, timeout) {\n  try {\n  \n      if (timeout != 0) warnOnce('non-zero poll() timeout not supported: ' + timeout)\n      var nonzero = 0;\n      for (var i = 0; i < nfds; i++) {\n        var pollfd = fds + 8 * i;\n        var fd = HEAP32[((pollfd)>>2)];\n        var events = HEAP16[(((pollfd)+(4))>>1)];\n        var mask = 32;\n        var stream = FS.getStream(fd);\n        if (stream) {\n          mask = SYSCALLS.DEFAULT_POLLMASK;\n          if (stream.stream_ops.poll) {\n            mask = stream.stream_ops.poll(stream, -1);\n          }\n        }\n        mask &= events | 8 | 16;\n        if (mask) nonzero++;\n        HEAP16[(((pollfd)+(6))>>1)] = mask;\n      }\n      return nonzero;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  function ___syscall_renameat(olddirfd, oldpath, newdirfd, newpath) {\n  try {\n  \n      oldpath = SYSCALLS.getStr(oldpath);\n      newpath = SYSCALLS.getStr(newpath);\n      oldpath = SYSCALLS.calculateAt(olddirfd, oldpath);\n      newpath = SYSCALLS.calculateAt(newdirfd, newpath);\n      FS.rename(oldpath, newpath);\n      return 0;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  function ___syscall_rmdir(path) {\n  try {\n  \n      path = SYSCALLS.getStr(path);\n      FS.rmdir(path);\n      return 0;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  function ___syscall_stat64(path, buf) {\n  try {\n  \n      path = SYSCALLS.getStr(path);\n      return SYSCALLS.writeStat(buf, FS.stat(path));\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  function ___syscall_statfs64(path, size, buf) {\n  try {\n  \n      assert(size === 88);\n      SYSCALLS.writeStatFs(buf, FS.statfs(SYSCALLS.getStr(path)));\n      return 0;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  function ___syscall_unlinkat(dirfd, path, flags) {\n  try {\n  \n      path = SYSCALLS.getStr(path);\n      path = SYSCALLS.calculateAt(dirfd, path);\n      if (!flags) {\n        FS.unlink(path);\n      } else if (flags === 512) {\n        FS.rmdir(path);\n      } else {\n        return -28;\n      }\n      return 0;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return -e.errno;\n  }\n  }\n\n  var __abort_js = () =>\n      abort('native code called abort()');\n\n  var __emscripten_throw_longjmp = () => {\n      throw Infinity;\n    };\n\n  var abortOnCannotGrowMemory = (requestedSize) => {\n      abort(`Cannot enlarge memory arrays to size ${requestedSize} bytes (OOM). Either (1) compile with -sINITIAL_MEMORY=X with X higher than the current value ${HEAP8.length}, (2) compile with -sALLOW_MEMORY_GROWTH which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -sABORTING_MALLOC=0`);\n    };\n  var _emscripten_resize_heap = (requestedSize) => {\n      var oldSize = HEAPU8.length;\n      // With CAN_ADDRESS_2GB or MEMORY64, pointers are already unsigned.\n      requestedSize >>>= 0;\n      abortOnCannotGrowMemory(requestedSize);\n    };\n\n  var handleException = (e) => {\n      // Certain exception types we do not treat as errors since they are used for\n      // internal control flow.\n      // 1. ExitStatus, which is thrown by exit()\n      // 2. \"unwind\", which is thrown by emscripten_unwind_to_js_event_loop() and others\n      //    that wish to return to JS event loop.\n      if (e instanceof ExitStatus || e == 'unwind') {\n        return EXITSTATUS;\n      }\n      checkStackCookie();\n      if (e instanceof WebAssembly.RuntimeError) {\n        if (_emscripten_stack_get_current() <= 0) {\n          err('Stack overflow detected.  You can try increasing -sSTACK_SIZE (currently set to 65536)');\n        }\n      }\n      quit_(1, e);\n    };\n  \n  \n  var runtimeKeepaliveCounter = 0;\n  var keepRuntimeAlive = () => noExitRuntime || runtimeKeepaliveCounter > 0;\n  var _proc_exit = (code) => {\n      EXITSTATUS = code;\n      if (!keepRuntimeAlive()) {\n        Module['onExit']?.(code);\n        ABORT = true;\n      }\n      quit_(code, new ExitStatus(code));\n    };\n  \n  \n  /** @param {boolean|number=} implicit */\n  var exitJS = (status, implicit) => {\n      EXITSTATUS = status;\n  \n      checkUnflushedContent();\n  \n      // if exit() was called explicitly, warn the user if the runtime isn't actually being shut down\n      if (keepRuntimeAlive() && !implicit) {\n        var msg = `program exited (with status: ${status}), but keepRuntimeAlive() is set (counter=${runtimeKeepaliveCounter}) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;\n        readyPromiseReject?.(msg);\n        err(msg);\n      }\n  \n      _proc_exit(status);\n    };\n  var _exit = exitJS;\n  \n  \n  var maybeExit = () => {\n      if (!keepRuntimeAlive()) {\n        try {\n          _exit(EXITSTATUS);\n        } catch (e) {\n          handleException(e);\n        }\n      }\n    };\n  var callUserCallback = (func) => {\n      if (ABORT) {\n        err('user callback triggered after runtime exited or application aborted.  Ignoring.');\n        return;\n      }\n      try {\n        func();\n        maybeExit();\n      } catch (e) {\n        handleException(e);\n      }\n    };\n  /** @param {number=} timeout */\n  var safeSetTimeout = (func, timeout) => {\n      \n      return setTimeout(() => {\n        \n        callUserCallback(func);\n      }, timeout);\n    };\n  var _emscripten_scan_registers = (func) => {\n      return Asyncify.handleSleep((wakeUp) => {\n        // We must first unwind, so things are spilled to the stack. Then while\n        // we are pausing we do the actual scan. After that we can resume. Note\n        // how using a timeout here avoids unbounded call stack growth, which\n        // could happen if we tried to scan the stack immediately after unwinding.\n        safeSetTimeout(() => {\n          var stackBegin = Asyncify.currData + 12;\n          var stackEnd = HEAPU32[((Asyncify.currData)>>2)];\n          ((a1, a2) => dynCall_vii(func, a1, a2))(stackBegin, stackEnd);\n          wakeUp();\n        }, 0);\n      });\n    };\n  _emscripten_scan_registers.isAsync = true;\n\n  function _fd_close(fd) {\n  try {\n  \n      var stream = SYSCALLS.getStreamFromFD(fd);\n      FS.close(stream);\n      return 0;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return e.errno;\n  }\n  }\n\n  /** @param {number=} offset */\n  var doReadv = (stream, iov, iovcnt, offset) => {\n      var ret = 0;\n      for (var i = 0; i < iovcnt; i++) {\n        var ptr = HEAPU32[((iov)>>2)];\n        var len = HEAPU32[(((iov)+(4))>>2)];\n        iov += 8;\n        var curr = FS.read(stream, HEAP8, ptr, len, offset);\n        if (curr < 0) return -1;\n        ret += curr;\n        if (curr < len) break; // nothing more to read\n        if (typeof offset != 'undefined') {\n          offset += curr;\n        }\n      }\n      return ret;\n    };\n  \n  function _fd_read(fd, iov, iovcnt, pnum) {\n  try {\n  \n      var stream = SYSCALLS.getStreamFromFD(fd);\n      var num = doReadv(stream, iov, iovcnt);\n      HEAPU32[((pnum)>>2)] = num;\n      return 0;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return e.errno;\n  }\n  }\n\n  \n  var INT53_MAX = 9007199254740992;\n  \n  var INT53_MIN = -9007199254740992;\n  var bigintToI53Checked = (num) => (num < INT53_MIN || num > INT53_MAX) ? NaN : Number(num);\n  function _fd_seek(fd, offset, whence, newOffset) {\n    offset = bigintToI53Checked(offset);\n  \n  \n  try {\n  \n      if (isNaN(offset)) return 61;\n      var stream = SYSCALLS.getStreamFromFD(fd);\n      FS.llseek(stream, offset, whence);\n      HEAP64[((newOffset)>>3)] = BigInt(stream.position);\n      if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state\n      return 0;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return e.errno;\n  }\n  ;\n  }\n\n  var _fd_sync = function (fd) {\n  try {\n  \n      var stream = SYSCALLS.getStreamFromFD(fd);\n      return Asyncify.handleSleep((wakeUp) => {\n        var mount = stream.node.mount;\n        if (!mount.type.syncfs) {\n          // We write directly to the file system, so there's nothing to do here.\n          wakeUp(0);\n          return;\n        }\n        mount.type.syncfs(mount, false, (err) => {\n          wakeUp(err ? 29 : 0);\n        });\n      });\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return e.errno;\n  }\n  };\n  _fd_sync.isAsync = true;\n\n  /** @param {number=} offset */\n  var doWritev = (stream, iov, iovcnt, offset) => {\n      var ret = 0;\n      for (var i = 0; i < iovcnt; i++) {\n        var ptr = HEAPU32[((iov)>>2)];\n        var len = HEAPU32[(((iov)+(4))>>2)];\n        iov += 8;\n        var curr = FS.write(stream, HEAP8, ptr, len, offset);\n        if (curr < 0) return -1;\n        ret += curr;\n        if (curr < len) {\n          // No more space to write.\n          break;\n        }\n        if (typeof offset != 'undefined') {\n          offset += curr;\n        }\n      }\n      return ret;\n    };\n  \n  function _fd_write(fd, iov, iovcnt, pnum) {\n  try {\n  \n      var stream = SYSCALLS.getStreamFromFD(fd);\n      var num = doWritev(stream, iov, iovcnt);\n      HEAPU32[((pnum)>>2)] = num;\n      return 0;\n    } catch (e) {\n    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;\n    return e.errno;\n  }\n  }\n\n  var _mp_js_hook = () => {\n          if (ENVIRONMENT_IS_NODE) {\n              const mp_interrupt_char = Module.ccall(\n                  \"mp_hal_get_interrupt_char\",\n                  \"number\",\n                  [\"number\"],\n                  [\"null\"],\n              );\n              const fs = require(\"fs\");\n  \n              const buf = Buffer.alloc(1);\n              try {\n                  const n = fs.readSync(process.stdin.fd, buf, 0, 1);\n                  if (n > 0) {\n                      if (buf[0] === mp_interrupt_char) {\n                          Module.ccall(\n                              \"mp_sched_keyboard_interrupt\",\n                              \"null\",\n                              [\"null\"],\n                              [\"null\"],\n                          );\n                      } else {\n                          process.stdout.write(String.fromCharCode(buf[0]));\n                      }\n                  }\n              } catch (e) {\n                  if (e.code === \"EAGAIN\") {\n                  } else {\n                      throw e;\n                  }\n              }\n          }\n      };\n\n  var _mp_js_random_u32 = () =>\n          globalThis.crypto.getRandomValues(new Uint32Array(1))[0];\n\n  var _mp_js_ticks_ms = () => Date.now() - MP_JS_EPOCH;\n\n  var _mp_js_time_ms = () => Date.now();\n\n  var wasmTableMirror = [];\n  \n  \n  var getWasmTableEntry = (funcPtr) => {\n      var func = wasmTableMirror[funcPtr];\n      if (!func) {\n        /** @suppress {checkTypes} */\n        wasmTableMirror[funcPtr] = func = wasmTable.get(funcPtr);\n      }\n      /** @suppress {checkTypes} */\n      assert(wasmTable.get(funcPtr) == func, 'JavaScript-side Wasm function table mirror is out of date!');\n      return func;\n    };\n\n  var runAndAbortIfError = (func) => {\n      try {\n        return func();\n      } catch (e) {\n        abort(e);\n      }\n    };\n  \n  \n  var createNamedFunction = (name, func) => Object.defineProperty(func, 'name', { value: name });\n  \n  var runtimeKeepalivePush = () => {\n      runtimeKeepaliveCounter += 1;\n    };\n  \n  var runtimeKeepalivePop = () => {\n      assert(runtimeKeepaliveCounter > 0);\n      runtimeKeepaliveCounter -= 1;\n    };\n  \n  \n  var Asyncify = {\n  instrumentWasmImports(imports) {\n        var importPattern = /^(invoke_.*|__asyncjs__.*)$/;\n  \n        for (let [x, original] of Object.entries(imports)) {\n          if (typeof original == 'function') {\n            let isAsyncifyImport = original.isAsync || importPattern.test(x);\n            imports[x] = (...args) => {\n              var originalAsyncifyState = Asyncify.state;\n              try {\n                return original(...args);\n              } finally {\n                // Only asyncify-declared imports are allowed to change the\n                // state.\n                // Changing the state from normal to disabled is allowed (in any\n                // function) as that is what shutdown does (and we don't have an\n                // explicit list of shutdown imports).\n                var changedToDisabled =\n                      originalAsyncifyState === Asyncify.State.Normal &&\n                      Asyncify.state        === Asyncify.State.Disabled;\n                // invoke_* functions are allowed to change the state if we do\n                // not ignore indirect calls.\n                var ignoredInvoke = x.startsWith('invoke_') &&\n                                    true;\n                if (Asyncify.state !== originalAsyncifyState &&\n                    !isAsyncifyImport &&\n                    !changedToDisabled &&\n                    !ignoredInvoke) {\n                  abort(`import ${x} was not in ASYNCIFY_IMPORTS, but changed the state`);\n                }\n              }\n            };\n          }\n        }\n      },\n  instrumentFunction(original) {\n        var wrapper = (...args) => {\n          Asyncify.exportCallStack.push(original);\n          try {\n            return original(...args);\n          } finally {\n            if (!ABORT) {\n              var top = Asyncify.exportCallStack.pop();\n              assert(top === original);\n              Asyncify.maybeStopUnwind();\n            }\n          }\n        };\n        Asyncify.funcWrappers.set(original, wrapper);\n        wrapper = createNamedFunction(`__asyncify_wrapper_${original.name}`, wrapper);\n        return wrapper;\n      },\n  instrumentWasmExports(exports) {\n        var ret = {};\n        for (let [x, original] of Object.entries(exports)) {\n          if (typeof original == 'function') {\n            var wrapper = Asyncify.instrumentFunction(original);\n            ret[x] = wrapper;\n  \n         } else {\n            ret[x] = original;\n          }\n        }\n        return ret;\n      },\n  State:{\n  Normal:0,\n  Unwinding:1,\n  Rewinding:2,\n  Disabled:3,\n  },\n  state:0,\n  StackSize:128000,\n  currData:null,\n  handleSleepReturnValue:0,\n  exportCallStack:[],\n  callstackFuncToId:new Map,\n  callStackIdToFunc:new Map,\n  funcWrappers:new Map,\n  callStackId:0,\n  asyncPromiseHandlers:null,\n  sleepCallbacks:[],\n  getCallStackId(func) {\n        assert(func);\n        if (!Asyncify.callstackFuncToId.has(func)) {\n          var id = Asyncify.callStackId++;\n          Asyncify.callstackFuncToId.set(func, id);\n          Asyncify.callStackIdToFunc.set(id, func);\n        }\n        return Asyncify.callstackFuncToId.get(func);\n      },\n  maybeStopUnwind() {\n        if (Asyncify.currData &&\n            Asyncify.state === Asyncify.State.Unwinding &&\n            Asyncify.exportCallStack.length === 0) {\n          // We just finished unwinding.\n          // Be sure to set the state before calling any other functions to avoid\n          // possible infinite recursion here (For example in debug pthread builds\n          // the dbg() function itself can call back into WebAssembly to get the\n          // current pthread_self() pointer).\n          Asyncify.state = Asyncify.State.Normal;\n          \n          // Keep the runtime alive so that a re-wind can be done later.\n          runAndAbortIfError(_asyncify_stop_unwind);\n          if (typeof Fibers != 'undefined') {\n            Fibers.trampoline();\n          }\n        }\n      },\n  whenDone() {\n        assert(Asyncify.currData, 'Tried to wait for an async operation when none is in progress.');\n        assert(!Asyncify.asyncPromiseHandlers, 'Cannot have multiple async operations in flight at once');\n        return new Promise((resolve, reject) => {\n          Asyncify.asyncPromiseHandlers = { resolve, reject };\n        });\n      },\n  allocateData() {\n        // An asyncify data structure has three fields:\n        //  0  current stack pos\n        //  4  max stack pos\n        //  8  id of function at bottom of the call stack (callStackIdToFunc[id] == wasm func)\n        //\n        // The Asyncify ABI only interprets the first two fields, the rest is for the runtime.\n        // We also embed a stack in the same memory region here, right next to the structure.\n        // This struct is also defined as asyncify_data_t in emscripten/fiber.h\n        var ptr = _malloc(12 + Asyncify.StackSize);\n        Asyncify.setDataHeader(ptr, ptr + 12, Asyncify.StackSize);\n        Asyncify.setDataRewindFunc(ptr);\n        return ptr;\n      },\n  setDataHeader(ptr, stack, stackSize) {\n        HEAPU32[((ptr)>>2)] = stack;\n        HEAPU32[(((ptr)+(4))>>2)] = stack + stackSize;\n      },\n  setDataRewindFunc(ptr) {\n        var bottomOfCallStack = Asyncify.exportCallStack[0];\n        assert(bottomOfCallStack, 'exportCallStack is empty');\n        var rewindId = Asyncify.getCallStackId(bottomOfCallStack);\n        HEAP32[(((ptr)+(8))>>2)] = rewindId;\n      },\n  getDataRewindFunc(ptr) {\n        var id = HEAP32[(((ptr)+(8))>>2)];\n        var func = Asyncify.callStackIdToFunc.get(id);\n        assert(func, `id ${id} not found in callStackIdToFunc`);\n        return func;\n      },\n  doRewind(ptr) {\n        var original = Asyncify.getDataRewindFunc(ptr);\n        var func = Asyncify.funcWrappers.get(original);\n        assert(original);\n        assert(func);\n        // Once we have rewound and the stack we no longer need to artificially\n        // keep the runtime alive.\n        \n        return func();\n      },\n  handleSleep(startAsync) {\n        assert(Asyncify.state !== Asyncify.State.Disabled, 'Asyncify cannot be done during or after the runtime exits');\n        if (ABORT) return;\n        if (Asyncify.state === Asyncify.State.Normal) {\n          // Prepare to sleep. Call startAsync, and see what happens:\n          // if the code decided to call our callback synchronously,\n          // then no async operation was in fact begun, and we don't\n          // need to do anything.\n          var reachedCallback = false;\n          var reachedAfterCallback = false;\n          startAsync((handleSleepReturnValue = 0) => {\n            assert(!handleSleepReturnValue || typeof handleSleepReturnValue == 'number' || typeof handleSleepReturnValue == 'boolean'); // old emterpretify API supported other stuff\n            if (ABORT) return;\n            Asyncify.handleSleepReturnValue = handleSleepReturnValue;\n            reachedCallback = true;\n            if (!reachedAfterCallback) {\n              // We are happening synchronously, so no need for async.\n              return;\n            }\n            // This async operation did not happen synchronously, so we did\n            // unwind. In that case there can be no compiled code on the stack,\n            // as it might break later operations (we can rewind ok now, but if\n            // we unwind again, we would unwind through the extra compiled code\n            // too).\n            assert(!Asyncify.exportCallStack.length, 'Waking up (starting to rewind) must be done from JS, without compiled code on the stack.');\n            Asyncify.state = Asyncify.State.Rewinding;\n            runAndAbortIfError(() => _asyncify_start_rewind(Asyncify.currData));\n            if (typeof MainLoop != 'undefined' && MainLoop.func) {\n              MainLoop.resume();\n            }\n            var asyncWasmReturnValue, isError = false;\n            try {\n              asyncWasmReturnValue = Asyncify.doRewind(Asyncify.currData);\n            } catch (err) {\n              asyncWasmReturnValue = err;\n              isError = true;\n            }\n            // Track whether the return value was handled by any promise handlers.\n            var handled = false;\n            if (!Asyncify.currData) {\n              // All asynchronous execution has finished.\n              // `asyncWasmReturnValue` now contains the final\n              // return value of the exported async WASM function.\n              //\n              // Note: `asyncWasmReturnValue` is distinct from\n              // `Asyncify.handleSleepReturnValue`.\n              // `Asyncify.handleSleepReturnValue` contains the return\n              // value of the last C function to have executed\n              // `Asyncify.handleSleep()`, where as `asyncWasmReturnValue`\n              // contains the return value of the exported WASM function\n              // that may have called C functions that\n              // call `Asyncify.handleSleep()`.\n              var asyncPromiseHandlers = Asyncify.asyncPromiseHandlers;\n              if (asyncPromiseHandlers) {\n                Asyncify.asyncPromiseHandlers = null;\n                (isError ? asyncPromiseHandlers.reject : asyncPromiseHandlers.resolve)(asyncWasmReturnValue);\n                handled = true;\n              }\n            }\n            if (isError && !handled) {\n              // If there was an error and it was not handled by now, we have no choice but to\n              // rethrow that error into the global scope where it can be caught only by\n              // `onerror` or `onunhandledpromiserejection`.\n              throw asyncWasmReturnValue;\n            }\n          });\n          reachedAfterCallback = true;\n          if (!reachedCallback) {\n            // A true async operation was begun; start a sleep.\n            Asyncify.state = Asyncify.State.Unwinding;\n            // TODO: reuse, don't alloc/free every sleep\n            Asyncify.currData = Asyncify.allocateData();\n            if (typeof MainLoop != 'undefined' && MainLoop.func) {\n              MainLoop.pause();\n            }\n            runAndAbortIfError(() => _asyncify_start_unwind(Asyncify.currData));\n          }\n        } else if (Asyncify.state === Asyncify.State.Rewinding) {\n          // Stop a resume.\n          Asyncify.state = Asyncify.State.Normal;\n          runAndAbortIfError(_asyncify_stop_rewind);\n          _free(Asyncify.currData);\n          Asyncify.currData = null;\n          // Call all sleep callbacks now that the sleep-resume is all done.\n          Asyncify.sleepCallbacks.forEach(callUserCallback);\n        } else {\n          abort(`invalid state: ${Asyncify.state}`);\n        }\n        return Asyncify.handleSleepReturnValue;\n      },\n  handleAsync:(startAsync) => Asyncify.handleSleep((wakeUp) => {\n        // TODO: add error handling as a second param when handleSleep implements it.\n        startAsync().then(wakeUp);\n      }),\n  };\n\n  var getCFunc = (ident) => {\n      var func = Module['_' + ident]; // closure exported function\n      assert(func, 'Cannot call unknown function ' + ident + ', make sure it is exported');\n      return func;\n    };\n  \n  var writeArrayToMemory = (array, buffer) => {\n      assert(array.length >= 0, 'writeArrayToMemory array must have a length (should be an array or typed array)')\n      HEAP8.set(array, buffer);\n    };\n  \n  \n  \n  var stackAlloc = (sz) => __emscripten_stack_alloc(sz);\n  var stringToUTF8OnStack = (str) => {\n      var size = lengthBytesUTF8(str) + 1;\n      var ret = stackAlloc(size);\n      stringToUTF8(str, ret, size);\n      return ret;\n    };\n  \n  \n  \n  \n  \n  \n  \n    /**\n     * @param {string|null=} returnType\n     * @param {Array=} argTypes\n     * @param {Array=} args\n     * @param {Object=} opts\n     */\n  var ccall = (ident, returnType, argTypes, args, opts) => {\n      // For fast lookup of conversion functions\n      var toC = {\n        'string': (str) => {\n          var ret = 0;\n          if (str !== null && str !== undefined && str !== 0) { // null string\n            ret = stringToUTF8OnStack(str);\n          }\n          return ret;\n        },\n        'array': (arr) => {\n          var ret = stackAlloc(arr.length);\n          writeArrayToMemory(arr, ret);\n          return ret;\n        }\n      };\n  \n      function convertReturnValue(ret) {\n        if (returnType === 'string') {\n          return UTF8ToString(ret);\n        }\n        if (returnType === 'boolean') return Boolean(ret);\n        return ret;\n      }\n  \n      var func = getCFunc(ident);\n      var cArgs = [];\n      var stack = 0;\n      assert(returnType !== 'array', 'Return type should not be \"array\".');\n      if (args) {\n        for (var i = 0; i < args.length; i++) {\n          var converter = toC[argTypes[i]];\n          if (converter) {\n            if (stack === 0) stack = stackSave();\n            cArgs[i] = converter(args[i]);\n          } else {\n            cArgs[i] = args[i];\n          }\n        }\n      }\n      // Data for a previous async operation that was in flight before us.\n      var previousAsync = Asyncify.currData;\n      var ret = func(...cArgs);\n      function onDone(ret) {\n        runtimeKeepalivePop();\n        if (stack !== 0) stackRestore(stack);\n        return convertReturnValue(ret);\n      }\n    var asyncMode = opts?.async;\n  \n      // Keep the runtime alive through all calls. Note that this call might not be\n      // async, but for simplicity we push and pop in all calls.\n      runtimeKeepalivePush();\n      if (Asyncify.currData != previousAsync) {\n        // A change in async operation happened. If there was already an async\n        // operation in flight before us, that is an error: we should not start\n        // another async operation while one is active, and we should not stop one\n        // either. The only valid combination is to have no change in the async\n        // data (so we either had one in flight and left it alone, or we didn't have\n        // one), or to have nothing in flight and to start one.\n        assert(!(previousAsync && Asyncify.currData), 'We cannot start an async operation when one is already flight');\n        assert(!(previousAsync && !Asyncify.currData), 'We cannot stop an async operation in flight');\n        // This is a new async operation. The wasm is paused and has unwound its stack.\n        // We need to return a Promise that resolves the return value\n        // once the stack is rewound and execution finishes.\n        assert(asyncMode, 'The call to ' + ident + ' is running asynchronously. If this was intended, add the async option to the ccall/cwrap call.');\n        return Asyncify.whenDone().then(onDone);\n      }\n  \n      ret = onDone(ret);\n      // If this is an async ccall, ensure we return a promise\n      if (asyncMode) return Promise.resolve(ret);\n      return ret;\n    };\n\n  \n    /**\n     * @param {string=} returnType\n     * @param {Array=} argTypes\n     * @param {Object=} opts\n     */\n  var cwrap = (ident, returnType, argTypes, opts) => {\n      return (...args) => ccall(ident, returnType, argTypes, args, opts);\n    };\n\n\n\n\n\n\n\n\n\n  FS.createPreloadedFile = FS_createPreloadedFile;\n  FS.preloadFile = FS_preloadFile;\n  FS.staticInit();;\nif (globalThis.crypto === undefined) { globalThis.crypto = require('crypto'); };\nvar MP_JS_EPOCH = Date.now();\n// End JS library code\n\n// include: postlibrary.js\n// This file is included after the automatically-generated JS library code\n// but before the wasm module is created.\n\n{\n\n  // Begin ATMODULES hooks\n  if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime'];\nif (Module['preloadPlugins']) preloadPlugins = Module['preloadPlugins'];\nif (Module['print']) out = Module['print'];\nif (Module['printErr']) err = Module['printErr'];\nif (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];\n  // End ATMODULES hooks\n\n  checkIncomingModuleAPI();\n\n  if (Module['arguments']) arguments_ = Module['arguments'];\n  if (Module['thisProgram']) thisProgram = Module['thisProgram'];\n\n  // Assertions on removed incoming Module JS APIs.\n  assert(typeof Module['memoryInitializerPrefixURL'] == 'undefined', 'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead');\n  assert(typeof Module['pthreadMainPrefixURL'] == 'undefined', 'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead');\n  assert(typeof Module['cdInitializerPrefixURL'] == 'undefined', 'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead');\n  assert(typeof Module['filePackagePrefixURL'] == 'undefined', 'Module.filePackagePrefixURL option was removed, use Module.locateFile instead');\n  assert(typeof Module['read'] == 'undefined', 'Module.read option was removed');\n  assert(typeof Module['readAsync'] == 'undefined', 'Module.readAsync option was removed (modify readAsync in JS)');\n  assert(typeof Module['readBinary'] == 'undefined', 'Module.readBinary option was removed (modify readBinary in JS)');\n  assert(typeof Module['setWindowTitle'] == 'undefined', 'Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)');\n  assert(typeof Module['TOTAL_MEMORY'] == 'undefined', 'Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY');\n  assert(typeof Module['ENVIRONMENT'] == 'undefined', 'Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)');\n  assert(typeof Module['STACK_SIZE'] == 'undefined', 'STACK_SIZE can no longer be set at runtime.  Use -sSTACK_SIZE at link time')\n  // If memory is defined in wasm, the user can't provide it, or set INITIAL_MEMORY\n  assert(typeof Module['wasmMemory'] == 'undefined', 'Use of `wasmMemory` detected.  Use -sIMPORTED_MEMORY to define wasmMemory externally');\n  assert(typeof Module['INITIAL_MEMORY'] == 'undefined', 'Detected runtime INITIAL_MEMORY setting.  Use -sIMPORTED_MEMORY to define wasmMemory dynamically');\n\n  if (Module['preInit']) {\n    if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']];\n    while (Module['preInit'].length > 0) {\n      Module['preInit'].shift()();\n    }\n  }\n  consumedModuleProp('preInit');\n}\n\n// Begin runtime exports\n  Module['ccall'] = ccall;\n  Module['cwrap'] = cwrap;\n  Module['setValue'] = setValue;\n  Module['getValue'] = getValue;\n  Module['PATH'] = PATH;\n  Module['PATH_FS'] = PATH_FS;\n  Module['UTF8ToString'] = UTF8ToString;\n  Module['stringToUTF8'] = stringToUTF8;\n  Module['lengthBytesUTF8'] = lengthBytesUTF8;\n  Module['FS'] = FS;\n  var missingLibrarySymbols = [\n  'writeI53ToI64',\n  'writeI53ToI64Clamped',\n  'writeI53ToI64Signaling',\n  'writeI53ToU64Clamped',\n  'writeI53ToU64Signaling',\n  'readI53FromI64',\n  'readI53FromU64',\n  'convertI32PairToI53',\n  'convertI32PairToI53Checked',\n  'convertU32PairToI53',\n  'getTempRet0',\n  'setTempRet0',\n  'zeroMemory',\n  'getHeapMax',\n  'growMemory',\n  'withStackSave',\n  'inetPton4',\n  'inetNtop4',\n  'inetPton6',\n  'inetNtop6',\n  'readSockaddr',\n  'writeSockaddr',\n  'readEmAsmArgs',\n  'jstoi_q',\n  'getExecutableName',\n  'autoResumeAudioContext',\n  'getDynCaller',\n  'asmjsMangle',\n  'alignMemory',\n  'HandleAllocator',\n  'addOnInit',\n  'addOnPostCtor',\n  'addOnPreMain',\n  'addOnExit',\n  'STACK_SIZE',\n  'STACK_ALIGN',\n  'POINTER_SIZE',\n  'ASSERTIONS',\n  'convertJsFunctionToWasm',\n  'getEmptyTableSlot',\n  'updateTableMap',\n  'getFunctionAddress',\n  'addFunction',\n  'removeFunction',\n  'intArrayToString',\n  'AsciiToString',\n  'stringToAscii',\n  'UTF16ToString',\n  'stringToUTF16',\n  'lengthBytesUTF16',\n  'UTF32ToString',\n  'stringToUTF32',\n  'lengthBytesUTF32',\n  'stringToNewUTF8',\n  'registerKeyEventCallback',\n  'maybeCStringToJsString',\n  'findEventTarget',\n  'getBoundingClientRect',\n  'fillMouseEventData',\n  'registerMouseEventCallback',\n  'registerWheelEventCallback',\n  'registerUiEventCallback',\n  'registerFocusEventCallback',\n  'fillDeviceOrientationEventData',\n  'registerDeviceOrientationEventCallback',\n  'fillDeviceMotionEventData',\n  'registerDeviceMotionEventCallback',\n  'screenOrientation',\n  'fillOrientationChangeEventData',\n  'registerOrientationChangeEventCallback',\n  'fillFullscreenChangeEventData',\n  'registerFullscreenChangeEventCallback',\n  'JSEvents_requestFullscreen',\n  'JSEvents_resizeCanvasForFullscreen',\n  'registerRestoreOldStyle',\n  'hideEverythingExceptGivenElement',\n  'restoreHiddenElements',\n  'setLetterbox',\n  'softFullscreenResizeWebGLRenderTarget',\n  'doRequestFullscreen',\n  'fillPointerlockChangeEventData',\n  'registerPointerlockChangeEventCallback',\n  'registerPointerlockErrorEventCallback',\n  'requestPointerLock',\n  'fillVisibilityChangeEventData',\n  'registerVisibilityChangeEventCallback',\n  'registerTouchEventCallback',\n  'fillGamepadEventData',\n  'registerGamepadEventCallback',\n  'registerBeforeUnloadEventCallback',\n  'fillBatteryEventData',\n  'registerBatteryEventCallback',\n  'setCanvasElementSize',\n  'getCanvasElementSize',\n  'jsStackTrace',\n  'getCallstack',\n  'convertPCtoSourceLocation',\n  'getEnvStrings',\n  'checkWasiClock',\n  'wasiRightsToMuslOFlags',\n  'wasiOFlagsToMuslOFlags',\n  'setImmediateWrapped',\n  'safeRequestAnimationFrame',\n  'clearImmediateWrapped',\n  'registerPostMainLoop',\n  'registerPreMainLoop',\n  'getPromise',\n  'makePromise',\n  'idsToPromises',\n  'makePromiseCallback',\n  'ExceptionInfo',\n  'findMatchingCatch',\n  'Browser_asyncPrepareDataCounter',\n  'isLeapYear',\n  'ydayFromDate',\n  'arraySum',\n  'addDays',\n  'getSocketFromFD',\n  'getSocketAddress',\n  'FS_mkdirTree',\n  '_setNetworkCallback',\n  'heapObjectForWebGLType',\n  'toTypedArrayIndex',\n  'webgl_enable_ANGLE_instanced_arrays',\n  'webgl_enable_OES_vertex_array_object',\n  'webgl_enable_WEBGL_draw_buffers',\n  'webgl_enable_WEBGL_multi_draw',\n  'webgl_enable_EXT_polygon_offset_clamp',\n  'webgl_enable_EXT_clip_control',\n  'webgl_enable_WEBGL_polygon_mode',\n  'emscriptenWebGLGet',\n  'computeUnpackAlignedImageSize',\n  'colorChannelsInGlTextureFormat',\n  'emscriptenWebGLGetTexPixelData',\n  'emscriptenWebGLGetUniform',\n  'webglGetUniformLocation',\n  'webglPrepareUniformLocationsBeforeFirstUse',\n  'webglGetLeftBracePos',\n  'emscriptenWebGLGetVertexAttrib',\n  '__glGetActiveAttribOrUniform',\n  'writeGLArray',\n  'registerWebGlEventCallback',\n  'ALLOC_NORMAL',\n  'ALLOC_STACK',\n  'allocate',\n  'writeStringToMemory',\n  'writeAsciiToMemory',\n  'allocateUTF8',\n  'allocateUTF8OnStack',\n  'demangle',\n  'stackTrace',\n  'getNativeTypeSize',\n];\nmissingLibrarySymbols.forEach(missingLibrarySymbol)\n\n  var unexportedSymbols = [\n  'run',\n  'out',\n  'err',\n  'callMain',\n  'abort',\n  'wasmExports',\n  'HEAPF32',\n  'HEAPF64',\n  'HEAP8',\n  'HEAPU8',\n  'HEAP16',\n  'HEAPU16',\n  'HEAP32',\n  'HEAPU32',\n  'HEAP64',\n  'HEAPU64',\n  'writeStackCookie',\n  'checkStackCookie',\n  'INT53_MAX',\n  'INT53_MIN',\n  'bigintToI53Checked',\n  'stackSave',\n  'stackRestore',\n  'stackAlloc',\n  'createNamedFunction',\n  'ptrToString',\n  'exitJS',\n  'abortOnCannotGrowMemory',\n  'ENV',\n  'ERRNO_CODES',\n  'strError',\n  'DNS',\n  'Protocols',\n  'Sockets',\n  'timers',\n  'warnOnce',\n  'readEmAsmArgsArray',\n  'dynCallLegacy',\n  'dynCall',\n  'handleException',\n  'keepRuntimeAlive',\n  'runtimeKeepalivePush',\n  'runtimeKeepalivePop',\n  'callUserCallback',\n  'maybeExit',\n  'asyncLoad',\n  'mmapAlloc',\n  'wasmTable',\n  'wasmMemory',\n  'getUniqueRunDependency',\n  'noExitRuntime',\n  'addRunDependency',\n  'removeRunDependency',\n  'addOnPreRun',\n  'addOnPostRun',\n  'freeTableIndexes',\n  'functionsInTableMap',\n  'UTF8Decoder',\n  'UTF8ArrayToString',\n  'stringToUTF8Array',\n  'intArrayFromString',\n  'UTF16Decoder',\n  'stringToUTF8OnStack',\n  'writeArrayToMemory',\n  'JSEvents',\n  'specialHTMLTargets',\n  'findCanvasEventTarget',\n  'currentFullscreenStrategy',\n  'restoreOldWindowedStyle',\n  'UNWIND_CACHE',\n  'ExitStatus',\n  'doReadv',\n  'doWritev',\n  'initRandomFill',\n  'randomFill',\n  'safeSetTimeout',\n  'emSetImmediate',\n  'emClearImmediate_deps',\n  'emClearImmediate',\n  'promiseMap',\n  'uncaughtExceptionCount',\n  'exceptionLast',\n  'exceptionCaught',\n  'Browser',\n  'requestFullscreen',\n  'requestFullScreen',\n  'setCanvasSize',\n  'getUserMedia',\n  'createContext',\n  'getPreloadedImageData__data',\n  'wget',\n  'MONTH_DAYS_REGULAR',\n  'MONTH_DAYS_LEAP',\n  'MONTH_DAYS_REGULAR_CUMULATIVE',\n  'MONTH_DAYS_LEAP_CUMULATIVE',\n  'SYSCALLS',\n  'preloadPlugins',\n  'FS_createPreloadedFile',\n  'FS_preloadFile',\n  'FS_modeStringToFlags',\n  'FS_getMode',\n  'FS_stdin_getChar_buffer',\n  'FS_stdin_getChar',\n  'FS_unlink',\n  'FS_createPath',\n  'FS_createDevice',\n  'FS_readFile',\n  'FS_root',\n  'FS_mounts',\n  'FS_devices',\n  'FS_streams',\n  'FS_nextInode',\n  'FS_nameTable',\n  'FS_currentPath',\n  'FS_initialized',\n  'FS_ignorePermissions',\n  'FS_filesystems',\n  'FS_syncFSRequests',\n  'FS_readFiles',\n  'FS_lookupPath',\n  'FS_getPath',\n  'FS_hashName',\n  'FS_hashAddNode',\n  'FS_hashRemoveNode',\n  'FS_lookupNode',\n  'FS_createNode',\n  'FS_destroyNode',\n  'FS_isRoot',\n  'FS_isMountpoint',\n  'FS_isFile',\n  'FS_isDir',\n  'FS_isLink',\n  'FS_isChrdev',\n  'FS_isBlkdev',\n  'FS_isFIFO',\n  'FS_isSocket',\n  'FS_flagsToPermissionString',\n  'FS_nodePermissions',\n  'FS_mayLookup',\n  'FS_mayCreate',\n  'FS_mayDelete',\n  'FS_mayOpen',\n  'FS_checkOpExists',\n  'FS_nextfd',\n  'FS_getStreamChecked',\n  'FS_getStream',\n  'FS_createStream',\n  'FS_closeStream',\n  'FS_dupStream',\n  'FS_doSetAttr',\n  'FS_chrdev_stream_ops',\n  'FS_major',\n  'FS_minor',\n  'FS_makedev',\n  'FS_registerDevice',\n  'FS_getDevice',\n  'FS_getMounts',\n  'FS_syncfs',\n  'FS_mount',\n  'FS_unmount',\n  'FS_lookup',\n  'FS_mknod',\n  'FS_statfs',\n  'FS_statfsStream',\n  'FS_statfsNode',\n  'FS_create',\n  'FS_mkdir',\n  'FS_mkdev',\n  'FS_symlink',\n  'FS_rename',\n  'FS_rmdir',\n  'FS_readdir',\n  'FS_readlink',\n  'FS_stat',\n  'FS_fstat',\n  'FS_lstat',\n  'FS_doChmod',\n  'FS_chmod',\n  'FS_lchmod',\n  'FS_fchmod',\n  'FS_doChown',\n  'FS_chown',\n  'FS_lchown',\n  'FS_fchown',\n  'FS_doTruncate',\n  'FS_truncate',\n  'FS_ftruncate',\n  'FS_utime',\n  'FS_open',\n  'FS_close',\n  'FS_isClosed',\n  'FS_llseek',\n  'FS_read',\n  'FS_write',\n  'FS_mmap',\n  'FS_msync',\n  'FS_ioctl',\n  'FS_writeFile',\n  'FS_cwd',\n  'FS_chdir',\n  'FS_createDefaultDirectories',\n  'FS_createDefaultDevices',\n  'FS_createSpecialDirectories',\n  'FS_createStandardStreams',\n  'FS_staticInit',\n  'FS_init',\n  'FS_quit',\n  'FS_findObject',\n  'FS_analyzePath',\n  'FS_createFile',\n  'FS_createDataFile',\n  'FS_forceLoadFile',\n  'FS_createLazyFile',\n  'FS_absolutePath',\n  'FS_createFolder',\n  'FS_createLink',\n  'FS_joinPath',\n  'FS_mmapAlloc',\n  'FS_standardizePath',\n  'MEMFS',\n  'TTY',\n  'PIPEFS',\n  'SOCKFS',\n  'tempFixedLengthArray',\n  'miniTempWebGLFloatBuffers',\n  'miniTempWebGLIntBuffers',\n  'GL',\n  'AL',\n  'GLUT',\n  'EGL',\n  'GLEW',\n  'IDBStore',\n  'runAndAbortIfError',\n  'Asyncify',\n  'Fibers',\n  'SDL',\n  'SDL_gfx',\n  'print',\n  'printErr',\n  'jstoi_s',\n];\nunexportedSymbols.forEach(unexportedRuntimeSymbol);\n\n  // End runtime exports\n  // Begin JS library exports\n  // End JS library exports\n\n// end include: postlibrary.js\n\nfunction checkIncomingModuleAPI() {\n  ignoredModuleProp('fetchSettings');\n}\nfunction proxy_convert_mp_to_js_then_js_to_mp_obj_jsside(out) { const ret = proxy_convert_mp_to_js_obj_jsside(out); proxy_convert_js_to_mp_obj_jsside_force_double_proxy(ret, out); }\nfunction proxy_convert_mp_to_js_then_js_to_js_then_js_to_mp_obj_jsside(out) { const ret = proxy_convert_mp_to_js_obj_jsside(out); const js_obj = PyProxy.toJs(ret); proxy_convert_js_to_mp_obj_jsside(js_obj, out); }\nfunction js_get_proxy_js_ref_info(out) { let used = 0; for (const elem of proxy_js_ref) { if (elem !== undefined) { ++used; } } Module.setValue(out, proxy_js_ref.length, \"i32\"); Module.setValue(out + 4, used, \"i32\"); }\nfunction has_attr(jsref,str) { const base = proxy_js_ref[jsref]; const attr = UTF8ToString(str); if (attr in base) { return true; } else { return false; } }\nfunction lookup_attr(jsref,str,out) { const base = proxy_js_ref[jsref]; const attr = UTF8ToString(str); let value = base[attr]; if (value !== undefined || attr in base) { if (typeof value === \"function\") { if (base !== globalThis) { if (\"_ref\" in value) { } else { value = value.bind(base); } } } proxy_convert_js_to_mp_obj_jsside(value, out); return true; } else { return false; } }\nfunction store_attr(jsref,attr_ptr,value_ref) { const attr = UTF8ToString(attr_ptr); const value = proxy_convert_mp_to_js_obj_jsside(value_ref); proxy_js_ref[jsref][attr] = value; }\nfunction call0(f_ref,out) { const f = proxy_js_ref[f_ref]; const ret = f(); proxy_convert_js_to_mp_obj_jsside(ret, out); }\nfunction call1(f_ref,a0,out) { const a0_js = proxy_convert_mp_to_js_obj_jsside(a0); const f = proxy_js_ref[f_ref]; const ret = f(a0_js); proxy_convert_js_to_mp_obj_jsside(ret, out); }\nfunction call2(f_ref,a0,a1,out) { const a0_js = proxy_convert_mp_to_js_obj_jsside(a0); const a1_js = proxy_convert_mp_to_js_obj_jsside(a1); const f = proxy_js_ref[f_ref]; const ret = f(a0_js, a1_js); proxy_convert_js_to_mp_obj_jsside(ret, out); }\nfunction calln(f_ref,n_args,value,out) { const f = proxy_js_ref[f_ref]; const a = []; for (let i = 0; i < n_args; ++i) { const v = proxy_convert_mp_to_js_obj_jsside(value + i * 3 * 4); a.push(v); } const ret = f(... a); proxy_convert_js_to_mp_obj_jsside(ret, out); }\nfunction call0_kwarg(f_ref,n_kw,key,value,out) { const f = proxy_js_ref[f_ref]; const a = {}; for (let i = 0; i < n_kw; ++i) { const k = UTF8ToString(getValue(key + i * 4, \"i32\")); const v = proxy_convert_mp_to_js_obj_jsside(value + i * 3 * 4); a[k] = v; } const ret = f(a); proxy_convert_js_to_mp_obj_jsside(ret, out); }\nfunction call1_kwarg(f_ref,arg0,n_kw,key,value,out) { const f = proxy_js_ref[f_ref]; const a0 = proxy_convert_mp_to_js_obj_jsside(arg0); const a = {}; for (let i = 0; i < n_kw; ++i) { const k = UTF8ToString(getValue(key + i * 4, \"i32\")); const v = proxy_convert_mp_to_js_obj_jsside(value + i * 3 * 4); a[k] = v; } const ret = f(a0, a); proxy_convert_js_to_mp_obj_jsside(ret, out); }\nfunction js_reflect_construct(f_ref,n_args,args,out) { const f = proxy_js_ref[f_ref]; const as = []; for (let i = 0; i < n_args; ++i) { as.push(proxy_convert_mp_to_js_obj_jsside(args + i * 3 * 4)); } const ret = Reflect.construct(f, as); proxy_convert_js_to_mp_obj_jsside(ret, out); }\nfunction js_get_iter(f_ref,out) { const f = proxy_js_ref[f_ref]; const ret = f[Symbol.iterator](); proxy_convert_js_to_mp_obj_jsside(ret, out); }\nfunction js_iter_next(f_ref,out) { const f = proxy_js_ref[f_ref]; const ret = f.next(); if (ret.done) { return false; } else { proxy_convert_js_to_mp_obj_jsside(ret.value, out); return true; } }\nfunction js_subscr_load(f_ref,index_ref,out) { const target = proxy_js_ref[f_ref]; const index = python_index_semantics(target, proxy_convert_mp_to_js_obj_jsside(index_ref)); const ret = target[index]; proxy_convert_js_to_mp_obj_jsside(ret, out); }\nfunction js_subscr_store(f_ref,idx,value) { const f = proxy_js_ref[f_ref]; f[proxy_convert_mp_to_js_obj_jsside(idx)] = proxy_convert_mp_to_js_obj_jsside(value); }\nfunction proxy_js_free_obj(js_ref) { if (js_ref >= PROXY_JS_REF_NUM_STATIC) { proxy_js_ref[js_ref] = undefined; if (js_ref < proxy_js_ref_next) { proxy_js_ref_next = js_ref; } } }\nfunction js_check_existing(c_ref) { return proxy_js_check_existing(c_ref); }\nfunction js_get_error_info(jsref,out_name,out_message) { const error = proxy_js_ref[jsref]; proxy_convert_js_to_mp_obj_jsside(error.name, out_name); proxy_convert_js_to_mp_obj_jsside(error.message, out_message); }\nfunction js_then_resolve(ret_value,resolve) { const ret_value_js = proxy_convert_mp_to_js_obj_jsside(ret_value); const resolve_js = proxy_convert_mp_to_js_obj_jsside(resolve); resolve_js(ret_value_js); }\nfunction js_then_reject(ret_value,reject) { let ret_value_js; try { ret_value_js = proxy_convert_mp_to_js_obj_jsside(ret_value); } catch(error) { ret_value_js = error; } const reject_js = proxy_convert_mp_to_js_obj_jsside(reject); reject_js(ret_value_js); }\nfunction js_then_continue(jsref,py_resume,resolve,reject,out) { const py_resume_js = proxy_convert_mp_to_js_obj_jsside(py_resume); const resolve_js = proxy_convert_mp_to_js_obj_jsside(resolve); const reject_js = proxy_convert_mp_to_js_obj_jsside(reject); const ret = proxy_js_ref[jsref].then( (result) => { py_resume_js(result, null, resolve_js, reject_js); }, (reason) => { py_resume_js(null, reason, resolve_js, reject_js); }, ); proxy_convert_js_to_mp_obj_jsside(ret, out); }\nfunction create_promise(out_set,out_promise) { const out_set_js = proxy_convert_mp_to_js_obj_jsside(out_set); const promise = new Promise(out_set_js); proxy_convert_js_to_mp_obj_jsside(promise, out_promise); }\n\n// Imports from the Wasm binary.\nvar _mp_sched_keyboard_interrupt = Module['_mp_sched_keyboard_interrupt'] = makeInvalidEarlyAccess('_mp_sched_keyboard_interrupt');\nvar _mp_js_init = Module['_mp_js_init'] = makeInvalidEarlyAccess('_mp_js_init');\nvar _malloc = Module['_malloc'] = makeInvalidEarlyAccess('_malloc');\nvar _mp_js_register_js_module = Module['_mp_js_register_js_module'] = makeInvalidEarlyAccess('_mp_js_register_js_module');\nvar _mp_js_do_import = Module['_mp_js_do_import'] = makeInvalidEarlyAccess('_mp_js_do_import');\nvar _proxy_convert_mp_to_js_obj_cside = Module['_proxy_convert_mp_to_js_obj_cside'] = makeInvalidEarlyAccess('_proxy_convert_mp_to_js_obj_cside');\nvar _mp_js_do_exec = Module['_mp_js_do_exec'] = makeInvalidEarlyAccess('_mp_js_do_exec');\nvar _mp_js_do_exec_async = Module['_mp_js_do_exec_async'] = makeInvalidEarlyAccess('_mp_js_do_exec_async');\nvar _mp_js_repl_init = Module['_mp_js_repl_init'] = makeInvalidEarlyAccess('_mp_js_repl_init');\nvar _mp_js_repl_process_char = Module['_mp_js_repl_process_char'] = makeInvalidEarlyAccess('_mp_js_repl_process_char');\nvar _mp_hal_get_interrupt_char = Module['_mp_hal_get_interrupt_char'] = makeInvalidEarlyAccess('_mp_hal_get_interrupt_char');\nvar _proxy_c_init = Module['_proxy_c_init'] = makeInvalidEarlyAccess('_proxy_c_init');\nvar _proxy_c_free_obj = Module['_proxy_c_free_obj'] = makeInvalidEarlyAccess('_proxy_c_free_obj');\nvar _free = Module['_free'] = makeInvalidEarlyAccess('_free');\nvar _proxy_c_to_js_call = Module['_proxy_c_to_js_call'] = makeInvalidEarlyAccess('_proxy_c_to_js_call');\nvar _proxy_c_to_js_dir = Module['_proxy_c_to_js_dir'] = makeInvalidEarlyAccess('_proxy_c_to_js_dir');\nvar _proxy_c_to_js_has_attr = Module['_proxy_c_to_js_has_attr'] = makeInvalidEarlyAccess('_proxy_c_to_js_has_attr');\nvar _proxy_c_to_js_lookup_attr = Module['_proxy_c_to_js_lookup_attr'] = makeInvalidEarlyAccess('_proxy_c_to_js_lookup_attr');\nvar _proxy_c_to_js_store_attr = Module['_proxy_c_to_js_store_attr'] = makeInvalidEarlyAccess('_proxy_c_to_js_store_attr');\nvar _proxy_c_to_js_delete_attr = Module['_proxy_c_to_js_delete_attr'] = makeInvalidEarlyAccess('_proxy_c_to_js_delete_attr');\nvar _proxy_c_to_js_get_type = Module['_proxy_c_to_js_get_type'] = makeInvalidEarlyAccess('_proxy_c_to_js_get_type');\nvar _proxy_c_to_js_get_array = Module['_proxy_c_to_js_get_array'] = makeInvalidEarlyAccess('_proxy_c_to_js_get_array');\nvar _proxy_c_to_js_get_dict = Module['_proxy_c_to_js_get_dict'] = makeInvalidEarlyAccess('_proxy_c_to_js_get_dict');\nvar _proxy_c_to_js_get_iter = Module['_proxy_c_to_js_get_iter'] = makeInvalidEarlyAccess('_proxy_c_to_js_get_iter');\nvar _proxy_c_to_js_iternext = Module['_proxy_c_to_js_iternext'] = makeInvalidEarlyAccess('_proxy_c_to_js_iternext');\nvar _proxy_c_to_js_resume = Module['_proxy_c_to_js_resume'] = makeInvalidEarlyAccess('_proxy_c_to_js_resume');\nvar _emscripten_stack_get_base = makeInvalidEarlyAccess('_emscripten_stack_get_base');\nvar _emscripten_stack_get_current = makeInvalidEarlyAccess('_emscripten_stack_get_current');\nvar _fflush = makeInvalidEarlyAccess('_fflush');\nvar _strerror = makeInvalidEarlyAccess('_strerror');\nvar _emscripten_stack_get_end = makeInvalidEarlyAccess('_emscripten_stack_get_end');\nvar _setThrew = makeInvalidEarlyAccess('_setThrew');\nvar _emscripten_stack_init = makeInvalidEarlyAccess('_emscripten_stack_init');\nvar _emscripten_stack_get_free = makeInvalidEarlyAccess('_emscripten_stack_get_free');\nvar __emscripten_stack_restore = makeInvalidEarlyAccess('__emscripten_stack_restore');\nvar __emscripten_stack_alloc = makeInvalidEarlyAccess('__emscripten_stack_alloc');\nvar dynCall_viii = makeInvalidEarlyAccess('dynCall_viii');\nvar dynCall_vi = makeInvalidEarlyAccess('dynCall_vi');\nvar dynCall_ii = makeInvalidEarlyAccess('dynCall_ii');\nvar dynCall_vii = makeInvalidEarlyAccess('dynCall_vii');\nvar dynCall_iii = makeInvalidEarlyAccess('dynCall_iii');\nvar dynCall_viiii = makeInvalidEarlyAccess('dynCall_viiii');\nvar dynCall_iiii = makeInvalidEarlyAccess('dynCall_iiii');\nvar dynCall_iiiii = makeInvalidEarlyAccess('dynCall_iiiii');\nvar dynCall_v = makeInvalidEarlyAccess('dynCall_v');\nvar dynCall_i = makeInvalidEarlyAccess('dynCall_i');\nvar dynCall_dd = makeInvalidEarlyAccess('dynCall_dd');\nvar dynCall_ddd = makeInvalidEarlyAccess('dynCall_ddd');\nvar dynCall_viiiiii = makeInvalidEarlyAccess('dynCall_viiiiii');\nvar dynCall_iiiiii = makeInvalidEarlyAccess('dynCall_iiiiii');\nvar dynCall_di = makeInvalidEarlyAccess('dynCall_di');\nvar dynCall_vid = makeInvalidEarlyAccess('dynCall_vid');\nvar dynCall_iidiiii = makeInvalidEarlyAccess('dynCall_iidiiii');\nvar dynCall_jiji = makeInvalidEarlyAccess('dynCall_jiji');\nvar _asyncify_start_unwind = makeInvalidEarlyAccess('_asyncify_start_unwind');\nvar _asyncify_stop_unwind = makeInvalidEarlyAccess('_asyncify_stop_unwind');\nvar _asyncify_start_rewind = makeInvalidEarlyAccess('_asyncify_start_rewind');\nvar _asyncify_stop_rewind = makeInvalidEarlyAccess('_asyncify_stop_rewind');\nvar memory = makeInvalidEarlyAccess('memory');\nvar __indirect_function_table = makeInvalidEarlyAccess('__indirect_function_table');\nvar wasmMemory = makeInvalidEarlyAccess('wasmMemory');\nvar wasmTable = makeInvalidEarlyAccess('wasmTable');\n\nfunction assignWasmExports(wasmExports) {\n  assert(typeof wasmExports['mp_sched_keyboard_interrupt'] != 'undefined', 'missing Wasm export: mp_sched_keyboard_interrupt');\n  assert(typeof wasmExports['mp_js_init'] != 'undefined', 'missing Wasm export: mp_js_init');\n  assert(typeof wasmExports['malloc'] != 'undefined', 'missing Wasm export: malloc');\n  assert(typeof wasmExports['mp_js_register_js_module'] != 'undefined', 'missing Wasm export: mp_js_register_js_module');\n  assert(typeof wasmExports['mp_js_do_import'] != 'undefined', 'missing Wasm export: mp_js_do_import');\n  assert(typeof wasmExports['proxy_convert_mp_to_js_obj_cside'] != 'undefined', 'missing Wasm export: proxy_convert_mp_to_js_obj_cside');\n  assert(typeof wasmExports['mp_js_do_exec'] != 'undefined', 'missing Wasm export: mp_js_do_exec');\n  assert(typeof wasmExports['mp_js_do_exec_async'] != 'undefined', 'missing Wasm export: mp_js_do_exec_async');\n  assert(typeof wasmExports['mp_js_repl_init'] != 'undefined', 'missing Wasm export: mp_js_repl_init');\n  assert(typeof wasmExports['mp_js_repl_process_char'] != 'undefined', 'missing Wasm export: mp_js_repl_process_char');\n  assert(typeof wasmExports['mp_hal_get_interrupt_char'] != 'undefined', 'missing Wasm export: mp_hal_get_interrupt_char');\n  assert(typeof wasmExports['proxy_c_init'] != 'undefined', 'missing Wasm export: proxy_c_init');\n  assert(typeof wasmExports['proxy_c_free_obj'] != 'undefined', 'missing Wasm export: proxy_c_free_obj');\n  assert(typeof wasmExports['free'] != 'undefined', 'missing Wasm export: free');\n  assert(typeof wasmExports['proxy_c_to_js_call'] != 'undefined', 'missing Wasm export: proxy_c_to_js_call');\n  assert(typeof wasmExports['proxy_c_to_js_dir'] != 'undefined', 'missing Wasm export: proxy_c_to_js_dir');\n  assert(typeof wasmExports['proxy_c_to_js_has_attr'] != 'undefined', 'missing Wasm export: proxy_c_to_js_has_attr');\n  assert(typeof wasmExports['proxy_c_to_js_lookup_attr'] != 'undefined', 'missing Wasm export: proxy_c_to_js_lookup_attr');\n  assert(typeof wasmExports['proxy_c_to_js_store_attr'] != 'undefined', 'missing Wasm export: proxy_c_to_js_store_attr');\n  assert(typeof wasmExports['proxy_c_to_js_delete_attr'] != 'undefined', 'missing Wasm export: proxy_c_to_js_delete_attr');\n  assert(typeof wasmExports['proxy_c_to_js_get_type'] != 'undefined', 'missing Wasm export: proxy_c_to_js_get_type');\n  assert(typeof wasmExports['proxy_c_to_js_get_array'] != 'undefined', 'missing Wasm export: proxy_c_to_js_get_array');\n  assert(typeof wasmExports['proxy_c_to_js_get_dict'] != 'undefined', 'missing Wasm export: proxy_c_to_js_get_dict');\n  assert(typeof wasmExports['proxy_c_to_js_get_iter'] != 'undefined', 'missing Wasm export: proxy_c_to_js_get_iter');\n  assert(typeof wasmExports['proxy_c_to_js_iternext'] != 'undefined', 'missing Wasm export: proxy_c_to_js_iternext');\n  assert(typeof wasmExports['proxy_c_to_js_resume'] != 'undefined', 'missing Wasm export: proxy_c_to_js_resume');\n  assert(typeof wasmExports['emscripten_stack_get_base'] != 'undefined', 'missing Wasm export: emscripten_stack_get_base');\n  assert(typeof wasmExports['emscripten_stack_get_current'] != 'undefined', 'missing Wasm export: emscripten_stack_get_current');\n  assert(typeof wasmExports['fflush'] != 'undefined', 'missing Wasm export: fflush');\n  assert(typeof wasmExports['strerror'] != 'undefined', 'missing Wasm export: strerror');\n  assert(typeof wasmExports['emscripten_stack_get_end'] != 'undefined', 'missing Wasm export: emscripten_stack_get_end');\n  assert(typeof wasmExports['setThrew'] != 'undefined', 'missing Wasm export: setThrew');\n  assert(typeof wasmExports['emscripten_stack_init'] != 'undefined', 'missing Wasm export: emscripten_stack_init');\n  assert(typeof wasmExports['emscripten_stack_get_free'] != 'undefined', 'missing Wasm export: emscripten_stack_get_free');\n  assert(typeof wasmExports['_emscripten_stack_restore'] != 'undefined', 'missing Wasm export: _emscripten_stack_restore');\n  assert(typeof wasmExports['_emscripten_stack_alloc'] != 'undefined', 'missing Wasm export: _emscripten_stack_alloc');\n  assert(typeof wasmExports['dynCall_viii'] != 'undefined', 'missing Wasm export: dynCall_viii');\n  assert(typeof wasmExports['dynCall_vi'] != 'undefined', 'missing Wasm export: dynCall_vi');\n  assert(typeof wasmExports['dynCall_ii'] != 'undefined', 'missing Wasm export: dynCall_ii');\n  assert(typeof wasmExports['dynCall_vii'] != 'undefined', 'missing Wasm export: dynCall_vii');\n  assert(typeof wasmExports['dynCall_iii'] != 'undefined', 'missing Wasm export: dynCall_iii');\n  assert(typeof wasmExports['dynCall_viiii'] != 'undefined', 'missing Wasm export: dynCall_viiii');\n  assert(typeof wasmExports['dynCall_iiii'] != 'undefined', 'missing Wasm export: dynCall_iiii');\n  assert(typeof wasmExports['dynCall_iiiii'] != 'undefined', 'missing Wasm export: dynCall_iiiii');\n  assert(typeof wasmExports['dynCall_v'] != 'undefined', 'missing Wasm export: dynCall_v');\n  assert(typeof wasmExports['dynCall_i'] != 'undefined', 'missing Wasm export: dynCall_i');\n  assert(typeof wasmExports['dynCall_dd'] != 'undefined', 'missing Wasm export: dynCall_dd');\n  assert(typeof wasmExports['dynCall_ddd'] != 'undefined', 'missing Wasm export: dynCall_ddd');\n  assert(typeof wasmExports['dynCall_viiiiii'] != 'undefined', 'missing Wasm export: dynCall_viiiiii');\n  assert(typeof wasmExports['dynCall_iiiiii'] != 'undefined', 'missing Wasm export: dynCall_iiiiii');\n  assert(typeof wasmExports['dynCall_di'] != 'undefined', 'missing Wasm export: dynCall_di');\n  assert(typeof wasmExports['dynCall_vid'] != 'undefined', 'missing Wasm export: dynCall_vid');\n  assert(typeof wasmExports['dynCall_iidiiii'] != 'undefined', 'missing Wasm export: dynCall_iidiiii');\n  assert(typeof wasmExports['dynCall_jiji'] != 'undefined', 'missing Wasm export: dynCall_jiji');\n  assert(typeof wasmExports['asyncify_start_unwind'] != 'undefined', 'missing Wasm export: asyncify_start_unwind');\n  assert(typeof wasmExports['asyncify_stop_unwind'] != 'undefined', 'missing Wasm export: asyncify_stop_unwind');\n  assert(typeof wasmExports['asyncify_start_rewind'] != 'undefined', 'missing Wasm export: asyncify_start_rewind');\n  assert(typeof wasmExports['asyncify_stop_rewind'] != 'undefined', 'missing Wasm export: asyncify_stop_rewind');\n  assert(typeof wasmExports['memory'] != 'undefined', 'missing Wasm export: memory');\n  assert(typeof wasmExports['__indirect_function_table'] != 'undefined', 'missing Wasm export: __indirect_function_table');\n  _mp_sched_keyboard_interrupt = Module['_mp_sched_keyboard_interrupt'] = createExportWrapper('mp_sched_keyboard_interrupt', 0);\n  _mp_js_init = Module['_mp_js_init'] = createExportWrapper('mp_js_init', 2);\n  _malloc = Module['_malloc'] = createExportWrapper('malloc', 1);\n  _mp_js_register_js_module = Module['_mp_js_register_js_module'] = createExportWrapper('mp_js_register_js_module', 2);\n  _mp_js_do_import = Module['_mp_js_do_import'] = createExportWrapper('mp_js_do_import', 2);\n  _proxy_convert_mp_to_js_obj_cside = Module['_proxy_convert_mp_to_js_obj_cside'] = createExportWrapper('proxy_convert_mp_to_js_obj_cside', 2);\n  _mp_js_do_exec = Module['_mp_js_do_exec'] = createExportWrapper('mp_js_do_exec', 3);\n  _mp_js_do_exec_async = Module['_mp_js_do_exec_async'] = createExportWrapper('mp_js_do_exec_async', 3);\n  _mp_js_repl_init = Module['_mp_js_repl_init'] = createExportWrapper('mp_js_repl_init', 0);\n  _mp_js_repl_process_char = Module['_mp_js_repl_process_char'] = createExportWrapper('mp_js_repl_process_char', 1);\n  _mp_hal_get_interrupt_char = Module['_mp_hal_get_interrupt_char'] = createExportWrapper('mp_hal_get_interrupt_char', 0);\n  _proxy_c_init = Module['_proxy_c_init'] = createExportWrapper('proxy_c_init', 0);\n  _proxy_c_free_obj = Module['_proxy_c_free_obj'] = createExportWrapper('proxy_c_free_obj', 1);\n  _free = Module['_free'] = createExportWrapper('free', 1);\n  _proxy_c_to_js_call = Module['_proxy_c_to_js_call'] = createExportWrapper('proxy_c_to_js_call', 4);\n  _proxy_c_to_js_dir = Module['_proxy_c_to_js_dir'] = createExportWrapper('proxy_c_to_js_dir', 2);\n  _proxy_c_to_js_has_attr = Module['_proxy_c_to_js_has_attr'] = createExportWrapper('proxy_c_to_js_has_attr', 2);\n  _proxy_c_to_js_lookup_attr = Module['_proxy_c_to_js_lookup_attr'] = createExportWrapper('proxy_c_to_js_lookup_attr', 3);\n  _proxy_c_to_js_store_attr = Module['_proxy_c_to_js_store_attr'] = createExportWrapper('proxy_c_to_js_store_attr', 3);\n  _proxy_c_to_js_delete_attr = Module['_proxy_c_to_js_delete_attr'] = createExportWrapper('proxy_c_to_js_delete_attr', 2);\n  _proxy_c_to_js_get_type = Module['_proxy_c_to_js_get_type'] = createExportWrapper('proxy_c_to_js_get_type', 1);\n  _proxy_c_to_js_get_array = Module['_proxy_c_to_js_get_array'] = createExportWrapper('proxy_c_to_js_get_array', 2);\n  _proxy_c_to_js_get_dict = Module['_proxy_c_to_js_get_dict'] = createExportWrapper('proxy_c_to_js_get_dict', 2);\n  _proxy_c_to_js_get_iter = Module['_proxy_c_to_js_get_iter'] = createExportWrapper('proxy_c_to_js_get_iter', 1);\n  _proxy_c_to_js_iternext = Module['_proxy_c_to_js_iternext'] = createExportWrapper('proxy_c_to_js_iternext', 2);\n  _proxy_c_to_js_resume = Module['_proxy_c_to_js_resume'] = createExportWrapper('proxy_c_to_js_resume', 2);\n  _emscripten_stack_get_base = wasmExports['emscripten_stack_get_base'];\n  _emscripten_stack_get_current = wasmExports['emscripten_stack_get_current'];\n  _fflush = createExportWrapper('fflush', 1);\n  _strerror = createExportWrapper('strerror', 1);\n  _emscripten_stack_get_end = wasmExports['emscripten_stack_get_end'];\n  _setThrew = createExportWrapper('setThrew', 2);\n  _emscripten_stack_init = wasmExports['emscripten_stack_init'];\n  _emscripten_stack_get_free = wasmExports['emscripten_stack_get_free'];\n  __emscripten_stack_restore = wasmExports['_emscripten_stack_restore'];\n  __emscripten_stack_alloc = wasmExports['_emscripten_stack_alloc'];\n  dynCall_viii = dynCalls['viii'] = createExportWrapper('dynCall_viii', 4);\n  dynCall_vi = dynCalls['vi'] = createExportWrapper('dynCall_vi', 2);\n  dynCall_ii = dynCalls['ii'] = createExportWrapper('dynCall_ii', 2);\n  dynCall_vii = dynCalls['vii'] = createExportWrapper('dynCall_vii', 3);\n  dynCall_iii = dynCalls['iii'] = createExportWrapper('dynCall_iii', 3);\n  dynCall_viiii = dynCalls['viiii'] = createExportWrapper('dynCall_viiii', 5);\n  dynCall_iiii = dynCalls['iiii'] = createExportWrapper('dynCall_iiii', 4);\n  dynCall_iiiii = dynCalls['iiiii'] = createExportWrapper('dynCall_iiiii', 5);\n  dynCall_v = dynCalls['v'] = createExportWrapper('dynCall_v', 1);\n  dynCall_i = dynCalls['i'] = createExportWrapper('dynCall_i', 1);\n  dynCall_dd = dynCalls['dd'] = createExportWrapper('dynCall_dd', 2);\n  dynCall_ddd = dynCalls['ddd'] = createExportWrapper('dynCall_ddd', 3);\n  dynCall_viiiiii = dynCalls['viiiiii'] = createExportWrapper('dynCall_viiiiii', 7);\n  dynCall_iiiiii = dynCalls['iiiiii'] = createExportWrapper('dynCall_iiiiii', 6);\n  dynCall_di = dynCalls['di'] = createExportWrapper('dynCall_di', 2);\n  dynCall_vid = dynCalls['vid'] = createExportWrapper('dynCall_vid', 3);\n  dynCall_iidiiii = dynCalls['iidiiii'] = createExportWrapper('dynCall_iidiiii', 7);\n  dynCall_jiji = dynCalls['jiji'] = createExportWrapper('dynCall_jiji', 4);\n  _asyncify_start_unwind = createExportWrapper('asyncify_start_unwind', 1);\n  _asyncify_stop_unwind = createExportWrapper('asyncify_stop_unwind', 0);\n  _asyncify_start_rewind = createExportWrapper('asyncify_start_rewind', 1);\n  _asyncify_stop_rewind = createExportWrapper('asyncify_stop_rewind', 0);\n  memory = wasmMemory = wasmExports['memory'];\n  __indirect_function_table = wasmTable = wasmExports['__indirect_function_table'];\n}\n\nvar wasmImports = {\n  /** @export */\n  __syscall_chdir: ___syscall_chdir,\n  /** @export */\n  __syscall_fstat64: ___syscall_fstat64,\n  /** @export */\n  __syscall_getcwd: ___syscall_getcwd,\n  /** @export */\n  __syscall_getdents64: ___syscall_getdents64,\n  /** @export */\n  __syscall_lstat64: ___syscall_lstat64,\n  /** @export */\n  __syscall_mkdirat: ___syscall_mkdirat,\n  /** @export */\n  __syscall_newfstatat: ___syscall_newfstatat,\n  /** @export */\n  __syscall_openat: ___syscall_openat,\n  /** @export */\n  __syscall_poll: ___syscall_poll,\n  /** @export */\n  __syscall_renameat: ___syscall_renameat,\n  /** @export */\n  __syscall_rmdir: ___syscall_rmdir,\n  /** @export */\n  __syscall_stat64: ___syscall_stat64,\n  /** @export */\n  __syscall_statfs64: ___syscall_statfs64,\n  /** @export */\n  __syscall_unlinkat: ___syscall_unlinkat,\n  /** @export */\n  _abort_js: __abort_js,\n  /** @export */\n  _emscripten_throw_longjmp: __emscripten_throw_longjmp,\n  /** @export */\n  call0,\n  /** @export */\n  call0_kwarg,\n  /** @export */\n  call1,\n  /** @export */\n  call1_kwarg,\n  /** @export */\n  call2,\n  /** @export */\n  calln,\n  /** @export */\n  create_promise,\n  /** @export */\n  emscripten_resize_heap: _emscripten_resize_heap,\n  /** @export */\n  emscripten_scan_registers: _emscripten_scan_registers,\n  /** @export */\n  fd_close: _fd_close,\n  /** @export */\n  fd_read: _fd_read,\n  /** @export */\n  fd_seek: _fd_seek,\n  /** @export */\n  fd_sync: _fd_sync,\n  /** @export */\n  fd_write: _fd_write,\n  /** @export */\n  has_attr,\n  /** @export */\n  invoke_i,\n  /** @export */\n  invoke_ii,\n  /** @export */\n  invoke_iii,\n  /** @export */\n  invoke_iiii,\n  /** @export */\n  invoke_iiiii,\n  /** @export */\n  invoke_iiiiii,\n  /** @export */\n  invoke_v,\n  /** @export */\n  invoke_vi,\n  /** @export */\n  invoke_vii,\n  /** @export */\n  invoke_viii,\n  /** @export */\n  invoke_viiii,\n  /** @export */\n  js_check_existing,\n  /** @export */\n  js_get_error_info,\n  /** @export */\n  js_get_iter,\n  /** @export */\n  js_get_proxy_js_ref_info,\n  /** @export */\n  js_iter_next,\n  /** @export */\n  js_reflect_construct,\n  /** @export */\n  js_subscr_load,\n  /** @export */\n  js_subscr_store,\n  /** @export */\n  js_then_continue,\n  /** @export */\n  js_then_reject,\n  /** @export */\n  js_then_resolve,\n  /** @export */\n  lookup_attr,\n  /** @export */\n  mp_js_hook: _mp_js_hook,\n  /** @export */\n  mp_js_random_u32: _mp_js_random_u32,\n  /** @export */\n  mp_js_ticks_ms: _mp_js_ticks_ms,\n  /** @export */\n  mp_js_time_ms: _mp_js_time_ms,\n  /** @export */\n  proxy_convert_mp_to_js_then_js_to_js_then_js_to_mp_obj_jsside,\n  /** @export */\n  proxy_convert_mp_to_js_then_js_to_mp_obj_jsside,\n  /** @export */\n  proxy_js_free_obj,\n  /** @export */\n  store_attr\n};\n\nfunction invoke_ii(index,a1) {\n  var sp = stackSave();\n  try {\n    return dynCall_ii(index,a1);\n  } catch(e) {\n    stackRestore(sp);\n    if (e !== e+0) throw e;\n    _setThrew(1, 0);\n  }\n}\n\nfunction invoke_viii(index,a1,a2,a3) {\n  var sp = stackSave();\n  try {\n    dynCall_viii(index,a1,a2,a3);\n  } catch(e) {\n    stackRestore(sp);\n    if (e !== e+0) throw e;\n    _setThrew(1, 0);\n  }\n}\n\nfunction invoke_iiiii(index,a1,a2,a3,a4) {\n  var sp = stackSave();\n  try {\n    return dynCall_iiiii(index,a1,a2,a3,a4);\n  } catch(e) {\n    stackRestore(sp);\n    if (e !== e+0) throw e;\n    _setThrew(1, 0);\n  }\n}\n\nfunction invoke_v(index) {\n  var sp = stackSave();\n  try {\n    dynCall_v(index);\n  } catch(e) {\n    stackRestore(sp);\n    if (e !== e+0) throw e;\n    _setThrew(1, 0);\n  }\n}\n\nfunction invoke_iii(index,a1,a2) {\n  var sp = stackSave();\n  try {\n    return dynCall_iii(index,a1,a2);\n  } catch(e) {\n    stackRestore(sp);\n    if (e !== e+0) throw e;\n    _setThrew(1, 0);\n  }\n}\n\nfunction invoke_vi(index,a1) {\n  var sp = stackSave();\n  try {\n    dynCall_vi(index,a1);\n  } catch(e) {\n    stackRestore(sp);\n    if (e !== e+0) throw e;\n    _setThrew(1, 0);\n  }\n}\n\nfunction invoke_vii(index,a1,a2) {\n  var sp = stackSave();\n  try {\n    dynCall_vii(index,a1,a2);\n  } catch(e) {\n    stackRestore(sp);\n    if (e !== e+0) throw e;\n    _setThrew(1, 0);\n  }\n}\n\nfunction invoke_iiii(index,a1,a2,a3) {\n  var sp = stackSave();\n  try {\n    return dynCall_iiii(index,a1,a2,a3);\n  } catch(e) {\n    stackRestore(sp);\n    if (e !== e+0) throw e;\n    _setThrew(1, 0);\n  }\n}\n\nfunction invoke_i(index) {\n  var sp = stackSave();\n  try {\n    return dynCall_i(index);\n  } catch(e) {\n    stackRestore(sp);\n    if (e !== e+0) throw e;\n    _setThrew(1, 0);\n  }\n}\n\nfunction invoke_viiii(index,a1,a2,a3,a4) {\n  var sp = stackSave();\n  try {\n    dynCall_viiii(index,a1,a2,a3,a4);\n  } catch(e) {\n    stackRestore(sp);\n    if (e !== e+0) throw e;\n    _setThrew(1, 0);\n  }\n}\n\nfunction invoke_iiiiii(index,a1,a2,a3,a4,a5) {\n  var sp = stackSave();\n  try {\n    return dynCall_iiiiii(index,a1,a2,a3,a4,a5);\n  } catch(e) {\n    stackRestore(sp);\n    if (e !== e+0) throw e;\n    _setThrew(1, 0);\n  }\n}\n\n\n// include: postamble.js\n// === Auto-generated postamble setup entry stuff ===\n\nvar calledRun;\n\nfunction stackCheckInit() {\n  // This is normally called automatically during __wasm_call_ctors but need to\n  // get these values before even running any of the ctors so we call it redundantly\n  // here.\n  _emscripten_stack_init();\n  // TODO(sbc): Move writeStackCookie to native to to avoid this.\n  writeStackCookie();\n}\n\nfunction run() {\n\n  if (runDependencies > 0) {\n    dependenciesFulfilled = run;\n    return;\n  }\n\n  stackCheckInit();\n\n  preRun();\n\n  // a preRun added a dependency, run will be called later\n  if (runDependencies > 0) {\n    dependenciesFulfilled = run;\n    return;\n  }\n\n  function doRun() {\n    // run may have just been called through dependencies being fulfilled just in this very frame,\n    // or while the async setStatus time below was happening\n    assert(!calledRun);\n    calledRun = true;\n    Module['calledRun'] = true;\n\n    if (ABORT) return;\n\n    initRuntime();\n\n    readyPromiseResolve?.(Module);\n    Module['onRuntimeInitialized']?.();\n    consumedModuleProp('onRuntimeInitialized');\n\n    assert(!Module['_main'], 'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]');\n\n    postRun();\n  }\n\n  if (Module['setStatus']) {\n    Module['setStatus']('Running...');\n    setTimeout(() => {\n      setTimeout(() => Module['setStatus'](''), 1);\n      doRun();\n    }, 1);\n  } else\n  {\n    doRun();\n  }\n  checkStackCookie();\n}\n\nfunction checkUnflushedContent() {\n  // Compiler settings do not allow exiting the runtime, so flushing\n  // the streams is not possible. but in ASSERTIONS mode we check\n  // if there was something to flush, and if so tell the user they\n  // should request that the runtime be exitable.\n  // Normally we would not even include flush() at all, but in ASSERTIONS\n  // builds we do so just for this check, and here we see if there is any\n  // content to flush, that is, we check if there would have been\n  // something a non-ASSERTIONS build would have not seen.\n  // How we flush the streams depends on whether we are in SYSCALLS_REQUIRE_FILESYSTEM=0\n  // mode (which has its own special function for this; otherwise, all\n  // the code is inside libc)\n  var oldOut = out;\n  var oldErr = err;\n  var has = false;\n  out = err = (x) => {\n    has = true;\n  }\n  try { // it doesn't matter if it fails\n    _fflush(0);\n    // also flush in the JS FS layer\n    for (var name of ['stdout', 'stderr']) {\n      var info = FS.analyzePath('/dev/' + name);\n      if (!info) return;\n      var stream = info.object;\n      var rdev = stream.rdev;\n      var tty = TTY.ttys[rdev];\n      if (tty?.output?.length) {\n        has = true;\n      }\n    }\n  } catch(e) {}\n  out = oldOut;\n  err = oldErr;\n  if (has) {\n    warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.');\n  }\n}\n\nvar wasmExports;\n\n// In modularize mode the generated code is within a factory function so we\n// can use await here (since it's not top-level-await).\nwasmExports = await (createWasm());\n\nrun();\n\n// end include: postamble.js\n\n// include: postamble_modularize.js\n// In MODULARIZE mode we wrap the generated code in a factory function\n// and return either the Module itself, or a promise of the module.\n//\n// We assign to the `moduleRtn` global here and configure closure to see\n// this as and extern so it won't get minified.\n\nif (runtimeInitialized)  {\n  moduleRtn = Module;\n} else {\n  // Set up the promise that indicates the Module is initialized\n  moduleRtn = new Promise((resolve, reject) => {\n    readyPromiseResolve = resolve;\n    readyPromiseReject = reject;\n  });\n}\n\n// Assertion for attempting to access module properties on the incoming\n// moduleArg.  In the past we used this object as the prototype of the module\n// and assigned properties to it, but now we return a distinct object.  This\n// keeps the instance private until it is ready (i.e the promise has been\n// resolved).\nfor (const prop of Object.keys(Module)) {\n  if (!(prop in moduleArg)) {\n    Object.defineProperty(moduleArg, prop, {\n      configurable: true,\n      get() {\n        abort(`Access to module property ('${prop}') is no longer possible via the module constructor argument; Instead, use the result of the module constructor.`)\n      }\n    });\n  }\n}\n// end include: postamble_modularize.js\n\n\n\n  return moduleRtn;\n}\n\n// Export using a UMD style export, or ES6 exports if selected\nexport default _createMicroPythonModule;\n\n/*\n * This file is part of the MicroPython project, http://micropython.org/\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2023-2024 Damien P. George\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// Options:\n// - pystack: size in words of the MicroPython Python stack.\n// - heapsize: size in bytes of the MicroPython GC heap.\n// - url: location to load `micropython.mjs`.\n// - stdin: function to return input characters.\n// - stdout: function that takes one argument, and is passed lines of stdout\n//   output as they are produced.  By default this is handled by Emscripten\n//   and in a browser goes to console, in node goes to process.stdout.write.\n// - stderr: same behaviour as stdout but for error output.\n// - linebuffer: whether to buffer line-by-line to stdout/stderr.\nexport async function loadMicroPython(options) {\n    const { pystack, heapsize, url, stdin, stdout, stderr, linebuffer } =\n        Object.assign(\n            { pystack: 2 * 1024, heapsize: 1024 * 1024, linebuffer: true },\n            options,\n        );\n    let Module = {};\n    Module.locateFile = (path, scriptDirectory) =>\n        url || scriptDirectory + path;\n    Module._textDecoder = new TextDecoder();\n    if (stdin !== undefined) {\n        Module.stdin = stdin;\n    }\n    if (stdout !== undefined) {\n        if (linebuffer) {\n            Module._stdoutBuffer = [];\n            Module.stdout = (c) => {\n                if (c === 10) {\n                    stdout(\n                        Module._textDecoder.decode(\n                            new Uint8Array(Module._stdoutBuffer),\n                        ),\n                    );\n                    Module._stdoutBuffer = [];\n                } else {\n                    Module._stdoutBuffer.push(c);\n                }\n            };\n        } else {\n            Module.stdout = (c) => stdout(new Uint8Array([c]));\n        }\n    }\n    if (stderr !== undefined) {\n        if (linebuffer) {\n            Module._stderrBuffer = [];\n            Module.stderr = (c) => {\n                if (c === 10) {\n                    stderr(\n                        Module._textDecoder.decode(\n                            new Uint8Array(Module._stderrBuffer),\n                        ),\n                    );\n                    Module._stderrBuffer = [];\n                } else {\n                    Module._stderrBuffer.push(c);\n                }\n            };\n        } else {\n            Module.stderr = (c) => stderr(new Uint8Array([c]));\n        }\n    }\n    Module = await _createMicroPythonModule(Module);\n    globalThis.Module = Module;\n    proxy_js_init();\n    const pyimport = (name) => {\n        const value = Module._malloc(3 * 4);\n        Module.ccall(\n            \"mp_js_do_import\",\n            \"null\",\n            [\"string\", \"pointer\"],\n            [name, value],\n        );\n        return proxy_convert_mp_to_js_obj_jsside_with_free(value);\n    };\n    Module.ccall(\n        \"mp_js_init\",\n        \"null\",\n        [\"number\", \"number\"],\n        [pystack, heapsize],\n    );\n    Module.ccall(\"proxy_c_init\", \"null\", [], []);\n    return {\n        _module: Module,\n        PyProxy: PyProxy,\n        FS: Module.FS,\n        globals: {\n            __dict__: pyimport(\"__main__\").__dict__,\n            get(key) {\n                return this.__dict__[key];\n            },\n            set(key, value) {\n                this.__dict__[key] = value;\n            },\n            delete(key) {\n                delete this.__dict__[key];\n            },\n        },\n        registerJsModule(name, module) {\n            const value = Module._malloc(3 * 4);\n            proxy_convert_js_to_mp_obj_jsside(module, value);\n            Module.ccall(\n                \"mp_js_register_js_module\",\n                \"null\",\n                [\"string\", \"pointer\"],\n                [name, value],\n            );\n            Module._free(value);\n        },\n        pyimport: pyimport,\n        runPython(code) {\n            const len = Module.lengthBytesUTF8(code);\n            const buf = Module._malloc(len + 1);\n            Module.stringToUTF8(code, buf, len + 1);\n            const value = Module._malloc(3 * 4);\n            Module.ccall(\n                \"mp_js_do_exec\",\n                \"number\",\n                [\"pointer\", \"number\", \"pointer\"],\n                [buf, len, value],\n            );\n            Module._free(buf);\n            return proxy_convert_mp_to_js_obj_jsside_with_free(value);\n        },\n        runPythonAsync(code) {\n            const len = Module.lengthBytesUTF8(code);\n            const buf = Module._malloc(len + 1);\n            Module.stringToUTF8(code, buf, len + 1);\n            const value = Module._malloc(3 * 4);\n            Module.ccall(\n                \"mp_js_do_exec_async\",\n                \"number\",\n                [\"pointer\", \"number\", \"pointer\"],\n                [buf, len, value],\n                { async: true },\n            );\n            Module._free(buf);\n            const ret = proxy_convert_mp_to_js_obj_jsside_with_free(value);\n            if (ret instanceof PyProxyThenable) {\n                return Promise.resolve(ret);\n            }\n            return ret;\n        },\n        replInit() {\n            Module.ccall(\"mp_js_repl_init\", \"null\", [\"null\"]);\n        },\n        replProcessChar(chr) {\n            return Module.ccall(\n                \"mp_js_repl_process_char\",\n                \"number\",\n                [\"number\"],\n                [chr],\n            );\n        },\n        // Needed if the GC/asyncify is enabled.\n        async replProcessCharWithAsyncify(chr) {\n            return Module.ccall(\n                \"mp_js_repl_process_char\",\n                \"number\",\n                [\"number\"],\n                [chr],\n                { async: true },\n            );\n        },\n    };\n}\n\nglobalThis.loadMicroPython = loadMicroPython;\n\nasync function runCLI() {\n    const fs = await import(\"fs\");\n    let heap_size = 128 * 1024;\n    let contents = \"\";\n    let repl = true;\n\n    for (let i = 2; i < process.argv.length; i++) {\n        if (process.argv[i] === \"-X\" && i < process.argv.length - 1) {\n            if (process.argv[i + 1].includes(\"heapsize=\")) {\n                heap_size = parseInt(process.argv[i + 1].split(\"heapsize=\")[1]);\n                const suffix = process.argv[i + 1].substr(-1).toLowerCase();\n                if (suffix === \"k\") {\n                    heap_size *= 1024;\n                } else if (suffix === \"m\") {\n                    heap_size *= 1024 * 1024;\n                }\n                ++i;\n            }\n        } else {\n            contents += fs.readFileSync(process.argv[i], \"utf8\");\n            repl = false;\n        }\n    }\n\n    if (process.stdin.isTTY === false) {\n        contents = fs.readFileSync(0, \"utf8\");\n        repl = false;\n    }\n\n    const mp = await loadMicroPython({\n        heapsize: heap_size,\n        stdout: (data) => process.stdout.write(data),\n        linebuffer: false,\n    });\n\n    if (repl) {\n        mp.replInit();\n        process.stdin.setRawMode(true);\n        process.stdin.on(\"data\", (data) => {\n            for (let i = 0; i < data.length; i++) {\n                mp.replProcessCharWithAsyncify(data[i]).then((result) => {\n                    if (result) {\n                        process.exit();\n                    }\n                });\n            }\n        });\n    } else {\n        // If the script to run ends with a running of the asyncio main loop, then inject\n        // a simple `asyncio.run` hook that starts the main task.  This is primarily to\n        // support running the standard asyncio tests.\n        if (contents.endsWith(\"asyncio.run(main())\\n\")) {\n            const asyncio = mp.pyimport(\"asyncio\");\n            asyncio.run = async (task) => {\n                await asyncio.create_task(task);\n            };\n        }\n\n        try {\n            mp.runPython(contents);\n        } catch (error) {\n            if (error.name === \"PythonError\") {\n                if (error.type === \"SystemExit\") {\n                    // SystemExit, this is a valid exception to successfully end a script.\n                } else {\n                    // An unhandled Python exception, print in out.\n                    console.error(error.message);\n                }\n            } else {\n                // A non-Python exception.  Re-raise it.\n                throw error;\n            }\n        }\n    }\n}\n\n// Check if Node is running (equivalent to ENVIRONMENT_IS_NODE).\nif (\n    typeof process === \"object\" &&\n    typeof process.versions === \"object\" &&\n    typeof process.versions.node === \"string\"\n) {\n    // Check if this module is run from the command line via `node micropython.mjs`.\n    //\n    // See https://stackoverflow.com/questions/6398196/detect-if-called-through-require-or-directly-by-command-line/66309132#66309132\n    //\n    // Note:\n    // - `resolve()` is used to handle symlinks\n    // - `includes()` is used to handle cases where the file extension was omitted when passed to node\n\n    if (process.argv.length > 1) {\n        const path = await import(\"path\");\n        const url = await import(\"url\");\n\n        const pathToThisFile = path.resolve(url.fileURLToPath(import.meta.url));\n        const pathPassedToNode = path.resolve(process.argv[1]);\n        const isThisFileBeingRunViaCLI =\n            pathToThisFile.includes(pathPassedToNode);\n\n        if (isThisFileBeingRunViaCLI) {\n            runCLI();\n        }\n    }\n}\n/*\n * This file is part of the MicroPython project, http://micropython.org/\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2023-2024 Damien P. George\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nclass PyProxy {\n    constructor(ref) {\n        this._ref = ref;\n    }\n\n    // Convert js_obj -- which is possibly a PyProxy -- to a JavaScript object.\n    static toJs(js_obj) {\n        if (!(js_obj instanceof PyProxy)) {\n            return js_obj;\n        }\n\n        const type = Module.ccall(\n            \"proxy_c_to_js_get_type\",\n            \"number\",\n            [\"number\"],\n            [js_obj._ref],\n        );\n\n        if (type === 1 || type === 2) {\n            // List or tuple.\n            const array_ref = Module._malloc(2 * 4);\n            const item = Module._malloc(3 * 4);\n            Module.ccall(\n                \"proxy_c_to_js_get_array\",\n                \"null\",\n                [\"number\", \"pointer\"],\n                [js_obj._ref, array_ref],\n            );\n            const len = Module.getValue(array_ref, \"i32\");\n            const items_ptr = Module.getValue(array_ref + 4, \"i32\");\n            const js_array = [];\n            for (let i = 0; i < len; ++i) {\n                Module.ccall(\n                    \"proxy_convert_mp_to_js_obj_cside\",\n                    \"null\",\n                    [\"pointer\", \"pointer\"],\n                    [Module.getValue(items_ptr + i * 4, \"i32\"), item],\n                );\n                const js_item = proxy_convert_mp_to_js_obj_jsside(item);\n                js_array.push(PyProxy.toJs(js_item));\n            }\n            Module._free(array_ref);\n            Module._free(item);\n            return js_array;\n        }\n\n        if (type === 3) {\n            // Dict.\n            const map_ref = Module._malloc(2 * 4);\n            const item = Module._malloc(3 * 4);\n            Module.ccall(\n                \"proxy_c_to_js_get_dict\",\n                \"null\",\n                [\"number\", \"pointer\"],\n                [js_obj._ref, map_ref],\n            );\n            const alloc = Module.getValue(map_ref, \"i32\");\n            const table_ptr = Module.getValue(map_ref + 4, \"i32\");\n            const js_dict = {};\n            for (let i = 0; i < alloc; ++i) {\n                const mp_key = Module.getValue(table_ptr + i * 8, \"i32\");\n                if (mp_key > 8) {\n                    // Convert key to JS object.\n                    Module.ccall(\n                        \"proxy_convert_mp_to_js_obj_cside\",\n                        \"null\",\n                        [\"pointer\", \"pointer\"],\n                        [mp_key, item],\n                    );\n                    const js_key = proxy_convert_mp_to_js_obj_jsside(item);\n\n                    // Convert value to JS object.\n                    const mp_value = Module.getValue(\n                        table_ptr + i * 8 + 4,\n                        \"i32\",\n                    );\n                    Module.ccall(\n                        \"proxy_convert_mp_to_js_obj_cside\",\n                        \"null\",\n                        [\"pointer\", \"pointer\"],\n                        [mp_value, item],\n                    );\n                    const js_value = proxy_convert_mp_to_js_obj_jsside(item);\n\n                    // Populate JS dict.\n                    js_dict[js_key] = PyProxy.toJs(js_value);\n                }\n            }\n            Module._free(map_ref);\n            Module._free(item);\n            return js_dict;\n        }\n\n        // Cannot convert to JS, leave as a PyProxy.\n        return js_obj;\n    }\n}\n\n// This handler's goal is to allow minimal introspection\n// of Python references from the JS world/utilities.\nconst py_proxy_handler = {\n    isExtensible() {\n        return true;\n    },\n    ownKeys(target) {\n        const value = Module._malloc(3 * 4);\n        Module.ccall(\n            \"proxy_c_to_js_dir\",\n            \"null\",\n            [\"number\", \"pointer\"],\n            [target._ref, value],\n        );\n        const dir = proxy_convert_mp_to_js_obj_jsside_with_free(value);\n        return PyProxy.toJs(dir).filter((attr) => !attr.startsWith(\"__\"));\n    },\n    getOwnPropertyDescriptor(target, prop) {\n        return {\n            value: target[prop],\n            enumerable: true,\n            writable: true,\n            configurable: true,\n        };\n    },\n    has(target, prop) {\n        return Module.ccall(\n            \"proxy_c_to_js_has_attr\",\n            \"number\",\n            [\"number\", \"string\"],\n            [target._ref, prop],\n        );\n    },\n    get(target, prop) {\n        if (prop === \"_ref\") {\n            return target._ref;\n        }\n        if (prop === \"then\") {\n            return null;\n        }\n\n        if (prop === Symbol.iterator) {\n            // Get the Python object iterator, and return a JavaScript generator.\n            const iter_ref = Module.ccall(\n                \"proxy_c_to_js_get_iter\",\n                \"number\",\n                [\"number\"],\n                [target._ref],\n            );\n            return function* () {\n                const value = Module._malloc(3 * 4);\n                while (true) {\n                    const valid = Module.ccall(\n                        \"proxy_c_to_js_iternext\",\n                        \"number\",\n                        [\"number\", \"pointer\"],\n                        [iter_ref, value],\n                    );\n                    if (!valid) {\n                        break;\n                    }\n                    yield proxy_convert_mp_to_js_obj_jsside(value);\n                }\n                Module._free(value);\n            };\n        }\n\n        const value = Module._malloc(3 * 4);\n        Module.ccall(\n            \"proxy_c_to_js_lookup_attr\",\n            \"null\",\n            [\"number\", \"string\", \"pointer\"],\n            [target._ref, prop, value],\n        );\n        return proxy_convert_mp_to_js_obj_jsside_with_free(value);\n    },\n    set(target, prop, value) {\n        const value_conv = Module._malloc(3 * 4);\n        proxy_convert_js_to_mp_obj_jsside(value, value_conv);\n        const ret = Module.ccall(\n            \"proxy_c_to_js_store_attr\",\n            \"number\",\n            [\"number\", \"string\", \"number\"],\n            [target._ref, prop, value_conv],\n        );\n        Module._free(value_conv);\n        return ret;\n    },\n    deleteProperty(target, prop) {\n        return Module.ccall(\n            \"proxy_c_to_js_delete_attr\",\n            \"number\",\n            [\"number\", \"string\"],\n            [target._ref, prop],\n        );\n    },\n};\n\n// PyProxy of a Python generator, that implements the thenable interface.\nclass PyProxyThenable {\n    constructor(ref) {\n        this._ref = ref;\n    }\n\n    then(resolve, reject) {\n        const values = Module._malloc(3 * 3 * 4);\n        proxy_convert_js_to_mp_obj_jsside(resolve, values + 3 * 4);\n        proxy_convert_js_to_mp_obj_jsside(reject, values + 2 * 3 * 4);\n        Module.ccall(\n            \"proxy_c_to_js_resume\",\n            \"null\",\n            [\"number\", \"pointer\"],\n            [this._ref, values],\n        );\n        return proxy_convert_mp_to_js_obj_jsside_with_free(values);\n    }\n}\n/*\n * This file is part of the MicroPython project, http://micropython.org/\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2023-2024 Damien P. George\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// Number of static entries at the start of proxy_js_ref.\nconst PROXY_JS_REF_NUM_STATIC = 2;\n\n// These constants should match the constants in proxy_c.c.\n\nconst PROXY_KIND_MP_EXCEPTION = -1;\nconst PROXY_KIND_MP_NULL = 0;\nconst PROXY_KIND_MP_NONE = 1;\nconst PROXY_KIND_MP_BOOL = 2;\nconst PROXY_KIND_MP_INT = 3;\nconst PROXY_KIND_MP_FLOAT = 4;\nconst PROXY_KIND_MP_STR = 5;\nconst PROXY_KIND_MP_CALLABLE = 6;\nconst PROXY_KIND_MP_GENERATOR = 7;\nconst PROXY_KIND_MP_OBJECT = 8;\nconst PROXY_KIND_MP_JSPROXY = 9;\nconst PROXY_KIND_MP_EXISTING = 10;\n\nconst PROXY_KIND_JS_UNDEFINED = 0;\nconst PROXY_KIND_JS_NULL = 1;\nconst PROXY_KIND_JS_BOOLEAN = 2;\nconst PROXY_KIND_JS_INTEGER = 3;\nconst PROXY_KIND_JS_DOUBLE = 4;\nconst PROXY_KIND_JS_STRING = 5;\nconst PROXY_KIND_JS_OBJECT = 6;\nconst PROXY_KIND_JS_PYPROXY = 7;\n\nclass PythonError extends Error {\n    constructor(exc_type, exc_details) {\n        super(exc_details);\n        this.name = \"PythonError\";\n        this.type = exc_type;\n    }\n}\n\nfunction proxy_js_init() {\n    globalThis.proxy_js_ref = [globalThis, undefined];\n    globalThis.proxy_js_ref_next = PROXY_JS_REF_NUM_STATIC;\n    globalThis.proxy_js_map = new Map();\n    globalThis.proxy_js_existing = [undefined];\n    globalThis.pyProxyFinalizationRegistry = new FinalizationRegistry(\n        (cRef) => {\n            globalThis.proxy_js_map.delete(cRef);\n            Module.ccall(\"proxy_c_free_obj\", \"null\", [\"number\"], [cRef]);\n        },\n    );\n}\n\n// Check if the c_ref (Python proxy index) has a corresponding JavaScript-side PyProxy\n// associated with it.  If so, take a concrete reference to this PyProxy from the WeakRef\n// and put it in proxy_js_existing, to be referenced and reused by PROXY_KIND_MP_EXISTING.\nfunction proxy_js_check_existing(c_ref) {\n    const existing_obj = globalThis.proxy_js_map.get(c_ref)?.deref();\n    if (existing_obj === undefined) {\n        return -1;\n    }\n\n    // Search for a free slot in proxy_js_existing.\n    for (let i = 0; i < globalThis.proxy_js_existing.length; ++i) {\n        if (globalThis.proxy_js_existing[i] === undefined) {\n            // Free slot found, put existing_obj here and return the index.\n            globalThis.proxy_js_existing[i] = existing_obj;\n            return i;\n        }\n    }\n\n    // No free slot, so append to proxy_js_existing and return the new index.\n    globalThis.proxy_js_existing.push(existing_obj);\n    return globalThis.proxy_js_existing.length - 1;\n}\n\n// js_obj cannot be undefined\nfunction proxy_js_add_obj(js_obj) {\n    // Search for the first free slot in proxy_js_ref.\n    while (proxy_js_ref_next < proxy_js_ref.length) {\n        if (proxy_js_ref[proxy_js_ref_next] === undefined) {\n            // Free slot found, reuse it.\n            const id = proxy_js_ref_next;\n            ++proxy_js_ref_next;\n            proxy_js_ref[id] = js_obj;\n            return id;\n        }\n        ++proxy_js_ref_next;\n    }\n\n    // No free slots, so grow proxy_js_ref by one (append at the end of the array).\n    const id = proxy_js_ref.length;\n    proxy_js_ref[id] = js_obj;\n    proxy_js_ref_next = proxy_js_ref.length;\n    return id;\n}\n\nfunction proxy_call_python(target, argumentsList) {\n    let args = 0;\n\n    // Strip trailing \"undefined\" arguments.\n    while (\n        argumentsList.length > 0 &&\n        argumentsList[argumentsList.length - 1] === undefined\n    ) {\n        argumentsList.pop();\n    }\n\n    if (argumentsList.length > 0) {\n        // TODO use stackAlloc/stackRestore?\n        args = Module._malloc(argumentsList.length * 3 * 4);\n        for (const i in argumentsList) {\n            proxy_convert_js_to_mp_obj_jsside(\n                argumentsList[i],\n                args + i * 3 * 4,\n            );\n        }\n    }\n    const value = Module._malloc(3 * 4);\n    Module.ccall(\n        \"proxy_c_to_js_call\",\n        \"null\",\n        [\"number\", \"number\", \"number\", \"pointer\"],\n        [target, argumentsList.length, args, value],\n    );\n    if (argumentsList.length > 0) {\n        Module._free(args);\n    }\n    const ret = proxy_convert_mp_to_js_obj_jsside_with_free(value);\n    if (ret instanceof PyProxyThenable) {\n        // In Python when an async function is called it creates the\n        // corresponding \"generator\", which must then be executed at\n        // the top level by an asyncio-like scheduler.  In JavaScript\n        // the semantics for async functions is that they are started\n        // immediately (their non-async prefix code is executed immediately)\n        // and only if they await do they return a Promise to delay the\n        // execution of the remainder of the function.\n        //\n        // Emulate the JavaScript behaviour here by resolving the Python\n        // async function.  We assume that the caller who gets this\n        // return is JavaScript.\n        return Promise.resolve(ret);\n    }\n    return ret;\n}\n\nfunction proxy_convert_js_to_mp_obj_jsside(js_obj, out) {\n    let kind;\n    if (js_obj === undefined) {\n        kind = PROXY_KIND_JS_UNDEFINED;\n    } else if (js_obj === null) {\n        kind = PROXY_KIND_JS_NULL;\n    } else if (typeof js_obj === \"boolean\") {\n        kind = PROXY_KIND_JS_BOOLEAN;\n        Module.setValue(out + 4, js_obj, \"i32\");\n    } else if (typeof js_obj === \"number\") {\n        if (Number.isInteger(js_obj)) {\n            kind = PROXY_KIND_JS_INTEGER;\n            Module.setValue(out + 4, js_obj, \"i32\");\n        } else {\n            kind = PROXY_KIND_JS_DOUBLE;\n            // double must be stored to an address that's a multiple of 8\n            const temp = (out + 4) & ~7;\n            Module.setValue(temp, js_obj, \"double\");\n            const double_lo = Module.getValue(temp, \"i32\");\n            const double_hi = Module.getValue(temp + 4, \"i32\");\n            Module.setValue(out + 4, double_lo, \"i32\");\n            Module.setValue(out + 8, double_hi, \"i32\");\n        }\n    } else if (typeof js_obj === \"string\") {\n        kind = PROXY_KIND_JS_STRING;\n        const len = Module.lengthBytesUTF8(js_obj);\n        const buf = Module._malloc(len + 1);\n        Module.stringToUTF8(js_obj, buf, len + 1);\n        Module.setValue(out + 4, len, \"i32\");\n        Module.setValue(out + 8, buf, \"i32\");\n    } else if (\n        js_obj instanceof PyProxy ||\n        (typeof js_obj === \"function\" && \"_ref\" in js_obj) ||\n        js_obj instanceof PyProxyThenable\n    ) {\n        kind = PROXY_KIND_JS_PYPROXY;\n        Module.setValue(out + 4, js_obj._ref, \"i32\");\n    } else {\n        kind = PROXY_KIND_JS_OBJECT;\n        const id = proxy_js_add_obj(js_obj);\n        Module.setValue(out + 4, id, \"i32\");\n    }\n    Module.setValue(out + 0, kind, \"i32\");\n}\n\nfunction proxy_convert_js_to_mp_obj_jsside_force_double_proxy(js_obj, out) {\n    if (\n        js_obj instanceof PyProxy ||\n        (typeof js_obj === \"function\" && \"_ref\" in js_obj) ||\n        js_obj instanceof PyProxyThenable\n    ) {\n        const kind = PROXY_KIND_JS_OBJECT;\n        const id = proxy_js_add_obj(js_obj);\n        Module.setValue(out + 4, id, \"i32\");\n        Module.setValue(out + 0, kind, \"i32\");\n    } else {\n        proxy_convert_js_to_mp_obj_jsside(js_obj, out);\n    }\n}\n\nfunction proxy_convert_mp_to_js_obj_jsside(value) {\n    const kind = Module.getValue(value, \"i32\");\n    let obj;\n    if (kind === PROXY_KIND_MP_EXCEPTION) {\n        // Exception\n        const str_len = Module.getValue(value + 4, \"i32\");\n        const str_ptr = Module.getValue(value + 8, \"i32\");\n        const str = Module.UTF8ToString(str_ptr, str_len);\n        Module._free(str_ptr);\n        const str_split = str.split(\"\\x04\");\n        throw new PythonError(str_split[0], str_split[1]);\n    }\n    if (kind === PROXY_KIND_MP_NULL) {\n        // MP_OBJ_NULL\n        throw new Error(\"NULL object\");\n    }\n    if (kind === PROXY_KIND_MP_NONE) {\n        // None\n        obj = null;\n    } else if (kind === PROXY_KIND_MP_BOOL) {\n        // bool\n        obj = Module.getValue(value + 4, \"i32\") ? true : false;\n    } else if (kind === PROXY_KIND_MP_INT) {\n        // int\n        obj = Module.getValue(value + 4, \"i32\");\n    } else if (kind === PROXY_KIND_MP_FLOAT) {\n        // float\n        // double must be loaded from an address that's a multiple of 8\n        const temp = (value + 4) & ~7;\n        const double_lo = Module.getValue(value + 4, \"i32\");\n        const double_hi = Module.getValue(value + 8, \"i32\");\n        Module.setValue(temp, double_lo, \"i32\");\n        Module.setValue(temp + 4, double_hi, \"i32\");\n        obj = Module.getValue(temp, \"double\");\n    } else if (kind === PROXY_KIND_MP_STR) {\n        // str\n        const str_len = Module.getValue(value + 4, \"i32\");\n        const str_ptr = Module.getValue(value + 8, \"i32\");\n        obj = Module.UTF8ToString(str_ptr, str_len);\n    } else if (kind === PROXY_KIND_MP_JSPROXY) {\n        // js proxy\n        const id = Module.getValue(value + 4, \"i32\");\n        obj = proxy_js_ref[id];\n    } else if (kind === PROXY_KIND_MP_EXISTING) {\n        const id = Module.getValue(value + 4, \"i32\");\n        obj = globalThis.proxy_js_existing[id];\n        globalThis.proxy_js_existing[id] = undefined;\n    } else {\n        // obj\n        const id = Module.getValue(value + 4, \"i32\");\n        if (kind === PROXY_KIND_MP_CALLABLE) {\n            obj = (...args) => {\n                return proxy_call_python(id, args);\n            };\n            obj._ref = id;\n        } else if (kind === PROXY_KIND_MP_GENERATOR) {\n            obj = new PyProxyThenable(id);\n        } else {\n            // PROXY_KIND_MP_OBJECT\n            const target = new PyProxy(id);\n            obj = new Proxy(target, py_proxy_handler);\n        }\n        globalThis.pyProxyFinalizationRegistry.register(obj, id);\n        globalThis.proxy_js_map.set(id, new WeakRef(obj));\n    }\n    return obj;\n}\n\nfunction proxy_convert_mp_to_js_obj_jsside_with_free(value) {\n    const ret = proxy_convert_mp_to_js_obj_jsside(value);\n    Module._free(value);\n    return ret;\n}\n\nfunction python_index_semantics(target, index_in) {\n    let index = index_in;\n    if (typeof index === \"number\") {\n        if (index < 0) {\n            index += target.length;\n        }\n        if (index < 0 || index >= target.length) {\n            throw new PythonError(\"IndexError\", \"index out of range\");\n        }\n    }\n    return index;\n}\n"
  },
  {
    "path": "docs/midi.md",
    "content": "# AMY MIDI Mode\n\nAMY assigns `synth`s between 1 and 16 to MIDI channels and listens to MIDI messages on those synths. For example, to set up a MIDI channel with a Juno-6 patch, you simply do\n\n```python\namy.send(synth=1, patch_number=3, num_voices=5)\n```\n\nWhere `num_voices` indicates the polyphony supported for that channel. AMY will handle note stealing and voice allocation. \n\n## Note ons, offs, pitch bend, sustain\n\nAMY responds to [MIDI note ons](http://midi.teragonaudio.com/tech/midispec/noteon.htm) and [note offs.](http://midi.teragonaudio.com/tech/midispec/noteoff.htm)\n\nAMY responds to [MIDI pitch bend messages.](http://midi.teragonaudio.com/tech/midispec/wheel.htm) This does apply to every note played on the entire AMY instance.\n\nAMY responds to [MIDI sustain pedal messages.](http://midi.teragonaudio.com/tech/midispec/hold.htm)\n\n## Control changes\n\nAMY will turn off all notes when receiving an [All Notes Off control change.](http://midi.teragonaudio.com/tech/midispec/ntnoff.htm)\n\nIf you enable a [MIDI input hook](api.md) you can add more controller mappings. In the AMY source we provide [midi_mappings.c](../src/midi_mappings.c) with examples. The `juno_filter_midi_handler` assigns MIDI CC 70 to `filter_freq` and 71 to `resonance`. You probably want to make your own [MIDI input hook](api.md) to expand on this for your use cases.\n\nAMY responds to a so far small set of [MIDI CC changes](http://midi.teragonaudio.com/tech/midispec/ctl.htm) to apply to [CtrlCoefs](synth.md) on that channel.\n\n**TODO: fill this in**\n\n## Program changes\n\nAMY responds to [MIDI program changes](http://midi.teragonaudio.com/tech/midispec/pgm.htm). Since program changes are limited to 0-127, right now, we only support switching within an AMY \"bank\" -- if a synth is setup for Juno-6 (0-127), you can only change between other Juno-6 patches. If a synth is setup for DX-7 (128-255), you can set any DX-7 patch. For example, to change a DX7 patch from 5 to 3, send a program change to that synth with `128+3 = 131`. \n\n**TODO: BANKS**\n\n## SYSEX\n\nAMY can receive its [wire messages](api.md) over [SYSEX](http://midi.teragonaudio.com/tech/midispec/sysex.htm). Since wire messages are always in lower ASCII, you do not need to encode your wire message before sending it to AMY. \n\nPreface your wire message with AMY's SYSEX manufacturer code: `0x00 0x03 0x45`. \n\nFor example, to send the wire message `v0f440l1` (sine wave, 440Hz, note on) to AMY over SYSEX, you'd send `0xF0 0x00 0x03 0x45 v 0 f 4 4 0 l 1 0xF7`. \n\n\n## Others\n\nAMY supports MIDI realtime transport for the internal sequencer:\n\n- `0xF8` (Timing Clock): advances the sequencer from external clock input.\n- `0xFA` (Start): starts sequencer playback from tick 0 in external clock mode.\n- `0xFC` (Stop): stops sequencer playback.\n\nMIDI Timing Clock is 24 PPQ. AMY's sequencer runs at 48 PPQ, so AMY advances two sequencer ticks per one MIDI clock pulse.\n\nIf you stop the sequencer with MIDI (using `0xFC`) the only way to start the sequencer again is with MIDI `0xFA`. We don't (yet) have AMY controls to stop / start the sequencer. \n\n"
  },
  {
    "path": "docs/minimal.html",
    "content": "<html>\n<head>\n\t<title>Minimal AMY web synth example</title>\n    <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css\" rel=\"stylesheet\" crossorigin=\"anonymous\"> \n    <script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js\" integrity=\"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p\" crossorigin=\"anonymous\"></script>\n    <script src=\"https://cdn.jsdelivr.net/npm/webmidi@latest/dist/iife/webmidi.iife.js\"></script>\n    <script type=\"text/javascript\" src=\"enable-threads.js\"></script>\n    <script type=\"text/javascript\" src=\"amy.js\"></script>\n</head>\n\n\n<body>\n\t<div class=\"container\">\n\t\t<h1>Minimal AMY web synth example</h1>\n\t\t<form name=\"amyboard_settings\">\n\t      <div class=\"row align-items-start pt-1\">\n\t        <!-- MIDI settings panel if MIDI is available -->\n\t        <div class=\"col-4 align-self-start small\">\n\t          <div id=\"midi-input-panel\">\n\t            <select onchange=\"setup_midi_devices()\" name=\"midi_input\" class=\"form-select form-select-sm\" aria-label=\".form-select-sm example\">\n\t              <option selected>[Not available]</option>\n\t            </select>\n\t          </div>\n\t        </div>\n\t        <div class=\"col-4 align-self-start small\">\n\t          <div id=\"midi-output-panel\">\n\t            <select onchange=\"setup_midi_devices()\" name=\"midi_output\" class=\"form-select form-select-sm\" aria-label=\".form-select-sm example\">\n\t              <option selected>[Not available]</option>\n\t            </select>\n\t          </div>\n\t        </div>\n\t      </div>\n\t    </form>\n\t    <P>Click anywhere on the page, and then play your selected MIDI input to this page. You can use program changes to change patches.</P>\n\t</div>\n\t<script language=\"javascript\">\n\t\tdocument.body.addEventListener('click', amy_js_start, true); \n\t\tdocument.body.addEventListener('keydown', amy_js_start, true);\n\t</script>\n</body>\n\n\n</html>"
  },
  {
    "path": "docs/piano.html",
    "content": "<!doctype html>\n<html>\n  <head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css\" rel=\"stylesheet\" crossorigin=\"anonymous\"> \n     <!-- Bootstrap Bundle with Popper -->\n    <script\n      src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js\"\n      integrity=\"sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf\"\n      crossorigin=\"anonymous\"\n    ></script>\n    <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.min.css\" /> \n    <script src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.63.3/codemirror.min.js\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script> \n    <script src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.63.3/mode/python/python.min.js\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>\n    <script src=\"micropython.mjs\" type=\"module\"></script>\n    <script type=\"text/javascript\" src=\"enable-threads.js\"></script>\n    <script type=\"text/javascript\" src=\"amy.js\"></script>\n    <script type=\"text/javascript\" src=\"amyrepl.js\"></script>\n    <link rel=\"stylesheet\" href=\"amyrepl.css\"/>\n    <title>The AMY Additive Piano Voice</title>\n    <meta property=\"og:image\" content=\"https://shorepine.github.io/amy/interpolated.png\">\n    <meta property=\"og:title\" content=\"The AMY Additive Piano Voice\">\n    <meta property=\"og:description\" content=\"Synthesizing a piano with partials.\">\n    <link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"favicon-32x32.png\">\n    <link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"favicon-16x16.png\">\n    <link rel=\"icon\" type=\"image/png\" sizes=\"96x96\" href=\"favicon.png\">\n    <meta name=\"author\" content=\"DAn Ellis\">\n    <meta name=\"HandheldFriendly\" content=\"true\">\n    <meta name=\"twitter:card\" content=\"summary_large_image\">\n    <meta name=\"twitter:site\" content=\"@shorepinesound\">\n    <meta name=\"twitter:creator\" content=\"@shorepinesound\">\n    <meta name=\"twitter:title\" content=\"The AMY Additive Piano Voice\">\n    <meta name=\"twitter:description\" content=\"Synthesizing a piano with partials.\">\n    <meta name=\"twitter:image\" content=\"https://shorepine.github.io/amy/interpolated.png\">\n  </head>\n\n\n  <body>\n\n    <script type=\"module\">      \n      mp = await loadMicroPython({\n        pystack: 64 * 1024, \n        heapsize: 8 * 1024 * 1024,\n        stdout:(line) => { console.log(line) }, \n        linebuffer: true,\n      });\n    </script>\n\n    <div class=\"container-md\"> \n      <div class=\"row py-3 my-5 px-1 mx-1\">\n      <div class=\"alert alert-primary\" role=\"alert\">\n        This page is <strong>running live Python code</strong> locally in your browser. Feel free to edit and run your own versions of the code in any text box. The  <button type=\"button\" class=\"btn btn-sm btn-success\">►</button> button will execute the code (and play AMY synthesis, if you ask it to) and the  <button type=\"button\" class=\"btn btn-sm btn-danger\" onclick=\"resetAMY()\">Reset</button> button will reset the synthesizer, if it has a stuck note. <A HREF=\"https://tulip.computer/run/\">You can also try AMY in a more full featured REPL with Tulip Web.</a></div>\n      </div>\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n        <h1 id=\"the-amy-additive-piano-voice\">The <A HREF=\"https://github.com/shorepine/amy\">AMY</A> Additive Piano Voice</h1>\n        <p>The piano is a versatile and mature instrument.  One reason for its popularity is its wide timbral range; in fact, its main innovation was the ability to play notes both loud and soft, hence &quot;<a href=\"https://en.wikipedia.org/wiki/Piano#History\">Pianoforte</a>&quot; (its full original name).</p>\n        \n        <p>To make <A HREF=\"https://github.com/shorepine/amy\">AMY</A> into a truly general-purpose music synthesizer, we wanted to add a good piano voice.  But it&#39;s not simple to synthesize a good piano voice.  This page explains some of what makes piano synthesis challenging, and how we addressed it.  Our approach was to use <a href=\"https://en.wikipedia.org/wiki/Additive_synthesis\">additive synthesis</a>, which nicely fills out the demonstration of the primary synthesis techniques implemented in AMY, after subtractive (the Juno-6 patches) and FM (the DX7 patches).</p>\n      </div>\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n\n        <h2 id=\"the-sound-of-a-piano\">The sound of a piano</h2>\n        <p>Here&#39;s an example of 5 notes played on a real piano:</p>\n\n        <audio controls><source src=\"realpiano.mp4\"/></audio>\n\n        <p><img src=\"uiowa.png\" alt=\"uiowa\" class=\"img-fluid\"></p>\n        <p>This clip starts with a D4 note played at three loudnesses - <em>pp</em>, <em>mf</em>, and <em>ff</em>.  These are followed by a D2 (two octaves lower), and a D6 (two octaves higher).\n  (I made this example by adding together isolated recordings of single piano notes from the <a href=\"https://theremin.music.uiowa.edu/mispiano.html\">University of Iowa Electronic Music Studios Instrument Samples</a>, which are the basis of the AMY piano.  I combined them with the code in <a href=\"https://github.com/shorepine/amy/blob/main/experiments/make_piano_examples.ipynb\">make_piano_examples.ipynb</a>.)</p>\n        <p>Some things to notice:</p>\n        <ul>\n          <li>Piano sounds consist of very strong, stable sets of harmonics (fixed-frequency Fourier components), visible as horizontal lines in the spectrogram.  The harmonics appear mostly uniformly-spaced (as expected for a Fourier series of a periodic signal) (although there are a few extra components e.g. around 4.5 kHz at 0.8 seconds for the <em>ff</em> D4).</li>\n          <li>Each harmonic starts at its peak amplitude, then decays away.  The higher harmonics decay more quickly.  Higher notes, whose harmonics are naturally all at higher frequencies, die away more quickly than lower notes.</li>\n          <li>The first three notes have the same pitch, so the harmonics have the same frequencies.  However, as the note gets louder, not only do the lower harmonics grow in intensity (brighter color), we also see additional higher harmonics appearing.  This is the vital &quot;brightening&quot; of piano sounds as the strike strength increases.</li>\n          <li>The D2 is too low for the harmonics to be resolved in this spectrogam, but we can see a complex pattern of time modulation in its energy.  We can also see a complex pattern of per-harmonic modulations in the D6.</li>\n      </ul>\n    </div>\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n      <h2 id=\"synthesizing-piano-sounds\">Synthesizing piano sounds</h2>\n      <p>Electronic musical instruments have always taken inspiration from their acoustic forbears, and most electronic keyboards will attempt to simulate a piano.  \n      <p>Let's set up a function in AMY (which runs in this web page in Python, you can edit the code!) that plays the recorded pattern above on some AMY presets:\n      <div class=\"editor mb-4 preload-python\">\ndef piano_example(base_note=72, volume=1, send_command=amy.send, init_command=lambda: None):\n    amy.send(time=100, volume=volume)\n    init_command()\n    send_command(time=150, voices='0', note=base_note, vel=0.05)\n    send_command(time=535, voices='0', note=base_note, vel=0)\n    send_command(time=550, voices='0', note=base_note, vel=0.63)\n    send_command(time=935, voices='0', note=base_note, vel=0)\n    send_command(time=950, voices='0', note=base_note, vel=1.0)\n    send_command(time=1585, voices='0', note=base_note, vel=0)\n    send_command(time=1600, voices='1', note=base_note - 24, vel=0.6)\n    send_command(time=2200, voices='2', note=base_note + 24, vel=1.0)\n    send_command(time=3100, voices='1', note=base_note - 24, vel=0)\n    send_command(time=3100, voices='2', note=base_note + 24, vel=0)\n      </div>\n      <P>The Roland Juno-60 included a preset called Piano, which we can now hear with\n      <div class=\"editor mb-4\">\npiano_example(base_note=74, volume=1, \n                init_command=lambda: amy.send(time=0, voices='0,1,2', patch=7))\n      </div>\n      <P>(Try changing the base_note or volume or the patch number and running again)</P>\n      <P><img src=\"juno.png\"  class=\"img-fluid\"></P>\n      <p>This synthetic piano gets the stable harmonic structure and steady decay of each note, but there&#39;s no change in timbre with the different note velocities; every harmonic gets louder by the same factor.  (In fact, the Juno-60 was not velocity sensitive, but its usual practice to scale the whole note in proportion to velocity). There&#39;s no complexity to the harmonic decays, they are uniformly monotonic.  And the overall note decay time doesn&#39;t vary with the pitch.</p>\n      <p>The DX7 similarly provides a number of <a href=\"https://www.synthmania.com/dx7.htm\">presets claiming to be pianos</a>, including 135-137 (in our numbering which starts at 128):</p>\n      <div class=\"editor mb-4\">\npiano_example(base_note=50, volume=2, \n              init_command=lambda: amy.send(time=0, voices='0,1,2', patch=137))\n      </div>\n      <P><img src=\"dx7.png\" class=\"img-fluid\"></P>\n      <p>This sounds more like a DX7 than any acoustic instrument.  It does manage to bring some modulation on top of the decays of the harmonics (visible as gaps in the horizontal lines) but is not very convincing.</p>\n    </div>\n    <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n      <h2 id=\"additive-synthesis\">Additive synthesis</h2>\n      <p>The horizontal lines in the spectrogram are simply sinusoids at fixed frequencies with slowly-varying amplitudes; the essence of Fourier analysis is that any periodic signal can be built up by summing sinusoids at integer multiples of the fundamental frequency (the lowest sinusoid).  We can use this directly to synthesize musical sounds, so-called &quot;additive synthesis&quot;, and AMY was originally designed for this very purpose.  We use one oscillator for each harmonic, and set up its amplitude envelope to be a copy of the corresponding harmonic in a real piano signal.  (I wrote code to analyze the UIowa piano sounds into harmonic envelopes in <a href=\"https://github.com/shorepine/amy/blob/main/experiments/piano_heterodyne.ipynb\">piano_heterodyne.ipynb</a>.)</p>\n      <P>Let's start by loading in the analysis. We're using <code>ulab</code>, which is a numpy-like written for Micropython (what this web page is using.)</p>\n      <div class=\"editor mb-4 preload-python\">\n\"\"\"Piano notes generated on amy/tulip.\"\"\"\n# Uses the partials amplitude breakpoints and residual written by piano_heterodyne.ipynb.\nfrom ulab import numpy as np\n\n# Read in the params file written by piano_heterodyne.ipynb\n# Contents:\n#   sample_times_ms - single vector of fixed log-spaced envelope sample times (in int16 integer ms).\n#   notes - the MIDI numbers corresponding to each note described.\n#   velocities - The (MIDI) strike velocities available for each note, the same for all notes.\n#   num_harmonics - Array of (num_notes * num_velocities) counts of how many harmonics are defined for each note+vel combination.\n#   harmonics_freq - Vector of (total_num_harmonics) int16s giving freq for each harmonic in \"MIDI cents\" i.e. 6900 = 440 Hz.\n#   harmonics_mags - Array of (total_num_harmonics, num_sample_times) uint8s giving envelope samples for each harmonic.  In dB, between 0 and 100.\n\nfrom amy.piano_params import notes_params\n\nNOTES = np.array(notes_params['notes'], dtype=np.int8)\nVELOCITIES = np.array(notes_params['velocities'], dtype=np.int8)\nNUM_HARMONICS = np.array(notes_params['num_harmonics'], dtype=np.int16)\nassert len(NUM_HARMONICS) == len(NOTES) * len(VELOCITIES)\nNUM_MAGS = len(notes_params['harmonics_mags'][0])\n# Add in a derived diff-times and start-harmonic fields\n# Reintroduce the initial zero-time...\nSAMPLE_TIMES = np.array([0] + notes_params['sample_times_ms'])\n#.. so we can neatly calculate the time-deltas needed for BP strings.\nDIFF_TIMES = SAMPLE_TIMES[1:] - SAMPLE_TIMES[:-1]\n# Lookup to find first harmonic for nth note.\nSTART_HARMONIC = np.zeros(len(NUM_HARMONICS), dtype=np.int16)\nfor i in range(len(NUM_HARMONICS)):  # No cumsum in ulab.numpy\n    START_HARMONIC[i] = np.sum(NUM_HARMONICS[:i])\n# We build a single array for all the harmonics with the frequency as the\n# first column, followed by the envelope magnitudes.  Then, we can pull\n# out the entire description for a given note/velocity pair simply by\n# pulling out NUM_HARMONICS[harmonic_index] rows starting at\n# START_HARMONIC[harmonic_index]\nFREQ_MAGS = np.zeros((np.sum(NUM_HARMONICS), 1 + NUM_MAGS), dtype=np.int16)\nFREQ_MAGS[:, 0] = np.array(notes_params['harmonics_freq'], dtype=np.int16)\nFREQ_MAGS[:, 1:] = np.array(notes_params['harmonics_mags'], dtype=np.int16)\n      </div>\n      <p>Now, let's set up some code to return the interpolated harmonics from a MIDI note and velocity for the piano.</p>\n\n      <div class=\"editor mb-4 preload-python\">\ndef harms_params_from_note_index_vel_index(note_index, vel_index):\n    \"\"\"Retrieve a (log-domain) harms_params list for a given note/vel index pair.\"\"\"\n    # A harmonic is represented as a [freq_cents, mag1_db, mag2_db, .. mag20_db] row.\n    # A note is represented as NUM_HARMONICS (usually 20) rows.\n    note_vel_index = note_index * len(VELOCITIES) + vel_index\n    num_harmonics = NUM_HARMONICS[note_vel_index]\n    start_harmonic = START_HARMONIC[note_vel_index]\n    harms_params = FREQ_MAGS[start_harmonic : start_harmonic + num_harmonics, :]\n    return harms_params\n\ndef interp_harms_params(hp0, hp1, alpha):\n    \"\"\"Return harm_param list that is alpha of the way to hp1 from hp0.\"\"\"\n    # hp_ is [[freq_h1, mag1, mag2, ...], [freq_h2, mag1, mag2, ..], ...]\n    num_harmonics = min(hp0.shape[0], hp1.shape[0])\n    # Assume the units are log-scale, so linear interpolation is good.\n    return hp0[:num_harmonics] + alpha * (hp1[:num_harmonics] - hp0[:num_harmonics])\n\ndef cents_to_hz(cents):\n    \"\"\"Convert 'Midi cents' frequency to Hz.  6900 cents -> 440 Hz\"\"\"\n    return 440 * (2 ** ((cents - 6900) / 1200.0))\n  \ndef db_to_lin(d):\n    \"\"\"Convert the db-scale magnitudes to linear.  0 dB -> 0.00001, so 100 dB -> 1.0.\"\"\"\n    # Clip anything below 0.001 to zero.\n    return np.maximum(0, 10.0 ** ((d - 100) / 20.0) - 0.001)\n\ndef harms_params_for_note_vel(note, vel):\n    \"\"\"Convert midi note and velocity into an interpolated harms_params list of harmonic specifications.\"\"\"\n    note = np.clip(note, NOTES[0], NOTES[-1])\n    vel = np.clip(vel, VELOCITIES[0], VELOCITIES[-1])\n    note_index = -1 + np.sum(NOTES[:-1] <= note)  # at most the last-but-one value.\n    strike_index = -1 + np.sum(VELOCITIES[:-1] <= vel)\n    lower_note = NOTES[note_index]\n    upper_note = NOTES[note_index + 1]\n    note_alpha = (note - lower_note) / (upper_note - lower_note)\n    lower_strike = VELOCITIES[strike_index]\n    upper_strike = VELOCITIES[strike_index + 1]\n    strike_alpha = (vel - lower_strike) / (upper_strike - lower_strike)\n    # We interpolate to describe a note at both strike indices,\n    # then interpolate those to get the strike.\n    harms_params = interp_harms_params(\n        interp_harms_params(\n            harms_params_from_note_index_vel_index(note_index, strike_index),\n            harms_params_from_note_index_vel_index(note_index + 1, strike_index),\n            note_alpha,\n        ),\n        interp_harms_params(\n            harms_params_from_note_index_vel_index(note_index, strike_index + 1),\n            harms_params_from_note_index_vel_index(note_index + 1, strike_index + 1),\n            note_alpha,\n        ),\n        strike_alpha,\n    )\n    return harms_params\n      </div>\n      <p>And then some AMY helper code to send out these parameters to the right voices. \n      We're using the BYO_PARTIALS type in AMY, which allows you set up your own partial synthesis breakpoints using envelopes.</p>\n      <div class=\"editor mb-4 preload-python\">\ndef init_piano_voice(num_partials, base_osc=0, **kwargs):\n    \"\"\"One-time initialization of the unchanging parts of the partials voices.\"\"\"\n    amy.send(osc=base_osc, wave=amy.BYO_PARTIALS, num_partials=num_partials, amp={'eg0': 0}, **kwargs)\n    for partial in range(1, num_partials + 1):\n        bp_string = '0,0,' + ','.join(\"%d,0\" % t for t in DIFF_TIMES)\n        # We append a release segment to die away to silence over 200ms on note-off.\n        bp_string += ',200,0'\n        amy.send(osc=base_osc + partial, wave=amy.PARTIAL, bp0=bp_string, eg0_type=amy.ENVELOPE_TRUE_EXPONENTIAL, **kwargs)\n\ndef setup_piano_voice(harms_params, base_osc=0, **kwargs):\n    \"\"\"Configure a set of PARTIALs oscs to play a particular note and velocity.\"\"\"\n    num_partials = len(harms_params)\n    amy.send(osc=base_osc, wave=amy.BYO_PARTIALS, num_partials=num_partials, **kwargs)\n    for i in range(num_partials):\n        f0_hz = cents_to_hz(harms_params[i, 0])\n        env_vals = db_to_lin(harms_params[i, 1:])\n        # Omit the time-deltas from the list to save space.  The osc will keep the ones we set up in init_piano_voice.\n        bp_string = ',,' + ','.join(\",%.3f\" % val for val in env_vals)\n        # Add final release.\n        bp_string += ',200,0'\n        amy.send(osc=base_osc + 1 + i, freq=f0_hz, bp0=bp_string, **kwargs)\n      </div>\n\n      <p>We can now set up a <code>BYO_PARTIALS</code> patch #1024 in AMY with independent per-harmonic envelopes. We set up the piano once, pre-configured to C4.mf for each note and scaled during playback. We&#39;re setting 20 breakpoints independently for 20 harmonics with data read from the <code>piano-params.json</code> file written by <code>piano_heterodyne.ipynb</code>.</p>\n      <div class=\"editor mb-4 preload-python\">\npatch_string = 'v0w10Zv%dw%dZ' % (NUM_HARMONICS[0] + 1, amy.PARTIAL)\n\n# The lowest note provides an upper-bound on the number of partials we need to allocate.\ndef init_piano_voices(num_partials=NUM_HARMONICS[0]):\n    amy.send(patch='1024', patch_string=patch_string)\n    amy.send(voices='0,1,2', patch=1024)\n    init_piano_voice(num_partials, voices='0,1,2')\n    # piano_note_on (below) overwrites these settings before each note,\n    # but pre-configure each note to C4.mf so we can experiment.\n    setup_piano_voice(harms_params_for_note_vel(note=60, vel=80), voices='0,1,2')\n      </div>\n      <P>And play those:</P>\n      <div class=\"editor mb-4\">\npiano_example(base_note=62, volume=2, init_command=init_piano_voices)\n      </div>      \n      <p><img src=\"fixed.png\" alt=\"fixed\" class=\"img-fluid\"></p>\n      <p>The <em>mf</em> D4 note now sounds quite realistic, because it&#39;s a reasonably accurate reproduction of the original recording.  However, we&#39;re still simply scaling its overall magnitude in to get different veloicities.  And when we change the pitch, we just squeeze or stretch the harmonics (and hence the notes&#39; spectral envelopes), which is not at all realistic sounding.</p>\n      <p>Instead, we need to interpolate the real piano recordings at different notes and strikes to get the actual envelopes we synthesize.  The UIowa samples provide recordings of all 88 notes on the piano they sampled, at three strike strengths.  We <em>could</em> include harmonic data for all of them, but adjacent notes are quite similar, so instead we encode 3 notes per octave (C, E, and Ab) and interpolate the 3 semitones between each adjacent pair.  (We currently store only 7 octaves, C1 to Ab7, so 21 pitches).</p>\n      <p>For velocity, we have no choice but to interpolate, since the three recorded strikes do not provide enough expressivity for performance.  We analyze all three (for each pitch stored, so 63 notes total).</p>\n      <p>Playing a note, then, involves interpolating between <em>four</em> of the stored harmonic envelope sets (recall that each set consists of 20 breakpoints for up to 20 harmonics): To synthesize the D4 at, say, velocity 90, we use C4 at <em>mf</em> and <em>ff</em> (which I interpreted as velocities 80 and 120) as well as E4 <em>mf</em> and <em>ff</em>.  By doing this interpolation separately for every <code>(note, velocity)</code> event, we get a much richer range of tones. In this case we recompute the piano voice on each note on, given the note number and velocity:</p>\n      <div class=\"editor mb-4 preload-python\">\ndef piano_note_on(note=60, vel=1, **kwargs):\n    if vel == 0:\n        # Note off.\n        amy.send(vel=0, **kwargs)\n    else:\n        setup_piano_voice(harms_params_for_note_vel(note, round(vel * 127)), **kwargs)\n        # We already configured the pitches and magnitudes in setup, so\n        # the note and vel of the note-on are always the same.\n        amy.send(note=60, vel=1, **kwargs)\n      </div>\n      <P>Let's hear this much nicer version:</P>\n      <div class=\"editor mb-4\">\npiano_example(base_note=62,\n              init_command=init_piano_voices,\n              send_command=piano_note_on)\n      </div>\n      <p><img src=\"interpolated.png\" alt=\"interpolated\" class=\"img-fluid\"></p>\n      <p>This recovers both the spectral complexity of the original piano notes, <em>and</em> the variation of the spectrum both across the keyboard range and across strike intensities.  The spectrogram of the original recordings is repeated below for comparison.</p>\n      <p><img src=\"uiowa.png\" alt=\"uiowa\" class=\"img-fluid\"></p>\n      <p>While there are plenty of details that have not been exactly preserved (most notably the noisy &quot;clunk&quot; visible around each onset of the recordings, but also the cutoff at 20 harmonics, which loses a lot of high-frequency for the low note), this synthesis just feels much, much more realistic and &quot;acoustic&quot; than any of the previous syntheses.</p>\n\n      <p>Because we are representing each note as an explicit set of harmonics, we can do things that would be very hard with, e.g., a sample.  By messing with the status of the PARTIALs oscs, we can listen to each partial individually:</p>\n        <div class=\"editor mb-4\">\n# Configure the default voice for C4.ff\ninit_piano_voices()\nsetup_piano_voice(harms_params_for_note_vel(64, 120), time=0, voices='0')\n# Convert each PARTIAL osc into regular SINE oscs and play them in order.\nfor partial in range(1, 20):\n        time = partial * 400\n        amy.send(time=time, voices='0', osc=partial, wave=amy.SINE, note=60, vel=1)\n        amy.send(time=time + 390, voices='0', osc=partial, vel=0)\n        </div>\n\n      <p>By restricting the number of partials the control osc things it is driving, we can listen to syntheses with different numbers of partials:\n        <div class=\"editor mb-4\">\n# Re-initialize the voice (after flipping the oscs into SINEs).\ninit_piano_voices()\nsetup_piano_voice(harms_params_for_note_vel(64, 120), time=0, voices='0')\n# Add partials one by one\nfor num_partials in range(1, 20):\n        time = num_partials * 400\n        amy.send(time=time, voices='0', wave=amy.BYO_PARTIALS, num_partials=num_partials)\n        amy.send(time=time + 15, voices='0', note=60, vel=1)\namy.send(time=8500, voices='0', vel=0)\n        </div>\n\n      <p>We can also change the tuning of each harmonic away from what was provided by the analysis.  For instance, we can retune them to have different inharmonicities (see below for a discussion of piano inharmonicity):</p>\n        <div class=\"editor mb-4\">\ndef retune_partials(f0=263.3, beta=0.0003, num_partials=20, **kwargs):\n        for partial in range(1, num_partials + 1):\n                amy.send(osc=partial, freq=partial * f0 * np.sqrt(1 + beta * partial * partial), **kwargs)\n\ninit_piano_voices()\n# Try it for a low note\nsetup_piano_voice(harms_params_for_note_vel(32, 120), voices='0', time=0)\n# Tuning from analysis\namy.send(time=0, voices='0', note=60, vel=1)\namy.send(time=2000, voices='0', vel=0)\n\n# Unstretched tuning\nretune_partials(f0=cents_to_hz(3200), beta=0, voices='0', time=2200)\namy.send(time=2210, voices='0', note=60, vel=1)\namy.send(time=4200, voices='0', vel=0)\n\n# Parametric stretching tuning, exaggerated\nretune_partials(f0=cents_to_hz(3200), beta=0.0008, voices='0', time=4400)\namy.send(time=4410, voices='0', note=60, vel=1)\namy.send(time=6400, voices='0', vel=0)\n        </div>\n\n      <p>We can also do interesting things with interpolation.  For instance, we can interpolate pitches more finely than the standard semitones:</p>\n      <div class=\"editor mb-4\">\ninit_piano_voices()\nhps_c4 = harms_params_for_note_vel(60, 120)\nhps_c5 = harms_params_for_note_vel(72, 120)\nfor quarter_tone in range(24):\n        time = quarter_tone * 400\n        hps_interpolated = interp_harms_params(hps_c4, hps_c5, quarter_tone / 24)\n        setup_piano_voice(hps_interpolated, time=time, voices='0')\n        amy.send(time=time + 10, voices='0', note=60, vel=1)\namy.send(time=time + 500, voices='0', vel=0)\n      </div>\n\n      <p>By using interpolation factors outside the range (0, 1) we can even extrapolate the strike strength:<p>\n<div class=\"editor mb-4\">\ninit_piano_voices()\nhps_pp = harms_params_for_note_vel(60, 40)\nhps_ff = harms_params_for_note_vel(60, 120)\nfor strike in range(5):\n        time = strike * 400\n        strike_alpha = 0.4 * (strike - 1)  # strike_alpha ranges from -0.4 to +1.2\n        hps_interpolated = interp_harms_params(hps_pp, hps_ff, strike_alpha)\n        setup_piano_voice(hps_interpolated, time=time, voices='0')\n        amy.send(time=time + 10, voices='0', note=60, vel=1)\namy.send(time=time + 500, voices='0', vel=0)\n      </div>\n\n      <p>If you&#39;re curious about exactly how we extracted the harmonic frequencies and envelopes, the rest of this page provides an overview of the process implemented in <a href=\"https://github.com/shorepine/amy/blob/main/experiments/piano_heterodyne.ipynb\">piano_heterodyne.ipynb</a>.\n\n\n      <P>If you have a <a href=\"https://tulip.computer/\">Tulip</a> or want to try <A href=\"https://tulip.computer/run\">Tulip on the web</a>, you can play this piano synthesis live with a MIDI device. Use the Voices app to switch to the <code>dpwe piano (256)</code> patch, or type <code>midi.config.add_synth(channel=1, patch_number=256, num_voices=4)</code>.</P>\n    </div>\n\n\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n      <h1 id=\"extracting-harmonic-envelopes\">Extracting harmonic envelopes</h1>\n      <p>How exactly to we capture the envelopes for each harmonic in our additive model?  In principle, this is simply a matter of dissecting a spectrogram of the individual note (like the images above) to measure the intensity of each individual horizontal line.  In practice, however, I wanted something with finer resolution in time and frequency to obtain very accurate parameters.  I used <a href=\"https://en.wikipedia.org/wiki/Heterodyne\">heterodyne analysis</a>, which I&#39;ll now explain.</p>\n      <p>The <a href=\"https://en.wikipedia.org/wiki/Fourier_series\">Fourier series</a> expresses a periodic waveform as the sum of sinusoids at multiples of the fundamental frequency (&quot;harmonics&quot;), with the phases as amplitudes of each harmonic determining the resulting waveform.  It&#39;s mathematically convenient to describe these sinusoids with <a href=\"https://medium.com/@theorose49/meaning-of-complex-exponential-for-electric-engineering-68de0625603f\">complex exponentials</a>, essentially sinusoids with two-dimensional values at each moment, where the real axis part is our regular sine, and the imaginary (2nd) axis part is the cosine (sine phase-shifted by 90 degrees):</p>\n      <p><img src=\"env1.gif\" alt=\"1*t6wVEZv6CkhACEyY2pFe2A\" class=\"img-fluid\"></p>\n      <p>Each sinusoid is constructed as the sum of a pair of complex exponentials with positive and negative frequencies; the imaginary parts cancel out leaving the real sinusoid.  Thus, the full Fourier spectrum of a real signal has mirror-image positive and negative parts (although we generally only plot the positive half):</p>\n      <p><img src=\"d4ff.png\" alt=\"download-2\" class=\"img-fluid\"></p>\n      <p>The neat thing about this complex-exponential Fourier representation is that multiplying a signal by a complex exponential is a pure shift in the Fourier spectrum domain.  So, by multiplying by the complex exponential at the negative of a particular harmonic frequency, we can shift that harmonic down to 0 Hz (d.c.).  The spectrum is no longer mirrored around zero, so the imaginary parts won't cancel out, but we only want its magnitude anyway.  Then, by low-pass filtering (i.e., smoothing) that waveform, we can cancel out all the other harmonics leaving only the envelope of the one harmonic we are targeting.  By smoothing over a window that exactly matches the fundamental period, we can exactly cancel all the other sinusoid components because they will complete a whole number of cycles in that period.  See <a href=\"https://github.com/shorepine/amy/blob/main/experiments/make_piano_examples.ipynb\">make_piano_examples.ipynb</a> for how these figures were prepared:</p>\n      <p><img src=\"d4ffshift.png\" alt=\"download-1\" class=\"img-fluid\"></p>\n      <p><img src=\"d4harm.png\" alt=\"download\" class=\"img-fluid\"></p>\n    </div>\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n      <h2 id=\"finding-harmonic-frequencies-and-piano-inharmonicity\">Finding harmonic frequencies and piano inharmonicity</h2>\n      <p>The heterodyne extraction allows us to extract sample-precise envelopes for harmonics at specific frequencies, but we need to give it the exact frequencies we want it to extract.  Again, in principle, this is straightforward: The harmonics should occur at integer-multiples of the fundamental frequency, and if the piano is tuned right, we already know the <a href=\"https://en.wikipedia.org/wiki/Piano_key_frequencies\">fundamental frequences for each note</a>.</p>\n      <p>It turns out, however, that piano notes are not perfectly harmonic: They can be well modeled as the sum of fixed-frequency sinusoids, but those sinusoids are not exact integer multiples of a common fundamental.  This is a consequence of the stiffness of the steel strings (I&#39;m told!) which makes the speed of wave propagation down the strings higher for higher harmonics.  This <a href=\"https://en.wikipedia.org/wiki/Inharmonicity#Pianos\">piano inharmonicity</a> has been credited with some of the &quot;warmth&quot; of piano sounds, and is something we want to preserve in our synthesis.  In order to precisely extract each harmonic for each note, we need to individually estimate the inharmonicity coefficient for each string (because the strings are all different thicknesses, the inharmonicity varies across the range of the piano).</p>\n      <p>I estimated the inharmonicity by extracting very precise peak frequencies from a long Fourier transform of the piano note, then fitting the theoretical equation <!--$f_n \\propto n \\sqrt{1 + B n^2}$--> \n      <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"5ed5f21f1be809a4e6580fe88941e900\" data-catalyst=\"\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n      <msub>\n        <mi>f</mi>\n        <mi>n</mi>\n      </msub>\n      <mo>∝</mo>\n      <mi>n</mi>\n      <msqrt>\n        <mn>1</mn>\n        <mo>+</mo>\n        <mi>B</mi>\n        <msup>\n          <mi>n</mi>\n          <mn>2</mn>\n        </msup>\n      </msqrt>\n      </math></math-renderer> (from <a href=\"https://physics.stackexchange.com/questions/268568/why-are-the-harmonics-of-a-piano-tone-not-multiples-of-the-base-frequency\">this StackExchange explanation</a>) to those values.</p>\n      <p><img src=\"spectralpeaks.png\" alt=\"download-4\" class=\"img-fluid\"></p>\n      <p><img src=\"fundamental.png\" alt=\"download-5\" class=\"img-fluid\"></p>\n      <p>These plots come from the &quot;Inharmonicity estimation&quot; part of <a href=\"https://github.com/shorepine/amy/blob/main/experiments/piano_heterodyne.ipynb\">piano_heterodyne.ipynb</a>.  Estimating the inharmonicity for each note allowed me to extract harmonic envelopes precisely corresponding to each specific harmonic of each piano note.  This was important because when we are interpolating between different harmonic envelopes, we want to be sure we&#39;re looking at the same harmonic in both notes.</p>\n    </div>\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n      <h2 id=\"describing-envelopes\">Describing envelopes</h2>\n      <P>We can extract sample-accurate envelopes for as many harmonics as we want for each of the real piano note recordings we have.  But to turn them into a practical additive-synthesis instrument on AMY we need to think about efficiency.  Right now, the harmonic envelopes are represented as 44,100 values per second of recording, and we're modeling something like the first 5 seconds of each note (the low notes can easily be 20 seconds long before they decay into oblivion).  But the AMY envelopes can only handle up to 24 breakpoints (it used to be 8 before I changed it to serve this project!) so we need some way to summarize the envelopes in a smaller number of straight-line segments (which is what the envelope breakpoints define).</P>\n\n      <P>Additive synthesis of individual harmonics is so powerful because sounds like piano notes are so well described by a small number of harmonics with constant or slowly-changing frequency and amplitude.  Looking at the four harmonic envelopes extracted in the previous section, it's obvious that the long tails are almost entirely smooth and could be described with a small number of parameters.  The initial portions are more complex, however, including going up and down.  Reproducing them will need more breakpoints, and it's not immediately obvious how to choose those breakpoints to give the best approximation.</P>\n\n      <P>I spent a while trying to come up with ad-hoc algorithms to accurately match an arbitrary envelope with a few line segments - see the \"Adaptive magnitude sampling\" section of <a href=\"https://github.com/shorepine/amy/blob/main/experiments/piano_heterodyne.ipynb\">piano_heterodyne.ipynb</a>.  The goal was to choose breakpoint times (and values) that preserved the most detail of the original envelope, even though I couldn't define exactly what I wanted.  However, the outcome was naturally that there would be different breakpoint times for each note, which made interpolation between different notes very problematic - can we interpolate the breakpoint times too?  (I tried it, and it fared badly in practice because of wildly varying allocations of breakpoints to different time regions).</P>\n\n      <P>In the end I gave up and used a much simpler strategy of predefining a set of breakpoint sample times that are constant for all notes.  Although this is inevitably sub-optimal for any given note, it gives a much more solid foundation for interpolating between notes.  And it turns out that the accuracy lost in modeling the envelopes doesn't seem to be too important perceptually.  To respect the idea that the envelopes have an initial period of considerable detail, followed by a longer, smoother evolution, I used exponential spacing of the sampling times.  Specifically each envelope is described by samples at 20 instants: 4, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096 milliseconds after onset.  After the initial value, these are in a pattern of <!--$2^n$--><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"5ed5f21f1be809a4e6580fe88941e900\" data-catalyst=\"\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n  <msup>\n    <mn>2</mn>\n    <mi>n</mi>\n  </msup>\n</math></math-renderer> and <!--$1.5 * 2^n$--><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-static-url=\"https://github.githubassets.com/static\" data-run-id=\"5ed5f21f1be809a4e6580fe88941e900\" data-catalyst=\"\"><math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n  <mn>1.5</mn>\n  <mo>∗</mo>\n  <msup>\n    <mn>2</mn>\n    <mi>n</mi>\n  </msup>\n</math></math-renderer> milliseconds, giving the exponential spacing.  This plot shows the original envelope with the breakpoint approximation superimposed, on two timescales - the first 150 msec on the left, and the full 4.1 sec on the right (with the 150 msec edge of the left plot shown as a dotted line).</P>\n      <P><img src=\"envelope.png\" class=\"img-fluid\"></P>\n\n      <P>Although a bunch of detail has been lost, it still provides a suitably complex character to the resyntheses.\n\n      <P>These 20 envelope samples, along with the measured center frequency, are then the description for each of the up-to 20 harmonics describing each of the (7 octaves x 3 chroma x 3 strike strengths) notes, or about 1200 envelopes total.  This is the data stored in <a href=\"https://github.com/shorepine/amy/blob/main/experiments/piano-params.json\">piano-params.json</a> and read by <a href=\"https://github.com/shorepine/amy/blob/main/experiments/tulip_piano.py\">tulip_piano.py</a>. </P>\n\n      <P>This is a lot of data to get your head around!  It&#39;s 4 dimensional - envelope magnitude as a function of time, harmonic number, fundamental pitch, and strike strength.  There&#39;s still a lot of investigation to be done, but here&#39;s a 3D plot of the modeled harmonic envelopes (up to harmonic 20) for the three different strike strengths of C4 (261.63 Hz): </P>\n      <P><img src=\"3d-envelopes.png\" class=\"img-fluid\"></P>\n\n      <P>We can see the trend of energy dropping off with harmonic number in every case, and the harmonic magnitudes getting larger for stronger strikes.  But notice also that while the max magnitude of the first harmonic (purple) increases from 85 dB for _pp_ to 110 dB for _ff_ (about 25 dB), the max energy of the 20th harmonic (red) increases from under 20 dB to over 60 dB - maybe a 45 dB increase.  This is the relative &quot;brightening&quot; of the timbre for louder notes. </P>\n\n      <P>If you have a <a href=\"https://tulip.computer/\">Tulip</a> or want to try <A href=\"https://tulip.computer/run\">Tulip on the web</a>, you can play this piano synthesis live with a MIDI device. Use the Voices app to switch to the <code>dpwe piano (256)</code> patch, or type <code>midi.config.add_synth(channel=1, patch_number=256, num_voices=4)</code>.</P>\n\n\n\n  <hr/>\n  <P>DAn Ellis - dan.ellis@gmail.com</P>\n</div>\n\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n\n      <div class=\"col-4 py-vh-3\" data-aos=\"fade-up\">\n            <a href=\"https://tulip.computer/run/\"><img src=\"tulip.svg\" width=42 height=42></a>\n            <a href=\"https://tulip.computer/run/\"><h3 class=\"h5 my-2\">Want more? Try Tulip</h3></a>\n            <p>Run more AMY experiments in a REPL with Tulip for the Web. Try the piano there!</p>\n      </div>\n\n      <div class=\"col-4 py-vh-3\" data-aos=\"fade-up\">\n            <a href=\"https://discord.com/invite/TzBFkUb8pG\"><img src=\"discord-mark-black.svg\" width=42 height=42></a>\n            <a href=\"https://discord.com/invite/TzBFkUb8pG\"><h3 class=\"h5 my-2\">Discord</h3></a>\n            <p>Join the <strong>shore pine sound systems</strong> Discord to chat about Tulip, AMY and Alles. A fun small community!</p>\n      </div>\n\n      <div class=\"col-4 py-vh-3\" data-aos=\"fade-up\" data-aos-delay=\"200\">\n            <a href=\"https://github.com/shorepine/tulipcc\"><img src=\"github-mark.svg\" width=42 height=42/></a>\n             <a href=\"https://github.com/shorepine/amy\"><h3 class=\"h5 my-2\">Github</h3></a>\n            <p>Check out the AMY Github page for issues, discussions and the code.</p>\n        </div>\n    </div>\n\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n             <h3 class=\"h5 my-2\"><A href=\"https://confirmsubscription.com/h/y/204B1B40E85DDBA3\">Join our email list</A></h3>\n      <p>We'll send you <A HREF=\"https://confirmsubscription.com/h/y/204B1B40E85DDBA3\"><strong>very rare</strong> updates</A> about Tulip, Alles, AMY and other projects we're working on.</p>\n      </div>\n\n\n    </div>\n   \n\n  </div>\n</div>\n\n  <!-- End your notebook content -->\n\n\n\n\n  <script language=\"javascript\">\n    document.querySelectorAll('.editor').forEach(create_editor);\n    document.body.addEventListener('click', start_python_and_amy, true); \n    document.body.addEventListener('keydown', start_python_and_amy, true);\n    function amy_sequencer_js_hook(i) {\n      // do nothing\n    }\n  </script>\n  </body>\n\n\n\n    <!-- Modal: id=\"myModal\" -->\n    <div\n      class=\"modal\"\n      id=\"myModal\"\n      tabindex=\"-1\"\n      aria-labelledby=\"myModalLabel\"\n      aria-hidden=\"true\"\n    >\n      <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n          <div class=\"modal-header bg-danger\">\n            <h5 class=\"modal-title\" id=\"myModalLabel\">Python Error</h5>\n            <button\n              type=\"button\"\n              class=\"btn-close\"\n              data-bs-dismiss=\"modal\"\n              aria-label=\"Close\"\n            ></button>\n          </div>\n          <div class=\"modal-body\" id=\"python-output-text\">\n            ...\n          </div>\n          <div class=\"modal-footer\">\n            <button\n              type=\"button\"\n              class=\"btn btn-secondary\"\n              data-bs-dismiss=\"modal\"\n            >\n              Close\n            </button>\n          </div>\n        </div>\n      </div>\n    </div>\n\n</html>\n\n\n\n"
  },
  {
    "path": "docs/repl.html",
    "content": "<!doctype html>\n<html lang=\"en-us\">\n<head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>AMY JavaScript REPL</title>\n    <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css\" rel=\"stylesheet\" crossorigin=\"anonymous\">\n    <script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js\" integrity=\"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p\" crossorigin=\"anonymous\"></script>\n    <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.63.3/codemirror.min.css\"/>\n    <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.63.3/theme/monokai.min.css\"/>\n    <script src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.63.3/codemirror.min.js\"></script>\n    <script src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.63.3/mode/javascript/javascript.min.js\"></script>\n    <script src=\"https://cdn.jsdelivr.net/npm/webmidi@latest/dist/iife/webmidi.iife.js\"></script>\n    <script type=\"text/javascript\" src=\"enable-threads.js\"></script>\n    <script type=\"text/javascript\" src=\"amy.js\"></script>\n    <style>\n        body { font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif; margin: 0; padding: 20px; background: #1a1a2e; color: #e0e0e0; }\n        .container { max-width: 900px; margin: 0 auto; }\n        h1 { color: #fff; margin-bottom: 4px; }\n        h1 a { color: #7eb8da; text-decoration: none; }\n        h1 a:hover { text-decoration: underline; }\n        .subtitle { color: #999; margin-bottom: 20px; font-size: 0.95em; }\n        .start-banner { background: #16213e; border: 1px solid #0f3460; border-radius: 8px; padding: 16px; margin-bottom: 20px; text-align: center; cursor: pointer; }\n        .start-banner:hover { background: #1a2744; }\n        .start-banner.started { background: #0a3d0a; border-color: #1a6b1a; cursor: default; }\n        .editor-block { margin-bottom: 16px; background: #16213e; border: 1px solid #0f3460; border-radius: 8px; overflow: hidden; }\n        .editor-header { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; background: #0f3460; }\n        .editor-title { font-size: 0.85em; color: #7eb8da; font-weight: 500; }\n        .editor-buttons { display: flex; gap: 6px; }\n        .editor-buttons button { border: none; border-radius: 4px; padding: 4px 12px; font-size: 0.85em; cursor: pointer; font-weight: 500; }\n        .btn-play { background: #28a745; color: #fff; }\n        .btn-play:hover { background: #218838; }\n        .btn-stop { background: #dc3545; color: #fff; }\n        .btn-stop:hover { background: #c82333; }\n        .CodeMirror { font-size: 14px; line-height: 1.5; }\n        .output-area { font-family: monospace; font-size: 13px; padding: 8px 12px; background: #0d1117; color: #8b949e; border-top: 1px solid #0f3460; white-space: pre-wrap; max-height: 120px; overflow-y: auto; display: none; }\n        .output-area.has-content { display: block; }\n        .output-area .error { color: #f85149; }\n        .output-area .wire { color: #58a6ff; }\n        .api-hint { background: #16213e; border: 1px solid #0f3460; border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; font-size: 0.85em; color: #8b949e; }\n        .api-hint code { color: #7ee787; background: #0d1117; padding: 2px 5px; border-radius: 3px; }\n        a { color: #7eb8da; }\n        .example-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }\n        .example-pill { background: #16213e; border: 1px solid #0f3460; border-radius: 20px; padding: 6px 16px; font-size: 0.85em; color: #7eb8da; cursor: pointer; transition: background 0.15s, border-color 0.15s; }\n        .example-pill:hover { background: #1a2744; border-color: #7eb8da; }\n        .example-pill.active { background: #0f3460; border-color: #7eb8da; }\n        .section-label { color: #7eb8da; font-size: 0.9em; font-weight: 600; margin: 20px 0 8px; }\n        .midi-panel { display: flex; gap: 12px; margin-bottom: 16px; }\n        .midi-panel select { background: #16213e; color: #7eb8da; border: 1px solid #0f3460; border-radius: 6px; padding: 4px 8px; font-size: 0.8em; max-width: 280px; }\n        .midi-panel select:focus { outline: none; border-color: #7eb8da; }\n    </style>\n</head>\n<body>\n\n<div class=\"container\">\n    <h1><a href=\"https://github.com/shorepine/amy\">AMY</a> JavaScript REPL</h1>\n    <p class=\"subtitle\">Write JavaScript using <code>amy_send()</code> to control AMY synthesis in your browser. <a href=\"index.html\">Back to examples</a></p>\n\n    <div class=\"start-banner\" id=\"start-banner\" onclick=\"startAudio()\">\n        Click here to start audio\n    </div>\n\n    <form name=\"amyboard_settings\">\n        <div class=\"midi-panel\">\n            <div style=\"display:flex;align-items:center;\">\n                <input type=\"checkbox\" id=\"amy_audioin\" onclick=\"toggle_audioin();\" style=\"margin-right:6px;\">\n                <label for=\"amy_audioin\" style=\"font-size:0.8em;color:#7eb8da;cursor:pointer;\">Audio input</label>\n            </div>\n            <div id=\"midi-input-panel\">\n                <select onchange=\"setup_midi_devices()\" name=\"midi_input\">\n                    <option selected>[MIDI input: not available]</option>\n                </select>\n            </div>\n            <div id=\"midi-output-panel\">\n                <select onchange=\"setup_midi_devices()\" name=\"midi_output\">\n                    <option selected>[MIDI output: not available]</option>\n                </select>\n            </div>\n        </div>\n    </form>\n\n    <div class=\"api-hint\">\n        <strong>Quick reference:</strong>\n        <code>amy_send({osc: 0, wave: AMY.SINE, freq: 440, vel: 1})</code> &mdash;\n        See the <a href=\"https://github.com/shorepine/amy/blob/main/docs/api.md#javascript-api\">JS API docs</a> and <a href=\"https://github.com/shorepine/amy/blob/main/docs/api.md#amy_event-amysend-and-amy_send-api\">parameter reference</a>.\n    </div>\n\n    <div class=\"editor-block\" id=\"scratch\">\n        <div class=\"editor-header\">\n            <span class=\"editor-title\">Scratch pad</span>\n            <div class=\"editor-buttons\">\n                <button class=\"btn-play\" onclick=\"runEditor('scratch')\">&#9654; Play</button>\n                <button class=\"btn-stop\" onclick=\"resetAMY()\">Reset</button>\n            </div>\n        </div>\n        <textarea id=\"scratch-code\">// Play a sine wave\namy_send({osc: 0, wave: AMY.SINE, freq: 440, vel: 1})\n</textarea>\n        <div class=\"output-area\" id=\"scratch-output\"></div>\n    </div>\n\n    <p class=\"section-label\">Load an example into the scratch pad</p>\n    <div class=\"example-pills\" id=\"example-pills\"></div>\n\n</div>\n\n<script>\n// Example definitions\nvar examples = [\n    {\n        title: \"Synth patches\",\n        code: \"// Load a Juno-6 patch and play a note\\namy_send({patch: 4, synth: 1, num_voices: 6})\\namy_send({synth: 1, vel: 1, note: 50})\"\n    },\n    {\n        title: \"Sine waves\",\n        code: \"// Multiple sine waves scheduled over time\\nfor (var i = 0; i < 16; i++) {\\n    amy_send({osc: i, wave: AMY.SINE, freq: 110 + i * 80, vel: (16 - i) / 32.0, time: i * 500})\\n}\"\n    },\n    {\n        title: \"Filtered saw\",\n        code: \"// Classic analog filter sweep using an envelope generator\\namy_send({osc: 0, wave: AMY.SAW_DOWN, resonance: 5, filter_type: AMY.FILTER_LPF})\\namy_send({osc: 0, filter_freq: '50,0,0,0,1', bp1: '0,6.0,1000,3.0,200,0'})\\namy_send({osc: 0, vel: 1, note: 40})\"\n    },\n    {\n        title: \"FM synthesis\",\n        code: \"// FM synthesis with two operators \\u2014 modulator fades in over 5 seconds\\namy_send({osc: 2, wave: AMY.SINE, ratio: 0.2, amp: {const: 1, vel: 0, eg0: 2}, bp0: '0,0,5000,1,0,0'})\\namy_send({osc: 1, wave: AMY.SINE, ratio: 1, amp: {const: 1, vel: 0, eg0: 0}})\\namy_send({osc: 0, wave: AMY.ALGO, algorithm: 1, algo_source: ',,,,2,1'})\\namy_send({osc: 0, note: 60, vel: 1})\"\n    },\n    {\n        title: \"Drum sequencer\",\n        code: \"// Simple drum pattern using the AMY sequencer\\namy_send({osc: 0, vel: 1, wave: AMY.PCM, preset: 0, sequence: ',24,1'})  // hi-hat every 8th note\\namy_send({osc: 1, vel: 1, wave: AMY.PCM, preset: 1, sequence: ',48,2'})  // kick every quarter note\"\n    },\n    {\n        title: \"Juno-6 chord\",\n        code: \"// Play a chord using a Juno-6 patch with filter tweak\\namy_send({patch: 0, synth: 1, num_voices: 6})\\namy_send({synth: 1, vel: 1, note: 48})\\namy_send({synth: 1, vel: 1, note: 55})\\namy_send({synth: 1, vel: 1, note: 60})\\namy_send({synth: 1, vel: 1, note: 64})\\namy_send({synth: 1, filter_freq: [800], resonance: 2.5})\"\n    }\n];\n\n// Build example pills\nvar pillsContainer = document.getElementById('example-pills');\nexamples.forEach(function(ex, idx) {\n    var pill = document.createElement('span');\n    pill.className = 'example-pill';\n    pill.textContent = ex.title;\n    pill.onclick = function() {\n        // Update active state\n        document.querySelectorAll('.example-pill').forEach(function(p) { p.classList.remove('active'); });\n        pill.classList.add('active');\n        // Load into scratch pad\n        editor.setValue(ex.code);\n        clearOutput('scratch');\n    };\n    pillsContainer.appendChild(pill);\n});\n\n// Initialize scratch pad editor (15 lines tall)\nvar editor = CodeMirror.fromTextArea(document.getElementById('scratch-code'), {\n    mode: 'javascript',\n    theme: 'monokai',\n    lineNumbers: true,\n    viewportMargin: Infinity,\n    tabSize: 2,\n    indentWithTabs: false\n});\neditor.setSize(null, 15 * 1.5 + 'em');\n\nfunction startAudio() {\n    if (amy_started) return;\n    amy_js_start();\n    var banner = document.getElementById('start-banner');\n    banner.textContent = 'Audio started';\n    banner.classList.add('started');\n}\n\nfunction showOutput(blockId, text, cls) {\n    var el = document.getElementById(blockId + '-output');\n    var span = document.createElement('span');\n    if (cls) span.className = cls;\n    span.textContent = text + '\\n';\n    el.appendChild(span);\n    el.classList.add('has-content');\n    el.scrollTop = el.scrollHeight;\n}\n\nfunction clearOutput(blockId) {\n    var el = document.getElementById(blockId + '-output');\n    el.innerHTML = '';\n    el.classList.remove('has-content');\n}\n\nfunction runEditor() {\n    if (!amy_started) startAudio();\n    clearOutput('scratch');\n\n    // Reset the sysclock so time-based scheduling starts from 0\n    if (typeof amy_reset_sysclock === 'function') {\n        amy_reset_sysclock();\n    }\n\n    var code = editor.getValue();\n\n    // Wrap amy_send to capture wire messages for display\n    var origSend = window.amy_send;\n    var capturedMessages = [];\n    window.amy_send = function(params) {\n        var msg = origSend(params);\n        capturedMessages.push(msg);\n        return msg;\n    };\n\n    try {\n        var result = new Function(code)();\n        if (capturedMessages.length > 0) {\n            showOutput('scratch', 'Wire: ' + capturedMessages.join(' | '), 'wire');\n        }\n        if (result !== undefined) {\n            showOutput('scratch', String(result));\n        }\n    } catch (e) {\n        showOutput('scratch', 'Error: ' + e.message, 'error');\n    } finally {\n        window.amy_send = origSend;\n    }\n}\n\nfunction resetAMY() {\n    if (typeof amy_add_message === 'function') {\n        // RESET_SEQUENCER (4096) + RESET_ALL_OSCS (8192) must be sent separately\n        // from RESET_SYNTHS (262144) because the parser unsets reset_osc after\n        // handling RESET_SYNTHS immediately, dropping the event-based flags.\n        amy_add_message('S' + (4096 + 8192) + 'Z');\n        amy_add_message('S' + 262144 + 'Z');\n    }\n}\n\n// Start audio on first click/keydown anywhere\ndocument.body.addEventListener('click', startAudio, {once: true});\ndocument.body.addEventListener('keydown', startAudio, {once: true});\n</script>\n\n</body>\n</html>\n"
  },
  {
    "path": "docs/server.py",
    "content": "#!/usr/bin/env python\n\n# Attribution: https://stackoverflow.com/questions/21956683/enable-access-control-on-simple-http-server\n\ntry:\n    # Python 3\n    from http.server import HTTPServer, SimpleHTTPRequestHandler, test as test_orig\n    import sys\n    def test (*args):\n        test_orig(*args, port=int(sys.argv[1]) if len(sys.argv) > 1 else 8000)\nexcept ImportError: # Python 2\n    from BaseHTTPServer import HTTPServer, test\n    from SimpleHTTPServer import SimpleHTTPRequestHandler\n\nclass CORSRequestHandler (SimpleHTTPRequestHandler):\n    def end_headers (self):\n        self.send_header('Access-Control-Allow-Origin', '*')\n        self.send_header('Cross-Origin-Embedder-Policy', 'require-corp')\n        self.send_header('Cross-Origin-Opener-Policy', 'same-origin')\n        SimpleHTTPRequestHandler.end_headers(self)\n\nif __name__ == '__main__':\n    test(CORSRequestHandler, HTTPServer)\n\n\n"
  },
  {
    "path": "docs/style.css",
    "content": "\nbody {\n    font-family: Helvetica, Arial, sans-serif;\n    margin:10px;\n/*     display: flex;\n     flex-direction: column;\n     justify-content: center;\n     align-items: center;\n     background: #22475e;\n     padding: 0.25rem 1rem;\n */\n}\n* {\n  box-sizing:border-box\n}\n\n\nul {\n  height:18.875em;\n  width:34em;\n  margin:5em auto;\n  padding:3em 0 0 3em;\n  position:relative;\n  border:1px solid #160801;\n  border-radius:1em;\n  background:linear-gradient(to bottom right,rgba(0,0,0,0.3),rgba(0,0,0,0)),url(vwood.png);\n  box-shadow:0 0 50px rgba(0,0,0,0.5) inset,0 1px rgba(212,152,125,0.2) inset,0 5px 15px rgba(0,0,0,0.5)\n}\n\nli {\n  margin:0;\n  padding:0;\n  list-style:none;\n  position:relative;\n  float:left\n}\n\nul .white {\n  height:16em;\n  width:4em;\n  z-index:1;\n  border-left:1px solid #bbb;\n  border-bottom:1px solid #bbb;\n  border-radius:0 0 5px 5px;\n  box-shadow:-1px 0 0 rgba(255,255,255,0.8) inset,0 0 5px #ccc inset,0 0 3px rgba(0,0,0,0.2);\n  background:linear-gradient(to bottom,#eee 0%,#fff 100%)\n}\n\nul .white:active {\n  border-top:1px solid #777;\n  border-left:1px solid #999;\n  border-bottom:1px solid #999;\n  box-shadow:2px 0 3px rgba(0,0,0,0.1) inset,-5px 5px 20px rgba(0,0,0,0.2) inset,0 0 3px rgba(0,0,0,0.2);\n  background:linear-gradient(to bottom,#fff 0%,#e9e9e9 100%)\n}\n\n.black {\n  height:8em;\n  width:2em;\n  margin:0 0 0 -1em;\n  z-index:2;\n  border:1px solid #000;\n  border-radius:0 0 3px 3px;\n  box-shadow:-1px -1px 2px rgba(255,255,255,0.2) inset,0 -5px 2px 3px rgba(0,0,0,0.6) inset,0 2px 4px rgba(0,0,0,0.5);\n  background:linear-gradient(45deg,#222 0%,#555 100%)\n}\n\n.black:active {\n  box-shadow:-1px -1px 2px rgba(255,255,255,0.2) inset,0 -2px 2px 3px rgba(0,0,0,0.6) inset,0 1px 2px rgba(0,0,0,0.5);\n  background:linear-gradient(to right,#444 0%,#222 100%)\n}\n\n.a,.g,.f,.d,.c {\n  margin:0 0 0 -1em\n}\n\nul li:first-child {\n  border-radius:5px 0 5px 5px\n}\n\nul li:last-child {\n  border-radius:0 5px 5px 5px\n}\n\n/*\nh1, h2 {\n    font-family: 'Quicksand', Helvetica, Sans-serif;\n    background-color:#D90268;\n    padding:0.5em;\n    margin:0;\n    color:white;\n}\n*/\n#startStop {\n    text-align: center;\n    border-radius: 0.5em;\n    padding: 0.75em;\n    color:white;\n    font-weight: 400;\n    text-decoration: none;\n    background-color: #D90268;\n}\n#startStop:hover {\n    background-color: black;\n}\n\n\nimg {\n    width: 100px;\n}\n\n#content {\n    padding: 0.5em;\n}\n\n#footer {\n    width: 100%;\n    text-align: center;\n}\n\n.seqrow {\n  display: flex;\n}\n.seqtitle {\n  width:10px;\n}\n.LEDTitle {\n  width:10px;\n}\n\n.LEDrow {\n  display: flex;\n}\n\n.LED {\n  border: 0.5px solid gray;\n  border-radius: 2px;\n  width: 16px;\n  height: 10px;\n  margin: 1.7px;\n  background: lightgray;\n}"
  },
  {
    "path": "docs/synth.md",
    "content": "# AMY Synthesizer Details\n\n[**Please see our interactive AMY tutorial for more tips on using AMY**](https://shorepine.github.io/amy/tutorial.html)\n\n- [AMY Synthesizer Details](#amy-synthesizer-details)\n  * [Oscillators, voices, patches and synths](#oscillators--voices--patches-and-synths)\n    + [User patches](#user-patches)\n    + [Synths](#synths)\n  * [CtrlCoefficients](#ctrlcoefficients)\n  * [AMY's sequencer and timestamps](#amy-s-sequencer-and-timestamps)\n    + [The sequencer](#the-sequencer)\n  * [Core oscillators](#core-oscillators)\n  * [LFOs & modulators](#lfos---modulators)\n  * [Filters](#filters)\n  * [EQ & Volume](#eq---volume)\n  * [Envelope Generators](#envelope-generators)\n  * [Audio input and effects](#audio-input-and-effects)\n  * [FM & ALGO type](#fm---algo-type)\n  * [Build-your-own Partials](#build-your-own-partials)\n  * [Interpolated partials](#interpolated-partials)\n  * [PCM and Sampler](#pcm-and-sampler)\n\n\n## Oscillators, voices, patches and synths\n\nHere's a diagram of how AMY manages oscillators,  and synths. This is an example of a six polyphony Juno-6 synth. Each voice represents one unit of polyphony, and the 5 oscillators that are needed to make up the voice. The synth manages 6 voices:\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"./amy_dark.png\">\n  <img src=\"./amy_light.png\">\n</picture>\n\nAMY's lowest level of control is the `osc`illator - a single waveform that you can define a number of parameters for, apply filters, frequency, pan, etc. By default AMY ships with support for 180 oscillators running at once. (You can increase this with [`amy_config`](api.md).)\n\nWe then provide `voices`, to make it easier to configure and use groups of oscillators in coordination. For example, each Juno-6 note is generated by a single voice made from 5 oscillators. \n\nYou then manage a set of `voices` using a `synth`, which takes care of allocating available voices to successive notes. For example a Juno-6 synth can play 6 notes of a patch at once. The `synth` in AMY allocates 6 `voices`, each with 5 `osc`, and handles note stealing and parameter changes. \n\nYou configure the `voices` in a `synth` by using a `patch`, which is a number referring to a stored list of AMY commands that set up one or more oscillators.  You can assign any patch to any synth, or set up multiple synths to have the same patch, and AMY will allocate the oscillators it needs under the hood. \n\n(Note that when you use voices/synths, you'll need to include the `synth` arg when addressing oscillators, and AMY will automatically route your command to the relevant oscillators in each voice of the synth's set -- there's no other way to tell which oscillators are being used by which voices.)\n\nTo play a patch -- for instance the built-in patches emulating Juno and DX7 synthesizers and a piano -- you create a synth configured with that patch, then send note events, or parameter moidifications, to the synth. We ship patches 0-127 for Juno, 128-255 for DX7, and 256 for our [built-in piano](https://shorepine.github.io/amy/piano.html). For example, a multitimbral Juno/DX7 synth can be set up like this:\n\n```python\namy.send(synth=1, num_voices=4, patch=1)     # 4 voices of Juno patch #1 on synth 1\namy.send(synth=2, num_voices=4, patch=129)   # 4 voices of DX7 patch #2 on synth 2\namy.send(synth=1, note=60, vel=1)            # Play note 60 on one of the Juno voices\namy.send(synth=1, osc=0, filter_freq=8000)   # Open up the filter on the Juno voices\n                                             # (Juno patches implement the VCF on osc 0)\n```\n\nThe code in `amy/headers.py` generates these patches and bakes them into AMY so they're ready for playback on any device. You can add your own patches at compile time by storing alternative wire-protocol setup strings in `patches.h`, or by making user patches at runtime (see [User patches](#user-patches) below).\n\n### Synths\n\nA common use-case is to want a pool of voices which are allocated to a series of notes as-needed.  This is accomplished with **synths**.  You associate a synth number with a set of voices by providing the patch number when initializing the synth; the `synth` arg becomes a smart alias for passing note events to one of its voices (or configuration changes to all of them), e.g.\n\n```python\namy.send(synth=0, num_voices=3, patch=1)     # 3-voice Juno patch #1 on synth 0\n# Play three notes simultaneously\namy.send(synth=0, note=60, vel=1)\namy.send(synth=0, note=64, vel=1)\namy.send(synth=0, note=67, vel=1)\n# To play a 4th note, the synth 'steals' the oldest voice, i.e. the one that was playing note 60\namy.send(synth=0, note=70, vel=1)\n# We can send note-offs to individual notes\namy.send(synth=0, note=70, vel=0)\n# .. or we can send note-offs to all the currently-active synth voices by sending a note-off with no note.\namy.send(synth=0, vel=0)\n# Once a synth has been initialized and associated with a set of voices, you can use it alone with patch\namy.send(synth=0, patch=13)  # Load a different Juno patch, it will remain 4-voice.\n# You can release all the voices/oscs being used by a synth by setting its num_voices to zero.\namy.send(synth=0, num_voices=0)\n# As a special case, you can use `synth_flags` to set up a MIDI drum synth\n# that will translate note events into PCM presets.\n# You can also use  `patch_string` to directly define a patch using a wire-command string.\namy.send(synth=10, num_voices=3, patch_string='w7f0Z', synth_flags=3)\namy.send(synth=10, note=40, vel=1)  # MIDI drums 'electric snare'\n```\n\n(Note: Although `note` can take on real values -- e.g. `note=60.5` for 50 cents above C4 -- the voice management tracks voices by integer note numbers (i.e., midi notes) so it rounds note values to the nearest integer when deciding which note-off goes with which note-on.  Note also that note-on events that also set the `preset` parameter (e.g. to select PCM samples) will fold the patch number into the note integer used as the key for note-on, note-off matching.)\n\n\n\n### User patches\n\nYou can create your own patches at runtime and use them for synths with a sequence of `amy.send(patch=PATCH_NUMBER, <configuration commands>)` where `PATCH_NUMBER` is a number in the range 1024-1055.  Without `patch=PATCH_NUMBER`, this command would directly configure an oscillator, but when `patch` is present, it instead appends the command to the stored patch configuration.  You can accumulate any number of commands into a single patch; you reset the patch with `amy.send(patch=PATCH_NUMBER, reset=amy.RESET_PATCH)`.\n\nSo you can do:\n\n```python\n>>> import amy; amy.live()  # Not needed on Tulip.\n>>> amy.send(patch=1024, reset=amy.RESET_PATCH)\n>>> amy.send(patch=1024, osc=1, wave=amy.SINE, freq=0.25, phase=0.5, amp=0.5)  # \"Pitch sigh\" modulator.\n>>> amy.send(patch=1024, osc=0, wave=amy.SINE, freq='440,1,0,0,0,1', bp0='0,1,500,0,0,0', mod_source=1)  # decaying sine modulated by sigh.\n>>> amy.send(synth=0, num_voices=1, patch=1024)\n>>> amy.send(synth=0, vel=2, note=50)\n```\nAMY infers the number of oscs needed for the patch from the cumulated commands. If you store a new patch over an old one, that old memory is freed and re-allocated. (We rely on `malloc` for all of this.)\n\nYou can do something very similar directly into a synth, provided it has been initialized with the correct number of oscs.  So we could get\nthe same final synth as above with these commands:\n```python\n>>> amy.send(synth=0, num_voices=1, oscs_per_voice=2)  # We will be using 2 oscs per voice.\n>>> amy.send(synth=0, osc=1, wave=amy.SINE, freq=0.25, phase=0.5, amp=0.5)  # \"Pitch sigh\" modulator.\n>>> amy.send(synth=0, osc=0, wave=amy.SINE, freq='440,1,0,0,0,1', bp0='0,1,500,0,0,0', mod_source=1)  # decaying sine modulated by sigh.\n>>> # Ready to play!\n>>> amy.send(synth=0, vel=2, note=50)\n```\n\n\n## Control Coefficients\n\nOn many synths (like this SH-101), you'll see a row of sliders that impact which control signal(s) can modify a parameter. Here the SH-101 lets you control the VCF (filter) by a constant frequency (FREQ), ADSR envelope (ENV), LFO or mod wheel (MOD), and keyboard velocity (KYBD). These slider values impact the ratio of each source's strength in the output filter frequency. \n\n<img src=\"./sh101.png\" width=\"400\"/>\n\nWe use this style of control in AMY, called `CtrlCoef` or Control Coefficients. They are a list of up to 9 floats that are multiplied by a range of control signals, then summed up to give the final result (in this case, the filter frequency).\n\nThe full set of parameters accepting **ControlCoefficients** is `amp`, `freq`, `filter_freq`, `duty`, and `pan`.   The control signals are:\n\n * `const`: A constant value of 1 - so the first number in the control coefficient list is the default value if all the others are zero.\n * `note`: The frequency corresponding to the `note` parameter to the note-on event (converted to unit-per-octave relative to middle C).\n * `vel`: The velocity, from the note-on event.\n * `eg0`: The output of Envelope Generator 0.\n * `eg1`: The output of Envelope Generator 1.\n * `mod`: The output of the modulating oscillator, specified by the `mod_source` parameter.\n * `bend`: The current pitch bend value (from `amy.send(pitch_bend=0.5)` etc.).\n * `ext0`: An external parameter, [set by your code](api.md) or 3rd party CV input or sensor\n * `ext1`: An external parameter, [set by your code](api.md) or 3rd party CV input or sensor\n\nThe set `50,0,0,0,1` means that we have a base frequency of 50 Hz, we ignore the note frequency and velocity and EG0, but we also add the output of EG1. Any coefficients that you do not specify, for instance by providing fewer than 7 values, are not modified.  You can also use empty strings to skip positional values, so `filter_freq=',,,,1'` couples EG1 to the filter frequency without changing any of the other coefficients.  (Note that when we passed `freq=220` in the first example, that was interpreted setting the `const` coefficient to 220, but leaving all the remaining coefficients untouched.)\n\nBecause entering lists of commas is error prone, you can also specify control coefficients as Python dicts consisting of value with keys from the list above, i.e. `filter_freq={'const': 50, 'eg1': 1}` is equivalent to `filter_freq='50,,,,1'`.\n\nYou can use the same EG to control several things at once.  For example, we could include `freq=',,,,0.333'`, which says to modify the note frequency from the same EG1 as is controlling the filter frequency, but scaled down by 1/3rd so the initial decay is over 1 octave, not 3.  Give it a go!\n\nThe note frequency is scaled relative to a zero-point of middle A (MIDI note 69, 440 Hz), so to make the oscillator faithfully track the `note` parameter to the note-on event, you would use something like `freq='440,1'`.  Setting it to `freq='880,1'` would make the oscillator always be one octave higher than the `note` MIDI number.  Setting `freq='440,0.5'` would make the oscillator track the `note` parameter at half an octave per unit, so while `note=69` would still give middle A, `note=81` (A5) would make the oscillator run at D#5, and `note=93` (A6) would be required to get A5 from the oscillator.\n\nThe default set of ControlCoefficients for `freq` is `'440,1,0,0,0,0,1'`, i.e. a base of middle A, tracking the MIDI note, plus pitch bend (at unit-per-octave).  Because 440 is such an important value, as a special case, setting the first `freq` value to zero is magically rewritten as 440, so `freq='0,1,0,0,0,0,1'` also yields the default behavior.  `amp` also has a set of defaults: `amp='0,0,1,1,0,0,0'`, i.e. tracking note-on velocity plus modulation by EG0 (which just tracks the note-on status if it has not been set up).  `amp` is a little special because the individual components are *multiplied* together, instead of added together, for any control inputs with nonzero coefficients.  Finally, an offset of 1.0 is added to the coefficient-scaled LFO modulator and pitch bend inputs before multiplying them into the amplitude, to allow small variations around unity e.g. for tremolo.  These defaults are set up in [`src/amy.c:reset_osc()`](https://github.com/shorepine/amy/blob/b1ed189b01e6b908bc19f18a4e0a85761d739807/src/amy.c#L551).\n\nWe also have LFOs, which are implemented as one oscillator modulating another (instead of sending its waveform to the output). You set up the low-frequency oscillator, then have it control a parameter of another audible oscillator. Let's make the classic 8-bit duty cycle pulse wave modulation, a favorite:\n\n```python\namy.reset()  # Clear the state.\namy.send(osc=1, wave=amy.SINE, freq=0.5, amp=1)   # We set the amp but not the vel, so it doesn't sound.\namy.send(osc=0, wave=amy.PULSE, duty={'const': 0.5, 'mod': 0.4}, mod_source=1)\namy.send(osc=0, note=60, vel=0.5)\n```\n\nYou see we first set up the modulation oscillator (a sine wave at 0.5Hz, with amplitude of 1).  We do *not* send it a velocity, because that would make it start sending a 0.5 Hz sinewave to the audio output; we want its output only to be used internally.  Then we set up the oscillator to be modulated, a pulse wave with a modulation source of oscillator 1 and the duty **ControlCoefficients** set to have a constant value of 0.5 plus 0.4 times the modulating input (i.e., the depth of the pulse width modulation, where 0.4 modulates between 0.1 and 0.9, almost the maximum depth).  The initial duty cycle will start at 0.5 and be offset by the state of oscillator 1 every tick, to make that classic thick saw line from the C64 et al. The modulation will re-trigger every note on. Just like with envelope generators, the modulation oscillator has a 'slot' in the ControlCoefficients - the 6th coefficient, `mod` - so it can modulate PWM duty cycle, amplitude, frequency, filter frequency, or pan! And if you want to modulate more than one thing, like frequency and duty, just specify multiple ControlCoefficients:\n\n```python\namy.send(osc=1, wave=amy.TRIANGLE, freq=5, amp=1)\namy.send(osc=0, wave=amy.PULSE, duty={'const': 0.5, 'mod': 0.25}, freq={'mod': 0.5}, mod_source=1)\namy.send(osc=0, note=60, vel=0.5)\n```\n\nWe have some helpful patches in `amy.examples`, if you want to use them, or add to them. To make that filter bass, just do `amy.send(synth=0, num_voices=4, patch=amy.examples.filter_bass())` and then `amy.send(synth=0,vel=1,note=50)` to hear it.\n\n\n## AMY's sequencer and timestamps\n\nAMY can accept a `time` (in milliseconds) parameter to schedule events in the future, and also provides a pattern sequencer for repeating events.\n\nThe scheduled events are very helpful in cases where you can't rely on an accurate clock from the client, or don't have one. The clock used internally by AMY is based on the audio samples being generated out the speakers, which should run at an accurate 44,100 times a second.  This lets you do things like schedule fast moving parameter changes over short windows of time. \n\n```python\nstart = amy.millis()  # arbitrary start timestamp\namy.send(osc=0, note=50, vel=1, time=start)\namy.send(osc=0, note=52, vel=1, time=start + 1000)\n```\n\nBoth `amy.send()`s will return immediately, but you'll hear the second note play precisely a second after the first. AMY uses this internal clock to schedule step changes in breakpoints as well. \n\n\n### The sequencer\n\nAMY starts a musical sequencer that works on `ticks` from startup. You can reset the `ticks` to 0 with an `amy.send(reset=amy.RESET_TIMEBASE)`. Note this will happen immediately, ignoring any `time` or `sequence`.\n\nTicks run at 48 PPQ at the set tempo. The tempo defaults to 108 BPM. This means there are 108 quarter notes a minute, and `48 * 108 = 5184` ticks a minute, 86 ticks a second. The tempo can be changed with `amy.send(tempo=120)`.\n\nYou can schedule an event to happen at a precise tick with `amy.send(... ,sequence=\"tick,period,tag\")`. `tick` can be an absolute or offset tick number. If `period` is ommited or 0, `tick` is assumed to be absolute and once AMY reaches `tick`, the rest of your event will play and the saved event will be removed from memory. If an absolute `tick` is in the past, AMY will ignore it. \n\nYou can schedule repeating events (like a step sequencer or drum machine) with `period`, which is the length of the sequence in ticks. For example a `period` of 48 with `ticks` omitted or 0 will trigger once every quarter note. A `period` of 24 will happen twice every quarter note. A `period` of 96 will happen every two quarter notes. `period` can be any whole number to allow for complex rhythms. \n\nFor pattern sequencers like drum machines, you will also want to use `tick` alongside `period`. If both are given and nonzero, `tick` is assumed to be an offset on the `period`. For example, for a 16-step drum machine pattern running on eighth notes (PPQ/2), you would use a `period` of `16 * 24 = 384`. The first slot of the drum machine would have a `tick` of 0, the 2nd would have a `tick` offset of 24, and so on. \n\n`tag` should be given, and will be `0` if not. You should set `tag` to a random or incrementing number in your code that you can refer to later. `tag` allows you to replace or delete the event once scheduled. \n\nIf you are including AMY in a program, you can set the [hook `void (*amy_external_sequencer_hook)(uint32_t)`](docs/api.md) to any function. This will be called at every tick with the current tick number as an argument. \n\n## Core oscillators\n\nWe support bandlimited saw, pulse/square and triangle waves, alongside sine and noise. Use the wave parameter: 0=SINE, PULSE, SAW_DOWN, SAW_UP, TRIANGLE, NOISE. Each oscillator can have a frequency (or set by midi note), amplitude and phase (set in 0-1.). You can also set `duty` for the pulse type. We also have a karplus-strong type (KS=6), plus `WAVETABLE` when compiled with `AMY_WAVETABLE` that plays back 16,384 sample long wavetable packs, such as those hosted on [waveeditonline.com](http://waveeditonline.com). \n\nOscillators will not become audible until a `velocity` over 0 is set for the oscillator. This is a \"note on\" and will trigger any modulators or envelope generators set for that oscillator. Setting `velocity` to 0 sets a note off, which will stop modulators and also finish the envelopes at their release pair. `velocity` also internally sets `amplitude`, but you can manually set `amplitude` after `velocity` starts a note on.\n\n### WAVETABLE\n\n`WAVETABLE` reads from wavetable presets appended to tiny PCM data at build time (guarded by `#if defined(AMY_WAVETABLE)`).\n\n - Pick the table with `preset`: `pcm_wavetable_base` to `pcm_wavetable_base + pcm_wavetable_samples - 1`\n - `duty` controls interpolation position across the 64 waveform cycles within one wavetable preset.\n - Internally each cycle is 256 samples; full table length is typically 16384 samples.\n - You can load new wavetables using `load_sample` and use your new preset number. Ensure they are 16,384 samples long. Find more on [waveeditonline.com](http://waveeditonline.com).\n\n\n## LFOs & modulators\n\nAny oscillator can modulate any other oscillator. For example, a LFO can be specified by setting oscillator 0 to 0.25Hz sine, with oscillator 1 being a 440Hz sine. Using the 6th parameter of **ControlCoefficient** lists, you can have oscillator 0 modulate frequency, amplitude, filter frequency, or pan of oscillator 1. You can also add targets together, for example amplitude+frequency. Set the `mod_target` and `mod_source` on the audible oscillator (in this case, oscillator 1.) The source mod oscillator will not be audible once it is referred to as a `mod_source` by another oscillator. The amplitude of the modulating oscillator indicates how strong the modulation is (aka \"LFO depth.\")\n\n## Filters\n\nWe support lowpass, bandpass and hipass filters in AMY. You can set `resonance` and `filter_freq` per oscillator. \n\n## EQ & Volume\n\nYou can set a synth-wide volume (in practice, 0-10), or set the EQ of the entire synths's output. \n\n## Envelope Generators\n\nAMY allows you to set 2 Envelope Generators (EGs) per oscillator. You can see these as ADSR / envelopes (and they can perform the same task), but they are slightly more capable. Breakpoints are defined as pairs of time deltas (specified in milliseconds) and target value. You can specify up to 8 pairs, but the last pair you specify will always be seen as the \"release\" pair, which doesn't trigger until note off. All preceding pairs have time deltas relative to the previous segment, so `100,1,100,0,0,0` goes up to 1 over 100 ms, then back down to zero over the next 100ms. The last \"release\" pair counts from ms from the note-off.\n\nAn EG can control amplitude, frequency, filter frequency, duty or pan of an oscillator via the 4th (EG0) and 5th (EG1) entries in the corresponding ControlCoefficients.\n\nFor example, to define a common ADSR curve where a sound sweeps up in volume from note on over 50ms, then has a 100ms decay stage to 50% of the volume, then is held until note off at which point it takes 250ms to trail off to 0, you'd set time to be 50ms and target to be 1.0, then 100ms with target .5, then a 250ms release with ratio 0. By default, amplitude is set up to be controlled by EG0. At every synthesizer tick, the given amplitude (default of 1.0) will be multiplied by the EG0 value. In AMY wire parlance, this would look like `v0f220w0A50,1.0,100,0.5,250,0` to specify a sine wave at 220Hz with this envelope. \n\nWhen using `amy.py`, use the string form of the breakpoint: `amy.send(osc=0, bp0='50,1.0,100,0.5,250,0')`.\n\nEvery note on (specified by setting `vel` / `l` to anything > 0) will trigger this envelope, and setting velocity to 0 will trigger the note off / release section.\n\nYou can set a completely separate envelope using the second envelope generator, for example, to change pitch and amplitude at different rates.\n\nAs with ControlCoefficients, missing values in the comma-separated parameter strings mean to leave the existing value unchanged.  However, unlike ControlCoefficients, it's important to explicitly indicate every value you want to leave unchanged, since the number of parameters provided determines the number of breakpoints in the set.  So in the following sequence:\n```\namy.send(osc=0, bp0='0,1,1000,0.1,200,0')\namy.send(osc=0, bp0=',,,0.9,,')\n```\n.. we end up with the same effect as `bp0='0,1,1000,0.9,200,0`.  However, if we do:\n```\namy.send(osc=0, bp0='0,1,1000,0.1,200,0')\namy.send(osc=0, bp0=',,,0.9')  # No trailing commas.\n```\n.. we effectively end up with `bp0='0,1,1000,0.9`, i.e. the 4 elements in the second `bp0` string change the first breakpoint set to have only 2 breakpoints, meaning a constant amplitude during note-on, then a final slow release to 0.9 -- not at all like the first form, and likely not what we wanted.\n\n## Audio input and effects\n\nBy setting `wave` to `AUDIO_IN0` or `AUDIO_IN1`, you can have either channel of a stereo input act as an AMY oscillator. You can use this oscillator like you would any other in AMY, apply global effects to it, add filters, change amplitude, etc. \n\n```\namy.send(osc=0, wave=amy.AUDIO_IN0, vel=1)\namy.echo(1, 250, 250, 0.5, 0.5)\n```\n\nIf you are building your own audio system around AMY you will want to fill in the buffer `amy_in_block` before rendering. Our included `miniaudio`-based system does this for you. See [`amychip`](https://github.com/shorepine/amychip) for a demo of this in hardware. \n\n## FM & ALGO type\n\nTry default DX7 patches, from 128 to 256:\n\n```python\namy.send(synth=0, num_voices=1, patch=128)  # Set up a voice.\namy.send(synth=0, note=50, vel=1)  # Play a note on the voice.\n```\n\nThe `patch` lets you set which preset is used (0 to 127 are the Juno 106 analog synth presets, and 128 to 255 are the DX7 FM presets).  But let's make the classic FM bell tone ourselves, without a patch. We'll just be using two operators (two sine waves), one modulating the other.\n\n![DX7 Algorithms](https://raw.githubusercontent.com/shorepine/alles/main/pics/dx7_algorithms.jpg)\n\nWhen building your own algorithm sets, assign a separate oscillator as wave=`ALGO`, but the source oscillators as `SINE`. The algorithm #s are borrowed from the DX7. You don't have to use all 6 operators. Note that the `algo_source` parameter counts backwards from operator 6. When building operators, they can have their frequencies specified directly with `freq` or as a ratio of the root `ALGO` oscillator via `ratio`.\n\n[**Please see our interactive AMY tutorial for more on setting up ALGO tones**](https://shorepine.github.io/amy/tutorial.html#fm-tones)\n\n\n## Build-your-own Partials\n\nYou can also explicitly control partials in \"build-your-own partials\" mode, accessed via `wave=amy.BYO_PARTIALS`.  This sets up a string of oscs as individual sinusoids, but it's up to you to control the details of each partial via its parameters, envelopes, etc.  You just have to say how many partials you want with `num_partials`.  You can then individually set up the amplitude `bp0` envelopes of the next `num_partials` oscs for arbitrary control, subject to the limit of 7 breakpoints plus release for each envelope.  For instance, to get an 8-harmonic pluck tone with a 50 ms attack, and harmonic weights and decay times inversely proportional to to the harmonic number:\n\n```python\nnum_partials = 8\namy.send(osc=0, wave=amy.BYO_PARTIALS, num_partials=num_partials)\nfor i in range(1, num_partials + 1):\n    # Set up each partial as the corresponding harmonic of 440.0\n    # with an amplitude of 1/N, 50ms attack, and a decay of 1 sec / N.\n    amy.send(osc=i, wave=amy.PARTIAL, freq=440.0 * i,\n             bp0='50,%.2f,%d,0,0,0' % ((1.0 / i), 1000 // i))\namy.send(osc=0, note=60, vel=1)\n```\n\nYou can add a filter (or an envelope etc.) to the sum of all the `PARTIAL` oscs by configuring it on the parent `BYO_PARTIALS` osc:\n\n```\namy.send(osc=0, filter=amy.FILTER_HPF, resonance=4, filter_freq={'const': 200, 'eg1': 4}, bp1='0,0,1000,1,0,0')\namy.send(osc=0, note=60, vel=1)\n# etc.\n```\nNote that the default `bp0` amplitude envelope of the `BYO_PARTIALS` osc is a gate, so if you want to have a nonzero release on your partials, you'll need to add a slower release to the `BYO_PARTIALS` osc to avoid it cutting them off.\n\n\n## Interpolated partials\n\nPlease see our [piano voice documentation](https://shorepine.github.io/amy/piano.html) for more on the `INTERP_PARTIALS` type. \n\n\n## PCM and Sampler\n\nAMY comes with a set of 67 drum-like and instrument PCM samples to use as well, as they are normally hard to render with additive, subtractive or FM synthesis. You can use the type `PCM` and preset numbers 0-66 to explore them. Their native pitch is used if you don't give a frequency or note parameter. You can update the baked-in PCM sample bank using `amy_headers.py`. \n\n\n```python\namy.send(osc=0, wave=amy.PCM, vel=1, preset=10) # cowbell\namy.send(osc=0, wave=amy.PCM, vel=1, preset=10, note=70) # higher cowbell! \n```\n\nYou can turn on sample looping, helpful for instruments, using `feedback`:\n\n```python\namy.send(wave=amy.PCM,vel=1,preset=21,feedback=0) # clean guitar string, no looping\namy.send(wave=amy.PCM,vel=1,preset=21,feedback=1) # loops forever until note off\namy.send(vel=0) # note off\namy.send(wave=amy.PCM,vel=1,preset=35,feedback=1) # nice violin\n```\n\n### Sampler (aka Memory PCM)\n\nYou can also load your own samples into AMY memory at runtime by sending PCM data over the wire protocol. Use `load_sample` in `amy.py` as an example:\n\n```python\namy.load_sample(\"G1.wav\", preset=3)\namy.send(osc=0, wave=amy.PCM, preset=3, vel=1) # plays the sample\n```\n\nYou can use any preset number. If it overlaps with an existing PCM baked in number, it will play the memory sample instead of the baked in sample until you `unload_sample` the preset.\n\nIf the WAV file has sampler metadata like loop points or base MIDI note, we use that in AMY. You can set it directly as well using `loopstart`, `loopend`, `channels`, `midinote` or `length` in the `load_sample` call. To unload a sample:\n\n```python\namy.unload_sample(3) # unloads the RAM for preset 3\n```\n\nUnder the hood, if AMY receives a `load_sample` message (with preset number and nonzero length), it will then pause all other message parsing until it has received `length` amount of base64 encoded bytes over the wire protocol. Each individual message must be base64 encoded. Since AMY's maximum message length is 255 bytes, there is logic in `load_sample` in `amy.py`  to split the sample data into 188 byte chunks, which generates 252 bytes of base64 text. Please see `amy.load_sample` if you wish to load samples on other platforms.\n\n### WAV file playback\n\nAMY support playing WAV files directly with pitching (but not looping!) if your host of MCU has file support. You can use this when the WAV files are bigger than available memory. We provide file reading hooks for POSIX platforms (Mac, Linux) and see [Hooks](api.md#Hooks) to build your own `fopen`, `fread` etc on other platforms like Arduino or Micropython. You can set an oscillator to play a channel of the file with `disk_sample`, e.g.\n\n```python\namy.disk_sample(\"G1.wav\", preset=1024, midinote=31)\namy.send(osc=0, wave=amy.PCM_LEFT, preset=1024, pan=0, note=60, vel=1) # plays sample from disk\n```\n\nNote that you can only play one instance of the file per **preset**. (We keep one file handle open per `disk_sample` preset.) If you want to play multiple copies of a WAV file at once (for instance, a polyphonic sampler), you should make multiple `preset`s:\n\n```python\namy.disk_sample(\"G1.wav\", preset=1024, midinote=31)\namy.disk_sample(\"G1.wav\", preset=1025, midinote=31)\namy.disk_sample(\"G1.wav\", preset=1026, midinote=31)\namy.send(osc=0, wave=amy.PCM_LEFT, preset=1024, pan=0, note=60, vel=1) # plays sample from disk\namy.send(osc=0, wave=amy.PCM_LEFT, preset=1025, pan=0, note=72, vel=1) \n```\n\n### Channels\n\nWe support loading 1 or 2 channel WAV for `load_sample` and `disk_sample`. For `disk_sample`, channels are decoded from the WAV file metadata on disk. For `load_sample`, you should set the channels you're sending over. \n\nEach oscillator in AMY is mono, but you can hint it which channel of PCM to play back with `wave=PCM_LEFT` or `PCM_RIGHT`. `PCM` or `PCM_MIX` will average each channel if it was a two channel source. To play back stereo, set up two channels and use AMY's `pan`:\n\n```python\namy.disk_sample(\"G1.wav\", preset=1024, midinote=31)\namy.disk_sample(\"G1.wav\", preset=1025, midinote=31)\namy.send(osc=0, wave=amy.PCM_LEFT, preset=1024, pan=0, note=60, vel=1) \namy.send(osc=1, wave=amy.PCM_RIGHT, preset=1025, pan=1, note=60, vel=1) \n```\n\n### Sampling\n\nAMY can also sample directly into a PCM memory buffer from a `bus`. [A bus in AMY is a work in progress](https://github.com/shorepine/amy/issues/114) but for now we support two stereo buses: `bus=1` is the final AMY output and `bus=2` is just `AUDIO_IN0` and `AUDIO_IN1`. To start sampling to a PCM preset, use `start_sample`:\n\n```python\namy.start_sample(preset=1024, bus=0, max_frames=44100)  # sample for one second\namy.stop_sample() # stop all sampling, not needed if using max_frames\namy.start_sample(preset=1024, bus=1, max_frames=11025, midinote=60) # set base midi note, looping, too\namy.send(osc=0, wave=amy.PCM_LEFT, preset=1024, pan=0, note=72, vel=1) # play back AUDIO_IN sample an octave higher\namy.send(osc=1, wave=amy.PCM_RIGHT, preset=1024, pan=1, note=72, vel=1) \n```\n\n\n\n\n"
  },
  {
    "path": "docs/tutorial.html",
    "content": "<!doctype html>\n<html>\n  <head>\n      <link rel=\"stylesheet\" href=\"amyrepl.css\"/>\n      <title>AMY Synthesizer Tutorial</title>\n      <meta charset=\"UTF-8\">\n\n      <meta property=\"og:title\" content=\"AMY Tutorial\">\n      <meta property=\"og:image\" content=\"https://tulip.computer/img/tulip_hero.jpg\">\n      <meta property=\"og:description\" content=\"AMY synthesizer tutorial in interactive Python\">\n      <meta property=\"og:type\" content=\"product\" />\n      <meta property=\"og:url\" content=\"https://tulip.computer/amyboard\"/>\n\n      <meta name=\"viewport\" content=\"width=device-width,initial-scale=1,shrink-to-fit=no\">\n      <meta name=\"description\" content=\"AMYboard on the web. Run and test your AMYboard setup. Share your creations with others.\">\n      <meta name=\"author\" content=\"shore pine sound systems\">\n      <meta name=\"HandheldFriendly\" content=\"true\">\n      <meta name=\"twitter:card\" content=\"summary_large_image\">\n      <meta name=\"twitter:site\" content=\"@shorepinesound\">\n      <meta name=\"twitter:creator\" content=\"@shorepinesound\">\n      <meta name=\"twitter:title\" content=\"AMYboard Web\">\n      <meta name=\"twitter:description\" content=\"AMYboard on the web. Run and test your AMYboard setup. Share your creations with others.\">\n      <meta name=\"twitter:image\" content=\"https://tulip.computer/img/tulip_hero.jpg\">\n\n      <link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"apple-touch-icon.png\">\n      <link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"favicon-32x32.png\">\n      <link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"favicon-16x16.png\">\n      <link rel=\"icon\" type=\"image/png\" sizes=\"96x96\" href=\"favicon.png\">\n      <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.min.css\" /> \n      <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css\" rel=\"stylesheet\" crossorigin=\"anonymous\"> \n      <script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js\" integrity=\"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p\" crossorigin=\"anonymous\"></script>\n      <script src=\"https://cdn.jsdelivr.net/npm/webmidi@latest/dist/iife/webmidi.iife.js\"></script>\n      <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js\"></script>\n      <script src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.63.3/codemirror.min.js\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script> \n      <script src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.63.3/mode/python/python.min.js\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>\n      <script src=\"micropython.mjs\" type=\"module\"></script>\n      <script type=\"text/javascript\" src=\"enable-threads.js\"></script>\n      <script type=\"text/javascript\" src=\"amy.js\"></script>\n      <script type=\"text/javascript\" src=\"amyrepl.js\"></script>\n      <link rel=\"stylesheet\" href=\"amyrepl.css\"/>\n\n  </head>\n\n  <body>\n\n\n\n    <script type=\"module\">\n      mp = await loadMicroPython({\n        pystack: 64 * 1024, \n        heapsize: 8 * 1024 * 1024,\n        stdout:(line) => { console.log(line) }, \n        linebuffer: true,\n      });\n    </script>\n\n\n    <div class=\"container\">\n      <div class=\"px-2 py-3 maintulipview\">\n        <h1>AMY Synthesizer Tutorial</h1> \n      \n        <form name=\"amyboard_settings\">\n          <div class=\"row align-items-start pt-1\">\n            <div class=\"col-md-auto align-top small\" id=\"audioin_grow\">\n              <div class=\"form-check form-switch\">\n                <input class=\"form-check-input\" type=\"checkbox\" id=\"amy_audioin\" onClick=\"toggle_audioin();\"/>\n                <label class=\"form-check-label\" for=\"amy_audioin\">Allow audio input</label>\n              </div>\n            </div>\n            <!-- MIDI settings panel if MIDI is available -->\n            <div class=\"col-4 align-self-start small\">\n              <div id=\"midi-input-panel\">\n                <select onchange=\"setup_midi_devices()\" name=\"midi_input\" class=\"form-select form-select-sm\" aria-label=\".form-select-sm example\">\n                  <option selected>[Not available]</option>\n                </select>\n              </div>\n            </div>\n            <div class=\"col-4 align-self-start small\">\n              <div id=\"midi-output-panel\">\n                <select onchange=\"setup_midi_devices()\" name=\"midi_output\" class=\"form-select form-select-sm\" aria-label=\".form-select-sm example\">\n                  <option selected>[Not available]</option>\n                </select>\n              </div>\n            </div>\n          </div>\n        </form>\n      </div>\n    </div>\n\n    <div class=\"container-md\"> \n      <div class=\"row py-1 my-2 px-1 mx-1\">\n      <div class=\"alert alert-primary\" role=\"alert\">\n        This page is <strong>running live Python code</strong> locally in your browser. Feel free to edit and run your own versions of the code in any text box. The  <button type=\"button\" class=\"btn btn-sm btn-success\">►</button> button will execute the code (and play AMY synthesis, if you ask it to) and the  <button type=\"button\" class=\"btn btn-sm btn-danger\" onclick=\"resetAMY()\">Reset</button> button will reset the synthesizer. </div>\n      </div>\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n        <h1 id=\"the-amy-additive-piano-voice\"><A HREF=\"https://github.com/shorepine/amy\">AMY</A> Interactive Tutorial</h1>\n        <P>This page will let you try out different AMY commands in live Python, running all in your browser. You can edit any of the examples and run them live.</P>\n        <P>If you're using C, Arduino or JS to control AMY, check out our <A href=\"https://github.com/shorepine/amy/blob/main/docs/api.md\">API conversion table</A> to go between Python <code>amy.send</code> and <code>amy_event</code>.</P>\n        <P>You can also run this tutorial on your computer within a Python shell by <a href=\"https://github.com/shorepine/amy\">installing amy</a> and running <code>import amy; amy.live()</code>.\n        <P><A HREF=\"https://tulip.computer/run/\">You can also try AMY in a more full featured REPL with Tulip Web.</a></P>\n      </div>\n\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n        <h2 id=\"synth\">AMY synth mode</h2>\n        <P>AMY can receive MIDI messages while it is running and play just like a normal hardware synthesizer. You can send it note ons, offs, pitch bend, sustain, program changes and control change messages.\n          Let's set up a <code>synth</code> to respond to MIDI channel 1. Make sure your MIDI devices are connected above at the top of this page (note: MIDI does not work on Safari, so try Chrome or Firefox.)</P>\n        <div class=\"editor mb-4\">\namy.send(patch=4, synth=1, num_voices=6)\n        </div>\n        <p>Run that code block and play some notes on your MIDI keyboard. Try changing the <code>patch</code> and running again. The <code>synth</code> parameter tells AMY which synthesizer we are allocating (and if you give a synth number between 1 and 16, will respond to that MIDI channel), and <code>num_voices</code> tells AMY how much polyphony to allow per synthesizer. Keep track of <code>num_voices</code> is important for microcontrollers where you have limited CPU cycles. The <code>patch</code> can be any of AMY's built in Juno-6 (0-127), DX-7 (128-255), or partials (256) patches. (Later, we'll show you how to construct your own patches.)</p>\n        <p>No MIDI? That's ok, you can send the note on command to AMY directly:</p>\n        <div class=\"editor mb-4\">\namy.send(patch=4, synth=1, num_voices=6)\namy.send(synth=1, vel=1, note=50)\n        </div>\n        <P>Here you see we gave a <code>synth</code> number, and then <code>vel</code> for note on velocity and a MIDI note number of 50. <code>vel</code> in AMY is a signal to play a note on. If that note above is still playing, try `vel=0` to turn it off:\n        <div class=\"editor mb-4\">\namy.send(synth=1, note=50, vel=0)\n        </div>\n        <P>You can adjust parameters of an entire synth, like moving a knob, by addressing it. Here we'll change the filter cutoff frequency of the Juno-6 patch we loaded. Trying changing the values!</P>\n        <div class=\"editor mb-4\">\namy.send(patch=0, synth=1, num_voices=6)\namy.send(synth=1, vel=1, note=50)\namy.send(synth=1, filter_freq=[800], resonance=2.5)\n        </div>\n      </div>\n\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n        <h2 id=\"oscillators\">AMY oscillators</h2>\n          <P>Let's set a simple sine wave. We are simply telling oscillator 0 to be a sine wave at 220Hz and amplitude (specified as a note-on velocity) of 1.  You can also try `amy.PULSE`, or `amy.SAW_DOWN`, etc. </P>\n        <div class=\"editor mb-4\">\namy.send(osc=0, wave=amy.SINE, freq=220, vel=1)\n        </div>\n        <P>Now let's make more sine waves! We'll try using <code>time</code> to schedule events in the future. When you hit the play button on this page, AMY resets to time (in milliseconds) 0. In real use of AMY, you want to use <code>amy_sysclock()</code> to know what time it currently is. In this example we'll add a new sine wave every half second:</P>\n        <div class=\"editor mb-4\">\nfor i in range(16):\n    amy.send(osc=i, wave=amy.SINE, freq=110+(i*80), vel=((16-i)/32.0), time=i*500)\n        </div>\n\n        <P>A classic analog tone is the filtered saw wave. Let's make one.</P>\n        <div class=\"editor mb-4\">\namy.send(osc=0, wave=amy.SAW_DOWN, filter_freq=400, resonance=5, filter_type=amy.FILTER_LPF)\namy.send(osc=0, vel=1, note=40)\n        </div>\n\n        <P>Sounds nice. But we want that filter freq to go down over time, to make that classic filter sweep tone. Let's use an Envelope Generator! An Envelope Generator (EG) creates a smooth time envelope based on a breakpoint set, which is a simple list of (time-delta, target-value) pairs - you can have up to 8 of these per EG, and 2 different EGs to control different things. They're just like ADSRs, but more powerful. You can use an EG to control amplitude, oscillator frequency, filter cutoff frequency, PWM duty cycle, or stereo pan. The EG gets triggered when the note begins. So let's make an EG that turns the filter frequency down from its start at 3200 Hz to 400 Hz over 1000 milliseconds. And when the note goes off, it tapers the frequency to 50 Hz over 200 milliseconds.</P>\n        <div class=\"editor mb-4\">\namy.send(osc=0, wave=amy.SAW_DOWN, resonance=5, filter_type=amy.FILTER_LPF)\namy.send(osc=0, filter_freq='50,0,0,0,1', bp1='0,6.0,1000,3.0,200,0')\namy.send(osc=0, vel=1, note=40)\n        </div>\n        <P>There are two things to note here:  Firstly, the envelope is defined by the set of breakpoints in `bp1` (defining the second EG; the first is controlled by `bp0`).  The `bp` strings alternate time intervals in milliseconds with target values.  So `0,6.0,1000,3.0,200,0` means to move to 6.0 after 0 ms (i.e., the initial value is 6), then to decay to 3.0 over the next 1000 ms (1 second).  The final pair is always taken as the \"release\", and does not begin until the note-off event is received.  In this case, the EG decays to 0 in the 200 ms after the note-off.</P>\n\n        <P>Secondly, EG1 is coupled to the filter frequency with `filter_freq='50,0,0,0,1'`.  `filter_freq` is an example of a set of **ControlCoefficients** where the control value is calculated on-the-fly by combining a set of inputs scaled by the coefficients.  This is explained fully below, but for now the first coefficient (here 50) is taken as a constant, and the 5th coefficient (here 1) is applied to the output of EG1.  To get good \"musical\" behavior, the filter frequency is controlled using a \"unit per octave\" rule.  So if the envelope is zero, the filter is at its base frequency of 50 Hz.  But the envelope starts at 6.0, which, after scaling by the control coefficient of 1, drives the filter frequency 6 octaves higher, or 2^6 = 64x the frequency -- 3200 Hz.  As the envelope decays to 3.0 over the first 1000 ms, the filter moves to 2^3 = 8x the default frequency, giving 400 Hz.  It's only during the final release of 200 ms that it falls back to 0, giving a final filter frequency of (2^0 = 1x) 50 Hz.</P>\n      </div>\n\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n        <h2 id=\"oscillators\">AMY sequencer</h2>\n        <P>AMY is always running a musical sequencer. You can use it to schedule events using note lengths, or have a repeating (pattern) sequencer. Very useful for things like drum machines or MIDI playback.</P>\n        <div class=\"editor mb-4\">\namy.send(osc=0, vel=1, wave=amy.PCM, preset=0, sequence=\",24,1\") # play a PCM drum every eighth note.\namy.send(osc=1, vel=1, wave=amy.PCM, preset=1, sequence=\",48,2\") # play a different PCM drum every quarter note.\n        </div>\n        <P>You can remove or update sequence events by addressing their tag number</P>\n        <div class=\"editor mb-4\">\namy.send(sequence=\",,1\") # remove the eighth note sequence\namy.send(osc=1, vel=1, wave=amy.PCM, preset=1, note=70, sequence=\",48,2\") # change the quarter note event\n        </div>\n        <P>For patterns you want to also address their \"slots\", which is the offset within the pattern, like this</P>\n        <div class=\"editor mb-4\">\namy.send(osc=0, vel=1, wave=amy.PCM, preset=0, sequence=\"0,384,1\") # first slot of a 16 1/8th note drum machine\namy.send(osc=1, vel=1, wave=amy.PCM, preset=1, sequence=\"216,384,2\") # ninth slot of a 16 1/8th note drum machine\n        </div>\n      </div>\n\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n        <h2 id=\"fm-tones\" id=\"FM\">Constructing FM tones</h2>\n        Let's set up a fully custom ALGO / FM patch, using two operators:\n\n        <div class=\"editor mb-4\">\namy.send(osc=2, wave=amy.SINE, ratio=1, amp={'const': 1, 'vel': 0, 'eg0': 0})\namy.send(osc=1, wave=amy.SINE, ratio=0.2, amp={'const': 1, 'vel': 0, 'eg0': 1}, bp0='0,1,1000,0,0,0')\namy.send(osc=0, wave=amy.ALGO, algorithm=1, algo_source=',,,,2,1')\namy.send(osc=0, note=60, vel=1)\n        </div>\n        <P>Let's unpack that last line: we're setting up a ALGO \"oscillator\" that controls up to 6 other oscillators. We only need two, so we set the `algo_source` to mostly not used and have oscillator 2 modulate oscillator 1. You can have the operators work with each other in all sorts of crazy ways. For this simple example, we just use the DX7 algorithm #1. And we'll use only operators 2 and 1. Therefore our `algo_source` lists the oscillators involved, counting backwards from 6. We're saying only have operator 2 (osc 2 in this case) and operator 1 (osc 1).  From the <A HREF=\"dx7_algorithms.jpg\">algorithms picture</A>, we see DX7 algorithm 1 has operator 2 feeding operator 1, so we have osc 2 providing the frequency-modulation input to osc 1.\n\n        <P>What's going on with `ratio`? And `amp`? Ratio, for FM synthesis operators, means the ratio of the frequency for that operator relative to the base note. So oscillator 1 will be played at 20% of the base note frequency, and oscillator 2 will take the frequency of the base note. In FM synthesis, the `amp` of a modulator input is  called \"beta\", which describes the strength of the modulation.  Here, osc 2 is providing the modulation with a constant beta of 1, which will result in a range of sinusoids with frequencies around the carrier at multiples of the modulator.  We set osc 2's amp ControlCoefficients for velocity and envelope generator 0 to 0 because they default to 1, but we don't want them for this example (FM sines don't receive the parent note's velocity, so we need to disable its influence).  Osc 1 has `bp0` decaying its amplitude to 0 over 1000 ms, but because beta is fixed there's no other change to the sound over that time.\n\n        <P>FM gets much more exciting when we vary beta, which just means varying the amplitide envelope of the modulator.  The spectral effects of the frequency modulation depend on beta in a rich, nonlinear way, leading to the glistening FM sounds.  Let's try fading in the modulator over 5 seconds. Just a refresher on envelope generators; here we are saying to set the beta parameter (amplitude of the modulating tone) to 2x envelope generator 0's output, which starts at 0 at time 0 (actually, this is the default), then grows to 1.0 at time 5000ms - so beta grows to 2.0. At the release of the note, beta immediately drops back to 0.\n        <div class=\"editor mb-4\">\namy.send(osc=2, wave=amy.SINE, ratio=0.2, amp={'const': 1, 'vel': 0, 'eg0': 2}, bp0='0,0,5000,1,0,0')  # Op 2, modulator\namy.send(osc=1, wave=amy.SINE, ratio=1, amp={'const': 1, 'vel': 0, 'eg0': 0})  # Op 1, carrier\namy.send(osc=0, wave=amy.ALGO, algorithm=1, algo_source=',,,,2,1')\namy.send(osc=0, note=60, vel=1)\n        </div>\n\n      </div>\n\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n\n      <div class=\"col-4 py-vh-3\" data-aos=\"fade-up\">\n            <a href=\"https://tulip.computer/run/\"><img src=\"tulip.svg\" width=42 height=42></a>\n            <a href=\"https://tulip.computer/run/\"><h3 class=\"h5 my-2\">Want more? Try Tulip</h3></a>\n            <p>Run more AMY experiments in a REPL with Tulip for the Web. Try the piano there!</p>\n      </div>\n\n      <div class=\"col-4 py-vh-3\" data-aos=\"fade-up\">\n            <a href=\"https://discord.com/invite/TzBFkUb8pG\"><img src=\"discord-mark-black.svg\" width=42 height=42></a>\n            <a href=\"https://discord.com/invite/TzBFkUb8pG\"><h3 class=\"h5 my-2\">Discord</h3></a>\n            <p>Join the <strong>shore pine sound systems</strong> Discord to chat about Tulip, AMY and Alles. A fun small community!</p>\n      </div>\n\n      <div class=\"col-4 py-vh-3\" data-aos=\"fade-up\" data-aos-delay=\"200\">\n            <a href=\"https://github.com/shorepine/tulipcc\"><img src=\"github-mark.svg\" width=42 height=42/></a>\n             <a href=\"https://github.com/shorepine/amy\"><h3 class=\"h5 my-2\">Github</h3></a>\n            <p>Check out the AMY Github page for issues, discussions and the code.</p>\n        </div>\n    </div>\n\n      <div class=\"row py-3 my-5 px-1 mx-1 bg-light bg-gradient\">\n             <h3 class=\"h5 my-2\"><A href=\"https://confirmsubscription.com/h/y/204B1B40E85DDBA3\">Join our email list</A></h3>\n      <p>We'll send you <A HREF=\"https://confirmsubscription.com/h/y/204B1B40E85DDBA3\"><strong>very rare</strong> updates</A> about Tulip, Alles, AMY and other projects we're working on.</p>\n      </div>\n\n\n    </div>\n   \n\n  </div>\n</div>\n\n  <!-- End your notebook content -->\n\n\n\n\n  <script language=\"javascript\">\n    document.querySelectorAll('.editor').forEach(create_editor);\n    document.body.addEventListener('click', start_python_and_amy, true); \n    document.body.addEventListener('keydown', start_python_and_amy, true);\n    function amy_sequencer_js_hook(i) {\n      // do nothing\n    }\n  </script>\n  </body>\n\n\n\n    <!-- Modal: id=\"myModal\" -->\n    <div\n      class=\"modal\"\n      id=\"myModal\"\n      tabindex=\"-1\"\n      aria-labelledby=\"myModalLabel\"\n      aria-hidden=\"true\"\n    >\n      <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n          <div class=\"modal-header bg-danger\">\n            <h5 class=\"modal-title\" id=\"myModalLabel\">Python Error</h5>\n            <button\n              type=\"button\"\n              class=\"btn-close\"\n              data-bs-dismiss=\"modal\"\n              aria-label=\"Close\"\n            ></button>\n          </div>\n          <div class=\"modal-body\" id=\"python-output-text\">\n            ...\n          </div>\n          <div class=\"modal-footer\">\n            <button\n              type=\"button\"\n              class=\"btn btn-secondary\"\n              data-bs-dismiss=\"modal\"\n            >\n              Close\n            </button>\n          </div>\n        </div>\n      </div>\n    </div>\n\n    <\n  </body>\n</html>\n\n\n"
  },
  {
    "path": "docs/upgrading.md",
    "content": "# Upgrading between versions of AMY\n\nHere we will post breaking APIs between releases of AMY and tips on porting.\n\n\n## 1.0.X -> 1.1.X\n\nThis is a big change that moves a lot of stuff you used to have to do yourself into AMY itself -- voice and synth handling, note stealing, MIDI, I2S, sequencer.\n\nV1.1.0 is not backwards compatible with V1.0.3 Arduino scripts.  We updated because we believe we have substantially improved the functionality under Arduino.  In particular, we incorporated MIDI and I2S within AMY for common MCU boards.  See the new [`AMY_MIDI_Synth.ino`](https://github.com/shorepine/amy/blob/main/examples/AMY_MIDI_Synth/AMY_MIDI_Synth.ino).\n\nTo migrate your old AMY scripts:\n\n* There's no ``amy`` object.   Instead, the API consists of a bunch of functions with ``amy_`` (underscore) prefix (defined in [`api.c`](https://github.com/shorepine/amy/blob/main/src/api.c)).\n* There's a new `amy_config` structure that you use to set startup options.  You initialize it as, e.g.:\n```c\n  amy_config_t amy_config = amy_default_config();\n  amy_config.features.chorus = 0;  // etc, as desired.\n  amy_config.features.default_synths = 0;\n  // If you want MIDI over UART (5-pin or 3-pin serial MIDI)\n  amy_config.midi = AMY_MIDI_IS_UART;\n  // Pins for i2s board\n  amy_config.i2s_bclk = 8;\n  amy_config.i2s_lrc = 9;\n  amy_config.i2s_dout = 10;\n  ...\n  amy_start(amy_config);  // instead of amy.begin()\n  amy_live_start();  // performs I2S initialization\n```\n.. and (subject to several caveats and using supported hardware) MIDI input and I2S output will work.\n* `amy_add_event()` now takes a pointer to an event instead of the structure itself:\n```c\n  amy_event e = amy_default_event();\n  e.osc = 0;\n  e.wave = SINE;\n  e.freq_coefs[COEF_CONST] = 440;\n  e.velocity = 1;\n  amy_add_event(&e);  // instead of amy.add_event(e)\n```\n* The main loop is intended to be very simple:\n```c\nvoid loop() {\n  amy_update(); \n}\n```\nBut if you want to continue handling I2S and MIDI yourself, you can instead do something like:\n```c\nI2S i2s(OUTPUT);\nvoid setup() {\n  amy_config_t amy_config = amy_default_config();\n  amy_config.features.default_synths = 0;\n  amy_start(amy_config); \n  ...\n  // Do your own i2s config\n  i2s.begin(AMY_SAMPLE_RATE);\n}\nvoid loop() {\n  int16_t * samples = amy_simple_fill_buffer();\n  for(int i = 0; i < AMY_BLOCK_SIZE; i++) {\n    // AMY always renders in stereo.\n    i2s.write16(samples[2 * i], samples[2 * i + 1]);\n  }\n}\n```\n\n`patches_store_patch()` doesn't fit so well into our current API, and we're trying to make the use of wire string constants more of an exceptional case - you can do a similar thing by issuing a number of events with the `patch_number` set.  However, you can still use `patches_store_patch()`, it's just that the syntax has changed - rather than having the patch number as a prefix to the string, it's provided in an event structure.  So,\n```c\n    amy_event e = amy_default_event();\n    e.patch_number = 1024;\n    patches_store_patch(&e, \"v0w7f0\");  // Or whatever the wire string defining your patch is.\n```\n\n\n"
  },
  {
    "path": "examples/AMY_ESP32_manual_I2S/AMY_ESP32_manual_I2S.ino",
    "content": "// AMY_MIDI_Synth modified to test out new amy_update that returns the pointer to samples.\n// It then handles passing off to I2S in-sketch rather than in the background.\n// ESP32-specific.\n\n#include <AMY-Arduino.h>\n\n// Should we use the transparent I2S driver in AMY?\n// Otherwise we'll handle passing samples to I2S ourselves.\n#define USE_AMY_FOR_I2S\n\n// If we're not USE_AMY_FOR_I2S, should we install our I2S output function using config.write_samples_fn?\n// Otherwise, we'll just get a pointer to samples from amy_update() and pass them on ourselves.\n// (Ignored if USE_AMY_FOR_I2S is defined).\n//#define USE_WRITE_SAMPLES_FN\n\n// Do we want a background task to do rendering?  It's slightly more efficient under RTOS\n#define USE_MULTITHREAD\n\n// Do we want to split rendering between two cores?  This works with or without MULTITHREAD.\n#define USE_MULTICORE\n\n// Here's how many simultaneous patch-1 voices I can get before dropouts on AMYBOARD:\n//  USE_MULTITHREAD, USE_MULTICORE    9\n//                   USE_MULTICORE    6\n//  USE_MULTITHREAD                   6\n//               (neither)            4\n\n// For convenience, we'll reuse AMY's ESP32 I2S setup and write functions.\nextern \"C\" {\n  amy_err_t esp32_setup_i2s();\n  size_t amy_i2s_write(const uint8_t *buffer, size_t nbytes);\n};\n\nvoid test_polyphony() {\n  // Allocate a synth with lots of voices to test polyphony.\n  // Increase the number of voices available to MIDI channel 1.\n  amy_event e = amy_default_event();\n  e.reset_osc = RESET_AMY;\n  amy_add_event(&e);\n  e = amy_default_event();\n  e.synth = 1;\n  e.patch_number = 1;\n  e.num_voices = 12;  // I get 12 simultaneous juno patch 0 voices on a 250 MHz RP2040.\n  amy_add_event(&e);\n}\n\n// Support the NeoPixel on the ESP32-S3 dev board\n#include <Adafruit_NeoPixel.h> \n#define PIN 38  // 48 on some ESP32-S3 dev boards\n#define NUMPIXELS 1\nAdafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);\n\nenum COLORS {\n  BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, YELLOW, WHITE\n};\n\nvoid set_led(int val) {\n  uint32_t c;\n  switch(val) {\n    case 0:  c = pixels.Color(0, 0, 0); break;\n    case 1:  c = pixels.Color(0, 0, 100); break;\n    case 2:  c = pixels.Color(0, 100, 0); break;\n    case 3:  c = pixels.Color(0, 100, 100); break;\n    case 4:  c = pixels.Color(100, 0, 0); break;\n    case 5:  c = pixels.Color(100, 0, 100); break;\n    case 6:  c = pixels.Color(100, 100, 0); break;\n    default: c = pixels.Color(100, 100, 100); break;\n  }\n  pixels.setPixelColor(0, c);\n  pixels.show();\n}\n\n// -------------------------------------\n\nvoid setup() {\n  pixels.begin();\n  pixels.clear();\n  set_led(GREEN);\n\n  amy_config_t amy_config = amy_default_config();\n  amy_config.features.startup_bleep = 1;\n  amy_config.features.default_synths = 0;\n\n  // On RTOS, multithread runs audio rendering on its own thread.\n#ifdef USE_MULTITHREAD\n  amy_config.platform.multithread = 1;\n#else\n  amy_config.platform.multithread = 0;\n#endif\n  // On ESP32, multicore will run a second rendering thread on core 1 even if multithread = 0.\n#ifdef USE_MULTICORE\n  amy_config.platform.multicore = 1;\n#else\n  amy_config.platform.multicore = 0;\n#endif\n\n#ifdef USE_AMY_FOR_I2S\n  amy_config.audio = AMY_AUDIO_IS_I2S;\n  #warning \"Using AMY I2S\"\n#else\n  amy_config.audio = AMY_AUDIO_IS_NONE;\n#endif\n  amy_config.features.audio_in = 0;\n  // Pins for i2s board.\n  // Because we're using AMY's setup_i2s, this also configures if !USE_AMY_FOR_I2S.\n#ifdef AMYBOARD_ARDUINO\n  // These are the actual pins used on AMYboard.\n  amy_config.i2s_mclk = 3;\n  amy_config.i2s_bclk = 8;\n  amy_config.i2s_lrc = 2;\n  amy_config.i2s_dout = 6;\n#else \n  amy_config.i2s_mclk = 7;\n  amy_config.i2s_bclk = 8;\n  amy_config.i2s_lrc = 9;\n  amy_config.i2s_dout = 10;\n#endif\n\n  // If you want MIDI over UART (5-pin or 3-pin serial MIDI)\n  amy_config.midi = AMY_MIDI_IS_UART;\n  // Pins for UART MIDI\n#ifdef AMYBOARD_ARDUINO\n  amy_config.midi_out = 14;\n  amy_config.midi_in = 21;\n#else\n  amy_config.midi_out = 4;\n  amy_config.midi_in = 5;\n#endif\n\n#ifndef USE_AMY_FOR_I2S\n  #ifdef USE_WRITE_SAMPLES_FN\n  // amy_update() will automatically pass the new samples to this fn, if provided.\n  amy_config.write_samples_fn = amy_i2s_write;\n  #warning \"Using write_samples_fn\"\n  #endif\n#endif\n\n  amy_start(amy_config);\n\n#ifndef USE_AMY_FOR_I2S\n  esp32_setup_i2s();  // respects cached amy_config.\n#endif\n\n  set_led(MAGENTA);\n\n  test_polyphony();\n\n  set_led(YELLOW);\n}\n\nstatic long last_millis = 0;\nstatic const long millis_interval = 250;\n\nstatic bool led_state = 0;\n\nvoid loop() {\n  // Your loop() must contain this call to amy:\n  int16_t *buf = amy_update();\n#ifndef USE_AMY_FOR_I2S\n  #ifndef USE_WRITE_SAMPLES_FN\n  amy_i2s_write((const uint8_t *)buf, AMY_BLOCK_SIZE * AMY_NCHANS * sizeof(int16_t));\n  #warning \"Sending I2S explicitly in loop()\"\n  #endif\n#endif\n\n  // Toggle on-board LED every 250ms\n  int now_millis = millis();\n  if ((now_millis - last_millis) > millis_interval) {\n    last_millis = now_millis;\n    led_state = !led_state;\n    if (led_state != 0) set_led(WHITE);\n    else                set_led(BLACK);\n  }\n}\n"
  },
  {
    "path": "examples/AMY_MIDI_Synth/AMY_MIDI_Synth.ino",
    "content": "#include <AMY-Arduino.h>\n\n// Simple AMY synth setup that just sets up the default MIDI synth.\n// Plug a MIDI keyboard into the MIDI in port and play notes, send program changes, etc\n// We've tested this with the following boards:\n//\n// esp32s3 [n32r8]\n// rp2040 (Pi Pico) -- use 250Mhz and -O3 for 6 note juno polyphony and turn off serial debug if you have it on\n// rp2350 (Pi Pico)\n// teensy4\n// Electrosmith Daisy\n// Please see https://github.com/shorepine/amy/issues/354 for the full list\n\n\nvoid test_polyphony() {\n  // Allocate a synth with lots of voices to test polyphony.\n  // Increase the number of voices available to MIDI channel 1.\n  amy_event e = amy_default_event();\n  e.reset_osc = RESET_AMY;\n  amy_add_event(&e);\n  e = amy_default_event();\n  e.synth = 1;\n  e.patch_number = 1;\n  e.num_voices = 12;  // I get 12 simultaneous juno patch 0 voices on a 250 MHz RP2040.\n  amy_add_event(&e);\n}\n\nvoid test_sequencer() {\n  amy_event e = amy_default_event();\n  e.sequence[0] = 0;\n  e.sequence[1] = 48;\n  e.sequence[2] = 1;\n  e.velocity = 1;\n  e.midi_note = 60;\n  e.synth = 1;\n  amy_add_event(&e);\n}\n\nvoid test_audio_in() {\n  // Copy audio in to out, with echo.\n  amy_event e = amy_default_event();\n  e.osc = 170;\n  e.wave = AUDIO_IN0;\n  e.pan_coefs[COEF_CONST] = 0.0f;\n  e.velocity = 1.0f;\n  amy_add_event(&e);\n  e.osc = 171;\n  e.wave = AUDIO_IN1;\n  e.pan_coefs[COEF_CONST] = 1.0f;\n  e.velocity = 1.0f;\n  amy_add_event(&e);\n  // Add echo to show that audio in is being processed.\n  config_echo(0.5f, 150.0f, 160.0f, 0.5f, 0.0f);  // I get errors on ESP32-S3 N8R8 if I go above 160.0ms\n  // Turn off chorus, for better audio pass-through.\n  config_chorus(0, 320, 0.5f, 0.5f);\n}\n\n\n// -------------------------------------\n\n\nvoid setup() {\n#ifdef LED_BUILTIN\n  pinMode(LED_BUILTIN, OUTPUT);\n  digitalWrite(LED_BUILTIN, 1);\n#endif\n\n#ifdef HAS_SERIAL\n  Serial.begin(115200);\n  while (!Serial) {\n    delay(10);\n  }\n  Serial.println(\"AMY_Synth\");\n#endif\n\n  amy_config_t amy_config = amy_default_config();\n  amy_config.features.startup_bleep = 1;\n  // Install the default_synths on synths (MIDI chans) 1, 2, and 10 (this is the default).\n  amy_config.features.default_synths = 1;\n\n  // If running an AMYboard, we set these parameters for you automatically. \n  // For your own boards, set the pins and features you want.\n  #ifndef AMYBOARD_ARDUINO\n  // Pins for i2s board\n  // Note: On the Teensy, all these settings are ignored, and blck = 21, lrc = 20, dout = 7.\n  amy_config.audio = AMY_AUDIO_IS_I2S;\n  amy_config.features.audio_in = 1;\n  amy_config.i2s_mclk = 7;\n  amy_config.i2s_bclk = 8;\n  // On Pi Pico (RP2040, RP2350), i2s_lrc has to be i2s_bclk + 1, otherwise code will stop on an assert.\n  amy_config.i2s_lrc = 9;\n  amy_config.i2s_dout = 10;\n  amy_config.i2s_din = 11;\n  \n  // If you want MIDI over UART (5-pin or 3-pin serial MIDI)\n  amy_config.midi = AMY_MIDI_IS_UART;\n  // Pins for UART MIDI\n  // Note: On the Teensy, these are ignored and midi_out = 35, midi_in = 34.\n  amy_config.midi_out = 4;\n  amy_config.midi_in = 5;\n  #endif\n\n  amy_start(amy_config);\n\n  //test_polyphony();\n  //test_sequencer();\n  test_audio_in();\n}\n\nstatic long last_millis = 0;\nstatic const long millis_interval = 250;\n\nstatic bool led_state = 0;\n\nvoid loop() {\n  // Your loop() must contain this call to amy:\n  amy_update();\n\n  // Flash on-board LED every 250ms\n  int now_millis = millis();\n  if ((now_millis - last_millis) > millis_interval) {\n    last_millis = now_millis;\n    led_state = !led_state;\n#ifdef LED_BUILTIN\n    digitalWrite(LED_BUILTIN, led_state);  // turn the LED on (HIGH is the voltage level)\n#endif\n  }\n}\n"
  },
  {
    "path": "examples/AMY_USB_Host_MIDI/AMY_USB_Host_MIDI.ino",
    "content": "#include <AMY-Arduino.h>\n#include <USBConnection.h>  // ESP32_Host_MIDI\n\n// USB Host MIDI synth for ESP32-S3 / ESP32-S2 / ESP32-P4.\n// Plug a USB MIDI keyboard directly via USB OTG — no shields or adapters needed.\n//\n// The ESP32's USB OTG peripheral handles device enumeration, endpoint detection,\n// and hot-plug. Incoming USB-MIDI event packets are forwarded into AMY's MIDI\n// parser, which drives the default Juno-6 polyphonic synth.\n//\n// Hardware:\n//   - ESP32-S3 board (LilyGO T-Display-S3, ESP32-S3 DevKit, etc.)\n//   - I2S DAC (PCM5102, UDA1334, or similar)\n//   - USB MIDI keyboard via OTG cable\n//\n// Required library:\n//   - ESP32_Host_MIDI  https://github.com/sauloverissimo/ESP32_Host_MIDI\n//\n// Tested with:\n//   - LilyGO T-Display-S3 + PCM5102A DAC + Arturia Minilab 25\n\nextern \"C\" {\n    void convert_midi_bytes_to_messages(uint8_t *data, size_t len, uint8_t usb);\n}\n\nUSBConnection usbMidi;\n\n// Bridge: forward USB-MIDI event packets into AMY's MIDI parser.\n// USB-MIDI packets are 4 bytes: [CIN+Cable, MIDI0, MIDI1, MIDI2].\n// We pass bytes 1-3 as a group with the USB flag so AMY's parser can\n// exit early after completing the message, skipping padded bytes on\n// short messages (e.g. Program Change, Channel Pressure).\nvoid onUsbMidiData(void* ctx, const uint8_t* data, size_t length) {\n    for (size_t i = 0; i + 4 <= length; i += 4) {\n        if ((data[i] & 0x0F) == 0x00) continue;  // Skip empty packets\n        convert_midi_bytes_to_messages((uint8_t*)(data + i + 1), 3, 1);\n    }\n}\n\nvoid setup() {\n    Serial.begin(115200);\n\n    amy_config_t amy_config = amy_default_config();\n    amy_config.features.startup_bleep = 1;\n    // Install the default synths on MIDI channels 1, 2, and 10.\n    amy_config.features.default_synths = 1;\n\n    // I2S audio output — adjust pins for your board.\n    amy_config.audio = AMY_AUDIO_IS_I2S;\n    amy_config.i2s_bclk = 8;\n    amy_config.i2s_lrc = 9;\n    amy_config.i2s_dout = 10;\n\n    // We handle MIDI ourselves via USB Host, so disable AMY's built-in MIDI.\n    amy_config.midi = AMY_MIDI_IS_NONE;\n\n    amy_start(amy_config);\n\n    // Start USB Host MIDI and register the bridge callback.\n    usbMidi.setMidiCallback(onUsbMidiData, NULL);\n    usbMidi.begin();\n\n    Serial.println(\"AMY USB Host MIDI ready. Plug in a USB MIDI keyboard.\");\n}\n\nvoid loop() {\n    amy_update();\n    usbMidi.task();\n}\n"
  },
  {
    "path": "examples/AMY_custom_osc/AMY_custom_osc.ino",
    "content": "#include <AMY-Arduino.h>\n\n// Example of using the AMY \"custom oscillator\" from Arduino.\n\n// Custom osc types are defined by 7 functions:\n\nvoid my_custom_init() {\n  // Called once at synth setup.\n}\n\nvoid my_custom_deinit() {\n  // Called at synth teardown, to release resources.\n}\n\nvoid my_custom_note_on(uint16_t osc, float freq) {\n  // Called when note-on received, to set up any per-note state, with initial frequency value.\n}\n\n// Magic number AMY uses to indicate \"unset\" clocks.\n#define CLOCK_UNSET UINT32_MAX\n\nvoid my_custom_note_off(uint16_t osc) {\n  // Called when note-off received.\n  // If you want the built-in ADSR to work, the note-off has to signal that we've moved into release phase.\n  synth[osc]->note_on_clock = CLOCK_UNSET;\n  synth[osc]->note_off_clock = amy_global.total_blocks * AMY_BLOCK_SIZE;  // time (in samples) that release began.\n}\n\nvoid my_custom_mod_trigger(uint16_t osc) {\n  // Called when this osc is the mod_osc to another osc which receives a note-on.\n}\n\n// Non-anti-aliased square wave as an example custom oscillator.\nSAMPLE my_custom_render(SAMPLE *buf, uint16_t osc) {\n  // Called to render the next block of AMY_BLOCK_SIZE samples.  They should be summed into buf.  Return the peak value.\n  // We have access to the msynth[osc] parameters for this frame, and the persistent synth[osc] state.\n  // Calculate the phase advance per sample.  PHASOR is S.31 fixed point value, F2P converts a float to the PHASOR domain.\n  float freq = freq_of_logfreq(msynth[osc]->logfreq);  // Current pitch, including effects like pitch bend etc.\n  PHASOR step = F2P(freq / (float)AMY_SAMPLE_RATE);    // Phase advance per sample: cycles per sec / samples per sec -> cycles per sample\n  SAMPLE amp = F2S(msynth[osc]->amp);                  // msynth params are floats, but buffer etc are in S8.23 fixed point.\n  SAMPLE max_value = 0;\n  for (int i = 0; i < AMY_BLOCK_SIZE; ++i) {\n    SAMPLE value = MUL8_SS(amp,                        // MUL8_SS is fixed-point multiply, to apply ADSR envelope scaling in amp.\n                           (synth[osc]->phase >= F2P(0.5f)) ? F2S(0.5f) : F2S(-0.5f));  // Naive square wave.  Causes harsh alias tones.\n    buf[i] += value;                                   // Add it into the output buffer.\n    if (value < 0)  value = -value;   // i.e. calculate ABS(value)\n    if (value > max_value)  max_value = value;  // track the max\n    // Step on the phase variable.\n    synth[osc]->phase = P_WRAPPED_SUM(synth[osc]->phase, step);\n  }\n  return max_value;\n}\n\nSAMPLE my_custom_compute_mod(uint16_t osc) {\n  // Return the one value per block generated when this is mod_osc.\n  return 0;\n}\n\n// -------------------------------------\n\nvoid setup() {\n  amy_config_t amy_config = amy_default_config();\n  amy_config.features.startup_bleep = 1;\n  amy_config.features.default_synths = 0;\n\n  // If running an AMYboard, we set these parameters for you automatically. \n  // For your own boards, set the pins and features you want.\n  #ifndef AMYBOARD_ARDUINO\n  // Pins for i2s board\n  // Note: On the Teensy, all these settings are ignored, and blck = 21, lrc = 20, dout = 7.\n  amy_config.audio = AMY_AUDIO_IS_I2S;\n  amy_config.i2s_mclk = 7;\n  amy_config.i2s_bclk = 8;\n  // On Pi Pico (RP2040, RP2350), i2s_lrc has to be i2s_bclk + 1, otherwise code will stop on an assert.\n  amy_config.i2s_lrc = 9;\n  amy_config.i2s_dout = 10;\n  amy_config.i2s_din = 11;\n  // If you want MIDI over UART (5-pin or 3-pin serial MIDI)\n  amy_config.midi = AMY_MIDI_IS_UART;\n  // Pins for UART MIDI\n  // Note: On the Teensy, these are ignored and midi_out = 35, midi_in = 34.\n  amy_config.midi_out = 4;\n  amy_config.midi_in = 5;\n  #endif\n\n  amy_config.features.custom = 1;  // We are using a custom oscillator.\n\n  // Install the custom oscillator functions.\n  struct custom_oscillator custom = {\n    my_custom_init,\n    my_custom_deinit,\n    my_custom_note_on,\n    my_custom_note_off,\n    my_custom_mod_trigger,\n    my_custom_render,\n    my_custom_compute_mod,\n  };\n  amy_set_custom(&custom);\n\n  amy_start(amy_config);\n\n  // Set up a single-osc synth using the custom osc.\n  amy_event e = amy_default_event();\n  e.synth = 1;\n  e.oscs_per_voice = 1;\n  e.num_voices = 4;\n  amy_add_event(&e);\n\n  e = amy_default_event();\n  e.synth = 1;\n  e.osc = 0;\n  e.wave = CUSTOM;\n  // Setup decaying ADSR\n  e.eg0_times[0] = 10;      // attack (in ms)\n  e.eg0_times[1] = 1000;    // decay\n  e.eg0_times[2] = 1000;    // release\n  e.eg0_values[0] = 1.0f;   // (attack target level)\n  e.eg0_values[1] = 0.3f;   // sustain\n  e.eg0_values[2] = 0;      // (release target level) \n  amy_add_event(&e);\n}\n\nvoid loop() {\n  // Your loop() must contain this call to amy:\n  amy_update();\n}\n"
  },
  {
    "path": "examples/AMY_pico_PWM/AMY_pico_PWM.ino",
    "content": "#include <AMY-Arduino.h>\n\n// AMY_pico_PWM\n//\n// Runs AMY using arduino-pico's PWM audio output.\n// This version responds to serial MIDI input.\n// dpwe 2025-10-26\n\n// If you define this, we write to PWM using AMY's write_samples_fn hook\n// but leaving it undefined means we pass the sample block in our loop() fn.\n//#define USE_AMY_WRITE_SAMPLES_FN\n\nextern \"C\" {\n  extern void example_sequencer_drums_synth(uint32_t start);\n}\n\n#include <PWMAudio.h>\nPWMAudio pwm(0, true);  // PWM Stereo out on pins 0 and 1.\n\n// Have to introduce this function to work around virtual overloaded write function.\nsize_t pwm_write(const uint8_t *buffer, size_t nbytes) {\n  return pwm.write(buffer, nbytes);\n}\n\nvoid setup() {\n#ifdef LED_BUILTIN\n  pinMode(LED_BUILTIN, OUTPUT);\n  digitalWrite(LED_BUILTIN, 1);\n#endif\n\n  // Setup PWM\n  pwm.setBuffers(4, AMY_BLOCK_SIZE * AMY_NCHANS * sizeof(int16_t) / sizeof(int32_t));\n  pwm.begin(44100);\n\n  amy_config_t amy_config = amy_default_config();\n  amy_config.features.startup_bleep = 1;\n  amy_config.features.default_synths = 1;\n\n  amy_config.midi = AMY_MIDI_IS_UART;\n  // Pins for UART MIDI\n  amy_config.midi_in = 5;\n\n  #ifdef USE_AMY_WRITE_SAMPLES_FN\n  // Configure to pass samples to PWM.\n  amy_config.write_samples_fn = pwm_write;\n  #endif\n\n  amy_start(amy_config);\n\n  // Set a drum loop going, as an example.\n  example_sequencer_drums_synth(2000);\n}\n\nstatic long last_millis = 0;\nstatic const long millis_interval = 250;\nstatic bool led_state = 0;\n\nvoid loop() {\n  int16_t *block = amy_update();\n#ifndef USE_AMY_WRITE_SAMPLES_FN\n  // We have opted to handle our own sample writing.\n  pwm_write((uint8_t *)block, AMY_BLOCK_SIZE * AMY_NCHANS * sizeof(int16_t));\n#endif\n\n  // Flash on-board LED every 250ms\n  int now_millis = millis();\n  if ((now_millis - last_millis) > millis_interval) {\n    last_millis = now_millis;\n    led_state = !led_state;\n#ifdef LED_BUILTIN\n    digitalWrite(LED_BUILTIN, led_state);  // turn the LED on (HIGH is the voltage level)\n#endif\n  }\n}\n"
  },
  {
    "path": "examples/BillieJeanDrums/BillieJeanDrums.ino",
    "content": "// BillieJeanDrums - Making a simple drum pattern with AMY.\n// see https://github.com/shorepine/amy/blob/main/docs/billie_jean.md\n\n#include <AMY-Arduino.h>\n\nvoid setup() {\n  amy_config_t amy_config = amy_default_config();\n  amy_config.features.startup_bleep = 1;\n  // Install the default_synths on synths (MIDI chans) 1, 2, and 10.\n  amy_config.features.default_synths = 1;\n\n  // If running an AMYboard, we set these parameters for you automatically. \n  // For your own boards, set the pins and features you want.\n  #ifndef AMYBOARD_ARDUINO\n  amy_config.audio = AMY_AUDIO_IS_I2S;\n  // Pins for i2s board\n  amy_config.i2s_bclk = 8;\n  amy_config.i2s_lrc = 9;\n  amy_config.i2s_dout = 10;\n  #endif\n  \n  amy_start(amy_config);\n}\n\nstruct timed_note {\n  float start_time;  // In ticks\n  int note;\n  float velocity;\n};\n\n// 35 is kick, 37 is snare, 42 is closed hat, 46 is open hat\n// Notes must be sorted in start_time order.\ntimed_note notes[] = {\n  { 0.0, 42, 1.0},  //  0 HH + BD\n  { 0.0, 35, 1.0},\n  { 1.0, 42, 1.0},  //  1 HH\n  { 2.0, 42, 1.0},  //  2 HH + SN\n  { 2.0, 37, 1.0},\n  { 3.0, 42, 1.0},  //  3 HH\n  { 4.0, 42, 1.0},  //  4 HH + BD\n  { 4.0, 35, 1.0},\n  { 5.0, 42, 1.0},  //  5 HH\n  { 6.0, 42, 1.0},  //  6 HH + SN\n  { 6.0, 37, 1.0},\n  { 7.0, 46, 1.0},  //  7 OH\n};\n// Time (in ticks) at which we reset to the start of the table.\nfloat cycle_len = 8.0;\n\nfloat millis_per_tick = 250;\nfloat base_tick = 0;  // Time of beginning of current cycle.\n\nint note_tab_index = 0;\nint note_tab_len = sizeof(notes) / sizeof(timed_note);\n\nvoid loop() {\n  // Your loop() must contain this call to amy:\n  amy_update();\n\n  // Calculate \"tick time\" and choose note.\n  float tick_in_cycle = millis() / millis_per_tick - base_tick;\n  if (tick_in_cycle >= cycle_len) {\n    // Start the next cycle - reset the cycle base_tick, reset the note_tab index.\n    tick_in_cycle -= cycle_len;\n    base_tick += cycle_len;\n    note_tab_index = 0;\n  }\n\n  // Play any notes for this moment from the note table.\n  while(note_tab_index < note_tab_len \n        && tick_in_cycle >= notes[note_tab_index].start_time) {\n    // Grab the note parameters\n    int midi_note = notes[note_tab_index].note;\n    float velocity = notes[note_tab_index].velocity;\n    // Time to play the note.\n    amy_event e = amy_default_event();\n    e.synth = 10;  // drums channel\n    e.midi_note = midi_note;\n    e.velocity = velocity;\n    amy_add_event(&e);\n    note_tab_index++;\n  }\n}\n"
  },
  {
    "path": "examples/BillieJeanDrumsBass/BillieJeanDrumsBass.ino",
    "content": "// BillieJeanDrumsBass - Use different synthesizers to add a bass line along with the drums\n// see https://github.com/shorepine/amy/blob/main/docs/billie_jean.md\n\n#include <AMY-Arduino.h>\n\nvoid setup() {\n  amy_config_t amy_config = amy_default_config();\n  amy_config.features.startup_bleep = 1;\n  // Install the default_synths on synths (MIDI chans) 1, 2, and 10 (this is the default).\n  amy_config.features.default_synths = 1;\n\n  // If running an AMYboard, we set these parameters for you automatically. \n  // For your own boards, set the pins and features you want.\n  #ifndef AMYBOARD_ARDUINO\n  amy_config.audio = AMY_AUDIO_IS_I2S;\n  // Pins for i2s board\n  amy_config.i2s_bclk = 8;\n  amy_config.i2s_lrc = 9;\n  amy_config.i2s_dout = 10;\n  #endif\n  \n  amy_start(amy_config);\n\n  // Set up synth 2 as monophonic bass\n  amy_event e = amy_default_event();\n  e.synth = 2;\n  e.patch_number = 30;  // Juno A47 Funky I\n  e.num_voices = 1;\n  amy_add_event(&e);\n}\n\nstruct timed_note {\n  float start_time;  // In ticks\n  int channel;       // 10 = drums, 2 = bass\n  int note;\n  float velocity;\n};\n\n// Notes must be sorted in start_time order.\ntimed_note notes[] = {\n  { 0.0, 2, 43, 0.2},   // bass G2\n  { 0.0, 10, 42, 1.0},  //  0 HH + BD\n  { 0.0, 10, 35, 1.0},\n  { 1.0, 2, 38, 0.2},   // bass D2\n  { 1.0, 10, 42, 1.0},  //  1 HH\n  { 2.0, 2, 41, 0.2},   // bass F2\n  { 2.0, 10, 42, 1.0},  //  2 HH + SN\n  { 2.0, 10, 37, 1.0},\n  { 3.0, 2, 43, 0.2},   // bass G2\n  { 3.0, 10, 42, 1.0},  //  3 HH\n  { 4.0, 2, 41, 0.2},   // bass F2\n  { 4.0, 10, 42, 1.0},  //  4 HH + BD\n  { 4.0, 10, 35, 1.0},\n  { 5.0, 2, 38, 0.2},   // bass D2\n  { 5.0, 10, 42, 1.0},  //  5 HH\n  { 6.0, 2, 36, 0.2},   // bass C2\n  { 6.0, 10, 42, 1.0},  //  6 HH + SN\n  { 6.0, 10, 37, 1.0},\n  { 7.0, 2, 38, 0.2},   // bass D2\n  { 7.0, 10, 46, 1.0},  //  7 OH\n};\n// Time (in ticks) at which we reset to the start of the table.\nfloat cycle_len = 8.0;\n\nfloat millis_per_tick = 250;\nfloat base_tick = 0;  // Time of beginning of current cycle.\n\nint note_tab_index = 0;\nint note_tab_len = sizeof(notes) / sizeof(timed_note);\n\nvoid loop() {\n  // Let amy do its processing for this moment.\n  amy_update();\n\n  // Calculate \"tick time\" and choose note.\n  float tick_in_cycle = millis() / millis_per_tick - base_tick;\n  if (tick_in_cycle >= cycle_len) {\n    // Start the next cycle - reset the cycle base_tick, reset the note_tab index.\n    tick_in_cycle -= cycle_len;\n    base_tick += cycle_len;\n    note_tab_index = 0;\n  }\n\n  // Play any notes for this moment from the note table.\n  while(note_tab_index < note_tab_len \n        && tick_in_cycle >= notes[note_tab_index].start_time) {\n    // Time to play the note.\n    amy_event e = amy_default_event();\n    e.synth = notes[note_tab_index].channel;\n    e.midi_note = notes[note_tab_index].note;\n    e.velocity = notes[note_tab_index].velocity;\n    amy_add_event(&e);\n    note_tab_index++;\n  }\n}\n"
  },
  {
    "path": "examples/BillieJeanScheduled/BillieJeanScheduled.ino",
    "content": "// BillieJeanScheduled - playing drums, bass, and chords using the AMY scheduler for timing\n// see https://github.com/shorepine/amy/blob/main/docs/billie_jean.md\n\n// Note: On the RP2350, using arduino-pico v 5.5.1, I have trouble with this crashing when I compile -O3 (Optimize Even More).\n// It runs correctly with -O2 (Optimize More), but then it can't quite keep up during the chords at 150 MHz.\n// I ran at 176 MHz and it was fine.\n\n#include <AMY-Arduino.h>\n\nvoid setup() {\n  amy_config_t amy_config = amy_default_config();\n  amy_config.features.startup_bleep = 1;\n  // Install the default_synths on synths (MIDI chans) 1, 2, and 10 (this is the default).\n  amy_config.features.default_synths = 1;\n\n\n  // If running an AMYboard, we set these parameters for you automatically. \n  // For your own boards, set the pins and features you want.\n  #ifndef AMYBOARD_ARDUINO\n  amy_config.audio = AMY_AUDIO_IS_I2S;\n  // Pins for i2s board\n  amy_config.i2s_bclk = 8;\n  amy_config.i2s_lrc = 9;\n  amy_config.i2s_dout = 10;\n  #endif\n  \n  amy_start(amy_config);\n\n  // Reconfigure synth 1 as a 6-note polyphonic synth (for chords)\n  amy_event e = amy_default_event();\n  e.synth = 1;\n  e.patch_number = 5;  // Juno A16 Brass & Strings\n  e.num_voices = 6;\n  amy_add_event(&e);\n\n  // Reconfigure synth 2 as monophonic bass\n  e = amy_default_event();\n  e.synth = 2;\n  e.patch_number = 30;  // Juno A47 Funky I\n  e.num_voices = 1;\n  amy_add_event(&e);\n\n  // Turn on reverb\n  config_reverb(0.5f, 0.85f, 0.5f, 3000.0f);\n}\n\nstruct timed_note {\n  float start_time;  // In ticks\n  float duration;    // In ticks\n  int note;\n  float velocity;\n};\n\n// Cycle length (in ticks) for drums + bass\nfloat cycle_len = 8.0;\n\n// Drum notes have durations of 0 for no note-off\ntimed_note drum_notes[] = {\n  { 0.0, 0.0, 42, 1.0},  //  0 HH + BD\n  { 0.0, 0.0, 35, 1.0},\n  { 1.0, 0.0, 42, 1.0},  //  1 HH\n  { 2.0, 0.0, 42, 1.0},  //  2 HH + SN\n  { 2.0, 0.0, 37, 1.0},\n  { 3.0, 0.0, 42, 1.0},  //  3 HH\n  { 4.0, 0.0, 42, 1.0},  //  4 HH + BD\n  { 4.0, 0.0, 35, 1.0},\n  { 5.0, 0.0, 42, 1.0},  //  5 HH\n  { 6.0, 0.0, 42, 1.0},  //  6 HH + SN\n  { 6.0, 0.0, 37, 1.0},\n  { 7.0, 0.0, 42, 2.0},  //  7 OH\n};\n\ntimed_note bass_notes[] = {\n  { 0.0, 0.6, 43, 0.4},   // bass G2\n  { 1.0, 0.6, 38, 0.2},   // bass D2\n  { 2.0, 0.6, 41, 0.2},   // bass F2\n  { 3.0, 0.6, 43, 0.4},   // bass G2\n  { 4.0, 0.6, 41, 0.2},   // bass F2\n  { 5.0, 0.6, 38, 0.2},   // bass D2\n  { 6.0, 0.6, 36, 0.2},   // bass C2\n  { 7.0, 0.6, 38, 0.2},   // bass D2\n};\n\ntimed_note chord_notes[] = {\n  { 0.0, 0.2, 70, 1.0},  // Fmin:1\n  { 0.0, 0.2, 74, 1.0},\n  { 0.0, 0.2, 79, 1.0},\n  { 3.0, 0.2, 72, 1.0},  // Amin:1\n  { 3.0, 0.2, 76, 1.0},\n  { 3.0, 0.2, 81, 1.0},\n  { 8.0, 0.2, 74, 1.0},  // Bb:1\n  { 8.0, 0.2, 77, 1.0},\n  { 8.0, 0.2, 82, 1.0},\n  { 11.0, 0.2, 72, 1.0},  // Amin:1\n  { 11.0, 0.2, 76, 1.0},\n  { 11.0, 0.2, 81, 1.0},\n};\n\nfloat millis_per_tick = 250;\n\nvoid schedule_notes(int time, int channel, struct timed_note *notes, int num_notes) {\n  amy_event e = amy_default_event();\n  e.synth = channel;\n  for (int i = 0; i < num_notes; ++i) {\n    e.midi_note = notes[i].note;\n    e.velocity = notes[i].velocity;\n    e.time = time + millis_per_tick * notes[i].start_time;\n    amy_add_event(&e);\n    // Add note-off too if duration > 0\n    if (notes[i].duration > 0) {\n      e.time += millis_per_tick * notes[i].duration;\n      e.velocity = 0;\n      amy_add_event(&e);\n    }\n  }\n}\n\nint start_millis = 3000;\nint last_cycle = -1;\n\nvoid loop() {\n  // Let amy do its processing for this moment.\n  amy_update();\n\n  int now = millis();\n  int current_cycle = floor((now - start_millis) / (millis_per_tick * cycle_len));\n  if (current_cycle > last_cycle) {\n    // A new cycle began, issue notes.\n    // Drums\n    schedule_notes(now, 10, drum_notes, sizeof(drum_notes) / sizeof(timed_note));\n    // Bass comes in after two cycles of drums\n    if (current_cycle >= 2)\n      schedule_notes(now, 2, bass_notes, sizeof(bass_notes) / sizeof(timed_note));\n    // Chord sequence is 2 cycles long, so only schedule every other cycle\n    if ((current_cycle >= 4) && ((current_cycle % 2) == 0))\n      schedule_notes(now, 1, chord_notes, sizeof(chord_notes) / sizeof(timed_note));\n    last_cycle = current_cycle;\n  }\n}\n"
  },
  {
    "path": "experiments/Piano.ff.D5.json",
    "content": "[[588.7303322461809, [[0, 0.0003183759280936712], [4, 0.05942463446834628], [4, 0.019017213920200938], [3, 0.07456424206062932], [4, 0.03211996948806711], [9, 0.09079206854603922], [10, 0.06417436882155676], [161, 0.04113575922530802], [305, 0.004179459444875219], [158, 0.00813364918970332], [196, 0.010624284144828064], [1118, 0.004947346497968808], [2694, 1e-05]]], [1178.3660903474083, [[0, 0.0002793690336819829], [2, 0.0021976588087683044], [5, 0.005838245531670097], [7, 0.003065981320912732], [2, 0.00024344445740237883], [1, 0.002553211144184102], [7, 0.007484968029050363], [333, 0.0012346672590791037], [858, 0.0018231277860990783], [229, 0.0001726784568776625], [144, 0.0006840286807119472], [386, 0.0001576030029091112], [1198, 1e-05]]], [1772.5545853634997, [[0, 0.00048131423642205136], [33, 0.00719299878102724], [75, 0.0001768071748645232], [12, 0.0008472834811783129], [118, 0.0029321302653307407], [121, 0.000189720888525554], [179, 0.0011122816882865238], [525, 0.00016483392244049223], [221, 0.0005263771715679324], [244, 4.1910230460678194e-05], [121, 0.00016824764395001002], [323, 9.051689571458068e-05], [957, 1e-05]]], [2374.9205859564886, [[0, 0.00040854494571732384], [21, 0.006788666604897345], [99, 0.002483659427166644], [53, 0.0004967051266348974], [75, 0.0011397418191588153], [54, 0.0005923056877930803], [49, 9.857045371694208e-05], [31, 0.00026888745271609366], [181, 0.0012074388136955837], [722, 5.063709278087347e-05], [373, 0.00011917943846409484], [314, 3.2917415177071816e-05], [517, 1e-05]]], [2981.9370771573363, [[0, 0.0005073219585854762], [6, 0.002143384810784923], [32, 0.004024571933991137], [285, 0.0002351915777234433], [124, 0.0013579525605566338], [301, 0.0006150344957094475], [68, 0.0002997373777975395], [50, 4.930451625695493e-05], [36, 0.0001914252284511738], [71, 0.0002832602455506109], [553, 2.6257331771361438e-05], [445, 4.718178010426903e-05], [674, 1e-05]]], [3593.434998085348, [[0, 6.997375523406293e-05], [30, 0.0003672613580250497], [59, 1e-05], [39, 0.0003087963384543869], [181, 7.321982209073097e-05], [145, 0.00017581312716484374], [94, 1e-05], [162, 5.273516649158518e-05], [30, 1e-05], [11, 4.2974849614082415e-05], [157, 1e-05]]], [4229.607048253364, [[0, 0.0012263153968680729], [351, 0.0005170348720433382], [78, 5.174146939791391e-05], [77, 0.00024400934372791023], [92, 3.6703629239340094e-05], [84, 0.00016773114275570467], [99, 3.940314967314563e-05], [287, 5.459729769062907e-05], [76, 1e-05], [220, 2.1806213411630582e-05], [71, 1e-05]]], [4866.529189545834, [[0, 0.00021436530674617154], [23, 0.0010886411168758124], [85, 0.0002189088689404475], [118, 0.0001570173342542884], [76, 1e-05], [38, 7.107607809852509e-05], [45, 0.00013357431542398312], [110, 4.2910776895418664e-05], [28, 1e-05], [58, 5.8987997112753885e-05], [152, 1.1173268184890341e-05], [1238, 1e-05]]], [5521.392895279753, [[0, 0.00016013734765617617], [8, 0.0004975265563792979], [10, 0.0006833277001297742], [37, 0.000264896745823349], [30, 8.671142225330706e-05], [270, 5.3786227338839034e-05], [18, 4.4295173867557845e-05], [21, 2.8534818068031998e-05], [14, 1.8271708646431397e-05], [12, 1e-05], [154, 1.2683788967847035e-05], [1397, 1e-05]]], [5993.211913877236, [[0, 4.133042658491698e-05], [22, 0.000193056979805458], [37, 1.3061329025907025e-05], [11, 7.91814895674594e-05], [29, 5.918314721471629e-05], [22, 0.0001157584923641241], [63, 6.695683184348423e-05], [16, 2.112169219787103e-05], [61, 5.137627711591517e-05], [41, 3.6974442496701866e-05], [48, 1e-05]]], [6209.506870265294, [[0, 9.291958727938869e-05], [15, 0.00021930507318906244], [39, 0.00011997407362446589], [21, 4.68708932347928e-05], [12, 1e-05], [27, 5.432638261152426e-05], [47, 8.72899821763702e-05], [62, 4.486696724761924e-05], [38, 1e-05], [79, 3.183736288763783e-05], [75, 1e-05]]], [6356.065185423214, [[0, 3.633852255495574e-05], [3, 3.975174300391418e-05], [2, 4.00886745226706e-05], [2, 3.778143907310652e-05], [2, 3.250107154949022e-05], [2, 2.7109423821887278e-05], [2, 2.1586212295343048e-05], [1, 1.8558128906342846e-05], [1, 1.5311792902188635e-05], [1, 1.2385712465424301e-05], [1, 1e-05]]], [6585.520493856969, [[0, 6.006105628595023e-05], [13, 0.00015760846518620355], [22, 0.00014423569295345435], [35, 5.331838169411088e-05], [19, 2.3889638460245353e-05], [25, 2.1337415630729035e-05], [31, 1e-05], [76, 3.8735759375888676e-05], [41, 2.8711399878871067e-05], [18, 1.916455403225273e-05], [15, 1e-05]]], [6888.576520028839, [[0, 0.00014039127451693454], [9, 0.00026923683913780087], [10, 0.0002758092931966771], [65, 3.4847972849235036e-05], [17, 1e-05], [38, 2.4417491911958504e-05], [38, 1e-05], [41, 2.890364448556149e-05], [54, 2.36684534907883e-05], [29, 1.573937352538402e-05], [18, 1e-05]]], [7827.142713846636, [[0, 0.00018695983279202859], [19, 0.000564160868984498], [28, 9.848553725709827e-05], [67, 0.00020968061803984522], [38, 8.576199191922773e-05], [60, 7.275483784498407e-05], [25, 3.8760196404909184e-05], [13, 1e-05], [22, 3.2295206688859795e-05], [33, 5.311960528626866e-05], [118, 1e-05]]], [8346.235419443556, [[0, 3.637160692920743e-05], [7, 5.283516088294488e-05], [24, 9.012950737578221e-05], [37, 5.2341215769926475e-05], [26, 5.369463010614086e-05], [19, 3.089664506374774e-05], [7, 1.875273725708021e-05], [5, 1e-05], [30, 1.7500754349057955e-05], [21, 1.368989908148391e-05], [8, 1e-05]]], [9094.51290753102, [[0, 7.60475041842041e-05], [11, 0.00016062186634294598], [12, 0.00019748916730596592], [16, 0.00013819533230118768], [27, 4.1180945396886185e-05], [49, 1.5380679972247693e-05], [98, 5.00075625196403e-05], [36, 2.4052771358767458e-05], [30, 3.57790440481162e-05], [17, 3.5759016848020335e-05], [111, 1e-05]]], [9844.880761675198, [[0, 2.499352791863241e-05], [5, 3.4248224453214005e-05], [5, 4.2341181196015786e-05], [5, 4.724566071182584e-05], [6, 4.775496768114255e-05], [16, 3.893789261059817e-05], [26, 3.617181353457996e-05], [19, 2.497797531884996e-05], [26, 1.108322208842994e-05], [27, 1.43151888036016e-05], [16, 1e-05]]]]\n"
  },
  {
    "path": "experiments/compare_test_wavs.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"ad51c589-8c0c-4677-b145-ad5ab4710e70\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"Requirement already satisfied: numpy in /opt/homebrew/lib/python3.12/site-packages (1.26.4)\\n\",\n      \"Collecting scipy\\n\",\n      \"  Downloading scipy-1.13.1-cp312-cp312-macosx_12_0_arm64.whl.metadata (60 kB)\\n\",\n      \"\\u001b[2K     \\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\\u001b[0m \\u001b[32m60.6/60.6 kB\\u001b[0m \\u001b[31m234.8 kB/s\\u001b[0m eta \\u001b[36m0:00:00\\u001b[0ma \\u001b[36m0:00:01\\u001b[0m\\n\",\n      \"\\u001b[?25hRequirement already satisfied: numpy<2.3,>=1.22.4 in /opt/homebrew/lib/python3.12/site-packages (from scipy) (1.26.4)\\n\",\n      \"Downloading scipy-1.13.1-cp312-cp312-macosx_12_0_arm64.whl (30.4 MB)\\n\",\n      \"\\u001b[2K   \\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\\u001b[0m \\u001b[32m30.4/30.4 MB\\u001b[0m \\u001b[31m13.1 MB/s\\u001b[0m eta \\u001b[36m0:00:00\\u001b[0m00:01\\u001b[0m00:01\\u001b[0m\\n\",\n      \"\\u001b[?25hInstalling collected packages: scipy\\n\",\n      \"Successfully installed scipy-1.13.1\\n\",\n      \"Collecting matplotlib\\n\",\n      \"  Downloading matplotlib-3.9.0-cp312-cp312-macosx_11_0_arm64.whl.metadata (11 kB)\\n\",\n      \"Collecting contourpy>=1.0.1 (from matplotlib)\\n\",\n      \"  Downloading contourpy-1.2.1-cp312-cp312-macosx_11_0_arm64.whl.metadata (5.8 kB)\\n\",\n      \"Collecting cycler>=0.10 (from matplotlib)\\n\",\n      \"  Using cached cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)\\n\",\n      \"Collecting fonttools>=4.22.0 (from matplotlib)\\n\",\n      \"  Downloading fonttools-4.53.0-cp312-cp312-macosx_11_0_arm64.whl.metadata (162 kB)\\n\",\n      \"\\u001b[2K     \\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\\u001b[0m \\u001b[32m162.2/162.2 kB\\u001b[0m \\u001b[31m5.5 MB/s\\u001b[0m eta \\u001b[36m0:00:00\\u001b[0m\\n\",\n      \"\\u001b[?25hCollecting kiwisolver>=1.3.1 (from matplotlib)\\n\",\n      \"  Using cached kiwisolver-1.4.5-cp312-cp312-macosx_11_0_arm64.whl.metadata (6.4 kB)\\n\",\n      \"Requirement already satisfied: numpy>=1.23 in /opt/homebrew/lib/python3.12/site-packages (from matplotlib) (1.26.4)\\n\",\n      \"Requirement already satisfied: packaging>=20.0 in /opt/homebrew/Cellar/jupyterlab/4.1.6_1/libexec/lib/python3.12/site-packages (from matplotlib) (24.0)\\n\",\n      \"Collecting pillow>=8 (from matplotlib)\\n\",\n      \"  Downloading pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl.metadata (9.2 kB)\\n\",\n      \"Collecting pyparsing>=2.3.1 (from matplotlib)\\n\",\n      \"  Downloading pyparsing-3.1.2-py3-none-any.whl.metadata (5.1 kB)\\n\",\n      \"Requirement already satisfied: python-dateutil>=2.7 in /opt/homebrew/Cellar/jupyterlab/4.1.6_1/libexec/lib/python3.12/site-packages (from matplotlib) (2.9.0.post0)\\n\",\n      \"Requirement already satisfied: six>=1.5 in /opt/homebrew/Cellar/jupyterlab/4.1.6_1/libexec/lib/python3.12/site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)\\n\",\n      \"Downloading matplotlib-3.9.0-cp312-cp312-macosx_11_0_arm64.whl (7.8 MB)\\n\",\n      \"\\u001b[2K   \\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\\u001b[0m \\u001b[32m7.8/7.8 MB\\u001b[0m \\u001b[31m14.1 MB/s\\u001b[0m eta \\u001b[36m0:00:00\\u001b[0m00:01\\u001b[0m00:01\\u001b[0m\\n\",\n      \"\\u001b[?25hDownloading contourpy-1.2.1-cp312-cp312-macosx_11_0_arm64.whl (245 kB)\\n\",\n      \"\\u001b[2K   \\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\\u001b[0m \\u001b[32m245.3/245.3 kB\\u001b[0m \\u001b[31m7.6 MB/s\\u001b[0m eta \\u001b[36m0:00:00\\u001b[0m\\n\",\n      \"\\u001b[?25hUsing cached cycler-0.12.1-py3-none-any.whl (8.3 kB)\\n\",\n      \"Downloading fonttools-4.53.0-cp312-cp312-macosx_11_0_arm64.whl (2.2 MB)\\n\",\n      \"\\u001b[2K   \\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\\u001b[0m \\u001b[32m2.2/2.2 MB\\u001b[0m \\u001b[31m13.3 MB/s\\u001b[0m eta \\u001b[36m0:00:00\\u001b[0m00:01\\u001b[0m00:01\\u001b[0m\\n\",\n      \"\\u001b[?25hUsing cached kiwisolver-1.4.5-cp312-cp312-macosx_11_0_arm64.whl (64 kB)\\n\",\n      \"Downloading pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl (3.4 MB)\\n\",\n      \"\\u001b[2K   \\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\\u001b[0m \\u001b[32m3.4/3.4 MB\\u001b[0m \\u001b[31m13.9 MB/s\\u001b[0m eta \\u001b[36m0:00:00\\u001b[0m00:01\\u001b[0m00:01\\u001b[0m\\n\",\n      \"\\u001b[?25hDownloading pyparsing-3.1.2-py3-none-any.whl (103 kB)\\n\",\n      \"\\u001b[2K   \\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\\u001b[0m \\u001b[32m103.2/103.2 kB\\u001b[0m \\u001b[31m4.9 MB/s\\u001b[0m eta \\u001b[36m0:00:00\\u001b[0m\\n\",\n      \"\\u001b[?25hInstalling collected packages: pyparsing, pillow, kiwisolver, fonttools, cycler, contourpy, matplotlib\\n\",\n      \"Successfully installed contourpy-1.2.1 cycler-0.12.1 fonttools-4.53.0 kiwisolver-1.4.5 matplotlib-3.9.0 pillow-10.3.0 pyparsing-3.1.2\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"import sys\\n\",\n    \"!{sys.executable} -m pip install numpy\\n\",\n    \"!{sys.executable} -m pip install scipy\\n\",\n    \"!{sys.executable} -m pip install matplotlib\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"id\": \"3d02afe8-a522-4b2b-875a-2e3004634c30\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import scipy.io.wavfile as wav\\n\",\n    \"import numpy as np\\n\",\n    \"import matplotlib.pyplot as plt\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"6b85a0d1-6f28-4b0e-b02d-8c61aa55ae7e\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Writes a WAV file of rendered data\\n\",\n    \"def wavwrite(filename, samples, sample_rate):\\n\",\n    \"    wav.write(filename, int(sample_rate), (32768.0 * samples).astype(np.int16))\\n\",\n    \"\\n\",\n    \"def wavread(filename):\\n\",\n    \"    sample_rate, samples = wav.read(filename)\\n\",\n    \"    return samples.astype(np.float32) / 32768.0, sample_rate\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 36,\n   \"id\": \"d9f238c9-e5b6-4445-89df-768bb2dc23d8\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#test_name = 'TestSineOsc'\\n\",\n    \"#test_name = 'TestFilter'\\n\",\n    \"#test_name = 'TestFilter24'\\n\",\n    \"#test_name = 'TestFilterLFO'\\n\",\n    \"#test_name = 'TestChorus'\\n\",\n    \"#test_name = 'TestPulseOsc'\\n\",\n    \"#test_name = 'TestPcm'\\n\",\n    \"#test_name = 'TestSineEnv'\\n\",\n    \"#test_name = 'TestAlgo'\\n\",\n    \"#test_name = 'TestLFO'\\n\",\n    \"#test_name = 'TestPartial'\\n\",\n    \"#test_name = 'TestDuty'\\n\",\n    \"#test_name = 'TestBrass'\\n\",\n    \"#test_name = 'TestSawUpOsc'\\n\",\n    \"#test_name = 'TestGuitar'\\n\",\n    \"#test_name = 'TestPcmShift'\\n\",\n    \"#test_name = 'TestPcm'\\n\",\n    \"#test_name = 'TestOverload'\\n\",\n    \"#test_name = 'TestJunoPatch'\\n\",\n    \"#test_name = 'TestJunoClip'\\n\",\n    \"#test_name = 'TestLowVcf'\\n\",\n    \"#test_name = 'TestGlobalEQ'\\n\",\n    \"#test_name = 'TestFlutesEq'\\n\",\n    \"#test_name = 'TestChainedOsc'\\n\",\n    \"#test_name = 'TestPartial'\\n\",\n    \"#test_name = 'TestPartialNoteOff'\\n\",\n    \"test_name = 'TestInterpPartialsRetrigger'\\n\",\n    \"#d_ref, sr = wavread('tests/flt_ref/' + test_name + '.wav')\\n\",\n    \"d_ref, sr = wavread('../tests/ref/' + test_name + '.wav')\\n\",\n    \"d_tst, sr = wavread('../tests/tst/' + test_name + '.wav')\\n\",\n    \"# Scale waveforms up to int16 units.\\n\",\n    \"d_ref *= 32768\\n\",\n    \"d_tst *= 32768\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 37,\n   \"id\": \"ba360672-c480-461b-9c94-30f916f15df8\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"(44032, 2)\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"print(d_ref.shape)\\n\",\n    \"tt = np.arange(d_ref.shape[0]) / sr\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 38,\n   \"id\": \"222aca09-2c6b-4344-80fd-0f87531aede2\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<matplotlib.legend.Legend at 0x11e0f29c0>\"\n      ]\n     },\n     \"execution_count\": 38,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    },\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAA+4AAAFfCAYAAADQ7ZZHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAADA2UlEQVR4nOydd3wUZf7HP7ObRoCEkpAQCBBqgAA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409HRYYwxpry83FRVVQXXf/LJJyYpKcls3brVtLS0GL/fb5KTk83Ro0fteghAxHNcXV1t3G632bVrl/nmm2+CX4FAwK6HgDgX6QxfiavKwwkineMvv/zSpKammnXr1pnW1lbz7rvvmoyMDPPkk0/a9RAQ5yKdYb/fb1JTU83rr79u2trazHvvvWdyc3PN0qVL7XoIgAkEAqapqck0NTUZSWbbtm2mqanJnD592hhjTFVVlSkvLw+ub2trM2PHjjWPPPKIaWlpMTU1NSYxMdHs3bvXrodwzeKquBtjzHPPPWcmT55s3G63mTNnjjl06FDwtgULFpiKiooB69944w2Tl5dn3G63mTlzptmzZ4/FiYGrRTLHU6ZMMZKu+vL7/dYHB/4v0ufi/ijucIpI5/jgwYOmsLDQeDwek5OTY5566inT09NjcWrgZ5HMcHd3t9m0aZPJzc01KSkpxufzmbVr15oLFy5YHxz4vwMHDoT8P/fy7FZUVJgFCxZcdZ9bbrnFuN1uk5OTY1555RXLc0cjwRjObQEAAAAAwKni5j3uAAAAAACMRBR3AAAAAAAcjOIOAAAAAICDUdwBAAAAAHAwijsAAAAAAA5GcQcAAAAAwMEo7gAAAAAAOBjFHQAAAAAAB6O4AwAAAADgYBR3AAAAAAAcjOIOAAAAAICD/Q/hhwn3U5+AkwAAAABJRU5ErkJggg==\",\n      \"text/plain\": [\n       \"<Figure size 1200x400 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"ii =  np.arange(2000, 44000)\\n\",\n    \"#ii = np.arange(int(0.2 * sr), int(0.25 * sr))\\n\",\n    \"#ii =  np.arange(38000, 42000)\\n\",\n    \"#ii =  np.arange(24000, 28000)\\n\",\n    \"plt.figure(figsize=(12,4))\\n\",\n    \"plt.plot(tt[ii], d_ref[ii, 0], tt[ii], d_tst[ii, 0])\\n\",\n    \"plt.legend(['ref', 'tst'])\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 39,\n   \"id\": \"ba7b1c1b-8b72-4363-af5a-1af66c4e8063\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"[<matplotlib.lines.Line2D at 0x11e516ba0>]\"\n      ]\n     },\n     \"execution_count\": 39,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    },\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAA+kAAAFfCAYAAAAyMY0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAhRklEQVR4nO3df3TV5X3A8U8CJHGtCeVXYvRSq7WFKpUzkBjaHlbJmlVOW07xSJlD6uhYV3RqrBX8lf7GtXW1TpSj65nzWAbDVU9LOTiKWruR+iNgJwqsnVUoNEFmSSiUEMh3f3i4XWr4EcpNHvD1OuceD9/7PNzn0edwfPO9ubcoy7IsAAAAgH5X3N8LAAAAAF4n0gEAACARIh0AAAASIdIBAAAgESIdAAAAEiHSAQAAIBEiHQAAABIxsL8X0B+6urpi27Ztceqpp0ZRUVF/LwcAAICTXJZlsWvXrqiuro7i4kPfL39TRvq2bdsil8v19zIAAAB4k9myZUucccYZh3z+TRnpp556akS8/i+nvLy8n1cDAADAya69vT1yuVy+Rw/lTRnpB9/iXl5eLtIBAADoM0f6kWsfHAcAAACJEOkAAACQCJEOAAAAiRDpAAAAkAiRDgAAAIkQ6QAAAJAIkQ4AAACJEOkAAACQCJEOAAAAiRDpAAAAkAiRDgAAAIkQ6QAAAJAIkQ4AAACJEOkAAACQCJEOAAAAiRDpAAAAkAiRDgAAAIkQ6QAAAJAIkQ4AAACJEOkAAACQCJEOAAAAiRDpAAAAkAiRDgAAAIkQ6QAAAJAIkQ4AAACJEOkAAACQCJEOAAAAiRDpAAAAkAiRDgAAAIkQ6QAAAJAIkQ4AAACJEOkAAACQCJEOA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1dcXq1aujtra2xzm1tbXdxkdErFq1qtv4g4H+s5/9LH74wx/G0KFDC7MBAAAA6EMFf7t7Q0NDzJo1K8aPHx8TJkyIO+64I3bv3h1XXHFFRERcfvnlcfrpp8eCBQsiIuLqq6+OSZMmxe233x5TpkyJJUuWxLPPPhv33ntvRLwe6JdcckmsXbs2li9fHgcOHMj/vPqQIUOipKSk0FsCAACAgih4pE+fPj1effXVuPXWW6OlpSXGjh0bK1euzH843ObNm6O4+Hc39CdOnBiLFy+Om2++OW688cY455xz4pFHHonzzjsvIiK2bt0a3/ve9yIiYuzYsd1e6/HHH48/+ZM/KfSWAAAAoCAK/j3pKTra76cDAACA4yGJ70kHAAAAjp5IBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEhEn0T6woUL48wzz4yysrKoqamJp59++rDjly1bFqNGjYqysrIYM2ZMrFixotvzWZbFrbfeGqeddlqccsopUVdXFz/72c8KuQUAAAAouIJH+tKlS6OhoSEaGxtj7dq1cf7550d9fX1s3769x/Fr1qyJGTNmxOzZs2PdunUxderUmDp1aqxfvz4/5mtf+1rceeedsWjRonjqqafiLW95S9TX18fevXsLvR0AAAAomKIsy7JCvkBNTU1ccMEFcdddd0VERFdXV+Ryubjqqqti3rx5bxg/ffr02L17dyxfvjx/7cILL4yxY8fGokWLIsuyqK6ujuuuuy4++9nPRkREW1tbVFZWxv333x+f+MQn3vB7dnR0REdHR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3bo1Jk+eHA888EBMmDAhIiL+5m/+JlasWBH3339/lJeXx1VXXRURr//secTrb3G/6KKLor6+Pr7+9a/nX2vAgAFH9ZcHBx3tp+oBAADA8XC0HdqrO+m98Z3vfCeuvPLKmDx5chQXF8e0adPizjvvzD/f2dkZmzZtij179uSvffOb38yP7ejoiPr6+rj77rvzzz/00EPx6quvxoMPPhgPPvhg/vrb3/72ePnllwu1FQAAAOgTBbuTnjJ30gEAAOhL/fo96QAAAEDviXQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARIh0AAAASIRIBwAAgESIdAAAAEiESAcAAIBEiHQAAABIhEgHAACARBQs0l977bW47LLLory8PAYPHhyzZ8+O3/zmN4eds3fv3pg7d24MHTo03vrWt8a0adOitbW1x7H/+7//G2eccUYUFRXFzp07C7ADAAAA6FsFi/TLLrssXnjhhVi1alUsX748nnzyyZgzZ85h51x77bXx/e9/P5YtWxY/+tGPYtu2bfHxj3+8x7GzZ8+O9773vYVYOgAAAPSLoizLsuP9m27YsCHe8573xDPPPBPjx4+PiIiVK1fGxRdfHL/85S+jurr6DXPa2tpi+PDhsXjx4rjkkksiImLjxo0xevToaGpqigsvvDA/9p577omlS5fGrbfeGpMnT45f//rXMXjw4EOup6OjIzo6OvK/bm9vj1wuF21tbVFeXn6cdg0AAAA9a29vj4qKiiN2aEHupDc1NcXgwYPzgR4RUVdXF8XFxfHUU0/1OKe5uTk6Ozujrq4uf23UqFExcuTIaGpqyl978cUX44tf/GI88MADUVx8dM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jl8s5x5ywnGFOBs4xJzpnmJNB6uc4y7LYtWtXVFdXR3HxoX/y/E15J724uDjOOOOM/NsNysvLk/yPCL3hHHOic4Y5GTjHnOicYU4GKZ/jw91BP8gHxwEAAEAiRDoAAAAk4k0d6aWlpdHY2BilpaX9vRQ4Zs4xJzpnmJOBc8yJzhnmZHCynOM35QfHAQAAQIre1HfSAQAAICUiHQAAABIh0gEAACARIh0AAAASIdIBAAAgESd9pC9cuDDOPPPMKCsri5qamnj66acPO37ZsmUxatSoKCsrizFjxsSKFSv6aKXQs96c4fvuuy8+8IEPxNve9rZ429veFnV1dUc889AXevtn8UFLliyJoqKimDp1amEXCEeht+d4586dMXfu3DjttNOitLQ03vWud/n/CvpVb8/wHXfcEe9+97vjlFNOiVwuF9dee23s3bu3j1YL3T355JPxkY98JKqrq6OoqCgeeeSRI8554okn4o//+I+jtLQ03vnOd8b9999f8HUeDyd1pC9dujQaGhqisbEx1q5dG+eff37U19fH9u3bexy/Zs2amDFjRsyePTvWrVsXU6dOjalTp8b69ev7eOXwut6e4SeeeCJmzJgRjz/+eDQ1NUUul4sPfehDsXXr1j5eOfxOb8/xQS+//HJ89rOfjQ984AN9tFI4tN6e43379sWf/umfxssvvxwPPfRQbNq0Ke677744/fTT+3jl8LrenuHFixfHvHnzorGxMTZs2BDf/va3Y+nSpXHjjTf28crhdbt3747zzz8/Fi5ceFTjf/GLX8SUKVPigx/8YDz33HNxzTXXxKc+9al49NFHC7zS4yA7iU2YMCGbO3du/tcHDhzIqqurswULFvQ4/tJLL82mTJnS7VpNTU3213/91wVdJxxKb8/w79u/f3926qmnZv/8z/9cqCXCER3LOd6/f382ceLE7B//8R+zWbNmZR/72Mf6YKVwaL09x/fcc0921llnZfv27eurJcJh9fYMz507N7vooou6XWtoaMje9773FXSdcDQiInv44YcPO+Zzn/tcdu6553a7Nn369Ky+vr6AKzs+Tto76fv27Yvm5uaoq6vLXysuLo66urpoamrqcU5TU1O38RER9fX1hxwPhXQsZ/j37dmzJz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pt8ujsp6O053rx5c3bqqadmV155ZbZp06Zs+fLl2YgRI7Ivf/nL/bUF3uR6e4YbGxuzU089NfuXf/mX7KWXXsr+/d//PTv77LOzSy+9tL+2wJvcrl27snXr1mXr1q3LIiL7+7//+2zdunXZK6+8kmVZls2bNy+bOXNmfvxLL72U/dEf/VF2/fXXZxs2bMgWLlyYDRgwIFu5cmV/beGondSRnmVZ9g//8A/ZyJEjs5KSkmzChAnZT37yk/xzkyZNymbNmtVt/L/+679m73rXu7KSkpLs3HPPzX7wgx/08Yqhu96c4be//e1ZRLzh0djY2PcLh/+nt38W/38inVT09hyvWbMmq6mpyUpLS7Ozzjor+8pXvpLt37+/j1cNv9ObM9zZ2Zl9/vOfz84+++ysrKwsy+Vy2Wc+85ns17/+dd8vHLIse/zxx3v8/9yD53bWrFnZpEmT3jBn7NixWUlJSXbWWWdl//RP/9Tn6z4WRVnm/SoAAACQgpP2Z9IBAADgRCPSAQAAIBEiHQAAABIh0gEAACARIh0AAAASIdIBAAAgESIdAAAAEiHSAQAAIBEiHQAAABIh0gEAACARIh0AAAAS8X8hNNLlq5IQWgAAAABJRU5ErkJggg==\",\n      \"text/plain\": [\n       \"<Figure size 1200x400 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"plt.figure(figsize=(12,4))\\n\",\n    \"plt.plot(tt[ii], d_tst[ii, 0] - d_ref[ii, 0])\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"41731f4b-502b-4f04-914b-afe4d349cf72\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 39,\n   \"id\": \"275986c0-ec7f-46eb-bcd2-3f220a14ed65\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"0\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<matplotlib.legend.Legend at 0x1486dd370>\"\n      ]\n     },\n     \"execution_count\": 39,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    },\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAjwAAAGdCAYAAAAWp6lMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy80BEi2AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAlaUlEQVR4nO3de3BUZYL38V+nk064pbOQkCbSXLRQwkWjQUJ4VRhJGRzfMRmwBimG22ahxgJGjYMSVCiZS3TUFVA04g6ihWwYRgcdZOMygVVmyAAGcQUkIhsEwe7AYtJck5g+7x8W7duSxARycnny/VR1zXD6Od3Pk1PSX06f7jgsy7IEAABgsIi2ngAAAIDdCB4AAGA8ggcAABiP4AEAAMYjeAAAgPEIHgAAYDyCBwAAGI/gAQAAxots6wm0hWAwqOPHj6tHjx5yOBxtPR0AANAElmXp9OnTSkpKUkRE887ZdMrgOX78uLxeb1tPAwAAXIajR4+qb9++zdqnUwZPjx49JH37A4uNjW3j2QAAgKYIBALyer2h1/Hm6JTBc/FtrNjYWIIHAIAO5nIuR+GiZQAAYDyCBwAAGI/gAQAAxuuU1/AAANCeWJalb775RnV1dW09lTbldDoVGRlpy1fGEDwAALShmpoaffXVVzp37lxbT6Vd6Nq1q/r06SOXy9Wij0vwAADQRoLBoMrLy+V0OpWUlCSXy9VpvxDXsizV1NToxIkTKi8v16BBg5r95YKNIXgAAGgjNTU1CgaD8nq96tq1a1tPp8116dJFUVFR+uKLL1RTU6OYmJgWe2wuWgYAoI215JmMjs6unwU/YQAAYDyCBwAAGI/gAQAArcKyLM2ePVs9e/aUw+HQnj17Wu25uWgZAAC0iqKiIq1evVr/9V//pauvvlrx8fGt9twEDwAAuGI1NTU/+N05hw4dUp8+fTR69OhWmtV3CB4AANoRy7J0vrb1v3G5S5SzWd8BNHbsWA0bNkyRkZFas2aNhg8frueff17z58/Xtm3b1K1bN91xxx167rnnFB8frxkzZui1116T9O1vO+/fv78OHz5s02ouRfAAANCOnK+t05BF77X68+5fkqmuruZlwWuvvab77rtPf//731VZWanbb79d//Iv/6LnnntO58+f1yOPPKKf/exn2rJli5YtW6ZrrrlGK1eu1K5du+R0Om1aSf0IHgAAcFkGDRqk3//+95Kk3/zmN7rxxhv1u9/9LnT/qlWr5PV69dlnn+naa69Vjx495HQ65fF4Wn2uBA8AAO1Ilyin9i/JbJPnba7U1NTQ///444+1detWde/e/ZJxhw4d0rXXXntF87tSBA8AAO2Iw+Fo9ltLbaVbt26h/3/mzBn95Cc/0VNPPXXJuD59+rTmtOrVMX6iAACgXbvpppv05ptvasCAAYqMbH95wRcPAgCAKzZnzhydOnVKkydP1q5du3To0CG99957mjlzpurqWv9TZ99H8AAAgCuWlJSkv//976qrq9Mdd9yh4cOH64EHHlBcXFy7+OWoDsuyrLaeRGsLBAJyu92qqqpSbGxsW08HANBJXbhwQeXl5Ro4cKBiYmLaejrtQmM/kyt5/W775AIAALAZwQMAAIxH8AAAAOMRPAAAwHgEDwAAMB7BAwAAjEfwAAAA4xE8AADAeAQPAAAwHsEDAACabezYsXrggQeaNPbw4cNyOBzas2ePrXNqDMEDAACMR/AAAIBmmTFjht5//30tW7ZMDodDDodDH330kaZMmaKEhAR16dJFgwYN0quvvipJGjhwoCTpxhtvlMPh0NixY1t9zpGt/owAAKBhliXVnmv9543qKjkcTRq6bNkyffbZZxo2bJiWLFkiSXriiSe0f/9+/cd//Ifi4+P1+eef6/z585KknTt3auTIkfrrX/+qoUOHyuVy2baMhhA8AAC0J7XnpN8ltf7zLjwuubo1aajb7ZbL5VLXrl3l8XgkSceOHdONN96oESNGSJIGDBgQGp+QkCBJ6tWrV2h8a+MtLQAAcMXuu+8+FRYWKiUlRQ8//LC2b9/e1lMKwxkeAADak6iu355taYvnvQJ33nmnv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cXFxaFtwWBQxcXFYUV+0eDBg/XJJ59oz549odvdd9+tH/3oR9qzZ4+8Xq9cLpduvvlmlZWVhe372WefqX///ravqaOy41j8//7whz8oNTVVN9xwg+1r6ejsOBa1tbWqra1VRET4X8lOpzP0Yoz62f3fhtvtVkJCgg4ePKgPP/xQWVlZtq+po2rusahPXV2dPvnkk1DcDBw4UB6PJ+wxA4GAduzY0eTHDGnWJc7odAoLC63o6Ghr9erV1v79+63Zs2dbcXFxoY8NTp061VqwYEGD+9f3aZS33nrLioqKslauXGkdPHjQev755y2n02lt27bNzqV0eHYcC8uyrKqqKqtr167WSy+9ZNfUjWPHsRgzZow1dOhQa+vWrdb//M//WK+++qoVExNjvfjii3YuxQh2HI8//vGP1tatW61Dhw5ZGzZssPr3729NmDDBzmUYobnH4oknnrDee+8969ChQ1Zpaal17733WjExMda+fftCY5588kkrLi7Oevvtt63//u//trKysi7rY+m8pYVGTZo0SSdOnNCiRYvk8/mUkpKioqKi0AVkR44cueRfpT/kpz/9qQoKCpSfn69f/vKXuu666/Tmm2/qlltusWMJxrDjWEjffvGaZVmaPHlyS0/ZWHYci8LCQuXl5WnKlCk6deqU+vfvr9/+9rf6xS9+YccSjGLH8fjqq6+Um5sbeitl2rRpevzxx+2YvlGaeyy+/vprzZo1Sz6fT//0T/+k1NRUbd++Peyyh4cfflhnz57V7NmzVVlZqVtuuUVFRUXNvt7QYVlcgQUAAMzGNTwAAMB4BA8AADAewQMAAIxH8AAAAOMRPAAAwHgEDwAAMB7BAwAAjEfwAAAA4xE8AADAeAQPAAAwHsEDAACMR/AAAADj/T9Zuuq1ib3uAQAAAABJRU5ErkJggg==\",\n      \"text/plain\": [\n       \"<Figure size 640x480 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"xcorr = np.correlate(np.mean(d_ref, axis=1), np.mean(d_tst, axis=1), mode='same')\\n\",\n    \"center = np.argmax(xcorr)\\n\",\n    \"offset = int(center - len(d_ref) / 2)\\n\",\n    \"print(offset)\\n\",\n    \"ii = np.arange(20000, 22000)\\n\",\n    \"plt.plot(tt[ii], d_ref[ii, 0], tt[ii], d_tst[ii - offset, 0])\\n\",\n    \"plt.legend(['ref', 'tst'])\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 23,\n   \"id\": \"b8c11a9c-42a6-43f1-a7fd-7781043860c3\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"4.328085122666891\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"print(np.log2(np.exp(3.0)))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 24,\n   \"id\": \"4b1108c2-d3de-4c10-871e-2101367150a4\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"-98.30169903639559\\n\",\n      \"4.25\\n\",\n      \"9.375\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"print(np.log2(0.0002) * 8)\\n\",\n    \"print(34/8)\\n\",\n    \"print(75/8)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"f62ce11c-075c-4d9c-aed3-0e51fafee644\",\n   \"metadata\": {},\n   \"source\": [\n    \"print(99/8)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f680446d-341c-4582-b06d-acf7f162c26d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.12.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "experiments/dx7_simulator.py",
    "content": "\"\"\"Simulates the DX7 FM algorithms fully in Python.\"\"\"\n\nimport numpy as np\nimport fm\n\n# We add a (1 - z^-1)/(1 - 0.995 z^-1) HPF to remove low-frequency excursions.\n# Use scipy.signal if available, but emulate if not.\ntry:\n    import scipy.signal\n    def final_hpf(x):\n        return scipy.signal.sosfilt([[1, -1, 0, 1, -0.995, 0]], x)\nexcept ImportError:\n    def final_hpf(x):\n        state = 0\n        y = np.zeros(len(x))\n        # Sample-by-sample loop is slow in Python.\n        for i in range(len(x)):\n            new_state = x[i] + 0.995 * state\n            y[i] = new_state - state\n            state = new_state\n        return y\n\n\n#### Pure-python DX7 simulation (emulates what AMY does).\n# import matplotlib.pyplot as plt\n# import fm\n# import dx7_simulator\n# \n# patch_num = 1  # E.PNO 13.1\n# dx7_patch = fm.DX7Patch.from_patch_number(patch_num)\n# wave = dx7_simulator.synth_dx7_patch(dx7_patch)\n# plt.plot(wave)\n# fm.play_np_array(0.1*wave)\n\ndef calc_loglin_eg_env(breakpoints, keyup_time=0.5, frame_rate=1000, do_exp=True, dx7_attacks=True):\n    \"\"\"Take AMY breakpoints derived from DX7 rate,level parameters and generate the actual envelope.\"\"\"\n    # This is what amy has to do to reconstruct DX7 envelopes from the set of breakpoints.\n    if dx7_attacks:\n        lin_to_level_fn = fm.linear_to_dx7level\n        level_to_lin_fn = fm.dx7level_to_linear\n    else:\n        lin_to_level_fn = fm.ratio_to_pitchval\n        level_to_lin_fn = fm.pitchval_to_ratio\n    current_level = lin_to_level_fn(breakpoints[-1][1])\n    current_time = 0\n    last_target_time = 0\n    output_levels = np.zeros(0)\n    for segment, breakpoint in enumerate(breakpoints):\n        # Work in DX7 levels.\n        target_level = lin_to_level_fn(breakpoint[1])\n        target_time = breakpoint[0]\n        release_segment = (segment == len(breakpoints) - 1)\n        if release_segment:\n            # Release time is diff between last two bps, regardless of elapsed time.\n            segment_duration = target_time - last_target_time\n            # Make the release segment have at least one sample\n            segment_duration = np.maximum(segment_duration, 1/frame_rate)\n            # If we've reached the release segment but the key is still down,\n            # insert some constant-level envelope until we hit keyup time.\n            if current_time < keyup_time:\n                output_levels = np.concatenate(\n                    [output_levels, \n                     current_level * np.ones(int(frame_rate * (keyup_time - current_time)))])\n                current_time = keyup_time \n        else:\n            segment_duration = target_time - current_time\n        segment_was_truncated = False\n        if np.round(segment_duration * frame_rate) > 0:  # Can be < 0 because current time is quantized.\n            if target_time > keyup_time and not release_segment:\n                # If we hit keyup_time but we're not yet in the release segment, \n                # truncate this segment and move on (so we can get to release).\n                actual_seg_duration = segment_duration - (target_time - keyup_time)\n                segment_was_truncated = True\n            else:\n                actual_seg_duration = segment_duration\n            sample_time_within_segment = np.arange(np.round(actual_seg_duration * frame_rate)) / frame_rate\n\n            MIN_LEVEL = 34\n            ATTACK_RANGE = 75\n            \n            def map_attack_level(level):\n                \"\"\"Convenience to map the upside-down offset attack exponential to the equivalent level on a decaying exponential.\"\"\"\n                # This is used when calculating the time constant from the initial and final levels and the segment duration.\n                return 1 - np.maximum(level - MIN_LEVEL, 0) / ATTACK_RANGE\n\n            if dx7_attacks and target_level > current_level:  # Attack segment\n                # Derive t_const from delta_t and delta_level\n                # if L = a.exp(-t/t_c)\n                # then L1/L0 = exp(-t1/t_c)/exp(-t0/t_c)\n                # so log(L1/L0) = (-t1/t_c) - (-t0/t_c) = (t0 - t1) /t_c\n                # so t_c = (t1 - t0) / log(L0 / L1)\n                # Have to convert the L = A + B (1 - exp(-kt)) levels into exp(-kt) = 1 - (L - A) / B levels\n                mapped_current_level = map_attack_level(current_level)\n                mapped_target_level = map_attack_level(target_level)\n                t_const = segment_duration / np.log(mapped_current_level / mapped_target_level)\n                # We start from the time that matches the current level.\n                # L0 = exp(-t0 / t_c), so t0 = -t_c * log(L0)\n                t0 = -t_const * np.log(mapped_current_level)\n                # This is the magic equation that shapes the DX7 attack envelopes.\n                samples = MIN_LEVEL + ATTACK_RANGE * (1 - np.exp(-(t0 + sample_time_within_segment)/t_const))\n                #print(\"current_level=\", current_level, \"target_level=\", target_level, \n                #      \"t0=\", t0, \"tc=\", t_const, \"time=\", target_time)\n            else:\n                level_change_per_sec = (target_level - current_level) / segment_duration\n                samples = current_level + level_change_per_sec * sample_time_within_segment\n                #print(\"current_level=\", current_level, \"target_level=\", target_level, \n                #      \"chgpersec=\", level_change_per_sec, \"time=\", target_time)\n            output_levels = np.concatenate([output_levels, samples])\n        current_time = len(output_levels) / frame_rate\n        if segment_was_truncated:\n            # If we stopped early, start next segment from whereever we got to.\n            current_level = output_levels[-1]\n        else:\n            # Normal segment completion, act like we got to the target level (to avoid errors sampling sharp peaks).\n            current_level = target_level\n        last_target_time = target_time\n    if not do_exp:\n        return output_levels\n    else:\n        return level_to_lin_fn(output_levels)\n\n# Basic FM with feedback, vectorized except when feedback is nonzero\ndef fm_waveform(freq, amp=1.0, freq_mod=None, duration=1.0, sr=44100, feedback=0):\n    \"\"\"Render an FM waveform from raw parameters\"\"\"\n    t = np.arange(int(sr * duration)) / sr\n    if np.isscalar(amp):\n        amp = amp * np.ones(len(t))\n    if np.isscalar(freq):\n        freq = freq * np.ones(len(t))\n    dphi_dt = 2 * np.pi * freq / sr\n    phi = np.cumsum(dphi_dt)\n    if freq_mod is None:\n        freq_mod = np.zeros(len(t))\n    if feedback == 0:\n        # No feedback, vectorize.\n        carrier = amp * np.cos(phi + 2 * np.pi * freq_mod)\n    else:\n        # Have to do slow loop to calculate feedback sample-by-sample.\n        carrier = np.zeros(len(phi))\n        last_two = np.zeros(2)\n        for i in range(len(phi)):\n            sample = np.cos(phi[i] + 2 * np.pi * (freq_mod[i] + feedback * np.mean(last_two)))\n            last_two[1] = last_two[0]\n            last_two[0] = sample\n            carrier[i] = amp[i] * sample\n    return carrier\n\ndef dx7_op_waveform(op, f0=440, mod=None, sr=44100, duration=1.0, keyup_time=0.5, feedback=0, lfo=None):\n    \"\"\"Render an FM waveform from the DX7Operator structure.\"\"\"\n    n_samps = int(duration * sr)\n    if op.ratiotuning:\n        frequency = f0 * fm.coarse_fine_ratio(op.freq_coarse, op.freq_fine, op.freq_detune)\n    else:\n        frequency = fm.coarse_fine_fixed_hz(op.freq_coarse, op.freq_fine, op.freq_detune)\n    if op.rates is not None:\n        bps = fm.calc_loglin_eg_breakpoints(op.rates, op.levels)\n        env = calc_loglin_eg_env(bps, frame_rate=sr, do_exp=True, keyup_time=keyup_time)\n    else:\n        env = np.ones(n_samps)\n    if len(env) < n_samps:\n        env = np.concatenate([env, fm.dx7level_to_linear(op.levels[-1]) * np.ones(n_samps - len(env))])\n    else:\n        env = env[:n_samps]\n    if lfo is not None:\n        env = env * (1 + op.ampmodsens/3 * lfo)\n    env *= 2 * fm.dx7level_to_linear(op.opamp)    \n    carrier = fm_waveform(frequency, amp=env, \n                          freq_mod=mod, sr=sr, duration=duration, feedback=feedback)\n    #print(\"Op: rates:\", op.rates, \"levels:\", op.levels, \"freq: %.1f\" % frequency, \"fb\", feedback, \"amp:\", op.opamp)\n    return carrier\n\n# Thank you MFSA for the DX7 op structure , borrowed here \\/ \\/ \\/ \n# algorithms[algo][operator] gives bits from FmOperatorFlags describing each algo\nalgorithms = [\n    [0x00, 0x00, 0x00, 0x00, 0x00, 0x01],  # 0 \n    [0xc1, 0x11, 0x11, 0x14, 0x01, 0x14],  # 1\n    [0x01, 0x11, 0x11, 0x14, 0xc1, 0x14],  # 2\n    [0xc1, 0x11, 0x14, 0x01, 0x11, 0x14],  # 3\n    [0x41, 0x11, 0x94, 0x01, 0x11, 0x14],  # 4\n    [0xc1, 0x14, 0x01, 0x14, 0x01, 0x14],  # 5\n    [0x41, 0x94, 0x01, 0x14, 0x01, 0x14],  # 6\n    [0xc1, 0x11, 0x05, 0x14, 0x01, 0x14],  # 7\n    [0x01, 0x11, 0xc5, 0x14, 0x01, 0x14],  # 8\n    [0x01, 0x11, 0x05, 0x14, 0xc1, 0x14],  # 9\n    [0x01, 0x05, 0x14, 0xc1, 0x11, 0x14],  # 10\n    [0xc1, 0x05, 0x14, 0x01, 0x11, 0x14],  # 11\n    [0x01, 0x05, 0x05, 0x14, 0xc1, 0x14],  # 12\n    [0xc1, 0x05, 0x05, 0x14, 0x01, 0x14],  # 13\n    [0xc1, 0x05, 0x11, 0x14, 0x01, 0x14],  # 14\n    [0x01, 0x05, 0x11, 0x14, 0xc1, 0x14],  # 15\n    [0xc1, 0x11, 0x02, 0x25, 0x05, 0x14],  # 16\n    [0x01, 0x11, 0x02, 0x25, 0xc5, 0x14],  # 17\n    [0x01, 0x11, 0x11, 0xc5, 0x05, 0x14],  # 18\n    [0xc1, 0x14, 0x14, 0x01, 0x11, 0x14],  # 19\n    [0x01, 0x05, 0x14, 0xc1, 0x14, 0x14],  # 20\n    [0x01, 0x14, 0x14, 0xc1, 0x14, 0x14],  # 21\n    [0xc1, 0x14, 0x14, 0x14, 0x01, 0x14],  # 22\n    [0xc1, 0x14, 0x14, 0x01, 0x14, 0x04],  # 23\n    [0xc1, 0x14, 0x14, 0x14, 0x04, 0x04],  # 24\n    [0xc1, 0x14, 0x14, 0x04, 0x04, 0x04],  # 25\n    [0xc1, 0x05, 0x14, 0x01, 0x14, 0x04],  # 26\n    [0x01, 0x05, 0x14, 0xc1, 0x14, 0x04],  # 27\n    [0x04, 0xc1, 0x11, 0x14, 0x01, 0x14],  # 28\n    [0xc1, 0x14, 0x01, 0x14, 0x04, 0x04],  # 29\n    [0x04, 0xc1, 0x11, 0x14, 0x04, 0x04],  # 30\n    [0xc1, 0x14, 0x04, 0x04, 0x04, 0x04],  # 31\n    [0xc4, 0x04, 0x04, 0x04, 0x04, 0x04],  # 32\n]\n# FmOperatorFlags\nOUT_BUS_ONE = 0x01\nOUT_BUS_TWO = 0x02\nOUT_BUS_ADD = 0x04\n# there is no 1 << 3\nIN_BUS_ONE = 0x10\nIN_BUS_TWO = 0x20\nFB_IN = 0x40\nFB_OUT = 0x80\n\n# TODO: Fix pitchenv to be true_exponential\n# TODO: Calibrate pitchenv, lfopitchmod\n# TODO: Other LFO waveforms\n# TODO: LFO delay??\n# TODO: LFO sync\n\ndef dx7_f0_contour(patch, f0=440, sr=44100, duration=1.0, keyup_time=0.5):\n    \"\"\"Calculate the f0 contour including pitchenv.\"\"\"\n    n_samps = int(sr * duration)\n    # envelope rate scaling parameters for pitch_env timing.\n    pitch_bps = fm.calc_loglin_eg_breakpoints(patch.pitch_rates, patch.pitch_levels, dx7_attacks=False, \n                                              rate_double_interval=20, rate_scale=11, rate_offset=-6)\n    pitch_env = calc_loglin_eg_env(pitch_bps, frame_rate=sr, keyup_time=keyup_time, dx7_attacks=False)\n    if len(pitch_env) < n_samps:\n        pitch_env = np.concatenate([pitch_env, pitch_bps[-1][1]*np.ones(n_samps - len(pitch_env))])\n    else:\n        pitch_env = pitch_env[:n_samps]\n    pitch_env = f0 * pitch_env\n    return pitch_env\n\ndef dx7_lfo(patch, sr=44100, duration=1.0):\n    \"\"\"Synthesize the lfo waveform for this patch.\"\"\"\n    lfo_freq = fm.lfo_speed_to_hz(patch.lfospeed)\n    amp = 1\n    feedback = 0\n    if patch.lfowaveform == 1:  # Saw_down\n        # High feedback makes a reasonable saw.\n        feedback = 0.25\n    elif patch.lfowaveform == 2:  # Saw_up\n        feedback = 0.25\n        amp = -1\n    # Triangle, Pulse, and Sine are all just sine.\n    lfo_wave = fm_waveform(lfo_freq, amp=amp, sr=sr, duration=duration, feedback=feedback)\n    return lfo_wave\n\ndef ampmoddepth_to_linear(ampmoddepth):\n    \"\"\"Convert ampmoddepth to linear gain on lfo waveform.\"\"\"\n    if ampmoddepth < 40:\n        ampmoddb = ampmoddepth / 10\n    elif ampmoddepth < 70:\n        ampmoddb = ampmoddepth / 5 - 4\n    elif ampmoddepth < 90:\n        ampmoddb = ampmoddepth / 2 - 25\n    else:\n        ampmoddb = ampmoddepth - 70\n    # We want to return g : (1+g)/(1-g) = 10*(ampmoddb/20) = k\n    # so 1 + g = k - kg\n    # so g(1 + k) = k - 1\n    # so g = (k - 1)/(k + 1)\n    k = 10 ** (ampmoddb/20)\n    return (k - 1)/(k + 1)\n\ndef synth_dx7_patch(patch, f0=440, sr=44100, duration=1.0, keyup_time=0.5):\n    lfo_wave = dx7_lfo(patch, sr, duration)\n    f0_contour = dx7_f0_contour(patch, f0, sr, duration, keyup_time)\n    f0_contour *= 1 + 0.25 * fm.dx7level_to_linear(patch.lfopitchmoddepth) * lfo_wave\n    num_samples = int(sr * duration)\n    bus_one = np.zeros(num_samples)\n    bus_two = np.zeros(num_samples)\n    bus_add = np.zeros(num_samples)\n    print('algo=', patch.algo)\n    for opnum, op in enumerate(patch.ops):\n        print('op=', 6 - opnum)\n        opflags = algorithms[patch.algo][opnum]\n        mod_in = np.zeros(num_samples)\n        feedback = 0\n        if opflags & IN_BUS_ONE:\n            mod_in = bus_one\n            print('mod_in = bus_one')\n        if opflags & IN_BUS_TWO:\n            mod_in = bus_two\n            print('mod_in = bus_two')\n        if opflags & FB_IN:\n            feedback = 0.00125 * (2 ** patch.feedback)\n            print('fb=', feedback)\n            if (opflags & FB_OUT) == 0:\n                print(\"**warning: FB_OUT different from FB_IN\")\n        samples = dx7_op_waveform(op, f0=f0_contour, mod=mod_in, sr=sr, duration=duration, keyup_time=keyup_time, \n                                  feedback=feedback, lfo=ampmoddepth_to_linear(patch.lfoampmoddepth)*lfo_wave)\n        if opflags & OUT_BUS_ONE:\n            if opflags & OUT_BUS_ADD:\n                # OUT_BUS_ADD | OUT_BUS_X means add on to BUS_X\n                bus_one = (bus_one + samples)\n                print('bus_one = bus_one + samples')\n            else:\n                bus_one = samples\n                print('bus_one = samples')\n        if opflags & OUT_BUS_TWO:\n            if opflags & OUT_BUS_ADD:\n                # OUT_BUS_ADD | OUT_BUS_X means add on to BUS_X\n                bus_two = (bus_two + samples)\n                print('bus_two = bus_two + samples')\n            else:\n                bus_two = samples\n                print('bus_two = samples')\n        if (opflags & OUT_BUS_ADD) and ((opflags & (OUT_BUS_ONE | OUT_BUS_TWO)) == 0):\n            # Bare OUT_BUS_ADD (0x4).\n            bus_add += samples\n            print('bus_add += samples')\n    # Apply HPF - 0.003/3.14 * 22050 = 22 Hz\n    bus_add = final_hpf(bus_add)\n    return bus_add\n\n"
  },
  {
    "path": "experiments/make_piano_examples.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"e208aa51-4e26-4487-b80d-df83fdc00277\",\n   \"metadata\": {},\n   \"source\": [\n    \"# make_piano_examples\\n\",\n    \"\\n\",\n    \"Quick notebook to compose sound examples for my planned blog post about piano synthesis.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d83c04c3-309e-4364-a3cc-eb3d31ee2977\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import os\\n\",\n    \"import time\\n\",\n    \"\\n\",\n    \"import matplotlib.pyplot as plt\\n\",\n    \"import numpy as np\\n\",\n    \"import scipy.io.wavfile as wav\\n\",\n    \"import scipy.signal\\n\",\n    \"\\n\",\n    \"from IPython.display import Audio\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4ec3aed7-be52-486d-974c-b927df746c7a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Spectrogram display, copied from piano_heterodyne.\\n\",\n    \"\\n\",\n    \"from scipy import fft\\n\",\n    \"\\n\",\n    \"def dB(x):\\n\",\n    \"    return 20 * np.log10(np.abs(x))\\n\",\n    \"\\n\",\n    \"def spectrogram(x, fft_len=1024, win_len=None, hop_len=None, window_fn=np.hanning, sr=1, f_max=None, title=None):\\n\",\n    \"    if win_len is None:\\n\",\n    \"        win_len = fft_len\\n\",\n    \"    if hop_len is None:\\n\",\n    \"        hop_len = win_len // 2\\n\",\n    \"    # Window.\\n\",\n    \"    prepad_len = (fft_len - win_len) // 2\\n\",\n    \"    win = np.hstack([np.zeros(prepad_len), window_fn(win_len), np.zeros(fft_len - win_len - prepad_len)])\\n\",\n    \"    # Frame.\\n\",\n    \"    frame_indices = np.arange(0, len(x) - win_len, hop_len)[:, np.newaxis] + np.arange(win_len)[np.newaxis, :]\\n\",\n    \"    x_chunks_windowed = x[frame_indices] * win[np.newaxis, :]\\n\",\n    \"    # Transform.\\n\",\n    \"    stft_mag_db = dB(fft.fft(x_chunks_windowed, n=fft_len)[:, :(fft_len // 2 + 1)])\\n\",\n    \"    num_frames, num_bins = stft_mag_db.shape\\n\",\n    \"    t_base = np.arange(num_frames) * hop_len / sr\\n\",\n    \"    f_base = np.arange(num_bins) * sr / fft_len\\n\",\n    \"    plt.imshow(stft_mag_db.T, aspect='auto', origin='lower', extent=[t_base[0], t_base[-1], f_base[0], f_base[-1]])\\n\",\n    \"    plt.clim(np.max(stft_mag_db) + [-80, 0])\\n\",\n    \"    #plt.ylim([0, f_max / sr * fft_len])\\n\",\n    \"    if f_max:\\n\",\n    \"        plt.ylim([0, f_max])\\n\",\n    \"    #x_times = np.arange(0, len(x) / sr, 0.25)\\n\",\n    \"    #y_freqs = np.arange(0, 10000, 1000)\\n\",\n    \"    #plt.xticks(x_times * sr / hop_len, x_times)\\n\",\n    \"    #plt.yticks(y_freqs / sr * fft_len, y_freqs)\\n\",\n    \"    plt.colorbar(label='level / dB')\\n\",\n    \"    plt.xlabel('time / sec')\\n\",\n    \"    plt.ylabel('freq / kHz')\\n\",\n    \"    if title:\\n\",\n    \"        plt.title(title)\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d509e7f7-6f86-456b-a157-f2016154b793\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Load in the original piano samples, copied from piano_heterodyne\\n\",\n    \"\\n\",\n    \"def wavread(filename):\\n\",\n    \"  \\\"\\\"\\\"Read in audio data from a wav file.  Return d, sr.\\\"\\\"\\\"\\n\",\n    \"  # Read in wav file.\\n\",\n    \"  file_handle = open(filename, 'rb')\\n\",\n    \"  samplerate, wave_data = wav.read(file_handle)\\n\",\n    \"  # Normalize short ints to floats in range [-1..1).\\n\",\n    \"  data = np.asarray(wave_data, dtype=np.float32) / 32768.0\\n\",\n    \"  return data, samplerate\\n\",\n    \"\\n\",\n    \"def wavwrite(data, samplerate, filename):\\n\",\n    \"  \\\"\\\"\\\"Write a waveform to a WAV file.\\\"\\\"\\\"\\n\",\n    \"  wav.write(filename, samplerate, (32768.0 * data).astype(np.int16))\\n\",\n    \"\\n\",\n    \"def read_and_trim(filename, duration=2.0, rel_threshold=0.015, abs_threshold=0.0006, sr=44100, channel=0, do_plot=False, pre_time=0.002):\\n\",\n    \"    d, file_sr = wavread(filename)\\n\",\n    \"    #print(\\\"d.shape=\\\", d.shape)\\n\",\n    \"    if len(d.shape) > 1:  # Stereo file\\n\",\n    \"        if channel is None:\\n\",\n    \"            d = np.mean(d, axis=-1)\\n\",\n    \"        else:\\n\",\n    \"            d = d[:, channel]\\n\",\n    \"    assert file_sr == sr\\n\",\n    \"    d = d - np.mean(d)\\n\",\n    \"    threshold = np.maximum(np.max(np.abs(d)) * rel_threshold, abs_threshold)\\n\",\n    \"    # Tight window at start?\\n\",\n    \"    drop_initial_samps = np.maximum(0, -int(round(pre_time * sr)) + np.min(np.flatnonzero(np.abs(d) > threshold)))\\n\",\n    \"    d_return = d[int(round(drop_initial_samps)) + np.arange(int(round(duration * sr)))]\\n\",\n    \"    if do_plot:\\n\",\n    \"        t = np.arange(len(d)) / sr\\n\",\n    \"        plt.figure(figsize=(12, 4))\\n\",\n    \"        plt.subplot(121)\\n\",\n    \"        plt.plot(t[:50000], d[:50000])\\n\",\n    \"        plt.ylim(threshold * np.array([-1, 1]))\\n\",\n    \"        plt.subplot(122)\\n\",\n    \"        plt.plot(t[:len(d_return)], d_return)\\n\",\n    \"        plt.xlim([0, 0.1])\\n\",\n    \"        print(\\\"drop initial\\\", drop_initial_samps / sr)\\n\",\n    \"    return d_return\\n\",\n    \"\\n\",\n    \"def piano_filename(note='C', octave=4, strike='ff'):\\n\",\n    \"    #filename = 'Piano.ff.D4.wav'\\n\",\n    \"    directory = '/Users/dpwe/Downloads/uiowa-piano'\\n\",\n    \"    #octave = 2\\n\",\n    \"    #note = 'D'\\n\",\n    \"    #octave = 4\\n\",\n    \"    #note = 'Eb'\\n\",\n    \"    #strike = 'ff'  # ['pp', 'mf', 'ff']:\\n\",\n    \"    filename = os.path.join(directory, '.'.join(['Piano', strike, note + str(octave), 'wav']))\\n\",\n    \"    return filename\\n\",\n    \"\\n\",\n    \"filename = piano_filename('D', 4)\\n\",\n    \"print(filename)\\n\",\n    \"waveform = read_and_trim(filename)\\n\",\n    \"_, sr = wavread(filename)\\n\",\n    \"Audio(data=waveform.T, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d9a44a35-b787-433d-aaee-4f9525d5d178\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Give it a 50ms fade-out\\n\",\n    \"def fade_out(waveform, fade_end_sec=0.5, fade_duration_sec=0.05, sample_rate=44100):\\n\",\n    \"    \\\"\\\"\\\"Apply a fade-out to a waveform.\\\"\\\"\\\"\\n\",\n    \"    fade_end_samples = int(round(fade_end_sec * sample_rate))\\n\",\n    \"    fade_duration_samples = int(round(fade_duration_sec * sample_rate))\\n\",\n    \"    fade_start_samples = fade_end_samples - fade_duration_samples\\n\",\n    \"    mask = np.ones_like(waveform)\\n\",\n    \"    mask[fade_start_samples : fade_start_samples + fade_duration_samples] = np.linspace(1, 0, fade_duration_samples)\\n\",\n    \"    mask[fade_start_samples + fade_duration_samples:] = 0\\n\",\n    \"    return mask * waveform\\n\",\n    \"\\n\",\n    \"fade_waveform = fade_out(waveform)\\n\",\n    \"#plt.plot(fade_waveform)\\n\",\n    \"Audio(data=fade_waveform.T, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"dbcfeb1a-8d63-448b-9588-502a8a19340a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Compose the 3s (time, note, vel) sequence from piano_examples.py\\n\",\n    \"\\n\",\n    \"def emplace(main_waveform, waveform_to_add, start_time_sec, sample_rate=44100):\\n\",\n    \"    \\\"\\\"\\\"Add-in a waveform to a background at a given time, truncate as needed.\\\"\\\"\\\"\\n\",\n    \"    start_time_samples = int(round(start_time_sec * sample_rate))\\n\",\n    \"    length_to_use = min(len(waveform_to_add), len(main_waveform) - start_time_samples)\\n\",\n    \"    main_waveform[start_time_samples : start_time_samples + length_to_use] += waveform_to_add[:length_to_use]\\n\",\n    \"    return main_waveform\\n\",\n    \"\\n\",\n    \"sr = 44100\\n\",\n    \"waveform = np.zeros(int(round(3.3 * sr)))\\n\",\n    \"\\n\",\n    \"waveform = emplace(waveform, fade_out(read_and_trim(piano_filename('D', 4, 'pp')), 0.4), 0.05)\\n\",\n    \"waveform = emplace(waveform, fade_out(read_and_trim(piano_filename('D', 4, 'mf')), 0.4), 0.45)\\n\",\n    \"waveform = emplace(waveform, fade_out(read_and_trim(piano_filename('D', 4, 'ff')), 0.65), 0.85)\\n\",\n    \"\\n\",\n    \"waveform = emplace(waveform, fade_out(read_and_trim(piano_filename('D', 2, 'mf')), 1.8), 1.5)\\n\",\n    \"waveform = emplace(waveform, fade_out(read_and_trim(piano_filename('D', 6, 'ff')), 1.2), 2.1)\\n\",\n    \"\\n\",\n    \"Audio(data=waveform.T, rate=sr)                    \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"9cdb36a0-50fa-46c0-8be0-308cf549eb13\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"wavwrite(waveform, sr, '../sounds/piano_example_original.wav')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"dad756fb-08e0-4653-8fa4-c7d495328f2d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"filename = '../sounds/piano_example_original.wav'\\n\",\n    \"waveform, sr = wavread(filename)\\n\",\n    \"plt.figure(figsize=(16, 4))\\n\",\n    \"spectrogram(waveform, sr=sr, f_max=8000, title='UIowa Samples')\\n\",\n    \"Audio(data=waveform, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"79ab2480-bd38-4b53-b95e-83dd7c85dc45\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"filename = '../sounds//piano_example_juno_patch_7.wav'\\n\",\n    \"waveform, sr = wavread(filename)\\n\",\n    \"plt.figure(figsize=(16, 4))\\n\",\n    \"spectrogram(waveform, sr=sr, f_max=8000, title='Juno-60 piano')\\n\",\n    \"Audio(data=waveform, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"1436640c-56ca-4049-8ff2-d645ea39abe2\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"filename = '../sounds//piano_example_dx7_patch_137.wav'\\n\",\n    \"waveform, sr = wavread(filename)\\n\",\n    \"plt.figure(figsize=(16, 4))\\n\",\n    \"spectrogram(waveform, sr=sr, f_max=8000, title='DX7 piano')\\n\",\n    \"Audio(data=waveform, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"27ad0bd1-7b2d-45ab-9902-591cfd0d4691\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"filename = '../sounds/piano_example_additive_fixed.wav'\\n\",\n    \"waveform, sr = wavread(filename)\\n\",\n    \"plt.figure(figsize=(16, 4))\\n\",\n    \"spectrogram(waveform, sr=sr, f_max=8000, title='Fixed-envelope additive piano')\\n\",\n    \"Audio(data=waveform, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"06ff335b-4aba-437e-837b-ccbde61498ed\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"filename = '../sounds//piano_example_additive_interpolated.wav'\\n\",\n    \"waveform, sr = wavread(filename)\\n\",\n    \"plt.figure(figsize=(16, 4))\\n\",\n    \"spectrogram(waveform, sr=sr, f_max=8000, title='Interpolated additive piano')\\n\",\n    \"Audio(data=waveform, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d0ee56a1-8391-42c8-b1ac-c9c193a6d02f\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Repeat original again\\n\",\n    \"filename = '../sounds//piano_example_original.wav'\\n\",\n    \"waveform, sr = wavread(filename)\\n\",\n    \"plt.figure(figsize=(16, 4))\\n\",\n    \"spectrogram(waveform, sr=sr, f_max=8000, title='UIowa Samples')\\n\",\n    \"Audio(data=waveform, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"c5825360-1d12-4694-b40d-b051406c7395\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Plot FFT to illustrate two-sided spectrum\\n\",\n    \"from scipy import fft\\n\",\n    \"\\n\",\n    \"def plotspec(d, n_fft=4096, sr=44100, f_max=6000, title=None, db_range=80):\\n\",\n    \"    X = fft.fft(d[:n_fft] * np.hanning(n_fft))\\n\",\n    \"    # FFT shift to put zero in the middle.\\n\",\n    \"    fft_keep_points = int(round(f_max / sr * n_fft))\\n\",\n    \"    X = np.hstack([X[-fft_keep_points:], X[:fft_keep_points]])\\n\",\n    \"    freqs = np.arange(-fft_keep_points, fft_keep_points) * sr / n_fft / 1000\\n\",\n    \"    db_X = dB(X)\\n\",\n    \"    plt.plot(freqs, db_X)\\n\",\n    \"    db_max = 10 * np.ceil(np.max(db_X) / 10)\\n\",\n    \"    plt.ylim([db_max - db_range, db_max])\\n\",\n    \"    plt.xlabel('freq / kHz')\\n\",\n    \"    plt.ylabel('level / dB')\\n\",\n    \"    plt.grid()\\n\",\n    \"    if title:\\n\",\n    \"        plt.title(title)\\n\",\n    \"\\n\",\n    \"d = read_and_trim(piano_filename('D', 4, 'ff'))\\n\",\n    \"# Skip first 0.2 s to exclude \\\"thump\\\"\\n\",\n    \"plt.figure(figsize=(16, 4))\\n\",\n    \"plotspec(d[int(round(0.2 * sr)):], title='D4.ff spectrum', f_max=3000)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"05d60937-faa2-4c92-b6be-9e7d088fdbfc\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Demodulate by multiplying by complex exponential\\n\",\n    \"f0 = 293.665  # Nominal frequency of D4\\n\",\n    \"d_demod = d * np.exp(-1j * 2 * np.pi * f0 * np.arange(len(d))/ sr)\\n\",\n    \"plotspec(d_demod[int(round(0.2 * sr)):] , title='D4.ff shifted down by f0', f_max=3000)\\n\",\n    \"f0_on_2 = f0 / 2000\\n\",\n    \"plt.figure(figsize=(16, 4))\\n\",\n    \"plt.plot([-f0_on_2, f0_on_2, f0_on_2, -f0_on_2, -f0_on_2], [38, 38, -38, -38, 38], '--r')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f65bcd09-1940-40db-ba04-ef1b01ff726d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Low-pass demodulated waveform to recover harmonic envelope.\\n\",\n    \"\\n\",\n    \"def demod_and_smooth(d, f0, harmonic=1, sr=44100):\\n\",\n    \"    d_demod = d * np.exp(-1j * 2 * np.pi * f0 * harmonic * np.arange(len(d))/ sr)\\n\",\n    \"    fundamental_period_samples = int(round(sr / f0))\\n\",\n    \"    d_demod_smoo = np.convolve(d_demod, np.hanning(2 * fundamental_period_samples), 'same')\\n\",\n    \"    return d_demod_smoo\\n\",\n    \"\\n\",\n    \"t = np.arange(len(d)) / sr\\n\",\n    \"plt.figure(figsize=(16, 6))\\n\",\n    \"\\n\",\n    \"plt.subplot(211)\\n\",\n    \"plt.plot(t, d)\\n\",\n    \"plt.ylabel('amplitude')\\n\",\n    \"plt.title('D4.ff waveform')\\n\",\n    \"\\n\",\n    \"plt.subplot(212)\\n\",\n    \"plt.plot(t, dB(demod_and_smooth(d, f0)))\\n\",\n    \"plt.plot(t, dB(demod_and_smooth(d, f0, harmonic=2)))\\n\",\n    \"plt.plot(t, dB(demod_and_smooth(d, f0, harmonic=3)))\\n\",\n    \"plt.plot(t, dB(demod_and_smooth(d, f0, harmonic=4)))\\n\",\n    \"plt.ylim([-15, 25])\\n\",\n    \"plt.title('Extracted harmonic envelopes')\\n\",\n    \"plt.xlabel('time / sec')\\n\",\n    \"plt.ylabel('level / dB')\\n\",\n    \"plt.legend(['%d - %.2f Hz' % (n, n * f0) for n in range(1, 5)])\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"df559105-e346-45eb-bf66-7ee59c6da5b3\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.12.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "experiments/piano-params.json",
    "content": "{\"sample_times_ms\": [4, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096], \"notes\": [24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104], \"velocities\": [40, 80, 120], \"num_harmonics\": [40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 37, 33, 32, 23, 28, 26, 22, 22, 21, 17, 17, 17, 13, 13, 13, 11, 11, 11, 8, 8, 9, 7, 7, 7, 6, 5, 5, 3, 4, 4], \"harmonics_freq\": [2272, 3586, 4290, 4791, 5181, 5498, 5767, 5996, 6209, 6397, 6566, 6721, 6865, 6999, 7124, 7243, 7356, 7462, 7562, 7660, 7752, 7841, 7928, 8009, 8091, 8171, 8246, 8321, 8398, 8464, 8565, 8629, 8704, 8765, 8826, 8895, 8955, 9012, 9069, 9128, 2172, 3587, 4287, 4787, 5175, 5493, 5762, 5996, 6205, 6393, 6561, 6716, 6860, 6993, 7118, 7237, 7348, 7456, 7555, 7652, 7744, 7833, 7918, 8001, 8081, 8166, 8233, 8306, 8376, 8446, 8514, 8579, 8643, 8706, 8768, 8828, 8891, 8945, 8995, 9035, 2394, 3588, 4289, 4787, 5176, 5495, 5764, 5998, 6207, 6395, 6564, 6717, 6862, 6995, 7120, 7241, 7351, 7458, 7557, 7654, 7746, 7835, 7920, 8003, 8082, 8221, 8235, 8310, 8378, 8448, 8515, 8581, 8645, 8708, 8819, 8854, 8901, 8997, 9036, 9079, 2851, 3989, 4692, 5187, 5576, 5893, 6161, 6394, 6600, 6785, 6952, 7105, 7246, 7379, 7501, 7616, 7724, 7828, 7926, 8019, 8108, 8193, 8275, 8355, 8434, 8505, 8574, 8641, 8710, 8774, 8836, 8891, 8945, 8996, 9053, 9115, 9147, 9206, 9252, 9304, 3069, 3987, 4692, 5187, 5577, 5892, 6161, 6393, 6600, 6784, 6952, 7105, 7246, 7379, 7501, 7616, 7725, 7828, 7926, 8019, 8108, 8193, 8275, 8354, 8435, 8509, 8578, 8643, 8712, 8775, 8838, 8893, 8941, 9006, 9065, 9127, 9177, 9239, 9266, 9333, 3008, 3989, 4693, 5188, 5577, 5894, 6162, 6395, 6601, 6785, 6953, 7106, 7247, 7379, 7502, 7617, 7726, 7829, 7927, 8019, 8109, 8194, 8277, 8355, 8438, 8511, 8580, 8645, 8713, 8776, 8839, 8901, 8961, 9019, 9075, 9133, 9182, 9249, 9267, 9351, 3114, 4391, 5094, 5596, 5984, 6300, 6567, 6804, 7008, 7191, 7358, 7512, 7653, 7784, 7906, 8022, 8130, 8233, 8330, 8424, 8512, 8595, 8679, 8764, 8838, 8906, 8978, 9049, 9121, 9171, 9242, 9305, 9364, 9424, 9482, 9536, 9593, 9645, 9697, 9750, 3224, 4390, 5096, 5595, 5983, 6299, 6567, 6799, 7006, 7190, 7358, 7512, 7653, 7784, 7906, 8022, 8129, 8232, 8329, 8422, 8511, 8595, 8677, 8758, 8856, 8970, 8986, 9105, 9169, 9231, 9291, 9350, 9408, 9473, 9539, 9582, 9664, 9723, 9771, 9820, 3275, 4391, 5099, 5598, 5985, 6300, 6567, 6805, 7008, 7191, 7358, 7513, 7654, 7785, 7907, 8022, 8130, 8233, 8330, 8423, 8511, 8595, 8678, 8755, 8855, 8900, 8980, 9041, 9106, 9170, 9232, 9291, 9350, 9407, 9472, 9518, 9574, 9624, 9669, 9724, 3610, 4789, 5497, 5999, 6386, 6702, 6972, 7205, 7411, 7596, 7763, 7916, 8055, 8189, 8314, 8427, 8551, 8655, 8819, 8852, 8923, 9072, 9156, 9232, 9311, 9384, 9453, 9521, 9595, 9674, 9748, 9812, 9878, 9942, 10004, 10068, 10130, 10187, 10246, 10303, 3623, 4792, 5493, 5999, 6385, 6702, 6972, 7205, 7411, 7596, 7763, 7916, 8054, 8189, 8313, 8426, 8537, 8638, 8737, 8831, 8919, 9004, 9084, 9164, 9257, 9321, 9389, 9515, 9580, 9643, 9707, 9766, 9818, 9885, 9934, 9984, 10050, 10096, 10160, 10207, 3646, 4792, 5491, 6000, 6386, 6703, 6973, 7206, 7412, 7597, 7764, 7918, 8054, 8190, 8313, 8427, 8539, 8639, 8738, 8832, 8920, 9005, 9086, 9165, 9259, 9322, 9390, 9518, 9583, 9644, 9707, 9765, 9823, 9889, 9937, 9984, 10040, 10096, 10160, 10205, 4008, 5200, 5904, 6403, 6790, 7106, 7376, 7608, 7815, 7998, 8165, 8318, 8460, 8591, 8715, 8826, 8939, 9042, 9139, 9229, 9318, 9402, 9480, 9562, 9644, 9713, 9780, 9846, 9911, 9977, 10038, 10101, 10158, 10216, 10274, 10346, 10385, 10434, 10486, 10536, 4008, 5200, 5903, 6403, 6789, 7106, 7376, 7607, 7815, 7999, 8165, 8318, 8460, 8591, 8714, 8828, 8937, 9039, 9137, 9228, 9318, 9401, 9484, 9568, 9659, 9718, 9782, 9847, 9916, 9977, 10038, 10099, 10186, 10265, 10321, 10370, 10421, 10477, 10531, 10576, 4010, 5201, 5903, 6404, 6790, 7108, 7376, 7608, 7816, 7999, 8166, 8318, 8461, 8592, 8714, 8829, 8938, 9040, 9137, 9228, 9318, 9402, 9484, 9564, 9658, 9714, 9784, 9847, 9913, 9976, 10038, 10096, 10165, 10272, 10317, 10379, 10428, 10480, 10529, 10566, 4398, 5600, 6302, 6802, 7189, 7506, 7774, 8007, 8213, 8398, 8566, 8720, 8860, 8992, 9130, 9234, 9347, 9448, 9543, 9645, 9727, 9809, 9903, 9985, 10063, 10138, 10214, 10287, 10349, 10419, 10481, 10547, 10605, 10668, 10731, 10784, 10842, 10897, 10950, 11004, 4398, 5599, 6303, 6801, 7188, 7507, 7773, 8006, 8213, 8397, 8565, 8717, 8858, 8990, 9112, 9227, 9334, 9438, 9536, 9629, 9716, 9802, 9884, 9962, 10042, 10112, 10182, 10252, 10328, 10380, 10443, 10506, 10573, 10632, 10685, 10739, 10792, 10851, 10906, 10960, 4400, 5598, 6304, 6803, 7190, 7508, 7775, 8008, 8215, 8398, 8566, 8718, 8860, 8991, 9113, 9228, 9337, 9440, 9536, 9629, 9718, 9803, 9885, 9963, 10045, 10112, 10182, 10250, 10316, 10381, 10443, 10535, 10556, 10623, 10679, 10735, 10788, 10841, 10893, 10945, 4782, 6001, 6703, 7203, 7591, 7907, 8175, 8410, 8623, 8800, 8966, 9124, 9265, 9407, 9526, 9658, 9778, 9886, 9995, 10084, 10175, 10271, 10349, 10437, 10516, 10592, 10669, 10744, 10818, 10887, 10956, 11022, 11087, 11151, 11223, 11277, 11336, 11398, 11454, 11511, 4797, 6000, 6702, 7204, 7591, 7907, 8174, 8407, 8615, 8797, 8964, 9117, 9258, 9389, 9511, 9625, 9735, 9837, 9934, 10027, 10115, 10200, 10281, 10353, 10441, 10507, 10580, 10646, 10715, 10779, 10842, 10904, 10967, 11024, 11085, 11137, 11194, 11247, 11299, 11352, 4801, 6002, 6703, 7205, 7592, 7908, 8176, 8408, 8616, 8798, 8966, 9118, 9259, 9390, 9512, 9626, 9736, 9838, 9934, 10028, 10115, 10201, 10282, 10360, 10438, 10508, 10578, 10646, 10713, 10777, 10839, 10899, 10966, 11016, 11074, 11128, 11183, 11238, 11287, 11343, 5204, 6408, 7107, 7608, 7994, 8311, 8580, 8812, 9020, 9202, 9373, 9527, 9666, 9802, 9927, 10042, 10158, 10256, 10348, 10446, 10535, 10617, 10702, 10777, 10853, 10924, 10996, 11059, 11131, 11196, 11250, 11317, 11392, 11437, 11491, 11545, 11599, 11653, 11696, 11753, 5206, 6408, 7107, 7608, 7994, 8311, 8580, 8812, 9019, 9205, 9372, 9526, 9667, 9799, 9916, 10038, 10147, 10251, 10349, 10444, 10533, 10620, 10701, 10779, 10855, 10928, 11001, 11069, 11136, 11202, 11250, 11313, 11384, 11428, 11486, 11544, 11589, 11644, 11689, 11743, 5208, 6409, 7108, 7609, 7995, 8312, 8581, 8812, 9020, 9205, 9373, 9527, 9668, 9800, 9922, 10039, 10147, 10252, 10351, 10443, 10534, 10619, 10702, 10781, 10857, 10931, 11005, 11073, 11141, 11208, 11269, 11332, 11396, 11452, 11510, 11567, 11622, 11679, 11729, 11778, 5606, 6807, 7508, 8009, 8396, 8714, 8994, 9205, 9428, 9629, 9787, 9941, 10072, 10212, 10347, 10463, 10569, 10668, 10765, 10858, 10948, 11037, 11116, 11197, 11272, 11348, 11401, 11485, 11557, 11622, 11686, 11749, 11810, 11870, 11933, 11986, 12040, 12095, 12148, 12201, 5603, 6807, 7509, 8009, 8396, 8714, 8983, 9216, 9423, 9609, 9778, 9932, 10072, 10209, 10335, 10452, 10563, 10667, 10767, 10863, 10954, 11042, 11124, 11209, 11284, 11363, 11424, 11500, 11569, 11634, 11697, 11762, 11825, 11886, 11940, 12002, 12059, 12116, 12170, 12225, 5599, 6808, 7510, 8010, 8397, 8715, 8984, 9217, 9425, 9611, 9779, 9934, 10075, 10210, 10334, 10451, 10562, 10667, 10767, 10862, 10952, 11040, 11124, 11208, 11284, 11362, 11431, 11506, 11575, 11645, 11707, 11772, 11834, 11895, 11951, 12014, 12071, 12128, 12190, 12237, 6002, 7204, 7909, 8408, 8797, 9126, 9394, 9638, 9844, 10034, 10201, 10348, 10493, 10621, 10748, 10862, 10970, 11069, 11174, 11257, 11369, 11436, 11525, 11606, 11686, 11758, 11829, 11903, 11964, 12035, 12101, 12165, 12227, 12288, 12347, 12406, 12460, 12518, 12572, 12628, 6003, 7204, 7908, 8408, 8796, 9115, 9385, 9621, 9828, 10021, 10187, 10345, 10491, 10627, 10753, 10871, 10986, 11088, 11192, 11288, 11394, 11469, 11551, 11631, 11703, 11785, 11860, 11936, 12007, 12074, 12141, 12208, 12271, 12334, 12396, 12452, 12514, 12573, 12631, 12685, 6004, 7205, 7909, 8408, 8797, 9115, 9386, 9621, 9829, 10018, 10187, 10344, 10489, 10624, 10751, 10871, 10984, 11092, 11195, 11293, 11388, 11474, 11564, 11650, 11732, 11825, 11890, 11958, 12033, 12107, 12176, 12241, 12307, 12371, 12436, 12496, 12555, 12617, 12675, 12733, 6406, 7603, 8310, 8811, 9197, 9528, 9807, 10043, 10310, 10430, 10611, 10767, 10911, 11047, 11174, 11285, 11400, 11508, 11611, 11699, 11796, 11893, 11969, 12057, 12142, 12220, 12296, 12371, 12441, 12515, 12585, 12651, 12719, 12783, 12847, 12906, 12972, 13038, 13091, 13149, 6409, 7602, 8310, 8811, 9201, 9522, 9794, 10031, 10264, 10429, 10611, 10768, 10921, 11055, 11189, 11307, 11406, 11528, 11635, 11731, 11829, 11931, 12015, 12099, 12184, 12265, 12346, 12427, 12501, 12575, 12646, 12717, 12786, 12854, 12922, 12987, 13052, 13114, 13176, 13237, 6410, 7602, 8310, 8812, 9202, 9522, 9795, 10031, 10241, 10432, 10606, 10764, 10909, 11053, 11183, 11306, 11421, 11534, 11641, 11740, 11836, 11928, 12001, 12097, 12162, 12238, 12319, 12395, 12469, 12543, 12615, 12683, 12752, 12819, 12885, 12949, 13012, 13074, 13134, 13194, 6806, 8006, 8712, 9210, 9616, 9933, 10237, 10412, 10652, 10840, 11011, 11164, 11299, 11410, 11549, 11675, 11779, 11888, 11975, 12073, 12166, 12256, 12338, 12423, 12500, 12574, 12647, 12720, 12788, 12856, 12921, 12987, 13051, 13111, 13171, 13231, 13288, 6807, 8006, 8713, 9214, 9606, 9928, 10202, 10441, 10658, 10855, 11030, 11209, 11350, 11483, 11616, 11733, 11855, 11956, 12071, 12180, 12281, 12378, 12468, 12562, 12653, 12736, 12823, 12903, 12985, 13061, 13138, 13214, 13285, 6808, 8007, 8714, 9215, 9607, 9929, 10203, 10442, 10656, 10850, 11025, 11260, 11338, 11485, 11618, 11744, 11868, 11975, 12091, 12198, 12300, 12400, 12494, 12587, 12676, 12763, 12845, 12930, 13011, 13090, 13167, 13244, 7203, 8404, 9117, 9628, 10035, 10354, 10659, 10914, 11147, 11380, 11552, 11716, 11904, 12052, 12205, 12350, 12490, 12629, 12753, 12885, 13006, 13122, 13240, 7203, 8405, 9112, 9616, 10012, 10339, 10621, 10863, 11067, 11254, 11419, 11587, 11729, 11876, 12000, 12124, 12241, 12353, 12456, 12562, 12658, 12756, 12847, 12938, 13024, 13110, 13192, 13275, 7203, 8406, 9112, 9617, 10012, 10337, 10615, 10859, 11077, 11248, 11460, 11652, 11791, 11940, 12076, 12212, 12324, 12430, 12541, 12648, 12755, 12857, 12957, 13054, 13147, 13241, 7606, 8805, 9529, 10039, 10389, 10754, 11037, 11275, 11460, 11674, 11852, 12002, 12155, 12296, 12430, 12553, 12680, 12791, 12898, 13007, 13108, 13205, 7607, 8809, 9516, 10022, 10413, 10745, 11028, 11274, 11465, 11672, 11849, 12002, 12160, 12296, 12430, 12553, 12673, 12793, 12899, 13003, 13109, 13208, 7607, 8809, 9516, 10020, 10415, 10744, 11025, 11273, 11492, 11680, 11880, 12068, 12212, 12358, 12494, 12627, 12752, 12878, 12993, 13110, 13220, 8006, 9206, 9946, 10405, 10854, 11193, 11444, 11706, 11936, 12136, 12320, 12490, 12660, 12814, 12959, 13093, 13237, 8007, 9203, 9925, 10423, 10846, 11183, 11436, 11694, 11926, 12117, 12295, 12461, 12621, 12767, 12911, 13051, 13177, 8008, 9212, 9921, 10428, 10830, 11162, 11443, 11703, 11930, 12135, 12321, 12495, 12659, 12815, 12960, 13102, 13241, 8400, 9616, 10349, 10895, 11315, 11634, 11921, 12168, 12401, 12617, 12811, 13012, 13180, 8398, 9607, 10331, 10859, 11293, 11620, 11911, 12158, 12386, 12597, 12790, 12979, 13148, 8400, 9614, 10323, 10842, 11255, 11606, 11902, 12163, 12395, 12617, 12820, 13012, 13186, 8802, 10047, 10789, 11338, 11714, 12032, 12335, 12599, 12833, 13055, 13264, 8809, 10024, 10758, 11307, 11704, 12027, 12332, 12600, 12838, 13051, 13262, 8810, 10018, 10730, 11263, 11677, 12025, 12336, 12607, 12848, 13066, 13282, 9119, 10411, 11228, 11733, 12138, 12481, 12772, 13058, 9211, 10418, 11212, 11719, 12131, 12476, 12767, 13048, 9216, 10420, 11163, 11688, 12105, 12453, 12745, 13030, 13271, 9334, 10833, 11609, 12150, 12590, 12947, 13265, 9578, 10866, 11617, 12155, 12598, 12960, 13292, 9613, 10827, 11575, 12112, 12547, 12902, 13211, 9520, 11256, 12011, 12541, 12935, 13269, 9943, 11276, 12039, 12603, 13022, 9996, 11242, 12016, 12585, 13016, 8908, 11863, 12902, 10199, 11574, 12376, 12924, 10409, 11646, 12421, 12947], \"harmonics_mags\": [[39, 40, 41, 42, 37, 37, 40, 39, 42, 46, 41, 42, 44, 41, 41, 39, 42, 41, 40, 40], [51, 53, 55, 56, 55, 50, 48, 53, 49, 49, 51, 52, 53, 52, 52, 52, 53, 50, 52, 50], [65, 68, 70, 72, 73, 73, 73, 73, 73, 73, 72, 72, 72, 72, 71, 71, 70, 70, 68, 67], [69, 71, 73, 74, 75, 77, 77, 77, 74, 75, 75, 75, 75, 74, 72, 71, 69, 67, 62, 59], [69, 71, 73, 73, 74, 73, 74, 74, 75, 74, 74, 74, 73, 72, 71, 70, 67, 64, 58, 53], [68, 70, 72, 74, 75, 76, 77, 76, 72, 74, 72, 73, 72, 71, 71, 70, 68, 66, 62, 58], [52, 52, 52, 52, 53, 53, 49, 52, 53, 51, 52, 52, 52, 53, 52, 51, 51, 50, 46, 45], [43, 41, 44, 48, 54, 56, 56, 58, 59, 58, 56, 56, 50, 47, 47, 42, 39, 34, 29, 21], [48, 52, 55, 56, 59, 60, 62, 63, 62, 63, 63, 63, 62, 62, 60, 58, 56, 53, 49, 44], [56, 57, 57, 58, 59, 61, 61, 63, 63, 65, 64, 63, 62, 61, 59, 57, 53, 50, 45, 44], [47, 45, 51, 57, 62, 65, 67, 67, 66, 65, 64, 63, 62, 61, 59, 57, 53, 49, 41, 30], [61, 63, 64, 66, 68, 69, 71, 71, 71, 72, 71, 71, 70, 70, 68, 67, 64, 60, 48, 46], [58, 60, 61, 62, 63, 64, 64, 65, 66, 66, 66, 65, 65, 64, 62, 61, 58, 55, 49, 40], [45, 51, 55, 57, 61, 62, 63, 63, 62, 62, 62, 61, 61, 60, 60, 59, 57, 55, 48, 44], [51, 53, 54, 56, 57, 58, 58, 59, 61, 61, 61, 60, 60, 59, 57, 56, 51, 46, 38, 45], [45, 46, 47, 47, 47, 46, 47, 47, 42, 39, 51, 49, 46, 44, 45, 44, 43, 41, 39, 37], [46, 48, 49, 50, 50, 48, 44, 41, 42, 41, 40, 40, 37, 35, 33, 13, 29, 32, 35, 32], [48, 50, 51, 52, 53, 54, 55, 54, 54, 55, 54, 54, 53, 53, 51, 49, 45, 38, 30, 37], [50, 52, 52, 53, 53, 53, 53, 53, 52, 52, 52, 51, 51, 51, 50, 48, 45, 42, 33, 29], [49, 51, 52, 53, 53, 53, 51, 49, 48, 49, 48, 48, 48, 47, 47, 45, 44, 44, 42, 41], [35, 39, 41, 43, 45, 44, 38, 27, 15, 37, 36, 38, 40, 43, 44, 46, 47, 46, 41, 33], [36, 38, 39, 40, 42, 40, 33, 37, 43, 44, 43, 44, 43, 43, 43, 42, 41, 39, 36, 35], [39, 41, 43, 44, 45, 46, 47, 46, 45, 44, 44, 43, 41, 41, 34, 30, 31, 35, 38, 35], [38, 40, 42, 43, 43, 43, 44, 46, 47, 46, 46, 46, 46, 45, 43, 42, 40, 37, 34, 31], [36, 37, 38, 38, 38, 38, 38, 37, 39, 39, 38, 37, 38, 37, 34, 32, 25, 17, 26, 26], [30, 30, 28, 26, 24, 23, 29, 30, 31, 30, 25, 29, 27, 23, 23, 24, 24, 24, 13, 17], [26, 24, 21, 25, 31, 30, 35, 35, 32, 35, 34, 33, 33, 31, 28, 22, 22, 23, 19, 16], [26, 24, 23, 23, 26, 32, 32, 32, 33, 35, 35, 31, 31, 33, 29, 29, 26, 21, 0, 12], [41, 41, 40, 38, 37, 41, 31, 35, 24, 30, 31, 19, 32, 18, 27, 27, 21, 17, 8, 13], [38, 38, 37, 35, 19, 33, 35, 31, 34, 34, 31, 23, 25, 21, 21, 22, 19, 20, 5, 11], [27, 29, 30, 29, 21, 24, 9, 26, 21, 23, 22, 7, 25, 23, 21, 16, 20, 16, 12, 13], [19, 21, 22, 23, 22, 12, 16, 6, 20, 19, 14, 10, 16, 14, 12, 11, 11, 7, 13, 10], [12, 6, 0, 12, 19, 22, 24, 17, 23, 24, 21, 14, 21, 15, 11, 18, 17, 12, 14, 9], [3, 10, 14, 17, 17, 12, 5, 14, 1, 16, 13, 19, 10, 20, 11, 8, 12, 8, 15, 13], [15, 17, 18, 19, 20, 20, 18, 14, 12, 18, 14, 17, 21, 15, 15, 11, 11, 14, 14, 14], [27, 28, 29, 30, 29, 28, 28, 27, 28, 28, 27, 28, 30, 27, 23, 19, 21, 21, 16, 4], [20, 21, 20, 20, 17, 16, 25, 26, 23, 19, 24, 22, 25, 25, 18, 4, 21, 13, 2, 6], [20, 20, 20, 19, 20, 20, 19, 18, 20, 20, 23, 19, 23, 20, 17, 6, 0, 5, 7, 0], [17, 20, 22, 22, 22, 20, 22, 19, 23, 20, 18, 10, 3, 18, 14, 12, 8, 8, 0, 1], [28, 29, 30, 31, 31, 29, 24, 21, 20, 19, 18, 15, 19, 16, 10, 5, 7, 2, 3, 16], [38, 36, 36, 36, 33, 30, 34, 44, 47, 42, 41, 35, 41, 39, 42, 37, 44, 42, 40, 38], [55, 59, 62, 65, 67, 66, 59, 57, 61, 59, 59, 59, 60, 58, 58, 57, 57, 56, 56, 53], [70, 73, 76, 79, 81, 82, 79, 79, 81, 80, 80, 79, 79, 79, 78, 77, 75, 74, 71, 68], [73, 76, 77, 78, 79, 79, 79, 76, 78, 77, 77, 77, 76, 76, 75, 75, 73, 71, 67, 61], [74, 77, 79, 81, 83, 84, 84, 82, 84, 83, 83, 83, 83, 82, 81, 80, 79, 77, 73, 69], [71, 73, 75, 76, 78, 79, 78, 79, 79, 79, 78, 78, 78, 78, 77, 76, 75, 74, 72, 69], [66, 68, 69, 69, 69, 68, 65, 64, 66, 69, 69, 69, 68, 68, 67, 66, 65, 63, 61, 58], [62, 62, 62, 62, 65, 68, 70, 71, 72, 71, 69, 68, 67, 65, 63, 61, 57, 51, 44, 43], [54, 58, 61, 64, 67, 66, 65, 67, 66, 66, 67, 66, 66, 66, 64, 63, 61, 59, 55, 51], [62, 64, 65, 66, 63, 48, 63, 62, 49, 44, 52, 50, 48, 50, 49, 48, 50, 51, 51, 51], [59, 62, 65, 67, 72, 75, 78, 77, 76, 74, 72, 70, 69, 68, 65, 63, 58, 52, 40, 47], [66, 68, 69, 70, 70, 70, 70, 72, 73, 74, 73, 72, 71, 70, 68, 66, 62, 60, 56, 52], [57, 60, 64, 67, 71, 72, 69, 67, 69, 71, 73, 72, 72, 71, 70, 69, 67, 64, 59, 54], [61, 64, 67, 69, 71, 73, 75, 74, 74, 75, 74, 74, 74, 73, 72, 71, 68, 66, 66, 64], [48, 48, 47, 45, 53, 59, 62, 64, 58, 56, 57, 52, 54, 53, 52, 53, 54, 54, 53, 49], [53, 54, 55, 57, 61, 65, 68, 67, 63, 43, 57, 47, 54, 57, 57, 50, 54, 51, 50, 48], [56, 59, 61, 62, 62, 58, 43, 49, 52, 51, 49, 47, 47, 47, 45, 45, 44, 44, 34, 35], [59, 60, 61, 60, 59, 55, 42, 48, 40, 44, 46, 46, 46, 42, 43, 44, 40, 39, 39, 32], [56, 59, 61, 63, 64, 65, 65, 64, 63, 63, 63, 62, 62, 63, 63, 62, 60, 57, 57, 51], [51, 56, 59, 61, 63, 64, 63, 62, 57, 50, 53, 54, 54, 52, 54, 52, 52, 51, 49, 45], [61, 63, 64, 65, 66, 67, 67, 68, 68, 69, 69, 68, 67, 66, 65, 66, 65, 61, 60, 58], [56, 59, 62, 64, 66, 67, 67, 67, 67, 67, 68, 68, 67, 67, 66, 64, 62, 60, 56, 51], [55, 57, 57, 57, 57, 55, 55, 59, 61, 61, 60, 61, 60, 59, 57, 56, 55, 53, 50, 47], [55, 58, 60, 62, 63, 64, 64, 63, 63, 64, 63, 63, 62, 62, 61, 60, 58, 56, 53, 49], [59, 60, 61, 61, 61, 59, 57, 55, 55, 56, 54, 54, 54, 54, 52, 50, 50, 47, 43, 38], [51, 51, 50, 49, 50, 53, 45, 36, 38, 39, 40, 29, 34, 42, 37, 26, 26, 14, 18, 22], [57, 57, 57, 56, 54, 49, 55, 57, 54, 56, 56, 56, 55, 53, 52, 51, 48, 44, 39, 31], [57, 57, 56, 56, 59, 62, 65, 65, 61, 62, 60, 59, 59, 59, 59, 55, 54, 47, 43, 34], [55, 53, 48, 29, 53, 58, 59, 60, 57, 59, 58, 58, 58, 56, 54, 52, 46, 42, 32, 21], [58, 60, 61, 62, 63, 63, 61, 57, 61, 61, 59, 58, 57, 56, 54, 52, 49, 45, 37, 28], [51, 53, 54, 55, 56, 57, 58, 58, 59, 58, 58, 57, 53, 46, 51, 54, 42, 48, 40, 34], [46, 48, 49, 51, 52, 53, 54, 55, 55, 55, 55, 55, 54, 52, 51, 51, 47, 45, 39, 35], [49, 50, 50, 50, 49, 46, 45, 46, 47, 48, 47, 49, 47, 44, 44, 44, 39, 37, 32, 28], [42, 44, 45, 46, 46, 45, 44, 44, 44, 45, 45, 44, 44, 43, 42, 41, 38, 35, 27, 22], [35, 34, 32, 31, 31, 31, 28, 29, 34, 34, 37, 30, 34, 35, 23, 31, 27, 10, 15, 4], [45, 46, 47, 48, 48, 47, 44, 41, 48, 47, 49, 48, 45, 41, 41, 43, 39, 34, 29, 23], [33, 32, 30, 33, 40, 43, 42, 41, 45, 40, 45, 39, 40, 34, 43, 24, 36, 23, 17, 20], [36, 37, 39, 40, 42, 43, 44, 45, 45, 45, 45, 45, 43, 37, 35, 32, 34, 33, 24, 19], [41, 42, 43, 44, 45, 46, 45, 45, 40, 46, 35, 45, 47, 43, 37, 41, 28, 27, 15, 12], [39, 40, 41, 41, 40, 39, 40, 42, 39, 40, 37, 43, 37, 41, 35, 35, 25, 24, 19, 14], [45, 45, 44, 49, 54, 58, 57, 42, 53, 50, 57, 43, 48, 54, 29, 47, 47, 48, 42, 42], [67, 70, 74, 76, 79, 80, 76, 69, 73, 71, 68, 69, 70, 69, 69, 69, 67, 66, 65, 63], [77, 81, 84, 86, 90, 92, 92, 91, 93, 92, 92, 91, 91, 91, 90, 89, 88, 86, 83, 80], [79, 84, 86, 88, 90, 90, 90, 88, 88, 87, 88, 87, 86, 86, 85, 84, 83, 81, 77, 72], [76, 82, 86, 89, 93, 95, 96, 95, 96, 96, 96, 95, 95, 94, 93, 92, 90, 88, 84, 80], [81, 84, 86, 88, 90, 91, 90, 89, 90, 89, 89, 88, 88, 88, 87, 87, 86, 85, 83, 81], [77, 79, 81, 82, 82, 81, 78, 76, 79, 80, 81, 80, 80, 79, 79, 78, 76, 74, 71, 68], [76, 77, 78, 78, 77, 79, 83, 85, 86, 85, 83, 83, 81, 79, 77, 75, 70, 62, 56, 52], [69, 69, 70, 73, 79, 81, 78, 76, 80, 78, 79, 78, 78, 78, 76, 75, 73, 70, 65, 61], [76, 78, 78, 79, 78, 69, 77, 76, 67, 67, 68, 70, 67, 67, 62, 58, 55, 57, 60, 62], [74, 76, 78, 80, 83, 85, 89, 89, 89, 88, 85, 83, 82, 81, 79, 78, 74, 70, 61, 54], [66, 72, 76, 79, 82, 84, 86, 87, 86, 86, 85, 85, 84, 83, 81, 80, 76, 74, 68, 64], [66, 67, 71, 76, 82, 85, 85, 82, 83, 84, 84, 83, 83, 83, 82, 80, 79, 76, 72, 67], [63, 68, 73, 76, 81, 84, 87, 87, 86, 86, 86, 87, 86, 85, 84, 83, 80, 76, 75, 75], [56, 56, 56, 55, 59, 67, 73, 77, 80, 79, 78, 70, 73, 73, 71, 66, 67, 67, 65, 61], [56, 53, 53, 61, 72, 78, 82, 80, 73, 77, 72, 74, 75, 76, 74, 56, 70, 64, 63, 61], [71, 74, 76, 78, 79, 77, 57, 70, 70, 70, 64, 63, 65, 66, 61, 63, 61, 59, 50, 50], [72, 74, 75, 76, 75, 73, 67, 72, 69, 68, 69, 70, 67, 66, 64, 64, 60, 58, 56, 51], [67, 71, 75, 77, 80, 81, 82, 82, 82, 81, 81, 80, 80, 80, 79, 78, 76, 73, 71, 66], [60, 65, 71, 74, 79, 81, 82, 81, 81, 79, 79, 77, 78, 76, 74, 71, 70, 68, 64, 61], [71, 75, 78, 80, 82, 84, 85, 86, 84, 84, 84, 84, 83, 82, 81, 81, 79, 73, 71, 71], [67, 71, 75, 78, 82, 84, 85, 86, 85, 86, 85, 84, 83, 83, 82, 81, 77, 76, 71, 67], [70, 73, 75, 76, 77, 76, 70, 68, 73, 74, 75, 76, 75, 74, 70, 70, 68, 66, 59, 55], [70, 74, 77, 79, 82, 83, 83, 82, 81, 81, 82, 81, 81, 80, 78, 76, 74, 71, 66, 63], [75, 78, 80, 81, 81, 81, 77, 71, 67, 71, 67, 73, 69, 69, 68, 65, 63, 59, 51, 48], [74, 74, 73, 72, 69, 67, 73, 74, 59, 73, 57, 72, 57, 71, 44, 67, 59, 58, 46, 46], [75, 77, 77, 77, 76, 74, 76, 78, 75, 80, 79, 77, 74, 74, 72, 70, 65, 62, 54, 48], [77, 80, 81, 82, 83, 85, 88, 88, 82, 83, 85, 82, 81, 81, 78, 73, 64, 65, 63, 53], [71, 72, 74, 75, 77, 79, 79, 81, 79, 79, 77, 78, 77, 73, 70, 66, 61, 56, 41, 34], [76, 79, 82, 84, 86, 87, 86, 85, 84, 84, 82, 82, 81, 80, 76, 71, 67, 65, 50, 46], [72, 75, 77, 78, 80, 81, 81, 80, 80, 80, 79, 77, 72, 67, 72, 71, 64, 60, 55, 53], [74, 75, 77, 77, 78, 78, 79, 79, 77, 78, 77, 77, 76, 74, 70, 69, 62, 60, 48, 46], [70, 72, 72, 73, 73, 73, 74, 74, 74, 75, 73, 74, 72, 68, 64, 64, 58, 52, 48, 42], [64, 67, 69, 71, 73, 73, 70, 71, 72, 71, 70, 69, 69, 66, 64, 63, 58, 56, 52, 47], [62, 66, 69, 70, 68, 57, 68, 71, 67, 70, 66, 61, 67, 68, 67, 57, 61, 49, 34, 30], [68, 70, 71, 72, 73, 75, 77, 73, 76, 76, 77, 76, 73, 71, 65, 64, 58, 55, 50, 42], [61, 61, 59, 51, 62, 64, 61, 54, 68, 65, 70, 67, 72, 73, 70, 57, 61, 55, 49, 43], [69, 71, 71, 71, 76, 78, 79, 78, 71, 73, 75, 68, 74, 76, 64, 61, 62, 51, 43, 36], [60, 60, 62, 64, 68, 67, 70, 74, 72, 71, 72, 74, 72, 70, 62, 62, 55, 55, 43, 38], [63, 65, 67, 69, 69, 67, 58, 65, 64, 68, 69, 68, 69, 65, 60, 56, 52, 45, 35, 31], [41, 41, 40, 38, 39, 38, 32, 40, 38, 46, 42, 32, 43, 38, 23, 41, 45, 37, 35, 45], [58, 63, 66, 69, 70, 70, 73, 73, 75, 76, 76, 76, 75, 74, 69, 63, 50, 43, 29, 34], [67, 70, 72, 73, 75, 76, 77, 77, 74, 74, 76, 75, 74, 73, 72, 70, 68, 65, 59, 52], [64, 68, 71, 72, 74, 74, 73, 72, 74, 74, 74, 74, 73, 73, 72, 72, 70, 69, 66, 64], [65, 67, 69, 70, 71, 71, 71, 71, 71, 71, 72, 71, 71, 70, 69, 68, 66, 64, 59, 51], [62, 64, 66, 67, 67, 66, 63, 65, 68, 68, 69, 70, 70, 69, 68, 66, 63, 60, 55, 50], [63, 65, 66, 67, 68, 67, 68, 67, 66, 67, 67, 67, 67, 66, 65, 64, 63, 61, 57, 53], [39, 39, 42, 45, 49, 50, 45, 44, 47, 48, 47, 48, 46, 46, 44, 45, 42, 39, 37, 33], [43, 44, 45, 47, 49, 51, 50, 52, 53, 50, 50, 50, 50, 47, 46, 46, 47, 43, 41, 40], [44, 43, 39, 25, 45, 50, 54, 54, 54, 55, 55, 56, 55, 54, 54, 53, 52, 51, 48, 45], [36, 46, 51, 55, 58, 60, 61, 63, 63, 63, 64, 63, 63, 63, 62, 61, 59, 57, 53, 50], [51, 54, 56, 57, 58, 59, 60, 60, 59, 60, 60, 59, 59, 58, 58, 56, 54, 53, 49, 46], [45, 48, 50, 52, 51, 53, 58, 58, 58, 59, 59, 59, 59, 59, 58, 58, 57, 54, 48, 40], [43, 46, 49, 52, 56, 60, 62, 61, 62, 62, 61, 60, 59, 58, 56, 55, 53, 49, 21, 35], [46, 47, 48, 49, 49, 50, 51, 52, 53, 53, 53, 53, 52, 51, 49, 47, 41, 35, 41, 42], [38, 39, 40, 41, 40, 40, 41, 38, 37, 39, 37, 35, 35, 33, 29, 19, 28, 32, 31, 14], [28, 28, 26, 24, 25, 28, 31, 30, 34, 31, 31, 29, 22, 31, 27, 18, 13, 19, 13, 10], [38, 40, 41, 41, 41, 42, 43, 43, 43, 43, 43, 43, 41, 38, 31, 18, 37, 38, 24, 30], [34, 37, 39, 40, 42, 41, 39, 41, 40, 40, 39, 38, 38, 36, 29, 26, 35, 33, 25, 22], [24, 27, 29, 30, 29, 29, 31, 28, 28, 30, 30, 32, 30, 32, 26, 20, 24, 24, 25, 22], [21, 24, 26, 28, 32, 34, 35, 35, 34, 34, 34, 33, 32, 28, 14, 21, 27, 14, 20, 19], [30, 31, 32, 33, 33, 33, 32, 29, 29, 32, 33, 33, 34, 31, 26, 23, 29, 18, 11, 13], [33, 35, 35, 36, 36, 36, 34, 34, 36, 34, 34, 32, 27, 20, 31, 30, 4, 26, 25, 16], [25, 26, 27, 26, 23, 21, 16, 24, 25, 28, 28, 29, 31, 29, 19, 27, 18, 18, 15, 10], [17, 17, 15, 12, 10, 15, 16, 25, 15, 19, 21, 19, 11, 14, 15, 17, 5, 13, 14, 0], [28, 28, 27, 27, 25, 18, 28, 26, 22, 19, 8, 21, 21, 20, 16, 19, 19, 15, 8, 5], [34, 34, 33, 31, 34, 37, 36, 37, 34, 30, 26, 21, 22, 26, 20, 12, 12, 16, 7, 16], [29, 31, 32, 33, 33, 31, 18, 19, 18, 21, 21, 21, 21, 22, 21, 22, 16, 16, 1, 16], [23, 23, 22, 22, 21, 24, 25, 26, 26, 28, 27, 28, 27, 25, 24, 21, 20, 16, 13, 16], [27, 29, 30, 31, 31, 30, 32, 32, 31, 31, 30, 26, 13, 29, 30, 22, 23, 15, 9, 12], [24, 26, 28, 29, 29, 28, 25, 27, 28, 29, 28, 24, 19, 27, 19, 24, 20, 11, 4, 6], [14, 13, 11, 9, 0, 11, 19, 19, 10, 8, 7, 15, 20, 16, 10, 15, 7, 0, 0, 10], [15, 14, 12, 5, 10, 15, 8, 16, 0, 12, 6, 13, 5, 8, 13, 10, 5, 11, 6, 0], [6, 4, 7, 11, 12, 8, 6, 0, 9, 10, 0, 9, 0, 15, 10, 7, 7, 5, 7, 7], [7, 11, 13, 15, 15, 12, 8, 14, 10, 14, 5, 6, 12, 5, 5, 13, 5, 6, 2, 5], [15, 15, 14, 14, 13, 11, 10, 0, 12, 15, 15, 18, 16, 12, 10, 15, 14, 15, 0, 2], [17, 16, 13, 7, 15, 20, 16, 18, 14, 14, 13, 10, 12, 10, 11, 14, 16, 15, 15, 10], [23, 22, 22, 20, 13, 10, 23, 21, 15, 7, 16, 16, 10, 9, 15, 0, 0, 10, 9, 9], [31, 32, 33, 32, 30, 28, 26, 26, 19, 20, 18, 10, 14, 0, 13, 11, 10, 3, 8, 7], [15, 15, 13, 8, 2, 12, 17, 17, 5, 9, 11, 12, 10, 14, 8, 0, 10, 0, 6, 9], [47, 48, 46, 41, 45, 42, 48, 47, 47, 48, 46, 51, 47, 43, 48, 38, 42, 27, 42, 34], [47, 60, 67, 71, 76, 77, 79, 80, 81, 82, 82, 81, 80, 78, 76, 73, 65, 51, 42, 38], [65, 71, 75, 77, 80, 82, 83, 83, 81, 81, 82, 81, 81, 79, 78, 76, 72, 70, 65, 60], [63, 69, 73, 76, 80, 81, 81, 79, 80, 81, 80, 80, 80, 79, 79, 78, 77, 75, 73, 71], [67, 71, 73, 75, 77, 78, 78, 78, 78, 78, 79, 78, 78, 77, 77, 76, 74, 72, 66, 59], [65, 69, 72, 74, 75, 75, 73, 72, 75, 77, 78, 78, 78, 78, 77, 75, 72, 69, 63, 57], [68, 71, 73, 75, 76, 76, 76, 76, 75, 76, 76, 76, 75, 75, 74, 73, 71, 69, 65, 62], [47, 45, 35, 42, 56, 59, 57, 53, 56, 55, 54, 55, 54, 55, 53, 52, 51, 50, 47, 44], [56, 56, 57, 57, 59, 60, 60, 62, 61, 61, 59, 60, 60, 59, 57, 58, 55, 54, 51, 48], [55, 57, 58, 56, 46, 57, 63, 65, 65, 66, 67, 66, 66, 66, 65, 64, 63, 62, 58, 55], [43, 51, 57, 62, 67, 70, 71, 73, 74, 74, 75, 74, 74, 74, 73, 72, 70, 69, 65, 61], [56, 61, 64, 67, 69, 70, 72, 72, 71, 71, 71, 71, 71, 70, 70, 69, 68, 66, 63, 60], [55, 58, 61, 63, 65, 63, 70, 71, 71, 72, 72, 72, 72, 72, 72, 71, 69, 67, 61, 56], [53, 56, 58, 61, 66, 71, 76, 76, 76, 76, 75, 75, 73, 72, 70, 69, 67, 62, 37, 51], [55, 59, 61, 63, 64, 64, 66, 66, 67, 67, 67, 67, 66, 65, 62, 60, 52, 50, 55, 56], [52, 54, 56, 57, 56, 55, 56, 55, 53, 54, 52, 52, 50, 49, 43, 31, 45, 48, 44, 28], [46, 47, 48, 47, 43, 44, 48, 49, 49, 48, 49, 47, 46, 45, 39, 28, 38, 42, 34, 34], [53, 57, 59, 61, 61, 61, 62, 62, 62, 61, 61, 60, 57, 55, 45, 45, 55, 54, 46, 46], [51, 54, 57, 59, 61, 62, 61, 61, 61, 60, 59, 59, 57, 55, 45, 46, 55, 52, 47, 42], [45, 48, 51, 52, 54, 55, 57, 56, 58, 59, 59, 59, 59, 57, 51, 47, 56, 48, 51, 47], [49, 51, 53, 54, 55, 57, 59, 59, 57, 56, 56, 54, 53, 50, 34, 50, 51, 38, 36, 42], [52, 55, 56, 57, 58, 57, 57, 56, 58, 58, 58, 58, 57, 55, 34, 52, 52, 45, 37, 30], [51, 54, 56, 57, 58, 58, 59, 60, 59, 58, 56, 54, 50, 48, 54, 56, 44, 52, 48, 43], [47, 48, 49, 48, 42, 32, 42, 46, 49, 51, 52, 52, 51, 47, 40, 48, 31, 44, 36, 29], [44, 44, 42, 40, 34, 35, 30, 35, 45, 43, 42, 28, 39, 13, 39, 35, 29, 33, 11, 15], [39, 42, 46, 49, 51, 49, 37, 48, 40, 48, 39, 37, 34, 37, 33, 32, 32, 31, 19, 4], [54, 56, 57, 57, 51, 44, 48, 54, 55, 54, 55, 55, 53, 51, 44, 44, 40, 42, 37, 29], [48, 50, 51, 52, 52, 51, 41, 40, 33, 35, 37, 38, 36, 40, 39, 39, 35, 30, 27, 17], [42, 44, 44, 44, 44, 43, 44, 44, 43, 45, 45, 44, 43, 41, 41, 38, 36, 31, 27, 20], [41, 43, 44, 45, 44, 44, 45, 46, 47, 46, 46, 45, 33, 40, 43, 36, 32, 25, 19, 16], [26, 25, 28, 32, 36, 35, 34, 37, 38, 40, 38, 37, 24, 35, 28, 35, 31, 26, 17, 22], [28, 27, 26, 23, 18, 23, 32, 27, 26, 24, 22, 23, 27, 25, 21, 16, 11, 11, 6, 6], [24, 26, 28, 28, 26, 23, 26, 22, 22, 21, 23, 25, 22, 21, 21, 10, 15, 10, 11, 7], [31, 32, 32, 31, 27, 16, 25, 23, 10, 15, 22, 9, 1, 10, 14, 14, 15, 11, 14, 7], [12, 19, 22, 23, 21, 21, 16, 19, 14, 10, 10, 17, 12, 7, 11, 15, 14, 2, 1, 5], [28, 28, 30, 30, 29, 25, 25, 24, 25, 26, 27, 23, 27, 22, 24, 23, 20, 19, 11, 12], [37, 38, 37, 35, 24, 30, 34, 20, 24, 31, 6, 31, 27, 30, 22, 27, 12, 21, 13, 14], [47, 50, 51, 51, 50, 45, 41, 40, 36, 36, 29, 28, 31, 25, 24, 21, 24, 14, 9, 10], [41, 42, 42, 41, 38, 40, 40, 41, 39, 36, 38, 30, 27, 34, 36, 26, 27, 24, 13, 15], [31, 33, 32, 30, 20, 26, 27, 26, 22, 25, 13, 20, 23, 17, 13, 20, 4, 11, 6, 7], [60, 59, 58, 56, 60, 63, 63, 44, 60, 60, 54, 53, 46, 40, 43, 44, 41, 40, 44, 47], [67, 73, 79, 82, 87, 88, 89, 92, 93, 93, 92, 91, 89, 87, 86, 85, 81, 76, 60, 44], [69, 77, 82, 86, 89, 92, 94, 94, 93, 93, 94, 93, 92, 92, 90, 88, 84, 80, 73, 66], [73, 78, 82, 86, 90, 92, 92, 90, 90, 92, 91, 91, 91, 90, 90, 88, 87, 86, 83, 80], [74, 78, 81, 83, 86, 88, 89, 89, 90, 89, 90, 89, 89, 88, 88, 87, 85, 84, 79, 72], [66, 74, 79, 82, 86, 88, 87, 84, 86, 87, 87, 88, 88, 87, 86, 84, 82, 80, 74, 68], [80, 83, 85, 87, 90, 90, 91, 90, 89, 90, 90, 90, 89, 89, 88, 87, 85, 83, 79, 76], [56, 56, 63, 68, 74, 77, 74, 67, 69, 69, 68, 68, 68, 68, 67, 65, 63, 62, 59, 55], [71, 73, 74, 75, 75, 75, 73, 74, 73, 75, 72, 72, 72, 71, 67, 71, 67, 65, 63, 60], [65, 68, 70, 70, 71, 76, 77, 79, 79, 80, 80, 80, 80, 80, 79, 78, 76, 75, 72, 68], [65, 70, 73, 76, 81, 83, 86, 87, 88, 89, 89, 88, 87, 87, 86, 85, 84, 83, 79, 76], [67, 73, 77, 80, 83, 83, 85, 86, 85, 84, 84, 83, 84, 83, 82, 81, 79, 78, 74, 72], [66, 70, 73, 77, 81, 80, 83, 86, 86, 84, 86, 85, 85, 84, 84, 83, 82, 80, 74, 68], [64, 69, 72, 76, 83, 88, 93, 93, 93, 93, 92, 92, 90, 88, 86, 85, 84, 80, 54, 66], [71, 76, 79, 81, 83, 83, 85, 85, 87, 87, 86, 85, 84, 82, 78, 74, 62, 70, 73, 71], [69, 72, 74, 75, 76, 76, 75, 73, 72, 69, 67, 64, 64, 61, 47, 51, 62, 64, 58, 50], [65, 67, 67, 66, 63, 64, 68, 69, 70, 71, 70, 69, 68, 67, 61, 44, 61, 64, 55, 55], [70, 74, 77, 79, 81, 81, 81, 80, 81, 81, 81, 81, 79, 77, 69, 61, 75, 75, 65, 67], [70, 73, 75, 77, 79, 80, 80, 79, 80, 78, 78, 76, 74, 72, 60, 64, 71, 69, 63, 58], [64, 68, 72, 74, 76, 77, 77, 73, 75, 75, 75, 75, 75, 75, 71, 67, 69, 66, 65, 59], [68, 71, 73, 74, 76, 78, 79, 78, 75, 75, 74, 74, 73, 70, 62, 68, 71, 58, 56, 60], [76, 79, 80, 81, 82, 83, 83, 82, 83, 82, 82, 81, 78, 74, 69, 77, 72, 71, 64, 57], [75, 78, 80, 82, 83, 83, 85, 85, 83, 84, 82, 79, 73, 66, 78, 80, 60, 75, 71, 66], [70, 72, 73, 73, 69, 60, 67, 65, 69, 72, 74, 74, 73, 73, 56, 68, 58, 65, 59, 41], [60, 60, 51, 53, 67, 69, 64, 58, 69, 64, 62, 62, 63, 44, 61, 57, 54, 53, 42, 28], [70, 74, 77, 79, 81, 78, 68, 76, 72, 75, 66, 62, 62, 64, 55, 57, 52, 50, 42, 19], [78, 81, 82, 82, 72, 79, 85, 86, 88, 88, 88, 88, 86, 82, 78, 75, 75, 74, 64, 60], [72, 75, 77, 78, 78, 77, 60, 72, 66, 67, 71, 73, 74, 73, 70, 66, 66, 60, 56, 51], [72, 74, 75, 75, 76, 76, 80, 81, 82, 82, 83, 82, 77, 73, 78, 69, 64, 59, 51, 43], [72, 76, 79, 81, 82, 83, 83, 83, 84, 83, 82, 79, 72, 78, 76, 73, 68, 63, 48, 49], [66, 70, 73, 75, 77, 78, 76, 77, 77, 78, 78, 75, 59, 74, 60, 72, 68, 58, 56, 55], [64, 65, 65, 65, 66, 67, 69, 67, 69, 65, 55, 64, 70, 68, 64, 62, 54, 44, 51, 50], [54, 57, 59, 60, 59, 57, 55, 53, 51, 57, 60, 62, 57, 24, 57, 52, 52, 48, 27, 38], [60, 62, 63, 64, 62, 59, 50, 48, 54, 42, 47, 44, 44, 41, 45, 38, 41, 34, 30, 22], [61, 63, 65, 65, 63, 59, 54, 56, 61, 49, 61, 62, 59, 49, 53, 54, 49, 49, 40, 36], [49, 55, 60, 63, 65, 64, 59, 67, 69, 70, 74, 73, 64, 67, 61, 67, 55, 55, 48, 49], [62, 64, 65, 64, 58, 58, 63, 71, 76, 73, 74, 59, 67, 60, 71, 65, 62, 57, 34, 42], [64, 68, 72, 75, 77, 79, 86, 83, 83, 82, 60, 73, 66, 72, 69, 64, 63, 58, 43, 35], [69, 72, 74, 75, 76, 77, 80, 79, 80, 76, 74, 74, 69, 75, 71, 62, 60, 56, 48, 41], [62, 62, 61, 59, 61, 61, 52, 64, 67, 62, 53, 62, 59, 56, 59, 61, 42, 48, 44, 40], [54, 54, 53, 50, 43, 45, 53, 42, 41, 37, 38, 44, 34, 43, 47, 41, 46, 45, 44, 45], [68, 72, 74, 75, 77, 77, 76, 75, 74, 75, 73, 72, 72, 71, 70, 68, 64, 61, 62, 63], [65, 67, 68, 67, 63, 60, 62, 61, 60, 56, 58, 56, 59, 58, 57, 56, 54, 55, 52, 50], [68, 70, 71, 72, 71, 70, 70, 70, 69, 68, 68, 68, 67, 66, 63, 60, 53, 52, 52, 47], [70, 72, 73, 73, 74, 75, 76, 76, 77, 77, 77, 77, 75, 74, 71, 68, 59, 55, 63, 63], [65, 66, 67, 67, 67, 67, 67, 69, 70, 70, 70, 70, 69, 68, 67, 66, 62, 54, 52, 57], [54, 56, 58, 59, 60, 61, 60, 58, 53, 53, 55, 55, 53, 53, 50, 48, 42, 32, 38, 41], [46, 48, 50, 49, 45, 44, 44, 36, 37, 38, 40, 39, 38, 37, 38, 32, 35, 32, 19, 24], [54, 54, 54, 55, 56, 57, 54, 50, 47, 48, 48, 48, 48, 45, 45, 42, 39, 34, 34, 40], [62, 64, 65, 65, 66, 67, 66, 67, 67, 67, 67, 66, 66, 65, 63, 62, 58, 55, 46, 38], [62, 63, 64, 64, 63, 62, 60, 60, 60, 60, 60, 59, 57, 55, 49, 31, 50, 52, 46, 43], [60, 61, 62, 63, 63, 63, 61, 61, 62, 61, 61, 60, 58, 56, 51, 44, 42, 47, 44, 36], [55, 56, 57, 58, 58, 58, 56, 56, 55, 55, 54, 52, 52, 50, 46, 42, 34, 38, 42, 40], [51, 52, 52, 52, 52, 51, 51, 51, 52, 53, 52, 52, 52, 52, 50, 49, 46, 46, 42, 10], [47, 49, 50, 51, 51, 50, 51, 51, 51, 50, 49, 48, 47, 45, 41, 38, 31, 36, 37, 34], [36, 37, 38, 38, 37, 37, 37, 36, 38, 37, 38, 38, 36, 33, 31, 30, 25, 22, 24, 23], [25, 26, 27, 27, 29, 28, 26, 29, 28, 26, 21, 23, 23, 20, 16, 16, 15, 21, 17, 18], [34, 35, 36, 37, 37, 36, 34, 35, 36, 36, 36, 35, 34, 34, 31, 28, 23, 20, 19, 20], [34, 35, 36, 36, 36, 37, 36, 35, 36, 34, 33, 32, 30, 24, 24, 27, 28, 27, 19, 18], [29, 31, 32, 32, 31, 31, 29, 33, 33, 30, 29, 31, 30, 30, 26, 27, 26, 16, 15, 19], [24, 25, 27, 28, 29, 27, 29, 30, 29, 29, 28, 26, 21, 25, 15, 19, 18, 16, 10, 9], [30, 32, 34, 35, 34, 34, 36, 36, 37, 37, 36, 36, 32, 29, 25, 27, 30, 17, 13, 15], [22, 23, 24, 23, 21, 23, 26, 26, 29, 24, 25, 23, 20, 20, 23, 20, 15, 6, 16, 17], [14, 20, 23, 24, 24, 22, 27, 16, 23, 18, 19, 12, 16, 16, 3, 11, 14, 9, 19, 19], [25, 25, 23, 23, 28, 24, 18, 17, 22, 21, 15, 16, 13, 12, 14, 14, 12, 11, 12, 0], [22, 19, 17, 23, 28, 27, 25, 23, 23, 24, 20, 19, 14, 14, 12, 11, 9, 6, 5, 4], [13, 9, 15, 19, 21, 22, 21, 24, 13, 20, 18, 13, 3, 17, 19, 18, 11, 1, 0, 9], [19, 19, 17, 10, 12, 13, 19, 6, 15, 10, 16, 7, 12, 7, 19, 8, 4, 8, 12, 11], [14, 15, 17, 19, 21, 22, 20, 22, 16, 17, 19, 11, 16, 19, 16, 8, 12, 20, 17, 8], [24, 25, 25, 25, 23, 23, 24, 22, 18, 20, 16, 13, 21, 17, 18, 6, 19, 16, 3, 17], [18, 15, 9, 0, 13, 14, 15, 15, 9, 17, 13, 9, 10, 11, 13, 10, 11, 9, 0, 7], [17, 19, 20, 19, 9, 9, 11, 8, 12, 16, 9, 11, 6, 8, 8, 2, 0, 12, 7, 8], [19, 21, 21, 20, 13, 5, 5, 0, 16, 12, 10, 8, 13, 12, 10, 5, 9, 0, 8, 6], [21, 22, 21, 19, 7, 0, 12, 11, 3, 7, 0, 9, 13, 12, 6, 1, 8, 0, 6, 0], [16, 19, 20, 18, 18, 17, 10, 4, 16, 0, 6, 10, 5, 7, 0, 3, 9, 0, 3, 8], [13, 18, 20, 20, 5, 11, 11, 6, 3, 8, 5, 0, 0, 6, 0, 10, 10, 5, 5, 4], [19, 24, 26, 27, 22, 5, 9, 6, 12, 0, 5, 10, 6, 10, 6, 11, 5, 3, 0, 0], [21, 23, 24, 23, 20, 12, 16, 13, 14, 12, 11, 0, 3, 11, 3, 13, 7, 10, 2, 5], [16, 17, 18, 17, 13, 6, 7, 13, 10, 9, 7, 4, 4, 7, 9, 7, 3, 5, 6, 2], [15, 16, 14, 11, 8, 11, 5, 0, 12, 3, 6, 0, 8, 6, 9, 2, 2, 5, 0, 0], [53, 60, 62, 64, 63, 58, 59, 56, 47, 56, 50, 56, 50, 53, 50, 48, 50, 41, 48, 44], [62, 69, 74, 78, 83, 85, 86, 84, 82, 83, 81, 81, 80, 79, 78, 76, 71, 68, 71, 70], [57, 62, 70, 74, 76, 72, 70, 69, 68, 64, 63, 64, 65, 65, 64, 63, 63, 62, 61, 59], [68, 74, 77, 79, 81, 81, 78, 78, 78, 76, 76, 75, 74, 73, 71, 68, 61, 58, 61, 58], [71, 76, 80, 82, 83, 84, 86, 86, 88, 87, 87, 86, 85, 84, 82, 79, 68, 66, 74, 74], [64, 70, 74, 77, 78, 78, 78, 79, 81, 81, 80, 80, 80, 79, 78, 76, 72, 66, 60, 67], [66, 68, 69, 70, 71, 72, 73, 72, 68, 65, 66, 66, 65, 65, 64, 62, 59, 54, 41, 50], [57, 59, 61, 61, 61, 56, 57, 53, 51, 53, 51, 53, 54, 50, 50, 49, 45, 40, 31, 29], [64, 67, 68, 68, 69, 70, 71, 67, 60, 61, 62, 62, 62, 59, 58, 57, 53, 50, 48, 52], [68, 73, 76, 78, 80, 81, 82, 82, 83, 83, 82, 82, 81, 80, 79, 77, 74, 70, 63, 57], [70, 75, 77, 78, 79, 79, 75, 75, 76, 75, 75, 74, 73, 71, 64, 53, 65, 66, 58, 57], [71, 75, 77, 78, 79, 80, 79, 78, 79, 79, 78, 78, 76, 74, 70, 64, 56, 63, 61, 55], [66, 71, 73, 75, 76, 77, 76, 73, 75, 73, 73, 73, 72, 71, 69, 65, 59, 42, 56, 56], [64, 68, 71, 72, 73, 73, 71, 71, 70, 71, 72, 72, 72, 72, 71, 70, 68, 67, 62, 49], [61, 65, 68, 70, 73, 73, 73, 74, 73, 73, 73, 72, 71, 69, 67, 63, 52, 51, 57, 54], [59, 61, 61, 61, 61, 62, 63, 63, 63, 63, 62, 62, 60, 59, 56, 53, 48, 29, 52, 49], [54, 56, 56, 56, 55, 53, 51, 54, 52, 52, 52, 51, 50, 49, 48, 45, 40, 38, 42, 40], [58, 61, 63, 63, 62, 61, 61, 62, 62, 62, 62, 61, 60, 58, 55, 52, 43, 44, 47, 45], [60, 64, 67, 68, 69, 69, 68, 67, 67, 66, 65, 64, 63, 60, 54, 48, 53, 55, 53, 43], [48, 55, 60, 62, 63, 63, 64, 64, 63, 62, 62, 62, 61, 60, 57, 56, 56, 46, 44, 35], [58, 62, 63, 63, 63, 64, 64, 65, 65, 65, 63, 63, 61, 59, 54, 49, 51, 56, 49, 45], [57, 62, 65, 68, 70, 71, 70, 71, 71, 71, 70, 68, 65, 57, 59, 65, 62, 49, 50, 50], [48, 47, 49, 53, 56, 55, 57, 59, 60, 59, 55, 58, 56, 52, 50, 49, 43, 48, 47, 31], [58, 60, 60, 59, 50, 52, 52, 51, 43, 51, 40, 45, 30, 36, 40, 42, 43, 33, 36, 34], [59, 60, 61, 62, 60, 56, 58, 58, 57, 56, 54, 53, 50, 46, 14, 43, 41, 32, 32, 29], [58, 59, 59, 58, 56, 56, 45, 52, 49, 51, 35, 43, 43, 38, 43, 39, 32, 24, 17, 22], [45, 49, 50, 51, 52, 50, 46, 45, 41, 44, 39, 39, 39, 37, 35, 28, 26, 24, 17, 23], [43, 46, 47, 47, 46, 47, 51, 49, 48, 47, 45, 44, 40, 42, 39, 42, 33, 41, 31, 32], [46, 48, 50, 50, 50, 50, 49, 47, 44, 40, 35, 36, 45, 45, 35, 41, 40, 38, 34, 29], [35, 38, 41, 43, 44, 43, 40, 35, 37, 37, 34, 32, 28, 33, 30, 29, 24, 29, 19, 20], [40, 42, 43, 42, 40, 37, 32, 38, 36, 36, 35, 33, 26, 29, 31, 28, 22, 5, 4, 13], [21, 22, 32, 35, 35, 31, 34, 29, 29, 17, 8, 25, 31, 31, 20, 28, 26, 24, 18, 13], [39, 42, 43, 43, 40, 36, 36, 34, 29, 30, 23, 23, 29, 29, 18, 22, 13, 16, 15, 10], [34, 35, 35, 33, 29, 31, 27, 14, 3, 21, 20, 20, 14, 18, 17, 16, 13, 10, 5, 6], [24, 24, 24, 26, 31, 31, 11, 27, 26, 14, 12, 12, 17, 21, 7, 13, 11, 0, 2, 8], [40, 43, 44, 45, 41, 29, 27, 36, 34, 26, 25, 20, 20, 21, 17, 15, 13, 5, 0, 11], [38, 39, 38, 34, 29, 38, 32, 41, 28, 27, 34, 30, 25, 30, 30, 25, 25, 19, 9, 7], [25, 28, 30, 31, 31, 32, 31, 33, 32, 30, 12, 28, 23, 21, 26, 26, 19, 18, 10, 0], [22, 24, 31, 35, 36, 30, 29, 26, 25, 8, 23, 27, 15, 20, 22, 24, 18, 15, 11, 9], [33, 34, 33, 29, 23, 27, 23, 27, 19, 21, 24, 14, 23, 25, 18, 21, 9, 8, 4, 3], [59, 67, 71, 73, 73, 68, 66, 67, 48, 65, 55, 66, 55, 63, 58, 53, 59, 47, 49, 54], [74, 80, 85, 88, 93, 95, 95, 93, 91, 92, 91, 91, 89, 89, 87, 85, 79, 77, 79, 77], [70, 73, 79, 84, 86, 83, 77, 80, 73, 65, 65, 65, 59, 64, 65, 68, 71, 72, 71, 69], [72, 80, 84, 87, 90, 91, 89, 90, 89, 87, 86, 85, 84, 82, 79, 74, 66, 63, 66, 64], [81, 86, 89, 91, 92, 93, 95, 96, 96, 96, 95, 94, 93, 92, 90, 87, 75, 75, 83, 83], [71, 78, 83, 86, 88, 88, 88, 88, 90, 90, 90, 89, 89, 88, 87, 86, 82, 77, 67, 75], [75, 78, 79, 81, 83, 84, 84, 83, 79, 79, 77, 78, 76, 74, 72, 69, 66, 61, 59, 62], [68, 70, 71, 70, 70, 69, 65, 67, 62, 65, 65, 66, 65, 64, 62, 60, 57, 53, 31, 47], [73, 77, 79, 80, 80, 81, 82, 78, 73, 75, 75, 74, 73, 72, 71, 68, 64, 60, 58, 61], [78, 83, 87, 89, 91, 92, 93, 93, 94, 94, 93, 93, 92, 91, 89, 87, 84, 80, 74, 69], [80, 85, 88, 89, 90, 90, 87, 87, 87, 87, 87, 85, 84, 82, 75, 67, 75, 77, 67, 66], [82, 86, 88, 89, 91, 91, 90, 89, 91, 91, 90, 89, 87, 86, 81, 74, 67, 74, 71, 65], [78, 82, 85, 87, 89, 90, 91, 86, 87, 83, 85, 84, 84, 82, 80, 76, 69, 55, 66, 67], [75, 81, 84, 85, 85, 85, 83, 82, 82, 84, 84, 85, 85, 85, 85, 84, 81, 79, 72, 59], [74, 79, 82, 85, 87, 87, 87, 87, 87, 86, 84, 84, 82, 81, 78, 75, 64, 60, 67, 64], [73, 75, 76, 76, 76, 78, 78, 77, 77, 76, 76, 75, 73, 71, 67, 65, 61, 53, 63, 61], [68, 70, 70, 70, 68, 66, 67, 69, 69, 68, 67, 68, 66, 65, 64, 60, 53, 53, 56, 51], [72, 76, 78, 78, 78, 77, 78, 79, 79, 79, 79, 77, 75, 74, 70, 67, 56, 58, 61, 62], [75, 79, 82, 83, 84, 84, 83, 83, 83, 83, 82, 81, 79, 77, 71, 55, 67, 69, 67, 55], [63, 71, 76, 79, 80, 80, 81, 81, 81, 81, 81, 81, 79, 78, 74, 73, 73, 66, 61, 52], [74, 79, 81, 81, 81, 82, 82, 83, 82, 82, 81, 81, 79, 77, 71, 62, 62, 71, 64, 59], [76, 80, 84, 86, 89, 90, 89, 89, 89, 88, 87, 85, 81, 74, 76, 82, 79, 66, 62, 64], [67, 67, 69, 73, 75, 74, 78, 81, 81, 80, 74, 79, 75, 70, 66, 68, 61, 66, 65, 52], [76, 79, 79, 77, 59, 66, 72, 73, 67, 73, 67, 70, 61, 54, 60, 64, 63, 51, 58, 55], [78, 79, 79, 81, 82, 80, 77, 82, 81, 80, 78, 76, 74, 68, 57, 65, 62, 58, 54, 52], [78, 81, 82, 82, 79, 80, 79, 76, 66, 66, 65, 61, 57, 57, 58, 50, 52, 39, 40, 30], [73, 74, 71, 68, 79, 81, 78, 77, 77, 79, 73, 70, 71, 68, 69, 67, 58, 61, 52, 39], [58, 54, 58, 63, 67, 63, 54, 58, 48, 54, 58, 57, 62, 60, 61, 59, 57, 48, 47, 26], [67, 71, 73, 74, 75, 75, 77, 76, 72, 72, 71, 67, 60, 68, 68, 63, 59, 64, 53, 50], [73, 76, 78, 78, 79, 79, 79, 79, 77, 76, 72, 64, 71, 74, 61, 70, 68, 68, 63, 58], [57, 63, 67, 69, 70, 69, 68, 65, 65, 64, 61, 60, 48, 62, 64, 39, 57, 58, 41, 47], [63, 65, 66, 66, 62, 60, 64, 63, 56, 63, 64, 62, 54, 60, 56, 56, 51, 46, 42, 32], [54, 58, 61, 64, 68, 69, 68, 68, 67, 65, 62, 51, 61, 65, 49, 62, 58, 56, 51, 46], [61, 63, 65, 65, 63, 62, 64, 61, 60, 59, 55, 50, 51, 54, 49, 50, 44, 43, 42, 28], [61, 62, 62, 62, 59, 55, 41, 49, 48, 44, 50, 50, 51, 37, 38, 35, 44, 36, 32, 22], [42, 47, 51, 51, 48, 39, 41, 38, 34, 43, 48, 35, 42, 44, 40, 34, 28, 35, 30, 21], [55, 54, 53, 59, 67, 69, 67, 62, 53, 60, 62, 60, 57, 56, 51, 54, 57, 43, 41, 11], [60, 62, 62, 60, 56, 62, 65, 63, 61, 66, 65, 47, 60, 49, 50, 45, 40, 38, 30, 20], [52, 54, 55, 54, 54, 54, 61, 67, 62, 68, 62, 62, 57, 50, 60, 54, 51, 43, 30, 30], [52, 54, 56, 58, 63, 64, 64, 59, 59, 56, 61, 61, 52, 60, 59, 57, 50, 42, 25, 34], [59, 63, 66, 67, 65, 61, 57, 44, 54, 53, 52, 53, 53, 51, 51, 48, 47, 50, 43, 39], [60, 62, 68, 70, 72, 74, 70, 70, 71, 69, 68, 68, 67, 65, 62, 58, 58, 50, 44, 42], [69, 73, 75, 76, 78, 79, 79, 78, 75, 73, 68, 67, 63, 58, 48, 43, 21, 36, 40, 43], [65, 69, 71, 71, 71, 72, 73, 73, 74, 74, 74, 73, 71, 69, 67, 65, 65, 62, 58, 56], [57, 59, 62, 64, 65, 64, 68, 71, 70, 71, 72, 71, 70, 68, 65, 62, 51, 53, 57, 55], [60, 62, 61, 57, 55, 60, 64, 65, 61, 62, 62, 61, 60, 59, 57, 55, 49, 45, 51, 52], [58, 61, 63, 66, 68, 69, 71, 71, 71, 71, 70, 69, 67, 64, 51, 60, 68, 66, 58, 59], [48, 52, 56, 60, 64, 63, 61, 60, 59, 59, 57, 55, 53, 53, 48, 41, 38, 27, 35, 37], [54, 56, 58, 57, 54, 53, 56, 54, 52, 48, 51, 51, 50, 47, 41, 41, 47, 48, 40, 42], [52, 53, 50, 42, 48, 52, 51, 51, 52, 54, 54, 53, 52, 51, 48, 46, 45, 45, 33, 34], [51, 53, 53, 55, 56, 57, 56, 55, 50, 46, 47, 49, 47, 47, 45, 44, 41, 38, 31, 21], [53, 56, 57, 57, 56, 52, 46, 33, 43, 41, 44, 47, 46, 45, 43, 41, 29, 20, 26, 26], [51, 52, 54, 56, 59, 59, 60, 60, 60, 61, 58, 60, 59, 58, 54, 51, 34, 32, 36, 41], [50, 54, 56, 57, 58, 58, 58, 58, 58, 59, 58, 57, 54, 50, 47, 49, 50, 48, 42, 39], [37, 42, 45, 46, 46, 45, 44, 44, 46, 46, 45, 44, 45, 44, 39, 36, 38, 28, 37, 36], [39, 42, 43, 44, 44, 43, 44, 45, 45, 45, 44, 44, 41, 37, 36, 39, 35, 39, 34, 29], [32, 33, 33, 30, 11, 20, 22, 21, 20, 25, 23, 20, 23, 10, 20, 11, 13, 18, 12, 9], [24, 23, 22, 22, 26, 28, 26, 25, 20, 23, 24, 22, 19, 17, 10, 18, 13, 20, 17, 7], [26, 30, 32, 34, 31, 27, 29, 32, 28, 27, 27, 13, 31, 30, 28, 21, 19, 26, 8, 12], [31, 33, 30, 19, 30, 13, 30, 29, 31, 26, 24, 25, 26, 23, 24, 23, 11, 22, 13, 0], [15, 25, 29, 29, 29, 30, 31, 29, 31, 30, 28, 27, 27, 23, 14, 24, 16, 12, 12, 13], [21, 23, 23, 23, 23, 24, 27, 22, 24, 23, 11, 23, 19, 15, 17, 11, 10, 22, 13, 13], [27, 27, 26, 26, 27, 25, 26, 27, 27, 24, 16, 16, 22, 21, 11, 21, 18, 23, 13, 19], [23, 24, 21, 17, 20, 17, 14, 18, 12, 14, 12, 20, 12, 1, 13, 10, 8, 7, 10, 9], [28, 31, 32, 31, 25, 26, 31, 27, 27, 20, 24, 22, 21, 15, 15, 18, 5, 6, 4, 4], [24, 21, 17, 18, 19, 20, 19, 20, 7, 7, 19, 7, 17, 16, 16, 15, 10, 7, 0, 9], [0, 9, 10, 8, 12, 11, 10, 16, 22, 17, 19, 14, 9, 17, 13, 8, 13, 4, 10, 0], [15, 19, 22, 23, 24, 23, 19, 20, 11, 12, 11, 14, 21, 15, 19, 6, 15, 12, 3, 1], [14, 19, 22, 21, 18, 20, 21, 19, 15, 12, 14, 15, 18, 12, 19, 13, 11, 0, 6, 11], [17, 17, 17, 17, 10, 9, 13, 8, 1, 11, 0, 13, 16, 10, 9, 0, 7, 7, 9, 0], [15, 12, 5, 0, 10, 12, 6, 9, 6, 11, 13, 13, 15, 0, 12, 11, 2, 2, 6, 10], [11, 10, 9, 1, 4, 9, 11, 11, 12, 7, 14, 12, 10, 11, 0, 11, 6, 3, 0, 9], [16, 14, 9, 0, 1, 8, 0, 1, 11, 0, 0, 5, 5, 9, 13, 16, 12, 13, 13, 9], [14, 14, 11, 3, 5, 5, 5, 7, 0, 10, 7, 7, 10, 12, 4, 3, 8, 6, 0, 6], [19, 16, 8, 12, 10, 9, 13, 9, 13, 17, 11, 13, 4, 0, 0, 12, 10, 3, 8, 5], [14, 17, 21, 22, 15, 16, 18, 16, 11, 12, 14, 9, 11, 8, 14, 7, 0, 9, 6, 0], [8, 7, 8, 8, 15, 16, 11, 8, 12, 6, 8, 4, 6, 3, 11, 0, 4, 7, 7, 0], [12, 9, 7, 7, 9, 12, 0, 10, 12, 3, 0, 10, 8, 8, 12, 1, 1, 7, 0, 2], [5, 4, 7, 5, 6, 9, 0, 1, 9, 0, 7, 9, 8, 0, 4, 6, 0, 0, 7, 11], [9, 1, 2, 3, 0, 7, 10, 8, 10, 11, 0, 0, 7, 6, 7, 5, 0, 4, 0, 0], [55, 63, 71, 75, 77, 73, 73, 45, 68, 65, 60, 60, 63, 64, 62, 62, 61, 58, 54, 54], [69, 71, 70, 77, 84, 85, 84, 82, 84, 82, 81, 80, 80, 78, 76, 73, 67, 59, 44, 50], [74, 81, 85, 87, 89, 90, 90, 90, 88, 84, 80, 77, 72, 66, 62, 54, 46, 33, 54, 59], [72, 79, 82, 84, 83, 83, 85, 86, 86, 86, 86, 86, 85, 84, 82, 80, 78, 74, 69, 63], [70, 71, 73, 76, 80, 79, 82, 84, 85, 85, 86, 86, 85, 84, 82, 79, 69, 64, 72, 68], [69, 75, 78, 77, 71, 73, 80, 81, 78, 78, 78, 77, 76, 76, 74, 73, 68, 63, 66, 67], [68, 74, 77, 79, 84, 86, 87, 87, 87, 86, 85, 85, 83, 80, 68, 72, 82, 80, 70, 71], [63, 67, 70, 73, 79, 81, 78, 78, 76, 76, 74, 70, 71, 70, 66, 59, 43, 49, 53, 54], [67, 72, 76, 77, 76, 75, 76, 75, 71, 69, 70, 69, 67, 64, 56, 56, 62, 64, 57, 61], [68, 73, 75, 73, 48, 70, 72, 72, 72, 73, 74, 74, 73, 72, 69, 66, 64, 65, 57, 52], [67, 72, 74, 74, 75, 77, 77, 75, 71, 66, 65, 68, 65, 67, 64, 62, 59, 57, 49, 40], [67, 73, 76, 77, 76, 73, 68, 62, 65, 59, 51, 61, 56, 52, 55, 50, 45, 43, 50, 53], [68, 72, 73, 75, 81, 83, 82, 82, 84, 85, 79, 85, 84, 82, 78, 77, 68, 60, 63, 58], [69, 74, 78, 81, 83, 83, 83, 83, 82, 83, 82, 80, 76, 67, 71, 69, 76, 70, 65, 62], [60, 62, 68, 72, 73, 73, 72, 71, 71, 70, 69, 68, 67, 64, 57, 59, 62, 61, 59, 60], [63, 68, 70, 72, 73, 73, 73, 73, 73, 73, 72, 70, 66, 57, 67, 69, 63, 66, 60, 52], [64, 67, 68, 68, 63, 56, 56, 57, 56, 58, 56, 54, 49, 41, 53, 52, 50, 42, 36, 40], [47, 50, 51, 42, 54, 56, 55, 55, 53, 51, 35, 39, 46, 50, 52, 37, 56, 49, 45, 45], [35, 51, 57, 57, 56, 55, 56, 58, 52, 52, 57, 59, 58, 54, 51, 49, 54, 50, 26, 44], [65, 70, 72, 73, 74, 74, 73, 72, 71, 70, 61, 66, 70, 63, 70, 68, 61, 66, 62, 55], [57, 62, 67, 69, 69, 70, 70, 71, 70, 68, 57, 62, 70, 62, 61, 65, 63, 53, 59, 47], [56, 56, 50, 49, 61, 65, 64, 64, 64, 62, 58, 55, 61, 54, 59, 56, 55, 34, 46, 46], [48, 55, 59, 61, 57, 57, 60, 63, 67, 64, 48, 63, 67, 55, 56, 60, 62, 59, 43, 47], [65, 67, 67, 66, 60, 60, 62, 64, 62, 61, 54, 49, 53, 60, 53, 49, 55, 55, 35, 49], [59, 46, 59, 62, 32, 62, 66, 63, 63, 63, 62, 60, 56, 45, 49, 41, 52, 46, 40, 24], [68, 72, 74, 74, 68, 52, 63, 68, 54, 54, 49, 35, 52, 47, 43, 49, 43, 25, 23, 20], [53, 54, 46, 55, 63, 65, 65, 65, 64, 64, 60, 60, 57, 50, 50, 56, 35, 46, 30, 26], [43, 53, 60, 62, 60, 58, 55, 54, 53, 50, 56, 48, 54, 51, 52, 46, 47, 48, 35, 37], [44, 47, 52, 56, 59, 60, 58, 55, 42, 48, 54, 29, 53, 54, 49, 48, 41, 41, 42, 33], [46, 49, 48, 42, 40, 45, 39, 40, 34, 46, 48, 42, 30, 43, 46, 42, 40, 34, 24, 23], [43, 40, 40, 46, 48, 45, 44, 46, 44, 40, 42, 39, 42, 42, 39, 36, 34, 24, 21, 13], [46, 50, 50, 49, 50, 51, 48, 50, 49, 52, 45, 49, 48, 49, 48, 45, 40, 33, 27, 26], [36, 38, 38, 38, 41, 41, 31, 29, 23, 21, 8, 30, 25, 20, 30, 29, 17, 20, 9, 13], [48, 52, 53, 52, 43, 39, 37, 30, 29, 37, 28, 23, 29, 28, 32, 26, 21, 26, 21, 20], [44, 45, 47, 48, 40, 37, 38, 34, 42, 37, 24, 32, 29, 38, 33, 30, 22, 22, 7, 11], [48, 49, 52, 56, 58, 55, 53, 49, 51, 45, 52, 51, 48, 45, 39, 45, 47, 38, 35, 19], [49, 53, 55, 55, 50, 50, 42, 38, 42, 46, 47, 37, 35, 40, 32, 31, 7, 21, 16, 14], [40, 44, 46, 48, 47, 49, 46, 47, 45, 44, 48, 39, 43, 43, 39, 38, 27, 25, 24, 17], [31, 38, 42, 43, 38, 45, 48, 40, 37, 28, 43, 22, 33, 39, 32, 3, 20, 27, 7, 9], [25, 33, 37, 37, 28, 39, 39, 36, 22, 28, 36, 16, 32, 31, 30, 16, 10, 18, 11, 10], [69, 73, 78, 82, 86, 84, 79, 61, 73, 61, 64, 53, 67, 67, 66, 67, 65, 64, 61, 57], [78, 82, 82, 84, 90, 92, 89, 86, 89, 88, 86, 86, 85, 84, 81, 79, 73, 66, 35, 56], [79, 85, 89, 91, 94, 95, 95, 93, 92, 87, 83, 81, 76, 70, 67, 61, 52, 29, 58, 63], [75, 82, 86, 87, 88, 89, 90, 91, 91, 91, 92, 92, 91, 90, 89, 88, 84, 81, 73, 67], [76, 78, 77, 77, 83, 85, 87, 89, 89, 89, 91, 90, 89, 88, 86, 83, 74, 71, 76, 73], [75, 80, 83, 84, 76, 78, 84, 86, 82, 80, 80, 80, 80, 79, 78, 76, 73, 68, 70, 72], [72, 78, 82, 84, 89, 92, 93, 93, 93, 92, 91, 91, 89, 86, 74, 78, 87, 86, 76, 76], [66, 70, 74, 78, 85, 87, 85, 85, 83, 84, 82, 80, 80, 76, 71, 66, 55, 53, 60, 62], [71, 78, 81, 83, 83, 82, 82, 81, 77, 78, 76, 76, 74, 70, 62, 63, 69, 70, 63, 66], [74, 79, 82, 81, 71, 75, 79, 78, 80, 81, 83, 83, 82, 81, 79, 75, 71, 70, 61, 58], [73, 78, 80, 81, 82, 84, 84, 83, 80, 78, 77, 80, 77, 78, 75, 75, 69, 67, 57, 53], [71, 78, 82, 83, 81, 79, 71, 58, 59, 66, 66, 67, 59, 61, 57, 49, 50, 51, 58, 59], [73, 77, 77, 78, 87, 90, 86, 86, 91, 92, 84, 91, 89, 87, 82, 82, 74, 63, 67, 65], [73, 79, 84, 87, 90, 90, 90, 89, 90, 89, 88, 87, 82, 72, 78, 75, 83, 77, 69, 66], [65, 68, 74, 78, 81, 81, 80, 80, 80, 79, 80, 79, 77, 74, 68, 69, 70, 70, 66, 68], [70, 76, 79, 80, 81, 81, 81, 82, 82, 82, 81, 80, 75, 65, 75, 77, 70, 75, 69, 63], [73, 76, 77, 77, 71, 65, 65, 64, 65, 65, 63, 61, 54, 51, 58, 56, 57, 51, 41, 46], [60, 61, 58, 52, 54, 61, 58, 61, 57, 49, 56, 56, 61, 60, 58, 38, 64, 53, 51, 51], [59, 55, 61, 63, 65, 67, 67, 68, 64, 68, 69, 68, 71, 67, 42, 52, 64, 63, 47, 56], [73, 78, 80, 81, 81, 82, 80, 80, 78, 77, 68, 72, 76, 71, 77, 74, 68, 72, 68, 61], [62, 70, 75, 78, 79, 78, 78, 79, 80, 78, 72, 68, 79, 74, 71, 75, 71, 59, 67, 56], [67, 68, 64, 59, 72, 74, 74, 73, 71, 71, 67, 67, 71, 64, 66, 64, 61, 53, 55, 52], [43, 65, 71, 74, 71, 69, 75, 76, 78, 76, 63, 70, 75, 49, 67, 68, 71, 68, 41, 55], [77, 79, 80, 78, 72, 71, 76, 77, 75, 73, 64, 65, 65, 72, 60, 59, 67, 67, 48, 60], [75, 68, 66, 73, 65, 72, 76, 73, 73, 71, 73, 70, 66, 50, 58, 51, 61, 55, 48, 32], [80, 85, 87, 88, 83, 68, 77, 81, 58, 66, 58, 50, 65, 59, 53, 58, 52, 44, 25, 26], [66, 69, 66, 55, 74, 77, 77, 77, 75, 74, 71, 72, 63, 63, 57, 62, 51, 57, 41, 43], [50, 60, 71, 74, 73, 70, 69, 68, 63, 57, 70, 63, 67, 59, 66, 58, 60, 59, 40, 48], [57, 57, 64, 70, 73, 73, 71, 65, 58, 62, 67, 60, 64, 67, 61, 59, 46, 54, 53, 39], [61, 65, 66, 63, 47, 61, 60, 62, 57, 52, 66, 56, 58, 62, 62, 51, 58, 41, 21, 31], [53, 48, 59, 64, 66, 62, 57, 62, 58, 54, 60, 54, 56, 56, 57, 54, 47, 40, 23, 24], [62, 65, 65, 64, 66, 66, 62, 62, 58, 64, 53, 65, 61, 64, 62, 59, 50, 39, 41, 41], [50, 52, 49, 41, 53, 54, 52, 47, 22, 34, 43, 47, 38, 41, 41, 42, 34, 39, 30, 18], [63, 67, 69, 68, 61, 51, 53, 50, 54, 51, 46, 46, 47, 50, 45, 41, 35, 38, 32, 18], [58, 62, 64, 65, 58, 53, 54, 50, 57, 54, 44, 43, 46, 53, 51, 36, 34, 24, 25, 28], [51, 59, 70, 75, 76, 72, 69, 59, 70, 59, 70, 66, 63, 64, 61, 58, 60, 48, 48, 33], [58, 65, 66, 61, 68, 70, 62, 70, 55, 67, 65, 63, 62, 57, 47, 45, 39, 35, 23, 20], [58, 64, 67, 67, 64, 66, 62, 63, 65, 64, 66, 59, 61, 58, 55, 56, 43, 43, 34, 12], [47, 49, 58, 61, 55, 60, 65, 57, 50, 50, 60, 58, 50, 55, 52, 48, 37, 44, 24, 22], [43, 50, 54, 53, 41, 54, 57, 56, 33, 51, 56, 50, 53, 51, 47, 33, 28, 33, 26, 22], [62, 67, 71, 73, 73, 73, 76, 76, 77, 78, 78, 77, 72, 62, 56, 48, 40, 43, 46, 45], [69, 70, 71, 71, 71, 70, 71, 68, 69, 70, 69, 67, 64, 60, 48, 50, 57, 56, 42, 37], [66, 70, 72, 73, 73, 72, 74, 74, 73, 72, 70, 69, 67, 66, 61, 56, 58, 61, 60, 50], [66, 70, 71, 71, 67, 56, 63, 67, 58, 54, 61, 58, 58, 58, 58, 57, 53, 50, 50, 46], [68, 71, 71, 68, 68, 66, 66, 65, 68, 68, 68, 67, 66, 65, 62, 59, 55, 48, 46, 48], [56, 53, 55, 65, 71, 73, 73, 70, 71, 69, 68, 66, 63, 60, 48, 52, 59, 59, 50, 43], [53, 56, 59, 62, 63, 64, 64, 64, 63, 63, 62, 62, 61, 60, 58, 56, 51, 43, 36, 33], [38, 37, 38, 41, 45, 42, 42, 43, 44, 44, 43, 38, 27, 26, 38, 39, 35, 30, 26, 23], [50, 53, 53, 53, 53, 52, 53, 51, 49, 49, 48, 45, 41, 34, 23, 36, 40, 38, 31, 25], [55, 56, 57, 57, 56, 55, 54, 54, 53, 52, 51, 51, 49, 47, 42, 33, 34, 30, 34, 33], [48, 50, 53, 55, 56, 52, 54, 53, 51, 50, 47, 41, 40, 47, 49, 45, 42, 45, 37, 37], [44, 46, 44, 39, 34, 42, 33, 40, 34, 32, 20, 25, 30, 33, 35, 33, 30, 30, 17, 18], [36, 38, 37, 36, 34, 31, 31, 33, 29, 27, 26, 31, 38, 41, 40, 37, 35, 31, 13, 31], [33, 37, 38, 39, 41, 40, 40, 40, 40, 38, 35, 30, 20, 33, 33, 21, 28, 15, 4, 21], [26, 30, 32, 33, 32, 33, 31, 31, 30, 31, 29, 24, 22, 25, 24, 19, 12, 21, 18, 17], [20, 23, 23, 16, 26, 32, 30, 26, 27, 25, 21, 19, 19, 17, 23, 25, 9, 24, 10, 8], [19, 17, 20, 20, 21, 22, 20, 18, 18, 21, 19, 22, 18, 9, 19, 17, 16, 19, 15, 0], [26, 27, 27, 28, 27, 28, 16, 26, 21, 19, 17, 14, 22, 23, 22, 23, 0, 13, 17, 12], [27, 25, 24, 23, 26, 19, 18, 21, 18, 26, 27, 29, 23, 16, 18, 15, 24, 19, 18, 6], [33, 33, 34, 34, 31, 26, 30, 28, 26, 23, 25, 26, 28, 28, 25, 22, 17, 17, 9, 11], [28, 32, 34, 34, 33, 25, 24, 29, 29, 28, 25, 20, 29, 34, 33, 27, 29, 25, 22, 17], [25, 25, 23, 18, 16, 27, 30, 24, 28, 22, 0, 20, 24, 9, 27, 14, 22, 20, 13, 12], [16, 18, 20, 22, 21, 16, 14, 14, 11, 17, 18, 16, 11, 20, 12, 14, 11, 16, 8, 7], [29, 30, 29, 27, 15, 15, 14, 11, 17, 18, 15, 3, 15, 12, 14, 9, 0, 2, 0, 12], [27, 24, 17, 12, 11, 1, 18, 11, 16, 10, 13, 8, 13, 6, 7, 8, 2, 9, 9, 9], [20, 19, 17, 12, 18, 22, 13, 10, 18, 10, 10, 9, 12, 9, 8, 8, 10, 6, 7, 9], [24, 23, 17, 6, 18, 24, 12, 17, 7, 15, 17, 0, 8, 4, 13, 15, 11, 9, 1, 1], [23, 23, 20, 12, 9, 19, 7, 4, 15, 16, 16, 16, 13, 18, 12, 8, 8, 10, 8, 12], [19, 20, 16, 8, 17, 15, 11, 11, 12, 12, 19, 11, 17, 11, 9, 6, 10, 1, 12, 0], [20, 19, 13, 3, 9, 14, 19, 19, 18, 21, 21, 17, 22, 13, 7, 13, 11, 9, 10, 14], [18, 18, 18, 19, 16, 17, 19, 19, 16, 22, 18, 17, 16, 7, 17, 5, 9, 8, 14, 11], [25, 26, 24, 21, 16, 14, 18, 10, 7, 0, 11, 17, 12, 0, 12, 4, 0, 3, 7, 0], [17, 22, 21, 15, 3, 19, 7, 12, 8, 7, 2, 0, 0, 14, 7, 11, 10, 8, 4, 11], [19, 15, 13, 7, 9, 9, 10, 7, 6, 14, 6, 3, 0, 5, 7, 0, 7, 7, 8, 6], [22, 21, 19, 17, 11, 4, 11, 12, 0, 9, 8, 8, 7, 0, 7, 8, 0, 2, 9, 5], [20, 25, 27, 26, 18, 13, 10, 14, 18, 19, 18, 12, 15, 18, 15, 16, 14, 18, 18, 14], [0, 8, 11, 7, 11, 0, 12, 9, 6, 9, 11, 7, 0, 7, 0, 5, 0, 0, 0, 2], [17, 20, 22, 21, 4, 11, 9, 0, 10, 0, 10, 10, 0, 9, 11, 3, 4, 2, 2, 7], [6, 0, 7, 13, 11, 1, 5, 6, 4, 11, 15, 2, 1, 2, 1, 5, 5, 4, 2, 4], [12, 13, 10, 8, 11, 8, 5, 14, 4, 5, 9, 15, 9, 9, 7, 9, 11, 5, 11, 12], [66, 72, 76, 79, 84, 84, 85, 86, 88, 89, 88, 87, 81, 76, 69, 59, 48, 45, 43, 46], [69, 78, 81, 83, 83, 82, 84, 83, 83, 85, 83, 82, 80, 77, 66, 65, 74, 73, 54, 55], [73, 76, 80, 83, 85, 85, 85, 86, 84, 83, 81, 79, 78, 77, 73, 67, 66, 71, 72, 66], [65, 75, 80, 82, 82, 77, 71, 78, 74, 73, 77, 76, 74, 73, 71, 68, 63, 60, 60, 59], [70, 78, 83, 84, 81, 80, 77, 78, 80, 81, 81, 80, 79, 77, 75, 72, 68, 64, 59, 58], [68, 73, 72, 60, 83, 87, 88, 86, 86, 84, 82, 81, 79, 76, 68, 55, 71, 73, 66, 60], [61, 69, 73, 76, 81, 82, 82, 82, 82, 80, 80, 80, 79, 77, 75, 74, 69, 63, 49, 53], [61, 62, 59, 59, 63, 64, 63, 66, 63, 62, 59, 57, 52, 42, 56, 57, 52, 47, 43, 45], [62, 71, 75, 77, 76, 76, 75, 73, 70, 71, 70, 68, 65, 60, 41, 51, 58, 58, 49, 45], [69, 77, 80, 81, 82, 80, 79, 79, 77, 76, 75, 74, 71, 69, 64, 61, 54, 44, 48, 50], [68, 73, 75, 78, 82, 81, 80, 79, 78, 78, 77, 73, 64, 61, 70, 68, 53, 67, 55, 52], [66, 72, 73, 71, 65, 66, 68, 70, 66, 61, 58, 50, 38, 53, 56, 54, 44, 48, 28, 33], [62, 68, 74, 77, 78, 77, 77, 78, 76, 76, 74, 72, 65, 58, 50, 66, 69, 65, 62, 45], [60, 68, 74, 76, 78, 79, 80, 79, 79, 79, 77, 76, 72, 69, 68, 67, 62, 64, 59, 48], [52, 49, 62, 67, 69, 70, 69, 70, 71, 70, 69, 68, 64, 60, 53, 47, 59, 60, 52, 44], [55, 60, 63, 65, 65, 64, 63, 64, 64, 63, 61, 58, 38, 53, 56, 58, 46, 54, 47, 36], [42, 44, 48, 52, 54, 57, 59, 58, 58, 56, 54, 52, 43, 39, 45, 49, 47, 38, 37, 26], [47, 49, 50, 48, 48, 46, 22, 48, 41, 49, 48, 49, 43, 36, 43, 48, 28, 27, 27, 0], [53, 55, 53, 49, 47, 52, 50, 52, 54, 53, 52, 53, 47, 30, 39, 36, 36, 38, 34, 24], [48, 56, 59, 62, 60, 58, 57, 57, 56, 54, 49, 43, 47, 53, 49, 49, 46, 37, 33, 30], [54, 60, 63, 64, 66, 66, 67, 67, 66, 65, 61, 54, 38, 56, 63, 61, 51, 57, 52, 46], [36, 40, 53, 58, 61, 62, 61, 59, 60, 62, 63, 61, 53, 55, 50, 43, 49, 50, 44, 36], [39, 44, 52, 55, 55, 57, 55, 56, 49, 48, 43, 44, 43, 47, 44, 50, 35, 23, 36, 28], [43, 45, 46, 49, 45, 44, 29, 34, 39, 29, 32, 34, 33, 36, 36, 31, 24, 11, 3, 11], [45, 49, 50, 48, 48, 46, 43, 43, 41, 39, 38, 31, 34, 36, 36, 32, 33, 23, 13, 13], [40, 43, 43, 39, 35, 25, 36, 40, 35, 26, 25, 24, 24, 31, 33, 25, 29, 18, 13, 15], [38, 40, 36, 24, 41, 45, 46, 39, 46, 35, 34, 35, 32, 33, 42, 35, 26, 17, 14, 12], [38, 41, 41, 39, 32, 31, 26, 34, 39, 32, 31, 29, 36, 43, 35, 37, 24, 12, 15, 9], [21, 21, 29, 31, 27, 27, 25, 26, 27, 9, 20, 22, 32, 31, 29, 27, 13, 16, 10, 3], [38, 40, 40, 39, 39, 35, 36, 35, 36, 37, 37, 30, 42, 40, 31, 32, 16, 21, 21, 10], [41, 43, 41, 41, 40, 34, 39, 39, 40, 38, 25, 42, 40, 40, 34, 36, 32, 21, 11, 7], [34, 33, 33, 38, 40, 41, 37, 40, 34, 33, 30, 30, 39, 30, 26, 19, 17, 18, 11, 5], [34, 35, 31, 27, 26, 31, 20, 22, 10, 20, 18, 13, 12, 8, 9, 9, 6, 2, 7, 6], [42, 47, 47, 44, 26, 36, 37, 32, 27, 20, 34, 20, 20, 22, 24, 20, 3, 10, 1, 4], [43, 48, 49, 46, 28, 36, 36, 33, 39, 39, 32, 34, 29, 25, 21, 20, 12, 12, 11, 8], [35, 39, 40, 38, 35, 36, 33, 30, 19, 31, 31, 31, 21, 26, 18, 20, 3, 6, 6, 9], [29, 24, 14, 14, 19, 26, 26, 19, 16, 23, 22, 18, 22, 14, 17, 9, 5, 9, 11, 2], [20, 22, 19, 23, 29, 31, 32, 29, 23, 30, 32, 24, 25, 19, 19, 23, 17, 14, 12, 6], [25, 24, 26, 28, 31, 31, 31, 31, 28, 35, 38, 36, 24, 35, 31, 22, 7, 12, 10, 0], [25, 28, 28, 27, 21, 20, 20, 17, 7, 22, 19, 20, 4, 17, 13, 8, 13, 4, 7, 7], [68, 74, 80, 85, 90, 91, 92, 94, 96, 95, 95, 94, 87, 82, 76, 68, 57, 40, 48, 41], [80, 87, 89, 90, 90, 91, 94, 92, 92, 93, 91, 90, 88, 85, 74, 71, 82, 81, 62, 63], [82, 85, 88, 91, 93, 93, 93, 94, 92, 90, 88, 87, 86, 85, 80, 73, 75, 80, 79, 70], [75, 84, 89, 91, 89, 85, 80, 85, 77, 78, 79, 76, 75, 75, 74, 72, 70, 68, 67, 66], [78, 86, 90, 92, 88, 87, 84, 85, 89, 88, 88, 88, 86, 85, 82, 79, 73, 69, 66, 66], [77, 81, 80, 65, 91, 96, 97, 95, 95, 94, 92, 90, 88, 85, 75, 68, 81, 81, 71, 67], [70, 78, 82, 85, 90, 91, 91, 90, 89, 89, 88, 88, 86, 84, 82, 81, 77, 69, 59, 56], [70, 72, 69, 70, 72, 75, 75, 78, 75, 75, 72, 69, 61, 49, 67, 68, 62, 57, 47, 51], [75, 83, 86, 87, 87, 87, 86, 85, 83, 82, 80, 78, 74, 69, 46, 62, 68, 67, 57, 51], [80, 88, 92, 93, 94, 92, 91, 91, 90, 89, 88, 87, 84, 81, 77, 73, 57, 64, 64, 63], [79, 84, 87, 91, 95, 93, 92, 90, 90, 90, 89, 86, 77, 70, 81, 80, 71, 79, 68, 66], [77, 82, 83, 81, 77, 77, 78, 78, 76, 74, 73, 69, 58, 58, 65, 68, 60, 61, 53, 36], [74, 79, 85, 88, 89, 88, 89, 89, 89, 89, 86, 85, 79, 72, 64, 79, 81, 72, 73, 64], [74, 82, 87, 90, 92, 93, 93, 92, 92, 92, 90, 89, 85, 82, 81, 80, 77, 77, 70, 61], [71, 70, 77, 81, 82, 83, 83, 84, 84, 82, 81, 79, 76, 73, 67, 67, 74, 73, 52, 63], [72, 77, 80, 81, 81, 80, 78, 80, 79, 78, 76, 74, 57, 67, 71, 71, 47, 67, 61, 53], [58, 60, 64, 65, 65, 70, 72, 72, 71, 70, 67, 66, 58, 54, 60, 64, 57, 47, 45, 42], [66, 66, 65, 60, 59, 63, 56, 63, 57, 66, 66, 69, 65, 53, 64, 68, 50, 50, 48, 33], [69, 73, 72, 70, 72, 73, 70, 73, 74, 74, 76, 75, 69, 60, 61, 58, 60, 61, 50, 48], [71, 75, 76, 77, 75, 72, 70, 70, 70, 70, 66, 62, 62, 67, 61, 61, 55, 53, 50, 43], [69, 78, 82, 83, 84, 84, 85, 84, 84, 83, 79, 73, 61, 73, 80, 77, 72, 70, 65, 59], [68, 70, 75, 79, 82, 82, 81, 75, 76, 79, 81, 81, 74, 74, 73, 59, 71, 70, 58, 43], [51, 68, 76, 80, 81, 81, 79, 79, 74, 70, 61, 67, 63, 68, 65, 70, 56, 49, 54, 44], [72, 78, 79, 79, 79, 77, 70, 66, 64, 61, 61, 61, 55, 60, 62, 57, 53, 41, 38, 33], [68, 69, 67, 67, 69, 70, 70, 70, 66, 61, 61, 59, 58, 57, 56, 51, 48, 42, 32, 22], [63, 66, 65, 62, 50, 48, 63, 51, 54, 54, 44, 43, 45, 42, 49, 37, 45, 44, 35, 28], [62, 65, 66, 68, 71, 71, 68, 55, 68, 59, 63, 60, 42, 59, 57, 55, 45, 49, 35, 16], [63, 66, 65, 58, 53, 58, 65, 68, 67, 66, 60, 53, 61, 66, 54, 60, 52, 45, 15, 25], [55, 58, 62, 63, 60, 60, 62, 65, 68, 68, 64, 47, 54, 54, 62, 54, 38, 41, 33, 26], [60, 61, 60, 57, 57, 60, 68, 71, 72, 71, 64, 62, 67, 70, 62, 59, 58, 35, 49, 37], [63, 66, 67, 67, 66, 66, 67, 67, 65, 63, 60, 63, 65, 62, 58, 57, 54, 48, 32, 34], [53, 57, 62, 65, 67, 67, 63, 62, 54, 47, 52, 55, 59, 59, 53, 43, 43, 36, 37, 31], [41, 41, 49, 47, 47, 46, 48, 46, 45, 37, 30, 35, 38, 37, 37, 34, 26, 23, 16, 7], [54, 59, 59, 56, 56, 60, 50, 53, 54, 55, 50, 50, 51, 47, 50, 29, 27, 25, 15, 14], [56, 59, 61, 59, 57, 43, 55, 58, 61, 58, 55, 50, 55, 52, 42, 35, 32, 26, 11, 11], [53, 59, 60, 59, 53, 60, 64, 58, 60, 39, 46, 57, 54, 51, 48, 46, 38, 37, 15, 17], [45, 40, 38, 34, 45, 49, 48, 43, 43, 46, 46, 29, 38, 31, 33, 28, 16, 16, 16, 6], [49, 51, 52, 53, 54, 56, 52, 40, 41, 47, 49, 41, 42, 42, 19, 37, 37, 28, 18, 2], [45, 48, 49, 49, 46, 51, 50, 41, 39, 47, 53, 49, 40, 47, 40, 31, 29, 26, 16, 9], [36, 40, 41, 39, 40, 37, 36, 39, 43, 41, 39, 36, 41, 22, 32, 30, 24, 5, 4, 0], [63, 70, 73, 74, 78, 80, 78, 76, 75, 78, 75, 73, 73, 73, 71, 70, 67, 65, 63, 57], [72, 74, 71, 60, 45, 51, 66, 64, 69, 66, 65, 65, 66, 65, 64, 62, 56, 52, 50, 47], [66, 68, 66, 61, 59, 64, 70, 66, 71, 70, 70, 70, 69, 68, 65, 63, 60, 53, 42, 53], [62, 66, 67, 66, 68, 68, 68, 69, 69, 69, 69, 68, 67, 66, 63, 59, 38, 55, 56, 51], [51, 51, 53, 60, 65, 66, 64, 64, 64, 63, 63, 62, 60, 59, 53, 44, 45, 47, 42, 50], [51, 49, 44, 39, 51, 56, 56, 53, 49, 46, 45, 47, 40, 30, 33, 37, 42, 39, 44, 43], [50, 50, 53, 56, 59, 57, 60, 58, 56, 56, 56, 54, 50, 44, 36, 46, 46, 38, 50, 43], [49, 51, 48, 45, 48, 45, 46, 48, 47, 46, 46, 44, 41, 39, 32, 33, 28, 30, 32, 33], [40, 42, 42, 44, 45, 46, 45, 45, 43, 42, 42, 39, 36, 31, 30, 34, 26, 31, 34, 28], [31, 37, 41, 43, 46, 46, 47, 46, 44, 43, 40, 33, 27, 36, 40, 38, 18, 38, 32, 19], [31, 31, 32, 32, 33, 33, 28, 30, 30, 30, 31, 27, 27, 31, 33, 21, 23, 24, 9, 18], [30, 24, 18, 15, 10, 25, 28, 30, 26, 20, 26, 26, 17, 13, 16, 13, 16, 21, 21, 8], [32, 35, 35, 35, 35, 34, 34, 32, 33, 29, 27, 18, 19, 12, 7, 27, 23, 23, 23, 20], [25, 21, 20, 22, 21, 17, 24, 24, 23, 23, 23, 14, 22, 24, 15, 14, 15, 19, 0, 5], [25, 21, 14, 5, 19, 20, 15, 22, 14, 20, 12, 23, 25, 24, 22, 9, 17, 12, 14, 14], [10, 15, 15, 20, 21, 19, 20, 13, 19, 19, 10, 21, 16, 3, 17, 13, 10, 0, 16, 17], [20, 17, 16, 10, 12, 24, 16, 15, 9, 9, 8, 10, 3, 13, 3, 4, 5, 5, 12, 7], [21, 16, 12, 21, 19, 17, 20, 16, 18, 20, 14, 9, 13, 4, 13, 0, 16, 0, 9, 9], [16, 22, 26, 26, 21, 23, 25, 24, 24, 25, 22, 23, 15, 14, 15, 14, 18, 13, 8, 7], [8, 14, 13, 13, 10, 16, 15, 13, 16, 13, 8, 6, 11, 16, 7, 5, 9, 7, 6, 8], [20, 18, 18, 17, 21, 15, 19, 13, 18, 15, 15, 16, 19, 23, 10, 4, 11, 10, 6, 2], [25, 25, 26, 27, 26, 26, 27, 27, 24, 25, 21, 18, 12, 20, 14, 13, 10, 17, 8, 6], [7, 15, 14, 12, 10, 7, 14, 12, 15, 6, 8, 14, 0, 7, 0, 0, 5, 6, 1, 6], [15, 0, 4, 8, 11, 3, 8, 12, 17, 14, 7, 14, 2, 8, 9, 0, 10, 0, 9, 11], [19, 14, 1, 3, 2, 0, 10, 3, 15, 16, 2, 12, 12, 8, 10, 9, 14, 7, 16, 2], [18, 7, 11, 15, 15, 11, 2, 10, 16, 11, 9, 0, 8, 0, 8, 5, 11, 7, 10, 14], [4, 9, 6, 4, 10, 9, 4, 9, 5, 11, 16, 10, 4, 7, 5, 0, 12, 7, 11, 8], [18, 14, 10, 11, 10, 12, 14, 8, 0, 0, 14, 4, 0, 10, 8, 9, 4, 0, 8, 10], [18, 16, 16, 16, 18, 18, 13, 15, 17, 8, 20, 18, 20, 15, 20, 14, 15, 16, 17, 17], [8, 11, 0, 12, 3, 0, 7, 9, 10, 0, 1, 4, 15, 12, 9, 11, 0, 8, 0, 6], [12, 1, 8, 12, 11, 13, 13, 0, 6, 2, 12, 5, 6, 13, 0, 12, 0, 12, 11, 1], [12, 12, 3, 12, 6, 16, 12, 12, 4, 8, 0, 7, 11, 11, 0, 0, 0, 6, 8, 13], [10, 13, 14, 7, 0, 3, 10, 0, 10, 0, 0, 12, 13, 14, 0, 6, 5, 12, 11, 11], [10, 7, 9, 9, 12, 12, 6, 10, 14, 9, 11, 12, 5, 3, 0, 9, 9, 6, 0, 0], [8, 9, 10, 10, 1, 8, 0, 9, 2, 0, 1, 9, 10, 13, 5, 13, 5, 14, 10, 11], [15, 15, 13, 14, 13, 17, 12, 3, 6, 10, 6, 9, 4, 8, 5, 0, 0, 6, 3, 10], [12, 8, 7, 7, 0, 0, 6, 7, 0, 12, 11, 5, 6, 11, 6, 1, 11, 6, 6, 4], [0, 15, 15, 15, 16, 16, 16, 14, 10, 15, 12, 6, 5, 4, 10, 12, 7, 5, 0, 10], [2, 2, 13, 17, 1, 9, 11, 11, 10, 0, 1, 9, 1, 7, 7, 9, 10, 12, 8, 7], [16, 11, 9, 8, 0, 6, 3, 0, 0, 12, 3, 4, 5, 5, 4, 4, 4, 9, 9, 10], [55, 68, 77, 82, 84, 89, 88, 87, 84, 87, 84, 84, 83, 82, 81, 79, 76, 74, 69, 63], [68, 79, 85, 85, 72, 65, 75, 79, 79, 78, 76, 77, 77, 76, 75, 72, 67, 62, 59, 59], [64, 75, 80, 80, 66, 71, 81, 76, 82, 80, 80, 80, 79, 78, 76, 74, 71, 66, 54, 64], [64, 72, 77, 78, 79, 79, 81, 81, 81, 81, 81, 80, 79, 77, 75, 71, 50, 65, 67, 60], [54, 61, 63, 65, 75, 78, 77, 77, 77, 77, 77, 76, 75, 74, 70, 64, 50, 61, 55, 62], [61, 66, 66, 64, 60, 69, 72, 68, 67, 69, 70, 68, 65, 62, 53, 33, 53, 52, 55, 56], [58, 67, 68, 70, 77, 78, 79, 79, 76, 76, 76, 75, 73, 69, 58, 61, 64, 58, 65, 59], [63, 68, 70, 70, 66, 69, 66, 68, 68, 67, 66, 64, 61, 58, 50, 49, 42, 46, 50, 52], [48, 60, 65, 67, 69, 68, 69, 69, 67, 65, 65, 64, 61, 57, 49, 55, 52, 52, 57, 49], [51, 44, 60, 66, 71, 74, 74, 76, 74, 73, 70, 67, 60, 52, 61, 63, 55, 60, 58, 46], [44, 51, 58, 61, 62, 64, 62, 62, 61, 62, 63, 62, 56, 47, 59, 56, 56, 50, 41, 37], [51, 52, 41, 52, 57, 57, 59, 60, 55, 56, 53, 53, 48, 43, 38, 31, 39, 45, 41, 24], [54, 62, 64, 65, 64, 64, 64, 64, 64, 62, 60, 57, 48, 39, 49, 47, 52, 47, 42, 40], [54, 59, 62, 62, 63, 61, 60, 57, 55, 53, 50, 48, 40, 45, 48, 40, 52, 41, 42, 20], [50, 56, 63, 64, 64, 63, 59, 60, 63, 63, 58, 56, 48, 47, 51, 49, 49, 41, 39, 34], [53, 58, 62, 62, 61, 60, 60, 61, 59, 59, 58, 55, 46, 36, 42, 50, 51, 37, 39, 26], [40, 50, 55, 55, 49, 58, 60, 54, 50, 43, 38, 45, 34, 37, 38, 36, 37, 20, 26, 9], [42, 47, 38, 47, 49, 46, 51, 49, 48, 42, 41, 42, 39, 33, 42, 35, 39, 30, 25, 23], [41, 49, 51, 51, 53, 53, 51, 52, 50, 47, 44, 45, 49, 50, 41, 37, 45, 39, 37, 27], [41, 47, 46, 42, 44, 41, 36, 32, 26, 27, 29, 30, 26, 29, 16, 36, 25, 17, 23, 19], [36, 47, 47, 47, 48, 48, 46, 45, 45, 43, 37, 41, 46, 45, 35, 45, 36, 35, 31, 19], [39, 50, 55, 57, 58, 58, 57, 56, 54, 52, 48, 51, 53, 48, 50, 46, 46, 39, 38, 29], [37, 43, 44, 43, 40, 39, 35, 34, 30, 36, 36, 35, 32, 35, 35, 40, 15, 25, 17, 16], [29, 36, 37, 37, 37, 36, 31, 29, 29, 26, 22, 27, 29, 25, 27, 25, 19, 21, 12, 5], [26, 30, 29, 21, 23, 18, 21, 30, 23, 23, 20, 19, 23, 19, 18, 21, 8, 4, 10, 14], [24, 25, 29, 32, 29, 21, 31, 30, 31, 30, 13, 16, 25, 19, 28, 22, 3, 14, 7, 5], [8, 24, 26, 22, 32, 33, 34, 30, 14, 19, 15, 24, 25, 22, 29, 29, 17, 17, 9, 9], [12, 10, 27, 31, 27, 27, 28, 27, 27, 26, 25, 21, 18, 0, 12, 13, 0, 3, 2, 9], [20, 23, 24, 27, 33, 29, 29, 27, 27, 30, 25, 29, 21, 20, 24, 20, 19, 18, 16, 13], [21, 22, 18, 18, 24, 18, 20, 26, 28, 29, 30, 27, 28, 34, 26, 25, 21, 0, 9, 9], [18, 16, 21, 24, 28, 31, 29, 29, 26, 29, 32, 30, 23, 26, 29, 24, 17, 16, 8, 4], [20, 30, 32, 26, 33, 33, 22, 9, 18, 23, 14, 26, 26, 23, 24, 22, 12, 13, 3, 6], [16, 25, 29, 29, 25, 26, 25, 21, 8, 7, 17, 14, 4, 0, 9, 0, 0, 1, 10, 2], [17, 14, 6, 13, 13, 14, 10, 13, 8, 14, 7, 0, 14, 19, 0, 6, 1, 8, 5, 8], [10, 5, 17, 21, 15, 21, 18, 21, 14, 17, 13, 20, 19, 15, 5, 15, 1, 0, 11, 13], [16, 24, 23, 21, 21, 20, 24, 21, 20, 21, 15, 13, 19, 16, 15, 17, 12, 10, 8, 0], [12, 22, 28, 30, 30, 29, 26, 22, 24, 24, 25, 22, 15, 22, 17, 16, 16, 11, 10, 4], [6, 7, 13, 17, 15, 15, 11, 13, 18, 17, 22, 18, 11, 18, 13, 11, 7, 0, 2, 4], [0, 22, 26, 25, 17, 22, 23, 23, 24, 22, 19, 20, 11, 10, 3, 12, 13, 7, 13, 0], [16, 0, 19, 21, 21, 21, 18, 13, 10, 11, 8, 4, 9, 10, 10, 8, 13, 0, 8, 0], [69, 87, 93, 96, 97, 102, 101, 99, 97, 97, 96, 96, 95, 94, 92, 90, 86, 83, 78, 70], [83, 93, 98, 96, 84, 81, 83, 88, 85, 86, 82, 83, 84, 83, 82, 80, 75, 67, 69, 69], [78, 89, 92, 91, 68, 85, 91, 84, 93, 94, 94, 94, 92, 91, 88, 86, 82, 76, 66, 75], [78, 86, 91, 92, 92, 92, 94, 95, 94, 94, 94, 94, 92, 91, 88, 84, 63, 77, 75, 72], [73, 78, 76, 76, 87, 89, 87, 86, 85, 84, 83, 83, 82, 80, 76, 70, 61, 68, 53, 70], [74, 79, 78, 74, 74, 81, 85, 82, 67, 71, 78, 75, 72, 68, 59, 53, 64, 60, 65, 65], [66, 75, 77, 83, 91, 92, 94, 93, 90, 88, 86, 84, 82, 78, 69, 71, 74, 68, 77, 66], [77, 82, 85, 86, 78, 83, 83, 83, 82, 83, 82, 81, 78, 74, 65, 63, 60, 63, 68, 65], [70, 73, 82, 85, 84, 83, 85, 86, 81, 80, 81, 79, 74, 71, 62, 65, 57, 67, 68, 58], [76, 73, 77, 82, 86, 89, 88, 90, 89, 88, 86, 84, 77, 63, 76, 78, 63, 78, 71, 54], [67, 71, 76, 77, 79, 81, 74, 73, 75, 75, 75, 73, 71, 71, 76, 76, 63, 55, 59, 54], [72, 74, 69, 57, 68, 70, 78, 79, 75, 77, 74, 72, 67, 65, 58, 53, 59, 70, 54, 52], [75, 80, 81, 80, 79, 79, 80, 81, 80, 79, 77, 76, 69, 60, 64, 63, 65, 64, 57, 57], [70, 75, 78, 80, 80, 77, 79, 81, 79, 81, 78, 76, 68, 61, 62, 64, 57, 68, 41, 53], [68, 78, 84, 86, 86, 85, 83, 81, 84, 81, 78, 77, 71, 47, 71, 70, 75, 67, 61, 52], [78, 82, 85, 85, 84, 83, 83, 85, 82, 81, 79, 75, 64, 54, 64, 68, 72, 64, 60, 49], [63, 75, 81, 80, 76, 83, 85, 78, 72, 76, 56, 66, 61, 43, 58, 55, 59, 50, 50, 44], [73, 76, 69, 76, 73, 73, 77, 74, 75, 71, 68, 66, 68, 68, 69, 64, 61, 48, 42, 45], [71, 77, 78, 77, 80, 81, 76, 81, 80, 79, 75, 69, 65, 73, 56, 68, 68, 58, 43, 52], [69, 73, 73, 72, 72, 66, 68, 71, 71, 69, 62, 57, 56, 54, 57, 62, 47, 52, 34, 20], [66, 72, 70, 70, 65, 70, 66, 67, 65, 67, 64, 59, 55, 58, 43, 61, 54, 52, 45, 33], [68, 79, 83, 85, 86, 86, 85, 85, 82, 80, 71, 66, 76, 76, 75, 65, 67, 56, 41, 52], [71, 78, 79, 79, 79, 79, 75, 72, 73, 72, 71, 69, 54, 63, 70, 75, 52, 62, 49, 32], [69, 75, 77, 77, 76, 76, 74, 74, 70, 70, 60, 54, 63, 56, 67, 66, 38, 57, 47, 40], [60, 62, 55, 50, 59, 58, 56, 51, 48, 47, 45, 41, 44, 28, 50, 33, 23, 38, 23, 13], [53, 55, 62, 66, 64, 61, 61, 61, 62, 61, 56, 51, 44, 53, 57, 35, 47, 33, 36, 24], [61, 65, 64, 62, 67, 68, 68, 67, 67, 66, 60, 48, 57, 47, 64, 59, 45, 46, 38, 29], [60, 67, 69, 67, 67, 66, 65, 65, 64, 62, 56, 34, 50, 45, 54, 50, 42, 42, 35, 26], [55, 61, 62, 58, 52, 53, 58, 59, 58, 55, 29, 47, 50, 56, 56, 42, 47, 39, 32, 23], [63, 66, 65, 68, 72, 72, 70, 67, 68, 69, 69, 66, 55, 72, 67, 58, 56, 51, 35, 29], [65, 66, 59, 65, 70, 68, 61, 65, 59, 55, 58, 59, 64, 58, 59, 60, 43, 28, 12, 24], [68, 74, 76, 77, 78, 75, 71, 69, 63, 66, 61, 63, 51, 60, 55, 48, 44, 40, 29, 19], [63, 69, 70, 68, 65, 65, 65, 60, 50, 57, 47, 52, 30, 46, 37, 33, 26, 30, 7, 8], [53, 58, 57, 55, 49, 55, 48, 52, 44, 38, 25, 39, 36, 46, 39, 34, 33, 12, 15, 3], [53, 59, 61, 60, 58, 58, 57, 55, 51, 43, 48, 50, 52, 46, 41, 40, 38, 27, 14, 9], [58, 63, 63, 63, 64, 63, 63, 63, 58, 53, 45, 49, 48, 51, 40, 45, 32, 21, 17, 15], [59, 67, 70, 70, 68, 66, 64, 60, 48, 53, 53, 53, 42, 55, 43, 49, 41, 31, 18, 7], [54, 62, 64, 64, 64, 64, 64, 59, 56, 46, 51, 50, 54, 58, 29, 44, 39, 29, 16, 12], [61, 67, 70, 70, 70, 69, 67, 66, 62, 58, 47, 50, 46, 55, 45, 37, 37, 23, 3, 10], [55, 63, 67, 68, 65, 62, 55, 50, 53, 58, 57, 52, 50, 49, 45, 21, 28, 18, 0, 8], [67, 71, 75, 76, 75, 73, 69, 67, 71, 67, 67, 66, 66, 64, 60, 58, 47, 28, 35, 25], [73, 75, 76, 78, 79, 79, 80, 81, 81, 81, 80, 80, 78, 77, 75, 72, 68, 61, 54, 59], [71, 74, 74, 74, 70, 68, 71, 69, 70, 70, 69, 68, 67, 65, 60, 55, 29, 46, 52, 50], [66, 66, 65, 68, 72, 72, 70, 68, 65, 64, 63, 61, 59, 56, 53, 52, 40, 47, 49, 24], [50, 52, 49, 47, 49, 44, 47, 36, 32, 49, 50, 49, 47, 46, 43, 35, 38, 41, 31, 35], [55, 56, 55, 54, 55, 56, 56, 53, 53, 50, 49, 48, 45, 43, 37, 28, 37, 38, 18, 32], [56, 58, 59, 59, 59, 59, 59, 59, 58, 58, 57, 56, 54, 52, 45, 34, 41, 36, 38, 34], [37, 38, 38, 40, 40, 42, 39, 40, 39, 41, 40, 38, 34, 34, 29, 26, 21, 25, 22, 21], [20, 29, 33, 34, 35, 31, 28, 19, 16, 27, 16, 8, 22, 21, 23, 20, 23, 25, 14, 20], [32, 36, 37, 34, 29, 33, 30, 29, 31, 33, 30, 27, 21, 16, 12, 27, 25, 18, 16, 7], [33, 37, 39, 38, 37, 38, 38, 38, 36, 35, 34, 31, 26, 12, 27, 31, 22, 16, 13, 0], [33, 38, 39, 38, 38, 36, 36, 36, 35, 35, 35, 33, 27, 10, 20, 17, 24, 15, 17, 18], [26, 28, 27, 25, 28, 27, 26, 27, 23, 27, 19, 23, 23, 11, 19, 20, 19, 17, 6, 13], [25, 21, 25, 18, 19, 22, 18, 21, 16, 18, 19, 20, 2, 14, 12, 11, 7, 15, 2, 0], [31, 30, 24, 26, 24, 26, 21, 25, 21, 20, 17, 18, 12, 12, 14, 10, 7, 11, 4, 17], [15, 11, 19, 13, 0, 0, 13, 11, 10, 12, 11, 4, 11, 12, 13, 11, 0, 10, 14, 11], [12, 11, 5, 10, 1, 9, 0, 18, 5, 14, 16, 13, 12, 0, 10, 11, 4, 7, 0, 12], [16, 13, 4, 0, 15, 7, 15, 0, 13, 18, 9, 9, 11, 9, 0, 0, 9, 13, 4, 10], [11, 13, 15, 12, 9, 8, 6, 16, 16, 7, 8, 8, 6, 1, 0, 7, 14, 15, 11, 1], [13, 19, 11, 10, 2, 3, 0, 11, 9, 0, 14, 1, 6, 7, 14, 1, 10, 0, 11, 16], [23, 19, 21, 18, 22, 16, 13, 0, 14, 13, 10, 7, 11, 7, 12, 7, 13, 0, 12, 13], [14, 13, 20, 23, 22, 18, 11, 17, 17, 6, 12, 16, 12, 10, 10, 11, 12, 11, 6, 0], [15, 12, 21, 19, 16, 15, 17, 18, 16, 17, 14, 16, 15, 12, 15, 20, 19, 13, 19, 15], [21, 22, 21, 12, 0, 9, 0, 17, 11, 0, 9, 6, 6, 3, 4, 3, 6, 11, 0, 0], [13, 15, 13, 13, 10, 9, 9, 1, 9, 6, 5, 12, 10, 11, 3, 10, 8, 15, 3, 9], [17, 3, 17, 19, 7, 15, 4, 12, 8, 11, 12, 6, 0, 9, 5, 0, 2, 3, 13, 6], [15, 8, 14, 17, 9, 13, 7, 7, 8, 14, 2, 9, 6, 13, 7, 0, 6, 9, 11, 10], [0, 7, 6, 13, 16, 12, 7, 11, 12, 14, 5, 3, 11, 14, 0, 7, 4, 7, 11, 0], [14, 8, 13, 3, 12, 18, 9, 0, 13, 9, 7, 1, 10, 10, 0, 8, 9, 0, 0, 14], [15, 14, 12, 0, 8, 4, 11, 6, 10, 0, 0, 4, 10, 4, 2, 7, 8, 0, 6, 6], [11, 10, 9, 17, 12, 1, 6, 13, 2, 11, 13, 1, 6, 9, 11, 12, 6, 13, 4, 12], [12, 4, 7, 5, 2, 11, 6, 0, 6, 10, 14, 15, 14, 0, 11, 7, 0, 9, 14, 9], [10, 10, 0, 10, 5, 12, 0, 4, 11, 12, 8, 1, 6, 11, 6, 0, 4, 9, 12, 14], [9, 5, 11, 7, 12, 1, 10, 10, 12, 7, 7, 4, 7, 0, 5, 10, 10, 11, 10, 12], [13, 16, 9, 12, 6, 16, 11, 12, 3, 12, 10, 6, 0, 0, 12, 9, 14, 9, 7, 11], [10, 8, 13, 16, 8, 10, 12, 10, 6, 11, 14, 9, 0, 7, 3, 16, 12, 13, 11, 10], [2, 6, 11, 10, 0, 7, 2, 4, 8, 14, 6, 18, 13, 10, 9, 7, 7, 5, 12, 11], [19, 16, 13, 13, 12, 7, 8, 15, 13, 10, 3, 12, 10, 12, 14, 7, 18, 3, 11, 13], [15, 16, 18, 7, 11, 13, 10, 11, 11, 7, 15, 11, 13, 0, 11, 7, 9, 1, 6, 7], [19, 14, 15, 16, 12, 1, 12, 9, 10, 12, 5, 13, 0, 2, 14, 3, 11, 11, 1, 5], [62, 78, 82, 86, 88, 85, 82, 82, 83, 80, 80, 78, 77, 76, 73, 70, 65, 60, 48, 43], [72, 83, 89, 89, 92, 92, 93, 93, 95, 94, 93, 93, 92, 91, 89, 86, 80, 72, 68, 73], [53, 81, 88, 89, 88, 84, 86, 85, 85, 86, 86, 84, 82, 80, 76, 70, 57, 63, 65, 63], [69, 80, 83, 82, 87, 88, 86, 86, 82, 81, 79, 77, 74, 72, 66, 65, 61, 53, 63, 53], [52, 66, 69, 67, 62, 62, 57, 56, 60, 67, 67, 67, 65, 64, 59, 53, 49, 55, 50, 41], [66, 74, 75, 76, 73, 75, 76, 73, 73, 69, 68, 67, 65, 63, 57, 41, 56, 57, 46, 52], [66, 78, 82, 83, 84, 83, 84, 84, 83, 83, 82, 81, 79, 76, 67, 62, 68, 64, 61, 58], [57, 61, 69, 65, 65, 66, 67, 68, 69, 69, 68, 68, 66, 62, 51, 52, 53, 34, 49, 43], [58, 60, 63, 67, 61, 64, 57, 53, 53, 54, 54, 52, 51, 47, 37, 42, 49, 43, 41, 32], [59, 68, 74, 76, 75, 74, 75, 74, 73, 72, 72, 70, 67, 63, 60, 63, 62, 53, 50, 41], [55, 65, 68, 70, 70, 70, 71, 70, 69, 68, 66, 64, 58, 45, 61, 63, 56, 45, 42, 42], [53, 61, 67, 68, 69, 68, 66, 67, 67, 67, 66, 66, 63, 59, 56, 54, 51, 45, 44, 29], [42, 59, 62, 60, 60, 59, 61, 64, 63, 60, 57, 57, 53, 40, 42, 41, 48, 42, 20, 25], [54, 68, 72, 72, 72, 71, 71, 71, 71, 71, 69, 67, 62, 52, 41, 54, 54, 46, 45, 38], [57, 68, 69, 63, 65, 64, 66, 67, 67, 63, 60, 56, 49, 47, 52, 54, 47, 41, 37, 29], [52, 52, 54, 56, 45, 49, 47, 49, 46, 33, 29, 33, 40, 44, 42, 40, 33, 29, 24, 19], [42, 47, 45, 46, 43, 43, 49, 46, 48, 47, 47, 45, 38, 40, 37, 35, 36, 28, 19, 9], [40, 48, 49, 49, 48, 48, 47, 44, 41, 42, 41, 35, 35, 36, 36, 33, 30, 24, 19, 11], [43, 49, 52, 51, 52, 54, 51, 52, 48, 50, 46, 40, 41, 47, 50, 47, 37, 35, 19, 20], [35, 30, 32, 35, 43, 45, 46, 47, 47, 46, 45, 43, 37, 34, 36, 35, 33, 18, 13, 13], [41, 44, 42, 42, 42, 39, 42, 41, 38, 40, 37, 37, 34, 35, 35, 33, 25, 19, 11, 9], [38, 41, 39, 28, 34, 33, 40, 40, 40, 40, 38, 34, 30, 36, 40, 37, 30, 28, 21, 3], [30, 36, 39, 41, 40, 43, 43, 44, 43, 42, 39, 36, 34, 38, 33, 32, 29, 24, 15, 12], [29, 29, 13, 15, 21, 24, 28, 28, 26, 29, 29, 20, 24, 25, 19, 21, 14, 9, 18, 7], [34, 33, 29, 15, 26, 31, 25, 18, 21, 19, 14, 19, 10, 23, 15, 17, 10, 16, 2, 4], [31, 34, 30, 32, 36, 33, 34, 35, 36, 36, 33, 29, 21, 25, 24, 29, 3, 15, 6, 0], [22, 30, 33, 34, 36, 35, 35, 34, 32, 31, 26, 20, 21, 26, 22, 13, 12, 1, 3, 0], [23, 33, 37, 38, 39, 40, 40, 40, 39, 37, 34, 31, 29, 30, 13, 20, 17, 9, 8, 15], [8, 10, 25, 27, 27, 15, 25, 24, 21, 24, 20, 16, 13, 12, 18, 9, 13, 3, 0, 9], [14, 28, 33, 33, 32, 33, 35, 25, 26, 29, 28, 25, 11, 21, 15, 5, 1, 7, 7, 7], [17, 22, 27, 28, 26, 13, 23, 17, 21, 22, 23, 17, 18, 13, 16, 12, 14, 11, 10, 8], [25, 26, 27, 27, 24, 21, 28, 27, 27, 27, 26, 21, 18, 19, 17, 21, 4, 8, 0, 4], [6, 7, 10, 10, 13, 19, 0, 14, 5, 11, 9, 0, 0, 7, 6, 14, 2, 11, 3, 10], [6, 16, 23, 25, 21, 25, 22, 23, 21, 20, 15, 0, 6, 15, 13, 7, 0, 10, 10, 6], [19, 17, 10, 7, 11, 13, 0, 17, 12, 6, 10, 5, 5, 0, 10, 5, 9, 7, 0, 9], [16, 28, 29, 23, 17, 23, 14, 18, 15, 20, 19, 0, 16, 16, 1, 7, 4, 3, 16, 7], [22, 7, 1, 7, 18, 17, 21, 17, 17, 13, 15, 12, 15, 10, 4, 7, 5, 5, 10, 15], [19, 17, 4, 11, 7, 13, 11, 6, 7, 5, 6, 13, 4, 14, 11, 6, 5, 4, 5, 11], [16, 14, 17, 21, 16, 19, 14, 18, 15, 11, 5, 13, 9, 6, 5, 2, 3, 11, 13, 0], [8, 12, 9, 6, 16, 18, 16, 9, 8, 0, 11, 15, 10, 13, 12, 0, 13, 14, 4, 8], [72, 86, 89, 94, 96, 93, 94, 89, 89, 89, 87, 87, 86, 85, 83, 80, 74, 68, 64, 55], [81, 91, 97, 97, 100, 101, 102, 102, 103, 103, 102, 102, 101, 99, 97, 95, 89, 80, 76, 80], [65, 91, 97, 98, 97, 94, 95, 94, 93, 93, 92, 91, 89, 87, 81, 75, 60, 69, 71, 72], [78, 89, 92, 91, 96, 97, 95, 95, 92, 93, 92, 91, 88, 86, 81, 77, 74, 68, 73, 62], [54, 75, 78, 78, 75, 73, 62, 68, 62, 72, 75, 72, 70, 68, 63, 55, 56, 61, 58, 50], [77, 82, 82, 83, 81, 83, 84, 80, 82, 80, 79, 79, 77, 75, 70, 62, 66, 68, 52, 60], [76, 88, 93, 94, 95, 94, 94, 94, 94, 94, 93, 92, 90, 87, 77, 73, 77, 73, 71, 68], [67, 74, 80, 74, 75, 79, 80, 80, 80, 79, 79, 79, 76, 72, 61, 63, 64, 45, 59, 51], [73, 76, 74, 80, 73, 78, 75, 72, 69, 66, 59, 49, 55, 51, 42, 60, 65, 61, 54, 39], [72, 81, 87, 89, 88, 87, 88, 87, 87, 87, 86, 85, 81, 76, 71, 76, 75, 66, 57, 59], [67, 78, 80, 82, 81, 81, 81, 81, 80, 79, 77, 76, 70, 63, 71, 73, 65, 55, 48, 48], [67, 76, 82, 84, 86, 85, 84, 84, 83, 82, 81, 80, 77, 71, 69, 68, 67, 62, 57, 34], [53, 72, 75, 76, 75, 75, 71, 74, 80, 74, 74, 74, 66, 58, 57, 60, 64, 56, 45, 37], [72, 83, 87, 87, 87, 86, 87, 87, 86, 85, 83, 81, 75, 62, 65, 70, 67, 61, 57, 51], [76, 86, 86, 79, 82, 80, 85, 84, 84, 80, 76, 70, 62, 66, 72, 70, 69, 53, 53, 36], [72, 71, 72, 75, 67, 68, 67, 65, 68, 63, 58, 28, 58, 62, 62, 58, 51, 50, 42, 36], [65, 71, 69, 69, 69, 68, 71, 71, 72, 72, 71, 68, 58, 59, 61, 55, 56, 50, 41, 25], [59, 69, 71, 73, 73, 73, 71, 70, 68, 68, 65, 61, 58, 59, 56, 54, 57, 45, 43, 34], [61, 68, 70, 69, 70, 74, 69, 70, 65, 68, 64, 60, 56, 64, 66, 62, 52, 52, 36, 30], [52, 45, 59, 63, 65, 67, 66, 68, 66, 64, 63, 61, 49, 56, 61, 58, 47, 40, 25, 35], [60, 63, 60, 58, 56, 58, 57, 55, 44, 52, 51, 43, 46, 48, 52, 37, 31, 38, 30, 24], [59, 65, 66, 61, 63, 60, 65, 67, 67, 66, 65, 63, 53, 55, 61, 60, 49, 45, 33, 17], [58, 64, 67, 70, 71, 73, 74, 74, 74, 73, 70, 68, 64, 68, 67, 61, 57, 53, 40, 25], [57, 61, 57, 46, 53, 54, 54, 54, 55, 52, 52, 49, 41, 24, 48, 48, 38, 29, 28, 13], [44, 51, 57, 59, 46, 40, 44, 54, 35, 50, 50, 44, 43, 45, 41, 33, 36, 23, 6, 11], [55, 56, 56, 56, 58, 58, 56, 54, 54, 54, 50, 46, 38, 45, 46, 47, 21, 37, 25, 19], [50, 56, 58, 60, 61, 59, 60, 61, 60, 59, 56, 53, 44, 48, 49, 42, 34, 32, 17, 11], [51, 53, 54, 54, 58, 59, 57, 55, 57, 52, 50, 49, 43, 41, 36, 39, 32, 23, 13, 11], [52, 51, 52, 52, 54, 46, 50, 46, 49, 50, 47, 35, 48, 45, 37, 33, 23, 24, 15, 10], [39, 59, 63, 62, 64, 62, 61, 62, 59, 60, 47, 47, 48, 50, 41, 38, 2, 18, 10, 5], [48, 60, 62, 58, 50, 59, 57, 60, 59, 54, 51, 55, 50, 45, 44, 29, 31, 25, 13, 12], [29, 51, 52, 50, 52, 51, 53, 52, 51, 48, 43, 36, 28, 35, 45, 39, 31, 21, 14, 0], [36, 46, 40, 37, 30, 28, 37, 31, 27, 29, 24, 26, 20, 18, 20, 20, 13, 10, 10, 8], [41, 45, 47, 50, 51, 51, 51, 51, 49, 47, 42, 37, 40, 42, 36, 22, 22, 19, 10, 9], [34, 42, 46, 43, 43, 42, 41, 40, 36, 35, 27, 29, 33, 29, 25, 23, 16, 11, 9, 16], [41, 43, 42, 42, 39, 37, 40, 36, 37, 31, 32, 36, 39, 37, 27, 28, 13, 16, 10, 2], [37, 26, 33, 36, 42, 43, 29, 35, 39, 39, 38, 36, 32, 31, 19, 24, 18, 11, 13, 9], [46, 39, 43, 38, 23, 38, 34, 41, 36, 38, 35, 33, 31, 32, 24, 13, 1, 13, 7, 7], [44, 50, 52, 51, 51, 51, 48, 47, 44, 37, 32, 39, 38, 32, 29, 29, 19, 7, 8, 10], [32, 37, 38, 35, 36, 31, 38, 42, 36, 33, 36, 32, 12, 22, 24, 15, 0, 2, 11, 11], [69, 79, 79, 76, 82, 80, 80, 78, 76, 79, 77, 77, 75, 74, 70, 65, 55, 49, 50, 51], [65, 74, 79, 79, 81, 83, 82, 83, 84, 84, 81, 79, 75, 70, 57, 58, 60, 55, 47, 34], [56, 53, 59, 67, 73, 75, 77, 76, 76, 75, 73, 73, 71, 69, 66, 62, 57, 61, 59, 56], [58, 66, 69, 67, 64, 61, 65, 64, 63, 65, 65, 64, 62, 60, 54, 43, 53, 42, 46, 34], [59, 57, 61, 64, 65, 65, 66, 67, 68, 68, 68, 67, 66, 63, 55, 51, 51, 52, 42, 40], [56, 64, 66, 67, 66, 66, 66, 67, 65, 65, 65, 64, 62, 60, 51, 50, 37, 52, 36, 40], [49, 51, 52, 52, 54, 55, 56, 56, 56, 56, 56, 56, 55, 53, 50, 50, 45, 37, 38, 32], [43, 40, 45, 45, 44, 44, 42, 43, 45, 44, 41, 39, 38, 29, 33, 34, 29, 21, 18, 16], [37, 40, 40, 43, 44, 44, 44, 45, 45, 44, 45, 42, 38, 30, 36, 32, 30, 24, 15, 17], [25, 29, 25, 12, 23, 23, 26, 23, 25, 21, 28, 28, 31, 30, 8, 23, 22, 20, 20, 0], [18, 31, 34, 35, 35, 37, 38, 39, 39, 40, 41, 41, 38, 30, 28, 17, 23, 15, 14, 7], [27, 33, 33, 31, 33, 33, 33, 33, 34, 34, 34, 34, 31, 21, 20, 21, 21, 18, 19, 9], [22, 25, 25, 28, 26, 23, 24, 24, 25, 25, 21, 24, 18, 18, 26, 12, 20, 7, 2, 8], [17, 6, 25, 28, 22, 27, 28, 27, 30, 31, 32, 32, 27, 14, 11, 14, 18, 5, 11, 2], [9, 19, 23, 21, 25, 25, 25, 22, 17, 19, 25, 9, 10, 19, 11, 5, 0, 0, 8, 5], [9, 1, 13, 10, 12, 8, 14, 9, 8, 11, 5, 15, 17, 6, 15, 3, 10, 8, 8, 15], [7, 7, 9, 1, 9, 20, 12, 14, 14, 8, 11, 11, 9, 14, 15, 1, 8, 7, 0, 7], [16, 20, 19, 23, 23, 21, 20, 23, 22, 21, 15, 12, 7, 0, 15, 14, 11, 8, 12, 6], [25, 22, 19, 22, 19, 15, 22, 14, 19, 12, 16, 10, 13, 14, 18, 18, 16, 18, 18, 17], [10, 3, 1, 14, 18, 15, 19, 4, 13, 9, 13, 13, 8, 8, 6, 8, 8, 11, 0, 15], [15, 21, 24, 27, 26, 25, 26, 24, 23, 21, 18, 0, 9, 18, 10, 15, 9, 7, 9, 15], [2, 5, 9, 0, 13, 6, 10, 0, 12, 5, 13, 11, 13, 7, 9, 8, 9, 12, 8, 4], [18, 14, 15, 12, 12, 14, 6, 8, 13, 5, 10, 9, 11, 11, 15, 9, 9, 14, 0, 10], [13, 13, 12, 1, 6, 14, 0, 13, 11, 13, 0, 8, 8, 0, 0, 14, 0, 4, 10, 8], [6, 5, 0, 6, 17, 12, 7, 6, 15, 9, 5, 12, 0, 12, 0, 9, 1, 4, 7, 7], [14, 7, 16, 16, 5, 4, 13, 7, 18, 11, 0, 5, 6, 3, 6, 13, 6, 11, 9, 7], [12, 12, 12, 7, 13, 7, 15, 15, 9, 7, 13, 12, 9, 14, 13, 0, 13, 16, 3, 9], [7, 9, 13, 15, 17, 16, 13, 12, 12, 11, 10, 10, 14, 0, 7, 9, 12, 0, 13, 5], [19, 16, 19, 19, 8, 14, 4, 0, 13, 16, 2, 15, 1, 4, 13, 0, 7, 12, 4, 11], [22, 22, 20, 16, 15, 9, 17, 12, 15, 8, 9, 14, 17, 5, 0, 0, 7, 9, 7, 0], [9, 12, 1, 12, 7, 18, 3, 8, 7, 8, 7, 10, 11, 7, 10, 9, 9, 10, 10, 9], [15, 12, 10, 8, 6, 13, 5, 15, 13, 3, 11, 6, 6, 3, 7, 13, 12, 8, 6, 1], [15, 12, 15, 18, 11, 11, 12, 15, 14, 16, 11, 12, 14, 16, 12, 17, 10, 16, 20, 18], [8, 7, 4, 13, 9, 15, 12, 13, 3, 5, 8, 12, 3, 2, 8, 0, 6, 10, 5, 7], [14, 8, 7, 7, 2, 11, 13, 8, 12, 4, 11, 14, 12, 11, 4, 7, 5, 7, 5, 13], [17, 14, 10, 11, 6, 11, 4, 0, 11, 6, 10, 4, 13, 13, 4, 8, 0, 13, 12, 3], [9, 12, 13, 0, 5, 8, 5, 13, 0, 11, 16, 8, 15, 11, 7, 5, 0, 0, 11, 9], [16, 5, 11, 17, 13, 15, 15, 7, 0, 12, 12, 13, 4, 0, 14, 9, 7, 0, 3, 0], [12, 7, 0, 12, 10, 7, 0, 0, 13, 8, 0, 0, 11, 9, 5, 13, 0, 16, 9, 2], [0, 12, 12, 5, 10, 12, 13, 6, 3, 6, 7, 7, 10, 12, 0, 6, 6, 0, 0, 8], [70, 84, 89, 87, 90, 90, 91, 88, 85, 89, 87, 87, 85, 83, 79, 75, 62, 60, 63, 54], [74, 81, 90, 91, 92, 94, 94, 94, 95, 95, 92, 90, 86, 81, 72, 71, 70, 66, 56, 52], [64, 74, 67, 79, 85, 88, 89, 88, 88, 87, 85, 84, 81, 77, 68, 64, 67, 68, 66, 65], [64, 78, 84, 85, 80, 79, 81, 81, 80, 81, 79, 77, 74, 70, 56, 61, 67, 51, 54, 55], [73, 73, 76, 79, 80, 80, 80, 82, 82, 82, 81, 80, 77, 72, 60, 69, 53, 68, 58, 60], [67, 79, 83, 84, 84, 84, 84, 85, 83, 83, 82, 80, 76, 69, 66, 68, 62, 65, 53, 45], [64, 73, 75, 74, 76, 76, 78, 79, 78, 77, 76, 76, 72, 69, 67, 58, 70, 58, 61, 54], [69, 67, 69, 74, 71, 73, 71, 71, 71, 70, 67, 61, 55, 57, 58, 44, 51, 42, 40, 41], [62, 72, 74, 75, 77, 76, 76, 77, 77, 76, 74, 71, 61, 63, 63, 60, 54, 53, 52, 43], [56, 58, 52, 59, 63, 65, 66, 65, 66, 66, 65, 63, 55, 53, 56, 50, 55, 53, 46, 34], [52, 64, 68, 69, 70, 70, 70, 71, 71, 70, 69, 67, 57, 52, 46, 59, 50, 42, 39, 33], [55, 65, 67, 66, 66, 66, 65, 66, 66, 66, 64, 61, 48, 55, 50, 49, 43, 33, 27, 29], [50, 60, 62, 63, 63, 65, 65, 63, 65, 65, 60, 52, 52, 56, 53, 44, 40, 38, 35, 20], [54, 48, 63, 64, 63, 64, 66, 66, 66, 67, 66, 63, 48, 51, 40, 43, 45, 43, 22, 27], [53, 53, 54, 58, 57, 61, 48, 55, 42, 52, 54, 49, 41, 49, 44, 41, 42, 29, 19, 19], [46, 43, 48, 46, 43, 44, 42, 40, 40, 40, 30, 21, 25, 25, 23, 12, 8, 12, 10, 11], [39, 37, 40, 39, 38, 36, 41, 41, 39, 41, 39, 31, 33, 35, 17, 29, 26, 14, 15, 8], [35, 45, 46, 46, 48, 48, 50, 50, 51, 51, 50, 45, 31, 40, 33, 37, 29, 25, 19, 7], [40, 46, 40, 38, 41, 34, 30, 29, 38, 40, 41, 41, 32, 24, 33, 26, 24, 11, 13, 14], [29, 32, 30, 27, 30, 34, 31, 32, 30, 23, 28, 30, 34, 33, 19, 24, 21, 17, 0, 14], [24, 32, 38, 41, 42, 43, 43, 43, 44, 43, 41, 38, 38, 31, 22, 22, 15, 11, 7, 9], [24, 24, 25, 28, 19, 26, 11, 12, 14, 20, 26, 27, 25, 23, 15, 19, 16, 14, 12, 8], [27, 24, 22, 23, 27, 28, 21, 17, 13, 11, 24, 25, 21, 19, 20, 18, 6, 5, 16, 10], [23, 21, 25, 25, 25, 26, 23, 27, 25, 26, 21, 21, 15, 17, 14, 5, 5, 16, 14, 0], [24, 25, 28, 26, 24, 22, 22, 10, 17, 21, 23, 26, 16, 23, 12, 14, 5, 9, 12, 8], [18, 24, 32, 30, 27, 26, 27, 27, 20, 10, 13, 24, 19, 8, 11, 10, 0, 5, 9, 9], [27, 32, 33, 33, 32, 28, 31, 30, 27, 27, 26, 29, 19, 20, 20, 12, 12, 5, 2, 7], [33, 39, 40, 38, 38, 35, 31, 28, 20, 28, 28, 31, 25, 6, 10, 11, 13, 9, 15, 6], [22, 29, 20, 27, 26, 23, 26, 23, 22, 25, 25, 15, 18, 19, 8, 0, 14, 3, 0, 15], [25, 30, 31, 31, 32, 32, 32, 31, 30, 24, 19, 26, 17, 22, 16, 16, 11, 0, 14, 8], [26, 20, 21, 13, 18, 18, 15, 17, 18, 8, 6, 19, 8, 10, 6, 14, 0, 0, 13, 5], [15, 9, 14, 15, 20, 14, 9, 15, 15, 13, 6, 9, 14, 0, 5, 7, 0, 1, 9, 1], [19, 18, 21, 15, 20, 19, 18, 17, 12, 16, 1, 7, 7, 13, 7, 9, 12, 5, 0, 16], [20, 15, 6, 5, 23, 9, 15, 13, 15, 10, 15, 15, 6, 0, 3, 6, 4, 11, 11, 11], [14, 15, 13, 6, 14, 16, 7, 14, 8, 14, 9, 9, 9, 6, 10, 8, 1, 11, 7, 4], [24, 25, 14, 21, 15, 21, 23, 24, 21, 18, 8, 12, 9, 0, 13, 11, 1, 9, 5, 7], [17, 19, 18, 12, 20, 22, 18, 18, 20, 13, 12, 10, 9, 4, 9, 11, 0, 9, 1, 4], [5, 8, 16, 19, 15, 0, 14, 15, 14, 11, 6, 12, 3, 14, 17, 9, 14, 7, 2, 0], [13, 9, 18, 10, 15, 18, 18, 20, 21, 14, 0, 15, 7, 14, 12, 2, 17, 14, 11, 14], [10, 5, 16, 13, 16, 13, 17, 17, 19, 10, 15, 12, 2, 8, 12, 14, 13, 0, 2, 5], [79, 89, 95, 94, 96, 99, 98, 98, 93, 95, 94, 94, 92, 91, 88, 84, 71, 67, 71, 62], [80, 88, 97, 98, 100, 102, 102, 103, 104, 103, 100, 98, 94, 89, 80, 80, 78, 73, 61, 56], [68, 82, 75, 86, 92, 95, 95, 95, 94, 93, 92, 90, 86, 80, 71, 74, 74, 74, 74, 71], [72, 86, 91, 92, 88, 88, 88, 87, 85, 87, 85, 83, 80, 75, 53, 70, 72, 48, 61, 57], [80, 82, 84, 87, 90, 89, 88, 90, 89, 89, 89, 88, 84, 78, 73, 78, 65, 77, 64, 68], [75, 87, 90, 91, 91, 91, 90, 90, 88, 88, 86, 84, 78, 67, 74, 71, 73, 70, 61, 55], [74, 82, 85, 83, 85, 86, 88, 88, 88, 88, 87, 86, 82, 79, 78, 62, 79, 71, 72, 63], [80, 77, 80, 85, 83, 84, 82, 82, 82, 81, 76, 65, 66, 63, 57, 56, 41, 55, 44, 32], [72, 84, 86, 87, 89, 88, 88, 88, 87, 86, 84, 80, 73, 77, 70, 75, 70, 62, 60, 55], [69, 72, 54, 71, 74, 78, 79, 79, 80, 80, 78, 73, 47, 69, 69, 62, 65, 66, 53, 51], [64, 77, 80, 81, 82, 82, 82, 83, 82, 81, 79, 75, 62, 69, 60, 72, 63, 57, 50, 44], [69, 79, 82, 80, 81, 81, 80, 80, 80, 80, 77, 72, 64, 71, 51, 65, 60, 56, 48, 41], [65, 73, 76, 76, 75, 76, 79, 75, 78, 76, 74, 66, 68, 66, 67, 54, 50, 38, 47, 26], [70, 68, 78, 79, 77, 77, 79, 78, 79, 79, 77, 73, 63, 67, 64, 62, 57, 36, 35, 31], [71, 69, 75, 79, 76, 82, 75, 79, 72, 67, 71, 63, 68, 69, 61, 57, 60, 49, 40, 22], [65, 65, 69, 68, 64, 66, 63, 64, 62, 57, 32, 51, 46, 53, 47, 42, 28, 36, 17, 12], [61, 62, 55, 57, 60, 47, 61, 61, 61, 61, 58, 50, 56, 48, 41, 47, 42, 31, 17, 11], [57, 64, 67, 69, 69, 69, 68, 68, 67, 65, 60, 55, 59, 50, 46, 51, 48, 17, 25, 22], [58, 63, 55, 50, 58, 57, 56, 61, 60, 58, 54, 55, 51, 38, 48, 50, 35, 36, 24, 22], [44, 54, 52, 53, 55, 56, 54, 54, 52, 52, 52, 54, 51, 50, 45, 47, 38, 30, 16, 1], [56, 62, 63, 62, 64, 63, 63, 62, 60, 57, 47, 45, 49, 38, 37, 41, 36, 18, 12, 8], [41, 38, 54, 53, 47, 48, 49, 51, 58, 58, 55, 49, 44, 47, 33, 45, 36, 29, 14, 0], [57, 60, 61, 62, 63, 63, 63, 63, 60, 57, 47, 53, 48, 43, 40, 36, 32, 34, 19, 10], [42, 50, 53, 54, 53, 53, 52, 49, 48, 46, 38, 42, 39, 39, 32, 32, 24, 17, 9, 9], [45, 40, 47, 46, 50, 48, 35, 43, 37, 45, 46, 41, 36, 35, 0, 29, 20, 19, 4, 13], [36, 45, 52, 49, 45, 47, 46, 44, 41, 36, 42, 45, 26, 33, 26, 21, 20, 3, 5, 0], [51, 55, 58, 58, 57, 51, 44, 49, 51, 39, 42, 52, 43, 42, 29, 23, 15, 20, 13, 5], [50, 53, 53, 56, 55, 54, 48, 48, 50, 45, 38, 46, 37, 32, 31, 22, 5, 13, 10, 8], [47, 49, 52, 51, 50, 50, 44, 41, 44, 43, 35, 38, 31, 26, 33, 24, 15, 14, 9, 8], [40, 50, 49, 47, 50, 49, 49, 48, 42, 36, 37, 32, 34, 29, 28, 19, 0, 9, 4, 8], [42, 32, 36, 32, 35, 34, 37, 38, 39, 38, 34, 27, 25, 24, 18, 15, 14, 8, 5, 0], [33, 26, 29, 13, 27, 26, 31, 26, 30, 27, 23, 20, 18, 22, 18, 2, 10, 5, 13, 8], [29, 30, 37, 37, 37, 33, 33, 34, 32, 19, 30, 14, 13, 18, 10, 19, 14, 15, 13, 15], [28, 33, 38, 36, 35, 32, 28, 34, 35, 33, 15, 25, 26, 19, 14, 12, 11, 13, 4, 0], [37, 39, 33, 38, 38, 37, 37, 31, 16, 22, 12, 26, 10, 16, 17, 2, 9, 10, 10, 3], [33, 41, 41, 42, 42, 45, 45, 46, 43, 39, 29, 28, 29, 31, 27, 12, 14, 1, 4, 7], [28, 21, 29, 28, 28, 27, 29, 29, 25, 16, 21, 12, 18, 3, 10, 9, 8, 0, 12, 0], [29, 33, 28, 32, 32, 13, 26, 31, 34, 36, 25, 28, 24, 0, 7, 11, 13, 3, 0, 0], [32, 33, 33, 35, 36, 36, 36, 30, 28, 23, 29, 29, 16, 16, 6, 11, 2, 12, 8, 4], [35, 43, 38, 42, 45, 46, 47, 47, 45, 37, 39, 34, 37, 31, 24, 4, 11, 2, 7, 15], [74, 74, 58, 70, 67, 62, 62, 67, 64, 64, 64, 65, 65, 64, 64, 63, 59, 56, 54, 55], [63, 71, 74, 72, 74, 75, 77, 77, 76, 75, 73, 71, 67, 63, 58, 56, 54, 57, 55, 51], [48, 53, 59, 63, 64, 63, 61, 62, 63, 61, 58, 54, 40, 51, 56, 55, 49, 48, 44, 47], [50, 53, 52, 51, 51, 51, 53, 54, 56, 56, 56, 56, 56, 52, 46, 48, 47, 32, 41, 41], [30, 40, 44, 47, 49, 50, 50, 49, 45, 40, 36, 44, 50, 52, 50, 45, 45, 46, 38, 36], [45, 48, 48, 50, 51, 50, 49, 49, 49, 48, 46, 45, 44, 43, 42, 41, 33, 39, 29, 28], [33, 26, 23, 30, 27, 29, 23, 31, 30, 27, 16, 14, 19, 22, 25, 23, 17, 17, 16, 8], [15, 2, 25, 19, 26, 26, 24, 22, 18, 20, 17, 23, 20, 21, 15, 15, 4, 19, 12, 21], [14, 10, 17, 9, 16, 15, 19, 13, 18, 19, 16, 18, 0, 9, 14, 18, 0, 5, 16, 0], [21, 19, 19, 24, 23, 22, 19, 17, 19, 14, 16, 16, 16, 17, 9, 8, 10, 9, 16, 8], [19, 22, 22, 25, 24, 24, 23, 21, 22, 22, 18, 16, 17, 13, 0, 0, 15, 5, 12, 8], [21, 21, 23, 17, 18, 20, 9, 9, 15, 20, 19, 17, 0, 14, 0, 9, 2, 8, 4, 3], [11, 20, 20, 21, 14, 17, 20, 20, 18, 14, 8, 0, 4, 9, 3, 16, 8, 15, 11, 7], [15, 20, 12, 8, 11, 14, 14, 15, 18, 15, 18, 8, 16, 5, 15, 8, 2, 8, 12, 7], [10, 17, 20, 21, 22, 15, 21, 18, 23, 21, 7, 18, 18, 16, 16, 18, 20, 11, 12, 0], [7, 12, 10, 16, 16, 10, 0, 13, 16, 1, 11, 4, 8, 9, 14, 0, 12, 3, 8, 7], [14, 13, 5, 7, 15, 15, 7, 2, 0, 16, 13, 18, 0, 9, 0, 7, 10, 11, 11, 4], [12, 11, 2, 12, 8, 9, 13, 15, 12, 15, 12, 17, 17, 4, 8, 6, 13, 13, 5, 2], [5, 14, 15, 17, 17, 13, 16, 14, 9, 0, 3, 12, 0, 4, 15, 7, 4, 3, 13, 13], [19, 19, 16, 11, 13, 16, 18, 7, 11, 15, 14, 13, 10, 8, 15, 2, 13, 9, 13, 0], [18, 18, 10, 18, 19, 19, 10, 16, 11, 17, 22, 12, 13, 11, 8, 1, 1, 14, 15, 7], [13, 17, 19, 6, 15, 17, 9, 14, 9, 5, 12, 9, 8, 5, 11, 12, 8, 1, 5, 5], [16, 7, 18, 17, 18, 12, 10, 2, 0, 17, 0, 14, 7, 11, 3, 11, 14, 6, 8, 12], [14, 0, 7, 11, 0, 1, 8, 1, 11, 9, 17, 3, 6, 0, 8, 1, 2, 8, 6, 9], [5, 14, 15, 16, 10, 13, 15, 16, 16, 15, 15, 15, 10, 6, 12, 7, 2, 7, 4, 15], [2, 14, 14, 13, 16, 15, 15, 10, 14, 6, 7, 11, 2, 15, 9, 10, 7, 8, 6, 10], [17, 7, 16, 14, 21, 18, 4, 15, 9, 8, 5, 12, 16, 17, 11, 13, 12, 11, 14, 10], [19, 16, 21, 14, 11, 15, 16, 15, 17, 10, 0, 12, 8, 12, 10, 2, 4, 12, 5, 5], [20, 17, 19, 16, 14, 19, 18, 15, 15, 0, 7, 13, 12, 1, 0, 8, 5, 8, 12, 13], [17, 11, 5, 11, 5, 13, 10, 14, 5, 13, 12, 13, 9, 17, 0, 6, 6, 13, 10, 2], [17, 16, 16, 14, 9, 8, 12, 8, 9, 16, 1, 10, 6, 14, 12, 12, 16, 15, 7, 4], [21, 16, 14, 15, 6, 4, 9, 12, 7, 11, 16, 8, 5, 4, 17, 9, 4, 13, 15, 6], [6, 8, 8, 0, 7, 15, 0, 3, 4, 8, 11, 0, 13, 12, 16, 10, 12, 12, 4, 8], [8, 9, 1, 10, 12, 10, 3, 0, 7, 5, 16, 16, 13, 9, 5, 7, 9, 8, 12, 6], [11, 6, 0, 15, 10, 13, 19, 15, 16, 7, 12, 6, 9, 9, 8, 18, 12, 11, 10, 14], [10, 14, 14, 19, 8, 6, 7, 8, 16, 6, 5, 7, 8, 6, 5, 9, 8, 6, 15, 8], [18, 9, 2, 4, 15, 8, 12, 6, 5, 7, 6, 17, 0, 9, 5, 7, 7, 7, 11, 6], [9, 4, 10, 7, 14, 13, 8, 6, 8, 15, 5, 9, 1, 9, 7, 16, 11, 9, 14, 0], [9, 8, 17, 12, 3, 3, 0, 10, 9, 7, 8, 9, 0, 8, 11, 0, 11, 4, 11, 6], [18, 10, 13, 7, 6, 8, 15, 15, 12, 16, 4, 7, 3, 13, 12, 6, 2, 0, 13, 8], [80, 87, 79, 80, 76, 66, 71, 80, 73, 70, 73, 73, 73, 73, 72, 71, 69, 65, 65, 67], [71, 84, 90, 90, 88, 92, 93, 93, 93, 92, 90, 89, 85, 80, 68, 54, 56, 67, 66, 59], [70, 59, 77, 81, 83, 83, 81, 82, 83, 82, 79, 77, 71, 62, 63, 65, 57, 66, 49, 52], [74, 80, 80, 80, 79, 77, 79, 80, 80, 77, 78, 78, 77, 74, 71, 71, 65, 60, 60, 59], [67, 68, 70, 68, 74, 78, 78, 78, 77, 76, 75, 75, 74, 73, 68, 68, 68, 62, 56, 42], [68, 71, 72, 73, 75, 75, 73, 75, 74, 73, 71, 67, 60, 52, 57, 48, 58, 57, 51, 47], [60, 52, 67, 63, 55, 58, 61, 61, 58, 56, 58, 60, 62, 60, 54, 53, 57, 50, 44, 42], [55, 53, 58, 60, 60, 60, 58, 57, 57, 57, 54, 54, 51, 50, 46, 26, 32, 31, 30, 16], [53, 56, 63, 65, 65, 63, 62, 61, 61, 60, 59, 57, 48, 53, 55, 45, 49, 32, 34, 30], [50, 52, 55, 57, 52, 51, 50, 51, 43, 38, 41, 40, 23, 35, 34, 41, 33, 32, 22, 19], [54, 59, 61, 60, 59, 60, 60, 60, 59, 58, 55, 45, 53, 55, 41, 49, 45, 38, 28, 24], [48, 52, 51, 51, 51, 51, 48, 49, 46, 46, 37, 25, 46, 50, 42, 41, 36, 29, 18, 16], [45, 51, 51, 49, 49, 34, 48, 33, 43, 46, 46, 46, 42, 36, 41, 20, 34, 24, 22, 12], [30, 27, 36, 39, 47, 49, 48, 50, 48, 42, 33, 27, 38, 41, 31, 37, 31, 26, 16, 13], [42, 39, 37, 35, 37, 45, 44, 45, 47, 46, 44, 36, 42, 35, 36, 25, 26, 20, 23, 17], [26, 31, 34, 32, 32, 31, 28, 27, 31, 30, 31, 32, 30, 26, 21, 17, 3, 1, 14, 10], [31, 36, 34, 30, 25, 29, 27, 21, 19, 24, 30, 31, 31, 21, 21, 18, 0, 11, 15, 11], [27, 40, 40, 38, 37, 38, 36, 35, 32, 33, 33, 32, 16, 26, 14, 19, 13, 16, 7, 5], [30, 33, 31, 30, 28, 28, 31, 29, 25, 22, 31, 32, 31, 24, 24, 17, 14, 13, 8, 6], [27, 26, 17, 25, 30, 30, 30, 28, 28, 30, 27, 23, 9, 22, 19, 5, 6, 6, 9, 10], [21, 25, 29, 30, 27, 24, 25, 19, 26, 29, 33, 32, 23, 21, 17, 7, 13, 11, 11, 14], [28, 19, 18, 13, 21, 29, 27, 24, 22, 27, 26, 25, 24, 9, 18, 8, 10, 13, 2, 0], [27, 26, 30, 30, 32, 32, 31, 31, 31, 29, 26, 19, 13, 18, 11, 10, 9, 0, 13, 1], [23, 5, 19, 27, 23, 22, 25, 22, 11, 17, 4, 17, 17, 13, 6, 0, 16, 9, 12, 12], [25, 10, 14, 18, 27, 20, 27, 23, 21, 19, 15, 12, 20, 11, 13, 13, 8, 14, 0, 9], [24, 24, 22, 21, 22, 24, 23, 23, 17, 16, 12, 17, 16, 10, 16, 13, 6, 0, 3, 0], [23, 27, 31, 18, 25, 16, 22, 9, 16, 17, 18, 9, 14, 8, 11, 14, 10, 0, 7, 14], [25, 24, 20, 17, 22, 19, 20, 19, 6, 1, 18, 10, 15, 12, 11, 12, 8, 11, 4, 12], [21, 19, 5, 16, 17, 19, 20, 19, 20, 15, 8, 18, 16, 16, 12, 10, 18, 15, 10, 8], [13, 13, 20, 22, 13, 16, 13, 16, 13, 18, 15, 17, 15, 9, 1, 11, 12, 10, 2, 10], [20, 25, 27, 24, 24, 24, 23, 23, 18, 19, 12, 14, 13, 15, 17, 16, 4, 12, 8, 12], [14, 8, 14, 6, 10, 10, 9, 17, 7, 8, 6, 0, 11, 16, 14, 3, 5, 13, 7, 11], [17, 10, 5, 12, 10, 11, 13, 13, 3, 6, 13, 14, 8, 4, 8, 15, 11, 0, 15, 10], [14, 9, 5, 7, 19, 24, 7, 9, 8, 5, 5, 13, 0, 12, 16, 13, 14, 4, 14, 8], [18, 25, 21, 15, 15, 18, 13, 16, 6, 17, 8, 13, 11, 5, 13, 10, 10, 3, 13, 19], [12, 0, 16, 18, 18, 19, 13, 8, 13, 17, 10, 5, 12, 6, 9, 2, 5, 9, 10, 7], [0, 15, 22, 19, 4, 19, 13, 12, 14, 10, 4, 17, 11, 15, 4, 7, 12, 9, 14, 9], [15, 11, 0, 17, 23, 10, 16, 7, 12, 12, 12, 15, 12, 5, 8, 18, 13, 10, 9, 7], [5, 9, 6, 1, 23, 6, 17, 20, 1, 14, 16, 11, 0, 12, 13, 7, 5, 5, 9, 18], [13, 15, 7, 11, 0, 16, 10, 11, 7, 15, 5, 12, 13, 8, 0, 10, 13, 0, 8, 8], [86, 96, 89, 93, 86, 80, 86, 82, 80, 78, 80, 81, 83, 82, 81, 81, 78, 75, 73, 75], [77, 93, 99, 99, 97, 101, 102, 101, 102, 101, 100, 99, 94, 89, 76, 69, 61, 75, 72, 70], [80, 67, 85, 90, 93, 93, 91, 91, 92, 89, 87, 84, 76, 64, 74, 72, 68, 73, 53, 55], [85, 89, 89, 91, 91, 90, 91, 92, 91, 89, 88, 87, 84, 82, 78, 80, 73, 71, 68, 66], [77, 81, 83, 80, 87, 90, 90, 90, 90, 88, 87, 84, 82, 81, 74, 76, 77, 69, 65, 53], [79, 83, 84, 84, 85, 86, 84, 84, 82, 81, 77, 72, 58, 62, 69, 61, 64, 62, 54, 50], [74, 64, 78, 73, 73, 72, 69, 74, 70, 63, 70, 72, 69, 65, 58, 63, 63, 50, 44, 43], [71, 64, 78, 78, 74, 76, 73, 72, 72, 70, 69, 66, 56, 55, 50, 51, 36, 40, 37, 28], [70, 75, 81, 84, 84, 81, 79, 77, 75, 69, 62, 59, 65, 70, 69, 49, 60, 42, 42, 39], [67, 71, 74, 75, 74, 72, 72, 72, 66, 70, 65, 58, 43, 51, 58, 55, 53, 47, 39, 33], [74, 79, 81, 79, 79, 79, 79, 79, 77, 74, 71, 66, 69, 70, 63, 58, 57, 50, 44, 28], [68, 70, 67, 68, 69, 68, 65, 66, 68, 67, 64, 58, 61, 63, 53, 55, 47, 39, 32, 19], [65, 73, 74, 72, 76, 70, 73, 61, 66, 70, 66, 61, 58, 59, 59, 49, 52, 45, 34, 26], [66, 70, 65, 67, 70, 70, 70, 72, 70, 67, 65, 55, 61, 63, 39, 57, 51, 45, 34, 22], [71, 68, 67, 67, 66, 74, 73, 73, 75, 74, 64, 59, 66, 56, 66, 47, 43, 36, 26, 21], [56, 62, 65, 66, 65, 64, 63, 62, 58, 55, 57, 58, 57, 55, 52, 44, 24, 20, 0, 4], [56, 63, 64, 57, 61, 59, 58, 56, 54, 52, 50, 55, 55, 34, 47, 37, 33, 28, 19, 3], [55, 61, 60, 61, 62, 61, 60, 59, 56, 47, 53, 53, 43, 48, 43, 32, 31, 24, 14, 15], [54, 57, 56, 59, 60, 58, 53, 52, 54, 51, 50, 51, 52, 41, 43, 31, 31, 22, 10, 7], [52, 58, 57, 56, 61, 62, 62, 62, 62, 60, 54, 55, 56, 49, 47, 36, 30, 27, 15, 13], [54, 56, 56, 55, 56, 54, 52, 47, 40, 48, 53, 53, 39, 44, 34, 26, 16, 9, 4, 7], [58, 57, 56, 58, 60, 58, 60, 59, 57, 54, 51, 56, 50, 46, 47, 38, 33, 25, 13, 9], [59, 62, 63, 62, 61, 62, 61, 59, 56, 50, 44, 46, 47, 43, 36, 16, 20, 18, 4, 8], [50, 47, 50, 50, 44, 44, 42, 35, 26, 28, 26, 28, 29, 24, 19, 12, 10, 13, 15, 10], [50, 46, 51, 55, 55, 53, 51, 53, 49, 47, 37, 40, 43, 40, 28, 26, 1, 9, 12, 1], [53, 53, 49, 51, 44, 46, 41, 39, 39, 28, 35, 35, 30, 29, 22, 10, 6, 11, 7, 9], [52, 48, 62, 59, 57, 58, 51, 54, 50, 46, 41, 44, 45, 32, 32, 15, 5, 11, 0, 12], [50, 49, 48, 52, 47, 47, 47, 46, 43, 42, 33, 38, 22, 11, 24, 7, 11, 9, 9, 4], [47, 42, 42, 43, 43, 40, 45, 47, 49, 50, 42, 32, 37, 33, 3, 13, 15, 6, 9, 13], [27, 40, 36, 31, 34, 38, 24, 32, 19, 19, 27, 19, 15, 14, 17, 6, 9, 10, 5, 6], [49, 52, 50, 49, 48, 47, 46, 41, 40, 36, 36, 28, 30, 30, 26, 14, 15, 8, 10, 9], [30, 40, 39, 34, 22, 23, 19, 26, 22, 25, 13, 20, 21, 15, 0, 5, 14, 13, 16, 0], [14, 33, 31, 30, 20, 24, 29, 33, 31, 27, 24, 12, 12, 0, 0, 10, 12, 13, 12, 16], [23, 41, 38, 30, 31, 31, 27, 29, 23, 16, 27, 21, 18, 18, 5, 16, 12, 13, 6, 9], [27, 41, 35, 37, 37, 37, 38, 39, 39, 35, 25, 29, 21, 15, 8, 15, 4, 14, 6, 4], [24, 42, 37, 35, 31, 30, 25, 27, 30, 30, 31, 26, 19, 4, 9, 14, 0, 17, 9, 12], [33, 43, 45, 41, 35, 31, 28, 26, 17, 7, 15, 8, 17, 12, 12, 4, 10, 7, 12, 9], [30, 39, 28, 30, 34, 30, 31, 29, 26, 31, 22, 14, 2, 2, 18, 4, 11, 12, 9, 12], [35, 38, 39, 39, 40, 32, 35, 38, 23, 27, 28, 26, 21, 17, 13, 13, 12, 13, 7, 7], [35, 28, 18, 31, 31, 31, 26, 20, 18, 9, 14, 3, 5, 12, 1, 8, 13, 9, 0, 0], [77, 82, 86, 87, 86, 86, 86, 87, 86, 85, 82, 80, 76, 73, 66, 59, 46, 52, 56, 52], [52, 57, 51, 62, 64, 65, 68, 68, 69, 69, 68, 66, 64, 65, 67, 66, 58, 56, 53, 36], [49, 37, 39, 42, 48, 51, 54, 54, 53, 52, 50, 48, 42, 40, 36, 37, 31, 32, 38, 34], [46, 49, 50, 53, 55, 55, 55, 55, 55, 54, 53, 50, 45, 46, 47, 40, 24, 40, 38, 27], [42, 47, 49, 50, 50, 51, 51, 50, 50, 48, 46, 44, 42, 42, 39, 39, 32, 31, 28, 25], [16, 21, 25, 29, 18, 28, 28, 25, 26, 29, 33, 31, 16, 27, 22, 18, 27, 20, 21, 13], [5, 24, 21, 27, 26, 22, 26, 29, 28, 29, 27, 27, 26, 22, 17, 16, 14, 8, 14, 10], [14, 21, 18, 17, 17, 8, 10, 19, 13, 7, 17, 17, 20, 16, 12, 8, 15, 12, 12, 18], [20, 23, 27, 28, 24, 26, 22, 20, 13, 21, 20, 21, 20, 17, 8, 16, 10, 13, 8, 12], [20, 18, 26, 23, 16, 23, 12, 10, 8, 5, 14, 13, 14, 10, 13, 15, 17, 14, 15, 18], [20, 22, 27, 12, 21, 12, 16, 21, 15, 14, 17, 12, 17, 15, 6, 17, 16, 14, 3, 5], [19, 22, 20, 22, 19, 23, 19, 22, 11, 22, 9, 23, 13, 14, 6, 14, 17, 18, 7, 17], [25, 14, 25, 24, 15, 22, 11, 22, 17, 9, 17, 14, 13, 10, 12, 14, 10, 14, 0, 4], [12, 7, 19, 22, 16, 8, 10, 0, 19, 6, 13, 5, 15, 17, 10, 13, 12, 7, 9, 6], [11, 10, 13, 24, 13, 20, 12, 12, 12, 5, 9, 10, 12, 12, 18, 17, 11, 8, 14, 11], [11, 14, 10, 18, 11, 13, 4, 3, 6, 14, 16, 14, 15, 11, 12, 12, 8, 0, 0, 12], [6, 15, 9, 13, 0, 12, 9, 2, 5, 12, 10, 5, 0, 11, 1, 16, 9, 18, 13, 7], [6, 16, 8, 17, 13, 14, 4, 4, 11, 11, 0, 9, 18, 6, 0, 6, 9, 18, 16, 10], [17, 9, 15, 21, 10, 10, 5, 14, 8, 11, 14, 8, 0, 9, 1, 6, 10, 6, 12, 2], [16, 19, 16, 10, 15, 14, 20, 8, 12, 9, 15, 15, 11, 17, 7, 16, 8, 5, 13, 15], [19, 1, 11, 6, 0, 16, 9, 14, 15, 14, 16, 14, 3, 13, 11, 11, 3, 10, 10, 1], [8, 12, 9, 14, 0, 14, 8, 9, 0, 11, 7, 14, 14, 2, 4, 6, 7, 11, 5, 12], [15, 13, 4, 16, 4, 0, 14, 6, 15, 3, 5, 11, 11, 16, 11, 14, 6, 11, 10, 14], [15, 5, 10, 14, 10, 19, 7, 17, 9, 12, 11, 7, 14, 18, 5, 15, 13, 16, 11, 4], [19, 11, 13, 13, 0, 8, 14, 0, 15, 12, 12, 0, 15, 14, 13, 16, 0, 13, 9, 14], [13, 9, 17, 15, 11, 14, 11, 10, 13, 14, 14, 10, 13, 8, 8, 10, 0, 9, 0, 16], [12, 7, 16, 19, 11, 0, 9, 13, 10, 8, 7, 10, 13, 1, 12, 9, 11, 1, 12, 8], [8, 6, 0, 22, 13, 8, 16, 6, 0, 12, 12, 11, 9, 0, 10, 13, 17, 11, 10, 15], [3, 17, 21, 12, 19, 20, 19, 16, 15, 8, 8, 10, 7, 0, 10, 8, 16, 10, 4, 11], [1, 16, 15, 13, 15, 16, 13, 17, 13, 7, 14, 3, 5, 16, 16, 15, 17, 5, 0, 9], [15, 17, 20, 20, 18, 13, 11, 10, 6, 8, 14, 11, 10, 8, 12, 10, 3, 13, 3, 11], [16, 7, 12, 20, 14, 17, 11, 16, 12, 7, 14, 9, 4, 8, 4, 11, 13, 11, 3, 13], [7, 5, 17, 9, 9, 16, 16, 1, 10, 0, 9, 17, 9, 7, 10, 9, 8, 18, 8, 8], [19, 9, 5, 15, 10, 17, 2, 5, 5, 8, 11, 14, 14, 11, 8, 0, 10, 17, 10, 18], [14, 10, 0, 12, 14, 13, 18, 9, 5, 6, 6, 20, 10, 7, 11, 4, 5, 18, 0, 9], [5, 18, 4, 16, 15, 11, 10, 11, 5, 7, 12, 6, 8, 13, 14, 6, 6, 4, 9, 4], [7, 15, 0, 0, 15, 15, 12, 9, 16, 11, 17, 13, 5, 10, 15, 9, 18, 9, 11, 14], [14, 11, 16, 6, 2, 2, 12, 5, 7, 13, 9, 0, 8, 7, 8, 8, 15, 6, 5, 18], [13, 15, 0, 11, 9, 3, 6, 9, 9, 12, 4, 13, 0, 5, 6, 15, 12, 11, 5, 15], [15, 9, 17, 14, 17, 1, 2, 7, 6, 0, 4, 12, 17, 15, 5, 5, 15, 10, 5, 5], [86, 91, 96, 99, 97, 97, 97, 97, 97, 96, 93, 91, 88, 84, 77, 69, 62, 58, 64, 62], [70, 72, 74, 80, 85, 85, 89, 89, 89, 89, 88, 86, 81, 77, 75, 75, 73, 73, 65, 56], [71, 66, 64, 67, 70, 75, 77, 78, 76, 76, 74, 72, 68, 66, 63, 58, 58, 45, 50, 43], [69, 70, 72, 76, 78, 78, 77, 77, 77, 76, 74, 72, 68, 68, 68, 62, 51, 57, 59, 47], [72, 77, 79, 80, 81, 82, 81, 81, 80, 79, 78, 76, 71, 63, 51, 52, 58, 52, 49, 44], [57, 59, 61, 66, 63, 66, 67, 67, 67, 67, 65, 63, 58, 51, 46, 41, 46, 48, 36, 30], [51, 62, 62, 62, 65, 66, 66, 67, 67, 67, 66, 65, 60, 52, 51, 44, 51, 35, 38, 31], [46, 47, 50, 45, 47, 47, 50, 50, 50, 49, 50, 49, 45, 40, 37, 33, 27, 26, 17, 17], [45, 53, 51, 50, 50, 48, 47, 45, 39, 45, 40, 40, 38, 25, 39, 32, 25, 17, 11, 8], [28, 38, 38, 36, 35, 36, 35, 29, 25, 25, 33, 32, 27, 20, 23, 22, 11, 9, 9, 17], [40, 38, 40, 44, 41, 41, 39, 37, 36, 35, 38, 43, 42, 34, 17, 29, 21, 23, 13, 11], [23, 32, 37, 41, 41, 42, 40, 40, 38, 32, 32, 37, 31, 32, 20, 25, 21, 23, 13, 21], [33, 29, 23, 32, 32, 37, 36, 35, 32, 29, 22, 21, 25, 26, 17, 23, 6, 12, 15, 9], [35, 38, 35, 16, 32, 27, 34, 28, 32, 25, 24, 20, 21, 18, 13, 18, 11, 13, 13, 11], [24, 31, 33, 34, 33, 33, 34, 33, 33, 29, 18, 16, 24, 8, 13, 9, 8, 3, 9, 3], [17, 16, 21, 16, 19, 22, 21, 22, 21, 20, 20, 18, 17, 8, 14, 11, 2, 13, 16, 8], [17, 1, 17, 15, 20, 17, 16, 19, 14, 16, 12, 15, 11, 0, 13, 4, 8, 9, 7, 11], [18, 20, 26, 24, 23, 22, 26, 23, 19, 20, 15, 16, 4, 17, 15, 14, 17, 13, 7, 3], [20, 14, 9, 15, 11, 15, 20, 19, 26, 23, 16, 10, 17, 11, 2, 17, 14, 5, 10, 14], [21, 24, 27, 27, 23, 27, 26, 27, 25, 22, 16, 21, 23, 10, 19, 10, 14, 11, 12, 16], [4, 19, 15, 0, 18, 17, 19, 8, 18, 14, 22, 8, 16, 14, 3, 16, 13, 12, 16, 12], [26, 27, 27, 26, 27, 23, 24, 19, 16, 11, 13, 18, 14, 11, 5, 8, 8, 15, 12, 7], [23, 18, 25, 22, 14, 22, 16, 15, 2, 4, 13, 0, 15, 13, 9, 9, 9, 2, 6, 13], [16, 12, 21, 12, 14, 14, 18, 6, 8, 13, 9, 4, 8, 16, 7, 4, 6, 15, 10, 2], [20, 0, 19, 14, 8, 9, 7, 4, 15, 10, 14, 14, 1, 8, 14, 11, 4, 2, 15, 11], [24, 25, 18, 4, 16, 15, 16, 8, 12, 4, 10, 12, 15, 0, 12, 3, 13, 14, 16, 4], [15, 16, 11, 8, 14, 18, 6, 11, 5, 5, 8, 12, 15, 1, 11, 0, 9, 7, 1, 14], [19, 3, 24, 18, 16, 19, 12, 12, 9, 17, 9, 15, 14, 14, 14, 11, 14, 15, 10, 19], [19, 10, 5, 20, 4, 4, 15, 12, 15, 13, 10, 12, 11, 15, 12, 14, 12, 8, 14, 10], [9, 8, 5, 8, 7, 4, 17, 19, 7, 17, 10, 13, 7, 12, 17, 1, 10, 16, 12, 9], [8, 14, 11, 9, 4, 11, 12, 15, 10, 20, 16, 11, 10, 13, 15, 13, 12, 14, 11, 12], [15, 13, 0, 2, 13, 10, 6, 18, 16, 3, 15, 0, 6, 10, 5, 14, 9, 12, 12, 9], [7, 6, 10, 6, 16, 7, 12, 9, 10, 16, 4, 11, 13, 6, 12, 16, 16, 7, 17, 1], [13, 5, 13, 1, 13, 13, 8, 12, 12, 14, 8, 0, 15, 5, 0, 2, 14, 11, 7, 5], [15, 6, 0, 10, 15, 18, 8, 14, 16, 14, 13, 8, 19, 1, 13, 18, 5, 0, 10, 11], [16, 15, 15, 4, 6, 14, 7, 9, 0, 9, 17, 10, 14, 16, 6, 15, 5, 18, 0, 9], [11, 14, 11, 3, 13, 15, 15, 0, 14, 0, 15, 12, 8, 12, 7, 5, 8, 17, 13, 11], [12, 16, 8, 16, 10, 8, 14, 18, 6, 11, 10, 7, 7, 11, 14, 13, 10, 22, 18, 15], [15, 14, 1, 8, 9, 8, 14, 11, 9, 12, 1, 19, 13, 9, 0, 15, 14, 18, 16, 8], [8, 13, 15, 11, 14, 12, 4, 4, 16, 10, 14, 11, 11, 16, 9, 19, 0, 11, 18, 12], [98, 105, 110, 112, 111, 111, 111, 111, 110, 109, 106, 105, 102, 98, 90, 81, 77, 73, 72, 72], [87, 85, 90, 94, 101, 103, 105, 106, 105, 104, 103, 101, 97, 92, 88, 88, 87, 87, 77, 71], [88, 82, 81, 85, 84, 90, 91, 91, 91, 89, 87, 85, 81, 78, 74, 63, 71, 62, 60, 57], [87, 87, 88, 93, 95, 95, 95, 95, 95, 93, 91, 88, 85, 83, 83, 79, 74, 63, 77, 64], [90, 95, 97, 99, 99, 100, 100, 99, 99, 97, 95, 93, 87, 80, 75, 76, 76, 66, 67, 60], [78, 79, 82, 86, 83, 87, 87, 83, 82, 81, 79, 76, 70, 60, 62, 63, 48, 63, 50, 39], [76, 85, 85, 83, 86, 85, 86, 87, 89, 88, 86, 84, 77, 76, 77, 63, 70, 60, 56, 48], [73, 78, 81, 77, 71, 75, 79, 76, 78, 78, 79, 77, 73, 67, 63, 61, 58, 46, 43, 38], [77, 86, 85, 82, 84, 83, 80, 67, 77, 77, 75, 78, 69, 73, 64, 68, 52, 51, 32, 14], [76, 68, 71, 70, 71, 76, 74, 75, 73, 75, 75, 74, 61, 54, 62, 52, 51, 46, 40, 28], [74, 74, 67, 74, 70, 70, 66, 61, 62, 66, 70, 72, 71, 62, 47, 56, 55, 46, 39, 32], [61, 62, 70, 75, 77, 76, 75, 74, 69, 63, 61, 64, 58, 56, 56, 51, 34, 42, 32, 20], [72, 70, 69, 69, 63, 73, 74, 75, 73, 71, 62, 48, 62, 59, 57, 56, 48, 44, 33, 25], [66, 75, 75, 68, 70, 70, 69, 72, 69, 68, 65, 63, 58, 57, 38, 51, 40, 31, 12, 16], [70, 74, 74, 75, 75, 76, 76, 76, 75, 75, 60, 62, 65, 59, 53, 51, 36, 36, 24, 15], [70, 71, 68, 66, 68, 68, 68, 64, 53, 55, 63, 65, 58, 52, 36, 38, 32, 26, 12, 6], [63, 58, 61, 59, 62, 63, 63, 61, 59, 52, 51, 57, 44, 45, 29, 36, 25, 11, 5, 19], [61, 67, 65, 66, 66, 66, 64, 62, 59, 55, 55, 53, 49, 47, 49, 36, 25, 27, 7, 12], [57, 60, 61, 62, 65, 65, 65, 65, 64, 61, 51, 50, 44, 35, 39, 39, 21, 13, 9, 5], [65, 66, 64, 63, 63, 64, 61, 60, 58, 58, 54, 50, 47, 47, 33, 36, 16, 12, 13, 14], [63, 66, 66, 67, 67, 66, 64, 62, 59, 59, 55, 40, 42, 29, 36, 34, 6, 15, 8, 20], [61, 56, 47, 45, 50, 51, 31, 46, 41, 37, 34, 39, 30, 28, 24, 21, 20, 6, 9, 15], [64, 62, 59, 57, 60, 55, 53, 57, 56, 51, 56, 49, 47, 41, 27, 28, 9, 11, 4, 10], [59, 58, 60, 59, 58, 57, 56, 53, 46, 37, 43, 30, 38, 34, 23, 14, 18, 12, 11, 12], [54, 52, 46, 46, 44, 47, 41, 43, 43, 20, 21, 32, 30, 15, 11, 12, 9, 14, 6, 19], [56, 54, 53, 58, 64, 56, 55, 57, 52, 50, 48, 46, 40, 38, 24, 22, 4, 5, 14, 12], [44, 54, 47, 49, 44, 34, 43, 45, 42, 30, 40, 38, 33, 25, 20, 15, 5, 3, 9, 5], [50, 52, 51, 47, 51, 47, 44, 40, 48, 42, 40, 30, 29, 24, 8, 16, 15, 13, 19, 8], [40, 35, 40, 40, 27, 29, 24, 29, 24, 18, 18, 23, 3, 13, 12, 15, 20, 16, 11, 15], [44, 44, 44, 46, 47, 48, 50, 49, 44, 38, 18, 32, 27, 11, 14, 12, 16, 3, 15, 1], [42, 41, 46, 44, 45, 45, 44, 44, 41, 37, 34, 26, 20, 14, 5, 10, 0, 13, 7, 7], [18, 43, 35, 26, 32, 33, 29, 21, 27, 28, 20, 15, 8, 13, 13, 18, 1, 11, 6, 8], [30, 25, 37, 31, 16, 27, 31, 27, 15, 14, 22, 10, 9, 9, 4, 0, 18, 14, 10, 12], [26, 35, 36, 15, 17, 24, 27, 25, 25, 18, 22, 18, 12, 18, 10, 10, 0, 10, 9, 0], [30, 39, 36, 38, 36, 34, 31, 30, 31, 25, 27, 24, 8, 12, 8, 17, 10, 10, 19, 18], [23, 28, 20, 29, 21, 25, 21, 26, 16, 17, 22, 10, 15, 10, 9, 18, 4, 13, 11, 10], [21, 28, 25, 24, 18, 24, 20, 23, 17, 17, 7, 19, 0, 2, 13, 5, 16, 6, 11, 18], [21, 28, 26, 27, 34, 33, 31, 27, 19, 10, 15, 15, 11, 16, 17, 12, 16, 14, 17, 14], [30, 35, 35, 32, 20, 21, 21, 16, 0, 23, 16, 14, 11, 0, 15, 11, 13, 9, 12, 7], [32, 29, 25, 28, 27, 26, 24, 9, 0, 14, 10, 14, 6, 8, 10, 12, 10, 10, 13, 16], [82, 78, 79, 83, 84, 83, 77, 82, 79, 80, 75, 74, 71, 67, 62, 47, 56, 54, 45, 51], [62, 72, 69, 69, 50, 44, 60, 58, 58, 54, 56, 58, 60, 61, 60, 58, 57, 54, 45, 47], [59, 63, 64, 65, 67, 67, 65, 65, 65, 63, 62, 60, 57, 55, 50, 49, 42, 43, 40, 45], [54, 56, 57, 57, 55, 54, 55, 54, 53, 51, 45, 42, 42, 38, 37, 37, 38, 36, 35, 27], [20, 33, 25, 22, 33, 34, 33, 30, 14, 26, 26, 26, 16, 26, 25, 21, 27, 29, 22, 15], [31, 34, 38, 35, 37, 35, 31, 34, 27, 26, 25, 22, 25, 29, 28, 26, 22, 5, 14, 13], [26, 20, 13, 12, 11, 15, 2, 7, 18, 16, 13, 21, 15, 13, 16, 8, 13, 3, 10, 21], [18, 14, 22, 12, 11, 8, 6, 16, 16, 14, 7, 14, 9, 15, 15, 15, 15, 9, 7, 17], [19, 19, 26, 18, 21, 19, 16, 19, 11, 10, 22, 1, 11, 19, 7, 16, 13, 16, 15, 20], [9, 20, 17, 23, 17, 19, 12, 17, 8, 19, 13, 4, 0, 16, 16, 8, 7, 12, 7, 17], [10, 22, 20, 10, 16, 15, 15, 14, 17, 7, 16, 7, 0, 14, 13, 12, 14, 10, 12, 13], [18, 21, 22, 16, 19, 16, 6, 20, 17, 21, 16, 11, 16, 12, 12, 12, 15, 8, 10, 7], [20, 20, 16, 22, 19, 14, 7, 7, 8, 15, 17, 14, 13, 13, 4, 15, 10, 0, 10, 11], [22, 22, 23, 13, 19, 19, 4, 15, 16, 1, 17, 7, 12, 14, 18, 6, 12, 14, 0, 10], [23, 22, 20, 22, 20, 23, 19, 22, 23, 18, 17, 15, 16, 6, 13, 3, 7, 15, 10, 9], [15, 10, 17, 15, 12, 16, 6, 15, 9, 10, 5, 15, 10, 11, 16, 11, 16, 16, 14, 3], [10, 23, 26, 17, 22, 20, 17, 12, 16, 18, 16, 12, 12, 8, 14, 13, 20, 16, 10, 20], [12, 21, 17, 16, 3, 1, 8, 17, 13, 7, 11, 4, 0, 10, 4, 8, 13, 4, 5, 14], [19, 16, 20, 18, 22, 18, 17, 19, 6, 9, 14, 8, 8, 11, 14, 2, 12, 15, 12, 2], [17, 23, 17, 18, 20, 19, 18, 4, 13, 10, 3, 17, 14, 6, 17, 11, 9, 12, 9, 13], [14, 11, 12, 15, 19, 13, 12, 9, 16, 10, 10, 14, 16, 12, 1, 13, 7, 13, 11, 9], [11, 14, 22, 15, 12, 4, 11, 15, 0, 14, 15, 10, 5, 11, 11, 14, 1, 15, 17, 13], [19, 9, 2, 16, 15, 1, 14, 11, 17, 6, 0, 21, 14, 2, 13, 14, 7, 15, 11, 11], [9, 14, 0, 8, 9, 9, 19, 10, 14, 14, 10, 7, 15, 9, 19, 17, 0, 12, 13, 13], [1, 13, 16, 21, 9, 9, 15, 17, 12, 8, 6, 16, 9, 3, 0, 8, 14, 18, 10, 20], [13, 19, 13, 7, 8, 22, 19, 13, 14, 15, 9, 12, 10, 14, 2, 18, 15, 4, 18, 6], [15, 16, 14, 9, 14, 7, 15, 14, 17, 8, 0, 10, 16, 13, 14, 6, 14, 2, 14, 7], [14, 16, 15, 0, 7, 0, 13, 8, 12, 16, 12, 19, 10, 10, 19, 18, 3, 14, 14, 11], [18, 16, 13, 15, 14, 11, 14, 13, 14, 14, 12, 1, 10, 15, 19, 13, 16, 6, 0, 6], [10, 11, 17, 21, 13, 17, 13, 16, 13, 14, 14, 8, 8, 2, 15, 18, 15, 14, 10, 3], [15, 11, 0, 14, 13, 8, 11, 16, 13, 9, 15, 10, 14, 0, 13, 13, 18, 11, 0, 7], [14, 13, 5, 20, 16, 13, 15, 17, 16, 4, 14, 18, 3, 3, 12, 12, 13, 8, 5, 15], [15, 9, 15, 13, 15, 9, 8, 6, 16, 11, 13, 10, 22, 9, 13, 11, 5, 16, 9, 20], [20, 2, 8, 16, 14, 8, 4, 13, 17, 3, 18, 16, 14, 4, 21, 10, 0, 9, 17, 13], [7, 11, 7, 16, 20, 11, 17, 5, 14, 15, 0, 15, 10, 8, 16, 14, 17, 10, 0, 10], [19, 8, 10, 16, 15, 9, 15, 14, 11, 17, 15, 13, 11, 7, 14, 11, 9, 6, 0, 15], [13, 3, 16, 15, 0, 12, 11, 12, 8, 6, 14, 9, 1, 0, 14, 18, 11, 9, 0, 11], [10, 14, 12, 7, 16, 0, 8, 20, 10, 13, 17, 12, 13, 5, 19, 17, 9, 13, 16, 17], [12, 15, 15, 12, 11, 10, 12, 13, 6, 10, 10, 16, 12, 21, 16, 17, 12, 16, 15, 7], [7, 17, 0, 6, 19, 6, 12, 12, 16, 12, 10, 14, 8, 8, 15, 14, 12, 11, 10, 15], [89, 86, 85, 91, 91, 91, 85, 89, 87, 88, 83, 82, 79, 75, 68, 61, 60, 60, 26, 55], [74, 83, 85, 82, 65, 67, 75, 75, 75, 74, 72, 69, 66, 67, 69, 67, 66, 65, 55, 57], [74, 81, 82, 83, 85, 85, 83, 83, 82, 81, 80, 79, 75, 72, 64, 67, 62, 49, 56, 54], [74, 78, 78, 79, 76, 76, 77, 77, 76, 75, 71, 68, 65, 62, 63, 62, 52, 40, 51, 46], [64, 68, 67, 70, 68, 69, 68, 67, 66, 65, 62, 59, 50, 47, 53, 51, 46, 40, 45, 32], [63, 64, 66, 65, 67, 67, 67, 67, 65, 64, 60, 56, 45, 34, 47, 46, 48, 41, 25, 23], [55, 51, 57, 60, 57, 59, 59, 59, 59, 57, 55, 52, 48, 48, 44, 46, 29, 39, 17, 23], [48, 56, 55, 52, 52, 50, 50, 51, 49, 46, 43, 39, 33, 36, 31, 17, 28, 21, 9, 17], [23, 41, 38, 37, 36, 35, 36, 37, 34, 34, 29, 27, 26, 25, 16, 17, 2, 8, 11, 17], [28, 32, 39, 38, 36, 37, 36, 33, 34, 29, 24, 14, 27, 27, 24, 0, 11, 14, 7, 14], [35, 38, 38, 33, 34, 35, 30, 27, 28, 26, 25, 26, 21, 18, 15, 20, 9, 8, 5, 14], [31, 33, 32, 31, 34, 33, 33, 33, 31, 30, 28, 26, 19, 12, 7, 15, 9, 13, 6, 9], [30, 30, 28, 26, 20, 8, 22, 20, 22, 18, 17, 18, 6, 10, 3, 15, 17, 15, 8, 11], [30, 29, 29, 30, 31, 30, 26, 19, 16, 15, 20, 19, 19, 17, 6, 6, 15, 16, 10, 0], [29, 28, 26, 25, 28, 28, 24, 23, 21, 16, 18, 10, 14, 17, 15, 13, 13, 7, 7, 6], [27, 25, 24, 22, 17, 11, 23, 15, 17, 14, 7, 14, 13, 18, 6, 11, 12, 14, 6, 13], [12, 15, 18, 12, 22, 13, 16, 15, 20, 17, 18, 8, 20, 5, 11, 15, 15, 0, 17, 5], [23, 24, 22, 26, 25, 22, 21, 23, 6, 18, 11, 14, 14, 15, 9, 10, 14, 12, 3, 3], [26, 27, 27, 27, 27, 22, 21, 20, 19, 20, 17, 17, 9, 7, 14, 19, 17, 11, 20, 1], [27, 30, 30, 29, 31, 24, 23, 18, 9, 20, 12, 14, 17, 13, 20, 19, 6, 9, 12, 12], [21, 18, 24, 17, 15, 21, 11, 12, 12, 15, 10, 10, 6, 14, 10, 10, 15, 6, 13, 13], [18, 22, 20, 17, 24, 19, 17, 13, 4, 18, 14, 17, 8, 15, 10, 11, 12, 2, 4, 4], [14, 0, 18, 14, 20, 5, 12, 0, 8, 9, 12, 10, 10, 9, 17, 19, 13, 1, 8, 19], [22, 20, 12, 13, 18, 11, 17, 15, 13, 12, 15, 18, 10, 0, 4, 16, 13, 9, 15, 12], [10, 15, 10, 10, 11, 3, 0, 12, 12, 4, 12, 8, 2, 6, 16, 7, 9, 13, 11, 11], [7, 13, 18, 7, 13, 20, 12, 9, 7, 12, 16, 8, 9, 11, 11, 6, 6, 5, 16, 10], [12, 17, 3, 12, 3, 8, 12, 10, 17, 18, 11, 6, 0, 13, 15, 15, 9, 3, 12, 11], [6, 8, 16, 11, 13, 10, 0, 10, 6, 15, 7, 12, 6, 1, 4, 16, 15, 17, 21, 6], [14, 15, 13, 13, 17, 15, 0, 12, 8, 15, 12, 0, 13, 16, 14, 12, 12, 16, 15, 12], [6, 4, 6, 10, 18, 11, 15, 10, 0, 3, 11, 4, 11, 12, 17, 18, 16, 15, 18, 16], [17, 8, 13, 10, 15, 13, 12, 9, 4, 18, 0, 9, 15, 9, 7, 10, 9, 7, 3, 0], [14, 9, 3, 19, 14, 0, 16, 3, 2, 4, 9, 13, 9, 6, 5, 21, 7, 21, 15, 17], [16, 14, 9, 13, 11, 13, 12, 15, 13, 10, 15, 0, 14, 17, 14, 6, 17, 6, 8, 19], [7, 10, 11, 9, 8, 11, 8, 20, 9, 11, 0, 16, 5, 0, 0, 8, 18, 19, 13, 15], [4, 11, 10, 11, 15, 7, 13, 9, 19, 9, 8, 11, 20, 12, 11, 17, 3, 6, 15, 0], [10, 8, 16, 12, 20, 15, 7, 17, 6, 4, 10, 17, 13, 6, 12, 11, 18, 1, 8, 9], [15, 17, 3, 10, 7, 6, 15, 5, 8, 18, 12, 4, 11, 13, 13, 20, 14, 11, 10, 5], [18, 15, 11, 5, 14, 8, 15, 7, 11, 15, 14, 18, 8, 16, 19, 13, 16, 9, 10, 13], [16, 5, 18, 5, 17, 14, 14, 11, 15, 4, 14, 16, 15, 3, 14, 12, 0, 15, 8, 15], [10, 15, 16, 8, 1, 8, 7, 0, 16, 6, 19, 16, 18, 2, 8, 13, 18, 13, 13, 13], [101, 97, 97, 103, 104, 103, 97, 102, 99, 101, 95, 95, 91, 88, 80, 68, 71, 70, 53, 66], [87, 96, 99, 95, 83, 82, 89, 91, 90, 90, 87, 85, 78, 71, 77, 77, 75, 76, 63, 66], [89, 96, 97, 98, 99, 100, 97, 97, 96, 95, 93, 91, 88, 83, 72, 78, 75, 59, 66, 65], [90, 94, 94, 95, 93, 93, 93, 94, 93, 91, 86, 83, 79, 70, 75, 75, 52, 67, 60, 57], [82, 86, 86, 88, 86, 87, 85, 85, 86, 85, 83, 81, 75, 67, 70, 70, 59, 53, 60, 46], [84, 86, 87, 87, 88, 88, 90, 88, 87, 85, 81, 77, 64, 55, 61, 64, 64, 62, 45, 37], [75, 78, 81, 82, 79, 81, 81, 80, 80, 78, 74, 68, 64, 68, 66, 64, 39, 55, 24, 39], [75, 87, 86, 83, 82, 81, 80, 81, 77, 77, 75, 74, 65, 61, 61, 45, 57, 48, 24, 33], [59, 79, 76, 75, 75, 73, 73, 70, 68, 63, 59, 57, 48, 56, 47, 53, 42, 33, 20, 22], [70, 79, 79, 79, 78, 78, 77, 76, 74, 72, 68, 63, 53, 60, 61, 40, 40, 35, 16, 13], [66, 72, 70, 65, 66, 64, 63, 63, 58, 58, 50, 38, 53, 52, 45, 38, 36, 30, 22, 0], [64, 68, 70, 70, 72, 72, 72, 71, 71, 68, 62, 61, 59, 52, 41, 40, 32, 11, 0, 5], [67, 72, 71, 73, 68, 65, 62, 59, 58, 58, 55, 40, 46, 40, 36, 33, 14, 8, 11, 5], [75, 76, 77, 76, 74, 74, 71, 66, 53, 59, 59, 47, 52, 55, 41, 46, 33, 27, 11, 7], [68, 65, 64, 66, 64, 64, 62, 60, 54, 48, 53, 51, 46, 39, 33, 27, 0, 22, 10, 12], [67, 65, 64, 63, 61, 59, 61, 61, 58, 58, 55, 47, 43, 39, 28, 26, 6, 8, 13, 12], [53, 56, 58, 59, 59, 51, 53, 50, 44, 47, 39, 42, 36, 31, 24, 25, 7, 15, 15, 9], [56, 57, 56, 53, 53, 54, 54, 53, 49, 48, 45, 39, 28, 27, 21, 15, 8, 13, 7, 12], [58, 59, 59, 59, 59, 58, 57, 54, 50, 46, 42, 29, 34, 28, 11, 17, 5, 5, 6, 4], [52, 53, 55, 53, 51, 47, 46, 40, 15, 27, 28, 29, 24, 21, 11, 15, 10, 12, 4, 5], [54, 57, 57, 51, 44, 40, 41, 41, 35, 33, 17, 27, 6, 21, 5, 7, 15, 13, 9, 12], [51, 47, 51, 45, 40, 32, 34, 30, 28, 20, 16, 17, 23, 20, 15, 16, 15, 18, 2, 18], [37, 39, 42, 36, 35, 19, 26, 22, 21, 19, 20, 18, 3, 17, 14, 13, 14, 11, 15, 14], [36, 42, 45, 45, 41, 40, 39, 35, 27, 22, 23, 27, 18, 18, 12, 12, 12, 16, 15, 19], [38, 33, 36, 28, 29, 28, 25, 25, 20, 16, 12, 15, 13, 2, 10, 14, 9, 12, 11, 7], [41, 44, 46, 37, 30, 33, 29, 22, 17, 19, 24, 14, 12, 2, 1, 12, 9, 14, 13, 0], [30, 34, 35, 32, 21, 21, 23, 19, 17, 15, 16, 15, 10, 13, 6, 13, 18, 12, 5, 1], [35, 27, 30, 26, 23, 23, 19, 22, 12, 19, 15, 4, 13, 14, 7, 17, 8, 13, 17, 16], [28, 29, 18, 20, 30, 22, 10, 14, 19, 16, 10, 17, 9, 11, 22, 17, 5, 4, 8, 11], [23, 26, 34, 19, 22, 19, 23, 22, 11, 7, 11, 13, 10, 6, 14, 13, 6, 19, 8, 12], [26, 18, 5, 24, 21, 22, 17, 15, 11, 16, 1, 11, 9, 11, 8, 13, 9, 17, 19, 11], [33, 34, 28, 30, 29, 18, 14, 17, 21, 18, 18, 2, 9, 10, 14, 17, 6, 16, 16, 20], [27, 29, 21, 27, 23, 24, 23, 20, 0, 1, 10, 12, 11, 15, 16, 5, 10, 17, 16, 20], [19, 23, 24, 14, 13, 20, 8, 18, 12, 15, 15, 9, 17, 16, 6, 15, 9, 12, 21, 20], [18, 21, 25, 27, 7, 22, 17, 9, 13, 19, 16, 13, 4, 1, 8, 0, 7, 10, 15, 13], [8, 18, 21, 19, 20, 13, 11, 13, 10, 15, 9, 17, 12, 14, 13, 6, 15, 15, 4, 11], [14, 24, 27, 23, 22, 13, 11, 14, 18, 1, 17, 15, 12, 11, 16, 14, 18, 10, 12, 1], [17, 25, 26, 18, 18, 12, 11, 10, 4, 10, 5, 14, 15, 15, 4, 15, 12, 15, 12, 17], [15, 17, 21, 10, 7, 9, 8, 16, 14, 13, 11, 11, 10, 15, 15, 6, 7, 11, 18, 14], [14, 27, 26, 17, 18, 1, 9, 1, 11, 10, 3, 10, 6, 9, 4, 8, 10, 12, 8, 14], [82, 86, 87, 89, 89, 91, 91, 91, 90, 89, 87, 85, 81, 77, 67, 43, 59, 55, 53, 56], [65, 69, 67, 67, 62, 62, 62, 61, 57, 55, 53, 55, 56, 55, 50, 51, 52, 45, 45, 41], [47, 51, 48, 52, 45, 50, 46, 47, 48, 47, 48, 46, 44, 41, 34, 31, 35, 33, 18, 27], [41, 49, 47, 48, 47, 47, 47, 47, 46, 46, 44, 39, 26, 18, 29, 22, 18, 23, 19, 16], [36, 37, 25, 34, 33, 32, 36, 38, 35, 30, 22, 29, 23, 13, 12, 18, 23, 10, 6, 12], [42, 44, 45, 45, 45, 46, 45, 45, 43, 41, 37, 29, 14, 22, 27, 22, 24, 21, 9, 15], [29, 31, 33, 33, 32, 31, 29, 30, 29, 24, 16, 22, 17, 17, 13, 15, 10, 14, 0, 9], [28, 28, 31, 33, 32, 28, 29, 29, 27, 25, 21, 21, 16, 10, 17, 11, 7, 6, 13, 13], [16, 16, 14, 20, 0, 11, 18, 6, 17, 18, 20, 0, 10, 10, 13, 2, 11, 10, 6, 19], [12, 21, 20, 16, 19, 9, 5, 4, 14, 16, 4, 9, 17, 10, 2, 11, 11, 12, 8, 4], [23, 18, 22, 15, 19, 7, 17, 18, 13, 16, 10, 13, 18, 14, 21, 8, 15, 14, 12, 10], [14, 7, 11, 16, 10, 0, 14, 11, 7, 17, 9, 10, 14, 11, 14, 14, 5, 8, 11, 16], [17, 16, 13, 18, 22, 21, 20, 18, 4, 11, 9, 14, 17, 14, 9, 15, 6, 7, 7, 15], [14, 10, 11, 16, 20, 13, 18, 4, 8, 17, 15, 15, 12, 12, 19, 8, 11, 20, 15, 19], [17, 10, 15, 5, 14, 10, 5, 7, 16, 0, 10, 16, 15, 13, 7, 12, 0, 17, 0, 14], [23, 20, 22, 14, 16, 15, 17, 16, 10, 10, 12, 18, 17, 18, 20, 19, 16, 10, 15, 0], [13, 13, 1, 2, 8, 12, 16, 19, 14, 16, 3, 10, 6, 13, 9, 11, 14, 12, 16, 14], [7, 16, 8, 13, 18, 11, 1, 1, 14, 18, 8, 7, 16, 14, 15, 1, 11, 19, 10, 14], [9, 11, 15, 17, 13, 22, 18, 7, 14, 17, 3, 17, 18, 10, 15, 10, 4, 16, 13, 13], [9, 13, 15, 10, 14, 14, 4, 13, 12, 11, 14, 13, 19, 13, 13, 10, 13, 6, 7, 9], [10, 15, 11, 17, 14, 19, 11, 17, 7, 12, 12, 15, 10, 16, 10, 14, 20, 17, 8, 9], [12, 0, 7, 7, 7, 16, 13, 7, 9, 23, 6, 7, 17, 12, 0, 13, 16, 15, 7, 6], [19, 14, 0, 11, 10, 14, 8, 11, 7, 10, 12, 15, 12, 20, 13, 11, 12, 12, 12, 0], [14, 11, 20, 1, 9, 13, 14, 18, 18, 15, 13, 3, 16, 15, 10, 15, 15, 12, 14, 14], [12, 10, 15, 10, 16, 8, 11, 3, 0, 13, 7, 16, 10, 7, 0, 10, 14, 12, 2, 17], [12, 11, 0, 14, 15, 7, 14, 13, 15, 11, 16, 13, 6, 16, 11, 0, 0, 3, 4, 16], [11, 0, 16, 4, 17, 13, 7, 12, 8, 16, 12, 15, 9, 19, 12, 15, 17, 5, 9, 0], [9, 12, 11, 0, 5, 1, 3, 15, 16, 15, 10, 10, 9, 14, 14, 17, 16, 20, 14, 14], [2, 22, 5, 11, 11, 12, 15, 16, 5, 14, 8, 14, 17, 14, 7, 10, 9, 13, 10, 8], [18, 15, 8, 6, 4, 17, 7, 9, 8, 8, 7, 13, 16, 11, 15, 11, 16, 11, 13, 9], [5, 4, 9, 8, 15, 0, 14, 15, 14, 8, 10, 15, 12, 15, 9, 0, 12, 12, 12, 12], [18, 5, 21, 14, 4, 13, 18, 0, 17, 4, 11, 6, 16, 14, 16, 16, 6, 21, 15, 9], [9, 13, 14, 7, 14, 18, 13, 16, 15, 11, 19, 18, 10, 8, 13, 15, 6, 12, 15, 14], [9, 11, 17, 9, 9, 17, 10, 14, 17, 16, 18, 1, 14, 0, 10, 13, 5, 11, 15, 4], [16, 4, 16, 19, 15, 7, 15, 11, 14, 14, 9, 0, 14, 14, 12, 15, 17, 4, 10, 14], [19, 2, 7, 14, 9, 0, 12, 12, 15, 18, 16, 14, 8, 16, 18, 13, 10, 9, 9, 11], [18, 14, 15, 12, 11, 3, 19, 14, 12, 8, 14, 10, 10, 16, 10, 9, 10, 14, 0, 11], [95, 98, 99, 103, 102, 104, 105, 104, 103, 102, 100, 98, 94, 90, 81, 67, 68, 66, 65, 66], [82, 88, 90, 87, 86, 87, 88, 88, 86, 85, 82, 79, 75, 71, 65, 63, 65, 61, 57, 52], [83, 81, 76, 80, 78, 76, 78, 78, 78, 77, 75, 73, 70, 65, 55, 56, 59, 54, 41, 41], [71, 78, 76, 76, 77, 76, 76, 76, 74, 72, 72, 68, 59, 58, 59, 55, 48, 44, 35, 22], [71, 71, 63, 71, 70, 70, 69, 70, 69, 67, 66, 63, 57, 48, 52, 53, 44, 38, 33, 28], [75, 79, 79, 79, 79, 79, 79, 79, 77, 76, 73, 69, 63, 60, 62, 56, 39, 44, 35, 30], [60, 63, 58, 61, 59, 59, 61, 62, 64, 64, 63, 61, 52, 36, 44, 39, 33, 27, 19, 6], [61, 65, 66, 67, 67, 66, 65, 64, 62, 60, 56, 51, 39, 47, 30, 33, 18, 20, 19, 14], [45, 48, 48, 43, 44, 43, 44, 43, 41, 41, 38, 30, 19, 19, 19, 16, 21, 15, 4, 9], [40, 39, 30, 36, 34, 25, 27, 33, 32, 33, 28, 23, 9, 23, 12, 13, 10, 0, 17, 21], [42, 45, 43, 41, 41, 41, 41, 41, 39, 36, 32, 25, 25, 21, 13, 9, 8, 13, 8, 20], [36, 33, 34, 35, 37, 38, 34, 31, 29, 27, 21, 23, 22, 19, 13, 14, 13, 12, 15, 20], [45, 48, 47, 46, 44, 46, 38, 39, 37, 33, 30, 23, 13, 17, 12, 3, 18, 17, 14, 16], [42, 42, 42, 40, 39, 38, 35, 32, 27, 8, 25, 25, 19, 18, 11, 3, 18, 15, 12, 16], [32, 31, 34, 32, 31, 32, 30, 28, 22, 17, 20, 16, 10, 13, 19, 6, 8, 3, 9, 16], [16, 24, 21, 28, 30, 23, 21, 17, 27, 24, 8, 19, 20, 11, 7, 12, 0, 20, 16, 7], [24, 12, 19, 5, 22, 11, 18, 12, 9, 9, 17, 15, 14, 20, 12, 15, 14, 7, 16, 11], [8, 12, 6, 15, 18, 18, 15, 8, 7, 17, 18, 7, 7, 14, 12, 11, 10, 3, 9, 11], [13, 19, 19, 25, 7, 18, 8, 12, 13, 7, 6, 6, 17, 16, 6, 5, 14, 15, 19, 8], [29, 24, 21, 25, 15, 14, 11, 9, 16, 14, 11, 13, 9, 0, 19, 8, 16, 3, 7, 7], [18, 21, 16, 26, 3, 17, 17, 5, 0, 0, 10, 16, 16, 17, 8, 16, 10, 8, 11, 14], [19, 22, 19, 1, 12, 6, 12, 2, 5, 10, 3, 18, 9, 8, 9, 0, 18, 7, 11, 15], [18, 17, 7, 19, 9, 15, 6, 15, 8, 14, 16, 4, 5, 11, 8, 1, 13, 5, 13, 17], [16, 16, 12, 19, 16, 11, 6, 11, 0, 20, 9, 18, 0, 12, 13, 14, 11, 19, 20, 10], [17, 15, 18, 13, 13, 16, 19, 8, 0, 6, 8, 2, 10, 2, 6, 16, 16, 13, 17, 11], [8, 7, 15, 4, 17, 16, 17, 9, 20, 9, 14, 5, 17, 13, 18, 3, 5, 11, 14, 16], [12, 18, 17, 15, 12, 7, 17, 17, 11, 20, 13, 14, 17, 19, 12, 20, 16, 17, 16, 15], [18, 17, 8, 10, 4, 14, 11, 11, 6, 18, 19, 17, 16, 21, 17, 17, 1, 17, 15, 15], [10, 12, 13, 13, 16, 8, 14, 12, 15, 13, 15, 12, 15, 12, 7, 13, 13, 15, 8, 17], [12, 5, 6, 21, 11, 18, 8, 16, 13, 21, 19, 15, 20, 14, 13, 15, 9, 17, 14, 16], [10, 16, 8, 15, 15, 1, 20, 17, 15, 16, 9, 13, 17, 13, 17, 14, 9, 12, 14, 0], [17, 9, 5, 14, 20, 16, 13, 15, 10, 15, 0, 11, 4, 11, 9, 15, 14, 17, 21, 15], [19, 5, 8, 5, 12, 8, 19, 10, 12, 14, 14, 8, 14, 7, 6, 3, 0, 14, 9, 4], [105, 109, 111, 114, 114, 115, 116, 115, 114, 113, 112, 110, 105, 100, 90, 75, 77, 75, 73, 74], [94, 99, 104, 100, 101, 100, 100, 100, 99, 98, 94, 91, 86, 84, 79, 76, 78, 74, 69, 60], [96, 96, 91, 93, 91, 91, 95, 96, 97, 95, 93, 91, 87, 82, 71, 70, 73, 69, 58, 55], [83, 88, 87, 88, 89, 89, 87, 87, 85, 82, 80, 80, 69, 69, 70, 67, 58, 54, 47, 29], [88, 88, 83, 90, 90, 89, 88, 89, 88, 85, 84, 81, 76, 64, 66, 68, 59, 54, 48, 39], [92, 96, 97, 97, 97, 97, 97, 97, 96, 94, 92, 88, 79, 72, 75, 69, 63, 55, 55, 39], [76, 82, 77, 78, 77, 74, 73, 76, 80, 80, 78, 75, 66, 54, 62, 52, 52, 38, 37, 3], [83, 87, 87, 89, 87, 87, 85, 84, 81, 79, 76, 73, 61, 66, 53, 50, 39, 33, 30, 13], [77, 77, 80, 75, 77, 76, 77, 78, 75, 72, 68, 62, 40, 46, 42, 42, 36, 26, 22, 10], [74, 79, 79, 78, 77, 77, 77, 77, 73, 68, 65, 65, 65, 61, 43, 40, 28, 13, 12, 8], [68, 73, 71, 70, 68, 68, 68, 67, 61, 61, 52, 53, 50, 50, 26, 32, 28, 22, 10, 12], [62, 75, 75, 76, 75, 73, 66, 64, 66, 53, 53, 55, 55, 42, 42, 25, 25, 8, 14, 14], [78, 80, 76, 74, 79, 74, 75, 72, 68, 61, 37, 38, 48, 43, 39, 31, 21, 17, 3, 10], [79, 77, 75, 77, 75, 71, 74, 68, 65, 60, 53, 49, 47, 36, 23, 7, 13, 6, 17, 16], [70, 70, 73, 70, 71, 72, 72, 69, 66, 62, 49, 50, 47, 42, 35, 28, 17, 17, 11, 9], [47, 65, 65, 67, 64, 56, 53, 57, 56, 53, 44, 47, 26, 23, 12, 13, 16, 19, 16, 15], [55, 47, 53, 56, 58, 48, 34, 51, 52, 48, 29, 36, 20, 17, 12, 14, 10, 10, 15, 3], [53, 48, 44, 47, 43, 34, 28, 32, 30, 23, 18, 18, 19, 13, 15, 3, 11, 16, 19, 19], [52, 45, 44, 43, 45, 22, 29, 33, 31, 27, 20, 5, 20, 18, 13, 16, 5, 16, 18, 12], [48, 46, 51, 47, 46, 41, 35, 32, 26, 24, 26, 12, 18, 18, 10, 16, 3, 8, 10, 18], [55, 54, 53, 52, 50, 47, 42, 35, 30, 35, 24, 8, 16, 12, 11, 14, 14, 14, 19, 13], [48, 51, 49, 49, 46, 45, 42, 36, 29, 7, 26, 16, 1, 14, 14, 4, 8, 10, 10, 18], [48, 47, 46, 39, 38, 33, 26, 14, 13, 20, 7, 10, 11, 15, 3, 13, 13, 7, 17, 9], [45, 50, 49, 50, 47, 38, 31, 32, 25, 19, 18, 14, 17, 5, 10, 17, 12, 17, 9, 0], [44, 39, 41, 32, 30, 36, 33, 28, 17, 27, 18, 12, 11, 12, 10, 10, 7, 12, 15, 20], [43, 43, 38, 36, 31, 30, 30, 29, 15, 9, 18, 4, 14, 14, 9, 12, 11, 2, 13, 12], [35, 39, 29, 25, 26, 9, 13, 13, 11, 13, 9, 9, 13, 16, 4, 20, 18, 17, 11, 17], [21, 34, 24, 28, 16, 18, 20, 15, 17, 19, 5, 18, 9, 18, 11, 19, 1, 19, 17, 18], [31, 30, 22, 16, 19, 22, 18, 23, 11, 11, 18, 15, 7, 14, 9, 16, 11, 19, 5, 7], [32, 20, 31, 3, 20, 14, 21, 17, 10, 11, 19, 13, 15, 12, 15, 15, 1, 18, 15, 13], [20, 31, 26, 24, 10, 16, 16, 12, 6, 0, 17, 7, 6, 11, 9, 2, 18, 19, 11, 18], [28, 25, 18, 21, 17, 12, 10, 12, 13, 16, 5, 9, 4, 9, 14, 10, 15, 18, 18, 8], [82, 87, 90, 92, 93, 93, 94, 94, 91, 90, 88, 85, 80, 73, 71, 75, 71, 68, 57, 59], [55, 51, 48, 51, 53, 57, 55, 56, 55, 55, 51, 45, 45, 46, 43, 40, 41, 29, 34, 26], [40, 40, 44, 44, 45, 48, 48, 48, 46, 45, 43, 40, 28, 32, 24, 26, 30, 16, 11, 22], [39, 43, 41, 36, 39, 39, 34, 37, 33, 33, 32, 26, 30, 33, 24, 9, 26, 7, 17, 21], [35, 32, 36, 33, 33, 31, 31, 30, 17, 26, 21, 24, 22, 13, 22, 17, 25, 11, 18, 12], [22, 33, 36, 33, 31, 28, 26, 28, 24, 21, 20, 19, 22, 11, 22, 16, 21, 19, 16, 22], [18, 19, 24, 21, 19, 18, 23, 20, 18, 19, 5, 15, 10, 9, 6, 16, 21, 11, 14, 22], [9, 19, 15, 19, 19, 19, 21, 15, 18, 18, 14, 18, 18, 6, 15, 18, 19, 16, 18, 5], [22, 12, 15, 9, 16, 16, 17, 17, 10, 21, 4, 13, 14, 10, 17, 9, 23, 7, 11, 17], [21, 13, 18, 16, 13, 11, 18, 16, 22, 14, 7, 14, 15, 11, 13, 17, 16, 20, 11, 6], [19, 3, 8, 16, 18, 12, 15, 11, 2, 7, 13, 18, 0, 12, 14, 19, 23, 6, 3, 13], [14, 21, 16, 13, 18, 11, 14, 13, 16, 17, 14, 13, 15, 17, 15, 19, 15, 9, 12, 8], [8, 10, 15, 10, 20, 18, 13, 13, 17, 10, 0, 12, 12, 11, 14, 12, 8, 8, 6, 18], [18, 16, 10, 13, 16, 16, 17, 18, 13, 14, 19, 6, 2, 12, 5, 9, 19, 15, 17, 14], [5, 18, 12, 17, 15, 16, 17, 20, 4, 16, 10, 15, 0, 20, 16, 11, 4, 0, 13, 13], [19, 17, 12, 18, 18, 15, 15, 13, 14, 20, 13, 14, 4, 1, 11, 7, 18, 14, 16, 13], [19, 15, 7, 15, 12, 20, 19, 9, 17, 19, 15, 16, 18, 16, 12, 22, 9, 17, 10, 12], [3, 5, 16, 0, 19, 19, 12, 15, 22, 15, 17, 14, 1, 13, 4, 13, 18, 4, 17, 12], [18, 15, 17, 17, 18, 12, 18, 17, 19, 7, 17, 20, 19, 16, 17, 6, 18, 15, 6, 11], [9, 13, 10, 19, 15, 15, 14, 9, 11, 7, 9, 5, 18, 5, 23, 10, 11, 21, 17, 18], [16, 15, 17, 18, 20, 18, 14, 16, 14, 19, 12, 16, 9, 17, 7, 17, 22, 8, 15, 10], [7, 6, 13, 15, 18, 22, 18, 18, 16, 19, 19, 17, 23, 13, 19, 18, 13, 10, 17, 8], [14, 21, 12, 19, 16, 21, 10, 21, 16, 11, 15, 17, 25, 15, 16, 10, 15, 14, 3, 17], [93, 98, 101, 103, 105, 104, 106, 105, 103, 102, 99, 96, 90, 82, 84, 87, 83, 77, 70, 71], [73, 76, 79, 77, 78, 78, 78, 77, 76, 76, 73, 70, 64, 70, 65, 69, 58, 63, 51, 48], [65, 72, 74, 74, 75, 75, 74, 72, 70, 68, 58, 55, 63, 60, 62, 54, 56, 51, 36, 31], [59, 62, 59, 56, 55, 55, 53, 55, 42, 38, 40, 37, 39, 46, 41, 38, 29, 23, 19, 16], [61, 63, 63, 62, 61, 60, 57, 56, 51, 49, 38, 44, 47, 51, 39, 49, 40, 34, 19, 13], [54, 50, 48, 49, 46, 47, 43, 43, 40, 35, 40, 35, 32, 40, 22, 31, 24, 23, 20, 18], [32, 36, 40, 39, 35, 36, 36, 36, 32, 30, 28, 31, 13, 21, 21, 17, 8, 8, 18, 17], [35, 38, 39, 39, 38, 38, 37, 35, 29, 23, 30, 26, 12, 9, 15, 16, 15, 14, 3, 8], [17, 20, 20, 22, 18, 22, 8, 10, 16, 17, 17, 12, 20, 15, 3, 13, 15, 9, 12, 0], [13, 18, 23, 13, 2, 21, 18, 19, 16, 17, 18, 14, 11, 22, 2, 15, 10, 9, 14, 19], [21, 6, 20, 16, 17, 20, 24, 19, 25, 24, 13, 20, 20, 0, 7, 7, 9, 10, 18, 18], [16, 3, 9, 11, 20, 11, 0, 9, 4, 4, 17, 17, 13, 12, 11, 9, 12, 14, 11, 18], [26, 19, 17, 19, 16, 6, 19, 14, 10, 14, 0, 20, 3, 12, 17, 20, 10, 10, 15, 0], [23, 20, 16, 10, 20, 4, 17, 17, 17, 1, 3, 14, 1, 12, 22, 11, 13, 13, 20, 8], [12, 10, 9, 17, 19, 8, 12, 16, 16, 16, 17, 19, 10, 20, 15, 15, 16, 12, 5, 19], [16, 17, 20, 15, 19, 15, 12, 16, 21, 12, 14, 19, 6, 17, 12, 15, 7, 11, 14, 10], [0, 26, 24, 19, 16, 9, 10, 16, 18, 5, 21, 13, 14, 16, 16, 14, 14, 14, 13, 7], [22, 3, 6, 18, 18, 12, 19, 16, 20, 8, 17, 4, 6, 12, 16, 13, 2, 11, 14, 19], [16, 22, 20, 16, 20, 18, 14, 13, 5, 13, 15, 10, 11, 17, 12, 21, 9, 14, 1, 13], [4, 8, 23, 14, 16, 16, 11, 12, 2, 18, 6, 16, 12, 22, 17, 9, 20, 1, 0, 5], [0, 8, 15, 14, 9, 15, 8, 0, 16, 16, 16, 18, 16, 13, 4, 19, 16, 11, 13, 4], [14, 8, 16, 5, 5, 18, 14, 11, 19, 11, 12, 20, 20, 20, 18, 14, 14, 10, 14, 3], [12, 3, 14, 10, 17, 16, 17, 17, 13, 12, 12, 1, 8, 16, 17, 14, 12, 8, 18, 21], [11, 17, 13, 8, 12, 20, 15, 11, 13, 9, 12, 7, 18, 12, 8, 5, 7, 16, 16, 15], [12, 14, 16, 12, 18, 9, 18, 18, 13, 16, 16, 17, 13, 8, 10, 14, 21, 15, 18, 16], [22, 15, 16, 12, 19, 12, 19, 4, 16, 10, 14, 5, 3, 16, 6, 4, 9, 8, 20, 21], [12, 19, 22, 14, 11, 4, 0, 13, 11, 1, 12, 10, 13, 17, 16, 13, 11, 15, 5, 8], [11, 6, 17, 19, 16, 13, 16, 16, 18, 11, 4, 16, 21, 16, 15, 13, 12, 17, 14, 8], [106, 110, 114, 117, 118, 117, 119, 118, 115, 114, 111, 108, 100, 84, 99, 99, 93, 85, 81, 81], [89, 91, 95, 92, 95, 92, 91, 92, 91, 90, 89, 85, 82, 88, 80, 83, 75, 71, 69, 63], [87, 94, 97, 97, 98, 98, 98, 97, 96, 93, 85, 82, 85, 82, 76, 63, 70, 66, 52, 34], [83, 91, 89, 87, 87, 85, 86, 85, 78, 77, 66, 70, 63, 70, 59, 61, 53, 48, 38, 21], [87, 91, 93, 92, 93, 91, 89, 88, 84, 80, 76, 79, 77, 68, 57, 71, 60, 44, 31, 21], [85, 85, 85, 84, 81, 79, 72, 75, 67, 66, 71, 72, 51, 65, 57, 58, 31, 35, 25, 5], [64, 69, 71, 69, 68, 62, 64, 65, 66, 64, 56, 53, 47, 49, 51, 38, 24, 24, 1, 8], [81, 83, 82, 82, 83, 81, 79, 77, 61, 65, 60, 61, 61, 59, 50, 51, 32, 25, 9, 6], [67, 61, 69, 66, 64, 65, 63, 63, 60, 58, 52, 44, 39, 42, 36, 30, 16, 17, 19, 18], [57, 59, 54, 52, 51, 48, 53, 57, 50, 50, 50, 43, 40, 38, 20, 27, 9, 17, 14, 17], [69, 71, 71, 70, 69, 68, 66, 63, 59, 54, 47, 44, 46, 49, 30, 29, 17, 14, 14, 10], [58, 61, 56, 47, 56, 56, 43, 49, 43, 42, 38, 44, 41, 44, 16, 12, 5, 19, 10, 10], [68, 68, 66, 64, 53, 51, 56, 56, 56, 52, 43, 32, 37, 43, 21, 19, 18, 11, 14, 18], [54, 59, 60, 61, 60, 58, 53, 38, 36, 39, 47, 43, 38, 42, 24, 10, 18, 9, 16, 16], [45, 50, 49, 48, 50, 46, 38, 42, 41, 32, 26, 22, 16, 41, 20, 8, 17, 17, 17, 12], [53, 56, 54, 52, 52, 51, 45, 42, 45, 37, 31, 31, 27, 41, 6, 20, 5, 11, 7, 13], [25, 31, 16, 33, 30, 22, 29, 34, 34, 28, 6, 16, 11, 40, 10, 12, 12, 18, 19, 16], [21, 31, 14, 25, 32, 22, 21, 16, 16, 24, 10, 13, 18, 40, 11, 11, 19, 11, 8, 15], [29, 25, 32, 29, 22, 23, 17, 5, 8, 23, 18, 13, 17, 40, 14, 7, 13, 1, 12, 11], [13, 24, 34, 24, 23, 12, 16, 18, 6, 9, 15, 12, 14, 40, 2, 14, 21, 16, 14, 15], [25, 30, 15, 21, 21, 14, 20, 10, 13, 11, 9, 15, 5, 39, 8, 18, 12, 15, 12, 17], [18, 21, 16, 16, 11, 21, 16, 16, 19, 20, 10, 13, 21, 39, 7, 4, 18, 16, 11, 16], [22, 14, 22, 13, 20, 21, 19, 17, 10, 17, 15, 21, 15, 39, 14, 17, 13, 12, 17, 17], [21, 13, 23, 18, 18, 17, 11, 12, 16, 9, 10, 10, 8, 39, 10, 4, 9, 5, 1, 15], [25, 20, 18, 8, 23, 22, 4, 18, 13, 11, 16, 15, 7, 38, 15, 17, 20, 16, 18, 18], [12, 17, 17, 17, 18, 18, 22, 20, 9, 20, 14, 0, 1, 38, 11, 4, 12, 20, 21, 9], [85, 88, 91, 93, 93, 93, 92, 90, 90, 88, 82, 78, 77, 75, 64, 59, 51, 70, 54, 60], [52, 48, 50, 55, 51, 50, 50, 48, 47, 45, 48, 47, 45, 43, 34, 32, 32, 37, 24, 30], [41, 47, 31, 20, 37, 36, 34, 28, 19, 25, 30, 30, 30, 21, 29, 21, 15, 13, 17, 4], [40, 35, 33, 36, 39, 40, 39, 39, 32, 27, 24, 28, 28, 24, 18, 23, 16, 17, 16, 12], [41, 36, 35, 29, 28, 26, 22, 30, 29, 28, 28, 18, 23, 19, 23, 18, 16, 18, 13, 14], [16, 27, 27, 22, 26, 25, 22, 24, 23, 24, 22, 24, 20, 9, 18, 18, 13, 15, 14, 12], [23, 27, 18, 26, 24, 24, 20, 7, 18, 23, 11, 20, 15, 16, 18, 16, 15, 10, 12, 18], [13, 13, 17, 21, 12, 18, 12, 0, 16, 18, 20, 17, 18, 10, 11, 8, 12, 12, 16, 19], [20, 12, 18, 12, 9, 14, 10, 15, 14, 16, 9, 1, 0, 10, 13, 8, 16, 12, 15, 19], [8, 13, 15, 13, 18, 21, 12, 16, 14, 23, 17, 16, 23, 15, 11, 10, 6, 11, 20, 8], [14, 13, 14, 15, 11, 11, 17, 21, 12, 12, 13, 8, 17, 13, 6, 14, 8, 21, 16, 7], [16, 12, 21, 23, 11, 22, 15, 22, 13, 4, 18, 20, 16, 15, 9, 20, 14, 12, 6, 8], [15, 13, 1, 2, 20, 21, 17, 6, 16, 8, 12, 17, 13, 20, 5, 18, 6, 16, 8, 16], [21, 23, 12, 18, 11, 15, 6, 20, 11, 12, 9, 12, 11, 15, 16, 17, 18, 8, 1, 15], [19, 18, 14, 18, 16, 13, 21, 12, 14, 7, 9, 16, 14, 15, 17, 15, 11, 12, 20, 16], [18, 16, 21, 17, 16, 15, 18, 7, 11, 19, 14, 16, 17, 14, 18, 0, 13, 20, 21, 20], [13, 15, 14, 17, 10, 18, 12, 5, 17, 22, 14, 11, 18, 4, 15, 10, 23, 15, 16, 12], [20, 15, 19, 7, 12, 11, 1, 20, 12, 18, 12, 15, 10, 22, 12, 18, 17, 8, 18, 16], [10, 12, 7, 8, 15, 7, 10, 6, 17, 0, 19, 8, 5, 12, 15, 7, 11, 18, 16, 13], [3, 11, 17, 19, 13, 11, 8, 11, 9, 19, 17, 8, 15, 18, 15, 18, 15, 5, 17, 16], [8, 13, 18, 11, 13, 8, 11, 6, 19, 14, 18, 13, 14, 19, 10, 19, 11, 17, 9, 18], [14, 18, 15, 14, 12, 18, 16, 10, 20, 15, 0, 13, 14, 18, 3, 15, 10, 13, 17, 18], [99, 102, 105, 107, 107, 106, 106, 105, 104, 102, 96, 90, 90, 89, 80, 74, 70, 82, 68, 70], [77, 80, 81, 83, 82, 83, 84, 82, 81, 80, 72, 73, 75, 63, 67, 64, 63, 64, 42, 41], [75, 66, 63, 63, 72, 72, 64, 67, 64, 58, 61, 60, 56, 49, 58, 52, 41, 34, 22, 18], [67, 57, 58, 61, 63, 63, 63, 62, 57, 48, 53, 48, 47, 46, 41, 41, 17, 23, 22, 13], [65, 63, 59, 55, 57, 57, 55, 54, 54, 47, 50, 49, 31, 46, 41, 22, 17, 21, 8, 21], [55, 59, 61, 60, 59, 58, 58, 57, 47, 47, 48, 40, 42, 29, 32, 18, 21, 16, 8, 4], [55, 54, 55, 56, 53, 53, 49, 46, 42, 36, 38, 38, 26, 30, 24, 18, 13, 14, 10, 1], [34, 44, 41, 40, 38, 42, 28, 30, 32, 27, 26, 30, 18, 24, 20, 15, 14, 6, 14, 14], [38, 18, 30, 21, 28, 23, 26, 23, 19, 24, 14, 18, 23, 12, 15, 18, 21, 17, 12, 9], [23, 27, 16, 24, 19, 17, 18, 22, 16, 16, 12, 18, 16, 18, 9, 17, 16, 19, 19, 15], [20, 22, 15, 19, 11, 18, 20, 14, 14, 19, 17, 9, 19, 8, 10, 13, 16, 19, 12, 15], [21, 26, 10, 17, 17, 2, 8, 21, 21, 21, 6, 16, 14, 13, 19, 15, 14, 18, 8, 0], [22, 26, 27, 25, 16, 17, 20, 14, 19, 19, 5, 23, 14, 11, 19, 18, 15, 17, 9, 15], [19, 15, 21, 20, 20, 12, 14, 12, 16, 16, 13, 12, 20, 21, 14, 18, 18, 7, 16, 12], [19, 19, 22, 17, 25, 18, 10, 19, 20, 11, 22, 8, 15, 21, 14, 15, 19, 18, 17, 14], [14, 20, 17, 14, 9, 21, 10, 16, 19, 16, 19, 16, 19, 6, 15, 16, 17, 18, 10, 16], [22, 19, 23, 17, 19, 17, 4, 17, 0, 8, 21, 3, 14, 18, 23, 1, 17, 0, 20, 9], [14, 14, 13, 8, 21, 10, 17, 16, 11, 15, 15, 12, 15, 17, 17, 14, 18, 21, 15, 20], [12, 13, 19, 17, 10, 16, 11, 18, 15, 4, 11, 8, 17, 14, 13, 17, 10, 21, 16, 18], [17, 17, 19, 18, 17, 15, 13, 14, 16, 20, 4, 16, 18, 14, 17, 10, 7, 11, 12, 18], [20, 20, 13, 19, 9, 17, 21, 6, 20, 9, 15, 19, 20, 10, 15, 22, 14, 16, 16, 20], [17, 21, 14, 5, 11, 0, 6, 23, 21, 5, 10, 21, 19, 0, 20, 17, 24, 13, 8, 22], [108, 111, 115, 116, 116, 116, 115, 113, 112, 110, 104, 99, 97, 97, 89, 87, 80, 88, 80, 75], [87, 92, 92, 94, 94, 95, 95, 93, 91, 89, 82, 84, 83, 77, 80, 76, 75, 71, 58, 50], [89, 81, 70, 72, 83, 84, 74, 77, 68, 73, 72, 70, 72, 67, 68, 62, 45, 46, 30, 24], [83, 78, 77, 80, 81, 80, 79, 78, 58, 70, 62, 64, 53, 63, 56, 55, 39, 37, 17, 22], [83, 82, 77, 72, 73, 70, 67, 59, 60, 69, 65, 60, 56, 62, 48, 49, 40, 28, 22, 18], [71, 76, 79, 79, 76, 76, 71, 70, 65, 69, 62, 56, 59, 48, 48, 36, 28, 24, 24, 18], [75, 75, 76, 77, 75, 75, 72, 68, 61, 64, 61, 53, 56, 51, 49, 32, 29, 23, 9, 12], [62, 63, 66, 67, 63, 62, 54, 61, 55, 51, 52, 50, 42, 26, 22, 19, 21, 6, 14, 14], [69, 66, 66, 64, 62, 62, 61, 63, 58, 55, 53, 47, 37, 36, 32, 25, 15, 17, 15, 18], [52, 51, 57, 48, 55, 51, 41, 43, 45, 37, 33, 23, 11, 18, 13, 14, 7, 18, 7, 16], [54, 46, 48, 50, 48, 44, 29, 43, 38, 21, 22, 18, 23, 23, 10, 11, 20, 22, 9, 18], [49, 49, 43, 50, 45, 42, 47, 46, 35, 39, 25, 28, 22, 19, 13, 14, 8, 15, 10, 6], [43, 46, 47, 51, 50, 50, 41, 27, 36, 29, 28, 20, 17, 23, 15, 18, 13, 19, 5, 6], [44, 46, 45, 46, 44, 41, 36, 34, 21, 16, 19, 15, 13, 21, 15, 20, 17, 15, 18, 12], [38, 31, 36, 34, 33, 23, 23, 13, 20, 11, 21, 18, 17, 19, 15, 18, 17, 4, 3, 7], [34, 26, 25, 16, 15, 16, 17, 12, 9, 17, 19, 14, 3, 16, 17, 0, 22, 9, 15, 19], [15, 29, 22, 25, 12, 20, 19, 13, 16, 20, 14, 15, 21, 0, 17, 16, 6, 10, 2, 10], [23, 27, 14, 21, 23, 13, 20, 24, 16, 12, 15, 13, 18, 18, 13, 12, 0, 19, 22, 11], [20, 19, 24, 17, 11, 16, 20, 21, 21, 10, 21, 21, 12, 13, 2, 19, 19, 19, 18, 10], [14, 28, 21, 21, 19, 18, 18, 9, 12, 3, 5, 14, 18, 18, 18, 6, 4, 18, 16, 11], [20, 20, 12, 14, 17, 8, 20, 17, 13, 11, 10, 14, 7, 7, 16, 19, 9, 9, 17, 17], [87, 88, 85, 85, 87, 86, 86, 85, 83, 78, 68, 71, 77, 76, 59, 68, 62, 58, 55, 40], [51, 48, 45, 51, 35, 46, 44, 45, 28, 40, 45, 41, 39, 39, 35, 24, 27, 16, 22, 21], [39, 35, 39, 38, 34, 32, 41, 38, 33, 36, 34, 30, 15, 28, 24, 16, 18, 22, 21, 7], [43, 43, 42, 40, 39, 38, 37, 33, 24, 15, 17, 26, 24, 22, 21, 23, 19, 23, 18, 13], [24, 25, 25, 12, 27, 20, 13, 22, 17, 23, 11, 15, 19, 11, 15, 19, 18, 13, 13, 9], [14, 23, 24, 16, 24, 21, 23, 12, 18, 21, 26, 17, 16, 3, 15, 11, 16, 13, 9, 20], [17, 29, 18, 22, 9, 11, 15, 17, 21, 20, 16, 16, 14, 16, 15, 8, 16, 12, 13, 15], [19, 17, 18, 26, 25, 8, 13, 9, 16, 12, 8, 11, 7, 16, 15, 9, 17, 18, 19, 16], [13, 13, 20, 11, 20, 19, 13, 19, 10, 13, 7, 19, 11, 17, 19, 16, 16, 21, 12, 20], [11, 14, 19, 15, 21, 15, 20, 10, 15, 18, 10, 16, 15, 13, 19, 9, 18, 13, 7, 18], [19, 12, 12, 17, 6, 18, 22, 20, 9, 22, 16, 16, 19, 7, 19, 9, 14, 18, 21, 19], [14, 16, 17, 17, 23, 17, 15, 18, 4, 15, 16, 6, 15, 18, 9, 13, 16, 15, 14, 3], [19, 18, 11, 12, 14, 22, 17, 9, 10, 10, 18, 23, 1, 18, 16, 8, 16, 7, 13, 21], [15, 12, 1, 22, 14, 16, 15, 22, 18, 19, 20, 19, 25, 14, 18, 13, 22, 20, 18, 18], [15, 13, 25, 13, 18, 18, 18, 13, 15, 17, 15, 9, 13, 14, 7, 13, 18, 12, 16, 10], [18, 17, 11, 15, 22, 18, 18, 11, 14, 16, 9, 22, 6, 14, 11, 11, 16, 24, 6, 13], [17, 16, 17, 16, 16, 20, 12, 13, 20, 21, 2, 20, 14, 18, 18, 16, 2, 14, 19, 19], [73, 98, 95, 94, 96, 95, 95, 95, 92, 88, 79, 81, 87, 85, 66, 76, 71, 67, 65, 53], [63, 60, 66, 68, 62, 64, 58, 63, 54, 39, 50, 49, 46, 44, 40, 36, 30, 22, 16, 24], [54, 42, 52, 39, 39, 42, 48, 42, 37, 42, 43, 23, 42, 38, 30, 24, 20, 18, 14, 15], [51, 60, 56, 55, 53, 49, 49, 45, 45, 44, 44, 41, 32, 26, 27, 26, 22, 22, 8, 14], [33, 29, 20, 31, 29, 13, 28, 36, 32, 27, 30, 11, 24, 18, 21, 12, 17, 19, 12, 16], [20, 24, 30, 22, 22, 21, 18, 23, 24, 12, 16, 15, 15, 15, 13, 17, 16, 10, 12, 21], [15, 25, 25, 21, 19, 16, 22, 24, 16, 15, 16, 17, 15, 16, 16, 18, 18, 19, 18, 12], [12, 22, 21, 11, 24, 15, 17, 18, 6, 14, 9, 17, 18, 16, 11, 15, 13, 10, 14, 10], [19, 18, 22, 7, 17, 18, 6, 21, 22, 10, 21, 14, 15, 10, 17, 14, 23, 17, 16, 16], [14, 16, 12, 22, 24, 21, 20, 13, 17, 19, 13, 14, 15, 8, 9, 18, 5, 6, 11, 21], [25, 21, 24, 12, 0, 20, 18, 13, 19, 22, 20, 22, 18, 19, 19, 16, 10, 15, 11, 16], [25, 17, 21, 20, 17, 19, 23, 10, 18, 23, 19, 16, 14, 7, 19, 11, 7, 19, 18, 5], [11, 12, 20, 11, 18, 13, 15, 15, 19, 10, 19, 20, 19, 15, 5, 18, 17, 19, 21, 15], [16, 13, 19, 12, 19, 20, 21, 12, 22, 12, 10, 18, 20, 18, 24, 13, 13, 16, 12, 13], [14, 16, 8, 17, 12, 20, 23, 19, 9, 9, 14, 16, 14, 16, 23, 21, 18, 13, 0, 20], [18, 12, 18, 11, 16, 15, 19, 19, 19, 15, 16, 8, 12, 16, 18, 10, 10, 18, 23, 18], [20, 4, 10, 21, 6, 14, 20, 17, 20, 20, 6, 21, 13, 16, 19, 23, 17, 14, 5, 6], [59, 105, 113, 108, 108, 109, 109, 108, 106, 101, 84, 96, 101, 97, 85, 88, 83, 80, 73, 64], [35, 87, 79, 83, 93, 87, 82, 85, 78, 81, 74, 84, 64, 69, 69, 60, 57, 52, 42, 35], [26, 79, 71, 81, 67, 75, 74, 65, 65, 72, 57, 68, 59, 44, 56, 47, 34, 29, 19, 16], [19, 84, 82, 78, 72, 72, 71, 69, 72, 72, 60, 53, 46, 39, 38, 35, 25, 22, 15, 18], [20, 65, 67, 67, 70, 66, 65, 64, 63, 60, 57, 49, 44, 41, 23, 14, 16, 22, 13, 11], [9, 59, 44, 58, 62, 60, 59, 57, 57, 53, 38, 38, 32, 19, 12, 22, 0, 5, 13, 19], [19, 66, 65, 63, 54, 51, 40, 58, 56, 50, 47, 47, 35, 14, 19, 10, 20, 18, 19, 20], [13, 60, 60, 50, 34, 38, 44, 36, 45, 42, 35, 28, 22, 17, 18, 2, 18, 12, 20, 13], [10, 55, 55, 56, 51, 49, 45, 42, 35, 38, 32, 35, 25, 20, 20, 16, 21, 16, 11, 18], [19, 44, 43, 48, 45, 40, 31, 16, 27, 19, 11, 10, 0, 19, 4, 10, 5, 11, 7, 4], [3, 33, 40, 38, 35, 34, 22, 31, 24, 22, 24, 13, 13, 12, 14, 23, 12, 19, 22, 18], [13, 35, 39, 41, 35, 31, 28, 28, 23, 22, 19, 14, 18, 18, 19, 21, 17, 20, 14, 22], [20, 32, 38, 34, 27, 21, 17, 9, 8, 15, 11, 18, 21, 13, 11, 25, 16, 12, 13, 15], [7, 32, 31, 28, 36, 33, 16, 25, 11, 17, 14, 10, 15, 19, 21, 18, 16, 12, 18, 17], [20, 21, 15, 19, 24, 21, 23, 22, 13, 20, 7, 10, 25, 17, 21, 21, 22, 19, 21, 9], [14, 25, 22, 20, 14, 12, 8, 13, 15, 23, 14, 23, 7, 10, 15, 19, 19, 14, 10, 7], [6, 27, 28, 24, 26, 11, 21, 16, 18, 13, 12, 15, 24, 11, 13, 18, 14, 12, 13, 13], [78, 77, 78, 78, 72, 63, 73, 72, 72, 72, 69, 67, 67, 68, 62, 61, 54, 35, 41, 38], [46, 47, 49, 53, 53, 52, 52, 51, 49, 45, 38, 42, 42, 36, 24, 29, 19, 19, 23, 12], [32, 37, 31, 26, 36, 27, 29, 28, 27, 19, 36, 34, 31, 21, 21, 26, 20, 17, 17, 14], [26, 28, 25, 23, 19, 20, 25, 24, 17, 21, 13, 23, 11, 21, 19, 16, 13, 13, 16, 20], [18, 22, 17, 21, 6, 16, 14, 11, 16, 11, 3, 18, 8, 20, 15, 19, 9, 26, 21, 15], [16, 16, 21, 15, 19, 13, 17, 7, 13, 20, 11, 11, 17, 11, 18, 14, 13, 20, 17, 10], [23, 23, 19, 18, 21, 13, 8, 13, 22, 6, 20, 20, 19, 14, 6, 10, 18, 8, 15, 19], [23, 20, 11, 14, 8, 16, 16, 13, 20, 9, 23, 18, 15, 17, 7, 13, 14, 11, 13, 14], [19, 15, 23, 19, 18, 23, 18, 26, 15, 16, 19, 17, 14, 6, 16, 19, 8, 23, 18, 18], [9, 14, 16, 10, 19, 7, 13, 16, 6, 21, 19, 18, 16, 19, 22, 19, 7, 7, 19, 22], [10, 7, 10, 20, 13, 12, 16, 14, 13, 23, 15, 15, 8, 21, 14, 16, 7, 19, 21, 7], [17, 5, 18, 12, 20, 16, 22, 23, 17, 7, 19, 6, 13, 23, 20, 18, 13, 18, 21, 21], [11, 10, 18, 9, 16, 9, 8, 20, 21, 16, 14, 21, 8, 18, 17, 12, 17, 15, 20, 11], [94, 92, 91, 93, 88, 80, 77, 75, 75, 72, 73, 72, 77, 76, 68, 70, 64, 47, 50, 43], [53, 59, 50, 59, 60, 55, 52, 50, 48, 54, 54, 41, 47, 49, 41, 35, 34, 26, 17, 24], [59, 51, 53, 55, 55, 52, 56, 55, 50, 51, 53, 45, 41, 41, 18, 22, 7, 0, 20, 20], [39, 41, 41, 37, 41, 41, 39, 39, 36, 33, 31, 9, 24, 6, 19, 9, 12, 20, 6, 19], [31, 33, 33, 25, 24, 30, 30, 23, 16, 13, 13, 19, 17, 16, 20, 12, 21, 17, 13, 9], [26, 20, 21, 20, 24, 18, 20, 16, 15, 17, 19, 20, 14, 8, 21, 15, 20, 14, 4, 11], [24, 22, 16, 20, 23, 17, 17, 22, 20, 16, 16, 20, 2, 15, 8, 19, 21, 21, 17, 14], [23, 26, 13, 12, 17, 19, 18, 21, 13, 20, 20, 13, 14, 8, 21, 9, 22, 14, 4, 14], [23, 14, 16, 18, 22, 16, 10, 13, 17, 22, 12, 19, 18, 22, 14, 16, 21, 19, 9, 15], [20, 22, 19, 22, 17, 13, 19, 17, 19, 22, 15, 19, 16, 20, 10, 18, 11, 21, 21, 12], [16, 16, 19, 16, 11, 13, 20, 9, 15, 18, 21, 17, 17, 19, 17, 21, 12, 10, 11, 24], [21, 14, 15, 15, 14, 14, 18, 14, 22, 21, 13, 18, 18, 19, 14, 16, 19, 21, 18, 9], [23, 21, 16, 23, 7, 19, 20, 19, 21, 18, 11, 18, 15, 10, 18, 20, 6, 17, 12, 23], [54, 103, 98, 103, 101, 100, 92, 89, 91, 89, 77, 86, 87, 85, 80, 78, 75, 66, 52, 51], [32, 88, 87, 86, 86, 86, 84, 86, 85, 80, 71, 68, 78, 70, 67, 63, 54, 41, 40, 30], [23, 80, 69, 69, 74, 70, 71, 67, 57, 63, 62, 58, 50, 51, 43, 44, 34, 27, 25, 24], [19, 65, 58, 65, 66, 66, 66, 59, 56, 45, 57, 51, 21, 42, 30, 29, 16, 16, 14, 20], [24, 58, 62, 61, 55, 46, 56, 51, 46, 49, 50, 47, 42, 29, 27, 23, 10, 22, 24, 18], [21, 51, 51, 32, 41, 36, 33, 31, 37, 36, 29, 25, 17, 20, 9, 20, 17, 12, 11, 18], [16, 55, 52, 50, 41, 42, 37, 42, 28, 29, 21, 21, 6, 10, 11, 18, 16, 17, 14, 16], [20, 38, 44, 43, 40, 42, 35, 36, 25, 32, 22, 23, 20, 8, 12, 16, 10, 17, 18, 20], [10, 48, 44, 39, 34, 21, 20, 26, 24, 27, 21, 21, 19, 13, 21, 17, 15, 19, 17, 16], [22, 34, 36, 30, 26, 27, 25, 13, 16, 22, 18, 17, 20, 18, 13, 21, 18, 9, 17, 18], [19, 18, 27, 21, 25, 20, 14, 13, 1, 10, 17, 20, 11, 21, 1, 15, 17, 19, 8, 26], [12, 28, 29, 23, 22, 16, 20, 24, 18, 10, 1, 21, 17, 17, 17, 8, 21, 12, 16, 18], [12, 27, 19, 19, 17, 16, 21, 15, 10, 20, 20, 17, 12, 20, 15, 20, 20, 24, 15, 19], [67, 70, 78, 81, 81, 78, 78, 78, 73, 71, 68, 63, 66, 67, 60, 56, 51, 50, 29, 37], [47, 52, 53, 56, 56, 55, 54, 53, 47, 40, 40, 41, 27, 30, 27, 25, 7, 16, 22, 18], [22, 33, 35, 36, 34, 37, 36, 35, 24, 17, 22, 18, 21, 23, 7, 16, 16, 19, 8, 15], [24, 26, 23, 20, 18, 18, 22, 24, 17, 17, 16, 19, 21, 13, 12, 16, 21, 24, 0, 12], [18, 20, 15, 26, 21, 22, 22, 16, 21, 11, 15, 17, 18, 17, 25, 24, 23, 18, 9, 12], [21, 7, 17, 16, 15, 16, 17, 20, 18, 13, 20, 16, 19, 20, 14, 8, 11, 18, 15, 18], [14, 13, 19, 18, 20, 19, 7, 15, 23, 21, 19, 18, 15, 16, 17, 18, 22, 15, 16, 13], [16, 26, 23, 21, 23, 9, 14, 22, 12, 16, 17, 23, 14, 16, 15, 13, 18, 21, 19, 15], [17, 6, 6, 15, 21, 25, 17, 23, 17, 20, 19, 16, 27, 18, 12, 14, 21, 10, 23, 11], [22, 11, 8, 20, 6, 21, 23, 17, 22, 20, 24, 22, 18, 24, 16, 11, 25, 17, 19, 20], [21, 14, 20, 22, 19, 26, 14, 18, 16, 12, 19, 24, 19, 24, 12, 20, 17, 23, 16, 21], [85, 90, 94, 96, 95, 95, 95, 95, 92, 89, 83, 77, 78, 79, 73, 72, 63, 63, 32, 46], [62, 61, 63, 63, 66, 65, 63, 63, 56, 46, 47, 52, 34, 38, 37, 34, 19, 18, 15, 21], [38, 48, 49, 49, 44, 43, 43, 41, 31, 31, 38, 35, 18, 30, 27, 22, 21, 17, 19, 23], [40, 40, 36, 30, 28, 24, 24, 30, 31, 27, 24, 21, 14, 17, 24, 10, 15, 13, 14, 22], [23, 34, 21, 26, 23, 28, 19, 20, 25, 20, 16, 15, 9, 12, 23, 3, 25, 7, 22, 7], [23, 19, 18, 20, 25, 16, 16, 19, 26, 20, 21, 18, 11, 19, 23, 21, 19, 17, 18, 22], [23, 26, 13, 20, 21, 18, 12, 9, 12, 12, 19, 19, 8, 19, 19, 16, 19, 18, 17, 19], [12, 20, 19, 18, 19, 14, 24, 15, 26, 16, 21, 8, 15, 16, 17, 20, 13, 15, 17, 20], [21, 17, 13, 18, 20, 17, 19, 23, 17, 22, 24, 1, 23, 14, 11, 12, 17, 16, 12, 12], [16, 5, 15, 20, 15, 14, 11, 20, 18, 14, 14, 12, 13, 19, 16, 13, 21, 5, 13, 11], [14, 21, 15, 20, 19, 17, 15, 19, 21, 18, 23, 7, 21, 8, 15, 17, 22, 14, 21, 22], [102, 107, 110, 112, 111, 111, 111, 111, 108, 105, 98, 91, 94, 93, 89, 84, 77, 76, 57, 57], [86, 86, 88, 89, 92, 91, 86, 77, 79, 68, 69, 74, 64, 67, 62, 56, 31, 37, 21, 16], [66, 72, 65, 53, 67, 64, 65, 60, 57, 47, 44, 49, 47, 42, 37, 29, 15, 20, 17, 18], [63, 64, 60, 37, 47, 52, 57, 55, 52, 49, 47, 47, 42, 24, 25, 18, 22, 13, 20, 16], [53, 52, 48, 45, 51, 52, 50, 49, 27, 42, 40, 29, 23, 12, 21, 8, 12, 22, 23, 10], [41, 44, 43, 38, 38, 28, 34, 30, 22, 21, 24, 18, 16, 10, 17, 17, 15, 20, 20, 12], [46, 43, 40, 29, 21, 30, 24, 28, 25, 23, 22, 11, 15, 16, 15, 18, 14, 16, 13, 18], [31, 37, 36, 35, 24, 29, 21, 20, 9, 20, 21, 16, 20, 16, 13, 20, 18, 20, 24, 22], [29, 25, 30, 18, 24, 12, 20, 24, 20, 18, 15, 19, 17, 13, 19, 10, 22, 8, 14, 20], [24, 28, 20, 18, 21, 16, 19, 2, 19, 13, 11, 21, 19, 20, 17, 25, 15, 20, 12, 14], [26, 28, 23, 23, 14, 18, 21, 23, 16, 13, 18, 23, 20, 14, 15, 19, 23, 19, 18, 19], [65, 73, 67, 72, 69, 67, 65, 65, 58, 54, 57, 48, 56, 37, 40, 42, 36, 31, 24, 19], [45, 45, 43, 42, 43, 40, 42, 41, 43, 42, 30, 36, 23, 15, 23, 8, 23, 21, 19, 22], [26, 21, 28, 26, 24, 19, 22, 20, 22, 15, 21, 20, 15, 20, 22, 11, 16, 22, 13, 18], [30, 32, 34, 35, 31, 32, 19, 18, 26, 15, 14, 11, 21, 18, 13, 13, 17, 17, 15, 12], [21, 25, 24, 22, 5, 12, 19, 14, 21, 20, 17, 20, 8, 18, 12, 24, 18, 17, 17, 10], [23, 25, 24, 26, 22, 16, 24, 22, 13, 22, 14, 22, 12, 15, 9, 14, 15, 18, 15, 18], [23, 11, 11, 22, 22, 20, 23, 22, 26, 11, 18, 20, 18, 10, 15, 19, 11, 17, 16, 17], [15, 22, 15, 19, 17, 20, 18, 25, 21, 22, 20, 17, 20, 21, 26, 19, 22, 18, 20, 20], [89, 93, 90, 92, 90, 87, 88, 85, 85, 82, 62, 72, 77, 71, 64, 58, 51, 41, 25, 26], [43, 59, 52, 46, 52, 48, 46, 50, 48, 50, 20, 46, 34, 13, 22, 26, 20, 22, 16, 18], [27, 36, 33, 37, 28, 31, 33, 31, 32, 21, 19, 20, 16, 17, 15, 20, 13, 23, 10, 13], [32, 42, 28, 27, 29, 32, 35, 33, 28, 31, 23, 19, 16, 20, 23, 23, 21, 16, 22, 20], [29, 22, 26, 33, 27, 24, 22, 24, 10, 15, 14, 16, 18, 17, 14, 5, 19, 14, 16, 23], [10, 22, 20, 13, 19, 21, 25, 20, 21, 23, 13, 9, 17, 17, 15, 20, 20, 21, 19, 10], [23, 18, 18, 22, 24, 29, 18, 15, 23, 21, 20, 20, 10, 15, 22, 16, 23, 17, 21, 18], [24, 11, 7, 8, 18, 17, 21, 16, 19, 24, 21, 23, 13, 22, 18, 19, 21, 16, 21, 27], [105, 107, 106, 106, 105, 104, 103, 101, 101, 97, 77, 91, 91, 86, 77, 70, 64, 54, 46, 40], [83, 80, 79, 68, 63, 78, 75, 73, 68, 72, 63, 66, 56, 56, 46, 31, 15, 8, 15, 18], [55, 51, 52, 56, 48, 51, 53, 47, 41, 40, 20, 34, 36, 28, 19, 20, 20, 19, 21, 19], [56, 53, 50, 40, 47, 54, 54, 49, 28, 50, 39, 40, 35, 30, 19, 26, 25, 28, 16, 21], [38, 43, 37, 41, 39, 39, 41, 40, 29, 20, 19, 20, 21, 21, 15, 12, 14, 17, 18, 11], [46, 38, 38, 33, 30, 29, 28, 22, 17, 17, 14, 12, 12, 15, 24, 18, 16, 19, 17, 15], [31, 38, 25, 27, 13, 21, 20, 19, 12, 15, 19, 24, 17, 13, 17, 20, 17, 18, 21, 16], [16, 23, 23, 27, 18, 26, 16, 15, 12, 8, 13, 22, 15, 15, 16, 18, 14, 22, 23, 22], [18, 24, 19, 25, 25, 21, 13, 12, 15, 19, 18, 23, 22, 12, 22, 16, 16, 26, 17, 20], [60, 58, 51, 66, 50, 61, 47, 51, 45, 56, 52, 50, 39, 48, 35, 36, 27, 31, 28, 25], [42, 43, 39, 37, 37, 42, 40, 29, 33, 23, 35, 29, 23, 23, 14, 21, 17, 17, 23, 21], [32, 23, 15, 21, 28, 32, 23, 25, 14, 25, 21, 20, 19, 23, 21, 18, 16, 9, 19, 13], [15, 18, 26, 24, 20, 24, 23, 18, 22, 16, 17, 20, 4, 20, 24, 18, 12, 11, 18, 12], [22, 25, 19, 18, 20, 16, 22, 26, 16, 24, 13, 19, 14, 17, 26, 17, 6, 21, 23, 18], [24, 19, 19, 26, 21, 18, 22, 17, 21, 23, 17, 19, 26, 21, 18, 24, 24, 23, 15, 23], [28, 18, 20, 29, 17, 22, 20, 16, 19, 22, 23, 19, 21, 15, 20, 11, 19, 21, 19, 21], [83, 78, 76, 78, 69, 69, 74, 77, 67, 77, 70, 70, 66, 66, 53, 52, 42, 32, 26, 23], [52, 53, 49, 49, 43, 35, 47, 42, 42, 40, 36, 37, 29, 23, 22, 19, 24, 25, 18, 19], [37, 39, 33, 34, 28, 33, 28, 27, 27, 27, 12, 24, 26, 19, 23, 20, 17, 18, 20, 14], [28, 24, 23, 28, 24, 22, 26, 26, 23, 24, 26, 26, 20, 20, 19, 22, 24, 13, 17, 20], [28, 15, 22, 23, 28, 25, 15, 25, 22, 20, 21, 20, 23, 21, 20, 27, 16, 19, 16, 19], [8, 19, 22, 25, 21, 25, 16, 21, 20, 20, 22, 26, 26, 19, 21, 14, 23, 23, 13, 16], [19, 14, 23, 25, 24, 24, 15, 26, 22, 20, 22, 22, 19, 21, 23, 22, 14, 18, 19, 21], [108, 106, 101, 101, 89, 89, 96, 101, 94, 98, 88, 90, 87, 76, 72, 69, 51, 51, 25, 21], [81, 73, 80, 81, 70, 77, 73, 64, 58, 60, 61, 52, 42, 46, 35, 28, 21, 20, 19, 15], [64, 60, 58, 61, 63, 56, 61, 52, 46, 43, 43, 23, 27, 21, 16, 23, 21, 21, 21, 11], [49, 54, 48, 58, 55, 33, 46, 48, 46, 25, 32, 27, 23, 20, 22, 18, 21, 12, 20, 13], [39, 43, 47, 37, 38, 29, 35, 32, 28, 20, 10, 16, 17, 12, 23, 13, 20, 17, 22, 22], [33, 32, 23, 34, 27, 29, 21, 16, 21, 18, 20, 14, 9, 19, 18, 22, 11, 21, 15, 20], [18, 27, 17, 24, 27, 18, 25, 24, 23, 20, 22, 16, 19, 24, 18, 21, 20, 21, 25, 16], [61, 71, 70, 72, 63, 58, 56, 54, 58, 50, 46, 50, 46, 34, 37, 28, 25, 26, 26, 25], [30, 40, 37, 38, 33, 31, 34, 31, 27, 30, 22, 22, 19, 25, 21, 21, 14, 17, 20, 25], [25, 30, 22, 26, 28, 24, 28, 24, 14, 20, 19, 19, 15, 23, 14, 18, 16, 16, 20, 18], [26, 19, 25, 22, 21, 20, 27, 16, 22, 15, 19, 18, 14, 22, 22, 22, 22, 18, 18, 22], [17, 23, 20, 20, 26, 21, 14, 23, 17, 8, 24, 21, 20, 8, 17, 20, 20, 20, 19, 24], [22, 23, 24, 23, 21, 20, 16, 27, 27, 18, 20, 18, 17, 19, 18, 14, 15, 19, 16, 19], [72, 82, 85, 83, 81, 79, 73, 68, 75, 69, 67, 69, 58, 51, 53, 46, 40, 35, 29, 25], [49, 49, 54, 52, 39, 45, 46, 37, 29, 40, 35, 28, 29, 26, 17, 23, 20, 27, 17, 20], [33, 36, 31, 33, 32, 35, 32, 35, 28, 28, 24, 23, 18, 22, 13, 19, 19, 22, 17, 19], [28, 28, 29, 27, 27, 25, 28, 21, 17, 20, 20, 24, 20, 23, 22, 19, 21, 15, 19, 22], [25, 26, 26, 22, 9, 24, 19, 20, 22, 23, 18, 14, 16, 22, 19, 26, 22, 22, 23, 21], [82, 93, 96, 100, 99, 94, 90, 83, 91, 79, 81, 80, 69, 66, 62, 54, 43, 35, 17, 21], [68, 66, 71, 61, 53, 64, 63, 57, 45, 51, 44, 40, 33, 28, 17, 25, 20, 24, 14, 16], [41, 51, 49, 50, 47, 48, 42, 39, 32, 29, 20, 23, 23, 22, 19, 20, 17, 27, 14, 12], [39, 43, 43, 37, 34, 36, 26, 26, 20, 17, 24, 21, 18, 21, 14, 11, 23, 16, 15, 23], [32, 30, 31, 26, 25, 21, 24, 23, 18, 16, 25, 25, 20, 17, 24, 24, 13, 19, 17, 23], [63, 69, 56, 66, 51, 62, 55, 47, 48, 45, 37, 37, 30, 28, 28, 23, 28, 23, 17, 25], [29, 28, 28, 34, 25, 32, 29, 28, 27, 21, 17, 20, 19, 22, 23, 19, 25, 16, 23, 21], [22, 23, 28, 28, 22, 27, 28, 20, 24, 22, 21, 23, 24, 24, 24, 25, 26, 15, 19, 27], [70, 84, 83, 83, 78, 70, 67, 64, 77, 66, 70, 66, 55, 52, 47, 35, 30, 26, 26, 25], [45, 55, 40, 47, 42, 46, 42, 36, 37, 37, 32, 22, 17, 24, 19, 14, 21, 27, 22, 18], [31, 32, 36, 34, 24, 23, 22, 19, 21, 24, 24, 20, 22, 23, 19, 15, 15, 20, 21, 21], [23, 24, 25, 29, 28, 22, 26, 22, 19, 25, 23, 22, 24, 24, 22, 23, 19, 18, 25, 23], [83, 91, 97, 98, 91, 90, 93, 89, 89, 78, 80, 76, 65, 65, 55, 41, 36, 27, 18, 22], [70, 68, 58, 58, 66, 61, 62, 53, 48, 47, 46, 33, 18, 24, 26, 20, 17, 16, 19, 16], [46, 52, 51, 47, 39, 41, 41, 27, 32, 29, 26, 22, 25, 17, 18, 19, 21, 16, 26, 24], [34, 36, 36, 36, 32, 27, 29, 23, 21, 21, 27, 17, 13, 26, 23, 19, 20, 25, 24, 18]]}"
  },
  {
    "path": "experiments/piano-partials.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"id\": \"f3feaa02\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import numpy as np\\n\",\n    \"import matplotlib.pyplot as plt\\n\",\n    \"import scipy.signal\\n\",\n    \"from smstools.models import utilFunctions as UF\\n\",\n    \"from smstools.models import hprModel as HPR\\n\",\n    \"from smstools.models import stft as STFT\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 309,\n   \"id\": \"fd2ff249\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#inputFile = '/Users/dpwe/Downloads/M1_Piano_C3.wav'\\n\",\n    \"inputFile = '/Users/dpwe/Downloads/track02-C4.wav'\\n\",\n    \"window = 'hamming'\\n\",\n    \"M = 1001\\n\",\n    \"N = 1024\\n\",\n    \"t = -100\\n\",\n    \"minSineDur = 0.1\\n\",\n    \"nH = 100\\n\",\n    \"minf0 = 100\\n\",\n    \"maxf0 = 700\\n\",\n    \"f0et = 5\\n\",\n    \"harmDevSlope = 0.1\\n\",\n    \"H = 128\\n\",\n    \"fs, x = UF.wavread(inputFile)\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 310,\n   \"id\": \"ae53fa36-c9b6-4ca8-9b56-c362209ce8fd\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"w = scipy.signal.get_window(window, M)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 311,\n   \"id\": \"8bb42fc3-622f-43b3-9175-09e1090c9bd6\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"hfreq, hmag, hphase, xr = HPR.hprModelAnal(x, fs, w, N, H, t, minSineDur, nH, minf0, maxf0, f0et, harmDevSlope)\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 317,\n   \"id\": \"a82911f6-8cf1-417c-b80a-660c5333fe5e\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"(1498, 100)\\n\",\n      \"0 26\\n\",\n      \"1 26\\n\",\n      \"2 26\\n\",\n      \"3 26\\n\",\n      \"4 26\\n\",\n      \"5 26\\n\",\n      \"6 26\\n\",\n      \"7 26\\n\",\n      \"8 26\\n\",\n      \"9 26\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"print(hmag.shape)\\n\",\n    \"for h in range(10):\\n\",\n    \"    initialzeros = 1 + min(np.flatnonzero(hmag[1:, h] != 0))\\n\",\n    \"    print(h, initialzeros)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 322,\n   \"id\": \"bc8a0b4e-d7a3-4f36-b021-1b8c69254b77\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"start_frame = 1 + min(np.flatnonzero(hmag[1:, 0] != 0))\\n\",\n    \"hfreq = hfreq[start_frame:, :]\\n\",\n    \"hmag = hmag[start_frame:, :]\\n\",\n    \"hphase = hphase[start_frame:, :]\\n\",\n    \"xr = xr[start_frame * H:]\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 323,\n   \"id\": \"821a4fe1-565b-45ef-b8b0-885065c35452\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"0.0029024943310657597\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"frmTime = H * np.arange(hfreq.shape[0]) / fs\\n\",\n    \"print(H/fs)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 324,\n   \"id\": \"472a3d5c-47c3-4009-9b1c-e02183f06587\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAv0AAAFfCAYAAADd+nNsAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzddXxcZdbA8d8djbt7U0ndUjda2tLi7g6Lw8tSWGRxWGyRRZbFFofFnQL1lrpLKmlqkcZ9kklmMnLfP24baZJqMkmT8/18bpuZufLcyMy5zz3PeRRVVVWEEEIIIYQQXZauoxsghBBCCCGEaF8S9AshhBBCCNHFSdAvhBBCCCFEFydBvxBCCCGEEF2cBP1CCCGEEEJ0cRL0CyGEEEII0cVJ0C+EEEIIIUQXZ+joBniC2+0mLy8Pf39/FEXp6OYIIYQQQghxwlRVpaqqipiYGHS6w/fld4ugPy8vj/j4+I5uhhBCCCGEEG0uJyeHuLi4w67TLYJ+f39/QPuGBAQEdHBrhBBCCCGEOHEWi4X4+Pj6WPdwukXQfzClJyAgQIJ+IYQQQgjRpRxN+roM5BVCCCGEEKKLk6BfCCGEEEKILk6CfiGEEEIIIbo4CfqFEEIIIYTo4iToF0IIIYQQoouToF8IIYQQQoguToJ+IYQQQgghujgJ+oUQQgghhOjiTpqg/8033yQpKQkvLy9Gjx7NmjVrOrpJQgghhBBCnBROiqD/q6++YtasWTz++ONs2LCBIUOGMGPGDIqKijq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HDh/Paa69hs9m49dZbT3fTVM5ArFYrhw8fbvl3bm4u2dnZxMTE0KlTp9PYMpUzkZkzZ/LFF18wf/58LBYLZWVlAERGRmIymU5z61TORB599FEuuOACOnXqRGNjI1988QWrVq1iyZIlp7tpKmcgFoulTYxRWFgYsbGxauzRr0QV/aeQa6+9lsrKSp588knKysoYOHAgixcvbhPcq6JyPGzdupWJEye2/PvBBx8EYPr06cyaNes0tUrlTOWdd94BYMKECUHLP/74Y2bMmPGfb5DKGU9FRQW33HILpaWlREZG0r9/f5YsWcKUKVNOd9NUVFRQ8/SrqKioqKioqKionPWoPv0qKioqKioqKioqZzmq6FdRUVFRUVFRUVE5y1FFv4qKioqKioqKispZjir6VVRUVFRUVFRUVM5yVNGvoqKioqKioqKicpajin4VFRUVFRUVFRWVsxxV9KuoqKioqKioqKic5aiiX0VFRUVFRUVFReUsRxX9KioqKioqKioqKmc5quhXUVFRUVFRUVFROctRRb+KioqKioqKiorKWc7/A/0VrhUCqPj/AAAAAElFTkSuQmCC\",\n      \"text/plain\": [\n       \"<Figure size 900x400 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"plt.figure(figsize=(9,4))\\n\",\n    \"\\n\",\n    \"_ = plt.plot(frmTime, hmag)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 325,\n   \"id\": \"d96eb81a-5d05-4832-968b-e35a24b92dd6\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"[-35.87356989 -35.75437815 -35.63138572 -35.59504185 -35.55262465\\n\",\n      \" -35.66215248 -35.70126739]\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAwgAAAFfCAYAAADqEetxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwg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bsmPTUU09JRqNReu655+Tv6PHMcQVBAz/5yU+kwsJCyWQySeeff7708ccfy3+75JJLpFtuuSXk+6+88oo0Z84cyWQySZWVldJf/vKXkL8HAgHp+9//vpSTkyOZzWZpzZo10okTJ2IxlRmFnus2MDAgrVu3TsrKypKSkpKkoqIi6atf/SoXMKOEmrWrra2VAEz455JLLon4mBx90HvdbrjhBik3N1cymUxSXl6edMMNN0g1NTUxnNHMQM26FRUVEddt69at8nf4Hhc79Fw7vs/FDjXrdv/990vl5eWSxWKR0tLSpKqqKunll18OOZ4ez5wgSZIUub+Bw+FwOBwOh8PhTGd4DgKHw+FwOBwOh8OR4QoCh8PhcDgcDofDkeEKAofD4XA4HA6Hw5HhCgKHw+FwOBwOh8OR4QoCh8PhcDgcDofDkeEKAofD4XA4HA6Hw5HhCgKHw+FwOBwOh8OR4QoCh8PhcDgcDofDkeEKAofD4XA4HA6Hw5HhCgKHw+FwOBwOh8OR4QoCh8PhcDgcDofDkfn/JwebZtd/F80AAAAASUVORK5CYII=\",\n      \"text/plain\": [\n       \"<Figure size 900x400 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"plt.figure(figsize=(9,4))\\n\",\n    \"nfrm = 100\\n\",\n    \"harms = np.arange(20)\\n\",\n    \"_ = plt.plot(frmTime[:nfrm], hmag[:nfrm, harms], '.')\\n\",\n    \"print(hmag[23:30, 0])\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 305,\n   \"id\": \"3f2a10ec-68ea-4a28-a108-e9e4d293662b\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"[-36.11649069 -36.10783732 -36.01133083 -35.97299792 -35.82352828\\n\",\n      \" -35.82202464 -35.76556586]\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAA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z7JysoiDoeDEELINddcQ+69917x+9u3bydKpZKsX7+eHD58mKxdu1ayzGlWVhb5xz/+Qfbv308uv/xyVgIuxaR63lwuF1mzZg3ZsWMHqaurIx9++CGZPn06qaioIF6v97Qc438ric7d4OAg2bNnD9mzZw+xWq1kzZo1ZM+ePaSmpmbU22ScPGMxb3fddRfZunUrqaurI9u3bydLly4lOTk5pL29/ZQf338ric7bk08+SdRqNXn77bcjSmG6XK6I77B33NiT6rlj77lTQ6Lz9sQTT5APPviAnDhxglRXV5P169cTpVJJXnzxRfE7qbjnmEBIghdeeIEUFRURtVpNZs+eTT777DPxb4sWLSLXXXddxPffeustUllZSdRqNZk4cSJ59913I/4uCAL52c9+RvLy8ohGoyFLliwhR48ePRWH8pUilfM2MDBAli1bRsxmM1GpVKS4uJjcfPPNzMAcIxKZu7q6OgIg5p9FixaNepuM1JDqebvqqquI1WolarWa5Ofnk6uuuoocP378FB7RV4NE5q24uFhy3tauXSt+h73jTh2pnDv2njt1JDJvDzzwABk3bhzRarXEaDSSuXPnkjfffDNie6m45zhCCBm9v4HBYDAYDAaDwWD8N8NyEBgMBoPBYDAYDIYIEwgMBoPBYDAYDAZDhAkEBoPBYDAYDAaDIcIEAoPBYDAYDAaDwRBhAoHBYDAYDAaDwWCIMIHAYDAYDAaDwWAwRJhAYDAYDAaDwWAwGCJMIDAYDAaDwWAwGAwRJhAYDAaDwWAwGAyGCBMIDAaDwWAwGAwGQ4QJBAaDwWAwGAwGgyHy/wP8HR2D2InE0QAAAABJRU5ErkJggg==\",\n      \"text/plain\": [\n       \"<Figure size 900x400 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"plt.figure(figsize=(9,4))\\n\",\n    \"nfrm = 100\\n\",\n    \"harms = np.arange(20)\\n\",\n    \"_ = plt.plot(frmTime[:nfrm], hmag[:nfrm, harms], '.')\\n\",\n    \"print(hmag[23:30, 0])\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 345,\n   \"id\": \"57027011-5416-4bc3-bef0-9380bca1cac5\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"gap pts= 13\\n\",\n      \"1 5 -95.6759394757419 -67.29312852125533 [-95.67593948 -89.99937728 -84.32281509 -78.6462529  -72.96969071\\n\",\n      \" -67.29312852]\\n\",\n      \"14 15 -63.08312297032608 -63.64564259062086 [-63.08312297 -63.36438278 -63.64564259]\\n\",\n      \"385 386 -84.14279598769993 -84.86145226400278 [-84.14279599 -84.50212413 -84.86145226]\\n\",\n      \"539 540 -93.16739575413963 -92.96213625036776 [-93.16739575 -93.064766   -92.96213625]\\n\",\n      \"543 544 -92.84918199222236 -92.84107881666823 [-92.84918199 -92.8451304  -92.84107882]\\n\",\n      \"601 602 -96.02129230774719 -94.59367647879212 [-96.02129231 -95.30748439 -94.59367648]\\n\",\n      \"614 615 -97.03655381632625 -96.27676149098369 [-97.03655382 -96.65665765 -96.27676149]\\n\",\n      \"618 619 -96.49443157880766 -95.49824232942824 [-96.49443158 -95.99633695 -95.49824233]\\n\",\n      \"622 623 -96.0680696584656 -96.3327623756881 [-96.06806966 -96.20041602 -96.33276238]\\n\",\n      \"676 677 -96.6318706913761 -96.58321217258334 [-96.63187069 -96.60754143 -96.58321217]\\n\"\n     ]\n    },\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAioAAAGdCAYAAAA8F1jjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA0BElEQVR4nO3dfXBUVZ7/8U8nIZ2ApAMkIQHCQ0BlQXQEEYOMzCKCuzzI4jrsOsODqzhqHMVFluADjMxKUEZW13EWZkYiVG0JWsPK04hGwUdQKBEFRg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11oQeM53fa6bNmyxZJkffXVV84U7SC32v/1119bnTt3tnbu3Gl169bNyKDiRtsnTJhg/fznP3enYIe50f6+fftac+fODTmmf//+1sMPP+xg5U0XadvPVd9/z005ZzS50fbzHTlyxJJkvf32200p1RVutf/YsWPWxRdfbJWUlFhDhw6NWlBpEUM/p06d0kcffaThw4cHX0tISNDw4cO1efPmOr9n8+bNIcdL0siRI4PHl5aWqry8POQYn8+nQYMG1XvOWHCj7XXx+/3yeDxKT093pG6nuNX+6upqTZw4UTNmzFDfvn3dKb6J3Gh7dXW11q1bp0suuUQjR45UVlaWBg0apFdeecW1djSWW7/7wYMHa/Xq1Tp06JAsy9LGjRu1Z88ejRgxwp2GNEJj2h6Lc7ohWnX6/X5JUvv27R07pxPcbH9BQYFGjRp1wf8jbmsRQaWyslJnz55Vx44dQ17v2LGjysvL6/ye8vLysMfXfo3knLHgRtvP97e//U0zZ87Uv/7rvxq3mZdb7X/iiSeUlJSk++67z/miHeJG248cOaLjx49r/vz5uvHGG/X666/rn/7pnzR+/Hi9/fbb7jSkkdz63T/77LPq06ePunTpouTkZN1444167rnndN111znfiEZqTNtjcU43RKPO6upqTZs2Tddee60uu+wyR87pFLfav3z5cm3btk1FRUVNLTFicb97MmLr9OnT+ulPfyrLsvQ///M/sS4nKj766CM988wz2rZtmzweT6zLiarq6mpJ0k033aQHHnhAkvSjH/1ImzZt0qJFizR06NBYlhcVzz77rD744AOtXr1a3bp10zvvvKOCggJ16tQp6v/SRGwUFBRo586deu+992JdSlQcPHhQ999/v0pKSpSSkhL1n98ielQyMjKUmJioioqKkNcrKiqUnZ1d5/dkZ2eHPb72ayTnjAU32l6rNqR89dVXKikpMa43RXKn/e+++66OHDmirl27KikpSUlJSfrqq680ffp0de/e3ZV2NIYbbc/IyFBSUpL69OkTcszf/d3fGXfXjxvtP3nypB566CEtXLhQY8aM0eWXX657771XEyZM0G9+8xt3GtIIjWl7LM7pBrfrvPfee7V27Vpt3LhRXbp0afL5nOZG+z/66CMdOXJE/fv3D/7Ne/vtt/Xf//3fSkpK0tmzZ50ovV4tIqgkJydrwIABevPNN4OvVVdX680331R+fn6d35Ofnx9yvCSVlJQEj+/Ro4eys7NDjgkEAvrwww/rPWcsuNF26YeQsnfvXr3xxhvq0KGDOw1oIjfaP3HiRH366afavn178NGpUyfNmDFDr732mnuNiZAbbU9OTtbAgQMvuC1zz5496tatm8MtaBo32n/69GmdPn1aCQmhfzoTExODvU0maEzbY3FON7hVp2VZuvfee/V///d/2rBhg3r06OFEuY5zo/3XX3+9duzYEfI376qrrtLPfvYzbd++XYmJiU6VX7eoTNk1wPLlyy2v12u98MIL1l/+8hfrzjvvtNLT063y8nLLsixr4sSJVmFhYfD4999/30pKSrJ+85vfWJ999pk1Z86cOm9PTk9Pt1atWmV9+umn1k033WTs7clOtv3UqVPW2LFjrS5duljbt2+3ysrKgo+qqqqYtDEcN3735zP1rh832r5y5UqrVatW1u9//3tr79691rPPPmslJiZa7777btTb1xA32j906FCrb9++1saNG60vv/zSKi4utlJSUqzf/e53UW9fOJG2vaqqyvr444+tjz/+2MrJybEefPBB6+OPP7b27t1r+5ymcKPtd999t+Xz+ay33nor5G/eiRMnot6+hrjR/vNF866fFhNULMuynn32Watr165WcnKydfXVV1sffPBB8L2hQ4dakydPDjn+pZdesi655BIrOTnZ6tu3r7Vu3bqQ96urq61HH33U6tixo+X1eq3rr7/e+vzzz6PRlIg52fbS0lJLUp2PjRs3RqlFkXH6d38+U4OKZbnT9ueff97q1auXlZKSYl1xxRXWK6+84nYzGs3p9peVlVlTpkyxOnXqZKWkpFiXXnqp9dRTT1nV1dXRaE5EIml7ff9fDx061PY5TeJ02+v7m1dcXBy9RkXAjd/9uaIZVDyWZVnu9tkAAAA0TouYowIAAOITQQUAABiLoAIAAIxFUAEAAMYiqAAAAGMRVAAAgLEIKgAAwFgEFQAAYCyCCgAAMBZBBQAAGIugAgAAjEVQAQAAxvp/eBSgNMmyK3sAAAAASUVORK5CYII=\",\n      \"text/plain\": [\n       \"<Figure size 640x480 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"def lin_fit(x):\\n\",\n    \"    \\\"\\\"\\\"Least-squares linear fit to points.\\\"\\\"\\\"\\n\",\n    \"    # xhat = a + b.index\\n\",\n    \"    # err = x[i] - (a + b.i)\\n\",\n    \"    # err^2 = x[i]^2 - 2 x[i] (a + b.i) + (a^2 + 2 a b i +b^2 i^2)\\n\",\n    \"    # Define axes around midpoint.\\n\",\n    \"    lenx = len(x)\\n\",\n    \"    if not lenx:\\n\",\n    \"        return []\\n\",\n    \"    index = np.arange(lenx) - (lenx - 1) / 2\\n\",\n    \"    # Make x zero mean\\n\",\n    \"    a = np.mean(x)\\n\",\n    \"    x_z = x - a\\n\",\n    \"    b = 0\\n\",\n    \"    if lenx > 1:\\n\",\n    \"        # Linear fit is normalized inner product\\n\",\n    \"        b = np.sum(x_z * index) / np.sum(index * index)\\n\",\n    \"    return a + b * index\\n\",\n    \"\\n\",\n    \"def fit_2_segs(x):\\n\",\n    \"    \\\"\\\"\\\"Fit x with 2 linear segments, searching all divisions.\\\"\\\"\\\"\\n\",\n    \"    # Try every poss division of remainder.\\n\",\n    \"    besterr = np.sum(np.abs(x))\\n\",\n    \"    besterrpt = 0\\n\",\n    \"    bestxhat = []\\n\",\n    \"    bestseg1 = []\\n\",\n    \"    bestseg2 = []\\n\",\n    \"    for divpt in np.arange(0, len(x)):\\n\",\n    \"        seg1 = lin_fit(x[:divpt + 1])\\n\",\n    \"        seg2 = lin_fit(x[divpt:])\\n\",\n    \"        xhat = np.hstack([seg1[:-1], seg2])\\n\",\n    \"        abserr = np.sum(np.abs(xhat - x))\\n\",\n    \"        if abserr < besterr:\\n\",\n    \"            besterr = abserr\\n\",\n    \"            besterrpt = divpt\\n\",\n    \"            bestseg1 = seg1\\n\",\n    \"            bestseg2 = seg2\\n\",\n    \"            bestxhat = xhat\\n\",\n    \"    # Parameterization is [value, interval, value interval, value...]\\n\",\n    \"    parameters = [bestseg1[0], len(bestseg1), 0.5 * (bestseg1[-1] + bestseg2[0]), len(bestseg2), bestseg2[-1]]\\n\",\n    \"    #print(bestseg1, bestseg2, parameters)\\n\",\n    \"    #print(\\\"parameters=\\\", parameters)\\n\",\n    \"    return bestxhat, parameters\\n\",\n    \"\\n\",\n    \"def expand_params(params):\\n\",\n    \"    \\\"\\\"\\\"Convert [val, npts, val, npts, val] sequence to points.\\\"\\\"\\\"\\n\",\n    \"    val0 = params[0]\\n\",\n    \"    outpts = [[val0]]\\n\",\n    \"    npts_val_pairs = np.vstack([params[1::2], params[2::2]])\\n\",\n    \"    for npts, val in npts_val_pairs.transpose():\\n\",\n    \"        outpts.append(np.linspace(val0, val, int(npts))[1:])\\n\",\n    \"        val0 = val\\n\",\n    \"    return np.concatenate(outpts)\\n\",\n    \"                    \\n\",\n    \"\\n\",\n    \"def median(x):\\n\",\n    \"    npts2 = (len(x) - 1) // 2\\n\",\n    \"    return np.sort(x)[npts2]\\n\",\n    \"\\n\",\n    \"def median_filter(x, npts):\\n\",\n    \"    npts2 = (npts - 1) // 2\\n\",\n    \"    padded_x = np.hstack([x[0] * np.ones(npts2), x, x[-1] * np.ones(npts2)])\\n\",\n    \"    y = np.zeros_like(x)\\n\",\n    \"    for i in range(len(x)):\\n\",\n    \"        y[i] = median(padded_x[i : i + npts])\\n\",\n    \"    return y\\n\",\n    \"\\n\",\n    \"def linseg_fit(x):\\n\",\n    \"    \\\"\\\"\\\"Approximate sequence x as a set of line segments.\\\"\\\"\\\"\\n\",\n    \"    # Start with onset slope\\n\",\n    \"    maxpt = np.argmax(x)\\n\",\n    \"    #print(\\\"maxpt=\\\", maxpt)\\n\",\n    \"    initial, i_params = fit_2_segs(x[:maxpt + 1])\\n\",\n    \"    tail, t_params = fit_2_segs(x[maxpt:])\\n\",\n    \"    params = i_params[:-1] + [0.5 * (i_params[-1] + t_params[0])] + t_params[1:]\\n\",\n    \"    #print(initial.shape, tail.shape)\\n\",\n    \"    #print(params)\\n\",\n    \"    return np.hstack([initial, tail[1:]]), expand_params(params), params\\n\",\n    \"\\n\",\n    \"def fill_gaps(x):\\n\",\n    \"    \\\"\\\"\\\"Bridge parts of x that are nan with linear interpolation.\\\"\\\"\\\"\\n\",\n    \"    gaps = np.isnan(x)\\n\",\n    \"    x_out = np.array(x)\\n\",\n    \"    gap_starts = np.flatnonzero(np.logical_and(gaps, np.hstack([[1], 1 - gaps[:-1]])))\\n\",\n    \"    gap_ends = np.flatnonzero(np.logical_and(1 - np.hstack([gaps, [0]]), np.hstack([[0], gaps])))\\n\",\n    \"    #print(gap_starts, gap_ends)\\n\",\n    \"    for gap_start, gap_end in zip(gap_starts, gap_ends):\\n\",\n    \"        if gap_start == 0:\\n\",\n    \"            start_val = x[gap_end]\\n\",\n    \"        else:\\n\",\n    \"            start_val = x[gap_start - 1]\\n\",\n    \"        if gap_end == len(x):\\n\",\n    \"            end_val = x[gap_start - 1]\\n\",\n    \"        else:\\n\",\n    \"            end_val = x[gap_end]\\n\",\n    \"        fill = np.linspace(start_val, end_val, gap_end - gap_start + 2)\\n\",\n    \"        print(gap_start, gap_end, start_val, end_val, fill)\\n\",\n    \"        x_out[gap_start:gap_end] = fill[1:-1]\\n\",\n    \"    return x_out\\n\",\n    \"    \\n\",\n    \"def mend_gaps(x, threshold=2, filter_len=9):\\n\",\n    \"    \\\"\\\"\\\"Interpolate portions of x that are too wide.\\\"\\\"\\\"\\n\",\n    \"    gaps = np.flatnonzero(np.isnan(x))\\n\",\n    \"    x_patched = fill_gaps(x)\\n\",\n    \"    smoothed = median_filter(x_patched, filter_len)\\n\",\n    \"    delta = np.abs(x_patched - smoothed)\\n\",\n    \"    x_patched[np.flatnonzero(delta > threshold)] = np.nan\\n\",\n    \"    x_patched[gaps] = np.nan\\n\",\n    \"    print(\\\"gap pts=\\\", np.sum(np.isnan(x_patched)))\\n\",\n    \"    return fill_gaps(x_patched)\\n\",\n    \"    #return smoothed\\n\",\n    \"\\n\",\n    \"hnum = 10\\n\",\n    \"analysis_time = 2.0\\n\",\n    \"nfrm = int(analysis_time * fs/H)  # ~300 analysis_time\\n\",\n    \"hh = np.array(hmag[:nfrm, hnum])\\n\",\n    \"hh[np.flatnonzero(hh == 0)] = np.nan\\n\",\n    \"#hh = median_filter(hh, 3)\\n\",\n    \"\\n\",\n    \"npts = 50\\n\",\n    \"_ = plt.plot(frmTime[:npts], hh[:npts] + 2, '.', frmTime[:npts], mend_gaps(hh)[:npts], '.')\\n\",\n    \"\\n\",\n    \"if False:\\n\",\n    \"    xhat, xhat2, params = linseg_fit(median_filter(hh, 5))\\n\",\n    \"    #print(xhat.shape, xhat2.shape)\\n\",\n    \"    \\n\",\n    \"    plt.figure(figsize=(9, 4))\\n\",\n    \"    _ = plt.plot(frmTime[:nfrm], hh, '.', frmTime[:nfrm], xhat, '.', frmTime[:nfrm], xhat2, '.')\\n\",\n    \"    print(np.sum(np.isnan(hh)))\\n\",\n    \"    maxval = np.max(hh[np.flatnonzero(np.isnan(hh) == 0)])\\n\",\n    \"    print(maxval)\\n\",\n    \"    plt.ylim([maxval - 25, maxval + 5])\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 277,\n   \"id\": \"bb7428f9-e060-4f41-8ad1-4b8ab43a578e\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"nan\\n\",\n      \"0 1 1.0 1.0 [1. 1. 1.]\\n\",\n      \"2 4 1.0 4.0 [1. 2. 3. 4.]\\n\",\n      \"7 8 6.0 8.0 [6. 7. 8.]\\n\",\n      \"9 10 8.0 8.0 [8. 8. 8.]\\n\",\n      \"[1. 1. 2. 3. 4. 5. 6. 7. 8. 8.]\\n\",\n      \"[1.] [4. 5.]\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"x = np.arange(10, dtype=np.float32)\\n\",\n    \"x[2] = np.nan\\n\",\n    \"x[3] = np.nan\\n\",\n    \"x[7] = np.nan\\n\",\n    \"x[9] = np.nan\\n\",\n    \"x[0] = np.nan\\n\",\n    \"print(x[-1])\\n\",\n    \"print(fill_gaps(x))\\n\",\n    \"print(x[1:2], x[4:6])\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 356,\n   \"id\": \"7eeb6d86-52bf-4467-b4b5-13ca96243bbb\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\": \"stdout\",\n     \"output_type\": \"stream\",\n     \"text\": [\n      \"[ 100.          316.22776602 1000.        ]\\n\",\n      \"h 1 [[0, 0.03646117968209008], (17, 1.4790503289019412), (116, 1.7464818747653081), (1364, 0.32805053827525693), (511, 0.1609264966801982), (2207, 0.0009999999999999998)]\\n\",\n      \"h 2 [[0, 0.0012634508047348386], (9, 0.21596971199840045), (32, 2.404807458377003), (729, 0.5502459191358052), (1239, 0.03756845077976835), (1575, 0.0009999999999999998)]\\n\",\n      \"h 3 [[0, 0.01254349241718219], (15, 0.15099185596710532), (26, 0.3421051478156847), (804, 0.051061292632147516), (1164, 0.0047740936634367475), (679, 0.0009999999999999998)]\\n\",\n      \"h 4 [[0, 0.004250878808238577], (9, 0.057457146712061244), (32, 0.5554119700653773), (1434, 0.018122634597003563), (534, 0.025025024003812353), (1398, 0.0009999999999999998)]\\n\",\n      \"h 5 [[0, 0.0009999999999999998], (6, 0.01816626570185348), (20, 0.08438815335232426), (624, 0.006071196966144399), (1358, 0.002903916392093575), (463, 0.0009999999999999998)]\\n\",\n      \"h 6 [[0, 0.002161710338513421], (12, 0.15650724904503518), (20, 0.5925248800917347), (1245, 0.011559939842952675), (731, 0.015835095979827792), (1200, 0.0009999999999999998)]\\n\",\n      \"h 7 [[0, 0.0023404483051654946], (15, 0.08542249910042937), (17, 0.1666895668496017), (853, 0.0021358280107708454), (1123, 0.0033970486787507984), (531, 0.0009999999999999998)]\\n\",\n      \"h 8 [[0, 0.0020843732849860934], (17, 0.12346736808924237), (29, 0.18170621956830013), (1016, 0.010201883691495973), (946, 0.005236696363962163), (719, 0.0009999999999999998)]\\n\",\n      \"h 9 [[0, 0.0030655166217990527], (17, 0.13600540298075547), (64, 0.1831798098530581), (641, 0.014173570743211048), (1286, 0.0019437161448920615), (289, 0.0009999999999999998)]\\n\",\n      \"h 10 [[0, 0.00479559610080011], (29, 0.06072650347041644), (61, 0.0798317372027684), (816, 0.0046354272307415414), (1103, 0.003714921017812922), (570, 0.0009999999999999998)]\\n\",\n      \"h 11 [[0, 0.002712805431040445], (20, 0.058009604750650895), (17, 0.07063250568468678), (746, 0.008931881841216528), (1225, 0.001201477179802048), (80, 0.0009999999999999998)]\\n\",\n      \"h 12 [[0, 0.0011411701775337058], (9, 0.01821003171882191), (20, 0.07124145242041195), (795, 0.006330355307626967), (1184, 0.002254072162494906), (353, 0.0009999999999999998)]\\n\",\n      \"h 13 [[0, 0.0012512680959778542], (9, 0.012546514343345075), (9, 0.01494232149421479), (746, 0.0020352720499251602), (1245, 0.0021786470499486742), (338, 0.0009999999999999998)]\\n\",\n      \"h 14 [[0, 0.0009952115977475834], (12, 0.022746594188342958), (110, 0.03291419108007345), (139, 0.006637951769233443), (1747, 0.0007961189128058337)]\\n\",\n      \"h 15 [[0, 0.0008774321388499404], (12, 0.010222851979210086), (20, 0.013301383595068267), (572, 0.0028869457800665983), (1405, 0.0008797187781985485)]\\n\",\n      \"h 16 [[0, 0.0009241395135334805], (12, 0.017513958907860068), (9, 0.006637052937096589), (853, 0.00367677018607421), (1135, 0.0010606068054344045), (26, 0.0009999999999999998)]\\n\",\n      \"h 17 [[0, 0.0009050618790137055], (15, 0.029306767939208236), (23, 0.01078682206955967), (827, 0.003994973109065478), (1144, 0.0009003742241215998)]\\n\",\n      \"h 18 [[0, 0.0012493200902472551], (26, 0.01674550900239793), (29, 0.01147113903438373), (232, 0.0032622576962070475), (1721, 0.00103090043200766), (13, 0.0009999999999999998)]\\n\",\n      \"h 19 [[0, 0.001157202173287927], (17, 0.024463638969512314), (17, 0.027302180375823496), (906, 0.0012095650014134092), (1068, 0.0008644430911523587)]\\n\",\n      \"h 20 [[0, 0.0029782923681902418], (223, 0.0026139493226257425), (168, 0.0015766931903501277), (842, 0.0011388221206957768), (775, 0.0009999999999999998)]\\n\"\n     ]\n    }\n   ],\n   \"source\": [\n    \"# Convert sinusoids into bp sets\\n\",\n    \"\\n\",\n    \"SCALEUP = 100.0\\n\",\n    \"\\n\",\n    \"def lin_of_db(dbval):\\n\",\n    \"    return SCALEUP * np.exp(np.log(10) * dbval / 20.0)\\n\",\n    \"\\n\",\n    \"def db_of_lin(linval):\\n\",\n    \"    return 20.0 * np.log10(linval / SCALEUP)\\n\",\n    \"\\n\",\n    \"print(lin_of_db(np.array([0, 10 ,20])))\\n\",\n    \"\\n\",\n    \"analysis_time = 2.0\\n\",\n    \"dt = H / fs\\n\",\n    \"nfrm = int(analysis_time / dt)  # 300 * analysis_time\\n\",\n    \"\\n\",\n    \"harms_params = {}\\n\",\n    \"\\n\",\n    \"max_harmonic = 20\\n\",\n    \"\\n\",\n    \"for hnum in range(max_harmonic):\\n\",\n    \"    x = hmag[:nfrm, hnum]\\n\",\n    \"    x[np.flatnonzero(x == 0)] = np.nan\\n\",\n    \"    xhat, xhat2, params = linseg_fit(median_filter(x, 5))\\n\",\n    \"    #print(xhat.shape, xhat2.shape)\\n\",\n    \"    val0 = params[0]\\n\",\n    \"    nvals = zip(params[1::2], params[2::2])\\n\",\n    \"    bp_list = [[0, lin_of_db(params[0])]] + [(int(round(n * dt * 1000)), lin_of_db(val)) for n, val in nvals]\\n\",\n    \"    last_time, last_mag = bp_list[-1]\\n\",\n    \"    last_mag_db = db_of_lin(last_mag)\\n\",\n    \"    final_mag_db = -100.0\\n\",\n    \"    if last_mag_db > final_mag_db:\\n\",\n    \"        terminal_slope = 20.0  # -db/sec\\n\",\n    \"        final_dur = (last_mag_db - final_mag_db) / terminal_slope\\n\",\n    \"        bp_list.append((int(round(1000*final_dur)), lin_of_db(final_mag_db)))\\n\",\n    \"    print(\\\"h\\\", hnum + 1, bp_list)\\n\",\n    \"    harms_params[hnum + 1] = bp_list\\n\",\n    \"    \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 362,\n   \"id\": \"2cdc7dde-c1a7-4d84-82cb-0d2af75e130d\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAABM4AAAH/CAYAAACvl5H6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeViU5ffH8fczw44wIiCgLO67pmIqmvuCWqmZbVZmmUuZlmuaX5fqV5aaS2amaS5lpamZlbu4pbjvu6IIyOKCgrLDPL8/BlCUZYCBQTmv6+IqZu7nmTMtV9Nnzn0fRVVVFSGEEEIIIYQQQgghRBYacxcghBBCCCGEEEIIIURJJMGZEEIIIYQQQgghhBDZkOBMCCGEEEIIIYQQQohsSHAmhBBCCCGEEEIIIUQ2JDgTQgghhBBCCCGEECIbEpwJIYQQQgghhBBCCJENCc6EEEIIIYQQQgghhMiGBGdCCCGEEEIIIYQQQmRDgjMhhBBCCCGEEEIIIbIhwZkQQgghhBBCCCGEENkwa3DWvXt3vL29sbGxwcPDgzfffJPw8PAsa06cOEGrVq2wsbHBy8uLqVOnmqlaIYQQQgghhBBCCFGamDU4a9euHStXruT8+fOsXr2aoKAgevfunfl8bGwsnTt3xsfHh8OHDzNt2jQmT57MggULzFi1EEIIIYQQQgghhCgNFFVVVXMXkWHdunX07NmTpKQkLC0tmTdvHuPHjycyMhIrKysAxo4dy9q1azl37pyZqxVCCCGEEEIIIYQQTzILcxeQITo6muXLl9OiRQssLS0BCAwMpHXr1pmhGYC/vz9ff/01t2/fxsnJKdt7JSUlkZSUlPm7Xq8nOjoaZ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drUeUDXsnntZaypYOlHDmA//+97+57777WL58OTt27GDUqFFkZWVRUlLisf2XX37J9ddfzy233MI333zDwoULWbhwIXv27DnPIz87ujpfgNDQUAoLC52vEydOnMcRnz1Wq5VRo0bxl7/8xaf2x44dY/78+cyaNYucnByWLl3KrbfeyurVq8/xSHuOrs65hYMHD7rYOCYm5hyNsOdYv349d911F1999RXZ2dk0NTUxb948rFar12N68/17NvOF3nv/JiYm8uijj7J9+3a2bdvGxRdfzJVXXsnevXs9tu/Ntm2hq3OG3mvftmzdupXnn3+ekSNHdtiuL9hY8e3hbNZDinNLZ2uYxx57jKeffprnnnuOLVu2EBQURFZWFvX19c42N9xwA3v37iU7O5sPP/yQDRs2cPvttzv3V1VVMW/ePPr378/27dt5/PHH+c1vfsMLL7xwzuf3XcCXtcq9997LBx98wFtvvcX69espKCjg6quvdu632+3Mnz+fxsZGvvzyS1555RVWrFjBgw8+6GzTF9bs32Y6W48oG/Y+vK21lC2bkYpOmThxorzrrruc7+12u0xISJCPPPKIx/Y/+MEP5Pz58122TZo0Sd5xxx3ndJw9RVfn+/LLL0uLxXKeRnfuAOS7777bYZtf/OIXctiwYS7brr32WpmVlXUOR3bu8GXO69atk4AsLy8/L2M6l5SUlEhArl+/3mub3n7/tsWX+faV+7eF8PBw+eKLL3rc15ds25aO5twX7FtdXS0HDRoks7Oz5UUXXSTvuecer237qo0VF4aurocU55f2axhd12VcXJx8/PHHndsqKiqkyWSSb7zxhpRSyn379klAbt261dnmk08+kUIIeerUKSmllH/9619leHi4bGhocLZ54IEHZHp6+jme0XeT9muViooK6efnJ9966y1nm/3790tAbt68WUop5ccffyw1TZNFRUXONn/7299kaGio0259bc3eG2hZjygb9j68rbWULVtRHmed0NjYyPbt25kzZ45zm6ZpzJkzh82bN3s8ZvPmzS7tAbKysry2/zZxNvMFqKmpoX///iQlJXXq/dCb6c227S6jR48mPj6euXPn8sUXX1zo4ZwVlZWVAERERHht05ds7Mt8oW/cv3a7nTfffBOr1UpmZqbH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DppvC2cz3/bY7XZ2795NfHz8uRrmBaM327YnycnJ6RX2lVJy99138+6777J27VpSUlI6PaY32/hs5tue3n7/6rpOQ0ODx3292bYd0dGc29Ob7Dt79mx2795NTk6O8zV+/HhuuOEGcnJyMBgMbsf0VRsrzj89sR5SnF9SUlKIi4tzsVlVVRVbtmxx2iwzM5OKigq2b9/ubLN27Vp0XWfSpEnONhs2bKCpqcnZJjs7m/T0dMLDw8/TbPouna1Vxo0bh5+fn4sdDx48SF5enosdd+/e7SKCZmdnExoa6vS+Vr8Pzj8t6xFlw95DZ2ut8ePHK1u2cIGLE/QK3nzzTWkymeSKFSvkvn375O233y7DwsKclSMWLVokly1b5mz/xRdfSKPRKP/0pz/J/fv3y+XLl0s/Pz+5e/fuCzWFLtHV+T700ENy9erV8ujRo3L79u3yuuuuk2azWe7du/dCTcFnqqur5TfffCO/+eYbCcgnnnhCfvPNN/LEiRNSSimXLVsmFy1a5Gyfm5srAwMD5c9//nO5f/9++Ze//EUaDAa5atWqCzWFLtPVOT/55JPyvffek4cPH5a7d++W99xzj9Q0TX766acXago+c+edd0qLxSI///xzWVhY6HzV1tY62/Sl+/ds5tub799ly5bJ9evXy2PHjsldu3bJZcuWSSGEXLNmjZSyb9m2ha7OuTfb1xPtq2r2RRsrvj10th5SnH86W8M8+uijMiwsTL7//vty165d8sorr5QpKSmyrq7O2ccll1wix4wZI7ds2SI3bdokBw0aJK+//nrn/oqKChkbGysXLVok9+zZI998800ZGBgon3/++fM+376IL2uVJUuWyOTkZLl27Vq5bds2mZmZKTMzM537bTabHD58uJw3b57MycmRq1atktHR0fKXv/yls01fWLN/m+lsPaJs2Htpv9ZStnSghDMfeeaZZ2RycrL09/eXEydOlF999ZVz30UXXSQXL17s0v4///mPHDx4sPT395fDhg2TH3300XkecffoynyXLl3qbBsbGysvu+wyuWPHjgsw6q6zbt06Cbi9Wua3ePFiedFFF7kdM3r0aOnv7y9TU1Plyy+/fN7H3R26Ouc//vGPMi0tTZrNZhkRESFnzpwp165de2EG30U8zRNwsVlfun/PZr69+f69+eabZf/+/aW/v7+Mjo6Ws2fPdi7YpOxbtm2hq3Puzfb1RPvFXF+0seLbRUfrIcX5p7M1jK7r8te//rWMjY2VJpNJzp49Wx48eNCljzNnzsjrr79eBgcHy9DQUPnjH/9YVldXu7TZuXOnnDZtmjSZTLJfv37y0UcfPV9T7PP4slapq6uTP/nJT2R4eLgMDAyUV111lSwsLHTp5/jx4/LSSy+VAQEBMioqSt5///2yqanJpU1vX7N/m+lsPaJs2Htpv9ZStnQgpJTy3Pq0KRQKhUKhUCgUCoVCoVAoFL0PleNMoVAoFAqFQqFQKBQKhUKh8IASzhQKhUKhUCgUCoVCoVAoFAoPKOFMoVAoFAqFQqFQKBQKhUKh8IASzhQKhUKhUCgUCoVCoVAoFAoPKOFMoVAoFAqFQqFQKBQKhUKh8IASzhQKhUKhUCgUCoVCoVAoFAoPKOFMoVAoFAqFQqFQKBQKhUKh8IASzhQKhUKhUCgUCoVCoVAoFAoPKOFMoVAoFAqFQqFQKBQKhUKh8IASzhQKhUKhUCgUCoVCoVAoFAoPKOFMoVAoFAqFQqFQKBQKhUKh8IASzhQKhUKhUCgUCoVCoVAoFAoP/H++RBqezZlWHgAAAABJRU5ErkJggg==\",\n      \"text/plain\": [\n       \"<Figure size 1500x600 with 2 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"plt.figure(figsize=(15, 6))\\n\",\n    \"plt.subplot(1,2,1)\\n\",\n    \"nfrm = int(2 * analysis_time / dt)  # 300 * analysis_time\\n\",\n    \"harms = np.arange(20)\\n\",\n    \"_ = plt.plot(frmTime[:nfrm], hmag[:nfrm, harms], '.')\\n\",\n    \"plt.ylim([-100, -30])\\n\",\n    \"\\n\",\n    \"plt.subplot(1,2,2)\\n\",\n    \"for i in range(len(harms_params)):\\n\",\n    \"    hnum = i + 1\\n\",\n    \"    times, vals = zip(*np.array(harms_params[hnum]))\\n\",\n    \"    times = np.cumsum(times)\\n\",\n    \"    vals = np.array(vals)\\n\",\n    \"    plt.plot(times, db_of_lin(vals))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 358,\n   \"id\": \"f6f120e8-d3a0-4aec-bc41-8f7dcfd012b2\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import json\\n\",\n    \"params_file = 'track02-C4-bps.json'\\n\",\n    \"with open(params_file, 'w') as f:\\n\",\n    \"    f.write(json.dumps(harms_params))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 360,\n   \"id\": \"57ac32b2-5880-4084-8318-2de9542e691b\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#UF.wavwrite(SCALEUP * xr, fs, 'track02-C4-resid.wav')\\n\",\n    \"UF.wavwrite(xr, fs, 'track02-C4-resid.wav')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 401,\n   \"id\": \"7edbbbfd-0016-4319-802a-bac7d9c2e9bc\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Look at frequencies of harmonics - are they slightly inharmonic?\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 384,\n   \"id\": \"8222c865-0ca9-4757-9d99-e301809ce839\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"text/plain\": [\n       \"<matplotlib.legend.Legend at 0x128310d10>\"\n      ]\n     },\n     \"execution_count\": 384,\n     \"metadata\": {},\n     \"output_type\": \"execute_result\"\n    },\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAigAAAGiCAYAAADNzj2mAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAADEFElEQVR4nOy9d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NmzeLo0ePirKyMrFgwQKhUCjEV1995aki2DRv3jyhUqnEzp07RU1Njf7R1NSkT+Ptn0FnyuhNn8MlS5aIoqIiUVlZKQ4dOiSWLFkiJEkSX375pRDC+6+fEI6X0ZuunzWmo3jkcB27XYAihBCvvfaaSEhIEH5+fmL06NFi3759+tduu+02MWfOHKP0H330kRg0aJDw8/MTw4YNE5999pmbc+wYR8qXl5enTxsdHS3uuusuUVJS4oFc26d9WK3po71Mc+bMEbfddpvZPiNGjBB+fn5iwIABYt26dW7Pt70cLd9f/vIXkZycLAICAkRERITIzMwUhYWFnsm8HSyVDYDRNfH2z6AzZfSmz+GDDz4oEhMThZ+fn+jTp4+YMGGC/sYthPdfPyEcL6M3XT9rTAMUOVxHSQghXFc/Q0REROS4btUHhYiIiLwDAxQiIiKSHQYoREREJDsMUIiIiEh2GKAQERGR7DBAISIiItlhgEJERESywwCFiIiIZIcBChEREckOAxQiIiKSHQYoREREJDv/H+Ga6NaFIxDpAAAAAElFTkSuQmCC\",\n      \"text/plain\": [\n       \"<Figure size 640x480 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"nharms = 12\\n\",\n    \"_ = plt.plot(frmTime[:nfrm], hfreq[:nfrm, np.arange(nharms)] / (np.arange(nharms) + 1)[np.newaxis, :], '.')\\n\",\n    \"plt.ylim([240, 275])\\n\",\n    \"plt.legend(np.arange(nharms) + 1)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 400,\n   \"id\": \"ac358412-131d-43df-a5d4-1c4f2ebdf63c\",\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"data\": {\n      \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAjUAAAGdCAYAAADqsoKGAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWX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IwMSkpKGDRokG1du3btaNmyJenp6RW+p7i4mLy8PLuXiIhIXRMe6EviqE54WszbKRdDR032dxkT3ZJNT/fn3Um3sunp/i4TaBxV7Y7CVquVqVOn0rdvXzp27AjA999/D8DMmTN54YUX6Nq1K4sWLWLgwIFkZmZy4403kpOTQ2hoqH0RDRoQHBxMTk5OhcfKycnB29uboKAgu/XNmzev9D2JiYnMmjWruqcnIiJyzYyJbknMTc04cKqA1k0b1UoH3vBAX7frGPxz1b5TExcXR2ZmJkuWLLGts1qtADz66KM8/PDDdOvWjZdeeom2bdsyf/78q6/WAdOnTyc3N9f2Onz48DU9voiIiCPCA33p3SbE7YNHbarWnZr4+HhbB98WLVrY1oeHhwPQoUMHu/bt27fn0KFDAISFhXHixAm77aWlpZw+fZqwsLAKjxcWFsb58+c5c+aM3d2a48ePV/oeHx8ffHx8HD43ERERcU0O3akxDIP4+HhWrlxJamoqUVFRdttbt25NREREuce8v/32W1q1agVA7969OXPmDBkZGbbtqampWK1WevXqVeFxe/TogZeXF+vWrbOty8rK4tChQ/Tu3duRUxARERE35dCdmri4OJKTk1m1ahX+/v62/iyBgYH4+vpisVh48sknmTFjBl26dKFr1668/fbb7Nmzh+XLlwPmXZshQ4YwadIkXn/9dUpKSoiPj+f++++3Pfl09OhRBg4cyKJFi+jZsyeBgYFMnDiRadOmERwcTEBAAFOmTKF3795X9OSTiIiIuD+HQs28efMA6Nevn936BQsWMGHCBACmTp1KUVERCQkJnD59mi5dupCSkkKbNm1s7d955x3i4+MZOHAgHh4ejB49mn/84x+27SUlJWRlZVFQcOkZ/ZdeesnWtri4mMGDB/Paa685er4iIiLipq5qnBpXonFqREREXM81G6dGREREpK5QqBERERG3oFAjIiIibkGhRkRERNyCQo2IiIi4BYUaERERcQsKNSIiIuIWFGpERETELSjUiIiIiFtQqBERERG3oFAjIiIibkGhRkRERNyCQo2IiIi4BYUaERERcQsKNSIiIuIWFGpERETELSjUiIiIiFtQqBERERG3oFAjIiIibkGhRkRERNyCQo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4rwNtvv42/v/9lv5Kp69e2ot81OTk5eHt7lwviVV2n6nzOq6PezNLtbuLi4sjMzLzsd6+9e/emd+/etuU+ffrQvn173njjDf70pz/VdplXZejQobafO3fuTK9evWjVqhXvvffeFf3rx1UlJSUxdOhQIiIiKm3jytdVTCUlJdx3330YhsG8efOqbOuqn4X777/f9nOnTp3o3Lkzbdq0YcOGDQwcONCJldW++fPnM3bs2Mt24K/r1/ZKf9fUFbpT44Li4+NZvXo169evp0WLFg6918vLi27durF3795aqq72BAUFcdNNN1Vae1hYWLne98ePHycsLOxalFcjDh48yNq1a3nkkUccep8rX9eL18eRa9e0aVM8PT1d9npfDDQHDx4kJSWlyrs0FbncZ6Guuv7662natGmldbv6db3os88+Iysry+HPMdSta1vZ75qwsDDOnz/PmTNn7NpXdZ2q8zmvDoUaF2IYBvHx8axcuZLU1FSioqIc3kdZWRlff/014eHhtVBh7Tp37hz79u2rtPbevXuzbt06u3UpKSl2dzTqugULFhAaGsrw4cMdep8rX9eoqCjCwsLsrl1eXh5bt26t9Np5e3vTo0cPu/dYrVbWrVtX56/3xUDz3XffsXbtWkJCQhzex+U+C3XVkSNH+OGHHyqt25Wv608lJSXRo0cPunTp4vB768K1vdzvmh49euDl5WV3nbKysjh06FCl16k6n/PqFi8u4vHHHzcCAwONDRs2GNnZ2bZXQUGBrc2vfvUr4+mnn7Ytz5o1y/j000+Nffv2GRkZGcb9999vNGzY0Ni1a5czTsEhv/vd74wNGzYY+/fvNz7//HNj0KBBRtOmTY0TJ04YhlH+XD///HOjQYMGxgsvvGB88803xowZMwwvLy/j66+/dtYpOKSsrMxo2bKl8dRTT5Xb5urX9ezZs8aXX35pfPnllwZgvPjii8aXX35pe+Jnzpw5RlBQkLFq1Spj586dxt13321ERUUZhYWFtn0MGDDAeOWVV2zLS5YsMXx8fIyFCxcau3fvNiZPnmwEBQUZOTk51/z8fqqqcz1//rwxYsQIo0WLFsaOHTvsPsfFxcW2ffz8XC/3WXCWqs717Nmzxu9//3sjPT3d2L9/v7F27Vqje/fuxo033mgUFRXZ9uEq19UwLv/n2DAMIzc312jUqJExb968CvfhCtf2Sn7XPPbYY0bLli2N1NRU43//+5/Ru3dvo3fv3nb7adu2rbFixQrb8pV8zq+WQo0LASp8LViwwNbmjjvuMB566CHb8tSpU42WLVsa3t7eRvPmzY1hw4YZX3zxxbUvvhrGjBljhIeHG97e3sZ1111njBkzxti7d69t+8/P1TAM47333jNuuukmw9vb27j55puNjz766BpXXX2ffvqpARhZWVnltrn6dV2/fn2Ff3YvnpPVajWee+45o3nz5oaPj48xcODAcv8fWrVqZcyYMcNu3SuvvGL7/9CzZ09jy5Yt1+iMKlfVue7fv7/Sz/H69ett+/j5uV7us+AsVZ1rQUGBERsbazRr1szw8vIyWrVqZUyaNKlcOHGV62oYl/9zbBiG8cYbbxi+vr7GmTNnKtyHK1zbK/ldU1hYaPzmN78xmjRpYjRq1Mi45557jOzs7HL7+el7ruRzfrUsFw4sIiIi4tLUp0ZERETcgkKNiIiIuAWFGhEREXELCjUiIiLiFhRqRERExC0o1IiIiIhbUKgRERERt6BQIyIiIm5BoUZERETcgkKNiIiIuAWFGhEREXELCjUiIiLiFv4/aanS/I3JclkAAAAASUVORK5CYII=\",\n      \"text/plain\": [\n       \"<Figure size 640x480 with 1 Axes>\"\n      ]\n     },\n     \"metadata\": {},\n     \"output_type\": \"display_data\"\n    }\n   ],\n   \"source\": [\n    \"nharms = 20\\n\",\n    \"lfrm = 20\\n\",\n    \"hfrm = 120\\n\",\n    \"_ = plt.plot(np.arange(nharms) + 1, np.mean(hfreq[lfrm:hfrm, np.arange(nharms)] / (np.arange(nharms) + 1)[np.newaxis, :], axis=0), '.')\\n\",\n    \"hnums = np.arange(nharms) + 1\\n\",\n    \"# Slight quadratic term to harmonic frequencies\\n\",\n    \"_ = plt.plot(hnums, 261.8 + 0.038 * hnums*hnums)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"c64c448a-6cf2-41be-bcbc-8d24108e192e\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.12.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "experiments/piano_examples.py",
    "content": "import sys\nimport os\n\nimport numpy as np\nimport scipy.io.wavfile as wav\n\nimport amy\n\nfrom experiments import tulip_piano\n\nimport scipy.io.wavfile as wav\n\n\ndef wavwrite(filename, data, samplerate=44100, force_mono=True):\n  \"\"\"Write a waveform to a WAV file.\"\"\"\n  if force_mono and len(data.shape) > 1:\n    data = np.mean(data, axis=-1)\n  wav.write(filename, samplerate, (32768.0 * data).astype(np.int16))\n\n\ndef piano_example(base_note=72, filename='piano_examples.wav', volume=5,\n                  send_command=amy.send, init_command=lambda: None):\n    amy.restart()\n    amy.send(time=0, volume=volume)\n\n    #amy.send(time=0, voices=\"0,1,2,3\", load_patch=patch_num)\n    init_command()\n\n    send_command(time=50, voices=\"0\", note=base_note, vel=0.05)\n    send_command(time=435, voices=\"0\", note=base_note, vel=0)\n    send_command(time=450, voices=\"0\", note=base_note, vel=0.63)\n    send_command(time=835, voices=\"0\", note=base_note, vel=0)\n    send_command(time=850, voices=\"0\", note=base_note, vel=1.0)\n    send_command(time=1485, voices=\"0\", note=base_note, vel=0)\n    send_command(time=1500, voices=\"1\", note=base_note - 24, vel=0.6)\n    send_command(time=2100, voices=\"2\", note=base_note + 24, vel=1.0)\n    send_command(time=3000, voices=\"1\", note=base_note - 24, vel=0)\n    send_command(time=3000, voices=\"2\", note=base_note + 24, vel=0)\n\n    samples = amy.render(3.3)\n\n    #amy.write(samples, filename)\n    wavwrite(filename, samples)\n    print('Wrote', len(samples), 'samples to', filename)\n\n\ndef init_piano_voices():\n    amy.send(store_patch='1024,' + tulip_piano.patch_string)\n    amy.send(time=0, voices='0,1,2', load_patch=1024)\n    tulip_piano.init_piano_voice(tulip_piano.num_partials, voices='0,1,2', time=0)\n    # additive_interpolated overwrites these settings before each note,\n    # but pre-configure each note to C4.mf for additive_fixed.\n    tulip_piano.setup_piano_voice_for_note_vel(note=60, vel=80, voices='0,1,2')\n\n\ndef main(argv):\n\n  piano_example(base_note=74, volume=10, filename='piano_example_juno_patch_7.wav',\n                init_command=lambda: amy.send(time=0, voices='0,1,2', load_patch=7))\n  piano_example(base_note=50, volume=25, filename='piano_example_dx7_patch_137.wav',\n                init_command=lambda: amy.send(time=0, voices='0,1,2', load_patch=137))\n  piano_example(base_note=62, volume=5,\n                filename='piano_example_additive_fixed.wav',\n                init_command=init_piano_voices)\n  piano_example(base_note=62,\n                filename='piano_example_additive_interpolated.wav',\n                init_command=init_piano_voices,\n                send_command=tulip_piano.piano_note_on)\n  \n  print(\"done.\")\n\n\nif __name__ == \"__main__\":\n  main(sys.argv)\n\n  \n"
  },
  {
    "path": "experiments/piano_heterodyne.ipynb",
    "content": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"11018e82-afc7-4937-8914-a23d5286f656\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"!pip3 install matplotlib --break-system-packages\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"005e6c38-f394-45b7-b890-ed1b72bf3995\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import os\\n\",\n    \"import time\\n\",\n    \"\\n\",\n    \"import matplotlib.pyplot as plt\\n\",\n    \"import numpy as np\\n\",\n    \"import scipy.io.wavfile as wav\\n\",\n    \"import scipy.signal\\n\",\n    \"\\n\",\n    \"from IPython.display import Audio\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"ae1158c3-aa77-4c23-a93d-f0a4854ac6c2\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Utility functions\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"7e97b1b2-d8b4-475d-9638-f3e239c9b414\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def lin_to_db(l):\\n\",\n    \"    return 20 * np.log10(l)\\n\",\n    \"\\n\",\n    \"def db_to_lin(d):\\n\",\n    \"    return np.pow(10.0, d / 20.0)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"12559a5a-067c-485a-8f36-61b3cc5c4fb5\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"print(np.reshape(np.tile(np.array([[1,2,3,4],[5,6,7,8]])[:,:, np.newaxis], [1, 1, 2]), shape=(2, 8)))\\n\",\n    \"\\n\",\n    \"# I think replicate_last is not currently used.\\n\",\n    \"\\n\",\n    \"def replicate_last(x, num_reps):\\n\",\n    \"    \\\"\\\"\\\"Replicate the last dimension of an array num_reps times.\\\"\\\"\\\"\\n\",\n    \"    shape_in = x.shape\\n\",\n    \"    shape_out = np.array(shape_in)\\n\",\n    \"    shape_out[-1] *= num_reps\\n\",\n    \"    return np.reshape(np.tile(x[..., np.newaxis], list(np.ones_like(shape_in)) + [num_reps]), shape=shape_out)\\n\",\n    \"\\n\",\n    \"print(replicate_last(np.array([[1,2,3,4],[5,6,7,8]]), 5))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"292a19ac-6fce-477e-8a69-ca8d40fa238d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"w = np.hanning(256)\\n\",\n    \"x = np.random.rand(1000)\\n\",\n    \"print(np.convolve(w, x, 'same').shape)\\n\",\n    \"print(scipy.signal.convolve(x, w, 'same').shape)\\n\",\n    \"# \\\"same\\\" means \\\"same as 1st arg\\\" for scipy, but \\\"same as longer arg\\\" for numpy.\\n\",\n    \"#convolve = np.convolve\\n\",\n    \"convolve = scipy.signal.convolve\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"954bd4ca-1290-4282-90e4-31ed7c7b3530\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def old_slinterp(x, interp, truncate=False):\\n\",\n    \"    \\\"\\\"\\\"Linear interpolation of vector.  Ramps down to implicit zero at end unless truncate.\\\"\\\"\\\"\\n\",\n    \"    x_shape = list(x.shape)\\n\",\n    \"    x_out_shape = list(x.shape)\\n\",\n    \"    x_out_shape[-1] *= interp\\n\",\n    \"    x_in_flat = np.reshape(x, (np.prod([1] + x_shape[:-1]), x_shape[-1]))\\n\",\n    \"    n_rows, n_cols = x_in_flat.shape\\n\",\n    \"    x_out_flat = np.zeros((n_rows, interp * n_cols))\\n\",\n    \"    interpolation_window = np.hstack([np.linspace(0, 1, 1 + interp)[1:], np.linspace(1, 0, 1 + interp)[1:]])\\n\",\n    \"    for i in range(x_in_flat.shape[0]):\\n\",\n    \"        x_atrous = np.reshape(np.hstack([x_in_flat[[i], :].T, np.zeros((n_cols, interp - 1))]), (n_cols * interp,))\\n\",\n    \"        x_out_flat[i] = convolve(x_atrous, interpolation_window, 'same')\\n\",\n    \"    if truncate:\\n\",\n    \"        if interp > 1:  # Skip for degenerate interp == 1; indexing by [:, :-(1 - 1)] deletes the entire array.\\n\",\n    \"            x_out_flat = x_out_flat[:, :-(interp - 1)]\\n\",\n    \"        x_out_shape[-1] -= (interp - 1)\\n\",\n    \"    #print(f'{x_out_flat.shape=}, {x_out_shape=}')\\n\",\n    \"    return np.reshape(x_out_flat, x_out_shape)\\n\",\n    \"\\n\",\n    \"def slinterp(x, interp, truncate=False):\\n\",\n    \"    \\\"\\\"\\\"Linear interpolation of vector.  Ramps down to implicit zero at end unless truncate. CONV-FREE VERSION.\\\"\\\"\\\"\\n\",\n    \"    x_shape = list(x.shape)\\n\",\n    \"    x_out_shape = list(x.shape)\\n\",\n    \"    x_out_shape[-1] *= interp\\n\",\n    \"    x_in_flat = np.reshape(x, (np.prod([1] + x_shape[:-1]), x_shape[-1]))\\n\",\n    \"    n_rows, n_cols = x_in_flat.shape\\n\",\n    \"    x_out_flat = np.zeros((n_rows, interp * (n_cols + 1)))\\n\",\n    \"    interpolation_window = np.expand_dims(np.hstack([np.linspace(0, 1, 1 + interp)[1:], np.linspace(1, 0, 1 + interp)[1:]]), 0)\\n\",\n    \"    for i in range(x_in_flat.shape[-1]):\\n\",\n    \"        #x_atrous = np.reshape(np.hstack([x_in_flat[[i], :].T, np.zeros((n_cols, interp - 1))]), (n_cols * interp,))\\n\",\n    \"        #x_out_flat[i] = convolve(x_atrous, interpolation_window, 'same')\\n\",\n    \"        x_out_flat[..., i * interp : (i + 2) * interp] += x_in_flat[..., i] * interpolation_window\\n\",\n    \"    x_out_flat = x_out_flat[..., (interp - 1):-1]\\n\",\n    \"    if truncate:\\n\",\n    \"        if interp > 1:  # Skip for degenerate interp == 1; indexing by [:, :-(1 - 1)] deletes the entire array.\\n\",\n    \"            x_out_flat = x_out_flat[:, :-(interp - 1)]\\n\",\n    \"        x_out_shape[-1] -= (interp - 1)\\n\",\n    \"    #print(f'{x_out_flat.shape=}, {x_out_shape=}')\\n\",\n    \"    return np.reshape(x_out_flat, x_out_shape)\\n\",\n    \"\\n\",\n    \"print(slinterp(np.arange(4), 4, truncate=True).shape)\\n\",\n    \"print(slinterp(np.arange(4), 4, truncate=False).shape)\\n\",\n    \"print(slinterp(np.arange(4), 1, truncate=True).shape)\\n\",\n    \"print(slinterp(np.arange(4), 1, truncate=False).shape)\\n\",\n    \"\\n\",\n    \"plt.plot(np.arange(25), slinterp(np.array([[1, 1, 0, 2, 2]]), 5).T, '.',\\n\",\n    \"         np.arange(21), slinterp(np.array([[1, 1, 0, 2, 2]]), 5, truncate=True).T, '.')\\n\",\n    \"plt.grid()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"bb0499fb-3721-409a-ac1e-7f56e785b4a1\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from scipy import fft\\n\",\n    \"\\n\",\n    \"def spectrogram(x, fft_len=4096, win_len=None, hop_len=None, window_fn=np.hanning, sr=1, f_max=None, title=None):\\n\",\n    \"    if win_len is None:\\n\",\n    \"        win_len = fft_len\\n\",\n    \"    if hop_len is None:\\n\",\n    \"        hop_len = win_len // 2\\n\",\n    \"    # Window.\\n\",\n    \"    prepad_len = (fft_len - win_len) // 2\\n\",\n    \"    win = np.hstack([np.zeros(prepad_len), window_fn(win_len), np.zeros(fft_len - win_len - prepad_len)])\\n\",\n    \"    # Frame.\\n\",\n    \"    frame_indices = np.arange(0, len(x) - win_len, hop_len)[:, np.newaxis] + np.arange(win_len)[np.newaxis, :]\\n\",\n    \"    x_chunks_windowed = x[frame_indices] * win[np.newaxis, :]\\n\",\n    \"    # Transform.\\n\",\n    \"    stft_mag_db = 20 * np.log10(np.abs(fft.fft(x_chunks_windowed, n=fft_len)[:, :(fft_len // 2 + 1)]))\\n\",\n    \"    num_frames, num_bins = stft_mag_db.shape\\n\",\n    \"    t_base = np.arange(num_frames) * hop_len / sr\\n\",\n    \"    f_base = np.arange(num_bins) * sr / fft_len\\n\",\n    \"    plt.imshow(stft_mag_db.T, aspect='auto', origin='lower', extent=[t_base[0], t_base[-1], f_base[0], f_base[-1]])\\n\",\n    \"    plt.clim(np.max(stft_mag_db) + [-80, 0])\\n\",\n    \"    #plt.ylim([0, f_max / sr * fft_len])\\n\",\n    \"    if f_max:\\n\",\n    \"        plt.ylim([0, f_max])\\n\",\n    \"    #x_times = np.arange(0, len(x) / sr, 0.25)\\n\",\n    \"    #y_freqs = np.arange(0, 10000, 1000)\\n\",\n    \"    #plt.xticks(x_times * sr / hop_len, x_times)\\n\",\n    \"    #plt.yticks(y_freqs / sr * fft_len, y_freqs)\\n\",\n    \"    plt.colorbar()\\n\",\n    \"    if title:\\n\",\n    \"        plt.title(title)\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"e1b105f4-c55c-49e1-8f29-2d30a32a787b\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def synth_partial(mag, freq, frame_rate, sr):\\n\",\n    \"    \\\"\\\"\\\"Reconstruct audio waveform at sr from mag and freq 1-row arrays at frame_rate.\\\"\\\"\\\"\\n\",\n    \"    # Linear interpolation of both amplitude and frequency.\\n\",\n    \"    samps_per_frame = int(round(sr / frame_rate))\\n\",\n    \"    num_partials, num_frames = mag.shape\\n\",\n    \"    output_samples = num_frames * samps_per_frame\\n\",\n    \"    t = np.arange(output_samples) / sr\\n\",\n    \"    dt = 1 / sr\\n\",\n    \"    phase = np.cumsum(slinterp(2 * np.pi * freq * dt, samps_per_frame))\\n\",\n    \"    carrier = np.cos(phase)\\n\",\n    \"    return slinterp(mag, samps_per_frame) * carrier\\n\",\n    \"\\n\",\n    \"x = synth_partial(np.array([[1, 2, 3, 2]]), np.array([[40, 80, 120, 20]]), 10, 1000)\\n\",\n    \"plt.figure(figsize=(18, 4))\\n\",\n    \"plt.plot(x.T)\\n\",\n    \"plt.grid()\\n\",\n    \"print(x.shape)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"48b4585d-36ac-4633-a27a-b0fec2da930f\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Synthesize from (possibly downsampled) mag and freq contours.\\n\",\n    \"\\n\",\n    \"def synth_harmonic(freq, mag, interp_factor=1, sample_rate=44100, mag_is_db=True, truncate=True):\\n\",\n    \"    \\\"\\\"\\\"Convert a single pair of frequency and magnitude vectors to an audio waveform.\\\"\\\"\\\"\\n\",\n    \"    # As a special case, freq can be a scalar indicating a constant frequency.\\n\",\n    \"    carrier = None\\n\",\n    \"    if isinstance(freq, (list, np.ndarray)):\\n\",\n    \"        if len(freq) == 1:\\n\",\n    \"            freq = freq[0]\\n\",\n    \"        else:\\n\",\n    \"            assert len(freq) == len(mag)\\n\",\n    \"            # Ignore the final freq value, which tends to go crazy.  Replicate the preceding one.\\n\",\n    \"            #freq[-1] = freq[-2]\\n\",\n    \"            if interp_factor > 1:\\n\",\n    \"                freq = slinterp(freq, interp_factor, truncate=truncate)\\n\",\n    \"            carrier = np.cos(np.cumsum(2 * np.pi / sample_rate * freq))\\n\",\n    \"    if carrier is None:\\n\",\n    \"        # freq must be a scalar\\n\",\n    \"        #freq = freq * np.ones(1 + (len(mag) - 1) * interp_factor)\\n\",\n    \"        carrier = np.cos(2 * np.pi * freq / sample_rate * np.arange(truncate + (len(mag) - truncate) * interp_factor))\\n\",\n    \"\\n\",\n    \"    # Can now expand mag to match.\\n\",\n    \"    if interp_factor > 1:\\n\",\n    \"        mag = slinterp(mag, interp_factor, truncate=truncate)\\n\",\n    \"    # freq is cycles per sec.  We want radians per sample\\n\",\n    \"    if mag_is_db:\\n\",\n    \"        mag = db_to_lin(mag)\\n\",\n    \"    return mag * carrier\\n\",\n    \"\\n\",\n    \"x1 = synth_harmonic(40, np.array([1, 2, 3, 2]), 100, 1000, truncate=False, mag_is_db=False)\\n\",\n    \"x2 = synth_harmonic(np.array([40, 80, 120, 20]), np.array([1, 2, 3, 2]), 100, 1000, truncate=False, mag_is_db=False)\\n\",\n    \"plt.figure(figsize=(18, 4))\\n\",\n    \"plt.plot(x2.T)\\n\",\n    \"plt.plot(x.T)\\n\",\n    \"plt.plot(x1.T)\\n\",\n    \"plt.grid()\\n\",\n    \"print(x2.shape)\\n\",\n    \"\\n\",\n    \"def synth_harmonics(freqs, mags, interp_factor=1, sample_rate=44100):\\n\",\n    \"    \\\"\\\"\\\"Convert arrays where each row is a freq or mag vector to a waveform.\\\"\\\"\\\"\\n\",\n    \"    n_harms, n_frames = mags.shape\\n\",\n    \"    n_samps = 1 + interp_factor * (n_frames - 1)\\n\",\n    \"    result = np.zeros(n_samps)\\n\",\n    \"    for freq, mag in zip(freqs, mags):\\n\",\n    \"        result += synth_harmonic(freq, mag, interp_factor, sample_rate)\\n\",\n    \"    return result\\n\",\n    \"    \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"3bff32a8-278f-4d9b-9068-435506d12b93\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Helpers from piano-partials.ipynb\\n\",\n    \"\\n\",\n    \"def lin_fit(x):\\n\",\n    \"    \\\"\\\"\\\"Least-squares linear fit to points.\\\"\\\"\\\"\\n\",\n    \"    # xhat = a + b.index\\n\",\n    \"    # err = x[i] - (a + b.i)\\n\",\n    \"    # err^2 = x[i]^2 - 2 x[i] (a + b.i) + (a^2 + 2 a b i +b^2 i^2)\\n\",\n    \"    # Define axes around midpoint.\\n\",\n    \"    lenx = len(x)\\n\",\n    \"    if not lenx:\\n\",\n    \"        return []\\n\",\n    \"    index = np.arange(lenx) - (lenx - 1) / 2\\n\",\n    \"    # Make x zero mean\\n\",\n    \"    a = np.mean(x)\\n\",\n    \"    x_z = x - a\\n\",\n    \"    b = 0\\n\",\n    \"    if lenx > 1:\\n\",\n    \"        # Linear fit is normalized inner product\\n\",\n    \"        b = np.sum(x_z * index) / np.sum(index * index)\\n\",\n    \"    return a + b * index\\n\",\n    \"\\n\",\n    \"def expand_params(params):\\n\",\n    \"    \\\"\\\"\\\"Convert [val, npts, val, npts, val] sequence to points.\\\"\\\"\\\"\\n\",\n    \"    val0 = params[0]\\n\",\n    \"    outpts = [[val0]]\\n\",\n    \"    npts_val_pairs = np.vstack([params[1::2], params[2::2]])\\n\",\n    \"    for npts, val in npts_val_pairs.transpose():\\n\",\n    \"        outpts.append(np.linspace(val0, val, int(npts + 1))[1:])\\n\",\n    \"        val0 = val\\n\",\n    \"    return np.concatenate(outpts)\\n\",\n    \"\\n\",\n    \"plt.plot(expand_params([0, 1, 1, 2, 0, 4, 1]), '.-')\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"08a7c732-6d39-4a9a-ae17-b123bf5fa580\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Read waveforms\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"25c4d418-462a-4300-ae5c-9879c9402647\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def wavread(filename):\\n\",\n    \"  \\\"\\\"\\\"Read in audio data from a wav file.  Return d, sr.\\\"\\\"\\\"\\n\",\n    \"  # Read in wav file.\\n\",\n    \"  file_handle = open(filename, 'rb')\\n\",\n    \"  samplerate, wave_data = wav.read(file_handle)\\n\",\n    \"  # Normalize short ints to floats in range [-1..1).\\n\",\n    \"  data = np.asarray(wave_data, dtype=np.float32) / 32768.0\\n\",\n    \"  return data, samplerate\\n\",\n    \"\\n\",\n    \"def wavwrite(data, samplerate, filename):\\n\",\n    \"  \\\"\\\"\\\"Write a waveform to a WAV file.\\\"\\\"\\\"\\n\",\n    \"  wav.write(filename, samplerate, (32768.0 * data).astype(np.int16))\\n\",\n    \"\\n\",\n    \"def read_and_trim(filename, duration=2.0, rel_threshold=0.005, abs_threshold=0, sr=44100, channel=None, do_plot=False, pre_time=0.010):\\n\",\n    \"    d, file_sr = wavread(filename)\\n\",\n    \"    #print(\\\"d.shape=\\\", d.shape)\\n\",\n    \"    if len(d.shape) > 1:  # Stereo file\\n\",\n    \"        if channel is None:\\n\",\n    \"            d = np.mean(d, axis=-1)\\n\",\n    \"        else:\\n\",\n    \"            d = d[:, channel]\\n\",\n    \"    assert file_sr == sr\\n\",\n    \"    d = d - np.mean(d)\\n\",\n    \"    threshold = np.maximum(np.max(np.abs(d)) * rel_threshold, abs_threshold)\\n\",\n    \"    # Tight window at start?\\n\",\n    \"    drop_initial_samps = np.maximum(0, -int(round(pre_time * sr)) + np.min(np.flatnonzero(np.abs(d) > threshold)))\\n\",\n    \"    d_return = d[int(round(drop_initial_samps)) + np.arange(int(round(duration * sr)))]\\n\",\n    \"    if do_plot:\\n\",\n    \"        t = np.arange(len(d)) / sr\\n\",\n    \"        plt.figure(figsize=(12, 4))\\n\",\n    \"        plt.subplot(121)\\n\",\n    \"        plt.plot(t[:50000], d[:50000])\\n\",\n    \"        plt.ylim(threshold * np.array([-1, 1]))\\n\",\n    \"        plt.subplot(122)\\n\",\n    \"        plt.plot(t[:len(d_return)], d_return)\\n\",\n    \"        plt.xlim([0, 0.1])\\n\",\n    \"        print(\\\"drop initial\\\", drop_initial_samps / sr)\\n\",\n    \"    return d_return, sr\\n\",\n    \"\\n\",\n    \"def filename_for_note(note, octave, strike='ff', directory=None):\\n\",\n    \"    filename = '.'.join(['Piano', strike, note + str(octave), 'wav'])\\n\",\n    \"    if directory:\\n\",\n    \"        filename = os.path.join(directory, filename)\\n\",\n    \"    return filename\\n\",\n    \"\\n\",\n    \"#filename = 'Piano.ff.D4.wav'\\n\",\n    \"directory = '/Users/dpwe/Downloads/uiowa-piano'\\n\",\n    \"#note = 'C'\\n\",\n    \"#octave = 3\\n\",\n    \"note = 'Ab'\\n\",\n    \"octave = 1\\n\",\n    \"strike = 'pp'  # ['pp', 'mf', 'ff']:\\n\",\n    \"filename = filename_for_note(note, octave, strike, directory)\\n\",\n    \"print(filename)\\n\",\n    \"waveform, sr = read_and_trim(filename, channel=0, duration=5.0, rel_threshold=0.015, abs_threshold=0.0007, do_plot=True, pre_time=0.002)\\n\",\n    \"\\n\",\n    \"Audio(data=waveform.T, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"b613b2b0-a4f5-452f-877d-3ce01fa1ae2b\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Fundamental estimation from autocorrelation\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"1a051178-a322-4102-baf8-cf86932d1564\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def freq_from_autoco(d, sr=44100, max_duration=1.0, drop_initial_sec=0.05, do_plot=False, prop_max_thresh=0.75):\\n\",\n    \"    # Estimate fundamental by autocorrelation.\\n\",\n    \"    min_period = int(round(sr / 4000.0))\\n\",\n    \"    max_period = int(round(sr / 20.0))\\n\",\n    \"    drop_initial_samples = int(round(drop_initial_sec * sr))\\n\",\n    \"    d = d[drop_initial_samples : drop_initial_samples + int(round(sr * max_duration))]\\n\",\n    \"    #acr = np.correlate(d, d, 'full')[len(d) - 1:]\\n\",\n    \"    # Using FFT makes it 1000x faster, seconds to milliseconds.  Identical result.\\n\",\n    \"    acr = np.real(np.fft.ifft(np.abs(np.fft.fft(d, len(d) * 2)**2)))[:len(d)]\\n\",\n    \"    acr = acr[:10 * max_period]\\n\",\n    \"    # Find Nth peak, divide by N\\n\",\n    \"    maxima = scipy.signal.argrelextrema(acr, np.greater)[0]\\n\",\n    \"    # Keep only peaks at least 75% of largest peak below 4kHz.\\n\",\n    \"    maxima = maxima[np.flatnonzero(maxima >= min_period)]\\n\",\n    \"    max_acr_peak = np.max(acr[maxima])\\n\",\n    \"    maxima = maxima[np.flatnonzero(acr[maxima] > prop_max_thresh * max_acr_peak)]\\n\",\n    \"    npeaks = np.minimum(30, len(maxima))\\n\",\n    \"    # Assume first peak corresponds to fundamental, keep peaks that are close to integer multiples.\\n\",\n    \"    est_period = maxima[0]\\n\",\n    \"    #print(sr / est_period)\\n\",\n    \"    multiples = maxima / est_period\\n\",\n    \"    #print(multiples)\\n\",\n    \"    #print(np.abs((multiples - np.round(multiples)) / multiples))\\n\",\n    \"    # Max 2% relative error\\n\",\n    \"    good_multiples = np.flatnonzero(np.abs((multiples - np.round(multiples)) / multiples) < 0.02)\\n\",\n    \"    if do_plot:\\n\",\n    \"        plt.plot(acr)\\n\",\n    \"        plt.plot(maxima[:npeaks], acr[maxima[:npeaks]], 'or')\\n\",\n    \"        plt.plot([0, len(acr)], prop_max_thresh * max_acr_peak * np.array([1, 1]), '--')\\n\",\n    \"        plt.plot(maxima[good_multiples], acr[maxima[good_multiples]], 'ob')\\n\",\n    \"        plt.xlim([0, 10*est_period])\\n\",\n    \"    #freqs = sr * np.arange(1, npeaks + 1) / maxima[:npeaks]\\n\",\n    \"    freqs = (sr / (maxima / np.round(multiples)))[good_multiples]\\n\",\n    \"    #print(freqs)\\n\",\n    \"    freq = np.mean(freqs[-40:])\\n\",\n    \"    return freq\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"%time freq = freq_from_autoco(waveform[8000:32000], do_plot=True, prop_max_thresh=0.81)\\n\",\n    \"print(freq)\\n\",\n    \"# Nominal: D5= 587.3295\\n\",\n    \"# C2 = 65.89466739451501\\n\",\n    \"# Db6 = 1108.73 Hz (we get 1113.37 for ff, 1114.50 for pp)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"5ea80ccb-d182-40bb-a673-5616fa1331fd\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Find frequency peaks in long Fourier transform\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"1a4ff398-98d8-4e3d-b80e-de85482c09ac\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from scipy import fft\\n\",\n    \"\\n\",\n    \"def localmax(x, npts):\\n\",\n    \"    \\\"\\\"\\\"Return indices of x where value is largest among nearest npts.\\\"\\\"\\\"\\n\",\n    \"    maxima = []\\n\",\n    \"    padval = np.array([np.min(x) - 1])\\n\",\n    \"    padded_x = np.hstack([padval, x, padval])\\n\",\n    \"    localmaxes = np.flatnonzero(np.logical_and(padded_x[1:-1]> padded_x[:-2], padded_x[1:-1] >= padded_x[2:]))\\n\",\n    \"    #for i in np.arange(1, len(x)):\\n\",\n    \"    for i in localmaxes:  \\n\",\n    \"        locality = x[np.maximum(0, i - npts // 2) : np.minimum(len(x), i + npts // 2)]\\n\",\n    \"        if x[i] == np.max(locality) and x[i] > x[i - 1]:\\n\",\n    \"            maxima.append(i)\\n\",\n    \"    return np.array(maxima)\\n\",\n    \"\\n\",\n    \"np.random.seed(57730)\\n\",\n    \"print(localmax(np.random.rand(32), npts=6))\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"def peak_freqs(x, n_fft=65536, f_max=10000.0, depth_db=20.0, local_smooth_points=2047, local_max_points=100, sr=44100, est_f0=None, do_plot=False):\\n\",\n    \"    \\\"\\\"\\\"Return frequencies of local maxima from a long FFT.\\\"\\\"\\\"\\n\",\n    \"    # Provided f0 estimate is solely used to set the exclusion window for local max picking.\\n\",\n    \"    if est_f0:\\n\",\n    \"        # Use expected f_0 to set local_max_points.\\n\",\n    \"        f0_in_bins = est_f0 / (sr / n_fft)\\n\",\n    \"        local_max_points = int(round(f0_in_bins / 1))\\n\",\n    \"        if do_plot:\\n\",\n    \"            print(\\\"local_max_points=\\\", local_max_points)\\n\",\n    \"    long_fft = fft.fft(x[:n_fft])\\n\",\n    \"    long_fft = long_fft[:(n_fft // 2)]\\n\",\n    \"    freqs = np.arange(n_fft // 2) * sr / n_fft\\n\",\n    \"    n_bins = np.sum(freqs < f_max)\\n\",\n    \"    X_spec = 20 * np.log10(np.abs(long_fft[:n_bins]))\\n\",\n    \"    # Local average\\n\",\n    \"    smoo_X_spec = convolve(X_spec, np.ones(local_smooth_points) / local_smooth_points, 'same')\\n\",\n    \"    unsmoo_X_spec = X_spec - smoo_X_spec\\n\",\n    \"\\n\",\n    \"    #peaks = scipy.signal.argrelextrema(np.maximum(np.max(unsmoo_X_spec) - 30, unsmoo_X_spec), np.greater)[0]\\n\",\n    \"    peaks = localmax(np.maximum(np.max(unsmoo_X_spec) - depth_db, unsmoo_X_spec), local_max_points)\\n\",\n    \"\\n\",\n    \"    # Remove peaks more than 1 octave below expected F0.\\n\",\n    \"    peaks = peaks[peaks > f0_in_bins / 2.5]\\n\",\n    \"\\n\",\n    \"    if do_plot:\\n\",\n    \"        plt.figure(figsize=(20, 6))\\n\",\n    \"        plt.plot(freqs[:n_bins], unsmoo_X_spec)\\n\",\n    \"        plt.plot(freqs[:n_bins], smoo_X_spec)\\n\",\n    \"        plt.plot(freqs[peaks], unsmoo_X_spec[peaks], 'or')\\n\",\n    \"        plt.xlim((0, 4000))\\n\",\n    \"    \\n\",\n    \"    return peaks * sr / n_fft\\n\",\n    \"\\n\",\n    \"est_f0 = freq_from_autoco(waveform, drop_initial_sec=0.1)\\n\",\n    \"print('f0_from_autoco=', est_f0)\\n\",\n    \"#pk_frqs = peak_freqs(waveform[8000:], n_fft=32768, depth_db=30, do_plot=True, est_f0=est_f0)\\n\",\n    \"\\n\",\n    \"pk_frqs = peak_freqs(waveform[2000:80000], n_fft=32768, depth_db=40, do_plot=True, est_f0=est_f0)\\n\",\n    \"\\n\",\n    \"plt.grid()\\n\",\n    \"plt.xlabel('freq / Hz')\\n\",\n    \"plt.ylabel('level / dB')\\n\",\n    \"plt.title('Spectral peaks for ' + os.path.basename(filename))\\n\",\n    \"\\n\",\n    \"print(pk_frqs[:6])\\n\",\n    \"print(pk_frqs[:6] / est_f0)\\n\",\n    \"\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"0e8da7ea-cc11-4452-a6a6-bfd8f22bd6be\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Inharmonicity estimation\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f27957df-3219-475d-a966-9009561564a1\",\n   \"metadata\": {\n    \"scrolled\": true\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"# Manual search for lowest-error f0 and beta\\n\",\n    \"# Error is (measured_freq / pred_harm_freq) - 1.\\n\",\n    \"avg_freqs = pk_frqs\\n\",\n    \"hn = 1 + np.arange(len(avg_freqs))\\n\",\n    \"beta = 0.0003128\\n\",\n    \"f0 = est_f0 # 262.2118\\n\",\n    \"print(f0, avg_freqs)\\n\",\n    \"prop_err = avg_freqs / (f0 * hn * np.sqrt(1 + beta * hn * hn)) - 1\\n\",\n    \"#plt.plot(hn, avg_freqs / hn, hn, f0 * np.sqrt(1 + beta * hn * hn))\\n\",\n    \"plt.plot(hn, prop_err)\\n\",\n    \"print(\\\"rms prop err =\\\", np.sqrt(np.mean(prop_err ** 2)))\\n\",\n    \"f0= 253.68557562939364\\n\",\n    \"beta= 0.0008292878905710716\\n\",\n    \"#plt.plot(hn, f0 * np.sqrt(1 + beta * hn * hn))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"3e1a0bac-26b2-4310-b180-ea2a086d6493\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def est_inharmonicity(freqs, f0=None, beta=0, tolerance=0.2, verbose=False):\\n\",\n    \"    \\\"\\\"\\\"Estimate an inharmonicity beta for a series of harmonic frequencies.\\\"\\\"\\\"\\n\",\n    \"    freq_order = np.argsort(freqs)\\n\",\n    \"    if not f0:\\n\",\n    \"        f0 = freqs[freq_order[0]]\\n\",\n    \"    # Find harmonic numbers sequentially.\\n\",\n    \"    h_nums = np.zeros_like(freqs, dtype=int)\\n\",\n    \"    valid = np.zeros_like(freqs, dtype=bool)\\n\",\n    \"    f0s = np.zeros_like(freqs)\\n\",\n    \"    freq_errs = np.zeros_like(freqs)\\n\",\n    \"    last_freq = 0\\n\",\n    \"    last_hnum = 0\\n\",\n    \"    # Try every harmonic up to the largest candidate.\\n\",\n    \"    last_harm_freq = 0\\n\",\n    \"    for cand_hnum in 1 + np.arange(np.ceil(np.max(freqs) / f0)):\\n\",\n    \"        stretched_df = f0 * np.sqrt(1 + beta * cand_hnum * cand_hnum)\\n\",\n    \"        expected_freq = last_harm_freq + stretched_df\\n\",\n    \"        # Find actual freq closest to this.\\n\",\n    \"        best_freq_index = np.argmin(np.abs(freqs - expected_freq))\\n\",\n    \"        found_freq = freqs[best_freq_index]\\n\",\n    \"        delta_freq = expected_freq - found_freq\\n\",\n    \"        if np.abs(delta_freq / f0) > 0.1:\\n\",\n    \"            if verbose:\\n\",\n    \"                print(\\\"Closest harmonic to %d (%.1f) is %.1f Hz - reject\\\" % (cand_hnum, expected_freq, freqs[best_freq_index]))\\n\",\n    \"            last_harm_freq = expected_freq\\n\",\n    \"        else:\\n\",\n    \"            if verbose:\\n\",\n    \"                print(\\\"Found harmonic %d expected %.1f Hz got %.1f Hz\\\" % (cand_hnum, expected_freq, found_freq))\\n\",\n    \"            last_harm_freq = found_freq\\n\",\n    \"            h_nums[best_freq_index] = cand_hnum\\n\",\n    \"            valid[best_freq_index] = True\\n\",\n    \"    if verbose and np.sum(valid == False):\\n\",\n    \"        print(np.sum(valid == False), \\\"values invalid\\\");\\n\",\n    \"    #print(\\\"h_nums=\\\", h_nums)\\n\",\n    \"    #print(\\\"freq_errs=\\\", freq_err)\\n\",\n    \"    # We expect (f / h.f0) = sqrt(1 + beta h^2)\\n\",\n    \"    betas = (((freqs / (f0 * h_nums + (h_nums==0))) ** 2) - 1) / (h_nums ** 2 + (h_nums == 0))\\n\",\n    \"    #print(\\\"betas=\\\", betas)\\n\",\n    \"    weights = h_nums * h_nums * valid * (betas > 0) # Increase weighting in proportion to harmonic num for valid harmonics\\n\",\n    \"    #print(\\\"weights=\\\", weights)\\n\",\n    \"    # Weights can be all zero if all the calculated betas are <= 0.\\n\",\n    \"    if np.sum(weights):\\n\",\n    \"        beta = np.sum(weights * betas) / np.sum(weights)\\n\",\n    \"    # Now figure implied f0s\\n\",\n    \"    valid_ixs = np.flatnonzero(valid)\\n\",\n    \"    f0s = freqs / (h_nums * np.sqrt(1 + beta * (h_nums ** 2)) + (h_nums==0))\\n\",\n    \"    #print(\\\"f0s=\\\", f0s)\\n\",\n    \"    weights = valid / ((h_nums ** 2) + (valid == False))  # Downweight high harmonics for f0.\\n\",\n    \"    if np.sum(weights):\\n\",\n    \"        f0 = np.sum(weights * f0s) / np.sum(weights)\\n\",\n    \"    #f0 = np.median(f0s[valid])\\n\",\n    \"\\n\",\n    \"    if verbose:\\n\",\n    \"      plt.subplot(211)\\n\",\n    \"      plt.plot(h_nums, betas, '.')\\n\",\n    \"      plt.subplot(212)\\n\",\n    \"      plt.plot(h_nums, f0s, '.')\\n\",\n    \"    \\n\",\n    \"    return f0, beta, h_nums * valid\\n\",\n    \"    \\n\",\n    \"    # We are fitting freqs[h_num] = f0 * h_num * sqrt(1 + beta * (h_num ^ 2))\\n\",\n    \"    # Given beta, what is the (non-integral) h such that \\n\",\n    \"    # freq = f0 * h * sqrt(1 + beta * h^2)\\n\",\n    \"    # => freq/f0 = h sqrt(1 + beta h^2)\\n\",\n    \"    # => (f/f0)^2 = h^2 (1 + beta h^2)   => (f/(h.f0))^2 = 1 + beta h^2 => beta = ((f/(h.f0))^2 - 1) / h^2\\n\",\n    \"    # => (f/f0)^2 = h^2 + beta h^4\\n\",\n    \"    # => beta h^4 + h^2 - (f/f0)^2 = 0\\n\",\n    \"    # => h^2 = (-1 +/- sqrt(1 - 4 * beta * (-(f/f0)^2))) / (2 * beta)\\n\",\n    \"    # => h = sqrt( 1/(2 beta) * ( - 1))\\n\",\n    \"    # => freq^2 = f0^2 * h^2 * (1 + beta h^2) => beta h^4  + h^2 - (freq / f0)^2 = 0\\n\",\n    \"    # => h^2 = [-1 +/- sqrt(1 + 4 beta ((freq/f0) ^ 2) )] / 2 beta\\n\",\n    \"    # => h = sqrt( 1/(2 beta) sqrt(1 + 4 beta ((freq/f0) ^ 2)) )\\n\",\n    \"    #h_nums = np.sqrt( (1 / (2 * beta)) * (np.sqrt(1 + 4 * beta * ((freqs / f0) ** 2)) - 1))\\n\",\n    \"    #h_nums_q = np.round(h_nums)\\n\",\n    \"    #valid_wts = (np.abs(h_nums - h_nums_q) < 0.2) * (0 + np.arange(len(h_nums)))\\n\",\n    \"    #betas = (((freqs / (f0 * h_nums_q)) ** 2) - 1) / (h_nums_q ** 2)\\n\",\n    \"    #new_f0s = freqs / (h_nums_q * np.sqrt(1 + beta * (h_nums_q ** 2)))\\n\",\n    \"\\n\",\n    \"est_f0 = freq_from_autoco(waveform, sr, drop_initial_sec=0.1)\\n\",\n    \"# Trim transient based on fundamental frequency duration\\n\",\n    \"skip_initial_cycles = 10\\n\",\n    \"skip_initial_time = skip_initial_cycles / est_f0\\n\",\n    \"skip_initial_samples = int(round(skip_initial_time *sr))\\n\",\n    \"\\n\",\n    \"f0 = est_f0  # avg_freqs[0]\\n\",\n    \"beta = 0\\n\",\n    \"#f0 = 262.2118\\n\",\n    \"#beta = 0.0003128\\n\",\n    \"#freqs = avg_freqs[:25]\\n\",\n    \"#freqs = peak_freqs(d[8000:80000], n_fft=32768, depth_db=32, est_f0=est_f0)[:25]\\n\",\n    \"freqs = peak_freqs(waveform[skip_initial_samples:], n_fft=32768, depth_db=40, est_f0=est_f0)[:25]\\n\",\n    \"print(freqs)\\n\",\n    \"#del freqs[13]\\n\",\n    \"for _ in range(5):\\n\",\n    \"  print(f0, beta)\\n\",\n    \"  f0, beta, h_nums = est_inharmonicity(np.array(freqs), f0=f0, beta=beta, verbose=0)\\n\",\n    \"#for h_num, freq in zip(h_nums, avg_freqs):\\n\",\n    \"#    print(freq, h_num)\\n\",\n    \"print(h_nums)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"abe281f7-a747-4b40-998d-546073f9b5aa\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#f0 = 32.4\\n\",\n    \"#beta = 0.00025\\n\",\n    \"valid = np.flatnonzero(h_nums > 0)\\n\",\n    \"plt.plot(h_nums[valid], freqs[valid] / h_nums[valid], '.')\\n\",\n    \"\\n\",\n    \"_ = plt.plot(h_nums, f0 * np.sqrt(1 + beta * h_nums * h_nums), '.')\\n\",\n    \"#print(freqs[12])\\n\",\n    \"\\n\",\n    \"plt.legend(['Measured equivalent fundamentals of harmonics', 'Fundamentals for  inharmonicity parameter %f' % beta])\\n\",\n    \"plt.xlabel('harmonic number')\\n\",\n    \"plt.ylabel('fundamental frequency / Hz for ' + os.path.basename(filename))\\n\",\n    \"plt.grid()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"8dd7d682-63ca-4267-9393-7180bf00159c\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Calculate fundamental and inharmonicity across whole range\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"590179f0-f908-4048-a0d4-6cbca93fe627\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def expected_f0_hz(note, octave):\\n\",\n    \"    semis = {'C': 0, 'C#': 1, 'Db': 1, 'D': 2, 'D#': 3, 'Eb': 3, 'E': 4, 'F': 5, 'F#': 6, 'Gb': 6, 'G': 7, \\n\",\n    \"             'G#': 8, 'Ab': 8, 'A': 9, 'A#': 10, 'Bb': 10, 'B': 11}[note[0].upper() + note[1:]]\\n\",\n    \"    semis += (octave + 1) * 12  # semis is midi note number, C4 = 60.\\n\",\n    \"    return 440 * (2 ** ((semis - 69) / 12))\\n\",\n    \"\\n\",\n    \"print(expected_f0_hz('C', 4))\\n\",\n    \"print(expected_f0_hz('A', 4))\\n\",\n    \"print(expected_f0_hz('C', 5))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4be2a0c6-f4cd-48ac-8a55-42d7c7eb3cb2\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"directory = '/Users/dpwe/Downloads/uiowa-piano'\\n\",\n    \"strike = 'ff'  # ['pp', 'mf', 'ff']:\\n\",\n    \"\\n\",\n    \"filenames = []\\n\",\n    \"est_f0s = []\\n\",\n    \"f0s = []\\n\",\n    \"betas = []\\n\",\n    \"\\n\",\n    \"for octave in [1, 2, 3, 4, 5, 6]:\\n\",\n    \"  #for note in ['C', 'D', 'E', 'Gb', 'Ab', 'Bb']:\\n\",\n    \"  for note in ['C', 'Db', 'D', 'Eb', 'E', 'F', 'Gb', 'G', 'Ab', 'A', 'Bb', 'B']:\\n\",\n    \"      for strike in ['pp', 'mf', 'ff']:\\n\",\n    \"        filename =  filename_for_note(note, octave, strike)\\n\",\n    \"        #print(filename)\\n\",\n    \"        #d, sr = read_and_trim(os.path.join(directory, filename), channel=0, duration=5.0, \\n\",\n    \"        #                      rel_threshold=0.010, abs_threshold=0.0001, pre_time=0.01)\\n\",\n    \"        d, sr = read_and_trim(os.path.join(directory, filename), channel=0, duration=5.0, \\n\",\n    \"                              rel_threshold=0.015, abs_threshold=0.0007, pre_time=0.002)\\n\",\n    \"        drop_initial_samps = 8000  # int(round(drop_initial_sec * sr))\\n\",\n    \"        est_f0 = freq_from_autoco(d[drop_initial_samps : 32000], sr, prop_max_thresh=0.81)\\n\",\n    \"        est_f0s.append(est_f0)\\n\",\n    \"        filenames.append(filename)\\n\",\n    \"        freqs = peak_freqs(d[drop_initial_samps : 80000], n_fft=32768, depth_db=32, est_f0=est_f0)[:25]\\n\",\n    \"        f0 = est_f0\\n\",\n    \"        beta = 0\\n\",\n    \"        for _ in range(10):\\n\",\n    \"          f0, beta, h_nums = est_inharmonicity(np.array(freqs), f0=f0, beta=beta)\\n\",\n    \"        f0s.append(f0)\\n\",\n    \"        betas.append(beta)\\n\",\n    \"\\n\",\n    \"plt.plot(1200 * (np.log2(np.array(est_f0s) / (261.626 * 2)) - replicate_last(np.linspace(-4, 2, 72, endpoint=False), 3)), '.')\\n\",\n    \"plt.ylabel('tuning error / cents')\\n\",\n    \"_ = plt.xlabel('key number')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"c004668c-2064-4f43-8d89-80ba2e7f0eba\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"for octave in [1, 2, 3, 4, 5, 6]:\\n\",\n    \"  #for note in ['C', 'D', 'E', 'Gb', 'Ab', 'Bb']:\\n\",\n    \"  for note in ['C', 'Db', 'D', 'Eb', 'E', 'F', 'Gb', 'G', 'Ab', 'A', 'Bb', 'B']:\\n\",\n    \"      for strike in ['pp', 'mf', 'ff']:\\n\",\n    \"        filename =  filename_for_note(note, octave, strike)\\n\",\n    \"        #print(filename)\\n\",\n    \"        d, sr = read_and_trim(os.path.join(directory, filename), channel=0, duration=5.0, \\n\",\n    \"                              rel_threshold=0.015, abs_threshold=0.0007, pre_time=0.002)\\n\",\n    \"        est_f0 = freq_from_autoco(d[8000:32000], sr, prop_max_thresh=0.81)\\n\",\n    \"        if np.abs(np.log2(est_f0 / expected_f0_hz(note, octave))) > 0.5/12:\\n\",\n    \"            print(filename, 'expected f0 %.1f, observed %.1f (%.1f cents)' % (\\n\",\n    \"                expected_f0_hz(note, octave), est_f0, 1200 * np.log2(est_f0 / expected_f0_hz(note, octave))))\\n\",\n    \"\\n\",\n    \"# Piano.pp.C1.wav was the same recording as Piano.pp.B0.wav, it's a data error.  \\n\",\n    \"# The error is present on the UIowa site, but I can't find any mention.\\n\",\n    \"# I resampled it up 100 cents with sox and rewrote it.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"a33d8b44-bdf5-4dc5-82ce-535cadef3b53\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#plt.plot(np.log2(np.array(est_f0s) / 440), '.')\\n\",\n    \"#print(len(est_f0s))\\n\",\n    \"#print(est_f0s)\\n\",\n    \"plt.plot(betas, '.-')\\n\",\n    \"print(filenames[5], est_f0s[5], betas[5])\\n\",\n    \"print(filenames[6], est_f0s[6], betas[6])\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"656b5fbc-c091-4d2e-888d-468d28d1912d\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Extract magnitude and frequency contours for a single harmonic\\n\",\n    \"\\n\",\n    \"`heterodyne_extract` extracts sample-by-sample magnitude and frequency contours for a single harmonic in the neighborhood of a specified input frequency (specified by a fundamental and a real-valued harmonic number, so the actual center frequency is simply the product of the two).  This is done by 'heterodyne extraction' - frequency-shifting the signal by multiplying it by the conjugate complex sinusoid at the center frequency (which shifts the center frequency down to 0 Hz), then low-pass filtering with a hanning window whose length is `smooth_cycles` times the fundamental period corresponding to `fundamental_freq`.  This window has zeros at the fundamental, so modulation at the fundamental rate is completely canceled.  This gives smooth contours for true harmonics of a fundamental.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"5278f393-a5b0-48ee-8b23-74293225a815\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"#convolve = scipy.signal.convolve\\n\",\n    \"\\n\",\n    \"def heterodyne_extract(waveform, fundamental_freq, harmonic_number=1.0, sr=44100, smooth_cycles=2.0):\\n\",\n    \"    \\\"\\\"\\\"Return a full-sample-rate amplitude and frequency envelope near the specified frequency.\\\"\\\"\\\"\\n\",\n    \"    t = np.arange(len(waveform)) / sr\\n\",\n    \"    h_freq = harmonic_number * fundamental_freq\\n\",\n    \"    # Conjugate complex exponential at center freq.\\n\",\n    \"    complex_exp = np.exp(-1j * 2 * np.pi * h_freq * t)\\n\",\n    \"    f_period = sr / fundamental_freq\\n\",\n    \"    # Smoothing over e.g. 2 cycles of fundamental cancels periodic components, leaving only the DC shifted down from h_freq.\\n\",\n    \"    smooth_len = int(round(smooth_cycles * f_period))\\n\",\n    \"    #print(\\\"f_period=\\\", f_period, \\\"sm_len=\\\", smooth_len)\\n\",\n    \"    smooth_win = np.hanning(smooth_len)\\n\",\n    \"    smooth_win = smooth_win / np.sum(smooth_win)\\n\",\n    \"    smoothed_heterodyne_waveform = convolve(waveform * complex_exp, smooth_win, 'same')\\n\",\n    \"    heterodyne_magnitude = np.abs(smoothed_heterodyne_waveform)\\n\",\n    \"    # Unwrap the phase of the near-DC component, then also smooth at ~fundamental to get freq deviation.\\n\",\n    \"    unwrapped_phase = np.hstack([[0], np.unwrap(np.angle(smoothed_heterodyne_waveform))])\\n\",\n    \"    smoothed_dphi_dt = np.diff(convolve(unwrapped_phase, smooth_win, 'same'))\\n\",\n    \"    inst_freq = h_freq + smoothed_dphi_dt / (2 * np.pi) * sr\\n\",\n    \"    #plt.plot(unwrapped_phase[-10000:])\\n\",\n    \"    #plt.plot(np.angle((waveform * complex_exp)[-1000:]))\\n\",\n    \"    #plt.plot(np.imag(smoothed_heterodyne_waveform)[-1000:])\\n\",\n    \"    # If it moves more than 0.5 rad/sample, it's not tracking well.\\n\",\n    \"    dphi_dt_valid = (np.abs(smoothed_dphi_dt) < 0.5)\\n\",\n    \"    dphi_dt_weighting = heterodyne_magnitude * dphi_dt_valid\\n\",\n    \"    weighted_mean_dphi_dt = np.sum(dphi_dt_weighting * smoothed_dphi_dt) / np.sum(dphi_dt_weighting)   # radians / sample\\n\",\n    \"    avg_freq = h_freq + weighted_mean_dphi_dt / (2 * np.pi) * sr   # cycles / second\\n\",\n    \"    reconstructed_waveform = 2 * np.real(smoothed_heterodyne_waveform * np.conj(complex_exp))  # Smoothed complex waveform remodulated.\\n\",\n    \"    return lin_to_db(heterodyne_magnitude), inst_freq, avg_freq, reconstructed_waveform\\n\",\n    \"\\n\",\n    \"#f_freq = freq_from_autoco(waveform)  # 589.232\\n\",\n    \"#harmonic_num = 1\\n\",\n    \"#sm_cyc = 2.0\\n\",\n    \"#mag, freq, avg_freq, recons_waveform = heterodyne_extract(waveform, f_freq, harmonic_num, sr, sm_cyc)\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d4fd5f4e-8901-4a5b-8a52-0888dcd1dfd1\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Heterodyne\\n\",\n    \"# h_num  delta_f\\n\",\n    \"# 1      -0.63\\n\",\n    \"# 2      -6.5\\n\",\n    \"# 3       4.1\\n\",\n    \"# 4      18.7\\n\",\n    \"# 5      35.3\\n\",\n    \"# 6      61.4\\n\",\n    \"# 7     104     4229\\n\",\n    \"# 8.2    31.4   4863\\n\",\n    \"# 9.3    97.1   5518\\n\",\n    \"# 10.2          6003\\n\",\n    \"# 10.8          6222\\n\",\n    \"# 11.2          6593\\n\",\n    \"# 11.7          6890\\n\",\n    \"# 13.3          7830\\n\",\n    \"# 14.15         8343\\n\",\n    \"# 15.45         9097\\n\",\n    \"# 16.7          9845\\n\",\n    \"\\n\",\n    \"f_freq = freq_from_autoco(waveform, drop_initial_sec=0.18)  # 589.232\\n\",\n    \"harmonic_num = 1\\n\",\n    \"sm_cyc = 2.0\\n\",\n    \"\\n\",\n    \"mag, freq, avg_freq, recons_waveform = heterodyne_extract(waveform, f_freq, harmonic_num, sr, sm_cyc)\\n\",\n    \"\\n\",\n    \"t = np.arange(len(waveform)) / sr\\n\",\n    \"ii = np.arange(22000) # \\n\",\n    \"#ii = np.arange(len(mag)-1000,len(mag))\\n\",\n    \"\\n\",\n    \"print(mag.shape)\\n\",\n    \"print(freq.shape)\\n\",\n    \"\\n\",\n    \"plt.subplot(211)\\n\",\n    \"#plt.plot(t[ii], db_to_lin(mag[ii]), '.')\\n\",\n    \"plt.plot(t[ii], mag[ii], '.')\\n\",\n    \"plt.grid()\\n\",\n    \"#plt.ylim([-60, -20])\\n\",\n    \"plt.title(f'harmonic {harmonic_num} - mag / dB')\\n\",\n    \"\\n\",\n    \"plt.subplot(212)\\n\",\n    \"plt.plot(t[ii], freq[ii], '.')\\n\",\n    \"plt.ylim([0.9 * avg_freq, 1.1 * avg_freq])\\n\",\n    \"plt.grid()\\n\",\n    \"plt.title(f'harmonic {harmonic_num} - freq / Hz')\\n\",\n    \"\\n\",\n    \"print(\\\"pre_freq=%.2f\\\" % (f_freq * harmonic_num), \\\"post_freq=%.2f\\\" % avg_freq, \\\"diff=%.2f\\\" % (avg_freq - f_freq * harmonic_num))\\n\",\n    \"\\n\",\n    \"#Audio(data=synth_partial(np.array([db_to_lin(mag)]), np.array([freq]), sr, sr), rate=sr)\\n\",\n    \"#Audio(data=synth_partial(np.array([db_to_lin(mag)]), avg_freq * np.ones((1, len(freq))), sr, sr), rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"2617c691-9aa2-4776-ae0b-e27df473f486\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"interp_factor = 44 * 10  # 10 ms sample period for parameters\\n\",\n    \"f_down = freq[::interp_factor]\\n\",\n    \"m_down = mag[::interp_factor]\\n\",\n    \"print(f'{f_down.shape=} {m_down.shape=}')\\n\",\n    \"h_recon = synth_harmonic(f_down, m_down, interp_factor=interp_factor, sample_rate=sr)\\n\",\n    \"plt.subplot(311)\\n\",\n    \"plt.plot(f_down)\\n\",\n    \"plt.subplot(312)\\n\",\n    \"plt.plot(m_down)\\n\",\n    \"plt.subplot(313)\\n\",\n    \"spectrogram(h_recon, sr=sr, f_max=4 * avg_freq)  #, fft_len=fft_len, f_max=f_max, title='original')\\n\",\n    \"#plt.plot(h_recon[-1000:])\\n\",\n    \"Audio(data=(h_recon).T, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"407b7b6e-e3f8-4ee4-9b47-c58b2154f17b\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Parent function extracts all harmonic envelopes for a note\\n\",\n    \"\\n\",\n    \"`extract_harmonics` goes through multiple steps to model a fixed-frequency note as a set of harmonics.\\n\",\n    \"* It makes an initial estimate of the fundamental from the autocorrelation of the whole note (with `freq_from_autoco`)\\n\",\n    \"* It finds all the most prominent peaks in the Fourier transform of the entire note.  The estimated fundamental is used here to set a local-dominance region so only the largest peak within one harmonics-spacing is returned.\\n\",\n    \"* It finds a best-fit for the inharmonicity of the upper harmonics by repeated application of `est_inharmonicity`.\\n\",\n    \"* It calls `heterodyne_extract` for up to the lowest `num_harms` harmonics, calculating a magnitude and (time-varying) frequency estimate for each one, then, for harmonics above `lowest_retry_harmonic`, extracts again based on the average of the extracted frequency.\\n\",\n    \"* The estimated harmonic is subtracted from the residual then goes on to extract the next harmonic.  The estimated harmonics are also accumulated to return a sinusoidal-model estimate of the input.\\n\",\n    \"* The final residual (aspects of the waveform not captured by the harmonics) is also returned.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4f2d892b-2ec0-4437-b3b4-1867b64b3a5d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def extract_harmonics(d, sr=44100, num_harms=8, skip_initial_cycles=10, verbose=False, lowest_retry_harmonic=0, est_f0=None):\\n\",\n    \"    \\\"\\\"\\\"Model a waveform with a set of harmonics.\\\"\\\"\\\"\\n\",\n    \"\\n\",\n    \"    recons_d = np.zeros_like(d)\\n\",\n    \"    recons_d_flat_f = np.zeros_like(d)\\n\",\n    \"\\n\",\n    \"    sm_cyc = 2.0\\n\",\n    \"\\n\",\n    \"    d_remaining = np.array(d)\\n\",\n    \"\\n\",\n    \"    mags = []\\n\",\n    \"    freqs = []\\n\",\n    \"    avg_freqs = []\\n\",\n    \"\\n\",\n    \"    # Initial F0 estimation from autocorrelation unless one was passed in.\\n\",\n    \"    if est_f0 is None:\\n\",\n    \"        est_f0 = freq_from_autoco(d, sr)\\n\",\n    \"    if verbose:\\n\",\n    \"        print('est_f0=', est_f0)\\n\",\n    \"    # Trim transient based on fundamental frequency duration\\n\",\n    \"    skip_initial_time = skip_initial_cycles / est_f0\\n\",\n    \"    skip_initial_samples = int(round(skip_initial_time * sr))\\n\",\n    \"    # Find all the prominent spectral peaks.  est_f0 is just for local max exclusion region.\\n\",\n    \"    f_peaks = peak_freqs(d[skip_initial_samples:], n_fft=32768, depth_db=32, est_f0=est_f0)[:num_harms]\\n\",\n    \"    if verbose:\\n\",\n    \"        print(\\\"f_peaks=\\\", f_peaks)\\n\",\n    \"\\n\",\n    \"    # We will extract tracks for each peak, but we will reference them to the independent f0 estimate.\\n\",\n    \"    #h_num_list = f_peaks / est_f0\\n\",\n    \"    max_inharm_peaks = 25  # Too many peaks messes up inharmonicity estimation for lower freqs.\\n\",\n    \"    f0 = est_f0\\n\",\n    \"    beta = 0\\n\",\n    \"    for _ in range(10):\\n\",\n    \"      # Iterate estimaing f0 and beta multiple times for covergence.\\n\",\n    \"      #print(f0, beta)\\n\",\n    \"      f0, beta, h_num_list = est_inharmonicity(f_peaks[:max_inharm_peaks], f0=f0, beta=beta)\\n\",\n    \"    # Use the fundamental extraction from the inharmonicity estimation.\\n\",\n    \"    est_f0 = f0\\n\",\n    \"    if verbose:\\n\",\n    \"        print('inh est_f0=', est_f0, 'beta=', beta)\\n\",\n    \"    \\n\",\n    \"    # Clip num_harmonics at 0.8 F_nyq\\n\",\n    \"    h_nums = (1 + np.arange(num_harms))\\n\",\n    \"    h_freqs = est_f0 * h_nums * np.sqrt(1 + beta * h_nums * h_nums)\\n\",\n    \"    num_harmonics_below_nyq = np.sum(h_freqs < 0.8 * sr / 2)\\n\",\n    \"    if num_harms > num_harmonics_below_nyq:\\n\",\n    \"        if verbose:\\n\",\n    \"            print('Clamping num_harms from', num_harms, 'to', num_harmonics_below_nyq)\\n\",\n    \"        num_harms = num_harmonics_below_nyq\\n\",\n    \"        h_nums = h_nums[:num_harms]\\n\",\n    \"    \\n\",\n    \"    for h_num in h_nums:\\n\",\n    \"        # Extract one harmonic from the residual so far.\\n\",\n    \"        stretched_hnum = h_num * np.sqrt(1 + beta * h_num * h_num)\\n\",\n    \"        # Oblige the search to be at the predicted frequency, incorporating inharmonic stretching\\n\",\n    \"        mag, freq, avg_freq, recons_waveform = heterodyne_extract(d_remaining, est_f0, stretched_hnum, sr, sm_cyc)\\n\",\n    \"        if verbose:\\n\",\n    \"            print(' h_num={:.3f}, imp_f0={:.1f}, f={:.1f} err_f={:.1f}, max_mag={:.1f} dB'.format(\\n\",\n    \"                h_num, avg_freq / stretched_hnum, avg_freq, avg_freq - est_f0 * stretched_hnum, max(mag)))\\n\",\n    \"\\n\",\n    \"        # Repeat with estimated frequency for higher harmonics.\\n\",\n    \"        if h_num > lowest_retry_harmonic:\\n\",\n    \"            mag, freq, avg_freq, recons_waveform = heterodyne_extract(d_remaining, avg_freq / h_num, h_num, sr, sm_cyc)\\n\",\n    \"            if verbose:\\n\",\n    \"                print('*h_num={:.3f}, imp_f0={:.1f}, f={:.1f} err_f={:.1f}, max_mag={:.1f} dB'.format(\\n\",\n    \"                    h_num, avg_freq / h_num, avg_freq, avg_freq - est_f0 * h_num, max(mag)))\\n\",\n    \"\\n\",\n    \"        recons_d += recons_waveform\\n\",\n    \"        d_remaining -= recons_waveform\\n\",\n    \"        #recons_d_flat_f += synth_partial(np.array([db_to_lin(mag)]), avg_freq * np.ones((1, len(freq))), sr, sr)[0]\\n\",\n    \"        recons_d_flat_f += synth_harmonic(avg_freq, np.array([db_to_lin(mag)]), 1, sr)[0]\\n\",\n    \"        mags.append(mag)\\n\",\n    \"        freqs.append(freq)\\n\",\n    \"        avg_freqs.append(avg_freq)\\n\",\n    \"\\n\",\n    \"    mags = np.array(mags)\\n\",\n    \"    freqs = np.array(freqs)\\n\",\n    \"    if verbose:\\n\",\n    \"        print(mags.shape)\\n\",\n    \"\\n\",\n    \"    return mags, recons_d, freqs, avg_freqs, est_f0\\n\",\n    \"\\n\",\n    \"#filename = filename_for_note('D', 4, 'ff')\\n\",\n    \"filename = filename_for_note('Ab', 1, 'pp')\\n\",\n    \"waveform, sr = read_and_trim(os.path.join(directory, filename), channel=0, duration=5.0, rel_threshold=0.015, abs_threshold=0.0007, pre_time=0.002)\\n\",\n    \"\\n\",\n    \"d = waveform\\n\",\n    \"\\n\",\n    \"mags, recons_d, freqs, avg_freqs, est_f0 = extract_harmonics(d, num_harms=40, lowest_retry_harmonic=0, verbose=1)\\n\",\n    \"#                                          extract_harmonics(d, num_harms=num_harms, est_f0=est_f0)\\n\",\n    \"print(f'{mags.shape=}, {freqs.shape=}')\\n\",\n    \"print(f'{avg_freqs=}')\\n\",\n    \"resid = d - recons_d\\n\",\n    \"\\n\",\n    \"t = np.arange(len(d)) / sr\\n\",\n    \"ii = np.arange(14000, 14200)\\n\",\n    \"plt.plot(t[ii], d[ii], '.', t[ii], recons_d[ii], '.', t[ii], resid[ii])\\n\",\n    \"#Audio(data=d.T, rate=sr)\\n\",\n    \"#Audio(data=recons_d.T, rate=sr)\\n\",\n    \"Audio(data=(resid).T, rate=sr)\\n\",\n    \"#Audio(data=recons_d_flat_f.T, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"0be16166-d18b-457d-8f6c-89eeea6f502f\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"plt.figure(figsize=(20, 5))\\n\",\n    \"plt.imshow(mags, aspect='auto', origin='lower', interpolation='nearest')\\n\",\n    \"plt.colorbar()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"de0bf77e-8d15-4707-88f4-d9293865f7b6\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"wavwrite(resid, sr, 'resid.wav')\\n\",\n    \"wavwrite(recons_d, sr, 'recons.wav')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"1a7ee247-10c1-47c2-8a5d-2cb00f711002\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"f_max = 2000\\n\",\n    \"fft_len = 2 * 4096\\n\",\n    \"\\n\",\n    \"plt.figure(figsize=(18, 12))\\n\",\n    \"plt.subplot(311)\\n\",\n    \"spectrogram(d, sr=sr, fft_len=fft_len, f_max=f_max, title='original')\\n\",\n    \"plt.subplot(312)\\n\",\n    \"spectrogram(recons_d, sr=sr, fft_len=fft_len, f_max=f_max, title='partials')\\n\",\n    \"plt.subplot(313)\\n\",\n    \"spectrogram(resid, sr=sr, fft_len=fft_len, f_max=f_max, title='residual')\\n\",\n    \"#spectrogram(recons_d_flat_f, sr=sr, f_max=10000, title='flat_f partials')\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"12bfb193-1ba6-4f84-9bc8-897a7afa9bdd\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Resynthesize downsampled mags and freqs\\n\",\n    \"interp_factor = 44 * 10  # 10 ms sample period for parameters\\n\",\n    \"fs_down = freqs[:, ::interp_factor]\\n\",\n    \"ms_down = mags[:, ::interp_factor]\\n\",\n    \"print(f'{ms_down.shape=}')\\n\",\n    \"# Variable frequencies\\n\",\n    \"#print('frame-rate frequencies')\\n\",\n    \"#audio = synth_harmonics(fs_down, ms_down, interp_factor)\\n\",\n    \"# Fixed frequency per harmonic\\n\",\n    \"print('Constant frequencies')\\n\",\n    \"audio = synth_harmonics(avg_freqs, ms_down, interp_factor)\\n\",\n    \"\\n\",\n    \"spectrogram(audio, sr=sr, f_max=8000)  #, fft_len=fft_len, f_max=f_max, title='original')\\n\",\n    \"#plt.plot(h_recon[-1000:])\\n\",\n    \"Audio(data=(audio).T, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"89829014-3f7e-4f39-8242-7d5d2a31b043\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"f = avg_freqs[0]\\n\",\n    \"ms = mags[0]\\n\",\n    \"%timeit a = synth_harmonic(f, ms, 1)\\n\",\n    \"plt.plot(synth_harmonic(f, ms[::2], 2))\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"cf340f1a-993c-4447-b993-ef65bdf74627\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Fixed log-time sampling\\n\",\n    \"\\n\",\n    \"We sample the magnitude contours at 21 log-spaced times (in milliseconds):\\n\",\n    \"```\\n\",\n    \"0, 4, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096\\n\",\n    \"```\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"03fd6ceb-e399-4d03-be42-9ea078f054c9\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sample_times_ms = np.array([0, 4, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096])\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"d8c09ace-f8fd-44cb-9a73-f43f21e781d2\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Adaptive magnitude sampling as convex hull\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"426cec34-6786-4bc2-b07f-f55ff5bf0636\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# New approach to linseg fitting - take all extrema, then filter down.\\n\",\n    \"filt_len = 31  # for D5\\n\",\n    \"#filt_len = 127  # for D4\\n\",\n    \"#filt_len = 1023\\n\",\n    \"filt_win = np.hanning(filt_len)/np.sum(np.hanning(filt_len))\\n\",\n    \"\\n\",\n    \"def lin_hull(x, ends=None):\\n\",\n    \"    \\\"\\\"\\\"Return a linear interpolation between the first and last values of x (or ends[0], ends[1]), of the same length as x.\\\"\\\"\\\"\\n\",\n    \"    if ends is None:\\n\",\n    \"        ends = (x[0], x[-1])\\n\",\n    \"    npts = len(x)\\n\",\n    \"    return np.linspace(ends[0], ends[1], npts)\\n\",\n    \"\\n\",\n    \"def max_prominence(x, ends=None, polarity=1):\\n\",\n    \"    \\\"\\\"\\\"Return index of point in x that is furthest above (below if polarity=-1) a line connecting the end points of x.\\\"\\\"\\\"\\n\",\n    \"    prominence = polarity * (x - lin_hull(x, ends))\\n\",\n    \"    argmax_prominence = np.argmax(prominence)\\n\",\n    \"    if np.max(prominence) > 0:\\n\",\n    \"        return argmax_prominence\\n\",\n    \"    return None\\n\",\n    \"\\n\",\n    \"def err_from_line(x, ends=None, abs_fn=np.abs):\\n\",\n    \"    \\\"\\\"\\\"Return sum(abs(error)) between x and line seg defined by ends.\\\"\\\"\\\"\\n\",\n    \"    return np.sum(abs_fn(x - lin_hull(x, ends)))\\n\",\n    \"\\n\",\n    \"def convex_hull(x, points=None, polarity=1):\\n\",\n    \"    \\\"\\\"\\\"Attempt to insert one new convex hull point in every interval defined by points.\\\"\\\"\\\"\\n\",\n    \"    if points is None:\\n\",\n    \"        points = [0, len(x) - 1]\\n\",\n    \"    new_points = [0]\\n\",\n    \"    for start in range(len(points) - 1):\\n\",\n    \"        new_point = max_prominence(x[points[start]:points[start + 1] + 1], polarity)\\n\",\n    \"        if new_point:\\n\",\n    \"            new_points.append(points[start] + int(new_point))\\n\",\n    \"        new_points.append(points[start + 1])\\n\",\n    \"    return new_points\\n\",\n    \"\\n\",\n    \"def hull(x, npoints):\\n\",\n    \"    \\\"\\\"\\\"Return npoints indices into x which attempt to provide a convex hull.\\\"\\\"\\\"\\n\",\n    \"    points = [0, len(x) - 1]\\n\",\n    \"    while len(points) < npoints:\\n\",\n    \"        max_err = 0\\n\",\n    \"        for i in range(len(points) - 1):\\n\",\n    \"            start = points[i]\\n\",\n    \"            end = points[i + 1]\\n\",\n    \"            err = err_from_line(x[start : end]) / np.sqrt((end - start))\\n\",\n    \"            #print(points, start, end, err, max_err)\\n\",\n    \"            if abs(err) > max_err:\\n\",\n    \"                max_err = abs(err)\\n\",\n    \"                worst_seg_ix = i\\n\",\n    \"        worst_start = points[worst_seg_ix]\\n\",\n    \"        worst_end = points[worst_seg_ix + 1]\\n\",\n    \"        polarity = 1 if err_from_line(x[worst_start : worst_end], abs_fn=np.asarray) > 0 else -1\\n\",\n    \"        points.insert(worst_seg_ix + 1, int(worst_start + max_prominence(x[worst_start : worst_end], polarity=polarity)))\\n\",\n    \"    return np.array(points)\\n\",\n    \"\\n\",\n    \"#h = convex_hull(mag_trim)\\n\",\n    \"#print(h)\\n\",\n    \"#h = convex_hull(mag_trim, h, -1)\\n\",\n    \"#print(h)\\n\",\n    \"#h = convex_hull(mag_trim, h)\\n\",\n    \"#print(h)\\n\",\n    \"#h = convex_hull(mag_trim, h, -1)\\n\",\n    \"#print(h)\\n\",\n    \"#h = convex_hull(mag_trim, h)\\n\",\n    \"#print(h)\\n\",\n    \"\\n\",\n    \"trim_start_samps = 128\\n\",\n    \"trim_end_samps = 1024\\n\",\n    \"\\n\",\n    \"hnum = 1\\n\",\n    \"mag_filt = lin_to_db(convolve(db_to_lin(mags[hnum]), filt_win, 'same'))\\n\",\n    \"mag_filt_trim = mag_filt[trim_start_samps:-trim_end_samps]\\n\",\n    \"max_times = scipy.signal.argrelmax(mag_filt_trim)[0]\\n\",\n    \"max_vals = mag_filt_trim[max_times]\\n\",\n    \"t = np.arange(len(mag_filt_trim)) / sr\\n\",\n    \"mmag = np.maximum(-130.0, mag_filt_trim)\\n\",\n    \"\\n\",\n    \"# Adaptive timing\\n\",\n    \"#h = hull(mmag, 12)\\n\",\n    \"# Fixed log-spaced timing\\n\",\n    \"h = np.round(sample_times_ms * 44.1).astype(np.int32)\\n\",\n    \"\\n\",\n    \"plt.figure(figsize=(16, 5))\\n\",\n    \"plt.subplot(121)\\n\",\n    \"#plt.plot(t, mmag, t[max_times], max_vals, 'o-')\\n\",\n    \"plt.plot(1000 * t, mmag)\\n\",\n    \"plt.plot(1000 * h / sr, mmag[h], 'o-')\\n\",\n    \"ylims = [-80, -20]\\n\",\n    \"t_lim = 0.15\\n\",\n    \"plt.xlim([0, 1000 * t_lim])\\n\",\n    \"#plt.legend(['mag', 'max_vals', 'hull'])\\n\",\n    \"plt.legend(['mag', 'hull'])\\n\",\n    \"plt.xlabel('time / ms')\\n\",\n    \"plt.ylabel('level / dB')\\n\",\n    \"plt.title('Envelope for harmonic %d of %s (%.1f Hz)' % (hnum, filename, est_f0))\\n\",\n    \"plt.ylim(ylims)\\n\",\n    \"plt.grid()\\n\",\n    \"plt.subplot(122)\\n\",\n    \"plt.plot(t, mmag)\\n\",\n    \"#plt.plot(t[max_times], max_vals, 'o-')\\n\",\n    \"plt.plot(h / sr, mmag[h], 'o-')\\n\",\n    \"# Line showing limit of left plot\\n\",\n    \"plt.plot([t_lim, t_lim], ylims, ':k')\\n\",\n    \"plt.xlim([0, 4.1])\\n\",\n    \"plt.ylim(ylims)\\n\",\n    \"plt.grid()\\n\",\n    \"plt.xlabel('time / s')\\n\",\n    \"print(h / 44.1)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"758f0649-c7d5-4c2a-89e4-80a11689ff65\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Convert sinusoids into bp sets\\n\",\n    \"\\n\",\n    \"# harms_params is a list of harmonic descriptions\\n\",\n    \"# each harmonic description is [const_freq, [(delta_time_ms, lin_mag), (delta_time_ms, lin_mag), ...]]\\n\",\n    \"\\n\",\n    \"def make_harms_params(mags, avg_freqs, max_harmonic=None, sr=44100, mag_floor=-100.0, terminal_slope=20.0, \\n\",\n    \"                      filt_len=31, adaptive_timing=True, verbose=False):\\n\",\n    \"  if not max_harmonic:\\n\",\n    \"      max_harmonic = mags.shape[0]\\n\",\n    \"    \\n\",\n    \"  dt = 1 / sr\\n\",\n    \"  sm_cyc = 2.0\\n\",\n    \"\\n\",\n    \"  #trim_ends_sec = 0.014\\n\",\n    \"  #trim_ends_samps = int(round(trim_ends_sec * sr))\\n\",\n    \"  trim_start_samps = 0 # 128\\n\",\n    \"  trim_end_samps = 1024\\n\",\n    \"\\n\",\n    \"  #filt_len = 31\\n\",\n    \"  filt_win = np.hanning(filt_len)/np.sum(np.hanning(filt_len))\\n\",\n    \"\\n\",\n    \"  harms_params = []\\n\",\n    \"\\n\",\n    \"  for hnum in range(max_harmonic):\\n\",\n    \"    mag_filt = lin_to_db(convolve(db_to_lin(mags[hnum]), filt_win, 'same'))\\n\",\n    \"    mag_filt_trim = mag_filt[trim_start_samps : -trim_end_samps]\\n\",\n    \"    #mag_filt_trim = mag_filt\\n\",\n    \"    mmag = np.maximum(mag_floor, mag_filt_trim)\\n\",\n    \"    if adaptive_timing:\\n\",\n    \"      # Adaptive timing\\n\",\n    \"      anchor_times = hull(mmag, 12)\\n\",\n    \"    else:\\n\",\n    \"      # Fixed log-spaced timing\\n\",\n    \"      sample_times_ms = np.array([0, 4, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096])\\n\",\n    \"      anchor_times = np.round(sample_times_ms * 44.1).astype(np.int32)\\n\",\n    \"    anchor_vals = mmag[anchor_times]\\n\",\n    \"    nvals = list(zip([0] + list(np.diff(anchor_times)), anchor_vals))\\n\",\n    \"    bp_list = [(int(round(n * dt * 1000)), float(db_to_lin(val))) \\n\",\n    \"               for n, val in nvals]\\n\",\n    \"    last_time, last_mag = bp_list[-1]\\n\",\n    \"    last_mag_db = lin_to_db(last_mag)\\n\",\n    \"    final_mag_db = mag_floor\\n\",\n    \"    if adaptive_timing:\\n\",\n    \"      if last_mag_db > final_mag_db:\\n\",\n    \"        terminal_slope = terminal_slope  # -db/sec\\n\",\n    \"        final_dur = (last_mag_db - final_mag_db) / terminal_slope\\n\",\n    \"        bp_list.append((int(round(1000 * final_dur)), float(db_to_lin(final_mag_db))))\\n\",\n    \"      if adaptive_timing and bp_list[-1][1] == bp_list[-2][1]:  # Final points have same mag\\n\",\n    \"        bp_list = bp_list[:-1]\\n\",\n    \"    bp_list_pair = [float(avg_freqs[hnum]), bp_list]\\n\",\n    \"    if verbose:\\n\",\n    \"      print(\\\"h\\\", hnum + 1, bp_list_pair)\\n\",\n    \"    harms_params.append(bp_list_pair)\\n\",\n    \"  return harms_params\\n\",\n    \"\\n\",\n    \"harms_params = make_harms_params(mags, avg_freqs, mag_floor=-130, verbose=False, adaptive_timing=False)\\n\",\n    \"for hp in harms_params:\\n\",\n    \"    print(hp[0], len(hp[1]))\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"54a807c3-0072-45b4-a05a-226e1e0ba54c\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"mags_dict = {}\\n\",\n    \"harms_dict = {}\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"43c1c74e-80e7-46a8-a663-6b759b86e424\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Filename to parameters set\\n\",\n    \"#filenames = ['Piano.mf.C5.wav', 'Piano.ff.C5.wav', 'Piano.mf.D5.wav', 'Piano.ff.D5.wav']\\n\",\n    \"#filenames = ['Piano.pp.D4.wav', 'Piano.pp.D5.wav', 'Piano.mf.D4.wav', 'Piano.mf.D5.wav', 'Piano.ff.D4.wav', 'Piano.ff.D5.wav']\\n\",\n    \"\\n\",\n    \"# Original U Iowa piano samples from https://theremin.music.uiowa.edu/mispiano.html converted to wav format.\\n\",\n    \"# Note: The file called Piano.pp.C0.wav was actually just a copy of Piano.pp.B1.wav (with different cropping).\\n\",\n    \"# I fixed its pitch by resampling:\\n\",\n    \"# dpwe@dpwe-macbookpro:~/Downloads$ sox uiowa-piano/Piano.pp.C1.wav piano.wav speed 100c \\n\",\n    \"# dpwe@dpwe-macbookpro:~/Downloads$ cp piano.wav uiowa-piano/Piano.pp.C1.wav \\n\",\n    \"\\n\",\n    \"directory = '/Users/dpwe/Downloads/uiowa-piano'\\n\",\n    \"\\n\",\n    \"num_harms = 40  # was 20\\n\",\n    \"\\n\",\n    \"filenames = []\\n\",\n    \"\\n\",\n    \"for octave in range(1, 8):\\n\",\n    \"    for note in ['C', 'E', 'Ab']:\\n\",\n    \"        est_f0 = None\\n\",\n    \"        for strike in ['ff', 'mf', 'pp']:\\n\",\n    \"            filename = filename = filename_for_note(note, octave, strike)\\n\",\n    \"            filenames.append(filename)\\n\",\n    \"            d, sr = read_and_trim(os.path.join(directory, filename), \\n\",\n    \"                                  channel=0, rel_threshold=0.015, abs_threshold=0.001, duration=5.0, pre_time=0.002)\\n\",\n    \"            #print(d.shape)\\n\",\n    \"            mags_dict[filename], recons_d, freqs, avg_freqs, est_f0 = extract_harmonics(d, num_harms=num_harms, est_f0=est_f0)\\n\",\n    \"            print(time.ctime(), filename, '%.1f' % est_f0, ['%.1f' % float(v) for v in avg_freqs[:4]])\\n\",\n    \"            #resid = d - recons_d\\n\",\n    \"            harms_dict[filename] = make_harms_params(mags_dict[filename], avg_freqs, mag_floor=-130, adaptive_timing=False)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"336ae992-222f-4fe9-9016-b9704d1734ec\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Describe note as initial amp + dB slope for single linear fit.\\n\",\n    \"filt_len = 31\\n\",\n    \"filt_win = np.hanning(filt_len)/np.sum(np.hanning(filt_len))\\n\",\n    \"\\n\",\n    \"plt.figure(figsize=(12, 6))\\n\",\n    \"colors = plt.cm.rainbow(np.linspace(0, 1, 21))\\n\",\n    \"avg_h_decay = np.zeros(len(filenames))\\n\",\n    \"avg_h_mag = np.zeros(len(filenames))\\n\",\n    \"for i, filename in enumerate(filenames):\\n\",\n    \"    #print(filename)\\n\",\n    \"    #plt.subplot(1, 3, (i % 3) + 1)\\n\",\n    \"    mags = mags_dict[filename]\\n\",\n    \"\\n\",\n    \"    num_harmonics = min(12, mags.shape[0])\\n\",\n    \"    h_init_amp = np.zeros(num_harmonics)\\n\",\n    \"    h_decay = np.zeros(num_harmonics)\\n\",\n    \"    h_nums = range(num_harmonics)\\n\",\n    \"    for h in h_nums:\\n\",\n    \"        mag_filt = lin_to_db(convolve(db_to_lin(mags[h]), filt_win, 'same'))\\n\",\n    \"        mag_filt_trim = mag_filt[trim_end_samps:-trim_end_samps]\\n\",\n    \"        t = np.arange(len(mag_filt_trim)) / sr\\n\",\n    \"        linfit = lin_fit(mag_filt_trim)\\n\",\n    \"        h_init_amp[h] = linfit[0]\\n\",\n    \"        h_decay[h] = (linfit[-1] - linfit[0]) / (t[-1] - t[0])\\n\",\n    \"    plt.plot(h_nums, h_decay, color=colors[i % len(colors)])\\n\",\n    \"    plt.ylim([-20, 10])\\n\",\n    \"    #plt.plot(h_nums, h_init_amp, color=colors[i])\\n\",\n    \"    #\\n\",\n    \"    #plt.plot(h_nums, lin_fit(h_decay), '--', h_nums, lin_fit(h_init_amp), '--', color=colors[i])\\n\",\n    \"    #plt.plot(h_nums, h_decay, color=colors[i])\\n\",\n    \"    #plt.plot(h_nums, lin_fit(h_decay), '--', color=colors[i])\\n\",\n    \"    #plt.legend(['decay dB/sec', 'init amp/dB'])\\n\",\n    \"    if i < 3:\\n\",\n    \"        plt.grid()\\n\",\n    \"        _ = plt.title(filename + ' avg dB/sec decay lin_fit harmonics')\\n\",\n    \"    avg_h_decay[i] = np.mean(h_decay)\\n\",\n    \"    avg_h_mag[i] = np.mean(h_init_amp)\\n\",\n    \"plt.legend(filenames)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"48d1ba1b-4cac-449c-a6db-dc10186342d8\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"note_indices = np.arange(len(avg_h_decay))\\n\",\n    \"plt.figure(figsize=(16, 4))\\n\",\n    \"plt.plot(note_indices, avg_h_decay, '.-')\\n\",\n    \"plt.plot(note_indices, avg_h_mag, '.-')\\n\",\n    \"plt.legend(['avg_h_decay', 'avg_h_mag'])\\n\",\n    \"plt.grid()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"913bdbce-c0ed-4750-8f06-0366dc56ff05\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Mapping here is 1/8 shrunk after the first 250 ms.\\n\",\n    \"def time_mapper(t, boundary=0.25, magnification=8.0):\\n\",\n    \"        \\\"\\\"\\\"Convert time in secs to a nonlinear projection.\\\"\\\"\\\"\\n\",\n    \"        #return np.log10(0.01 + t)\\n\",\n    \"        t = np.asarray(t)\\n\",\n    \"        magnified = (t < boundary)\\n\",\n    \"        return magnified * t + (1 - magnified) * (boundary + (t - boundary) / magnification)\\n\",\n    \"\\n\",\n    \"def plot_mags(mags, filename, nharms=None, hop_len=64, sr=44100, mag_floor=-130.0, mag_ceil=-20.0, show_lin_fit=False):\\n\",\n    \"    if not nharms:\\n\",\n    \"        nharms = mags.shape[0]\\n\",\n    \"    nfrm = mags[:nharms, ::hop_len].shape[-1]\\n\",\n    \"    frmTime = np.arange(nfrm) * hop_len / sr\\n\",\n    \"    colors = plt.cm.rainbow(np.linspace(0, 1, max(12, nharms)))\\n\",\n    \"\\n\",\n    \"    boundary = 0.25\\n\",\n    \"    magnification = 8.0\\n\",\n    \"\\n\",\n    \"    for i in range(nharms):\\n\",\n    \"        plt.plot(time_mapper(frmTime[:nfrm]), mags[i, ::hop_len].T, '.', color=colors[i])\\n\",\n    \"        if show_lin_fit:\\n\",\n    \"            lin_fit_mag = lin_fit(mags[i, ::hop_len])\\n\",\n    \"            plt.plot(time_mapper(frmTime[:nfrm]), lin_fit_mag, '--', color=colors[i])\\n\",\n    \"\\n\",\n    \"    plt.plot(time_mapper([boundary, boundary]), [mag_floor, mag_ceil], '--k')\\n\",\n    \"    plt.ylim([mag_floor, mag_ceil])\\n\",\n    \"    xtimes = np.hstack([np.arange(0, 0.25, 0.0625), np.arange(0.5, 5.0, 0.5)])\\n\",\n    \"    plt.xlim([0, time_mapper(5.0)])\\n\",\n    \"    plt.xticks(time_mapper(xtimes), xtimes)\\n\",\n    \"    plt.legend(1 + np.arange(nharms), loc='upper right')\\n\",\n    \"    _ = plt.title((filename + ' - ' + str(nharms) + ' harmonics'))\\n\",\n    \"    \\n\",\n    \"\\n\",\n    \"def plot_harms(harms_params, filename, nharms=None, hop_len=64, sr=44100, mag_floor=-130.0, mag_ceil=-20.0):\\n\",\n    \"    if not nharms:\\n\",\n    \"        nharms = len(harms_params)\\n\",\n    \"    nfrm = mags[:nharms, ::hop_len].shape[-1]\\n\",\n    \"    frmTime = np.arange(nfrm) * hop_len / sr\\n\",\n    \"    colors = plt.cm.rainbow(np.linspace(0, 1, max(12, nharms)))\\n\",\n    \"\\n\",\n    \"    # Mapping here is 1/8 shrunk after the first 250 ms.\\n\",\n    \"    boundary = 0.25\\n\",\n    \"    magnification = 8.0\\n\",\n    \"\\n\",\n    \"    for i, hp in enumerate(harms_params):\\n\",\n    \"        times, vals = zip(*np.array(hp[1]))\\n\",\n    \"        times = np.cumsum(times) / 1000\\n\",\n    \"        vals = np.array(vals)\\n\",\n    \"        plt.fill_between(time_mapper(times), mag_floor, lin_to_db(vals), alpha=0.8, color=colors[i])\\n\",\n    \"    plt.plot(time_mapper([boundary, boundary]), [mag_floor, -mag_ceil], '--k')\\n\",\n    \"    plt.ylim([mag_floor, mag_ceil])\\n\",\n    \"    plt.legend(1 + np.arange(nharms))\\n\",\n    \"    xtimes = np.hstack([np.arange(0, 0.25, 0.0625), np.arange(0.5, 5.0, 0.5)])\\n\",\n    \"    plt.xticks(time_mapper(xtimes), xtimes)\\n\",\n    \"    plt.xlim([0, time_mapper(5.0)])\\n\",\n    \"    _ = plt.title((filename + ' - ' + str(nharms) + ' harmonics'))\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"bbd3fe33-19d5-4712-b652-76800dd98ba2\",\n   \"metadata\": {\n    \"scrolled\": true\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"plt.figure(figsize=(15, 15))\\n\",\n    \"for i, filename in enumerate(filenames[:9]):\\n\",\n    \"    plt.subplot(3, 3, i + 1)\\n\",\n    \"    plot_mags(mags_dict[filename], filename, show_lin_fit=True)\\n\",\n    \"    #plot_harms(harms_dict[filename], filename)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"babe00ef-9fd2-4e74-aace-5beeec878f25\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"plt.figure(figsize=(15, 15))\\n\",\n    \"for i, filename in enumerate(filenames[:9]):\\n\",\n    \"    plt.subplot(3, 3, i + 1)\\n\",\n    \"    #plot_mags(mags_dict[filename], filename)\\n\",\n    \"    plot_harms(harms_dict[filename], filename)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"5ae6a2d7-3fbd-4a87-8b10-7ba588892260\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def time_mapper(t, boundary=0.25, magnification=8.0):\\n\",\n    \"    \\\"\\\"\\\"Convert time in secs to a nonlinear projection.\\\"\\\"\\\"\\n\",\n    \"    return np.log10(0.01 + t)\\n\",\n    \"    #t = np.asarray(t)\\n\",\n    \"    #magnified = (t < boundary)\\n\",\n    \"    #return magnified * t + (1 - magnified) * (boundary + (t - boundary) / magnification)\\n\",\n    \"\\n\",\n    \"def inv_time_mapper(mapped_t, boundary=0.25, magnification=8.0):\\n\",\n    \"    magnified = mapped_t < boundary\\n\",\n    \"    return magnified * mapped_t + (1 - magnified) * (boundary + magnification * (mapped_t - boundary))\\n\",\n    \"\\n\",\n    \"from matplotlib.collections import PolyCollection\\n\",\n    \"\\n\",\n    \"def polygon_under_graph(x, y):\\n\",\n    \"    return [(x[0], 0.), *zip(x, y), (x[-1], 0.)]\\n\",\n    \"\\n\",\n    \"#filename = filename_for_note(note='C', octave=4, strike='ff')\\n\",\n    \"\\n\",\n    \"def harmonics_waterfall_plot(filename, axes=None):\\n\",\n    \"    global harms_dict\\n\",\n    \"    if axes == None:\\n\",\n    \"        axes = fig.add_subplot(projection='3d')\\n\",\n    \"    verts = []\\n\",\n    \"    mag_floor = -130\\n\",\n    \"    for i, hp in list(enumerate(harms_dict[filename])):\\n\",\n    \"            times, vals = zip(*np.array(hp[1]))\\n\",\n    \"            times = np.cumsum(times) / 1000\\n\",\n    \"            vals = np.array(vals)\\n\",\n    \"            times = np.hstack([[times[0]], times])\\n\",\n    \"            vals = np.hstack([[db_to_lin(mag_floor)], vals])\\n\",\n    \"            #plt.plot(np.log10(0.01 + times), lin_to_db(vals), zs=-i, zdir='y', alpha=0.8, color=colors[i])\\n\",\n    \"            #poly = axes.add_collection3d(plt.fill_between(2 + np.log10(0.01 + times), -100, lin_to_db(vals), alpha=0.8, color=colors[i]), \\n\",\n    \"            #                           zs=(i + 1), zdir='y')\\n\",\n    \"            verts.append(polygon_under_graph(time_mapper(times), -mag_floor + lin_to_db(vals)))\\n\",\n    \"    facecolors = plt.colormaps['rainbow'](np.linspace(0, 1, len(verts)))\\n\",\n    \"    poly = PolyCollection(verts, facecolors=facecolors, alpha=.7)\\n\",\n    \"    axes.add_collection3d(poly, zs=np.arange(len(harms_dict[filename]), 0, -1), zdir='y')\\n\",\n    \"    axes.set_zlim(0, 120)\\n\",\n    \"    axes.set_zlabel('level / dB')\\n\",\n    \"    \\n\",\n    \"    plt.title(filename)\\n\",\n    \"    plt.xlabel('time / s')\\n\",\n    \"    #tick_times = np.array([0, 0.1, 0.2, 1.0, 2.0, 3.0, 4.0])\\n\",\n    \"    tick_times = np.array([0, 0.02, 0.05, 0.1, 0.2, 0.5, 1.0, 2.0, 5.0])\\n\",\n    \"    plt.xticks(time_mapper(tick_times), tick_times)\\n\",\n    \"    #plt.xlim([-0.05, 0.8])\\n\",\n    \"    plt.ylabel('harm #')\\n\",\n    \"    plt.yticks(np.arange(2, 22, 2), np.arange(19, -1, -2))\\n\",\n    \"    #plt.zlabel('level / dB')\\n\",\n    \"\\n\",\n    \"    #plt.zlim([-100, -20])\\n\",\n    \"    #plt.legend(1 + np.arange(nharms))\\n\",\n    \"    #plt.xticks(np.log10(0.01 + xtimes), xtimes)\\n\",\n    \"    #plt.xlim([0, 3000])\\n\",\n    \"    #_ = plt.title((filename + ' - ' + str(nharms) + ' harmonics'))\\n\",\n    \"    axes.view_init(elev=20., azim=-115, roll=0)\\n\",\n    \"\\n\",\n    \"#fig = plt.figure(figsize=(8, 6))\\n\",\n    \"\\n\",\n    \"plt.figure(figsize=(18, 6))\\n\",\n    \"axes = plt.subplot(131, projection='3d')\\n\",\n    \"note = 'C'\\n\",\n    \"octave = 4\\n\",\n    \"harmonics_waterfall_plot(filename_for_note(note, octave, 'pp'), axes=axes)\\n\",\n    \"axes = plt.subplot(132, projection='3d')\\n\",\n    \"harmonics_waterfall_plot(filename_for_note(note, octave, 'mf'), axes=axes)\\n\",\n    \"axes = plt.subplot(133, projection='3d')\\n\",\n    \"harmonics_waterfall_plot(filename_for_note(note, octave, 'ff'), axes=axes)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"a332f17f-5863-4a99-8399-3dc7c5661f9d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import json\\n\",\n    \"print(filename.split('.'))\\n\",\n    \"params_file = '.'.join(filename.split('.', -1)[:-1]) + '.json'\\n\",\n    \"print(params_file)\\n\",\n    \"with open(params_file, 'w') as f:\\n\",\n    \"    f.write(json.dumps(harms_params))\\n\",\n    \"print('saved to', params_file)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"63de5760-ec44-4246-8ede-17050a2ede1d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import itertools\\n\",\n    \"\\n\",\n    \"hps = harms_params[0]\\n\",\n    \"bps = np.array(hps[1])\\n\",\n    \"print(bps[:, 0])\\n\",\n    \"plt.plot(expand_params(list(itertools.chain.from_iterable(bps))[1:]))\\n\",\n    \"plt.plot(np.cumsum(bps[:, 0]), bps[:, 1], '.')\\n\",\n    \"_ = plt.xlim(0, 10000)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"e346232b-bddf-45cc-929a-c9d90d859efc\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Synthesize various versions.\\n\",\n    \"# Original magnitudes, fixed frequencies\\n\",\n    \"\\n\",\n    \"def synth_harm_param(harm_param, sr=44100):\\n\",\n    \"    \\\"\\\"\\\"Synthesize a single harmonic described by a harm_param structure.\\\"\\\"\\\"\\n\",\n    \"    # harm_param is [freq, [(dtime_ms, mag), (dtime_ms, mag), ...]]\\n\",\n    \"    freq, breakpoints = harm_param\\n\",\n    \"    breakpoints = np.array(breakpoints)\\n\",\n    \"    breakpoints[:, 1] = lin_to_db(breakpoints[:, 1])\\n\",\n    \"    # magnitudes interpolated on millisecond scale in log domain.\\n\",\n    \"    # First value is assumed to be zero, so dropped.\\n\",\n    \"    mags = expand_params(list(itertools.chain.from_iterable(breakpoints))[1:])\\n\",\n    \"    return synth_harmonic(freq, mags, interp_factor=int(round(sr / 1000)), sample_rate=sr, mag_is_db=True)\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"def synth_params(harms_params, verbose=False):\\n\",\n    \"    \\\"\\\"\\\"Synthesize a note described by a list of harm_param structures.\\\"\\\"\\\"\\n\",\n    \"    upper_bound_len_samples = 44100 * 10\\n\",\n    \"    result = np.zeros(upper_bound_len_samples)\\n\",\n    \"    max_harm_len_samples = 0\\n\",\n    \"    for hp in harms_params:\\n\",\n    \"        harm_audio = synth_harm_param(hp)\\n\",\n    \"        harm_len_samples = len(harm_audio)\\n\",\n    \"        result[:harm_len_samples] += harm_audio\\n\",\n    \"        max_harm_len_samples = np.maximum(max_harm_len_samples, harm_len_samples)\\n\",\n    \"    return result[:max_harm_len_samples], harm_audio\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"def synth_params_orig(harms_params, verbose=False):\\n\",\n    \"    # Older version does not use the common synth_harmonic function.\\n\",\n    \"    result = np.zeros(0)\\n\",\n    \"    for f0, hp in harms_params:\\n\",\n    \"        # ignore first time, start list with first value.\\n\",\n    \"        params = [lin_to_db(hp[0][1])]\\n\",\n    \"        # Step through remaining pairs, converting times in ms to samples\\n\",\n    \"        for bpp in hp[1:]:\\n\",\n    \"            params.extend([int(round(bpp[0] * sr/1000)), lin_to_db(bpp[1])])\\n\",\n    \"        # Expand (val, npoints, val, npoints..., val) list\\n\",\n    \"        ep = expand_params(params)\\n\",\n    \"        carrier = np.cos(2 * np.pi * f0 * np.arange(len(ep)) / sr)\\n\",\n    \"        ep_len = len(ep)\\n\",\n    \"        if ep_len > len(result):\\n\",\n    \"            result = np.hstack([result, np.zeros(ep_len - len(result))])\\n\",\n    \"        result[:ep_len] += db_to_lin(ep) * carrier\\n\",\n    \"        if verbose:\\n\",\n    \"            print(f0)\\n\",\n    \"    return result, ep\\n\",\n    \"\\n\",\n    \"#audio, ep = synth_params([harms_params[i] for i in 1 + np.arange(10)])\\n\",\n    \"#filename = 'Piano.ff.C4.wav'\\n\",\n    \"filename = 'Piano.ff.C3.wav'\\n\",\n    \"#hd = harms_dict[filename][:40]\\n\",\n    \"# How does it sound if we skip some of the higher harmonics?\\n\",\n    \"# In particular, above the 16th harmonic, skip harmonics that are 2.n.f0 and 3.n.f0.  This lets us get higher, for brighter sounds, \\n\",\n    \"# and the missing harmonics aren't particularly noticeable in those regions.\\n\",\n    \"hd = [harms_dict[filename][i] for i in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 22, 24, 28, 30, 34, 36]]\\n\",\n    \"h_audio, ep = synth_params(hd)\\n\",\n    \"#h_audio, ep = synth_params(harms_params)\\n\",\n    \"\\n\",\n    \"#f0 = harms_params[0][0]\\n\",\n    \"#carrier = np.cos(2 * np.pi * f0 * np.arange(len(ep)) / sr)\\n\",\n    \"\\n\",\n    \"#ii = np.arange(20000)\\n\",\n    \"ii = np.arange(4000)\\n\",\n    \"#plt.plot(t[ii], db_to_lin(mags[h_num - 1][ii]))\\n\",\n    \"#plt.plot(t[ii], db_to_lin(ep[ii]))\\n\",\n    \"#plt.title(filename)\\n\",\n    \"npts = len(resid)\\n\",\n    \"audio = h_audio[:npts]  # + resid\\n\",\n    \"Audio(data=audio, rate=sr)\\n\",\n    \"print(audio.shape, resid.shape, sr)\\n\",\n    \"#old_audio = audio\\n\",\n    \"start_pt = 950\\n\",\n    \"npts = 100\\n\",\n    \"plt.plot((start_pt + np.arange(npts)) / sr, audio[start_pt : start_pt + npts])\\n\",\n    \"#         (start_pt + np.arange(npts)) / sr, old_audio[start_pt : start_pt + npts])\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"ad4e2638-a2e3-48ac-a0af-e26085bb9646\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"print(filename, len(audio), sr)\\n\",\n    \"Audio(data=audio, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"a32e7895-40b6-4ce3-ba32-cadfa79d2eec\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"print(filename, len(audio), sr)\\n\",\n    \"Audio(data=audio, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"ff874fcf-dc6a-49e0-b144-74580dc34f28\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"waveform, sr = read_and_trim(os.path.join(directory, filename), channel=0, duration=5.0, rel_threshold=0.010, abs_threshold=0.001, do_plot=False, pre_time=0.01)\\n\",\n    \"Audio(data=waveform, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"147eba90-e290-4f3f-b62a-7c082249da3b\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def interp_harm_param(hp0, hp1, alpha):\\n\",\n    \"    \\\"\\\"\\\"Return harm_param list that is alpha of the way to hp1 from hp0.\\\"\\\"\\\"\\n\",\n    \"    hp = []\\n\",\n    \"    for h0, h1 in zip(hp0, hp1):\\n\",\n    \"        f_a = np.exp(np.log(h0[0]) + alpha * (np.log(h1[0]) - np.log(h0[0])))\\n\",\n    \"        #if (abs(h0[0] - h1[0]) / (0.5 * (h0[0] + h1[0]))) > 0.1:\\n\",\n    \"        #    print(\\\"warn: interpolating\\\", h0[0], \\\"and\\\", h1[0])\\n\",\n    \"        # Don't warn since we're interpolating between notes too.\\n\",\n    \"        bps = []\\n\",\n    \"        eps = 1e-9\\n\",\n    \"        for bp0, bp1 in zip(h0[1], h1[1]):\\n\",\n    \"            bp = (bp0[0] + alpha * (bp1[0] - bp0[0]), np.exp(-eps + np.log(bp0[1] + eps) + alpha * (np.log(bp1[1] + eps) - np.log(bp0[1] + eps))))\\n\",\n    \"            bps.append(bp)\\n\",\n    \"        hp.append((f_a, bps))\\n\",\n    \"    return hp\\n\",\n    \"\\n\",\n    \"def print_hp(harm_params, max_harms=8):\\n\",\n    \"    print('***')\\n\",\n    \"    for harm_param in harm_params[:max_harms]:\\n\",\n    \"        s = '%.1f ' % harm_param[0]\\n\",\n    \"        for bp in harm_param[1][:8]:\\n\",\n    \"            s += '%d, %.1f / ' % (bp[0], 1000 * bp[1])\\n\",\n    \"        print(s)\\n\",\n    \"\\n\",\n    \"alpha = 0.9\\n\",\n    \"#ns = ['Piano.mf.E3.wav', 'Piano.mf.Ab3.wav', 'Piano.mf.C4.wav']\\n\",\n    \"ns = ['Piano.pp.C4.wav', 'Piano.mf.C4.wav', 'Piano.ff.C4.wav']\\n\",\n    \"\\n\",\n    \"#print_hp(harms_dict[n1])\\n\",\n    \"#print_hp(harms_dict[n2])\\n\",\n    \"#print_hp(interp_harm_param(harms_dict[n1], harms_dict[n2], alpha))\\n\",\n    \"#Audio(data=synth_params(interp_harm_param(harms_dict[n1], harms_dict[n2], alpha))[0], rate=sr)\\n\",\n    \"w = []\\n\",\n    \"for start in [0, 1]:\\n\",\n    \"    n1 = ns[start]\\n\",\n    \"    n2 = ns[start + 1]\\n\",\n    \"    for alpha in np.linspace(0, 1, 4, endpoint=False):\\n\",\n    \"        w.append(synth_params(interp_harm_param(harms_dict[n1], harms_dict[n2], alpha))[0][:sr])\\n\",\n    \"w = np.concat(w)\\n\",\n    \"Audio(data=w, rate=sr)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"06082d70-e4f1-4471-ba16-b20af0fc7121\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"wavwrite(w, sr, '/tmp/tmp.wav')\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"38a1588a-90b0-4e59-ad33-b38455c83db6\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Compare to pure scaling\\n\",\n    \"audio = synth_params(harms_dict[ns[1]])[0][:sr]\\n\",\n    \"ww = []\\n\",\n    \"for alpha in np.linspace(0, np.log(100/7), 10):\\n\",\n    \"    ww.append(np.exp(alpha) * 0.2 * audio)\\n\",\n    \"ww = np.concat(ww)\\n\",\n    \"wavwrite(ww, sr, '/tmp/tmp2.wav')\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"0d1e2e2e-70d3-4447-aee5-c67b0fdb94e7\",\n   \"metadata\": {},\n   \"source\": [\n    \"# New plan:\\n\",\n    \"- Each note is described by a conformal set of parameters\\n\",\n    \"  - exactly one param set per harmonic (so harmonics of different notes are always in the same place)\\n\",\n    \"  - harmonic envelopes are sampled at a fixed set of log-spaced times (so we can interpolate notes without changing timing)\\n\",\n    \"We write the analysis out as a big blob:\\n\",\n    \" - A single vector of harmonic envelope time intervals (odd-numbered values of BP lists, e.g. 20 of them)\\n\",\n    \" - An array giving the base note, base velocity, and # harmonics for all the described notes.  For octaves 1-7 with 3 notes/oct ('C', 'E', 'Ab') and 3 velocities ('pp', 'mf', 'ff'), that's 63 notes.  At up to 20 harmonics per ote, that's 1260 harmonics.\\n\",\n    \" - A big array giving the 20 target values per harmonic per note.  Maybe these should be in dB, and 8 bit integers?  With 1260 harmonics, that's a total of 25,200 values (100 kB in float32).\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"14e41472-4bdc-45e1-9544-7e7785669527\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Construct the piano-params.json file.\\n\",\n    \"# Contents are:\\n\",\n    \"#   sample_times_ms - single vector of fixed log-spaced envelope sample times (in int16 integer ms)\\n\",\n    \"#   notes - Array of MIDI notes\\n\",\n    \"#   velocities - Array of strike velocities available for each note, the same for all notes\\n\",\n    \"#   num_harmonics - Array of (num_notes * num_velocities) counts of how many harmonics are defined for each note.\\n\",\n    \"#   harmonics_freq - Vector of (total_num_harmonics) int16s giving freq for each harmonic in cents 6900 = 440 Hz.\\n\",\n    \"#   harmonics_mags - Array of (total_num_harmonics, 20) uint8s giving 20 envelope samples for each harmonic.  In dB re: -130.\\n\",\n    \"\\n\",\n    \"# sample_times_ms is defined upscript.\\n\",\n    \"#print(f'{len(sample_times_ms)=}')\\n\",\n    \"#print(sample_times_ms)\\n\",\n    \"\\n\",\n    \"def filename_of_note_vel(note, vel):\\n\",\n    \"    return ('Piano.' + \\n\",\n    \"            {40: 'pp', 80: 'mf', 120: 'ff'}[velocity] + \\n\",\n    \"            '.' +\\n\",\n    \"            {0: 'C', 4: 'E', 8: 'Ab'}[note % 12] + str((note - 12) // 12) + \\n\",\n    \"            '.wav')\\n\",\n    \"\\n\",\n    \"def note_vel_of_filename(filename):\\n\",\n    \"    _, vel, note, _ = filename.split('.')\\n\",\n    \"    vel_val = {'pp': 40, 'mf': 80, 'ff': 120}[vel]\\n\",\n    \"    note_name = note[:-1]\\n\",\n    \"    note_oct = int(note[-1])\\n\",\n    \"    note_val = {'C': 0, 'E': 4, 'Ab': 8}[note_name] + 12 * note_oct + 12  # C4 is midi note 60.\\n\",\n    \"    return note_val, vel_val\\n\",\n    \"\\n\",\n    \"# Extract notes from filenames.\\n\",\n    \"assert set(filenames) == set(harms_dict.keys())\\n\",\n    \"velocities = set()\\n\",\n    \"notes = set()\\n\",\n    \"for filename in filenames:\\n\",\n    \"    note_val, strike_val = note_vel_of_filename(filename)\\n\",\n    \"    velocities.add(strike_val)\\n\",\n    \"    notes.add(note_val)\\n\",\n    \"\\n\",\n    \"notes = sorted(notes)\\n\",\n    \"velocities = sorted(velocities)\\n\",\n    \"#print(notes)\\n\",\n    \"\\n\",\n    \"num_harmonics = []\\n\",\n    \"\\n\",\n    \"for note in notes:\\n\",\n    \"    for velocity in velocities:\\n\",\n    \"        filename = filename_of_note_vel(note, velocity)\\n\",\n    \"        num_harmonics.append(len(harms_dict[filename]))\\n\",\n    \"\\n\",\n    \"total_num_harmonics = sum(num_harmonics)\\n\",\n    \"\\n\",\n    \"harmonics_freq = np.zeros(total_num_harmonics, dtype=int)\\n\",\n    \"harmonics_mags = np.zeros((total_num_harmonics, len(sample_times_ms) - 1), dtype=int)\\n\",\n    \"harmonic_index = 0\\n\",\n    \"\\n\",\n    \"def hz_to_cents(freq_hz):\\n\",\n    \"    \\\"\\\"\\\"Convert freq in hz to cents: 6000 = C4 = 261.63, 6900 = A4 = 440.0.\\\"\\\"\\\"\\n\",\n    \"    return np.round(1200 * np.log2(freq_hz / 440.0) + 6900).astype(int)\\n\",\n    \"\\n\",\n    \"def cents_to_hz(cents):\\n\",\n    \"    \\\"\\\"\\\"Convert freq cents back to Hzin hz to real-valued midi: 60 = C4 = 261.63, 69 = A4 = 440.0.\\\"\\\"\\\"\\n\",\n    \"    return 440 * np.exp2((cents - 6900) / 1200)\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"print(hz_to_cents(440))\\n\",\n    \"print(hz_to_cents(444))\\n\",\n    \"print(cents_to_hz(hz_to_cents(444)))\\n\",\n    \"\\n\",\n    \"for note in notes:\\n\",\n    \"    for velocity in velocities:\\n\",\n    \"        filename = filename_of_note_vel(note, velocity)\\n\",\n    \"        harm_data = harms_dict[filename]\\n\",\n    \"        print(filename, \\\":\\\", len(harm_data), \\\"harmonics\\\")\\n\",\n    \"        for harm in harm_data:\\n\",\n    \"            # harm is [freq, [(time, mag), (time, mag), ...]]\\n\",\n    \"            # Round to 1 dp.\\n\",\n    \"            #harmonics_freq[harmonic_index] = np.round(10 * harm[0]) / 10.0\\n\",\n    \"            # Store freq in \\\"midi cents\\\" (a440 = 6900)\\n\",\n    \"            harmonics_freq[harmonic_index] = hz_to_cents(harm[0])\\n\",\n    \"            mag_info = np.array(harm[1])\\n\",\n    \"            # mag_info may include a final value which is not at a fixed time if it needed a \\\"run out\\\" to get down to -60dB.\\n\",\n    \"            len_mag_info = mag_info.shape[0]\\n\",\n    \"            if len_mag_info > len(sample_times_ms):\\n\",\n    \"                # print(f'{len_mag_info=} {len(sample_times_ms) + 1=}')\\n\",\n    \"                mag_info = mag_info[:-1]\\n\",\n    \"            #print(mag_info.T)\\n\",\n    \"            assert np.all(np.cumsum(mag_info[:, 0]) == sample_times_ms)\\n\",\n    \"            # Offset all harmonics mags as rounded to dB re: -130, the min from above.\\n\",\n    \"            harmonics_mags[harmonic_index] = 130 + np.round(lin_to_db(mag_info[1:, 1])).astype(int)\\n\",\n    \"            harmonic_index += 1\\n\",\n    \"\\n\",\n    \"# 3 notes per octave; 20 harmonics per note (for low notes), so C4 = 3 octaves in = 180 harmonics in.\\n\",\n    \"print(harmonics_freq[178:190])\\n\",\n    \"print(harmonics_mags[178:190])\\n\",\n    \"print(harmonic_index, \\\"total harmonics in\\\", len(notes) * len(velocities), \\\"notes\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"a012cd30-f232-4c00-a7d9-5d4437e351f5\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Save out the json file.\\n\",\n    \"data = {\\n\",\n    \"    # Drop the initial zero in sample_times_ms.  Initial sample is always 0.\\n\",\n    \"    'sample_times_ms': sample_times_ms[1:].tolist(),\\n\",\n    \"    'notes': notes,\\n\",\n    \"    'velocities': velocities,\\n\",\n    \"    'num_harmonics': num_harmonics,\\n\",\n    \"    'harmonics_freq': harmonics_freq.tolist(),\\n\",\n    \"    'harmonics_mags': harmonics_mags.tolist(),\\n\",\n    \"}\\n\",\n    \"json_file = 'piano-params.json'\\n\",\n    \"with open(json_file, 'w') as f:\\n\",\n    \"    f.write(json.dumps(data))\\n\",\n    \"print('saved to', json_file)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"e2a8b257-09fa-4b6d-b1f6-62e238138151\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"Python 3 (ipykernel)\",\n   \"language\": \"python\",\n   \"name\": \"python3\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.12.6\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"
  },
  {
    "path": "experiments/piano_params.py",
    "content": "# Notes params generated by piano_heterodyne.ipynb\nnotes_params = {\"sample_times_ms\": [4, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096], \"notes\": [24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104], \"velocities\": [40, 80, 120], \"num_harmonics\": [20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 17, 17, 17, 13, 13, 13, 11, 11, 11, 9, 8, 9, 7, 7, 7, 6, 5, 5, 3, 4, 4], \"harmonics_freq\": [2363, 3491, 4191, 4691, 5081, 5398, 5667, 5899, 6109, 6297, 6466, 6621, 6765, 6899, 7024, 7142, 7255, 7361, 7462, 7559, 2172, 3587, 4287, 4787, 5175, 5493, 5762, 5996, 6205, 6393, 6561, 6716, 6860, 6993, 7118, 7238, 7349, 7456, 7556, 7653, 2394, 3588, 4289, 4787, 5176, 5495, 5764, 5998, 6207, 6395, 6564, 6717, 6862, 6995, 7120, 7241, 7351, 7458, 7557, 7654, 2851, 3989, 4692, 5187, 5576, 5893, 6161, 6394, 6600, 6785, 6952, 7105, 7246, 7379, 7501, 7616, 7724, 7828, 7925, 8019, 3069, 3987, 4692, 5187, 5577, 5892, 6161, 6393, 6600, 6784, 6952, 7105, 7246, 7379, 7501, 7616, 7725, 7828, 7926, 8019, 3008, 3989, 4693, 5188, 5577, 5894, 6162, 6395, 6601, 6785, 6953, 7106, 7247, 7379, 7502, 7617, 7726, 7829, 7927, 8019, 3114, 4391, 5094, 5596, 5984, 6300, 6567, 6804, 7008, 7191, 7358, 7512, 7653, 7784, 7906, 8022, 8130, 8233, 8330, 8424, 3224, 4390, 5096, 5595, 5983, 6299, 6567, 6800, 7006, 7190, 7358, 7512, 7653, 7784, 7906, 8022, 8130, 8232, 8330, 8422, 3275, 4391, 5099, 5598, 5985, 6300, 6567, 6805, 7008, 7191, 7358, 7513, 7654, 7785, 7907, 8022, 8130, 8233, 8330, 8423, 3610, 4789, 5497, 5999, 6386, 6702, 6972, 7205, 7411, 7596, 7763, 7916, 8055, 8189, 8314, 8427, 8551, 8655, 8819, 8852, 3623, 4792, 5493, 5999, 6385, 6702, 6972, 7205, 7411, 7596, 7763, 7916, 8054, 8189, 8313, 8426, 8538, 8639, 8737, 8831, 3646, 4792, 5491, 6000, 6386, 6703, 6973, 7206, 7412, 7597, 7764, 7919, 8054, 8190, 8313, 8427, 8540, 8641, 8739, 8832, 4008, 5200, 5904, 6402, 6790, 7106, 7376, 7608, 7815, 7998, 8165, 8318, 8460, 8591, 8716, 8828, 8942, 9042, 9140, 9229, 4008, 5200, 5903, 6403, 6789, 7106, 7376, 7607, 7815, 7999, 8165, 8318, 8460, 8591, 8714, 8828, 8937, 9040, 9137, 9228, 4010, 5201, 5903, 6404, 6790, 7108, 7376, 7608, 7816, 7999, 8166, 8318, 8461, 8592, 8714, 8829, 8938, 9040, 9137, 9228, 4398, 5600, 6302, 6802, 7189, 7506, 7774, 8007, 8213, 8398, 8566, 8720, 8860, 8992, 9130, 9234, 9347, 9448, 9543, 9645, 4398, 5599, 6303, 6801, 7188, 7507, 7773, 8006, 8213, 8397, 8565, 8717, 8858, 8990, 9112, 9227, 9334, 9438, 9536, 9629, 4400, 5598, 6304, 6803, 7190, 7508, 7775, 8008, 8215, 8398, 8566, 8718, 8860, 8991, 9113, 9228, 9337, 9440, 9536, 9629, 4782, 6001, 6703, 7203, 7591, 7907, 8175, 8410, 8623, 8800, 8966, 9124, 9265, 9407, 9526, 9658, 9778, 9886, 9995, 10084, 4797, 6000, 6702, 7204, 7591, 7907, 8174, 8407, 8615, 8797, 8964, 9117, 9258, 9389, 9511, 9625, 9735, 9837, 9934, 10027, 4801, 6002, 6703, 7205, 7592, 7908, 8176, 8408, 8616, 8798, 8966, 9118, 9259, 9390, 9512, 9626, 9736, 9838, 9934, 10028, 5204, 6408, 7107, 7608, 7994, 8311, 8580, 8812, 9020, 9202, 9373, 9527, 9666, 9802, 9927, 10042, 10158, 10256, 10348, 10446, 5206, 6408, 7107, 7608, 7994, 8311, 8580, 8812, 9019, 9205, 9372, 9526, 9667, 9799, 9916, 10038, 10147, 10251, 10349, 10444, 5208, 6409, 7108, 7609, 7995, 8312, 8581, 8812, 9020, 9205, 9373, 9527, 9668, 9800, 9921, 10039, 10147, 10252, 10351, 10443, 5606, 6807, 7508, 8009, 8396, 8714, 8994, 9205, 9428, 9629, 9787, 9941, 10072, 10212, 10347, 10463, 10569, 10668, 10765, 10858, 5603, 6807, 7509, 8009, 8396, 8714, 8983, 9216, 9423, 9609, 9778, 9932, 10072, 10209, 10335, 10452, 10563, 10667, 10767, 10863, 5599, 6808, 7510, 8010, 8397, 8715, 8984, 9217, 9425, 9611, 9779, 9934, 10075, 10210, 10334, 10451, 10562, 10667, 10767, 10862, 6002, 7204, 7909, 8408, 8797, 9126, 9394, 9638, 9844, 10034, 10201, 10348, 10493, 10621, 10748, 10862, 10970, 11069, 11174, 11257, 6003, 7204, 7908, 8408, 8796, 9115, 9385, 9621, 9828, 10021, 10187, 10345, 10491, 10627, 10753, 10871, 10986, 11088, 11192, 11288, 6004, 7205, 7909, 8408, 8797, 9115, 9386, 9621, 9829, 10018, 10187, 10344, 10489, 10624, 10751, 10871, 10984, 11092, 11195, 11293, 6406, 7603, 8310, 8811, 9197, 9528, 9807, 10043, 10310, 10430, 10611, 10767, 10911, 11047, 11174, 11285, 11400, 11508, 11611, 11699, 6409, 7602, 8310, 8811, 9201, 9522, 9794, 10031, 10263, 10429, 10610, 10767, 10921, 11054, 11187, 11305, 11406, 11526, 11633, 11728, 6410, 7602, 8310, 8812, 9202, 9522, 9795, 10031, 10241, 10432, 10606, 10764, 10909, 11053, 11183, 11307, 11421, 11535, 11641, 11743, 6806, 8006, 8712, 9210, 9616, 9933, 10237, 10412, 10652, 10840, 11011, 11164, 11299, 11410, 11549, 11675, 11779, 11888, 11975, 12073, 6807, 8006, 8713, 9214, 9606, 9928, 10202, 10441, 10658, 10855, 11030, 11209, 11350, 11483, 11616, 11733, 11855, 11956, 12071, 12180, 6808, 8007, 8714, 9215, 9607, 9929, 10203, 10442, 10656, 10850, 11025, 11260, 11338, 11485, 11618, 11744, 11868, 11975, 12091, 12198, 7203, 8404, 9117, 9628, 10035, 10354, 10659, 10914, 11147, 11380, 11552, 11716, 11904, 12052, 12205, 12350, 12490, 12629, 12753, 12885, 7203, 8405, 9112, 9616, 10012, 10339, 10621, 10863, 11067, 11254, 11419, 11587, 11729, 11876, 12000, 12124, 12241, 12353, 12456, 12562, 7203, 8406, 9112, 9617, 10012, 10337, 10615, 10859, 11077, 11248, 11460, 11652, 11791, 11940, 12076, 12212, 12324, 12430, 12541, 12648, 7606, 8805, 9529, 10039, 10389, 10754, 11037, 11275, 11460, 11674, 11852, 12002, 12155, 12296, 12430, 12553, 12680, 12791, 12898, 13007, 7607, 8809, 9516, 10022, 10413, 10745, 11028, 11274, 11465, 11672, 11849, 12002, 12160, 12296, 12430, 12553, 12673, 12793, 12899, 13003, 7607, 8809, 9516, 10020, 10415, 10744, 11025, 11273, 11492, 11680, 11880, 12068, 12212, 12358, 12494, 12627, 12752, 12878, 12993, 13110, 8006, 9206, 9946, 10405, 10854, 11193, 11444, 11706, 11936, 12136, 12320, 12490, 12660, 12814, 12959, 13093, 13237, 8007, 9203, 9925, 10423, 10846, 11183, 11436, 11694, 11926, 12117, 12295, 12461, 12621, 12767, 12911, 13051, 13177, 8008, 9212, 9921, 10428, 10830, 11162, 11443, 11703, 11930, 12135, 12321, 12495, 12659, 12815, 12960, 13102, 13241, 8400, 9616, 10349, 10895, 11315, 11634, 11922, 12169, 12402, 12618, 12813, 13015, 13183, 8398, 9607, 10331, 10859, 11293, 11620, 11911, 12158, 12386, 12597, 12790, 12979, 13148, 8400, 9614, 10323, 10842, 11255, 11606, 11902, 12163, 12395, 12617, 12820, 13012, 13186, 8802, 10047, 10789, 11338, 11714, 12032, 12335, 12599, 12833, 13055, 13264, 8809, 10024, 10758, 11307, 11704, 12027, 12332, 12600, 12838, 13051, 13262, 8810, 10018, 10730, 11263, 11677, 12025, 12336, 12607, 12848, 13066, 13282, 9119, 10411, 11221, 11722, 12116, 12449, 12735, 13015, 13246, 9211, 10418, 11212, 11719, 12131, 12476, 12767, 13048, 9216, 10420, 11163, 11688, 12105, 12453, 12745, 13030, 13271, 9341, 10828, 11588, 12106, 12512, 12830, 13106, 9578, 10866, 11617, 12155, 12598, 12960, 13292, 9613, 10827, 11575, 12112, 12547, 12902, 13211, 9520, 11256, 12011, 12541, 12935, 13269, 9943, 11276, 12039, 12603, 13022, 9996, 11242, 12016, 12585, 13016, 8908, 11863, 12902, 10199, 11574, 12376, 12924, 10409, 11646, 12421, 12947], \"harmonics_mags\": [[39, 40, 41, 41, 38, 38, 39, 40, 40, 46, 43, 40, 22, 40, 32, 31, 36, 34, 44, 37], [52, 53, 55, 56, 56, 52, 45, 53, 47, 50, 50, 53, 52, 53, 52, 52, 52, 50, 47, 46], [65, 68, 70, 72, 73, 73, 72, 73, 72, 72, 72, 73, 72, 72, 71, 71, 70, 70, 68, 67], [69, 71, 72, 73, 75, 76, 77, 77, 75, 75, 76, 75, 75, 74, 73, 71, 69, 68, 64, 59], [69, 71, 72, 73, 74, 73, 74, 74, 75, 74, 74, 74, 73, 73, 71, 70, 67, 64, 59, 55], [68, 70, 72, 73, 75, 76, 77, 76, 73, 73, 73, 73, 72, 72, 71, 70, 68, 66, 63, 59], [52, 52, 52, 52, 53, 53, 50, 52, 53, 51, 52, 52, 52, 52, 52, 51, 50, 50, 48, 44], [42, 41, 42, 47, 53, 56, 56, 57, 59, 59, 56, 55, 51, 47, 44, 44, 38, 31, 19, 32], [48, 52, 54, 56, 58, 60, 61, 63, 62, 63, 63, 63, 62, 62, 60, 59, 56, 54, 49, 43], [56, 57, 57, 58, 59, 60, 61, 62, 64, 64, 64, 63, 62, 61, 59, 57, 53, 51, 46, 43], [47, 44, 50, 56, 62, 65, 67, 67, 66, 65, 64, 63, 62, 62, 60, 58, 54, 50, 42, 36], [60, 63, 64, 65, 68, 69, 71, 71, 71, 72, 71, 71, 70, 70, 69, 67, 64, 61, 51, 43], [58, 60, 61, 62, 63, 64, 64, 64, 66, 66, 66, 66, 65, 64, 63, 62, 59, 56, 50, 43], [44, 50, 54, 57, 60, 62, 63, 63, 62, 62, 62, 61, 61, 60, 60, 59, 57, 55, 49, 44], [51, 53, 54, 56, 57, 58, 58, 58, 61, 61, 61, 61, 60, 59, 57, 55, 52, 48, 36, 44], [45, 46, 47, 47, 47, 47, 47, 47, 44, 39, 50, 51, 47, 44, 45, 45, 44, 43, 40, 38], [46, 48, 49, 50, 49, 48, 45, 41, 42, 43, 43, 37, 37, 34, 34, 29, 23, 33, 35, 34], [48, 49, 51, 52, 53, 54, 54, 55, 54, 54, 54, 55, 53, 53, 51, 49, 46, 40, 28, 38], [50, 51, 52, 53, 53, 53, 53, 53, 53, 52, 52, 52, 51, 51, 50, 49, 46, 43, 32, 25], [49, 51, 52, 53, 53, 53, 51, 49, 48, 49, 49, 48, 48, 48, 47, 46, 45, 44, 43, 42], [38, 36, 36, 36, 33, 30, 34, 44, 47, 42, 41, 35, 41, 39, 42, 37, 44, 42, 40, 38], [55, 59, 62, 64, 67, 66, 59, 57, 61, 59, 59, 59, 60, 58, 58, 57, 57, 56, 56, 53], [70, 73, 76, 79, 81, 82, 79, 79, 81, 80, 80, 79, 79, 79, 78, 77, 75, 74, 71, 68], [73, 76, 77, 78, 79, 79, 79, 76, 78, 77, 77, 77, 76, 76, 75, 75, 73, 71, 67, 61], [74, 77, 79, 81, 83, 84, 84, 82, 84, 83, 83, 83, 83, 82, 81, 80, 79, 77, 73, 69], [71, 73, 75, 76, 78, 79, 78, 79, 79, 79, 78, 78, 78, 78, 77, 76, 75, 74, 72, 69], [66, 68, 69, 69, 69, 68, 65, 64, 66, 69, 69, 69, 68, 68, 67, 66, 65, 63, 61, 58], [62, 62, 62, 62, 65, 68, 70, 71, 72, 71, 69, 68, 67, 65, 63, 61, 57, 51, 44, 43], [54, 58, 61, 64, 67, 66, 65, 67, 66, 66, 67, 66, 66, 65, 64, 63, 61, 59, 55, 51], [62, 63, 65, 66, 63, 50, 63, 61, 49, 44, 52, 50, 48, 50, 49, 48, 50, 51, 51, 51], [59, 62, 65, 67, 72, 75, 77, 77, 76, 74, 72, 70, 69, 68, 65, 63, 58, 52, 40, 47], [66, 68, 69, 70, 70, 70, 70, 72, 73, 74, 73, 72, 71, 70, 68, 66, 62, 60, 56, 52], [57, 60, 64, 67, 71, 72, 69, 67, 69, 71, 73, 72, 72, 71, 70, 69, 67, 64, 59, 54], [61, 64, 67, 69, 71, 73, 75, 74, 74, 75, 74, 74, 74, 73, 72, 71, 68, 66, 66, 64], [48, 48, 46, 44, 53, 59, 62, 64, 58, 56, 57, 52, 54, 53, 52, 53, 54, 54, 53, 49], [53, 55, 56, 58, 62, 65, 68, 67, 63, 42, 57, 46, 54, 57, 57, 50, 54, 51, 50, 48], [56, 59, 61, 62, 62, 58, 43, 50, 52, 51, 49, 47, 47, 47, 45, 45, 44, 44, 33, 34], [59, 60, 60, 60, 59, 55, 44, 48, 41, 44, 45, 46, 45, 43, 42, 44, 40, 39, 39, 32], [56, 59, 61, 63, 64, 65, 65, 64, 63, 63, 63, 62, 62, 62, 63, 62, 60, 57, 57, 51], [51, 55, 59, 61, 63, 64, 64, 62, 56, 50, 52, 54, 54, 52, 54, 52, 52, 51, 49, 45], [45, 45, 44, 49, 54, 58, 57, 42, 53, 50, 57, 43, 48, 54, 29, 47, 47, 48, 42, 42], [67, 70, 74, 76, 79, 80, 76, 69, 73, 71, 68, 69, 70, 69, 69, 69, 67, 66, 65, 63], [77, 81, 84, 86, 90, 92, 92, 91, 93, 92, 92, 91, 91, 91, 90, 89, 88, 86, 83, 80], [79, 84, 86, 88, 90, 90, 90, 88, 88, 87, 88, 87, 86, 86, 85, 84, 83, 81, 77, 72], [76, 82, 86, 89, 93, 95, 96, 95, 96, 96, 96, 95, 95, 94, 93, 92, 90, 88, 84, 80], [81, 84, 86, 88, 90, 91, 90, 89, 90, 89, 89, 88, 88, 88, 87, 87, 86, 85, 83, 81], [77, 79, 81, 82, 82, 81, 78, 76, 79, 80, 81, 80, 80, 79, 79, 78, 76, 74, 71, 68], [76, 77, 78, 78, 77, 79, 83, 85, 86, 85, 83, 83, 81, 79, 77, 75, 70, 62, 56, 52], [69, 69, 70, 73, 79, 81, 78, 76, 80, 78, 79, 78, 78, 78, 76, 75, 73, 70, 65, 61], [76, 78, 78, 79, 78, 69, 77, 76, 67, 67, 68, 70, 67, 67, 62, 58, 55, 57, 60, 62], [74, 76, 78, 80, 83, 85, 89, 89, 89, 88, 85, 83, 82, 81, 79, 78, 74, 70, 61, 54], [66, 72, 76, 79, 82, 84, 86, 87, 86, 86, 85, 85, 84, 83, 81, 80, 76, 74, 68, 64], [66, 67, 71, 76, 82, 85, 85, 82, 83, 84, 84, 83, 83, 83, 82, 80, 79, 76, 72, 67], [63, 68, 73, 76, 81, 84, 87, 87, 86, 86, 86, 87, 86, 85, 84, 83, 80, 76, 75, 75], [56, 56, 56, 55, 59, 67, 73, 77, 80, 79, 78, 70, 73, 73, 71, 66, 67, 67, 65, 61], [56, 53, 53, 61, 72, 78, 82, 80, 73, 77, 72, 74, 75, 76, 74, 56, 70, 64, 63, 61], [71, 74, 76, 78, 79, 77, 57, 70, 70, 70, 64, 63, 65, 66, 61, 63, 61, 59, 50, 50], [72, 74, 75, 76, 75, 73, 67, 72, 69, 68, 69, 70, 67, 66, 64, 64, 60, 58, 56, 51], [67, 71, 75, 77, 80, 81, 82, 82, 82, 81, 81, 80, 80, 80, 79, 78, 76, 73, 71, 66], [60, 65, 71, 74, 79, 81, 82, 81, 81, 79, 79, 77, 78, 76, 74, 71, 70, 68, 64, 61], [41, 41, 40, 38, 39, 38, 32, 40, 38, 46, 42, 32, 43, 38, 23, 41, 45, 37, 35, 45], [58, 63, 66, 69, 70, 70, 73, 73, 75, 76, 76, 76, 75, 74, 69, 63, 50, 43, 29, 34], [67, 70, 72, 73, 75, 76, 77, 77, 74, 74, 76, 75, 74, 73, 72, 70, 68, 65, 59, 52], [64, 68, 71, 72, 74, 74, 73, 72, 74, 74, 74, 74, 73, 73, 72, 72, 70, 69, 66, 64], [65, 67, 69, 70, 71, 71, 71, 71, 71, 71, 72, 71, 71, 70, 69, 68, 66, 64, 59, 51], [62, 64, 66, 67, 67, 66, 63, 65, 68, 68, 69, 70, 70, 69, 68, 66, 63, 60, 55, 50], [63, 65, 66, 67, 68, 67, 68, 67, 66, 67, 67, 67, 67, 66, 65, 64, 63, 61, 57, 53], [39, 39, 42, 45, 49, 50, 45, 44, 47, 48, 47, 48, 46, 46, 44, 45, 42, 39, 37, 33], [43, 44, 45, 47, 50, 51, 50, 52, 53, 50, 50, 50, 50, 47, 46, 46, 47, 43, 41, 40], [44, 43, 39, 24, 45, 50, 54, 54, 54, 55, 55, 56, 55, 54, 54, 53, 52, 51, 48, 45], [36, 46, 51, 55, 58, 60, 61, 63, 63, 63, 64, 63, 63, 63, 62, 61, 59, 57, 53, 50], [51, 54, 56, 57, 58, 59, 60, 60, 59, 60, 60, 59, 59, 58, 58, 56, 54, 53, 49, 46], [45, 48, 50, 52, 51, 53, 58, 58, 58, 59, 59, 59, 59, 59, 59, 58, 57, 54, 48, 40], [43, 46, 49, 51, 56, 60, 62, 61, 62, 62, 61, 60, 59, 58, 56, 55, 53, 49, 21, 35], [46, 47, 48, 49, 49, 50, 51, 52, 53, 53, 53, 53, 52, 51, 49, 47, 41, 35, 42, 42], [38, 40, 40, 41, 40, 40, 41, 38, 37, 39, 37, 35, 35, 33, 29, 19, 28, 32, 31, 14], [28, 28, 26, 23, 25, 28, 32, 30, 34, 31, 31, 29, 21, 31, 27, 18, 13, 19, 14, 10], [38, 40, 41, 41, 41, 42, 43, 43, 43, 43, 43, 43, 41, 38, 31, 18, 37, 38, 24, 30], [34, 37, 39, 40, 42, 41, 39, 41, 40, 40, 39, 38, 38, 36, 29, 26, 35, 33, 25, 22], [24, 27, 29, 30, 29, 29, 31, 28, 28, 30, 30, 32, 30, 32, 26, 20, 24, 24, 25, 21], [47, 48, 46, 41, 45, 42, 48, 47, 47, 48, 46, 51, 47, 43, 48, 38, 42, 27, 42, 34], [47, 60, 67, 71, 76, 77, 79, 80, 81, 82, 82, 81, 80, 78, 76, 73, 65, 51, 42, 38], [65, 71, 75, 77, 80, 82, 83, 83, 81, 81, 82, 81, 81, 79, 78, 76, 72, 70, 65, 60], [63, 69, 73, 76, 80, 81, 81, 79, 80, 81, 80, 80, 80, 79, 79, 78, 77, 75, 73, 71], [67, 71, 73, 75, 77, 78, 78, 78, 78, 78, 79, 78, 78, 77, 77, 76, 74, 72, 66, 59], [65, 69, 72, 74, 75, 75, 73, 72, 75, 77, 78, 78, 78, 78, 77, 75, 72, 69, 63, 57], [68, 71, 73, 75, 76, 76, 76, 76, 75, 76, 76, 76, 75, 75, 74, 73, 71, 69, 65, 62], [47, 45, 35, 42, 56, 59, 57, 53, 56, 55, 54, 55, 54, 55, 53, 52, 51, 50, 47, 44], [56, 56, 57, 57, 59, 60, 60, 62, 61, 61, 59, 60, 60, 59, 57, 58, 55, 54, 51, 48], [55, 57, 58, 56, 46, 57, 63, 65, 65, 66, 67, 66, 66, 66, 65, 64, 63, 62, 58, 55], [43, 51, 57, 62, 67, 70, 71, 73, 74, 74, 75, 74, 74, 74, 73, 72, 70, 69, 65, 61], [56, 61, 64, 67, 69, 70, 72, 72, 71, 71, 71, 71, 71, 70, 70, 69, 68, 66, 63, 60], [55, 58, 61, 63, 65, 63, 70, 71, 71, 72, 72, 72, 72, 72, 72, 71, 69, 67, 61, 56], [53, 56, 58, 61, 66, 71, 76, 76, 76, 76, 75, 75, 73, 72, 70, 69, 67, 62, 37, 51], [55, 59, 61, 63, 64, 64, 66, 66, 67, 67, 67, 67, 66, 65, 62, 60, 52, 50, 55, 56], [52, 54, 56, 57, 56, 55, 56, 55, 53, 54, 52, 52, 50, 49, 43, 31, 45, 48, 44, 28], [46, 47, 48, 47, 43, 44, 48, 49, 49, 48, 49, 47, 46, 45, 39, 28, 38, 42, 34, 34], [53, 57, 59, 61, 61, 61, 62, 62, 62, 61, 61, 60, 57, 55, 45, 45, 55, 54, 46, 46], [51, 54, 57, 59, 61, 62, 61, 61, 61, 60, 59, 59, 57, 55, 45, 46, 55, 52, 47, 42], [45, 48, 51, 52, 54, 55, 57, 56, 58, 59, 59, 59, 59, 57, 51, 47, 56, 48, 51, 47], [60, 59, 58, 56, 60, 63, 63, 44, 60, 60, 54, 53, 46, 40, 43, 44, 41, 40, 44, 47], [67, 73, 79, 82, 87, 88, 89, 92, 93, 93, 92, 91, 89, 87, 86, 85, 81, 76, 60, 44], [69, 77, 82, 86, 89, 92, 94, 94, 93, 93, 94, 93, 92, 92, 90, 88, 84, 80, 73, 66], [73, 78, 82, 86, 90, 92, 92, 90, 90, 92, 91, 91, 91, 90, 90, 88, 87, 86, 83, 80], [74, 78, 81, 83, 86, 88, 89, 89, 90, 89, 90, 89, 89, 88, 88, 87, 85, 84, 79, 72], [66, 74, 79, 82, 86, 88, 87, 84, 86, 87, 87, 88, 88, 87, 86, 84, 82, 80, 74, 68], [80, 83, 85, 87, 90, 90, 91, 90, 89, 90, 90, 90, 89, 89, 88, 87, 85, 83, 79, 76], [56, 56, 63, 68, 74, 77, 74, 67, 69, 69, 68, 68, 68, 68, 67, 65, 63, 62, 59, 55], [71, 73, 74, 75, 75, 75, 73, 74, 73, 75, 72, 72, 72, 71, 67, 71, 67, 65, 63, 60], [65, 68, 70, 70, 71, 76, 77, 79, 79, 80, 80, 80, 80, 80, 79, 78, 76, 75, 72, 68], [65, 70, 73, 76, 81, 83, 86, 87, 88, 89, 89, 88, 87, 87, 86, 85, 84, 83, 79, 76], [67, 73, 77, 80, 83, 83, 85, 86, 85, 84, 84, 84, 84, 83, 82, 81, 79, 78, 74, 72], [66, 70, 73, 77, 81, 80, 83, 86, 86, 84, 86, 85, 85, 84, 84, 83, 82, 80, 74, 68], [64, 69, 72, 76, 83, 88, 93, 93, 93, 93, 92, 92, 90, 88, 86, 85, 84, 80, 54, 66], [71, 76, 79, 81, 83, 83, 85, 85, 87, 87, 86, 85, 84, 82, 78, 74, 62, 70, 73, 71], [69, 72, 74, 75, 76, 76, 75, 73, 72, 69, 67, 64, 64, 61, 47, 51, 62, 64, 58, 50], [65, 67, 67, 66, 63, 64, 68, 69, 70, 71, 70, 69, 68, 67, 61, 44, 61, 64, 55, 55], [70, 74, 77, 79, 81, 81, 81, 80, 81, 81, 81, 81, 79, 77, 69, 61, 75, 75, 65, 67], [70, 73, 75, 77, 79, 80, 80, 79, 80, 78, 78, 76, 74, 72, 60, 64, 71, 69, 63, 58], [64, 68, 72, 74, 76, 77, 77, 74, 75, 75, 75, 75, 75, 75, 71, 67, 69, 66, 65, 59], [54, 54, 53, 50, 43, 45, 53, 42, 41, 37, 38, 44, 34, 43, 47, 41, 46, 45, 44, 45], [68, 72, 74, 75, 77, 77, 76, 75, 74, 75, 73, 72, 72, 71, 70, 68, 64, 61, 62, 63], [65, 67, 68, 67, 63, 60, 62, 61, 60, 56, 58, 56, 59, 58, 57, 56, 54, 55, 52, 50], [68, 70, 71, 72, 71, 70, 70, 70, 69, 68, 68, 68, 67, 66, 63, 60, 53, 52, 52, 47], [70, 72, 73, 73, 74, 75, 76, 76, 77, 77, 77, 77, 75, 74, 71, 68, 59, 55, 63, 63], [65, 66, 67, 67, 67, 67, 67, 69, 70, 70, 70, 70, 69, 68, 67, 66, 62, 54, 52, 57], [54, 56, 58, 59, 60, 61, 60, 58, 53, 53, 55, 55, 53, 53, 50, 48, 42, 32, 38, 41], [46, 48, 50, 49, 45, 44, 44, 36, 37, 38, 40, 39, 38, 37, 38, 32, 35, 32, 19, 24], [54, 54, 54, 55, 56, 57, 54, 50, 47, 48, 48, 48, 48, 45, 45, 42, 39, 34, 34, 40], [62, 64, 65, 65, 66, 67, 66, 67, 67, 67, 67, 66, 66, 65, 63, 62, 58, 55, 46, 38], [62, 63, 64, 64, 63, 62, 60, 60, 60, 60, 60, 59, 57, 55, 49, 31, 50, 52, 46, 43], [60, 61, 62, 63, 63, 63, 61, 61, 62, 61, 61, 60, 58, 56, 51, 44, 42, 47, 44, 36], [55, 56, 57, 58, 58, 58, 56, 56, 55, 55, 54, 52, 52, 50, 46, 42, 34, 38, 42, 40], [51, 52, 52, 52, 52, 51, 51, 51, 52, 53, 52, 52, 52, 52, 50, 49, 46, 46, 42, 10], [47, 49, 50, 51, 51, 50, 51, 51, 51, 50, 49, 48, 47, 45, 41, 38, 31, 36, 37, 34], [36, 37, 38, 38, 37, 37, 37, 36, 38, 37, 38, 38, 36, 33, 31, 30, 25, 22, 24, 23], [25, 26, 27, 27, 29, 28, 26, 29, 28, 26, 21, 23, 23, 20, 16, 16, 15, 21, 17, 18], [34, 35, 36, 37, 37, 36, 34, 35, 36, 36, 36, 35, 34, 34, 31, 28, 23, 20, 19, 20], [34, 35, 36, 36, 36, 37, 36, 35, 36, 34, 33, 32, 30, 24, 24, 27, 28, 27, 19, 18], [29, 31, 32, 32, 31, 31, 29, 33, 33, 30, 29, 31, 30, 30, 26, 27, 26, 16, 15, 19], [53, 60, 62, 64, 63, 58, 59, 56, 47, 56, 50, 56, 50, 53, 50, 48, 50, 41, 48, 44], [62, 69, 74, 78, 83, 85, 86, 84, 82, 83, 81, 81, 80, 79, 78, 76, 71, 68, 71, 70], [57, 62, 70, 74, 76, 72, 70, 69, 68, 64, 63, 64, 65, 65, 64, 63, 63, 62, 61, 59], [68, 74, 77, 79, 81, 81, 78, 78, 78, 76, 76, 75, 74, 73, 71, 68, 61, 58, 61, 58], [71, 76, 80, 82, 83, 84, 86, 86, 88, 87, 87, 86, 85, 84, 82, 79, 68, 66, 74, 74], [64, 70, 74, 77, 78, 78, 78, 79, 81, 81, 80, 80, 80, 79, 78, 76, 72, 66, 60, 67], [66, 68, 69, 70, 71, 72, 73, 72, 68, 65, 66, 66, 65, 65, 64, 62, 59, 54, 41, 50], [57, 59, 61, 61, 61, 57, 57, 53, 51, 53, 51, 53, 54, 50, 50, 49, 45, 40, 31, 29], [64, 67, 68, 68, 69, 70, 70, 67, 60, 61, 62, 62, 62, 59, 58, 57, 53, 50, 47, 52], [68, 73, 76, 78, 80, 81, 82, 82, 83, 83, 82, 82, 81, 80, 79, 77, 74, 70, 63, 57], [70, 75, 77, 78, 79, 79, 75, 75, 76, 75, 75, 74, 73, 71, 64, 53, 65, 66, 58, 57], [71, 75, 77, 78, 79, 80, 79, 78, 79, 79, 78, 78, 76, 74, 70, 64, 56, 63, 61, 55], [66, 71, 73, 75, 76, 77, 76, 72, 75, 73, 73, 73, 72, 71, 69, 65, 59, 42, 56, 56], [64, 68, 71, 72, 73, 73, 71, 71, 70, 71, 72, 72, 72, 72, 71, 70, 68, 67, 62, 49], [61, 65, 68, 70, 73, 73, 73, 74, 73, 73, 73, 72, 71, 69, 67, 63, 52, 51, 57, 54], [59, 61, 61, 61, 61, 62, 63, 63, 63, 63, 62, 62, 60, 59, 56, 53, 48, 29, 52, 49], [54, 56, 56, 56, 55, 53, 51, 54, 52, 52, 52, 51, 50, 49, 48, 45, 40, 38, 42, 39], [58, 61, 63, 63, 62, 61, 61, 62, 62, 62, 62, 61, 60, 58, 55, 52, 43, 44, 46, 45], [60, 64, 67, 68, 69, 69, 68, 67, 67, 66, 65, 64, 62, 60, 54, 48, 53, 55, 53, 43], [48, 55, 60, 62, 63, 63, 64, 64, 63, 62, 62, 62, 61, 60, 56, 56, 56, 46, 44, 35], [59, 67, 71, 73, 73, 68, 66, 67, 48, 65, 55, 66, 55, 63, 58, 53, 59, 47, 49, 54], [74, 80, 85, 88, 93, 95, 95, 93, 91, 92, 91, 91, 89, 89, 87, 85, 79, 77, 79, 77], [70, 73, 79, 84, 86, 83, 77, 80, 73, 65, 65, 65, 59, 64, 65, 68, 71, 72, 71, 69], [72, 80, 84, 87, 90, 91, 89, 90, 89, 87, 86, 85, 84, 82, 79, 74, 66, 63, 66, 64], [81, 86, 89, 91, 92, 93, 95, 96, 96, 96, 95, 94, 93, 92, 90, 87, 75, 75, 83, 83], [71, 78, 83, 86, 88, 88, 88, 88, 90, 90, 90, 89, 89, 88, 87, 86, 82, 77, 67, 75], [75, 78, 79, 81, 83, 84, 84, 83, 79, 79, 77, 78, 76, 74, 72, 69, 66, 61, 59, 62], [68, 70, 71, 70, 70, 69, 65, 67, 62, 65, 65, 66, 65, 64, 62, 60, 57, 53, 31, 47], [73, 77, 79, 80, 80, 81, 82, 78, 73, 75, 75, 74, 73, 72, 71, 68, 64, 60, 58, 61], [78, 83, 87, 89, 91, 92, 93, 93, 94, 94, 93, 93, 92, 91, 89, 87, 84, 80, 74, 69], [80, 85, 88, 89, 90, 90, 87, 87, 87, 87, 87, 85, 84, 82, 75, 67, 75, 77, 67, 66], [82, 86, 88, 89, 91, 91, 90, 89, 91, 91, 90, 89, 87, 86, 81, 74, 67, 74, 71, 65], [78, 82, 85, 87, 89, 90, 91, 86, 87, 83, 85, 84, 84, 82, 80, 76, 69, 55, 66, 67], [75, 81, 84, 85, 85, 85, 83, 82, 82, 84, 84, 85, 85, 85, 85, 84, 81, 79, 72, 59], [74, 79, 82, 85, 87, 87, 87, 87, 87, 86, 84, 84, 82, 81, 78, 75, 64, 60, 67, 64], [73, 75, 76, 76, 76, 78, 78, 77, 77, 76, 76, 75, 73, 71, 67, 65, 61, 53, 63, 61], [68, 70, 70, 70, 68, 66, 67, 69, 69, 68, 67, 68, 66, 65, 64, 60, 53, 53, 56, 51], [72, 76, 78, 78, 78, 77, 78, 79, 79, 79, 79, 77, 75, 74, 70, 67, 56, 58, 61, 62], [75, 79, 82, 83, 84, 84, 83, 83, 83, 83, 82, 81, 79, 77, 71, 55, 67, 69, 67, 55], [63, 71, 76, 79, 80, 80, 81, 81, 81, 81, 81, 81, 79, 78, 74, 73, 73, 65, 61, 52], [59, 63, 66, 67, 65, 61, 57, 44, 54, 53, 52, 53, 53, 51, 51, 48, 47, 50, 43, 39], [60, 62, 68, 70, 72, 74, 70, 70, 71, 69, 68, 68, 67, 65, 62, 58, 58, 50, 44, 42], [69, 73, 75, 76, 78, 79, 79, 78, 75, 73, 68, 67, 63, 58, 48, 43, 21, 36, 40, 43], [65, 69, 71, 71, 71, 72, 73, 73, 74, 74, 74, 73, 71, 69, 67, 65, 65, 62, 58, 56], [57, 59, 62, 64, 65, 64, 68, 71, 70, 71, 72, 71, 70, 68, 65, 62, 51, 53, 57, 55], [60, 62, 61, 57, 55, 60, 64, 65, 61, 62, 62, 61, 60, 59, 57, 55, 49, 45, 51, 52], [58, 61, 63, 66, 68, 69, 71, 71, 71, 71, 70, 69, 67, 64, 51, 60, 68, 66, 58, 59], [48, 52, 56, 60, 64, 63, 61, 60, 59, 59, 57, 55, 53, 53, 48, 41, 38, 27, 35, 37], [54, 56, 58, 57, 54, 53, 56, 54, 52, 48, 51, 51, 50, 47, 41, 41, 47, 48, 40, 42], [52, 53, 50, 42, 48, 52, 51, 51, 52, 54, 54, 53, 52, 51, 48, 46, 45, 45, 33, 34], [51, 53, 53, 55, 56, 57, 56, 55, 50, 46, 47, 49, 47, 47, 45, 44, 41, 38, 31, 21], [53, 56, 57, 57, 56, 52, 46, 33, 43, 41, 44, 47, 46, 45, 43, 41, 29, 20, 26, 26], [51, 52, 54, 56, 59, 59, 60, 60, 60, 61, 58, 60, 59, 58, 54, 51, 34, 32, 36, 41], [50, 54, 56, 57, 58, 58, 58, 58, 58, 59, 58, 57, 54, 50, 47, 49, 50, 48, 42, 39], [37, 42, 45, 46, 46, 45, 44, 44, 46, 46, 45, 44, 45, 44, 39, 36, 38, 28, 37, 36], [39, 42, 43, 44, 44, 43, 44, 45, 45, 45, 44, 44, 41, 37, 36, 39, 35, 39, 34, 29], [32, 33, 33, 30, 11, 20, 22, 21, 20, 25, 23, 20, 23, 10, 20, 11, 13, 18, 12, 9], [24, 23, 22, 22, 26, 28, 26, 25, 20, 23, 24, 22, 19, 17, 10, 18, 13, 20, 17, 7], [26, 30, 32, 34, 31, 27, 29, 32, 28, 27, 27, 13, 31, 30, 28, 21, 19, 26, 8, 12], [31, 33, 30, 19, 30, 13, 30, 29, 31, 26, 24, 25, 26, 23, 24, 23, 11, 22, 13, 0], [55, 63, 71, 75, 77, 73, 73, 45, 68, 65, 60, 60, 63, 64, 62, 62, 61, 58, 54, 54], [69, 71, 70, 77, 84, 85, 84, 82, 84, 82, 81, 80, 80, 78, 76, 73, 67, 59, 44, 50], [74, 81, 85, 87, 89, 90, 90, 90, 88, 84, 80, 77, 72, 66, 62, 54, 46, 33, 54, 59], [72, 79, 82, 84, 83, 83, 85, 86, 86, 86, 86, 86, 85, 84, 82, 80, 78, 74, 69, 63], [70, 71, 73, 76, 80, 79, 82, 84, 85, 85, 86, 86, 85, 84, 82, 79, 69, 64, 72, 68], [69, 75, 78, 77, 71, 73, 80, 81, 78, 78, 78, 77, 76, 76, 74, 73, 68, 63, 66, 67], [68, 74, 77, 79, 84, 86, 87, 87, 87, 86, 85, 85, 83, 80, 68, 72, 82, 80, 70, 71], [63, 67, 70, 73, 79, 81, 78, 78, 76, 76, 74, 70, 71, 70, 66, 59, 43, 49, 53, 54], [67, 72, 76, 77, 76, 75, 76, 75, 71, 69, 70, 69, 67, 64, 56, 56, 62, 64, 57, 61], [68, 73, 75, 73, 48, 70, 72, 72, 72, 73, 74, 74, 73, 72, 69, 66, 64, 65, 57, 52], [67, 72, 74, 74, 75, 77, 77, 75, 71, 66, 65, 68, 65, 67, 64, 62, 59, 57, 49, 40], [67, 73, 76, 77, 76, 73, 68, 62, 65, 59, 51, 62, 55, 52, 55, 50, 44, 43, 50, 53], [68, 72, 73, 75, 81, 83, 82, 82, 84, 85, 79, 85, 84, 82, 78, 77, 68, 60, 63, 58], [69, 74, 78, 81, 83, 83, 83, 83, 82, 83, 82, 80, 76, 67, 71, 69, 76, 70, 65, 62], [60, 62, 68, 72, 73, 73, 72, 71, 71, 70, 69, 68, 67, 64, 57, 59, 62, 61, 58, 60], [63, 68, 70, 71, 73, 73, 73, 73, 73, 73, 72, 70, 66, 57, 67, 69, 63, 66, 60, 52], [64, 67, 68, 68, 63, 56, 56, 57, 56, 58, 56, 54, 49, 40, 53, 52, 50, 42, 36, 40], [46, 50, 51, 43, 54, 56, 55, 55, 53, 51, 35, 38, 46, 50, 51, 37, 56, 49, 45, 44], [41, 52, 58, 58, 54, 55, 56, 58, 52, 51, 57, 59, 58, 54, 50, 50, 54, 50, 19, 44], [65, 70, 72, 73, 74, 74, 73, 72, 71, 70, 61, 66, 70, 63, 70, 68, 61, 66, 62, 55], [69, 73, 78, 82, 86, 84, 79, 61, 73, 61, 64, 53, 67, 67, 66, 67, 65, 64, 61, 57], [78, 82, 82, 84, 90, 92, 89, 86, 89, 88, 86, 86, 85, 84, 81, 79, 73, 66, 35, 56], [79, 85, 89, 91, 94, 95, 95, 93, 92, 87, 83, 81, 76, 70, 67, 61, 52, 29, 58, 63], [75, 82, 86, 87, 88, 89, 90, 91, 91, 91, 92, 92, 91, 90, 89, 88, 84, 81, 73, 67], [76, 78, 77, 77, 83, 85, 87, 89, 89, 89, 91, 90, 89, 88, 86, 83, 74, 71, 76, 73], [75, 80, 83, 84, 76, 78, 84, 86, 82, 80, 80, 80, 80, 79, 78, 76, 73, 68, 70, 72], [72, 78, 82, 84, 89, 92, 93, 93, 93, 92, 91, 91, 89, 86, 74, 78, 87, 86, 76, 76], [66, 70, 74, 78, 85, 87, 85, 85, 83, 84, 82, 80, 80, 76, 71, 66, 55, 53, 60, 62], [71, 78, 81, 83, 83, 82, 82, 81, 77, 78, 76, 76, 74, 70, 62, 63, 69, 70, 63, 66], [74, 79, 82, 81, 71, 75, 79, 78, 80, 81, 83, 83, 82, 81, 79, 75, 71, 70, 61, 58], [73, 78, 80, 81, 82, 84, 84, 83, 80, 78, 77, 80, 77, 78, 75, 75, 69, 67, 57, 53], [71, 78, 82, 83, 81, 79, 72, 58, 59, 66, 66, 68, 58, 61, 57, 47, 50, 51, 58, 59], [73, 77, 77, 78, 87, 90, 85, 86, 91, 92, 84, 90, 89, 87, 82, 82, 74, 63, 67, 65], [73, 79, 84, 87, 90, 90, 90, 89, 90, 89, 88, 87, 82, 72, 77, 75, 83, 77, 69, 66], [65, 68, 74, 78, 81, 81, 80, 80, 80, 79, 80, 79, 77, 74, 68, 69, 70, 70, 66, 68], [71, 76, 79, 80, 81, 81, 81, 82, 82, 82, 81, 80, 75, 65, 75, 77, 70, 75, 69, 63], [73, 76, 77, 77, 71, 65, 65, 64, 65, 65, 63, 61, 54, 51, 58, 56, 57, 51, 41, 46], [60, 60, 58, 52, 53, 61, 58, 61, 57, 48, 56, 56, 61, 59, 58, 37, 64, 53, 51, 51], [60, 57, 62, 64, 64, 67, 67, 68, 63, 68, 69, 68, 71, 67, 42, 53, 64, 62, 46, 56], [73, 78, 80, 81, 81, 82, 80, 80, 78, 77, 68, 72, 76, 71, 77, 74, 68, 72, 68, 61], [62, 67, 71, 73, 73, 73, 76, 76, 77, 78, 78, 77, 72, 62, 56, 48, 40, 43, 46, 45], [69, 70, 71, 71, 71, 70, 71, 68, 69, 70, 69, 67, 64, 60, 48, 50, 57, 56, 42, 37], [66, 70, 72, 73, 73, 72, 74, 74, 73, 72, 70, 69, 67, 66, 61, 56, 58, 61, 60, 50], [66, 70, 71, 71, 67, 56, 63, 67, 58, 54, 61, 58, 58, 58, 58, 57, 53, 50, 50, 46], [68, 71, 71, 68, 68, 66, 66, 65, 68, 68, 68, 67, 66, 65, 62, 59, 55, 48, 46, 48], [56, 53, 55, 65, 71, 73, 73, 70, 71, 69, 68, 66, 63, 60, 48, 52, 59, 59, 50, 43], [53, 56, 59, 62, 63, 64, 64, 64, 63, 63, 62, 62, 61, 60, 58, 56, 51, 43, 36, 33], [38, 37, 38, 41, 45, 42, 42, 43, 44, 44, 43, 38, 27, 26, 38, 39, 35, 30, 26, 23], [50, 53, 53, 53, 53, 52, 53, 51, 49, 49, 48, 45, 41, 34, 23, 36, 40, 38, 31, 25], [55, 56, 57, 57, 56, 55, 54, 54, 53, 52, 51, 51, 49, 47, 42, 33, 34, 29, 34, 33], [48, 50, 53, 55, 56, 52, 54, 53, 51, 50, 47, 41, 40, 47, 49, 45, 42, 45, 37, 37], [44, 46, 44, 39, 34, 42, 33, 40, 34, 31, 20, 25, 30, 33, 35, 33, 30, 30, 17, 18], [36, 38, 37, 36, 34, 32, 31, 33, 29, 27, 26, 31, 38, 41, 40, 37, 35, 31, 13, 31], [33, 37, 38, 39, 41, 40, 40, 40, 40, 38, 35, 30, 20, 33, 33, 21, 28, 15, 3, 21], [26, 30, 32, 33, 32, 33, 30, 31, 30, 31, 29, 24, 22, 25, 24, 19, 12, 21, 19, 17], [21, 24, 23, 16, 26, 32, 29, 26, 27, 25, 22, 19, 20, 16, 23, 25, 8, 24, 9, 9], [18, 14, 20, 21, 20, 21, 20, 18, 18, 21, 19, 21, 17, 10, 19, 17, 17, 19, 16, 0], [26, 27, 26, 28, 27, 28, 15, 26, 21, 19, 18, 14, 22, 23, 22, 22, 0, 13, 17, 12], [27, 24, 24, 24, 27, 18, 18, 21, 18, 26, 27, 29, 23, 16, 18, 15, 24, 19, 17, 5], [33, 32, 33, 34, 31, 26, 30, 28, 26, 23, 25, 26, 27, 28, 25, 22, 17, 17, 9, 11], [66, 72, 76, 79, 84, 84, 85, 86, 88, 89, 88, 87, 81, 76, 69, 59, 48, 45, 43, 46], [69, 78, 81, 83, 83, 82, 84, 83, 83, 85, 83, 82, 80, 77, 66, 65, 74, 73, 54, 55], [73, 76, 80, 83, 85, 85, 85, 86, 84, 83, 81, 79, 78, 77, 73, 67, 66, 71, 72, 66], [65, 75, 80, 82, 82, 77, 71, 78, 74, 73, 77, 76, 74, 73, 71, 68, 63, 60, 60, 59], [70, 78, 83, 84, 81, 80, 77, 78, 80, 81, 81, 80, 79, 77, 75, 72, 68, 64, 59, 58], [68, 73, 72, 60, 83, 87, 88, 86, 86, 84, 82, 81, 79, 76, 68, 55, 71, 73, 66, 60], [61, 69, 73, 76, 81, 82, 82, 82, 82, 80, 80, 80, 79, 77, 75, 74, 69, 63, 49, 53], [61, 62, 59, 59, 63, 64, 63, 66, 63, 62, 59, 57, 52, 42, 56, 57, 52, 47, 43, 45], [62, 71, 75, 77, 76, 76, 75, 73, 70, 71, 70, 68, 65, 60, 41, 51, 58, 58, 49, 45], [69, 77, 80, 81, 82, 80, 79, 79, 77, 76, 75, 74, 71, 69, 64, 61, 54, 44, 48, 50], [68, 73, 75, 78, 82, 81, 80, 79, 78, 78, 77, 73, 64, 61, 70, 68, 53, 67, 55, 52], [66, 72, 73, 71, 65, 66, 68, 70, 66, 61, 58, 50, 38, 53, 56, 54, 44, 48, 28, 33], [61, 68, 74, 77, 78, 77, 77, 78, 76, 76, 74, 72, 65, 58, 50, 66, 69, 65, 62, 45], [60, 68, 74, 76, 78, 79, 80, 79, 79, 79, 77, 76, 72, 69, 68, 67, 62, 64, 59, 48], [52, 49, 62, 67, 69, 70, 69, 70, 71, 70, 69, 68, 64, 60, 53, 47, 59, 60, 52, 44], [55, 60, 63, 65, 65, 64, 63, 64, 64, 63, 61, 58, 38, 53, 56, 58, 46, 54, 47, 36], [42, 44, 48, 52, 54, 57, 59, 58, 57, 56, 54, 52, 43, 39, 45, 49, 47, 38, 37, 26], [47, 49, 49, 48, 48, 46, 22, 48, 41, 49, 48, 49, 43, 36, 43, 48, 29, 27, 27, 0], [53, 55, 53, 49, 47, 52, 50, 52, 54, 53, 52, 53, 47, 30, 39, 36, 36, 38, 34, 24], [48, 56, 59, 61, 60, 58, 57, 57, 56, 54, 49, 43, 47, 53, 49, 49, 46, 37, 33, 30], [68, 74, 80, 85, 90, 91, 92, 94, 96, 95, 95, 94, 87, 82, 76, 68, 57, 40, 48, 41], [80, 87, 89, 90, 90, 91, 94, 92, 92, 93, 91, 90, 88, 85, 74, 71, 82, 81, 62, 63], [82, 85, 88, 91, 93, 93, 93, 94, 92, 90, 88, 87, 86, 85, 80, 73, 75, 80, 79, 70], [75, 84, 89, 91, 89, 85, 80, 85, 77, 78, 79, 76, 75, 75, 74, 72, 70, 68, 67, 66], [78, 86, 90, 92, 88, 87, 84, 85, 89, 88, 88, 88, 86, 85, 82, 79, 73, 69, 66, 66], [77, 81, 80, 65, 91, 96, 97, 95, 95, 94, 92, 90, 88, 85, 75, 68, 81, 81, 71, 67], [70, 78, 82, 85, 90, 91, 91, 90, 89, 89, 88, 88, 86, 84, 82, 81, 77, 69, 59, 56], [70, 72, 69, 70, 72, 75, 75, 78, 75, 75, 72, 69, 61, 49, 67, 68, 62, 57, 47, 51], [75, 83, 87, 87, 87, 87, 86, 85, 83, 82, 80, 78, 74, 69, 46, 62, 68, 67, 57, 51], [80, 88, 92, 93, 94, 92, 91, 91, 90, 89, 88, 87, 84, 81, 77, 73, 57, 64, 64, 63], [79, 84, 87, 91, 95, 93, 92, 90, 90, 90, 89, 86, 77, 70, 81, 80, 71, 79, 68, 66], [77, 82, 83, 81, 77, 77, 78, 78, 76, 74, 72, 69, 58, 58, 65, 68, 60, 61, 53, 36], [74, 79, 85, 88, 89, 88, 88, 89, 89, 89, 86, 85, 79, 72, 64, 79, 81, 72, 73, 64], [74, 82, 87, 90, 92, 93, 93, 92, 92, 92, 90, 89, 85, 82, 81, 80, 77, 77, 70, 61], [71, 70, 77, 81, 82, 83, 83, 84, 84, 82, 81, 79, 76, 73, 67, 67, 74, 73, 52, 63], [72, 77, 80, 81, 81, 80, 78, 80, 79, 78, 76, 74, 57, 67, 71, 71, 47, 67, 61, 53], [58, 60, 64, 65, 65, 70, 72, 72, 71, 70, 67, 66, 58, 54, 60, 63, 57, 47, 45, 42], [66, 66, 64, 60, 59, 63, 56, 63, 57, 66, 66, 69, 65, 53, 64, 68, 50, 50, 48, 33], [69, 73, 72, 70, 72, 73, 70, 73, 74, 74, 76, 75, 69, 60, 61, 58, 60, 61, 50, 48], [71, 75, 76, 77, 75, 72, 70, 70, 70, 70, 66, 62, 62, 67, 61, 61, 55, 53, 50, 43], [63, 70, 73, 74, 78, 80, 78, 76, 75, 78, 75, 73, 73, 73, 71, 70, 67, 65, 63, 57], [72, 74, 71, 60, 45, 51, 66, 64, 69, 66, 65, 65, 66, 65, 64, 62, 56, 52, 50, 47], [66, 68, 66, 61, 59, 64, 70, 66, 71, 70, 70, 70, 69, 68, 65, 63, 60, 53, 42, 53], [62, 66, 67, 66, 68, 68, 68, 69, 69, 69, 69, 68, 67, 66, 63, 59, 38, 55, 56, 51], [51, 51, 53, 60, 65, 66, 64, 64, 64, 63, 63, 62, 60, 59, 53, 44, 45, 47, 42, 50], [51, 49, 44, 39, 51, 56, 56, 53, 49, 46, 45, 47, 40, 30, 33, 37, 42, 39, 44, 43], [50, 50, 53, 56, 59, 57, 60, 58, 56, 56, 56, 54, 50, 44, 36, 46, 46, 38, 50, 43], [49, 51, 48, 45, 48, 45, 46, 48, 47, 46, 46, 44, 41, 39, 32, 33, 28, 30, 32, 33], [40, 42, 42, 44, 45, 46, 45, 45, 43, 42, 42, 39, 36, 31, 30, 34, 26, 31, 34, 28], [31, 37, 41, 43, 46, 46, 47, 46, 44, 43, 40, 33, 27, 36, 40, 38, 18, 38, 32, 19], [31, 31, 32, 32, 33, 33, 28, 30, 30, 30, 31, 27, 27, 31, 33, 21, 23, 24, 9, 18], [30, 24, 18, 15, 10, 25, 28, 30, 26, 20, 26, 26, 17, 13, 16, 13, 16, 21, 21, 8], [32, 35, 35, 35, 35, 34, 34, 32, 33, 29, 27, 18, 19, 12, 7, 27, 23, 23, 23, 20], [25, 21, 20, 22, 21, 17, 24, 24, 23, 23, 23, 14, 22, 24, 15, 14, 15, 19, 0, 5], [25, 21, 14, 5, 19, 20, 15, 22, 14, 20, 12, 23, 25, 24, 22, 9, 17, 12, 14, 14], [10, 15, 15, 20, 21, 19, 20, 13, 19, 19, 10, 21, 16, 3, 17, 13, 10, 0, 16, 17], [20, 17, 16, 10, 12, 24, 16, 15, 9, 9, 8, 10, 3, 13, 3, 4, 5, 5, 12, 7], [21, 16, 12, 21, 19, 17, 20, 16, 18, 20, 14, 9, 13, 4, 13, 0, 16, 0, 9, 9], [16, 22, 26, 26, 21, 23, 25, 24, 24, 25, 22, 23, 15, 14, 15, 14, 18, 13, 8, 7], [8, 14, 13, 13, 10, 16, 15, 13, 16, 13, 8, 6, 11, 16, 7, 5, 9, 7, 6, 8], [55, 68, 77, 82, 84, 89, 88, 87, 84, 87, 84, 84, 83, 82, 81, 79, 76, 74, 69, 63], [68, 79, 85, 85, 72, 65, 75, 79, 79, 78, 76, 77, 77, 76, 75, 72, 67, 62, 59, 59], [64, 75, 80, 80, 66, 71, 81, 76, 82, 80, 80, 80, 79, 78, 76, 74, 71, 66, 54, 64], [64, 72, 77, 78, 79, 79, 81, 81, 81, 81, 81, 80, 79, 77, 75, 71, 50, 65, 67, 60], [54, 61, 63, 65, 75, 78, 77, 77, 77, 77, 77, 76, 75, 74, 70, 64, 50, 61, 55, 62], [61, 66, 66, 64, 60, 69, 72, 68, 67, 69, 70, 68, 65, 62, 53, 33, 53, 52, 55, 56], [58, 67, 68, 70, 77, 78, 79, 79, 76, 76, 76, 75, 73, 69, 58, 61, 64, 58, 65, 59], [63, 68, 70, 70, 66, 69, 66, 68, 68, 67, 66, 64, 61, 58, 50, 49, 42, 46, 50, 52], [48, 60, 65, 67, 69, 68, 69, 69, 67, 65, 65, 64, 61, 57, 49, 55, 52, 52, 57, 49], [51, 44, 60, 66, 71, 74, 74, 76, 74, 73, 70, 67, 60, 52, 61, 63, 55, 60, 58, 46], [44, 51, 58, 61, 62, 64, 62, 62, 61, 62, 63, 62, 56, 47, 59, 56, 56, 50, 41, 37], [51, 52, 41, 52, 57, 57, 59, 60, 55, 56, 53, 53, 48, 43, 38, 31, 39, 45, 41, 24], [54, 62, 64, 65, 64, 64, 64, 64, 64, 62, 60, 57, 48, 39, 49, 47, 52, 47, 42, 40], [54, 59, 62, 62, 63, 61, 60, 57, 55, 53, 50, 48, 40, 45, 48, 40, 52, 41, 42, 20], [50, 56, 63, 64, 64, 63, 59, 60, 63, 63, 58, 56, 48, 47, 51, 49, 49, 41, 39, 34], [53, 58, 62, 62, 61, 60, 60, 61, 59, 59, 58, 55, 46, 36, 42, 50, 51, 37, 39, 26], [40, 50, 55, 55, 49, 58, 60, 54, 50, 43, 38, 45, 34, 37, 38, 36, 37, 20, 26, 9], [42, 47, 38, 47, 49, 46, 51, 49, 48, 42, 41, 42, 39, 33, 42, 35, 39, 30, 25, 23], [41, 49, 51, 51, 53, 53, 51, 52, 50, 47, 44, 45, 49, 50, 41, 37, 45, 39, 37, 27], [41, 47, 46, 42, 44, 41, 36, 32, 26, 27, 29, 30, 26, 29, 16, 36, 25, 17, 23, 19], [69, 87, 93, 96, 97, 102, 101, 99, 97, 97, 96, 96, 95, 94, 92, 90, 86, 83, 78, 70], [83, 93, 98, 96, 84, 81, 83, 88, 85, 86, 82, 83, 84, 83, 82, 80, 75, 67, 69, 69], [78, 89, 92, 91, 68, 85, 91, 84, 93, 94, 94, 94, 92, 91, 88, 86, 82, 76, 66, 75], [78, 86, 91, 92, 92, 92, 94, 95, 94, 94, 94, 94, 92, 91, 88, 84, 63, 77, 75, 72], [73, 78, 76, 76, 87, 89, 87, 86, 85, 84, 83, 83, 82, 80, 76, 70, 61, 68, 53, 70], [74, 79, 78, 74, 74, 81, 85, 82, 67, 71, 78, 75, 72, 68, 59, 53, 64, 60, 65, 65], [66, 75, 77, 83, 91, 92, 94, 93, 90, 88, 86, 84, 82, 78, 69, 71, 74, 68, 77, 66], [77, 82, 85, 86, 78, 83, 83, 83, 82, 83, 82, 81, 78, 74, 65, 63, 60, 63, 68, 65], [70, 73, 82, 85, 84, 83, 85, 86, 81, 80, 81, 79, 74, 71, 62, 65, 57, 67, 68, 58], [76, 73, 77, 82, 86, 89, 88, 90, 89, 88, 86, 84, 77, 63, 76, 78, 63, 78, 71, 54], [67, 71, 76, 77, 79, 81, 74, 73, 75, 75, 75, 73, 71, 71, 76, 76, 63, 55, 59, 54], [72, 74, 69, 57, 68, 70, 78, 79, 75, 77, 74, 72, 67, 65, 58, 53, 59, 70, 54, 52], [75, 80, 81, 80, 79, 79, 80, 81, 80, 79, 77, 76, 69, 60, 64, 63, 65, 64, 57, 57], [70, 75, 78, 80, 80, 77, 79, 81, 79, 81, 78, 76, 68, 61, 62, 64, 57, 68, 41, 53], [68, 78, 84, 86, 86, 85, 83, 81, 84, 81, 78, 77, 71, 47, 71, 70, 75, 67, 61, 52], [78, 82, 85, 85, 84, 83, 83, 85, 82, 81, 79, 75, 64, 54, 64, 68, 72, 64, 60, 49], [63, 75, 81, 80, 76, 83, 85, 78, 72, 76, 56, 66, 61, 43, 58, 55, 59, 50, 50, 44], [73, 76, 69, 76, 73, 73, 77, 74, 75, 71, 68, 66, 68, 68, 69, 64, 61, 48, 42, 45], [71, 77, 78, 77, 80, 81, 76, 81, 80, 79, 75, 69, 65, 73, 56, 68, 68, 58, 43, 52], [69, 73, 73, 72, 72, 66, 68, 71, 71, 69, 62, 57, 56, 54, 56, 62, 47, 52, 34, 20], [67, 71, 75, 76, 75, 73, 69, 67, 71, 67, 67, 66, 66, 64, 60, 58, 47, 28, 35, 25], [73, 75, 76, 78, 79, 79, 80, 81, 81, 81, 80, 80, 78, 77, 75, 72, 68, 61, 54, 59], [71, 74, 74, 74, 70, 68, 71, 69, 70, 70, 69, 68, 67, 65, 60, 55, 29, 46, 52, 50], [66, 66, 65, 68, 72, 72, 70, 68, 65, 64, 63, 61, 59, 56, 53, 52, 40, 47, 49, 24], [50, 52, 49, 47, 49, 44, 47, 36, 32, 49, 50, 49, 47, 46, 43, 35, 38, 41, 31, 35], [55, 56, 55, 54, 55, 56, 56, 53, 53, 50, 49, 48, 45, 43, 37, 28, 37, 38, 18, 32], [56, 58, 59, 59, 59, 59, 59, 59, 58, 58, 57, 56, 54, 52, 45, 34, 41, 36, 38, 34], [37, 38, 38, 40, 40, 42, 39, 40, 39, 41, 40, 38, 34, 34, 29, 26, 21, 25, 22, 21], [20, 29, 33, 34, 35, 31, 28, 19, 16, 27, 16, 8, 22, 21, 23, 20, 23, 25, 14, 20], [32, 36, 37, 34, 29, 33, 30, 29, 31, 33, 30, 27, 21, 16, 12, 27, 25, 18, 16, 7], [33, 37, 39, 38, 37, 38, 38, 38, 36, 35, 34, 31, 26, 12, 27, 31, 22, 16, 13, 0], [33, 38, 39, 38, 38, 36, 36, 36, 35, 35, 35, 33, 27, 10, 20, 17, 24, 15, 17, 18], [26, 28, 27, 25, 28, 27, 26, 27, 23, 27, 19, 23, 23, 11, 19, 20, 19, 17, 6, 13], [25, 21, 25, 18, 19, 22, 18, 21, 16, 18, 19, 20, 2, 14, 12, 11, 7, 15, 2, 0], [31, 30, 24, 26, 24, 26, 21, 25, 21, 20, 17, 18, 12, 12, 14, 10, 7, 11, 4, 17], [15, 11, 19, 13, 0, 0, 13, 11, 10, 12, 11, 4, 11, 12, 13, 11, 0, 10, 14, 11], [12, 11, 5, 10, 1, 9, 0, 18, 5, 14, 16, 13, 12, 0, 10, 11, 4, 7, 0, 12], [16, 13, 4, 0, 15, 7, 15, 0, 13, 18, 9, 9, 11, 9, 0, 0, 9, 13, 4, 10], [11, 13, 15, 12, 9, 8, 6, 16, 16, 7, 8, 8, 6, 1, 0, 7, 14, 15, 11, 1], [13, 19, 11, 10, 2, 3, 0, 11, 9, 0, 14, 1, 6, 7, 14, 1, 10, 0, 11, 16], [62, 78, 82, 86, 88, 85, 82, 82, 83, 80, 80, 78, 77, 76, 73, 70, 65, 60, 48, 43], [72, 83, 89, 89, 92, 92, 93, 93, 95, 94, 93, 93, 92, 91, 89, 86, 80, 72, 68, 73], [53, 81, 88, 89, 88, 84, 86, 85, 85, 86, 86, 84, 82, 80, 76, 70, 57, 63, 65, 63], [69, 80, 83, 82, 87, 88, 86, 86, 82, 81, 79, 77, 74, 72, 66, 65, 61, 53, 63, 53], [52, 66, 69, 67, 62, 62, 57, 56, 60, 67, 67, 67, 65, 64, 59, 53, 49, 55, 50, 41], [66, 74, 75, 76, 73, 75, 76, 73, 73, 69, 68, 67, 65, 63, 57, 41, 56, 57, 46, 52], [66, 78, 82, 83, 84, 83, 84, 84, 83, 83, 82, 81, 79, 76, 67, 62, 68, 64, 61, 58], [57, 61, 69, 65, 65, 66, 67, 68, 69, 69, 68, 68, 66, 62, 51, 52, 53, 34, 49, 43], [58, 60, 63, 67, 61, 64, 57, 53, 53, 54, 54, 52, 51, 47, 37, 42, 49, 43, 41, 32], [59, 68, 74, 76, 75, 74, 75, 74, 73, 72, 72, 70, 67, 63, 60, 63, 62, 53, 50, 41], [55, 65, 68, 70, 70, 70, 71, 70, 69, 68, 66, 64, 58, 45, 61, 63, 56, 45, 42, 42], [53, 61, 67, 68, 69, 68, 66, 67, 67, 67, 66, 66, 63, 59, 56, 54, 51, 45, 44, 29], [42, 59, 62, 60, 60, 59, 61, 64, 63, 60, 57, 57, 53, 40, 42, 41, 48, 42, 20, 25], [54, 68, 72, 72, 72, 71, 71, 71, 71, 71, 69, 67, 62, 52, 41, 54, 54, 46, 45, 38], [57, 68, 69, 63, 65, 64, 66, 67, 67, 63, 60, 56, 49, 47, 52, 54, 47, 41, 37, 29], [52, 52, 54, 56, 45, 49, 47, 49, 46, 33, 29, 33, 40, 44, 42, 40, 33, 29, 24, 19], [42, 47, 45, 46, 43, 43, 49, 46, 48, 47, 47, 45, 38, 40, 37, 35, 36, 28, 19, 9], [40, 48, 49, 49, 48, 48, 47, 44, 41, 42, 41, 35, 35, 36, 36, 33, 30, 24, 19, 11], [43, 49, 52, 51, 52, 54, 51, 52, 48, 50, 46, 40, 41, 47, 50, 47, 37, 35, 19, 20], [35, 30, 32, 35, 43, 45, 46, 47, 47, 46, 45, 43, 37, 34, 36, 35, 33, 18, 13, 13], [72, 86, 89, 94, 96, 93, 94, 89, 89, 89, 87, 87, 86, 85, 83, 80, 74, 68, 64, 55], [81, 91, 97, 97, 100, 101, 102, 102, 103, 103, 102, 102, 101, 99, 97, 95, 89, 80, 76, 80], [65, 91, 97, 98, 97, 94, 95, 94, 93, 93, 92, 91, 89, 87, 81, 75, 60, 69, 71, 72], [78, 89, 92, 91, 96, 97, 95, 95, 92, 93, 92, 91, 88, 86, 81, 77, 74, 68, 73, 62], [54, 75, 78, 78, 75, 73, 62, 68, 62, 72, 75, 72, 70, 68, 63, 55, 56, 61, 58, 50], [77, 82, 82, 83, 81, 83, 84, 80, 82, 80, 79, 79, 77, 75, 70, 62, 66, 68, 52, 60], [76, 88, 93, 94, 95, 94, 94, 94, 94, 94, 93, 92, 90, 87, 77, 73, 77, 73, 71, 68], [67, 74, 80, 74, 75, 79, 80, 80, 80, 79, 79, 79, 76, 72, 61, 63, 64, 45, 59, 51], [73, 76, 74, 80, 73, 78, 75, 72, 69, 66, 59, 49, 55, 51, 42, 60, 65, 61, 54, 39], [72, 81, 87, 89, 88, 87, 88, 87, 87, 87, 86, 85, 81, 76, 71, 76, 75, 66, 57, 59], [67, 78, 80, 82, 81, 81, 81, 81, 80, 79, 77, 76, 70, 63, 71, 73, 65, 55, 48, 48], [67, 76, 82, 84, 86, 85, 84, 84, 83, 82, 81, 80, 77, 71, 69, 68, 67, 62, 57, 34], [53, 72, 75, 76, 75, 75, 71, 74, 80, 74, 74, 74, 66, 58, 57, 60, 64, 56, 45, 37], [72, 83, 87, 87, 87, 86, 87, 87, 86, 85, 83, 81, 75, 62, 65, 70, 67, 61, 57, 51], [76, 86, 86, 79, 82, 80, 85, 84, 84, 80, 76, 70, 62, 66, 72, 70, 69, 53, 53, 36], [72, 70, 72, 75, 67, 68, 67, 65, 68, 63, 58, 29, 58, 62, 62, 58, 51, 50, 42, 36], [65, 71, 69, 69, 69, 68, 71, 71, 72, 72, 71, 68, 58, 59, 61, 55, 56, 50, 41, 25], [59, 69, 71, 73, 73, 73, 71, 70, 68, 68, 65, 61, 58, 59, 56, 54, 57, 45, 43, 34], [61, 68, 70, 69, 70, 74, 69, 70, 65, 68, 64, 60, 56, 64, 66, 62, 52, 52, 36, 30], [52, 45, 59, 63, 65, 67, 66, 68, 66, 64, 63, 61, 49, 56, 61, 58, 47, 40, 25, 35], [69, 79, 79, 76, 82, 80, 80, 78, 76, 79, 77, 77, 75, 74, 70, 65, 55, 49, 50, 51], [65, 74, 79, 79, 81, 83, 82, 83, 84, 84, 81, 79, 75, 70, 57, 58, 60, 55, 47, 34], [56, 53, 59, 67, 73, 75, 77, 76, 76, 75, 73, 73, 71, 69, 66, 62, 57, 61, 59, 56], [58, 66, 69, 67, 64, 61, 65, 64, 63, 65, 65, 64, 62, 60, 54, 43, 53, 42, 46, 34], [59, 57, 61, 64, 65, 65, 66, 67, 68, 68, 68, 67, 66, 63, 55, 51, 51, 52, 42, 40], [56, 64, 66, 67, 66, 66, 66, 67, 65, 65, 65, 64, 62, 60, 51, 50, 37, 52, 36, 40], [49, 51, 52, 52, 54, 55, 56, 56, 56, 56, 56, 56, 55, 53, 50, 50, 45, 37, 38, 32], [43, 40, 45, 45, 44, 44, 42, 43, 45, 44, 41, 39, 38, 29, 33, 34, 29, 21, 18, 16], [37, 40, 40, 43, 44, 44, 44, 45, 45, 44, 45, 42, 38, 30, 36, 32, 30, 24, 15, 17], [25, 29, 25, 12, 23, 23, 26, 23, 25, 21, 28, 28, 31, 30, 8, 23, 22, 20, 20, 0], [18, 31, 34, 35, 35, 37, 38, 39, 39, 40, 41, 41, 38, 30, 28, 17, 23, 15, 14, 7], [27, 33, 33, 31, 33, 33, 33, 33, 34, 34, 34, 34, 31, 21, 20, 21, 21, 18, 19, 9], [22, 25, 25, 28, 26, 23, 24, 24, 25, 25, 21, 24, 18, 18, 26, 12, 20, 7, 2, 8], [17, 6, 25, 28, 22, 27, 28, 27, 30, 31, 32, 32, 27, 14, 11, 14, 18, 5, 11, 2], [9, 19, 23, 21, 25, 25, 25, 22, 17, 19, 25, 9, 10, 19, 11, 5, 0, 0, 8, 5], [9, 1, 13, 10, 12, 8, 14, 9, 8, 11, 5, 15, 17, 6, 15, 3, 10, 8, 8, 15], [7, 7, 9, 1, 9, 20, 12, 14, 14, 8, 11, 11, 9, 14, 15, 1, 8, 7, 0, 7], [16, 20, 19, 23, 23, 21, 20, 23, 22, 21, 15, 12, 7, 0, 15, 14, 11, 8, 12, 6], [25, 22, 19, 22, 19, 15, 22, 14, 19, 12, 16, 10, 13, 14, 18, 18, 16, 18, 18, 17], [10, 3, 1, 14, 18, 15, 19, 4, 13, 9, 13, 13, 8, 8, 6, 8, 8, 11, 0, 15], [70, 84, 89, 87, 90, 90, 91, 88, 85, 89, 87, 87, 85, 83, 79, 75, 62, 60, 63, 54], [74, 81, 90, 91, 92, 94, 94, 94, 95, 95, 92, 90, 86, 81, 72, 71, 70, 66, 56, 52], [64, 74, 67, 79, 85, 88, 89, 88, 88, 87, 85, 84, 81, 77, 68, 64, 67, 68, 66, 65], [64, 78, 84, 85, 80, 79, 81, 81, 80, 81, 79, 77, 74, 70, 56, 61, 67, 51, 54, 55], [73, 73, 76, 79, 80, 80, 80, 82, 82, 82, 81, 80, 77, 72, 60, 69, 53, 68, 58, 60], [67, 79, 83, 84, 84, 84, 84, 85, 83, 83, 82, 80, 76, 69, 66, 68, 62, 65, 53, 45], [64, 73, 75, 74, 76, 76, 78, 79, 78, 77, 76, 76, 72, 69, 67, 58, 70, 58, 61, 54], [69, 67, 69, 74, 71, 73, 71, 71, 71, 70, 67, 61, 55, 57, 58, 44, 51, 42, 40, 41], [62, 72, 74, 75, 77, 76, 76, 77, 77, 76, 74, 71, 61, 63, 63, 60, 54, 53, 52, 43], [56, 58, 52, 59, 63, 65, 66, 65, 66, 66, 65, 63, 55, 53, 56, 50, 55, 53, 46, 34], [52, 64, 68, 69, 70, 70, 70, 70, 71, 70, 69, 67, 57, 52, 46, 59, 50, 42, 39, 33], [55, 65, 67, 66, 66, 66, 65, 66, 66, 66, 64, 61, 48, 55, 50, 49, 43, 33, 27, 29], [50, 60, 62, 63, 63, 65, 65, 63, 65, 65, 60, 52, 52, 56, 53, 44, 40, 38, 35, 20], [54, 48, 63, 64, 63, 64, 66, 66, 66, 67, 66, 63, 48, 51, 40, 43, 45, 43, 22, 27], [53, 53, 54, 59, 57, 61, 48, 55, 42, 52, 54, 49, 41, 49, 44, 41, 42, 29, 19, 19], [46, 43, 48, 46, 43, 44, 42, 40, 40, 40, 30, 21, 25, 25, 23, 12, 8, 12, 10, 11], [39, 37, 40, 39, 38, 36, 41, 41, 39, 41, 39, 31, 33, 35, 17, 29, 26, 14, 15, 8], [35, 45, 46, 46, 48, 48, 50, 50, 51, 51, 50, 45, 31, 40, 33, 37, 29, 25, 19, 7], [40, 46, 40, 38, 41, 34, 30, 29, 38, 40, 41, 41, 32, 24, 33, 26, 24, 11, 13, 14], [29, 32, 30, 27, 30, 34, 31, 32, 30, 23, 28, 30, 34, 33, 19, 24, 21, 18, 0, 14], [79, 89, 95, 94, 96, 99, 98, 98, 93, 95, 94, 94, 92, 91, 88, 84, 71, 67, 71, 62], [80, 88, 97, 98, 100, 102, 102, 103, 104, 103, 100, 98, 94, 89, 80, 80, 78, 73, 61, 56], [68, 82, 75, 86, 92, 95, 95, 95, 94, 93, 92, 90, 86, 80, 71, 74, 74, 74, 74, 71], [72, 86, 91, 92, 88, 88, 88, 87, 85, 87, 85, 83, 80, 75, 53, 70, 72, 48, 61, 57], [80, 82, 84, 87, 90, 89, 88, 90, 89, 89, 89, 88, 84, 78, 73, 78, 65, 77, 64, 68], [75, 87, 90, 91, 91, 91, 90, 90, 88, 88, 86, 84, 78, 67, 74, 71, 73, 70, 61, 55], [74, 82, 85, 83, 85, 86, 88, 88, 88, 88, 87, 86, 82, 79, 78, 62, 79, 71, 72, 63], [80, 77, 80, 85, 83, 84, 82, 82, 82, 81, 76, 65, 66, 63, 57, 56, 41, 55, 44, 32], [72, 84, 86, 87, 89, 88, 88, 88, 87, 86, 84, 80, 73, 77, 70, 75, 70, 62, 60, 55], [69, 72, 54, 71, 74, 78, 79, 79, 80, 80, 78, 73, 47, 69, 69, 62, 65, 66, 53, 51], [64, 77, 80, 81, 82, 82, 82, 83, 82, 81, 79, 75, 62, 69, 60, 72, 63, 57, 50, 44], [69, 79, 82, 80, 81, 81, 80, 80, 80, 80, 77, 72, 64, 71, 51, 65, 60, 56, 48, 41], [65, 73, 76, 76, 75, 76, 79, 75, 78, 76, 74, 66, 68, 66, 67, 54, 50, 38, 47, 26], [70, 68, 78, 79, 77, 77, 79, 78, 79, 79, 77, 73, 63, 67, 64, 62, 57, 36, 35, 31], [71, 69, 75, 79, 76, 82, 75, 79, 72, 67, 71, 63, 68, 69, 61, 57, 60, 49, 40, 22], [65, 65, 69, 68, 64, 66, 63, 64, 62, 57, 32, 51, 46, 53, 47, 42, 28, 36, 17, 12], [61, 62, 55, 57, 60, 47, 61, 61, 61, 61, 58, 50, 56, 48, 41, 47, 42, 31, 17, 11], [57, 64, 67, 69, 69, 69, 68, 68, 67, 65, 60, 55, 59, 50, 46, 51, 48, 17, 25, 22], [58, 63, 55, 50, 58, 57, 56, 61, 60, 58, 54, 55, 51, 38, 48, 50, 35, 36, 24, 22], [44, 54, 52, 53, 55, 56, 54, 54, 52, 52, 52, 54, 51, 50, 45, 47, 38, 30, 16, 1], [74, 74, 58, 70, 67, 62, 62, 67, 64, 64, 64, 65, 65, 64, 64, 63, 59, 56, 54, 55], [63, 71, 74, 72, 74, 75, 77, 77, 76, 75, 73, 71, 67, 63, 58, 56, 54, 57, 55, 51], [48, 53, 59, 63, 64, 63, 61, 62, 63, 61, 58, 54, 40, 51, 56, 55, 49, 48, 44, 47], [50, 53, 52, 51, 51, 51, 53, 54, 56, 56, 56, 56, 56, 52, 46, 48, 47, 32, 41, 41], [30, 40, 44, 47, 49, 50, 50, 49, 45, 40, 36, 44, 50, 52, 50, 45, 45, 46, 38, 36], [45, 48, 48, 50, 51, 50, 49, 49, 49, 48, 46, 45, 44, 43, 42, 41, 33, 39, 29, 28], [33, 26, 23, 30, 27, 29, 23, 31, 30, 27, 16, 14, 19, 22, 25, 23, 17, 17, 16, 8], [15, 2, 25, 19, 26, 26, 24, 22, 18, 20, 17, 23, 20, 21, 15, 15, 4, 19, 12, 21], [14, 10, 17, 9, 16, 15, 19, 13, 18, 19, 16, 18, 0, 9, 14, 18, 0, 5, 16, 0], [21, 19, 19, 24, 23, 22, 19, 17, 19, 14, 16, 16, 16, 17, 9, 8, 10, 9, 16, 8], [19, 22, 22, 25, 24, 24, 23, 21, 22, 22, 18, 16, 17, 13, 0, 0, 15, 5, 12, 8], [21, 21, 23, 17, 18, 20, 9, 9, 15, 20, 19, 17, 0, 14, 0, 9, 2, 8, 4, 3], [11, 20, 20, 21, 14, 17, 20, 20, 18, 14, 8, 0, 4, 9, 3, 16, 8, 15, 11, 7], [15, 20, 12, 8, 11, 14, 14, 15, 18, 15, 18, 8, 16, 5, 15, 8, 2, 8, 12, 7], [10, 17, 20, 21, 22, 15, 21, 18, 23, 21, 7, 18, 18, 16, 16, 18, 20, 11, 12, 0], [7, 12, 10, 16, 16, 10, 0, 13, 16, 1, 11, 4, 8, 9, 14, 0, 12, 3, 8, 7], [14, 13, 5, 7, 15, 15, 7, 2, 0, 16, 13, 18, 0, 9, 0, 7, 10, 11, 11, 4], [12, 11, 2, 12, 8, 9, 13, 15, 12, 15, 12, 17, 17, 4, 8, 6, 13, 13, 5, 2], [5, 14, 15, 17, 17, 13, 16, 14, 9, 0, 3, 12, 0, 4, 15, 7, 4, 3, 13, 13], [19, 19, 16, 11, 13, 16, 18, 7, 11, 15, 14, 13, 10, 8, 15, 2, 13, 9, 13, 0], [80, 87, 79, 80, 76, 66, 71, 80, 73, 70, 73, 73, 73, 73, 72, 71, 69, 65, 65, 67], [71, 84, 90, 90, 88, 92, 93, 93, 93, 92, 90, 89, 85, 80, 68, 54, 56, 67, 66, 59], [70, 59, 77, 81, 83, 83, 81, 82, 83, 82, 79, 77, 71, 62, 63, 65, 57, 66, 49, 52], [74, 80, 80, 80, 79, 77, 79, 80, 80, 77, 78, 78, 77, 74, 71, 71, 65, 60, 60, 59], [67, 68, 70, 68, 74, 78, 78, 78, 77, 76, 75, 75, 74, 73, 68, 68, 68, 62, 56, 42], [68, 71, 72, 73, 75, 75, 73, 75, 74, 73, 71, 67, 60, 52, 57, 48, 58, 57, 51, 47], [60, 52, 67, 63, 55, 58, 61, 61, 58, 56, 58, 60, 62, 60, 54, 53, 57, 50, 44, 42], [55, 53, 58, 60, 60, 60, 58, 57, 57, 57, 54, 54, 51, 50, 46, 26, 32, 31, 30, 16], [53, 56, 63, 65, 65, 63, 62, 61, 61, 60, 59, 57, 48, 53, 55, 45, 49, 32, 34, 30], [50, 52, 55, 57, 52, 51, 50, 51, 43, 38, 41, 40, 23, 35, 34, 41, 33, 32, 22, 19], [54, 59, 61, 60, 59, 60, 60, 60, 59, 58, 55, 45, 53, 55, 41, 49, 45, 38, 28, 24], [48, 52, 51, 51, 51, 51, 48, 49, 46, 46, 37, 25, 46, 50, 42, 41, 36, 29, 18, 16], [45, 51, 51, 49, 49, 34, 48, 33, 43, 46, 46, 46, 42, 36, 41, 20, 34, 24, 22, 12], [30, 27, 36, 39, 47, 49, 48, 50, 48, 42, 33, 27, 38, 41, 31, 37, 31, 26, 16, 13], [42, 39, 37, 35, 37, 45, 44, 45, 47, 46, 44, 36, 42, 35, 36, 25, 26, 20, 23, 17], [26, 31, 34, 32, 32, 31, 28, 27, 31, 30, 31, 32, 30, 26, 21, 17, 3, 1, 14, 10], [31, 36, 34, 30, 25, 29, 27, 21, 19, 24, 30, 31, 31, 21, 21, 18, 0, 11, 15, 11], [27, 40, 40, 38, 37, 38, 36, 35, 32, 33, 33, 32, 16, 26, 14, 19, 13, 16, 7, 5], [30, 33, 31, 30, 28, 28, 31, 29, 25, 22, 31, 32, 31, 24, 24, 17, 14, 13, 8, 6], [27, 26, 17, 25, 30, 30, 30, 28, 28, 30, 27, 23, 9, 22, 19, 5, 6, 6, 9, 10], [86, 96, 89, 93, 86, 80, 86, 82, 80, 78, 80, 81, 83, 82, 81, 81, 78, 75, 73, 75], [77, 93, 99, 99, 97, 101, 102, 101, 102, 101, 100, 99, 94, 89, 76, 69, 61, 75, 72, 70], [80, 67, 85, 90, 93, 93, 91, 91, 92, 89, 87, 84, 76, 64, 74, 72, 68, 73, 53, 55], [85, 89, 89, 91, 91, 90, 91, 92, 91, 89, 88, 87, 84, 82, 78, 80, 73, 71, 68, 66], [77, 81, 83, 80, 87, 90, 90, 90, 90, 88, 87, 84, 82, 81, 74, 76, 77, 69, 65, 53], [79, 83, 84, 84, 85, 86, 84, 84, 82, 81, 77, 72, 58, 62, 69, 61, 64, 62, 54, 50], [74, 64, 78, 73, 73, 72, 69, 74, 70, 63, 70, 72, 69, 65, 58, 63, 63, 50, 44, 43], [71, 64, 78, 78, 74, 76, 73, 72, 72, 70, 69, 66, 56, 55, 50, 51, 36, 40, 37, 28], [70, 75, 81, 84, 84, 81, 79, 77, 75, 69, 62, 59, 65, 70, 69, 49, 60, 42, 42, 39], [67, 71, 74, 75, 74, 72, 72, 72, 66, 70, 65, 58, 43, 51, 58, 55, 53, 47, 39, 33], [74, 79, 81, 79, 79, 79, 79, 79, 77, 74, 71, 66, 69, 70, 63, 58, 57, 50, 44, 28], [68, 70, 67, 68, 69, 68, 65, 66, 68, 67, 64, 58, 61, 63, 53, 55, 47, 39, 32, 19], [65, 73, 74, 72, 76, 70, 73, 61, 66, 70, 66, 61, 58, 59, 59, 49, 52, 45, 34, 26], [66, 70, 65, 67, 70, 70, 70, 72, 70, 67, 65, 55, 61, 63, 39, 57, 51, 45, 34, 22], [71, 68, 67, 67, 66, 74, 73, 73, 75, 74, 64, 59, 66, 56, 66, 47, 43, 36, 26, 21], [56, 62, 65, 66, 65, 64, 63, 62, 58, 55, 57, 58, 57, 55, 52, 44, 24, 20, 0, 4], [56, 63, 64, 57, 61, 59, 58, 56, 54, 52, 50, 55, 55, 34, 47, 37, 33, 28, 19, 3], [55, 61, 60, 61, 62, 61, 60, 59, 56, 47, 53, 53, 43, 48, 43, 32, 31, 24, 14, 15], [54, 57, 56, 59, 60, 58, 53, 52, 54, 51, 50, 51, 52, 41, 43, 31, 31, 22, 10, 7], [52, 58, 57, 56, 61, 62, 62, 62, 62, 60, 54, 55, 56, 49, 47, 36, 30, 27, 15, 13], [77, 82, 86, 87, 86, 86, 86, 87, 86, 85, 82, 80, 76, 73, 66, 59, 46, 52, 56, 52], [52, 57, 51, 62, 64, 65, 68, 68, 69, 69, 68, 66, 64, 65, 67, 66, 58, 56, 53, 36], [49, 37, 39, 42, 48, 51, 54, 54, 53, 52, 50, 48, 42, 40, 36, 37, 31, 32, 38, 34], [46, 49, 50, 53, 55, 55, 55, 55, 55, 54, 53, 50, 45, 46, 47, 40, 24, 40, 38, 27], [42, 47, 49, 50, 50, 51, 51, 50, 50, 48, 46, 44, 42, 42, 39, 39, 32, 31, 28, 25], [16, 21, 25, 29, 18, 28, 28, 25, 26, 29, 33, 31, 16, 27, 22, 18, 27, 20, 21, 13], [5, 24, 21, 27, 26, 22, 26, 29, 28, 29, 27, 27, 26, 22, 17, 16, 14, 8, 14, 10], [14, 21, 18, 17, 17, 8, 10, 19, 13, 7, 17, 17, 20, 16, 12, 8, 15, 12, 12, 18], [20, 23, 27, 28, 24, 26, 22, 20, 13, 21, 20, 21, 20, 17, 8, 16, 10, 13, 8, 12], [20, 18, 26, 23, 16, 23, 12, 10, 8, 5, 14, 13, 14, 10, 13, 15, 17, 14, 15, 18], [20, 22, 27, 12, 21, 12, 16, 21, 15, 14, 17, 12, 17, 15, 6, 17, 16, 14, 3, 5], [19, 22, 20, 22, 19, 23, 19, 22, 11, 22, 9, 23, 13, 14, 6, 14, 17, 18, 7, 17], [25, 14, 25, 24, 15, 22, 11, 22, 17, 9, 17, 14, 13, 10, 12, 14, 10, 14, 0, 4], [12, 7, 19, 22, 16, 8, 10, 0, 19, 6, 13, 5, 15, 17, 10, 13, 12, 7, 9, 6], [11, 10, 13, 24, 13, 20, 12, 12, 12, 5, 9, 10, 12, 12, 18, 17, 11, 8, 14, 11], [11, 14, 10, 18, 11, 13, 4, 3, 6, 14, 16, 14, 15, 11, 12, 12, 8, 0, 0, 12], [6, 15, 9, 13, 0, 12, 9, 2, 5, 12, 10, 5, 0, 11, 1, 16, 9, 18, 13, 7], [6, 16, 8, 17, 13, 14, 4, 4, 11, 11, 0, 9, 18, 6, 0, 6, 9, 18, 16, 10], [17, 9, 15, 21, 10, 10, 5, 14, 8, 11, 14, 8, 0, 9, 1, 6, 10, 6, 12, 2], [16, 19, 16, 10, 15, 14, 20, 8, 12, 9, 15, 15, 11, 17, 7, 16, 8, 5, 13, 15], [86, 91, 96, 99, 97, 97, 97, 97, 97, 96, 93, 91, 88, 84, 77, 69, 62, 58, 64, 62], [70, 72, 74, 80, 85, 85, 89, 89, 89, 89, 88, 86, 81, 77, 75, 75, 73, 73, 65, 56], [71, 66, 64, 67, 70, 75, 77, 78, 76, 76, 74, 72, 68, 66, 63, 58, 58, 45, 50, 43], [69, 70, 72, 76, 78, 78, 77, 77, 77, 76, 74, 72, 68, 68, 68, 62, 51, 57, 59, 47], [72, 77, 79, 80, 81, 82, 81, 81, 80, 79, 78, 76, 71, 63, 51, 52, 58, 52, 49, 44], [57, 59, 61, 66, 63, 66, 67, 67, 67, 67, 65, 63, 58, 51, 46, 41, 46, 48, 36, 30], [51, 62, 62, 62, 65, 66, 66, 67, 67, 67, 66, 65, 60, 52, 51, 44, 51, 35, 38, 31], [46, 47, 50, 45, 47, 47, 50, 50, 50, 49, 50, 49, 45, 40, 37, 33, 27, 26, 17, 17], [45, 53, 51, 50, 50, 48, 47, 45, 39, 45, 40, 40, 38, 25, 39, 32, 25, 17, 11, 8], [28, 38, 38, 36, 35, 36, 35, 29, 25, 25, 33, 32, 27, 20, 23, 22, 11, 9, 9, 17], [40, 38, 40, 44, 41, 41, 39, 37, 36, 35, 38, 43, 42, 34, 17, 29, 21, 23, 13, 11], [23, 32, 37, 41, 41, 42, 40, 40, 38, 32, 32, 37, 31, 32, 20, 25, 21, 23, 13, 21], [33, 29, 23, 32, 32, 37, 36, 35, 32, 29, 22, 21, 25, 26, 17, 23, 6, 12, 15, 9], [35, 38, 35, 16, 32, 27, 34, 28, 32, 25, 24, 20, 21, 18, 13, 18, 11, 13, 13, 11], [24, 31, 33, 34, 33, 33, 34, 33, 33, 29, 18, 16, 24, 8, 13, 9, 8, 3, 9, 3], [17, 16, 21, 16, 19, 22, 21, 22, 21, 20, 20, 18, 17, 8, 14, 11, 2, 13, 16, 8], [17, 1, 17, 15, 20, 17, 16, 19, 14, 16, 12, 15, 11, 0, 13, 4, 8, 9, 7, 11], [18, 20, 26, 24, 23, 22, 26, 23, 19, 20, 15, 16, 4, 17, 15, 14, 17, 13, 7, 3], [20, 14, 9, 15, 11, 15, 20, 19, 26, 23, 16, 10, 17, 11, 2, 17, 14, 5, 10, 14], [21, 24, 27, 27, 23, 27, 26, 27, 25, 22, 16, 21, 23, 10, 19, 10, 14, 11, 12, 16], [98, 105, 110, 112, 111, 111, 111, 111, 110, 109, 106, 105, 102, 98, 90, 81, 77, 73, 72, 72], [87, 85, 90, 94, 101, 103, 105, 106, 105, 104, 103, 101, 97, 92, 88, 88, 87, 87, 77, 71], [88, 82, 81, 85, 84, 90, 91, 91, 91, 89, 87, 85, 81, 78, 74, 63, 71, 62, 60, 57], [87, 87, 88, 93, 95, 95, 95, 95, 95, 93, 91, 88, 85, 83, 83, 79, 74, 63, 77, 64], [90, 95, 97, 99, 99, 100, 100, 99, 99, 97, 95, 93, 87, 80, 75, 76, 76, 66, 67, 60], [78, 79, 82, 86, 83, 87, 87, 83, 82, 81, 79, 76, 70, 60, 62, 63, 48, 63, 50, 39], [76, 85, 85, 83, 86, 85, 86, 87, 89, 88, 86, 84, 77, 76, 77, 63, 70, 60, 56, 48], [73, 78, 81, 77, 71, 75, 79, 76, 78, 78, 79, 77, 73, 67, 63, 61, 58, 46, 43, 38], [77, 86, 85, 82, 84, 83, 80, 67, 77, 77, 75, 78, 69, 73, 64, 68, 52, 51, 32, 14], [76, 68, 71, 70, 71, 76, 74, 75, 73, 75, 75, 74, 61, 54, 62, 52, 51, 46, 40, 28], [74, 74, 67, 74, 70, 70, 66, 61, 62, 66, 70, 72, 71, 62, 47, 56, 55, 46, 39, 32], [61, 62, 70, 75, 77, 76, 75, 74, 69, 63, 61, 64, 58, 56, 56, 51, 34, 42, 32, 20], [72, 70, 69, 69, 63, 73, 74, 75, 73, 71, 62, 48, 62, 59, 57, 56, 48, 44, 33, 25], [66, 75, 75, 68, 70, 70, 69, 72, 69, 68, 65, 63, 58, 57, 38, 51, 40, 31, 12, 16], [70, 74, 74, 75, 75, 76, 76, 76, 75, 75, 60, 62, 65, 59, 53, 51, 36, 36, 24, 15], [70, 71, 68, 66, 68, 68, 68, 64, 53, 55, 63, 65, 58, 52, 36, 38, 32, 26, 12, 6], [63, 58, 61, 59, 62, 63, 63, 61, 59, 52, 51, 57, 44, 45, 29, 36, 25, 11, 5, 19], [61, 67, 65, 66, 66, 66, 64, 62, 59, 55, 55, 53, 49, 47, 49, 36, 25, 27, 7, 12], [57, 60, 61, 62, 65, 65, 65, 65, 64, 61, 51, 50, 44, 35, 39, 39, 21, 13, 9, 5], [65, 66, 64, 63, 63, 64, 61, 60, 58, 58, 54, 50, 47, 47, 33, 36, 16, 12, 13, 14], [82, 78, 79, 83, 84, 83, 77, 82, 79, 80, 75, 74, 71, 67, 62, 47, 56, 54, 45, 51], [62, 72, 69, 69, 50, 44, 60, 58, 58, 54, 56, 58, 60, 61, 60, 58, 57, 54, 45, 47], [59, 63, 64, 65, 67, 67, 65, 65, 65, 63, 62, 60, 57, 55, 50, 49, 42, 43, 40, 45], [54, 56, 57, 57, 55, 54, 55, 54, 53, 51, 45, 42, 42, 38, 37, 37, 38, 36, 35, 27], [20, 33, 25, 22, 33, 34, 33, 30, 14, 26, 26, 26, 16, 26, 25, 21, 27, 29, 22, 15], [31, 34, 38, 35, 37, 35, 31, 34, 27, 26, 25, 22, 25, 29, 28, 26, 22, 5, 14, 13], [26, 20, 13, 12, 11, 15, 2, 7, 18, 16, 13, 21, 15, 13, 16, 8, 13, 3, 10, 21], [18, 14, 22, 12, 11, 8, 6, 16, 16, 14, 7, 14, 9, 15, 15, 15, 15, 9, 7, 17], [19, 19, 26, 18, 21, 19, 16, 19, 11, 10, 22, 1, 11, 19, 7, 16, 13, 16, 15, 20], [9, 20, 17, 23, 17, 19, 12, 17, 8, 19, 13, 4, 0, 16, 16, 8, 7, 12, 7, 17], [10, 22, 20, 10, 16, 15, 15, 14, 17, 7, 16, 7, 0, 14, 13, 12, 14, 10, 12, 13], [18, 21, 22, 16, 19, 16, 6, 20, 17, 21, 16, 11, 16, 12, 12, 12, 15, 8, 10, 7], [20, 20, 16, 22, 19, 14, 7, 7, 8, 15, 17, 14, 13, 13, 4, 15, 10, 0, 10, 11], [22, 22, 23, 13, 19, 19, 4, 15, 16, 1, 17, 7, 12, 14, 18, 6, 12, 14, 0, 10], [23, 22, 20, 22, 20, 23, 19, 22, 23, 18, 17, 15, 16, 6, 13, 3, 7, 15, 10, 9], [15, 10, 17, 15, 12, 16, 6, 15, 9, 10, 5, 15, 10, 11, 16, 11, 16, 16, 14, 3], [10, 23, 26, 17, 22, 20, 17, 12, 16, 18, 16, 12, 12, 8, 14, 13, 20, 16, 10, 20], [12, 21, 17, 16, 3, 1, 8, 17, 13, 7, 11, 4, 0, 10, 4, 8, 13, 4, 5, 14], [19, 16, 20, 18, 22, 18, 17, 19, 6, 9, 14, 8, 8, 11, 14, 2, 12, 15, 12, 2], [17, 23, 17, 18, 20, 19, 18, 4, 13, 10, 3, 17, 14, 6, 17, 11, 9, 12, 9, 13], [89, 86, 85, 91, 91, 91, 85, 89, 87, 88, 83, 82, 79, 75, 68, 61, 60, 60, 26, 55], [74, 83, 85, 82, 65, 67, 75, 75, 75, 74, 72, 69, 66, 67, 69, 67, 66, 65, 55, 57], [74, 81, 82, 83, 85, 85, 83, 83, 82, 81, 80, 79, 75, 72, 64, 67, 62, 49, 56, 54], [74, 78, 78, 79, 76, 76, 77, 77, 76, 75, 71, 68, 65, 62, 63, 62, 52, 40, 51, 46], [64, 68, 67, 70, 68, 69, 68, 67, 66, 65, 62, 59, 50, 47, 53, 51, 46, 40, 45, 32], [63, 64, 66, 65, 67, 67, 67, 67, 65, 64, 60, 56, 45, 34, 47, 46, 48, 41, 25, 23], [55, 51, 57, 60, 57, 59, 59, 59, 59, 57, 55, 52, 48, 48, 44, 46, 29, 39, 17, 23], [48, 56, 55, 52, 52, 50, 50, 51, 49, 46, 43, 39, 33, 36, 31, 17, 28, 21, 9, 17], [23, 41, 38, 37, 36, 35, 36, 37, 34, 34, 29, 27, 26, 25, 16, 17, 2, 8, 11, 17], [28, 32, 39, 38, 36, 37, 36, 33, 34, 29, 24, 14, 27, 27, 24, 0, 11, 14, 7, 14], [35, 38, 38, 33, 34, 35, 30, 27, 28, 26, 25, 26, 21, 18, 15, 20, 8, 8, 5, 14], [31, 33, 32, 31, 34, 33, 33, 33, 31, 30, 28, 26, 19, 12, 7, 15, 9, 13, 6, 9], [30, 30, 28, 26, 20, 8, 22, 20, 22, 18, 17, 18, 7, 10, 3, 15, 17, 14, 8, 11], [30, 29, 29, 30, 31, 30, 26, 19, 16, 15, 20, 19, 19, 17, 6, 6, 15, 15, 10, 0], [29, 28, 26, 25, 28, 28, 24, 23, 21, 16, 18, 10, 14, 17, 15, 13, 13, 7, 7, 6], [27, 25, 24, 22, 17, 12, 23, 15, 17, 14, 7, 14, 12, 18, 6, 11, 12, 14, 6, 13], [13, 15, 18, 12, 22, 13, 16, 15, 20, 17, 18, 9, 20, 5, 11, 15, 15, 0, 17, 5], [23, 24, 21, 26, 25, 22, 21, 23, 5, 18, 11, 14, 14, 15, 8, 10, 14, 12, 2, 2], [26, 27, 27, 27, 27, 22, 21, 19, 19, 20, 17, 17, 8, 8, 14, 18, 17, 11, 20, 0], [26, 30, 30, 29, 30, 24, 23, 18, 9, 20, 12, 13, 17, 13, 19, 19, 6, 9, 11, 11], [101, 97, 97, 103, 104, 103, 97, 102, 99, 101, 95, 95, 91, 88, 80, 68, 71, 70, 53, 66], [87, 96, 99, 95, 83, 82, 89, 91, 90, 90, 87, 85, 78, 71, 77, 77, 75, 76, 63, 66], [89, 96, 97, 98, 99, 100, 97, 97, 96, 95, 93, 91, 88, 83, 72, 78, 75, 59, 66, 65], [90, 94, 94, 95, 93, 93, 93, 94, 93, 91, 86, 83, 79, 70, 75, 75, 52, 67, 60, 57], [82, 86, 86, 88, 86, 87, 85, 85, 86, 85, 83, 81, 75, 67, 70, 70, 59, 53, 60, 46], [84, 86, 87, 87, 88, 88, 90, 88, 87, 85, 81, 77, 64, 55, 61, 64, 64, 62, 45, 37], [75, 78, 81, 82, 79, 81, 81, 80, 80, 78, 74, 68, 64, 68, 66, 64, 39, 55, 24, 39], [75, 87, 86, 83, 82, 81, 80, 81, 77, 77, 75, 74, 65, 61, 61, 45, 57, 48, 24, 33], [59, 79, 76, 75, 75, 73, 73, 70, 68, 63, 59, 57, 48, 56, 47, 53, 42, 33, 20, 22], [70, 79, 79, 79, 78, 78, 77, 76, 74, 72, 68, 63, 53, 60, 61, 40, 40, 35, 16, 13], [66, 72, 70, 65, 66, 64, 63, 63, 58, 58, 50, 38, 53, 52, 45, 38, 36, 30, 22, 0], [64, 68, 70, 70, 72, 72, 72, 71, 71, 68, 62, 61, 59, 52, 41, 40, 32, 11, 0, 5], [67, 72, 71, 73, 68, 65, 62, 59, 58, 58, 55, 40, 46, 40, 36, 32, 14, 7, 11, 4], [75, 76, 77, 76, 74, 74, 71, 66, 53, 59, 59, 47, 52, 55, 41, 46, 33, 27, 11, 7], [68, 65, 64, 66, 64, 64, 62, 60, 54, 48, 53, 51, 46, 39, 33, 27, 0, 22, 10, 12], [67, 65, 64, 63, 61, 59, 61, 61, 58, 58, 55, 47, 43, 39, 28, 26, 6, 8, 13, 12], [53, 56, 58, 59, 59, 51, 53, 50, 44, 47, 39, 42, 36, 31, 24, 25, 7, 15, 15, 10], [56, 57, 56, 53, 53, 54, 54, 53, 49, 48, 45, 39, 29, 27, 21, 15, 7, 13, 8, 12], [58, 59, 59, 59, 59, 58, 57, 55, 50, 46, 42, 29, 34, 28, 12, 17, 5, 6, 5, 6], [52, 53, 55, 54, 51, 48, 46, 40, 19, 28, 28, 29, 24, 21, 12, 15, 11, 12, 6, 8], [82, 86, 87, 89, 89, 91, 91, 91, 90, 89, 87, 85, 81, 77, 67, 43, 59, 55, 53, 56], [65, 69, 67, 67, 62, 62, 62, 61, 57, 55, 53, 55, 56, 55, 50, 51, 52, 45, 45, 41], [47, 51, 48, 52, 45, 50, 46, 47, 48, 47, 48, 46, 44, 41, 34, 31, 35, 33, 18, 27], [41, 49, 47, 48, 47, 47, 47, 47, 46, 46, 44, 39, 26, 18, 29, 22, 18, 23, 19, 16], [36, 37, 25, 34, 33, 32, 36, 38, 35, 30, 22, 29, 23, 13, 12, 18, 23, 10, 6, 12], [42, 44, 45, 45, 45, 46, 45, 45, 43, 41, 37, 29, 14, 22, 27, 22, 24, 21, 9, 15], [29, 31, 33, 33, 32, 31, 29, 30, 29, 24, 16, 22, 17, 17, 13, 15, 10, 14, 0, 9], [28, 28, 31, 33, 32, 28, 29, 29, 27, 25, 21, 21, 16, 10, 17, 11, 7, 6, 13, 13], [16, 16, 14, 20, 0, 11, 18, 6, 17, 18, 20, 0, 10, 10, 13, 2, 11, 10, 6, 19], [12, 21, 20, 16, 19, 9, 5, 4, 14, 16, 4, 9, 17, 10, 2, 11, 11, 12, 8, 4], [23, 18, 22, 15, 19, 7, 17, 18, 13, 16, 10, 13, 18, 14, 21, 8, 15, 14, 12, 10], [14, 7, 11, 16, 10, 0, 14, 11, 7, 17, 9, 10, 14, 11, 14, 14, 5, 8, 11, 16], [17, 16, 13, 18, 22, 21, 20, 18, 4, 11, 9, 14, 17, 14, 9, 15, 6, 7, 7, 15], [14, 10, 11, 16, 20, 13, 18, 4, 8, 17, 15, 15, 12, 12, 19, 8, 11, 20, 15, 19], [17, 10, 15, 5, 14, 10, 5, 7, 16, 0, 10, 16, 15, 13, 7, 12, 0, 17, 0, 14], [23, 20, 22, 14, 16, 15, 17, 16, 10, 10, 12, 18, 17, 18, 20, 19, 16, 10, 15, 0], [13, 13, 1, 2, 8, 12, 16, 19, 14, 16, 3, 10, 6, 13, 9, 11, 14, 12, 16, 14], [7, 16, 8, 13, 18, 11, 1, 1, 14, 18, 8, 7, 16, 14, 15, 1, 11, 19, 10, 14], [9, 11, 15, 17, 13, 22, 18, 7, 14, 17, 3, 17, 18, 10, 15, 10, 4, 16, 13, 13], [9, 13, 15, 10, 14, 14, 4, 13, 12, 11, 14, 13, 19, 13, 13, 10, 13, 6, 7, 9], [95, 98, 99, 103, 102, 104, 105, 104, 103, 102, 100, 98, 94, 90, 81, 67, 68, 66, 65, 66], [82, 88, 90, 87, 86, 87, 88, 88, 86, 85, 82, 79, 75, 71, 65, 63, 65, 61, 57, 52], [83, 81, 76, 80, 78, 76, 78, 78, 78, 77, 75, 73, 70, 65, 55, 56, 59, 54, 41, 41], [71, 78, 76, 76, 77, 76, 76, 76, 74, 72, 72, 68, 59, 58, 59, 55, 48, 44, 35, 22], [71, 71, 63, 71, 70, 70, 69, 70, 69, 67, 66, 63, 57, 48, 52, 53, 44, 38, 33, 28], [75, 79, 79, 79, 79, 79, 79, 79, 77, 76, 73, 69, 63, 60, 62, 56, 39, 44, 35, 30], [60, 63, 58, 61, 59, 59, 61, 62, 64, 64, 63, 61, 52, 36, 44, 39, 33, 27, 19, 6], [61, 65, 66, 67, 67, 66, 65, 64, 62, 60, 56, 51, 39, 47, 30, 33, 18, 20, 19, 14], [45, 48, 48, 43, 44, 43, 44, 43, 41, 41, 38, 30, 19, 19, 19, 16, 21, 15, 4, 9], [40, 39, 30, 36, 34, 25, 27, 33, 32, 33, 28, 23, 9, 23, 12, 13, 10, 0, 17, 21], [42, 45, 43, 41, 41, 41, 41, 41, 39, 36, 32, 25, 25, 21, 13, 9, 8, 13, 8, 20], [36, 33, 34, 35, 37, 38, 34, 31, 29, 27, 21, 23, 22, 19, 13, 14, 13, 12, 15, 20], [45, 48, 47, 46, 44, 46, 38, 39, 37, 33, 30, 23, 13, 17, 12, 3, 18, 17, 14, 16], [42, 42, 42, 40, 39, 38, 35, 32, 27, 8, 25, 25, 19, 18, 11, 3, 18, 15, 12, 16], [32, 31, 34, 32, 31, 32, 30, 28, 22, 17, 20, 16, 10, 13, 19, 6, 8, 3, 9, 16], [16, 24, 21, 28, 30, 23, 21, 17, 27, 24, 8, 19, 20, 11, 7, 12, 0, 20, 16, 7], [24, 12, 19, 5, 22, 11, 18, 12, 9, 9, 17, 15, 14, 20, 12, 15, 14, 7, 16, 11], [8, 12, 6, 15, 18, 18, 15, 8, 7, 17, 18, 7, 7, 14, 12, 11, 10, 3, 9, 11], [13, 19, 19, 25, 7, 18, 8, 12, 13, 7, 6, 6, 17, 16, 6, 5, 14, 15, 19, 8], [29, 24, 21, 25, 15, 14, 11, 9, 16, 14, 11, 13, 9, 0, 19, 8, 16, 3, 7, 7], [105, 109, 111, 114, 114, 115, 116, 115, 114, 113, 112, 110, 105, 100, 90, 75, 77, 75, 73, 74], [94, 99, 104, 100, 101, 100, 100, 100, 99, 98, 94, 91, 86, 84, 79, 76, 78, 74, 69, 60], [96, 96, 91, 93, 91, 91, 95, 96, 97, 95, 93, 91, 87, 82, 71, 70, 73, 69, 58, 55], [83, 88, 87, 88, 89, 89, 87, 87, 85, 82, 80, 80, 69, 69, 70, 67, 58, 54, 47, 29], [88, 88, 83, 90, 90, 89, 88, 89, 88, 85, 84, 81, 76, 64, 66, 68, 59, 54, 48, 39], [92, 96, 97, 97, 97, 97, 97, 97, 96, 94, 92, 88, 79, 72, 75, 69, 63, 55, 55, 39], [76, 82, 77, 78, 77, 74, 73, 76, 80, 80, 78, 75, 66, 54, 62, 52, 52, 38, 37, 3], [83, 87, 87, 89, 87, 87, 85, 84, 81, 79, 76, 73, 61, 66, 53, 50, 39, 33, 30, 13], [77, 77, 80, 75, 77, 76, 77, 78, 75, 72, 68, 62, 40, 46, 42, 42, 36, 26, 22, 10], [74, 79, 79, 78, 77, 77, 77, 77, 73, 68, 65, 65, 65, 61, 43, 40, 28, 13, 12, 8], [68, 73, 71, 70, 68, 68, 68, 67, 61, 61, 52, 53, 50, 50, 26, 32, 28, 22, 10, 12], [62, 75, 75, 76, 75, 73, 66, 64, 66, 53, 53, 55, 55, 42, 42, 25, 25, 8, 14, 14], [78, 80, 76, 74, 79, 74, 75, 72, 68, 61, 37, 38, 48, 43, 39, 31, 21, 17, 3, 10], [79, 77, 75, 77, 75, 71, 74, 68, 65, 60, 53, 49, 47, 36, 23, 7, 13, 6, 17, 16], [70, 70, 73, 70, 71, 72, 72, 69, 66, 62, 49, 50, 47, 42, 35, 28, 17, 17, 11, 9], [47, 65, 65, 67, 64, 56, 53, 57, 56, 53, 44, 47, 26, 23, 12, 13, 16, 19, 16, 15], [55, 47, 53, 56, 58, 48, 34, 51, 52, 48, 29, 36, 20, 17, 12, 14, 10, 10, 15, 3], [53, 48, 44, 47, 43, 34, 28, 32, 30, 23, 18, 18, 19, 13, 15, 3, 11, 16, 19, 19], [52, 45, 44, 43, 45, 22, 29, 33, 31, 27, 20, 5, 20, 18, 13, 16, 5, 16, 18, 12], [48, 46, 51, 47, 46, 41, 35, 32, 26, 24, 26, 12, 18, 18, 10, 16, 3, 8, 10, 18], [82, 87, 90, 92, 93, 93, 94, 94, 91, 90, 88, 85, 80, 73, 71, 75, 71, 68, 57, 59], [55, 51, 48, 51, 53, 57, 55, 56, 55, 55, 51, 45, 45, 46, 43, 40, 41, 29, 34, 26], [40, 40, 44, 44, 45, 48, 48, 48, 46, 45, 43, 40, 28, 32, 24, 26, 30, 16, 11, 22], [39, 43, 41, 36, 39, 39, 34, 37, 33, 33, 32, 26, 30, 33, 24, 9, 26, 7, 17, 21], [35, 32, 36, 33, 33, 31, 31, 30, 17, 26, 21, 24, 22, 13, 22, 17, 25, 11, 18, 12], [22, 33, 36, 33, 31, 28, 26, 28, 24, 21, 20, 19, 22, 11, 22, 16, 21, 19, 16, 22], [18, 19, 24, 21, 19, 18, 23, 20, 18, 19, 5, 15, 10, 9, 6, 16, 21, 11, 14, 22], [9, 19, 15, 19, 19, 19, 21, 15, 18, 18, 14, 18, 18, 6, 15, 18, 19, 16, 18, 5], [22, 12, 15, 9, 16, 16, 17, 17, 10, 21, 4, 13, 14, 10, 17, 9, 23, 7, 11, 17], [21, 13, 18, 16, 13, 11, 18, 16, 22, 14, 7, 14, 15, 11, 13, 17, 16, 20, 11, 6], [19, 3, 8, 16, 18, 12, 15, 11, 2, 7, 13, 18, 0, 12, 14, 19, 23, 6, 3, 13], [14, 21, 16, 13, 18, 11, 14, 13, 16, 17, 14, 13, 15, 17, 15, 19, 15, 9, 12, 8], [8, 10, 15, 10, 20, 18, 13, 13, 17, 10, 0, 12, 12, 11, 14, 12, 8, 8, 6, 18], [18, 16, 10, 13, 16, 16, 17, 18, 13, 14, 19, 6, 2, 12, 5, 9, 19, 15, 17, 14], [5, 18, 12, 17, 15, 16, 17, 20, 4, 16, 10, 15, 0, 20, 16, 11, 4, 0, 13, 13], [19, 17, 12, 18, 18, 15, 15, 13, 14, 20, 13, 14, 4, 1, 11, 7, 18, 14, 16, 13], [19, 15, 7, 15, 12, 20, 19, 9, 17, 19, 15, 16, 18, 16, 12, 22, 9, 17, 10, 12], [3, 5, 16, 0, 19, 19, 12, 15, 22, 15, 17, 14, 1, 13, 4, 13, 18, 4, 17, 12], [18, 15, 17, 17, 18, 12, 18, 17, 19, 7, 17, 20, 19, 16, 17, 6, 18, 15, 6, 11], [9, 13, 10, 19, 15, 15, 14, 9, 11, 7, 9, 5, 18, 5, 23, 10, 11, 21, 17, 18], [93, 98, 101, 103, 105, 104, 106, 105, 103, 102, 99, 96, 90, 82, 84, 87, 83, 77, 70, 71], [73, 76, 79, 77, 78, 78, 78, 77, 76, 76, 73, 70, 64, 70, 65, 69, 58, 63, 51, 48], [65, 72, 74, 74, 75, 75, 74, 72, 70, 68, 58, 55, 63, 60, 62, 54, 56, 51, 36, 31], [59, 62, 59, 56, 55, 55, 53, 55, 42, 38, 40, 37, 39, 46, 41, 38, 29, 23, 19, 16], [61, 63, 63, 62, 61, 60, 57, 56, 51, 49, 38, 44, 47, 51, 39, 49, 40, 34, 19, 13], [54, 50, 48, 49, 46, 47, 43, 43, 40, 35, 40, 35, 32, 40, 22, 31, 24, 23, 20, 18], [32, 36, 40, 39, 35, 36, 36, 36, 32, 30, 28, 31, 13, 21, 21, 17, 8, 8, 18, 17], [35, 38, 39, 39, 38, 38, 37, 35, 29, 23, 30, 26, 12, 9, 15, 16, 15, 14, 3, 8], [17, 20, 20, 22, 18, 22, 8, 10, 16, 17, 17, 12, 20, 15, 3, 13, 15, 9, 12, 0], [13, 18, 23, 13, 2, 21, 18, 19, 16, 17, 18, 14, 11, 22, 2, 15, 10, 9, 14, 19], [21, 6, 20, 16, 17, 20, 24, 19, 25, 24, 13, 20, 20, 0, 7, 7, 9, 10, 18, 18], [16, 3, 9, 11, 20, 11, 0, 9, 4, 4, 17, 17, 13, 12, 11, 9, 12, 14, 11, 18], [26, 19, 17, 19, 16, 6, 19, 14, 10, 14, 0, 20, 3, 12, 17, 20, 10, 10, 15, 0], [23, 20, 16, 10, 20, 4, 17, 17, 17, 1, 3, 14, 1, 12, 22, 11, 13, 13, 20, 8], [12, 10, 9, 17, 19, 8, 12, 16, 16, 16, 17, 19, 10, 20, 15, 15, 16, 12, 5, 19], [16, 17, 20, 15, 19, 15, 12, 16, 21, 12, 14, 19, 6, 17, 12, 15, 7, 11, 14, 10], [0, 26, 24, 19, 16, 9, 10, 16, 18, 5, 21, 13, 14, 16, 16, 14, 14, 14, 13, 7], [22, 3, 6, 18, 18, 12, 19, 16, 20, 8, 17, 4, 6, 12, 16, 13, 2, 11, 14, 19], [16, 22, 20, 16, 20, 18, 14, 13, 5, 13, 15, 10, 11, 17, 12, 21, 9, 14, 1, 13], [4, 8, 23, 14, 16, 16, 11, 12, 2, 18, 6, 16, 12, 22, 17, 9, 20, 1, 0, 5], [106, 110, 114, 117, 118, 117, 119, 118, 115, 114, 111, 108, 100, 84, 99, 99, 93, 85, 81, 81], [89, 91, 95, 92, 95, 92, 91, 92, 91, 90, 89, 85, 82, 88, 80, 83, 75, 71, 69, 63], [87, 94, 97, 97, 98, 98, 98, 97, 96, 93, 85, 82, 85, 82, 76, 63, 70, 66, 52, 34], [83, 91, 89, 87, 87, 85, 86, 85, 78, 77, 66, 70, 63, 70, 59, 61, 53, 48, 38, 21], [87, 91, 93, 92, 93, 91, 89, 88, 84, 80, 76, 79, 77, 68, 57, 71, 60, 44, 31, 21], [85, 85, 85, 84, 81, 79, 72, 75, 67, 66, 71, 72, 51, 65, 57, 58, 31, 35, 25, 5], [64, 69, 71, 69, 68, 62, 64, 65, 66, 64, 56, 53, 47, 49, 51, 38, 24, 24, 1, 8], [81, 83, 82, 82, 83, 81, 79, 77, 61, 65, 60, 61, 61, 59, 50, 51, 32, 25, 9, 6], [67, 61, 69, 66, 64, 65, 63, 63, 60, 58, 52, 44, 39, 42, 36, 30, 16, 17, 19, 18], [57, 59, 54, 52, 51, 48, 53, 57, 50, 50, 50, 43, 40, 38, 20, 27, 9, 17, 14, 17], [69, 71, 71, 70, 69, 68, 66, 63, 59, 54, 47, 44, 46, 49, 30, 29, 17, 14, 14, 10], [58, 61, 56, 47, 56, 56, 43, 49, 43, 42, 38, 44, 41, 44, 16, 12, 5, 19, 10, 10], [68, 68, 66, 64, 53, 51, 56, 56, 56, 52, 43, 32, 37, 43, 21, 19, 18, 11, 14, 18], [54, 59, 60, 61, 60, 58, 53, 38, 36, 39, 47, 43, 38, 42, 24, 10, 18, 9, 16, 16], [45, 50, 49, 48, 50, 46, 38, 42, 41, 32, 26, 22, 16, 41, 20, 8, 17, 17, 17, 12], [53, 56, 54, 52, 52, 51, 45, 42, 45, 37, 31, 31, 27, 41, 6, 20, 5, 11, 7, 13], [25, 31, 16, 33, 30, 22, 29, 34, 34, 28, 6, 16, 11, 40, 10, 12, 12, 18, 19, 16], [21, 31, 14, 25, 32, 22, 21, 16, 16, 24, 10, 13, 18, 40, 11, 11, 19, 11, 8, 15], [29, 25, 32, 29, 22, 23, 17, 5, 8, 23, 18, 13, 17, 40, 14, 7, 13, 1, 12, 11], [13, 24, 34, 24, 23, 12, 16, 18, 6, 9, 15, 12, 14, 40, 2, 14, 21, 16, 14, 15], [85, 88, 91, 93, 93, 93, 92, 90, 90, 88, 82, 78, 77, 75, 64, 59, 51, 70, 54, 60], [52, 48, 50, 55, 51, 50, 50, 48, 47, 45, 48, 47, 45, 43, 34, 32, 32, 37, 24, 30], [41, 47, 31, 20, 37, 36, 34, 28, 19, 25, 30, 30, 30, 21, 29, 21, 15, 13, 17, 4], [40, 35, 33, 36, 39, 40, 39, 39, 32, 27, 24, 28, 28, 24, 18, 23, 16, 17, 16, 12], [41, 36, 35, 29, 28, 26, 22, 30, 29, 28, 28, 18, 23, 19, 23, 18, 16, 18, 13, 14], [16, 27, 27, 22, 26, 25, 22, 24, 23, 24, 22, 24, 20, 9, 18, 18, 13, 15, 14, 12], [23, 27, 18, 26, 24, 24, 20, 7, 18, 23, 11, 20, 15, 16, 18, 16, 15, 10, 12, 18], [13, 13, 17, 21, 12, 18, 12, 0, 16, 18, 20, 17, 18, 10, 11, 8, 12, 12, 16, 19], [20, 12, 18, 12, 9, 14, 10, 15, 14, 16, 9, 1, 0, 10, 13, 8, 16, 12, 15, 19], [8, 13, 15, 13, 18, 21, 12, 16, 14, 23, 17, 16, 23, 15, 11, 10, 6, 11, 20, 8], [14, 13, 14, 15, 11, 11, 17, 21, 12, 12, 13, 8, 17, 13, 6, 14, 8, 21, 16, 7], [16, 12, 21, 23, 11, 22, 15, 22, 13, 4, 18, 20, 16, 15, 9, 20, 14, 12, 6, 8], [15, 13, 1, 2, 20, 21, 17, 6, 16, 8, 12, 17, 13, 20, 5, 18, 6, 16, 8, 16], [21, 23, 12, 18, 11, 15, 6, 20, 11, 12, 9, 12, 11, 15, 16, 17, 18, 8, 1, 15], [19, 18, 14, 18, 16, 13, 21, 12, 14, 7, 9, 16, 14, 15, 17, 15, 11, 12, 20, 16], [18, 16, 21, 17, 16, 15, 18, 7, 11, 19, 14, 16, 17, 14, 18, 0, 13, 20, 21, 20], [13, 15, 14, 17, 10, 18, 12, 5, 17, 22, 14, 11, 18, 4, 15, 10, 23, 15, 16, 12], [20, 15, 19, 7, 12, 11, 1, 20, 12, 18, 12, 15, 10, 22, 12, 18, 17, 8, 18, 16], [10, 12, 7, 8, 15, 7, 10, 6, 17, 0, 19, 8, 5, 12, 15, 7, 11, 18, 16, 13], [3, 11, 17, 19, 13, 11, 8, 11, 9, 19, 17, 8, 15, 18, 15, 18, 15, 5, 17, 16], [99, 102, 105, 107, 107, 106, 106, 105, 104, 102, 96, 90, 90, 89, 80, 74, 70, 82, 68, 70], [77, 80, 81, 83, 82, 83, 84, 82, 81, 80, 72, 73, 75, 63, 67, 64, 63, 64, 42, 41], [75, 66, 63, 63, 72, 72, 64, 67, 64, 58, 61, 60, 56, 49, 58, 52, 41, 34, 22, 18], [67, 57, 58, 61, 63, 63, 63, 62, 57, 48, 53, 48, 47, 46, 41, 41, 17, 23, 22, 13], [65, 63, 59, 55, 57, 57, 55, 54, 54, 47, 50, 49, 31, 46, 41, 22, 17, 21, 8, 21], [55, 59, 61, 60, 59, 58, 58, 57, 47, 47, 48, 40, 42, 29, 32, 18, 21, 16, 8, 4], [55, 54, 55, 56, 53, 53, 49, 46, 42, 36, 38, 38, 26, 30, 24, 18, 13, 14, 10, 1], [34, 44, 41, 40, 38, 42, 28, 30, 32, 27, 26, 30, 18, 24, 20, 15, 14, 6, 14, 14], [38, 18, 30, 21, 28, 23, 26, 23, 19, 24, 14, 18, 23, 12, 15, 18, 21, 17, 12, 9], [23, 27, 16, 24, 19, 17, 18, 22, 16, 16, 12, 18, 16, 18, 9, 17, 16, 19, 19, 15], [20, 22, 15, 19, 11, 18, 20, 14, 14, 19, 17, 9, 19, 8, 10, 13, 16, 19, 12, 15], [21, 26, 10, 17, 17, 2, 8, 21, 21, 21, 6, 16, 14, 13, 19, 15, 14, 18, 8, 0], [22, 26, 27, 25, 16, 17, 20, 14, 19, 19, 5, 23, 14, 11, 19, 18, 15, 17, 9, 15], [19, 15, 21, 20, 20, 12, 14, 12, 16, 16, 13, 12, 20, 21, 14, 18, 18, 7, 16, 12], [19, 19, 22, 17, 25, 18, 10, 19, 20, 11, 22, 8, 15, 21, 14, 15, 19, 18, 17, 14], [14, 20, 17, 14, 9, 21, 10, 16, 19, 16, 19, 16, 19, 6, 15, 16, 17, 18, 10, 16], [22, 19, 23, 17, 19, 17, 4, 17, 0, 8, 21, 3, 14, 18, 23, 1, 17, 0, 20, 9], [14, 14, 13, 8, 21, 10, 17, 16, 11, 15, 15, 12, 15, 17, 17, 14, 18, 21, 15, 20], [12, 13, 19, 17, 10, 16, 11, 18, 15, 4, 11, 8, 17, 14, 13, 17, 10, 21, 16, 18], [17, 17, 19, 18, 17, 15, 13, 14, 16, 20, 4, 16, 18, 14, 17, 10, 7, 11, 12, 18], [108, 111, 115, 116, 116, 116, 115, 113, 112, 110, 104, 99, 97, 97, 89, 87, 80, 88, 80, 75], [87, 92, 92, 94, 94, 95, 95, 93, 91, 89, 82, 84, 83, 77, 80, 76, 75, 71, 58, 50], [89, 81, 70, 72, 83, 84, 74, 77, 68, 73, 72, 70, 72, 67, 68, 62, 45, 46, 30, 24], [83, 78, 77, 80, 81, 80, 79, 78, 58, 70, 62, 64, 53, 63, 56, 55, 39, 37, 17, 22], [83, 82, 77, 72, 73, 70, 67, 59, 60, 69, 65, 60, 56, 62, 48, 49, 40, 28, 22, 18], [71, 76, 79, 79, 76, 76, 71, 70, 65, 69, 62, 56, 59, 48, 48, 36, 28, 24, 24, 18], [75, 75, 76, 77, 75, 75, 72, 68, 61, 64, 61, 53, 56, 51, 49, 32, 29, 23, 9, 12], [62, 63, 66, 67, 63, 62, 54, 61, 55, 51, 52, 50, 42, 26, 22, 19, 21, 6, 14, 14], [69, 66, 66, 64, 62, 62, 61, 63, 58, 55, 53, 47, 37, 36, 32, 25, 15, 17, 15, 18], [52, 51, 57, 48, 55, 51, 41, 43, 45, 37, 33, 23, 11, 18, 13, 14, 7, 18, 7, 16], [54, 46, 48, 50, 48, 44, 29, 43, 38, 21, 22, 18, 23, 23, 10, 11, 20, 22, 9, 18], [49, 49, 43, 50, 45, 42, 47, 46, 35, 39, 25, 28, 22, 19, 13, 14, 8, 15, 10, 6], [43, 46, 47, 51, 50, 50, 41, 27, 36, 29, 28, 20, 17, 23, 15, 18, 13, 19, 5, 6], [44, 46, 45, 46, 44, 41, 36, 34, 21, 16, 19, 15, 13, 21, 15, 20, 17, 15, 18, 12], [38, 31, 36, 34, 33, 23, 23, 13, 20, 11, 21, 18, 17, 19, 15, 18, 17, 4, 3, 7], [34, 26, 25, 16, 15, 16, 17, 12, 9, 17, 19, 14, 3, 16, 17, 0, 22, 9, 15, 19], [15, 29, 22, 25, 12, 20, 19, 13, 16, 20, 14, 15, 21, 0, 17, 16, 6, 10, 2, 10], [23, 27, 14, 21, 23, 13, 20, 24, 16, 12, 15, 13, 18, 18, 13, 12, 0, 19, 22, 11], [20, 19, 24, 17, 11, 16, 20, 21, 21, 10, 21, 21, 12, 13, 2, 19, 19, 19, 18, 10], [14, 28, 21, 21, 19, 18, 18, 9, 12, 3, 5, 14, 18, 18, 18, 6, 4, 18, 16, 11], [87, 88, 85, 85, 87, 86, 86, 85, 83, 78, 68, 71, 77, 76, 59, 68, 62, 58, 55, 40], [51, 48, 45, 51, 35, 46, 44, 45, 28, 40, 45, 41, 39, 39, 35, 24, 27, 16, 22, 21], [39, 35, 39, 38, 34, 32, 41, 38, 33, 36, 34, 30, 15, 28, 24, 16, 18, 22, 21, 7], [43, 43, 42, 40, 39, 38, 37, 33, 24, 15, 17, 26, 24, 22, 21, 23, 19, 23, 18, 13], [24, 25, 25, 12, 27, 20, 13, 22, 17, 23, 11, 15, 19, 11, 15, 19, 18, 13, 13, 9], [14, 23, 24, 16, 24, 21, 23, 12, 18, 21, 26, 17, 16, 3, 15, 11, 16, 13, 9, 20], [17, 29, 18, 22, 9, 11, 15, 17, 21, 20, 16, 16, 14, 16, 15, 8, 16, 12, 13, 15], [19, 17, 18, 26, 25, 8, 13, 9, 16, 12, 8, 11, 7, 16, 15, 9, 17, 18, 19, 16], [13, 13, 20, 11, 20, 19, 13, 19, 10, 13, 7, 19, 11, 17, 19, 16, 16, 21, 12, 20], [11, 14, 19, 15, 21, 15, 20, 10, 15, 18, 10, 16, 15, 13, 19, 9, 18, 13, 7, 18], [19, 12, 12, 17, 6, 18, 22, 20, 9, 22, 16, 16, 19, 7, 19, 9, 14, 18, 21, 19], [14, 16, 17, 17, 23, 17, 15, 18, 4, 15, 16, 6, 15, 18, 9, 13, 16, 15, 14, 3], [19, 18, 11, 12, 14, 22, 17, 9, 10, 10, 18, 23, 1, 18, 16, 8, 16, 7, 13, 21], [15, 12, 1, 22, 14, 16, 15, 22, 18, 19, 20, 19, 25, 14, 18, 13, 22, 20, 18, 18], [15, 13, 25, 13, 18, 18, 18, 13, 15, 17, 15, 9, 13, 14, 7, 13, 18, 12, 16, 10], [18, 17, 11, 15, 22, 18, 18, 11, 14, 16, 9, 22, 6, 14, 11, 11, 16, 24, 6, 13], [17, 16, 17, 16, 16, 20, 12, 13, 20, 21, 2, 20, 14, 18, 18, 16, 2, 14, 19, 19], [73, 98, 95, 94, 96, 95, 95, 95, 92, 88, 79, 81, 87, 85, 66, 76, 71, 67, 65, 53], [63, 60, 66, 68, 62, 64, 58, 63, 54, 39, 50, 49, 46, 44, 40, 36, 30, 22, 16, 24], [54, 42, 52, 39, 39, 42, 48, 42, 37, 42, 43, 23, 42, 38, 30, 24, 20, 18, 14, 15], [51, 60, 56, 55, 53, 49, 49, 45, 45, 44, 44, 41, 32, 26, 27, 26, 22, 22, 8, 14], [33, 29, 20, 31, 29, 13, 28, 36, 32, 27, 30, 11, 24, 18, 21, 12, 17, 19, 12, 16], [20, 24, 30, 22, 22, 21, 18, 23, 24, 12, 16, 15, 15, 15, 13, 17, 16, 10, 12, 21], [15, 25, 25, 21, 19, 16, 22, 24, 16, 15, 16, 17, 15, 16, 16, 18, 18, 19, 18, 12], [12, 22, 21, 11, 24, 15, 17, 18, 6, 14, 9, 17, 18, 16, 11, 15, 13, 10, 14, 10], [19, 18, 22, 7, 17, 18, 6, 21, 22, 10, 21, 14, 15, 10, 17, 14, 23, 17, 16, 16], [14, 16, 12, 22, 24, 21, 20, 13, 17, 19, 13, 14, 15, 8, 9, 18, 5, 6, 11, 21], [25, 21, 24, 12, 0, 20, 18, 13, 19, 22, 20, 22, 18, 19, 19, 16, 10, 15, 11, 16], [25, 17, 21, 20, 17, 19, 23, 10, 18, 23, 19, 16, 14, 7, 19, 11, 7, 19, 18, 5], [11, 12, 20, 11, 18, 13, 15, 15, 19, 10, 19, 20, 19, 15, 5, 18, 17, 19, 21, 15], [16, 13, 19, 12, 19, 20, 21, 12, 22, 12, 10, 18, 20, 18, 24, 13, 13, 16, 12, 13], [14, 16, 8, 17, 12, 20, 23, 19, 9, 9, 14, 16, 14, 16, 23, 21, 18, 13, 0, 20], [18, 12, 18, 11, 16, 15, 19, 19, 19, 15, 16, 8, 12, 16, 18, 10, 10, 18, 23, 18], [20, 4, 10, 21, 6, 14, 20, 17, 20, 20, 6, 21, 13, 16, 19, 23, 17, 14, 5, 6], [59, 105, 113, 108, 108, 109, 109, 108, 106, 101, 84, 96, 101, 97, 85, 88, 83, 80, 73, 64], [35, 87, 79, 83, 93, 87, 82, 85, 78, 81, 74, 84, 64, 69, 69, 60, 57, 52, 42, 35], [26, 79, 71, 81, 67, 75, 74, 65, 65, 72, 57, 68, 59, 44, 56, 47, 34, 29, 19, 16], [19, 84, 82, 78, 72, 72, 71, 69, 72, 72, 60, 53, 46, 39, 38, 35, 25, 22, 15, 18], [20, 65, 67, 67, 70, 66, 65, 64, 63, 60, 57, 49, 44, 41, 23, 14, 16, 22, 13, 11], [9, 59, 44, 58, 62, 60, 59, 57, 57, 53, 38, 38, 32, 19, 12, 22, 0, 5, 13, 19], [19, 66, 65, 63, 54, 51, 40, 58, 56, 50, 47, 47, 35, 14, 19, 10, 20, 18, 19, 20], [13, 60, 60, 50, 34, 38, 44, 36, 45, 42, 35, 28, 22, 17, 18, 2, 18, 12, 20, 13], [10, 55, 55, 56, 51, 49, 45, 42, 35, 38, 32, 35, 25, 20, 20, 16, 21, 16, 11, 18], [19, 44, 43, 48, 45, 40, 31, 16, 27, 19, 11, 10, 0, 19, 4, 10, 5, 11, 7, 4], [3, 33, 40, 38, 35, 34, 22, 31, 24, 22, 24, 13, 13, 12, 14, 23, 12, 19, 22, 18], [13, 35, 39, 41, 35, 31, 28, 28, 23, 22, 19, 14, 18, 18, 19, 21, 17, 20, 14, 22], [20, 32, 38, 34, 27, 21, 17, 9, 8, 15, 11, 18, 21, 13, 11, 25, 16, 12, 13, 15], [7, 32, 31, 28, 36, 33, 16, 25, 11, 17, 14, 10, 15, 19, 21, 18, 16, 12, 18, 17], [20, 21, 15, 19, 24, 21, 23, 22, 13, 20, 7, 10, 25, 17, 21, 21, 22, 19, 21, 9], [14, 25, 22, 20, 14, 12, 8, 13, 15, 23, 14, 23, 7, 10, 15, 19, 19, 14, 10, 7], [6, 27, 28, 24, 26, 11, 21, 16, 18, 13, 12, 15, 24, 11, 13, 18, 14, 12, 13, 13], [78, 77, 78, 78, 72, 63, 73, 72, 72, 72, 69, 67, 67, 68, 62, 61, 54, 35, 41, 38], [46, 47, 49, 53, 53, 52, 52, 51, 49, 45, 38, 42, 42, 36, 24, 29, 19, 19, 23, 12], [32, 37, 31, 26, 36, 27, 29, 28, 27, 19, 36, 34, 31, 21, 21, 26, 20, 17, 17, 14], [26, 28, 25, 23, 19, 20, 25, 24, 17, 21, 13, 23, 11, 21, 19, 16, 13, 13, 16, 20], [18, 22, 18, 21, 6, 16, 14, 11, 16, 11, 3, 18, 8, 20, 15, 19, 9, 26, 21, 15], [16, 16, 21, 15, 19, 13, 17, 7, 13, 20, 11, 11, 17, 11, 18, 14, 14, 20, 17, 10], [23, 23, 19, 18, 21, 13, 8, 13, 22, 6, 20, 20, 19, 14, 7, 10, 18, 8, 15, 19], [23, 20, 11, 14, 8, 16, 16, 13, 20, 9, 23, 18, 15, 17, 7, 13, 14, 11, 13, 14], [19, 15, 23, 19, 18, 23, 18, 26, 15, 16, 19, 17, 14, 6, 16, 19, 8, 23, 18, 18], [9, 14, 16, 11, 19, 7, 13, 16, 6, 21, 19, 18, 16, 19, 22, 19, 7, 6, 19, 22], [10, 7, 10, 20, 13, 12, 16, 13, 14, 23, 16, 15, 8, 21, 14, 16, 7, 19, 21, 7], [17, 4, 18, 12, 19, 15, 22, 23, 17, 7, 18, 7, 13, 23, 20, 17, 14, 18, 21, 21], [11, 10, 17, 9, 15, 8, 8, 20, 21, 16, 14, 22, 9, 18, 17, 11, 17, 15, 20, 11], [94, 92, 91, 93, 88, 80, 77, 75, 75, 72, 73, 72, 77, 76, 68, 70, 64, 47, 50, 43], [53, 59, 50, 59, 60, 55, 52, 50, 48, 54, 54, 41, 47, 49, 41, 35, 34, 26, 17, 24], [59, 51, 53, 55, 55, 52, 56, 55, 50, 51, 53, 45, 41, 41, 18, 22, 7, 0, 20, 20], [39, 41, 41, 37, 41, 41, 39, 39, 36, 33, 31, 9, 24, 6, 19, 9, 12, 20, 6, 19], [31, 33, 33, 25, 24, 30, 30, 23, 16, 13, 13, 19, 17, 16, 20, 12, 21, 17, 13, 9], [26, 20, 21, 20, 24, 18, 20, 16, 15, 17, 19, 20, 14, 8, 21, 15, 20, 14, 4, 11], [24, 22, 16, 20, 23, 17, 17, 22, 20, 16, 16, 20, 2, 15, 8, 19, 21, 21, 17, 14], [23, 26, 13, 12, 17, 19, 18, 21, 13, 20, 20, 13, 14, 8, 21, 9, 22, 14, 4, 14], [23, 14, 16, 18, 22, 16, 10, 13, 17, 22, 12, 19, 18, 22, 14, 16, 21, 19, 9, 15], [20, 22, 19, 22, 17, 13, 19, 17, 19, 22, 15, 19, 16, 20, 10, 18, 11, 21, 21, 12], [16, 16, 19, 16, 11, 13, 20, 9, 15, 18, 21, 17, 17, 19, 17, 21, 12, 10, 11, 24], [21, 14, 15, 15, 14, 14, 18, 14, 22, 21, 13, 18, 18, 19, 14, 16, 19, 21, 18, 9], [23, 21, 16, 23, 7, 19, 20, 19, 21, 18, 11, 18, 15, 10, 18, 20, 6, 17, 12, 23], [54, 103, 98, 103, 101, 100, 92, 89, 91, 89, 77, 86, 87, 85, 80, 78, 75, 66, 52, 51], [32, 88, 87, 86, 86, 86, 84, 86, 85, 80, 71, 68, 78, 70, 67, 63, 54, 41, 40, 30], [23, 80, 69, 69, 74, 70, 71, 67, 57, 63, 62, 58, 50, 51, 43, 44, 34, 27, 25, 24], [19, 65, 58, 65, 66, 66, 66, 59, 56, 45, 57, 51, 21, 42, 30, 29, 16, 16, 14, 20], [24, 58, 62, 61, 55, 46, 56, 51, 46, 49, 50, 47, 42, 29, 27, 23, 10, 22, 24, 18], [21, 51, 51, 32, 41, 36, 33, 31, 37, 36, 29, 25, 17, 20, 9, 20, 17, 12, 11, 18], [16, 55, 52, 50, 41, 42, 37, 42, 28, 29, 21, 21, 6, 10, 11, 18, 16, 17, 14, 16], [20, 38, 44, 43, 40, 42, 35, 36, 25, 32, 22, 23, 20, 8, 12, 16, 10, 17, 18, 20], [10, 48, 44, 39, 34, 21, 20, 26, 24, 27, 21, 21, 19, 13, 21, 17, 15, 19, 17, 16], [22, 34, 36, 30, 26, 27, 25, 13, 16, 22, 18, 17, 20, 18, 13, 21, 18, 9, 17, 18], [19, 18, 27, 21, 25, 20, 14, 13, 1, 10, 17, 20, 11, 21, 1, 15, 17, 19, 8, 26], [12, 28, 29, 23, 22, 16, 20, 24, 18, 10, 1, 21, 17, 17, 17, 8, 21, 12, 16, 18], [12, 27, 19, 19, 17, 16, 21, 15, 10, 20, 20, 17, 12, 20, 15, 20, 20, 24, 15, 19], [67, 70, 78, 81, 81, 78, 78, 78, 73, 71, 68, 63, 66, 67, 60, 56, 51, 50, 29, 37], [47, 52, 53, 56, 56, 55, 54, 53, 47, 40, 40, 41, 27, 30, 27, 25, 7, 16, 22, 18], [22, 33, 35, 36, 34, 37, 36, 35, 24, 17, 22, 18, 21, 23, 7, 16, 16, 19, 8, 15], [24, 26, 23, 20, 18, 18, 22, 24, 17, 17, 16, 19, 21, 13, 12, 16, 21, 24, 0, 12], [18, 20, 15, 26, 21, 22, 22, 16, 21, 11, 15, 17, 18, 17, 25, 24, 23, 18, 9, 12], [21, 7, 17, 16, 15, 16, 17, 20, 18, 13, 20, 16, 19, 20, 14, 8, 11, 18, 15, 18], [14, 13, 19, 18, 20, 19, 7, 15, 23, 21, 19, 18, 15, 16, 17, 18, 22, 15, 16, 13], [16, 26, 23, 21, 23, 9, 14, 22, 12, 16, 17, 23, 14, 16, 15, 13, 18, 21, 19, 15], [17, 6, 6, 15, 21, 25, 17, 23, 17, 20, 19, 16, 27, 18, 12, 14, 21, 10, 23, 11], [22, 11, 8, 20, 6, 21, 23, 17, 22, 20, 24, 22, 18, 24, 16, 11, 25, 17, 19, 20], [21, 14, 20, 22, 19, 26, 14, 18, 16, 12, 19, 24, 19, 24, 12, 20, 17, 23, 16, 21], [85, 90, 94, 96, 95, 95, 95, 95, 92, 89, 83, 77, 78, 79, 73, 72, 63, 63, 32, 46], [62, 61, 63, 63, 66, 65, 63, 63, 56, 46, 47, 52, 34, 38, 37, 34, 19, 18, 15, 21], [38, 48, 49, 49, 44, 43, 43, 41, 31, 31, 38, 35, 18, 30, 27, 22, 21, 17, 19, 23], [40, 40, 36, 30, 28, 24, 24, 30, 31, 27, 24, 21, 14, 17, 24, 10, 15, 13, 14, 22], [23, 34, 21, 26, 23, 28, 19, 20, 25, 20, 16, 15, 9, 12, 23, 3, 25, 7, 22, 7], [23, 19, 18, 20, 25, 16, 16, 19, 26, 20, 21, 18, 11, 19, 23, 21, 19, 17, 18, 22], [23, 26, 13, 20, 21, 18, 12, 9, 12, 12, 19, 19, 8, 19, 19, 16, 19, 18, 17, 19], [12, 20, 19, 18, 19, 14, 24, 15, 26, 16, 21, 8, 15, 16, 17, 20, 13, 15, 17, 20], [21, 17, 13, 18, 20, 17, 19, 23, 17, 22, 24, 1, 23, 14, 11, 12, 17, 16, 12, 12], [16, 5, 15, 20, 15, 14, 11, 20, 18, 14, 14, 12, 13, 19, 16, 13, 21, 5, 13, 11], [14, 21, 15, 20, 19, 17, 15, 19, 21, 18, 23, 7, 21, 8, 15, 17, 22, 14, 21, 22], [102, 107, 110, 112, 111, 111, 111, 111, 108, 105, 98, 91, 94, 93, 89, 84, 77, 76, 57, 57], [86, 86, 88, 89, 92, 91, 86, 77, 79, 68, 69, 74, 64, 67, 62, 56, 31, 37, 21, 16], [66, 72, 65, 53, 67, 64, 65, 60, 57, 47, 44, 49, 47, 42, 37, 29, 15, 20, 17, 18], [63, 64, 60, 37, 47, 52, 57, 55, 52, 49, 47, 47, 42, 24, 25, 18, 22, 13, 20, 16], [53, 52, 48, 45, 51, 52, 50, 49, 27, 42, 40, 29, 23, 12, 21, 8, 12, 22, 23, 10], [41, 44, 43, 38, 38, 28, 34, 30, 22, 21, 24, 18, 16, 10, 17, 17, 15, 20, 20, 12], [46, 43, 40, 29, 21, 30, 24, 28, 25, 23, 22, 11, 15, 16, 15, 18, 14, 16, 13, 18], [31, 37, 36, 35, 24, 29, 21, 20, 9, 20, 21, 16, 20, 16, 13, 20, 18, 20, 24, 22], [29, 25, 30, 18, 24, 12, 20, 24, 20, 18, 15, 19, 17, 13, 19, 10, 22, 8, 14, 20], [24, 28, 20, 18, 21, 16, 19, 2, 19, 13, 11, 21, 19, 20, 17, 25, 15, 20, 12, 14], [26, 28, 23, 23, 14, 18, 21, 23, 16, 13, 18, 23, 20, 14, 15, 19, 23, 19, 18, 19], [65, 73, 67, 72, 69, 67, 65, 65, 58, 54, 57, 48, 56, 37, 40, 42, 36, 31, 24, 19], [45, 45, 43, 42, 43, 40, 42, 41, 43, 42, 30, 36, 23, 15, 23, 8, 23, 21, 19, 22], [26, 21, 28, 26, 24, 20, 22, 20, 22, 14, 21, 20, 15, 20, 22, 11, 16, 21, 13, 18], [30, 32, 34, 35, 31, 32, 19, 18, 27, 15, 15, 11, 21, 18, 13, 12, 16, 18, 15, 11], [21, 25, 23, 22, 6, 12, 19, 12, 21, 21, 17, 20, 7, 19, 10, 23, 18, 17, 16, 10], [24, 25, 25, 26, 22, 18, 25, 23, 14, 21, 15, 21, 10, 15, 12, 12, 13, 17, 15, 19], [22, 13, 10, 21, 19, 22, 22, 21, 24, 8, 18, 19, 20, 14, 12, 19, 8, 19, 13, 16], [21, 25, 17, 13, 20, 18, 17, 23, 23, 23, 21, 14, 15, 20, 23, 16, 21, 18, 21, 21], [17, 14, 14, 12, 23, 15, 16, 15, 22, 13, 26, 23, 18, 23, 14, 12, 16, 19, 13, 19], [89, 93, 90, 92, 90, 87, 88, 85, 85, 82, 62, 72, 77, 71, 64, 58, 51, 41, 25, 26], [43, 59, 52, 46, 52, 48, 46, 50, 48, 50, 20, 46, 34, 13, 22, 26, 20, 22, 16, 18], [27, 36, 33, 37, 28, 31, 33, 31, 32, 21, 19, 20, 16, 17, 15, 20, 13, 23, 10, 13], [32, 42, 28, 27, 29, 32, 35, 33, 28, 31, 23, 19, 16, 20, 23, 23, 21, 16, 22, 20], [29, 22, 26, 33, 27, 24, 22, 24, 10, 15, 14, 16, 18, 17, 14, 5, 19, 14, 16, 23], [10, 22, 20, 13, 19, 21, 25, 20, 21, 23, 13, 9, 17, 17, 15, 20, 20, 21, 19, 10], [23, 18, 18, 22, 24, 29, 18, 15, 23, 21, 20, 20, 10, 15, 22, 16, 23, 17, 21, 18], [24, 11, 7, 8, 18, 17, 21, 16, 19, 24, 21, 23, 13, 22, 18, 19, 21, 16, 21, 27], [105, 107, 106, 106, 105, 104, 103, 101, 101, 97, 77, 91, 91, 86, 77, 70, 64, 54, 46, 40], [83, 80, 79, 68, 63, 78, 75, 73, 68, 72, 63, 66, 56, 56, 46, 31, 15, 8, 15, 18], [55, 51, 52, 56, 48, 51, 53, 47, 41, 40, 20, 34, 36, 28, 19, 20, 20, 19, 21, 19], [56, 53, 50, 40, 47, 54, 54, 49, 28, 50, 39, 40, 35, 30, 19, 26, 25, 28, 16, 21], [38, 43, 37, 41, 39, 39, 41, 40, 29, 20, 19, 20, 21, 21, 15, 12, 14, 17, 18, 11], [46, 38, 38, 33, 30, 29, 28, 22, 17, 17, 14, 12, 12, 15, 24, 18, 16, 19, 17, 15], [31, 38, 25, 27, 13, 21, 20, 19, 12, 15, 19, 24, 17, 13, 17, 20, 17, 18, 21, 16], [16, 23, 23, 27, 18, 26, 16, 15, 12, 8, 13, 22, 15, 15, 16, 18, 14, 22, 23, 22], [18, 24, 19, 25, 25, 21, 13, 12, 15, 19, 18, 23, 22, 12, 22, 16, 16, 26, 17, 20], [61, 58, 51, 66, 50, 61, 47, 51, 45, 56, 52, 50, 39, 48, 35, 37, 27, 31, 28, 25], [42, 43, 39, 37, 37, 42, 40, 29, 33, 23, 35, 29, 23, 23, 14, 21, 17, 17, 23, 21], [32, 23, 15, 21, 28, 32, 23, 25, 14, 25, 21, 20, 18, 23, 21, 18, 16, 8, 19, 12], [16, 18, 26, 24, 20, 24, 23, 19, 22, 17, 18, 19, 3, 19, 23, 18, 9, 11, 19, 14], [21, 24, 24, 14, 22, 13, 21, 24, 16, 25, 9, 16, 16, 20, 22, 18, 8, 23, 18, 15], [14, 21, 17, 25, 21, 18, 20, 20, 20, 24, 19, 18, 23, 20, 22, 15, 25, 18, 21, 18], [18, 18, 19, 23, 18, 16, 19, 14, 20, 22, 13, 19, 24, 19, 20, 23, 27, 20, 20, 23], [83, 78, 76, 78, 69, 69, 74, 77, 67, 77, 70, 70, 66, 66, 53, 52, 42, 32, 26, 23], [52, 53, 49, 49, 43, 35, 47, 42, 42, 40, 36, 37, 29, 23, 22, 19, 24, 25, 18, 19], [37, 39, 33, 34, 28, 33, 28, 27, 27, 27, 12, 24, 26, 19, 23, 20, 17, 18, 20, 14], [28, 24, 23, 28, 24, 22, 26, 26, 23, 24, 26, 26, 20, 20, 19, 22, 24, 13, 17, 20], [28, 15, 22, 23, 28, 25, 15, 25, 22, 20, 21, 20, 23, 21, 20, 27, 16, 19, 16, 19], [8, 19, 22, 25, 21, 25, 16, 21, 20, 20, 22, 26, 26, 19, 21, 14, 23, 23, 13, 16], [19, 14, 23, 25, 24, 24, 15, 26, 22, 20, 22, 22, 19, 21, 23, 22, 14, 18, 19, 21], [108, 106, 101, 101, 89, 89, 96, 101, 94, 98, 88, 90, 87, 76, 72, 69, 51, 51, 25, 21], [81, 73, 80, 81, 70, 77, 73, 64, 58, 60, 61, 52, 42, 46, 35, 28, 21, 20, 19, 15], [64, 60, 58, 61, 63, 56, 61, 52, 46, 43, 43, 23, 27, 21, 16, 23, 21, 21, 21, 11], [49, 54, 48, 58, 55, 33, 46, 48, 46, 25, 32, 27, 23, 20, 22, 18, 21, 12, 20, 13], [39, 43, 47, 37, 38, 29, 35, 32, 28, 20, 10, 16, 17, 12, 23, 13, 20, 17, 22, 22], [33, 32, 23, 34, 27, 29, 21, 16, 21, 18, 20, 14, 9, 19, 18, 22, 11, 21, 15, 20], [18, 27, 17, 24, 27, 18, 25, 24, 23, 20, 22, 16, 19, 24, 18, 21, 20, 21, 25, 16], [61, 71, 70, 72, 63, 58, 56, 54, 58, 50, 46, 50, 46, 34, 37, 28, 25, 26, 26, 25], [30, 40, 37, 38, 33, 31, 34, 31, 27, 30, 22, 22, 19, 25, 21, 21, 14, 17, 20, 25], [25, 30, 22, 26, 28, 24, 28, 24, 14, 20, 19, 19, 15, 23, 14, 18, 16, 16, 20, 18], [26, 19, 25, 22, 21, 20, 27, 16, 22, 15, 19, 18, 14, 22, 22, 22, 22, 18, 18, 22], [17, 23, 20, 20, 26, 21, 14, 23, 17, 8, 24, 21, 20, 8, 17, 20, 20, 20, 19, 24], [22, 23, 24, 23, 21, 20, 16, 27, 27, 18, 20, 18, 17, 19, 18, 14, 15, 19, 16, 19], [72, 82, 85, 83, 81, 79, 73, 68, 75, 69, 67, 69, 58, 51, 53, 46, 40, 35, 29, 25], [49, 49, 54, 52, 39, 45, 46, 37, 29, 40, 35, 28, 29, 26, 17, 23, 20, 27, 17, 20], [33, 36, 31, 33, 32, 35, 32, 35, 28, 28, 24, 23, 18, 22, 13, 19, 19, 22, 17, 19], [28, 28, 29, 27, 27, 25, 28, 21, 17, 20, 20, 24, 20, 23, 22, 19, 21, 15, 19, 22], [25, 26, 26, 22, 9, 24, 19, 20, 22, 23, 18, 14, 16, 22, 19, 26, 22, 22, 23, 21], [82, 93, 96, 100, 99, 94, 90, 83, 91, 79, 81, 80, 69, 66, 62, 54, 43, 35, 17, 21], [68, 66, 71, 61, 53, 64, 63, 57, 45, 51, 44, 40, 33, 28, 17, 25, 20, 24, 14, 16], [41, 51, 49, 50, 47, 48, 42, 39, 32, 29, 20, 23, 23, 22, 19, 20, 17, 27, 14, 12], [39, 43, 43, 37, 34, 36, 26, 26, 20, 17, 24, 21, 18, 21, 14, 11, 23, 16, 15, 23], [32, 30, 31, 26, 25, 21, 24, 23, 18, 16, 25, 25, 20, 17, 24, 24, 13, 19, 17, 23], [63, 69, 56, 66, 51, 62, 55, 47, 48, 45, 37, 37, 30, 28, 28, 23, 28, 23, 17, 25], [29, 28, 28, 34, 25, 32, 29, 28, 27, 21, 17, 20, 19, 22, 23, 19, 25, 16, 23, 21], [22, 23, 28, 28, 22, 27, 28, 20, 24, 22, 21, 23, 24, 24, 24, 25, 26, 15, 19, 27], [70, 84, 83, 83, 78, 70, 67, 64, 77, 66, 70, 66, 55, 52, 47, 35, 30, 26, 26, 25], [45, 55, 40, 47, 42, 46, 42, 36, 37, 37, 32, 22, 17, 24, 19, 14, 21, 27, 22, 18], [31, 32, 36, 34, 24, 23, 22, 19, 21, 24, 24, 20, 22, 23, 19, 15, 15, 20, 21, 21], [23, 24, 25, 29, 28, 22, 26, 22, 19, 25, 23, 22, 24, 24, 22, 23, 19, 18, 25, 23], [83, 91, 97, 98, 91, 90, 93, 89, 89, 78, 80, 76, 65, 65, 55, 41, 36, 27, 18, 22], [70, 68, 58, 58, 66, 61, 62, 53, 48, 47, 46, 33, 18, 24, 26, 20, 17, 16, 19, 16], [46, 52, 51, 47, 39, 41, 41, 27, 32, 29, 26, 22, 25, 17, 18, 19, 21, 16, 26, 24], [34, 36, 36, 36, 32, 27, 29, 23, 21, 21, 27, 17, 13, 26, 23, 19, 20, 25, 24, 18]]}\n"
  },
  {
    "path": "experiments/track02-C4-bps.json",
    "content": "{\"1\": [[0, 0.03646117968209008], [17, 1.4790503289019412], [116, 1.7464818747653081], [1364, 0.32805053827525693], [511, 0.1609264966801982], [2207, 0.0009999999999999998]], \"2\": [[0, 0.0012634508047348386], [9, 0.21596971199840045], [32, 2.404807458377003], [729, 0.5502459191358052], [1239, 0.03756845077976835], [1575, 0.0009999999999999998]], \"3\": [[0, 0.01254349241718219], [15, 0.15099185596710532], [26, 0.3421051478156847], [804, 0.051061292632147516], [1164, 0.0047740936634367475], [679, 0.0009999999999999998]], \"4\": [[0, 0.004250878808238577], [9, 0.057457146712061244], [32, 0.5554119700653773], [1434, 0.018122634597003563], [534, 0.025025024003812353], [1398, 0.0009999999999999998]], \"5\": [[0, 0.0009999999999999998], [6, 0.01816626570185348], [20, 0.08438815335232426], [624, 0.006071196966144399], [1358, 0.002903916392093575], [463, 0.0009999999999999998]], \"6\": [[0, 0.002161710338513421], [12, 0.15650724904503518], [20, 0.5925248800917347], [1245, 0.011559939842952675], [731, 0.015835095979827792], [1200, 0.0009999999999999998]], \"7\": [[0, 0.0023404483051654946], [15, 0.08542249910042937], [17, 0.1666895668496017], [853, 0.0021358280107708454], [1123, 0.0033970486787507984], [531, 0.0009999999999999998]], \"8\": [[0, 0.0020843732849860934], [17, 0.12346736808924237], [29, 0.18170621956830013], [1016, 0.010201883691495973], [946, 0.005236696363962163], [719, 0.0009999999999999998]], \"9\": [[0, 0.0030655166217990527], [17, 0.13600540298075547], [64, 0.1831798098530581], [641, 0.014173570743211048], [1286, 0.0019437161448920615], [289, 0.0009999999999999998]], \"10\": [[0, 0.00479559610080011], [29, 0.06072650347041644], [61, 0.0798317372027684], [816, 0.0046354272307415414], [1103, 0.003714921017812922], [570, 0.0009999999999999998]], \"11\": [[0, 0.002712805431040445], [20, 0.058009604750650895], [17, 0.07063250568468678], [746, 0.008931881841216528], [1225, 0.001201477179802048], [80, 0.0009999999999999998]], \"12\": [[0, 0.0011411701775337058], [9, 0.01821003171882191], [20, 0.07124145242041195], [795, 0.006330355307626967], [1184, 0.002254072162494906], [353, 0.0009999999999999998]], \"13\": [[0, 0.0012512680959778542], [9, 0.012546514343345075], [9, 0.01494232149421479], [746, 0.0020352720499251602], [1245, 0.0021786470499486742], [338, 0.0009999999999999998]], \"14\": [[0, 0.0009952115977475834], [12, 0.022746594188342958], [110, 0.03291419108007345], [139, 0.006637951769233443], [1747, 0.0007961189128058337]], \"15\": [[0, 0.0008774321388499404], [12, 0.010222851979210086], [20, 0.013301383595068267], [572, 0.0028869457800665983], [1405, 0.0008797187781985485]], \"16\": [[0, 0.0009241395135334805], [12, 0.017513958907860068], [9, 0.006637052937096589], [853, 0.00367677018607421], [1135, 0.0010606068054344045], [26, 0.0009999999999999998]], \"17\": [[0, 0.0009050618790137055], [15, 0.029306767939208236], [23, 0.01078682206955967], [827, 0.003994973109065478], [1144, 0.0009003742241215998]], \"18\": [[0, 0.0012493200902472551], [26, 0.01674550900239793], [29, 0.01147113903438373], [232, 0.0032622576962070475], [1721, 0.00103090043200766], [13, 0.0009999999999999998]], \"19\": [[0, 0.001157202173287927], [17, 0.024463638969512314], [17, 0.027302180375823496], [906, 0.0012095650014134092], [1068, 0.0008644430911523587]], \"20\": [[0, 0.0029782923681902418], [223, 0.0026139493226257425], [168, 0.0015766931903501277], [842, 0.0011388221206957768], [775, 0.0009999999999999998]]}"
  },
  {
    "path": "experiments/tulip_piano.py",
    "content": "\"\"\"Piano notes generated on amy/tulip.\"\"\"\n# Uses the partials amplitude breakpoints and residual written by piano-partials.ipynb.\n\nimport json\nimport time\nimport amy\n\ntry:\n    import midi\n    have_midi = True\nexcept:\n    print(\"midi not found\")\n    have_midi = False\n\ntry:\n    from ulab import numpy as np\nexcept:\n    import numpy as np\n\n# Read in the params file written by piano_heterodyne.ipynb\n# Contents:\n#   sample_times_ms - single vector of fixed log-spaced envelope sample times (in int16 integer ms).\n#   notes - the MIDI numbers corresponding to each note described.\n#   velocities - The (MIDI) strike velocities available for each note, the same for all notes.\n#   num_harmonics - Array of (num_notes * num_velocities) counts of how many harmonics are defined for each note+vel combination.\n#   harmonics_freq - Vector of (total_num_harmonics) int16s giving freq for each harmonic in \"MIDI cents\" i.e. 6900 = 440 Hz.\n#   harmonics_mags - Array of (total_num_harmonics, num_sample_times) uint8s giving envelope samples for each harmonic.  In dB, between 0 and 100.\n\n# We load this in as a python file, it's easier for porting to systems without filesystems\nfrom piano_params import notes_params\n\n\nNOTES = np.array(notes_params['notes'], dtype=np.int8)\nVELOCITIES = np.array(notes_params['velocities'], dtype=np.int8)\nNUM_HARMONICS = np.array(notes_params['num_harmonics'], dtype=np.int16)\nassert len(NUM_HARMONICS) == len(NOTES) * len(VELOCITIES)\nNUM_MAGS = len(notes_params['harmonics_mags'][0])\n# Add in a derived diff-times and start-harmonic fields\n# Reintroduce the initial zero-time...\nSAMPLE_TIMES = np.array([0] + notes_params['sample_times_ms'])\n#.. so we can neatly calculate the time-deltas needed for BP strings.\nDIFF_TIMES = SAMPLE_TIMES[1:] - SAMPLE_TIMES[:-1]\n# Lookup to find first harmonic for nth note.\nSTART_HARMONIC = np.zeros(len(NUM_HARMONICS), dtype=np.int16)\nfor i in range(len(NUM_HARMONICS)):  # (No cumsum in ulab.numpy)\n    START_HARMONIC[i] = np.sum(NUM_HARMONICS[:i])\n# We build a single array for all the harmonics with the frequency as the\n# first column, followed by the envelope magnitudes.  Then, we can pull\n# out the entire description for a given note/velocity pair simply by\n# pulling out NUM_HARMONICS[harmonic_index] rows starting at\n# START_HARMONIC[harmonic_index]\nFREQ_MAGS = np.zeros((np.sum(NUM_HARMONICS), 1 + NUM_MAGS), dtype=np.int16)\nFREQ_MAGS[:, 0] = np.array(notes_params['harmonics_freq'], dtype=np.int16)\nFREQ_MAGS[:, 1:] = np.array(notes_params['harmonics_mags'], dtype=np.int16)\n\ndef harms_params_from_note_index_vel_index(note_index, vel_index):\n    \"\"\"Retrieve a (log-domain) harms_params list for a given note/vel index pair.\"\"\"\n    # A harmonic is represented as a [freq_cents, mag1_db, mag2_db, .. mag20_db] row.\n    # A note is represented as NUM_HARMONICS (usually 20) rows.\n    note_vel_index = note_index * len(VELOCITIES) + vel_index\n    num_harmonics = NUM_HARMONICS[note_vel_index]\n    start_harmonic = START_HARMONIC[note_vel_index]\n    harms_params = FREQ_MAGS[start_harmonic : start_harmonic + num_harmonics, :]\n    return harms_params\n\ndef interp_harms_params(hp0, hp1, alpha):\n    \"\"\"Return harm_param list that is alpha of the way to hp1 from hp0.\"\"\"\n    # hp_ is [[freq_h1, mag1, mag2, ...], [freq_h2, mag1, mag2, ..], ...]\n    num_harmonics = min(hp0.shape[0], hp1.shape[0])\n    # Assume the units are log-scale, so linear interpolation is good.\n    return hp0[:num_harmonics] + alpha * (hp1[:num_harmonics] - hp0[:num_harmonics])\n\ndef cents_to_hz(cents):\n    \"\"\"Convert 'Midi cents' frequency to Hz.  6900 cents -> 440 Hz\"\"\"\n    return 440 * (2 ** ((cents - 6900) / 1200.0))\n  \ndef db_to_lin(d):\n    \"\"\"Convert the db-scale magnitudes to linear.  0 dB -> 0.00001, so 100 dB -> 1.0.\"\"\"\n    # Clip anything below 0.001 to zero.\n    return np.maximum(0, 10.0 ** ((d - 100) / 20.0) - 0.001)\n\ndef harms_params_for_note_vel(note, vel):\n    \"\"\"Convert midi note and velocity into an interpolated harms_params list of harmonic specifications.\"\"\"\n    note = np.clip(note, NOTES[0], NOTES[-1])\n    vel = np.clip(vel, VELOCITIES[0], VELOCITIES[-1])\n    note_index = -1 + np.sum(NOTES[:-1] <= note)  # at most the last-but-one value.\n    strike_index = -1 + np.sum(VELOCITIES[:-1] <= vel)\n    lower_note = NOTES[note_index]\n    upper_note = NOTES[note_index + 1]\n    note_alpha = (note - lower_note) / (upper_note - lower_note)\n    lower_strike = VELOCITIES[strike_index]\n    upper_strike = VELOCITIES[strike_index + 1]\n    strike_alpha = (vel - lower_strike) / (upper_strike - lower_strike)\n    # We interpolate to describe a note at both strike indices,\n    # then interpolate those to get the strike.\n    harms_params = interp_harms_params(\n        interp_harms_params(\n            harms_params_from_note_index_vel_index(note_index, strike_index),\n            harms_params_from_note_index_vel_index(note_index + 1, strike_index),\n            note_alpha,\n        ),\n        interp_harms_params(\n            harms_params_from_note_index_vel_index(note_index, strike_index + 1),\n            harms_params_from_note_index_vel_index(note_index + 1, strike_index + 1),\n            note_alpha,\n        ),\n        strike_alpha,\n    )\n    return harms_params\n\ndef init_piano_voice(num_partials, base_osc=0, **kwargs):\n    \"\"\"One-time initialization of the unchanging parts of the partials voices.\"\"\"\n    amy_send(osc=base_osc, wave=amy.BYO_PARTIALS, num_partials=num_partials, amp={'eg0': 0}, **kwargs)\n    for partial in range(1, num_partials + 1):\n        bp_string = '0,0,' + ','.join(\"%d,0\" % t for t in DIFF_TIMES)\n        # We append a release segment to die away to silence over 200ms on note-off.\n        bp_string += ',200,0'\n        amy_send(osc=base_osc + partial, wave=amy.PARTIAL, bp0=bp_string, eg0_type=amy.ENVELOPE_TRUE_EXPONENTIAL, **kwargs)\n\ndef setup_piano_voice(harms_params, base_osc=0, voices=None, time=None, sequence=None):\n    \"\"\"Configure a set of PARTIALs oscs to play a particular note and velocity.\"\"\"\n    num_partials = len(harms_params)\n    amy_send(osc=base_osc, wave=amy.BYO_PARTIALS, num_partials=num_partials,\n           voices=voices, time=time, sequence=sequence)\n    if time is not None:\n        base_cmd = 't' + str(time)\n    else:\n        base_cmd = ''\n    if voices is not None:\n        base_cmd += 'r' + str(voices)\n    if sequence is not None:\n        base_cmd += 'H' + str(sequence)\n    for i in range(num_partials):\n        # Omit the time-deltas from the list to save space.  The osc will keep the ones we set up in init_piano_voice.\n        #env_vals = db_to_lin(harms_params[i, 1:])\n        #bp_string = ',,' + ','.join(\",%.3f\" % val for val in env_vals)\n        # bp_strings beginning with \"..\" are in special integer-dB format for fast transcoding.\n        env_vals = harms_params[i, 1:]\n        bp_string = '..,,' + ','.join(\",%d\" % val for val in env_vals)\n        # Add final release.\n        bp_string += ',200,0'\n        f0_hz = cents_to_hz(harms_params[i, 0])\n        #amy_send(osc=base_osc + 1 + i, freq=f0_hz, bp0=bp_string, voices=voices, time=time)\n        # Special-case construction of the Wire Protocol message to save time\n        amy.send_raw(\n            base_cmd + 'v' + str(base_osc + i + 1) + ('f%.1f' % f0_hz) + 'A' + bp_string + 'Z'\n        )\n\ndef piano_note_on(note=60, vel=1, **kwargs):\n    if vel == 0:\n        # Note off.\n        amy.send(vel=0, **kwargs)\n    else:\n        hps = harms_params_for_note_vel(note, round(vel * 127))\n        setup_piano_voice(hps, **kwargs)\n        # We already configured the freuquencies and magnitudes in setup, so\n        # the note on is completely neutral.\n        amy_send(note=60, vel=1, **kwargs)\n\n\ndef amy_send(**kwargs):\n    amy.send(**kwargs)\n\n\n\namy.reset()\ntime.sleep(0.1)  # to let reset happen.\namy.send(store_patch='1024,v0w10Zv%dw%dZ')\namy.send(voices='0,1,2,3', load_patch=1024)\nnum_partials = NUM_HARMONICS[0]\npatch_string = 'v0w10Zv%dw%dZ' % (num_partials + 1, amy.PARTIAL)\nprint(\"Loaded dpwe piano on patch #1024, AMY voices 0,1,2,3\")\n\nif have_midi:\n    synth_obj = midi.Synth(num_voices=4, patch_string=patch_string)\n    #voices = '0,1,2,3'\n    voices = \",\".join([str(a) for a in synth_obj.amy_voice_nums])\n    #print(\"voices=\", voices)\n    # We have to intercept the note-on events of the Synth voice objects.\n    class PianoVoiceObject:\n        \"\"\"Substitute for midi.VoiceObject for Piano voices.\"\"\"\n        def __init__(self, amy_voice):\n            self.amy_voice = amy_voice\n\n        def note_on(self, note, vel, time=None, sequence=None):\n            #amy.send(time=time, voices=self.amy_voice, note=note, vel=vel, sequence=sequence)\n            piano_note_on(note, vel, voices=self.amy_voice, time=time, sequence=sequence)\n\n        def note_off(self, time=None, sequence=None):\n            amy.send(time=time, voices=self.amy_voice, vel=0, sequence=sequence)\n\n\n    # Intercept the voice objects for our synth\n    synth_obj.voice_objs = [PianoVoiceObject(obj.amy_voice) for obj in synth_obj.voice_objs]\n    for voice_obj in synth_obj.voice_objs:\n        init_piano_voice(num_partials, voices=voice_obj.amy_voice)\n        time.sleep(0.05)  # Let the amy queue catch up.\n\n    midi.config.add_synth_object(channel=1, synth_object=synth_obj)\n    print(\"Added Tulip synth object to respond to MIDI channel 1\")\n"
  },
  {
    "path": "godot/SConstruct",
    "content": "#!/usr/bin/env python\n\"\"\"\nBuild script for the AMY Synthesizer GDExtension.\n\nAMY C source lookup order:\n  1. AMY_SRC_PATH environment variable (if set)\n  2. ../src/  (AMY repo source, when building from the repo)\n  3. ./amy_src/  (vendored source, when installed via setup_godot.sh)\n\"\"\"\nimport os\nimport sys\n\n# Find godot-cpp\ngodot_cpp_path = os.environ.get(\"GODOT_CPP_PATH\", os.path.join(os.path.dirname(os.path.abspath(\".\")), \"godot-cpp\"))\n\n# Find AMY C source: env var > repo source > vendored copy\namy_src_path = os.environ.get(\"AMY_SRC_PATH\", None)\nif amy_src_path is None:\n    # Try repo layout first (godot/ is sibling to src/)\n    repo_src = os.path.join(os.path.dirname(os.path.abspath(\".\")), \"src\")\n    if os.path.isdir(repo_src):\n        amy_src_path = repo_src\n    elif os.path.isdir(\"amy_src\"):\n        amy_src_path = \"amy_src\"\n    else:\n        print(\"ERROR: AMY source not found. Either:\")\n        print(\"  - Build from the AMY repo (godot/ directory)\")\n        print(\"  - Place AMY source in amy_src/\")\n        print(\"  - Or set AMY_SRC_PATH environment variable\")\n        Exit(1)\n\nenv = SConscript(os.path.join(godot_cpp_path, \"SConstruct\"))\n\n# AMY C source files (core synthesis - no platform-specific I2S, no example mains)\namy_sources = [\n    \"algorithms.c\",\n    \"amy.c\",\n    \"api.c\",\n    \"custom.c\",\n    \"delay.c\",\n    \"envelope.c\",\n    \"examples.c\",\n    \"filters.c\",\n    \"instrument.c\",\n    \"interp_partials.c\",\n    \"log2_exp2.c\",\n    \"midi_mappings.c\",\n    \"oscillators.c\",\n    \"parse.c\",\n    \"patches.c\",\n    \"pcm.c\",\n    \"sequencer.c\",\n    \"transfer.c\",\n]\n\n# Add AMY include path\nenv.Append(CPPPATH=[amy_src_path])\n\n# AMY compile flags\nenv.Append(CCFLAGS=[\"-DAMY_WAVETABLE\", \"-DAMY_NO_MINIAUDIO\"])\n\n# Suppress warnings from AMY's C code (GCC/Clang vs MSVC)\nis_msvc = env.get(\"is_msvc\", False) or (env[\"platform\"] == \"windows\" and not env.get(\"use_mingw\", False))\nif is_msvc:\n    env.Append(CFLAGS=[\"/std:c11\", \"/wd4244\", \"/wd4267\", \"/wd4996\", \"/wd4100\"])\nelse:\n    env.Append(CFLAGS=[\"-Wno-unused-parameter\", \"-Wno-sign-compare\", \"-Wno-missing-field-initializers\"])\n\n# Platform-specific flags (use target platform, not build machine)\ntarget_platform = env[\"platform\"]\nif target_platform == \"macos\":\n    env.Append(CCFLAGS=[\"-DMACOS\"])\n    env.Append(LINKFLAGS=[\"-framework\", \"CoreFoundation\"])\nelif target_platform == \"linux\":\n    env.Append(LIBS=[\"pthread\", \"m\"])\nelif target_platform == \"windows\":\n    if is_msvc:\n        env.Append(CCFLAGS=[\"-DWINDOWS\"])\n    else:\n        env.Append(CCFLAGS=[\"-DWINDOWS\"])\n\n# Build all sources together - AMY C files + GDExtension C++ files\nall_sources = []\n\nfor src in amy_sources:\n    src_path = os.path.join(amy_src_path, src)\n    if os.path.exists(src_path):\n        all_sources.append(src_path)\n\n# GDExtension C++ sources + platform stubs\nall_sources += [\n    \"src/amy_platform_stubs.c\",\n    \"src/amy_gdextension.cpp\",\n    \"src/register_types.cpp\",\n]\n\n# Add our source include path\nenv.Append(CPPPATH=[\"src\"])\n\n# Build shared library directly from all sources\nif target_platform == \"macos\":\n    # Build as dylib for macOS (not framework - NSBundle crashes on macOS 26+)\n    # godot-cpp strips SHLIBSUFFIX for macOS framework builds, so add .dylib explicitly\n    library = env.SharedLibrary(\n        target=\"bin/libamy{}.dylib\".format(env[\"suffix\"]),\n        source=all_sources,\n    )\nelse:\n    library = env.SharedLibrary(\n        target=\"bin/libamy{}{}\".format(env[\"suffix\"], env[\"SHLIBSUFFIX\"]),\n        source=all_sources,\n    )\n\nDefault(library)\n"
  },
  {
    "path": "godot/amy.gd",
    "content": "class_name Amy\nextends Node\n## AMY Synthesizer for Godot.\n##\n## High-level GDScript API that mirrors AMY's Python interface.\n## Works on native (GDExtension) and web (WASM via JavaScriptBridge).\n##\n## Usage:\n##   var amy := Amy.new()\n##   add_child(amy)\n##   await get_tree().process_frame\n##   amy.send({\"osc\": 0, \"wave\": Amy.SINE, \"freq\": 440, \"vel\": 1.0})\n##\n## Or use wire protocol directly:\n##   amy.send_raw(\"v0w0f440l1\")\n\n# ============================================================\n#  Wave types\n# ============================================================\nconst SINE: int = 0\nconst PULSE: int = 1\nconst SAW_DOWN: int = 2\nconst SAW_UP: int = 3\nconst TRIANGLE: int = 4\nconst NOISE: int = 5\nconst KS: int = 6\nconst PCM: int = 7\nconst ALGO: int = 8\nconst PARTIAL: int = 9\nconst BYO_PARTIALS: int = 10\nconst INTERP_PARTIALS: int = 11\nconst AUDIO_IN0: int = 12\nconst AUDIO_IN1: int = 13\nconst WAVETABLE: int = 19\nconst CUSTOM: int = 20\nconst WAVE_OFF: int = 21\n\n# ============================================================\n#  Filter types\n# ============================================================\nconst FILTER_NONE: int = 0\nconst FILTER_LPF: int = 1\nconst FILTER_BPF: int = 2\nconst FILTER_HPF: int = 3\nconst FILTER_LPF24: int = 4\n\n# ============================================================\n#  Envelope types\n# ============================================================\nconst ENVELOPE_NORMAL: int = 0\nconst ENVELOPE_LINEAR: int = 1\nconst ENVELOPE_DX7: int = 2\nconst ENVELOPE_TRUE_EXPONENTIAL: int = 3\n\n# ============================================================\n#  Config — set these before adding to the tree (before _ready)\n# ============================================================\n## Enable chorus effect.\n@export var chorus: bool = true\n## Enable reverb effect.\n@export var reverb: bool = true\n## Enable echo/delay effect.\n@export var echo: bool = true\n## Load default GM synth patches on startup.\n@export var default_synths: bool = false\n## Enable partial synthesis.\n@export var partials: bool = true\n## Enable custom oscillator type.\n@export var custom: bool = true\n## Play a short bleep on startup.\n@export var startup_bleep: bool = false\n## Enable audio input.\n@export var audio_in: bool = false\n## Maximum number of oscillators.\n@export var max_oscs: int = 180\n## Maximum number of voices.\n@export var max_voices: int = 64\n## Maximum number of synths.\n@export var max_synths: int = 64\n\n# ============================================================\n#  Internals — audio bridge\n# ============================================================\nvar _synth: Node = null\nvar _stream_player: AudioStreamPlayer = null\nvar _playback: AudioStreamGeneratorPlayback = null\nvar _started: bool = false\nvar _is_web: bool = false\n\nfunc _ready() -> void:\n\t_is_web = OS.get_name() == \"Web\"\n\tif _is_web:\n\t\t_init_web()\n\telse:\n\t\t_init_native()\n\nfunc _init_native() -> void:\n\tif ClassDB.class_exists(&\"AmySynth\"):\n\t\t_synth = ClassDB.instantiate(&\"AmySynth\")\n\t\tadd_child(_synth)\n\telse:\n\t\tpush_warning(\"AmySynth GDExtension not loaded — audio disabled\")\n\t\treturn\n\n\t# Apply config before starting\n\t_synth.set(\"chorus\", chorus)\n\t_synth.set(\"reverb\", reverb)\n\t_synth.set(\"echo\", echo)\n\t_synth.set(\"default_synths\", default_synths)\n\t_synth.set(\"partials\", partials)\n\t_synth.set(\"custom\", custom)\n\t_synth.set(\"startup_bleep\", startup_bleep)\n\t_synth.set(\"audio_in\", audio_in)\n\t_synth.set(\"max_oscs\", max_oscs)\n\t_synth.set(\"max_voices\", max_voices)\n\t_synth.set(\"max_synths\", max_synths)\n\n\t_stream_player = AudioStreamPlayer.new()\n\tvar stream := AudioStreamGenerator.new()\n\tstream.mix_rate = 44100.0\n\tstream.buffer_length = 0.1\n\t_stream_player.stream = stream\n\t_stream_player.bus = \"Master\"\n\tadd_child(_stream_player)\n\n\t_synth.call(\"start\")\n\t_stream_player.play()\n\t_playback = _stream_player.get_stream_playback() as AudioStreamGeneratorPlayback\n\t_started = true\n\nfunc _init_web() -> void:\n\t# Pass config to JS bridge before AMY starts\n\tvar ds := \"true\" if default_synths else \"false\"\n\tvar sb := \"true\" if startup_bleep else \"false\"\n\tJavaScriptBridge.eval(\"godot_amy_configure(%s, %s)\" % [ds, sb])\n\n\tfor i in range(100):\n\t\tvar ready: Variant = JavaScriptBridge.eval(\"godot_amy_is_ready()\", true)\n\t\tif ready:\n\t\t\t_started = true\n\t\t\tprint(\"AMY web synth ready\")\n\t\t\treturn\n\t\tawait get_tree().create_timer(0.1).timeout\n\tpush_warning(\"AMY web module failed to load after 10 s\")\n\nfunc _process(_delta: float) -> void:\n\tif _started and not _is_web:\n\t\t_fill_audio()\n\nfunc _fill_audio() -> void:\n\tif _playback == null or _synth == null:\n\t\treturn\n\tvar block_size: Variant = _synth.call(\"get_block_size\")\n\tvar bs: int = block_size as int\n\twhile _playback.can_push_buffer(bs):\n\t\tvar buffer: Variant = _synth.call(\"fill_buffer\")\n\t\t_playback.push_buffer(buffer as PackedVector2Array)\n\nfunc _exit_tree() -> void:\n\tif not _is_web and _synth:\n\t\t_synth.call(\"stop\")\n\n# ============================================================\n#  Public API\n# ============================================================\n\n## Send an AMY message using keyword-style parameters.\n## Example:\n##   amy.send({\"osc\": 0, \"wave\": Amy.SINE, \"freq\": 440, \"vel\": 1})\n##   amy.send({\"osc\": 0, \"vel\": 0})  # note off\nfunc send(params: Dictionary = {}) -> void:\n\tsend_raw(message(params))\n\n## Build an AMY wire message from a dictionary without sending it.\n## Returns the wire string (e.g. \"v0w0f440l1\").\nfunc message(params: Dictionary) -> String:\n\tvar wire: String = \"\"\n\tfor key: Variant in params:\n\t\tvar key_str: String = str(key)\n\t\tif not _KW_MAP.has(key_str):\n\t\t\tpush_warning(\"AMY: unknown parameter '%s'\" % key_str)\n\t\t\tcontinue\n\t\tvar mapping: Variant = _KW_MAP[key_str]\n\t\tvar m: Array = mapping as Array\n\t\tvar code: String = str(m[0])\n\t\tvar type: String = str(m[1])\n\t\tvar val: Variant = params[key]\n\t\twire += code + _format_value(val, type)\n\treturn wire\n\n## Send a raw AMY wire-protocol string.\n## Example:  amy.send_raw(\"v0w0f440l1\")\nfunc send_raw(msg: String) -> void:\n\tif not _started or msg.is_empty():\n\t\treturn\n\tif _is_web:\n\t\tvar safe: String = msg.replace(\"\\\\\", \"\\\\\\\\\").replace(\"'\", \"\\\\'\")\n\t\tJavaScriptBridge.eval(\"godot_amy_send('%s')\" % safe)\n\telse:\n\t\tif _synth:\n\t\t\t_synth.call(\"send\", msg)\n\n## Stop all sound immediately.\nfunc panic() -> void:\n\tsend_raw(\"S\")\n\n# ============================================================\n#  Value formatting helpers\n# ============================================================\nfunc _format_value(val: Variant, type: String) -> String:\n\tmatch type:\n\t\t\"I\":\n\t\t\treturn str(int(val))\n\t\t\"F\":\n\t\t\treturn _trunc(float(val))\n\t\t\"S\":\n\t\t\treturn str(val)\n\t\t\"L\":\n\t\t\treturn _format_list(val)\n\t\t\"C\":\n\t\t\treturn _format_ctrl(val)\n\treturn str(val)\n\n## Truncate a float to 4 decimal places, strip trailing zeros.\nfunc _trunc(f: float) -> String:\n\tif f == int(f):\n\t\treturn str(int(f))\n\tvar s: String = \"%.4f\" % f\n\twhile s.ends_with(\"0\"):\n\t\ts = s.substr(0, s.length() - 1)\n\tif s.ends_with(\".\"):\n\t\ts = s.substr(0, s.length() - 1)\n\treturn s\n\n## Format a list/array as comma-separated values.\nfunc _format_list(val: Variant) -> String:\n\tif val is String:\n\t\treturn str(val)\n\tif val is Array:\n\t\tvar parts: PackedStringArray = PackedStringArray()\n\t\tfor item: Variant in val:\n\t\t\tparts.append(_trunc(float(item)))\n\t\treturn \",\".join(parts)\n\treturn str(val)\n\n## Format a control coefficient value.\n## Can be a number (treated as const), a string, or an array.\nfunc _format_ctrl(val: Variant) -> String:\n\tif val is float or val is int:\n\t\treturn _trunc(float(val))\n\tif val is String:\n\t\treturn str(val)\n\tif val is Array:\n\t\tvar parts: PackedStringArray = PackedStringArray()\n\t\tfor item: Variant in val:\n\t\t\tparts.append(_trunc(float(item)))\n\t\treturn \",\".join(parts)\n\treturn str(val)\n\n# ============================================================\n#  Parameter → wire-code mapping (matches AMY Python API)\n# ============================================================\nvar _KW_MAP: Dictionary = {\n\t\"osc\":              [\"v\", \"I\"],\n\t\"wave\":             [\"w\", \"I\"],\n\t\"note\":             [\"n\", \"F\"],\n\t\"vel\":              [\"l\", \"F\"],\n\t\"amp\":              [\"a\", \"C\"],\n\t\"freq\":             [\"f\", \"C\"],\n\t\"duty\":             [\"d\", \"C\"],\n\t\"feedback\":         [\"b\", \"F\"],\n\t\"time\":             [\"t\", \"I\"],\n\t\"reset\":            [\"S\", \"I\"],\n\t\"phase\":            [\"P\", \"F\"],\n\t\"pan\":              [\"Q\", \"C\"],\n\t\"client\":           [\"g\", \"I\"],\n\t\"volume\":           [\"V\", \"F\"],\n\t\"pitch_bend\":       [\"s\", \"F\"],\n\t\"filter_freq\":      [\"F\", \"C\"],\n\t\"resonance\":        [\"R\", \"F\"],\n\t\"bp0\":              [\"A\", \"L\"],\n\t\"bp1\":              [\"B\", \"L\"],\n\t\"eg0_type\":         [\"T\", \"I\"],\n\t\"eg1_type\":         [\"X\", \"I\"],\n\t\"debug\":            [\"D\", \"I\"],\n\t\"chained_osc\":      [\"c\", \"I\"],\n\t\"mod_source\":       [\"L\", \"I\"],\n\t\"eq\":               [\"x\", \"L\"],\n\t\"filter_type\":      [\"G\", \"I\"],\n\t\"ratio\":            [\"I\", \"F\"],\n\t\"latency_ms\":       [\"N\", \"I\"],\n\t\"algo_source\":      [\"O\", \"L\"],\n\t\"algorithm\":        [\"o\", \"I\"],\n\t\"chorus\":           [\"k\", \"L\"],\n\t\"reverb\":           [\"h\", \"L\"],\n\t\"echo\":             [\"M\", \"L\"],\n\t\"patch\":            [\"K\", \"I\"],\n\t\"voices\":           [\"r\", \"L\"],\n\t\"external_channel\": [\"W\", \"I\"],\n\t\"portamento\":       [\"m\", \"I\"],\n\t\"sequence\":         [\"H\", \"L\"],\n\t\"tempo\":            [\"j\", \"F\"],\n\t\"synth\":            [\"i\", \"I\"],\n\t\"num_voices\":       [\"iv\", \"I\"],\n\t\"preset\":           [\"p\", \"I\"],\n\t\"num_partials\":     [\"p\", \"I\"],\n}\n"
  },
  {
    "path": "godot/amy.gdextension",
    "content": "[configuration]\n\nentry_symbol = \"amy_library_init\"\ncompatibility_minimum = \"4.3\"\n\n[libraries]\n\nmacos.debug = \"res://addons/amy/bin/libamy.macos.template_debug.universal.dylib\"\nmacos.release = \"res://addons/amy/bin/libamy.macos.template_release.universal.dylib\"\nlinux.debug.x86_64 = \"res://addons/amy/bin/libamy.linux.template_debug.x86_64.so\"\nlinux.release.x86_64 = \"res://addons/amy/bin/libamy.linux.template_release.x86_64.so\"\nwindows.debug.x86_64 = \"res://addons/amy/bin/libamy.windows.template_debug.x86_64.dll\"\nwindows.release.x86_64 = \"res://addons/amy/bin/libamy.windows.template_release.x86_64.dll\"\n"
  },
  {
    "path": "godot/install.gd",
    "content": "@tool\nextends EditorScript\n## AMY Synthesizer Addon - Web Export Setup\n##\n## Run this script once (via File > Run) to copy web export files\n## to the correct locations in your project.\n##\n## It copies:\n##   - enable-threads.js  → project root (service worker needs root scope)\n##   - web_audio/          → project root (referenced by custom HTML shell)\n##   - Sets up export preset if one doesn't exist\n\nfunc _run() -> void:\n\tvar addon_dir: String = \"res://addons/amy/web/\"\n\tvar dst_web: String = \"res://web_audio/\"\n\tvar dst_root: String = \"res://\"\n\n\tprint(\"=== AMY Web Export Setup ===\")\n\n\t# Copy enable-threads.js to project root\n\t_copy_file(addon_dir + \"enable-threads-root.js\", dst_root + \"enable-threads.js\")\n\n\t# Copy web audio files\n\tvar web_files: Array[String] = [\n\t\t\"amy.js\", \"amy.wasm\", \"amy.aw.js\", \"amy.ww.js\",\n\t\t\"godot_amy_bridge.js\", \"enable-threads.js\"\n\t]\n\n\t# Create web_audio directory\n\tDirAccess.make_dir_absolute(ProjectSettings.globalize_path(dst_web))\n\n\t# Create .gdignore in web_audio\n\tvar gdignore: FileAccess = FileAccess.open(dst_web + \".gdignore\", FileAccess.WRITE)\n\tif gdignore:\n\t\tgdignore.close()\n\t\tprint(\"  Created web_audio/.gdignore\")\n\n\tfor fname in web_files:\n\t\t_copy_file(addon_dir + fname, dst_web + fname)\n\n\t# Copy custom HTML shell to export/\n\tDirAccess.make_dir_absolute(ProjectSettings.globalize_path(\"res://export/\"))\n\t_copy_file(addon_dir + \"custom_shell.html\", \"res://export/custom_shell.html\")\n\n\tprint(\"\")\n\tprint(\"=== Setup Complete ===\")\n\tprint(\"\")\n\tprint(\"Next steps:\")\n\tprint(\"  1. In Export dialog, set Custom HTML Shell to: res://export/custom_shell.html\")\n\tprint(\"  2. Set Exclude Filter to: addons/amy/bin/*,addons/amy/src/*,addons/amy/amy_src/*,addons/amy/web/*,addons/amy/SConstruct,addons/amy/install.gd,addons/amy/amy.gdextension\")\n\tprint(\"  3. Export for Web as usual!\")\n\tprint(\"\")\n\nfunc _copy_file(src: String, dst: String) -> void:\n\tvar src_path: String = ProjectSettings.globalize_path(src)\n\tvar dst_path: String = ProjectSettings.globalize_path(dst)\n\n\tvar file_in: FileAccess = FileAccess.open(src, FileAccess.READ)\n\tif file_in == null:\n\t\tpush_warning(\"Could not read: \" + src)\n\t\treturn\n\n\tvar content: PackedByteArray = file_in.get_buffer(file_in.get_length())\n\tfile_in.close()\n\n\tvar file_out: FileAccess = FileAccess.open(dst, FileAccess.WRITE)\n\tif file_out == null:\n\t\tpush_warning(\"Could not write: \" + dst)\n\t\treturn\n\n\tfile_out.store_buffer(content)\n\tfile_out.close()\n\tprint(\"  Copied: \" + src.get_file() + \" -> \" + dst)\n"
  },
  {
    "path": "godot/src/amy_gdextension.cpp",
    "content": "#include \"amy_gdextension.h\"\n#include <godot_cpp/core/class_db.hpp>\n#include <godot_cpp/variant/utility_functions.hpp>\n\n// AMY is a C library\nextern \"C\" {\n#include \"amy.h\"\n}\n\nusing namespace godot;\n\nAmySynth::AmySynth() {}\n\nAmySynth::~AmySynth() {\n\tif (initialized) {\n\t\tamy_stop();\n\t\tinitialized = false;\n\t}\n}\n\nvoid AmySynth::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"start\"), &AmySynth::start);\n\tClassDB::bind_method(D_METHOD(\"stop\"), &AmySynth::stop);\n\tClassDB::bind_method(D_METHOD(\"send\", \"message\"), &AmySynth::send);\n\tClassDB::bind_method(D_METHOD(\"send_note\", \"osc\", \"midi_note\", \"velocity\", \"duration_ms\"), &AmySynth::send_note);\n\tClassDB::bind_method(D_METHOD(\"fill_buffer\"), &AmySynth::fill_buffer);\n\tClassDB::bind_method(D_METHOD(\"get_sample_rate\"), &AmySynth::get_sample_rate);\n\tClassDB::bind_method(D_METHOD(\"get_block_size\"), &AmySynth::get_block_size);\n\tClassDB::bind_method(D_METHOD(\"get_sysclock\"), &AmySynth::get_sysclock);\n\tClassDB::bind_method(D_METHOD(\"is_running\"), &AmySynth::is_running);\n\n\t// Config property bindings — set before calling start()\n\tClassDB::bind_method(D_METHOD(\"set_chorus\", \"enabled\"), &AmySynth::set_chorus);\n\tClassDB::bind_method(D_METHOD(\"get_chorus\"), &AmySynth::get_chorus);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"chorus\"), \"set_chorus\", \"get_chorus\");\n\n\tClassDB::bind_method(D_METHOD(\"set_reverb\", \"enabled\"), &AmySynth::set_reverb);\n\tClassDB::bind_method(D_METHOD(\"get_reverb\"), &AmySynth::get_reverb);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"reverb\"), \"set_reverb\", \"get_reverb\");\n\n\tClassDB::bind_method(D_METHOD(\"set_echo\", \"enabled\"), &AmySynth::set_echo);\n\tClassDB::bind_method(D_METHOD(\"get_echo\"), &AmySynth::get_echo);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"echo\"), \"set_echo\", \"get_echo\");\n\n\tClassDB::bind_method(D_METHOD(\"set_default_synths\", \"enabled\"), &AmySynth::set_default_synths);\n\tClassDB::bind_method(D_METHOD(\"get_default_synths\"), &AmySynth::get_default_synths);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"default_synths\"), \"set_default_synths\", \"get_default_synths\");\n\n\tClassDB::bind_method(D_METHOD(\"set_partials\", \"enabled\"), &AmySynth::set_partials);\n\tClassDB::bind_method(D_METHOD(\"get_partials\"), &AmySynth::get_partials);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"partials\"), \"set_partials\", \"get_partials\");\n\n\tClassDB::bind_method(D_METHOD(\"set_custom\", \"enabled\"), &AmySynth::set_custom);\n\tClassDB::bind_method(D_METHOD(\"get_custom\"), &AmySynth::get_custom);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"custom\"), \"set_custom\", \"get_custom\");\n\n\tClassDB::bind_method(D_METHOD(\"set_startup_bleep\", \"enabled\"), &AmySynth::set_startup_bleep);\n\tClassDB::bind_method(D_METHOD(\"get_startup_bleep\"), &AmySynth::get_startup_bleep);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"startup_bleep\"), \"set_startup_bleep\", \"get_startup_bleep\");\n\n\tClassDB::bind_method(D_METHOD(\"set_audio_in\", \"enabled\"), &AmySynth::set_audio_in);\n\tClassDB::bind_method(D_METHOD(\"get_audio_in\"), &AmySynth::get_audio_in);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"audio_in\"), \"set_audio_in\", \"get_audio_in\");\n\n\tClassDB::bind_method(D_METHOD(\"set_max_oscs\", \"count\"), &AmySynth::set_max_oscs);\n\tClassDB::bind_method(D_METHOD(\"get_max_oscs\"), &AmySynth::get_max_oscs);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"max_oscs\"), \"set_max_oscs\", \"get_max_oscs\");\n\n\tClassDB::bind_method(D_METHOD(\"set_max_voices\", \"count\"), &AmySynth::set_max_voices);\n\tClassDB::bind_method(D_METHOD(\"get_max_voices\"), &AmySynth::get_max_voices);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"max_voices\"), \"set_max_voices\", \"get_max_voices\");\n\n\tClassDB::bind_method(D_METHOD(\"set_max_synths\", \"count\"), &AmySynth::set_max_synths);\n\tClassDB::bind_method(D_METHOD(\"get_max_synths\"), &AmySynth::get_max_synths);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"max_synths\"), \"set_max_synths\", \"get_max_synths\");\n}\n\nvoid AmySynth::start() {\n\tif (initialized) return;\n\n\tamy_config_t config = amy_default_config();\n\tconfig.audio = AMY_AUDIO_IS_NONE;  // We handle audio output ourselves via Godot\n\tconfig.features.chorus = chorus ? 1 : 0;\n\tconfig.features.reverb = reverb ? 1 : 0;\n\tconfig.features.echo = echo ? 1 : 0;\n\tconfig.features.default_synths = default_synths ? 1 : 0;\n\tconfig.features.partials = partials ? 1 : 0;\n\tconfig.features.custom = custom ? 1 : 0;\n\tconfig.features.startup_bleep = startup_bleep ? 1 : 0;\n\tconfig.features.audio_in = audio_in ? 1 : 0;\n\tconfig.max_oscs = max_oscs;\n\tconfig.max_voices = max_voices;\n\tconfig.max_synths = max_synths;\n\tamy_start(config);\n\tinitialized = true;\n\n\tsample_rate = AMY_SAMPLE_RATE;\n\tblock_size = AMY_BLOCK_SIZE;\n\n\tUtilityFunctions::print(\"AMY synth started (\", sample_rate, \" Hz, block size \", block_size, \")\");\n}\n\nvoid AmySynth::stop() {\n\tif (!initialized) return;\n\tamy_stop();\n\tinitialized = false;\n\tUtilityFunctions::print(\"AMY synth stopped\");\n}\n\nvoid AmySynth::send(const String &message) {\n\tif (!initialized) return;\n\tCharString cs = message.utf8();\n\tamy_add_message(const_cast<char*>(cs.get_data()));\n}\n\nvoid AmySynth::send_note(int osc, int midi_note, float velocity, int duration_ms) {\n\tif (!initialized) return;\n\tchar msg[128];\n\tif (duration_ms > 0) {\n\t\tsnprintf(msg, sizeof(msg), \"v%dw0n%dl%fd%d\", osc, midi_note, velocity, duration_ms);\n\t} else {\n\t\tsnprintf(msg, sizeof(msg), \"v%dw0n%dl%f\", osc, midi_note, velocity);\n\t}\n\tamy_add_message(msg);\n}\n\nPackedVector2Array AmySynth::fill_buffer() {\n\tPackedVector2Array buffer;\n\n\tif (!initialized) {\n\t\tbuffer.resize(block_size);\n\t\tbuffer.fill(Vector2(0, 0));\n\t\treturn buffer;\n\t}\n\n\tint16_t *samples = amy_simple_fill_buffer();\n\n\tbuffer.resize(block_size);\n\tconst float scale = 1.0f / 32768.0f;\n\n\tfor (int i = 0; i < block_size; i++) {\n\t\tfloat left = static_cast<float>(samples[i * 2]) * scale;\n\t\tfloat right = static_cast<float>(samples[i * 2 + 1]) * scale;\n\t\tbuffer.set(i, Vector2(left, right));\n\t}\n\n\treturn buffer;\n}\n\nint AmySynth::get_sample_rate() const {\n\treturn sample_rate;\n}\n\nint AmySynth::get_block_size() const {\n\treturn block_size;\n}\n\nuint64_t AmySynth::get_sysclock() const {\n\tif (!initialized) return 0;\n\treturn amy_sysclock();\n}\n\nbool AmySynth::is_running() const {\n\treturn initialized;\n}\n\n// Config setters/getters\nvoid AmySynth::set_chorus(bool p_val) { chorus = p_val; }\nbool AmySynth::get_chorus() const { return chorus; }\nvoid AmySynth::set_reverb(bool p_val) { reverb = p_val; }\nbool AmySynth::get_reverb() const { return reverb; }\nvoid AmySynth::set_echo(bool p_val) { echo = p_val; }\nbool AmySynth::get_echo() const { return echo; }\nvoid AmySynth::set_default_synths(bool p_val) { default_synths = p_val; }\nbool AmySynth::get_default_synths() const { return default_synths; }\nvoid AmySynth::set_partials(bool p_val) { partials = p_val; }\nbool AmySynth::get_partials() const { return partials; }\nvoid AmySynth::set_custom(bool p_val) { custom = p_val; }\nbool AmySynth::get_custom() const { return custom; }\nvoid AmySynth::set_startup_bleep(bool p_val) { startup_bleep = p_val; }\nbool AmySynth::get_startup_bleep() const { return startup_bleep; }\nvoid AmySynth::set_audio_in(bool p_val) { audio_in = p_val; }\nbool AmySynth::get_audio_in() const { return audio_in; }\nvoid AmySynth::set_max_oscs(int p_val) { max_oscs = p_val; }\nint AmySynth::get_max_oscs() const { return max_oscs; }\nvoid AmySynth::set_max_voices(int p_val) { max_voices = p_val; }\nint AmySynth::get_max_voices() const { return max_voices; }\nvoid AmySynth::set_max_synths(int p_val) { max_synths = p_val; }\nint AmySynth::get_max_synths() const { return max_synths; }\n"
  },
  {
    "path": "godot/src/amy_gdextension.h",
    "content": "#ifndef AMY_GDEXTENSION_H\n#define AMY_GDEXTENSION_H\n\n#include <godot_cpp/classes/node.hpp>\n#include <godot_cpp/classes/audio_stream_generator_playback.hpp>\n#include <godot_cpp/variant/string.hpp>\n#include <godot_cpp/variant/packed_vector2_array.hpp>\n\nnamespace godot {\n\nclass AmySynth : public Node {\n\tGDCLASS(AmySynth, Node)\n\nprivate:\n\tbool initialized = false;\n\tint sample_rate = 44100;\n\tint block_size = 256;\n\n\t// Config properties — set these before calling start()\n\tbool chorus = true;\n\tbool reverb = true;\n\tbool echo = true;\n\tbool default_synths = false;\n\tbool partials = true;\n\tbool custom = true;\n\tbool startup_bleep = false;\n\tbool audio_in = false;\n\tint max_oscs = 180;\n\tint max_voices = 64;\n\tint max_synths = 64;\n\nprotected:\n\tstatic void _bind_methods();\n\npublic:\n\tAmySynth();\n\t~AmySynth();\n\n\tvoid start();\n\tvoid stop();\n\tvoid send(const String &message);\n\tvoid send_note(int osc, int midi_note, float velocity, int duration_ms);\n\tPackedVector2Array fill_buffer();\n\tint get_sample_rate() const;\n\tint get_block_size() const;\n\tuint64_t get_sysclock() const;\n\tbool is_running() const;\n\n\t// Config setters/getters\n\tvoid set_chorus(bool p_val);\n\tbool get_chorus() const;\n\tvoid set_reverb(bool p_val);\n\tbool get_reverb() const;\n\tvoid set_echo(bool p_val);\n\tbool get_echo() const;\n\tvoid set_default_synths(bool p_val);\n\tbool get_default_synths() const;\n\tvoid set_partials(bool p_val);\n\tbool get_partials() const;\n\tvoid set_custom(bool p_val);\n\tbool get_custom() const;\n\tvoid set_startup_bleep(bool p_val);\n\tbool get_startup_bleep() const;\n\tvoid set_audio_in(bool p_val);\n\tbool get_audio_in() const;\n\tvoid set_max_oscs(int p_val);\n\tint get_max_oscs() const;\n\tvoid set_max_voices(int p_val);\n\tint get_max_voices() const;\n\tvoid set_max_synths(int p_val);\n\tint get_max_synths() const;\n};\n\n} // namespace godot\n\n#endif // AMY_GDEXTENSION_H\n"
  },
  {
    "path": "godot/src/amy_platform_stubs.c",
    "content": "// Stub implementations for AMY platform/hardware functions.\n// We don't need I2S or MIDI hardware - Godot handles all audio.\n// miniaudio stubs are no longer needed thanks to -DAMY_NO_MINIAUDIO.\n// amy_midi.c is excluded from the build to avoid conflicts, so we\n// stub the MIDI functions here.\n\n#include <stdint.h>\n#include <stddef.h>\n\n// --- i2s.c stubs ---\nvoid amy_platform_init(void) {}\nvoid amy_platform_deinit(void) {}\nvoid amy_update_tasks(void) {}\nint16_t *amy_render_audio(void) { return (int16_t *)0; }\nsize_t amy_i2s_write(const uint8_t *buffer, size_t nbytes) {\n    (void)buffer; (void)nbytes; return nbytes;\n}\n\n// --- amy_midi.c stubs ---\nvoid stop_midi(void) {}\nvoid run_midi(void) {}\nvoid amy_send_midi_note_on(uint8_t channel, uint8_t note, uint8_t velocity) {\n    (void)channel; (void)note; (void)velocity;\n}\nvoid amy_send_midi_note_off(uint8_t channel, uint8_t note, uint8_t velocity) {\n    (void)channel; (void)note; (void)velocity;\n}\n// Called from parse.c zD handler; no MIDI output on Godot so this is a no-op.\nvoid midi_out(uint8_t *bytes, uint16_t len) { (void)bytes; (void)len; }\n\n// --- examples.c stubs ---\nvoid delay_ms(uint32_t ms) { (void)ms; }\n"
  },
  {
    "path": "godot/src/register_types.cpp",
    "content": "#include \"register_types.h\"\n#include \"amy_gdextension.h\"\n\n#include <gdextension_interface.h>\n#include <godot_cpp/core/defs.hpp>\n#include <godot_cpp/godot.hpp>\n#include <godot_cpp/core/class_db.hpp>\n\nusing namespace godot;\n\nvoid initialize_amy_module(ModuleInitializationLevel p_level) {\n\tif (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {\n\t\treturn;\n\t}\n\tGDREGISTER_CLASS(AmySynth);\n}\n\nvoid uninitialize_amy_module(ModuleInitializationLevel p_level) {\n\tif (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {\n\t\treturn;\n\t}\n}\n\nextern \"C\" {\n\nGDExtensionBool GDE_EXPORT amy_library_init(\n\tGDExtensionInterfaceGetProcAddress p_get_proc_address,\n\tconst GDExtensionClassLibraryPtr p_library,\n\tGDExtensionInitialization *r_initialization\n) {\n\tgodot::GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);\n\n\tinit_obj.register_initializer(initialize_amy_module);\n\tinit_obj.register_terminator(uninitialize_amy_module);\n\tinit_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE);\n\n\treturn init_obj.init();\n}\n\n} // extern \"C\"\n"
  },
  {
    "path": "godot/src/register_types.h",
    "content": "#ifndef AMY_REGISTER_TYPES_H\n#define AMY_REGISTER_TYPES_H\n\n#include <godot_cpp/core/class_db.hpp>\n\nusing namespace godot;\n\nvoid initialize_amy_module(ModuleInitializationLevel p_level);\nvoid uninitialize_amy_module(ModuleInitializationLevel p_level);\n\n#endif // AMY_REGISTER_TYPES_H\n"
  },
  {
    "path": "godot/web/custom_shell.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1.0\">\n\t\t<title>$GODOT_PROJECT_NAME</title>\n\t\t<style>\nhtml, body, #canvas {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n}\n\nbody {\n\tcolor: white;\n\tbackground-color: black;\n\toverflow: hidden;\n\ttouch-action: none;\n}\n\n#canvas {\n\tdisplay: block;\n}\n\n#canvas:focus {\n\toutline: none;\n}\n\n#status, #status-splash, #status-progress {\n\tposition: absolute;\n\tleft: 0;\n\tright: 0;\n}\n\n#status, #status-splash {\n\ttop: 0;\n\tbottom: 0;\n}\n\n#status {\n\tbackground-color: $GODOT_SPLASH_COLOR;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tvisibility: hidden;\n}\n\n#status-splash {\n\tmax-height: 100%;\n\tmax-width: 100%;\n\tmargin: auto;\n}\n\n#status-splash.show-image--false {\n\tdisplay: none;\n}\n\n#status-splash.fullsize--true {\n\theight: 100%;\n\twidth: 100%;\n\tobject-fit: contain;\n}\n\n#status-splash.use-filter--false {\n\timage-rendering: pixelated;\n}\n\n#status-progress, #status-notice {\n\tdisplay: none;\n}\n\n#status-progress {\n\tbottom: 10%;\n\twidth: 50%;\n\tmargin: 0 auto;\n}\n\n#status-notice {\n\tbackground-color: #5b3943;\n\tborder-radius: 0.5rem;\n\tborder: 1px solid #9b3943;\n\tcolor: #e0e0e0;\n\tfont-family: 'Noto Sans', 'Droid Sans', Arial, sans-serif;\n\tline-height: 1.3;\n\tmargin: 0 2rem;\n\toverflow: hidden;\n\tpadding: 1rem;\n\ttext-align: center;\n\tz-index: 1;\n}\n\t\t</style>\n\t\t<!-- AMY Synthesizer: COOP/COEP service worker for SharedArrayBuffer -->\n\t\t<script src=\"enable-threads.js\"></script>\n\t\t<!-- AMY Synthesizer: WASM module + AudioWorklet audio engine -->\n\t\t<script src=\"web_audio/amy.js\"></script>\n\t\t<!-- AMY Synthesizer: Godot<->AMY bridge (auto-starts audio on user gesture) -->\n\t\t<script src=\"web_audio/godot_amy_bridge.js\"></script>\n\t\t$GODOT_HEAD_INCLUDE\n\t</head>\n\t<body>\n\t\t<canvas id=\"canvas\">\n\t\t\tYour browser does not support the canvas tag.\n\t\t</canvas>\n\n\t\t<noscript>\n\t\t\tYour browser does not support JavaScript.\n\t\t</noscript>\n\n\t\t<div id=\"status\">\n\t\t\t<img id=\"status-splash\" class=\"$GODOT_SPLASH_CLASSES\" src=\"$GODOT_SPLASH\" alt=\"\">\n\t\t\t<progress id=\"status-progress\"></progress>\n\t\t\t<div id=\"status-notice\"></div>\n\t\t</div>\n\n\t\t<script src=\"$GODOT_URL\"></script>\n\t\t<script>\nconst GODOT_CONFIG = $GODOT_CONFIG;\nconst GODOT_THREADS_ENABLED = $GODOT_THREADS_ENABLED;\nconst engine = new Engine(GODOT_CONFIG);\n\n(function () {\n\tconst statusOverlay = document.getElementById('status');\n\tconst statusProgress = document.getElementById('status-progress');\n\tconst statusNotice = document.getElementById('status-notice');\n\n\tlet initializing = true;\n\tlet statusMode = '';\n\n\tfunction setStatusMode(mode) {\n\t\tif (statusMode === mode || !initializing) {\n\t\t\treturn;\n\t\t}\n\t\tif (mode === 'hidden') {\n\t\t\tstatusOverlay.remove();\n\t\t\tinitializing = false;\n\t\t\treturn;\n\t\t}\n\t\tstatusOverlay.style.visibility = 'visible';\n\t\tstatusProgress.style.display = mode === 'progress' ? 'block' : 'none';\n\t\tstatusNotice.style.display = mode === 'notice' ? 'block' : 'none';\n\t\tstatusMode = mode;\n\t}\n\n\tfunction setStatusNotice(text) {\n\t\twhile (statusNotice.lastChild) {\n\t\t\tstatusNotice.removeChild(statusNotice.lastChild);\n\t\t}\n\t\tconst lines = text.split('\\n');\n\t\tlines.forEach((line) => {\n\t\t\tstatusNotice.appendChild(document.createTextNode(line));\n\t\t\tstatusNotice.appendChild(document.createElement('br'));\n\t\t});\n\t}\n\n\tfunction displayFailureNotice(err) {\n\t\tconsole.error(err);\n\t\tif (err instanceof Error) {\n\t\t\tsetStatusNotice(err.message);\n\t\t} else if (typeof err === 'string') {\n\t\t\tsetStatusNotice(err);\n\t\t} else {\n\t\t\tsetStatusNotice('An unknown error occurred.');\n\t\t}\n\t\tsetStatusMode('notice');\n\t\tinitializing = false;\n\t}\n\n\tconst missing = Engine.getMissingFeatures({\n\t\tthreads: GODOT_THREADS_ENABLED,\n\t});\n\n\tif (missing.length !== 0) {\n\t\tif (GODOT_CONFIG['serviceWorker'] && GODOT_CONFIG['ensureCrossOriginIsolationHeaders'] && 'serviceWorker' in navigator) {\n\t\t\tlet serviceWorkerRegistrationPromise;\n\t\t\ttry {\n\t\t\t\tserviceWorkerRegistrationPromise = navigator.serviceWorker.getRegistration();\n\t\t\t} catch (err) {\n\t\t\t\tserviceWorkerRegistrationPromise = Promise.reject(new Error('Service worker registration failed.'));\n\t\t\t}\n\t\t\tPromise.race([\n\t\t\t\tserviceWorkerRegistrationPromise.then((registration) => {\n\t\t\t\t\tif (registration != null) {\n\t\t\t\t\t\treturn Promise.reject(new Error('Service worker already exists.'));\n\t\t\t\t\t}\n\t\t\t\t\treturn registration;\n\t\t\t\t}).then(() => engine.installServiceWorker()),\n\t\t\t\tnew Promise((resolve) => {\n\t\t\t\t\tsetTimeout(() => resolve(), 2000);\n\t\t\t\t}),\n\t\t\t]).then(() => {\n\t\t\t\twindow.location.reload();\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error('Error while registering service worker:', err);\n\t\t\t});\n\t\t} else {\n\t\t\tconst missingMsg = 'Error\\nThe following features required to run Godot projects on the Web are missing:\\n';\n\t\t\tdisplayFailureNotice(missingMsg + missing.join('\\n'));\n\t\t}\n\t} else {\n\t\tsetStatusMode('progress');\n\t\tengine.startGame({\n\t\t\t'onProgress': function (current, total) {\n\t\t\t\tif (current > 0 && total > 0) {\n\t\t\t\t\tstatusProgress.value = current;\n\t\t\t\t\tstatusProgress.max = total;\n\t\t\t\t} else {\n\t\t\t\t\tstatusProgress.removeAttribute('value');\n\t\t\t\t\tstatusProgress.removeAttribute('max');\n\t\t\t\t}\n\t\t\t},\n\t\t}).then(() => {\n\t\t\tsetStatusMode('hidden');\n\t\t}, displayFailureNotice);\n\t}\n}());\n\t\t</script>\n\t</body>\n</html>\n"
  },
  {
    "path": "godot/web/godot_amy_bridge.js",
    "content": "// godot_amy_bridge.js\n// Thin bridge between Godot's JavaScriptBridge and AMY's WASM module.\n// AMY handles its own audio output via AudioWorklet on web —\n// this bridge just provides init/send functions for GDScript to call.\n\n(function() {\n    var _audio_started = false;\n    var _amy_configured = false;\n\n    // Tell amy_connector.js we're in Godot mode — don't auto-start AMY.\n    window._amy_godot_bridge = true;\n\n    // Start AMY's AudioWorklet (must be called from user gesture context)\n    async function _try_start_audio() {\n        if (_audio_started) return;\n        if (typeof amy_live_start_web !== 'function') return;\n        try {\n            await amy_live_start_web();\n            _audio_started = true;\n            console.log(\"[AMY Bridge] Audio started via user gesture\");\n            // Remove listeners once started\n            document.removeEventListener('click', _try_start_audio);\n            document.removeEventListener('keydown', _try_start_audio);\n            document.removeEventListener('touchstart', _try_start_audio);\n        } catch(e) {\n            console.error(\"[AMY Bridge] Audio start failed:\", e);\n        }\n    }\n\n    // Register for user gesture events (Web Audio API requirement)\n    document.addEventListener('click', _try_start_audio);\n    document.addEventListener('keydown', _try_start_audio);\n    document.addEventListener('touchstart', _try_start_audio);\n\n    // -- Functions called from GDScript via JavaScriptBridge.eval() --\n\n    // Configure and start AMY with Godot config options.\n    // Called from _init_web() before checking ready state.\n    // default_synths: bool, startup_bleep: bool\n    window.godot_amy_configure = function(default_synths, startup_bleep) {\n        if (_amy_configured) return;\n        _amy_configured = true;\n\n        // Wait for WASM module to expose the start functions, then call\n        function _try_configure() {\n            if (window._amy_godot_start_web && window._amy_godot_start_web_no_synths) {\n                if (default_synths) {\n                    if (!startup_bleep) {\n                        // Start with synths but no bleep: use amy_start_web then\n                        // immediately silence the bleep osc\n                        window._amy_godot_start_web();\n                        if (typeof amy_add_message === 'function') {\n                            amy_add_message(\"v0l0\");\n                        }\n                    } else {\n                        window._amy_godot_start_web();\n                    }\n                } else {\n                    window._amy_godot_start_web_no_synths();\n                }\n                console.log(\"[AMY Bridge] Configured: default_synths=\" + default_synths + \" startup_bleep=\" + startup_bleep);\n            } else {\n                setTimeout(_try_configure, 50);\n            }\n        }\n        _try_configure();\n    };\n\n    // Check if AMY WASM module is initialized and ready\n    window.godot_amy_is_ready = function() {\n        return _amy_configured && typeof amy_add_message === 'function';\n    };\n\n    // Check if AudioWorklet is running\n    window.godot_amy_audio_started = function() {\n        return _audio_started;\n    };\n\n    // Send a wire message to AMY (e.g. \"v0w0f440l1\")\n    window.godot_amy_send = function(msg) {\n        if (typeof amy_add_message === 'function') {\n            amy_add_message(msg);\n        }\n    };\n})();\n"
  },
  {
    "path": "library.properties",
    "content": "name=AMY Synthesizer\nversion=1.2.4\nauthor=Brian Whitman <brian@variogram.com>, DAn Ellis <dan.ellis@gmail.com>\nmaintainer=Brian Whitman <brian@variogram.com>\nsentence=AMY, the Music Synthesizer Library\nparagraph=AMY supports many types of oscillators, filters, envelopes, analog, FM, PCM, Karplus-strong, reverb, chorus, echo\ncategory=Signal Input/Output\nurl=http://github.com/shorepine/amy\narchitectures=esp32,stm32,rp2040,mbed_rp2040,rp2350,mbed_rp2350,teensy,STM32F1,STM32F4,STM32H7,nrf52,samd,avr\nincludes=AMY-Arduino.h\ndepends=\n"
  },
  {
    "path": "pyproject.toml",
    "content": "[project]\nname = \"amy\"\nversion = \"0.1.0\"\ndescription = \"AMY synthesizer\"\nreadme = \"README.md\"\ndependencies = ['numpy', 'scipy']\n"
  },
  {
    "path": "requirements.txt",
    "content": "numpy\nscipy\n\n"
  },
  {
    "path": "scripts/gen_amy_js_api.py",
    "content": "#!/usr/bin/env python3\n\"\"\"Generate amy_api.generated.js from amy/__init__.py and amy/constants.py.\n\nReads the _KW_MAP_LIST and ctrl_coefs dict_fields from the Python AMY API,\nplus all constants from amy/constants.py, and generates a self-contained\nJS module with amy_message(), amy_send(), and an AMY constants object.\n\"\"\"\nimport ast\nimport re\nimport textwrap\nfrom pathlib import Path\n\nROOT = Path(__file__).resolve().parents[1]\nAMY_INIT = ROOT / \"amy\" / \"__init__.py\"\nAMY_CONSTANTS = ROOT / \"amy\" / \"constants.py\"\nOUTPUT = ROOT / \"build\" / \"amy_api.generated.js\"\n\n\ndef extract_kw_map_list(source: str):\n    \"\"\"Parse _KW_MAP_LIST from the Python source.\"\"\"\n    match = re.search(\n        r\"_KW_MAP_LIST\\s*=\\s*\\[(.+?)\\]\\s*\\n\",\n        source,\n        re.DOTALL,\n    )\n    if not match:\n        raise RuntimeError(\"Could not find _KW_MAP_LIST in AMY __init__.py\")\n    raw = \"[\" + match.group(1) + \"]\"\n    raw = re.sub(r\"#[^\\n]*\", \"\", raw)\n    entries = ast.literal_eval(raw)\n    return entries\n\n\ndef extract_coef_fields(source: str):\n    \"\"\"Parse the dict_fields list from parse_ctrl_coefs.\"\"\"\n    match = re.search(r\"dict_fields\\s*=\\s*(\\[[^\\]]+\\])\", source)\n    if not match:\n        raise RuntimeError(\"Could not find dict_fields in AMY __init__.py\")\n    return ast.literal_eval(match.group(1))\n\n\ndef extract_constants(source: str):\n    \"\"\"Parse all NAME=VALUE constants from constants.py.\n\n    Keeps only simple integer/float assignments. When a name is assigned\n    multiple times (e.g. AMY_BLOCK_SIZE), the last value wins (matching\n    Python's runtime behaviour with conditional re-assignments).\n    \"\"\"\n    constants = {}\n    for line in source.splitlines():\n        line = line.strip()\n        if not line or line.startswith('#'):\n            continue\n        m = re.match(r'^([A-Z][A-Z0-9_]*)\\s*=\\s*(.+)$', line)\n        if not m:\n            continue\n        name, val_str = m.group(1), m.group(2).strip()\n        # Skip true/false pseudo-constants\n        if name in ('true', 'false'):\n            continue\n        try:\n            val = ast.literal_eval(val_str)\n        except Exception:\n            continue\n        if isinstance(val, (int, float)):\n            constants[name] = val\n    return constants\n\n\ndef generate_js(kw_map_list, coef_fields, constants=None):\n    \"\"\"Build the complete JS source.\"\"\"\n    map_entries = []\n    priority_entries = []\n    for i, (name, code) in enumerate(kw_map_list):\n        wire = code[:-1]\n        type_code = code[-1]\n        map_entries.append(f'  {name}: {{wire: \"{wire}\", type: \"{type_code}\"}}')\n        priority_entries.append(f\"  {name}: {i}\")\n\n    kw_map_js = \"{\\n\" + \",\\n\".join(map_entries) + \"\\n}\"\n    kw_priority_js = \"{\\n\" + \",\\n\".join(priority_entries) + \"\\n}\"\n    coef_fields_js = \"[\" + \", \".join(f'\"{f}\"' for f in coef_fields) + \"]\"\n\n    js = textwrap.dedent(\"\"\"\\\n    // AUTO-GENERATED by scripts/gen_amy_js_api.py — do not edit by hand.\n    // Source: amy/__init__.py\n    (function() {\n    \"use strict\";\n\n    var AMY_KW_MAP = %KW_MAP%;\n\n    var AMY_KW_PRIORITY = %KW_PRIORITY%;\n\n    var AMY_COEF_FIELDS = %COEF_FIELDS%;\n\n    // --- type handlers (mirror Python's str_of_int, trunc, parse_list_or_comma_string, parse_ctrl_coefs) ---\n\n    function _str_of_int(arg) {\n      return String(Math.trunc(Number(arg)));\n    }\n\n    function _trunc(number) {\n      if (typeof number === \"string\") {\n        if (number.trim() === \"\") return \"\";\n        number = parseFloat(number);\n      }\n      if (typeof number === \"number\") {\n        var s = number.toFixed(6);\n        s = s.replace(/0+$/, \"\");\n        s = s.replace(/\\\\.$/, \"\");\n        return s;\n      }\n      return String(number);\n    }\n\n    function _parse_list(obj) {\n      if (Array.isArray(obj)) {\n        return obj.map(function(v) { return v == null ? \"\" : String(v); }).join(\",\");\n      }\n      return String(obj);\n    }\n\n    function _trim_trailing(arr) {\n      var end = arr.length;\n      while (end > 0 && arr[end - 1] == null) end--;\n      return arr.slice(0, end);\n    }\n\n    function _parse_ctrl_coefs(coefs) {\n      if (typeof coefs === \"string\") {\n        return coefs.split(\",\").map(function(x) { return _trunc(x); }).join(\",\");\n      }\n      if (typeof coefs === \"number\") {\n        return _trunc(coefs);\n      }\n      if (!Array.isArray(coefs) && typeof coefs === \"object\" && coefs !== null) {\n        var list = new Array(AMY_COEF_FIELDS.length).fill(null);\n        for (var key in coefs) {\n          if (!coefs.hasOwnProperty(key)) continue;\n          var idx = AMY_COEF_FIELDS.indexOf(key);\n          if (idx < 0) throw new Error(\"Unknown ctrl_coef field: \" + key + \". Valid: \" + AMY_COEF_FIELDS.join(\", \"));\n          list[idx] = coefs[key];\n        }\n        coefs = list;\n      }\n      if (!Array.isArray(coefs)) {\n        return String(coefs);\n      }\n      coefs = _trim_trailing(coefs);\n      return coefs.map(function(v) { return v == null ? \"\" : _trunc(v); }).join(\",\");\n    }\n\n    var _ARG_HANDLERS = {\n      I: _str_of_int,\n      F: _trunc,\n      S: String,\n      L: _parse_list,\n      C: _parse_ctrl_coefs\n    };\n\n    /**\n     * Build an AMY wire code string from named parameters.\n     *\n     *   amy_message({osc: 0, wave: 1, freq: 440})  =>  \"v0w1f440Z\"\n     *   amy_message({synth: 1, patch: 257, num_voices: 6})  =>  \"K257i1iv6Z\"\n     *\n     * Control coefficient params (amp, freq, duty, pan, filter_freq) accept:\n     *   - A number:  freq: 440\n     *   - An array:  freq: [440, 1, null, null, null, null, 1]\n     *   - An object: freq: {const: 440, bend: 1}\n     */\n    function amy_message(params) {\n      if (!params || typeof params !== \"object\") {\n        throw new Error(\"amy_message requires an object of parameters\");\n      }\n      var keys = [];\n      for (var key in params) {\n        if (!params.hasOwnProperty(key)) continue;\n        if (!(key in AMY_KW_MAP)) {\n          throw new Error(\"Unknown AMY parameter: \" + key);\n        }\n        var arg = params[key];\n        if (arg == null) {\n          if (key !== \"time\" && key !== \"sequence\") {\n            throw new Error(\"Null value for AMY parameter: \" + key);\n          }\n          continue;\n        }\n        keys.push(key);\n      }\n      keys.sort(function(a, b) {\n        return (AMY_KW_PRIORITY[a] || 0) - (AMY_KW_PRIORITY[b] || 0);\n      });\n      var m = \"\";\n      for (var i = 0; i < keys.length; i++) {\n        var k = keys[i];\n        var mapping = AMY_KW_MAP[k];\n        var handler = _ARG_HANDLERS[mapping.type];\n        m += mapping.wire + handler(params[k]);\n      }\n      return m + \"Z\";\n    }\n\n    /**\n     * Build and send an AMY wire code message.\n     * Equivalent to Python's amy.send().\n     */\n    function amy_send(params, log) {\n      var msg = amy_message(params);\n      if (log && typeof amy_add_log_message === \"function\") {\n        amy_add_log_message(msg);\n      } else if (typeof amy_add_message === \"function\") {\n        amy_add_message(msg);\n      } else {\n        console.warn(\"amy_send: no AMY message handler found (is amy.js loaded?)\");\n      }\n      return msg;\n    }\n\n    // Constants from amy/constants.py (mirrors amy.SINE, amy.FILTER_LPF, etc.)\n    var AMY = %CONSTANTS%;\n\n    if (typeof globalThis !== \"undefined\") {\n      globalThis.amy_message = amy_message;\n      globalThis.amy_send = amy_send;\n      globalThis.AMY = AMY;\n      globalThis.AMY_KW_MAP = AMY_KW_MAP;\n      globalThis.AMY_COEF_FIELDS = AMY_COEF_FIELDS;\n    }\n\n    })();\n    \"\"\")\n\n    # Build constants object\n    if constants:\n        const_entries = []\n        for name, val in constants.items():\n            if isinstance(val, float):\n                const_entries.append(f\"  {name}: {val}\")\n            else:\n                const_entries.append(f\"  {name}: {val}\")\n        constants_js = \"{\\n\" + \",\\n\".join(const_entries) + \"\\n}\"\n    else:\n        constants_js = \"{}\"\n\n    js = js.replace(\"%KW_MAP%\", kw_map_js)\n    js = js.replace(\"%KW_PRIORITY%\", kw_priority_js)\n    js = js.replace(\"%COEF_FIELDS%\", coef_fields_js)\n    js = js.replace(\"%CONSTANTS%\", constants_js)\n    return js\n\n\ndef main():\n    source = AMY_INIT.read_text()\n    kw_map_list = extract_kw_map_list(source)\n    coef_fields = extract_coef_fields(source)\n    constants = extract_constants(AMY_CONSTANTS.read_text())\n    js = generate_js(kw_map_list, coef_fields, constants)\n    OUTPUT.write_text(js)\n    print(f\"Generated {OUTPUT.relative_to(ROOT)} ({len(kw_map_list)} parameters, {len(coef_fields)} coef fields, {len(constants)} constants)\")\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "scripts/gen_patches_js.py",
    "content": "#!/usr/bin/env python3\n\"\"\"Generate patches.generated.js from src/patches.h.\n\nParses patch names and patch command strings from the C header and emits\na self-contained JS module that exposes them to the AMYboard web editor.\n\"\"\"\nimport re\nfrom pathlib import Path\n\nROOT = Path(__file__).resolve().parents[1]\nPATCHES_H = ROOT / \"src\" / \"patches.h\"\nOUTPUT = ROOT / \"build\" / \"patches.generated.js\"\n\n# Regex to match each entry in patch_commands[]:\n#   /* 0: Juno A11 Brass Set 1 */ \"v1w4a1,...Z\",\nENTRY_RE = re.compile(\n    r'/\\*\\s*\\d+:\\s*(.+?)\\s*\\*/\\s*\"((?:[^\"\\\\]|\\\\.)*)\"'\n)\n\n\ndef parse_patches(source: str):\n    \"\"\"Return list of (name, code) tuples from patches.h.\"\"\"\n    patches = []\n    for m in ENTRY_RE.finditer(source):\n        patches.append((m.group(1), m.group(2)))\n    return patches\n\n\ndef generate_js(patches):\n    \"\"\"Build the complete JS source.\"\"\"\n    names_js = \",\\n\".join(f'    \"{name}\"' for name, _ in patches)\n    codes_js = \",\\n\".join(f'    \"{code}\"' for _, code in patches)\n\n    # The last patch is the amyboard default\n    amyboard_default = patches[-1][1] if patches else \"\"\n\n    return f\"\"\"\\\n// AUTO-GENERATED by scripts/gen_patches_js.py — do not edit by hand.\n// Source: src/patches.h\n(function() {{\n  const patches = [\n{names_js},\n  ];\n\n  const patchCodes = [\n{codes_js},\n  ];\n\n  window.amy_patches = patches;\n\n  window.patch_code_for_patch_number = patchCodes;\n\n  window.amyboard_patch_string = \"{amyboard_default}\";\n\n  if (typeof window.onPatchChange !== \"function\") {{\n    window.onPatchChange = function(_patchIndex) {{}};\n  }}\n\n  window.init_patches_select = function(selectId) {{\n    const select = document.getElementById(selectId);\n    if (!select) {{\n      return;\n    }}\n    select.innerHTML = \"\";\n    var groups = [\n      {{ label: \"AMYboard\", start: 0, end: Math.min(patches.length, 128) }},\n      {{ label: \"DX7\", start: 128, end: patches.length }},\n    ];\n    for (var g = 0; g < groups.length; g++) {{\n      var grp = groups[g];\n      if (grp.start >= patches.length) continue;\n      var optgroup = document.createElement(\"optgroup\");\n      optgroup.label = grp.label;\n      for (var index = grp.start; index < grp.end; index++) {{\n        var option = document.createElement(\"option\");\n        option.value = String(index);\n        option.textContent = patches[index];\n        optgroup.appendChild(option);\n      }}\n      select.appendChild(optgroup);\n    }}\n  }};\n  window.init_patches_select_range = function(selectId, rangeStart, rangeEnd) {{\n    const select = document.getElementById(selectId);\n    if (!select) {{\n      return;\n    }}\n    select.innerHTML = \"\";\n    var start = Math.max(0, rangeStart || 0);\n    var end = Math.min(patches.length, rangeEnd || patches.length);\n    for (var index = start; index < end; index++) {{\n      var option = document.createElement(\"option\");\n      option.value = String(index);\n      option.textContent = patches[index];\n      select.appendChild(option);\n    }}\n  }};\n}})();\n\"\"\"\n\n\ndef main():\n    source = PATCHES_H.read_text()\n    patches = parse_patches(source)\n    OUTPUT.parent.mkdir(parents=True, exist_ok=True)\n    OUTPUT.write_text(generate_js(patches))\n    print(f\"Generated {OUTPUT.relative_to(ROOT)} ({len(patches)} patches)\")\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "setup.py",
    "content": "from distutils.core import setup, Extension\nfrom setuptools import find_packages\nimport glob\nimport os\n# the c++ extension module\nsources = ['algorithms.c', 'amy.c', 'delay.c', 'envelope.c', 'filters.c', 'parse.c', 'sequencer.c', 'transfer.c', 'midi_mappings.c', 'custom.c', 'patches.c', 'libminiaudio-audio.c', 'oscillators.c', 'interp_partials.c', 'pcm.c', 'pyamy.c', 'log2_exp2.c', 'instrument.c', 'amy_midi.c', 'api.c']\n\nfor i in range(len(sources)):\n\tsources[i] = \"src/\"+sources[i]\n\nos.environ[\"CC\"] = \"gcc\"\nos.environ[\"CXX\"] = \"g++\"\n\ncomp_args = [\"-I/opt/homebrew/include\", \"-DAMY_DEBUG\", \"-Wno-unused-but-set-variable\", \"-Wno-unreachable-code\", \"-DAMY_WAVETABLE\"]\nlink_args = [\"-L/opt/homebrew/lib\",\"-lpthread\"]\n\nif os.uname()[0] == 'Darwin':\n\tframeworks = ['CoreAudio', 'AudioToolbox', 'AudioUnit', 'CoreFoundation', 'CoreMIDI', 'Cocoa']\n\tsources += ['src/macos_midi.m']\n\tfor f in frameworks:\n\t\tlink_args += ['-framework', f, '-lstdc++']\n\tcomp_args += ['-DMACOS']\n\nif os.uname()[4] == 'armv7l' or os.uname()[4] == 'armv6l':\n\tlink_args += ['-latomic', '-ldl']\n\nextension_mod = Extension(\"c_amy\", sources=sources, \\\n\textra_compile_args=comp_args, \\\n\textra_link_args=link_args)\n\nsetup(name = \"amy\", \n\tpackages=find_packages(include=['amy']),\n\text_modules=[extension_mod])\n"
  },
  {
    "path": "setup_godot.sh",
    "content": "#!/usr/bin/env bash\n#\n# setup_godot.sh — Build and install the AMY GDExtension addon into a Godot project.\n#\n# Usage:\n#   ./setup_godot.sh /path/to/your/godot/project\n#\n# Environment variables:\n#   GODOT_CPP_PATH  Path to godot-cpp checkout (default: ../godot-cpp)\n#   JOBS            Parallel build jobs (default: 8)\n#\n# This script:\n#   1. Builds the native GDExtension library using scons\n#   2. Creates addons/amy/ in your Godot project with:\n#      - The GDScript Amy class (amy.gd)\n#      - The GDExtension config and compiled library\n#      - Web export support files\n#      - The install.gd editor script for web setup\n\nset -euo pipefail\n\nAMY_DIR=\"$(cd \"$(dirname \"$0\")\" && pwd)\"\nGODOT_CPP_PATH=\"${GODOT_CPP_PATH:-${AMY_DIR}/../godot-cpp}\"\nJOBS=\"${JOBS:-8}\"\n\n# ── Check arguments ──────────────────────────────────────────────\nif [ $# -lt 1 ]; then\n    echo \"Usage: $0 <godot-project-path>\"\n    echo \"\"\n    echo \"  Builds the AMY GDExtension and installs it into a Godot project.\"\n    echo \"\"\n    echo \"  Environment variables:\"\n    echo \"    GODOT_CPP_PATH  Path to godot-cpp (default: ../godot-cpp)\"\n    echo \"    JOBS            Parallel jobs (default: 8)\"\n    exit 1\nfi\n\nPROJECT_DIR=\"$(cd \"$1\" && pwd)\"\nADDON_DIR=\"${PROJECT_DIR}/addons/amy\"\n\nif [ ! -f \"${PROJECT_DIR}/project.godot\" ]; then\n    echo \"ERROR: ${PROJECT_DIR} does not look like a Godot project (no project.godot found)\"\n    exit 1\nfi\n\nif [ ! -d \"${GODOT_CPP_PATH}\" ]; then\n    echo \"ERROR: godot-cpp not found at ${GODOT_CPP_PATH}\"\n    echo \"  Clone it:  git clone --branch godot-4.4-stable https://github.com/godotengine/godot-cpp.git ${GODOT_CPP_PATH}\"\n    echo \"  Or set:    GODOT_CPP_PATH=/path/to/godot-cpp $0 $1\"\n    exit 1\nfi\n\necho \"=== AMY Godot Addon Setup ===\"\necho \"  AMY source:    ${AMY_DIR}/src\"\necho \"  godot-cpp:     ${GODOT_CPP_PATH}\"\necho \"  Godot project: ${PROJECT_DIR}\"\necho \"  Addon output:  ${ADDON_DIR}\"\necho \"\"\n\n# ── Create addon directory structure ─────────────────────────────\necho \"Creating addon directory structure...\"\nmkdir -p \"${ADDON_DIR}/src\"\nmkdir -p \"${ADDON_DIR}/bin\"\nmkdir -p \"${ADDON_DIR}/web\"\n\n# ── Copy AMY C source (symlink-free, for scons) ─────────────────\necho \"Copying AMY source...\"\nmkdir -p \"${ADDON_DIR}/amy_src\"\ncp \"${AMY_DIR}\"/src/*.c \"${ADDON_DIR}/amy_src/\" 2>/dev/null || true\ncp \"${AMY_DIR}\"/src/*.h \"${ADDON_DIR}/amy_src/\" 2>/dev/null || true\n# Godot shouldn't try to import C files\ntouch \"${ADDON_DIR}/amy_src/.gdignore\"\n\n# ── Copy GDExtension wrapper source ─────────────────────────────\necho \"Copying GDExtension source...\"\ncat > \"${ADDON_DIR}/src/amy_gdextension.h\" << 'HEADER_EOF'\n#ifndef AMY_GDEXTENSION_H\n#define AMY_GDEXTENSION_H\n\n#include <godot_cpp/classes/node.hpp>\n#include <godot_cpp/classes/audio_stream_generator_playback.hpp>\n#include <godot_cpp/variant/string.hpp>\n#include <godot_cpp/variant/packed_vector2_array.hpp>\n\nnamespace godot {\n\nclass AmySynth : public Node {\n\tGDCLASS(AmySynth, Node)\n\nprivate:\n\tbool initialized = false;\n\tint sample_rate = 44100;\n\tint block_size = 256;\n\n\t// Config properties — set these before calling start()\n\tbool chorus = true;\n\tbool reverb = true;\n\tbool echo = true;\n\tbool default_synths = false;\n\tbool partials = true;\n\tbool custom = true;\n\tbool startup_bleep = false;\n\tbool audio_in = false;\n\tint max_oscs = 180;\n\tint max_voices = 64;\n\tint max_synths = 64;\n\nprotected:\n\tstatic void _bind_methods();\n\npublic:\n\tAmySynth();\n\t~AmySynth();\n\n\tvoid start();\n\tvoid stop();\n\tvoid send(const String &message);\n\tvoid send_note(int osc, int midi_note, float velocity, int duration_ms);\n\tPackedVector2Array fill_buffer();\n\tint get_sample_rate() const;\n\tint get_block_size() const;\n\tuint64_t get_sysclock() const;\n\tbool is_running() const;\n\n\t// Config setters/getters\n\tvoid set_chorus(bool p_val);\n\tbool get_chorus() const;\n\tvoid set_reverb(bool p_val);\n\tbool get_reverb() const;\n\tvoid set_echo(bool p_val);\n\tbool get_echo() const;\n\tvoid set_default_synths(bool p_val);\n\tbool get_default_synths() const;\n\tvoid set_partials(bool p_val);\n\tbool get_partials() const;\n\tvoid set_custom(bool p_val);\n\tbool get_custom() const;\n\tvoid set_startup_bleep(bool p_val);\n\tbool get_startup_bleep() const;\n\tvoid set_audio_in(bool p_val);\n\tbool get_audio_in() const;\n\tvoid set_max_oscs(int p_val);\n\tint get_max_oscs() const;\n\tvoid set_max_voices(int p_val);\n\tint get_max_voices() const;\n\tvoid set_max_synths(int p_val);\n\tint get_max_synths() const;\n};\n\n} // namespace godot\n\n#endif // AMY_GDEXTENSION_H\nHEADER_EOF\n\ncat > \"${ADDON_DIR}/src/amy_gdextension.cpp\" << 'CPP_EOF'\n#include \"amy_gdextension.h\"\n#include <godot_cpp/core/class_db.hpp>\n#include <godot_cpp/variant/utility_functions.hpp>\n\n// AMY is a C library\nextern \"C\" {\n#include \"amy.h\"\n}\n\nusing namespace godot;\n\nAmySynth::AmySynth() {}\n\nAmySynth::~AmySynth() {\n\tif (initialized) {\n\t\tamy_stop();\n\t\tinitialized = false;\n\t}\n}\n\nvoid AmySynth::_bind_methods() {\n\tClassDB::bind_method(D_METHOD(\"start\"), &AmySynth::start);\n\tClassDB::bind_method(D_METHOD(\"stop\"), &AmySynth::stop);\n\tClassDB::bind_method(D_METHOD(\"send\", \"message\"), &AmySynth::send);\n\tClassDB::bind_method(D_METHOD(\"send_note\", \"osc\", \"midi_note\", \"velocity\", \"duration_ms\"), &AmySynth::send_note);\n\tClassDB::bind_method(D_METHOD(\"fill_buffer\"), &AmySynth::fill_buffer);\n\tClassDB::bind_method(D_METHOD(\"get_sample_rate\"), &AmySynth::get_sample_rate);\n\tClassDB::bind_method(D_METHOD(\"get_block_size\"), &AmySynth::get_block_size);\n\tClassDB::bind_method(D_METHOD(\"get_sysclock\"), &AmySynth::get_sysclock);\n\tClassDB::bind_method(D_METHOD(\"is_running\"), &AmySynth::is_running);\n\n\t// Config property bindings — set before calling start()\n\tClassDB::bind_method(D_METHOD(\"set_chorus\", \"enabled\"), &AmySynth::set_chorus);\n\tClassDB::bind_method(D_METHOD(\"get_chorus\"), &AmySynth::get_chorus);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"chorus\"), \"set_chorus\", \"get_chorus\");\n\n\tClassDB::bind_method(D_METHOD(\"set_reverb\", \"enabled\"), &AmySynth::set_reverb);\n\tClassDB::bind_method(D_METHOD(\"get_reverb\"), &AmySynth::get_reverb);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"reverb\"), \"set_reverb\", \"get_reverb\");\n\n\tClassDB::bind_method(D_METHOD(\"set_echo\", \"enabled\"), &AmySynth::set_echo);\n\tClassDB::bind_method(D_METHOD(\"get_echo\"), &AmySynth::get_echo);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"echo\"), \"set_echo\", \"get_echo\");\n\n\tClassDB::bind_method(D_METHOD(\"set_default_synths\", \"enabled\"), &AmySynth::set_default_synths);\n\tClassDB::bind_method(D_METHOD(\"get_default_synths\"), &AmySynth::get_default_synths);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"default_synths\"), \"set_default_synths\", \"get_default_synths\");\n\n\tClassDB::bind_method(D_METHOD(\"set_partials\", \"enabled\"), &AmySynth::set_partials);\n\tClassDB::bind_method(D_METHOD(\"get_partials\"), &AmySynth::get_partials);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"partials\"), \"set_partials\", \"get_partials\");\n\n\tClassDB::bind_method(D_METHOD(\"set_custom\", \"enabled\"), &AmySynth::set_custom);\n\tClassDB::bind_method(D_METHOD(\"get_custom\"), &AmySynth::get_custom);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"custom\"), \"set_custom\", \"get_custom\");\n\n\tClassDB::bind_method(D_METHOD(\"set_startup_bleep\", \"enabled\"), &AmySynth::set_startup_bleep);\n\tClassDB::bind_method(D_METHOD(\"get_startup_bleep\"), &AmySynth::get_startup_bleep);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"startup_bleep\"), \"set_startup_bleep\", \"get_startup_bleep\");\n\n\tClassDB::bind_method(D_METHOD(\"set_audio_in\", \"enabled\"), &AmySynth::set_audio_in);\n\tClassDB::bind_method(D_METHOD(\"get_audio_in\"), &AmySynth::get_audio_in);\n\tADD_PROPERTY(PropertyInfo(Variant::BOOL, \"audio_in\"), \"set_audio_in\", \"get_audio_in\");\n\n\tClassDB::bind_method(D_METHOD(\"set_max_oscs\", \"count\"), &AmySynth::set_max_oscs);\n\tClassDB::bind_method(D_METHOD(\"get_max_oscs\"), &AmySynth::get_max_oscs);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"max_oscs\"), \"set_max_oscs\", \"get_max_oscs\");\n\n\tClassDB::bind_method(D_METHOD(\"set_max_voices\", \"count\"), &AmySynth::set_max_voices);\n\tClassDB::bind_method(D_METHOD(\"get_max_voices\"), &AmySynth::get_max_voices);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"max_voices\"), \"set_max_voices\", \"get_max_voices\");\n\n\tClassDB::bind_method(D_METHOD(\"set_max_synths\", \"count\"), &AmySynth::set_max_synths);\n\tClassDB::bind_method(D_METHOD(\"get_max_synths\"), &AmySynth::get_max_synths);\n\tADD_PROPERTY(PropertyInfo(Variant::INT, \"max_synths\"), \"set_max_synths\", \"get_max_synths\");\n}\n\nvoid AmySynth::start() {\n\tif (initialized) return;\n\n\tamy_config_t config = amy_default_config();\n\tconfig.audio = AMY_AUDIO_IS_NONE;  // We handle audio output ourselves via Godot\n\tconfig.features.chorus = chorus ? 1 : 0;\n\tconfig.features.reverb = reverb ? 1 : 0;\n\tconfig.features.echo = echo ? 1 : 0;\n\tconfig.features.default_synths = default_synths ? 1 : 0;\n\tconfig.features.partials = partials ? 1 : 0;\n\tconfig.features.custom = custom ? 1 : 0;\n\tconfig.features.startup_bleep = startup_bleep ? 1 : 0;\n\tconfig.features.audio_in = audio_in ? 1 : 0;\n\tconfig.max_oscs = max_oscs;\n\tconfig.max_voices = max_voices;\n\tconfig.max_synths = max_synths;\n\tamy_start(config);\n\tinitialized = true;\n\n\tsample_rate = AMY_SAMPLE_RATE;\n\tblock_size = AMY_BLOCK_SIZE;\n\n\tUtilityFunctions::print(\"AMY synth started (\", sample_rate, \" Hz, block size \", block_size, \")\");\n}\n\nvoid AmySynth::stop() {\n\tif (!initialized) return;\n\tamy_stop();\n\tinitialized = false;\n\tUtilityFunctions::print(\"AMY synth stopped\");\n}\n\nvoid AmySynth::send(const String &message) {\n\tif (!initialized) return;\n\tCharString cs = message.utf8();\n\tamy_add_message(const_cast<char*>(cs.get_data()));\n}\n\nvoid AmySynth::send_note(int osc, int midi_note, float velocity, int duration_ms) {\n\tif (!initialized) return;\n\tchar msg[128];\n\tif (duration_ms > 0) {\n\t\tsnprintf(msg, sizeof(msg), \"v%dw0n%dl%fd%d\", osc, midi_note, velocity, duration_ms);\n\t} else {\n\t\tsnprintf(msg, sizeof(msg), \"v%dw0n%dl%f\", osc, midi_note, velocity);\n\t}\n\tamy_add_message(msg);\n}\n\nPackedVector2Array AmySynth::fill_buffer() {\n\tPackedVector2Array buffer;\n\n\tif (!initialized) {\n\t\tbuffer.resize(block_size);\n\t\tbuffer.fill(Vector2(0, 0));\n\t\treturn buffer;\n\t}\n\n\tint16_t *samples = amy_simple_fill_buffer();\n\n\tbuffer.resize(block_size);\n\tconst float scale = 1.0f / 32768.0f;\n\n\tfor (int i = 0; i < block_size; i++) {\n\t\tfloat left = static_cast<float>(samples[i * 2]) * scale;\n\t\tfloat right = static_cast<float>(samples[i * 2 + 1]) * scale;\n\t\tbuffer.set(i, Vector2(left, right));\n\t}\n\n\treturn buffer;\n}\n\nint AmySynth::get_sample_rate() const {\n\treturn sample_rate;\n}\n\nint AmySynth::get_block_size() const {\n\treturn block_size;\n}\n\nuint64_t AmySynth::get_sysclock() const {\n\tif (!initialized) return 0;\n\treturn amy_sysclock();\n}\n\nbool AmySynth::is_running() const {\n\treturn initialized;\n}\n\n// Config setters/getters\nvoid AmySynth::set_chorus(bool p_val) { chorus = p_val; }\nbool AmySynth::get_chorus() const { return chorus; }\nvoid AmySynth::set_reverb(bool p_val) { reverb = p_val; }\nbool AmySynth::get_reverb() const { return reverb; }\nvoid AmySynth::set_echo(bool p_val) { echo = p_val; }\nbool AmySynth::get_echo() const { return echo; }\nvoid AmySynth::set_default_synths(bool p_val) { default_synths = p_val; }\nbool AmySynth::get_default_synths() const { return default_synths; }\nvoid AmySynth::set_partials(bool p_val) { partials = p_val; }\nbool AmySynth::get_partials() const { return partials; }\nvoid AmySynth::set_custom(bool p_val) { custom = p_val; }\nbool AmySynth::get_custom() const { return custom; }\nvoid AmySynth::set_startup_bleep(bool p_val) { startup_bleep = p_val; }\nbool AmySynth::get_startup_bleep() const { return startup_bleep; }\nvoid AmySynth::set_audio_in(bool p_val) { audio_in = p_val; }\nbool AmySynth::get_audio_in() const { return audio_in; }\nvoid AmySynth::set_max_oscs(int p_val) { max_oscs = p_val; }\nint AmySynth::get_max_oscs() const { return max_oscs; }\nvoid AmySynth::set_max_voices(int p_val) { max_voices = p_val; }\nint AmySynth::get_max_voices() const { return max_voices; }\nvoid AmySynth::set_max_synths(int p_val) { max_synths = p_val; }\nint AmySynth::get_max_synths() const { return max_synths; }\nCPP_EOF\n\ncat > \"${ADDON_DIR}/src/register_types.h\" << 'RTHEOF'\n#ifndef AMY_REGISTER_TYPES_H\n#define AMY_REGISTER_TYPES_H\n\n#include <godot_cpp/core/class_db.hpp>\n\nusing namespace godot;\n\nvoid initialize_amy_module(ModuleInitializationLevel p_level);\nvoid uninitialize_amy_module(ModuleInitializationLevel p_level);\n\n#endif // AMY_REGISTER_TYPES_H\nRTHEOF\n\ncat > \"${ADDON_DIR}/src/register_types.cpp\" << 'RTCEOF'\n#include \"register_types.h\"\n#include \"amy_gdextension.h\"\n\n#include <gdextension_interface.h>\n#include <godot_cpp/core/defs.hpp>\n#include <godot_cpp/godot.hpp>\n#include <godot_cpp/core/class_db.hpp>\n\nusing namespace godot;\n\nvoid initialize_amy_module(ModuleInitializationLevel p_level) {\n\tif (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {\n\t\treturn;\n\t}\n\tGDREGISTER_CLASS(AmySynth);\n}\n\nvoid uninitialize_amy_module(ModuleInitializationLevel p_level) {\n\tif (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {\n\t\treturn;\n\t}\n}\n\nextern \"C\" {\n\nGDExtensionBool GDE_EXPORT amy_library_init(\n\tGDExtensionInterfaceGetProcAddress p_get_proc_address,\n\tconst GDExtensionClassLibraryPtr p_library,\n\tGDExtensionInitialization *r_initialization\n) {\n\tgodot::GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);\n\n\tinit_obj.register_initializer(initialize_amy_module);\n\tinit_obj.register_terminator(uninitialize_amy_module);\n\tinit_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE);\n\n\treturn init_obj.init();\n}\n\n} // extern \"C\"\nRTCEOF\n\ncat > \"${ADDON_DIR}/src/amy_platform_stubs.c\" << 'STUBEOF'\n// Stub implementations for AMY platform/hardware functions.\n// We don't need I2S or MIDI hardware - Godot handles all audio.\n// miniaudio stubs are no longer needed thanks to -DAMY_NO_MINIAUDIO.\n\n#include <stdint.h>\n#include <stddef.h>\n\n// --- i2s.c stubs ---\nvoid amy_platform_init(void) {}\nvoid amy_platform_deinit(void) {}\nvoid amy_update_tasks(void) {}\nint16_t *amy_render_audio(void) { return (int16_t *)0; }\nsize_t amy_i2s_write(const uint8_t *buffer, size_t nbytes) {\n    (void)buffer; (void)nbytes; return nbytes;\n}\n\n// --- MIDI stubs (amy_midi.c / macos_midi.m) ---\nvoid midi_out(uint8_t *bytes, uint16_t len) { (void)bytes; (void)len; }\nvoid midi_local(uint8_t *bytes, uint16_t len) { (void)bytes; (void)len; }\nvoid run_midi(void) {}\nvoid stop_midi(void) {}\nvoid amy_send_midi_note_on(uint16_t osc) { (void)osc; }\nvoid amy_send_midi_note_off(uint16_t osc) { (void)osc; }\nvoid *run_midi_macos(void *vargp) { (void)vargp; return (void *)0; }\nvoid check_tusb_midi(void) {}\nvoid init_tusb_midi(void) {}\nSTUBEOF\n\n# ── Copy SConstruct ──────────────────────────────────────────────\necho \"Copying SConstruct...\"\ncat > \"${ADDON_DIR}/SConstruct\" << 'SCONSEOF'\n#!/usr/bin/env python\n\"\"\"\nBuild script for the AMY Synthesizer GDExtension.\n\nAMY C source lookup order:\n  1. AMY_SRC_PATH environment variable (if set)\n  2. ./amy_src/  (vendored source, included in this addon)\n\"\"\"\nimport os\nimport sys\n\n# Find godot-cpp (two levels up from addons/amy/)\ngodot_cpp_path = os.environ.get(\"GODOT_CPP_PATH\", \"../../godot-cpp\")\n\n# Find AMY C source: env var > vendored copy\namy_src_path = os.environ.get(\"AMY_SRC_PATH\", \"amy_src\")\nif not os.path.isdir(amy_src_path):\n    print(\"ERROR: AMY source not found at '{}'. Either:\")\n    print(\"  - Place AMY source in addons/amy/amy_src/\")\n    print(\"  - Or set AMY_SRC_PATH environment variable\")\n    Exit(1)\n\nenv = SConscript(os.path.join(godot_cpp_path, \"SConstruct\"))\n\n# AMY C source files (core synthesis - no platform-specific I2S, no example mains)\namy_sources = [\n    \"algorithms.c\",\n    \"amy.c\",\n    \"api.c\",\n    \"custom.c\",\n    \"delay.c\",\n    \"envelope.c\",\n    \"examples.c\",\n    \"filters.c\",\n    \"instrument.c\",\n    \"interp_partials.c\",\n    \"log2_exp2.c\",\n    \"midi_mappings.c\",\n    \"oscillators.c\",\n    \"parse.c\",\n    \"patches.c\",\n    \"pcm.c\",\n    \"sequencer.c\",\n    \"transfer.c\",\n]\n\n# Add AMY include path\nenv.Append(CPPPATH=[amy_src_path])\n\n# AMY compile flags - suppress warnings from AMY's C code\nenv.Append(CFLAGS=[\"-Wno-unused-parameter\", \"-Wno-sign-compare\", \"-Wno-missing-field-initializers\"])\nenv.Append(CCFLAGS=[\"-DAMY_WAVETABLE\", \"-DAMY_NO_MINIAUDIO\"])\n\n# On macOS, we need some frameworks for threading\nif sys.platform == \"darwin\":\n    env.Append(CCFLAGS=[\"-DMACOS\"])\n    env.Append(LINKFLAGS=[\"-framework\", \"CoreFoundation\"])\n\n# Build all sources together - AMY C files + GDExtension C++ files\nall_sources = []\n\nfor src in amy_sources:\n    src_path = os.path.join(amy_src_path, src)\n    if os.path.exists(src_path):\n        all_sources.append(src_path)\n\n# GDExtension C++ sources + platform stubs\nall_sources += [\n    \"src/amy_platform_stubs.c\",\n    \"src/amy_gdextension.cpp\",\n    \"src/register_types.cpp\",\n]\n\n# Add our source include path\nenv.Append(CPPPATH=[\"src\"])\n\n# Build shared library directly from all sources\nif sys.platform == \"darwin\":\n    # Build as framework for macOS\n    lib_name = \"libamy{}\".format(env[\"suffix\"])\n    framework_dir = \"bin/{}.framework\".format(lib_name)\n\n    library = env.SharedLibrary(\n        target=os.path.join(framework_dir, lib_name),\n        source=all_sources,\n    )\nelse:\n    library = env.SharedLibrary(\n        target=\"bin/libamy{}{}\".format(env[\"suffix\"], env[\"SHLIBSUFFIX\"]),\n        source=all_sources,\n    )\n\nDefault(library)\nSCONSEOF\n\n# ── Copy GDExtension config ─────────────────────────────────────\necho \"Copying GDExtension config...\"\ncat > \"${ADDON_DIR}/amy.gdextension\" << 'GDEXTEOF'\n[configuration]\n\nentry_symbol = \"amy_library_init\"\ncompatibility_minimum = \"4.3\"\n\n[libraries]\n\nmacos.debug = \"res://addons/amy/bin/libamy.macos.template_debug.universal.framework\"\nmacos.release = \"res://addons/amy/bin/libamy.macos.template_debug.universal.framework\"\nlinux.debug.x86_64 = \"res://addons/amy/bin/libamy.linux.template_debug.x86_64.so\"\nlinux.release.x86_64 = \"res://addons/amy/bin/libamy.linux.template_release.x86_64.so\"\nwindows.debug.x86_64 = \"res://addons/amy/bin/libamy.windows.template_debug.x86_64.dll\"\nwindows.release.x86_64 = \"res://addons/amy/bin/libamy.windows.template_release.x86_64.dll\"\nGDEXTEOF\n\n# ── Build native library ────────────────────────────────────────\necho \"\"\necho \"Building native GDExtension library...\"\ncd \"${ADDON_DIR}\"\nGODOT_CPP_PATH=\"${GODOT_CPP_PATH}\" scons -j\"${JOBS}\" 2>&1 | tail -5\nBUILD_STATUS=${PIPESTATUS[0]}\n\nif [ ${BUILD_STATUS} -ne 0 ]; then\n    echo \"\"\n    echo \"ERROR: Build failed. Check the output above.\"\n    exit 1\nfi\n\necho \"\"\necho \"Build successful!\"\n\n# ── Copy GDScript wrapper (amy.gd) ──────────────────────────────\necho \"Copying GDScript files...\"\ncat > \"${ADDON_DIR}/amy.gd\" << 'GDEOF'\nclass_name Amy\nextends Node\n## AMY Synthesizer for Godot.\n##\n## High-level GDScript API that mirrors AMY's Python interface.\n## Works on native (GDExtension) and web (WASM via JavaScriptBridge).\n##\n## Usage:\n##   var amy := Amy.new()\n##   add_child(amy)\n##   await get_tree().process_frame\n##   amy.send({\"osc\": 0, \"wave\": Amy.SINE, \"freq\": 440, \"vel\": 1.0})\n##\n## Or use wire protocol directly:\n##   amy.send_raw(\"v0w0f440l1\")\n\n# ============================================================\n#  Wave types\n# ============================================================\nconst SINE: int = 0\nconst PULSE: int = 1\nconst SAW_DOWN: int = 2\nconst SAW_UP: int = 3\nconst TRIANGLE: int = 4\nconst NOISE: int = 5\nconst KS: int = 6\nconst PCM: int = 7\nconst ALGO: int = 8\nconst PARTIAL: int = 9\nconst BYO_PARTIALS: int = 10\nconst INTERP_PARTIALS: int = 11\nconst AUDIO_IN0: int = 12\nconst AUDIO_IN1: int = 13\nconst WAVETABLE: int = 19\nconst CUSTOM: int = 20\nconst WAVE_OFF: int = 21\n\n# ============================================================\n#  Filter types\n# ============================================================\nconst FILTER_NONE: int = 0\nconst FILTER_LPF: int = 1\nconst FILTER_BPF: int = 2\nconst FILTER_HPF: int = 3\nconst FILTER_LPF24: int = 4\n\n# ============================================================\n#  Envelope types\n# ============================================================\nconst ENVELOPE_NORMAL: int = 0\nconst ENVELOPE_LINEAR: int = 1\nconst ENVELOPE_DX7: int = 2\nconst ENVELOPE_TRUE_EXPONENTIAL: int = 3\n\n# ============================================================\n#  Config — set these before adding to the tree (before _ready)\n# ============================================================\n## Enable chorus effect.\n@export var chorus: bool = true\n## Enable reverb effect.\n@export var reverb: bool = true\n## Enable echo/delay effect.\n@export var echo: bool = true\n## Load default GM synth patches on startup.\n@export var default_synths: bool = false\n## Enable partial synthesis.\n@export var partials: bool = true\n## Enable custom oscillator type.\n@export var custom: bool = true\n## Play a short bleep on startup.\n@export var startup_bleep: bool = false\n## Enable audio input.\n@export var audio_in: bool = false\n## Maximum number of oscillators.\n@export var max_oscs: int = 180\n## Maximum number of voices.\n@export var max_voices: int = 64\n## Maximum number of synths.\n@export var max_synths: int = 64\n\n# ============================================================\n#  Internals — audio bridge\n# ============================================================\nvar _synth: Node = null\nvar _stream_player: AudioStreamPlayer = null\nvar _playback: AudioStreamGeneratorPlayback = null\nvar _started: bool = false\nvar _is_web: bool = false\n\nfunc _ready() -> void:\n\t_is_web = OS.get_name() == \"Web\"\n\tif _is_web:\n\t\t_init_web()\n\telse:\n\t\t_init_native()\n\nfunc _init_native() -> void:\n\tif ClassDB.class_exists(&\"AmySynth\"):\n\t\t_synth = ClassDB.instantiate(&\"AmySynth\")\n\t\tadd_child(_synth)\n\telse:\n\t\tpush_warning(\"AmySynth GDExtension not loaded — audio disabled\")\n\t\treturn\n\n\t# Apply config before starting\n\t_synth.set(\"chorus\", chorus)\n\t_synth.set(\"reverb\", reverb)\n\t_synth.set(\"echo\", echo)\n\t_synth.set(\"default_synths\", default_synths)\n\t_synth.set(\"partials\", partials)\n\t_synth.set(\"custom\", custom)\n\t_synth.set(\"startup_bleep\", startup_bleep)\n\t_synth.set(\"audio_in\", audio_in)\n\t_synth.set(\"max_oscs\", max_oscs)\n\t_synth.set(\"max_voices\", max_voices)\n\t_synth.set(\"max_synths\", max_synths)\n\n\t_stream_player = AudioStreamPlayer.new()\n\tvar stream := AudioStreamGenerator.new()\n\tstream.mix_rate = 44100.0\n\tstream.buffer_length = 0.1\n\t_stream_player.stream = stream\n\t_stream_player.bus = \"Master\"\n\tadd_child(_stream_player)\n\n\t_synth.call(\"start\")\n\t_stream_player.play()\n\t_playback = _stream_player.get_stream_playback() as AudioStreamGeneratorPlayback\n\t_started = true\n\nfunc _init_web() -> void:\n\tfor i in range(100):\n\t\tvar ready: Variant = JavaScriptBridge.eval(\"godot_amy_is_ready()\", true)\n\t\tif ready:\n\t\t\t_started = true\n\t\t\tprint(\"AMY web synth ready\")\n\t\t\treturn\n\t\tawait get_tree().create_timer(0.1).timeout\n\tpush_warning(\"AMY web module failed to load after 10 s\")\n\nfunc _process(_delta: float) -> void:\n\tif _started and not _is_web:\n\t\t_fill_audio()\n\nfunc _fill_audio() -> void:\n\tif _playback == null or _synth == null:\n\t\treturn\n\tvar block_size: Variant = _synth.call(\"get_block_size\")\n\tvar bs: int = block_size as int\n\twhile _playback.can_push_buffer(bs):\n\t\tvar buffer: Variant = _synth.call(\"fill_buffer\")\n\t\t_playback.push_buffer(buffer as PackedVector2Array)\n\nfunc _exit_tree() -> void:\n\tif not _is_web and _synth:\n\t\t_synth.call(\"stop\")\n\n# ============================================================\n#  Public API\n# ============================================================\n\n## Send an AMY message using keyword-style parameters.\n## Example:\n##   amy.send({\"osc\": 0, \"wave\": Amy.SINE, \"freq\": 440, \"vel\": 1})\n##   amy.send({\"osc\": 0, \"vel\": 0})  # note off\nfunc send(params: Dictionary = {}) -> void:\n\tsend_raw(message(params))\n\n## Build an AMY wire message from a dictionary without sending it.\n## Returns the wire string (e.g. \"v0w0f440l1\").\nfunc message(params: Dictionary) -> String:\n\tvar wire: String = \"\"\n\tfor key: Variant in params:\n\t\tvar key_str: String = str(key)\n\t\tif not _KW_MAP.has(key_str):\n\t\t\tpush_warning(\"AMY: unknown parameter '%s'\" % key_str)\n\t\t\tcontinue\n\t\tvar mapping: Variant = _KW_MAP[key_str]\n\t\tvar m: Array = mapping as Array\n\t\tvar code: String = str(m[0])\n\t\tvar type: String = str(m[1])\n\t\tvar val: Variant = params[key]\n\t\twire += code + _format_value(val, type)\n\treturn wire\n\n## Send a raw AMY wire-protocol string.\n## Example:  amy.send_raw(\"v0w0f440l1\")\nfunc send_raw(msg: String) -> void:\n\tif not _started or msg.is_empty():\n\t\treturn\n\tif _is_web:\n\t\tvar safe: String = msg.replace(\"\\\\\", \"\\\\\\\\\").replace(\"'\", \"\\\\'\")\n\t\tJavaScriptBridge.eval(\"godot_amy_send('%s')\" % safe)\n\telse:\n\t\tif _synth:\n\t\t\t_synth.call(\"send\", msg)\n\n## Stop all sound immediately.\nfunc panic() -> void:\n\tsend_raw(\"S\")\n\n# ============================================================\n#  Value formatting helpers\n# ============================================================\nfunc _format_value(val: Variant, type: String) -> String:\n\tmatch type:\n\t\t\"I\":\n\t\t\treturn str(int(val))\n\t\t\"F\":\n\t\t\treturn _trunc(float(val))\n\t\t\"S\":\n\t\t\treturn str(val)\n\t\t\"L\":\n\t\t\treturn _format_list(val)\n\t\t\"C\":\n\t\t\treturn _format_ctrl(val)\n\treturn str(val)\n\n## Truncate a float to 4 decimal places, strip trailing zeros.\nfunc _trunc(f: float) -> String:\n\tif f == int(f):\n\t\treturn str(int(f))\n\tvar s: String = \"%.4f\" % f\n\twhile s.ends_with(\"0\"):\n\t\ts = s.substr(0, s.length() - 1)\n\tif s.ends_with(\".\"):\n\t\ts = s.substr(0, s.length() - 1)\n\treturn s\n\n## Format a list/array as comma-separated values.\nfunc _format_list(val: Variant) -> String:\n\tif val is String:\n\t\treturn str(val)\n\tif val is Array:\n\t\tvar parts: PackedStringArray = PackedStringArray()\n\t\tfor item: Variant in val:\n\t\t\tparts.append(_trunc(float(item)))\n\t\treturn \",\".join(parts)\n\treturn str(val)\n\n## Format a control coefficient value.\n## Can be a number (treated as const), a string, or an array.\nfunc _format_ctrl(val: Variant) -> String:\n\tif val is float or val is int:\n\t\treturn _trunc(float(val))\n\tif val is String:\n\t\treturn str(val)\n\tif val is Array:\n\t\tvar parts: PackedStringArray = PackedStringArray()\n\t\tfor item: Variant in val:\n\t\t\tparts.append(_trunc(float(item)))\n\t\treturn \",\".join(parts)\n\treturn str(val)\n\n# ============================================================\n#  Parameter → wire-code mapping (matches AMY Python API)\n# ============================================================\nvar _KW_MAP: Dictionary = {\n\t\"osc\":              [\"v\", \"I\"],\n\t\"wave\":             [\"w\", \"I\"],\n\t\"note\":             [\"n\", \"F\"],\n\t\"vel\":              [\"l\", \"F\"],\n\t\"amp\":              [\"a\", \"C\"],\n\t\"freq\":             [\"f\", \"C\"],\n\t\"duty\":             [\"d\", \"C\"],\n\t\"feedback\":         [\"b\", \"F\"],\n\t\"time\":             [\"t\", \"I\"],\n\t\"reset\":            [\"S\", \"I\"],\n\t\"phase\":            [\"P\", \"F\"],\n\t\"pan\":              [\"Q\", \"C\"],\n\t\"client\":           [\"g\", \"I\"],\n\t\"volume\":           [\"V\", \"F\"],\n\t\"pitch_bend\":       [\"s\", \"F\"],\n\t\"filter_freq\":      [\"F\", \"C\"],\n\t\"resonance\":        [\"R\", \"F\"],\n\t\"bp0\":              [\"A\", \"L\"],\n\t\"bp1\":              [\"B\", \"L\"],\n\t\"eg0_type\":         [\"T\", \"I\"],\n\t\"eg1_type\":         [\"X\", \"I\"],\n\t\"debug\":            [\"D\", \"I\"],\n\t\"chained_osc\":      [\"c\", \"I\"],\n\t\"mod_source\":       [\"L\", \"I\"],\n\t\"eq\":               [\"x\", \"L\"],\n\t\"filter_type\":      [\"G\", \"I\"],\n\t\"ratio\":            [\"I\", \"F\"],\n\t\"latency_ms\":       [\"N\", \"I\"],\n\t\"algo_source\":      [\"O\", \"L\"],\n\t\"algorithm\":        [\"o\", \"I\"],\n\t\"chorus\":           [\"k\", \"L\"],\n\t\"reverb\":           [\"h\", \"L\"],\n\t\"echo\":             [\"M\", \"L\"],\n\t\"patch\":            [\"K\", \"I\"],\n\t\"voices\":           [\"r\", \"L\"],\n\t\"external_channel\": [\"W\", \"I\"],\n\t\"portamento\":       [\"m\", \"I\"],\n\t\"sequence\":         [\"H\", \"L\"],\n\t\"tempo\":            [\"j\", \"F\"],\n\t\"synth\":            [\"i\", \"I\"],\n\t\"num_voices\":       [\"iv\", \"I\"],\n\t\"preset\":           [\"p\", \"I\"],\n\t\"num_partials\":     [\"p\", \"I\"],\n}\nGDEOF\n\n# ── Copy web export files ────────────────────────────────────────\necho \"Copying web export files...\"\nWEB_SRC=\"${AMY_DIR}/docs\"\ncp \"${WEB_SRC}/amy.js\"    \"${ADDON_DIR}/web/\"\ncp \"${WEB_SRC}/amy.wasm\"  \"${ADDON_DIR}/web/\"\ncp \"${WEB_SRC}/amy.aw.js\" \"${ADDON_DIR}/web/\"\ncp \"${WEB_SRC}/amy.ww.js\" \"${ADDON_DIR}/web/\"\ncp \"${WEB_SRC}/enable-threads.js\" \"${ADDON_DIR}/web/\"\n\n# A copy for project root (service worker needs root scope)\ncp \"${WEB_SRC}/enable-threads.js\" \"${ADDON_DIR}/web/enable-threads-root.js\"\n\n# Godot<->AMY bridge\ncat > \"${ADDON_DIR}/web/godot_amy_bridge.js\" << 'BRIDGEEOF'\n// godot_amy_bridge.js\n// Thin bridge between Godot's JavaScriptBridge and AMY's WASM module.\n// AMY handles its own audio output via AudioWorklet on web —\n// this bridge just provides init/send functions for GDScript to call.\n\n(function() {\n    var _audio_started = false;\n\n    // Start AMY's AudioWorklet (must be called from user gesture context)\n    async function _try_start_audio() {\n        if (_audio_started) return;\n        if (typeof amy_live_start_web !== 'function') return;\n        try {\n            await amy_live_start_web();\n            _audio_started = true;\n            console.log(\"[AMY Bridge] Audio started via user gesture\");\n            // Remove listeners once started\n            document.removeEventListener('click', _try_start_audio);\n            document.removeEventListener('keydown', _try_start_audio);\n            document.removeEventListener('touchstart', _try_start_audio);\n        } catch(e) {\n            console.error(\"[AMY Bridge] Audio start failed:\", e);\n        }\n    }\n\n    // Register for user gesture events (Web Audio API requirement)\n    document.addEventListener('click', _try_start_audio);\n    document.addEventListener('keydown', _try_start_audio);\n    document.addEventListener('touchstart', _try_start_audio);\n\n    // -- Functions called from GDScript via JavaScriptBridge.eval() --\n\n    // Check if AMY WASM module is initialized and ready\n    window.godot_amy_is_ready = function() {\n        return typeof amy_add_message === 'function';\n    };\n\n    // Check if AudioWorklet is running\n    window.godot_amy_audio_started = function() {\n        return _audio_started;\n    };\n\n    // Send a wire message to AMY (e.g. \"v0w0f440l1\")\n    window.godot_amy_send = function(msg) {\n        if (typeof amy_add_message === 'function') {\n            amy_add_message(msg);\n        }\n    };\n})();\nBRIDGEEOF\n\n# Custom HTML shell for web export\ncat > \"${ADDON_DIR}/web/custom_shell.html\" << 'SHELLEOF'\n<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1.0\">\n\t\t<title>$GODOT_PROJECT_NAME</title>\n\t\t<style>\nhtml, body, #canvas {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n}\n\nbody {\n\tcolor: white;\n\tbackground-color: black;\n\toverflow: hidden;\n\ttouch-action: none;\n}\n\n#canvas {\n\tdisplay: block;\n}\n\n#canvas:focus {\n\toutline: none;\n}\n\n#status, #status-splash, #status-progress {\n\tposition: absolute;\n\tleft: 0;\n\tright: 0;\n}\n\n#status, #status-splash {\n\ttop: 0;\n\tbottom: 0;\n}\n\n#status {\n\tbackground-color: $GODOT_SPLASH_COLOR;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tvisibility: hidden;\n}\n\n#status-splash {\n\tmax-height: 100%;\n\tmax-width: 100%;\n\tmargin: auto;\n}\n\n#status-splash.show-image--false {\n\tdisplay: none;\n}\n\n#status-splash.fullsize--true {\n\theight: 100%;\n\twidth: 100%;\n\tobject-fit: contain;\n}\n\n#status-splash.use-filter--false {\n\timage-rendering: pixelated;\n}\n\n#status-progress, #status-notice {\n\tdisplay: none;\n}\n\n#status-progress {\n\tbottom: 10%;\n\twidth: 50%;\n\tmargin: 0 auto;\n}\n\n#status-notice {\n\tbackground-color: #5b3943;\n\tborder-radius: 0.5rem;\n\tborder: 1px solid #9b3943;\n\tcolor: #e0e0e0;\n\tfont-family: 'Noto Sans', 'Droid Sans', Arial, sans-serif;\n\tline-height: 1.3;\n\tmargin: 0 2rem;\n\toverflow: hidden;\n\tpadding: 1rem;\n\ttext-align: center;\n\tz-index: 1;\n}\n\t\t</style>\n\t\t<!-- AMY Synthesizer: COOP/COEP service worker for SharedArrayBuffer -->\n\t\t<script src=\"enable-threads.js\"></script>\n\t\t<!-- AMY Synthesizer: WASM module + AudioWorklet audio engine -->\n\t\t<script src=\"web_audio/amy.js\"></script>\n\t\t<!-- AMY Synthesizer: Godot<->AMY bridge (auto-starts audio on user gesture) -->\n\t\t<script src=\"web_audio/godot_amy_bridge.js\"></script>\n\t\t$GODOT_HEAD_INCLUDE\n\t</head>\n\t<body>\n\t\t<canvas id=\"canvas\">\n\t\t\tYour browser does not support the canvas tag.\n\t\t</canvas>\n\n\t\t<noscript>\n\t\t\tYour browser does not support JavaScript.\n\t\t</noscript>\n\n\t\t<div id=\"status\">\n\t\t\t<img id=\"status-splash\" class=\"$GODOT_SPLASH_CLASSES\" src=\"$GODOT_SPLASH\" alt=\"\">\n\t\t\t<progress id=\"status-progress\"></progress>\n\t\t\t<div id=\"status-notice\"></div>\n\t\t</div>\n\n\t\t<script src=\"$GODOT_URL\"></script>\n\t\t<script>\nconst GODOT_CONFIG = $GODOT_CONFIG;\nconst GODOT_THREADS_ENABLED = $GODOT_THREADS_ENABLED;\nconst engine = new Engine(GODOT_CONFIG);\n\n(function () {\n\tconst statusOverlay = document.getElementById('status');\n\tconst statusProgress = document.getElementById('status-progress');\n\tconst statusNotice = document.getElementById('status-notice');\n\n\tlet initializing = true;\n\tlet statusMode = '';\n\n\tfunction setStatusMode(mode) {\n\t\tif (statusMode === mode || !initializing) {\n\t\t\treturn;\n\t\t}\n\t\tif (mode === 'hidden') {\n\t\t\tstatusOverlay.remove();\n\t\t\tinitializing = false;\n\t\t\treturn;\n\t\t}\n\t\tstatusOverlay.style.visibility = 'visible';\n\t\tstatusProgress.style.display = mode === 'progress' ? 'block' : 'none';\n\t\tstatusNotice.style.display = mode === 'notice' ? 'block' : 'none';\n\t\tstatusMode = mode;\n\t}\n\n\tfunction setStatusNotice(text) {\n\t\twhile (statusNotice.lastChild) {\n\t\t\tstatusNotice.removeChild(statusNotice.lastChild);\n\t\t}\n\t\tconst lines = text.split('\\n');\n\t\tlines.forEach((line) => {\n\t\t\tstatusNotice.appendChild(document.createTextNode(line));\n\t\t\tstatusNotice.appendChild(document.createElement('br'));\n\t\t});\n\t}\n\n\tfunction displayFailureNotice(err) {\n\t\tconsole.error(err);\n\t\tif (err instanceof Error) {\n\t\t\tsetStatusNotice(err.message);\n\t\t} else if (typeof err === 'string') {\n\t\t\tsetStatusNotice(err);\n\t\t} else {\n\t\t\tsetStatusNotice('An unknown error occurred.');\n\t\t}\n\t\tsetStatusMode('notice');\n\t\tinitializing = false;\n\t}\n\n\tconst missing = Engine.getMissingFeatures({\n\t\tthreads: GODOT_THREADS_ENABLED,\n\t});\n\n\tif (missing.length !== 0) {\n\t\tif (GODOT_CONFIG['serviceWorker'] && GODOT_CONFIG['ensureCrossOriginIsolationHeaders'] && 'serviceWorker' in navigator) {\n\t\t\tlet serviceWorkerRegistrationPromise;\n\t\t\ttry {\n\t\t\t\tserviceWorkerRegistrationPromise = navigator.serviceWorker.getRegistration();\n\t\t\t} catch (err) {\n\t\t\t\tserviceWorkerRegistrationPromise = Promise.reject(new Error('Service worker registration failed.'));\n\t\t\t}\n\t\t\tPromise.race([\n\t\t\t\tserviceWorkerRegistrationPromise.then((registration) => {\n\t\t\t\t\tif (registration != null) {\n\t\t\t\t\t\treturn Promise.reject(new Error('Service worker already exists.'));\n\t\t\t\t\t}\n\t\t\t\t\treturn registration;\n\t\t\t\t}).then(() => engine.installServiceWorker()),\n\t\t\t\tnew Promise((resolve) => {\n\t\t\t\t\tsetTimeout(() => resolve(), 2000);\n\t\t\t\t}),\n\t\t\t]).then(() => {\n\t\t\t\twindow.location.reload();\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error('Error while registering service worker:', err);\n\t\t\t});\n\t\t} else {\n\t\t\tconst missingMsg = 'Error\\nThe following features required to run Godot projects on the Web are missing:\\n';\n\t\t\tdisplayFailureNotice(missingMsg + missing.join('\\n'));\n\t\t}\n\t} else {\n\t\tsetStatusMode('progress');\n\t\tengine.startGame({\n\t\t\t'onProgress': function (current, total) {\n\t\t\t\tif (current > 0 && total > 0) {\n\t\t\t\t\tstatusProgress.value = current;\n\t\t\t\t\tstatusProgress.max = total;\n\t\t\t\t} else {\n\t\t\t\t\tstatusProgress.removeAttribute('value');\n\t\t\t\t\tstatusProgress.removeAttribute('max');\n\t\t\t\t}\n\t\t\t},\n\t\t}).then(() => {\n\t\t\tsetStatusMode('hidden');\n\t\t}, displayFailureNotice);\n\t}\n}());\n\t\t</script>\n\t</body>\n</html>\nSHELLEOF\n\n# ── Copy install.gd editor script ───────────────────────────────\necho \"Copying install.gd...\"\ncat > \"${ADDON_DIR}/install.gd\" << 'INSTALLEOF'\n@tool\nextends EditorScript\n## AMY Synthesizer Addon - Web Export Setup\n##\n## Run this script once (via File > Run) to copy web export files\n## to the correct locations in your project.\n##\n## It copies:\n##   - enable-threads.js  → project root (service worker needs root scope)\n##   - web_audio/          → project root (referenced by custom HTML shell)\n##   - Sets up export preset if one doesn't exist\n\nfunc _run() -> void:\n\tvar addon_dir: String = \"res://addons/amy/web/\"\n\tvar dst_web: String = \"res://web_audio/\"\n\tvar dst_root: String = \"res://\"\n\n\tprint(\"=== AMY Web Export Setup ===\")\n\n\t# Copy enable-threads.js to project root\n\t_copy_file(addon_dir + \"enable-threads-root.js\", dst_root + \"enable-threads.js\")\n\n\t# Copy web audio files\n\tvar web_files: Array[String] = [\n\t\t\"amy.js\", \"amy.wasm\", \"amy.aw.js\", \"amy.ww.js\",\n\t\t\"godot_amy_bridge.js\", \"enable-threads.js\"\n\t]\n\n\t# Create web_audio directory\n\tDirAccess.make_dir_absolute(ProjectSettings.globalize_path(dst_web))\n\n\t# Create .gdignore in web_audio\n\tvar gdignore: FileAccess = FileAccess.open(dst_web + \".gdignore\", FileAccess.WRITE)\n\tif gdignore:\n\t\tgdignore.close()\n\t\tprint(\"  Created web_audio/.gdignore\")\n\n\tfor fname in web_files:\n\t\t_copy_file(addon_dir + fname, dst_web + fname)\n\n\t# Copy custom HTML shell to export/\n\tDirAccess.make_dir_absolute(ProjectSettings.globalize_path(\"res://export/\"))\n\t_copy_file(addon_dir + \"custom_shell.html\", \"res://export/custom_shell.html\")\n\n\tprint(\"\")\n\tprint(\"=== Setup Complete ===\")\n\tprint(\"\")\n\tprint(\"Next steps:\")\n\tprint(\"  1. In Export dialog, set Custom HTML Shell to: res://export/custom_shell.html\")\n\tprint(\"  2. Set Exclude Filter to: addons/amy/bin/*,addons/amy/src/*,addons/amy/amy_src/*,addons/amy/web/*,addons/amy/SConstruct,addons/amy/install.gd,addons/amy/amy.gdextension\")\n\tprint(\"  3. Export for Web as usual!\")\n\tprint(\"\")\n\nfunc _copy_file(src: String, dst: String) -> void:\n\tvar src_path: String = ProjectSettings.globalize_path(src)\n\tvar dst_path: String = ProjectSettings.globalize_path(dst)\n\n\tvar file_in: FileAccess = FileAccess.open(src, FileAccess.READ)\n\tif file_in == null:\n\t\tpush_warning(\"Could not read: \" + src)\n\t\treturn\n\n\tvar content: PackedByteArray = file_in.get_buffer(file_in.get_length())\n\tfile_in.close()\n\n\tvar file_out: FileAccess = FileAccess.open(dst, FileAccess.WRITE)\n\tif file_out == null:\n\t\tpush_warning(\"Could not write: \" + dst)\n\t\treturn\n\n\tfile_out.store_buffer(content)\n\tfile_out.close()\n\tprint(\"  Copied: \" + src.get_file() + \" -> \" + dst)\nINSTALLEOF\n\n# ── Clean up build artifacts from addon ──────────────────────────\necho \"Cleaning build artifacts...\"\nfind \"${ADDON_DIR}/amy_src\" -name \"*.os\" -delete 2>/dev/null || true\nfind \"${ADDON_DIR}/src\" -name \"*.os\" -delete 2>/dev/null || true\n\n# ── Done ─────────────────────────────────────────────────────────\necho \"\"\necho \"=== Done! ===\"\necho \"\"\necho \"The AMY addon has been installed to: ${ADDON_DIR}\"\necho \"\"\necho \"Next steps:\"\necho \"  1. Open the project in the Godot editor\"\necho \"  2. Use Amy in your scripts:\"\necho \"       var amy := Amy.new()\"\necho \"       add_child(amy)\"\necho \"       await get_tree().process_frame\"\necho \"       amy.send({\\\"osc\\\": 0, \\\"wave\\\": Amy.SINE, \\\"freq\\\": 440, \\\"vel\\\": 1.0})\"\necho \"\"\necho \"  For web export setup, see: https://github.com/shorepine/amy/blob/main/docs/godot.md\"\n"
  },
  {
    "path": "src/AMY-Arduino.h",
    "content": "// AMY-Arduino.h\n// connector for Arduino\n\n#ifndef AMYARDUINOH\n#define AMYARDUINOH\n\n#include \"Arduino.h\"\n\nextern \"C\" {\n  #include \"amy.h\"\n}\n\n\n#endif\n\n"
  },
  {
    "path": "src/algorithms.c",
    "content": "// algorithms.c\n#include \"amy.h\"\n\n// Thank you MFSA for the DX7 op structure , borrowed here \\/ \\/ \\/ \nenum FmOperatorFlags {\n    OUT_BUS_ONE = 1 << 0,\n    OUT_BUS_TWO = 1 << 1,\n    OUT_BUS_ADD = 1 << 2,\n    // there is no 1 << 3\n    IN_BUS_ONE = 1 << 4,\n    IN_BUS_TWO = 1 << 5,\n    FB_IN = 1 << 6,\n    FB_OUT = 1 << 7\n};\n\n// We never see 0x?6 (add to bus two)\n// There are just instances of 0x?2 (write to bus two) and they are both 0x02\n// We never see input BUS_ONE output ADD BUS_ONE\n\n// algo   feedback  input    output\n// 0x01             -            BUS_ONE\n// 0x41   IN        -            BUS_ONE\n// 0xc1   IN OUT    -            BUS_ONE\n// 0x11             BUS_ONE      BUS_ONE  // This is the only case when we can't directly accumulate the (possibly zero'd) output because it's the input\n// 0x05             -        ADD BUS_ONE\n// 0xc5   IN OUT    -        ADD BUS_ONE\n// 0x25             BUS_TWO  ADD BUS_ONE\n\n// 0x02             -            BUS_TWO\n\n// 0x04             -        ADD op\n// 0x14             BUS_ONE  ADD op\n// 0x94      OUT    BUS_ONE  ADD op\n// 0xC4   IN OUT    BUS_ONE  ADD op\n\nstruct FmAlgorithm { uint8_t ops[MAX_ALGO_OPS]; };\nconst struct FmAlgorithm algorithms[33] = {\n    // 6     5     4     3     2      1   \n    { { 0xc1, 0x11, 0x11, 0x14, 0x01, 0x14 } }, // 0 \n    { { 0xc1, 0x11, 0x11, 0x14, 0x01, 0x14 } }, // 1\n    { { 0x01, 0x11, 0x11, 0x14, 0xc1, 0x14 } }, // 2\n    { { 0xc1, 0x11, 0x14, 0x01, 0x11, 0x14 } }, // 3\n    { { 0x41, 0x11, 0x94, 0x01, 0x11, 0x14 } }, // 4\n    { { 0xc1, 0x14, 0x01, 0x14, 0x01, 0x14 } }, // 5\n    { { 0x41, 0x94, 0x01, 0x14, 0x01, 0x14 } }, // 6\n    { { 0xc1, 0x11, 0x05, 0x14, 0x01, 0x14 } }, // 7\n    { { 0x01, 0x11, 0xc5, 0x14, 0x01, 0x14 } }, // 8\n    { { 0x01, 0x11, 0x05, 0x14, 0xc1, 0x14 } }, // 9\n    { { 0x01, 0x05, 0x14, 0xc1, 0x11, 0x14 } }, // 10\n    { { 0xc1, 0x05, 0x14, 0x01, 0x11, 0x14 } }, // 11\n    { { 0x01, 0x05, 0x05, 0x14, 0xc1, 0x14 } }, // 12\n    { { 0xc1, 0x05, 0x05, 0x14, 0x01, 0x14 } }, // 13\n    { { 0xc1, 0x05, 0x11, 0x14, 0x01, 0x14 } }, // 14\n    { { 0x01, 0x05, 0x11, 0x14, 0xc1, 0x14 } }, // 15\n    { { 0xc1, 0x11, 0x02, 0x25, 0x05, 0x14 } }, // 16\n    { { 0x01, 0x11, 0x02, 0x25, 0xc5, 0x14 } }, // 17\n    { { 0x01, 0x11, 0x11, 0xc5, 0x05, 0x14 } }, // 18\n    { { 0xc1, 0x14, 0x14, 0x01, 0x11, 0x14 } }, // 19\n    { { 0x01, 0x05, 0x14, 0xc1, 0x14, 0x14 } }, // 20\n    { { 0x01, 0x14, 0x14, 0xc1, 0x14, 0x14 } }, // 21\n    { { 0xc1, 0x14, 0x14, 0x14, 0x01, 0x14 } }, // 22\n    { { 0xc1, 0x14, 0x14, 0x01, 0x14, 0x04 } }, // 23\n    { { 0xc1, 0x14, 0x14, 0x14, 0x04, 0x04 } }, // 24\n    { { 0xc1, 0x14, 0x14, 0x04, 0x04, 0x04 } }, // 25\n    { { 0xc1, 0x05, 0x14, 0x01, 0x14, 0x04 } }, // 26\n    { { 0x01, 0x05, 0x14, 0xc1, 0x14, 0x04 } }, // 27\n    { { 0x04, 0xc1, 0x11, 0x14, 0x01, 0x14 } }, // 28\n    { { 0xc1, 0x14, 0x01, 0x14, 0x04, 0x04 } }, // 29\n    { { 0x04, 0xc1, 0x11, 0x14, 0x04, 0x04 } }, // 30\n    { { 0xc1, 0x14, 0x04, 0x04, 0x04, 0x04 } }, // 31\n    { { 0xc4, 0x04, 0x04, 0x04, 0x04, 0x04 } }, // 32\n};\n// End of MSFA stuff\n\n// a = 0\nstatic inline void zero(SAMPLE* a) {\n    bzero((void *)a, AMY_BLOCK_SIZE * sizeof(SAMPLE));\n}\n\n\n// b = a \nstatic inline void copy(SAMPLE* a, SAMPLE* b) {\n    bcopy((void *)a, (void *)b, AMY_BLOCK_SIZE * sizeof(SAMPLE));\n}\n\nSAMPLE render_mod(SAMPLE *in, SAMPLE* out, uint16_t osc, SAMPLE feedback_level, uint16_t algo_osc, SAMPLE amp) {\n\n    hold_and_modify(osc);\n    //printf(\"render_mod: osc %d msynth.amp %f\\n\", osc, msynth[osc]->amp);\n\n    // out = buf\n    // in = mod\n    // so render_mod is mod, buf (out)\n    SAMPLE max_value = 0;\n    if(synth[osc]->wave == SINE) max_value = render_fm_sine(out, osc, in, feedback_level, algo_osc, amp);\n    return max_value;\n}\n\nvoid note_on_mod(uint16_t osc, uint16_t algo_osc) {\n    // Perform the vital parts of amy.c:1089 ff since these oscs aren't turned on elsewhere.\n    synth[osc]->note_on_clock = amy_global.total_blocks * AMY_BLOCK_SIZE;\n    synth[osc]->status = SYNTH_IS_ALGO_SOURCE; // to ensure it's rendered\n    if (AMY_IS_SET(synth[osc]->trigger_phase))\n        synth[osc]->phase = F2P(synth[osc]->trigger_phase);\n    if(synth[osc]->wave==SINE) fm_sine_note_on(osc, algo_osc);\n}\n\nvoid algo_note_off(uint16_t osc) {\n    for(uint8_t i=0;i<MAX_ALGO_OPS;i++) {\n        if(AMY_IS_SET(synth[osc]->algo_source[i])) {\n            uint16_t o = synth[osc]->algo_source[i];\n            AMY_UNSET(synth[o]->note_on_clock);\n            synth[o]->note_off_clock = amy_global.total_blocks * AMY_BLOCK_SIZE;\n        }\n    }\n    // osc note off, start release\n    AMY_UNSET(synth[osc]->note_on_clock);\n    synth[osc]->note_off_clock = amy_global.total_blocks * AMY_BLOCK_SIZE;\n}\n\n\nvoid algo_note_on(uint16_t osc, float freq) {\n    msynth[osc]->logfreq = logfreq_of_freq(freq);\n    for(uint8_t i=0;i<MAX_ALGO_OPS;i++) {\n        if(AMY_IS_SET(synth[osc]->algo_source[i])) {\n            note_on_mod(synth[osc]->algo_source[i], osc);\n        }\n    }\n}\n\nSAMPLE *** scratch;\n\nvoid algo_deinit() {\n    for(uint16_t i=0;i<AMY_CORES;i++) {\n        for(uint16_t j=0;j<3;j++) free(scratch[i][j]);\n        free(scratch[i]);\n    }\n    free(scratch);\n}\n\nvoid algo_init() {\n    scratch = malloc_caps(sizeof(SAMPLE**)*AMY_CORES, amy_global.config.ram_caps_fbl);\n    for(uint16_t i=0;i<AMY_CORES;i++) {\n        scratch[i] = malloc_caps(sizeof(SAMPLE*)*3, amy_global.config.ram_caps_fbl);\n        for(uint16_t j=0;j<3;j++) {\n            scratch[i][j] = malloc_caps(sizeof(SAMPLE)*AMY_BLOCK_SIZE, amy_global.config.ram_caps_fbl);\n        }\n    }\n\n}\n\nSAMPLE render_algo(SAMPLE* buf, uint16_t osc, uint8_t core) {\n    struct FmAlgorithm algo = algorithms[synth[osc]->algorithm];\n    SAMPLE max_value = 0;\n\n    // starts at op 6\n    SAMPLE* in_buf;\n    SAMPLE* out_buf = NULL;\n\n    SAMPLE* const BUS_ONE = scratch[core][0];\n    SAMPLE* const BUS_TWO = scratch[core][1];\n    SAMPLE* const SCRATCH = scratch[core][2];\n\n    //for (int i = 0; i < 3; ++i)\n    //    zero(scratch[core][i]);\n    \n    SAMPLE amp = SHIFTR(F2S(msynth[osc]->amp), 2);  // Arbitrarily divide FM voice output by 4 to make it more in line with other oscs.\n    for(uint8_t op=0;op<MAX_ALGO_OPS;op++) {\n        SAMPLE feedback_level = 0;\n        SAMPLE mod_amp = F2S(1.0f);\n        if(algo.ops[op] & FB_IN) {\n            feedback_level = F2S(synth[osc]->feedback);\n        } // main algo voice stores feedback, not the op\n\n        if(algo.ops[op] & IN_BUS_ONE) {\n            in_buf = BUS_ONE;\n        } else if(algo.ops[op] & IN_BUS_TWO) { \n            in_buf = BUS_TWO;\n        } else {\n            // no in_buf\n            in_buf = NULL;\n        }\n        if ( (algo.ops[op] & IN_BUS_ONE)\n             && (algo.ops[op] & OUT_BUS_ONE)\n             /* && !(algo.ops[op] & OUT_BUS_ADD) */ ) {  // IN_BUS_ONE + OUT_BUS_ONE is never ADD\n            // Input is BUS_ONE and output overwrites it, use a temp buffer.\n            out_buf = SCRATCH;\n        } else if (algo.ops[op] & OUT_BUS_ONE) {\n            out_buf = BUS_ONE;\n        } else if (algo.ops[op] & OUT_BUS_TWO) {\n            out_buf = BUS_TWO;\n        } else {\n            out_buf = buf;\n            // We apply the msynth amp to every buf that goes into the final output buffer.\n            mod_amp = amp;\n        }\n        if (!(algo.ops[op] & OUT_BUS_ADD)) {\n            // Output is not being accumulated, so have to clear it first.\n            zero(out_buf);\n        }\n\n        SAMPLE value = 0;\n        if(AMY_IS_SET(synth[osc]->algo_source[op])\n           && synth[synth[osc]->algo_source[op]]->status == SYNTH_IS_ALGO_SOURCE) {\n            value = render_mod(in_buf, out_buf, synth[osc]->algo_source[op], feedback_level, osc, mod_amp);\n        } // If osc is not set, output has already been cleared.\n        if (out_buf == buf && value > max_value)  max_value = value;\n\n        if (out_buf == SCRATCH) {\n            // We had to invoke the spare buffer, meaning we're overwriting BUS_ONE\n            copy(out_buf, BUS_ONE);\n        }\n    }\n    //fprintf(stderr, \"render_algo: time %.3f osc %d last_amp %f amp %f max_val=%f\\n\", amy_global.time, osc, (msynth[osc]->last_amp), (msynth[osc]->amp), S2F(max_value));\n    // TODO, i need to figure out what happens on note offs for algo_sources.. they should still render..\n    return max_value;\n}\n"
  },
  {
    "path": "src/amy-example.c",
    "content": "// amy-example.c\n// a simple C example that plays audio using AMY out your speaker \n\n#ifndef ARDUINO\n\n#include \"amy.h\"\n#include \"examples.h\"\n#include \"miniaudio.h\"\n#include \"libminiaudio-audio.h\"\n\nvoid delay_ms(uint32_t ms) {\n    uint32_t start = amy_sysclock();\n    while(amy_sysclock() - start < ms) usleep(THREAD_USLEEP);\n}\n\n// Example how to use external render hook\nuint8_t render(uint16_t osc, SAMPLE * buf, uint16_t len) {\n    //fprintf(stderr, \"render hook %d\\n\", osc);\n    return 0; // 0 means, ignore this. 1 means, i handled this and don't mix it in with the audio\n}\n\nvoid print_events_for_patch_number(int patch_number) {\n    void *state = NULL;\n    fprintf(stderr, \"start delta_num_free = %d\\n\", delta_num_free());\n    amy_event event = amy_default_event();\n    char s[MAX_MESSAGE_LEN];\n    do {\n        state = yield_patch_events(patch_number, &event, state);\n        sprint_event(&event, s, MAX_MESSAGE_LEN, false);\n        fprintf(stderr, \"%s\\n\", s);\n    } while (state != NULL);\n    fprintf(stderr, \"end delta_num_free = %d\\n\", delta_num_free());\n}\n\nvoid print_events_for_synth(int synth, bool wirecode) {\n    fprintf(stderr, \"synth %d:\\n\", synth);\n    void * state = NULL;\n    amy_event event = amy_default_event();\n    char s[MAX_MESSAGE_LEN];\n    do {\n        state = yield_synth_events(synth, &event, true, state);\n        sprint_event(&event, s, MAX_MESSAGE_LEN, wirecode);\n        fprintf(stderr, \"%s\\n\", s);\n    } while(state != NULL);\n}\n\nvoid print_events_for_synth_2(int synth, bool wirecode) {\n    fprintf(stderr, \"pefs2: synth %d:\\n\", synth);\n    void * state = NULL;\n    char s[MAX_MESSAGE_LEN];\n    do {\n        state = yield_synth_commands(synth, s, MAX_MESSAGE_LEN, true, state);\n        fprintf(stderr, \"%s\\n\", s);\n    } while(state != NULL);\n}\n\nvoid test_patch_set() {\n    // Check that trying to program a non-user patch doesn't crash\n    amy_event e = amy_default_event();\n    e.patch_number = 25;\n    e.osc = 0;\n    e.wave = SINE;\n    amy_add_event(&e);\n\n    // Change the global volume.\n    e = amy_default_event();\n    e.volume = 2.0f;\n    amy_add_event(&e);\n}\n\nvoid test_loop_env_filt() {\n    // After amy/test.py:TestLoopEnvFilt\n    //amy.send(time=0, osc=0, wave=amy.PCM, preset=10, feedback=1)\n    amy_add_message(\"t0v0w7p10b1Z\");\n    //amy.send(time=0, osc=0, filter_type=amy.FILTER_LPF24, filter_freq='200,0,0,0,3', bp1='0,1,500,0,200,0')\n    amy_add_message(\"t0v0G4F200,0,0,0,3B0,1,500,0,200,0Z\");\n    //amy.send(time=0, osc=0, bp0='100,1,1000,0,1000,0')\n    amy_add_message(\"t0v0A100,1,1000,0,1000,0Z\");\n    //amy.send(time=0, osc=1, freq='1')\n    amy_add_message(\"t0v1f1Z\");\n    //amy.send(time=0, osc=0, mod_source=1, freq=',,,,,-0.2')\n    amy_add_message(\"t0v0L1f,,,,,-0.2Z\");\n    //amy.send(time=100, osc=0, note=64, vel=5)\n    amy_add_message(\"t100v0n64l5Z\");\n    //amy.send(time=500, osc=0, vel=0)\n    amy_add_message(\"t500v0l0Z\");\n}\n\nvoid test_algo() {\n    //amy.send(time=0, voices=\"0\",  patch=21+128)\n    amy_add_message(\"t0r0K149Z\");\n    //amy.send(time=100, voices=\"0\", note=58, vel=1)\n    amy_add_message(\"t100r0n58l1Z\");\n    //amy.send(time=500, voices=\"0\", vel=0)\n    amy_add_message(\"t400r0l0Z\");\n}\n\nvoid test_stored_patch() {\n    // Reading back a stored patch\n    int patch_number = 0;\n    print_events_for_patch_number(patch_number);\n    // Reading back a user-defined patch\n    patch_number = 1024;\n    amy_event e = amy_default_event();\n    e.patch_number = patch_number;\n    e.osc = 0;\n    e.wave = PULSE;\n    e.mod_source = 2;\n    e.amp_coefs[COEF_VEL] = 1.0f;\n    e.amp_coefs[COEF_EG0] = 1.0f;\n    e.amp_coefs[COEF_EG1] = 0;\n    e.freq_coefs[COEF_CONST] = 130.81f;\n    e.freq_coefs[COEF_NOTE] = 1.f;\n    e.portamento_ms = 0;\n    e.eg0_times[0] = 30;   e.eg0_values[0] = 1.0f;\n    e.eg0_times[1] = 1355; e.eg0_values[1] = 0.354f;\n    e.eg0_times[2] = 232;  e.eg0_values[2] = 0.0f;\n    amy_add_event(&e);\n\n    e = amy_default_event();\n    e.patch_number = patch_number;\n    e.osc = 0;\n    e.chained_osc = 1;\n    e.filter_type = FILTER_LPF24;\n    e.filter_freq_coefs[COEF_CONST] = 126.54f;\n    e.filter_freq_coefs[COEF_NOTE] = 0.677f;\n    e.filter_freq_coefs[COEF_EG1] = 5.024f;\n    e.resonance = 0.93f;\n    e.eg1_times[0] = 30;   e.eg1_values[0] = 1.0f;\n    e.eg1_times[1] = 1355; e.eg1_values[1] = 0.354f;\n    e.eg1_times[2] = 232;  e.eg1_values[2] = 0.0f;\n    amy_add_event(&e);\n\n    e = amy_default_event();\n    e.patch_number = patch_number;\n    e.osc = 1;\n    e.wave = SAW_UP;\n    e.mod_source = 2;\n    e.amp_coefs[COEF_VEL] = 1.0f;\n    e.amp_coefs[COEF_EG0] = 1.0f;\n    e.amp_coefs[COEF_EG1] = 0;\n    e.freq_coefs[COEF_CONST] = 130.81f;\n    e.freq_coefs[COEF_NOTE] = 1.f;\n    e.portamento_ms = 0;\n    e.eg0_times[0] = 30;   e.eg0_values[0] = 1.0f;\n    e.eg0_times[1] = 1355; e.eg0_values[1] = 0.354f;\n    e.eg0_times[2] = 232;  e.eg0_values[2] = 0.0f;\n    amy_add_event(&e);\n\n    e = amy_default_event();\n    e.patch_number = patch_number;\n    e.osc = 2;\n    e.wave = TRIANGLE;\n    e.mod_source = 2;\n    e.amp_coefs[COEF_CONST] = 1.f;\n    e.amp_coefs[COEF_VEL] = 0;\n    e.amp_coefs[COEF_EG0] = 1.0f;\n    e.freq_coefs[COEF_CONST] = 4.0f;\n    e.freq_coefs[COEF_NOTE] = 0;\n    e.eg0_times[0] = 0;      e.eg0_values[0] = 1.0f;\n    e.eg0_times[1] = 10000;  e.eg0_values[1] = 0.0f;\n    amy_add_event(&e);\n\n    e = amy_default_event();\n    e.patch_number = patch_number;\n    e.eq_l = 0;\n    e.eq_m = 0;\n    e.eq_h = 0;\n    e.chorus_level = 0;\n    e.chorus_lfo_freq = 0.5f;\n    e.chorus_depth = 0.5f;\n    amy_add_event(&e);\n\n    print_events_for_patch_number(patch_number);\n}\n\nint main(int argc, char ** argv) {\n    int8_t playback_device_id = -1;\n    int8_t capture_device_id = -1;\n    int opt;\n    while((opt = getopt(argc, argv, \":d:o:lh\")) != -1)\n    {\n        switch(opt)\n        {\n            case 'd':\n                playback_device_id = atoi(optarg);\n                break;\n            case 'c':\n                capture_device_id = atoi(optarg);\n                break;\n            case 'l':\n                amy_print_devices();\n                return 0;\n                break;\n            case 'h':\n                printf(\"usage: amy-example\\n\");\n                printf(\"\\t[-d playback sound device id, use -l to list, default, autodetect]\\n\");\n                printf(\"\\t[-c capture sound device id, use -l to list, default, autodetect]\\n\");\n                printf(\"\\t[-l list all sound devices and exit]\\n\");\n                printf(\"\\t[-o filename.wav - write to filename.wav instead of playing live]\\n\");\n                printf(\"\\t[-h show this help and exit]\\n\");\n                return 0;\n                break;\n            case ':':\n                printf(\"option needs a value\\n\");\n                break;\n            case '?':\n                printf(\"unknown option: %c\\n\", optopt);\n                break;\n        }\n    }\n    amy_config_t amy_config = amy_default_config();\n    amy_config.amy_external_render_hook = render;\n    amy_config.audio = AMY_AUDIO_IS_MINIAUDIO;\n    amy_config.playback_device_id = playback_device_id;\n    fprintf(stderr, \"playback_device_id=%d\\n\", playback_device_id);\n    amy_config.capture_device_id = capture_device_id;\n    //amy_config.features.default_synths = 1;\n    amy_config.features.default_synths = 0;\n\n    for (int tries = 0; tries < 2; ++tries) {\n    amy_start(amy_config);\n\n    //example_synth_chord(0, /* patch */ 1);\n\n    //example_fm(0);\n    //example_voice_chord(0,0);\n    //example_sustain_pedal(0, /* patch */ 256);\n    //example_sequencer_drums(0);\n    //example_patch_from_events();\n\n    //test_loop_env_filt();\n    test_algo();\n\n    // Now just spin for a while\n    uint32_t start = amy_sysclock();\n    while(amy_sysclock() - start < 5000) {\n        usleep(THREAD_USLEEP);\n    }\n\n    print_events_for_synth(/* synth */ 0, /* wirecode */ true);\n    print_events_for_synth_2(/* synth */ 0, /* wirecode */ true);\n\n    //show_debug(99);\n    \n    amy_stop();\n\n    // Make sure libminiaudio has time to clean up.\n    sleep(2);\n\n    }\n\n    return 0;\n}\n\n#endif\n"
  },
  {
    "path": "src/amy-message.c",
    "content": "// amy-message.c\n// hacked from amy-example.c, this code shows using miniaudio and allows entry it AMY ASCII commands.\n#ifndef ARDUINO\n\n#include \"amy.h\"\n#include \"libminiaudio-audio.h\"\n\nvoid delay_ms(uint32_t ms) {\n    uint32_t start = amy_sysclock();\n    while(amy_sysclock() - start < ms) usleep(THREAD_USLEEP);\n}\nint main(int argc, char ** argv) {\n    int8_t playback_device_id = -1;\n    int8_t capture_device_id = -1;\n    int opt;\n    while((opt = getopt(argc, argv, \":d:lh\")) != -1) \n    { \n        switch(opt) \n        { \n            case 'd': \n                playback_device_id = atoi(optarg);\n                break;\n            case 'c': \n                capture_device_id = atoi(optarg);\n                break;\n            case 'l':\n                amy_print_devices();\n                return 0;\n                break;\n            case 'h':\n                printf(\"usage: amy-message\\n\");\n                printf(\"\\t[-d sound device id, use -l to list, default, autodetect]\\n\");\n                printf(\"\\t[-l list all sound devices and exit]\\n\");\n                printf(\"\\t[-h show this help and exit]\\n\");\n                return 0;\n                break;\n            case ':': \n                printf(\"option needs a value\\n\"); \n                break; \n            case '?': \n                printf(\"unknown option: %c\\n\", optopt);\n                break; \n        } \n    }\n\n\n    amy_config_t amy_config = amy_default_config();\n    amy_config.audio = AMY_AUDIO_IS_MINIAUDIO;\n    amy_config.features.audio_in = 1;  // Run with audio in.\n    amy_config.features.default_synths = 0;\n    amy_config.playback_device_id = playback_device_id;\n    amy_config.capture_device_id = capture_device_id;\n    amy_start(amy_config);\n\n    while (1) {\n        char input[1024];\n        fprintf(stdout, \"#;\\n\");\n        if (fgets(input, sizeof(input)-1, stdin) == NULL) break;\n        if (input[0] == '?') {\n            switch (input[1]) {\n                case 'c':\n                    fprintf(stdout, \"%\" PRIu32 \"\\n\", amy_sysclock());\n                    break;\n                case 's':\n                    fprintf(stdout, \"%\" PRIu32 \"\\n\", amy_global.total_blocks);\n                    break;\n                default:\n                    fprintf(stdout, \"?\\n\");\n                    break;\n            }\n        } else {\n            amy_add_message(input);\n        }\n    }\n    \n    return 0;\n}\n#endif\n"
  },
  {
    "path": "src/amy-piano.c",
    "content": "// amy-example.c\n// a simple C example that plays audio using AMY out your speaker \n#ifndef ARDUINO \n\n#include \"amy.h\"\n#include \"examples.h\"\n#include \"libminiaudio-audio.h\"\n\nvoid delay_ms(uint32_t ms) {\n    uint32_t start = amy_sysclock();\n    while(amy_sysclock() - start < ms) usleep(THREAD_USLEEP);\n}\n\nint main(int argc, char ** argv) {\n    amy_config_t amy_config = amy_default_config();\n    amy_config.audio = AMY_AUDIO_IS_MINIAUDIO;\n    //amy_config.playback_device_id = -1;\n    //amy_config.capture_device_id = -1;\n    amy_config.features.default_synths = 0;\n    amy_start(amy_config);\n\n\tamy_add_message(\"S16384Z\");\n\tamy_add_message(\"t0V5Z\");\n\tamy_add_message(\"K1024uv0w10Zv21w9ZZ\");\n\tamy_add_message(\"K1024r0,1,2Z\");\n\tamy_add_message(\"v0w11a,,,0r0,1,2p20Z\");\n\tamy_add_message(\"v1w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v2w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v3w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v4w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v5w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v6w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v7w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v8w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v9w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v10w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v11w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v12w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v13w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v14w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v15w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v16w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v17w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v18w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v19w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v20w9A0,0,4,0,4,0,4,0,4,0,8,0,8,0,16,0,16,0,32,0,32,0,64,0,64,0,128,0,128,0,256,0,256,0,512,0,512,0,1024,0,1024,0,200,0T3r0,1,2Z\");\n\tamy_add_message(\"v0w11r0,1,2p20Z\");\n\tamy_add_message(\"v1f262.07932089369143A,,,0.199,,0.354,,0.630,,0.890,,0.707,,0.707,,0.707,,0.707,,0.707,,0.630,,0.446,,0.354,,0.250,,0.157,,0.070,,0.027,,0.012,,0.007,,0.015,,0.012,200,0r0,1,2Z\");\n\tamy_add_message(\"v2f524.4614951503778A,,,0.031,,0.039,,0.049,,0.099,,0.177,,0.177,,0.281,,0.281,,0.281,,0.281,,0.250,,0.199,,0.111,,0.070,,0.055,,0.055,,0.044,,0.044,,0.017,,0.005,200,0r0,1,2Z\");\n\tamy_add_message(\"v3f787.6220624166158A,,,0.034,,0.019,,0.015,,0.021,,0.031,,0.055,,0.070,,0.078,,0.062,,0.062,,0.049,,0.039,,0.024,,0.019,,0.013,,0.007,,0.007,,0.001,,0.002,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v4f1051.3493189372969A,,,0.027,,0.031,,0.039,,0.062,,0.078,,0.078,,0.070,,0.070,,0.070,,0.062,,0.049,,0.039,,0.024,,0.024,,0.024,,0.012,,0.003,,0.006,,0.008,,0.001,200,0r0,1,2Z\");\n\tamy_add_message(\"v5f1315.467338798746A,,,0.039,,0.070,,0.088,,0.099,,0.111,,0.125,,0.111,,0.111,,0.099,,0.088,,0.078,,0.062,,0.034,,0.013,,0.003,,0.003,,0.007,,0.003,,0.002,,0.001,200,0r0,1,2Z\");\n\tamy_add_message(\"v6f1581.6262956462915A,,,0.006,,0.008,,0.010,,0.019,,0.013,,0.019,,0.021,,0.021,,0.021,,0.021,,0.017,,0.013,,0.007,,0.003,,0.001,,0.000,,0.001,,0.002,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v7f1848.5688300775876A,,,0.003,,0.012,,0.012,,0.012,,0.017,,0.019,,0.019,,0.021,,0.021,,0.021,,0.019,,0.017,,0.009,,0.003,,0.003,,0.001,,0.003,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v8f2118.547431130394A,,,0.001,,0.001,,0.002,,0.001,,0.001,,0.001,,0.002,,0.002,,0.002,,0.002,,0.002,,0.002,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v9f2387.6236163079025A,,,0.001,,0.003,,0.003,,0.002,,0.002,,0.002,,0.001,,0.001,,0.000,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v10f2669.2025036818936A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v11f2937.8120394192533A,,,0.000,,0.000,,0.000,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v12f3218.545272631402A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v13f3501.7483969650048A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v14f3787.9276154035115A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v15f4073.89490182507A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v16f4361.251218595678A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v17f4660.7929645917975A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v18f4943.645962597751A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v19f5249.725889585327A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v20f5549.0549732938325A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0,1,2Z\");\n\tamy_add_message(\"v0w11t50r0p20Z\");\n\tamy_add_message(\"v1f294.34406205294465t50A,,,0.093,,0.099,,0.132,,0.177,,0.177,,0.167,,0.118,,0.167,,0.132,,0.132,,0.083,,0.070,,0.046,,0.031,,0.015,,0.003,,0.003,,0.003,,0.002,,0.003,200,0r0Z\");\n\tamy_add_message(\"v2f588.5181288580752t50A,,,0.006,,0.016,,0.009,,0.018,,0.006,,0.004,,0.015,,0.013,,0.014,,0.011,,0.012,,0.012,,0.012,,0.013,,0.014,,0.012,,0.006,,0.005,,0.002,,0.000,200,0r0Z\");\n\tamy_add_message(\"v3f884.842198784884t50A,,,0.004,,0.002,,0.003,,0.004,,0.006,,0.008,,0.008,,0.008,,0.008,,0.006,,0.005,,0.004,,0.002,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v4f1181.1226315895071t50A,,,0.002,,0.003,,0.004,,0.005,,0.005,,0.004,,0.005,,0.004,,0.004,,0.003,,0.002,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v5f1477.4153057160197t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v6f1787.6637872384977t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v7f2093.6090931138556t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v8f2404.92532126672t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v9f2756.9544448689694t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v10f3015.1757467760062t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v11f3333.972248358063t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v12f3638.8739959179798t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v13f3955.6334984986797t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v14f4269.031364842567t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v15f4593.972101679235t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v16f4902.413229284128t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v17f5228.542220951779t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v18f5550.65783466558t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v19f5894.3201757031875t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v20f6192.729494493947t50A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"n60l1t50r0Z\");\n\tamy_add_message(\"l0t435r0Z\");\n\tamy_add_message(\"v0w11t450r0p20Z\");\n\tamy_add_message(\"v1f294.68429813771826t450A,,,0.236,,0.265,,0.334,,0.561,,0.500,,0.500,,0.354,,0.446,,0.397,,0.397,,0.250,,0.210,,0.149,,0.093,,0.041,,0.017,,0.010,,0.008,,0.001,,0.007,200,0r0Z\");\n\tamy_add_message(\"v2f588.3481826997248t450A,,,0.039,,0.074,,0.093,,0.111,,0.055,,0.062,,0.125,,0.125,,0.125,,0.118,,0.099,,0.074,,0.046,,0.039,,0.039,,0.034,,0.029,,0.027,,0.009,,0.006,200,0r0Z\");\n\tamy_add_message(\"v3f884.5866832364989t450A,,,0.041,,0.046,,0.044,,0.055,,0.074,,0.099,,0.099,,0.105,,0.088,,0.083,,0.070,,0.059,,0.037,,0.027,,0.014,,0.012,,0.009,,0.001,,0.003,,0.002,200,0r0Z\");\n\tamy_add_message(\"v4f1181.1226315895071t450A,,,0.037,,0.049,,0.055,,0.074,,0.070,,0.070,,0.070,,0.070,,0.066,,0.059,,0.041,,0.031,,0.020,,0.017,,0.018,,0.012,,0.003,,0.002,,0.005,,0.001,200,0r0Z\");\n\tamy_add_message(\"v5f1478.6959432469293t450A,,,0.024,,0.041,,0.044,,0.055,,0.052,,0.059,,0.052,,0.049,,0.044,,0.039,,0.031,,0.023,,0.010,,0.005,,0.003,,0.003,,0.003,,0.001,,0.001,,0.000,200,0r0Z\");\n\tamy_add_message(\"v6f1778.908240479117t450A,,,0.009,,0.011,,0.014,,0.018,,0.017,,0.020,,0.021,,0.021,,0.019,,0.018,,0.012,,0.008,,0.003,,0.000,,0.001,,0.000,,0.001,,0.001,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v7f2080.34878834591t450A,,,0.003,,0.006,,0.008,,0.010,,0.010,,0.012,,0.012,,0.013,,0.013,,0.012,,0.010,,0.007,,0.004,,0.002,,0.001,,0.001,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v8f2384.8669179827475t450A,,,0.001,,0.003,,0.003,,0.002,,0.002,,0.002,,0.002,,0.002,,0.002,,0.001,,0.001,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v9f2707.244952192445t450A,,,0.000,,0.001,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v10f3003.008924119927t450A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v11f3319.5601545674176t450A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v12f3635.7225173258425t450A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v13f3964.7835189690277t450A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v14f4285.0897718795295t450A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v15f4617.91652761982t450A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v16f4943.645962597751t450A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v17f5261.869355194984t450A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v18f5610.290319412823t450A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v19f5962.808877105187t450A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v20f6300.976499332925t450A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"n60l1t450r0Z\");\n\tamy_add_message(\"l0t835r0Z\");\n\tamy_add_message(\"v0w11t850r0p20Z\");\n\tamy_add_message(\"v1f294.8545636329288t850A,,,0.943,,1.121,,1.495,,2.370,,2.370,,2.238,,1.584,,2.112,,1.678,,1.777,,1.058,,0.999,,0.667,,0.446,,0.177,,0.052,,0.049,,0.037,,0.012,,0.027,200,0r0Z\");\n\tamy_add_message(\"v2f588.5181288580752t850A,,,0.223,,0.334,,0.530,,0.530,,0.397,,0.421,,0.707,,0.840,,0.749,,0.707,,0.561,,0.446,,0.236,,0.118,,0.132,,0.132,,0.111,,0.118,,0.031,,0.026,200,0r0Z\");\n\tamy_add_message(\"v3f884.842198784884t850A,,,0.265,,0.281,,0.281,,0.375,,0.375,,0.561,,0.500,,0.500,,0.472,,0.397,,0.315,,0.250,,0.167,,0.105,,0.044,,0.032,,0.044,,0.010,,0.013,,0.010,200,0r0Z\");\n\tamy_add_message(\"v4f1181.463802446632t850A,,,0.265,,0.334,,0.354,,0.500,,0.500,,0.500,,0.500,,0.530,,0.500,,0.397,,0.265,,0.187,,0.125,,0.066,,0.088,,0.070,,0.013,,0.017,,0.026,,0.010,200,0r0Z\");\n\tamy_add_message(\"v5f1479.5503182463226t850A,,,0.199,,0.334,,0.375,,0.472,,0.421,,0.472,,0.421,,0.397,,0.421,,0.354,,0.281,,0.223,,0.111,,0.046,,0.041,,0.044,,0.023,,0.008,,0.014,,0.003,200,0r0Z\");\n\tamy_add_message(\"v6f1778.908240479117t850A,,,0.111,,0.132,,0.167,,0.210,,0.187,,0.236,,0.265,,0.187,,0.167,,0.140,,0.099,,0.066,,0.021,,0.006,,0.011,,0.014,,0.005,,0.012,,0.001,,0.000,200,0r0Z\");\n\tamy_add_message(\"v7f2081.550792045791t850A,,,0.059,,0.118,,0.140,,0.132,,0.132,,0.140,,0.149,,0.149,,0.167,,0.140,,0.099,,0.062,,0.032,,0.039,,0.037,,0.014,,0.004,,0.006,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v8f2384.8669179827475t850A,,,0.049,,0.132,,0.149,,0.099,,0.066,,0.078,,0.093,,0.083,,0.074,,0.074,,0.070,,0.059,,0.027,,0.015,,0.012,,0.003,,0.006,,0.001,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v9f2690.875101205299t850A,,,0.024,,0.132,,0.105,,0.083,,0.093,,0.078,,0.066,,0.026,,0.041,,0.031,,0.021,,0.023,,0.007,,0.016,,0.005,,0.010,,0.001,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v10f3003.008924119927t850A,,,0.044,,0.046,,0.055,,0.052,,0.052,,0.070,,0.059,,0.059,,0.046,,0.046,,0.037,,0.026,,0.006,,0.006,,0.011,,0.001,,0.001,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v11f3315.7274625736522t850A,,,0.031,,0.044,,0.026,,0.029,,0.024,,0.021,,0.016,,0.012,,0.009,,0.012,,0.009,,0.005,,0.012,,0.006,,0.001,,0.001,,0.001,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v12f3631.524791140783t850A,,,0.012,,0.017,,0.031,,0.041,,0.052,,0.049,,0.046,,0.041,,0.031,,0.018,,0.011,,0.012,,0.007,,0.004,,0.002,,0.001,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v13f3948.7848436027166t850A,,,0.029,,0.034,,0.031,,0.034,,0.018,,0.027,,0.024,,0.021,,0.018,,0.016,,0.007,,0.001,,0.004,,0.002,,0.001,,0.001,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v14f4280.142300378328t850A,,,0.032,,0.059,,0.062,,0.039,,0.039,,0.039,,0.031,,0.027,,0.010,,0.014,,0.012,,0.005,,0.005,,0.005,,0.000,,0.002,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v15f4609.921217475937t850A,,,0.027,,0.029,,0.027,,0.032,,0.029,,0.031,,0.027,,0.024,,0.016,,0.011,,0.006,,0.006,,0.005,,0.002,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v16f4946.502349359061t850A,,,0.026,,0.024,,0.019,,0.016,,0.016,,0.014,,0.016,,0.012,,0.005,,0.006,,0.008,,0.005,,0.002,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v17f5281.662425954995t850A,,,0.007,,0.006,,0.008,,0.008,,0.010,,0.006,,0.007,,0.005,,0.003,,0.002,,0.001,,0.002,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v18f5631.394011994379t850A,,,0.007,,0.012,,0.010,,0.008,,0.008,,0.009,,0.008,,0.006,,0.004,,0.003,,0.002,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v19f5981.782393936098t850A,,,0.006,,0.008,,0.009,,0.010,,0.012,,0.011,,0.010,,0.009,,0.006,,0.004,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"v20f6337.47768486349t850A,,,0.007,,0.008,,0.008,,0.007,,0.006,,0.005,,0.004,,0.002,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r0Z\");\n\tamy_add_message(\"n60l1t850r0Z\");\n\tamy_add_message(\"l0t1485r0Z\");\n\tamy_add_message(\"v0w11t1500r1p20Z\");\n\tamy_add_message(\"v1f74.04864238799458t1500A,,,0.010,,0.022,,0.044,,0.064,,0.092,,0.073,,0.076,,0.017,,0.068,,0.061,,0.044,,0.042,,0.035,,0.026,,0.015,,0.008,,0.004,,0.003,,0.002,,0.002,200,0r1Z\");\n\tamy_add_message(\"v2f146.48082858990549t1500A,,,0.026,,0.047,,0.055,,0.089,,0.129,,0.130,,0.135,,0.113,,0.127,,0.126,,0.107,,0.095,,0.084,,0.062,,0.029,,0.023,,0.028,,0.016,,0.002,,0.003,200,0r1Z\");\n\tamy_add_message(\"v3f219.77772763935312t1500A,,,0.043,,0.077,,0.119,,0.157,,0.195,,0.206,,0.208,,0.218,,0.173,,0.131,,0.092,,0.070,,0.049,,0.033,,0.019,,0.008,,0.004,,0.003,,0.011,,0.010,200,0r1Z\");\n\tamy_add_message(\"v4f293.8259581897736t1500A,,,0.025,,0.064,,0.099,,0.122,,0.113,,0.082,,0.070,,0.109,,0.084,,0.078,,0.100,,0.093,,0.078,,0.070,,0.056,,0.042,,0.028,,0.019,,0.014,,0.009,200,0r1Z\");\n\tamy_add_message(\"v5f367.2477173747501t1500A,,,0.028,,0.047,,0.069,,0.084,,0.089,,0.079,,0.081,,0.096,,0.113,,0.120,,0.127,,0.119,,0.106,,0.089,,0.070,,0.049,,0.021,,0.013,,0.015,,0.011,200,0r1Z\");\n\tamy_add_message(\"v6f441.017791210556t1500A,,,0.023,,0.040,,0.045,,0.023,,0.059,,0.085,,0.132,,0.123,,0.104,,0.093,,0.083,,0.074,,0.061,,0.051,,0.028,,0.013,,0.024,,0.020,,0.016,,0.011,200,0r1Z\");\n\tamy_add_message(\"v7f515.4515605776315t1500A,,,0.014,,0.031,,0.047,,0.063,,0.109,,0.129,,0.137,,0.137,,0.136,,0.116,,0.109,,0.109,,0.091,,0.069,,0.030,,0.037,,0.049,,0.030,,0.007,,0.009,200,0r1Z\");\n\tamy_add_message(\"v8f589.3856181537751t1500A,,,0.009,,0.012,,0.013,,0.016,,0.028,,0.032,,0.026,,0.030,,0.023,,0.022,,0.016,,0.011,,0.008,,0.004,,0.008,,0.005,,0.001,,0.001,,0.001,,0.001,200,0r1Z\");\n\tamy_add_message(\"v9f664.2241559003637t1500A,,,0.014,,0.030,,0.046,,0.054,,0.048,,0.045,,0.046,,0.038,,0.026,,0.024,,0.024,,0.020,,0.015,,0.009,,0.001,,0.003,,0.007,,0.008,,0.003,,0.003,200,0r1Z\");\n\tamy_add_message(\"v10f738.8996902376488t1500A,,,0.021,,0.043,,0.056,,0.051,,0.014,,0.043,,0.045,,0.045,,0.040,,0.040,,0.040,,0.038,,0.030,,0.025,,0.016,,0.010,,0.006,,0.003,,0.002,,0.002,200,0r1Z\");\n\tamy_add_message(\"v11f813.5157009859971t1500A,,,0.018,,0.032,,0.040,,0.049,,0.064,,0.066,,0.063,,0.053,,0.039,,0.029,,0.026,,0.024,,0.012,,0.012,,0.017,,0.013,,0.004,,0.009,,0.002,,0.001,200,0r1Z\");\n\tamy_add_message(\"v12f888.6838007336429t1500A,,,0.016,,0.032,,0.039,,0.036,,0.024,,0.022,,0.017,,0.013,,0.013,,0.007,,0.003,,0.004,,0.001,,0.003,,0.004,,0.002,,0.000,,0.000,,0.000,,0.000,200,0r1Z\");\n\tamy_add_message(\"v13f963.562684336728t1500A,,,0.012,,0.023,,0.033,,0.044,,0.064,,0.066,,0.063,,0.067,,0.065,,0.069,,0.044,,0.057,,0.038,,0.024,,0.012,,0.026,,0.017,,0.008,,0.008,,0.002,200,0r1Z\");\n\tamy_add_message(\"v14f1040.4748517038904t1500A,,,0.012,,0.025,,0.044,,0.058,,0.073,,0.077,,0.081,,0.077,,0.073,,0.076,,0.064,,0.052,,0.032,,0.018,,0.020,,0.016,,0.019,,0.014,,0.007,,0.003,200,0r1Z\");\n\tamy_add_message(\"v15f1117.5069177375879t1500A,,,0.004,,0.004,,0.012,,0.020,,0.024,,0.025,,0.022,,0.022,,0.023,,0.021,,0.018,,0.016,,0.012,,0.008,,0.003,,0.002,,0.006,,0.006,,0.003,,0.002,200,0r1Z\");\n\tamy_add_message(\"v16f1193.156893756t1500A,,,0.005,,0.010,,0.013,,0.015,,0.018,,0.018,,0.016,,0.017,,0.017,,0.016,,0.013,,0.010,,0.002,,0.003,,0.007,,0.009,,0.003,,0.006,,0.002,,0.000,200,0r1Z\");\n\tamy_add_message(\"v17f1272.4204192002574t1500A,,,0.002,,0.003,,0.005,,0.006,,0.004,,0.003,,0.004,,0.004,,0.003,,0.004,,0.003,,0.002,,0.000,,0.000,,0.001,,0.001,,0.001,,0.000,,0.000,,0.000,200,0r1Z\");\n\tamy_add_message(\"v18f1349.640740512321t1500A,,,0.001,,0.001,,0.001,,0.000,,0.002,,0.002,,0.000,,0.002,,0.001,,0.001,,0.000,,0.000,,0.000,,0.000,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r1Z\");\n\tamy_add_message(\"v19f1430.5967761508439t1500A,,,0.001,,0.002,,0.003,,0.003,,0.002,,0.002,,0.002,,0.003,,0.002,,0.002,,0.003,,0.003,,0.002,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r1Z\");\n\tamy_add_message(\"v20f1506.3692225341174t1500A,,,0.004,,0.009,,0.012,,0.013,,0.014,,0.011,,0.011,,0.010,,0.009,,0.007,,0.003,,0.003,,0.005,,0.004,,0.005,,0.005,,0.002,,0.002,,0.001,,0.000,200,0r1Z\");\n\tamy_add_message(\"n60l1t1500r1Z\");\n\tamy_add_message(\"v0w11t2100r2p11Z\");\n\tamy_add_message(\"v1f1178.0565238532624t2100A,,,0.078,,1.777,,1.584,,2.370,,1.994,,1.883,,1.188,,0.999,,0.943,,0.707,,0.236,,0.265,,0.334,,0.281,,0.167,,0.111,,0.062,,0.034,,0.004,,0.004,200,0r2Z\");\n\tamy_add_message(\"v2f2371.131095283615t2100A,,,0.008,,0.223,,0.236,,0.236,,0.281,,0.265,,0.177,,0.118,,0.125,,0.049,,0.031,,0.034,,0.034,,0.026,,0.016,,0.008,,0.000,,0.000,,0.000,,0.000,200,0r2Z\");\n\tamy_add_message(\"v3f3574.2951284802925t2100A,,,0.001,,0.062,,0.021,,0.010,,0.032,,0.021,,0.024,,0.014,,0.006,,0.005,,0.003,,0.004,,0.002,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r2Z\");\n\tamy_add_message(\"v4f4843.305799442923t2100A,,,0.000,,0.016,,0.008,,0.003,,0.006,,0.008,,0.011,,0.006,,0.004,,0.001,,0.003,,0.002,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r2Z\");\n\tamy_add_message(\"v5f6149.953187253529t2100A,,,0.000,,0.005,,0.005,,0.003,,0.003,,0.002,,0.003,,0.002,,0.000,,0.001,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r2Z\");\n\tamy_add_message(\"v6f7525.698169256955t2100A,,,0.000,,0.001,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r2Z\");\n\tamy_add_message(\"v7f8967.725358717675t2100A,,,0.000,,0.002,,0.001,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r2Z\");\n\tamy_add_message(\"v8f10457.084441903562t2100A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r2Z\");\n\tamy_add_message(\"v9f11987.775744026429t2100A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r2Z\");\n\tamy_add_message(\"v10f13612.172452050445t2100A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r2Z\");\n\tamy_add_message(\"v11f15363.220457587324t2100A,,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,,0.000,200,0r2Z\");\n\tamy_add_message(\"n60l1t2100r2Z\");\n\tamy_add_message(\"l0t3000r1Z\");\n\tamy_add_message(\"l0t3000r2Z\");\n\n\n    show_debug(99);\n\n    // Now just spin for 15s\n    uint32_t start = amy_sysclock();\n    while(amy_sysclock() - start < 5000) {\n        usleep(THREAD_USLEEP);\n    }\n\n    show_debug(99);\n\n    return 0;\n}\n\n#endif\n"
  },
  {
    "path": "src/amy.c",
    "content": "// DAn Ellis and Brian Whitman\n// brian@variogr.am / dan.ellis@gmail.com\n\n#include \"amy.h\"\n\n#ifdef AMY_DEBUG\n\nconst char* profile_tag_name(enum itags tag) {\n    switch (tag) {\n        case RENDER_OSC_WAVE: return \"RENDER_OSC_WAVE\";\n        case COMPUTE_BREAKPOINT_SCALE: return \"COMPUTE_BREAKPOINT_SCALE\";\n        case HOLD_AND_MODIFY: return \"HOLD_AND_MODIFY\";\n        case FILTER_PROCESS: return \"FILTER_PROCESS\";\n        case FILTER_PROCESS_STAGE0: return \"FILTER_PROCESS_STAGE0\";\n        case FILTER_PROCESS_STAGE1: return \"FILTER_PROCESS_STAGE1\";\n        case ADD_DELTA_TO_QUEUE: return \"ADD_DELTA_TO_QUEUE\";\n        case AMY_ADD_DELTA: return \"AMY_ADD_DELTA\";\n        case PLAY_DELTA: return \"PLAY_DELTA\";\n        case MIX_WITH_PAN: return \"MIX_WITH_PAN\";\n        case AMY_RENDER: return \"AMY_RENDER\";\n        case AMY_EXECUTE_DELTAS: return \"AMY_EXECUTE_DELTAS\";\n        case AMY_FILL_BUFFER: return \"AMY_FILL_BUFFER\";\n        case RENDER_LUT_FM: return \"RENDER_LUT_FM\";\n        case RENDER_LUT_FB: return \"RENDER_LUT_FB\";\n        case RENDER_LUT: return \"RENDER_LUT\";\n        case RENDER_LUT_CUB: return \"RENDER_LUT_CUB\";\n        case RENDER_LUT_FM_FB: return \"RENDER_LUT_FM_FB\";\n        case RENDER_LPF_LUT: return \"RENDER_LPF_LUT\";\n        case DSPS_BIQUAD_F32_ANSI_SPLIT_FB: return \"DSPS_BIQUAD_F32_ANSI_SPLIT_FB\";\n        case DSPS_BIQUAD_F32_ANSI_SPLIT_FB_TWICE: return \"DSPS_BIQUAD_F32_ANSI_SPLIT_FB_TWICE\";\n        case DSPS_BIQUAD_F32_ANSI_COMMUTED: return \"DSPS_BIQUAD_F32_ANSI_COMMUTED\";\n        case PARAMETRIC_EQ_PROCESS: return \"PARAMETRIC_EQ_PROCESS\";\n        case HPF_BUF: return \"HPF_BUF\";\n        case SCAN_MAX: return \"SCAN_MAX\";\n        case DSPS_BIQUAD_F32_ANSI: return \"DSPS_BIQUAD_F32_ANSI\";\n        case BLOCK_NORM: return \"BLOCK_NORM\";\n        case CALIBRATE: return \"CALIBRATE\";\n        case AMY_ESP_FILL_BUFFER: return \"AMY_ESP_FILL_BUFFER\";\n        case NO_TAG: return \"NO_TAG\";\n   }\n   return \"ERROR\";\n}\nstruct profile profiles[NO_TAG];\nuint64_t profile_start_us = 0;\n\n#ifdef ESP_PLATFORM\n#include \"esp_timer.h\"\nint64_t amy_get_us() { return esp_timer_get_time(); }\n#elif defined PICO_ON_DEVICE\nint64_t amy_get_us() { return to_us_since_boot(get_absolute_time()); }\n#elif defined(_WIN32)\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#include <windows.h>\nint64_t amy_get_us() {\n    LARGE_INTEGER freq, count;\n    QueryPerformanceFrequency(&freq);\n    QueryPerformanceCounter(&count);\n    return (int64_t)(count.QuadPart * 1000000LL / freq.QuadPart);\n}\n#else\n#include <sys/time.h>\nint64_t amy_get_us() { struct timeval tv; gettimeofday(&tv,NULL); return tv.tv_sec*(uint64_t)1000000+tv.tv_usec; }\n#endif\n\nvoid amy_profiles_init() { \n    for(uint8_t i=0;i<NO_TAG;i++) { AMY_PROFILE_INIT(i) } \n} \nvoid amy_profiles_print() { for(uint8_t i=0;i<NO_TAG;i++) { AMY_PROFILE_PRINT(i) } amy_profiles_init(); }\n#else\nvoid amy_profiles_init()  {}\nvoid amy_profiles_print() {}\n#endif\n\n\n// Use the tiny built-in PCM set by default across platforms.\n#include \"pcm_tiny.h\"\n\n#include \"clipping_lookup_table.h\"\n\n// Final output delay lines.\ndelay_line_t *chorus_delay_lines[AMY_MAX_CHANNELS] = {NULL, NULL};\ndelay_line_t *echo_delay_lines[AMY_MAX_CHANNELS] = {NULL, NULL};\nSAMPLE *delay_mod = NULL;\n\n\n// Set up the mutex for accessing the queue during rendering (for multicore)\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/threading.h>\n#include <emscripten/wasm_worker.h>\nemscripten_lock_t amy_queue_lock = EMSCRIPTEN_LOCK_T_STATIC_INITIALIZER;\nvoid amy_grab_lock() {\n    emscripten_lock_busyspin_wait_acquire(&amy_queue_lock, 100);\n}\nvoid amy_release_lock() {\n    emscripten_lock_release(&amy_queue_lock);\n}\nvoid amy_init_lock() {\n}\n\n#elif defined _WIN32\nCRITICAL_SECTION amy_queue_lock;\nvoid amy_grab_lock() {\n    EnterCriticalSection(&amy_queue_lock);\n}\nvoid amy_release_lock() {\n    LeaveCriticalSection(&amy_queue_lock);\n}\nvoid amy_init_lock() {\n    InitializeCriticalSection(&amy_queue_lock);\n}\n#elif defined _POSIX_THREADS\npthread_mutex_t amy_queue_lock;\nvoid amy_grab_lock() {\n    pthread_mutex_lock(&amy_queue_lock);\n}\nvoid amy_release_lock() {\n    pthread_mutex_unlock(&amy_queue_lock);\n}\nvoid amy_init_lock() {\n    pthread_mutex_init(&amy_queue_lock, NULL);\n}\n#elif defined ESP_PLATFORM\n\n#include \"freertos/FreeRTOS.h\"\n#include \"freertos/task.h\"\n#include \"freertos/semphr.h\"\nSemaphoreHandle_t amy_queue_lock;\n\nvoid amy_grab_lock() {\n    xSemaphoreTake(amy_queue_lock, portMAX_DELAY);\n}\nvoid amy_release_lock() {\n    xSemaphoreGive( amy_queue_lock );\n}\nvoid amy_init_lock() {\n    amy_queue_lock = xSemaphoreCreateMutex();\n}\n#else\n\nvoid amy_grab_lock() {\n}\nvoid amy_release_lock() {\n}\nvoid amy_init_lock() {\n}\n\n#endif\n\n\n\n// Global state \nstruct state amy_global;\n// set of deltas for the fifo to be played\nstruct delta * deltas;\n// state per osc as multi-channel synthesizer that the scheduler renders into\nstruct synthinfo ** synth;\n// envelope-modified per-osc state\nstruct mod_synthinfo ** msynth;\n\n// Two mixing blocks, one per core of rendering\nSAMPLE *fbl[AMY_MAX_CORES];\nSAMPLE *per_osc_fb[AMY_MAX_CORES];\nSAMPLE core_max[AMY_MAX_CORES];\n\n// Public pointer to recently-emitted waveform block.\noutput_sample_type * amy_out_block = NULL;\n// Audio input blocks. Filled by the audio implementation before rendering.\n// For live audio input from a codec, AUDIO_IN0 / 1\noutput_sample_type * amy_in_block;\n// For generated audio streams, AUDIO_EXT0 / 1\noutput_sample_type * amy_external_in_block;\n// output_block -- what gets sent to the dac -- -32768...32767 (int16 le)\noutput_sample_type * output_block_0;\noutput_sample_type * output_block_1;\noutput_sample_type * output_block;\n\n\n\n\n#ifndef MALLOC_CAPS_DEFINED\n  #define MALLOC_CAPS_DEFINED\n  void * malloc_caps(uint32_t size, uint32_t flags) {\n    void *result;\n  #ifdef ESP_PLATFORM\n    result = heap_caps_malloc(size, flags);\n  #else\n    // ignore flags\n    result = malloc(size);\n  #endif\n    //if (size > 400000) abort();\n    //fprintf(stderr, \"malloc(%ld) @0x%lx\\n\", size, result);\n    return result;\n  }\n#endif\n\n\nvoid dealloc_echo_delay_lines(void) {\n    for (int c = AMY_NCHANS - 1; c >= 0; --c) {\n        if (echo_delay_lines[c]) free_delay_line(echo_delay_lines[c]);\n        echo_delay_lines[c] = NULL;\n    }\n}\n\nbool alloc_echo_delay_lines(uint32_t max_delay_samples) {\n    bool success = true;\n    for (int c = 0; c < AMY_NCHANS; ++c) {\n        delay_line_t *delay_line = new_delay_line(max_delay_samples, 0, amy_global.config.ram_caps_delay);\n        if (delay_line) {\n            echo_delay_lines[c] = delay_line;\n        } else {\n            success = false;\n            break;\n        }\n    }\n    if (!success) {\n        fprintf(stderr, \"unable to alloc echo of %d samples\\n\", (int)max_delay_samples);\n        dealloc_echo_delay_lines();\n        return false;\n    }\n    return true;\n}\n\nuint32_t enclosing_power_of_2(uint32_t n) {\n    uint32_t result = 1;\n    while (result < n)  result <<= 1;\n    return result;\n}\n\nvoid config_echo(float level, float delay_ms, float max_delay_ms, float feedback, float filter_coef) {\n    if (AMY_IS_UNSET(level)) level = S2F(amy_global.echo.level);\n    if (AMY_IS_UNSET(delay_ms)) delay_ms = (amy_global.echo.delay_samples + 0.5f) / (AMY_SAMPLE_RATE / 1000.f);\n    if (AMY_IS_UNSET(max_delay_ms)) max_delay_ms = (amy_global.echo.max_delay_samples + 0.5f) / (AMY_SAMPLE_RATE / 1000.f);\n    if (AMY_IS_UNSET(feedback)) feedback = S2F(amy_global.echo.feedback);\n    if (AMY_IS_UNSET(filter_coef)) filter_coef = S2F(amy_global.echo.filter_coef);\n\n    uint32_t delay_samples = (uint32_t)(delay_ms / 1000.f * AMY_SAMPLE_RATE);\n    //fprintf(stderr, \"config_echo: delay_ms=%.3f max_delay_ms=%.3f delay_samples=%d echo.max_delay_samples=%d\\n\", delay_ms, max_delay_ms, delay_samples, echo.max_delay_samples);\n\n    if (level > 0) {\n        if (echo_delay_lines[0] == NULL) {\n            // Delay line len must be power of 2.\n            uint32_t max_delay_samples = enclosing_power_of_2((uint32_t)(max_delay_ms / 1000.f * AMY_SAMPLE_RATE));\n            if (!alloc_echo_delay_lines(max_delay_samples)) return;\n            amy_global.echo.max_delay_samples = max_delay_samples;\n            //fprintf(stderr, \"config_echo: max_delay_samples=%d\\n\", max_delay_samples);\n        }\n        // Apply delay.  We have to stay 1 sample less than delay line length for FIR EQ delay.\n        if (delay_samples > amy_global.echo.max_delay_samples - 1) delay_samples = amy_global.echo.max_delay_samples - 1;\n        for (int c = 0; c < AMY_NCHANS; ++c) {\n            echo_delay_lines[c]->fixed_delay = delay_samples;\n        }\n    }\n    amy_global.echo.level = F2S(level);\n    amy_global.echo.delay_samples = delay_samples;\n    // Filter is IIR [1, filter_coef] normalized for filter_coef > 0 (LPF), or FIR [1, filter_coef] normalized for filter_coef < 0 (HPF).\n    if (filter_coef > 0.99)  filter_coef = 0.99;  // Avoid unstable filters.\n    amy_global.echo.filter_coef = F2S(filter_coef);\n    // FIR filter potentially has gain > 1 for high frequencies, so discount the loop feedback to stop things exploding.\n    if (filter_coef < 0)  feedback /= 1.f - filter_coef;\n    amy_global.echo.feedback = F2S(feedback);\n    //fprintf(stderr, \"config_echo: delay_samples=%d level=%.3f feedback=%.3f filter_coef=%.3f fc0=%.3f\\n\", delay_samples, level, feedback, filter_coef, S2F(echo.filter_coef));\n}\n\nvoid dealloc_chorus_delay_lines(void) {\n    for(int c = AMY_NCHANS - 1; c >= 0; --c) {\n        if (chorus_delay_lines[c]) free_delay_line(chorus_delay_lines[c]);\n        chorus_delay_lines[c] = NULL;\n    }\n    free(delay_mod);\n    delay_mod = NULL;\n}\n\nvoid alloc_chorus_delay_lines(void) {\n    delay_mod = (SAMPLE *)malloc_caps(sizeof(SAMPLE) * AMY_BLOCK_SIZE, amy_global.config.ram_caps_delay);\n    bool success = true;\n    for(int c = 0; c < AMY_NCHANS; ++c) {\n        delay_line_t *delay_line = new_delay_line(DELAY_LINE_LEN, DELAY_LINE_LEN / 2, amy_global.config.ram_caps_delay);\n        if (delay_line) {\n            chorus_delay_lines[c] = delay_line;\n        } else {\n            success = false;\n            break;\n        }\n    }\n    if (!success) {\n        fprintf(stderr, \"unable to alloc chorus of %d samples\\n\", (int)DELAY_LINE_LEN);\n        dealloc_chorus_delay_lines();\n    }\n}\n\nvoid config_chorus(float level, uint16_t max_delay, float lfo_freq, float depth) {\n    if (AMY_IS_UNSET(level)) level = S2F(amy_global.chorus.level);\n    if (AMY_IS_UNSET(max_delay)) max_delay = amy_global.chorus.max_delay;\n    if (AMY_IS_UNSET(lfo_freq)) lfo_freq = amy_global.chorus.lfo_freq;\n    if (AMY_IS_UNSET(depth)) depth = amy_global.chorus.depth;\n    //fprintf(stderr, \"config_chorus: osc %d level %.3f max_del %d lfo_freq %.3f depth %.3f\\n\",\n    //        CHORUS_MOD_SOURCE, level, max_delay, lfo_freq, depth);\n    if (level > 0) {\n        ensure_osc_allocd(CHORUS_MOD_SOURCE, NULL);\n        // only allocate delay lines if chorus is more than inaudible.\n        if (chorus_delay_lines[0] == NULL) {\n            alloc_chorus_delay_lines();\n        }\n        // if we're turning on for the first time, start the oscillator.\n        if (synth[CHORUS_MOD_SOURCE]->status == SYNTH_OFF) {  //chorus.level == 0) {\n            // Setup chorus oscillator.\n            synth[CHORUS_MOD_SOURCE]->logfreq_coefs[COEF_CONST] = logfreq_of_freq(lfo_freq);\n            synth[CHORUS_MOD_SOURCE]->logfreq_coefs[COEF_NOTE] = 0;  // Turn off default.\n            synth[CHORUS_MOD_SOURCE]->logfreq_coefs[COEF_BEND] = 0;  // Turn off default.\n            synth[CHORUS_MOD_SOURCE]->amp_coefs[COEF_CONST] = depth;\n            synth[CHORUS_MOD_SOURCE]->amp_coefs[COEF_VEL] = 0;  // Turn off default.\n            synth[CHORUS_MOD_SOURCE]->amp_coefs[COEF_EG0] = 0;  // Turn off default.\n            synth[CHORUS_MOD_SOURCE]->wave = TRIANGLE;\n            osc_note_on(CHORUS_MOD_SOURCE, freq_of_logfreq(synth[CHORUS_MOD_SOURCE]->logfreq_coefs[COEF_CONST]));\n            // Stop us from doing this again.\n            synth[CHORUS_MOD_SOURCE]->status = SYNTH_IS_MOD_SOURCE;\n        }\n        // apply max_delay.\n        for (int chan=0; chan<AMY_NCHANS; ++chan) {\n            //chorus_delay_lines[chan]->max_delay = max_delay;\n            chorus_delay_lines[chan]->fixed_delay = (int)max_delay / 2;\n        }\n    }\n    amy_global.chorus.max_delay = max_delay;\n    amy_global.chorus.level = F2S(level);\n    amy_global.chorus.lfo_freq = lfo_freq;\n    amy_global.chorus.depth = depth;\n}\n\nvoid config_reverb(float level, float liveness, float damping, float xover_hz) {\n    if (AMY_IS_UNSET(level)) level = S2F(amy_global.reverb.level);\n    if (AMY_IS_UNSET(liveness)) liveness = amy_global.reverb.liveness;\n    if (AMY_IS_UNSET(damping)) damping = amy_global.reverb.damping;\n    if (AMY_IS_UNSET(xover_hz)) xover_hz = amy_global.reverb.xover_hz;\n    if (level > 0) {\n        //printf(\"config_reverb: level %f liveness %f xover %f damping %f\\n\",\n        //      level, liveness, xover_hz, damping);\n        if (amy_global.reverb.level == 0) { \n            init_stereo_reverb();  // In case it's the first time\n        }\n        config_stereo_reverb(liveness, xover_hz, damping);\n    }\n    amy_global.reverb.level = F2S(level);\n    amy_global.reverb.liveness = liveness;\n    amy_global.reverb.damping = damping;\n    amy_global.reverb.xover_hz = xover_hz;\n}\n\n\nint8_t check_init(amy_err_t (*fn)(), const char *name) {\n    //fprintf(stderr,\"starting %s: \", name);\n    const amy_err_t ret = (*fn)();\n    if(ret != AMY_OK) {\n        fprintf(stderr,\"[error:%i]\\n\", ret);\n        return -1;\n    }\n    //fprintf(stderr,\"[ok]\\n\");\n    return 0;\n}\n\n#ifdef DEBUG_STACK\n\nstatic uint8_t *stack_baseline = NULL;\n\nuint8_t *get_sp() {\n    uint8_t d[64];\n    return (uint8_t *)&d;\n    //return NULL;\n}\n\nint peek_stack(const char *tag) {\n    if (stack_baseline == NULL) {\n        stack_baseline = get_sp();\n    }\n    int stack_depth = (int)(stack_baseline - get_sp());\n    fprintf(stderr, \"stack: '%s': %d\\n\", tag, stack_depth);\n    return stack_depth;\n}\n\n#else  // !DEBUG_STACK\n\nint peek_stack(const char *tag)  { return 0; }\n\n#endif\n\nint8_t global_init(amy_config_t c) {\n    peek_stack(\"init\");\n    amy_global.config = c;\n    amy_global.i2s_is_in_background = 0;\n    amy_global.delta_queue = NULL;\n    amy_global.delta_qsize = 0;\n    amy_global.volume = 1.0f;\n    amy_global.pitch_bend = 0;\n    amy_global.latency_ms = 0;\n    amy_global.tempo = 108.0; \n    amy_global.eq[0] = F2S(1.0f);\n    amy_global.eq[1] = F2S(1.0f);\n    amy_global.eq[2] = F2S(1.0f);\n    amy_global.hpf_state = 0; \n    amy_global.transfer_flag = AMY_TRANSFER_TYPE_NONE;\n    amy_global.transfer_storage = NULL;\n    amy_global.transfer_length_bytes = 0;\n    amy_global.transfer_stored_bytes = 0;\n    amy_global.transfer_file_handle = 0;\n    amy_global.transfer_filename[0] = '\\0';\n    amy_global.debug_flag = 0;\n    amy_global.sequencer_tick_count = 0;\n    amy_global.next_amy_tick_us = 0;\n    amy_global.us_per_tick = 0;\n    amy_global.sequence_entry_ll_start = NULL;\n    \n    amy_global.reverb.level = F2S(REVERB_DEFAULT_LEVEL);\n    amy_global.reverb.liveness= REVERB_DEFAULT_LIVENESS;\n    amy_global.reverb.damping = REVERB_DEFAULT_DAMPING;\n    amy_global.reverb.xover_hz = REVERB_DEFAULT_XOVER_HZ;\n\n    amy_global.chorus.level = F2S(CHORUS_DEFAULT_LEVEL);\n    amy_global.chorus.max_delay =  CHORUS_DEFAULT_MAX_DELAY;\n    amy_global.chorus.lfo_freq = CHORUS_DEFAULT_LFO_FREQ;\n    amy_global.chorus.depth = CHORUS_DEFAULT_MOD_DEPTH;\n\n    amy_global.echo.level = F2S(ECHO_DEFAULT_LEVEL);\n    amy_global.echo.delay_samples = (uint32_t)(ECHO_DEFAULT_DELAY_MS / 1000.f * AMY_SAMPLE_RATE);\n    amy_global.echo.max_delay_samples = 65536;\n    amy_global.echo.feedback = F2S(ECHO_DEFAULT_FEEDBACK);\n    amy_global.echo.filter_coef = ECHO_DEFAULT_FILTER_COEF;\n\n    amy_init_lock();\n\n    return 0;\n}\n\n// Convert to and from the log-frequency scale.\n// A log-frequency scale is good for summing control inputs.\nfloat logfreq_of_freq(float freq) {\n    // logfreq is defined as log_2(freq / 8.18 Hz)\n    //if (freq==0) return ZERO_HZ_LOG_VAL;\n    // Actually, special-case zero to mean middle C, for convenience.\n    if (freq==0) return 0;  // i.e. == logfreq_of_freq(ZERO_LOGFREQ_IN_HZ).\n    return log2f(freq / ZERO_LOGFREQ_IN_HZ);\n}\n\nfloat freq_of_logfreq(float logfreq) {\n    if (logfreq==ZERO_HZ_LOG_VAL) return 0;\n    return ZERO_LOGFREQ_IN_HZ * exp2f(logfreq);\n}\n\nfloat freq_for_midi_note(float midi_note) {\n    return 440.0f*powf(2.f, (midi_note - 69.0f) / 12.0f);\n}\n\nfloat logfreq_for_midi_note(float midi_note) {\n    // TODO: Precompensate for EPS_FOR_LOG\n    return (midi_note - ZERO_MIDI_NOTE) / 12.0f;\n}\n\nfloat midi_note_for_logfreq(float logfreq) {\n    return 12.0f * logfreq + ZERO_MIDI_NOTE;\n}\n\n\n\nvoid add_delta_to_queue(struct delta *d, struct delta **queue) {\n    AMY_PROFILE_START(ADD_DELTA_TO_QUEUE)\n    amy_grab_lock();\n\n    // hack.  Update the (decorative) global queue size if we're adding to the global queue.\n    if (queue == &amy_global.delta_queue)\n        amy_global.delta_qsize++;\n\n    struct delta *new_d = delta_get(d);\n\n    // insert it into the sorted list for fast playback\n    struct delta **pptr = queue;\n    while(*pptr && d->time >= (*pptr)->time)\n        pptr = &(*pptr)->next;\n    new_d->next = *pptr;\n    *pptr = new_d;\n\n    amy_release_lock();\n    AMY_PROFILE_STOP(ADD_DELTA_TO_QUEUE)\n\n}\n\nfloat map_60dB_to_01f(float lin) {\n    // Map .001 to 0, 1 to 1 logarithmically.\n    if (lin == 0) return -10.0f;\n    float result = 1.0f + 0.10034333188799373f * log2f(lin);  // 0.100343 = 1 / (3 * log2(10))\n    return result;\n}\n\nfloat map_01_to_60dBf(float log) {\n    // Inverse of map_60dB_to_01f - Map (0, 1) to (.001, 1) exponentially\n    if (log <= -10.0f) return 0;\n    float result = exp2f((log - 1.0f) / 0.10034333188799373f);\n    return result;\n}\n\n#define EVENT_TO_DELTA_F(FIELD, FLAG) if(AMY_IS_SET(e->FIELD)) { d.param=FLAG; d.data.f = e->FIELD; add_delta_to_queue(&d, queue); }\n#define EVENT_TO_DELTA_I(FIELD, FLAG) if(AMY_IS_SET(e->FIELD)) { d.param=FLAG; d.data.i = e->FIELD; add_delta_to_queue(&d, queue); }\n#define EVENT_TO_DELTA_WITH_BASEOSC(FIELD, FLAG)    if(AMY_IS_SET(e->FIELD)) { d.param=FLAG; d.data.i = e->FIELD + base_osc; if (FLAG != RESET_OSC && d.data.i < (uint32_t)AMY_OSCS + 1) ensure_osc_allocd(d.data.i, NULL); add_delta_to_queue(&d, queue);}\n#define EVENT_TO_DELTA_LOG(FIELD, FLAG)             if(AMY_IS_SET(e->FIELD)) { d.param=FLAG; d.data.f = log2f(e->FIELD); add_delta_to_queue(&d, queue);}\n#define EVENT_TO_DELTA_COEFS(FIELD, FLAG)  \\\n    for (int i = 0; i < NUM_COMBO_COEFS; ++i) \\\n        EVENT_TO_DELTA_F(FIELD[i], FLAG + i)\n// Const freq coef is in Hz, rest are linear.\n#define EVENT_TO_DELTA_COEFS_COEF0_SPECIAL(FIELD, FLAG, COEF0_FN)        \\\n    for (int i = 0; i < NUM_COMBO_COEFS; ++i) {      \\\n        if (AMY_IS_SET(e->FIELD[i]))  {              \\\n            d.param = FLAG + i;  \\\n            if (i == COEF_CONST)  \\\n                d.data.f = COEF0_FN(e->FIELD[i]);  \\\n            else \\\n                d.data.f = e->FIELD[i]; \\\n            add_delta_to_queue(&d, queue); \\\n        }    \\\n    }\n#define EVENT_TO_DELTA_FREQ_COEFS(FIELD, FLAG) \\\n    EVENT_TO_DELTA_COEFS_COEF0_SPECIAL(FIELD, FLAG, logfreq_of_freq)\n\n// Add a API facing event, convert into delta directly\nvoid amy_event_to_deltas_queue(amy_event *e, uint16_t base_osc, struct delta **queue) {\n    AMY_PROFILE_START(AMY_ADD_DELTA)\n    struct delta d;\n    peek_stack(\"event_to_deltas\");\n    // Synth defaults if not set, these are required for the delta struct\n    d.time = e->time;\n    d.osc = e->osc;\n    if(AMY_IS_UNSET(e->osc)) { d.osc = 0; } \n    if(AMY_IS_UNSET(e->time)) { d.time = 0; } \n\n    // First, adapt the osc in this event with base_osc offsets for voices\n    d.osc += base_osc;\n\n    // Ensure this osc has its synthinfo allocated.\n    ensure_osc_allocd(d.osc, NULL);\n\n    // Voices / patches gets set up here \n    // you must set both voices & load_patch together to load a patch \n    if (AMY_IS_SET(e->voices[0]) || AMY_IS_SET(e->synth)) {\n        if (AMY_IS_SET(e->patch_number) || AMY_IS_SET(e->num_voices) || AMY_IS_SET(e->oscs_per_voice)) {\n            amy_execute_deltas();\n            patches_load_patch(e);\n        }\n        // Execute any other commands in this event.\n        patches_event_has_voices(e, queue);\n        goto end;\n    }\n\n    // Is this, in fact, a non-load_patch or store_patch event that has patch_number set?\n    // If so, add the event to the stored patch queue, not the execution queue.\n    if (AMY_IS_SET(e->patch_number)) {\n        queue = queue_for_patch_number(e->patch_number);\n        //fprintf(stderr, \"event added to patch %d: osc %d wave %d...\\n\", e->patch_number, e->osc, e->wave);\n        if (queue == NULL) {\n            // The patch number was invalid (e.g., not in user range 1024+), so we got no queue, so ignore the event.\n            fprintf(stderr, \"event ignored\\n\");\n            goto end;\n        }            \n    }\n\n    // Everything else only added to queue if set\n    EVENT_TO_DELTA_I(wave, WAVE)\n    EVENT_TO_DELTA_I(preset, PRESET)\n    EVENT_TO_DELTA_F(midi_note, MIDI_NOTE)\n    EVENT_TO_DELTA_COEFS(amp_coefs, AMP)\n    EVENT_TO_DELTA_FREQ_COEFS(freq_coefs, FREQ)\n    EVENT_TO_DELTA_FREQ_COEFS(filter_freq_coefs, FILTER_FREQ)\n    EVENT_TO_DELTA_COEFS(duty_coefs, DUTY)\n    EVENT_TO_DELTA_COEFS(pan_coefs, PAN)\n    EVENT_TO_DELTA_F(feedback, FEEDBACK)\n    EVENT_TO_DELTA_F(trigger_phase, PHASE)\n    EVENT_TO_DELTA_F(volume, VOLUME)\n    EVENT_TO_DELTA_F(pitch_bend, PITCH_BEND)\n    EVENT_TO_DELTA_I(latency_ms, LATENCY)\n    EVENT_TO_DELTA_F(tempo, TEMPO)\n    EVENT_TO_DELTA_LOG(ratio, RATIO)\n    EVENT_TO_DELTA_F(resonance, RESONANCE)\n    EVENT_TO_DELTA_I(portamento_ms, PORTAMENTO)\n    EVENT_TO_DELTA_WITH_BASEOSC(chained_osc, CHAINED_OSC)\n    EVENT_TO_DELTA_WITH_BASEOSC(reset_osc, RESET_OSC)\n    EVENT_TO_DELTA_WITH_BASEOSC(mod_source, MOD_SOURCE)\n    EVENT_TO_DELTA_I(note_source, NOTE_SOURCE)\n    EVENT_TO_DELTA_I(filter_type, FILTER_TYPE)\n    EVENT_TO_DELTA_I(algorithm, ALGORITHM)\n    EVENT_TO_DELTA_F(eq_l, EQ_L)\n    EVENT_TO_DELTA_F(eq_m, EQ_M)\n    EVENT_TO_DELTA_F(eq_h, EQ_H)\n    EVENT_TO_DELTA_F(echo_max_delay_ms, ECHO_MAX_DELAY_MS)  // set MAX_DELAY first\n    EVENT_TO_DELTA_F(echo_level, ECHO_LEVEL)\n    EVENT_TO_DELTA_F(echo_delay_ms, ECHO_DELAY_MS)\n    EVENT_TO_DELTA_F(echo_feedback, ECHO_FEEDBACK)\n    EVENT_TO_DELTA_F(echo_filter_coef, ECHO_FILTER_COEF)\n    EVENT_TO_DELTA_F(chorus_max_delay, CHORUS_MAX_DELAY)   // set MAX_DELAY first\n    EVENT_TO_DELTA_F(chorus_level, CHORUS_LEVEL)\n    EVENT_TO_DELTA_F(chorus_lfo_freq, CHORUS_LFO_FREQ)\n    EVENT_TO_DELTA_F(chorus_depth, CHORUS_DEPTH)\n    EVENT_TO_DELTA_F(reverb_level, REVERB_LEVEL)\n    EVENT_TO_DELTA_F(reverb_liveness, REVERB_LIVENESS)\n    EVENT_TO_DELTA_F(reverb_damping, REVERB_DAMPING)\n    EVENT_TO_DELTA_F(reverb_xover_hz, REVERB_XOVER_HZ)\n    EVENT_TO_DELTA_I(eg_type[0], EG0_TYPE)\n    EVENT_TO_DELTA_I(eg_type[1], EG1_TYPE)\n\n    bool algo_ops_set = false;\n    for (int i = 0; i < MAX_ALGO_OPS; ++i) {\n        if(AMY_IS_SET(e->algo_source[i])) {\n            algo_ops_set = true;\n            break;\n        }\n    }\n    if (algo_ops_set) {\n        for(uint8_t i = 0; i < MAX_ALGO_OPS; i++) {\n            d.param = ALGO_SOURCE_START + i;\n            if (AMY_IS_SET(e->algo_source[i])) {\n                d.data.i = e->algo_source[i] + base_osc;\n            } else{\n                d.data.i = e->algo_source[i];\n            }\n            add_delta_to_queue(&d, queue);\n        }\n    }\n\n    uint32_t *bp_times_ms[MAX_BREAKPOINT_SETS] = {e->eg0_times, e->eg1_times};\n    float *bp_values[MAX_BREAKPOINT_SETS] = {e->eg0_values, e->eg1_values};\n    for (uint8_t i = 0; i < MAX_BREAKPOINT_SETS; i++) {\n        // amy_parse_message sets bp_is_set for anything including an empty bp string.\n        // Direct API calls can set typed breakpoint arrays without touching bp_is_set.\n        bool bp_arrays_set = AMY_IS_SET(bp_times_ms[i][0]) || AMY_IS_SET(bp_values[i][0]);\n        if(AMY_IS_SET(e->bp_is_set[i]) || bp_arrays_set) {\n            int num_bps = 0;\n            for (int j = 0; j < MAX_BREAKPOINTS; ++j) {\n                if (AMY_IS_SET(bp_times_ms[i][j]) || AMY_IS_SET(bp_values[i][j])) {\n                    num_bps = j + 1;\n                }\n            }\n            for(uint8_t j = 0; j < num_bps; j++) {\n                if(AMY_IS_SET(bp_times_ms[i][j])) {\n                    d.param = BP_START + (j * 2) + (i * MAX_BREAKPOINTS * 2);\n                    d.data.i = ms_to_samples((uint32_t)bp_times_ms[i][j]);\n                    add_delta_to_queue(&d, queue);\n                }\n                if(AMY_IS_SET(bp_values[i][j])) {\n                    d.param = BP_START + (j * 2 + 1) + (i * MAX_BREAKPOINTS * 2);\n                    d.data.f = bp_values[i][j];\n                    add_delta_to_queue(&d, queue);\n                }\n            }\n            // Send an unset value as the last + 1 breakpoint time to indicate the end of the BP set.\n            //if (num_bps < MAX_BREAKPOINTS) {\n            //    d.param = BP_START + (num_bps * 2) + (i * MAX_BREAKPOINTS * 2);\n            //    d.data.i = AMY_UNSET_VALUE(d.data.i);\n            //    add_delta_to_queue(&d, queue);\n            //}\n            // If we do this, then you can't set one value in the middle of a BP set without\n            // setting all the rest, because at this point we can't distinguish trailing\n            // commas from a truncated list.\n            // If we *don't* do this, you can't truncate an existing BP list, because the\n            // trailing part you don't overwrite never gets removed.  However, it seems like\n            // we don't have any use-cases where someone wants to curtail a BP list - but\n            // we *do* have use-cases for wanting to change the sustain level without\n            // re-specifying the release, so *don't* do this wins for now.\n        }\n    }\n\n    // add this last -- this is a trigger, that if sent alongside osc setup parameters, you want to run after those\n\n    EVENT_TO_DELTA_F(velocity, VELOCITY)\n\n    if (AMY_IS_SET(e->patch_number)) {\n        // If this was an event with a patch number, maybe we increased the number of oscs for this patch, update it.\n         update_num_oscs_for_patch_number(e->patch_number);\n    }\n\n\nend:\n    AMY_PROFILE_STOP(AMY_ADD_DELTA);\n\n}\n\n\nvoid reset_modosc(struct mod_synthinfo *pmsynth) {\n        if (pmsynth != NULL) {\n        pmsynth->last_duty = 0.5f;\n        pmsynth->amp = 0;  // This matters for wave=PARTIAL, where msynth amp is effectively 1-frame delayed.\n        pmsynth->last_amp = 0;\n        pmsynth->logfreq = 0;\n        pmsynth->filter_logfreq = 0;\n        AMY_UNSET(pmsynth->last_filter_logfreq);\n        pmsynth->duty = 0.5f;\n        pmsynth->pan = 0.5f;\n        pmsynth->feedback = F2S(0); //.996; todo ks feedback is v different from fm feedback\n        pmsynth->resonance = 0.7f;\n    }\n}\n\nvoid reset_osc_params(struct synthinfo *psynth) {\n    // osc params are the things set through the amy_event API\n    // Event-derived config\n    psynth->wave = SINE;\n    AMY_UNSET(psynth->preset);\n    AMY_UNSET(psynth->note_source);\n    AMY_UNSET(psynth->midi_note);\n    psynth->velocity = 0;\n    for (int j = 0; j < NUM_COMBO_COEFS; ++j)  psynth->amp_coefs[j] = 0;\n    psynth->amp_coefs[COEF_CONST] = 1.0f;  // Default overall gain\n    psynth->amp_coefs[COEF_VEL] = 1.0f;    // Default sensitive to vel\n    psynth->amp_coefs[COEF_EG0] = 1.0f;    // Default gate by eg0\n    for (int j = 0; j < NUM_COMBO_COEFS; ++j)  psynth->logfreq_coefs[j] = 0;\n    psynth->logfreq_coefs[COEF_NOTE] = 1.0;\n    psynth->logfreq_coefs[COEF_BEND] = 1.0;\n    for (int j = 0; j < NUM_COMBO_COEFS; ++j)  psynth->filter_logfreq_coefs[j] = 0;\n    for (int j = 0; j < NUM_COMBO_COEFS; ++j)  psynth->duty_coefs[j] = 0;\n    psynth->duty_coefs[COEF_CONST] = 0.5f;\n    for (int j = 0; j < NUM_COMBO_COEFS; ++j)  psynth->pan_coefs[j] = 0;\n    psynth->pan_coefs[COEF_CONST] = 0.5f;\n    psynth->feedback = F2S(0); //.996; todo ks feedback is v different from fm feedback\n    AMY_UNSET(psynth->trigger_phase);\n    AMY_UNSET(psynth->logratio);\n    psynth->portamento_alpha = 0;\n    psynth->resonance = 0.7f;\n    psynth->filter_type = FILTER_NONE;\n    AMY_UNSET(psynth->chained_osc);\n    AMY_UNSET(psynth->mod_source);\n    psynth->algorithm = 0;\n    for(uint8_t j=0;j<MAX_ALGO_OPS;j++) AMY_UNSET(psynth->algo_source[j]);\n    for(uint8_t j=0;j<MAX_BREAKPOINT_SETS;j++) {\n        // max_num_breakpoints describes the alloc for this synthinfo, and is *not* reset.\n        for(uint8_t k=0;k<psynth->max_num_breakpoints[j];k++) {\n            AMY_UNSET(psynth->breakpoint_times[j][k]);\n            AMY_UNSET(psynth->breakpoint_values[j][k]);\n        }\n        psynth->eg_type[j] = ENVELOPE_NORMAL;  // ENVELOPE_LINEAR;  // no_amp_001: was ENVELOPE_NORMAL\n    }\n    // Default EG0 setup to be key gate\n    psynth->breakpoint_times[0][0] = 0;\n    psynth->breakpoint_values[0][0] = 1.0f;\n    psynth->breakpoint_times[0][1] = 0;\n    psynth->breakpoint_values[0][1] = 0;\n    // Not part of event-driven config, but still stable through the evolution of a note.\n    psynth->terminate_on_silence = 1;  // This is what we do, *except* for PCM.\n    psynth->lut = NULL;\n}\n\nvoid reset_osc_state(struct synthinfo *psynth) {\n    // osc state are the internal values that keep track of the osc evolution in time.\n    psynth->status = SYNTH_OFF;\n    psynth->phase = F2P(0);\n    psynth->step = 0;\n    psynth->substep = 0;\n    AMY_UNSET(psynth->render_clock);\n    AMY_UNSET(psynth->note_on_clock);\n    psynth->note_off_clock = 0;  // Used to check that last event seen by note was off.\n    AMY_UNSET(psynth->zero_amp_clock);\n    AMY_UNSET(psynth->mod_value_clock);\n    psynth->mod_value = F2S(0);\n    for(uint8_t j=0;j<MAX_BREAKPOINT_SETS;j++) { psynth->last_scale[j] = 0; }\n    psynth->last_two[0] = 0;\n    psynth->last_two[1] = 0;\n    for(int j = 0; j < 2 * FILT_NUM_DELAYS; ++j) psynth->filter_delay[j] = 0;\n    psynth->last_filt_norm_bits = 0;\n}\n\nvoid reset_osc_by_pointer(struct synthinfo *psynth, struct mod_synthinfo *pmsynth) {\n    // set synth state to defaults given a pointer\n    // Current state\n    reset_osc_params(psynth);\n    reset_osc_state(psynth);\n    reset_modosc(pmsynth);\n}\n\nvoid reset_osc(uint16_t i ) {\n    // set all the synth state to defaults\n    if (synth[i] == NULL) return;\n    reset_osc_by_pointer(synth[i], msynth[i]);\n    synth[i]->osc = i; // self-reference to make updating oscs easier\n}\n\nvoid amy_reset_oscs() {\n    // Put the noise generator into a known state.\n    srand48(517730);\n    // We reset oscs by freeing them.\n    // Include chorus osc (osc=AMY_OSCS)\n    for(uint16_t i=0;i<AMY_OSCS+1;i++) free_osc(i);\n    //for(uint16_t i=0;i<AMY_OSCS+1;i++) reset_osc(i);\n    // also reset filters and volume\n    amy_global.volume = 1.0f;\n    amy_global.pitch_bend = 0;\n    amy_global.eq[0] = F2S(1.0f);\n    amy_global.eq[1] = F2S(1.0f);\n    amy_global.eq[2] = F2S(1.0f);\n    my_srand48(517730);\n    reset_parametric();\n    // Reset chorus oscillator etc.\n    if (AMY_HAS_CHORUS) config_chorus(CHORUS_DEFAULT_LEVEL, CHORUS_DEFAULT_MAX_DELAY, CHORUS_DEFAULT_LFO_FREQ, CHORUS_DEFAULT_MOD_DEPTH);\n    if (AMY_HAS_REVERB) config_reverb(REVERB_DEFAULT_LEVEL, REVERB_DEFAULT_LIVENESS, REVERB_DEFAULT_DAMPING, REVERB_DEFAULT_XOVER_HZ);\n    if (AMY_HAS_ECHO)   config_echo(S2F(ECHO_DEFAULT_LEVEL), ECHO_DEFAULT_DELAY_MS, ECHO_DEFAULT_MAX_DELAY_MS, S2F(ECHO_DEFAULT_FEEDBACK), S2F(ECHO_DEFAULT_FILTER_COEF));\n    // Reset patches\n    patches_reset();\n    // Reset instruments (synths)\n    instruments_reset();\n    // Reset memorypcm\n    pcm_unload_all_presets();\n    // Reset midi_mappings.\n    midi_mappings_deinit();\n    midi_mappings_init();\n}\n\n\nvoid amy_deltas_reset() {\n    delta_release_list(amy_global.delta_queue);\n    amy_global.delta_queue = NULL;\n    amy_global.delta_qsize = 0;\n}\n\nvoid alloc_osc(int osc, uint8_t *max_num_breakpoints) {\n    peek_stack(\"alloc_osc\");\n    uint8_t default_num_breakpoints[MAX_BREAKPOINT_SETS] = {DEFAULT_NUM_BREAKPOINTS, DEFAULT_NUM_BREAKPOINTS};\n    if (max_num_breakpoints == NULL) {\n        max_num_breakpoints = default_num_breakpoints;\n    }\n    int total_num_breakpoints = 0;\n    for (int i=0; i < MAX_BREAKPOINT_SETS; ++i)  total_num_breakpoints += max_num_breakpoints[i];\n    uint8_t *ptr = malloc_caps(sizeof(struct synthinfo) + sizeof(struct mod_synthinfo)\n                               + total_num_breakpoints * (sizeof(float) + sizeof(uint32_t)),\n                               amy_global.config.ram_caps_events);\n    synth[osc] = (struct synthinfo *)ptr;\n    msynth[osc] = (struct mod_synthinfo *)(ptr + sizeof(struct synthinfo));\n    // Point to the breakpoint sets.\n    uint8_t *breakpoint_area = ptr + sizeof(struct synthinfo) + sizeof(struct mod_synthinfo);\n    for (int i=0; i < MAX_BREAKPOINT_SETS; ++i) {\n        synth[osc]->max_num_breakpoints[i] = max_num_breakpoints[i];\n        synth[osc]->breakpoint_times[i] = (uint32_t *)breakpoint_area;\n        breakpoint_area +=  max_num_breakpoints[i] * sizeof(uint32_t);  // must be a multiple of 4 bytes\n        synth[osc]->breakpoint_values[i] = (float *)breakpoint_area;\n        breakpoint_area += sizeof(float) * max_num_breakpoints[i];\n    }\n    reset_osc(osc);\n    //fprintf(stderr, \"alloc_osc %d (0x%lx) num_breakpoints %d,%d\\n\", osc, (long)synth[osc], synth[osc]->max_num_breakpoints[0], synth[osc]->max_num_breakpoints[1]);\n}\n\nvoid free_osc(int osc) {\n    if (synth[osc] != NULL) {\n        //fprintf(stderr, \"free_osc %d (0x%lx)\\n\", osc, (long)synth[osc]);\n        free(synth[osc]);\n    }\n    synth[osc] = NULL;\n    msynth[osc] = NULL;\n}\n\nvoid ensure_osc_allocd(int osc, uint8_t *max_num_breakpoints) {\n    if (synth[osc] == NULL) alloc_osc(osc, max_num_breakpoints);\n    else if (max_num_breakpoints) {\n        bool realloc_needed = false;\n        uint8_t new_max_num_breakpoints[MAX_BREAKPOINT_SETS];\n        for (int i = 0; i < MAX_BREAKPOINT_SETS; ++i) {\n            new_max_num_breakpoints[i] = DEFAULT_NUM_BREAKPOINTS;\n            if (synth[osc]->max_num_breakpoints[i] < max_num_breakpoints[i]) {\n                realloc_needed = true;\n                // Increase num_breakpoints in blocks of DEFAULT_NUM_BREAKPOINTS.\n                new_max_num_breakpoints[i] = MIN(MAX_BREAKPOINTS,\n                                                 DEFAULT_NUM_BREAKPOINTS * ((max_num_breakpoints[i] + DEFAULT_NUM_BREAKPOINTS - 1) / DEFAULT_NUM_BREAKPOINTS));\n            }\n        }\n        if (realloc_needed) {\n            //fprintf(stderr, \"realloc for osc %d (breakpoints %d, %d -> %d, %d (wave=%d)\\n\", osc, synth[osc]->max_num_breakpoints[0], synth[osc]->max_num_breakpoints[1], max_num_breakpoints[0], max_num_breakpoints[1], synth[osc]->wave);\n            // Save the current values in the structure.\n            struct synthinfo saved_values = *synth[osc];\n            int32_t breakpoint_times[MAX_BREAKPOINT_SETS][MAX_BREAKPOINTS];\n            float breakpoint_values[MAX_BREAKPOINT_SETS][MAX_BREAKPOINTS];\n            int num_old_breakpoints[MAX_BREAKPOINT_SETS];\n            for (int i = 0; i < MAX_BREAKPOINT_SETS; ++i) {\n                num_old_breakpoints[i] = synth[osc]->max_num_breakpoints[i];\n                for (int j = 0; j < num_old_breakpoints[i]; ++j) {\n                    breakpoint_times[i][j] = synth[osc]->breakpoint_times[i][j];\n                    breakpoint_values[i][j] = synth[osc]->breakpoint_values[i][j];\n                }\n            }\n            // Reallocate the structure.\n            free_osc(osc);\n            alloc_osc(osc, new_max_num_breakpoints);\n            // Save the pointers to the newly-alloc'd vectors.\n            uint32_t *saved_breakpoint_times[MAX_BREAKPOINT_SETS];\n            float *saved_breakpoint_values[MAX_BREAKPOINT_SETS];\n            int saved_max_num_breakpoints[MAX_BREAKPOINT_SETS];\n            for (int i = 0; i < MAX_BREAKPOINT_SETS; ++i) {\n                saved_breakpoint_times[i] = synth[osc]->breakpoint_times[i];\n                saved_breakpoint_values[i]= synth[osc]->breakpoint_values[i];\n                saved_max_num_breakpoints[i] = synth[osc]->max_num_breakpoints[i];\n            }\n            // Copy all the values from the previous alloc.\n            (*synth[osc]) = saved_values;\n            // Restore the new breakpoint vectors.\n            for (int i = 0; i < MAX_BREAKPOINT_SETS; ++i) {\n                synth[osc]->breakpoint_times[i] = saved_breakpoint_times[i];\n                synth[osc]->breakpoint_values[i] = saved_breakpoint_values[i];\n                synth[osc]->max_num_breakpoints[i] = saved_max_num_breakpoints[i];\n            }\n            // And, to be conservative, the breakpoint values themselves.\n            for (int i = 0; i < MAX_BREAKPOINT_SETS; ++i) {\n                for (int j = 0; j < num_old_breakpoints[i]; ++j) {\n                    synth[osc]->breakpoint_times[i][j] = breakpoint_times[i][j];\n                    synth[osc]->breakpoint_values[i][j] = breakpoint_values[i][j];\n                }\n                // And clear the ones beyond\n                for (int j = num_old_breakpoints[i]; j < synth[osc]->max_num_breakpoints[i]; ++j) {\n                    AMY_UNSET(synth[osc]->breakpoint_times[i][j]);\n                    AMY_UNSET(synth[osc]->breakpoint_values[i][j]);\n                }\n            }\n        }\n    }\n}\n\n\n// the synth object keeps held state, whereas deltas are only deltas/changes\nint8_t oscs_init() {\n    if(amy_global.config.ks_oscs>0)\n        ks_init();\n    filters_init();\n    algo_init();\n    patches_init(amy_global.config.max_memory_patches);\n    instruments_init(amy_global.config.max_synths);\n    sequencer_init(amy_global.config.max_sequencer_tags);\n    if(pcm_samples)  pcm_init();\n    if(AMY_HAS_CUSTOM)  custom_init();\n    // synth and msynth are now pointers to arrays of pointers to dynamically-allocated synth structures.\n    synth = (struct synthinfo **) malloc_caps(sizeof(struct synthinfo *) * (AMY_OSCS+1), amy_global.config.ram_caps_synth);\n    bzero(synth, sizeof(struct synthinfo *) * (AMY_OSCS+1));\n    msynth = (struct mod_synthinfo **) malloc_caps(sizeof(struct mod_synthinfo *) * (AMY_OSCS+1), amy_global.config.ram_caps_synth);\n    output_block_0 = (output_sample_type *) malloc_caps(sizeof(output_sample_type) * AMY_BLOCK_SIZE * AMY_NCHANS, amy_global.config.ram_caps_block);\n    output_block_1 = (output_sample_type *) malloc_caps(sizeof(output_sample_type) * AMY_BLOCK_SIZE * AMY_NCHANS, amy_global.config.ram_caps_block);\n    output_block = output_block_0;\n    amy_in_block = (output_sample_type*)malloc_caps(sizeof(output_sample_type)*AMY_BLOCK_SIZE*AMY_NCHANS, amy_global.config.ram_caps_block);\n    amy_external_in_block = (output_sample_type*)malloc_caps(sizeof(output_sample_type)*AMY_BLOCK_SIZE*AMY_NCHANS, amy_global.config.ram_caps_block);\n    // set all oscillators to their default values\n    amy_reset_oscs();\n    // reset the deltas queue\n    deltas_pool_init();\n    amy_deltas_reset();\n\n    midi_mappings_init();\n\n    // clear out both as local mode won't use fbl[1] \n    for(uint16_t core=0;core<AMY_CORES;++core) {\n        fbl[core]= (SAMPLE*)malloc_caps(sizeof(SAMPLE) * AMY_BLOCK_SIZE * AMY_NCHANS, amy_global.config.ram_caps_fbl);\n        per_osc_fb[core]= (SAMPLE*)malloc_caps(sizeof(SAMPLE) * AMY_BLOCK_SIZE, amy_global.config.ram_caps_fbl);\n        for(uint16_t c=0;c<AMY_NCHANS;++c) {\n            for(uint16_t i=0;i<AMY_BLOCK_SIZE;i++) {\n                fbl[core][AMY_BLOCK_SIZE*c + i] = 0;\n            }\n        }\n    }\n\n    // Set the optional inputs to 0\n    for(uint16_t i=0;i<AMY_BLOCK_SIZE*AMY_NCHANS;i++) {\n        amy_in_block[i] = 0;\n        amy_external_in_block[i] = 0;\n    }\n\n    amy_global.total_blocks = 0;\n    amy_global.time = 0;\n    //printf(\"AMY online with %d oscillators, %d block size, %d cores, %d channels, %d pcm samples\\n\", \n    //    AMY_OSCS, AMY_BLOCK_SIZE, AMY_CORES, AMY_NCHANS, pcm_samples);\n    return 0;\n}\n\nvoid print_osc_debug(int i /* osc */, bool show_eg) {\n    if (synth[i] == NULL)  {fprintf(stderr, \"osc %d not defined\\n\", i); return; }\n    fprintf(stderr,\"osc %d: status %d wave %d mod_source %d velocity %f logratio %f feedback %f filtype %d resonance %f portamento_alpha %f step %f chained %d algo %d algo_source %d,%d,%d,%d,%d,%d  \\n\",\n            i, synth[i]->status, synth[i]->wave, synth[i]->mod_source,\n            synth[i]->velocity, synth[i]->logratio, synth[i]->feedback, synth[i]->filter_type, synth[i]->resonance, synth[i]->portamento_alpha, P2F(synth[i]->step), synth[i]->chained_osc,\n            synth[i]->algorithm,\n            synth[i]->algo_source[0], synth[i]->algo_source[1], synth[i]->algo_source[2], synth[i]->algo_source[3], synth[i]->algo_source[4], synth[i]->algo_source[5] );\n    fprintf(stderr, \"  amp_coefs: %.3f %.3f %.3f %.3f %.3f %.3f %.3f\\n\", synth[i]->amp_coefs[0], synth[i]->amp_coefs[1], synth[i]->amp_coefs[2], synth[i]->amp_coefs[3], synth[i]->amp_coefs[4], synth[i]->amp_coefs[5], synth[i]->amp_coefs[6]);\n    fprintf(stderr, \"  lfr_coefs: %.3f %.3f %.3f %.3f %.3f %.3f %.3f\\n\", synth[i]->logfreq_coefs[0], synth[i]->logfreq_coefs[1], synth[i]->logfreq_coefs[2], synth[i]->logfreq_coefs[3], synth[i]->logfreq_coefs[4], synth[i]->logfreq_coefs[5], synth[i]->logfreq_coefs[6]);\n    fprintf(stderr, \"  flf_coefs: %.3f %.3f %.3f %.3f %.3f %.3f %.3f\\n\", synth[i]->filter_logfreq_coefs[0], synth[i]->filter_logfreq_coefs[1], synth[i]->filter_logfreq_coefs[2], synth[i]->filter_logfreq_coefs[3], synth[i]->filter_logfreq_coefs[4], synth[i]->filter_logfreq_coefs[5], synth[i]->filter_logfreq_coefs[6]);\n    fprintf(stderr, \"  dut_coefs: %.3f %.3f %.3f %.3f %.3f %.3f %.3f\\n\", synth[i]->duty_coefs[0], synth[i]->duty_coefs[1], synth[i]->duty_coefs[2], synth[i]->duty_coefs[3], synth[i]->duty_coefs[4], synth[i]->duty_coefs[5], synth[i]->duty_coefs[6]);\n    fprintf(stderr, \"  pan_coefs: %.3f %.3f %.3f %.3f %.3f %.3f %.3f\\n\", synth[i]->pan_coefs[0], synth[i]->pan_coefs[1], synth[i]->pan_coefs[2], synth[i]->pan_coefs[3], synth[i]->pan_coefs[4], synth[i]->pan_coefs[5], synth[i]->pan_coefs[6]);\n    if(show_eg) {\n        for(uint8_t j=0;j<MAX_BREAKPOINT_SETS;j++) {\n            fprintf(stderr,\"  eg%d (type %d): \", j, synth[i]->eg_type[j]);\n            for(uint8_t k=0;k<synth[i]->max_num_breakpoints[j];k++) {\n                fprintf(stderr,\"%\" PRIi32 \": %f \", synth[i]->breakpoint_times[j][k], synth[i]->breakpoint_values[j][k]);\n            }\n            fprintf(stderr,\"\\n\");\n        }\n        fprintf(stderr,\"mod osc %d: amp: %f, logfreq %f duty %f filter_logfreq %f resonance %f fb/bw %f pan %f \\n\", i, msynth[i]->amp, msynth[i]->logfreq, msynth[i]->duty, msynth[i]->filter_logfreq, msynth[i]->resonance, msynth[i]->feedback, msynth[i]->pan);\n    }\n}\n\n// types: 0 - show profile if set\n//        1 - show profile, queue\n//        2 - show profile, queue, osc data\nvoid show_debug(uint8_t type) {\n    amy_global.debug_flag = type;\n    amy_profiles_print();\n    #ifdef ALLES\n    esp_show_debug();\n    #endif\n    if(type>0) {\n        struct delta * ptr = amy_global.delta_queue;\n        uint16_t q = amy_global.delta_qsize;\n        if(q > 25) q = 25;\n        for(uint16_t i=0;i<q;i++) {\n            fprintf(stderr,\"%d time %\" PRIu32 \" osc %d param %d - %f %\" PRIu32 \"\\n\", i, ptr->time, ptr->osc, ptr->param, ptr->data.f, ptr->data.i);\n            ptr = ptr->next;\n        }\n        fprintf(stderr, \"deltas_queue len %\" PRIi32 \", free len %\" PRIi32 \"\\n\", delta_list_len(amy_global.delta_queue), delta_num_free());\n        sequencer_debug();\n    }\n    if(type>1) {\n        // print out all the osc data\n        //printf(\"global: filter %f resonance %f volume %f bend %f status %d\\n\", amy_global.filter_freq, amy_global.resonance, amy_global.volume, amy_global.pitch_bend, amy_global.status);\n        fprintf(stderr,\"global: volume %f bend %f eq: %f %f %f \\n\", amy_global.volume, amy_global.pitch_bend, S2F(amy_global.eq[0]), S2F(amy_global.eq[1]), S2F(amy_global.eq[2]));\n        for(uint16_t i=0;i<10 /* AMY_OSCS */;i++) {\n            print_osc_debug(i, (type > 3) /* show_eg */);\n        }\n        if (type > 4) {\n            patches_debug();\n        }\n        if (type > 5) {\n            cc_mapping_debug();\n        }\n        if (type > 6) {\n            for (int synth = 0; synth < 32 /* MAX_INSTRUMENTS */; ++synth) {\n                if (instrument_number_exists(synth, NULL)) {\n                    fprintf(stderr, \"synth %d:\\n\", synth);\n                    void * state = NULL;\n                    amy_event event = amy_default_event();\n                    char s[MAX_MESSAGE_LEN];\n                    bool include_fx = true;\n                    do {\n                        state = yield_synth_events(synth, &event, include_fx, state);\n                        sprint_event(&event, s, MAX_MESSAGE_LEN, false);\n                        fprintf(stderr, \"%s\\n\", s);\n                    } while(state != NULL);\n                }\n            }\n        }\n        fprintf(stderr, \"\\n\");\n    }\n}\n\nvoid oscs_deinit() {\n    midi_mappings_deinit();\n    dealloc_chorus_delay_lines();\n    dealloc_echo_delay_lines();\n    for(int core = 0; core < AMY_CORES; ++core) {\n        free(fbl[core]);\n        free(per_osc_fb[core]);\n    }\n    deltas_pool_free();\n    // Include chorus osc (osc=AMY_OSCS)\n    for (int i = 0; i < AMY_OSCS + 1; ++i) free_osc(i);\n    free(amy_external_in_block);\n    free(amy_in_block);\n    free(output_block_1);\n    free(output_block_0);\n    free(msynth);\n    free(synth);\n    if(AMY_HAS_CUSTOM)  custom_deinit();\n    if(pcm_samples)  pcm_deinit();\n    sequencer_deinit();\n    instruments_deinit();\n    patches_deinit();\n    algo_deinit();\n    filters_deinit();\n    if(amy_global.config.ks_oscs > 0)\n        ks_deinit();\n}\n\n\n\nvoid osc_note_on(uint16_t osc, float initial_freq) {\n    //fprintf(stderr,\"Note on: osc %d wav %d note %.3f vel %.3f\\n\",\n    //        osc, synth[osc]->wave,\n    //        synth[osc]->midi_note, synth[osc]->velocity);\n    // take care of fm & ks first -- no special treatment for bp/mod\n    switch (synth[osc]->wave) {\n    case KS: if(amy_global.config.ks_oscs) ks_note_on(osc); break;\n    case SINE: sine_note_on(osc, initial_freq); break;\n    case SAW_DOWN: saw_down_note_on(osc, initial_freq); break;\n    case SAW_UP: saw_up_note_on(osc, initial_freq); break;\n    case TRIANGLE: triangle_note_on(osc, initial_freq); break;\n    case PULSE: pulse_note_on(osc, initial_freq); break;\n    case PCM:\n    case PCM_LEFT:\n    case PCM_RIGHT:\n        pcm_note_on(osc);\n        break;\n    case ALGO: algo_note_on(osc, initial_freq); break;\n    case NOISE: noise_note_on(osc); break;\n    case AUDIO_IN0: audio_in_note_on(osc, 0); break;\n    case AUDIO_IN1: audio_in_note_on(osc, 1); break;\n    case AUDIO_EXT0: external_audio_in_note_on(osc, 0); break;\n    case AUDIO_EXT1: external_audio_in_note_on(osc, 1); break;\n    case AMY_MIDI: amy_send_midi_note_on(osc); break;\n    case BYO_PARTIALS: if(AMY_HAS_PARTIALS) partials_note_on(osc); break;\n    case INTERP_PARTIALS: if(AMY_HAS_PARTIALS) interp_partials_note_on(osc); break;\n    #ifdef AMY_WAVETABLE\n    case WAVETABLE: wavetable_note_on(osc, initial_freq); break;\n    #endif\n    case SILENT: /* nothing */ break;\n    case CUSTOM: if(AMY_HAS_CUSTOM) custom_note_on(osc, initial_freq); break;\n    default: break;\n    }\n}\n\nint chained_osc_would_cause_loop(uint16_t osc, uint16_t chained_osc) {\n    // Check to see if chaining this osc would cause a loop.\n    uint16_t next_osc = chained_osc;\n    do {\n        ensure_osc_allocd(chained_osc, NULL);\n        if (next_osc == osc) {\n            fprintf(stderr, \"chaining osc %d to osc %d would cause loop.\\n\",\n                    chained_osc, osc);\n            return true;\n        }\n        next_osc = synth[next_osc]->chained_osc;\n    } while(AMY_IS_SET(next_osc));\n    return false;\n}\n\nfloat portamento_ms_to_alpha(uint16_t portamento_ms) {\n    return 1.0f  - 1.0f / (1 + portamento_ms * AMY_SAMPLE_RATE / 1000 / AMY_BLOCK_SIZE);\n}\n\nuint16_t alpha_to_portamento_ms(float alpha) {\n    return (int)roundf(1000.0f * AMY_BLOCK_SIZE / AMY_SAMPLE_RATE / (1.0f - alpha)) - 1;\n}\n\n#define DELTA_TO_SYNTH_I(FLAG, FIELD)  if (d->param == FLAG) synth[d->osc]->FIELD = d->data.i;\n#define DELTA_TO_SYNTH_F(FLAG, FIELD)  if (d->param == FLAG) synth[d->osc]->FIELD = d->data.f;\n#define DELTA_TO_COEFS(FLAG, FIELD) \\\n    if (PARAM_IS_COMBO_COEF(d->param, FLAG)) \\\n        synth[d->osc]->FIELD[d->param - FLAG] = d->data.f;\n\n// play an delta, now -- tell the audio loop to start making noise\nvoid play_delta(struct delta *d) {\n    AMY_PROFILE_START(PLAY_DELTA)\n    //fprintf(stderr,\"play_delta: time %d osc %d param %d val 0x%x, qsize %d\\n\", amy_global.total_blocks, d->osc, d->param, d->data.i, amy_global.delta_qsize);\n    //uint8_t trig=0;\n    // todo: delta-only side effect, remove\n\n    if (d->param != RESET_OSC)  ensure_osc_allocd(d->osc, NULL);\n\n    if(d->param == MIDI_NOTE) {\n        // Midi note and Velocity are propagated to chained_osc.\n        uint16_t osc = d->osc;\n        while(AMY_IS_SET(osc)) {\n            synth[osc]->midi_note = d->data.f;\n            osc = synth[osc]->chained_osc;\n        }\n    }\n    if(d->param == WAVE) {\n        synth[d->osc]->wave = d->data.i;\n        // todo: delta-only side effect, remove\n        // we do this because we need to set up LUTs for FM oscs. it's a TODO to make this cleaner\n        if(synth[d->osc]->wave == SINE) {\n            sine_note_on(d->osc, freq_of_logfreq(synth[d->osc]->logfreq_coefs[COEF_CONST]));\n        }\n    }\n    DELTA_TO_SYNTH_F(FEEDBACK, feedback)\n    DELTA_TO_SYNTH_F(RATIO, logratio)\n    DELTA_TO_SYNTH_F(RESONANCE, resonance)\n    DELTA_TO_SYNTH_I(FILTER_TYPE, filter_type)\n    DELTA_TO_SYNTH_I(NOTE_SOURCE, note_source)\n    DELTA_TO_SYNTH_I(EG0_TYPE, eg_type[0])\n    DELTA_TO_SYNTH_I(EG1_TYPE, eg_type[1])\n    if (d->param == PRESET) {\n        synth[d->osc]->preset = (uint16_t)d->data.i;\n    }\n    if (d->param == PORTAMENTO) synth[d->osc]->portamento_alpha = portamento_ms_to_alpha(d->data.i);\n    if (d->param == PHASE) synth[d->osc]->trigger_phase = d->data.f;\n\n    DELTA_TO_COEFS(AMP, amp_coefs)\n    DELTA_TO_COEFS(FREQ, logfreq_coefs)\n    DELTA_TO_COEFS(FILTER_FREQ, filter_logfreq_coefs)\n    DELTA_TO_COEFS(DUTY, duty_coefs)\n    DELTA_TO_COEFS(PAN, pan_coefs)\n\n    // todo, i really should clean this up\n    if (PARAM_IS_BP_COEF(d->param)) {\n        uint8_t pos = d->param - BP_START;\n        uint8_t bp_set = 0;\n        while(pos >= (MAX_BREAKPOINTS * 2)) { ++bp_set; pos -= (MAX_BREAKPOINTS * 2); }\n        int bp_index = pos / 2;\n        if (bp_index + 1 > synth[d->osc]->max_num_breakpoints[bp_set]) {\n            uint8_t max_num_breakpoints[MAX_BREAKPOINT_SETS];\n            for (int i = 0; i < MAX_BREAKPOINT_SETS; ++i)\n                max_num_breakpoints[i] = synth[d->osc]->max_num_breakpoints[i];\n            max_num_breakpoints[bp_set] = bp_index + 1;\n            // realloc rounds up in blocks of DEFAULT_NUM_BREAKPOINTS (8).\n            ensure_osc_allocd(d->osc, max_num_breakpoints);\n        }\n        if(pos % 2 == 0) {\n            synth[d->osc]->breakpoint_times[bp_set][pos / 2] = d->data.i;\n        } else {\n            synth[d->osc]->breakpoint_values[bp_set][(pos-1) / 2] = d->data.f;\n        }\n    }\n\n    if (PARAM_IS_COMBO_COEF(d->param, AMP) ||\n        PARAM_IS_BP_COEF(d->param)) {\n        // Changes to Amp/filter/EGs can potentially make a silence-suspended note come back.\n        // Revive the note if it hasn't seen a note_off since the last note_on.\n        if (synth[d->osc]->status == SYNTH_INAUDIBLE && AMY_IS_UNSET(synth[d->osc]->note_off_clock))\n            synth[d->osc]->status = SYNTH_AUDIBLE;\n        // In theory, changing the amp coefs away from their defaults could turn on an osc.  But we won't\n        // But it won't get started without a note-on.  Unfortunately, we can't call hold_and_modify first.\n        // (if the osc has a modulator, we call the modulator in hold_and_modify, but the LUT hasn't been\n        // set up yet, so we get an access error.)\n        //else if (synth[d->osc]->status == SYNTH_OFF) {\n        //    hold_and_modify(d->osc);\n        //    if (msynth[d->osc]->amp > 0) {\n        //        osc_note_on(d->osc, freq_of_logfreq(msynth[d->osc]->logfreq));\n        //    }\n        //}\n    }\n    if(d->param == CHAINED_OSC) {\n        int chained_osc = d->data.i;\n        if (chained_osc >=0 && chained_osc < AMY_OSCS &&\n            !chained_osc_would_cause_loop(d->osc, chained_osc))\n            synth[d->osc]->chained_osc = chained_osc;\n        else\n            AMY_UNSET(synth[d->osc]->chained_osc);\n    }\n    if(d->param == RESET_OSC) { \n        // Remember that RESET_AMY, RESET_TIMEBASE and RESET_EVENTS happens immediately in the parse, so we don't deal with it here.\n        if(d->data.i & RESET_ALL_OSCS) {\n            amy_reset_oscs();\n        }\n        if(d->data.i & RESET_SEQUENCER) {\n            sequencer_reset();\n        }\n        if(d->data.i & RESET_ALL_NOTES) {\n            all_notes_off();\n        }\n        if(d->data.i & RESET_PATCH) {\n            // If we got here, it's a full reset of patches.\n            patches_reset();\n        }\n        if(d->data.i < (uint32_t)AMY_OSCS + 1) {\n            reset_osc(d->data.i);\n        }\n    }\n    if(d->param == MOD_SOURCE) {\n        uint16_t mod_osc = d->data.i;\n        synth[d->osc]->mod_source = mod_osc;\n        // NOTE: These are delta-only side effects.  A purist would strive to remove them.\n        // When an oscillator is named as a modulator, we change its state.\n        ensure_osc_allocd(mod_osc, NULL);\n        synth[mod_osc]->status = SYNTH_IS_MOD_SOURCE;\n        // No longer record this osc in note_off state.\n        AMY_UNSET(synth[mod_osc]->note_off_clock);\n        // Remove default amplitude dependence on velocity when an oscillator is made a modulator.\n        synth[mod_osc]->amp_coefs[COEF_VEL] = 0;\n    }\n    if(d->param == ALGORITHM) {\n        synth[d->osc]->algorithm = d->data.i;\n        // This is a DX7-style control osc; ensure eg_types are set\n        // but only when ALGO is specified, so user can override later if desired->\n        synth[d->osc]->eg_type[0] = ENVELOPE_DX7;\n        synth[d->osc]->eg_type[1] = ENVELOPE_TRUE_EXPONENTIAL;\n    }\n    if(d->param >= ALGO_SOURCE_START && d->param < ALGO_SOURCE_END) {\n        uint16_t which_source = d->param - ALGO_SOURCE_START;\n        synth[d->osc]->algo_source[which_source] = d->data.i;\n        if(AMY_IS_SET(synth[d->osc]->algo_source[which_source])) {\n            int osc = synth[d->osc]->algo_source[which_source];\n            ensure_osc_allocd(osc, NULL);\n            synth[osc]->status = SYNTH_IS_ALGO_SOURCE;\n            // Configure the amp envelope appropriately, just once when named as an algo_source.\n            synth[osc]->eg_type[0] = ENVELOPE_DX7;\n        }\n    }\n    // for global changes, just make the change, no need to update the per-osc synth\n    if(d->param == VOLUME) amy_global.volume = d->data.f;\n    if(d->param == PITCH_BEND) amy_global.pitch_bend = d->data.f;\n    if(d->param == LATENCY) amy_global.latency_ms = d->data.i;\n    if(d->param == TEMPO) { amy_global.tempo = d->data.f; sequencer_recompute(); }\n    if(d->param == EQ_L) amy_global.eq[0] = F2S(powf(10, d->data.f / 20.0));\n    if(d->param == EQ_M) amy_global.eq[1] = F2S(powf(10, d->data.f / 20.0));\n    if(d->param == EQ_H) amy_global.eq[2] = F2S(powf(10, d->data.f / 20.0));\n    if(d->param == ECHO_LEVEL) config_echo(d->data.f, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT);\n    if(d->param == ECHO_DELAY_MS) config_echo(AMY_UNSET_FLOAT, d->data.f, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT);\n    if(d->param == ECHO_MAX_DELAY_MS) config_echo(AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, d->data.f, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT);\n    if(d->param == ECHO_FEEDBACK) config_echo(AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, d->data.f, AMY_UNSET_FLOAT);\n    if(d->param == ECHO_FILTER_COEF) config_echo(AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, d->data.f);\n    if(d->param == CHORUS_LEVEL) config_chorus(d->data.f, UINT16_MAX, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT);\n    if(d->param == CHORUS_MAX_DELAY) config_chorus(AMY_UNSET_FLOAT, AMY_IS_UNSET(d->data.f)?UINT16_MAX : (uint16_t)roundf(d->data.f), AMY_UNSET_FLOAT, AMY_UNSET_FLOAT);\n    if(d->param == CHORUS_LFO_FREQ) config_chorus(AMY_UNSET_FLOAT, UINT16_MAX, d->data.f, AMY_UNSET_FLOAT);\n    if(d->param == CHORUS_DEPTH) config_chorus(AMY_UNSET_FLOAT, UINT16_MAX, AMY_UNSET_FLOAT, d->data.f);\n    if(d->param == REVERB_LEVEL) config_reverb(d->data.f, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT);\n    if(d->param == REVERB_LIVENESS) config_reverb(AMY_UNSET_FLOAT, d->data.f, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT);\n    if(d->param == REVERB_DAMPING) config_reverb(AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, d->data.f, AMY_UNSET_FLOAT);\n    if(d->param == REVERB_XOVER_HZ) config_reverb(AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, d->data.f);\n\n    // triggers / envelopes\n    // the only way a sound is made is if velocity (note on) is >0.\n    // Ignore velocity deltas if we've already received one this frame.  This may be due to a loop in chained_oscs.\n    if(d->param == VELOCITY) {\n        //fprintf(stderr, \"play_delta velocity %.1f osc %d note %.1f time %d\\n\", d->data.f, d->osc, synth[d->osc]->midi_note, d->time);\n        if (d->data.f > 0) { // new note on (even if something is already playing on this osc)\n            // Calculation common to all chained oscs.\n            float note_logfreq = 0;\n            if (AMY_IS_SET(synth[d->osc]->midi_note)) {\n                // synth[osc]->logfreq_coefs[COEF_CONST] = 0;\n                note_logfreq = logfreq_for_midi_note(synth[d->osc]->midi_note);\n            }\n            // Loop through chained oscs\n            uint16_t osc = d->osc;\n            while(AMY_IS_SET(osc)) {\n                synth[osc]->velocity = d->data.f;  // was map_60dB_to_01f\n                if (AMY_IS_SET(synth[osc]->chained_osc)\n                    || synth[osc]->amp_coefs[COEF_VEL] == 0\n                    || synth[osc]->amp_coefs[COEF_VEL] > AMP_THRESH) {\n                    synth[osc]->status = SYNTH_AUDIBLE;\n                    // ** no_amp_001\n                    // an osc came in with a note on.\n                    // start the bp clock\n                    synth[osc]->note_on_clock = amy_global.total_blocks*AMY_BLOCK_SIZE; //esp_timer_get_time() / 1000;\n\n                    // if there was a filter active for this voice, reset it\n                    //if(synth[osc]->filter_type != FILTER_NONE) reset_filter(osc);\n                    // We no longer reset the phase here; instead, we reset phase when an oscillator falls silent.\n                    // But if a trigger_phase is set, use that.\n                    if (AMY_IS_SET(synth[osc]->trigger_phase))\n                        synth[osc]->phase = F2P(synth[osc]->trigger_phase);\n\n                    // restart the waveforms\n                    // Guess at the initial frequency depending only on const & note.  Envelopes not \"developed\" yet.\n                    float initial_logfreq = synth[osc]->logfreq_coefs[COEF_CONST] + synth[osc]->logfreq_coefs[COEF_NOTE] * note_logfreq;\n                    // If we're coming out of note-off, set the freq history for portamento.\n                    //if (AMY_IS_SET(synth[osc]->note_off_clock))\n                    //    msynth[osc]->last_logfreq = initial_logfreq;\n                    // Now we've tested that, we can reset note-off clocks.\n                    AMY_UNSET(synth[osc]->note_off_clock);  // Most recent note event is not note-off.\n                    //AMY_UNSET(synth[osc]->zero_amp_clock);\n                    // Actually, start with an expectation that the voice will be zero amp, give it one frame to prove otherwise.\n#define MIN_ZERO_AMP_TIME_SAMPS (10 * AMY_BLOCK_SIZE)\n                    synth[osc]->zero_amp_clock = amy_global.total_blocks*AMY_BLOCK_SIZE - MIN_ZERO_AMP_TIME_SAMPS + 1 * AMY_BLOCK_SIZE;\n\n                    float initial_freq = freq_of_logfreq(initial_logfreq);\n                    osc_note_on(osc, initial_freq);\n                    // trigger the mod source, if we have one\n                    uint16_t mod_osc = synth[osc]->mod_source;\n                    if(AMY_IS_SET(mod_osc)) {\n                        if (AMY_IS_SET(synth[mod_osc]->trigger_phase))\n                            synth[mod_osc]->phase = F2P(synth[mod_osc]->trigger_phase);\n                        synth[mod_osc]->note_on_clock = amy_global.total_blocks*AMY_BLOCK_SIZE;  // Need a note_on_clock to have envelope work correctly.\n                        switch(synth[mod_osc]->wave) {\n                        case SINE: sine_mod_trigger(mod_osc); break;\n                        case SAW_DOWN: saw_up_mod_trigger(mod_osc); break;\n                        case SAW_UP: saw_down_mod_trigger(mod_osc); break;\n                        case TRIANGLE: triangle_mod_trigger(mod_osc); break;\n                        case PULSE: pulse_mod_trigger(mod_osc); break;\n                        case PCM:\n                        case PCM_LEFT:\n                        case PCM_RIGHT:\n                            pcm_mod_trigger(mod_osc);\n                            break;\n                        case CUSTOM: custom_mod_trigger(mod_osc); break;\n                        }\n                    }\n                }\n                osc = synth[osc]->chained_osc;\n            }\n        } else if(synth[d->osc]->velocity > 0 && d->data.f == 0) { // new note off\n            uint16_t osc = d->osc;\n            while(AMY_IS_SET(osc)) {\n                // DON'T clear velocity, we still need to reference it in decay.\n                //synth[osc]->velocity = 0;\n                switch(synth[osc]->wave) {\n                case KS: ks_note_off(osc); break;\n                case ALGO: algo_note_off(osc); break;\n                case PCM:\n                case PCM_LEFT:\n                case PCM_RIGHT:\n                    pcm_note_off(osc);\n                    break;\n                case AMY_MIDI: amy_send_midi_note_off(osc); break;\n                case CUSTOM: custom_note_off(osc); break;\n                case BYO_PARTIALS:\n                case INTERP_PARTIALS:\n                    AMY_UNSET(synth[osc]->note_on_clock);\n                    synth[osc]->note_off_clock = amy_global.total_blocks*AMY_BLOCK_SIZE;\n                    if(synth[osc]->wave==INTERP_PARTIALS) interp_partials_note_off(osc);\n                    else partials_note_off(osc);\n                    break;\n                default:\n                    // ** no_amp_001\n                    // osc note off, start release\n                    // For now, note_off_clock signals note off BUT ONLY IF IT'S NOT KS, ALGO, PARTIAL, PCM, or CUSTOM.\n                    // I'm not crazy about this, but if we apply it in those cases, the default bp0 amp envelope immediately zeros-out\n                    // those waves on note-off.\n                    AMY_UNSET(synth[osc]->note_on_clock);\n                    if (AMY_IS_UNSET(synth[osc]->note_off_clock)) {\n                        // Only set the note_off_clock (start of release) if we don't already have one.\n                        synth[osc]->note_off_clock = amy_global.total_blocks*AMY_BLOCK_SIZE;\n                    }\n                }\n                osc = synth[osc]->chained_osc;\n            }\n        }\n    }\n    AMY_PROFILE_STOP(PLAY_DELTA)\n}\n\nfloat combine_controls(float *controls, float *coefs) {\n    float result = 0;\n    for (int i = 0; i < NUM_COMBO_COEFS; ++i)\n        result += coefs[i] * controls[i];\n    return result;\n}\n\nfloat amp_combine_controls(float *controls, float *coefs) {\n    // Linear combination of amp coefs is then mapped so that 0 -> 0.001 and 1 -> 1 exponentially.\n    float result = 0;\n    for (int i = 0; i < NUM_COMBO_COEFS; ++i)  {\n        float coef = coefs[i];\n        float val = controls[i];\n        if (i == COEF_CONST)  {val = coef; coef = 1.0f;}   // coef[CONST] is always 1.0f, so swap them.  We're going to map the val.\n        if (i != COEF_MOD) {\n            val = map_60dB_to_01f(MAX(0, val)) - 1.0;    // const, vel, eg0, eg1 get log-compressed.\n            // make 0 mean \"no amp\" and 1 mean \"regular (full) amp\".\n        }\n        result += coef * val;\n    }\n    result = 3.0f * (result);\n    //if (log_amp < -2.0f) {\n    //    // Double the slope below 0.01.\n    //    log_amp = -2.0f + 2.0f * (log_amp + 2.0f);\n    //}\n    result = powf(10.0f, result);\n    if (result <= AMP_THRESH_PLUS)  result = 0; \n    return result;\n}\n\n// apply an mod & bp, if any, to the osc\n#ifdef __EMSCRIPTEN__\n#include \"emscripten/webaudio.h\"\nextern float amy_web_cv_1;\nextern float amy_web_cv_2;\n#endif\nvoid hold_and_modify(uint16_t osc) {\n    AMY_PROFILE_START(HOLD_AND_MODIFY)\n    float ctrl_inputs[NUM_COMBO_COEFS];\n    ctrl_inputs[COEF_CONST] = 1.0f;\n    ctrl_inputs[COEF_NOTE] = (AMY_IS_SET(synth[osc]->midi_note)) ? logfreq_for_midi_note(synth[osc]->midi_note) : 0;\n    ctrl_inputs[COEF_VEL] = synth[osc]->velocity;\n    ctrl_inputs[COEF_EG0] = S2F(compute_breakpoint_scale(osc, 0, 0));\n    ctrl_inputs[COEF_EG1] = S2F(compute_breakpoint_scale(osc, 1, 0));\n    ctrl_inputs[COEF_MOD] = S2F(compute_mod_scale(osc));\n    ctrl_inputs[COEF_BEND] = amy_global.pitch_bend;\n    if(amy_global.config.amy_external_coef_hook != NULL) {\n        ctrl_inputs[COEF_EXT0] = amy_global.config.amy_external_coef_hook(0);\n        ctrl_inputs[COEF_EXT1] = amy_global.config.amy_external_coef_hook(1);\n    } else {\n        #ifdef __EMSCRIPTEN__\n        ctrl_inputs[COEF_EXT0] = amy_web_cv_1;\n        ctrl_inputs[COEF_EXT1] = amy_web_cv_2;\n        #else\n        ctrl_inputs[COEF_EXT0] = 0;\n        ctrl_inputs[COEF_EXT1] = 0;        \n        #endif\n    }\n\n    msynth[osc]->last_pan = msynth[osc]->pan;\n\n    // copy all the modifier variables\n    float logfreq = combine_controls(ctrl_inputs, synth[osc]->logfreq_coefs);\n    if (synth[osc]->portamento_alpha == 0) {\n        msynth[osc]->logfreq = logfreq;\n    } else {\n        msynth[osc]->logfreq = logfreq + synth[osc]->portamento_alpha * (msynth[osc]->last_logfreq - logfreq);\n    }\n    msynth[osc]->last_logfreq = msynth[osc]->logfreq;\n    float filter_logfreq = combine_controls(ctrl_inputs, synth[osc]->filter_logfreq_coefs);\n    if (filter_logfreq < MIN_FILTER_LOGFREQ)  filter_logfreq = MIN_FILTER_LOGFREQ;\n    if (AMY_IS_SET(msynth[osc]->last_filter_logfreq)) {\n        #define MAX_DELTA_FILTER_LOGFREQ_DOWN 2.0\n        float last_logfreq = msynth[osc]->last_filter_logfreq;\n        if (filter_logfreq < last_logfreq - MAX_DELTA_FILTER_LOGFREQ_DOWN) {\n            // Filter cutoff downward slew-rate limit.\n            // See https://github.com/shorepine/amy/issues/126\n            filter_logfreq = last_logfreq - MAX_DELTA_FILTER_LOGFREQ_DOWN;\n        }\n    }\n    msynth[osc]->last_filter_logfreq = filter_logfreq;\n    msynth[osc]->filter_logfreq = filter_logfreq;\n    msynth[osc]->duty = combine_controls(ctrl_inputs, synth[osc]->duty_coefs);\n    msynth[osc]->pan = combine_controls(ctrl_inputs, synth[osc]->pan_coefs);\n    // amp is a special case - coeffs apply in log domain.\n    float new_amp = amp_combine_controls(ctrl_inputs, synth[osc]->amp_coefs);\n    // Also, we advance one frame by writing both last_amp and amp (=next amp)\n    // *Except* for partials, where we allow one frame of ramp-on.\n    if (synth[osc]->wave == PARTIAL) {\n        msynth[osc]->last_amp = msynth[osc]->amp;\n        msynth[osc]->amp = new_amp;\n    } else {\n        // Prevent hard-off on transition to release by updating last_amp only for nonzero new_last_amp.\n        if (new_amp > msynth[osc]->last_amp) {   // was > 0\n            msynth[osc]->last_amp = new_amp;\n        }\n        // Advance the envelopes to the beginning of the next frame.\n        ctrl_inputs[COEF_EG0] = S2F(compute_breakpoint_scale(osc, 0, AMY_BLOCK_SIZE));\n        ctrl_inputs[COEF_EG1] = S2F(compute_breakpoint_scale(osc, 1, AMY_BLOCK_SIZE));\n        msynth[osc]->amp = amp_combine_controls(ctrl_inputs, synth[osc]->amp_coefs);\n    }\n    // synth[osc]->feedback is copied to msynth in pcm_note_on, then used to track note-off for looping PCM.\n    // For PCM, don't re-copy it every loop, or we'd lose track of that flag.  (This means you can't change feedback mid-playback for PCM).\n    // we also check for custom, for tulips' memorypcm \n    if (synth[osc]->wave != PCM && synth[osc]->wave != CUSTOM)  msynth[osc]->feedback = synth[osc]->feedback;\n    msynth[osc]->resonance = synth[osc]->resonance;\n\n    if (osc == 999) {\n        fprintf(stderr, \"h&m: time %f osc %d note %f vel %f eg0 %f eg1 %f ampc %.3f %.3f %.3f %.3f %.3f %.3f lfqc %.3f %.3f %.3f %.3f %.3f %.3f amp %f logfreq %f\\n\",\n               amy_global.total_blocks*AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE, osc,\n               ctrl_inputs[COEF_NOTE], ctrl_inputs[COEF_VEL], ctrl_inputs[COEF_EG0], ctrl_inputs[COEF_EG1],\n               synth[osc]->amp_coefs[0], synth[osc]->amp_coefs[1], synth[osc]->amp_coefs[2], synth[osc]->amp_coefs[3], synth[osc]->amp_coefs[4], synth[osc]->amp_coefs[5],\n               synth[osc]->logfreq_coefs[0], synth[osc]->logfreq_coefs[1], synth[osc]->logfreq_coefs[2], synth[osc]->logfreq_coefs[3], synth[osc]->logfreq_coefs[4], synth[osc]->logfreq_coefs[5],\n               msynth[osc]->amp, msynth[osc]->logfreq);\n\n    }\n    AMY_PROFILE_STOP(HOLD_AND_MODIFY)\n\n}\n\nstatic inline float lgain_of_pan(float pan) {\n    if(pan > 1.f)  pan = 1.f;\n    if(pan < 0)  pan = 0;\n    return dsps_sqrtf_f32_ansi(1.f - pan);\n}\n\nstatic inline float rgain_of_pan(float pan) {\n    if(pan > 1.f)  pan = 1.f;\n    if(pan < 0)  pan = 0;\n    return dsps_sqrtf_f32_ansi(pan);\n}\n\n\nvoid mix_with_pan(SAMPLE *stereo_dest, SAMPLE *mono_src, float pan_start, float pan_end) {\n    AMY_PROFILE_START(MIX_WITH_PAN)\n    /* copy a block_size of mono samples into an interleaved stereo buffer, applying pan */\n    if(AMY_NCHANS==1) {\n        // actually dest is mono, pan is ignored.\n        for(uint16_t i=0;i<AMY_BLOCK_SIZE;i++) { stereo_dest[i] += mono_src[i]; }\n    } else { \n        // stereo\n        SAMPLE gain_l = F2S(lgain_of_pan(pan_start));\n        SAMPLE gain_r = F2S(rgain_of_pan(pan_start));\n        SAMPLE d_gain_l = F2S((lgain_of_pan(pan_end) - lgain_of_pan(pan_start)) / AMY_BLOCK_SIZE);\n        SAMPLE d_gain_r = F2S((rgain_of_pan(pan_end) - rgain_of_pan(pan_start)) / AMY_BLOCK_SIZE);\n        for(uint16_t i=0;i<AMY_BLOCK_SIZE;i++) {\n            stereo_dest[i] += MUL8_SS(gain_l, mono_src[i]);\n            stereo_dest[AMY_BLOCK_SIZE + i] += MUL8_SS(gain_r, mono_src[i]);\n            gain_l += d_gain_l;\n            gain_r += d_gain_r;\n        }\n    }\n    AMY_PROFILE_STOP(MIX_WITH_PAN)\n}\n\n\nSAMPLE render_osc_wave(uint16_t osc, uint8_t core, SAMPLE* buf) {\n    AMY_PROFILE_START(RENDER_OSC_WAVE)\n    // Returns abs max of what it wrote.\n    //fprintf(stderr, \"+render_osc_wave: t=%ld core=%d buf=0x%lx (%f, %f, %f, %f...) osc=%d osc_t=%ld\\n\",\n    //        amy_global.total_blocks, core, buf, S2F(buf[0]), S2F(buf[1]), S2F(buf[2]), S2F(buf[3]),\n    //        osc, synth[osc]->render_clock);\n    SAMPLE max_val = 0;\n    // Only render if osc has not already been rendered this time step e.g. by chained_osc.\n    if (synth[osc]->render_clock != amy_global.total_blocks*AMY_BLOCK_SIZE) {\n        synth[osc]->render_clock = amy_global.total_blocks*AMY_BLOCK_SIZE;\n        // fill buf with next block_size of samples for specified osc.\n        hold_and_modify(osc); // apply bp / mod\n        if(!(msynth[osc]->amp == 0 && msynth[osc]->last_amp == 0)) {\n            if(synth[osc]->wave == NOISE) max_val = render_noise(buf, osc);\n            if(synth[osc]->wave == SAW_DOWN) max_val = render_saw_down(buf, osc);\n            if(synth[osc]->wave == SAW_UP) max_val = render_saw_up(buf, osc);\n            if(synth[osc]->wave == PULSE) max_val = render_pulse(buf, osc);\n            if(synth[osc]->wave == TRIANGLE) max_val = render_triangle(buf, osc);\n            if(synth[osc]->wave == SINE) max_val = render_sine(buf, osc);\n            #ifdef AMY_WAVETABLE\n            if(synth[osc]->wave == WAVETABLE) max_val = render_wavetable(buf, osc);\n            #endif\n            if(synth[osc]->wave == AUDIO_IN0) max_val = render_audio_in(buf, osc, 0);\n            if(synth[osc]->wave == AUDIO_IN1) max_val = render_audio_in(buf, osc, 1);\n            if(synth[osc]->wave == AUDIO_EXT0) max_val = render_external_audio_in(buf, osc, 0);\n            if(synth[osc]->wave == AUDIO_EXT1) max_val = render_external_audio_in(buf, osc, 1);\n            if(synth[osc]->wave == AMY_MIDI) max_val = 1;\n            if(synth[osc]->wave == KS) {\n                if(amy_global.config.ks_oscs) {\n                    max_val = render_ks(buf, osc);\n                }\n            }\n            if(pcm_samples)\n                if (AMY_WAVE_IS_PCM(synth[osc]->wave)) max_val = render_pcm(buf, osc);\n            if(synth[osc]->wave == ALGO) max_val = render_algo(buf, osc, core);\n            if(AMY_HAS_PARTIALS) {\n                if(synth[osc]->wave == BYO_PARTIALS || synth[osc]->wave == INTERP_PARTIALS)\n                    max_val = render_partials(buf, osc);\n            }\n        }\n        if(AMY_HAS_CUSTOM) {\n            if(synth[osc]->wave == CUSTOM) max_val = render_custom(buf, osc);\n        }\n        if (synth[osc]->wave != SILENT) {\n            // apply filter to osc if set\n            if (synth[osc]->filter_type != FILTER_NONE) {\n                max_val = filter_process(per_osc_fb[core], osc, max_val);\n                // Maybe clear filter state here if we've finshed this osc.\n                if (synth[osc]->status != SYNTH_AUDIBLE) {\n                    reset_filter(osc);  // (f)\n                }\n            }\n        }\n        if(AMY_IS_SET(synth[osc]->chained_osc)) {\n            // Stack oscillators - render next osc into same buffer.\n            uint16_t chained_osc = synth[osc]->chained_osc;\n            if (synth[chained_osc]->status == SYNTH_AUDIBLE) {  // We have to recheck this since we're bypassing the skip in amy_render.\n                SAMPLE new_max_val = render_osc_wave(chained_osc, core, buf);\n                if (new_max_val > max_val)  max_val = new_max_val;\n            }\n        }\n        // Unlike other oscs, SILENT osc is processed *after* collecting chained_oscs\n        if (synth[osc]->wave == SILENT) {\n            max_val = render_envelope(buf, osc);\n            // apply filter to osc if set\n            if (synth[osc]->filter_type != FILTER_NONE) {\n                max_val = filter_process(per_osc_fb[core], osc, max_val);\n                // Maybe clear filter state here if we've finshed this osc.\n                if (synth[osc]->status != SYNTH_AUDIBLE) {\n                    reset_filter(osc);  // (f)\n                }\n            }\n        }\n        // note: Code transplanted here from hold_and_modify() to distinguish actual zero output\n        // from zero-amplitude (but maybe inheriting values from chained_oscs).\n        // Stop oscillators if amp is zero for several frames in a row.\n        // Note: We can't wait for the note off because we need to turn off PARTIAL oscs when envelopes end, even if no note off.\n//#define MIN_ZERO_AMP_TIME_SAMPS (5 * AMY_BLOCK_SIZE)\n        if(AMY_IS_SET(synth[osc]->zero_amp_clock)) {\n            // We terminate zero_amp_clock if the max_val goes above threshold *or* if it's the start of the note and it's above zero.\n            if (max_val >= F2S(AMP_THRESH)\n                || (max_val > 0\n                    && ((amy_global.total_blocks * AMY_BLOCK_SIZE) < (synth[osc]->note_on_clock + AMY_BLOCK_SIZE)))) {\n                AMY_UNSET(synth[osc]->zero_amp_clock);\n            } else {\n                if ( synth[osc]->terminate_on_silence\n                     && ((amy_global.total_blocks*AMY_BLOCK_SIZE - synth[osc]->zero_amp_clock)\n                         >= MIN_ZERO_AMP_TIME_SAMPS)) {\n                    //printf(\"h&m: time %.3f osc %d OFF\\n\", amy_global.time, osc);\n                    // Oscillator has fallen silent, stop executing it.\n                    uint16_t osc_to_stop = osc;  // Type must match synthinfo.chained_osc\n                    while (AMY_IS_SET(osc_to_stop)) {\n                        synth[osc_to_stop]->status = SYNTH_INAUDIBLE;  // It *could* come back...\n                        // 2026-03-22: It's necessary to reset these two fields in msynth to get OwBass to restart without click...\n                        msynth[osc_to_stop]->filter_logfreq = 0;  // (a)\n                        msynth[osc_to_stop]->resonance = 0.7f;  // (b)\n                        //reset_filter(osc_to_stop);                // (c)\n                        //AMY_UNSET(msynth[osc_to_stop]->last_filter_logfreq);  // (d)\n                        // .. but force it to start at zero phase next time.\n                        synth[osc_to_stop]->phase = 0;\n                        osc_to_stop = synth[osc_to_stop]->chained_osc;\n                    }\n                    // <none>                      err=-33.6 dB\n                    //                   (d)       err=-33.6 dB\n                    //                         (e) err=-35.6 dB\n                    // (a) + (b)             + (e) err=-35.6 dB\n                    // (a)                         err=-41.1 dB\n                    //       (b)                   err=-37.7 dB\n                    // (a) + (b)                   err=-100.0 dB\n                    // (a) + (b)       + (d)       err=-100.0 dB\n                    //             (c)             err=-50.5 dB\n                    //             (c)       + (e) err=-50.5 dB\n                    // (a)       + (c)             err=-50.5 dB\n                    // (a)       + (c)       + (e) err=-50.5 dB\n                    // (a) + (b) + (c)             err=-50.5 dB\n                    // (a) + (b) + (c)       + (e) err=-50.5 dB\n                    // (a) + (b) + (c) + (d) + (e) err=-50.5 dB\n                    //\n                    // Preserve the open-filter ring-out, then clear the filter state:\n                    // (a) + (b) + (f)             err=-87.8 dB   just as good as -100\n                    //             (f)             err=-35.8 dB   cutoff delayed, same prob\n                    //\n                    // (c) always gives -50.5 .. so emptying the filter state negates the impact of a,b,e\n                    // (d) never makes any difference .. so it's not slew rate?\n                }\n            }\n        } else if (max_val < F2S(AMP_THRESH)) {\n            synth[osc]->zero_amp_clock = amy_global.total_blocks*AMY_BLOCK_SIZE;\n        }\n        //fprintf(stderr, \"render_osc_wave: t=%.3f osc=%d max_val %.6f\\n\", amy_global.time, osc, S2F(max_val));\n    }\n    AMY_PROFILE_STOP(RENDER_OSC_WAVE)\n    //fprintf(stderr, \"-render_osc_wave: t=%ld core=%d buf=0x%lx (%f, %f, %f, %f...) osc=%d osc_t=%ld\\n\",\n    //    amy_global.total_blocks*AMY_BLOCK_SIZE, core, buf, S2F(buf[0]), S2F(buf[1]), S2F(buf[2]), S2F(buf[3]),\n    //    osc, synth[osc]->render_clock);\n    return max_val;\n}\n\nvoid amy_render(uint16_t start, uint16_t end, uint8_t core) {\n    AMY_PROFILE_START(AMY_RENDER)\n    for(uint16_t i=0;i<AMY_BLOCK_SIZE*AMY_NCHANS;i++) { fbl[core][i] = 0; }\n    SAMPLE max_max = 0;\n    for(uint16_t osc=start; osc<end; osc++) {\n        if(synth[osc] != NULL && synth[osc]->status == SYNTH_AUDIBLE) { // skip oscs that are silent or mod sources from playback\n            bzero(per_osc_fb[core], AMY_BLOCK_SIZE * sizeof(SAMPLE));\n            SAMPLE max_val = render_osc_wave(osc, core, per_osc_fb[core]);\n            // check it's not off, just in case. todo, why do i care?\n            // apply filter to osc if set\n            if(//synth[osc]->status == SYNTH_AUDIBLE &&  // (e)\n               synth[osc]->filter_type != FILTER_NONE) {\n                //fprintf(stderr, \"time %.3f osc %d filter_type %d\\n\",\n                //        (float)amy_global.total_blocks*AMY_BLOCK_SIZE / AMY_SAMPLE_RATE,\n                //        osc, synth[osc]->filter_type);\n                //max_val = filter_process(per_osc_fb[core], osc, max_val);\n                //// Maybe clear filter state here if we've finshed this osc.\n                //if (synth[osc]->status != SYNTH_AUDIBLE) {\n                //    reset_filter(osc);  // (f)\n                //}\n            }\n            if (synth[osc]->status != SYNTH_AUDIBLE) {\n                reset_modosc(msynth[osc]);  // (g)  This makes a difference, but not clicks\n                reset_osc_state(synth[osc]);\n            }\n            uint8_t handled = 0;\n            if(amy_global.config.amy_external_render_hook != NULL) {\n                handled = amy_global.config.amy_external_render_hook(osc, per_osc_fb[core], AMY_BLOCK_SIZE);\n            } else {\n                #ifdef __EMSCRIPTEN__\n                // TODO -- pass the buffer to a JS shim using the new bytes support, we could use this to visualize CV output\n                #endif\n            }\n            // only mix the audio in if the external hook did not handle it\n            if(!handled) mix_with_pan(fbl[core], per_osc_fb[core], msynth[osc]->last_pan, msynth[osc]->pan);\n            if (max_val > max_max) max_max = max_val;\n        } // end if audible\n    }\n    core_max[core] = max_max;\n\n    if(AMY_HAS_CHORUS && core == 0) {\n        ensure_osc_allocd(CHORUS_MOD_SOURCE, NULL);\n        hold_and_modify(CHORUS_MOD_SOURCE);\n        if(amy_global.chorus.level!=0)  {\n            bzero(delay_mod, AMY_BLOCK_SIZE * sizeof(SAMPLE));\n            render_osc_wave(CHORUS_MOD_SOURCE, 0 /* core */, delay_mod);\n        }\n    }\n\n    if (amy_global.debug_flag) {\n        amy_global.debug_flag = 0;  // Only do this once each time debug_flag is set.\n        SAMPLE smax = scan_max(fbl[core], AMY_BLOCK_SIZE);\n        fprintf(stderr, \"time %\" PRIu32 \" core %d max_max=%.3f post-eq max=%.3f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE, core, S2F(max_max), S2F(smax));\n    }\n\n    AMY_PROFILE_STOP(AMY_RENDER)\n\n}\n\n\n// this plays just the next delta if it's time.\nvoid amy_execute_delta() {\n    AMY_PROFILE_START(AMY_EXECUTE_DELTAS)\n    // check to see which sounds to play\n    uint32_t sysclock = amy_sysclock();\n    amy_grab_lock();\n\n    // find any deltas that need to be played from the (in-order) queue\n    struct delta *d = amy_global.delta_queue;\n    if(d && sysclock >= d->time) {\n        play_delta(d);\n        d = delta_release(d);\n        amy_global.delta_qsize--;\n    }\n    amy_global.delta_queue = d;\n\n    amy_release_lock();\n\n    AMY_PROFILE_STOP(AMY_EXECUTE_DELTAS)\n\n}\n\n// this takes scheduled deltas and plays them at the right time\nvoid amy_execute_deltas() {\n    AMY_PROFILE_START(AMY_EXECUTE_DELTAS)\n    // check to see which sounds to play\n    uint32_t sysclock = amy_sysclock();\n    amy_grab_lock();\n\n    // find any deltas that need to be played from the (in-order) queue\n    struct delta *d = amy_global.delta_queue;\n    while(d && sysclock >= d->time) {\n        play_delta(d);\n        d = delta_release(d);\n        amy_global.delta_qsize--;\n    }\n    amy_global.delta_queue = d;\n\n    amy_release_lock();\n\n    AMY_PROFILE_STOP(AMY_EXECUTE_DELTAS)\n\n}\n\n\n\n// called by the audio render loop to alert JS (and then python) that a block has been rendered\nvoid amy_block_processed(void) {\n\n#ifdef __EMSCRIPTEN__\n    EM_ASM({\n        if(typeof amy_block_processed_js_hook === 'function') {\n            amy_block_processed_js_hook();\n        }\n    });\n#else\n    if(amy_global.config.amy_external_block_done_hook != NULL) {\n        amy_global.config.amy_external_block_done_hook();\n    }\n#endif\n}\n\nvoid amy_process_event(amy_event *e) {\n    peek_stack(\"process_event\");\n    if(AMY_IS_SET(e->sequence[SEQUENCE_TICK]) || AMY_IS_SET(e->sequence[SEQUENCE_PERIOD]) || AMY_IS_SET(e->sequence[SEQUENCE_TAG])) {\n        uint8_t added = sequencer_add_event(e);\n        (void)added; // we don't need to do anything with this info at this time\n        e->status = EVENT_SEQUENCE;\n    } else if (AMY_IS_SET(e->reset_osc) && (e->reset_osc & RESET_PATCH) && AMY_IS_SET(e->patch_number)) {\n        // We're resetting just one patch, do it now.  But RESET_PATCH with no patch_number should propagate to deltas.\n        patches_reset_patch(e->patch_number);\n        AMY_UNSET(e->reset_osc);\n    } else {\n        // if time is set, play then\n        // if time and latency is set, play in time + latency\n        // if time is not set, play now\n        // if time is not set + latency is set, play in latency\n        uint32_t playback_time = amy_sysclock();\n        if(AMY_IS_SET(e->time)) playback_time = e->time;\n        playback_time += amy_global.latency_ms;\n        e->time = playback_time;\n        e->status = EVENT_SCHEDULED;\n    }\n}\n\nint16_t * amy_fill_buffer() {\n    AMY_PROFILE_START(AMY_FILL_BUFFER)\n    #ifdef __EMSCRIPTEN__\n    // post a message to the main thread of the audioworklet (amy main, in this case) that a block has been finished\n    //emscripten_audio_worklet_post_function_v(0, amy_block_processed);\n    #else\n    amy_block_processed();\n    #endif\n\n    // Double-buffer the output block.\n    if (output_block == output_block_0)  output_block = output_block_1;\n    else output_block = output_block_0;\n\n    // mix results from both cores.\n    //SAMPLE max_val = core_max[0];\n    #ifdef AMY_DUALCORE\n        for (int16_t i=0; i < AMY_BLOCK_SIZE * AMY_NCHANS; ++i)  fbl[0][i] += fbl[1][i];\n    //    if (core_max[1] > max_val)  max_val = core_max[1];\n    #endif\n    // Apply global processing only if there is some signal.\n    //if (max_val > 0) {      // NO - see #629\n        // apply the eq filters if there is some signal and EQ is non-default.\n        if (amy_global.eq[0] != F2S(1.0f) || amy_global.eq[1] != F2S(1.0f) || amy_global.eq[2] != F2S(1.0f)) {\n            parametric_eq_process(fbl[0]);\n        }\n        if(AMY_HAS_CHORUS) {\n            // apply chorus.\n            if(amy_global.chorus.level > 0 && chorus_delay_lines[0] != NULL) {\n                // apply time-varying delays to both chans.\n                // delay_mod_val, the modulated delay amount, is set up before calling render_*.\n                SAMPLE scale = F2S(1.0f);\n                for (int16_t c=0; c < AMY_NCHANS; ++c) {\n                    apply_variable_delay(fbl[0] + c * AMY_BLOCK_SIZE, chorus_delay_lines[c],\n                                         delay_mod, scale, amy_global.chorus.level, 0);\n                    // flip delay direction for alternating channels.\n                    scale = -scale;\n                }\n            }\n        }\n    //}\n    if (AMY_HAS_ECHO) {\n        // Apply echo.\n        if (amy_global.echo.level > 0 && echo_delay_lines[0] != NULL ) {\n            for (int16_t c=0; c < AMY_NCHANS; ++c) {\n                apply_fixed_delay(fbl[0] + c * AMY_BLOCK_SIZE, echo_delay_lines[c], amy_global.echo.delay_samples, amy_global.echo.level, amy_global.echo.feedback, amy_global.echo.filter_coef);\n            }\n        }\n    }\n    if(AMY_HAS_REVERB) {\n        // apply reverb.\n        if(amy_global.reverb.level > 0) {\n            if(AMY_NCHANS == 1) {\n                stereo_reverb(fbl[0], NULL, fbl[0], NULL, AMY_BLOCK_SIZE, amy_global.reverb.level);\n            } else {\n                stereo_reverb(fbl[0], fbl[0] + AMY_BLOCK_SIZE, fbl[0], fbl[0] + AMY_BLOCK_SIZE, AMY_BLOCK_SIZE, amy_global.reverb.level);\n            }\n        }\n    }\n    // global volume is supposed to max out at 10, so scale by 0.1.\n    SAMPLE volume_scale = MUL4_SS(F2S(0.1f), F2S(amy_global.volume));\n    for(int16_t i=0; i < AMY_BLOCK_SIZE; ++i) {\n        for (int16_t c=0; c < AMY_NCHANS; ++c) {\n\n            // Convert the mixed sample into the int16 range, applying overall gain.\n            SAMPLE fsample = MUL8_SS(volume_scale, fbl[0][i + c * AMY_BLOCK_SIZE]);\n\n            // One-pole high-pass filter to remove large low-frequency excursions from\n            // some FM patches. b = [1 -1]; a = [1 -0.995]\n            //SAMPLE new_state = fsample + SMULR6(F2S(0.995f), amy_global.hpf_state);  // High-output-range, rounded MUL is critical here.\n#ifdef AMY_HPF_OUTPUT\n            SAMPLE new_state = fsample + amy_global.hpf_state\n                - SHIFTR(amy_global.hpf_state + SHIFTR(F2S(1.0), 16), 8);  // i.e. 0.9961*hpf_state\n            fsample = new_state - amy_global.hpf_state;\n            amy_global.hpf_state = new_state;\n#endif\n\n            // soft clipping.\n            int positive = 1;\n            if (fsample < 0) {\n                positive = 0;\n                // avoid fabs()\n                fsample = -fsample;\n            }\n\n            int32_t uintval = S2L(fsample);\n            if (uintval >= FIRST_NONLIN) {\n                if (uintval >= FIRST_HARDCLIP) {\n                    uintval = SAMPLE_MAX;\n                } else {\n                    uintval = clipping_lookup_table[uintval - FIRST_NONLIN];\n                }\n            }\n            int16_t sample;\n\n            // TODO -- the esp stuff here could sit outside of AMY\n            // For some reason, have to drop a bit to stop hard wrapping on esp?\n#if defined(ESP_PLATFORM) || defined(__IMXRT1062__)\n                uintval >>= 1;\n            #endif\n            if (positive) {\n              sample = uintval;\n            } else {\n              sample = -uintval;\n            }\n            if(AMY_NCHANS == 1) {\n                #ifdef ESP_PLATFORM\n                    // esp32's i2s driver has this bug\n                    output_block[i ^ 0x01] = sample;\n                #else\n                    output_block[i] = sample;\n                #endif\n            } else {\n                output_block[(AMY_NCHANS * i) + c] = sample;\n            }\n        }\n    }\n\n    // Handle sampling after block is rendered\n    if(amy_global.transfer_flag==AMY_TRANSFER_TYPE_SAMPLE) {\n        uint32_t bytes_per_frame = AMY_NCHANS * sizeof(int16_t);\n        uint32_t byte_offset = amy_global.transfer_stored_bytes;\n        uint32_t bytes_to_copy = AMY_BLOCK_SIZE * bytes_per_frame;\n        // Crop the bytes to copy if this block would exceed the requested length.\n        if(byte_offset + bytes_to_copy >= amy_global.transfer_length_bytes) {\n            bytes_to_copy = amy_global.transfer_length_bytes - byte_offset;\n        }\n        if(amy_global.transfer_file_handle==AMY_BUS_OUTPUT) {\n            // copy block[] to amy_global.transfer_storage\n            memcpy(amy_global.transfer_storage + byte_offset, output_block, bytes_to_copy);\n        } else if(amy_global.transfer_file_handle==AMY_BUS_AUDIO_IN) {\n            // copy audio input buffer to storage\n            memcpy(amy_global.transfer_storage + byte_offset, amy_in_block, bytes_to_copy);\n        }\n        amy_global.transfer_stored_bytes += AMY_BLOCK_SIZE * AMY_NCHANS * sizeof(int16_t);\n        if(amy_global.transfer_stored_bytes >= amy_global.transfer_length_bytes) {   \n            amy_global.transfer_flag = AMY_TRANSFER_TYPE_NONE;\n        }\n    }\n    amy_global.total_blocks++;\n    amy_global.time = amy_global.total_blocks*AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE;\n\n    AMY_PROFILE_STOP(AMY_FILL_BUFFER)\n\n    amy_out_block = output_block;\n    return output_block;\n}\n\nvoid amy_reset_sysclock() {\n    amy_global.total_blocks = 0;\n    amy_global.time = 0;\n    amy_global.sequencer_tick_count = 0;\n    sequencer_recompute();\n}\n\n\n/// Delta pool management\n\nstruct delta *free_deltas_pool = NULL;\n\n#define MAX_DELTA_BLOCKS 16\nstruct delta *delta_blocks[MAX_DELTA_BLOCKS];\nint next_delta_block = 0;\n\n#define DELTA_BLOCK_SIZE 2048\n\nstruct delta *deltas_pool_alloc(int max_delta_pool_size, struct delta *tail) {\n    struct delta *new_pool = (struct delta *)malloc_caps(max_delta_pool_size * sizeof(struct delta),\n                                                         amy_global.config.ram_caps_synth);\n    struct delta *d = new_pool;\n    // Link all the deltas together\n    for (int i = 1; i < max_delta_pool_size; ++i) {\n        d->next = d + 1;\n        d->osc = 0;\n        d->data.i = 0;\n        d->param = NO_PARAM;\n        d->time = UINT32_MAX - 1;\n        d = d->next;\n    }\n    d->next = tail;  // join up the end of the chain with passed-in chain (or NULL).\n    return new_pool;\n}\n\nvoid deltas_add_pool_block(void) {\n    //fprintf(stderr, \"deltas_add_pool_block %d\\n\", next_delta_block);\n    if (next_delta_block >= MAX_DELTA_BLOCKS) {\n        fprintf(stderr, \"**PANIC: Ran out of deltas (%d blocks of %d deltas)\\n\", MAX_DELTA_BLOCKS, DELTA_BLOCK_SIZE);\n        abort();\n    }\n    free_deltas_pool = delta_blocks[next_delta_block++] = deltas_pool_alloc(DELTA_BLOCK_SIZE, free_deltas_pool);\n}\n\nvoid deltas_pool_init() {\n    deltas_pool_free();\n    deltas_add_pool_block();\n}\n\nvoid deltas_pool_free() {\n    for (int i = 0; i < next_delta_block; ++i) {\n        free(delta_blocks[i]);\n    }\n    next_delta_block = 0;\n    free_deltas_pool = NULL;\n}\n\nstruct delta *delta_get(struct delta *from) {\n    // fetch the next free delta, copy in values if a reference is provided.\n    struct delta *d = free_deltas_pool;\n    if (d == NULL)  {\n        deltas_add_pool_block();\n        d = free_deltas_pool;\n    }\n    free_deltas_pool = d->next;\n    if (from != NULL) {\n        d->data.i = from->data.i;\n        d->param = from->param;\n        d->time = from->time;\n        d->osc = from->osc;\n        // don't copy from->next\n    }\n    d->next = NULL;\n    return d;\n}\n\nstruct delta *delta_release(struct delta *d) {\n    // return a delta to the pool.  Returns the next value, for ease closing up\n    struct delta *next_delta = d->next;\n    d->next = free_deltas_pool;\n    d->osc = 0;\n    d->data.i = 0;\n    d->param = NO_PARAM;\n    d->time = UINT32_MAX - 1;\n\n    free_deltas_pool = d;\n\n    return next_delta;\n}\n\nvoid delta_release_list(struct delta *d) {\n    // return a delta and all its sequestrae to the pool.\n    while(d)  d = delta_release(d);\n}\n\nint32_t delta_list_len(struct delta *d) {\n    int32_t len = 0;\n    while(d) {\n        ++len;\n        d = d->next;\n    }\n    return len;\n}\n\nint32_t delta_num_free() {\n    return delta_list_len(free_deltas_pool);\n}\n"
  },
  {
    "path": "src/amy.h",
    "content": "#ifndef __AMY_H\n#define __AMY_H\n\n#include <stdio.h>\n#include <stddef.h>\n#include <stdint.h>\n#include <stdbool.h>\n#include <stdlib.h>\n#include <math.h>\n#include <string.h>\n#ifdef _WIN32\n#include <io.h>\n#include <intrin.h>\n#define bzero(b,len) memset((b), 0, (len))\n#define bcopy(src,dest,len) memmove((dest), (src), (len))\n#define srand48(x) srand((unsigned int)(x))\n#define drand48() ((double)rand() / RAND_MAX)\nstatic inline int __builtin_clz(unsigned int x) {\n    unsigned long index;\n    return _BitScanReverse(&index, x) ? (31 - (int)index) : 32;\n}\n#else\n#include <unistd.h>\n#endif\n#include <inttypes.h>\n\n#ifndef __EMSCRIPTEN__\n#ifdef _WIN32\n#include <windows.h>\nextern CRITICAL_SECTION amy_queue_lock;\n#elif defined _POSIX_THREADS\n#include <pthread.h>\nextern pthread_mutex_t amy_queue_lock;\n#endif\n#endif\n\n\n// This is for baked in samples that come with AMY. The header file written by `amy/headers.py` writes this.\ntypedef struct {\n    uint32_t offset;\n    uint32_t length;\n    uint32_t loopstart;\n    uint32_t loopend;\n    uint8_t midinote;\n} pcm_map_t;\n\n\n// Built-in PCM data declarations (provided by src/pcm_tiny.h).\nextern const int16_t pcm[];\nextern const pcm_map_t pcm_map[];\nextern const uint16_t pcm_samples;\nextern const uint16_t pcm_wavetable_base;\nextern const uint16_t pcm_wavetable_samples;\nextern const uint32_t pcm_wavetable_len;\n\n#if (defined(ESP_PLATFORM) || defined(PICO_ON_DEVICE) || defined(ARDUINO) || defined(__IMXRT1062__) || defined(ARDUINO_ARCH_RP2040) ||defined(ARDUINO_ARCH_RP2350))\n#define AMY_MCU\n#endif\n\n#define MAX_FILENAME_LEN 127\n\n\n\n// Set block size and SR. We try for 256/44100, but some platforms don't let us:\n#ifdef AMY_DAISY\n#define AMY_BLOCK_SIZE 128\n#define BLOCK_SIZE_BITS 7 // log2 of BLOCK_SIZE\n#else\n#define AMY_BLOCK_SIZE 256\n#define BLOCK_SIZE_BITS 8 // log2 of BLOCK_SIZE\n#endif\n\n#ifdef AMY_DAISY\n#define AMY_SAMPLE_RATE 48000\n#elif defined __EMSCRIPTEN__\n#define AMY_SAMPLE_RATE 48000\n#else\n#define AMY_SAMPLE_RATE 44100 \n#endif\n\n#define PCM_AMY_SAMPLE_RATE 22050\n\n// Transfer types.\n#define AMY_TRANSFER_TYPE_NONE 0\n#define AMY_TRANSFER_TYPE_AUDIO 1\n#define AMY_TRANSFER_TYPE_FILE 2\n#define AMY_TRANSFER_TYPE_SAMPLE 3\n\n#define AMY_PCM_TYPE_ROM 0\n#define AMY_PCM_TYPE_FILE 1\n#define AMY_PCM_TYPE_MEMORY 2\n\n// File-streaming buffer size multiplier (in blocks).\n#define PCM_FILE_BUFFER_MULT 8\n\n\n#define AMY_BUS_OUTPUT 1\n#define AMY_BUS_AUDIO_IN 2\n\n// Always use fixed point. You can remove this if you want float\n#define AMY_USE_FIXEDPOINT\n\n\n// upper bounds for static arrays.\n#define AMY_MAX_CORES 2          \n#define AMY_MAX_CHANNELS 2\n\n// Always use 2 channels. Clients that want mono can deinterleave\n#define AMY_NCHANS 2\n\n\n// Use dual cores on supported platforms\n#if (defined (ESP_PLATFORM) || defined (ARDUINO_ARCH_RP2040) ||defined(ARDUINO_ARCH_RP2350))\n#define AMY_DUALCORE\n#define AMY_CORES 2\n#else\n#define AMY_CORES 1\n#endif\n\n#define AMY_HAS_STARTUP_BLEEP (amy_global.config.features.startup_bleep)\n#define AMY_HAS_REVERB (amy_global.config.features.reverb)\n#define AMY_HAS_AUDIO_IN (amy_global.config.features.audio_in)\n#define AMY_HAS_I2S (amy_global.config.audio == AMY_AUDIO_IS_I2S)\n#define AMY_HAS_DEFAULT_SYNTHS (amy_global.config.features.default_synths)\n#define AMY_HAS_CHORUS (amy_global.config.features.chorus)\n#define AMY_HAS_ECHO (amy_global.config.features.echo)\n#define AMY_KS_OSCS amy_global.config.ks_oscs\n#define AMY_HAS_PARTIALS  (amy_global.config.features.partials)\n#define AMY_HAS_CUSTOM  (amy_global.config.features.custom)\n#define AMY_OSCS amy_global.config.max_oscs\n\n// On which MIDI channel to install the default MIDI drums handler.\n#define AMY_MIDI_CHANNEL_DRUMS 10\n\n\n#ifdef ESP_PLATFORM\n#include <esp_heap_caps.h>\n#endif\n\n#ifndef MALLOC_CAP_DEFAULT\n#define MALLOC_CAP_DEFAULT 0\n#endif\n\n\n// 0.5 Hz modulation at 50% depth of 320 samples (i.e., 80..240 samples = 2..6 ms), mix at 0 (inaudible).\n#define CHORUS_DEFAULT_LFO_FREQ 0.5\n#define CHORUS_DEFAULT_MOD_DEPTH 0.5\n#define CHORUS_DEFAULT_LEVEL 0\n#define CHORUS_DEFAULT_MAX_DELAY 320\n// Chorus gets is modulator from a special osc one beyond the normal range.\n#define CHORUS_MOD_SOURCE AMY_OSCS\n\n// center frequencies for the EQ\n#define EQ_CENTER_LOW 800.0\n#define EQ_CENTER_MED 2500.0\n#define EQ_CENTER_HIGH 7000.0\n\n// reverb setup\n#define REVERB_DEFAULT_LEVEL 0\n#define REVERB_DEFAULT_LIVENESS 0.85f\n#define REVERB_DEFAULT_DAMPING 0.5f\n#define REVERB_DEFAULT_XOVER_HZ 3000.0f\n\n// echo setup,  Levels etc are SAMPLE (fxpoint), delays are in samples.\n#define ECHO_DEFAULT_LEVEL 0\n#define ECHO_DEFAULT_DELAY_MS  500.f\n// Delay line allocates in 2^n samples at 44k; 743ms is just under 32768 samples.\n#define ECHO_DEFAULT_MAX_DELAY_MS 743.f\n#define ECHO_DEFAULT_FEEDBACK 0\n#define ECHO_DEFAULT_FILTER_COEF 0\n\n#define AMY_SEQUENCER_PPQ 48\n\n#define DELAY_LINE_LEN 512  // 11 ms @ 44 kHz\n\n// D is how close the sample gets to the clip limit before the nonlinearity engages.  \n// So D=0.1 means output is linear for -0.9..0.9, then starts clipping.\n#define CLIP_D 0.1\n\n#define MAX_VOLUME 11.0\n\n#define AMP_THRESH 0.001f\n// A little bit more than 0.001 to avoid FP issues with exactly 0.001.\n#define AMP_THRESH_PLUS 0.0011f\n\n// Rest of amy setup\n#define SAMPLE_MAX 32767\n#define MAX_ALGO_OPS 6 \n#define DEFAULT_NUM_BREAKPOINTS 8\n// We need a max on the number of breakpoints to lay out the params enum statically.  Otherwise, it's dynamic.\n#define MAX_BREAKPOINTS 24\n#define MAX_BPS MAX_BREAKPOINTS\n#define MAX_BREAKPOINT_SETS 2\n#define THREAD_USLEEP 500\n#define AMY_BYTES_PER_SAMPLE 2\n// We need some fixed vectors of per-instrument vectors.\n#define MAX_VOICES_PER_INSTRUMENT 32\n\n// Constants for filters.c, needed for synth structure.\n#define FILT_NUM_DELAYS  4    // Need 4 memories for DFI filters, if used (only 2 for DFII).\n\ntypedef int16_t output_sample_type;\n\n// Magic value for \"0 Hz\" in log-scale.\n#define ZERO_HZ_LOG_VAL -99.0\n// Frequency of Midi note 0, used to make logfreq scales.\n// Have 0 be midi 69, A4, 440.0\n#define ZERO_LOGFREQ_IN_HZ 440.0  // 261.63\n#define ZERO_MIDI_NOTE 69  // 60\n#define MIN_FILTER_LOGFREQ -2.75  // -2.0  // LPF cutoff cannot go below w = 0.01 rad/samp in filters.c = 72 Hz, so clip it here at ~65 Hz.\n\n#define NUM_COMBO_COEFS 9  // 9 control-mixing params: const, note, velocity, env1, env2, mod, pitchbend, ext0, ext1\nenum coefs{\n    COEF_CONST = 0,\n    COEF_NOTE = 1,\n    COEF_VEL = 2,\n    COEF_EG0 = 3,\n    COEF_EG1 = 4,\n    COEF_MOD = 5,\n    COEF_BEND = 6,\n    COEF_EXT0 = 7,\n    COEF_EXT1 = 8,\n};\n\n#define MAX_MESSAGE_LEN 1024\n#define MAX_PARAM_LEN 256\n// synth[].filter_type values\n#define FILTER_NONE 0\n#define FILTER_LPF 1\n#define FILTER_BPF 2\n#define FILTER_HPF 3\n#define FILTER_LPF24 4\n// synth[].wave values\n#define SINE 0\n#define PULSE 1\n#define SAW_DOWN 2\n#define SAW_UP 3\n#define TRIANGLE 4\n#define NOISE 5\n#define KS 6\n#define PCM 7\n#define ALGO 8\n#define PARTIAL 9\n#define BYO_PARTIALS 10\n#define INTERP_PARTIALS 11\n#define AUDIO_IN0 12\n#define AUDIO_IN1 13\n#define AUDIO_EXT0 14\n#define AUDIO_EXT1 15\n#define AMY_MIDI 16\n#define PCM_LEFT 17\n#define PCM_RIGHT 18\n#define PCM_MIX 7 // same as PCM\n#define WAVETABLE 19\n#define SILENT 20  // A control osc for applying filte and env without contributing waveform\n#define CUSTOM 21\n#define WAVE_OFF 22\n\n#define AMY_WAVE_IS_PCM(w) ((w) == PCM || (w) == PCM_LEFT || (w) == PCM_RIGHT)\n\n// synth[].status values\n#define SYNTH_OFF 0\n#define SYNTH_AUDIBLE 1\n#define SYNTH_INAUDIBLE 2\n#define SYNTH_IS_MOD_SOURCE 3\n#define SYNTH_IS_ALGO_SOURCE 4\n\n// event.status values\n#define EVENT_EMPTY 0\n#define EVENT_SCHEDULED 1\n#define EVENT_TRANSFER_DATA 2\n#define EVENT_SEQUENCE 3\n\n// note_source values\n#define NOTE_SOURCE_MIDI 2\n\n// Envelope generator types (for synth[osc].env_type[eg]).\n#define ENVELOPE_NORMAL 0\n#define ENVELOPE_LINEAR 1\n#define ENVELOPE_DX7 2\n#define ENVELOPE_TRUE_EXPONENTIAL 3\n\n// Sequence enum\n#define SEQUENCE_TICK 0\n#define SEQUENCE_PERIOD 1\n#define SEQUENCE_TAG 2\n\n// Reset masks\n#define RESET_SEQUENCER 4096\n#define RESET_ALL_OSCS 8192\n#define RESET_TIMEBASE 16384\n#define RESET_AMY 32768\n#define RESET_EVENTS 65536\n#define RESET_ALL_NOTES 131072\n#define RESET_SYNTHS 262144  // Non-scheduled release of all synths, voices, oscs prior to load_patch\n#define RESET_PATCH 524288  // Clear one patch if patch_number provided, otherwise clear all patches.\n#define RESET_QUEUE 1048576 // resets the amy queue\n\n#define true 1\n#define false 0\n\n#define AMY_OK 0\ntypedef int amy_err_t;\n\n#ifndef MAX\n#define MAX(a, b) ((a) > (b) ? (a) : (b))\n#endif\n\n#ifndef MIN\n#define MIN(a, b) ((a) < (b) ? (a) : (b))\n#endif\n\n\n#include \"amy_fixedpoint.h\"\n\n#if defined ARDUINO && !defined TLONG && !defined ESP_PLATFORM\n#include \"avr/pgmspace.h\" // for PROGMEM, DMAMEM, FASTRUN\n#else\n#define PROGMEM \n#endif\n\n\nenum params{\n    WAVE, PRESET, MIDI_NOTE,              // 0, 1, 2\n    AMP,                                 // 3..11\n    DUTY=AMP + NUM_COMBO_COEFS,          // 12..20\n    FEEDBACK=DUTY + NUM_COMBO_COEFS,     // 21\n    FREQ,                                // 22..30\n    VELOCITY=FREQ + NUM_COMBO_COEFS,     // 31\n    PHASE, DETUNE, VOLUME, PITCH_BEND,   // 32, 33, 34, 35\n    PAN,                                 // 36..44\n    FILTER_FREQ=PAN + NUM_COMBO_COEFS,   // 45..53\n    RATIO=FILTER_FREQ + NUM_COMBO_COEFS, // 54\n    RESONANCE, PORTAMENTO, CHAINED_OSC,  // 55, 56, 57\n    MOD_SOURCE, FILTER_TYPE,             // 58, 59\n    EQ_L, EQ_M, EQ_H,                    // 60, 61, 62\n    ALGORITHM, LATENCY, TEMPO,           // 63, 64, 65\n    ALGO_SOURCE_START=100,               // 100..105\n    ALGO_SOURCE_END=100+MAX_ALGO_OPS,    // 106\n    BP_START=ALGO_SOURCE_END + 1,        // 107..202\n    BP_END=BP_START + (MAX_BREAKPOINT_SETS * MAX_BREAKPOINTS * 2), // 203\n    EG0_TYPE, EG1_TYPE,                  // 204, 205\n    CLONE_OSC,                           // 206\n    RESET_OSC,                           // 207\n    NOTE_SOURCE,                         // 208\n    ECHO_LEVEL,\n    ECHO_DELAY_MS,\n    ECHO_MAX_DELAY_MS,\n    ECHO_FEEDBACK,\n    ECHO_FILTER_COEF,\n    CHORUS_LEVEL,\n    CHORUS_MAX_DELAY,\n    CHORUS_LFO_FREQ,\n    CHORUS_DEPTH,\n    REVERB_LEVEL,\n    REVERB_LIVENESS,\n    REVERB_DAMPING,\n    REVERB_XOVER_HZ,\n    NO_PARAM                    // 209\n};\n\n///////////////////////////////////////\n// Profiler setup\n\n#ifdef AMY_DEBUG\n      \nenum itags{\n    RENDER_OSC_WAVE, COMPUTE_BREAKPOINT_SCALE, HOLD_AND_MODIFY, FILTER_PROCESS, FILTER_PROCESS_STAGE0,\n    FILTER_PROCESS_STAGE1, ADD_DELTA_TO_QUEUE, AMY_ADD_DELTA, PLAY_DELTA,  MIX_WITH_PAN, AMY_RENDER, \n    AMY_EXECUTE_DELTAS, AMY_FILL_BUFFER, RENDER_LUT_FM, RENDER_LUT_FB, RENDER_LUT, \n    RENDER_LUT_CUB, RENDER_LUT_FM_FB, RENDER_LPF_LUT, DSPS_BIQUAD_F32_ANSI_SPLIT_FB, DSPS_BIQUAD_F32_ANSI_SPLIT_FB_TWICE, DSPS_BIQUAD_F32_ANSI_COMMUTED, \n    PARAMETRIC_EQ_PROCESS, HPF_BUF, SCAN_MAX, DSPS_BIQUAD_F32_ANSI, BLOCK_NORM, CALIBRATE, AMY_ESP_FILL_BUFFER, NO_TAG\n};\nstruct profile {\n    uint32_t calls;\n    uint64_t us_total;\n    uint64_t start;\n};\n\nextern uint64_t profile_start_us;\n\n#define AMY_PROFILE_INIT(tag) \\\n    profiles[tag].start = 0; \\\n    profiles[tag].calls = 0; \\\n    profiles[tag].us_total = 0; \\\n    profile_start_us = amy_get_us();\n\n#define AMY_PROFILE_START(tag) \\\n    profiles[tag].start = amy_get_us();\n\n#define AMY_PROFILE_STOP(tag) \\\n    profiles[tag].us_total += (amy_get_us()-profiles[tag].start); \\\n    profiles[tag].calls++;\n\n#define AMY_PROFILE_PRINT(tag) \\\n    if(profiles[tag].calls) {\\\n        fprintf(stderr,\"%40s: %10\"PRIu32\" calls %10\"PRIu64\"us total [%6.2f%% wall %6.2f%% render] %9\"PRIu64\"us per call\\n\", \\\n        profile_tag_name(tag), profiles[tag].calls, profiles[tag].us_total, \\\n        ((float)(profiles[tag].us_total) / (float)(amy_get_us() - profile_start_us))*100.0, \\\n        ((float)(profiles[tag].us_total) / (float)(profiles[AMY_RENDER].us_total))*100.0, \\\n        (profiles[tag].us_total)/profiles[tag].calls);\\\n    }\n\nextern struct profile profiles[NO_TAG];\nextern int64_t amy_get_us();\n\n#else\n#define AMY_PROFILE_START(tag)\n#define AMY_PROFILE_STOP(tag)\n\n#endif // AMY_DEBUG\n\nextern void amy_profiles_init();\nextern void amy_profiles_print();\n\n///////////////////////////////////////\n// Default values setup\n\n#include <limits.h>\nstatic inline int isnan_c11(float test)\n{\n    return isnan(test);\n}\n\n\n#define AMY_UNSET_FLOAT nanf(\"\")\n\n#define AMY_UNSET_VALUE(var) _Generic((var), \\\n    float: AMY_UNSET_FLOAT, \\\n    uint32_t: UINT32_MAX, \\\n    uint16_t: UINT16_MAX, \\\n    int16_t: SHRT_MAX, \\\n    uint8_t: UINT8_MAX, \\\n    int8_t: SCHAR_MAX, \\\n    int32_t: INT_MAX \\\n)\n\n#define AMY_UNSET(var) var = AMY_UNSET_VALUE(var)\n\n#define AMY_IS_UNSET(var) _Generic((var), \\\n    float: isnan_c11(var), \\\n    default: var==AMY_UNSET_VALUE(var) \\\n)\n//    char*: *(uint8_t *)var == 0,\n\n#define AMY_IS_SET(var) !AMY_IS_UNSET(var)\n\n// Helpers to identify if param is in a range.\n#define PARAM_IS_COMBO_COEF(param, base)   ((param) >= (base) && (param) < (base) + NUM_COMBO_COEFS)\n#define PARAM_IS_BP_COEF(param)    ((param) >= BP_START && (param) < BP_END)\n\n\n///////////////////////////////////////\n// Events & deltas\n\n\n// Delta holds the individual changes from an event, it's sorted in order of playback time \n// this is more efficient in memory than storing entire events per message \nstruct delta {\n    union d {\n        uint32_t i;\n        float f;\n    } data;\n    enum params param; // which parameter is being changed\n    uint32_t time; // what time to play / change this parameter\n    uint16_t osc; // which oscillator it impacts\n    struct delta * next; // the next delta, in time \n};\n\n\n// API accessible events, are converted to delta types for the synth to play back \ntypedef struct amy_event {\n    uint32_t time;  // event only\n    uint16_t osc;\n    uint16_t wave;\n    int16_t preset;  // Negative preset is voice count for build-your-own PARTIALS\n    float midi_note;\n    uint16_t patch_number;  // event only\n    float amp_coefs[NUM_COMBO_COEFS];\n    float freq_coefs[NUM_COMBO_COEFS];  // synth is log\n    float filter_freq_coefs[NUM_COMBO_COEFS];  // synth is log\n    float duty_coefs[NUM_COMBO_COEFS];\n    float pan_coefs[NUM_COMBO_COEFS];\n    float feedback;\n    float velocity;\n    float trigger_phase;\n    float volume;  // event_only\n    float pitch_bend;  // event_only\n    float tempo;  // event_only\n    uint16_t latency_ms;  // event_only\n    float ratio;  // synth is log\n    float resonance;\n    uint16_t portamento_ms;  // synth is alpha\n    uint16_t chained_osc;\n    uint16_t mod_source;\n    uint8_t algorithm;\n    uint8_t filter_type;\n    float eq_l;  // not in synth\n    float eq_m;  // not in synth\n    float eq_h;  // not in synth\n    uint16_t bp_is_set[MAX_BREAKPOINT_SETS];\n    // Convert these two at least to vectors of ints, save several hundred bytes\n    int16_t algo_source[MAX_ALGO_OPS];\n    uint16_t voices[MAX_VOICES_PER_INSTRUMENT];\n    uint32_t eg0_times[MAX_BPS];\n    float eg0_values[MAX_BPS];\n    uint32_t eg1_times[MAX_BPS];\n    float eg1_values[MAX_BPS];\n    uint8_t eg_type[MAX_BREAKPOINT_SETS];\n    // Instrument-layer values.\n    uint8_t synth;\n    uint32_t synth_flags;  // Special flags to set when defining instruments.\n    uint16_t synth_delay_ms;  // Extra delay added to synth note-ons to allow decay on voice-stealing.\n    uint8_t to_synth;  // For moving setup between synth numbers.\n    uint8_t grab_midi_notes;  // To enable/disable automatic MIDI note-on/off generating note-on/off.\n    uint8_t pedal;  // MIDI pedal value.\n    uint16_t num_voices;\n    uint32_t sequence[3]; // tick, period, tag\n    //\n    uint8_t status;\n    uint8_t note_source;  // .. to mark note on/offs that come from MIDI so we don't send them back out again.\n    uint32_t reset_osc;\n    // Global effects\n    float echo_level;\n    float echo_delay_ms;\n    float echo_max_delay_ms;\n    float echo_feedback;\n    float echo_filter_coef;\n    float chorus_level;\n    float chorus_max_delay;\n    float chorus_lfo_freq;\n    float chorus_depth;\n    float reverb_level;\n    float reverb_liveness;\n    float reverb_damping;\n    float reverb_xover_hz;\n    uint8_t oscs_per_voice;  // Used when initializing a synth without a patch.\n} amy_event;\n\n// This is the state of each oscillator, set by the sequencer from deltas\nstruct synthinfo {\n    uint16_t osc; // self-reference\n    // Configuration (can be fixed during oscillation)\n    uint16_t wave;\n    int16_t preset;  // Negative preset is voice count for build-your-own PARTIALS\n    uint8_t note_source;  // Was the most recent note on/off received e.g. from MIDI?\n    float midi_note;\n    float velocity;\n    float amp_coefs[NUM_COMBO_COEFS];\n    float logfreq_coefs[NUM_COMBO_COEFS];\n    float filter_logfreq_coefs[NUM_COMBO_COEFS];\n    float duty_coefs[NUM_COMBO_COEFS];\n    float pan_coefs[NUM_COMBO_COEFS];\n    float feedback;\n    float trigger_phase;\n    float logratio;\n    float portamento_alpha;\n    float resonance;\n    uint8_t filter_type;\n    uint16_t chained_osc;\n    uint16_t mod_source;\n    uint8_t algorithm;\n    int16_t algo_source[MAX_ALGO_OPS];  // int16 not uint because -1 specified to indicate no osc \n    uint8_t eg_type[MAX_BREAKPOINT_SETS];  // one of the ENVELOPE_ values\n    uint8_t max_num_breakpoints[MAX_BREAKPOINT_SETS];  // alloc'd length of breakpoint_times/vals\n    uint32_t *breakpoint_times[MAX_BREAKPOINT_SETS];  // (in samples) dynamically sized.\n    float *breakpoint_values[MAX_BREAKPOINT_SETS];  // dynamically sized.\n    // Per-note state (set on initialization, does not change during note)\n    uint8_t terminate_on_silence;  // Usually yes, not for PCM. not in event.\n    const LUT *lut;       // Selected lookup table and size.\n    // Per-block state (changes with time)\n    uint8_t status;  // not in event\n    PHASOR phase;  // not in event\n    float step;  // not in event\n    float substep;  // not in event\n    uint32_t render_clock;\n    uint32_t note_on_clock;\n    uint32_t note_off_clock;\n    uint32_t zero_amp_clock;   // Time amplitude hits zero.\n    uint32_t mod_value_clock;  // Only calculate mod_value once per frame (for mod_source).\n    SAMPLE mod_value;  // last value returned by this oscillator when acting as a MOD_SOURCE, not in event\n    SAMPLE last_scale[MAX_BREAKPOINT_SETS];  // remembers current envelope level, to use as start point in release.\n    SAMPLE last_two[2];    // For ALGO feedback ops\n    // For filters.  Need 2x because LPF24 uses two instances of filter.\n    SAMPLE filter_delay[2 * FILT_NUM_DELAYS];\n    // The block-floating-point shift of the filter delay values.\n    int last_filt_norm_bits;\n};\n\n// synthinfo, but only the things that mods/env can change. one per osc\nstruct mod_synthinfo {\n    float amp;\n    float last_amp;    // amplitude smoother\n    float pan;\n    float last_pan;   // Pan history for interpolation.\n    float duty;\n    float last_duty;   // Duty history for interpolation.\n    float logfreq;\n    float last_logfreq;  // for portamento\n    float filter_logfreq;\n    float last_filter_logfreq;  // filter freq history for smoothing.\n    float resonance;\n    float feedback;\n};\n\n\ntypedef struct sequence_entry_ll_t {\n    struct delta d;\n    uint32_t tag;\n    uint32_t tick; // 0 means not used \n    uint32_t period; // 0 means not used \n    struct sequence_entry_ll_t *next;\n} sequence_entry_ll_t;\n\n\ntypedef struct delay_line {\n    SAMPLE *samples;\n    int len;\n    int log_2_len;\n    int fixed_delay;\n    int next_in;\n} delay_line_t;\n\n\n#include \"delay.h\"\n#include \"sequencer.h\"\n#include \"amy_midi.h\"\n#include \"transfer.h\"\n\n///////////////////////////////////////\n// config\n\n#define AMY_AUDIO_IS_NONE 0x00\n#define AMY_AUDIO_IS_I2S 0x01\n#define AMY_AUDIO_IS_USB_GADGET 0x02\n#define AMY_AUDIO_IS_MINIAUDIO 0x04\n\n#define AMY_MIDI_IS_NONE 0x0\n#define AMY_MIDI_IS_UART 0x01\n#define AMY_MIDI_IS_USB_GADGET 0x02\n#define AMY_MIDI_IS_MACOS 0x04\n#define AMY_MIDI_IS_WEBMIDI 0x08\n\n// AMYboard pins\n#define AMYBOARD_LRC 2\n#define AMYBOARD_BCLK 8\n#define AMYBOARD_DOUT 6\n#define AMYBOARD_DIN 9\n#define AMYBOARD_MCLK 3\n#define AMYBOARD_MIDI_OUT_TYPE_A 14\n#define AMYBOARD_MIDI_OUT_TYPE_B 15\n#define AMYBOARD_MIDI_IN 21\n\ntypedef struct  {\n    struct {\n        uint8_t chorus : 1;\n        uint8_t reverb : 1;\n        uint8_t echo : 1;\n        uint8_t audio_in : 1;\n        uint8_t default_synths : 1;\n        uint8_t partials : 1;\n        uint8_t custom : 1;\n        uint8_t startup_bleep : 1;\n    } features;\n    struct {\n        uint8_t multicore : 1;  // Use secondary cores if available.\n        uint8_t multithread : 1;  // Use multitasking (e.g. RTOS threads) if available.\n    } platform;\n    // midi and audio are potentially bitmasks indicating data routing.\n    uint8_t midi;\n    uint8_t audio;\n\n    // variables\n    uint16_t max_oscs;\n    uint8_t ks_oscs;\n    uint32_t max_sequencer_tags;\n    uint32_t max_voices;\n    uint32_t max_synths;\n    uint32_t max_memory_patches;\n\n    // alternative audio output function\n    size_t (*write_samples_fn)(const uint8_t *buffer, size_t buffer_size);\n\n    // Optional hooks for host/platform integration.\n    uint8_t (*amy_external_render_hook)(uint16_t osc, SAMPLE *, uint16_t len);\n    float (*amy_external_coef_hook)(uint16_t channel);\n    void (*amy_external_block_done_hook)(void);\n    void (*amy_external_midi_input_hook)(uint8_t *bytes, uint16_t len, uint8_t is_sysex);\n    void (*amy_external_sequencer_hook)(uint32_t tick_count);\n    uint32_t (*amy_external_fopen_hook)(char *filename, const char *mode);\n    uint32_t (*amy_external_fwrite_hook)(uint32_t fptr, uint8_t *bytes, uint32_t len);\n    uint32_t (*amy_external_fread_hook)(uint32_t fptr, uint8_t *bytes, uint32_t len);\n    void (*amy_external_fseek_hook)(uint32_t fptr, uint32_t pos);\n    void (*amy_external_fclose_hook)(uint32_t fptr);\n    void (*amy_external_file_transfer_done_hook)(const char *filename);\n    void (*amy_external_update_file_hook)(const char *filename);\n    void (*amy_external_exec_hook)(const char *code);\n    void (*amy_external_reboot_hook)(uint8_t mode);\n\n    // pins for MCU platforms\n    int8_t i2s_lrc;\n    int8_t i2s_dout;\n    int8_t i2s_din;\n    int8_t i2s_bclk;\n    int8_t i2s_mclk;\n    uint16_t i2s_mclk_mult;\n    int8_t midi_out;\n    int8_t midi_in;\n    int8_t midi_uart;\n\n    // memory caps for MCUs\n    uint32_t ram_caps_events;\n    uint32_t ram_caps_sysex;\n    uint32_t ram_caps_synth;\n    uint32_t ram_caps_block;\n    uint32_t ram_caps_fbl;\n    uint32_t ram_caps_delay;\n    uint32_t ram_caps_sample;\n\n    // device ids for miniaudio platforms\n    int8_t capture_device_id;\n    int8_t playback_device_id;\n\n} amy_config_t;\n\ntypedef struct reverb_state {\n    SAMPLE level;\n    float liveness;\n    float damping;\n    float xover_hz;\n} reverb_state_t;\n\ntypedef struct chorus_config {\n    SAMPLE level;     // How much of the delayed signal to mix in to the output, typ F2S(0.5).\n    int32_t max_delay;    // Max delay when modulating.  Must be <= DELAY_LINE_LEN\n    float lfo_freq;\n    float depth;\n} chorus_config_t;\n\ntypedef struct echo_config {\n    SAMPLE level;  // Mix of echo into output.  0 = Echo off.\n    uint32_t delay_samples;  // Current delay, quantized to samples.\n    uint32_t max_delay_samples;  // Maximum delay, i.e. size of allocated delay line.\n    SAMPLE feedback;  // Gain applied when feeding back output to input.\n    SAMPLE filter_coef;  // Echo is filtered by a two-point normalize IIR.  This is the real pole location.\n} echo_config_t;\n\n\n// global synth state\nstruct state {\n    amy_config_t config;\n    uint8_t running;\n    uint8_t i2s_is_in_background;  // Flag not to handle I2S in amy_update.\n    float volume;\n    float pitch_bend;\n    // State of fixed dc-blocking HPF\n    SAMPLE hpf_state;\n    SAMPLE eq[3];\n    uint16_t delta_qsize;\n    struct delta * delta_queue; // start of the sorted queue of deltas to execute.\n    int16_t latency_ms;\n    float tempo;\n    uint32_t total_blocks;\n    float time;\n    uint8_t debug_flag;\n    \n    reverb_state_t reverb;\n    chorus_config_t chorus;\n    echo_config_t echo;\n\n    // Transfer\n    uint8_t transfer_flag;\n    uint8_t * transfer_storage;\n    uint32_t transfer_length_bytes;\n    uint32_t transfer_stored_bytes; // using this for midi note before file load\n    uint32_t transfer_file_handle; // using this for preset number before file load \n    char transfer_filename[MAX_FILENAME_LEN];\n\n    // Sequencer\n    uint32_t sequencer_tick_count;\n    uint64_t next_amy_tick_us;\n    uint32_t us_per_tick;\n    sequence_entry_ll_t * sequence_entry_ll_start;\n\n};\n\n\n// custom oscillator\nstruct custom_oscillator {\n    void (*init)(void);\n    void (*deinit)(void);\n    void (*note_on)(uint16_t osc, float freq);\n    void (*note_off)(uint16_t osc);\n    void (*mod_trigger)(uint16_t osc);\n    SAMPLE (*render)(SAMPLE* buf, uint16_t osc);\n    SAMPLE (*compute_mod)(uint16_t osc);\n};\n\n\n\n// Shared structures\nextern struct synthinfo** synth;\nextern struct mod_synthinfo** msynth;\nextern struct state amy_global; \n\nextern output_sample_type * amy_out_block;\nextern output_sample_type * amy_in_block;\nextern output_sample_type * amy_external_in_block;\n\nint8_t global_init(amy_config_t c);\nvoid amy_deltas_reset();\nvoid add_delta_to_queue(struct delta *d, struct delta **queue);\nvoid amy_add_event_internal(amy_event *e, uint16_t base_osc);\nvoid amy_event_to_deltas_queue(amy_event *e, uint16_t base_osc, struct delta **queue);\nint web_audio_buffer(float *samples, int length);\nvoid amy_render(uint16_t start, uint16_t end, uint8_t core);\nvoid print_osc_debug(int i /* osc */, bool show_eg);\nvoid show_debug(uint8_t type) ;\nvoid oscs_deinit() ;\nfloat freq_for_midi_note(float midi_note);\nfloat logfreq_for_midi_note(float midi_note);\nfloat midi_note_for_logfreq(float logfreq);\nfloat logfreq_of_freq(float freq);\nfloat freq_of_logfreq(float logfreq);\nfloat portamento_ms_to_alpha(uint16_t portamento_ms);\nuint16_t alpha_to_portamento_ms(float alpha);\nint8_t check_init(amy_err_t (*fn)(), const char *name);\nvoid * malloc_caps(uint32_t size, uint32_t flags);\nvoid config_reverb(float level, float liveness, float damping, float xover_hz);\nvoid config_chorus(float level, uint16_t max_delay, float lfo_freq, float depth);\nvoid config_echo(float level, float delay_ms, float max_delay_ms, float feedback, float filter_coef);\nvoid osc_note_on(uint16_t osc, float initial_freq);\nvoid chorus_note_on(float initial_freq);\n\nfloat map_60dB_to_01f(float lin);\nfloat map_01_to_60dBf(float log);\n\nSAMPLE log2_lut(SAMPLE x);\nSAMPLE exp2_lut(SAMPLE x);\n\n\nfloat atoff(const char *s);\nint8_t oscs_init();\nvoid alloc_osc(int osc, uint8_t *max_num_breakpoints_per_bpset_or_null);\nvoid free_osc(int osc);\nvoid ensure_osc_allocd(int osc, uint8_t *max_num_breakpoints_per_bpset_or_null);\nvoid patches_init(int max_memory_patches);\nvoid patches_deinit();\nvoid parse_algo_source(char* message, int16_t *vals);\nvoid hold_and_modify(uint16_t osc) ;\nvoid amy_execute_delta();\nvoid amy_execute_deltas();\nint16_t * amy_fill_buffer();\nint16_t * amy_simple_fill_buffer();  // excute_deltas + render + fill_buffer\nuint32_t ms_to_samples(uint32_t ms) ;\n\n\n\n// API\nvoid amy_add_message(char *message);\n// Like amy_add_message but the data is treated as coming from an external\n// sysex source, so file transfer routing (transfer_flag) applies.\nvoid amy_add_message_from_sysex(char *message);\nvoid amy_add_event(amy_event *e);\nint amy_parse_message(char * message, int length, amy_event *e);\nvoid amy_start(amy_config_t);\nvoid amy_stop();\n\nint16_t *amy_update();        // in api.c\nvoid amy_platform_init();     // in i2s.c\nvoid amy_platform_deinit();   // in i2s.c\nvoid amy_update_tasks();      // in i2s.c\nint16_t *amy_render_audio();  // in i2s.c\nsize_t amy_i2s_write(const uint8_t *buffer, size_t nbytes);  // in i2s.c\n\namy_config_t amy_default_config();\nvoid amy_clear_event(amy_event *e);\namy_event amy_default_event();\nuint32_t amy_sysclock();\nint amy_get_output_buffer(output_sample_type * samples);\nint amy_get_input_buffer(output_sample_type * samples);\nvoid amy_set_external_input_buffer(output_sample_type * samples);\n\n\n#ifdef __EMSCRIPTEN__\nvoid amy_start_web();\nvoid amy_start_web_no_synths();\n#endif\n\n\n// external functions\nvoid amy_process_event(amy_event *e);\nvoid amy_restart();\nvoid amy_reset_oscs();\nvoid amy_print_devices();\nvoid amy_set_custom(struct custom_oscillator* custom);\nvoid amy_reset_sysclock();\n\nextern int parse_int_list_message32(char *message, int32_t *vals, int max_num_vals, int32_t skipped_val);\nextern int parse_int_list_message16(char *message, int16_t *vals, int max_num_vals, int16_t skipped_val);\nextern void reset_osc_by_pointer(struct synthinfo *psynth, struct mod_synthinfo *pmsynth);\nextern void reset_osc(uint16_t i );\n\nextern int midi_store_control_code(int channel, int code, int is_log, float min_val, float max_val, float offset_val, char *message);\nextern int midi_clear_control_code(int channel, int code);\nextern bool midi_fetch_control_code_command(int channel, int code, char *s, size_t len);\nextern void cc_mapping_debug();\nextern void midi_mappings_init();\nextern void midi_mappings_deinit();\nextern void midi_clear_channel_mappings(int channel);\n\nextern float render_am_lut(float * buf, float step, float skip, float incoming_amp, float ending_amp, const float* lut, int16_t lut_size, float *mod, float bandwidth);\nextern void ks_init();\nextern void ks_deinit();\nextern void algo_init();\nextern void algo_deinit();\nextern void pcm_init();\nextern void pcm_deinit();\nextern void custom_init();\nextern void custom_deinit();\n\nvoid my_srand48(uint32_t seedval);\n\nvoid audio_in_note_on(uint16_t osc, uint8_t channel);\nvoid external_audio_in_note_on(uint16_t osc, uint8_t channel);\nSAMPLE render_audio_in(SAMPLE * buf, uint16_t osc, uint8_t channel);\nSAMPLE render_external_audio_in(SAMPLE *buf, uint16_t osc, uint8_t channel);\n\nextern SAMPLE render_ks(SAMPLE * buf, uint16_t osc); \nextern SAMPLE render_sine(SAMPLE * buf, uint16_t osc); \n#ifdef AMY_WAVETABLE\nextern SAMPLE render_wavetable(SAMPLE * buf, uint16_t osc); \n#endif\nextern SAMPLE render_fm_sine(SAMPLE *buf, uint16_t osc, SAMPLE *mod, SAMPLE feedback_level, uint16_t algo_osc, SAMPLE mod_amp);\nextern SAMPLE render_pulse(SAMPLE * buf, uint16_t osc); \nextern SAMPLE render_saw_down(SAMPLE * buf, uint16_t osc);\nextern SAMPLE render_saw_up(SAMPLE * buf, uint16_t osc);\nextern SAMPLE render_triangle(SAMPLE * buf, uint16_t osc); \nextern SAMPLE render_noise(SAMPLE * buf, uint16_t osc); \nextern SAMPLE render_envelope(SAMPLE *buf, uint16_t osc);\nextern SAMPLE render_pcm(SAMPLE * buf, uint16_t osc);\nextern SAMPLE render_algo(SAMPLE * buf, uint16_t osc, uint8_t core) ;\nextern SAMPLE render_partial(SAMPLE *buf, uint16_t osc) ;\nextern void partials_note_on(uint16_t osc);\nextern void partials_note_off(uint16_t osc);\nextern void interp_partials_note_on(uint16_t osc);\nextern void interp_partials_note_off(uint16_t osc);\nextern int interp_partials_max_partials_for_patch(int interp_partials_patch_number);\nextern void patches_load_patch(amy_event *e); \nextern void patches_event_has_voices(amy_event *e, struct delta **queue);\nextern void patches_reset_patch(int patch_number);\nextern void patches_reset();\nextern int sprint_event(amy_event *e, char *s, size_t len, bool wirecode);\nextern void *yield_patch_events(uint16_t patch_number, struct amy_event *event, void *state);\nextern void *yield_synth_events(uint8_t synth, struct amy_event *event, bool include_fx, void *state);\nextern void *yield_synth_commands(uint8_t synth, char *s, size_t len, bool include_fx, void *state);\nextern int size_of_amy_event(void);\n\nextern struct delta **queue_for_patch_number(int patch_number);\nextern void update_num_oscs_for_patch_number(int patch_number);\nextern void all_notes_off();\nextern void patches_debug();\nextern void patches_store_patch(amy_event *e, char * message);\n#define _SYNTH_FLAGS_MIDI_DRUMS (0x01)\n#define _SYNTH_FLAGS_IGNORE_NOTE_OFFS (0x02)\n#define _SYNTH_FLAGS_NEGATE_PEDAL (0x04)\nextern int instruments_max_instruments();\nextern void instruments_init(int num_instruments);\nextern void instruments_deinit();\nextern void instruments_reset();\nextern void instrument_add_new(int instrument_number, int num_voices, uint16_t *amy_voices, uint16_t patch_number, uint16_t oscs_per_voice, uint32_t flags);\nextern void instrument_release(int instrument_number);\nextern void instrument_change_number(int old_instrument_number, int new_instrument_number);\n#define _INSTRUMENT_NO_VOICE (255)\nextern uint16_t instrument_voice_for_note_event(int instrument_number, int note, bool is_note_off, bool *pstolen);\nextern bool instrument_number_exists(int instrument_number, const char *tag);\nextern int instrument_get_num_voices(int instrument_number, uint16_t *amy_voices);\nextern int instrument_all_notes_off(int instrument_number, uint16_t *amy_voices);\nextern int instrument_sustain(int instrument_number, bool sustain, uint16_t *amy_voices);\nextern int instrument_get_patch_number(int instrument_number);\nextern int instrument_get_oscs_per_voice(int instrument_number);\nextern uint32_t instrument_get_flags(int instrument_number);\nextern uint16_t instrument_noteon_delay_ms(int instrument_number);\nextern void instrument_set_noteon_delay_ms(int instrument_number, uint16_t noteon_delay_ms);\nextern bool instrument_grab_midi_notes(int instrument_number);\nextern void instrument_set_grab_midi_notes(int instrument_number, bool grab_midi_notes);\nextern int instrument_bank_number(int instrument_number);\nextern void instrument_set_bank_number(int instrument_number, int bank_number);\n\nextern SAMPLE render_partials(SAMPLE *buf, uint16_t osc);\nextern SAMPLE render_custom(SAMPLE *buf, uint16_t osc) ;\n\nextern SAMPLE compute_mod_pulse(uint16_t osc);\nextern SAMPLE compute_mod_noise(uint16_t osc);\nextern SAMPLE compute_mod_sine(uint16_t osc);\nextern SAMPLE compute_mod_saw_up(uint16_t osc);\nextern SAMPLE compute_mod_saw_down(uint16_t osc);\nextern SAMPLE compute_mod_triangle(uint16_t osc);\nextern SAMPLE compute_mod_pcm(uint16_t osc);\nextern SAMPLE compute_mod_custom(uint16_t osc);\n\nextern void sine_note_on(uint16_t osc, float initial_freq); \nextern void wavetable_note_on(uint16_t osc, float initial_freq); \nextern void fm_sine_note_on(uint16_t osc, uint16_t algo_osc); \nextern void saw_down_note_on(uint16_t osc, float initial_freq); \nextern void saw_up_note_on(uint16_t osc, float initial_freq); \nextern void triangle_note_on(uint16_t osc, float initial_freq); \nextern void pulse_note_on(uint16_t osc, float initial_freq); \nextern void noise_note_on(uint16_t osc);\nextern void pcm_note_on(uint16_t osc);\nextern void pcm_note_off(uint16_t osc);\nextern void custom_note_on(uint16_t osc, float freq);\nextern void custom_note_off(uint16_t osc);\nextern void partial_note_on(uint16_t osc);\nextern void partial_note_off(uint16_t osc);\nextern void algo_note_on(uint16_t osc, float freq);\nextern void algo_note_off(uint16_t osc);\nextern void ks_note_on(uint16_t osc); \nextern void ks_note_off(uint16_t osc);\nextern void sine_mod_trigger(uint16_t osc);\nextern void saw_down_mod_trigger(uint16_t osc);\nextern void saw_up_mod_trigger(uint16_t osc);\nextern void triangle_mod_trigger(uint16_t osc);\nextern void pulse_mod_trigger(uint16_t osc);\nextern void pcm_mod_trigger(uint16_t osc);\nextern void custom_mod_trigger(uint16_t osc);\nextern int16_t * pcm_load(uint16_t preset_number, uint32_t length, uint32_t samplerate, uint8_t channels, uint8_t midinote, uint32_t loopstart, uint32_t loopend);\nextern const int16_t *pcm_get_sample_ram_for_preset(uint16_t preset_number, uint32_t *length);\nextern int pcm_load_file();\nextern void pcm_unload_preset(uint16_t preset_number);\nextern void pcm_unload_all_presets();\n\n// filters\nextern void filters_init();\nextern void filters_deinit();\nextern SAMPLE filter_process(SAMPLE * block, uint16_t osc, SAMPLE max_value);\nextern void parametric_eq_process(SAMPLE *block);\nextern void reset_filter(uint16_t osc);\nextern void reset_parametric(void);\nextern float dsps_sqrtf_f32_ansi(float f);\nextern int8_t dsps_biquad_gen_lpf_f32(SAMPLE *coeffs, float f, float qFactor);\nextern int8_t dsps_biquad_f32_ansi(const SAMPLE *input, SAMPLE *output, int len, SAMPLE *coef, SAMPLE *w);\nextern SAMPLE scan_max(SAMPLE* block, int len);\n// Use the esp32 optimized biquad filter if available\n#ifdef ESP_PLATFORM\n\n// On Arduino, something doesn't allow ESP_TASK_PRIO_MAX in tasks\n#ifdef ARDUINO\n#define AMY_RENDER_TASK_PRIORITY (20) \n#define AMY_FILL_BUFFER_TASK_PRIORITY (20)\n#else\n#define AMY_RENDER_TASK_PRIORITY (ESP_TASK_PRIO_MAX)\n#define AMY_FILL_BUFFER_TASK_PRIORITY (ESP_TASK_PRIO_MAX)\n#endif\n#define AMY_RENDER_TASK_COREID (0)\n#define AMY_FILL_BUFFER_TASK_COREID (1)\n#define AMY_RENDER_TASK_STACK_SIZE (12 * 1024) // 8\n#define AMY_FILL_BUFFER_TASK_STACK_SIZE (16 * 1024) // 16\n#define AMY_RENDER_TASK_NAME      \"amy_r_task\"\n#define AMY_FILL_BUFFER_TASK_NAME \"amy_fb_task\"\n#include \"esp_err.h\"\n#endif\n\n// envelopes\nextern SAMPLE compute_breakpoint_scale(uint16_t osc, uint8_t bp_set, uint16_t sample_offset);\nextern SAMPLE compute_mod_scale(uint16_t osc);\nextern SAMPLE compute_mod_value(uint16_t mod_osc);\nextern void retrigger_mod_source(uint16_t osc);\n\n// deltas\nextern void deltas_pool_init();\nextern void deltas_pool_free();\nextern struct delta *delta_get(struct delta *d);  // clone existing delta values if d not NULL.\nextern struct delta *delta_release(struct delta *d);  // returns d->next of the node just released.\nextern void delta_release_list(struct delta *d);  // releases a whole list of deltas.\nextern int32_t delta_list_len(struct delta *d);\nextern int32_t delta_num_free();  // The size of the remaining pool.\n\nextern int peek_stack(const char *tag);\n\n#endif\n"
  },
  {
    "path": "src/amy_connector.js",
    "content": "// amy_connector.js\n// helpers for JS to communicate with AMY, including webMIDI\n\nvar amy_add_message = null;\nvar amy_reset_sysclock = null\nvar amy_module = null;\nvar amy_started = false;\nvar amy_live_start_web = null;\nvar audio_started = false;\nvar amy_sysclock = null;\nvar amy_module = null;\nvar midiOutputDevice = null;\nvar midiInputDevice = null;\nvar amy_audioin_toggle = false;\n\n\n\n\n// Once AMY module is loaded, register its functions and start AMY (not yet audio, you need to click for that)\namyModule().then(async function(am) {\n  amy_live_start_web = am.cwrap(\n    'amy_live_start_web', null, null, {async: true}    \n  );\n  amy_live_start_web_audioin = am.cwrap(\n    'amy_live_start_web_audioin', null, null, {async: true}    \n  );\n  amy_live_stop = am.cwrap(\n    'amy_live_stop', null,  null, {async: true}    \n  );\n  amy_start_web = am.cwrap(\n    'amy_start_web', null, null\n  );\n  amy_start_web_no_synths = am.cwrap(\n    'amy_start_web_no_synths', null, null\n  );\n  amy_add_message = am.cwrap(\n    'amy_add_message', null, ['string']\n  );\n  amy_reset_sysclock = am.cwrap(\n    'amy_reset_sysclock', null, null\n  );\n  amy_ticks = am.cwrap(\n    'sequencer_ticks', 'number', [null]\n  );\n  amy_sysclock = am.cwrap(\n    'amy_sysclock', 'number', [null]\n  );\n  amy_process_single_midi_byte = am.cwrap(\n    'amy_process_single_midi_byte', null, ['number, number']\n  );\n  // If Godot bridge is present, let it control startup with config.\n  // Otherwise start with defaults (standalone REPL mode).\n  if (typeof window !== 'undefined' && window._amy_godot_bridge) {\n    window._amy_godot_start_web = amy_start_web;\n    window._amy_godot_start_web_no_synths = amy_start_web_no_synths;\n  } else {\n    amy_start_web();\n  }\n  amy_module = am;\n});\n\n\nasync function amy_js_start() {\n  // Don't run this twice\n  if(amy_started) return;\n  await start_midi();\t\n  await sleep_ms(200);\n  // Start the audio worklet (miniaudio)\n  if (amy_audioin_toggle) {\n      await amy_live_start_web_audioin();\n  } else {\n      await amy_live_start_web();    \n  }\n  await sleep_ms(200);\n  amy_started = true;\n}\n\n\n\nasync function setup_midi_devices() {\n    var midi_in = document.amyboard_settings.midi_input;\n    var midi_out = document.amyboard_settings.midi_output;\n    if(WebMidi.inputs.length > midi_in.selectedIndex) {\n      if(midiInputDevice != null) midiInputDevice.destroy();\n      midiInputDevice = WebMidi.getInputById(WebMidi.inputs[midi_in.selectedIndex].id);\n      midiInputDevice.addListener(\"midimessage\", e => {\n        for(byte in e.message.data) {\n          amy_process_single_midi_byte(e.message.data[byte], 1);\n        }\n      });\n    }\n    if(WebMidi.outputs.length > midi_out.selectedIndex) {\n      if(midiOutputDevice != null) midiOutputDevice.destroy();\n      midiOutputDevice = WebMidi.getOutputById(WebMidi.outputs[midi_out.selectedIndex].id);\n    }\n}\n\nasync function start_midi() {\n  function onEnabled() {\n    // Populate the dropdowns\n    var midi_in = document.amyboard_settings.midi_input;\n    var midi_out = document.amyboard_settings.midi_output;\n\n    if(WebMidi.inputs.length>0) {\n      midi_in.options.length = 0;\n      WebMidi.inputs.forEach(input => {\n        midi_in.options[midi_in.options.length] = new Option(\"MIDI in: \" + input.name);\n      });\n    }\n\n    if(WebMidi.outputs.length>0) {\n      midi_out.options.length = 0;\n      WebMidi.outputs.forEach(output => {\n        midi_out.options[midi_out.options.length] = new Option(\"MIDI out: \"+ output.name);\n      });\n    }\n    // First run setup \n    setup_midi_devices();\n  }\n  if(typeof WebMidi != 'undefined') {\n    if(WebMidi.supported) {\n      WebMidi\n        .enable({sysex:true})\n        .then(onEnabled)\n        .catch(err => console.log(\"MIDI: \" + err));\n    } else {\n      document.getElementById('midi-input-panel').style.display='none';\n      document.getElementById('midi-output-panel').style.display='none';\n    }\n  }\n}\n\n\nasync function sleep_ms(ms) {\n    await new Promise((r) => setTimeout(r, ms));\n}\n\n\nasync function toggle_audioin() {\n    if(!amy_started) await sleep_ms(1000);\n    await amy_live_stop();\n    if (document.getElementById('amy_audioin').checked) {\n        amy_audioin_toggle = true;\n        await amy_live_start_web_audioin();\n    } else {\n        amy_audioin_toggle = false;\n        await amy_live_start_web();\n    }\n}\n\n\n"
  },
  {
    "path": "src/amy_fixedpoint.h",
    "content": "// amy_fixedpoint.h - common definitions for fixed-point arithmetic.\n\n// We use 3 fixed-point formats:\n//  - Lookup tables are stored as int16_t, using s.15 (one sign bit, then 15 bits expressing the fractional part, for [-1.0, 1.0) range).\n//  - Oscillator phases and increments are stored as int32_t using s.31 (since these implicitly cannot exceed 1.0)\n//  - Samples and other arguments are stored as int32_t using s8.23 (23 fractional bits, range [-256.0, 256.0) to permit headroom.\n// s.15 conforms to ANSI \"_Fract\" type, s.31 to \"long _Fract\", and s8.23 to \"long _Accum\"\n// (see https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf).\n\n// Fixed point multiply is accomplished by standard integer multiply followed by a right-shift to re-center the decimal point.\n// In general, (w.x) * (y.z) will yeild a (w+y).(x+z) result, which will need to be shifted right by, for instance z bits to\n// regain a *.x representation.  For example, multiplying two s8.23 values, using an int32 x int32 -> int64 multiplication,\n// would give a s16.46 result, which would need to be right-shifted by 23 bits to realign the \"decimal point\" to be left of the\n// 23rd bit.\n//\n// In this example, even after the shift, we'd still have potentially 16 significant bits above the point, which might not\n// fit in the 8 bits for the integral part of s8.23 (depending on the actual values of the original factors).  And if the multiply\n// is actuall int32 x int32 -> int32 (a common case), that overflow can happen during the multiply itself.\n//\n// The overall right-shift needed to realign the point can be applied either before or after the multiplication as long as the total\n// number of bits is achieved, where the total shift is the sum of the shifts to each input factor and the output result.  Applying\n// shifts to a factor before the multiply discards that many bits of resolution (the bits at the bottom that are shifted out before\n// calculation); applying it after multiplication limits the range of the result (since that many of the top bits will be\n// uninformative/sign extension).  In general, then, we want to apply enough shifts to the factors to avoid overflow in the multiply,\n// but otherwise as few as possible.\n\n// By limiting ourselves to the 32x32 -> 32 hardware multiplier in the RP2040, we have to decide which parameters to shift.\n// Without knowing anything about the input values, we should shift down the bits on the operands, so the result will not overflow\n// and will be correctly aligned on output.  This means discarding lots of input bits, however, which could be harmful if we are\n// multiplying a large and a small value: right-shifting the small value will lose resolution, and after multiplying by the large\n// value, that lost resolution could again become significant.\n\n// Without assumptions, we apply the right-shift to the operands before multiplication, so the result needs no further adjustment:\n// mul_kk(a, b) = ((a >> 12) * (b >> 11)\n// If, however, we assume the result of the product is not going to exceed some value, we can reserve some of the right-shift for\n// the result, preserving more bits for the input.  For instance, if we assume an s8.23 result has its magnitude bounded by 16\n// (4 bits left of the point), we could do\n// mul_kk(a, b) = ((a >> 10) * (b >> 9)) >> 4.\n// If we further assume that a is large but b is always less than 1, we can prefer to shift it down less, e.g.\n// mul_kk(a, b) = ((a >> 12) * (b >> 7)) >> 4\n// If we know that a and b are smaller than 1 (15 bits each), the result must also be less than 1, so we can sign-extend the\n// top 8 bits:\n// mul_kk(a, b) = ((a >> 8) * (b >> 7)) >> 8\n\n// In general, then, the multiply operation has three parameters:\n//  - max value of result -> number of right-shift bits applied to result\n//  - resolution sensitivity of first factor -> right-shift applied before mult\n//  - resolution sensitivity of second factor -> right-shift applied to it before mult\n// These parameters are in fact constrained since the total number of right-shifts must match the needed alignment.\n// We can directly parameterize these as:\n// accum mulN_kAkB(x, y) { return ( (x >> A) * (y >> B) ) >> N; }\n// where N + A + B must equal the number of fraction bits (23).\n\n// How best to express these?\n//  - we can define a range, e.g. -16 to 16, dictating the number of bits applied after multiplication, and thus the\n//    remaining number of bits that need to be applied to the operands.\n//  - we can define a \"sensitive\" arg, meaning we discard fewer bits for that arg.  But that makes the other arg less sensitive.\n\n// ROUNDING: If we use integer multiplication, then shift down the result to realign, we are effectively truncating the bit\n// representation.  For positive numbers, this is rounding down: both (6 >> 1) and (7 >> 1) give 3.  For negative values,\n// this is actually rounding towards negative infinity: In 8 bits, -6 is 0xfa; sign-extended shift right is 0xfd or -3,\n// but -7 is 0xf9 and its sign-extended shift right is 0xfc or -4.\n//\n// This systematic bias can cause problems, particularly in feedback systems (like IIR filter).  We can restore conventional\n// rounding by adding 1 to the value just before the final right-shift: ((6 + 1) >> 1) is 3, but ((7 + 1) >> 1) is 4.\n// (-6 + 1) >> 1 = -3 and (-7 + 1) >> 1 = -4.  When the final right-shift is by k bits, we should add (1 << (k - 1))\n// immediately before the shift to achieve rounding. But this adds several instructions to each multiply, so we only\n// do it for the multplies used in digital filtering, where failure to round can cause issues.\n\n\n#ifndef AMY_USE_FIXEDPOINT\n\n//#warning \"floating point calc\"\n#define ARITH \"float\"\n\n#define GENFXP float\n#define LUTSAMPLE int16_t\n#define PHASOR float\n#define SAMPLE float\n\n#define S2P(s) (s)\n#define P2S(p) (p)\n#define L2S(l) ((l) / 32768.0f)\n#define S2L(s) ((int)floorf(s * 32768.0f))\n#define S2F(s) (s)\n#define F2S(f) (f)\n#define G2F(g) (g)\n#define F2G(f) (f)\n#define P2F(p) (p)\n#define F2P(f) ((f) - floorf(f))\n\n#define AMY_I2S(i, b) ((i) / (float)(1 << (b)))\n// Integer part of s interpreted as a proportion of a b-bit table.\n#define INT_OF_S(s, b) ((int)floorf((s) * (float)(1 << (b))))\n#define S_FRAC_OF_S(s, b) ((s) * (1 << (b)) - floorf((s) * (1 << (b))))\n\n#define MUL0_SS(a, b) ((a) * (b))\n#define MUL4_SS(a, b) ((a) * (b))\n#define MUL8_SS(a, b) ((a) * (b))\n#define MUL8F_SS(a, b) ((a) * (b))\n#define MUL4E_SS(a, b) ((a) * (b))\n#define MUL4_SP_S(a, b) ((a) * (b))\n#define SMULR6(a, b) ((a) * (b))\n#define SMULR7(a, b) ((a) * (b))\n\n#define SHIFTR(s, b) ((s) * exp2f(-(b)))\n#define SHIFTL(s, b) ((s) * exp2f(b))\n\n#define INT_OF_P(p, b) (((int)floorf((p) * (float)(1 << (b))) + (1 << (b))) % (1 <<(b)))\n#define I2P(i, b) ((i) / (float)(1 << (b)))\n\n#define S_FRAC_OF_P(p, b) ((p) * (1 << (b)) - floorf((p) * (1 << (b))))\n#define P_WRAPPED_SUM(p, i) ((p) + (i) - floorf((p) + (i)))\n\n#else\n\n//#warning \"FIXED point calc\"\n#define ARITH \"FIXED\"\n\ntypedef int16_t s_15;    //  s.15 LUT sample\ntypedef int32_t s_31;    //  s.31 phasor\ntypedef int32_t s8_23;  //  s8.23 sample\ntypedef int32_t s16_15; // s16.15 general\n\n#define LUTSAMPLE s_15\n#define PHASOR s_31\n#define SAMPLE s8_23\n#define GENFXP s16_15 // \"65536 Hz should be enough for anyone?\" -- dpwe\n\n#define L_FRAC_BITS 15\n#define P_FRAC_BITS 31\n#define S_FRAC_BITS 23\n#define G_FRAC_BITS 15\n\n// Convert a SAMPLE to a PHASOR\n#define S2P(s) ((s) << (P_FRAC_BITS - S_FRAC_BITS))\n// Convert a PHASOR to a SAMPLE\n#define P2S(p) ((p) >> (P_FRAC_BITS - S_FRAC_BITS))\n// Convert a LUTSAMPLE (s.15) to a SAMPLE (s8.23)\n#define L2S(l) (((int32_t)(l)) << (S_FRAC_BITS - L_FRAC_BITS))\n// L is also the format used in the final output.\n#define S2L(s) ((s) >> (S_FRAC_BITS - L_FRAC_BITS))  // s >> 8\n// Scale an integer into a SAMPLE, where integer is a numerator and 2**B is denominator.\n#define AMY_I2S(I, B) ((I) << (S_FRAC_BITS - (B)))\n// Regard SAMPLE as index into B-bit table, return integer (floor) index, strip sign bit.\n#define INT_OF_S(S, B) (int32_t)(S >> (S_FRAC_BITS - B))\n// Fractonal part of SAMPLE within a B bit table, returns a SAMPLE.\n// Add 1 to B shift-up and cast to uint32_t to strip sign bit, pad a zero sign bit on way down.\n#define S_FRAC_OF_S(S, B) (((S) & ((1 << (S_FRAC_BITS - (B))) - 1)) << (B))\n\n// Convert between SAMPLE and float\n#define S2F(s) ((float)(s) / (float)(1 << S_FRAC_BITS))\n#define F2S(f) (SAMPLE)((f) * (float)(1 << S_FRAC_BITS))\n\n// Convert between GENFXP and float\n#define G2F(s) ((float)(s) / (float)(1 << G_FRAC_BITS))\n#define F2G(f) (GENFXP)((f) * (float)(1 << G_FRAC_BITS))\n\n// Convert between PHASOR and float\n// 1 << P_FRAC_BITS is 1 << 31 which actually flips to (-2^31).\n// So make the constant one less and do the last power of 2 in float.\n#define P2F(s) ((float)(s) / (2.0 * (float)(1 << (P_FRAC_BITS - 1))))\n#define F2P(f) ((PHASOR)((f) * 2.0 * (float)(1 << (P_FRAC_BITS - 1))))\n\n// Fixed-point multiply routines\n\n#define FXMUL_TEMPLATE(a, b, a_bitloss, b_bitloss, reqd_bitloss) ((((a) >> a_bitloss) * ((b) >> b_bitloss)) >> (reqd_bitloss - a_bitloss - b_bitloss))\n\n// from https://colab.research.google.com/drive/1_uQto5WSVMiSPHQ34cHbCC6qkF614EoN#scrollTo=73JbLFhg44QG\nstatic inline SAMPLE SMULR6(SAMPLE a, SAMPLE b) {\n    // s8.23 fixed-point multiplication with rounding, 1 zero on output (-128..128)\n    SAMPLE r = 1 + ((a + (1 << 10)) >> 11) * ((b + (1 << 10)) >> 11);\n    return r >> 1;\n}\n\nstatic inline SAMPLE SMULR7(SAMPLE a, SAMPLE b) {\n    // Rounding on input and output; 3 zeros on output (so output is limited to -32.0 .. 32.0).\n    SAMPLE r = 4 + ((a + (1 << 9)) >> 10) * ((b + (1 << 9)) >> 10);\n    return r >> 3;\n}\n\n// Multiply two SAMPLE values when the result will always be [-1.0, 1.0).\n#define MUL0_SS(a, b) FXMUL_TEMPLATE(a, b, 8, 7, S_FRAC_BITS)  // 8+7 = 15, so additional 8 bits shift right on output to make 23 req'd total.\n\n// Multiply two SAMPLE values when the result will always be [-16.0, 16.0).\n#define MUL4_SS(a, b)  FXMUL_TEMPLATE(a, b, 10, 9, S_FRAC_BITS)  // 10+9 = 19, so result is >>4, leaving 4 bits integer part.\n\n// Multiply two SAMPLE values when the result will always be [-64.0, 64.0).\n// Assume first arg is an unscaled sample and second is an amplitude which can be much larger.\n// This is the one used in the interpolating LUT oscillators for (sample, amp)\n#define MUL6A_SS(a, b)  FXMUL_TEMPLATE(a, b, 8, 13, S_FRAC_BITS)  // 8+13 = 21, so result is >>2, leaving 6 bits integer part.\n// Output in [-32, 32), more resolution kept for first arg (sample) than 2nd (scale)\n#define MUL5A_SS(a, b)  FXMUL_TEMPLATE(a, b, 9, 11, S_FRAC_BITS)  // 9+11 = 20, so result is >>3, leaving 5 bits integer part.\n\n// Multiply two SAMPLE values and allow result to occupy full [-256, 256) range\n#define MUL8_SS(a, b)  FXMUL_TEMPLATE(a, b, 12, 11, S_FRAC_BITS)  // 12+11 = 23, so no more shift on result.\n\n// Shifts\n#define SHIFTR(s, b) ((s) >> (b))\n#define SHIFTL(s, b) ((s) << (b))\n\n// Regard PHASOR as index into B-bit table, return integer (floor) index, strip sign bit.\n#define INT_OF_P(P, B) (int32_t)((((uint32_t)((P) << 1)) >> (P_FRAC_BITS + 1 - (B))))\n// Scale an integer into a phasor, where integer is index into a B-bit table.\n#define I2P(I, B) ((I) << (P_FRAC_BITS - (B)))\n\n// Fractonal part of phasor within B bits, returns a SAMPLE.\n// Add 1 to B shift-up and cast to uint32_t to strip sign bit, pad a zero sign bit on way down.\n#define S_FRAC_OF_P(P, B) (int32_t)(((uint32_t)(((P) << ((B) + 1)))) >> (1 + P_FRAC_BITS - S_FRAC_BITS))\n// Increment phasor but wrap at +1.0\n#define P_WRAPPED_SUM(P, I) (int32_t)(((uint32_t)((((uint32_t)(P)) + ((uint32_t)(I))) << 1)) >> 1)\n\n#endif // AMY_USED_FIXEDPOINT\n\n// Fixed-point lookup table structure (copied from e.g. sine_lutset_fxpt.h).\n#ifndef LUTENTRY_FXPT_DEFINED\n#define LUTENTRY_FXPT_DEFINED\ntypedef struct {\n    const int16_t *table;\n    int table_size;\n    int log_2_table_size;\n    int highest_harmonic;\n    float scale_factor;\n} lut_entry_fxpt;\n#endif // LUTENTRY_FXPT_DEFINED\n\n#define LUT lut_entry_fxpt\n\n"
  },
  {
    "path": "src/amy_midi.c",
    "content": "// midi.c\n// i deal with parsing and receiving midi on many platforms\n\n#include \"amy.h\"\n#if defined(TULIP) || defined(AMYBOARD)\n#include \"py/runtime.h\"\n// Forward-declare to avoid including the shared tinyusb header path. Defined\n// in micropython/shared/tinyusb/mp_usbd_runtime.c and safe to call from the MP\n// main thread to drain USB events (e.g. flush the MIDI IN endpoint FIFO).\nextern void mp_usbd_task(void);\n#endif\n#ifdef __EMSCRIPTEN__\n#include <emscripten.h>\n#endif\n#if defined(ESP_PLATFORM)\n#include \"freertos/FreeRTOS.h\"\n#include \"freertos/task.h\"\n#endif\n\n#if (defined ARDUINO_ARCH_RP2040) || (defined ARDUINO_ARCH_RP2350)\n//#define TUD_USB_GADGET\n#include \"tusb.h\"\n#include \"class/midi/midi.h\"\n#include \"class/midi/midi_device.h\"\n#include \"pico/stdlib.h\"\n#include \"hardware/uart.h\"\n#include \"hardware/irq.h\"\n#endif\n\n\n#include \"amy_midi.h\"\nuint8_t current_midi_message[3] = {0,0,0};\nuint8_t midi_message_slot = 0;\nuint8_t sysex_flag = 0;\nstatic uint8_t external_midi_sync_enabled = 0;\n\nvoid amy_external_midi_sync(uint8_t enabled) {\n    external_midi_sync_enabled = enabled ? 1 : 0;\n}\n\n#if 0\nstatic void debug_print_midi_hex(const uint8_t *data, uint32_t len, uint8_t sysex) {\n    fprintf(stderr, \"MIDI %s len=%u:\", sysex ? \"sysex\" : \"msg\", (unsigned)len);\n    for (uint32_t i = 0; i < len; ++i) {\n        fprintf(stderr, \" %02X\", data[i]);\n    }\n    fprintf(stderr, \"\\n\");\n}\n#endif\n\n// Send a MIDI note on OUT\nvoid amy_send_midi_note_on(uint16_t osc) {\n    // don't forward on a note coming in through MIDI IN \n    if(synth[osc]->note_source != NOTE_SOURCE_MIDI) {\n        uint8_t bytes[3];\n        bytes[0] = 0x90;\n        bytes[1] = (uint8_t)roundf(synth[osc]->midi_note);\n        bytes[2] = (uint8_t)roundf(synth[osc]->velocity*127.0f);\n        midi_out(bytes, 3);\n    }\n}\n\n// Send a MIDI note off OUT\nvoid amy_send_midi_note_off(uint16_t osc) {\n    // don't forward on a note coming in through MIDI IN \n    if(synth[osc]->note_source != NOTE_SOURCE_MIDI) {\n        uint8_t bytes[3];\n        bytes[0] = 0x80;\n        bytes[1] = (uint8_t)roundf(synth[osc]->midi_note);\n        bytes[2] = (uint8_t)roundf(synth[osc]->velocity*127.0f);\n        midi_out(bytes, 3);\n    }\n}\n\n// Given a MIDI note on IN, create a AMY message on that instrument and play it\nvoid amy_received_note_on(uint8_t channel, uint8_t note, uint8_t vel, uint32_t time) {\n    if (!instrument_grab_midi_notes(channel)) return;\n    amy_event e = amy_default_event();\n    e.time = time;\n    e.synth = channel;\n    e.note_source = NOTE_SOURCE_MIDI;\n    e.midi_note = note;\n    e.velocity = ((float)vel/127.0f);\n    amy_add_event(&e);\n}\n\n// Given a MIDI note off IN, create a AMY message on that instrument and play it\nvoid amy_received_note_off(uint8_t channel, uint8_t note, uint8_t vel, uint32_t time) {\n    if (!instrument_grab_midi_notes(channel)) return;\n    amy_event e = amy_default_event();\n    e.time = time;\n    e.synth = channel;\n    e.note_source = NOTE_SOURCE_MIDI;\n    e.midi_note = note;\n    e.velocity = 0;\n    amy_add_event(&e);\n}\n\nvoid amy_received_control_change(uint8_t channel, uint8_t control, uint8_t value, uint32_t time) {\n    if (control == 0) {\n        // Bank select coarse.\n        instrument_set_bank_number(channel, value);\n    } else if (control == 7) {\n        // Use CC 7 for global volume control (on any channel).\n        //amy_event e = amy_default_event();\n        //e.volume = (float)value/12.7;  // Max volume is 10.\n        //e.note_source = NOTE_SOURCE_MIDI;\n        //amy_add_event(&e);\n        amy_global.volume = (float)value/12.7;  // Max volume is 10.\n    }\n}\n\nvoid amy_received_program_change(uint8_t channel, uint8_t program, uint32_t time) {\n    amy_event e = amy_default_event();\n    e.time = time;\n    e.synth = channel;\n    e.note_source = NOTE_SOURCE_MIDI;\n    // MIDI patches are in blocks of 128, potentially set by an earlier CC0.\n    int bank_number = instrument_bank_number(channel);\n    if (bank_number < 0) {\n        // If the bank hasn't been set, stay within the block of 128 of the current patch\n        // (so e.g. DX7 voices remain DX7).\n        bank_number = (instrument_get_patch_number(e.synth) & 0xFF80) >> 7;\n    }\n    e.patch_number = program + 128 * bank_number;\n    if (channel != AMY_MIDI_CHANNEL_DRUMS) {  // What would that even mean?\n        amy_add_event(&e);\n    }\n}\n\nvoid amy_received_pedal(uint8_t channel, uint8_t value, uint32_t time) {\n    amy_event e = amy_default_event();\n    e.time = time;\n    e.synth = channel;\n    e.note_source = NOTE_SOURCE_MIDI;\n    e.pedal = value;\n    amy_add_event(&e);\n}\n\nvoid amy_received_all_notes_off(uint8_t channel, uint32_t time) {\n    amy_event e = amy_default_event();\n    e.time = time;\n    e.synth = channel;\n    e.note_source = NOTE_SOURCE_MIDI;\n    // All notes off is indicated by vel = 0 and note = 0\n    e.velocity = 0;\n    e.midi_note = 0;\n    amy_add_event(&e);\n}\n\nvoid amy_received_pitch_bend(uint8_t channel, uint8_t low_byte, uint8_t high_byte, uint32_t time) {\n    amy_event e = amy_default_event();\n    e.time = time;\n    // Currently, pitch bend is global and not applied per-channel, but preserve the info.\n    e.synth = channel;\n    e.note_source = NOTE_SOURCE_MIDI;\n    // The integer range is -8192 to 8191, the float range is -1/6th to +1/6th,\n    // units are octaves, so +/- 2 semitones.\n    e.pitch_bend = ((float)(((int)((high_byte << 7) | low_byte)) - 8192)) / (6.0f * 8192.0f);\n    amy_add_event(&e);\n}\n\n// I'm called when we get a fully formed MIDI message from any interface -- usb, gadget, uart, mac, and either sysex or normal\nvoid amy_event_midi_message_received(uint8_t * data, uint32_t len, uint8_t sysex, uint32_t time) {\n    if(!sysex) {\n        uint8_t status_byte = data[0];\n        uint8_t status = status_byte & 0xF0;\n        uint8_t channel = status_byte & 0x0F;\n        // Do the AMY instrument things here\n        if(status == 0x80) amy_received_note_off(channel+1, data[1], data[2], time);\n        else if(status == 0x90) amy_received_note_on(channel+1, data[1], data[2], time);\n        else if(status == 0xB0 && data[1] == 0x40) amy_received_pedal(channel+1, data[2], time);\n        else if(status == 0xB0 && data[1] == 0x7B) amy_received_all_notes_off(channel+1, time);\n        else if(status == 0XB0) amy_received_control_change(channel+1, data[1], data[2], time);\n        else if(status == 0xC0) amy_received_program_change(channel+1, data[1], time);\n        else if(status == 0xE0) amy_received_pitch_bend(channel+1, data[1], data[2], time);\n        else if(status_byte == 0xFA) sequencer_midi_start();\n        else if(status_byte == 0xFC) sequencer_midi_stop();\n    }\n\n    // Also send the external hooks if set\n    if(amy_global.config.amy_external_midi_input_hook != NULL) {\n        amy_global.config.amy_external_midi_input_hook(data, len, sysex);\n    }\n\n    // Update web MIDI out hook if set\n    #ifdef __EMSCRIPTEN__\n    EM_ASM(\n        if(typeof amy_external_midi_input_js_hook === 'function') {\n            amy_external_midi_input_js_hook(HEAPU8.subarray($0, $0+$1), $1, $2);\n        }, data, len, sysex);\n    #endif\n}\n\n\nvoid midi_clock_received() {\n    if (external_midi_sync_enabled) {\n        sequencer_midi_clock_tick();\n    }\n}\n\n\n/*\n    3 0x8X - note off    |   note number    |  velocity \n    3 0x9X - note on     |   note number    |  velocity\n    3 0xAX - Paftertouch |   note number    |  pressure\n    3 0xBX - CC          |   controller #   |  value \n    2 0xCX - PC          |   program        |  XXXX\n    2 0xDX - Caftertouch |   pressure       |  XXXX\n    3 0xEX - pitch bend  |    LSB.          |  MSB\n    X 0xF0  - sysex start|  ... wait until F7\n    2 0xF1  - time code  | data\n    3 0xF2 song pos      | lsb              | msb\n    2 0xF3 song sel      | data\n    1 0xF4 reserved      | XXXX\n    1 0xF5 reserved.     | XXXX\n    1 0xF6 tune request  | XXXX\n    X 0xF7 end of sysex  | XXXX\n    1 0xF8 timing clock  | XXXX\n    1 0xF9 reserved.     | XXXX\n    1 0xFA start         | XXXX\n    1 0xFB continue      | XXXX\n    1 0xFC stop          | XXXX\n    1 0xFD reserved      | XXXX\n    1 0xFE sensing       | XXXX\n    1 0xFF reset         | XXXX\n*/\n\nuint16_t sysex_len = 0;\n#if defined(TULIP) || defined(AMYBOARD)\nextern const mp_obj_fun_builtin_var_t tulip_amy_send_sysex_obj;\n#endif\nuint8_t * sysex_buffer = NULL;\n// Ring buffer of sysex payload snapshots for deferred MicroPython processing.\n// parse_sysex() copies each payload into a separate slot so that a new sysex\n// arriving before the scheduled callback fires doesn't overwrite the previous\n// message. This matters when the sketch's loop() is CPU-heavy and the\n// mp_sched callback is delayed.\nchar * sysex_message_copies[SYSEX_COPY_SLOTS] = {NULL};\nuint8_t sysex_copy_write_idx = 0;  // MIDI task writes here\nuint8_t sysex_copy_read_idx = 0;   // MP callback reads here\nvoid parse_sysex() {\n    uint32_t time = AMY_UNSET_VALUE(time);\n    if(sysex_len>3) {\n        // let's use 0x00 0x03 0x45 for SPSS\n        if(sysex_buffer[0] == 0x00 && sysex_buffer[1] == 0x03 && sysex_buffer[2] == 0x45) {\n            sysex_buffer[sysex_len] = 0;\n            // zB[mode]: Reboot. Handled in pure C — no mp_sched_schedule\n            // needed, works even when loop() is hogging the scheduler.\n            //   zBZ  / zB0Z — bootloader mode (skip sketch.py)\n            //   zB1Z       — normal reboot (run sketch.py)\n            //   zB2Z       — ROM download/flash mode\n            if (sysex_len > 4 && sysex_buffer[3] == 'z' && sysex_buffer[4] == 'B') {\n                uint8_t mode = 0;\n                if (sysex_len > 5 && sysex_buffer[5] >= '0' && sysex_buffer[5] <= '9') {\n                    mode = sysex_buffer[5] - '0';\n                }\n                if (amy_global.config.amy_external_reboot_hook) {\n                    amy_global.config.amy_external_reboot_hook(mode);\n                }\n                sysex_len = 0;\n                return;\n            }\n            // zI: Ping/identity — reply with a short sysex so the web side\n            // knows the board is alive and ready. Pure C, no scheduler needed.\n            if (sysex_len > 4 && sysex_buffer[3] == 'z' && sysex_buffer[4] == 'I') {\n                uint8_t frame[] = { 0xF0, 0x00, 0x03, 0x45, 'O', 'K', 0xF7 };\n                midi_out(frame, sizeof(frame));\n                sysex_len = 0;\n                return;\n            }\n            // For Micropython hosted systems, we run MIDI on a separate \"thread\" (task)\n            // than MP, so just calling amy_send_message here can fail if it needs to access\n            // underlying MP resources. So we schedule it to run in the MP main loop instead.\n            // Each message gets its own ring-buffer slot so a fast-arriving next sysex\n            // doesn't overwrite an unprocessed message.\n            #if defined(TULIP) || defined(AMYBOARD)\n            {\n                // NOTE: ACK is sent from the callback (tulip_amy_send_sysex)\n                // AFTER the message is processed, not here in parse_sysex.\n                // This ensures the sender only proceeds once the ring buffer\n                // slot has been drained — receiving the ACK here would just\n                // confirm receipt, allowing the ring buffer to overflow if\n                // callbacks are slow.\n                //\n                // Do NOT stop the sequencer here. We used to do that to\n                // prevent loop() from stealing MP scheduler slots during\n                // large file transfers, but it caused sequencer_midi_start\n                // to reset next_amy_tick_us on every sysex, effectively\n                // speeding up the sequencer when knob updates arrive.\n                char *slot = sysex_message_copies[sysex_copy_write_idx];\n                if(slot) {\n                    uint16_t payload_len = sysex_len - 3;\n                    memcpy(slot, (char*)sysex_buffer + 3, payload_len);\n                    slot[payload_len] = '\\0';\n                    sysex_copy_write_idx = (sysex_copy_write_idx + 1) % SYSEX_COPY_SLOTS;\n                }\n                mp_sched_schedule(MP_OBJ_FROM_PTR(&tulip_amy_send_sysex_obj), mp_const_none);\n            }\n            #else\n            amy_add_message((char*)sysex_buffer+3);\n            #endif\n            sysex_len = 0; // handled\n        } else {\n           amy_event_midi_message_received(sysex_buffer, sysex_len, 1, time);\n        }\n    }\n}\n\nvoid convert_midi_bytes_to_messages(uint8_t * data, size_t len, uint8_t usb) {\n    // i take any amount of bytes and add messages \n    // remember this can start in the middle of a midi message, so act accordingly\n    // running status is handled by keeping the status byte around after getting a message.\n    // remember that USB midi always comes in groups of 3 here, even if it's just a one byte message\n    // so we have USB (and mac IAC) set a usb flag so we know to end the loop once a message is parsed\n\n    uint32_t time = AMY_UNSET_VALUE(time);\n    for(size_t i=0;i<len;i++) {\n\n        uint8_t byte = data[i];\n\n        // Skip sysex in this parser until we get an F7. We do not pass sysex over to python (yet)\n        if(sysex_flag) {\n            if(byte == 0xF7) {\n                sysex_flag = 0;\n                parse_sysex();\n            } else {\n                sysex_buffer[sysex_len++] = byte;\n            }\n        } else {\n            if(byte & 0x80) { // new status byte \n                sysex_flag = 0; sysex_len = 0;\n                // Single byte message?\n                current_midi_message[0] = byte;\n                if(byte == 0xF4 || byte == 0xF5 || byte == 0xF6 || byte == 0xF9 || \n                    byte == 0xFA || byte == 0xFB || byte == 0xFC || byte == 0xFD || byte == 0xFE || byte == 0xFF) {\n                    amy_event_midi_message_received(current_midi_message, 1, 0, time);\n                    if(usb) i = len+1; // exit the loop if usb\n                }  else if(byte == 0xF0) { // sysex start \n                    // if that's there we then assume everything is an AMY message until 0xF7\n                    sysex_flag = 1;\n                } else if(byte == 0xF8) { // clock. don't forward this on to Tulip userspace\n                    midi_clock_received();\n                    if(usb) i = len+1; // exit the loop if usb\n                } else { // a new status message that expects at least one byte of message after\n                    current_midi_message[0] = byte;\n                }\n            } else { // data byte of some kind\n                uint8_t status = current_midi_message[0] & 0xF0;\n\n                // a 2 bytes of data message\n                if(status == 0x80 || status == 0x90 || status == 0xA0 || status == 0xB0 || status == 0xE0 || current_midi_message[0] == 0xF2) {\n                    if(midi_message_slot == 0) {\n                        current_midi_message[1] = byte;\n                        midi_message_slot = 1;\n                    } else {\n                        current_midi_message[2] = byte;\n                        midi_message_slot = 0;\n                        amy_event_midi_message_received(current_midi_message, 3, 0, time);\n                    }\n                // a 1 byte data message\n                } else if (status == 0xC0 || status == 0xD0 || current_midi_message[0] == 0xF3 || current_midi_message[0] == 0xF1) {\n                    current_midi_message[1] = byte;\n                    amy_event_midi_message_received(current_midi_message, 2, 0, time);\n                    if(usb) i = len+1; // exit the loop if usb\n                }\n            }\n        }\n    }\n    \n}\n\n// This is used for web emscripten hooks + external linkers of AMY\n// set from_web_or_usb to 1 if this is a 4 packet type interface -- WebMIDI or USB MIDI gadget/host, 0 otherwise\nvoid amy_process_single_midi_byte(uint8_t byte, uint8_t from_web_or_usb) {\n    uint8_t data[1];\n    data[0] = byte;\n    convert_midi_bytes_to_messages(data, 1, from_web_or_usb); \n}\n\n// for external programs to send MIDI data OUT using AMY\nvoid amy_external_midi_output(uint8_t * data, uint32_t len) {\n    midi_out(data, len);\n}\n\n\n///// Per platform MIDI in and out stuff\n///////////////////////////////////////////////\n\n\n#if (defined __EMSCRIPTEN__)\nvoid run_midi() {\n    // do nothing, this is all done with callbacks\n}\n\nvoid stop_midi() {\n}\n\nvoid midi_out(uint8_t * bytes, uint16_t len) {\n    EM_ASM(\n            if(midiOutputDevice != null) {\n                midiOutputDevice.send(HEAPU8.subarray($0, $0 + $1));\n            }, bytes, len\n        );\n}\n#endif\n\n#if !defined(MACOS) && !defined(__EMSCRIPTEN__) // this code is for NOT macos desktop , which is in macos_midi.m\n\n// \"run_midi\" sets up MIDI on MCU platforms\n\n\n#if (defined ESP_PLATFORM)\nTaskHandle_t midi_handle;\n\nint8_t esp_get_uart(int8_t index) {\n    if(index==0) return UART_NUM_0;\n    if(index==1) return UART_NUM_1;\n    if(index==2) return UART_NUM_2;\n    return -1;\n}\n#if defined (AMYBOARD) || defined(AMYBOARD_ARDUINO)\n#define TUD_USB_GADGET\n#include \"tusb.h\"\n#include \"class/midi/midi.h\"\n#include \"class/midi/midi_device.h\"\n#ifdef AMYBOARD_ARDUINO\n#include \"usb.h\"\n#endif\n\nvoid check_tusb_midi() {\n    while ( tud_midi_available() ) {\n        uint8_t packet[4];\n        tud_midi_packet_read(packet);\n        convert_midi_bytes_to_messages(packet+1, 3, 1);\n    }\n}\n#endif\n\nvoid esp_init_midi(void) {\n    uart_config_t uart_config = {\n        .baud_rate = 31250,\n        .data_bits = UART_DATA_8_BITS,\n        .parity = UART_PARITY_DISABLE,\n        .stop_bits = UART_STOP_BITS_1,\n    };\n\n    // Configure UART parameters\n    const int uart_num = esp_get_uart(amy_global.config.midi_uart);\n    if (!uart_is_driver_installed(uart_num)) {\n        ESP_ERROR_CHECK(uart_param_config(uart_num, &uart_config));\n        ESP_ERROR_CHECK(uart_set_pin(uart_num, amy_global.config.midi_out, amy_global.config.midi_in, UART_PIN_NO_CHANGE , UART_PIN_NO_CHANGE ));\n\n        const int uart_buffer_size = (MAX_MIDI_BYTES_TO_PARSE);\n        // Install UART driver using an event queue here\n        ESP_ERROR_CHECK(uart_driver_install(uart_num, uart_buffer_size,  0, 0, NULL, 0));\n\n        uart_intr_config_t uart_intr = {\n            .intr_enable_mask = UART_RXFIFO_FULL_INT_ENA_M\n            | UART_RXFIFO_TOUT_INT_ENA_M\n            | UART_FRM_ERR_INT_ENA_M\n            | UART_RXFIFO_OVF_INT_ENA_M\n            | UART_BRK_DET_INT_ENA_M\n            | UART_PARITY_ERR_INT_ENA_M,\n            .rxfifo_full_thresh = 1,\n            .rx_timeout_thresh = 0,\n            .txfifo_empty_intr_thresh = 10\n        };\n\n        uart_intr_config(uart_num, &uart_intr);\n    }\n}\n\nvoid esp_deinit_midi(void) {\n    const int uart_num = esp_get_uart(amy_global.config.midi_uart);\n    if (uart_is_driver_installed(uart_num)) {\n        uart_intr_config_t uart_intr = {\n            .intr_enable_mask = 0,\n            .rxfifo_full_thresh = 1,\n            .rx_timeout_thresh = 0,\n            .txfifo_empty_intr_thresh = 10\n        };\n        uart_intr_config(uart_num, &uart_intr);\n        uart_driver_delete(uart_num);\n    }\n}\n\nvoid esp_poll_midi(void) {\n    const int uart_num = esp_get_uart(amy_global.config.midi_uart);\n    uint8_t data[MAX_MIDI_BYTES_TO_PARSE];\n    int length = uart_read_bytes(uart_num, data, MAX_MIDI_BYTES_TO_PARSE /*MAX_MIDI_BYTES_PER_MESSAGE*MIDI_QUEUE_DEPTH*/, 1/portTICK_PERIOD_MS);\n    if(length > 0) {\n        convert_midi_bytes_to_messages(data,length,0);\n    }\n}\n\nvoid run_midi_task() {\n\n    while(1) {\n        esp_poll_midi();\n        #if defined (AMYBOARD) || defined(AMYBOARD_ARDUINO)\n        check_tusb_midi();\n        #endif\n    } // end loop forever\n}\n\nvoid run_midi() {\n    if (sysex_buffer == NULL) {\n        sysex_buffer = malloc_caps(MAX_SYSEX_BYTES, amy_global.config.ram_caps_sysex);\n        for (int i = 0; i < SYSEX_COPY_SLOTS; i++) {\n            sysex_message_copies[i] = malloc_caps(MAX_SYSEX_BYTES, amy_global.config.ram_caps_sysex);\n        }\n        #if defined(AMYBOARD_ARDUINO)\n        // Initialize TinyUSB with amy's MIDI+CDC descriptors before starting MIDI polling\n        if(amy_global.config.midi & AMY_MIDI_IS_USB_GADGET) {\n            amy_arduino_usb_setup();\n        }\n        #endif\n        if(amy_global.config.midi & AMY_MIDI_IS_UART) {\n            esp_init_midi();\n            if (amy_global.config.platform.multithread) {\n                xTaskCreatePinnedToCore(run_midi_task, MIDI_TASK_NAME, (MIDI_TASK_STACK_SIZE) / sizeof(StackType_t), NULL, MIDI_TASK_PRIORITY, &midi_handle, MIDI_TASK_COREID);\n            }  // otherwise esp_poll_midi is called from amy_update_tasks()\n        }\n    }\n}\n\nvoid stop_midi() {\n    if(amy_global.config.midi & AMY_MIDI_IS_UART) {\n        if (amy_global.config.platform.multithread) {\n            vTaskDelete(midi_handle);\n        }\n        esp_deinit_midi();\n    }\n    free(sysex_buffer);\n    sysex_buffer = NULL;\n    for (int i = 0; i < SYSEX_COPY_SLOTS; i++) {\n        free(sysex_message_copies[i]);\n        sysex_message_copies[i] = NULL;\n    }\n}\n\n\n\n\n#endif\n\n#if (defined ARDUINO_ARCH_RP2040) || (defined ARDUINO_ARCH_RP2350)\n\nuart_inst_t * rp_get_uart(int8_t index) {\n    if(index==0) return uart0;\n    if(index==1) return uart1;\n    return NULL;\n}\n\n// RX interrupt handler\nvoid on_pico_uart_rx() {\n    const int midi_buffer_size = 16;\n    uint8_t bytes[midi_buffer_size];\n    uint8_t i = 0;\n    while (uart_is_readable(rp_get_uart(amy_global.config.midi_uart)) && i < midi_buffer_size) {\n        uart_read_blocking (rp_get_uart(amy_global.config.midi_uart), bytes + i, 1);\n        i++;\n    }\n    //if (i >= midi_buffer_size)\n    //    fprintf(stderr, \"midi_buffer_size %d of %d\\n\", i, midi_buffer_size);\n    convert_midi_bytes_to_messages(bytes,i,0);\n}\n\nextern void pico_setup_midi();\nextern void pico_teardown_midi();\n\nvoid run_midi() {\n    if (sysex_buffer == NULL) {\n        sysex_buffer = malloc_caps(MAX_SYSEX_BYTES, amy_global.config.ram_caps_sysex);\n        for (int i = 0; i < SYSEX_COPY_SLOTS; i++) {\n            sysex_message_copies[i] = malloc_caps(MAX_SYSEX_BYTES, amy_global.config.ram_caps_sysex);\n        }\n        if(amy_global.config.midi & AMY_MIDI_IS_UART) {\n            uart_init(rp_get_uart(amy_global.config.midi_uart), 31250);\n            gpio_set_function(amy_global.config.midi_out, UART_FUNCSEL_NUM(rp_get_uart(amy_global.config.midi_uart), amy_global.config.midi_out));\n            gpio_set_function(amy_global.config.midi_in, UART_FUNCSEL_NUM(rp_get_uart(amy_global.config.midi_uart), amy_global.config.midi_in));\n            uart_set_hw_flow(rp_get_uart(amy_global.config.midi_uart), false, false);\n            uart_set_format(rp_get_uart(amy_global.config.midi_uart), 8, 1, UART_PARITY_NONE);\n            uart_set_fifo_enabled(rp_get_uart(amy_global.config.midi_uart), true);\n        } else if(amy_global.config.midi & AMY_MIDI_IS_USB_GADGET) {\n            pico_setup_midi();\n        }\n    }\n}\n\nvoid stop_midi() {\n    if (sysex_buffer) {\n        if(amy_global.config.midi & AMY_MIDI_IS_UART) {\n            uart_set_fifo_enabled(rp_get_uart(amy_global.config.midi_uart), false);\n            uart_deinit(rp_get_uart(amy_global.config.midi_uart));\n        } else if(amy_global.config.midi & AMY_MIDI_IS_USB_GADGET) {\n            pico_teardown_midi();\n        }\n        free(sysex_buffer);\n        sysex_buffer = NULL;\n        for (int i = 0; i < SYSEX_COPY_SLOTS; i++) {\n            free(sysex_message_copies[i]);\n            sysex_message_copies[i] = NULL;\n        }\n    }\n}\n\n#endif\n\n#ifdef __IMXRT1062__\nextern void teensy_start_midi();\n\nvoid run_midi() {\n    if(amy_global.config.midi & AMY_MIDI_IS_UART) teensy_start_midi();\n}\n\nvoid stop_midi() {\n}\n#endif\n\n\n#ifdef __linux__\nvoid stop_midi() {\n}\n\nvoid run_midi() {\n    //fprintf(stderr, \"no MIDI support on linux yet\\n\");\n}\n#endif\n\n#ifdef AMY_DAISY\n// Daisy seed\nvoid run_midi() {\n    // MIDI handled in main.\n}\n#endif\n\n#ifdef _WIN32\nvoid stop_midi() {\n}\n\nvoid run_midi() {\n}\n#endif\n\nvoid midi_out(uint8_t * bytes, uint16_t len) {\n\n// Is there USB gadget midi? Send it\n#if defined TUD_USB_GADGET\n    if(amy_global.config.midi & AMY_MIDI_IS_USB_GADGET) {\n        // tud_midi_stream_write uses a small FIFO (e.g. 64 bytes). For long\n        // messages (e.g. zD sysex dumps) we must loop and yield until the\n        // USB task flushes the FIFO, otherwise bytes are silently dropped.\n        if (len > 64) fprintf(stderr, \"midi_out: USB gadget, want to send %d bytes\\n\", (int)len);\n        uint32_t sent = 0;\n        int stall_ticks = 0;\n        while (sent < len) {\n            uint32_t n = tud_midi_stream_write(0, bytes + sent, len - sent);\n            if (n == 0) {\n#if defined(TULIP) || defined(AMYBOARD)\n                // We're running on the MP main thread; the USB task also runs\n                // here, so vTaskDelay alone won't drain the FIFO. Pump USB\n                // events directly.\n                mp_usbd_task();\n#endif\n#if defined ESP_PLATFORM\n                vTaskDelay(pdMS_TO_TICKS(1));\n#endif\n                if (++stall_ticks > 1000) {\n                    fprintf(stderr, \"midi_out: STALLED after %u of %u bytes\\n\",\n                            (unsigned)sent, (unsigned)len);\n                    break;\n                }\n            } else {\n                stall_ticks = 0;\n            }\n            sent += n;\n        }\n        if (len > 64) fprintf(stderr, \"midi_out: USB gadget sent %u/%u bytes\\n\",\n                              (unsigned)sent, (unsigned)len);\n    }\n#endif\n\n// Also do UART midi on supported platforms\n#if defined ESP_PLATFORM\n    if(amy_global.config.midi & AMY_MIDI_IS_UART) {\n        uart_write_bytes(esp_get_uart(amy_global.config.midi_uart), bytes, len);\n    }\n#elif (defined ARDUINO_ARCH_RP2040) || (defined ARDUINO_ARCH_RP2350)\n    if(amy_global.config.midi & AMY_MIDI_IS_UART) uart_write_blocking(rp_get_uart(amy_global.config.midi_uart), bytes, len);\n#else\n    // teensy\n    // linux\n#endif\n\n}\n\n#endif // check for macos desktop \n"
  },
  {
    "path": "src/amy_midi.h",
    "content": "// midi.h\n\n#ifndef __MIDI_H\n#define __MIDI_H\n\n#ifdef ESP_PLATFORM \n#include \"driver/uart.h\"\n#include \"soc/uart_reg.h\"\n#include \"esp_task.h\"\n#else\n// virtualmidi Cocoa stubs\n#endif\n#define MIDI_SLOTS 4\n\nvoid convert_midi_bytes_to_messages(uint8_t * data, size_t len, uint8_t usb);\nvoid amy_process_single_midi_byte(uint8_t byte, uint8_t from_web_or_usb);\nvoid amy_external_midi_output(uint8_t * data, uint32_t len);\nvoid amy_external_midi_sync(uint8_t enabled);\n\n\n#define MAX_MIDI_BYTES_TO_PARSE 1024\n#define MAX_MIDI_BYTES_PER_MESSAGE 3\n#define MIDI_QUEUE_DEPTH 1024\n#define MAX_SYSEX_BYTES (16384)\nextern uint8_t *sysex_buffer;\n#define SYSEX_COPY_SLOTS 32\nextern char *sysex_message_copies[SYSEX_COPY_SLOTS];\nextern uint8_t sysex_copy_write_idx;\nextern uint8_t sysex_copy_read_idx;\nextern uint16_t sysex_len;\nextern void parse_sysex();\nextern uint8_t last_midi[MIDI_QUEUE_DEPTH][MAX_MIDI_BYTES_PER_MESSAGE];\nextern uint8_t last_midi_len[MIDI_QUEUE_DEPTH];\nextern int16_t midi_queue_tail;\nextern int16_t midi_queue_head;\n\nvoid midi_out(uint8_t * bytes, uint16_t len);\nvoid midi_local(uint8_t * bytes, uint16_t len);\nvoid amy_send_midi_note_off(uint16_t osc);\nvoid amy_send_midi_note_on(uint16_t osc);\n// For pyamy inject_midi\nvoid amy_event_midi_message_received(uint8_t * data, uint32_t len, uint8_t sysex, uint32_t time);\n\n#ifdef ESP_PLATFORM\n#define MIDI_TASK_COREID (0)\n#define MIDI_TASK_STACK_SIZE (8 * 1024)\n#define MIDI_TASK_NAME      \"amy_midi_task\"\n#define MIDI_TASK_PRIORITY (ESP_TASK_PRIO_MAX - 2)\n#endif\n\nvoid run_midi();\nvoid stop_midi();\n#ifdef MACOS\nvoid *run_midi_macos(void*vargp);\n#endif\n\nvoid check_tusb_midi();\nvoid init_tusb_midi();\n\n#endif // __MIDI_H\n"
  },
  {
    "path": "src/api.c",
    "content": "// api.c\n// C callable entry points to amy\n\n#include \"amy.h\"\n\namy_config_t amy_default_config() {\n    amy_config_t c;\n    c.features.reverb = 1;\n    c.features.echo = 1;\n    c.features.chorus = 1;\n    c.features.partials = 1;\n    c.features.custom = 1;\n    c.features.default_synths = 0;\n    c.features.audio_in = 0;\n    c.features.startup_bleep = 0;\n\n    // Use all platform features by default.\n    c.platform.multicore = 1;\n    c.platform.multithread = 1;\n\n    c.write_samples_fn = NULL;\n    c.amy_external_render_hook = NULL;\n    c.amy_external_coef_hook = NULL;\n    c.amy_external_block_done_hook = NULL;\n    c.amy_external_midi_input_hook = NULL;\n    c.amy_external_sequencer_hook = NULL;\n    c.amy_external_fopen_hook = NULL;\n    c.amy_external_fwrite_hook = NULL;\n    c.amy_external_fread_hook = NULL;\n    c.amy_external_fseek_hook = NULL;\n    c.amy_external_fclose_hook = NULL;\n    c.amy_external_file_transfer_done_hook = NULL;\n\n    c.midi = AMY_MIDI_IS_NONE;\n    c.audio = AMY_AUDIO_IS_NONE;\n    c.ks_oscs = 1;\n\n    c.max_oscs = 250;\n    c.max_sequencer_tags = 256;\n    c.max_voices = 64;\n    c.max_synths = 64;\n    c.max_memory_patches = 32;\n\n    // caps\n    #if defined(TULIP) || defined(AMYBOARD) || defined(AMYBOARD_ARDUINO)\n    c.ram_caps_events = MALLOC_CAP_SPIRAM;\n    c.ram_caps_synth = MALLOC_CAP_SPIRAM;\n    c.ram_caps_block = MALLOC_CAP_DEFAULT;\n    c.ram_caps_fbl = MALLOC_CAP_DEFAULT;\n    c.ram_caps_delay = MALLOC_CAP_SPIRAM;\n    c.ram_caps_sample = MALLOC_CAP_SPIRAM;\n    c.ram_caps_sysex = MALLOC_CAP_SPIRAM;\n    #else\n    c.ram_caps_events = MALLOC_CAP_DEFAULT;\n    c.ram_caps_synth = MALLOC_CAP_DEFAULT;\n    c.ram_caps_block = MALLOC_CAP_DEFAULT;\n    c.ram_caps_fbl = MALLOC_CAP_DEFAULT;\n    c.ram_caps_delay = MALLOC_CAP_DEFAULT;\n    c.ram_caps_sample = MALLOC_CAP_DEFAULT;\n    c.ram_caps_sysex = MALLOC_CAP_DEFAULT;\n    #endif    \n\n    c.capture_device_id = -1;\n    c.playback_device_id = -1;\n\n    c.i2s_lrc = -1;\n    c.i2s_dout = -1;\n    c.i2s_din = -1;\n    c.i2s_bclk = -1;\n    c.i2s_mclk = -1;\n    c.i2s_mclk_mult = 256;  // MCLK = mclk_mult * Fs.\n    c.midi_out = -1;\n    c.midi_in = -1;\n    c.midi_uart = -1; \n\n    #if defined(AMYBOARD_ARDUINO) || defined(AMYBOARD)\n    // Set default pins \n    c.features.audio_in = 1;\n    c.audio = AMY_AUDIO_IS_I2S;\n    c.midi = AMY_MIDI_IS_UART | AMY_MIDI_IS_USB_GADGET;\n    c.i2s_lrc = AMYBOARD_LRC;\n    c.i2s_bclk = AMYBOARD_BCLK;\n    c.i2s_dout = AMYBOARD_DOUT;\n    c.i2s_din = AMYBOARD_DIN;\n    c.i2s_mclk = AMYBOARD_MCLK;\n    c.midi_out = AMYBOARD_MIDI_OUT_TYPE_A; // TYPE A. User can set type B with 15 \n    c.midi_in = AMYBOARD_MIDI_IN;\n    #endif\n\n    #ifdef ESP_PLATFORM\n    c.midi_uart = 1; // This is MIDI UART _number_, like index\n    #endif\n\n    #if (defined ARDUINO_ARCH_RP2040) || (defined ARDUINO_ARCH_RP2350)\n    c.midi_uart = 1; // This is MIDI UART _number_, like index\n    #endif\n\n    return c;\n}\n\n\n// create a new default API accessible event\namy_event amy_default_event() {\n    amy_event e;\n    amy_clear_event(&e);\n    return e;\n}\n\nvoid amy_clear_event(amy_event *e) {\n    e->status = EVENT_EMPTY;\n    AMY_UNSET(e->time);\n    AMY_UNSET(e->osc);\n    AMY_UNSET(e->preset);\n    AMY_UNSET(e->wave);\n    AMY_UNSET(e->patch_number);\n    AMY_UNSET(e->trigger_phase);\n    AMY_UNSET(e->feedback);\n    AMY_UNSET(e->velocity);\n    AMY_UNSET(e->midi_note);\n    AMY_UNSET(e->volume);\n    AMY_UNSET(e->pitch_bend);\n    AMY_UNSET(e->tempo);\n    AMY_UNSET(e->latency_ms);\n    AMY_UNSET(e->ratio);\n    for (int i = 0; i < NUM_COMBO_COEFS; ++i) {\n        AMY_UNSET(e->amp_coefs[i]);\n        AMY_UNSET(e->freq_coefs[i]);\n        AMY_UNSET(e->filter_freq_coefs[i]);\n        AMY_UNSET(e->duty_coefs[i]);\n        AMY_UNSET(e->pan_coefs[i]);\n    }\n    AMY_UNSET(e->resonance);\n    AMY_UNSET(e->portamento_ms);\n    AMY_UNSET(e->filter_type);\n    AMY_UNSET(e->chained_osc);\n    AMY_UNSET(e->mod_source);\n    AMY_UNSET(e->algorithm);\n    AMY_UNSET(e->bp_is_set[0]);\n    AMY_UNSET(e->bp_is_set[1]);\n    AMY_UNSET(e->eg_type[0]);\n    AMY_UNSET(e->eg_type[1]);\n    AMY_UNSET(e->reset_osc);\n    AMY_UNSET(e->note_source);\n    for (int i = 0; i < MAX_ALGO_OPS; ++i) {\n        AMY_UNSET(e->algo_source[i]);\n    }\n    for (int i = 0; i < MAX_VOICES_PER_INSTRUMENT; ++i) {\n        AMY_UNSET(e->voices[i]);\n    }\n    for (int i = 0; i < MAX_BPS; ++i) {\n        AMY_UNSET(e->eg0_times[i]);\n        AMY_UNSET(e->eg0_values[i]);\n        AMY_UNSET(e->eg1_times[i]);\n        AMY_UNSET(e->eg1_values[i]);\n    }\n    AMY_UNSET(e->synth);\n    AMY_UNSET(e->synth_flags);\n    AMY_UNSET(e->to_synth);\n    AMY_UNSET(e->synth_delay_ms);\n    AMY_UNSET(e->grab_midi_notes);\n    AMY_UNSET(e->pedal);\n    AMY_UNSET(e->num_voices);\n    AMY_UNSET(e->sequence[SEQUENCE_TICK]);\n    AMY_UNSET(e->sequence[SEQUENCE_PERIOD]);\n    AMY_UNSET(e->sequence[SEQUENCE_TAG]);\n    AMY_UNSET(e->eq_l);\n    AMY_UNSET(e->eq_m);\n    AMY_UNSET(e->eq_h);\n    AMY_UNSET(e->echo_level);\n    AMY_UNSET(e->echo_delay_ms);\n    AMY_UNSET(e->echo_max_delay_ms);\n    AMY_UNSET(e->echo_feedback);\n    AMY_UNSET(e->echo_filter_coef);\n    AMY_UNSET(e->chorus_level);\n    AMY_UNSET(e->chorus_max_delay);\n    AMY_UNSET(e->chorus_lfo_freq);\n    AMY_UNSET(e->chorus_depth);\n    AMY_UNSET(e->reverb_level);\n    AMY_UNSET(e->reverb_liveness);\n    AMY_UNSET(e->reverb_damping);\n    AMY_UNSET(e->reverb_xover_hz);\n    AMY_UNSET(e->oscs_per_voice);\n}\n\n\n// get last-written output, returns number of bytes written.\nint amy_get_output_buffer(output_sample_type * samples) {\n    if (amy_out_block == NULL) return 0;  // amy_fill_buffer has not yet run.\n    for(uint16_t i=0;i<AMY_BLOCK_SIZE*AMY_NCHANS;i++) samples[i] = amy_out_block[i];\n    return AMY_BLOCK_SIZE * AMY_NCHANS * sizeof(output_sample_type);\n}\n\n// get AUDIO_IN0 and AUDIO_IN1, returns number of bytes written.\nint amy_get_input_buffer(output_sample_type * samples) {\n    for(uint16_t i=0;i<AMY_BLOCK_SIZE*AMY_NCHANS;i++) samples[i] = amy_in_block[i];\n    return AMY_BLOCK_SIZE * AMY_NCHANS * sizeof(output_sample_type);\n}\n\n// set AUDIO_EXT0 and AUDIO_EXT1\nvoid amy_set_external_input_buffer(output_sample_type * samples) {\n    for(uint16_t i=0;i<AMY_BLOCK_SIZE*AMY_NCHANS;i++) amy_external_in_block[i] = samples[i];\n}\n\noutput_sample_type * amy_simple_fill_buffer() {\n    amy_execute_deltas();\n    amy_render(0, AMY_OSCS, 0);\n    return amy_fill_buffer();\n}\n\n\n// on all platforms, sysclock is based on total samples played, using audio out (i2s or etc) as system clock\nuint32_t amy_sysclock() {\n    // Time is returned in integer milliseconds.  uint32_t rollover is 49.7 days.\n    return (uint32_t)((amy_global.total_blocks * AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE) * 1000);\n}\n\n\n// Flag indicating whether the current amy_add_message call is from an\n// external sysex source (in which case transfer_flag should route data\n// to parse_transfer_message) or from an internal amy.send() call (in\n// which case it should be processed as a normal wire command).\n// Without this, a sketch's amy.send(note=36) during a file transfer\n// would get base64-decoded and written to the file as garbage.\nbool amy_parsing_from_sysex = false;\n\n// given a wire message string play / schedule the event directly (WIRE API)\nvoid amy_add_message(char *message) {\n    peek_stack(\"add_message\");\n    amy_event e; // = amy_default_event();\n    // Parse the wire string into an event\n    int length = strlen(message);\n    char *remains = message;\n    while(length > 0) {\n        amy_clear_event(&e);\n\tint pos = amy_parse_message(remains, length, &e);\n\tamy_add_event(&e);\n\tremains += pos;\n\tlength -= pos;\n    }\n}\n\n// Like amy_add_message but marks the message as coming from an external\n// sysex source so the file transfer routing in amy_parse_message applies.\nvoid amy_add_message_from_sysex(char *message) {\n    amy_parsing_from_sysex = true;\n    amy_add_message(message);\n    amy_parsing_from_sysex = false;\n}\n\n// given an event play / schedule the event directly (C API)\nvoid amy_add_event(amy_event *e) {\n    peek_stack(\"add_event\");\n    amy_process_event(e);\n    // Do not \"play\" events that are not sent directly to the AMY synthesizer, e.g. sequencer events or stored patches\n    if(e->status == EVENT_SCHEDULED) {\n        amy_event_to_deltas_queue(e, 0, &amy_global.delta_queue);\n    }\n}\n\n// defined in midi_mappings.c\nextern void juno_filter_midi_handler(uint8_t * bytes, uint16_t len, uint8_t is_sysex);\nextern void midi_cc_handler(uint8_t * bytes, uint16_t len, uint8_t is_sysex);\n\n#ifdef __EMSCRIPTEN__\nvoid amy_start_web() {\n    // a shim for web AMY, as it's annoying to build structs in js\n    amy_config_t amy_config = amy_default_config();\n    amy_config.midi = AMY_MIDI_IS_WEBMIDI;\n    amy_config.features.default_synths = 1;\n    amy_config.features.startup_bleep = 1;\n    amy_config.amy_external_midi_input_hook = midi_cc_handler;\n    amy_start(amy_config);\n}\n\nvoid amy_start_web_no_synths() {\n    // a shim for web AMY, as it's annoying to build structs in js\n    amy_config_t amy_config = amy_default_config();\n    amy_config.midi = AMY_MIDI_IS_WEBMIDI;\n    amy_config.features.default_synths = 0;\n    amy_config.amy_external_midi_input_hook = midi_cc_handler;\n    amy_start(amy_config);\n}\n#endif\n\n\nvoid amy_default_synths() {\n    // Configure several default synthesizers for \"out of box\" playability.\n\n    // sine wave \"bleeper\" on ch 0 (not a MIDI channel)\n    amy_event e = amy_default_event();\n    // osc=0 sinewave.\n    e.synth = 0;\n    e.num_voices = 1;\n    e.oscs_per_voice = 1;\n    e.wave = SINE;\n    amy_add_event(&e);\n\n    // GM drum synth on channel 10\n    e = amy_default_event();\n    e.synth = 10;\n    e.num_voices = 6;\n    e.oscs_per_voice = 1;\n    e.wave = PCM;\n    e.amp_coefs[COEF_CONST] = 5.0;  // MIDI drums need to be louder to match juno patches.\n    // Flag to perform note -> drum PCM patch translation.\n    e.synth_flags = _SYNTH_FLAGS_MIDI_DRUMS | _SYNTH_FLAGS_IGNORE_NOTE_OFFS;\n    amy_add_event(&e);\n\n    // DX7 6 note poly on channel 2\n    e = amy_default_event();\n    e.num_voices = 6;\n    e.patch_number = 128;\n    e.synth = 2;\n    amy_add_event(&e);\n\n    // Juno 6 poly on channel 1\n    // Define this last so if we release it, the oscs aren't fragmented.\n    e = amy_default_event();\n    e.num_voices = 6;\n    e.patch_number = 0;\n    e.synth = 1;\n    amy_add_event(&e);\n    // Add some MIDI CCs for the Juno (defined in midi_mappings.c).\n    amy_global.config.amy_external_midi_input_hook = juno_filter_midi_handler;\n}\n\n// Schedule a bleep now\nvoid amy_bleep(uint32_t start) {\n    amy_event e = amy_default_event();\n    e.osc = AMY_OSCS - 1;  // Use a high-up osc to avoid collisions?\n    e.time = start;\n    e.wave = SINE;\n    e.freq_coefs[COEF_CONST] = 220;\n    e.pan_coefs[COEF_CONST] = 0.9;\n    e.velocity = 1;\n    amy_add_event(&e);\n    e.time = start + 150;\n    e.freq_coefs[COEF_CONST] = 440;\n    e.pan_coefs[COEF_CONST] = 0.1;\n    amy_add_event(&e);\n    e.time = start + 300;\n    e.velocity = 0;\n    e.pan_coefs[COEF_CONST] = 0.5;  // Restore default pan to osc.\n    amy_add_event(&e);\n}\n\n// Schedule a bleep now using default bleep synth (0)\nvoid amy_bleep_synth(uint32_t start) {\n    amy_event e = amy_default_event();\n    e.synth = 0;\n    e.time = start;\n    // you have to use notes with synths, so the voice manager can grok.\n    e.midi_note = 57;\n    e.pan_coefs[COEF_CONST] = 0.9;\n    e.velocity = 1;\n    amy_add_event(&e);\n    e.time = start + 150;\n    e.midi_note = 69;\n    e.pan_coefs[COEF_CONST] = 0.1;\n    amy_add_event(&e);\n    e.time = start + 300;\n    e.velocity = 0;\n    e.pan_coefs[COEF_CONST] = 0.5;  // Restore default pan to osc 0.\n    amy_add_event(&e);\n}\n\n#ifndef AMY_NO_MINIAUDIO\nextern void miniaudio_start();\nextern void miniaudio_stop();\n#endif\n\nvoid amy_start(amy_config_t c) {\n    global_init(c);\n    amy_profiles_init();\n    transfer_init();\n    oscs_init();\n    amy_platform_init();\n    run_midi();  // Must be after platform_init in case F_CPU is modified on RP2040 Arduino.\n    if(AMY_HAS_DEFAULT_SYNTHS) amy_default_synths();\n    if(AMY_HAS_STARTUP_BLEEP) {\n        if(AMY_HAS_DEFAULT_SYNTHS)\n            amy_bleep_synth(0);  // bleep using the default sinewave synth voice.\n        else\n            amy_bleep(0);  // bleep using raw oscs.\n    }\n#if !defined(ESP_PLATFORM) && !defined(PICO_ON_DEVICE) && !defined(ARDUINO) && !defined(__EMSCRIPTEN__) && !defined(AMY_NO_MINIAUDIO)\n    if (amy_global.config.audio == AMY_AUDIO_IS_MINIAUDIO)\n        miniaudio_start();\n#endif\n    if (amy_global.config.amy_external_midi_input_hook == NULL) {\n        amy_global.config.amy_external_midi_input_hook = midi_cc_handler;\n    }\n}\n\nvoid amy_stop() {\n#if !defined(ESP_PLATFORM) && !defined(PICO_ON_DEVICE) && !defined(ARDUINO) && !defined(AMY_NO_MINIAUDIO)\n    if (amy_global.config.audio == AMY_AUDIO_IS_MINIAUDIO)\n        miniaudio_stop();\n#endif\n    stop_midi();\n    amy_platform_deinit();\n    oscs_deinit();\n}\n\n\nint16_t *amy_update() {\n    // Single function to update buffers.\n    amy_update_tasks();\n    int16_t *block = amy_render_audio();\n    if (AMY_HAS_I2S && !amy_global.i2s_is_in_background) {\n        amy_i2s_write(\n            (uint8_t *)block, AMY_BLOCK_SIZE * AMY_NCHANS * sizeof(int16_t)\n        );\n    }\n    if (amy_global.config.write_samples_fn) {\n        amy_global.config.write_samples_fn(\n            (uint8_t *)block, AMY_BLOCK_SIZE * AMY_NCHANS * sizeof(int16_t)\n        );\n    }\n    return block;\n}\n"
  },
  {
    "path": "src/clipping_lookup_table.h",
    "content": "// Automatically generated.\n// Clipping lookup table\n#ifndef __CLIPPING_TABLE\n#define __CLIPPING_TABLE\n#define FIRST_NONLIN 29491\n#define NONLIN_RANGE 4914\n// First sample value beyond end of table (just clip to max).\n#define FIRST_HARDCLIP (FIRST_NONLIN + NONLIN_RANGE)\nconst uint16_t clipping_lookup_table[NONLIN_RANGE] PROGMEM = {\n29491,29491,29492,29493,29494,29495,29496,29497,\n29498,29499,29500,29501,29502,29503,29504,29505,\n29506,29507,29508,29509,29510,29511,29512,29513,\n29514,29515,29516,29517,29518,29519,29520,29521,\n29522,29523,29524,29525,29526,29527,29528,29529,\n29530,29531,29532,29533,29534,29535,29536,29537,\n29538,29539,29540,29541,29542,29543,29544,29545,\n29546,29547,29548,29549,29550,29551,29552,29553,\n29554,29555,29556,29557,29558,29559,29560,29561,\n29562,29563,29564,29565,29566,29567,29568,29569,\n29570,29571,29572,29573,29574,29575,29576,29577,\n29578,29579,29580,29581,29582,29583,29584,29585,\n29586,29587,29588,29589,29590,29591,29592,29593,\n29594,29595,29596,29597,29598,29599,29600,29601,\n29602,29603,29604,29605,29606,29607,29608,29609,\n29610,29611,29612,29613,29614,29615,29616,29617,\n29618,29619,29620,29621,29622,29623,29624,29625,\n29626,29627,29628,29629,29630,29631,29632,29633,\n29634,29635,29636,29637,29638,29639,29640,29641,\n29642,29643,29644,29645,29646,29647,29648,29649,\n29650,29651,29652,29653,29654,29655,29656,29657,\n29658,29659,29660,29661,29662,29663,29664,29665,\n29666,29667,29668,29669,29670,29671,29672,29673,\n29674,29675,29676,29677,29678,29679,29680,29681,\n29682,29683,29684,29685,29686,29687,29688,29689,\n29690,29691,29692,29693,29694,29695,29696,29697,\n29698,29699,29700,29701,29702,29703,29704,29705,\n29706,29707,29708,29709,29710,29711,29712,29713,\n29714,29715,29716,29717,29718,29719,29720,29721,\n29722,29723,29724,29725,29726,29727,29728,29729,\n29730,29731,29732,29733,29734,29735,29736,29737,\n29738,29739,29740,29741,29742,29743,29744,29745,\n29746,29747,29748,29749,29750,29751,29752,29753,\n29754,29755,29756,29757,29758,29759,29760,29761,\n29762,29763,29764,29765,29766,29767,29768,29769,\n29770,29771,29772,29773,29774,29775,29776,29777,\n29778,29779,29780,29781,29782,29783,29784,29785,\n29786,29787,29788,29789,29790,29791,29792,29793,\n29794,29795,29796,29797,29798,29799,29800,29801,\n29802,29803,29804,29805,29806,29807,29808,29809,\n29810,29811,29812,29813,29814,29815,29816,29817,\n29818,29819,29820,29821,29822,29823,29824,29825,\n29826,29827,29828,29829,29830,29831,29832,29833,\n29834,29835,29836,29837,29838,29839,29840,29841,\n29842,29843,29844,29845,29846,29847,29848,29849,\n29850,29851,29852,29853,29854,29855,29856,29857,\n29858,29859,29860,29861,29862,29863,29864,29865,\n29866,29867,29868,29869,29870,29871,29872,29873,\n29874,29875,29876,29877,29878,29879,29880,29881,\n29882,29883,29884,29885,29886,29887,29888,29889,\n29890,29891,29892,29893,29894,29895,29896,29897,\n29898,29899,29900,29901,29902,29903,29904,29905,\n29906,29906,29907,29908,29909,29910,29911,29912,\n29913,29914,29915,29916,29917,29918,29919,29920,\n29921,29922,29923,29924,29925,29926,29927,29928,\n29929,29930,29931,29932,29933,29934,29935,29936,\n29937,29938,29939,29940,29941,29942,29943,29944,\n29945,29946,29947,29948,29949,29950,29951,29952,\n29953,29954,29955,29956,29957,29958,29959,29960,\n29961,29962,29963,29964,29965,29966,29967,29968,\n29969,29970,29971,29972,29973,29974,29975,29976,\n29977,29978,29979,29980,29981,29982,29983,29984,\n29985,29986,29987,29988,29989,29990,29991,29992,\n29993,29994,29995,29996,29997,29998,29999,30000,\n30001,30002,30003,30004,30005,30006,30007,30008,\n30009,30010,30011,30012,30013,30014,30014,30015,\n30016,30017,30018,30019,30020,30021,30022,30023,\n30024,30025,30026,30027,30028,30029,30030,30031,\n30032,30033,30034,30035,30036,30037,30038,30039,\n30040,30041,30042,30043,30044,30045,30046,30047,\n30048,30049,30050,30051,30052,30053,30054,30055,\n30056,30057,30058,30059,30060,30061,30062,30063,\n30064,30065,30066,30067,30068,30069,30070,30071,\n30072,30073,30074,30075,30076,30077,30078,30079,\n30080,30081,30082,30083,30084,30085,30086,30087,\n30088,30089,30089,30090,30091,30092,30093,30094,\n30095,30096,30097,30098,30099,30100,30101,30102,\n30103,30104,30105,30106,30107,30108,30109,30110,\n30111,30112,30113,30114,30115,30116,30117,30118,\n30119,30120,30121,30122,30123,30124,30125,30126,\n30127,30128,30129,30130,30131,30132,30133,30134,\n30135,30136,30137,30138,30139,30140,30141,30142,\n30143,30144,30145,30146,30147,30148,30148,30149,\n30150,30151,30152,30153,30154,30155,30156,30157,\n30158,30159,30160,30161,30162,30163,30164,30165,\n30166,30167,30168,30169,30170,30171,30172,30173,\n30174,30175,30176,30177,30178,30179,30180,30181,\n30182,30183,30184,30185,30186,30187,30188,30189,\n30190,30191,30192,30193,30194,30195,30196,30197,\n30198,30198,30199,30200,30201,30202,30203,30204,\n30205,30206,30207,30208,30209,30210,30211,30212,\n30213,30214,30215,30216,30217,30218,30219,30220,\n30221,30222,30223,30224,30225,30226,30227,30228,\n30229,30230,30231,30232,30233,30234,30235,30236,\n30237,30238,30239,30240,30241,30242,30242,30243,\n30244,30245,30246,30247,30248,30249,30250,30251,\n30252,30253,30254,30255,30256,30257,30258,30259,\n30260,30261,30262,30263,30264,30265,30266,30267,\n30268,30269,30270,30271,30272,30273,30274,30275,\n30276,30277,30278,30279,30280,30281,30281,30282,\n30283,30284,30285,30286,30287,30288,30289,30290,\n30291,30292,30293,30294,30295,30296,30297,30298,\n30299,30300,30301,30302,30303,30304,30305,30306,\n30307,30308,30309,30310,30311,30312,30313,30314,\n30315,30316,30316,30317,30318,30319,30320,30321,\n30322,30323,30324,30325,30326,30327,30328,30329,\n30330,30331,30332,30333,30334,30335,30336,30337,\n30338,30339,30340,30341,30342,30343,30344,30345,\n30346,30347,30348,30349,30349,30350,30351,30352,\n30353,30354,30355,30356,30357,30358,30359,30360,\n30361,30362,30363,30364,30365,30366,30367,30368,\n30369,30370,30371,30372,30373,30374,30375,30376,\n30377,30378,30379,30379,30380,30381,30382,30383,\n30384,30385,30386,30387,30388,30389,30390,30391,\n30392,30393,30394,30395,30396,30397,30398,30399,\n30400,30401,30402,30403,30404,30405,30406,30407,\n30407,30408,30409,30410,30411,30412,30413,30414,\n30415,30416,30417,30418,30419,30420,30421,30422,\n30423,30424,30425,30426,30427,30428,30429,30430,\n30431,30432,30433,30433,30434,30435,30436,30437,\n30438,30439,30440,30441,30442,30443,30444,30445,\n30446,30447,30448,30449,30450,30451,30452,30453,\n30454,30455,30456,30457,30458,30458,30459,30460,\n30461,30462,30463,30464,30465,30466,30467,30468,\n30469,30470,30471,30472,30473,30474,30475,30476,\n30477,30478,30479,30480,30481,30481,30482,30483,\n30484,30485,30486,30487,30488,30489,30490,30491,\n30492,30493,30494,30495,30496,30497,30498,30499,\n30500,30501,30502,30503,30504,30504,30505,30506,\n30507,30508,30509,30510,30511,30512,30513,30514,\n30515,30516,30517,30518,30519,30520,30521,30522,\n30523,30524,30525,30525,30526,30527,30528,30529,\n30530,30531,30532,30533,30534,30535,30536,30537,\n30538,30539,30540,30541,30542,30543,30544,30545,\n30545,30546,30547,30548,30549,30550,30551,30552,\n30553,30554,30555,30556,30557,30558,30559,30560,\n30561,30562,30563,30564,30565,30565,30566,30567,\n30568,30569,30570,30571,30572,30573,30574,30575,\n30576,30577,30578,30579,30580,30581,30582,30583,\n30584,30584,30585,30586,30587,30588,30589,30590,\n30591,30592,30593,30594,30595,30596,30597,30598,\n30599,30600,30601,30602,30602,30603,30604,30605,\n30606,30607,30608,30609,30610,30611,30612,30613,\n30614,30615,30616,30617,30618,30619,30620,30620,\n30621,30622,30623,30624,30625,30626,30627,30628,\n30629,30630,30631,30632,30633,30634,30635,30636,\n30637,30637,30638,30639,30640,30641,30642,30643,\n30644,30645,30646,30647,30648,30649,30650,30651,\n30652,30653,30653,30654,30655,30656,30657,30658,\n30659,30660,30661,30662,30663,30664,30665,30666,\n30667,30668,30669,30669,30670,30671,30672,30673,\n30674,30675,30676,30677,30678,30679,30680,30681,\n30682,30683,30684,30684,30685,30686,30687,30688,\n30689,30690,30691,30692,30693,30694,30695,30696,\n30697,30698,30699,30699,30700,30701,30702,30703,\n30704,30705,30706,30707,30708,30709,30710,30711,\n30712,30713,30714,30714,30715,30716,30717,30718,\n30719,30720,30721,30722,30723,30724,30725,30726,\n30727,30728,30728,30729,30730,30731,30732,30733,\n30734,30735,30736,30737,30738,30739,30740,30741,\n30742,30742,30743,30744,30745,30746,30747,30748,\n30749,30750,30751,30752,30753,30754,30755,30756,\n30756,30757,30758,30759,30760,30761,30762,30763,\n30764,30765,30766,30767,30768,30769,30769,30770,\n30771,30772,30773,30774,30775,30776,30777,30778,\n30779,30780,30781,30782,30782,30783,30784,30785,\n30786,30787,30788,30789,30790,30791,30792,30793,\n30794,30795,30795,30796,30797,30798,30799,30800,\n30801,30802,30803,30804,30805,30806,30807,30807,\n30808,30809,30810,30811,30812,30813,30814,30815,\n30816,30817,30818,30819,30819,30820,30821,30822,\n30823,30824,30825,30826,30827,30828,30829,30830,\n30831,30831,30832,30833,30834,30835,30836,30837,\n30838,30839,30840,30841,30842,30843,30843,30844,\n30845,30846,30847,30848,30849,30850,30851,30852,\n30853,30854,30854,30855,30856,30857,30858,30859,\n30860,30861,30862,30863,30864,30865,30865,30866,\n30867,30868,30869,30870,30871,30872,30873,30874,\n30875,30876,30876,30877,30878,30879,30880,30881,\n30882,30883,30884,30885,30886,30887,30887,30888,\n30889,30890,30891,30892,30893,30894,30895,30896,\n30897,30898,30898,30899,30900,30901,30902,30903,\n30904,30905,30906,30907,30908,30908,30909,30910,\n30911,30912,30913,30914,30915,30916,30917,30918,\n30918,30919,30920,30921,30922,30923,30924,30925,\n30926,30927,30928,30928,30929,30930,30931,30932,\n30933,30934,30935,30936,30937,30938,30938,30939,\n30940,30941,30942,30943,30944,30945,30946,30947,\n30948,30948,30949,30950,30951,30952,30953,30954,\n30955,30956,30957,30957,30958,30959,30960,30961,\n30962,30963,30964,30965,30966,30967,30967,30968,\n30969,30970,30971,30972,30973,30974,30975,30976,\n30976,30977,30978,30979,30980,30981,30982,30983,\n30984,30985,30985,30986,30987,30988,30989,30990,\n30991,30992,30993,30994,30994,30995,30996,30997,\n30998,30999,31000,31001,31002,31003,31003,31004,\n31005,31006,31007,31008,31009,31010,31011,31012,\n31012,31013,31014,31015,31016,31017,31018,31019,\n31020,31021,31021,31022,31023,31024,31025,31026,\n31027,31028,31029,31029,31030,31031,31032,31033,\n31034,31035,31036,31037,31038,31038,31039,31040,\n31041,31042,31043,31044,31045,31046,31046,31047,\n31048,31049,31050,31051,31052,31053,31054,31054,\n31055,31056,31057,31058,31059,31060,31061,31062,\n31062,31063,31064,31065,31066,31067,31068,31069,\n31070,31070,31071,31072,31073,31074,31075,31076,\n31077,31078,31078,31079,31080,31081,31082,31083,\n31084,31085,31086,31086,31087,31088,31089,31090,\n31091,31092,31093,31094,31094,31095,31096,31097,\n31098,31099,31100,31101,31102,31102,31103,31104,\n31105,31106,31107,31108,31109,31109,31110,31111,\n31112,31113,31114,31115,31116,31117,31117,31118,\n31119,31120,31121,31122,31123,31124,31124,31125,\n31126,31127,31128,31129,31130,31131,31131,31132,\n31133,31134,31135,31136,31137,31138,31139,31139,\n31140,31141,31142,31143,31144,31145,31146,31146,\n31147,31148,31149,31150,31151,31152,31153,31153,\n31154,31155,31156,31157,31158,31159,31160,31160,\n31161,31162,31163,31164,31165,31166,31167,31167,\n31168,31169,31170,31171,31172,31173,31173,31174,\n31175,31176,31177,31178,31179,31180,31180,31181,\n31182,31183,31184,31185,31186,31187,31187,31188,\n31189,31190,31191,31192,31193,31194,31194,31195,\n31196,31197,31198,31199,31200,31200,31201,31202,\n31203,31204,31205,31206,31207,31207,31208,31209,\n31210,31211,31212,31213,31213,31214,31215,31216,\n31217,31218,31219,31220,31220,31221,31222,31223,\n31224,31225,31226,31226,31227,31228,31229,31230,\n31231,31232,31232,31233,31234,31235,31236,31237,\n31238,31238,31239,31240,31241,31242,31243,31244,\n31245,31245,31246,31247,31248,31249,31250,31251,\n31251,31252,31253,31254,31255,31256,31257,31257,\n31258,31259,31260,31261,31262,31263,31263,31264,\n31265,31266,31267,31268,31269,31269,31270,31271,\n31272,31273,31274,31275,31275,31276,31277,31278,\n31279,31280,31280,31281,31282,31283,31284,31285,\n31286,31286,31287,31288,31289,31290,31291,31292,\n31292,31293,31294,31295,31296,31297,31298,31298,\n31299,31300,31301,31302,31303,31303,31304,31305,\n31306,31307,31308,31309,31309,31310,31311,31312,\n31313,31314,31314,31315,31316,31317,31318,31319,\n31320,31320,31321,31322,31323,31324,31325,31325,\n31326,31327,31328,31329,31330,31331,31331,31332,\n31333,31334,31335,31336,31336,31337,31338,31339,\n31340,31341,31342,31342,31343,31344,31345,31346,\n31347,31347,31348,31349,31350,31351,31352,31352,\n31353,31354,31355,31356,31357,31357,31358,31359,\n31360,31361,31362,31363,31363,31364,31365,31366,\n31367,31368,31368,31369,31370,31371,31372,31373,\n31373,31374,31375,31376,31377,31378,31378,31379,\n31380,31381,31382,31383,31383,31384,31385,31386,\n31387,31388,31388,31389,31390,31391,31392,31393,\n31393,31394,31395,31396,31397,31398,31398,31399,\n31400,31401,31402,31403,31403,31404,31405,31406,\n31407,31408,31408,31409,31410,31411,31412,31412,\n31413,31414,31415,31416,31417,31417,31418,31419,\n31420,31421,31422,31422,31423,31424,31425,31426,\n31427,31427,31428,31429,31430,31431,31431,31432,\n31433,31434,31435,31436,31436,31437,31438,31439,\n31440,31441,31441,31442,31443,31444,31445,31445,\n31446,31447,31448,31449,31450,31450,31451,31452,\n31453,31454,31454,31455,31456,31457,31458,31459,\n31459,31460,31461,31462,31463,31463,31464,31465,\n31466,31467,31468,31468,31469,31470,31471,31472,\n31472,31473,31474,31475,31476,31477,31477,31478,\n31479,31480,31481,31481,31482,31483,31484,31485,\n31485,31486,31487,31488,31489,31490,31490,31491,\n31492,31493,31494,31494,31495,31496,31497,31498,\n31498,31499,31500,31501,31502,31503,31503,31504,\n31505,31506,31507,31507,31508,31509,31510,31511,\n31511,31512,31513,31514,31515,31515,31516,31517,\n31518,31519,31519,31520,31521,31522,31523,31523,\n31524,31525,31526,31527,31527,31528,31529,31530,\n31531,31531,31532,31533,31534,31535,31536,31536,\n31537,31538,31539,31540,31540,31541,31542,31543,\n31544,31544,31545,31546,31547,31548,31548,31549,\n31550,31551,31552,31552,31553,31554,31555,31555,\n31556,31557,31558,31559,31559,31560,31561,31562,\n31563,31563,31564,31565,31566,31567,31567,31568,\n31569,31570,31571,31571,31572,31573,31574,31575,\n31575,31576,31577,31578,31579,31579,31580,31581,\n31582,31582,31583,31584,31585,31586,31586,31587,\n31588,31589,31590,31590,31591,31592,31593,31594,\n31594,31595,31596,31597,31597,31598,31599,31600,\n31601,31601,31602,31603,31604,31605,31605,31606,\n31607,31608,31608,31609,31610,31611,31612,31612,\n31613,31614,31615,31616,31616,31617,31618,31619,\n31619,31620,31621,31622,31623,31623,31624,31625,\n31626,31626,31627,31628,31629,31630,31630,31631,\n31632,31633,31633,31634,31635,31636,31637,31637,\n31638,31639,31640,31640,31641,31642,31643,31644,\n31644,31645,31646,31647,31647,31648,31649,31650,\n31651,31651,31652,31653,31654,31654,31655,31656,\n31657,31657,31658,31659,31660,31661,31661,31662,\n31663,31664,31664,31665,31666,31667,31668,31668,\n31669,31670,31671,31671,31672,31673,31674,31674,\n31675,31676,31677,31678,31678,31679,31680,31681,\n31681,31682,31683,31684,31684,31685,31686,31687,\n31687,31688,31689,31690,31691,31691,31692,31693,\n31694,31694,31695,31696,31697,31697,31698,31699,\n31700,31700,31701,31702,31703,31703,31704,31705,\n31706,31707,31707,31708,31709,31710,31710,31711,\n31712,31713,31713,31714,31715,31716,31716,31717,\n31718,31719,31719,31720,31721,31722,31722,31723,\n31724,31725,31725,31726,31727,31728,31728,31729,\n31730,31731,31731,31732,31733,31734,31734,31735,\n31736,31737,31737,31738,31739,31740,31740,31741,\n31742,31743,31743,31744,31745,31746,31746,31747,\n31748,31749,31749,31750,31751,31752,31752,31753,\n31754,31755,31755,31756,31757,31758,31758,31759,\n31760,31761,31761,31762,31763,31764,31764,31765,\n31766,31767,31767,31768,31769,31770,31770,31771,\n31772,31773,31773,31774,31775,31776,31776,31777,\n31778,31779,31779,31780,31781,31781,31782,31783,\n31784,31784,31785,31786,31787,31787,31788,31789,\n31790,31790,31791,31792,31793,31793,31794,31795,\n31795,31796,31797,31798,31798,31799,31800,31801,\n31801,31802,31803,31804,31804,31805,31806,31806,\n31807,31808,31809,31809,31810,31811,31812,31812,\n31813,31814,31815,31815,31816,31817,31817,31818,\n31819,31820,31820,31821,31822,31823,31823,31824,\n31825,31825,31826,31827,31828,31828,31829,31830,\n31831,31831,31832,31833,31833,31834,31835,31836,\n31836,31837,31838,31839,31839,31840,31841,31841,\n31842,31843,31844,31844,31845,31846,31846,31847,\n31848,31849,31849,31850,31851,31851,31852,31853,\n31854,31854,31855,31856,31857,31857,31858,31859,\n31859,31860,31861,31862,31862,31863,31864,31864,\n31865,31866,31867,31867,31868,31869,31869,31870,\n31871,31872,31872,31873,31874,31874,31875,31876,\n31877,31877,31878,31879,31879,31880,31881,31881,\n31882,31883,31884,31884,31885,31886,31886,31887,\n31888,31889,31889,31890,31891,31891,31892,31893,\n31894,31894,31895,31896,31896,31897,31898,31898,\n31899,31900,31901,31901,31902,31903,31903,31904,\n31905,31905,31906,31907,31908,31908,31909,31910,\n31910,31911,31912,31913,31913,31914,31915,31915,\n31916,31917,31917,31918,31919,31919,31920,31921,\n31922,31922,31923,31924,31924,31925,31926,31926,\n31927,31928,31929,31929,31930,31931,31931,31932,\n31933,31933,31934,31935,31935,31936,31937,31938,\n31938,31939,31940,31940,31941,31942,31942,31943,\n31944,31944,31945,31946,31947,31947,31948,31949,\n31949,31950,31951,31951,31952,31953,31953,31954,\n31955,31955,31956,31957,31958,31958,31959,31960,\n31960,31961,31962,31962,31963,31964,31964,31965,\n31966,31966,31967,31968,31968,31969,31970,31971,\n31971,31972,31973,31973,31974,31975,31975,31976,\n31977,31977,31978,31979,31979,31980,31981,31981,\n31982,31983,31983,31984,31985,31985,31986,31987,\n31987,31988,31989,31989,31990,31991,31992,31992,\n31993,31994,31994,31995,31996,31996,31997,31998,\n31998,31999,32000,32000,32001,32002,32002,32003,\n32004,32004,32005,32006,32006,32007,32008,32008,\n32009,32010,32010,32011,32012,32012,32013,32014,\n32014,32015,32016,32016,32017,32018,32018,32019,\n32020,32020,32021,32022,32022,32023,32024,32024,\n32025,32026,32026,32027,32028,32028,32029,32030,\n32030,32031,32032,32032,32033,32034,32034,32035,\n32035,32036,32037,32037,32038,32039,32039,32040,\n32041,32041,32042,32043,32043,32044,32045,32045,\n32046,32047,32047,32048,32049,32049,32050,32051,\n32051,32052,32053,32053,32054,32054,32055,32056,\n32056,32057,32058,32058,32059,32060,32060,32061,\n32062,32062,32063,32064,32064,32065,32066,32066,\n32067,32067,32068,32069,32069,32070,32071,32071,\n32072,32073,32073,32074,32075,32075,32076,32076,\n32077,32078,32078,32079,32080,32080,32081,32082,\n32082,32083,32084,32084,32085,32085,32086,32087,\n32087,32088,32089,32089,32090,32091,32091,32092,\n32092,32093,32094,32094,32095,32096,32096,32097,\n32098,32098,32099,32099,32100,32101,32101,32102,\n32103,32103,32104,32105,32105,32106,32106,32107,\n32108,32108,32109,32110,32110,32111,32112,32112,\n32113,32113,32114,32115,32115,32116,32117,32117,\n32118,32118,32119,32120,32120,32121,32122,32122,\n32123,32123,32124,32125,32125,32126,32127,32127,\n32128,32128,32129,32130,32130,32131,32132,32132,\n32133,32133,32134,32135,32135,32136,32136,32137,\n32138,32138,32139,32140,32140,32141,32141,32142,\n32143,32143,32144,32145,32145,32146,32146,32147,\n32148,32148,32149,32149,32150,32151,32151,32152,\n32153,32153,32154,32154,32155,32156,32156,32157,\n32157,32158,32159,32159,32160,32160,32161,32162,\n32162,32163,32164,32164,32165,32165,32166,32167,\n32167,32168,32168,32169,32170,32170,32171,32171,\n32172,32173,32173,32174,32174,32175,32176,32176,\n32177,32177,32178,32179,32179,32180,32180,32181,\n32182,32182,32183,32183,32184,32185,32185,32186,\n32186,32187,32188,32188,32189,32189,32190,32191,\n32191,32192,32192,32193,32194,32194,32195,32195,\n32196,32197,32197,32198,32198,32199,32200,32200,\n32201,32201,32202,32203,32203,32204,32204,32205,\n32206,32206,32207,32207,32208,32208,32209,32210,\n32210,32211,32211,32212,32213,32213,32214,32214,\n32215,32216,32216,32217,32217,32218,32218,32219,\n32220,32220,32221,32221,32222,32223,32223,32224,\n32224,32225,32225,32226,32227,32227,32228,32228,\n32229,32229,32230,32231,32231,32232,32232,32233,\n32234,32234,32235,32235,32236,32236,32237,32238,\n32238,32239,32239,32240,32240,32241,32242,32242,\n32243,32243,32244,32244,32245,32246,32246,32247,\n32247,32248,32248,32249,32250,32250,32251,32251,\n32252,32252,32253,32254,32254,32255,32255,32256,\n32256,32257,32258,32258,32259,32259,32260,32260,\n32261,32262,32262,32263,32263,32264,32264,32265,\n32266,32266,32267,32267,32268,32268,32269,32269,\n32270,32271,32271,32272,32272,32273,32273,32274,\n32274,32275,32276,32276,32277,32277,32278,32278,\n32279,32279,32280,32281,32281,32282,32282,32283,\n32283,32284,32284,32285,32286,32286,32287,32287,\n32288,32288,32289,32289,32290,32291,32291,32292,\n32292,32293,32293,32294,32294,32295,32296,32296,\n32297,32297,32298,32298,32299,32299,32300,32300,\n32301,32302,32302,32303,32303,32304,32304,32305,\n32305,32306,32306,32307,32308,32308,32309,32309,\n32310,32310,32311,32311,32312,32312,32313,32313,\n32314,32315,32315,32316,32316,32317,32317,32318,\n32318,32319,32319,32320,32320,32321,32322,32322,\n32323,32323,32324,32324,32325,32325,32326,32326,\n32327,32327,32328,32328,32329,32330,32330,32331,\n32331,32332,32332,32333,32333,32334,32334,32335,\n32335,32336,32336,32337,32337,32338,32339,32339,\n32340,32340,32341,32341,32342,32342,32343,32343,\n32344,32344,32345,32345,32346,32346,32347,32347,\n32348,32348,32349,32350,32350,32351,32351,32352,\n32352,32353,32353,32354,32354,32355,32355,32356,\n32356,32357,32357,32358,32358,32359,32359,32360,\n32360,32361,32361,32362,32362,32363,32363,32364,\n32364,32365,32366,32366,32367,32367,32368,32368,\n32369,32369,32370,32370,32371,32371,32372,32372,\n32373,32373,32374,32374,32375,32375,32376,32376,\n32377,32377,32378,32378,32379,32379,32380,32380,\n32381,32381,32382,32382,32383,32383,32384,32384,\n32385,32385,32386,32386,32387,32387,32388,32388,\n32389,32389,32390,32390,32391,32391,32392,32392,\n32393,32393,32394,32394,32395,32395,32396,32396,\n32397,32397,32398,32398,32399,32399,32400,32400,\n32401,32401,32402,32402,32403,32403,32404,32404,\n32405,32405,32406,32406,32406,32407,32407,32408,\n32408,32409,32409,32410,32410,32411,32411,32412,\n32412,32413,32413,32414,32414,32415,32415,32416,\n32416,32417,32417,32418,32418,32419,32419,32420,\n32420,32421,32421,32421,32422,32422,32423,32423,\n32424,32424,32425,32425,32426,32426,32427,32427,\n32428,32428,32429,32429,32430,32430,32431,32431,\n32431,32432,32432,32433,32433,32434,32434,32435,\n32435,32436,32436,32437,32437,32438,32438,32439,\n32439,32439,32440,32440,32441,32441,32442,32442,\n32443,32443,32444,32444,32445,32445,32446,32446,\n32446,32447,32447,32448,32448,32449,32449,32450,\n32450,32451,32451,32452,32452,32452,32453,32453,\n32454,32454,32455,32455,32456,32456,32457,32457,\n32457,32458,32458,32459,32459,32460,32460,32461,\n32461,32462,32462,32462,32463,32463,32464,32464,\n32465,32465,32466,32466,32467,32467,32467,32468,\n32468,32469,32469,32470,32470,32471,32471,32471,\n32472,32472,32473,32473,32474,32474,32475,32475,\n32475,32476,32476,32477,32477,32478,32478,32479,\n32479,32479,32480,32480,32481,32481,32482,32482,\n32483,32483,32483,32484,32484,32485,32485,32486,\n32486,32486,32487,32487,32488,32488,32489,32489,\n32490,32490,32490,32491,32491,32492,32492,32493,\n32493,32493,32494,32494,32495,32495,32496,32496,\n32496,32497,32497,32498,32498,32499,32499,32499,\n32500,32500,32501,32501,32502,32502,32502,32503,\n32503,32504,32504,32505,32505,32505,32506,32506,\n32507,32507,32508,32508,32508,32509,32509,32510,\n32510,32510,32511,32511,32512,32512,32513,32513,\n32513,32514,32514,32515,32515,32515,32516,32516,\n32517,32517,32518,32518,32518,32519,32519,32520,\n32520,32520,32521,32521,32522,32522,32522,32523,\n32523,32524,32524,32525,32525,32525,32526,32526,\n32527,32527,32527,32528,32528,32529,32529,32529,\n32530,32530,32531,32531,32531,32532,32532,32533,\n32533,32533,32534,32534,32535,32535,32535,32536,\n32536,32537,32537,32537,32538,32538,32539,32539,\n32539,32540,32540,32541,32541,32541,32542,32542,\n32543,32543,32543,32544,32544,32545,32545,32545,\n32546,32546,32547,32547,32547,32548,32548,32548,\n32549,32549,32550,32550,32550,32551,32551,32552,\n32552,32552,32553,32553,32554,32554,32554,32555,\n32555,32555,32556,32556,32557,32557,32557,32558,\n32558,32559,32559,32559,32560,32560,32560,32561,\n32561,32562,32562,32562,32563,32563,32563,32564,\n32564,32565,32565,32565,32566,32566,32566,32567,\n32567,32568,32568,32568,32569,32569,32569,32570,\n32570,32571,32571,32571,32572,32572,32572,32573,\n32573,32574,32574,32574,32575,32575,32575,32576,\n32576,32576,32577,32577,32578,32578,32578,32579,\n32579,32579,32580,32580,32580,32581,32581,32582,\n32582,32582,32583,32583,32583,32584,32584,32584,\n32585,32585,32585,32586,32586,32587,32587,32587,\n32588,32588,32588,32589,32589,32589,32590,32590,\n32590,32591,32591,32592,32592,32592,32593,32593,\n32593,32594,32594,32594,32595,32595,32595,32596,\n32596,32596,32597,32597,32597,32598,32598,32598,\n32599,32599,32600,32600,32600,32601,32601,32601,\n32602,32602,32602,32603,32603,32603,32604,32604,\n32604,32605,32605,32605,32606,32606,32606,32607,\n32607,32607,32608,32608,32608,32609,32609,32609,\n32610,32610,32610,32611,32611,32611,32612,32612,\n32612,32613,32613,32613,32614,32614,32614,32615,\n32615,32615,32616,32616,32616,32617,32617,32617,\n32618,32618,32618,32619,32619,32619,32620,32620,\n32620,32621,32621,32621,32622,32622,32622,32623,\n32623,32623,32623,32624,32624,32624,32625,32625,\n32625,32626,32626,32626,32627,32627,32627,32628,\n32628,32628,32629,32629,32629,32630,32630,32630,\n32630,32631,32631,32631,32632,32632,32632,32633,\n32633,32633,32634,32634,32634,32635,32635,32635,\n32635,32636,32636,32636,32637,32637,32637,32638,\n32638,32638,32638,32639,32639,32639,32640,32640,\n32640,32641,32641,32641,32642,32642,32642,32642,\n32643,32643,32643,32644,32644,32644,32645,32645,\n32645,32645,32646,32646,32646,32647,32647,32647,\n32647,32648,32648,32648,32649,32649,32649,32650,\n32650,32650,32650,32651,32651,32651,32652,32652,\n32652,32652,32653,32653,32653,32654,32654,32654,\n32654,32655,32655,32655,32656,32656,32656,32656,\n32657,32657,32657,32658,32658,32658,32658,32659,\n32659,32659,32660,32660,32660,32660,32661,32661,\n32661,32661,32662,32662,32662,32663,32663,32663,\n32663,32664,32664,32664,32665,32665,32665,32665,\n32666,32666,32666,32666,32667,32667,32667,32668,\n32668,32668,32668,32669,32669,32669,32669,32670,\n32670,32670,32670,32671,32671,32671,32672,32672,\n32672,32672,32673,32673,32673,32673,32674,32674,\n32674,32674,32675,32675,32675,32675,32676,32676,\n32676,32676,32677,32677,32677,32678,32678,32678,\n32678,32679,32679,32679,32679,32680,32680,32680,\n32680,32681,32681,32681,32681,32682,32682,32682,\n32682,32683,32683,32683,32683,32684,32684,32684,\n32684,32685,32685,32685,32685,32686,32686,32686,\n32686,32687,32687,32687,32687,32687,32688,32688,\n32688,32688,32689,32689,32689,32689,32690,32690,\n32690,32690,32691,32691,32691,32691,32692,32692,\n32692,32692,32693,32693,32693,32693,32693,32694,\n32694,32694,32694,32695,32695,32695,32695,32696,\n32696,32696,32696,32696,32697,32697,32697,32697,\n32698,32698,32698,32698,32698,32699,32699,32699,\n32699,32700,32700,32700,32700,32701,32701,32701,\n32701,32701,32702,32702,32702,32702,32703,32703,\n32703,32703,32703,32704,32704,32704,32704,32704,\n32705,32705,32705,32705,32706,32706,32706,32706,\n32706,32707,32707,32707,32707,32707,32708,32708,\n32708,32708,32708,32709,32709,32709,32709,32710,\n32710,32710,32710,32710,32711,32711,32711,32711,\n32711,32712,32712,32712,32712,32712,32713,32713,\n32713,32713,32713,32714,32714,32714,32714,32714,\n32715,32715,32715,32715,32715,32716,32716,32716,\n32716,32716,32717,32717,32717,32717,32717,32718,\n32718,32718,32718,32718,32719,32719,32719,32719,\n32719,32719,32720,32720,32720,32720,32720,32721,\n32721,32721,32721,32721,32722,32722,32722,32722,\n32722,32722,32723,32723,32723,32723,32723,32724,\n32724,32724,32724,32724,32724,32725,32725,32725,\n32725,32725,32725,32726,32726,32726,32726,32726,\n32727,32727,32727,32727,32727,32727,32728,32728,\n32728,32728,32728,32728,32729,32729,32729,32729,\n32729,32729,32730,32730,32730,32730,32730,32730,\n32731,32731,32731,32731,32731,32731,32732,32732,\n32732,32732,32732,32732,32733,32733,32733,32733,\n32733,32733,32734,32734,32734,32734,32734,32734,\n32735,32735,32735,32735,32735,32735,32735,32736,\n32736,32736,32736,32736,32736,32737,32737,32737,\n32737,32737,32737,32737,32738,32738,32738,32738,\n32738,32738,32738,32739,32739,32739,32739,32739,\n32739,32739,32740,32740,32740,32740,32740,32740,\n32740,32741,32741,32741,32741,32741,32741,32741,\n32742,32742,32742,32742,32742,32742,32742,32743,\n32743,32743,32743,32743,32743,32743,32744,32744,\n32744,32744,32744,32744,32744,32744,32745,32745,\n32745,32745,32745,32745,32745,32745,32746,32746,\n32746,32746,32746,32746,32746,32746,32747,32747,\n32747,32747,32747,32747,32747,32747,32748,32748,\n32748,32748,32748,32748,32748,32748,32749,32749,\n32749,32749,32749,32749,32749,32749,32749,32750,\n32750,32750,32750,32750,32750,32750,32750,32751,\n32751,32751,32751,32751,32751,32751,32751,32751,\n32752,32752,32752,32752,32752,32752,32752,32752,\n32752,32752,32753,32753,32753,32753,32753,32753,\n32753,32753,32753,32753,32754,32754,32754,32754,\n32754,32754,32754,32754,32754,32754,32755,32755,\n32755,32755,32755,32755,32755,32755,32755,32755,\n32756,32756,32756,32756,32756,32756,32756,32756,\n32756,32756,32756,32757,32757,32757,32757,32757,\n32757,32757,32757,32757,32757,32757,32757,32758,\n32758,32758,32758,32758,32758,32758,32758,32758,\n32758,32758,32758,32759,32759,32759,32759,32759,\n32759,32759,32759,32759,32759,32759,32759,32759,\n32760,32760,32760,32760,32760,32760,32760,32760,\n32760,32760,32760,32760,32760,32760,32761,32761,\n32761,32761,32761,32761,32761,32761,32761,32761,\n32761,32761,32761,32761,32761,32762,32762,32762,\n32762,32762,32762,32762,32762,32762,32762,32762,\n32762,32762,32762,32762,32762,32762,32763,32763,\n32763,32763,32763,32763,32763,32763,32763,32763,\n32763,32763,32763,32763,32763,32763,32763,32763,\n32763,32764,32764,32764,32764,32764,32764,32764,\n32764,32764,32764,32764,32764,32764,32764,32764,\n32764,32764,32764,32764,32764,32764,32764,32765,\n32765,32765,32765,32765,32765,32765,32765,32765,\n32765,32765,32765,32765,32765,32765,32765,32765,\n32765,32765,32765,32765,32765,32765,32765,32765,\n32765,32765,32765,32765,32766,32766,32766,32766,\n32766,32766,32766,32766,32766,32766,32766,32766,\n32766,32766,32766,32766,32766,32766,32766,32766,\n32766,32766,32766,32766,32766,32766,32766,32766,\n32766,32766,32766,32766,32766,32766,32766,32766,\n32766,32766,32766,32766,32766,32766,32766,32766,\n32766,32766,32766,32766,32766,32766,32766,32766,\n32766,32766,32766,32766,32766,32766,32766,32766,\n32766,32766,32766,32766,32766,32766,32766,32766,\n32766,32766,\n};\n#endif\n"
  },
  {
    "path": "src/custom.c",
    "content": "// custom.c\n\n#include \"amy.h\"\n#include <assert.h>\n\nstruct custom_oscillator* custom_osc = NULL;\n\nvoid amy_set_custom(struct custom_oscillator* custom) {\n    assert(custom_osc == NULL);\n    custom_osc = custom;\n}\n\nvoid custom_init() {\n    if (custom_osc != NULL) {\n        custom_osc->init();\n    }\n}\n\nvoid custom_deinit() {\n    if (custom_osc != NULL) {\n        custom_osc->deinit();\n    }\n}\n\nvoid custom_note_on(uint16_t osc, float freq) {\n    assert(custom_osc != NULL);\n    custom_osc->note_on(osc, freq);\n}\n\nvoid custom_note_off(uint16_t osc) {\n    assert(custom_osc != NULL);\n    custom_osc->note_off(osc);\n}\n\nvoid custom_mod_trigger(uint16_t osc) {\n    assert(custom_osc != NULL);\n    custom_osc->mod_trigger(osc);\n}\n\nSAMPLE render_custom(SAMPLE* buf, uint16_t osc) {\n    assert(custom_osc != NULL);\n    return custom_osc->render(buf, osc);\n}\n\nSAMPLE compute_mod_custom(uint16_t osc) {\n    assert(custom_osc != NULL);\n    return custom_osc->compute_mod(osc);\n}\n"
  },
  {
    "path": "src/delay.c",
    "content": "#include \"amy.h\"\n\n\n#include \"delay.h\"\n\nint is_power_of_two(int val) {\n    // Returns log_2(val) if val == 2**n, else -1.\n    int log_2_val = 0;\n    while(val) {\n        if (val == 1) return log_2_val;\n        if (val & 1) return -1;\n        val >>= 1;\n        ++log_2_val;\n    }\n    return -1;  // zero is not a power of 2.\n}\n\n#ifdef AMY_DAISY\n// Put delay lines in QSPI on Daisy\n\n#define QSPI_HEAP_SIZE 1048576\n\nuint8_t __attribute__((section((\".sdram_bss\")))) qspi_heap[QSPI_HEAP_SIZE];\nuint32_t qspi_used = 0;\n\nvoid *qspi_malloc(size_t num_bytes) {\n    //fprintf(stderr, \"qspi_malloc: %d bytes, used = %d\\n\", num_bytes, qspi_used);\n    if ((qspi_used + num_bytes) >= QSPI_HEAP_SIZE) {\n\tfprintf(stderr, \"qspi_malloc: out of heap\\n\");\n\tabort();\n    }\n    // Save the size of this block.\n    *(uint32_t *)(qspi_heap + qspi_used) = num_bytes;\n    qspi_used += sizeof(uint32_t);\n    void *result = (void *)(qspi_heap + qspi_used);\n    qspi_used += num_bytes;\n    return result;\n}\n\nvoid qspi_free(void *ptr) {\n    uint32_t last_alloc = *(uint32_t *)((uint8_t*)ptr - sizeof(uint32_t));\n    if (ptr == (void *)(qspi_heap + (qspi_used - last_alloc))) {\n\t// We're just freeing the last alloc, yay.\n\tqspi_used -= last_alloc + sizeof(uint32_t);\n\t//fprintf(stderr, \"qspi_free: %ld bytes, used = %d\\n\", last_alloc, qspi_used);\n    } else {\n\tfprintf(stderr, \"qspi_free: punt (ptr = qspi_heap + %d)\\n\", (uint8_t*)ptr - (uint8_t *)qspi_heap);\n\t// Don't actually recover the memory.\n    }\n}\n\n#define malloc_caps(a, b) qspi_malloc(a)\n#define free(a) qspi_free(a)\n\n#endif\n\ndelay_line_t *new_delay_line(int len, int fixed_delay, int ram_type) {\n    // Check that len is a power of 2.\n    //printf(\"new_delay_line: len %d fixed_del %d\\n\", len, fixed_delay);\n    int log_2_len = is_power_of_two(len);\n    if (log_2_len < 0) {\n        fprintf(stderr, \"delay line len must be power of 2, not %d\\n\", len);\n        abort();\n    }\n    delay_line_t *delay_line = (delay_line_t*)malloc_caps(sizeof(delay_line_t) + len * sizeof(SAMPLE), ram_type);\n    if (delay_line == NULL) {\n\tfprintf(stderr, \"unable to alloc delay line of %d samples\\n\", len);\n\treturn NULL;\n    }\n    delay_line->samples = (SAMPLE*)(((uint8_t*)delay_line) + sizeof(delay_line_t));\n    delay_line->len = len;\n    delay_line->log_2_len = log_2_len;\n    delay_line->fixed_delay = fixed_delay;\n    delay_line->next_in = 0;\n    for (int i = 0; i < len; ++i) {\n        delay_line->samples[i] = 0;\n    }\n    //fprintf(stderr, \"new_delay_line: len %d fixed_del %d ->0x%x\\n\", len, fixed_delay, (uint32_t)delay_line);\n    return delay_line;\n}\n\nvoid free_delay_line(delay_line_t *delay_line) {\n    //printf(\"free_delay_line: 0x%x\\n\", (uint32_t)delay_line);\n    free(delay_line);  // the samples are part of the same malloc.\n}\n\nstatic SAMPLE FRACTIONAL_SAMPLE(PHASOR phase, const SAMPLE *delay, int index_mask, int index_bits) {\n    // Interpolated sample copied from oscillators.c:render_lut\n    uint32_t base_index = INT_OF_P(phase, index_bits);\n    SAMPLE frac = S_FRAC_OF_P(phase, index_bits);\n    SAMPLE b = delay[base_index];\n    SAMPLE c = delay[(base_index + 1) & index_mask];\n    // linear interpolation.\n    SAMPLE sample = b + MUL8_SS((c - b), frac);\n    return sample;\n}\n\nvoid delay_line_in_out(SAMPLE *in, SAMPLE *out, int n_samples, SAMPLE* mod_in, SAMPLE mod_scale, delay_line_t *delay_line, SAMPLE mix_level, SAMPLE feedback_level) {\n    // Read and write the next n_samples from/to the delay line.\n    // mod_in is a per-sample modulation of the maximum delay, where 1 gives \n    // the max delay, -1 gives no delay, and 0 gives max_delay/2.\n    // mod_scale is a constant scale factor applied to each value in mod_in, \n    // used e.g. to flip the sign of the delay.\n    // Also supports input feedback from a non-modulated feedback delay output.\n    int delay_len = delay_line->len;\n    int index_mask = delay_len - 1; // will be all 1s because len is guaranteed 2**n.\n    int index_bits = delay_line->log_2_len;\n\n    int index_in = delay_line->next_in;\n    int index_feedback = (index_in - delay_line->fixed_delay) & index_mask;\n\n    SAMPLE *delay = delay_line->samples;\n    SAMPLE half_mod_scale = SHIFTR(mod_scale, 1);\n    while(n_samples-- > 0) {\n        SAMPLE next_in = *in++ + MUL8_SS(feedback_level,\n                                         delay[index_feedback++]);\n        index_feedback &= index_mask;\n\n        PHASOR phase_out = I2P(index_in, index_bits)\n            - S2P(F2S(0.5) + MUL8_SS(half_mod_scale, *mod_in++));\n        //if(index_out >= delay_len) index_out -= delay_len;\n        //if(index_out < 0) index_out += delay_len;\n        SAMPLE sample = FRACTIONAL_SAMPLE(phase_out, delay, index_mask, index_bits);\n        *out++ += MUL8_SS(mix_level, sample);  // mix delayed + original.\n        delay[index_in++] = next_in;\n        index_in &= index_mask;\n    }\n    delay_line->next_in = index_in;\n}\n\nstatic inline SAMPLE DEL_OUT(delay_line_t *delay_line, int extra_delay) {\n    int out_index =\n        (delay_line->next_in - (delay_line->fixed_delay + extra_delay)) & (delay_line->len - 1);\n    return delay_line->samples[out_index];\n}\n\nstatic inline void DEL_IN(delay_line_t *delay_line, SAMPLE val) {\n    delay_line->samples[delay_line->next_in++] = val;\n    delay_line->next_in &= (delay_line->len - 1);\n}\n\nstatic inline SAMPLE LPF(SAMPLE samp, SAMPLE state, SAMPLE lpcoef, SAMPLE lpgain, SAMPLE gain) {\n    // 1-pole lowpass filter (exponential smoothing).\n    // Smoothing. lpcoef=1 => no smoothing; lpcoef=0.001 => much smoothing.\n    state += SMULR6(lpcoef, samp - state);\n    // Cross-fade between smoothed and original.  lpgain=0 => all smoothed, 1 => all dry.\n    return SMULR6(SHIFTR(gain, 1), state + SMULR6(lpgain, samp - state));\n}\n\nvoid delay_line_in_out_fixed_delay(SAMPLE *in, SAMPLE *out, int n_samples, int delay_samples, delay_line_t *delay_line, SAMPLE mix_level, SAMPLE feedback_level, SAMPLE filter_coef) {\n    // Read and write the next n_samples from/to the delay line.\n    // Simplified version of delay_line_in_out() that uses a fixed integer delay\n    // for the whole block.\n    if (filter_coef == 0) {\n        while(n_samples-- > 0) {\n            SAMPLE delay_out = DEL_OUT(delay_line, 0);\n            SAMPLE next_in = *in++ + SMULR6(feedback_level, delay_out);\n            DEL_IN(delay_line, next_in);\n            *out++ += MUL8_SS(mix_level, delay_out);\n        }\n    } else if (filter_coef > 0) {\n        // Positive filter coef is a pole on the positive real line, to get low-pass effect.\n        // We apply the filter on the way *in* to the delay line.\n        while(n_samples-- > 0) {\n            SAMPLE delay_out = DEL_OUT(delay_line, 0);\n            SAMPLE next_in = *in++ + SMULR6(feedback_level, delay_out);\n            // Peek at the last value we wrote to the delay line to get the most recent filter output.\n            SAMPLE last_filter_result = delay_line->samples[(delay_line->next_in - 1) & (delay_line->len - 1)];\n            SAMPLE filter_result = next_in + SMULR6(filter_coef, last_filter_result - next_in);\n            DEL_IN(delay_line, filter_result);\n            *out++ += MUL8_SS(mix_level, delay_out);\n        }\n    } else {\n        // Negative filter coef is a zero on the positive real axis to get high-pass.\n        // We apply the FIR zero on the way *out* of the delay line.\n        while(n_samples-- > 0) {\n            SAMPLE delay_out = DEL_OUT(delay_line, 0);\n            SAMPLE prev_delay_out = DEL_OUT(delay_line, 1);\n            SAMPLE output = delay_out + SMULR6(filter_coef, prev_delay_out);\n            SAMPLE next_in = *in++ + SMULR6(feedback_level, output);\n            DEL_IN(delay_line, next_in);\n            *out++ += MUL8_SS(mix_level, output);\n        }\n    }\n}\n\n\nvoid apply_variable_delay(SAMPLE *block, delay_line_t *delay_line, SAMPLE *delay_mod, SAMPLE delay_scale, SAMPLE mix_level, SAMPLE feedback_level) {\n    delay_line_in_out(block, block, AMY_BLOCK_SIZE, delay_mod, delay_scale, delay_line, mix_level, feedback_level);\n}\n\nvoid apply_fixed_delay(SAMPLE *block, delay_line_t *delay_line, uint32_t delay_samples, SAMPLE mix_level, SAMPLE feedback, SAMPLE filter_coef) {\n    delay_line_in_out_fixed_delay(block, block, AMY_BLOCK_SIZE, delay_samples, delay_line, mix_level, feedback, filter_coef);\n}\n\nSAMPLE f1state = 0, f2state = 0, f3state = 0, f4state = 0;\n\ndelay_line_t *delay_1 = NULL, *delay_2 = NULL, *delay_3 = NULL,\n    *delay_4 = NULL;\ndelay_line_t *ref_1 = NULL, *ref_2 = NULL, *ref_3= NULL,\n    *ref_4 = NULL, *ref_5 = NULL, *ref_6 = NULL;\n\n#define INITIAL_XOVER_HZ 3000.0\n#define INITIAL_LIVENESS 0.85\n#define INITIAL_DAMPING 0.5\n\nSAMPLE lpfcoef;\nSAMPLE lpfgain;\nSAMPLE liveness;\n\nvoid config_stereo_reverb(float a_liveness, float crossover_hz, float damping) {\n    //printf(\"config_stereo_reverb: liveness %f xover %f damping %f\\n\",\n    //       a_liveness, crossover_hz, damping);\n    // liveness (0..1) controls how much energy is preserved (larger = longer reverb).\n    liveness = F2S(a_liveness);\n    // crossover_hz is 3dB point of 1-pole lowpass freq.\n    lpfcoef = F2S(6.2832f * crossover_hz / AMY_SAMPLE_RATE);\n    if (lpfcoef > F2S(1.f))  lpfcoef = F2S(1.f);\n    if (lpfcoef < 0)  lpfcoef = 0;\n    lpfgain = F2S(1.f - damping);\n}\n\n// Delay 1 is 58.6435 ms\n#define DELAY1SAMPS 2586\n// Delay 2 is 69.4325 ms\n#define DELAY2SAMPS 3062\n// Delay 3 is 74.5234 ms\n#define DELAY3SAMPS 3286\n// Delay 4 is 86.1244 ms\n#define DELAY4SAMPS 3798\n\n// Power of 2 that encloses all the delays.\n#define DELAY_POW2 4096\n\n// Early reflections delays\n#define REF1SAMPS 3319  // 75.2546 ms\n#define REF2SAMPS 1920  // 43.5337 ms\n#define REF3SAMPS 1138  // 25.796 ms\n#define REF4SAMPS 855   // 19.392 ms\n#define REF5SAMPS 722   // 16.364 ms\n#define REF6SAMPS 602   // 13.645 ms\n\n\nvoid init_stereo_reverb(void) {\n    if (delay_1 == NULL) {\n        delay_1 = new_delay_line(DELAY_POW2, DELAY1SAMPS, amy_global.config.ram_caps_delay);\n        delay_2 = new_delay_line(DELAY_POW2, DELAY2SAMPS, amy_global.config.ram_caps_delay);\n        delay_3 = new_delay_line(DELAY_POW2, DELAY3SAMPS, amy_global.config.ram_caps_delay);\n        delay_4 = new_delay_line(DELAY_POW2, DELAY4SAMPS, amy_global.config.ram_caps_delay);\n\n        ref_1 = new_delay_line(4096, REF1SAMPS, amy_global.config.ram_caps_delay);\n        ref_2 = new_delay_line(2048, REF2SAMPS, amy_global.config.ram_caps_delay);\n        ref_3 = new_delay_line(2048, REF3SAMPS, amy_global.config.ram_caps_delay);\n        ref_4 = new_delay_line(1024, REF4SAMPS, amy_global.config.ram_caps_delay);\n        ref_5 = new_delay_line(1024, REF5SAMPS, amy_global.config.ram_caps_delay);\n        ref_6 = new_delay_line(1024, REF6SAMPS, amy_global.config.ram_caps_delay);\n        \n        config_stereo_reverb(INITIAL_LIVENESS, INITIAL_XOVER_HZ, INITIAL_DAMPING);\n    }\n}\n\nvoid stereo_reverb(SAMPLE *r_in, SAMPLE *l_in, SAMPLE *r_out, SAMPLE *l_out, int n_samples, SAMPLE level) {\n    // Stereo reverb.  *{r,l}_in each point to n_samples input samples.\n    // n_samples are written to {r,l}_out.\n    // Recreate\n    // https://github.com/duvtedudug/Pure-Data/blob/master/extra/rev2%7E.pd\n    // an instance of the Stautner-Puckette multichannel reverberator from\n    // https://www.ee.columbia.edu/~dpwe/e4896/papers/StautP82-reverb.pdf\n    while(n_samples--) {\n        // Early echo reflections.\n        SAMPLE in_r = *r_in++;\n        SAMPLE in_l;\n        if (l_in)   in_l = *l_in++;\n        else   in_l = in_r;\n        SAMPLE r_acc, l_acc;\n        r_acc = MUL0_SS(F2S(0.0625f), in_r);\n        l_acc = MUL0_SS(F2S(0.0625f), in_l);\n\n        DEL_IN(ref_1, l_acc);\n        SAMPLE d_out = DEL_OUT(ref_1, 0);\n        l_acc = r_acc - d_out;\n        r_acc += d_out;\n\n        DEL_IN(ref_2, l_acc);\n        d_out = DEL_OUT(ref_2, 0);\n        l_acc = r_acc - d_out;\n        r_acc += d_out;\n\n        DEL_IN(ref_3, l_acc);\n        d_out = DEL_OUT(ref_3, 0);\n        l_acc = r_acc - d_out;\n        r_acc += d_out;\n\n        DEL_IN(ref_4, l_acc);\n        d_out = DEL_OUT(ref_4, 0);\n        l_acc = r_acc - d_out;\n        r_acc += d_out;\n\n        DEL_IN(ref_5, l_acc);\n        d_out = DEL_OUT(ref_5, 0);\n        l_acc = r_acc - d_out;\n        r_acc += d_out;\n\n        DEL_IN(ref_6, l_acc);\n        l_acc = DEL_OUT(ref_6, 0);\n        \n        \n        // Reverb delays & matrix.\n        SAMPLE d1 = DEL_OUT(delay_1, 0);\n        d1 = LPF(d1, f1state, lpfcoef, lpfgain, liveness);\n        d1 += r_acc;\n        *r_out++ = in_r + MUL8_SS(level, d1);\n\n        SAMPLE d2 = DEL_OUT(delay_2, 0);\n        d2 = LPF(d2, f2state, lpfcoef, lpfgain, liveness);\n        d2 += l_acc;\n        if (l_out != NULL)  *l_out++ = in_l + MUL8_SS(level, d2);\n\n        SAMPLE d3 = DEL_OUT(delay_3, 0);\n        d3 = LPF(d3, f3state, lpfcoef, lpfgain, liveness);\n\n        SAMPLE d4 = DEL_OUT(delay_4, 0);\n        d4 = LPF(d4, f3state, lpfcoef, lpfgain, liveness);\n\n        // Mixing and feedback.\n        DEL_IN(delay_1, d1 + d2 + d3 + d4);\n        DEL_IN(delay_2, d1 - d2 + d3 - d4);\n        DEL_IN(delay_3, d1 + d2 - d3 - d4);\n        DEL_IN(delay_4, d1 - d2 - d3 + d4);\n    }\n}\n"
  },
  {
    "path": "src/delay.h",
    "content": "#ifndef _DELAY_H\n\n// How many bits used for fractional part of delay line index.\n#define DELAY_INDEX_FRAC_BITS 15\n// The number of bits used to hold the delay line index.\n#define DELAY_INDEX_BITS (31 - DELAY_INDEX_FRAC_BITS)\n\n#include \"amy.h\"\n\ndelay_line_t *new_delay_line(int len, int fixed_delay, int ram_type /* e.g. MALLOC_CAP_INTERNAL */);\nvoid free_delay_line(delay_line_t *d);\n\nvoid apply_variable_delay(SAMPLE *block, delay_line_t *delay_line, SAMPLE *delay_samples, SAMPLE mod_scale, SAMPLE mix_level, SAMPLE feedback_level);\nvoid apply_fixed_delay(SAMPLE *block, delay_line_t *delay_line, uint32_t delay_samples, SAMPLE mix_level, SAMPLE feedback, SAMPLE filter_coef);\n\nvoid config_stereo_reverb(float a_liveness, float crossover_hz, float damping);\nvoid init_stereo_reverb(void);\nvoid stereo_reverb(SAMPLE *r_in, SAMPLE *l_in, SAMPLE *r_out, SAMPLE *l_out, int n_samples, SAMPLE level);\n\n#endif // !_DELAY_H\n"
  },
  {
    "path": "src/envelope.c",
    "content": "// envelope.c\n// VCA -- handle modulation and ADSR\n\n#include \"amy.h\"\n\nextern const int16_t pcm[];\n\n\nSAMPLE compute_mod_value(uint16_t mod_osc) {\n    // Return the modulation-rate value for the specified oscillator.\n    // i.e., this oscillator is acting as modulation for something, so\n    // just calculate that modulation rate (without knowing what it\n    // modulates).\n    // Has this mod value already been calculated this frame?  Can't\n    // recalculate, because compute_mod advance phase internally.\n    if (synth[mod_osc]->mod_value_clock == amy_global.total_blocks*AMY_BLOCK_SIZE)\n        return synth[mod_osc]->mod_value;\n    synth[mod_osc]->mod_value_clock = amy_global.total_blocks*AMY_BLOCK_SIZE;\n    SAMPLE value = 0;\n    if(synth[mod_osc]->wave == NOISE) value = compute_mod_noise(mod_osc);\n    if(synth[mod_osc]->wave == SAW_DOWN) value = compute_mod_saw_down(mod_osc);\n    if(synth[mod_osc]->wave == SAW_UP) value = compute_mod_saw_up(mod_osc);\n    if(synth[mod_osc]->wave == PULSE) value = compute_mod_pulse(mod_osc);\n    if(synth[mod_osc]->wave == TRIANGLE) value = compute_mod_triangle(mod_osc);\n    if(synth[mod_osc]->wave == SINE) value = compute_mod_sine(mod_osc);\n    if(pcm_samples)\n        if(synth[mod_osc]->wave == PCM) value = compute_mod_pcm(mod_osc);\n    if(AMY_HAS_CUSTOM) {\n        if(synth[mod_osc]->wave == CUSTOM) value = compute_mod_custom(mod_osc);\n    }\n    synth[mod_osc]->mod_value = value;\n    return value;\n}\n\nSAMPLE compute_mod_scale(uint16_t osc) {\n    uint16_t source = synth[osc]->mod_source;\n    if(AMY_IS_SET(source)) {\n        if(source != osc) {  // that would be weird\n            hold_and_modify(source);\n            return compute_mod_value(source);\n        }\n    }\n    return 0; // 0 is no change, unlike bp scale\n}\n\n// sample_offset allows you to probe the EG output at some point this many samples into the future.\nSAMPLE compute_breakpoint_scale(uint16_t osc, uint8_t bp_set, uint16_t sample_offset) {\n    AMY_PROFILE_START(COMPUTE_BREAKPOINT_SCALE)\n    // given a breakpoint list, compute the scale\n    // we first see how many BPs are defined, and where we are in them?\n    int8_t found = -1;\n    int8_t release = 0;\n    uint32_t t1 = 0, t0 = 0;\n    SAMPLE v1 = 0, v0 = 0;\n    int8_t bp_r = 0;\n    t0 = 0; v0 = 0;\n    // exp2(4.328085) = exp(3.0)\n    #define EXP_RATE_VAL -4.328085\n    const SAMPLE exponential_rate = F2S(EXP_RATE_VAL);\n    // We have to aim to overshoot to the desired gap so that we hit the target by exponential_rate time.\n    const SAMPLE exponential_rate_overshoot_factor = F2S(1.0f / (1.0f - exp2f(EXP_RATE_VAL)));\n    uint32_t elapsed = 0;    \n    SAMPLE scale = F2S(1.0f);\n    int eg_type = synth[osc]->eg_type[bp_set];\n    uint32_t bp_end_times[MAX_BREAKPOINTS];\n    uint32_t cumulated_time = 0;\n    int sign = 1;\n\n    // Scan breakpoints to find which one is release (the last one)\n    bp_r = -1;\n    for(int i = 0; i < synth[osc]->max_num_breakpoints[bp_set]; ++i) {\n        uint32_t this_seg_time = synth[osc]->breakpoint_times[bp_set][i];\n        if (!AMY_IS_SET(this_seg_time))\n            break;\n        bp_r = i;  // Last good segment.\n        cumulated_time +=  this_seg_time;\n        bp_end_times[i] = cumulated_time;\n    }\n    if(bp_r < 0) {\n        // no breakpoints, return key gate.\n        // Change: Now an empty env reads as 1.0 *all the time*.\n        // If you want a key gate, define bpX='0,1,0,1,0,0' (or maybe just '0,1,0,0').\n        //if(AMY_IS_SET(synth[osc]->note_off_clock)) scale = 0;\n        synth[osc]->last_scale[bp_set] = scale;\n        //return scale;\n        goto return_label;\n    }\n    // Fix up bp_end_times for release segment to be relative to note-off time.\n    bp_end_times[bp_r] = synth[osc]->breakpoint_times[bp_set][bp_r];\n\n    // Find out which BP we're in\n    if(AMY_IS_SET(synth[osc]->note_on_clock)) {\n        elapsed = (amy_global.total_blocks*AMY_BLOCK_SIZE - synth[osc]->note_on_clock + sample_offset) + 1;\n        for(uint8_t i = 0; i < bp_r; i++) {\n            if(elapsed < bp_end_times[i]) {\n                // We found a segment.\n                found = i;\n                break;\n            }\n        }\n        if(found < 0) {\n            // We didn't find anything, so we are in sustain.\n            found = bp_r - 1; // segment before release defines sustain\n            scale = F2S(synth[osc]->breakpoint_values[bp_set][found]);\n            synth[osc]->last_scale[bp_set] = scale;\n            //printf(\"env: time %lld bpset %d seg %d SUSTAIN %f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE, bp_set, found, S2F(scale));\n            //return scale;\n            goto return_label;\n        }\n    } else if(AMY_IS_SET(synth[osc]->note_off_clock)) {\n        release = 1;\n        elapsed = (amy_global.total_blocks*AMY_BLOCK_SIZE - synth[osc]->note_off_clock + sample_offset);\n        // Get the last t/v pair , for release\n        found = bp_r;\n        t0 = 0; // start the elapsed clock again\n        // Release starts from wherever we got to\n        v0 = synth[osc]->last_scale[bp_set];\n        if(elapsed > synth[osc]->breakpoint_times[bp_set][bp_r]) {\n            //printf(\"cbp: time %f osc %d amp %f OFF\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE, osc, msynth[osc]->amp);\n            // Synth is now turned off in hold_and_modify, which tracks when the amplitude goes to zero (and waits a bit).\n            //synth[osc]->status=SYNTH_OFF;\n            //AMY_UNSET(synth[osc]->note_off_clock);\n            scale = F2S(synth[osc]->breakpoint_values[bp_set][bp_r]);\n            synth[osc]->last_scale[bp_set] = scale;\n            //return scale;\n            goto return_label;\n        }\n    }\n    \n    if(found<0) return scale;\n\n    t1 = bp_end_times[found];\n    v1 = F2S(synth[osc]->breakpoint_values[bp_set][found]);\n    if(found>0 && bp_r != found && !release) {\n        t0 = bp_end_times[found-1];\n        v0 = F2S(synth[osc]->breakpoint_values[bp_set][found-1]);\n    }\n    scale = v0;\n    if (v0 < 0 || v1 < 0) {\n        sign = -1;\n        v0 = -v0; v1 = -v1;\n    }\n    if(t1==t0 || elapsed==t1) {\n        // This way we return exact zero for v1 at the end of the segment, rather than BREAKPOINT_EPS\n        scale = v1;\n    } else {\n#define BREAKPOINT_EPS 0.0002\n        // OK, we are transition from v0 to v1 , and we're at elapsed time between t0 and t1\n        float time_ratio = ((float)(elapsed - t0) / (float)(t1 - t0));\n        // Compute scale based on which type we have\n        if(eg_type == ENVELOPE_LINEAR) {\n            scale = v0 + MUL4_SS(v1 - v0, F2S(time_ratio));\n        } else if(eg_type == ENVELOPE_TRUE_EXPONENTIAL) {\n            v0 = MAX(v0, F2S(BREAKPOINT_EPS));\n            v1 = MAX(v1, F2S(BREAKPOINT_EPS));\n            SAMPLE dx7_exponential_rate = F2S(S2F(log2_lut(v1) - log2_lut(v0))\n                                              / (0.001f * (t1 - t0)));\n            scale = MUL4_SS(v0,\n                            exp2_lut(MUL4_SS(dx7_exponential_rate,\n                                             F2S(0.001f * (elapsed - t0)))));\n        } else if(eg_type == ENVELOPE_DX7) {\n            // Somewhat complicated relationship, see https://colab.research.google.com/drive/1qZmOw4r24IDijUFlel_eSoWEf3L5VSok#scrollTo=F5zkeACrOlum\n            // in SAMPLE version, DX7 levels are div 8 i.e. 0 to 12.375 instead of 0 to 99.\n#define LINEAR_SAMP_TO_DX7_LEVEL(samp) (S2F(log2_lut(MAX(F2S(BREAKPOINT_EPS), samp))) + 12.375)\n#define DX7_LEVEL_TO_LINEAR_SAMP(level) (exp2_lut(F2S(level - 12.375)))\n#define MIN_LEVEL_S 4.25\n#define ATTACK_RANGE_S 9.375\n#define MAP_ATTACK_LEVEL_S(level) (1 - MAX(level - MIN_LEVEL_S, 0) / ATTACK_RANGE_S)\n            // DX7 is only defined for amps up to 1.0, clip to avoid negative values (which caused a math panic when using float math).\n            v0 = MIN(F2S(1.0f), v0);\n            v1 = MIN(F2S(1.0f), v1);\n            SAMPLE mapped_current_level = F2S(MAP_ATTACK_LEVEL_S(LINEAR_SAMP_TO_DX7_LEVEL(v0)));\n            SAMPLE mapped_target_level = F2S(MAP_ATTACK_LEVEL_S(LINEAR_SAMP_TO_DX7_LEVEL(v1)));\n            float t_const = (t1 - t0) / S2F(log2_lut(mapped_current_level) - log2_lut(mapped_target_level));\n            float my_t0 = -t_const * S2F(log2_lut(mapped_current_level));\n            if (v1 > v0) {\n                // This is the magic equation that shapes the DX7 attack envelopes.\n                scale = DX7_LEVEL_TO_LINEAR_SAMP(MIN_LEVEL_S + ATTACK_RANGE_S * S2F(F2S(1.0f) - exp2_lut(-F2S((my_t0 + elapsed)/t_const))));\n            } else {\n                // Decay is regular true_exponential\n                v0 = MAX(v0, F2S(BREAKPOINT_EPS));\n                v1 = MAX(v1, F2S(BREAKPOINT_EPS));\n                //float dx7_exponential_rate = -logf(S2F(v1)/S2F(v0)) / (t1 - t0);\n                //scale = MUL4_SS(v0, F2S(expf(-dx7_exponential_rate * (elapsed - t0))));\n                SAMPLE dx7_exponential_rate = F2S(S2F(log2_lut(v1) - log2_lut(v0))\n                                                  / (0.001f * (t1 - t0)));\n                scale = MUL4_SS(v0,\n                                exp2_lut(MUL4_SS(dx7_exponential_rate,\n                                                 F2S(0.001f * (elapsed - t0)))));\n            }\n        } else { // ENVELOPE_NORMAL - \"false exponential\"? or ENVELOPE_DB\n            // After the full amount of time, the exponential decay will reach (1 - expf(-3)) = 0.95\n            // so make the target gap a little bit bigger, to ensure we meet v1\n            //scale = v0 + MUL4_SS(v1 - v0, F2S(exponential_rate_overshoot_factor * (1.0f - exp2f(-exponential_rate * time_ratio))));\n            scale = v0 + MUL4_SS(v1 - v0,\n                                 MUL4_SS(exponential_rate_overshoot_factor,\n                                         F2S(1.0f)\n                                         - exp2_lut(MUL4_SS(exponential_rate,\n                                                            F2S(time_ratio)))));\n            if (scale < 0)  scale = 0;  // Overshoot ramp-to-zero from limited resolution?\n            //printf(\"false_exponential time %lld bpset %d seg %d time_ratio %f scale %f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE, bp_set, found, time_ratio, S2F(scale));\n        }\n    }\n return_label:\n    if (!release) synth[osc]->last_scale[bp_set] = scale;\n    // If sign is negative, flip it back again.\n    if (sign < 0) {\n        scale = -scale;  // does not mix well with no_amp_001\n    }\n    // Keep track of the most-recently returned non-release scale.\n    //if (osc < AMY_OSCS && found != -1)\n    //    fprintf(stderr, \"env: time %f osc %d bpset %d seg %d type %d t0 %d t1 %d elapsed %d v0 %f v1 %f scale %f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE, osc, bp_set, found, eg_type, t0, t1, elapsed, S2F(v0), S2F(v1), S2F(scale));\n    AMY_PROFILE_STOP(COMPUTE_BREAKPOINT_SCALE)\n    return scale;\n}\n"
  },
  {
    "path": "src/examples.c",
    "content": "// examples.c\n// sound examples\n\n#include \"amy.h\"\n\n// set by the arch\nextern void delay_ms(uint32_t ms);\n\nvoid example_reset(uint32_t start) {\n    amy_event e = amy_default_event();\n    e.osc = 0;\n    e.reset_osc = RESET_ALL_OSCS;\n    e.time = start;\n    amy_add_event(&e);\n}\n\nvoid example_voice_alloc() {\n    // alloc 2 juno voices, then try to alloc a dx7 voice on voice 0\n    amy_event e = amy_default_event();\n    e.patch_number = 1;\n    e.voices[0] = 0;\n    e.voices[1] = 1;\n    amy_add_event(&e);\n    delay_ms(250);\n\n    e = amy_default_event();\n    e.patch_number = 131;\n    e.voices[0] = 0;\n    amy_add_event(&e);\n    delay_ms(250);\n\n    // play the same note on both\n    e = amy_default_event();\n    e.velocity = 1;\n    e.midi_note = 60;\n    e.voices[0] = 0;\n    amy_add_event(&e);\n    delay_ms(2000);\n\n    e = amy_default_event();\n    e.velocity = 1;\n    e.midi_note = 60;\n    e.voices[0] = 1;\n    amy_add_event(&e);\n    delay_ms(2000);\n\n\n    // now try to alloc voice 0 with a juno, should use oscs 0-4 again\n    e = amy_default_event();\n    e.patch_number = 2;\n    e.voices[0] = 0;\n    amy_add_event(&e);\n    delay_ms(250);\n}\n\n\nvoid example_voice_chord(uint32_t start, uint16_t patch_number) {\n    amy_event e = amy_default_event();\n    e.time = start;\n    e.patch_number = patch_number;\n    e.voices[0] = 0;\n    e.voices[1] = 1;\n    e.voices[2] = 2;\n    amy_add_event(&e);\n    start += 250;\n\n    e = amy_default_event();\n    e.time = start;\n    e.velocity=0.5;\n\n    e.voices[0] = 0;\n    e.midi_note = 50;\n    amy_add_event(&e);\n    start += 1000;\n\n    e.voices[0] = 1;\n    e.midi_note = 54;\n    e.time = start;\n    amy_add_event(&e);\n    start += 1000;\n\n    e.voices[0] = 2;\n    e.midi_note = 56;\n    e.time = start;\n    amy_add_event(&e);\n    start += 2000;\n\n    e.voices[0] = 0;\n    e.voices[1] = 1;\n    e.voices[2] = 2;\n    e.velocity = 0;\n    e.time = start;\n    amy_add_event(&e);\n}\n\nvoid example_synth_chord(uint32_t start, uint16_t patch_number) {\n    // Like example_voice_chord, but use 'synth' to avoid having to keep track of voices.\n    amy_event e = amy_default_event();\n    e.time = start;\n    e.patch_number = patch_number;\n    e.num_voices = 3;\n    e.synth = 0;\n    amy_add_event(&e);\n    start += 250;\n\n    e = amy_default_event();\n    e.velocity = 0.5;\n    e.synth = 0;\n\n    e.time = start;\n    e.midi_note = 50;\n    amy_add_event(&e);\n\n    e.time += 1000;\n    e.midi_note = 54;  // Will get a new voice.\n    amy_add_event(&e);\n\n    e.time += 1000;\n    e.midi_note = 56;\n    amy_add_event(&e);\n\n    e.time += 2000;\n    e.velocity = 0;\n    // Voices are referenced only by their note, so have to turn them off individually.\n    e.midi_note = 50;\n    amy_add_event(&e);\n    e.midi_note = 54;\n    amy_add_event(&e);\n    e.midi_note = 56;\n    amy_add_event(&e);\n}   \n\n\nvoid example_sustain_pedal(uint32_t start, uint16_t patch_number) {\n    // Reproduce TestSustainPedal, to track segfault.\n    amy_event e = amy_default_event();\n    e.time = start;\n    e.reset_osc = RESET_ALL_OSCS;\n    amy_add_event(&e);\n\n    e = amy_default_event();\n    e.time = start;\n    e.synth = 1;\n    e.num_voices = 4;\n    e.patch_number = patch_number;\n    amy_add_event(&e);\n\n    start += 50;\n    e = amy_default_event();\n    e.time = start;\n    e.synth = 1;\n    e.midi_note = 76;\n    e.velocity = 1.0f;\n    amy_add_event(&e);\n\n    start += 50;\n    e = amy_default_event();\n    e.time = start;\n    e.synth = 1;\n    e.midi_note = 76;\n    e.velocity = 0;\n    amy_add_event(&e);\n\n    start += 50;\n    e = amy_default_event();\n    e.time = start;\n    e.synth = 1;\n    e.pedal = 127;\n    amy_add_event(&e);\n\n    start += 50;\n    e = amy_default_event();\n    e.time = start;\n    e.synth = 1;\n    e.midi_note = 63;\n    e.velocity = 1.0f;\n    amy_add_event(&e);\n\n    start += 50;\n    e = amy_default_event();\n    e.time = start;\n    e.synth = 1;\n    e.midi_note = 63;\n    e.velocity = 0;\n    amy_add_event(&e);\n\n    start += 50;\n    e = amy_default_event();\n    e.time = start;\n    e.synth = 1;\n    e.midi_note = 67;\n    e.velocity = 1.0f;\n    amy_add_event(&e);\n\n    start += 50;\n    e = amy_default_event();\n    e.time = start;\n    e.synth = 1;\n    e.midi_note = 67;\n    e.velocity = 0;\n    amy_add_event(&e);\n\n    start += 50;\n    e = amy_default_event();\n    e.time = start;\n    e.synth = 1;\n    e.midi_note = 72;\n    e.velocity = 1.0f;\n    amy_add_event(&e);\n\n    start += 50;\n    e = amy_default_event();\n    e.time = start;\n    e.synth = 1;\n    e.pedal = 0;\n    amy_add_event(&e);\n\n    start += 50;\n    e = amy_default_event();\n    e.time = start;\n    e.synth = 1;\n    e.midi_note = 72;\n    e.velocity = 0;\n    amy_add_event(&e);\n}   \n\n\n\nvoid example_patches() {\n    amy_event e = amy_default_event();\n    for(uint16_t i=0;i<256;i++) {\n        e.patch_number = i;\n        e.voices[0] = 0;\n        fprintf(stderr, \"sending patch %d\\n\", i);\n        amy_add_event(&e);\n        delay_ms(250);\n\n        e = amy_default_event();\n        e.voices[0] = 0;\n        e.osc = 0;\n        e.midi_note = 50;\n        e.velocity = 0.5;\n        amy_add_event(&e);\n\n        delay_ms(1000);\n        e.voices[0] = 0;\n        e.velocity = 0;\n        amy_add_event(&e);\n\n        delay_ms(250);\n\n        amy_reset_oscs();\n    }\n}\nvoid example_reverb() {\n    if(AMY_HAS_REVERB) {\n        config_reverb(2, REVERB_DEFAULT_LIVENESS, REVERB_DEFAULT_DAMPING, REVERB_DEFAULT_XOVER_HZ); \n    }\n}\n\nvoid example_chorus() {\n    if(AMY_HAS_CHORUS) {\n        config_chorus(0.8, CHORUS_DEFAULT_MAX_DELAY, CHORUS_DEFAULT_LFO_FREQ, CHORUS_DEFAULT_MOD_DEPTH);\n    }\n}\n\n// Play a KS tone\nvoid example_ks(uint32_t start) {\n    amy_event e = amy_default_event();\n    e.time = start;\n\n    e.velocity = 1;\n    e.wave = KS;\n    e.feedback = 0.996f;\n    e.preset = 15;\n    e.osc = 0;\n    e.midi_note = 60;\n    amy_add_event(&e);\n}\n\n// make a 440hz sine\nvoid example_sine(uint32_t start) {\n    amy_event e = amy_default_event();\n    e.time = start;\n    e.freq_coefs[0] = 440;\n    e.wave = SINE;\n    e.velocity = 1;\n    amy_add_event(&e);\n}\n\nvoid example_multimbral_fm() {\n    amy_event e0 = amy_default_event();\n    amy_event e1 = amy_default_event();\n    int notes[] = {60, 70, 64, 68, 72, 82};\n    e1.velocity = 0.5;\n    e0.patch_number = 128;\n    for (unsigned int i = 0; i < sizeof(notes) / sizeof(int); ++i) {\n        e1.midi_note = notes[i];\n        e1.pan_coefs[0] = (i%2);\n        e0.patch_number++;\n        e0.voices[0] = i;\n        amy_add_event(&e0);\n        amy_add_event(&e1);\n        delay_ms(1000);\n    }\n}\n\n\n// Emulate the Tulip \"drums()\" example via event calls.\nvoid example_drums(uint32_t start, int loops) {\n\n    // bd, snare, hat, cow, hicow\n    int oscs[] = {0, 1, 2, 3, 4};\n    int presets[] = {1, 5, 0, 10, 10};\n\n    // Reset all used oscs first, just in case\n    for (unsigned int i = 0; i < sizeof(oscs) / sizeof(int); ++i) {\n        amy_event e_reset = amy_default_event();\n        e_reset.time = start;\n        e_reset.osc = oscs[i];    \n        e_reset.reset_osc = oscs[i];\n        amy_add_event(&e_reset);\n    }\n\n    amy_event e = amy_default_event();\n    e.time = start + 1;\n    float volume = 0.5;\n    e.wave = PCM;\n    e.velocity = 0;\n\n    for (unsigned int i = 0; i < sizeof(oscs) / sizeof(int); ++i) {\n        e.osc = oscs[i];\n        e.preset = presets[i];\n        amy_add_event(&e);\n    }\n    // Update high cowbell.\n    e = amy_default_event();\n    e.time = start+1;\n    e.osc = 4;\n    e.midi_note = 70;\n    amy_add_event(&e);\n\n    // osc 5 : bass\n    e = amy_default_event();\n    e.time = start+1;\n    e.osc = 5;\n    e.wave = SAW_DOWN;\n    e.filter_freq_coefs[COEF_CONST] = 650.0;  // LOWEST filter center frequency.\n    e.filter_freq_coefs[COEF_EG0] = 2.0;  // When env0 is 1.0, filter is shifted up by 2.0 octaves (x4, so 2600.0).\n    e.resonance = 5.0;\n    e.filter_type = FILTER_LPF;\n    e.eg0_times[0] = 0;   e.eg0_values[0] = 1.0f;\n    e.eg0_times[1] = 500; e.eg0_values[1] = 0.2f;\n    e.eg0_times[2] = 25;  e.eg0_values[2] = 0.0f;\n    amy_add_event(&e);\n\n\n    const int bd = 1 << 0;\n    const int snare = 1 << 1;\n    const int hat = 1 << 2;\n    const int cow = 1 << 3;\n    const int hicow = 1 << 4;\n\n    int pattern[] = {bd+hat, hat+hicow, bd+hat+snare, hat+cow, hat, bd+hat, snare+hat, hat};\n    int bassline[] = {50, 0, 0, 0, 50, 52, 51, 0};\n\n    e = amy_default_event();\n    e.time = start+1;\n    while (loops--) {\n        for (unsigned int i = 0; i < sizeof(pattern) / sizeof(int); ++i) {\n            e.time += 250;\n            AMY_UNSET(e.freq_coefs[0]);\n            AMY_UNSET(e.midi_note);\n            \n            int x = pattern[i];\n            if(x & bd) {\n                e.osc = 0;\n                e.velocity = 4.0 * volume;\n                amy_add_event(&e);\n            }\n            if(x & snare) {\n                e.osc = 1;\n                e.velocity = 1.5 * volume;\n                amy_add_event(&e);\n            }\n            if(x & hat) {\n                e.osc = 2;\n                e.velocity = 1 * volume;\n                amy_add_event(&e);\n            }\n            if(x & cow) {\n                e.osc = 3;\n                e.velocity = 1 * volume;\n                amy_add_event(&e);\n            }\n            if(x & hicow) {\n                e.osc = 4;\n                e.velocity = 1 * volume;\n                amy_add_event(&e);\n            }\n\n            e.osc = 5;\n            if(bassline[i]>0) {\n                e.velocity = 0.5 * volume;\n                e.midi_note = bassline[i] - 12;\n            } else {\n                e.velocity = 0;\n            }\n            amy_add_event(&e);\n        }\n    }\n}\n\nvoid example_sequencer_drums(uint32_t start) {\n    // Play a drum pattern using the low-level sequencer structure\n    amy_event e = amy_default_event();\n    e.time = start;\n    e.reset_osc = RESET_ALL_OSCS;\n    amy_add_event(&e);\n\n    // Set tempo so 16 ticks is 108 BPM (not 48 as default).  So we make the BPM one-sixth\n    e = amy_default_event();\n    e.tempo = 108.0f/3;\n    amy_add_event(&e);\n\n    // Setup oscs for bd, snare, hat, cow, hicow\n    int oscs[] = {0, 1, 2, 3, 4};\n    int presets[] = {1, 5, 0, 10, 10};\n    e = amy_default_event();\n    e.time = start + 1;\n    e.wave = PCM;\n    for (unsigned int i = 0; i < sizeof(oscs) / sizeof(int); ++i) {\n        e.osc = oscs[i];\n        e.preset = presets[i];\n        amy_add_event(&e);\n    }\n    // Update high cowbell.\n    e = amy_default_event();\n    e.time = start + 1;\n    e.osc = 4;\n    e.midi_note = 70;\n    amy_add_event(&e);\n\n    // Add patterns.\n    // Hi hat every 8 ticks.\n    e = amy_default_event();\n    e.sequence[SEQUENCE_TAG] = 0;\n    e.sequence[SEQUENCE_PERIOD] = 8;\n    e.sequence[SEQUENCE_TICK] = 0;\n    e.osc = 2;\n    e.velocity = 1.0;\n    amy_add_event(&e);\n\n    // Bass drum every 32 ticks.\n    e.sequence[SEQUENCE_TAG] = 1;\n    e.sequence[SEQUENCE_PERIOD] = 32;\n    e.sequence[SEQUENCE_TICK] = 0;\n    e.osc = 0;\n    e.velocity = 1.0;\n    amy_add_event(&e);\n\n    // Snare every 32 ticks, counterphase to BD.\n    e.sequence[SEQUENCE_TAG] = 2;\n    e.sequence[SEQUENCE_PERIOD] = 32;\n    e.sequence[SEQUENCE_TICK] = 16;\n    e.osc = 1;\n    e.velocity = 1.0;\n    amy_add_event(&e);\n\n    // Cow once every other cycle.\n    e.sequence[SEQUENCE_TAG] = 3;\n    e.sequence[SEQUENCE_PERIOD] = 64;\n    e.sequence[SEQUENCE_TICK] = 60;\n    e.osc = 3;\n    e.velocity = 1.0;\n    amy_add_event(&e);\n}\n\nvoid example_sequencer_drums_synth(uint32_t start) {\n    // Play a drum pattern using the low-level sequencer structure driving default system drums synth (10)\n    amy_event e;\n\n    // Add patterns.\n    // Hi hat every 8 ticks.\n    e = amy_default_event();\n    e.sequence[SEQUENCE_TAG] = 0;\n    e.sequence[SEQUENCE_PERIOD] = 24;\n    e.sequence[SEQUENCE_TICK] = 0;\n    e.synth = 10;\n    e.midi_note = 42;  // Closed Hat\n    e.velocity = 1.0;\n    amy_add_event(&e);\n\n    // Bass drum every 32 ticks.\n    e.sequence[SEQUENCE_TAG] = 1;\n    e.sequence[SEQUENCE_PERIOD] = 96;\n    e.sequence[SEQUENCE_TICK] = 0;\n    e.synth = 10;\n    e.midi_note = 35;  // Std kick\n    e.velocity = 1.0;\n    amy_add_event(&e);\n\n    // Snare every 32 ticks, counterphase to BD.\n    e.sequence[SEQUENCE_TAG] = 2;\n    e.sequence[SEQUENCE_PERIOD] = 96;\n    e.sequence[SEQUENCE_TICK] = 48;\n    e.synth = 10;\n    e.midi_note = 38;  // Snare\n    e.velocity = 1.0;\n    amy_add_event(&e);\n\n    // Cow once every other cycle.\n    e.sequence[SEQUENCE_TAG] = 3;\n    e.sequence[SEQUENCE_PERIOD] = 192;\n    e.sequence[SEQUENCE_TICK] = 180;\n    e.synth = 10;\n    e.midi_note = 56;  // Cowbell\n    e.velocity = 1.0;\n    amy_add_event(&e);\n}\n\nvoid example_fm(uint32_t start) {\n    // Direct construction of an FM tone, as in the documentation.\n    amy_event e;\n\n    // Modulating oscillator (op 2)\n    e = amy_default_event();\n    e.time = start;\n    e.osc = 9;\n    e.wave = SINE;\n    e.ratio = 1.0f;\n    e.amp_coefs[COEF_CONST] = 1.0f;\n    e.amp_coefs[COEF_VEL] = 0;\n    e.amp_coefs[COEF_EG0] = 0;\n    amy_add_event(&e);\n\n    // Output oscillator (op 1)\n    e = amy_default_event();\n    e.time = start;\n    e.osc = 8;\n    e.wave = SINE;\n    e.ratio = 0.2f;\n    e.amp_coefs[COEF_CONST] = 1.0f;\n    e.amp_coefs[COEF_VEL] = 0;\n    e.amp_coefs[COEF_EG0] = 1.0f;\n    e.eg0_times[0] = 0;    e.eg0_values[0] = 1.0f;\n    e.eg0_times[1] = 1000; e.eg0_values[1] = 0.0f;\n    e.eg0_times[2] = 0;    e.eg0_values[2] = 0.0f;\n    amy_add_event(&e);\n\n    // ALGO control oscillator\n    e = amy_default_event();\n    e.time = start;\n    e.osc = 7;\n    e.wave = ALGO;\n    e.algorithm = 1;  // algo 1 has op 2 driving op 1 driving output (plus a second chain for ops 6,5,4,3).\n    e.algo_source[4] = 9;\n    e.algo_source[5] = 8;\n    amy_add_event(&e);\n\n    // Add a note on event.\n    e = amy_default_event();\n    e.time = start + 100;\n    e.osc = 7;\n    e.midi_note = 60;\n    e.velocity = 1.0f;\n    amy_add_event(&e);\n}\n\n\n// Minimal custom oscillator\n\nvoid beeper_init(void) {\n    //printf(\"Beeper init\\n\");\n}\n\nvoid beeper_deinit(void) {\n    //printf(\"Beeper deinit\\n\");\n}\n\nvoid beeper_note_on(uint16_t osc, float freq) {\n    saw_down_note_on(osc, freq);\n}\n\nvoid beeper_note_off(uint16_t osc) {\n    synth[osc]->note_off_clock = amy_global.total_blocks*AMY_BLOCK_SIZE;\n}\n\nvoid beeper_mod_trigger(uint16_t osc) {\n    saw_down_mod_trigger(osc);\n}\n\nSAMPLE beeper_render(SAMPLE* buf, uint16_t osc) {\n    return render_saw_down(buf, osc);\n}\n\nSAMPLE beeper_compute_mod(uint16_t osc) {\n    return compute_mod_saw_down(osc);\n}\n\nstruct custom_oscillator beeper = {\n    beeper_init,\n    beeper_deinit,\n    beeper_note_on,\n    beeper_note_off,\n    beeper_mod_trigger,\n    beeper_render,\n    beeper_compute_mod\n};\n\nvoid example_init_custom() {\n    amy_set_custom(&beeper);\n}\n\nvoid example_custom_beep() {\n    amy_event e = amy_default_event();\n    e.osc = 50;\n    e.time = amy_sysclock();\n    e.freq_coefs[0] = 880;\n    e.wave = CUSTOM;\n    e.velocity = 1;\n    amy_add_event(&e);\n\n    e.velocity = 0;\n    e.time += 500;\n    amy_add_event(&e);\n}\n\nvoid example_patch_from_events() {\n    int time = amy_sysclock();\n    int number = 1039;\n    amy_event e = amy_default_event();\n    e.time = time;\n    e.patch_number = number;\n    e.reset_osc = RESET_PATCH;\n    amy_add_event(&e);\n\n    e = amy_default_event();\n    e.time = time;\n    e.patch_number = number;\n    e.osc = 0;\n    e.wave = SAW_DOWN;\n    e.chained_osc = 1;\n    e.eg0_times[0] = 0;    e.eg0_values[0] = 1.0f;\n    e.eg0_times[1] = 1000; e.eg0_values[1] = 0.1f;\n    e.eg0_times[2] = 200;  e.eg0_values[2] = 0.0f;\n    amy_add_event(&e);\n\n    e = amy_default_event();\n    e.time = time;\n    e.patch_number = number;\n    e.osc = 1;\n    e.wave = SINE;\n    e.freq_coefs[COEF_CONST] = 131.0f;\n    e.eg0_times[0] = 0;   e.eg0_values[0] = 1.0f;\n    e.eg0_times[1] = 500; e.eg0_values[1] = 0.0f;\n    e.eg0_times[2] = 200; e.eg0_values[2] = 0.0f;\n    amy_add_event(&e);\n\n    e = amy_default_event();\n    e.time = time;\n    e.synth = 0;\n    e.num_voices = 4;\n    e.patch_number = number;\n    amy_add_event(&e);\n\n    e = amy_default_event();\n    e.time = time + 100;\n    e.synth = 0;\n    e.midi_note = 60.0f;\n    e.velocity = 1.0f;\n    amy_add_event(&e);\n\n    e = amy_default_event();\n    e.time = time + 300;\n    e.synth = 0;\n    e.midi_note = 64.0f;\n    e.velocity = 1.0f;\n    amy_add_event(&e);\n\n    e = amy_default_event();\n    e.time = time + 500;\n    e.synth = 0;\n    e.midi_note = 67.0f;\n    e.velocity = 1.0f;\n    amy_add_event(&e);\n\n    e = amy_default_event();\n    e.time = time + 800;\n    e.synth = 0;\n    e.velocity = 0.0f;\n    amy_add_event(&e);\n}\n"
  },
  {
    "path": "src/examples.h",
    "content": "// examples.h\n// examples.c\n// sound examples\n\n#include \"amy.h\"\n\n\nvoid example_reverb();\nvoid example_chorus();\nvoid example_ks(uint32_t start);\nvoid bleep(uint32_t start);\nvoid bleep_synth(uint32_t start);\nvoid example_fm(uint32_t start);\nvoid example_multimbral_fm();\nvoid example_drums(uint32_t start, int loops);\nvoid example_sequencer_drums(uint32_t start);\nvoid example_sequencer_drums_synth(uint32_t start);\nvoid example_sine(uint32_t start);\nvoid example_init_custom();\nvoid example_custom_beep();\nvoid example_patches();\nvoid example_voice_chord(uint32_t start, uint16_t patch_number);\nvoid example_synth_chord(uint32_t start, uint16_t patch_number);\nvoid example_sustain_pedal(uint32_t start, uint16_t patch_number);\nvoid example_voice_alloc();\nvoid example_reset(uint32_t start);\nvoid example_patch_from_events();\n"
  },
  {
    "path": "src/filters.c",
    "content": "#include \"amy.h\"\n#include \"assert.h\"\n\n#ifndef M_PI\n    #define M_PI 3.14159265358979323846\n#endif\n\n// Filters tend to get weird under this ratio -- this corresponds to 4.4Hz \n#define LOWEST_RATIO 0.0001\n\n#define FILT_NUM_DELAYS  4    // Need 4 memories for DFI filters, if used (only 2 for DFII).\n\nSAMPLE ** eq_coeffs;\nSAMPLE *** eq_delay;\n\n\n#ifdef __GNUC__\n#pragma GCC diagnostic push                             // save the actual diag context\n#pragma GCC diagnostic ignored \"-Wuninitialized\"  // disable maybe warnings\n#endif\nfloat dsps_sqrtf_f32_ansi(float f)\n{\n    int* f_ptr = (int*)&f;\n    const int result = 0x1fbb4000 + (*f_ptr >> 1);\n    float* f_result = (float*)&result;\n    return *f_result;\n}\n#ifdef __GNUC__\n#pragma GCC diagnostic pop\n#endif\n\nint8_t dsps_biquad_gen_lpf_f32(SAMPLE *coeffs, float f, float qFactor)\n{\n    //qFactor = sqrtf(qFactor);\n    \n    if (qFactor < 0.51) {\n        qFactor = 0.51;\n    }\n    if (f > 0.45) {\n        f = 0.45;\n    }\n    float Fs = 1;\n\n    float w0 = 2 * M_PI * f / Fs;\n    w0 = MAX(0.01, w0);  // so f >= Fs * 0.01 / (2 pi) = 70.2 Hz\n    float c = cosf(w0);\n    float s = sinf(w0);\n    float alpha = s / (2 * qFactor);\n    // sin w0 / (2 Q) < 1\n    // => sin w0 < 2 Q\n    // If Q >= 0.5, no problem.\n\n    \n    float b0 = (1 - c) / 2;\n    float b1 = 1 - c;\n    float b2 = b0;\n    float a0 = 1 + alpha;\n    float a1 = -2 * c;\n    float a2 = 1 - alpha;\n\n    // Where exactly are those poles?  Impose minima on (1 - r) and w0.\n    float r = -99, ww = 0;\n    if (false && a2 > 0) { \n        printf(\"before: r %f a %f %f %f\\n\", sqrtf(a2 / a0), a0, a1, a2);\n        // Limit how close complex poles can get to the unit circle.\n        r = MIN(0.99, sqrtf(a2 / a0));\n        float alphadash = (1 - r * r) / (1 + r * r);\n        float cosww = c / sqrtf(1 - alphadash * alphadash);\n        if (fabs(cosww) < 1.0) {\n            ww = acosf(cosww);\n            a1 = a0 * (-2 * r * cosf(ww));\n            a2 = a0 * r * r;\n            printf(\" after: r %f a %f %f %f\\n\", r, a0, a1, a2);\n        }\n    }\n\n    coeffs[0] = F2S(-b0 / a0);\n    coeffs[1] = F2S(-b1 / a0);\n    coeffs[2] = F2S(-b2 / a0);\n    coeffs[3] = F2S(a1 / a0);\n    coeffs[4] = F2S(a2 / a0);\n\n    //printf(\"Flpf t=%f f=%f q=%f alpha %f b0 %f b1 %f b2 %f a1 %f a2 %f r %f theta %f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE, f * AMY_SAMPLE_RATE, qFactor, alpha, \n    //       b0 / a0, b1 / a0, b2 / a0, a1 / a0, a2 / a0, r, w0);\n    //printf(\"Slpf t=%f f=%f q=%f b0 %f b1 %f b2 %f a1 %f a2 %f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE, f * AMY_SAMPLE_RATE, qFactor,\n    //       S2F(coeffs[0]), S2F(coeffs[1]), S2F(coeffs[2]), S2F(coeffs[3]), S2F(coeffs[4]));\n\n    return 0;\n}\n\nint8_t dsps_biquad_gen_hpf_f32(SAMPLE *coeffs, float f, float qFactor)\n{\n    if (qFactor <= 0.0001) {\n        qFactor = 0.0001;\n    }\n    if (f > 0.45) {\n        f = 0.45;\n    }\n    float Fs = 1;\n\n    float w0 = 2 * M_PI * f / Fs;\n    float c = cosf(w0);\n    float s = sinf(w0);\n    float alpha = s / (2 * qFactor);\n\n    float b0 = (1 + c) / 2;\n    float b1 = -(1 + c);\n    float b2 = b0;\n    float a0 = 1 + alpha;\n    float a1 = -2 * c;\n    float a2 = 1 - alpha;\n\n    coeffs[0] = F2S(b0 / a0);\n    coeffs[1] = F2S(b1 / a0);\n    coeffs[2] = F2S(b2 / a0);\n    coeffs[3] = F2S(a1 / a0);\n    coeffs[4] = F2S(a2 / a0);\n    return 0;\n}\n\nint8_t dsps_biquad_gen_bpf_f32(SAMPLE *coeffs, float f, float qFactor)\n{\n    if (qFactor <= 0.0001) {\n        qFactor = 0.0001;\n    }\n    if (f > 0.45) {\n        f = 0.45;\n    }\n    float Fs = 1;\n\n    float w0 = 2 * M_PI * f / Fs;\n    float c = cosf(w0);\n    float s = sinf(w0);\n    float alpha = s / (2 * qFactor);\n\n    float b0 = s / 2;\n    float b1 = 0;\n    float b2 = -b0;\n    float a0 = 1 + alpha;\n    float a1 = -2 * c;\n    float a2 = 1 - alpha;\n\n    coeffs[0] = F2S(b0 / a0);\n    coeffs[1] = F2S(b1 / a0);\n    coeffs[2] = F2S(b2 / a0);\n    coeffs[3] = F2S(a1 / a0);\n    coeffs[4] = F2S(a2 / a0);\n    return 0;\n}\n\n// Stick to the faster mult for biquad, hpf etc, since the parameters aren't so sensitive, and parametric_eq was chewing major CPU.\n#define FILT_MUL_SS(a, b) SMULR6(a, b)\n\n#define FILTER_SCALEUP_BITS 0  // Apply this gain to input before filtering to avoid underflow in intermediate value.\n#define FILTER_BIQUAD_SCALEUP_BITS 0  // Apply this gain to input before filtering to avoid underflow in intermediate value.\n#define FILTER_BIQUAD_SCALEDOWN_BITS 0  // Extra headroom for EQ filters to avoid clipping on loud signals.\n\nint8_t dsps_biquad_f32_ansi(const SAMPLE *input, SAMPLE *output, int len, SAMPLE *coef, SAMPLE *w) {\n    AMY_PROFILE_START(DSPS_BIQUAD_F32_ANSI)\n\n    // Zeros then poles - Direct Form I\n    // We need 2 memories for input, and 2 for output.\n    SAMPLE x1 = w[0];\n    SAMPLE x2 = w[1];\n    SAMPLE y1 = w[2];\n    SAMPLE y2 = w[3];\n    for (int i = 0 ; i < len ; i++) {\n        SAMPLE x0 = SHIFTL(input[i], FILTER_BIQUAD_SCALEUP_BITS);\n        // SAMPLE x0 = SHIFTR(input[i], FILTER_BIQUAD_SCALEDOWN_BITS);\n        SAMPLE w0 = FILT_MUL_SS(coef[0], x0) + FILT_MUL_SS(coef[1], x1) + FILT_MUL_SS(coef[2], x2);\n        SAMPLE y0 = w0 - FILT_MUL_SS(coef[3], y1) - FILT_MUL_SS(coef[4], y2);\n        x2 = x1;\n        x1 = x0;\n        y2 = y1;\n        y1 = y0;\n        output[i] = SHIFTR(y0, FILTER_BIQUAD_SCALEUP_BITS);\n        //output[i] = SHIFTL(y0, FILTER_BIQUAD_SCALEDOWN_BITS);\n    }\n    w[0] = x1;\n    w[1] = x2;\n    w[2] = y1;\n    w[3] = y2;\n    AMY_PROFILE_STOP(DSPS_BIQUAD_F32_ANSI)\n\n    return 0;\n}\n\n\nint8_t dsps_biquad_f32_ansi_split_fb(const SAMPLE *input, SAMPLE *output, int len, SAMPLE *coef, SAMPLE *w) {\n    AMY_PROFILE_START(DSPS_BIQUAD_F32_ANSI_SPLIT_FB)\n    // Rewrite the feeedback coefficients as a1 = -2 + e and a2 = 1 - f\n    SAMPLE x1 = w[0];\n    SAMPLE x2 = w[1];\n    SAMPLE y1 = w[2];\n    SAMPLE y2 = w[3];\n    SAMPLE e = F2S(2.0f) + coef[3];  // So coef[3] = -2 + e\n    SAMPLE f = F2S(1.0f) - coef[4];  // So coef[4] = 1 - f\n    //fprintf(stderr, \"e=%f (%d) f=%f\\n\", S2F(e), (e < F2S(0.0625)), S2F(f));\n    for (int i = 0 ; i < len ; i++) {\n        SAMPLE x0 = SHIFTL(input[i], FILTER_SCALEUP_BITS);\n        SAMPLE w0 = FILT_MUL_SS(coef[0], x0) + FILT_MUL_SS(coef[1], x1) + FILT_MUL_SS(coef[2], x2);\n        SAMPLE y0 = w0 + SHIFTL(y1, 1) - y2;\n        y0 = y0 - FILT_MUL_SS(e, y1) + FILT_MUL_SS(f, y2);\n        x2 = x1;\n        x1 = x0;\n        y2 = y1;\n        y1 = y0;\n        output[i] = SHIFTR(y0, FILTER_SCALEUP_BITS);\n    }\n    w[0] = x1;\n    w[1] = x2;\n    w[2] = y1;\n    w[3] = y2;\n    AMY_PROFILE_STOP(DSPS_BIQUAD_F32_ANSI_SPLIT_FB)\n\n    return 0;\n}\n\n// 16 bit pseudo floating-point multiply.\n// See https://colab.research.google.com/drive/1_uQto5WSVMiSPHQ34cHbCC6qkF614EoN#scrollTo=njPHwSB9VIJi\n\nstatic inline SAMPLE ABS(SAMPLE a) {\n    if (a > 0)\n        return a;\n    else\n        return -a;\n}\n\nstatic inline int headroom(SAMPLE a) {\n    // How many bits bigger can this value get before overflow?\n#ifdef AMY_USE_FIXEDPOINT\n    return __builtin_clz(ABS(a) | 1) - 1;  // -1 for sign bit.\n#else  // !AMY_USE_FIXEDPOINT\n    // How many bits can you shift before this max overflows?\n    int bits = 0;\n    while(a < F2S(128.0) && bits < 32) {\n        a = SHIFTL(a, 1);\n        ++bits;\n    }\n    return bits;\n#endif  // AMY_USE_FIXEDPOINT\n}\n\nstatic inline int nheadroom16(SAMPLE a) {\n    // Headroom with MAX(0, 16 - headroom(a)) precomputed.\n#ifdef AMY_USE_FIXEDPOINT\n    return MAX(0, 16 - (__builtin_clz(ABS(a) | 1) - 1));  // -1 for sign bit.\n#else  // !AMY_USE_FIXEDPOINT\n    // How many bits can you shift before this max overflows?\n    int bits = 0;\n    while(a < F2S(128.0) && bits < 32) {\n        a = SHIFTL(a, 1);\n        ++bits;\n    }\n    return bits;\n#endif  // AMY_USE_FIXEDPOINT\n}\n\n#ifdef AMY_USE_FIXEDPOINT\n\nSAMPLE top16SMUL(SAMPLE a, SAMPLE b) {\n    // Multiply the top 15 bits of a and b.\n    //int adropped = MAX(0, 16 - headroom(a));\n    int adropped = nheadroom16(a);  //MAX(0, 16 - headroom(a));\n    if (adropped) {\n        a = SHIFTR(SHIFTR(a, adropped - 1) + 1, 1);\n    }\n    int resultdrop = 23 - adropped;\n    int bdropped = MIN(resultdrop, nheadroom16(b)); // MAX(0, 16 - headroom(b)));\n    if (bdropped) {\n        //b = SHIFTR(b + (1 << (bdropped - 1)), bdropped);\n        b = SHIFTR(SHIFTR(b, bdropped - 1) + 1, 1);\n    }\n    resultdrop -= bdropped;\n    SAMPLE result = a * b;\n    if (resultdrop) {\n        //return SHIFTR(result + (1 << (resultdrop - 1)), resultdrop);\n        return SHIFTR(SHIFTR(result, resultdrop - 1) + 1, 1);\n    }\n    return result;\n}\n\nSAMPLE top16SMUL_a_part(SAMPLE a, int *p_resultdrop) {\n    // Just the processing of a, so we can split it out\n    int adropped = nheadroom16(a);\n    if (adropped) {\n        //a = SHIFTR(a + (1 << (adropped - 1)), adropped);\n        a = SHIFTR(SHIFTR(a, adropped - 1) + 1, 1);\n    }\n    *p_resultdrop = 23 - adropped;\n    return a;\n}\n\nSAMPLE top16SMUL_after_a(SAMPLE a_processed, SAMPLE b, int resultdrop, int bnheadroom16) {\n    // The rest of top16SMUL after a has been preprocessed by top16SML_a_part.\n    //int bdropped = MIN(resultdrop, MAX(0, 16 - bheadroom));\n    int bdrop = MIN(resultdrop, bnheadroom16);\n    if (bdrop) {\n        //b = SHIFTR(b + (1 << (bdrop - 1)), bdrop);\n        b = SHIFTR(SHIFTR(b, bdrop - 1) + 1, 1);\n        resultdrop -= bdrop;\n    }\n    SAMPLE result = a_processed * b;\n    if (resultdrop) {\n        //return SHIFTR(result + (1 << (resultdrop - 1)), resultdrop);\n        return SHIFTR(SHIFTR(result, resultdrop - 1) + 1, 1);\n    }\n    return result;\n}\n\n#else // !AMY_USE_FIXEDPOINT\n\n// Sidestep all this logic for SAMPLE == float.\n\nSAMPLE top16SMUL(SAMPLE a, SAMPLE b) {\n    return a * b;\n}\n\nSAMPLE top16SMUL_a_part(SAMPLE a, int *p_adropped) {\n    *p_adropped = 0;  // dropped_bits registration unused in float.\n    return a;\n}\n\nSAMPLE top16SMUL_after_a(SAMPLE a_processed, SAMPLE b, int adropped_unused, int bheadroom_unused) {\n    return a_processed * b;\n}\n\n#endif // AMY_USE_FIXEDPOINT\n\nSAMPLE scan_max(SAMPLE* block, int len) {\n    AMY_PROFILE_START(SCAN_MAX)\n\n    // Find the max abs sample value in a block.\n    SAMPLE max = 0;\n    while (len--) {\n        SAMPLE val = *block++;\n        if (val > max) max = val;\n        else if ((-val) > max) max = -val;\n    }\n    AMY_PROFILE_STOP(SCAN_MAX)\n    return max;\n}\n\n// This is the multiply just for dsps_biquad_f32_ansi_split_fb_twice, which is only used for FILTER_LPF24.\n#define FILT_MUL_SS_24(a, b) top16SMUL(a, b)\n\nSAMPLE dsps_biquad_f32_ansi_split_fb_once(const SAMPLE *input, SAMPLE *output, int len, SAMPLE *coef, SAMPLE *w, SAMPLE max_val) {\n    // Apply the filter once (for 12 dB/oct LPF)\n    AMY_PROFILE_START(DSPS_BIQUAD_F32_ANSI_SPLIT_FB)\n    // Rewrite the feeedback coefficients as a1 = -2 + e and a2 = 1 - f\n    SAMPLE x1 = w[0];\n    SAMPLE x2 = w[1];\n    SAMPLE y1 = w[2];\n    SAMPLE y2 = w[3];\n    SAMPLE state_max = scan_max(w, 4);\n    int abits, bbits, cbits, ebits, fbits;\n    SAMPLE a = top16SMUL_a_part(coef[0], &abits);\n    SAMPLE e = top16SMUL_a_part(F2S(2.0f) + coef[3], &ebits);  // So coef[3] = -2 + e\n    SAMPLE f = top16SMUL_a_part(F2S(1.0f) - coef[4], &fbits);  // So coef[4] = 1 - f\n    assert(FILTER_SCALEUP_BITS == 0);\n    bbits = nheadroom16(max_val);\n    cbits = nheadroom16(SHIFTL(MAX(state_max, max_val), 2));\n    SAMPLE max_out = 0;\n    for (int i = 0 ; i < len ; i++) {\n        SAMPLE x0 = top16SMUL_after_a(a, input[i], abits, bbits);  // headroom(input[i]);\n        SAMPLE w0 = x0 + SHIFTL(x1, 1) + x2;\n        SAMPLE y0 = w0 + SHIFTL(y1, 1) - y2;\n        y0 = y0\n            - top16SMUL_after_a(e, y1, ebits, cbits)  //headroom(y1))\n            + top16SMUL_after_a(f, y2, fbits, cbits); //headroom(y2));\n        x2 = x1;\n        x1 = x0;\n        y2 = y1;\n        y1 = y0;\n        output[i] = y0;\n        if (y0 < 0) y0 = -y0;\n        if (y0 > 0) {\n            if (y0 > max_out)\n                max_out = y0;\n        } else {\n            if (-y0 > max_out)\n                max_out = -y0;\n        }\n    }\n    w[0] = x1;\n    w[1] = x2;\n    w[2] = y1;\n    w[3] = y2;\n    AMY_PROFILE_STOP(DSPS_BIQUAD_F32_ANSI_SPLIT_FB)\n\n    return max_out;\n}\n\nSAMPLE dsps_biquad_f32_ansi_split_fb_twice(const SAMPLE *input, SAMPLE *output, int len, SAMPLE *coef, SAMPLE *w, SAMPLE max_val) {\n    // Apply the filter twice\n    AMY_PROFILE_START(DSPS_BIQUAD_F32_ANSI_SPLIT_FB_TWICE)\n    // Rewrite the feeedback coefficients as a1 = -2 + e and a2 = 1 - f\n    SAMPLE x1 = w[0];\n    SAMPLE x2 = w[1];\n    SAMPLE y1 = w[2];\n    SAMPLE y2 = w[3];\n    SAMPLE v1 = w[4];\n    SAMPLE v2 = w[5];\n    SAMPLE state_max = scan_max(w, 6);\n    int abits, bbits, cbits, ebits, fbits;\n    SAMPLE a = top16SMUL_a_part(coef[0], &abits);\n    SAMPLE e = top16SMUL_a_part(F2S(2.0f) + coef[3], &ebits);  // So coef[3] = -2 + e\n    SAMPLE f = top16SMUL_a_part(F2S(1.0f) - coef[4], &fbits);  // So coef[4] = 1 - f\n    assert(FILTER_SCALEUP_BITS == 0);\n    bbits = nheadroom16(max_val);\n    cbits = nheadroom16(SHIFTL(MAX(state_max, max_val), 2));\n    SAMPLE max_out = 0;\n    for (int i = 0 ; i < len ; i++) {\n        SAMPLE x0, w0, v0;\n        x0 = top16SMUL_after_a(a, input[i], abits, bbits);  // headroom(input[i]);\n        w0 = x0 + SHIFTL(x1, 1) + x2;\n        v0 = w0 + SHIFTL(v1, 1) - v2;\n        v0 = v0\n            - top16SMUL_after_a(e, v1, ebits, cbits)  //headroom(v1))\n            + top16SMUL_after_a(f, v2, fbits, cbits); //headroom(v2));\n        w0 = v0 + SHIFTL(v1, 1) + v2;\n        w0 = top16SMUL_after_a(a, w0, abits, cbits);  //headroom(w0));\n        SAMPLE y0 = w0 + SHIFTL(y1, 1) - y2;\n        y0 = y0\n            - top16SMUL_after_a(e, y1, ebits, cbits)  //headroom(y1))\n            + top16SMUL_after_a(f, y2, fbits, cbits); //headroom(y2));\n        x2 = x1;\n        x1 = x0;\n        v2 = v1;\n        v1 = v0;\n        y2 = y1;\n        y1 = y0;\n        output[i] = y0;\n        if (y0 < 0) y0 = -y0;\n        if (y0 > 0) {\n            if (y0 > max_out)\n                max_out = y0;\n        } else {\n            if (-y0 > max_out)\n                max_out = -y0;\n        }\n    }\n    w[0] = x1;\n    w[1] = x2;\n    w[2] = y1;\n    w[3] = y2;\n    w[4] = v1;\n    w[5] = v2;\n    AMY_PROFILE_STOP(DSPS_BIQUAD_F32_ANSI_SPLIT_FB_TWICE)\n\n    return max_out;\n}\n\nint8_t dsps_biquad_f32_ansi_commuted(const SAMPLE *input, SAMPLE *output, int len, SAMPLE *coef, SAMPLE *w) {\n    AMY_PROFILE_START(DSPS_BIQUAD_F32_ANSI_COMMUTED)\n    // poles before zeros, for Direct Form II\n    for (int i = 0 ; i < len ; i++) {\n        SAMPLE d0 = input[i] - FILT_MUL_SS(coef[3], w[0]) - FILT_MUL_SS(coef[4], w[1]);\n        output[i] = FILT_MUL_SS(coef[0], d0) + FILT_MUL_SS(coef[1], w[0]) + FILT_MUL_SS(coef[2], w[1]);\n        w[1] = w[0];\n        w[0] = d0;\n    }\n    AMY_PROFILE_STOP(DSPS_BIQUAD_F32_ANSI_COMMUTED)\n\n    return 0;\n}\n\nvoid filters_deinit() {\n    for(uint16_t i=0;i<AMY_NCHANS;i++) {\n        for(uint16_t j=0;j<3;j++) free(eq_delay[i][j]);\n        free(eq_delay[i]);\n    }\n    for(uint16_t i=0;i<3;i++) free(eq_coeffs[i]);\n    free(eq_coeffs);\n    free(eq_delay);\n}\n\n\nvoid filters_init() {\n    eq_coeffs = malloc_caps(sizeof(SAMPLE*)*3, amy_global.config.ram_caps_fbl);\n    eq_delay = malloc_caps(sizeof(SAMPLE**)*AMY_NCHANS, amy_global.config.ram_caps_fbl);\n    for(uint16_t i=0;i<3;i++) {\n        eq_coeffs[i] = malloc_caps(sizeof(SAMPLE) * 5, amy_global.config.ram_caps_fbl);\n    }\n    for(uint16_t i=0;i<AMY_NCHANS;i++) {\n        eq_delay[i] = malloc_caps(sizeof(SAMPLE*) * 3, amy_global.config.ram_caps_fbl);\n        for(uint16_t j=0;j<3;j++) {\n            eq_delay[i][j] = malloc_caps(sizeof(SAMPLE) * FILT_NUM_DELAYS, amy_global.config.ram_caps_fbl);\n\n        }\n    }\n\n    // update the parametric filters \n    dsps_biquad_gen_lpf_f32(eq_coeffs[0], EQ_CENTER_LOW /(float)AMY_SAMPLE_RATE, 0.707);\n    dsps_biquad_gen_bpf_f32(eq_coeffs[1], EQ_CENTER_MED /(float)AMY_SAMPLE_RATE, 1.000);\n    dsps_biquad_gen_hpf_f32(eq_coeffs[2], EQ_CENTER_HIGH/(float)AMY_SAMPLE_RATE, 0.707);\n    for (int c = 0; c < AMY_NCHANS; ++c) {\n        for (int b = 0; b < 3; ++b) {\n            for (int d = 0; d < FILT_NUM_DELAYS; ++d) {\n                eq_delay[c][b][d] = 0;\n            }\n        }\n    }\n}\n\n\n#define FILT_MUL_SS_EQ(a, b) top16SMUL(a, b)\n//#define FILT_MUL_SS_EQ(a, b) SMULR6(a, b)\n\nvoid parametric_eq_process_old(SAMPLE *block);\nvoid parametric_eq_process_full(SAMPLE *block);\nvoid parametric_eq_process_top16block(SAMPLE *block);\n\nvoid parametric_eq_process(SAMPLE *block) {\n    //parametric_eq_process_full(block);\n    parametric_eq_process_top16block(block);\n}\n\nvoid parametric_eq_process_old(SAMPLE *block) {\n    AMY_PROFILE_START(PARAMETRIC_EQ_PROCESS)\n\n    SAMPLE output[2][AMY_BLOCK_SIZE];\n    for(int c = 0; c < AMY_NCHANS; ++c) {\n        SAMPLE *cblock = block + c * AMY_BLOCK_SIZE;\n        dsps_biquad_f32_ansi(cblock, output[0], AMY_BLOCK_SIZE, eq_coeffs[0], eq_delay[c][0]);\n        dsps_biquad_f32_ansi(cblock, output[1], AMY_BLOCK_SIZE, eq_coeffs[1], eq_delay[c][1]);\n        for(int i = 0; i < AMY_BLOCK_SIZE; ++i)\n            output[0][i] = FILT_MUL_SS_EQ(output[0][i], amy_global.eq[0]) - FILT_MUL_SS_EQ(output[1][i], amy_global.eq[1]);\n        dsps_biquad_f32_ansi(cblock, output[1], AMY_BLOCK_SIZE, eq_coeffs[2], eq_delay[c][2]);\n        for(int i = 0; i < AMY_BLOCK_SIZE; ++i)\n            cblock[i] = output[0][i] + FILT_MUL_SS_EQ(output[1][i], amy_global.eq[2]);\n    }\n    AMY_PROFILE_STOP(PARAMETRIC_EQ_PROCESS)\n\n}\n\nvoid parametric_eq_process_full(SAMPLE *block) {\n    // Optimized to run all 3 filters interleaved, to avoid extra buffers/buf accesses.\n    AMY_PROFILE_START(PARAMETRIC_EQ_PROCESS)\n\n    for(int c = 0; c < AMY_NCHANS; ++c) {\n        SAMPLE *cblock = block + c * AMY_BLOCK_SIZE;\n        // Zeros then poles - Direct Form I\n        // We need 2 memories for input, and 2 for output.\n        SAMPLE x1 = eq_delay[c][0][0];\n        SAMPLE x2 = eq_delay[c][0][1];\n        SAMPLE y01 = eq_delay[c][0][2];\n        SAMPLE y02 = eq_delay[c][0][3];\n        SAMPLE y11 = eq_delay[c][1][2];\n        SAMPLE y12 = eq_delay[c][1][3];\n        SAMPLE y21 = eq_delay[c][2][2];\n        SAMPLE y22 = eq_delay[c][2][3];\n        for (int i = 0 ; i < AMY_BLOCK_SIZE ; i++) {\n            SAMPLE x0 = SHIFTL(cblock[i], FILTER_BIQUAD_SCALEUP_BITS);\n            SAMPLE w00 = FILT_MUL_SS_EQ(eq_coeffs[0][0], x0) + FILT_MUL_SS_EQ(eq_coeffs[0][1], x1) + FILT_MUL_SS(eq_coeffs[0][2], x2);\n            SAMPLE y00 = w00 - FILT_MUL_SS_EQ(eq_coeffs[0][3], y01) - FILT_MUL_SS_EQ(eq_coeffs[0][4], y02);\n            SAMPLE w10 = FILT_MUL_SS_EQ(eq_coeffs[1][0], x0) + FILT_MUL_SS_EQ(eq_coeffs[1][1], x1) + FILT_MUL_SS_EQ(eq_coeffs[1][2], x2);\n            SAMPLE y10 = w10 - FILT_MUL_SS_EQ(eq_coeffs[1][3], y11) - FILT_MUL_SS_EQ(eq_coeffs[1][4], y12);\n            SAMPLE w20 = FILT_MUL_SS_EQ(eq_coeffs[2][0], x0) + FILT_MUL_SS_EQ(eq_coeffs[2][1], x1) + FILT_MUL_SS_EQ(eq_coeffs[2][2], x2);\n            SAMPLE y20 = w20 - FILT_MUL_SS_EQ(eq_coeffs[2][3], y21) - FILT_MUL_SS_EQ(eq_coeffs[2][4], y22);\n            x2 = x1;\n            x1 = x0;\n            y02 = y01;\n            y01 = y00;\n            y12 = y11;\n            y11 = y10;\n            y22 = y21;\n            y21 = y20;\n            cblock[i] = SHIFTR(FILT_MUL_SS_EQ(y00, amy_global.eq[0]) - FILT_MUL_SS_EQ(y10, amy_global.eq[1]) + FILT_MUL_SS_EQ(y20, amy_global.eq[2]), FILTER_BIQUAD_SCALEUP_BITS);\n        }\n        eq_delay[c][0][0] = x1;\n        eq_delay[c][0][1] = x2;\n        eq_delay[c][0][2] = y01;\n        eq_delay[c][0][3] = y02;\n        eq_delay[c][1][2] = y11;\n        eq_delay[c][1][3] = y12;\n        eq_delay[c][2][2] = y21;\n        eq_delay[c][2][3] = y22;\n    }\n    AMY_PROFILE_STOP(PARAMETRIC_EQ_PROCESS)\n\n}\n\ninline static SAMPLE MAXABS2(SAMPLE a, SAMPLE b) {\n    if (a < 0) a = -a;\n    if (b < 0) b = -b;\n    if (a > b) return a;\n    return b;\n}\n\nvoid parametric_eq_process_top16block(SAMPLE *block) {\n    // Optimized to run all 3 filters interleaved, to avoid extra buffers/buf accesses.\n    AMY_PROFILE_START(PARAMETRIC_EQ_PROCESS)\n\n    for(int c = 0; c < AMY_NCHANS; ++c) {\n        SAMPLE *cblock = block + c * AMY_BLOCK_SIZE;\n        // Zeros then poles - Direct Form I\n        // We need 2 memories for input, and 2 for output.\n        SAMPLE x1 = eq_delay[c][0][0];\n        SAMPLE x2 = eq_delay[c][0][1];\n        SAMPLE y01 = eq_delay[c][0][2];\n        SAMPLE y02 = eq_delay[c][0][3];\n        SAMPLE y11 = eq_delay[c][1][2];\n        SAMPLE y12 = eq_delay[c][1][3];\n        SAMPLE y21 = eq_delay[c][2][2];\n        SAMPLE y22 = eq_delay[c][2][3];\n        int c00bits, c03bits, c04bits;\n        int c10bits, c13bits, c14bits;\n        int c20bits, c23bits, c24bits;\n        // int c21bits, c22bits, c11bits, c12bits, c01bits, c02bits;\n        // Fold the global EQ parameters into the forward-gains of each stage.\n        SAMPLE c00 = top16SMUL_a_part(top16SMUL(amy_global.eq[0], eq_coeffs[0][0]), &c00bits);\n        SAMPLE c03 = top16SMUL_a_part(eq_coeffs[0][3], &c03bits);\n        SAMPLE c04 = top16SMUL_a_part(eq_coeffs[0][4], &c04bits);\n        SAMPLE c10 = top16SMUL_a_part(top16SMUL(amy_global.eq[1], eq_coeffs[1][0]), &c10bits);\n        SAMPLE c13 = top16SMUL_a_part(eq_coeffs[1][3], &c13bits);\n        SAMPLE c14 = top16SMUL_a_part(eq_coeffs[1][4], &c14bits);\n        SAMPLE c20 = top16SMUL_a_part(top16SMUL(amy_global.eq[2], eq_coeffs[2][0]), &c20bits);\n        SAMPLE c23 = top16SMUL_a_part(eq_coeffs[2][3], &c23bits);\n        SAMPLE c24 = top16SMUL_a_part(eq_coeffs[2][4], &c24bits);\n        for (int i = 0 ; i < AMY_BLOCK_SIZE ; i++) {\n            SAMPLE x0 = cblock[i];\n            SAMPLE x1times2 = SHIFTL(x1, 1);\n            int xbits = nheadroom16(MAXABS2(x0, MAXABS2(x1times2, x2)));\n            // Optimize the FIR multiplies for the known structure of the zeros in LPF/BPF/HPF.\n            SAMPLE w00 = top16SMUL_after_a(c00, x0 + x1times2 + x2, c00bits, xbits);\n            int y0bits = nheadroom16(MAXABS2(y01, y02));\n            SAMPLE y00 = w00 - top16SMUL_after_a(c03, y01, c03bits, y0bits) - top16SMUL_after_a(c04, y02, c04bits, y0bits);\n            SAMPLE w10 = top16SMUL_after_a(c10, x0 - x2, c10bits, xbits);\n            int y1bits = nheadroom16(MAXABS2(y11, y12));\n            SAMPLE y10 = w10 - top16SMUL_after_a(c13, y11, c13bits, y1bits) - top16SMUL_after_a(c14, y12, c14bits, y1bits);\n            SAMPLE w20 = top16SMUL_after_a(c20, x0 - x1times2 + x2, c20bits, xbits);\n            int y2bits = nheadroom16(MAXABS2(y21, y22));\n            SAMPLE y20 = w20 - top16SMUL_after_a(c23, y21, c23bits, y2bits) - top16SMUL_after_a(c24, y22, c24bits, y2bits);\n            x2 = x1;\n            x1 = x0;\n            y02 = y01;\n            y01 = y00;\n            y12 = y11;\n            y11 = y10;\n            y22 = y21;\n            y21 = y20;\n            cblock[i] = y00 - y10 + y20;\n        }\n        eq_delay[c][0][0] = x1;\n        eq_delay[c][0][1] = x2;\n        eq_delay[c][0][2] = y01;\n        eq_delay[c][0][3] = y02;\n        eq_delay[c][1][2] = y11;\n        eq_delay[c][1][3] = y12;\n        eq_delay[c][2][2] = y21;\n        eq_delay[c][2][3] = y22;\n    }\n    AMY_PROFILE_STOP(PARAMETRIC_EQ_PROCESS)\n}\n\nvoid hpf_buf(SAMPLE *buf, SAMPLE *state) {\n    AMY_PROFILE_START(HPF_BUF)\n\n    // Implement a dc-blocking HPF with a pole at (decay + 0j) and a zero at (1 + 0j).\n    SAMPLE pole = F2S(0.99);\n    SAMPLE xn1 = state[0];\n    SAMPLE yn1 = state[1];\n    for (uint16_t i = 0; i < AMY_BLOCK_SIZE; ++i) {\n        SAMPLE w = buf[i] - xn1;\n        xn1 = buf[i];\n        buf[i] = w + FILT_MUL_SS(pole, yn1);\n        yn1 = buf[i];\n    }\n    state[0] = xn1;\n    state[1] = yn1;\n    AMY_PROFILE_STOP(HPF_BUF)\n\n}\n\nvoid check_overflow(SAMPLE* block, int osc, char *msg) {\n    // Search for overflow in a sample buffer as an unusually large sample-to-sample delta.\n#ifdef AMY_DEBUG\n    SAMPLE last = block[0];\n    SAMPLE max = 0;\n    SAMPLE maxdiff = 0;\n    int len = AMY_BLOCK_SIZE;\n    while (len--) {\n        SAMPLE val = *block++;\n        SAMPLE diff = val - last;\n        if (diff < 0)  diff = -diff;\n        if (diff > maxdiff) maxdiff = diff;\n        last = val;\n        if (val < 0)  val = -val;\n        if (val > max)  max = val;\n    }\n    if (maxdiff > F2S(0.2f))\n        fprintf(stderr, \"Overflow at timeframe %.3f max=%.3f maxdiff=%.3f osc=%d msg=%s\\n\",\n                (float)(amy_global.total_blocks*AMY_BLOCK_SIZE) / AMY_SAMPLE_RATE,\n                S2F(max), S2F(maxdiff), osc, msg);\n\n#endif // AMY_DEBUG\n}\n\nSAMPLE block_norm(SAMPLE* block, int len, int bits) {\n    AMY_PROFILE_START(BLOCK_NORM)\n\n    SAMPLE max_val = 0;\n    if (bits >= 0) {\n        // do this even if bits == 0 to ensure max_val is set.\n        while(len--) {\n            *block = SHIFTL(*block, bits);\n            if (*block > 0) {\n                if (*block > max_val)\n                    max_val = *block;\n            } else {\n                if (-*block > max_val)\n                    max_val = -*block;\n            }\n            ++block;\n        }\n    } else {\n        // bits is negative - right-shift.\n        bits = -bits;\n        while(len--) {\n            *block = SHIFTR(*block, bits);\n            if (*block > 0) {\n                if (*block > max_val)\n                    max_val = *block;\n            } else {\n                if (-*block > max_val)\n                    max_val = -*block;\n            }\n            ++block;\n        }\n    }\n    AMY_PROFILE_STOP(BLOCK_NORM)\n    return max_val;\n}\n\nSAMPLE block_denorm(SAMPLE* block, int len, int bits) {\n    return block_norm(block, len, -bits);\n}\n\nSAMPLE filter_process(SAMPLE * block, uint16_t osc, SAMPLE max_val) {\n\n    SAMPLE coeffs[5];\n\n    SAMPLE filtmax = scan_max(synth[osc]->filter_delay, 2 * FILT_NUM_DELAYS);\n    if (max_val == 0 && filtmax == 0) return 0;\n\n    AMY_PROFILE_START(FILTER_PROCESS)\n\n    AMY_PROFILE_START(FILTER_PROCESS_STAGE0)\n\n    float ratio = freq_of_logfreq(msynth[osc]->filter_logfreq)/(float)AMY_SAMPLE_RATE;\n    if(ratio < LOWEST_RATIO) ratio = LOWEST_RATIO;\n    if(synth[osc]->filter_type==FILTER_LPF || synth[osc]->filter_type==FILTER_LPF24)\n        dsps_biquad_gen_lpf_f32(coeffs, ratio, msynth[osc]->resonance);\n    else if(synth[osc]->filter_type==FILTER_BPF)\n        dsps_biquad_gen_bpf_f32(coeffs, ratio, msynth[osc]->resonance);\n    else if(synth[osc]->filter_type==FILTER_HPF)\n        dsps_biquad_gen_hpf_f32(coeffs, ratio, msynth[osc]->resonance);\n    else {\n        fprintf(stderr, \"Unrecognized filter type %d\\n\", synth[osc]->filter_type);\n        return 0;\n    }\n    AMY_PROFILE_STOP(FILTER_PROCESS_STAGE0)\n\n#ifdef NOTDEF\n    printf(\"FlPr t=%.3f f=%.3f q=%.3f %.3f %.3f %.3f %.3f %.3f ST %.6f %.6f %.6f %.6f %.6f %.6f %.6f %.6f B %.6f %.6f %.6f %.6f\\n\",\n           amy_global.total_blocks*AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE,\n           ratio * AMY_SAMPLE_RATE, msynth[osc]->resonance, \n           S2F(coeffs[0]), S2F(coeffs[1]), S2F(coeffs[2]), S2F(coeffs[3]), S2F(coeffs[4]),\n           S2F(synth[osc]->filter_delay[0]), \n           S2F(synth[osc]->filter_delay[1]), \n           S2F(synth[osc]->filter_delay[2]), \n           S2F(synth[osc]->filter_delay[3]),\n           S2F(synth[osc]->filter_delay[4]), \n           S2F(synth[osc]->filter_delay[5]), \n           S2F(synth[osc]->filter_delay[6]),\n           S2F(synth[osc]->filter_delay[7]),\n           S2F(block[0]), S2F(block[1]), S2F(block[2]), S2F(block[3])\n           );\n#endif\n\n    AMY_PROFILE_START(FILTER_PROCESS_STAGE1)\n    //SAMPLE max_val = scan_max(block, AMY_BLOCK_SIZE);\n    // Also have to consider the filter state.\n#define USE_BLOCK_FLOATING_POINT\n#ifdef USE_BLOCK_FLOATING_POINT\n    int filtnormbits = synth[osc]->last_filt_norm_bits + headroom(filtmax);\n#define HEADROOM_BITS 6\n#define STATE_HEADROOM_BITS 2\n    int normbits = MIN(MAX(0, headroom(max_val) - HEADROOM_BITS), MAX(0, filtnormbits - STATE_HEADROOM_BITS));\n    normbits = MIN(normbits, synth[osc]->last_filt_norm_bits + 1);  // Increase at most one bit per block.\n    normbits = MIN(8, normbits);  // Without this, I get a weird sign flip at the end of TestLFO - intermediate overflow?\n#else  // No block floating point\n    const int normbits = 0;  // defeat BFP\n#endif\n    //printf(\"time %f max_val %f filtmax %f lastfiltnormbits %d filtnormbits %d normbits %d\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE, S2F(max_val), S2F(filtmax), synth[osc]->last_filt_norm_bits, filtnormbits, normbits);\n    if(synth[osc]->filter_type==FILTER_LPF24) {\n        // 24 dB/oct by running the same filter twice.\n        max_val = dsps_biquad_f32_ansi_split_fb_twice(block, block, AMY_BLOCK_SIZE, coeffs, synth[osc]->filter_delay, max_val);\n    //} else if(synth[osc]->filter_type==FILTER_LPF) {\n        // Optimized block-floating point 12 dB/oct LPF\n        //max_val = dsps_biquad_f32_ansi_split_fb_once(block, block, AMY_BLOCK_SIZE, coeffs, synth[osc]->filter_delay, max_val);\n    } else {\n        block_norm(synth[osc]->filter_delay, 2 * FILT_NUM_DELAYS, normbits - synth[osc]->last_filt_norm_bits);\n        block_norm(block, AMY_BLOCK_SIZE, normbits);\n        dsps_biquad_f32_ansi_split_fb(block, block, AMY_BLOCK_SIZE, coeffs, synth[osc]->filter_delay);\n        max_val = block_denorm(block, AMY_BLOCK_SIZE, normbits);\n        synth[osc]->last_filt_norm_bits = normbits;\n    }\n    //dsps_biquad_f32_ansi_commuted(block, block, AMY_BLOCK_SIZE, coeffs, synth[osc]->filter_delay);\n    //block_denorm(synth[osc]->filter_delay, 2 * FILT_NUM_DELAYS, normbits);\n    // Final high-pass to remove residual DC offset from sub-fundamental LPF.  (Not needed now source waveforms are zero-mean).\n    AMY_PROFILE_STOP(FILTER_PROCESS_STAGE1)\n    AMY_PROFILE_STOP(FILTER_PROCESS)\n#ifdef NOTDEF\n    printf(\"FlP2 t=%.3f f=%.3f q=%.3f %.3f %.3f %.3f %.3f %.3f ST %.6f %.6f %.6f %.6f %.6f %.6f %.6f %.6f B %.6f %.6f %.6f %.6f\\n\",\n           amy_global.total_blocks*AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE,\n           ratio * AMY_SAMPLE_RATE, msynth[osc]->resonance, \n           S2F(coeffs[0]), S2F(coeffs[1]), S2F(coeffs[2]), S2F(coeffs[3]), S2F(coeffs[4]),\n           S2F(synth[osc]->filter_delay[0]), \n           S2F(synth[osc]->filter_delay[1]), \n           S2F(synth[osc]->filter_delay[2]), \n           S2F(synth[osc]->filter_delay[3]),\n           S2F(synth[osc]->filter_delay[4]), \n           S2F(synth[osc]->filter_delay[5]), \n           S2F(synth[osc]->filter_delay[6]),\n           S2F(synth[osc]->filter_delay[7]),\n           S2F(block[0]), S2F(block[1]), S2F(block[2]), S2F(block[3])\n           );\n#endif\n    return max_val;\n}\n\n\nvoid reset_filter(uint16_t osc) {\n    // Reset all the filter state to zero.\n    // The LPF has typically accumulated a large DC offset, so you have to reset both\n    // the LPF *and* the dc-blocking HPF at the same time.\n    for(int i = 0; i < 2 * FILT_NUM_DELAYS; ++i) synth[osc]->filter_delay[i] = 0;\n    synth[osc]->last_filt_norm_bits = 0;\n}\n\n\nvoid reset_parametric(void) {\n    for (int c = 0; c < AMY_NCHANS; ++c) {\n        for (int b = 0; b < 3; ++b) {\n            for (int d = 0; d < FILT_NUM_DELAYS; ++d) {\n                eq_delay[c][b][d] = 0;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/i2s.c",
    "content": "// i2s.c\n// handle i2s audio in & out on many platforms\n// esp32 --> esp32, esp32-s3, esp32-p4 \n// AMYBOARD, which is a esp32s3 but with special i2s setup\n// rp2350, rp2040\n// teensy 3.6, 4.0, 4.1\n\n// Only run this code on MCUs\n#if defined(ESP_PLATFORM) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO) || defined(ARDUINO_ARCH_RP2350)\n\n#include \"amy.h\"\n\n\n#ifdef ESP_PLATFORM\n#include <esp_task.h>\n\n///////////////////////////////////////////////////////////////\n// ESP32, S3, P4 (maybe others)\n\n// A note on RTOS synchronization:\n// For maximumum flexibility, AMY offers two flags:\n//  - config.platform.multicore - whether to use a second core, if avaliable.\n//  - config.platform.multithread - whether to use RTOS multithreading, if avaliable.\n// (ESP32 is the only platform where we've tried RTOS, so it's the only context where multithread matters).\n// When using RTOS threads (tasks), synchronization is handled by xTaskNotifyGive(task_handle) / ulTaskNotifyTake():\n// A service task waits to be notified by calling ulTaskNotifyTake(); that call does not specify where that\n// notification comes from.  Another task calls xTaskNotifyGive() naming the particular task to be notified,\n// which then releases the ulTaskNotifyTake() in that task.\n// We use this mechanism as follows:\n//   * esp_render_task (the task that runs on the second core):\n//      - Waits for notification (from main fill_audio thread)\n//      - renders half the oscs\n//      - notifies either fill_buffer (multithread) or amy_update (single thread) when done.\n//      - loop\n//   * esp_fill_audio_buffer_task (launched as one parallel task):\n//      - if not using I2S, waits for notification (from amy_update task)\n//      - read I2S input (if used)\n//      - execute AMY command updates (deltas)\n//      - Notify esp_render_task\n//      - render the other half of oscs\n//      - Wait for notification (indicating that esp_render_task is done)\n//      - call amy_fill_buffer (to combine the rendered oscs into output samples)\n//      - Notify amy_update_handle that the new block is ready\n//      - If I2S enabled, write samples to I2S.\n//      - loop\n//   * ESP's amy_platform_init\n//      - if multicore, launch esp_render_task\n//      - if multithread, launch esp_fill_audio_buffer_task\n//      - if not I2S, Notify fill_buffer to get it started\n//   * ESP's amy_render_audio\n//      - If multithread, wait for Notification (from fill_audio_buffer)\n//      - If not I2S, Notify fill_buffer\n//      - If not multithread\n//        - If multicore, Notify amy_render_handle to get task on second core to render\n//          - wait for Notification indicating esp_render_task is done\n//        - else render all oscs\n//        - call amy_fill_buffer\n\n#include \"driver/i2s_std.h\"\n#ifdef AMYBOARD_ARDUINO\n#include \"driver/i2c.h\"\n#endif\ni2s_chan_handle_t tx_handle;\ni2s_chan_handle_t rx_handle;\n\n\n#if !defined(AMYBOARD) && !defined(AMYBOARD_ARDUINO)\n// default ESP setup i2s\namy_err_t esp32_setup_i2s(void) {\n    i2s_chan_config_t chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_AUTO, I2S_ROLE_MASTER);\n    if(AMY_HAS_AUDIO_IN) {\n        i2s_new_channel(&chan_cfg, &tx_handle, &rx_handle);\n    } else {\n        i2s_new_channel(&chan_cfg, &tx_handle, NULL);        \n    }\n// PCM5101 DAC works at either 32 bit or (default) 16 bit\n// PCM1808 ADC needs I2S_32BIT to work\n#define I2S_32BIT\n#ifdef I2S_32BIT\n    i2s_std_config_t std_cfg = {\n        .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(AMY_SAMPLE_RATE),\n        .slot_cfg = I2S_STD_MSB_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_32BIT, I2S_SLOT_MODE_STEREO),\n        .gpio_cfg = {\n            .mclk = (amy_global.config.i2s_mclk == -1)? I2S_GPIO_UNUSED : amy_global.config.i2s_mclk,\n            .bclk = amy_global.config.i2s_bclk,\n            .ws = amy_global.config.i2s_lrc,\n            .dout = amy_global.config.i2s_dout,\n            .din = amy_global.config.i2s_din,\n            .invert_flags = {\n                .mclk_inv = false,\n                .bclk_inv = false,\n                .ws_inv = false,\n            },\n        },\n    };\n#else // 16 bit I2S\n    i2s_std_config_t std_cfg = {\n        .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(AMY_SAMPLE_RATE),\n        .slot_cfg = I2S_STD_MSB_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO),\n        .gpio_cfg = {\n            .mclk = (amy_global.config.i2s_mclk == -1)? I2S_GPIO_UNUSED : amy_global.config.i2s_mclk,\n            .bclk = amy_global.config.i2s_bclk,\n            .ws = amy_global.config.i2s_lrc,\n            .dout = amy_global.config.i2s_dout,\n            .din = amy_global.config.i2s_din,\n            .invert_flags = {\n                .mclk_inv = false,\n                .bclk_inv = false,\n                .ws_inv = false,\n            },\n        },\n    };\n#endif\n    /* Initialize the channel */\n    i2s_channel_init_std_mode(tx_handle, &std_cfg);\n    if(AMY_HAS_AUDIO_IN) i2s_channel_init_std_mode(rx_handle, &std_cfg);\n\n    /* Before writing data, start the TX channel first */\n    i2s_channel_enable(tx_handle);\n    if(AMY_HAS_AUDIO_IN) i2s_channel_enable(rx_handle);\n    return AMY_OK;\n}\n\n#else\n// AMYBOARD or AMYBOARD_ARDUINO i2s setup, which uses two audio codecs, for audio in and SPDIF\namy_err_t esp32_setup_i2s(void) {\n    i2s_chan_config_t chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_AUTO, I2S_ROLE_SLAVE);  // ************* I2S_ROLE_SLAVE - needs external I2S clock input.\n    i2s_new_channel(&chan_cfg, &tx_handle, &rx_handle);\n\n#define I2S_32BIT\n    i2s_std_config_t std_cfg = {\n        .clk_cfg = {\n            .sample_rate_hz = AMY_SAMPLE_RATE,\n            .clk_src = I2S_CLK_SRC_EXTERNAL,\n            .ext_clk_freq_hz = AMY_SAMPLE_RATE * 512,\n            .mclk_multiple = 512, \n        },\n        .slot_cfg = {\n            .data_bit_width = I2S_DATA_BIT_WIDTH_32BIT,\n            .slot_bit_width = I2S_SLOT_BIT_WIDTH_32BIT,\n            .slot_mode = I2S_SLOT_MODE_STEREO,\n            .slot_mask = I2S_STD_SLOT_BOTH,\n            .ws_width = 32,\n            .ws_pol = false, // false in STD_PHILIPS macro\n            .bit_shift = false, // true for STD_PHILIPS macro, but that results in *2* bits delay of dout vs lrclk in Follower mode. false gives 1 bit delay, as expected for i2s.\n            .left_align = false,\n            .big_endian = false,\n            .bit_order_lsb = false,\n        },\n        .gpio_cfg = {\n            .mclk = amy_global.config.i2s_mclk, \n            .bclk = amy_global.config.i2s_bclk,\n            .ws = amy_global.config.i2s_lrc,\n            .dout = amy_global.config.i2s_dout,\n            .din = amy_global.config.i2s_din,\n            .invert_flags = {\n                .mclk_inv = false,\n                .bclk_inv = true, // invert bclk for pcm9211 \n                .ws_inv = false,\n            },\n        },\n    };\n    /* Initialize the channel */\n    i2s_channel_init_std_mode(tx_handle, &std_cfg);\n    i2s_channel_init_std_mode(rx_handle, &std_cfg);\n\n    /* Before writing data, start the TX channel first */\n    i2s_channel_enable(tx_handle);\n    i2s_channel_enable(rx_handle);\n\n#ifdef AMYBOARD_ARDUINO\n    // Initialize PCM9211 SPDIF transceiver via I2C.\n    // On the MicroPython AMYBOARD path this is done in Python (amyboard.py).\n    {\n        #define PCM9211_I2C_ADDR   0x40\n        #define PCM9211_I2C_SDA    17\n        #define PCM9211_I2C_SCL    18\n        #define PCM9211_I2C_FREQ   400000\n\n        i2c_config_t i2c_conf = {\n            .mode = I2C_MODE_MASTER,\n            .sda_io_num = PCM9211_I2C_SDA,\n            .scl_io_num = PCM9211_I2C_SCL,\n            .sda_pullup_en = GPIO_PULLUP_ENABLE,\n            .scl_pullup_en = GPIO_PULLUP_ENABLE,\n            .master.clk_speed = PCM9211_I2C_FREQ,\n        };\n        i2c_param_config(I2C_NUM_0, &i2c_conf);\n        i2c_driver_install(I2C_NUM_0, I2C_MODE_MASTER, 0, 0, 0);\n\n        static const uint8_t pcm9211_regs[][2] = {\n            { 0x40, 0x33 },  // Power down ADC, DIR, DIT, OSC\n            { 0x40, 0xC0 },  // Normal operation for all\n            { 0x34, 0x00 },  // Initialize DIR - biphase amps on, input from RXIN0\n            { 0x26, 0x01 },  // Main Out is DIR/ADC if no DIR sync\n            { 0x6B, 0x00 },  // Main output pins are DIR/ADC AUTO\n            { 0x30, 0x04 },  // PLL sends 512fs as SCK\n            { 0x31, 0x0A },  // XTI SCK as 512fs too\n            { 0x60, 0x44 },  // DIT sends SPDIF from AUXIN1 through MPO0\n            { 0x61, 0x20 },  // DIT SCK ratio = 512fs (must match PLL config in 0x30/0x31)\n            { 0x78, 0x3D },  // MPO0 = TXOUT, MPO1 = VOUT\n            { 0x6F, 0x40 },  // MPIO_A = CLKST / MPIO_B = AUXIN2 / MPIO_C = AUXIN1\n        };\n\n        for (int i = 0; i < sizeof(pcm9211_regs) / sizeof(pcm9211_regs[0]); i++) {\n            uint8_t buf[2] = { pcm9211_regs[i][0], pcm9211_regs[i][1] };\n            esp_err_t ret = i2c_master_write_to_device(\n                I2C_NUM_0, PCM9211_I2C_ADDR, buf, 2, pdMS_TO_TICKS(100));\n            if (ret != ESP_OK) {\n                fprintf(stderr, \"PCM9211: reg 0x%02x write 0x%02x failed: %s\\n\",\n                    buf[0], buf[1], esp_err_to_name(ret));\n            }\n        }\n\n        // Tear down the I2C driver so Arduino Wire can use bus 0 later\n        i2c_driver_delete(I2C_NUM_0);\n    }\n#endif // AMYBOARD_ARDUINO\n\n    return AMY_OK;\n}\n\n#endif\n\namy_err_t esp32_teardown_i2s(void) {\n    i2s_channel_disable(tx_handle);\n    if(AMY_HAS_AUDIO_IN) i2s_channel_disable(rx_handle);\n    i2s_del_channel(tx_handle);\n    if(AMY_HAS_AUDIO_IN) i2s_del_channel(rx_handle);\n    return AMY_OK;\n}\n\n\n/////////////////////////////////////\n// ESP mulithread/multicore rendering\n\nTaskHandle_t amy_render_handle;\nTaskHandle_t amy_fill_buffer_handle;\n\n// Task to notify when amy_update is waiting for a completed buffer\nTaskHandle_t amy_update_handle = NULL;\n\n// Who esp_render_task tells that it is done.\nTaskHandle_t amy_render_task_done_handle = NULL;\n\n// Render the second core\nvoid esp_render_task( void * pvParameters) {\n    while(1) {\n        ulTaskNotifyTake(pdTRUE, portMAX_DELAY);  // from esp_render_on_cores\n        amy_render(0, AMY_OSCS/2, 1);\n        // Tell (someone) we're done.\n        xTaskNotifyGive(amy_render_task_done_handle);  // to esp_render_on_cores\n    }\n}\n\nvoid esp_render_on_cores() {\n    // Call amy_render on all the oscs, using multicore if available.\n    if (amy_global.config.platform.multicore) {\n        // Tell the esp_render_task to inform *us* when it's done.\n        amy_render_task_done_handle = xTaskGetCurrentTaskHandle();\n        // Tell the other core to start rendering.\n        xTaskNotifyGive(amy_render_handle);  // to esp_render_task\n        // Render me\n        amy_render(AMY_OSCS/2, AMY_OSCS, 0);\n        // Wait for the other core to finish\n        ulTaskNotifyTake(pdTRUE, portMAX_DELAY);  // from esp_render_task\n    } else {\n        // We render everything on this core.\n        amy_render(0, AMY_OSCS, 0);\n    }\n}\n\n#ifdef I2S_32BIT\n  static int32_t block32[AMY_BLOCK_SIZE * AMY_NCHANS];\n  #define I2S_BYTES_PER_SAMPLE 4\n#else\n  #define I2S_BYTES_PER_SAMPLE AMY_BYTES_PER_SAMPLE\n#endif\nextern output_sample_type * amy_in_block;\n\n// Place where render thread leaves address of samples.\n// Set by esp_fill_audio_buffer_task, cleared when returned by amy_render_audio (if used).\nint16_t *volatile last_audio_buffer = NULL;\n// (see also amy_get_output_buffer, I should choose only one of these)\n\nvoid esp_read_i2s_input() {\n    // Read a block of i2s input.  Separated to isolate noise from different i2s formats.\n    size_t read = 0;\n#ifdef I2S_32BIT\n    i2s_channel_read(rx_handle, block32, AMY_BLOCK_SIZE * AMY_NCHANS * sizeof(int32_t), &read, portMAX_DELAY);\n    for (int i = 0; i < AMY_BLOCK_SIZE * AMY_NCHANS; ++i)\n        amy_in_block[i] = (block32[i] >> 16);\n#else\n    i2s_channel_read(rx_handle, amy_in_block, AMY_BLOCK_SIZE * AMY_NCHANS * sizeof(output_sample_type), &read, portMAX_DELAY);\n#endif\n    if(read != AMY_BLOCK_SIZE * AMY_NCHANS * I2S_BYTES_PER_SAMPLE) {\n        fprintf(stderr,\"i2s input underrun: %d vs %d\\n\", read, AMY_BLOCK_SIZE * AMY_NCHANS * I2S_BYTES_PER_SAMPLE);\n    }\n}\n\n// Make AMY's FABT run forever , as a FreeRTOS task \nvoid esp_fill_audio_buffer_task() {\n    while(1) {\n        AMY_PROFILE_START(AMY_ESP_FILL_BUFFER)\n        if(AMY_HAS_I2S && AMY_HAS_AUDIO_IN) {\n            esp_read_i2s_input();\n\t}\n        // Get ready to render\n        amy_execute_deltas();\n\n        // Render on whichever cores we have available.\n        esp_render_on_cores();\n        \n        // Write to i2s\n        output_sample_type *block = amy_fill_buffer();\n\tAMY_PROFILE_STOP(AMY_ESP_FILL_BUFFER)\n\n        last_audio_buffer = block;\n        \n        // Notify amy_update() that a block is ready (so it can return from amy_render_audio).\n        if (amy_update_handle)\n            xTaskNotifyGive(amy_update_handle);  // to amy_render_audio\n\n        if (AMY_HAS_I2S) {\n            amy_i2s_write((uint8_t *)block, AMY_BLOCK_SIZE * AMY_NCHANS * sizeof(int16_t));\n        } else {\n            // Wait for update sync.\n            ulTaskNotifyTake(pdTRUE, portMAX_DELAY);  // from amy_render_audio:!AMY_HAS_I2S\n        }\n    }\n}\n\n// init AMY from the esp. wraps some amy funcs in a task to do multicore rendering on the ESP32 \nvoid amy_platform_init() {\n    // If we're running amy_update, this should be the task we need to return to.\n    // However, if we're not using amy_update (e.g., Tulip/AMYboard native), we don't\n    // want to do this - the un-handled xTaskNotifyGives cause Tulip to crash when it\n    // turns on WiFi.\n#ifdef ARDUINO\n    amy_update_handle = xTaskGetCurrentTaskHandle();\n#endif\n    if (AMY_HAS_I2S) {\n        // Start i2s\n        esp32_setup_i2s();\n    }\n    if (amy_global.config.platform.multicore) {\n        // On ESP, multicore starts a second thread even if multithread is not requested.\n        // Create the second core rendering task\n        xTaskCreatePinnedToCore(&esp_render_task, AMY_RENDER_TASK_NAME, AMY_RENDER_TASK_STACK_SIZE, NULL, AMY_RENDER_TASK_PRIORITY, &amy_render_handle, AMY_RENDER_TASK_COREID);\n    }\n    if (amy_global.config.platform.multithread) {\n        // Create the fill audio buffer thread, combines, does volume & filters\n        xTaskCreatePinnedToCore(&esp_fill_audio_buffer_task, AMY_FILL_BUFFER_TASK_NAME, AMY_FILL_BUFFER_TASK_STACK_SIZE, NULL, AMY_FILL_BUFFER_TASK_PRIORITY, &amy_fill_buffer_handle, AMY_FILL_BUFFER_TASK_COREID);\n        // Let amy_update know we have I2S covered.\n        if (AMY_HAS_I2S) {\n            amy_global.i2s_is_in_background = 1;\n        }\n    }\n}\n\nvoid amy_platform_deinit() {\n    if (AMY_HAS_I2S) {\n        esp32_teardown_i2s();\n    }\n    if (amy_global.config.platform.multicore) {\n        vTaskDelete(amy_render_handle);\n    }\n    if (amy_global.config.platform.multithread) {\n        vTaskDelete(amy_fill_buffer_handle);\n    }\n}\n\nextern void esp_poll_midi(void);\n\nvoid amy_update_tasks() {\n    if (!amy_global.config.platform.multithread) {\n        amy_execute_deltas();\n        esp_poll_midi();\n    } else{\n        // Rendering is happening on separate thread, nothing to do.\n    }\n}\n\nint16_t *amy_render_audio() {\n    // Called by api.amy_update() to render the audio.  Not used for non-Arduino.\n    int16_t *buf = NULL;\n    if (amy_global.config.platform.multithread) {\n        // Wait for esp_fill_audio_buffer_task to indicate a buffer is ready.\n        ulTaskNotifyTake(pdTRUE, portMAX_DELAY);  // from esp_fill_audio_buffer_task\n        buf = last_audio_buffer;\n        // Allow the FABT to generate another block\n        if (!AMY_HAS_I2S) {\n            xTaskNotifyGive(amy_fill_buffer_handle);  // to esp_fill_audio_buffer_task:!AMY_HAS_I2S\n        }\n    } else {\n        // No multithread, we have to render here.\n        esp_render_on_cores();\n        buf = amy_fill_buffer();\n    }\n    return buf;\n}\n\nsize_t amy_i2s_write(const uint8_t *buffer, size_t nbytes) {\n    size_t written = 0;\n    int16_t *block = (int16_t *)buffer;\n    \n#ifdef I2S_32BIT // including AMYBOARD\n    // Convert to 32 bits\n    for (int i = 0; i < AMY_BLOCK_SIZE * AMY_NCHANS; ++i)\n        block32[i] = ((int32_t)block[i]) << 16;\n    i2s_channel_write(tx_handle, block32, AMY_BLOCK_SIZE * AMY_NCHANS * I2S_BYTES_PER_SAMPLE, &written, portMAX_DELAY);\n#else  // 16 bit I2S\n    i2s_channel_write(tx_handle, block, AMY_BLOCK_SIZE * AMY_NCHANS * I2S_BYTES_PER_SAMPLE, &written, portMAX_DELAY);\n#endif\n\n    if(written != AMY_BLOCK_SIZE * AMY_NCHANS * I2S_BYTES_PER_SAMPLE) {\n        fprintf(stderr,\"i2s output underrun: %d vs %d\\n\", written, AMY_BLOCK_SIZE * AMY_NCHANS * I2S_BYTES_PER_SAMPLE);\n    }\n    return 1;\n}\n\n#elif (defined ARDUINO_ARCH_RP2040) || (defined ARDUINO_ARCH_RP2350)\n\n#include \"hardware/clocks.h\"\n#include \"hardware/structs/clocks.h\"\n#include \"pico/multicore.h\"\n#include \"pico/stdlib.h\"\n#include \"pico-audio/audio_i2s.h\"\n#include \"pico/binary_info.h\"\n#include \"pico/util/queue.h\"\n\n// Provided by pico_support.cpp\nextern void pico_setup_i2s(amy_config_t *config);\nextern void pico_teardown_i2s(amy_config_t *config);\nextern void pico_i2s_read_write_buffer(int16_t *in_samples, const int16_t *out_samples, int nframes);\n\nstruct audio_buffer_pool *ap;\n\nstatic inline uint32_t _millis(void)\n{\n    return to_ms_since_boot(get_absolute_time());\n}\n\ntypedef struct\n{\n    int32_t (*func)(int32_t);\n    int32_t data;\n} queue_entry_t;\n\nqueue_t call_queue;\nqueue_t results_queue;\n\nvolatile bool core1_running = true;\n// This is the ram allocated for the core1 stack.\n// It's also the flag that core1 task is running, if non-NULL.\nuint32_t * my_core1_separate_stack_address = NULL;\n\nextern void on_pico_uart_rx();\n\nvoid amy_update_tasks() {\n    amy_execute_deltas();\n    if(amy_global.config.midi & AMY_MIDI_IS_UART) on_pico_uart_rx();\n#ifdef TUD_USB_GADGET\n    if(amy_global.config.midi & AMY_MIDI_IS_USB_GADGET) on_pico_uart_rx();\n#endif\n}\n\n#define USE_SECOND_CORE\n\nint32_t render_other_core(int32_t data) {\n    amy_render(AMY_OSCS/2, AMY_OSCS, 1);\n    return AMY_OK;\n}\n\nint16_t *amy_render_audio() {\n#ifdef USE_SECOND_CORE\n    if (amy_global.config.platform.multicore) {\n        int32_t res;\n        queue_entry_t entry = {render_other_core, AMY_OK};\n        queue_add_blocking(&call_queue, &entry);\n        amy_render(0, AMY_OSCS/2, 0);\n        queue_remove_blocking(&results_queue, &res);\n    } else\n#endif\n        amy_render(0, AMY_OSCS, 0);\n    int16_t *block = amy_fill_buffer();\n    return block;\n}\n\nsize_t amy_i2s_write(const uint8_t *buffer, size_t nbytes) {\n    // Single function to update buffers.\n    // len is the number of int16 sample frames.\n    pico_i2s_read_write_buffer(amy_in_block, (const int16_t *)buffer, AMY_BLOCK_SIZE);\n    return nbytes;\n}\n\n\nstruct audio_buffer_pool *init_audio() {\n    static audio_format_t audio_format = {\n            .format = AUDIO_BUFFER_FORMAT_PCM_S16,\n            .sample_freq = AMY_SAMPLE_RATE,\n            .channel_count = AMY_NCHANS,\n    };\n\n    static struct audio_buffer_format producer_format = {\n            .format = &audio_format,\n            .sample_stride = sizeof(int16_t) * AMY_NCHANS,\n    };\n\n    struct audio_buffer_pool *producer_pool = audio_new_producer_pool(&producer_format, 3, AMY_BLOCK_SIZE);\n\n    bool __unused ok;\n    const struct audio_format *output_format;\n    struct audio_i2s_config config = {\n            .data_pin = amy_global.config.i2s_dout,\n            .clock_pin_base = amy_global.config.i2s_bclk,\n            .dma_channel = 0,\n            .pio_sm = 0,\n    };\n\n    output_format = audio_i2s_setup(&audio_format, &config);\n    if (!output_format) {\n        panic(\"PicoAudio: Unable to open audio device.\\n\");\n    }\n\n    ok = audio_i2s_connect(producer_pool);\n    assert(ok);\n    audio_i2s_set_enabled(true);\n\n    return producer_pool;\n}\n\nvoid core1_main() {\n    while (core1_running) {\n        queue_entry_t entry;\n        queue_remove_blocking(&call_queue, &entry);\n        int32_t result = entry.func(entry.data);\n        queue_add_blocking(&results_queue, &result);\n    }\n}\n\nvoid amy_platform_init() {\n    if (AMY_HAS_I2S) {\n        pico_setup_i2s(&amy_global.config);\n    }\n#ifdef USE_SECOND_CORE\n    if (amy_global.config.platform.multicore) {\n        if (my_core1_separate_stack_address == NULL) {  // Task is not already running.\n            my_core1_separate_stack_address = (uint32_t*)malloc(0x2000);\n            queue_init(&call_queue, sizeof(queue_entry_t), 2);\n            queue_init(&results_queue, sizeof(int32_t), 2);\n            core1_running = true;\n            multicore_launch_core1_with_stack(core1_main, my_core1_separate_stack_address, 0x2000);\n            sleep_ms(500);\n        }\n    }\n#endif\n}\n\nvoid amy_platform_deinit() {\n#ifdef USE_SECOND_CORE\n    if (amy_global.config.platform.multicore) {\n        if (my_core1_separate_stack_address) {  // Task is actually running.\n            core1_running = false;  // signal the core1 task to exit.\n            sleep_ms(100);  // time for it to exit\n            queue_free(&results_queue);\n            queue_free(&call_queue);\n            free(my_core1_separate_stack_address);\n            my_core1_separate_stack_address = NULL;\n        }\n    }\n#endif\n    pico_teardown_i2s(&amy_global.config);\n}\n\n\n#elif defined __IMXRT1062__\n\n\nextern void teensy_setup_i2s();\nextern void teensy_teardown_i2s();\nextern size_t teensy_i2s_write(const uint8_t *buffer, size_t nbytes);\n\nextern int16_t teensy_get_serial_byte();\n\nvoid amy_platform_init() {\n    if (AMY_HAS_I2S) {\n        teensy_setup_i2s();\n    }\n}\n\nvoid amy_platform_deinit() {\n    if (AMY_HAS_I2S) {\n        teensy_teardown_i2s();\n    }\n}\n\nvoid amy_update_tasks() {\n    if(amy_global.config.midi & AMY_MIDI_IS_UART) {\n        // do midi in here\n        uint8_t bytes[1];\n        int t;\n        while((t = teensy_get_serial_byte()) >= 0) {\n            bytes[0] = t;\n            convert_midi_bytes_to_messages(bytes,1,0);\n        }\n    }\n    amy_execute_deltas();\n}\n\nint16_t *amy_render_audio() {\n    amy_render(0, AMY_OSCS, 0);\n    int16_t *block = amy_fill_buffer();\n    return block;\n}\n\nsize_t amy_i2s_write(const uint8_t *buffer, size_t nbytes) {\n    return teensy_i2s_write(buffer, nbytes);\n}\n\n#else\n\n//...\n\n#endif\n\n\n#endif\n"
  },
  {
    "path": "src/instrument.c",
    "content": "// instrument.c\n//\n// An instrument is a set of voices with voice-allocation logic.\n// The user calls instrument_note_on(), and this logic chooses one of the\n// preallocated voices to play the note on.\n//\n// This is a replacement in C for the functionality in\n// tulip/shared/py/synth.py.\n\n#include \"amy.h\"\n#include <inttypes.h>\n\n#define INSTRUMENT_RAM_CAPS SYNTH_RAM_CAPS\n\nstruct voice_fifo {\n    const char *name;\n    uint8_t length;\n    uint8_t entries[MAX_VOICES_PER_INSTRUMENT + 1];  // fifo has one extra element to distinguish empty and full.\n    uint8_t head;\n    uint8_t tail;\n};\n\n// Fifo must provide init, put, get, remove, empty\n\nvoid voice_fifo_debug(struct voice_fifo *fifo) {\n    fprintf(stderr, \"fifo %s entries 0x%lx len %d head %d tail %d: \", fifo->name, (long)fifo->entries, fifo->length, fifo->head, fifo->tail);\n    uint8_t current = fifo->tail;\n    while(current != fifo->head) {\n        fprintf(stderr, \"%d \", fifo->entries[current]);\n        current = (current + 1) % fifo->length;\n    }\n    fprintf(stderr, \"\\n\");\n}\n\nstruct voice_fifo *voice_fifo_init(int size, const char *name) {\n    if (size <=0 || size > MAX_VOICES_PER_INSTRUMENT) {\n        fprintf(stderr, \"init_voice_fifo: size %d value error (max size is %d)\\n\", size, MAX_VOICES_PER_INSTRUMENT);\n        return NULL;\n    }\n    struct voice_fifo *result = (struct voice_fifo *)malloc_caps(sizeof(struct voice_fifo), amy_global.config.ram_caps_synth);\n    result->head = 0;\n    result->tail = 0;\n    result->length = MAX_VOICES_PER_INSTRUMENT + 1;  // One more than max size.  fixed in this implementation.\n    result->name = name;  // very dicey - only works because I'm passing statically-allocated names.\n    return result;\n}\n\nvoid voice_fifo_free(struct voice_fifo *fifo) {\n    free(fifo);\n}\n\nbool voice_fifo_empty(struct voice_fifo *fifo) {\n    return (fifo->head == fifo->tail);\n}\n\nvoid voice_fifo_put(struct voice_fifo *fifo, uint8_t val) {\n    fifo->entries[fifo->head++] = val;\n    if (fifo->head == fifo->length)  fifo->head = 0;\n    if (fifo->head == fifo->tail) {\n        fprintf(stderr, \"**fifo %s: overflow\\n\", fifo->name);\n        // Drop the entry we just overwrote.\n        fifo->tail = (fifo->tail + 1) % fifo->length;\n    }\n    //fprintf(stderr, \"I: fifo %s: put %d\\n\", fifo->name, val);\n}\n\nuint8_t voice_fifo_get(struct voice_fifo *fifo) {\n    if (voice_fifo_empty(fifo)) {\n        fprintf(stderr, \"**fifo %s: get on empty\\n\", fifo->name);\n        return 0;\n    }\n    uint8_t val = fifo->entries[fifo->tail++];\n    if (fifo->tail == fifo->length)  fifo->tail = 0;\n    //fprintf(stderr, \"I: fifo %s: get %d\\n\", fifo->name, val);\n    return val;\n}\n\nvoid voice_fifo_remove(struct voice_fifo *fifo, uint8_t val) {\n    // Remove the oldest instance of val in the fifo and close up.\n    //fprintf(stderr, \"I: fifo %s: remove %d\\n\", fifo->name, val);\n    uint8_t index;\n    for (index = fifo->tail; index != fifo->head; index = (index + 1) % fifo->length) {\n        if (fifo->entries[index] == val) {\n            // Copy entries beyond the value to remove back one position.\n            uint8_t new_head = (fifo->head + fifo->length - 1) % fifo->length;\n            while (index != new_head) {\n                uint8_t next_index = (index + 1) % fifo->length;\n                fifo->entries[index] = fifo->entries[next_index];\n                index = next_index;\n            }\n            fifo->head = new_head;\n            return;\n        }\n    }\n    fprintf(stderr, \"**fifo %s: remove did not find %d (#entries=%d)\\n\", fifo->name, val, (fifo->head - fifo->tail) % fifo->length);\n}\n\n// How many forgotten note-ons (due to repeated onsets, or note stealing) do we remember\n// (to match their note-offs)\n#define FORGOTTEN_POOL_SIZE 16\n\nstruct instrument_info {\n    struct voice_fifo *released_voices;\n    struct voice_fifo *active_voices;\n    uint8_t num_voices;\n    uint8_t oscs_per_voice; // How many oscs each voice uses.  Stored for convenience.\n    uint8_t id;             // synth number assigned by client.\n    uint16_t patch_number;  // What patch this instrument is currently set to.  Stored for convenience.\n    int16_t bank_number;    // Optional top-7-bit word of Program, set by MIDI CC 0 (-1 if not set).\n    uint32_t flags;         // Bitmask of special instrument properties (for MIDI Drums translation).\n    // AMY \"voice\" index for each of the num_voices allocated voices.\n    uint16_t amy_voices[MAX_VOICES_PER_INSTRUMENT];\n    // Track which note each voice is sounding.  We use int16 so we can store PCM_PRESET *127 + midi_note\n    uint16_t note_per_voice[MAX_VOICES_PER_INSTRUMENT];\n    // A buffer of forgotten notes, so we don't complain about their note-offs.\n    uint16_t forgotten_notes[FORGOTTEN_POOL_SIZE];  // We have a max capacity for forgotten notes.\n    uint16_t forgotten_note_count[FORGOTTEN_POOL_SIZE];  // Count mulitple onsets per forgotten note.\n    // Delay added to note-ons.  Permits some decay for voice stealing.\n    uint16_t noteon_delay_ms;\n    // Sustain tracking\n    bool in_sustain;  // Pedal is down.\n    bool pending_release[MAX_VOICES_PER_INSTRUMENT];\n    bool grab_midi_notes;  // Flag to automatically play midi notes.\n};\n\nvoid instrument_debug(struct instrument_info *instrument) {\n    fprintf(stderr, \"**instrument 0x%lx id %d num_voices %d patch %d oscs %d bank %d flags %\" PRIu32 \" noteon_delay_ms %d in_sustain %d grab_midi %d\\n\",\n            (unsigned long)instrument, instrument->id, instrument->num_voices, instrument->patch_number, instrument->oscs_per_voice, instrument->bank_number, instrument->flags,\n            instrument->noteon_delay_ms, instrument->in_sustain, instrument->grab_midi_notes);\n    for (int i = 0; i < instrument->num_voices; ++i)\n        fprintf(stderr, \"voice %d amy_voice %d note_per_voice %d pending_release %d\\n\",\n                i, instrument->amy_voices[i], instrument->note_per_voice[i], instrument->pending_release[i]);\n    voice_fifo_debug(instrument->active_voices);\n    voice_fifo_debug(instrument->released_voices);\n}\n\n// Instrument provides note_on, note_off, all_notes_off, sustain(bool)\n\n#define _INSTRUMENT_NO_NOTE 255\n// Defined in amy.h because patches.c needs to know it.\n//#define _INSTRUMENT_NO_VOICE 255\n\nvoid _instrument_reset_forgotten_pool(struct instrument_info *instrument) {\n    for (int i = 0; i < FORGOTTEN_POOL_SIZE; ++i) {\n        instrument->forgotten_notes[i] = _INSTRUMENT_NO_NOTE;\n        instrument->forgotten_note_count[i] = 0;\n    }\n}\n\nstruct instrument_info *instrument_init(int id, int num_voices, uint16_t* amy_voices, uint16_t patch_number, uint16_t oscs_per_voice, uint32_t flags) {\n    struct instrument_info *instrument = (struct instrument_info *)malloc_caps(sizeof(struct instrument_info), amy_global.config.ram_caps_synth);\n    instrument->id = id;\n    if (num_voices <= 0 || num_voices > MAX_VOICES_PER_INSTRUMENT) {\n        fprintf(stderr, \"num_voices %d not within 1 .. MAX_VOICES_PER_INSTRUMENT %d\\n\", num_voices, MAX_VOICES_PER_INSTRUMENT);\n        abort();\n        return NULL;\n    }\n    instrument->num_voices = num_voices;\n    instrument->patch_number = patch_number;\n    instrument->oscs_per_voice = oscs_per_voice;\n    instrument->bank_number = -1;\n    instrument->flags = flags;\n    instrument->noteon_delay_ms = 0;\n    instrument->in_sustain = false;\n    instrument->grab_midi_notes = true;\n    instrument->released_voices = voice_fifo_init(num_voices, \"released\");\n    instrument->active_voices = voice_fifo_init(num_voices, \"active\");\n    for (uint8_t voice = 0; voice < num_voices; ++voice) {\n        instrument->amy_voices[voice] = amy_voices[voice];\n        voice_fifo_put(instrument->released_voices, voice);\n        instrument->note_per_voice[voice] = _INSTRUMENT_NO_NOTE;\n        instrument->pending_release[voice] = false;\n    }\n    _instrument_reset_forgotten_pool(instrument);\n    return instrument;\n}\n\nvoid instrument_free(struct instrument_info *instrument) {\n    voice_fifo_free(instrument->active_voices);\n    voice_fifo_free(instrument->released_voices);\n    free(instrument);\n}\n\nvoid _instrument_push_note_forgotten(struct instrument_info *instrument, uint16_t note) {\n    int available_index = -1;\n    for (int i = 0; i < FORGOTTEN_POOL_SIZE; ++i) {\n        if (instrument->forgotten_notes[i] == note) {\n            ++instrument->forgotten_note_count[i];\n            //fprintf(stderr, \"synth %d: caching existing forgotten note %d/%d (%d, count %d)\\n\",\n            //        instrument->id, note / 128, note & 0x7F, i, instrument->forgotten_note_count[i]);\n            return;\n        }\n        if (available_index < 0 && instrument->forgotten_notes[i] == _INSTRUMENT_NO_NOTE) {\n            available_index = i;\n        }\n    }\n    // We didn't find the note, hopefully we saw an empty slot.\n    if (available_index >= 0) {\n        instrument->forgotten_notes[available_index] = note;\n        instrument->forgotten_note_count[available_index] = 1;\n        //fprintf(stderr, \"synth %d: caching new forgotten note %d/%d (%d, count %d)\\n\",\n        //        instrument->id, note / 128, note & 0x7F, available_index, instrument->forgotten_note_count[available_index]);\n    } else {\n        fprintf(stderr, \"**_instrument_push_forgotten_note: forgotten pool overflow synth %d note %d/%d\\n\",\n                instrument->id, note / 128, note & 0x7F);\n    }\n}\n\nbool _instrument_pop_note_forgotten(struct instrument_info *instrument, uint16_t note) {\n    // Checks forgotten_notes for this note; if found, remove it and return true; else false.\n    for (int i = 0; i < FORGOTTEN_POOL_SIZE; ++i) {\n        if (instrument->forgotten_notes[i] == note) {\n            //fprintf(stderr, \"synth %d: uncaching forgotten note %d/%d (%d, count %d)\\n\",\n            //        instrument->id, note / 128, note & 0x7F, i, instrument->forgotten_note_count[i]);\n            --instrument->forgotten_note_count[i];\n            if (instrument->forgotten_note_count[i] == 0)\n                instrument->forgotten_notes[i] = _INSTRUMENT_NO_NOTE;\n            return true;\n        }\n    }\n    return false;\n}\n\nuint16_t _instrument_get_voice(struct instrument_info *instrument, bool *pstolen) {\n    if (!voice_fifo_empty(instrument->released_voices)) {\n        return voice_fifo_get(instrument->released_voices);\n    }\n    // No released voices, have to steal.\n    if (pstolen) *pstolen = true;  // *pstolen is set if steal occurs, otherwise not touched.\n    // Mark this note as one that got stolen, so we can absorb its eventual note-off.\n    uint16_t voice = voice_fifo_get(instrument->active_voices);\n    _instrument_push_note_forgotten(instrument, instrument->note_per_voice[voice]);\n    return voice;\n}\n\nuint16_t _instrument_voice_for_note(struct instrument_info *instrument, uint16_t note) {\n    // Linear search through note_per_voice to see if this note is present.\n    for (uint16_t voice = 0; voice < instrument->num_voices; ++voice)\n        if (instrument->note_per_voice[voice] == note)\n            return voice;\n    return _INSTRUMENT_NO_VOICE;\n}\n\nuint16_t _instrument_voice_off(struct instrument_info *instrument, uint16_t voice) {\n    instrument->note_per_voice[voice] = _INSTRUMENT_NO_NOTE;\n    instrument->pending_release[voice] = false;\n    voice_fifo_remove(instrument->active_voices, voice);\n    voice_fifo_put(instrument->released_voices, voice);\n    return instrument->amy_voices[voice];\n}\n\nuint16_t instrument_note_off(struct instrument_info *instrument, uint16_t note) {\n    uint16_t voice = _instrument_voice_for_note(instrument, note);\n    if (voice == _INSTRUMENT_NO_VOICE) {\n        // Don't report an unmatched note-off if it was a victim of stealing.\n        if (!_instrument_pop_note_forgotten(instrument, note))\n            fprintf(stderr, \"note off for %d/%d does not match note on\\n\", note / 128, note & 0x7F);\n        //instrument_debug(instrument);\n        return _INSTRUMENT_NO_VOICE;  // We could just fall through, but this is more explicit.\n    }\n    if (instrument->in_sustain) {\n        instrument->pending_release[voice] = true;\n        return _INSTRUMENT_NO_VOICE;\n    }\n    //fprintf(stderr, \"instr 0x%lx: patch %d voice %d note %d/%d off\\n\", (unsigned long)instrument, instrument->patch_number, instrument->amy_voices[voice], note / 128, note & 0x7F);\n    return _instrument_voice_off(instrument, voice);\n}\n\nint _instrument_all_notes_off(struct instrument_info *instrument, uint16_t *amy_voices) {\n    // Register any active voices as inactive; return those voices.\n    int num_voices_turned_off = 0;\n    for (uint16_t voice = 0; voice < instrument->num_voices; ++voice)\n        if (instrument->note_per_voice[voice] != _INSTRUMENT_NO_NOTE) {\n            //fprintf(stderr, \"voice %d note %d/%d all-off\\n\", instrument->amy_voices[voice], instrument->note_per_voice[voice] / 128, instrument->note_per_voice[voice] & 0x7F);\n            _instrument_voice_off(instrument, voice);\n            *amy_voices++ = instrument->amy_voices[voice];\n            ++num_voices_turned_off;\n        }\n    _instrument_reset_forgotten_pool(instrument);\n    return num_voices_turned_off;\n}\n\nuint16_t instrument_note_on(struct instrument_info *instrument, uint16_t note, bool *pstolen) {\n    if ((note & 0x7F) == 0) {\n        // note == 0 is for all-notes-off, it's not allowed for note-on (sorry, C-1).\n        fprintf(stderr, \"note-on for note 0: ignored.\\n\");\n        return _INSTRUMENT_NO_VOICE;\n    }\n    uint16_t voice = _instrument_voice_for_note(instrument, note);\n    if (voice == _INSTRUMENT_NO_VOICE) {\n        // Not a re-onset, need to allocate a new voice.\n        voice = _instrument_get_voice(instrument, pstolen);\n        voice_fifo_put(instrument->active_voices, voice);\n    } else {\n        // If re-onset, push the previous onset\n        _instrument_push_note_forgotten(instrument, note);\n    }\n    instrument->note_per_voice[voice] = note;\n    instrument->pending_release[voice] = false;\n    //fprintf(stderr, \"instr 0x%lx: patch %d voice %d note %d/%d on\\n\", (unsigned long)instrument, instrument->patch_number, instrument->amy_voices[voice], note);\n    //instrument_debug(instrument);\n    return instrument->amy_voices[voice];\n}\n\n////// Interface of instrument mechanism to AMY records.\n\n//#define MAX_INSTRUMENTS 32\n//struct instrument_info *instruments[MAX_INSTRUMENTS];\nstruct instrument_info **instruments = NULL;\nint max_instruments = 0;\n\nvoid instruments_deinit() {\n    if (instruments != NULL)  {\n        instruments_reset();\n        free(instruments);\n    }\n}\n\nvoid instruments_init(int num_instruments) {\n    max_instruments = num_instruments;\n    instruments = (struct instrument_info **)malloc_caps(max_instruments * sizeof(struct instrument_info *), amy_global.config.ram_caps_synth);\n    for(uint16_t i = 0; i < max_instruments; i++) {\n        instruments[i]  = NULL;\n    }\n}\n\nvoid instruments_reset() {\n    for(uint16_t i = 0; i < max_instruments; i++)\n        instrument_release(i);\n}\n\nint instruments_max_instruments() {\n    return max_instruments;\n}\n\nvoid instrument_release(int instrument_number) {\n    if(instrument_number < max_instruments && instruments[instrument_number]) {\n        instrument_free(instruments[instrument_number]);\n    }\n    instruments[instrument_number] = NULL;\n}\n\nbool instrument_number_ok(int instrument_number, const char *tag) {\n    if (instrument_number < 0 || instrument_number >= max_instruments) {\n        if (tag) fprintf(stderr, \"instrument_number %d is out of range 0..%d (%s)\\n\", instrument_number, max_instruments, tag);\n        return false;\n    }\n    return true;\n}\n\nbool instrument_number_exists(int instrument_number, const char *tag) {\n    if (instrument_number_ok(instrument_number, tag)) {\n        if (instruments[instrument_number])\n            return true;\n        if (tag)\n            fprintf(stderr, \"synth %d not defined (%s)\\n\", instrument_number, tag);\n    }\n    return false;\n}\n\nvoid instrument_add_new(int instrument_number, int num_voices, uint16_t *amy_voices, uint16_t patch_number, uint16_t oscs_per_voice, uint32_t flags) {\n    if (!instrument_number_ok(instrument_number, \"add_new\")) return;\n    if(instruments[instrument_number]) {\n        instrument_free(instruments[instrument_number]);\n    }\n    instruments[instrument_number] = instrument_init(instrument_number, num_voices, amy_voices, patch_number, oscs_per_voice, flags);\n}\n\nvoid instrument_change_number(int old_instrument_number, int new_instrument_number) {\n    if (!instrument_number_exists(old_instrument_number, NULL)) return;  // no error msg.\n    if (!instrument_number_ok(new_instrument_number, \"change:new\")) return;\n    if (old_instrument_number == new_instrument_number)\n        return;  // Degenerate change.\n    if (instruments[new_instrument_number]) {\n        instrument_free(instruments[new_instrument_number]);\n    }\n    instruments[new_instrument_number] = instruments[old_instrument_number];\n    instruments[old_instrument_number] = NULL;\n}\n\n\nint instrument_get_num_voices(int instrument_number, uint16_t *amy_voices) {\n    // instrument_get_num_voices is used to test if an instrument is set or not, so no error message if it doesn't exist, only if the number is out of range.\n    if (!instrument_number_ok(instrument_number, \"get_num_voices\")) return 0;\n    int num_voices = 0;\n    struct instrument_info *instrument = instruments[instrument_number];\n    if (instrument == NULL) {\n        //fprintf(stderr, \"get_num_voices: instrument_number %d is not defined.\\n\", instrument_number);\n    } else {\n        num_voices = instrument->num_voices;\n        if (amy_voices != NULL)\n            for (int i = 0; i < num_voices; ++i)\n                amy_voices[i] = instrument->amy_voices[i];\n    }\n    return num_voices;\n}\n\nuint16_t instrument_voice_for_note_event(int instrument_number, int note, bool is_note_off, bool *pstolen) {\n    // Called from patches_event_has_voices for events including an instrument, velocity, and note (note-on/note-off).\n    // *pstolen is set (if pstolen is nonnull) if the note is stolen, otherwise not touched.\n    if (!instrument_number_exists(instrument_number, \"voice_for_event\")) return _INSTRUMENT_NO_VOICE;\n    struct instrument_info *instrument = instruments[instrument_number];\n    if (instrument->num_voices == 1) {\n        // If there's only one voice, we can skip the voice management.\n        return instrument->amy_voices[0];\n    }\n    if (is_note_off) {\n        // Note off.\n        if (note == 0) {\n            uint16_t amy_voices[MAX_VOICES_PER_INSTRUMENT];\n            _instrument_all_notes_off(instrument, amy_voices);\n            return _INSTRUMENT_NO_VOICE;\n        }\n        return instrument_note_off(instrument, note);\n    } else {\n        // Note on.\n        return instrument_note_on(instrument, note, pstolen);\n    }\n}\n\nint instrument_all_notes_off(int instrument_number, uint16_t *amy_voices) {\n    if (!instrument_number_exists(instrument_number, \"all_off\")) return 0;\n    struct instrument_info *instrument = instruments[instrument_number];\n    return _instrument_all_notes_off(instrument, amy_voices);\n}\n\nint instrument_sustain(int instrument_number, bool sustain, uint16_t *amy_voices) {\n    // Will return nonzero voices if the result is to release multiple notes.\n    if (!instrument_number_exists(instrument_number, \"sustain\")) return 0;\n    struct instrument_info *instrument = instruments[instrument_number];\n    if (sustain) {\n        instrument->in_sustain = true;\n        return 0;\n    }\n    // Sustain pedal released - return multiple note-offs.  Like all notes off, but a different criterion.\n    instrument->in_sustain = false;\n    int num_voices_turned_off = 0;\n    for (uint16_t voice = 0; voice < instrument->num_voices; ++voice)\n        if (instrument->pending_release[voice]) {\n            //fprintf(stderr, \"voice %d note %d pedal-released\\n\", instrument->amy_voices[voice], instrument->note_per_voice[voice]);\n            _instrument_voice_off(instrument, voice);\n            *amy_voices++ = instrument->amy_voices[voice];\n            ++num_voices_turned_off;\n        }\n    return num_voices_turned_off;\n}\n\nint instrument_get_patch_number(int instrument_number) {\n    if (!instrument_number_exists(instrument_number, \"get_patch\")) return -1;\n    struct instrument_info *instrument = instruments[instrument_number];\n    return instrument->patch_number;\n}\n\nint instrument_get_oscs_per_voice(int instrument_number) {\n    if (!instrument_number_exists(instrument_number, \"get_patch\")) return -1;\n    struct instrument_info *instrument = instruments[instrument_number];\n    return instrument->oscs_per_voice;\n}\n\nuint32_t instrument_get_flags(int instrument_number) {\n    if (!instrument_number_exists(instrument_number, \"get_flags\")) return (uint32_t)-1;\n    struct instrument_info *instrument = instruments[instrument_number];\n    return instrument->flags;\n}\n\nuint16_t instrument_noteon_delay_ms(int instrument_number) {\n    if (!instrument_number_exists(instrument_number, \"noteon_delay\")) return 0;\n    struct instrument_info *instrument = instruments[instrument_number];\n    if (instrument == NULL) {\n        return 0;\n    }\n    return instrument->noteon_delay_ms;\n}\n\nvoid instrument_set_noteon_delay_ms(int instrument_number, uint16_t noteon_delay_ms) {\n    if (!instrument_number_exists(instrument_number, \"set_noteon_delay\")) return;\n    struct instrument_info *instrument = instruments[instrument_number];\n    instrument->noteon_delay_ms = noteon_delay_ms;\n}\n\nbool instrument_grab_midi_notes(int instrument_number) {\n    if (!instrument_number_exists(instrument_number, \"grab_midi\")) return false;\n    struct instrument_info *instrument = instruments[instrument_number];\n    if (instrument == NULL) {\n        return false;\n    }\n    return instrument->grab_midi_notes;\n}\n\nvoid instrument_set_grab_midi_notes(int instrument_number, bool grab_midi_notes) {\n    if (!instrument_number_exists(instrument_number, \"set_grab\")) return;\n    struct instrument_info *instrument = instruments[instrument_number];\n    instrument->grab_midi_notes = grab_midi_notes;\n}\n\nint instrument_bank_number(int instrument_number) {\n    if (!instrument_number_exists(instrument_number, \"bank_number\")) return -1;\n    struct instrument_info *instrument = instruments[instrument_number];\n    if (instrument == NULL) {\n        return -1;\n    }\n    return instrument->bank_number;\n}\n\nvoid instrument_set_bank_number(int instrument_number, int bank_number) {\n    if (!instrument_number_exists(instrument_number, \"set_bank_number\")) return;\n    struct instrument_info *instrument = instruments[instrument_number];\n    instrument->bank_number = bank_number;\n}\n"
  },
  {
    "path": "src/interp_partials.c",
    "content": "// interp_partials - AMY kernel-side implementation of the interpolated partials-based synthesis originally implemented in tulip_piano.py.\n\n#include \"amy.h\"\n#include <stdbool.h>\n\ntypedef struct {\n    // How many sample_times_ms are there?\n    uint16_t num_sample_times_ms;\n    // Pointer to an array of the sample_times_ms\n    const uint16_t *sample_times_ms;\n    // How many velocities are defined for this voice (same for all notes)\n    uint16_t num_velocities;\n    // Pointer to a array of the MIDI velocities.\n    const uint8_t *velocities;\n    // How many different pitches do we define?  (All velocities are provided for each)\n    uint16_t num_pitches;\n    // Pointer to array of structures defining each note (pitch + velocity) entry.\n    const uint8_t *pitches;\n    // How many harmonics are allocated for each of the num_velocities * num_pitches notes.\n    const uint8_t *num_harmonics;\n    // MIDI Cents freqs for each harmonic.\n    const uint16_t *harmonics_freq;\n    // num_sample_times_ms uint8_t dB envelope values for each harmonic.\n    const uint8_t *harmonics_mags;\n} interp_partials_voice_t;\n\n#include \"interp_partials.h\"\n\n#define MAX_NUM_MAGNITUDES 24\n\n#define MAX_NUM_HARMONICS 40\n\n// Map to drop out some higher harmonics, namely the 2x and 3x overtones above 16th harmonic\nconst bool use_this_partial_map[MAX_NUM_HARMONICS] = {\n    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  // 1-10\n    1, 1, 1, 1, 1, 1, 1, 0, 1, 0,  // 11-20\n    0, 0, 1, 0, 1, 0, 0, 0, 1, 0,  // 21-30\n    1, 0, 0, 0, 1, 0, 1, 0, 0, 0,  // 31-40\n};\n\n\n// choose a preset from the .h file\nvoid partials_note_on(uint16_t osc) {\n    int num_partials = synth[osc]->preset;\n    for (int i = 0; i < num_partials; ++i) {\n        int o = osc + 1 + i;\n        ensure_osc_allocd(o, NULL);\n        if (synth[o]->wave == PARTIAL) {  // User has marked this as a partial.\n            // Mark this PARTIAL as part of a build-your own with a flag value in its preset field.\n            // This is used I think only at envelope.c:121 to avoid the normal partial preset special-case for PARTIALs.\n            synth[o]->preset = synth[osc]->preset;\n            synth[o]->logfreq_coefs[COEF_BEND] = 0;  // Each PARTIAL will receive pitch bend via the midi_note modulation from the parent osc, don't add it twice.\n            synth[o]->status = SYNTH_IS_ALGO_SOURCE;\n            synth[o]->note_on_clock = amy_global.total_blocks*AMY_BLOCK_SIZE;\n            AMY_UNSET(synth[o]->note_off_clock);\n            msynth[o]->logfreq = synth[o]->logfreq_coefs[COEF_CONST] + msynth[osc]->logfreq;\n            partial_note_on(o);\n        }\n    }\n}\n\nvoid partials_note_off(uint16_t osc) {\n    int num_oscs = synth[osc]->preset;\n    for(uint16_t i = osc + 1; i < osc + 1 + num_oscs; i++) {\n        uint16_t o = i % AMY_OSCS;\n        AMY_UNSET(synth[o]->note_on_clock);\n        synth[o]->note_off_clock = amy_global.total_blocks*AMY_BLOCK_SIZE;\n    }\n}\n\n\n// render a full partial set at offset osc (with preset)\n// freq controls pitch_ratio, amp amp_ratio, ratio controls time ratio\n// do all presets have sustain point?\nSAMPLE render_partials(SAMPLE *buf, uint16_t osc) {\n    SAMPLE max_value = 0;\n    uint16_t num_oscs = 0;\n    // No preset partials map, we are in \"build-your-own\".  The max number of oscs is taken from algo_source[0].\n    num_oscs = synth[osc]->preset;\n\n    if (synth[osc]->wave == INTERP_PARTIALS) {\n        //const interp_partials_voice_t *partials_voice = &interp_partials_map[synth[osc]->preset % NUM_INTERP_PARTIALS_PRESETS];\n        //num_oscs = partials_voice->num_harmonics[0];   // Assume first preset has the max #harmonics.\n        num_oscs = interp_partials_max_partials_for_patch(synth[osc]->preset);\n    }\n\n    // now, render everything, add it up\n    float midi_note = midi_note_for_logfreq(msynth[osc]->logfreq);\n    //fprintf(stderr, \"t=%u partials o=%d msynth[osc]->logfreq=%f midi_note=%f msynth[amp]=%f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE, osc, msynth[osc]->logfreq, midi_note, msynth[osc]->amp);\n    for(uint16_t i = osc + 1; i < osc + 1 + num_oscs; i++) {\n        uint16_t o = i % AMY_OSCS;\n        if(synth[o]->status ==SYNTH_IS_ALGO_SOURCE) {\n            // We vary each partial's \"velocity\" on-the-fly as the way the parent osc's amplitude envelope contributes to the partials.\n            synth[o]->velocity = msynth[osc]->amp;\n            // We also use dynamic, fractional note to propagate parent freq modulation.\n            synth[o]->midi_note = midi_note;\n            // hold_and_modify contains a special case for wave == PARTIAL so that\n            // envelope value are delayed by 1 frame compared to other oscs\n            // so that partials fade in over one frame from zero amp.\n            hold_and_modify(o);\n            //printf(\"[%d %d] %d amp %f (%f) freq %f (%f) on %d off %d bp0 %d %f bp1 %d %f wave %d\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE, ms_since_started, o, synth[o]->amp, msynth[o]->amp, synth[o]->freq, msynth[o]->freq, synth[o]->note_on_clock, synth[o]->note_off_clock, synth[o]->breakpoint_times[0][0], \n            //    synth[o]->breakpoint_values[0][0], synth[o]->breakpoint_times[1][0], synth[o]->breakpoint_values[1][0], synth[o]->wave);\n            SAMPLE value = render_partial(buf, o);\n            //fprintf(stderr, \"render_partials: time %.3f osc %d ctl ampt %.6f msynth_amp %.6f max_val=%.6f\\n\", amy_global.time, o, msynth[osc]->amp, msynth[o]->amp, S2F(value));\n            if (value > max_value) max_value = value;\n        }\n    }\n    return max_value;\n}\n\n\nint _max_partials_for_partials_voice(const interp_partials_voice_t *partials_voice) {\n    int max_num_partials = 0;\n    for (int h = 0; h < partials_voice->num_harmonics[0]; ++h) {\n        if (use_this_partial_map[h]) ++max_num_partials;\n    }\n    return max_num_partials;\n}\n\nint interp_partials_max_partials_for_patch(int interp_partials_patch_number) {\n    const interp_partials_voice_t *partials_voice = &interp_partials_map[interp_partials_patch_number % NUM_INTERP_PARTIALS_PRESETS];\n    return _max_partials_for_partials_voice(partials_voice);\n}\n\nvoid _cumulate_scaled_harmonic_params(float *harm_param, int harmonic_index, float alpha, const interp_partials_voice_t *partials_voice) {\n    int num_bps = partials_voice->num_sample_times_ms;\n    // Pitch\n    harm_param[0] += alpha * partials_voice->harmonics_freq[harmonic_index];\n    // Envelope magnitudes\n    for (int i = 0; i < num_bps; ++i)\n        harm_param[1 + i] += alpha * partials_voice->harmonics_mags[harmonic_index * num_bps + i];\n}\n\nint _harmonic_base_index_for_pitch_vel(int pitch_index, int vel_index, const interp_partials_voice_t *partials_voice) {\n    int note_number = partials_voice->num_velocities * pitch_index + vel_index;\n    int harmonic_index = 0;\n    for (int i = 0; i < note_number; ++i)\n        harmonic_index += partials_voice->num_harmonics[i];\n    return harmonic_index;\n}\n\nfloat _logfreq_of_midi_cents(float midi_cents) {\n    // Frequency is already log scaled, but need to re-center and change from 1200/oct to 1.0/oct.\n    return (midi_cents - (100 * ZERO_MIDI_NOTE)) / 1200.f;\n}\n\nfloat _env_lin_of_db(float db) {\n    float lin =  powf(10.f, MIN(20.f, (db - 100.f)) / 20.f) - 0.001;\n    if (lin < 0)  return 0;\n    return lin;\n}\n\nvoid _osc_on_with_harm_param(uint16_t o, float *harm_param, const interp_partials_voice_t *partials_voice) {\n    // We coerce this voice into being a partial, regardless of user wishes.\n    synth[o]->wave = PARTIAL;\n    synth[o]->preset = 1;  // Flag that this is an envelope-based partial\n    // Setup the specified frequency.\n    synth[o]->logfreq_coefs[COEF_CONST] = _logfreq_of_midi_cents(harm_param[0]);\n    // Setup envelope.\n    //synth[o]->eg_type[0] = ENVELOPE_DB;\n    synth[o]->breakpoint_times[0][0] = 0;\n    synth[o]->breakpoint_values[0][0] = 0;\n    int last_time = 0;\n    for (int bp = 0; bp < partials_voice->num_sample_times_ms; ++bp) {\n        synth[o]->breakpoint_times[0][bp + 1] = (partials_voice->sample_times_ms[bp] - last_time) * AMY_SAMPLE_RATE / 1000;\n        synth[o]->breakpoint_values[0][bp + 1] = _env_lin_of_db(harm_param[bp + 1]);\n        last_time = partials_voice->sample_times_ms[bp];\n    }\n    // Final release\n    synth[o]->breakpoint_times[0][partials_voice->num_sample_times_ms + 1] = 200 * AMY_SAMPLE_RATE / 1000;\n    synth[o]->breakpoint_values[0][partials_voice->num_sample_times_ms + 1] = 0;\n    // Decouple osc freq and amp from note and amp.\n    synth[o]->logfreq_coefs[COEF_NOTE] = 0;\n    synth[o]->amp_coefs[COEF_VEL] = 1.0;  // velocity is modified on-the-fly by the control osc to vary global amplitude.\n    // Other osc params.\n    synth[o]->status = SYNTH_IS_ALGO_SOURCE;\n    synth[o]->note_on_clock = amy_global.total_blocks*AMY_BLOCK_SIZE;\n    AMY_UNSET(synth[o]->note_off_clock);\n    partial_note_on(o);\n}\n\n// HOW DOES INTERP_PARTIALS (e.g. DPWE_PIANO) WORK?\n// The special thing about interp_partials is that the harmonic envelopes depend on the note velocity,\n// so they all have to be recomputed in response at note_on time.  Then, because their values have been\n// determined to reflect velocity via the note_on calculation, the parent osc should not use velocity\n// as part of its overall scaling calculation, since it would otherwise be applied twice.\n// Thus, when setting up a control osc for piano, we set amp_coef[COEF_VELOCITY] = 0.\n\nvoid interp_partials_note_on(uint16_t osc) {\n    // Choose the interp_partials preset.\n    const interp_partials_voice_t *partials_voice = &interp_partials_map[synth[osc]->preset % NUM_INTERP_PARTIALS_PRESETS];\n    float midi_note = synth[osc]->midi_note;\n    float midi_vel = (int)roundf(synth[osc]->velocity * 127.f);\n    // Clip\n    if (midi_vel < partials_voice->velocities[0]) midi_vel = partials_voice->velocities[0];\n    if (midi_vel > partials_voice->velocities[partials_voice->num_velocities - 1]) midi_vel = partials_voice->velocities[partials_voice->num_velocities - 1];\n    // Find the lower bound pitch/velocity indices.\n    uint8_t pitch_index = 0, vel_index = 0;\n    while(pitch_index < partials_voice->num_pitches - 1\n          && partials_voice->pitches[pitch_index + 1] < midi_note)\n        ++pitch_index;\n    while(vel_index < partials_voice->num_velocities - 1\n          && partials_voice->velocities[vel_index + 1] < midi_vel)\n        ++vel_index;\n    // Interp weights\n    float pitch_alpha = (midi_note - partials_voice->pitches[pitch_index])\n        / (float)(partials_voice->pitches[pitch_index + 1] - partials_voice->pitches[pitch_index]);\n    float vel_alpha = (midi_vel - partials_voice->velocities[vel_index])\n        / (float)(partials_voice->velocities[vel_index + 1] - partials_voice->velocities[vel_index]);\n    float harm_param[MAX_NUM_MAGNITUDES + 1];  // frequency + harmonic magnitudes.\n    int note_number = partials_voice->num_velocities * pitch_index + vel_index;\n    // Find the least number of harmonics across everything we're interpolating.\n    int num_harmonics = MIN(MAX_NUM_HARMONICS, partials_voice->num_harmonics[note_number]);  // pl_vl note\n    num_harmonics = MIN(num_harmonics, partials_voice->num_harmonics[note_number + 1]);  // pl_vh note\n    num_harmonics = MIN(num_harmonics, partials_voice->num_harmonics[note_number + partials_voice->num_velocities]);  // ph_vl note\n    num_harmonics = MIN(num_harmonics, partials_voice->num_harmonics[note_number + partials_voice->num_velocities + 1]);  // ph_vh note\n    // Interpolate the 4 notes.\n    int harmonic_base_index_pl_vl =\n        _harmonic_base_index_for_pitch_vel(pitch_index, vel_index, partials_voice);\n    float alpha_pl_vl = (1.f - pitch_alpha) * (1.f - vel_alpha);\n    int harmonic_base_index_pl_vh =\n        _harmonic_base_index_for_pitch_vel(pitch_index, vel_index + 1, partials_voice);\n    float alpha_pl_vh = (1.f - pitch_alpha) * (vel_alpha);\n    int harmonic_base_index_ph_vl =\n        _harmonic_base_index_for_pitch_vel(pitch_index + 1, vel_index, partials_voice);\n    float alpha_ph_vl = (pitch_alpha) * (1.f - vel_alpha);\n    int harmonic_base_index_ph_vh =\n        _harmonic_base_index_for_pitch_vel(pitch_index + 1, vel_index + 1, partials_voice);\n    float alpha_ph_vh = (pitch_alpha) * (vel_alpha);\n    //fprintf(stderr, \"interp_partials@%u: osc %d note %.1f vel %.1f pitch_x %d vel_x %d numh %d harm_bi_ll %d pitch_a %.3f vel_a %.3f alphas %.2f %.2f %.2f %.2f\\n\",\n    //        amy_global.total_blocks*AMY_BLOCK_SIZE, osc, midi_note, midi_vel, pitch_index, vel_index, num_harmonics,\n    //        harmonic_base_index_pl_vl, pitch_alpha, vel_alpha,\n    //        alpha_pl_vl, alpha_pl_vh, alpha_ph_vl, alpha_ph_vh);\n    // Make sure enough oscs are alloc'd in our dynamic osc alloc world.\n    // This has to be enough for any note in this map.  Assume num_harmonics[0] is largest (lowest pitch).\n    uint8_t max_num_partials = _max_partials_for_partials_voice(partials_voice);\n    uint8_t max_num_breakpoints[MAX_BREAKPOINT_SETS] = {2 + partials_voice->num_sample_times_ms, DEFAULT_NUM_BREAKPOINTS};\n    for (int o = 0; o < max_num_partials; ++o) {\n        ensure_osc_allocd(osc + 1 + o, max_num_breakpoints);\n    }\n    for (int h = 0; h < num_harmonics; ++h) {\n        if (use_this_partial_map[h]) {\n            for (int i = 0; i < MAX_NUM_MAGNITUDES + 1; ++i)  harm_param[i] = 0;\n            _cumulate_scaled_harmonic_params(harm_param, harmonic_base_index_pl_vl + h,\n                                             alpha_pl_vl, partials_voice);\n            _cumulate_scaled_harmonic_params(harm_param, harmonic_base_index_pl_vh + h,\n                                             alpha_pl_vh, partials_voice);\n            _cumulate_scaled_harmonic_params(harm_param, harmonic_base_index_ph_vl + h,\n                                             alpha_ph_vl, partials_voice);\n            _cumulate_scaled_harmonic_params(harm_param, harmonic_base_index_ph_vh + h,\n                                             alpha_ph_vh, partials_voice);\n            //fprintf(stderr, \"harm %d freq %.2f bps %.3f %.3f %.3f %.3f\\n\", h, harm_param[0], harm_param[1], harm_param[2], harm_param[3], harm_param[4]);\n            ++osc;\n            _osc_on_with_harm_param(osc, harm_param, partials_voice);\n        }\n    }\n}\n\nvoid interp_partials_note_off(uint16_t osc) {\n    //const interp_partials_voice_t *partials_voice = &interp_partials_map[synth[osc]->preset % NUM_INTERP_PARTIALS_PRESETS];\n    //int num_oscs = partials_voice->num_harmonics[0];   // Assume first preset has the max #harmonics.\n    int num_oscs = 0; //MAX_NUM_HARMONICS;\n    // Actual max num harmonics we may use is the number of 1s in the use_this_partial_map.\n    for (int i = 0; i < MAX_NUM_HARMONICS; ++i) num_oscs += use_this_partial_map[i];\n    for(uint16_t i = osc + 1; i < osc + 1 + num_oscs; i++) {\n        uint16_t o = i % AMY_OSCS;\n        if (synth[o]) {  // For high notes, some partials may be unused, unintialized (?)\n            AMY_UNSET(synth[o]->note_on_clock);\n            synth[o]->note_off_clock = amy_global.total_blocks*AMY_BLOCK_SIZE;\n        }\n    }\n}\n"
  },
  {
    "path": "src/interp_partials.h",
    "content": "// Automatically generated.\n// Piano interpolated partials data table\n#ifndef __INTERP_PARTIALS_H\n#define __INTERP_PARTIALS_H\n\n#define NUM_INTERP_PARTIALS_PRESETS 1\n\n#define NUM_PIANO_SAMPLE_TIMES_MS 20\nconst uint16_t piano_sample_times_ms[NUM_PIANO_SAMPLE_TIMES_MS] PROGMEM = {\n    4, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096,\n};\n\n#define NUM_PIANO_VELOCITIES 3\nconst uint8_t piano_velocities[NUM_PIANO_VELOCITIES] PROGMEM = {\n    40, 80, 120,\n};\n\n#define NUM_PIANO_NOTES 21\nconst uint8_t piano_notes[NUM_PIANO_NOTES] PROGMEM = {\n    24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100,\n    104,\n};\n\n#define NUM_PIANO_NUM_HARMONICS 63\nconst uint8_t piano_num_harmonics[NUM_PIANO_NUM_HARMONICS] PROGMEM = {\n    40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,\n    40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 37, 33, 32, 23, 28, 26, 22,\n    22, 21, 17, 17, 17, 13, 13, 13, 11, 11, 11, 8, 8, 9, 7, 7, 7, 6, 5, 5,\n    3, 4, 4,\n};\n\n#define NUM_PIANO_HARMONICS_FREQ 1760\nconst uint16_t piano_harmonics_freq[NUM_PIANO_HARMONICS_FREQ] PROGMEM = {\n    2272, 3586, 4290, 4791, 5181, 5498, 5767, 5996, 6209, 6397, 6566, 6721, 6865, 6999, 7124, 7243, 7356, 7462, 7562, 7660,\n    7752, 7841, 7928, 8009, 8091, 8171, 8246, 8321, 8398, 8464, 8565, 8629, 8704, 8765, 8826, 8895, 8955, 9012, 9069, 9128,\n    2172, 3587, 4287, 4787, 5175, 5493, 5762, 5996, 6205, 6393, 6561, 6716, 6860, 6993, 7118, 7237, 7348, 7456, 7555, 7652,\n    7744, 7833, 7918, 8001, 8081, 8166, 8233, 8306, 8376, 8446, 8514, 8579, 8643, 8706, 8768, 8828, 8891, 8945, 8995, 9035,\n    2394, 3588, 4289, 4787, 5176, 5495, 5764, 5998, 6207, 6395, 6564, 6717, 6862, 6995, 7120, 7241, 7351, 7458, 7557, 7654,\n    7746, 7835, 7920, 8003, 8082, 8221, 8235, 8310, 8378, 8448, 8515, 8581, 8645, 8708, 8819, 8854, 8901, 8997, 9036, 9079,\n    2851, 3989, 4692, 5187, 5576, 5893, 6161, 6394, 6600, 6785, 6952, 7105, 7246, 7379, 7501, 7616, 7724, 7828, 7926, 8019,\n    8108, 8193, 8275, 8355, 8434, 8505, 8574, 8641, 8710, 8774, 8836, 8891, 8945, 8996, 9053, 9115, 9147, 9206, 9252, 9304,\n    3069, 3987, 4692, 5187, 5577, 5892, 6161, 6393, 6600, 6784, 6952, 7105, 7246, 7379, 7501, 7616, 7725, 7828, 7926, 8019,\n    8108, 8193, 8275, 8354, 8435, 8509, 8578, 8643, 8712, 8775, 8838, 8893, 8941, 9006, 9065, 9127, 9177, 9239, 9266, 9333,\n    3008, 3989, 4693, 5188, 5577, 5894, 6162, 6395, 6601, 6785, 6953, 7106, 7247, 7379, 7502, 7617, 7726, 7829, 7927, 8019,\n    8109, 8194, 8277, 8355, 8438, 8511, 8580, 8645, 8713, 8776, 8839, 8901, 8961, 9019, 9075, 9133, 9182, 9249, 9267, 9351,\n    3114, 4391, 5094, 5596, 5984, 6300, 6567, 6804, 7008, 7191, 7358, 7512, 7653, 7784, 7906, 8022, 8130, 8233, 8330, 8424,\n    8512, 8595, 8679, 8764, 8838, 8906, 8978, 9049, 9121, 9171, 9242, 9305, 9364, 9424, 9482, 9536, 9593, 9645, 9697, 9750,\n    3224, 4390, 5096, 5595, 5983, 6299, 6567, 6799, 7006, 7190, 7358, 7512, 7653, 7784, 7906, 8022, 8129, 8232, 8329, 8422,\n    8511, 8595, 8677, 8758, 8856, 8970, 8986, 9105, 9169, 9231, 9291, 9350, 9408, 9473, 9539, 9582, 9664, 9723, 9771, 9820,\n    3275, 4391, 5099, 5598, 5985, 6300, 6567, 6805, 7008, 7191, 7358, 7513, 7654, 7785, 7907, 8022, 8130, 8233, 8330, 8423,\n    8511, 8595, 8678, 8755, 8855, 8900, 8980, 9041, 9106, 9170, 9232, 9291, 9350, 9407, 9472, 9518, 9574, 9624, 9669, 9724,\n    3610, 4789, 5497, 5999, 6386, 6702, 6972, 7205, 7411, 7596, 7763, 7916, 8055, 8189, 8314, 8427, 8551, 8655, 8819, 8852,\n    8923, 9072, 9156, 9232, 9311, 9384, 9453, 9521, 9595, 9674, 9748, 9812, 9878, 9942, 10004, 10068, 10130, 10187, 10246, 10303,\n    3623, 4792, 5493, 5999, 6385, 6702, 6972, 7205, 7411, 7596, 7763, 7916, 8054, 8189, 8313, 8426, 8537, 8638, 8737, 8831,\n    8919, 9004, 9084, 9164, 9257, 9321, 9389, 9515, 9580, 9643, 9707, 9766, 9818, 9885, 9934, 9984, 10050, 10096, 10160, 10207,\n    3646, 4792, 5491, 6000, 6386, 6703, 6973, 7206, 7412, 7597, 7764, 7918, 8054, 8190, 8313, 8427, 8539, 8639, 8738, 8832,\n    8920, 9005, 9086, 9165, 9259, 9322, 9390, 9518, 9583, 9644, 9707, 9765, 9823, 9889, 9937, 9984, 10040, 10096, 10160, 10205,\n    4008, 5200, 5904, 6403, 6790, 7106, 7376, 7608, 7815, 7998, 8165, 8318, 8460, 8591, 8715, 8826, 8939, 9042, 9139, 9229,\n    9318, 9402, 9480, 9562, 9644, 9713, 9780, 9846, 9911, 9977, 10038, 10101, 10158, 10216, 10274, 10346, 10385, 10434, 10486, 10536,\n    4008, 5200, 5903, 6403, 6789, 7106, 7376, 7607, 7815, 7999, 8165, 8318, 8460, 8591, 8714, 8828, 8937, 9039, 9137, 9228,\n    9318, 9401, 9484, 9568, 9659, 9718, 9782, 9847, 9916, 9977, 10038, 10099, 10186, 10265, 10321, 10370, 10421, 10477, 10531, 10576,\n    4010, 5201, 5903, 6404, 6790, 7108, 7376, 7608, 7816, 7999, 8166, 8318, 8461, 8592, 8714, 8829, 8938, 9040, 9137, 9228,\n    9318, 9402, 9484, 9564, 9658, 9714, 9784, 9847, 9913, 9976, 10038, 10096, 10165, 10272, 10317, 10379, 10428, 10480, 10529, 10566,\n    4398, 5600, 6302, 6802, 7189, 7506, 7774, 8007, 8213, 8398, 8566, 8720, 8860, 8992, 9130, 9234, 9347, 9448, 9543, 9645,\n    9727, 9809, 9903, 9985, 10063, 10138, 10214, 10287, 10349, 10419, 10481, 10547, 10605, 10668, 10731, 10784, 10842, 10897, 10950, 11004,\n    4398, 5599, 6303, 6801, 7188, 7507, 7773, 8006, 8213, 8397, 8565, 8717, 8858, 8990, 9112, 9227, 9334, 9438, 9536, 9629,\n    9716, 9802, 9884, 9962, 10042, 10112, 10182, 10252, 10328, 10380, 10443, 10506, 10573, 10632, 10685, 10739, 10792, 10851, 10906, 10960,\n    4400, 5598, 6304, 6803, 7190, 7508, 7775, 8008, 8215, 8398, 8566, 8718, 8860, 8991, 9113, 9228, 9337, 9440, 9536, 9629,\n    9718, 9803, 9885, 9963, 10045, 10112, 10182, 10250, 10316, 10381, 10443, 10535, 10556, 10623, 10679, 10735, 10788, 10841, 10893, 10945,\n    4782, 6001, 6703, 7203, 7591, 7907, 8175, 8410, 8623, 8800, 8966, 9124, 9265, 9407, 9526, 9658, 9778, 9886, 9995, 10084,\n    10175, 10271, 10349, 10437, 10516, 10592, 10669, 10744, 10818, 10887, 10956, 11022, 11087, 11151, 11223, 11277, 11336, 11398, 11454, 11511,\n    4797, 6000, 6702, 7204, 7591, 7907, 8174, 8407, 8615, 8797, 8964, 9117, 9258, 9389, 9511, 9625, 9735, 9837, 9934, 10027,\n    10115, 10200, 10281, 10353, 10441, 10507, 10580, 10646, 10715, 10779, 10842, 10904, 10967, 11024, 11085, 11137, 11194, 11247, 11299, 11352,\n    4801, 6002, 6703, 7205, 7592, 7908, 8176, 8408, 8616, 8798, 8966, 9118, 9259, 9390, 9512, 9626, 9736, 9838, 9934, 10028,\n    10115, 10201, 10282, 10360, 10438, 10508, 10578, 10646, 10713, 10777, 10839, 10899, 10966, 11016, 11074, 11128, 11183, 11238, 11287, 11343,\n    5204, 6408, 7107, 7608, 7994, 8311, 8580, 8812, 9020, 9202, 9373, 9527, 9666, 9802, 9927, 10042, 10158, 10256, 10348, 10446,\n    10535, 10617, 10702, 10777, 10853, 10924, 10996, 11059, 11131, 11196, 11250, 11317, 11392, 11437, 11491, 11545, 11599, 11653, 11696, 11753,\n    5206, 6408, 7107, 7608, 7994, 8311, 8580, 8812, 9019, 9205, 9372, 9526, 9667, 9799, 9916, 10038, 10147, 10251, 10349, 10444,\n    10533, 10620, 10701, 10779, 10855, 10928, 11001, 11069, 11136, 11202, 11250, 11313, 11384, 11428, 11486, 11544, 11589, 11644, 11689, 11743,\n    5208, 6409, 7108, 7609, 7995, 8312, 8581, 8812, 9020, 9205, 9373, 9527, 9668, 9800, 9922, 10039, 10147, 10252, 10351, 10443,\n    10534, 10619, 10702, 10781, 10857, 10931, 11005, 11073, 11141, 11208, 11269, 11332, 11396, 11452, 11510, 11567, 11622, 11679, 11729, 11778,\n    5606, 6807, 7508, 8009, 8396, 8714, 8994, 9205, 9428, 9629, 9787, 9941, 10072, 10212, 10347, 10463, 10569, 10668, 10765, 10858,\n    10948, 11037, 11116, 11197, 11272, 11348, 11401, 11485, 11557, 11622, 11686, 11749, 11810, 11870, 11933, 11986, 12040, 12095, 12148, 12201,\n    5603, 6807, 7509, 8009, 8396, 8714, 8983, 9216, 9423, 9609, 9778, 9932, 10072, 10209, 10335, 10452, 10563, 10667, 10767, 10863,\n    10954, 11042, 11124, 11209, 11284, 11363, 11424, 11500, 11569, 11634, 11697, 11762, 11825, 11886, 11940, 12002, 12059, 12116, 12170, 12225,\n    5599, 6808, 7510, 8010, 8397, 8715, 8984, 9217, 9425, 9611, 9779, 9934, 10075, 10210, 10334, 10451, 10562, 10667, 10767, 10862,\n    10952, 11040, 11124, 11208, 11284, 11362, 11431, 11506, 11575, 11645, 11707, 11772, 11834, 11895, 11951, 12014, 12071, 12128, 12190, 12237,\n    6002, 7204, 7909, 8408, 8797, 9126, 9394, 9638, 9844, 10034, 10201, 10348, 10493, 10621, 10748, 10862, 10970, 11069, 11174, 11257,\n    11369, 11436, 11525, 11606, 11686, 11758, 11829, 11903, 11964, 12035, 12101, 12165, 12227, 12288, 12347, 12406, 12460, 12518, 12572, 12628,\n    6003, 7204, 7908, 8408, 8796, 9115, 9385, 9621, 9828, 10021, 10187, 10345, 10491, 10627, 10753, 10871, 10986, 11088, 11192, 11288,\n    11394, 11469, 11551, 11631, 11703, 11785, 11860, 11936, 12007, 12074, 12141, 12208, 12271, 12334, 12396, 12452, 12514, 12573, 12631, 12685,\n    6004, 7205, 7909, 8408, 8797, 9115, 9386, 9621, 9829, 10018, 10187, 10344, 10489, 10624, 10751, 10871, 10984, 11092, 11195, 11293,\n    11388, 11474, 11564, 11650, 11732, 11825, 11890, 11958, 12033, 12107, 12176, 12241, 12307, 12371, 12436, 12496, 12555, 12617, 12675, 12733,\n    6406, 7603, 8310, 8811, 9197, 9528, 9807, 10043, 10310, 10430, 10611, 10767, 10911, 11047, 11174, 11285, 11400, 11508, 11611, 11699,\n    11796, 11893, 11969, 12057, 12142, 12220, 12296, 12371, 12441, 12515, 12585, 12651, 12719, 12783, 12847, 12906, 12972, 13038, 13091, 13149,\n    6409, 7602, 8310, 8811, 9201, 9522, 9794, 10031, 10264, 10429, 10611, 10768, 10921, 11055, 11189, 11307, 11406, 11528, 11635, 11731,\n    11829, 11931, 12015, 12099, 12184, 12265, 12346, 12427, 12501, 12575, 12646, 12717, 12786, 12854, 12922, 12987, 13052, 13114, 13176, 13237,\n    6410, 7602, 8310, 8812, 9202, 9522, 9795, 10031, 10241, 10432, 10606, 10764, 10909, 11053, 11183, 11306, 11421, 11534, 11641, 11740,\n    11836, 11928, 12001, 12097, 12162, 12238, 12319, 12395, 12469, 12543, 12615, 12683, 12752, 12819, 12885, 12949, 13012, 13074, 13134, 13194,\n    6806, 8006, 8712, 9210, 9616, 9933, 10237, 10412, 10652, 10840, 11011, 11164, 11299, 11410, 11549, 11675, 11779, 11888, 11975, 12073,\n    12166, 12256, 12338, 12423, 12500, 12574, 12647, 12720, 12788, 12856, 12921, 12987, 13051, 13111, 13171, 13231, 13288, 6807, 8006, 8713,\n    9214, 9606, 9928, 10202, 10441, 10658, 10855, 11030, 11209, 11350, 11483, 11616, 11733, 11855, 11956, 12071, 12180, 12281, 12378, 12468,\n    12562, 12653, 12736, 12823, 12903, 12985, 13061, 13138, 13214, 13285, 6808, 8007, 8714, 9215, 9607, 9929, 10203, 10442, 10656, 10850,\n    11025, 11260, 11338, 11485, 11618, 11744, 11868, 11975, 12091, 12198, 12300, 12400, 12494, 12587, 12676, 12763, 12845, 12930, 13011, 13090,\n    13167, 13244, 7203, 8404, 9117, 9628, 10035, 10354, 10659, 10914, 11147, 11380, 11552, 11716, 11904, 12052, 12205, 12350, 12490, 12629,\n    12753, 12885, 13006, 13122, 13240, 7203, 8405, 9112, 9616, 10012, 10339, 10621, 10863, 11067, 11254, 11419, 11587, 11729, 11876, 12000,\n    12124, 12241, 12353, 12456, 12562, 12658, 12756, 12847, 12938, 13024, 13110, 13192, 13275, 7203, 8406, 9112, 9617, 10012, 10337, 10615,\n    10859, 11077, 11248, 11460, 11652, 11791, 11940, 12076, 12212, 12324, 12430, 12541, 12648, 12755, 12857, 12957, 13054, 13147, 13241, 7606,\n    8805, 9529, 10039, 10389, 10754, 11037, 11275, 11460, 11674, 11852, 12002, 12155, 12296, 12430, 12553, 12680, 12791, 12898, 13007, 13108,\n    13205, 7607, 8809, 9516, 10022, 10413, 10745, 11028, 11274, 11465, 11672, 11849, 12002, 12160, 12296, 12430, 12553, 12673, 12793, 12899,\n    13003, 13109, 13208, 7607, 8809, 9516, 10020, 10415, 10744, 11025, 11273, 11492, 11680, 11880, 12068, 12212, 12358, 12494, 12627, 12752,\n    12878, 12993, 13110, 13220, 8006, 9206, 9946, 10405, 10854, 11193, 11444, 11706, 11936, 12136, 12320, 12490, 12660, 12814, 12959, 13093,\n    13237, 8007, 9203, 9925, 10423, 10846, 11183, 11436, 11694, 11926, 12117, 12295, 12461, 12621, 12767, 12911, 13051, 13177, 8008, 9212,\n    9921, 10428, 10830, 11162, 11443, 11703, 11930, 12135, 12321, 12495, 12659, 12815, 12960, 13102, 13241, 8400, 9616, 10349, 10895, 11315,\n    11634, 11921, 12168, 12401, 12617, 12811, 13012, 13180, 8398, 9607, 10331, 10859, 11293, 11620, 11911, 12158, 12386, 12597, 12790, 12979,\n    13148, 8400, 9614, 10323, 10842, 11255, 11606, 11902, 12163, 12395, 12617, 12820, 13012, 13186, 8802, 10047, 10789, 11338, 11714, 12032,\n    12335, 12599, 12833, 13055, 13264, 8809, 10024, 10758, 11307, 11704, 12027, 12332, 12600, 12838, 13051, 13262, 8810, 10018, 10730, 11263,\n    11677, 12025, 12336, 12607, 12848, 13066, 13282, 9119, 10411, 11228, 11733, 12138, 12481, 12772, 13058, 9211, 10418, 11212, 11719, 12131,\n    12476, 12767, 13048, 9216, 10420, 11163, 11688, 12105, 12453, 12745, 13030, 13271, 9334, 10833, 11609, 12150, 12590, 12947, 13265, 9578,\n    10866, 11617, 12155, 12598, 12960, 13292, 9613, 10827, 11575, 12112, 12547, 12902, 13211, 9520, 11256, 12011, 12541, 12935, 13269, 9943,\n    11276, 12039, 12603, 13022, 9996, 11242, 12016, 12585, 13016, 8908, 11863, 12902, 10199, 11574, 12376, 12924, 10409, 11646, 12421, 12947,\n};\n\n#define NUM_PIANO_HARMONICS_MAGS 35200\nconst uint8_t piano_harmonics_mags[NUM_PIANO_HARMONICS_MAGS] PROGMEM = {\n    39, 40, 41, 42, 37, 37, 40, 39, 42, 46, 41, 42, 44, 41, 41, 39, 42, 41, 40, 40,\n    51, 53, 55, 56, 55, 50, 48, 53, 49, 49, 51, 52, 53, 52, 52, 52, 53, 50, 52, 50,\n    65, 68, 70, 72, 73, 73, 73, 73, 73, 73, 72, 72, 72, 72, 71, 71, 70, 70, 68, 67,\n    69, 71, 73, 74, 75, 77, 77, 77, 74, 75, 75, 75, 75, 74, 72, 71, 69, 67, 62, 59,\n    69, 71, 73, 73, 74, 73, 74, 74, 75, 74, 74, 74, 73, 72, 71, 70, 67, 64, 58, 53,\n    68, 70, 72, 74, 75, 76, 77, 76, 72, 74, 72, 73, 72, 71, 71, 70, 68, 66, 62, 58,\n    52, 52, 52, 52, 53, 53, 49, 52, 53, 51, 52, 52, 52, 53, 52, 51, 51, 50, 46, 45,\n    43, 41, 44, 48, 54, 56, 56, 58, 59, 58, 56, 56, 50, 47, 47, 42, 39, 34, 29, 21,\n    48, 52, 55, 56, 59, 60, 62, 63, 62, 63, 63, 63, 62, 62, 60, 58, 56, 53, 49, 44,\n    56, 57, 57, 58, 59, 61, 61, 63, 63, 65, 64, 63, 62, 61, 59, 57, 53, 50, 45, 44,\n    47, 45, 51, 57, 62, 65, 67, 67, 66, 65, 64, 63, 62, 61, 59, 57, 53, 49, 41, 30,\n    61, 63, 64, 66, 68, 69, 71, 71, 71, 72, 71, 71, 70, 70, 68, 67, 64, 60, 48, 46,\n    58, 60, 61, 62, 63, 64, 64, 65, 66, 66, 66, 65, 65, 64, 62, 61, 58, 55, 49, 40,\n    45, 51, 55, 57, 61, 62, 63, 63, 62, 62, 62, 61, 61, 60, 60, 59, 57, 55, 48, 44,\n    51, 53, 54, 56, 57, 58, 58, 59, 61, 61, 61, 60, 60, 59, 57, 56, 51, 46, 38, 45,\n    45, 46, 47, 47, 47, 46, 47, 47, 42, 39, 51, 49, 46, 44, 45, 44, 43, 41, 39, 37,\n    46, 48, 49, 50, 50, 48, 44, 41, 42, 41, 40, 40, 37, 35, 33, 13, 29, 32, 35, 32,\n    48, 50, 51, 52, 53, 54, 55, 54, 54, 55, 54, 54, 53, 53, 51, 49, 45, 38, 30, 37,\n    50, 52, 52, 53, 53, 53, 53, 53, 52, 52, 52, 51, 51, 51, 50, 48, 45, 42, 33, 29,\n    49, 51, 52, 53, 53, 53, 51, 49, 48, 49, 48, 48, 48, 47, 47, 45, 44, 44, 42, 41,\n    35, 39, 41, 43, 45, 44, 38, 27, 15, 37, 36, 38, 40, 43, 44, 46, 47, 46, 41, 33,\n    36, 38, 39, 40, 42, 40, 33, 37, 43, 44, 43, 44, 43, 43, 43, 42, 41, 39, 36, 35,\n    39, 41, 43, 44, 45, 46, 47, 46, 45, 44, 44, 43, 41, 41, 34, 30, 31, 35, 38, 35,\n    38, 40, 42, 43, 43, 43, 44, 46, 47, 46, 46, 46, 46, 45, 43, 42, 40, 37, 34, 31,\n    36, 37, 38, 38, 38, 38, 38, 37, 39, 39, 38, 37, 38, 37, 34, 32, 25, 17, 26, 26,\n    30, 30, 28, 26, 24, 23, 29, 30, 31, 30, 25, 29, 27, 23, 23, 24, 24, 24, 13, 17,\n    26, 24, 21, 25, 31, 30, 35, 35, 32, 35, 34, 33, 33, 31, 28, 22, 22, 23, 19, 16,\n    26, 24, 23, 23, 26, 32, 32, 32, 33, 35, 35, 31, 31, 33, 29, 29, 26, 21, 0, 12,\n    41, 41, 40, 38, 37, 41, 31, 35, 24, 30, 31, 19, 32, 18, 27, 27, 21, 17, 8, 13,\n    38, 38, 37, 35, 19, 33, 35, 31, 34, 34, 31, 23, 25, 21, 21, 22, 19, 20, 5, 11,\n    27, 29, 30, 29, 21, 24, 9, 26, 21, 23, 22, 7, 25, 23, 21, 16, 20, 16, 12, 13,\n    19, 21, 22, 23, 22, 12, 16, 6, 20, 19, 14, 10, 16, 14, 12, 11, 11, 7, 13, 10,\n    12, 6, 0, 12, 19, 22, 24, 17, 23, 24, 21, 14, 21, 15, 11, 18, 17, 12, 14, 9,\n    3, 10, 14, 17, 17, 12, 5, 14, 1, 16, 13, 19, 10, 20, 11, 8, 12, 8, 15, 13,\n    15, 17, 18, 19, 20, 20, 18, 14, 12, 18, 14, 17, 21, 15, 15, 11, 11, 14, 14, 14,\n    27, 28, 29, 30, 29, 28, 28, 27, 28, 28, 27, 28, 30, 27, 23, 19, 21, 21, 16, 4,\n    20, 21, 20, 20, 17, 16, 25, 26, 23, 19, 24, 22, 25, 25, 18, 4, 21, 13, 2, 6,\n    20, 20, 20, 19, 20, 20, 19, 18, 20, 20, 23, 19, 23, 20, 17, 6, 0, 5, 7, 0,\n    17, 20, 22, 22, 22, 20, 22, 19, 23, 20, 18, 10, 3, 18, 14, 12, 8, 8, 0, 1,\n    28, 29, 30, 31, 31, 29, 24, 21, 20, 19, 18, 15, 19, 16, 10, 5, 7, 2, 3, 16,\n    38, 36, 36, 36, 33, 30, 34, 44, 47, 42, 41, 35, 41, 39, 42, 37, 44, 42, 40, 38,\n    55, 59, 62, 65, 67, 66, 59, 57, 61, 59, 59, 59, 60, 58, 58, 57, 57, 56, 56, 53,\n    70, 73, 76, 79, 81, 82, 79, 79, 81, 80, 80, 79, 79, 79, 78, 77, 75, 74, 71, 68,\n    73, 76, 77, 78, 79, 79, 79, 76, 78, 77, 77, 77, 76, 76, 75, 75, 73, 71, 67, 61,\n    74, 77, 79, 81, 83, 84, 84, 82, 84, 83, 83, 83, 83, 82, 81, 80, 79, 77, 73, 69,\n    71, 73, 75, 76, 78, 79, 78, 79, 79, 79, 78, 78, 78, 78, 77, 76, 75, 74, 72, 69,\n    66, 68, 69, 69, 69, 68, 65, 64, 66, 69, 69, 69, 68, 68, 67, 66, 65, 63, 61, 58,\n    62, 62, 62, 62, 65, 68, 70, 71, 72, 71, 69, 68, 67, 65, 63, 61, 57, 51, 44, 43,\n    54, 58, 61, 64, 67, 66, 65, 67, 66, 66, 67, 66, 66, 66, 64, 63, 61, 59, 55, 51,\n    62, 64, 65, 66, 63, 48, 63, 62, 49, 44, 52, 50, 48, 50, 49, 48, 50, 51, 51, 51,\n    59, 62, 65, 67, 72, 75, 78, 77, 76, 74, 72, 70, 69, 68, 65, 63, 58, 52, 40, 47,\n    66, 68, 69, 70, 70, 70, 70, 72, 73, 74, 73, 72, 71, 70, 68, 66, 62, 60, 56, 52,\n    57, 60, 64, 67, 71, 72, 69, 67, 69, 71, 73, 72, 72, 71, 70, 69, 67, 64, 59, 54,\n    61, 64, 67, 69, 71, 73, 75, 74, 74, 75, 74, 74, 74, 73, 72, 71, 68, 66, 66, 64,\n    48, 48, 47, 45, 53, 59, 62, 64, 58, 56, 57, 52, 54, 53, 52, 53, 54, 54, 53, 49,\n    53, 54, 55, 57, 61, 65, 68, 67, 63, 43, 57, 47, 54, 57, 57, 50, 54, 51, 50, 48,\n    56, 59, 61, 62, 62, 58, 43, 49, 52, 51, 49, 47, 47, 47, 45, 45, 44, 44, 34, 35,\n    59, 60, 61, 60, 59, 55, 42, 48, 40, 44, 46, 46, 46, 42, 43, 44, 40, 39, 39, 32,\n    56, 59, 61, 63, 64, 65, 65, 64, 63, 63, 63, 62, 62, 63, 63, 62, 60, 57, 57, 51,\n    51, 56, 59, 61, 63, 64, 63, 62, 57, 50, 53, 54, 54, 52, 54, 52, 52, 51, 49, 45,\n    61, 63, 64, 65, 66, 67, 67, 68, 68, 69, 69, 68, 67, 66, 65, 66, 65, 61, 60, 58,\n    56, 59, 62, 64, 66, 67, 67, 67, 67, 67, 68, 68, 67, 67, 66, 64, 62, 60, 56, 51,\n    55, 57, 57, 57, 57, 55, 55, 59, 61, 61, 60, 61, 60, 59, 57, 56, 55, 53, 50, 47,\n    55, 58, 60, 62, 63, 64, 64, 63, 63, 64, 63, 63, 62, 62, 61, 60, 58, 56, 53, 49,\n    59, 60, 61, 61, 61, 59, 57, 55, 55, 56, 54, 54, 54, 54, 52, 50, 50, 47, 43, 38,\n    51, 51, 50, 49, 50, 53, 45, 36, 38, 39, 40, 29, 34, 42, 37, 26, 26, 14, 18, 22,\n    57, 57, 57, 56, 54, 49, 55, 57, 54, 56, 56, 56, 55, 53, 52, 51, 48, 44, 39, 31,\n    57, 57, 56, 56, 59, 62, 65, 65, 61, 62, 60, 59, 59, 59, 59, 55, 54, 47, 43, 34,\n    55, 53, 48, 29, 53, 58, 59, 60, 57, 59, 58, 58, 58, 56, 54, 52, 46, 42, 32, 21,\n    58, 60, 61, 62, 63, 63, 61, 57, 61, 61, 59, 58, 57, 56, 54, 52, 49, 45, 37, 28,\n    51, 53, 54, 55, 56, 57, 58, 58, 59, 58, 58, 57, 53, 46, 51, 54, 42, 48, 40, 34,\n    46, 48, 49, 51, 52, 53, 54, 55, 55, 55, 55, 55, 54, 52, 51, 51, 47, 45, 39, 35,\n    49, 50, 50, 50, 49, 46, 45, 46, 47, 48, 47, 49, 47, 44, 44, 44, 39, 37, 32, 28,\n    42, 44, 45, 46, 46, 45, 44, 44, 44, 45, 45, 44, 44, 43, 42, 41, 38, 35, 27, 22,\n    35, 34, 32, 31, 31, 31, 28, 29, 34, 34, 37, 30, 34, 35, 23, 31, 27, 10, 15, 4,\n    45, 46, 47, 48, 48, 47, 44, 41, 48, 47, 49, 48, 45, 41, 41, 43, 39, 34, 29, 23,\n    33, 32, 30, 33, 40, 43, 42, 41, 45, 40, 45, 39, 40, 34, 43, 24, 36, 23, 17, 20,\n    36, 37, 39, 40, 42, 43, 44, 45, 45, 45, 45, 45, 43, 37, 35, 32, 34, 33, 24, 19,\n    41, 42, 43, 44, 45, 46, 45, 45, 40, 46, 35, 45, 47, 43, 37, 41, 28, 27, 15, 12,\n    39, 40, 41, 41, 40, 39, 40, 42, 39, 40, 37, 43, 37, 41, 35, 35, 25, 24, 19, 14,\n    45, 45, 44, 49, 54, 58, 57, 42, 53, 50, 57, 43, 48, 54, 29, 47, 47, 48, 42, 42,\n    67, 70, 74, 76, 79, 80, 76, 69, 73, 71, 68, 69, 70, 69, 69, 69, 67, 66, 65, 63,\n    77, 81, 84, 86, 90, 92, 92, 91, 93, 92, 92, 91, 91, 91, 90, 89, 88, 86, 83, 80,\n    79, 84, 86, 88, 90, 90, 90, 88, 88, 87, 88, 87, 86, 86, 85, 84, 83, 81, 77, 72,\n    76, 82, 86, 89, 93, 95, 96, 95, 96, 96, 96, 95, 95, 94, 93, 92, 90, 88, 84, 80,\n    81, 84, 86, 88, 90, 91, 90, 89, 90, 89, 89, 88, 88, 88, 87, 87, 86, 85, 83, 81,\n    77, 79, 81, 82, 82, 81, 78, 76, 79, 80, 81, 80, 80, 79, 79, 78, 76, 74, 71, 68,\n    76, 77, 78, 78, 77, 79, 83, 85, 86, 85, 83, 83, 81, 79, 77, 75, 70, 62, 56, 52,\n    69, 69, 70, 73, 79, 81, 78, 76, 80, 78, 79, 78, 78, 78, 76, 75, 73, 70, 65, 61,\n    76, 78, 78, 79, 78, 69, 77, 76, 67, 67, 68, 70, 67, 67, 62, 58, 55, 57, 60, 62,\n    74, 76, 78, 80, 83, 85, 89, 89, 89, 88, 85, 83, 82, 81, 79, 78, 74, 70, 61, 54,\n    66, 72, 76, 79, 82, 84, 86, 87, 86, 86, 85, 85, 84, 83, 81, 80, 76, 74, 68, 64,\n    66, 67, 71, 76, 82, 85, 85, 82, 83, 84, 84, 83, 83, 83, 82, 80, 79, 76, 72, 67,\n    63, 68, 73, 76, 81, 84, 87, 87, 86, 86, 86, 87, 86, 85, 84, 83, 80, 76, 75, 75,\n    56, 56, 56, 55, 59, 67, 73, 77, 80, 79, 78, 70, 73, 73, 71, 66, 67, 67, 65, 61,\n    56, 53, 53, 61, 72, 78, 82, 80, 73, 77, 72, 74, 75, 76, 74, 56, 70, 64, 63, 61,\n    71, 74, 76, 78, 79, 77, 57, 70, 70, 70, 64, 63, 65, 66, 61, 63, 61, 59, 50, 50,\n    72, 74, 75, 76, 75, 73, 67, 72, 69, 68, 69, 70, 67, 66, 64, 64, 60, 58, 56, 51,\n    67, 71, 75, 77, 80, 81, 82, 82, 82, 81, 81, 80, 80, 80, 79, 78, 76, 73, 71, 66,\n    60, 65, 71, 74, 79, 81, 82, 81, 81, 79, 79, 77, 78, 76, 74, 71, 70, 68, 64, 61,\n    71, 75, 78, 80, 82, 84, 85, 86, 84, 84, 84, 84, 83, 82, 81, 81, 79, 73, 71, 71,\n    67, 71, 75, 78, 82, 84, 85, 86, 85, 86, 85, 84, 83, 83, 82, 81, 77, 76, 71, 67,\n    70, 73, 75, 76, 77, 76, 70, 68, 73, 74, 75, 76, 75, 74, 70, 70, 68, 66, 59, 55,\n    70, 74, 77, 79, 82, 83, 83, 82, 81, 81, 82, 81, 81, 80, 78, 76, 74, 71, 66, 63,\n    75, 78, 80, 81, 81, 81, 77, 71, 67, 71, 67, 73, 69, 69, 68, 65, 63, 59, 51, 48,\n    74, 74, 73, 72, 69, 67, 73, 74, 59, 73, 57, 72, 57, 71, 44, 67, 59, 58, 46, 46,\n    75, 77, 77, 77, 76, 74, 76, 78, 75, 80, 79, 77, 74, 74, 72, 70, 65, 62, 54, 48,\n    77, 80, 81, 82, 83, 85, 88, 88, 82, 83, 85, 82, 81, 81, 78, 73, 64, 65, 63, 53,\n    71, 72, 74, 75, 77, 79, 79, 81, 79, 79, 77, 78, 77, 73, 70, 66, 61, 56, 41, 34,\n    76, 79, 82, 84, 86, 87, 86, 85, 84, 84, 82, 82, 81, 80, 76, 71, 67, 65, 50, 46,\n    72, 75, 77, 78, 80, 81, 81, 80, 80, 80, 79, 77, 72, 67, 72, 71, 64, 60, 55, 53,\n    74, 75, 77, 77, 78, 78, 79, 79, 77, 78, 77, 77, 76, 74, 70, 69, 62, 60, 48, 46,\n    70, 72, 72, 73, 73, 73, 74, 74, 74, 75, 73, 74, 72, 68, 64, 64, 58, 52, 48, 42,\n    64, 67, 69, 71, 73, 73, 70, 71, 72, 71, 70, 69, 69, 66, 64, 63, 58, 56, 52, 47,\n    62, 66, 69, 70, 68, 57, 68, 71, 67, 70, 66, 61, 67, 68, 67, 57, 61, 49, 34, 30,\n    68, 70, 71, 72, 73, 75, 77, 73, 76, 76, 77, 76, 73, 71, 65, 64, 58, 55, 50, 42,\n    61, 61, 59, 51, 62, 64, 61, 54, 68, 65, 70, 67, 72, 73, 70, 57, 61, 55, 49, 43,\n    69, 71, 71, 71, 76, 78, 79, 78, 71, 73, 75, 68, 74, 76, 64, 61, 62, 51, 43, 36,\n    60, 60, 62, 64, 68, 67, 70, 74, 72, 71, 72, 74, 72, 70, 62, 62, 55, 55, 43, 38,\n    63, 65, 67, 69, 69, 67, 58, 65, 64, 68, 69, 68, 69, 65, 60, 56, 52, 45, 35, 31,\n    41, 41, 40, 38, 39, 38, 32, 40, 38, 46, 42, 32, 43, 38, 23, 41, 45, 37, 35, 45,\n    58, 63, 66, 69, 70, 70, 73, 73, 75, 76, 76, 76, 75, 74, 69, 63, 50, 43, 29, 34,\n    67, 70, 72, 73, 75, 76, 77, 77, 74, 74, 76, 75, 74, 73, 72, 70, 68, 65, 59, 52,\n    64, 68, 71, 72, 74, 74, 73, 72, 74, 74, 74, 74, 73, 73, 72, 72, 70, 69, 66, 64,\n    65, 67, 69, 70, 71, 71, 71, 71, 71, 71, 72, 71, 71, 70, 69, 68, 66, 64, 59, 51,\n    62, 64, 66, 67, 67, 66, 63, 65, 68, 68, 69, 70, 70, 69, 68, 66, 63, 60, 55, 50,\n    63, 65, 66, 67, 68, 67, 68, 67, 66, 67, 67, 67, 67, 66, 65, 64, 63, 61, 57, 53,\n    39, 39, 42, 45, 49, 50, 45, 44, 47, 48, 47, 48, 46, 46, 44, 45, 42, 39, 37, 33,\n    43, 44, 45, 47, 49, 51, 50, 52, 53, 50, 50, 50, 50, 47, 46, 46, 47, 43, 41, 40,\n    44, 43, 39, 25, 45, 50, 54, 54, 54, 55, 55, 56, 55, 54, 54, 53, 52, 51, 48, 45,\n    36, 46, 51, 55, 58, 60, 61, 63, 63, 63, 64, 63, 63, 63, 62, 61, 59, 57, 53, 50,\n    51, 54, 56, 57, 58, 59, 60, 60, 59, 60, 60, 59, 59, 58, 58, 56, 54, 53, 49, 46,\n    45, 48, 50, 52, 51, 53, 58, 58, 58, 59, 59, 59, 59, 59, 58, 58, 57, 54, 48, 40,\n    43, 46, 49, 52, 56, 60, 62, 61, 62, 62, 61, 60, 59, 58, 56, 55, 53, 49, 21, 35,\n    46, 47, 48, 49, 49, 50, 51, 52, 53, 53, 53, 53, 52, 51, 49, 47, 41, 35, 41, 42,\n    38, 39, 40, 41, 40, 40, 41, 38, 37, 39, 37, 35, 35, 33, 29, 19, 28, 32, 31, 14,\n    28, 28, 26, 24, 25, 28, 31, 30, 34, 31, 31, 29, 22, 31, 27, 18, 13, 19, 13, 10,\n    38, 40, 41, 41, 41, 42, 43, 43, 43, 43, 43, 43, 41, 38, 31, 18, 37, 38, 24, 30,\n    34, 37, 39, 40, 42, 41, 39, 41, 40, 40, 39, 38, 38, 36, 29, 26, 35, 33, 25, 22,\n    24, 27, 29, 30, 29, 29, 31, 28, 28, 30, 30, 32, 30, 32, 26, 20, 24, 24, 25, 22,\n    21, 24, 26, 28, 32, 34, 35, 35, 34, 34, 34, 33, 32, 28, 14, 21, 27, 14, 20, 19,\n    30, 31, 32, 33, 33, 33, 32, 29, 29, 32, 33, 33, 34, 31, 26, 23, 29, 18, 11, 13,\n    33, 35, 35, 36, 36, 36, 34, 34, 36, 34, 34, 32, 27, 20, 31, 30, 4, 26, 25, 16,\n    25, 26, 27, 26, 23, 21, 16, 24, 25, 28, 28, 29, 31, 29, 19, 27, 18, 18, 15, 10,\n    17, 17, 15, 12, 10, 15, 16, 25, 15, 19, 21, 19, 11, 14, 15, 17, 5, 13, 14, 0,\n    28, 28, 27, 27, 25, 18, 28, 26, 22, 19, 8, 21, 21, 20, 16, 19, 19, 15, 8, 5,\n    34, 34, 33, 31, 34, 37, 36, 37, 34, 30, 26, 21, 22, 26, 20, 12, 12, 16, 7, 16,\n    29, 31, 32, 33, 33, 31, 18, 19, 18, 21, 21, 21, 21, 22, 21, 22, 16, 16, 1, 16,\n    23, 23, 22, 22, 21, 24, 25, 26, 26, 28, 27, 28, 27, 25, 24, 21, 20, 16, 13, 16,\n    27, 29, 30, 31, 31, 30, 32, 32, 31, 31, 30, 26, 13, 29, 30, 22, 23, 15, 9, 12,\n    24, 26, 28, 29, 29, 28, 25, 27, 28, 29, 28, 24, 19, 27, 19, 24, 20, 11, 4, 6,\n    14, 13, 11, 9, 0, 11, 19, 19, 10, 8, 7, 15, 20, 16, 10, 15, 7, 0, 0, 10,\n    15, 14, 12, 5, 10, 15, 8, 16, 0, 12, 6, 13, 5, 8, 13, 10, 5, 11, 6, 0,\n    6, 4, 7, 11, 12, 8, 6, 0, 9, 10, 0, 9, 0, 15, 10, 7, 7, 5, 7, 7,\n    7, 11, 13, 15, 15, 12, 8, 14, 10, 14, 5, 6, 12, 5, 5, 13, 5, 6, 2, 5,\n    15, 15, 14, 14, 13, 11, 10, 0, 12, 15, 15, 18, 16, 12, 10, 15, 14, 15, 0, 2,\n    17, 16, 13, 7, 15, 20, 16, 18, 14, 14, 13, 10, 12, 10, 11, 14, 16, 15, 15, 10,\n    23, 22, 22, 20, 13, 10, 23, 21, 15, 7, 16, 16, 10, 9, 15, 0, 0, 10, 9, 9,\n    31, 32, 33, 32, 30, 28, 26, 26, 19, 20, 18, 10, 14, 0, 13, 11, 10, 3, 8, 7,\n    15, 15, 13, 8, 2, 12, 17, 17, 5, 9, 11, 12, 10, 14, 8, 0, 10, 0, 6, 9,\n    47, 48, 46, 41, 45, 42, 48, 47, 47, 48, 46, 51, 47, 43, 48, 38, 42, 27, 42, 34,\n    47, 60, 67, 71, 76, 77, 79, 80, 81, 82, 82, 81, 80, 78, 76, 73, 65, 51, 42, 38,\n    65, 71, 75, 77, 80, 82, 83, 83, 81, 81, 82, 81, 81, 79, 78, 76, 72, 70, 65, 60,\n    63, 69, 73, 76, 80, 81, 81, 79, 80, 81, 80, 80, 80, 79, 79, 78, 77, 75, 73, 71,\n    67, 71, 73, 75, 77, 78, 78, 78, 78, 78, 79, 78, 78, 77, 77, 76, 74, 72, 66, 59,\n    65, 69, 72, 74, 75, 75, 73, 72, 75, 77, 78, 78, 78, 78, 77, 75, 72, 69, 63, 57,\n    68, 71, 73, 75, 76, 76, 76, 76, 75, 76, 76, 76, 75, 75, 74, 73, 71, 69, 65, 62,\n    47, 45, 35, 42, 56, 59, 57, 53, 56, 55, 54, 55, 54, 55, 53, 52, 51, 50, 47, 44,\n    56, 56, 57, 57, 59, 60, 60, 62, 61, 61, 59, 60, 60, 59, 57, 58, 55, 54, 51, 48,\n    55, 57, 58, 56, 46, 57, 63, 65, 65, 66, 67, 66, 66, 66, 65, 64, 63, 62, 58, 55,\n    43, 51, 57, 62, 67, 70, 71, 73, 74, 74, 75, 74, 74, 74, 73, 72, 70, 69, 65, 61,\n    56, 61, 64, 67, 69, 70, 72, 72, 71, 71, 71, 71, 71, 70, 70, 69, 68, 66, 63, 60,\n    55, 58, 61, 63, 65, 63, 70, 71, 71, 72, 72, 72, 72, 72, 72, 71, 69, 67, 61, 56,\n    53, 56, 58, 61, 66, 71, 76, 76, 76, 76, 75, 75, 73, 72, 70, 69, 67, 62, 37, 51,\n    55, 59, 61, 63, 64, 64, 66, 66, 67, 67, 67, 67, 66, 65, 62, 60, 52, 50, 55, 56,\n    52, 54, 56, 57, 56, 55, 56, 55, 53, 54, 52, 52, 50, 49, 43, 31, 45, 48, 44, 28,\n    46, 47, 48, 47, 43, 44, 48, 49, 49, 48, 49, 47, 46, 45, 39, 28, 38, 42, 34, 34,\n    53, 57, 59, 61, 61, 61, 62, 62, 62, 61, 61, 60, 57, 55, 45, 45, 55, 54, 46, 46,\n    51, 54, 57, 59, 61, 62, 61, 61, 61, 60, 59, 59, 57, 55, 45, 46, 55, 52, 47, 42,\n    45, 48, 51, 52, 54, 55, 57, 56, 58, 59, 59, 59, 59, 57, 51, 47, 56, 48, 51, 47,\n    49, 51, 53, 54, 55, 57, 59, 59, 57, 56, 56, 54, 53, 50, 34, 50, 51, 38, 36, 42,\n    52, 55, 56, 57, 58, 57, 57, 56, 58, 58, 58, 58, 57, 55, 34, 52, 52, 45, 37, 30,\n    51, 54, 56, 57, 58, 58, 59, 60, 59, 58, 56, 54, 50, 48, 54, 56, 44, 52, 48, 43,\n    47, 48, 49, 48, 42, 32, 42, 46, 49, 51, 52, 52, 51, 47, 40, 48, 31, 44, 36, 29,\n    44, 44, 42, 40, 34, 35, 30, 35, 45, 43, 42, 28, 39, 13, 39, 35, 29, 33, 11, 15,\n    39, 42, 46, 49, 51, 49, 37, 48, 40, 48, 39, 37, 34, 37, 33, 32, 32, 31, 19, 4,\n    54, 56, 57, 57, 51, 44, 48, 54, 55, 54, 55, 55, 53, 51, 44, 44, 40, 42, 37, 29,\n    48, 50, 51, 52, 52, 51, 41, 40, 33, 35, 37, 38, 36, 40, 39, 39, 35, 30, 27, 17,\n    42, 44, 44, 44, 44, 43, 44, 44, 43, 45, 45, 44, 43, 41, 41, 38, 36, 31, 27, 20,\n    41, 43, 44, 45, 44, 44, 45, 46, 47, 46, 46, 45, 33, 40, 43, 36, 32, 25, 19, 16,\n    26, 25, 28, 32, 36, 35, 34, 37, 38, 40, 38, 37, 24, 35, 28, 35, 31, 26, 17, 22,\n    28, 27, 26, 23, 18, 23, 32, 27, 26, 24, 22, 23, 27, 25, 21, 16, 11, 11, 6, 6,\n    24, 26, 28, 28, 26, 23, 26, 22, 22, 21, 23, 25, 22, 21, 21, 10, 15, 10, 11, 7,\n    31, 32, 32, 31, 27, 16, 25, 23, 10, 15, 22, 9, 1, 10, 14, 14, 15, 11, 14, 7,\n    12, 19, 22, 23, 21, 21, 16, 19, 14, 10, 10, 17, 12, 7, 11, 15, 14, 2, 1, 5,\n    28, 28, 30, 30, 29, 25, 25, 24, 25, 26, 27, 23, 27, 22, 24, 23, 20, 19, 11, 12,\n    37, 38, 37, 35, 24, 30, 34, 20, 24, 31, 6, 31, 27, 30, 22, 27, 12, 21, 13, 14,\n    47, 50, 51, 51, 50, 45, 41, 40, 36, 36, 29, 28, 31, 25, 24, 21, 24, 14, 9, 10,\n    41, 42, 42, 41, 38, 40, 40, 41, 39, 36, 38, 30, 27, 34, 36, 26, 27, 24, 13, 15,\n    31, 33, 32, 30, 20, 26, 27, 26, 22, 25, 13, 20, 23, 17, 13, 20, 4, 11, 6, 7,\n    60, 59, 58, 56, 60, 63, 63, 44, 60, 60, 54, 53, 46, 40, 43, 44, 41, 40, 44, 47,\n    67, 73, 79, 82, 87, 88, 89, 92, 93, 93, 92, 91, 89, 87, 86, 85, 81, 76, 60, 44,\n    69, 77, 82, 86, 89, 92, 94, 94, 93, 93, 94, 93, 92, 92, 90, 88, 84, 80, 73, 66,\n    73, 78, 82, 86, 90, 92, 92, 90, 90, 92, 91, 91, 91, 90, 90, 88, 87, 86, 83, 80,\n    74, 78, 81, 83, 86, 88, 89, 89, 90, 89, 90, 89, 89, 88, 88, 87, 85, 84, 79, 72,\n    66, 74, 79, 82, 86, 88, 87, 84, 86, 87, 87, 88, 88, 87, 86, 84, 82, 80, 74, 68,\n    80, 83, 85, 87, 90, 90, 91, 90, 89, 90, 90, 90, 89, 89, 88, 87, 85, 83, 79, 76,\n    56, 56, 63, 68, 74, 77, 74, 67, 69, 69, 68, 68, 68, 68, 67, 65, 63, 62, 59, 55,\n    71, 73, 74, 75, 75, 75, 73, 74, 73, 75, 72, 72, 72, 71, 67, 71, 67, 65, 63, 60,\n    65, 68, 70, 70, 71, 76, 77, 79, 79, 80, 80, 80, 80, 80, 79, 78, 76, 75, 72, 68,\n    65, 70, 73, 76, 81, 83, 86, 87, 88, 89, 89, 88, 87, 87, 86, 85, 84, 83, 79, 76,\n    67, 73, 77, 80, 83, 83, 85, 86, 85, 84, 84, 83, 84, 83, 82, 81, 79, 78, 74, 72,\n    66, 70, 73, 77, 81, 80, 83, 86, 86, 84, 86, 85, 85, 84, 84, 83, 82, 80, 74, 68,\n    64, 69, 72, 76, 83, 88, 93, 93, 93, 93, 92, 92, 90, 88, 86, 85, 84, 80, 54, 66,\n    71, 76, 79, 81, 83, 83, 85, 85, 87, 87, 86, 85, 84, 82, 78, 74, 62, 70, 73, 71,\n    69, 72, 74, 75, 76, 76, 75, 73, 72, 69, 67, 64, 64, 61, 47, 51, 62, 64, 58, 50,\n    65, 67, 67, 66, 63, 64, 68, 69, 70, 71, 70, 69, 68, 67, 61, 44, 61, 64, 55, 55,\n    70, 74, 77, 79, 81, 81, 81, 80, 81, 81, 81, 81, 79, 77, 69, 61, 75, 75, 65, 67,\n    70, 73, 75, 77, 79, 80, 80, 79, 80, 78, 78, 76, 74, 72, 60, 64, 71, 69, 63, 58,\n    64, 68, 72, 74, 76, 77, 77, 73, 75, 75, 75, 75, 75, 75, 71, 67, 69, 66, 65, 59,\n    68, 71, 73, 74, 76, 78, 79, 78, 75, 75, 74, 74, 73, 70, 62, 68, 71, 58, 56, 60,\n    76, 79, 80, 81, 82, 83, 83, 82, 83, 82, 82, 81, 78, 74, 69, 77, 72, 71, 64, 57,\n    75, 78, 80, 82, 83, 83, 85, 85, 83, 84, 82, 79, 73, 66, 78, 80, 60, 75, 71, 66,\n    70, 72, 73, 73, 69, 60, 67, 65, 69, 72, 74, 74, 73, 73, 56, 68, 58, 65, 59, 41,\n    60, 60, 51, 53, 67, 69, 64, 58, 69, 64, 62, 62, 63, 44, 61, 57, 54, 53, 42, 28,\n    70, 74, 77, 79, 81, 78, 68, 76, 72, 75, 66, 62, 62, 64, 55, 57, 52, 50, 42, 19,\n    78, 81, 82, 82, 72, 79, 85, 86, 88, 88, 88, 88, 86, 82, 78, 75, 75, 74, 64, 60,\n    72, 75, 77, 78, 78, 77, 60, 72, 66, 67, 71, 73, 74, 73, 70, 66, 66, 60, 56, 51,\n    72, 74, 75, 75, 76, 76, 80, 81, 82, 82, 83, 82, 77, 73, 78, 69, 64, 59, 51, 43,\n    72, 76, 79, 81, 82, 83, 83, 83, 84, 83, 82, 79, 72, 78, 76, 73, 68, 63, 48, 49,\n    66, 70, 73, 75, 77, 78, 76, 77, 77, 78, 78, 75, 59, 74, 60, 72, 68, 58, 56, 55,\n    64, 65, 65, 65, 66, 67, 69, 67, 69, 65, 55, 64, 70, 68, 64, 62, 54, 44, 51, 50,\n    54, 57, 59, 60, 59, 57, 55, 53, 51, 57, 60, 62, 57, 24, 57, 52, 52, 48, 27, 38,\n    60, 62, 63, 64, 62, 59, 50, 48, 54, 42, 47, 44, 44, 41, 45, 38, 41, 34, 30, 22,\n    61, 63, 65, 65, 63, 59, 54, 56, 61, 49, 61, 62, 59, 49, 53, 54, 49, 49, 40, 36,\n    49, 55, 60, 63, 65, 64, 59, 67, 69, 70, 74, 73, 64, 67, 61, 67, 55, 55, 48, 49,\n    62, 64, 65, 64, 58, 58, 63, 71, 76, 73, 74, 59, 67, 60, 71, 65, 62, 57, 34, 42,\n    64, 68, 72, 75, 77, 79, 86, 83, 83, 82, 60, 73, 66, 72, 69, 64, 63, 58, 43, 35,\n    69, 72, 74, 75, 76, 77, 80, 79, 80, 76, 74, 74, 69, 75, 71, 62, 60, 56, 48, 41,\n    62, 62, 61, 59, 61, 61, 52, 64, 67, 62, 53, 62, 59, 56, 59, 61, 42, 48, 44, 40,\n    54, 54, 53, 50, 43, 45, 53, 42, 41, 37, 38, 44, 34, 43, 47, 41, 46, 45, 44, 45,\n    68, 72, 74, 75, 77, 77, 76, 75, 74, 75, 73, 72, 72, 71, 70, 68, 64, 61, 62, 63,\n    65, 67, 68, 67, 63, 60, 62, 61, 60, 56, 58, 56, 59, 58, 57, 56, 54, 55, 52, 50,\n    68, 70, 71, 72, 71, 70, 70, 70, 69, 68, 68, 68, 67, 66, 63, 60, 53, 52, 52, 47,\n    70, 72, 73, 73, 74, 75, 76, 76, 77, 77, 77, 77, 75, 74, 71, 68, 59, 55, 63, 63,\n    65, 66, 67, 67, 67, 67, 67, 69, 70, 70, 70, 70, 69, 68, 67, 66, 62, 54, 52, 57,\n    54, 56, 58, 59, 60, 61, 60, 58, 53, 53, 55, 55, 53, 53, 50, 48, 42, 32, 38, 41,\n    46, 48, 50, 49, 45, 44, 44, 36, 37, 38, 40, 39, 38, 37, 38, 32, 35, 32, 19, 24,\n    54, 54, 54, 55, 56, 57, 54, 50, 47, 48, 48, 48, 48, 45, 45, 42, 39, 34, 34, 40,\n    62, 64, 65, 65, 66, 67, 66, 67, 67, 67, 67, 66, 66, 65, 63, 62, 58, 55, 46, 38,\n    62, 63, 64, 64, 63, 62, 60, 60, 60, 60, 60, 59, 57, 55, 49, 31, 50, 52, 46, 43,\n    60, 61, 62, 63, 63, 63, 61, 61, 62, 61, 61, 60, 58, 56, 51, 44, 42, 47, 44, 36,\n    55, 56, 57, 58, 58, 58, 56, 56, 55, 55, 54, 52, 52, 50, 46, 42, 34, 38, 42, 40,\n    51, 52, 52, 52, 52, 51, 51, 51, 52, 53, 52, 52, 52, 52, 50, 49, 46, 46, 42, 10,\n    47, 49, 50, 51, 51, 50, 51, 51, 51, 50, 49, 48, 47, 45, 41, 38, 31, 36, 37, 34,\n    36, 37, 38, 38, 37, 37, 37, 36, 38, 37, 38, 38, 36, 33, 31, 30, 25, 22, 24, 23,\n    25, 26, 27, 27, 29, 28, 26, 29, 28, 26, 21, 23, 23, 20, 16, 16, 15, 21, 17, 18,\n    34, 35, 36, 37, 37, 36, 34, 35, 36, 36, 36, 35, 34, 34, 31, 28, 23, 20, 19, 20,\n    34, 35, 36, 36, 36, 37, 36, 35, 36, 34, 33, 32, 30, 24, 24, 27, 28, 27, 19, 18,\n    29, 31, 32, 32, 31, 31, 29, 33, 33, 30, 29, 31, 30, 30, 26, 27, 26, 16, 15, 19,\n    24, 25, 27, 28, 29, 27, 29, 30, 29, 29, 28, 26, 21, 25, 15, 19, 18, 16, 10, 9,\n    30, 32, 34, 35, 34, 34, 36, 36, 37, 37, 36, 36, 32, 29, 25, 27, 30, 17, 13, 15,\n    22, 23, 24, 23, 21, 23, 26, 26, 29, 24, 25, 23, 20, 20, 23, 20, 15, 6, 16, 17,\n    14, 20, 23, 24, 24, 22, 27, 16, 23, 18, 19, 12, 16, 16, 3, 11, 14, 9, 19, 19,\n    25, 25, 23, 23, 28, 24, 18, 17, 22, 21, 15, 16, 13, 12, 14, 14, 12, 11, 12, 0,\n    22, 19, 17, 23, 28, 27, 25, 23, 23, 24, 20, 19, 14, 14, 12, 11, 9, 6, 5, 4,\n    13, 9, 15, 19, 21, 22, 21, 24, 13, 20, 18, 13, 3, 17, 19, 18, 11, 1, 0, 9,\n    19, 19, 17, 10, 12, 13, 19, 6, 15, 10, 16, 7, 12, 7, 19, 8, 4, 8, 12, 11,\n    14, 15, 17, 19, 21, 22, 20, 22, 16, 17, 19, 11, 16, 19, 16, 8, 12, 20, 17, 8,\n    24, 25, 25, 25, 23, 23, 24, 22, 18, 20, 16, 13, 21, 17, 18, 6, 19, 16, 3, 17,\n    18, 15, 9, 0, 13, 14, 15, 15, 9, 17, 13, 9, 10, 11, 13, 10, 11, 9, 0, 7,\n    17, 19, 20, 19, 9, 9, 11, 8, 12, 16, 9, 11, 6, 8, 8, 2, 0, 12, 7, 8,\n    19, 21, 21, 20, 13, 5, 5, 0, 16, 12, 10, 8, 13, 12, 10, 5, 9, 0, 8, 6,\n    21, 22, 21, 19, 7, 0, 12, 11, 3, 7, 0, 9, 13, 12, 6, 1, 8, 0, 6, 0,\n    16, 19, 20, 18, 18, 17, 10, 4, 16, 0, 6, 10, 5, 7, 0, 3, 9, 0, 3, 8,\n    13, 18, 20, 20, 5, 11, 11, 6, 3, 8, 5, 0, 0, 6, 0, 10, 10, 5, 5, 4,\n    19, 24, 26, 27, 22, 5, 9, 6, 12, 0, 5, 10, 6, 10, 6, 11, 5, 3, 0, 0,\n    21, 23, 24, 23, 20, 12, 16, 13, 14, 12, 11, 0, 3, 11, 3, 13, 7, 10, 2, 5,\n    16, 17, 18, 17, 13, 6, 7, 13, 10, 9, 7, 4, 4, 7, 9, 7, 3, 5, 6, 2,\n    15, 16, 14, 11, 8, 11, 5, 0, 12, 3, 6, 0, 8, 6, 9, 2, 2, 5, 0, 0,\n    53, 60, 62, 64, 63, 58, 59, 56, 47, 56, 50, 56, 50, 53, 50, 48, 50, 41, 48, 44,\n    62, 69, 74, 78, 83, 85, 86, 84, 82, 83, 81, 81, 80, 79, 78, 76, 71, 68, 71, 70,\n    57, 62, 70, 74, 76, 72, 70, 69, 68, 64, 63, 64, 65, 65, 64, 63, 63, 62, 61, 59,\n    68, 74, 77, 79, 81, 81, 78, 78, 78, 76, 76, 75, 74, 73, 71, 68, 61, 58, 61, 58,\n    71, 76, 80, 82, 83, 84, 86, 86, 88, 87, 87, 86, 85, 84, 82, 79, 68, 66, 74, 74,\n    64, 70, 74, 77, 78, 78, 78, 79, 81, 81, 80, 80, 80, 79, 78, 76, 72, 66, 60, 67,\n    66, 68, 69, 70, 71, 72, 73, 72, 68, 65, 66, 66, 65, 65, 64, 62, 59, 54, 41, 50,\n    57, 59, 61, 61, 61, 56, 57, 53, 51, 53, 51, 53, 54, 50, 50, 49, 45, 40, 31, 29,\n    64, 67, 68, 68, 69, 70, 71, 67, 60, 61, 62, 62, 62, 59, 58, 57, 53, 50, 48, 52,\n    68, 73, 76, 78, 80, 81, 82, 82, 83, 83, 82, 82, 81, 80, 79, 77, 74, 70, 63, 57,\n    70, 75, 77, 78, 79, 79, 75, 75, 76, 75, 75, 74, 73, 71, 64, 53, 65, 66, 58, 57,\n    71, 75, 77, 78, 79, 80, 79, 78, 79, 79, 78, 78, 76, 74, 70, 64, 56, 63, 61, 55,\n    66, 71, 73, 75, 76, 77, 76, 73, 75, 73, 73, 73, 72, 71, 69, 65, 59, 42, 56, 56,\n    64, 68, 71, 72, 73, 73, 71, 71, 70, 71, 72, 72, 72, 72, 71, 70, 68, 67, 62, 49,\n    61, 65, 68, 70, 73, 73, 73, 74, 73, 73, 73, 72, 71, 69, 67, 63, 52, 51, 57, 54,\n    59, 61, 61, 61, 61, 62, 63, 63, 63, 63, 62, 62, 60, 59, 56, 53, 48, 29, 52, 49,\n    54, 56, 56, 56, 55, 53, 51, 54, 52, 52, 52, 51, 50, 49, 48, 45, 40, 38, 42, 40,\n    58, 61, 63, 63, 62, 61, 61, 62, 62, 62, 62, 61, 60, 58, 55, 52, 43, 44, 47, 45,\n    60, 64, 67, 68, 69, 69, 68, 67, 67, 66, 65, 64, 63, 60, 54, 48, 53, 55, 53, 43,\n    48, 55, 60, 62, 63, 63, 64, 64, 63, 62, 62, 62, 61, 60, 57, 56, 56, 46, 44, 35,\n    58, 62, 63, 63, 63, 64, 64, 65, 65, 65, 63, 63, 61, 59, 54, 49, 51, 56, 49, 45,\n    57, 62, 65, 68, 70, 71, 70, 71, 71, 71, 70, 68, 65, 57, 59, 65, 62, 49, 50, 50,\n    48, 47, 49, 53, 56, 55, 57, 59, 60, 59, 55, 58, 56, 52, 50, 49, 43, 48, 47, 31,\n    58, 60, 60, 59, 50, 52, 52, 51, 43, 51, 40, 45, 30, 36, 40, 42, 43, 33, 36, 34,\n    59, 60, 61, 62, 60, 56, 58, 58, 57, 56, 54, 53, 50, 46, 14, 43, 41, 32, 32, 29,\n    58, 59, 59, 58, 56, 56, 45, 52, 49, 51, 35, 43, 43, 38, 43, 39, 32, 24, 17, 22,\n    45, 49, 50, 51, 52, 50, 46, 45, 41, 44, 39, 39, 39, 37, 35, 28, 26, 24, 17, 23,\n    43, 46, 47, 47, 46, 47, 51, 49, 48, 47, 45, 44, 40, 42, 39, 42, 33, 41, 31, 32,\n    46, 48, 50, 50, 50, 50, 49, 47, 44, 40, 35, 36, 45, 45, 35, 41, 40, 38, 34, 29,\n    35, 38, 41, 43, 44, 43, 40, 35, 37, 37, 34, 32, 28, 33, 30, 29, 24, 29, 19, 20,\n    40, 42, 43, 42, 40, 37, 32, 38, 36, 36, 35, 33, 26, 29, 31, 28, 22, 5, 4, 13,\n    21, 22, 32, 35, 35, 31, 34, 29, 29, 17, 8, 25, 31, 31, 20, 28, 26, 24, 18, 13,\n    39, 42, 43, 43, 40, 36, 36, 34, 29, 30, 23, 23, 29, 29, 18, 22, 13, 16, 15, 10,\n    34, 35, 35, 33, 29, 31, 27, 14, 3, 21, 20, 20, 14, 18, 17, 16, 13, 10, 5, 6,\n    24, 24, 24, 26, 31, 31, 11, 27, 26, 14, 12, 12, 17, 21, 7, 13, 11, 0, 2, 8,\n    40, 43, 44, 45, 41, 29, 27, 36, 34, 26, 25, 20, 20, 21, 17, 15, 13, 5, 0, 11,\n    38, 39, 38, 34, 29, 38, 32, 41, 28, 27, 34, 30, 25, 30, 30, 25, 25, 19, 9, 7,\n    25, 28, 30, 31, 31, 32, 31, 33, 32, 30, 12, 28, 23, 21, 26, 26, 19, 18, 10, 0,\n    22, 24, 31, 35, 36, 30, 29, 26, 25, 8, 23, 27, 15, 20, 22, 24, 18, 15, 11, 9,\n    33, 34, 33, 29, 23, 27, 23, 27, 19, 21, 24, 14, 23, 25, 18, 21, 9, 8, 4, 3,\n    59, 67, 71, 73, 73, 68, 66, 67, 48, 65, 55, 66, 55, 63, 58, 53, 59, 47, 49, 54,\n    74, 80, 85, 88, 93, 95, 95, 93, 91, 92, 91, 91, 89, 89, 87, 85, 79, 77, 79, 77,\n    70, 73, 79, 84, 86, 83, 77, 80, 73, 65, 65, 65, 59, 64, 65, 68, 71, 72, 71, 69,\n    72, 80, 84, 87, 90, 91, 89, 90, 89, 87, 86, 85, 84, 82, 79, 74, 66, 63, 66, 64,\n    81, 86, 89, 91, 92, 93, 95, 96, 96, 96, 95, 94, 93, 92, 90, 87, 75, 75, 83, 83,\n    71, 78, 83, 86, 88, 88, 88, 88, 90, 90, 90, 89, 89, 88, 87, 86, 82, 77, 67, 75,\n    75, 78, 79, 81, 83, 84, 84, 83, 79, 79, 77, 78, 76, 74, 72, 69, 66, 61, 59, 62,\n    68, 70, 71, 70, 70, 69, 65, 67, 62, 65, 65, 66, 65, 64, 62, 60, 57, 53, 31, 47,\n    73, 77, 79, 80, 80, 81, 82, 78, 73, 75, 75, 74, 73, 72, 71, 68, 64, 60, 58, 61,\n    78, 83, 87, 89, 91, 92, 93, 93, 94, 94, 93, 93, 92, 91, 89, 87, 84, 80, 74, 69,\n    80, 85, 88, 89, 90, 90, 87, 87, 87, 87, 87, 85, 84, 82, 75, 67, 75, 77, 67, 66,\n    82, 86, 88, 89, 91, 91, 90, 89, 91, 91, 90, 89, 87, 86, 81, 74, 67, 74, 71, 65,\n    78, 82, 85, 87, 89, 90, 91, 86, 87, 83, 85, 84, 84, 82, 80, 76, 69, 55, 66, 67,\n    75, 81, 84, 85, 85, 85, 83, 82, 82, 84, 84, 85, 85, 85, 85, 84, 81, 79, 72, 59,\n    74, 79, 82, 85, 87, 87, 87, 87, 87, 86, 84, 84, 82, 81, 78, 75, 64, 60, 67, 64,\n    73, 75, 76, 76, 76, 78, 78, 77, 77, 76, 76, 75, 73, 71, 67, 65, 61, 53, 63, 61,\n    68, 70, 70, 70, 68, 66, 67, 69, 69, 68, 67, 68, 66, 65, 64, 60, 53, 53, 56, 51,\n    72, 76, 78, 78, 78, 77, 78, 79, 79, 79, 79, 77, 75, 74, 70, 67, 56, 58, 61, 62,\n    75, 79, 82, 83, 84, 84, 83, 83, 83, 83, 82, 81, 79, 77, 71, 55, 67, 69, 67, 55,\n    63, 71, 76, 79, 80, 80, 81, 81, 81, 81, 81, 81, 79, 78, 74, 73, 73, 66, 61, 52,\n    74, 79, 81, 81, 81, 82, 82, 83, 82, 82, 81, 81, 79, 77, 71, 62, 62, 71, 64, 59,\n    76, 80, 84, 86, 89, 90, 89, 89, 89, 88, 87, 85, 81, 74, 76, 82, 79, 66, 62, 64,\n    67, 67, 69, 73, 75, 74, 78, 81, 81, 80, 74, 79, 75, 70, 66, 68, 61, 66, 65, 52,\n    76, 79, 79, 77, 59, 66, 72, 73, 67, 73, 67, 70, 61, 54, 60, 64, 63, 51, 58, 55,\n    78, 79, 79, 81, 82, 80, 77, 82, 81, 80, 78, 76, 74, 68, 57, 65, 62, 58, 54, 52,\n    78, 81, 82, 82, 79, 80, 79, 76, 66, 66, 65, 61, 57, 57, 58, 50, 52, 39, 40, 30,\n    73, 74, 71, 68, 79, 81, 78, 77, 77, 79, 73, 70, 71, 68, 69, 67, 58, 61, 52, 39,\n    58, 54, 58, 63, 67, 63, 54, 58, 48, 54, 58, 57, 62, 60, 61, 59, 57, 48, 47, 26,\n    67, 71, 73, 74, 75, 75, 77, 76, 72, 72, 71, 67, 60, 68, 68, 63, 59, 64, 53, 50,\n    73, 76, 78, 78, 79, 79, 79, 79, 77, 76, 72, 64, 71, 74, 61, 70, 68, 68, 63, 58,\n    57, 63, 67, 69, 70, 69, 68, 65, 65, 64, 61, 60, 48, 62, 64, 39, 57, 58, 41, 47,\n    63, 65, 66, 66, 62, 60, 64, 63, 56, 63, 64, 62, 54, 60, 56, 56, 51, 46, 42, 32,\n    54, 58, 61, 64, 68, 69, 68, 68, 67, 65, 62, 51, 61, 65, 49, 62, 58, 56, 51, 46,\n    61, 63, 65, 65, 63, 62, 64, 61, 60, 59, 55, 50, 51, 54, 49, 50, 44, 43, 42, 28,\n    61, 62, 62, 62, 59, 55, 41, 49, 48, 44, 50, 50, 51, 37, 38, 35, 44, 36, 32, 22,\n    42, 47, 51, 51, 48, 39, 41, 38, 34, 43, 48, 35, 42, 44, 40, 34, 28, 35, 30, 21,\n    55, 54, 53, 59, 67, 69, 67, 62, 53, 60, 62, 60, 57, 56, 51, 54, 57, 43, 41, 11,\n    60, 62, 62, 60, 56, 62, 65, 63, 61, 66, 65, 47, 60, 49, 50, 45, 40, 38, 30, 20,\n    52, 54, 55, 54, 54, 54, 61, 67, 62, 68, 62, 62, 57, 50, 60, 54, 51, 43, 30, 30,\n    52, 54, 56, 58, 63, 64, 64, 59, 59, 56, 61, 61, 52, 60, 59, 57, 50, 42, 25, 34,\n    59, 63, 66, 67, 65, 61, 57, 44, 54, 53, 52, 53, 53, 51, 51, 48, 47, 50, 43, 39,\n    60, 62, 68, 70, 72, 74, 70, 70, 71, 69, 68, 68, 67, 65, 62, 58, 58, 50, 44, 42,\n    69, 73, 75, 76, 78, 79, 79, 78, 75, 73, 68, 67, 63, 58, 48, 43, 21, 36, 40, 43,\n    65, 69, 71, 71, 71, 72, 73, 73, 74, 74, 74, 73, 71, 69, 67, 65, 65, 62, 58, 56,\n    57, 59, 62, 64, 65, 64, 68, 71, 70, 71, 72, 71, 70, 68, 65, 62, 51, 53, 57, 55,\n    60, 62, 61, 57, 55, 60, 64, 65, 61, 62, 62, 61, 60, 59, 57, 55, 49, 45, 51, 52,\n    58, 61, 63, 66, 68, 69, 71, 71, 71, 71, 70, 69, 67, 64, 51, 60, 68, 66, 58, 59,\n    48, 52, 56, 60, 64, 63, 61, 60, 59, 59, 57, 55, 53, 53, 48, 41, 38, 27, 35, 37,\n    54, 56, 58, 57, 54, 53, 56, 54, 52, 48, 51, 51, 50, 47, 41, 41, 47, 48, 40, 42,\n    52, 53, 50, 42, 48, 52, 51, 51, 52, 54, 54, 53, 52, 51, 48, 46, 45, 45, 33, 34,\n    51, 53, 53, 55, 56, 57, 56, 55, 50, 46, 47, 49, 47, 47, 45, 44, 41, 38, 31, 21,\n    53, 56, 57, 57, 56, 52, 46, 33, 43, 41, 44, 47, 46, 45, 43, 41, 29, 20, 26, 26,\n    51, 52, 54, 56, 59, 59, 60, 60, 60, 61, 58, 60, 59, 58, 54, 51, 34, 32, 36, 41,\n    50, 54, 56, 57, 58, 58, 58, 58, 58, 59, 58, 57, 54, 50, 47, 49, 50, 48, 42, 39,\n    37, 42, 45, 46, 46, 45, 44, 44, 46, 46, 45, 44, 45, 44, 39, 36, 38, 28, 37, 36,\n    39, 42, 43, 44, 44, 43, 44, 45, 45, 45, 44, 44, 41, 37, 36, 39, 35, 39, 34, 29,\n    32, 33, 33, 30, 11, 20, 22, 21, 20, 25, 23, 20, 23, 10, 20, 11, 13, 18, 12, 9,\n    24, 23, 22, 22, 26, 28, 26, 25, 20, 23, 24, 22, 19, 17, 10, 18, 13, 20, 17, 7,\n    26, 30, 32, 34, 31, 27, 29, 32, 28, 27, 27, 13, 31, 30, 28, 21, 19, 26, 8, 12,\n    31, 33, 30, 19, 30, 13, 30, 29, 31, 26, 24, 25, 26, 23, 24, 23, 11, 22, 13, 0,\n    15, 25, 29, 29, 29, 30, 31, 29, 31, 30, 28, 27, 27, 23, 14, 24, 16, 12, 12, 13,\n    21, 23, 23, 23, 23, 24, 27, 22, 24, 23, 11, 23, 19, 15, 17, 11, 10, 22, 13, 13,\n    27, 27, 26, 26, 27, 25, 26, 27, 27, 24, 16, 16, 22, 21, 11, 21, 18, 23, 13, 19,\n    23, 24, 21, 17, 20, 17, 14, 18, 12, 14, 12, 20, 12, 1, 13, 10, 8, 7, 10, 9,\n    28, 31, 32, 31, 25, 26, 31, 27, 27, 20, 24, 22, 21, 15, 15, 18, 5, 6, 4, 4,\n    24, 21, 17, 18, 19, 20, 19, 20, 7, 7, 19, 7, 17, 16, 16, 15, 10, 7, 0, 9,\n    0, 9, 10, 8, 12, 11, 10, 16, 22, 17, 19, 14, 9, 17, 13, 8, 13, 4, 10, 0,\n    15, 19, 22, 23, 24, 23, 19, 20, 11, 12, 11, 14, 21, 15, 19, 6, 15, 12, 3, 1,\n    14, 19, 22, 21, 18, 20, 21, 19, 15, 12, 14, 15, 18, 12, 19, 13, 11, 0, 6, 11,\n    17, 17, 17, 17, 10, 9, 13, 8, 1, 11, 0, 13, 16, 10, 9, 0, 7, 7, 9, 0,\n    15, 12, 5, 0, 10, 12, 6, 9, 6, 11, 13, 13, 15, 0, 12, 11, 2, 2, 6, 10,\n    11, 10, 9, 1, 4, 9, 11, 11, 12, 7, 14, 12, 10, 11, 0, 11, 6, 3, 0, 9,\n    16, 14, 9, 0, 1, 8, 0, 1, 11, 0, 0, 5, 5, 9, 13, 16, 12, 13, 13, 9,\n    14, 14, 11, 3, 5, 5, 5, 7, 0, 10, 7, 7, 10, 12, 4, 3, 8, 6, 0, 6,\n    19, 16, 8, 12, 10, 9, 13, 9, 13, 17, 11, 13, 4, 0, 0, 12, 10, 3, 8, 5,\n    14, 17, 21, 22, 15, 16, 18, 16, 11, 12, 14, 9, 11, 8, 14, 7, 0, 9, 6, 0,\n    8, 7, 8, 8, 15, 16, 11, 8, 12, 6, 8, 4, 6, 3, 11, 0, 4, 7, 7, 0,\n    12, 9, 7, 7, 9, 12, 0, 10, 12, 3, 0, 10, 8, 8, 12, 1, 1, 7, 0, 2,\n    5, 4, 7, 5, 6, 9, 0, 1, 9, 0, 7, 9, 8, 0, 4, 6, 0, 0, 7, 11,\n    9, 1, 2, 3, 0, 7, 10, 8, 10, 11, 0, 0, 7, 6, 7, 5, 0, 4, 0, 0,\n    55, 63, 71, 75, 77, 73, 73, 45, 68, 65, 60, 60, 63, 64, 62, 62, 61, 58, 54, 54,\n    69, 71, 70, 77, 84, 85, 84, 82, 84, 82, 81, 80, 80, 78, 76, 73, 67, 59, 44, 50,\n    74, 81, 85, 87, 89, 90, 90, 90, 88, 84, 80, 77, 72, 66, 62, 54, 46, 33, 54, 59,\n    72, 79, 82, 84, 83, 83, 85, 86, 86, 86, 86, 86, 85, 84, 82, 80, 78, 74, 69, 63,\n    70, 71, 73, 76, 80, 79, 82, 84, 85, 85, 86, 86, 85, 84, 82, 79, 69, 64, 72, 68,\n    69, 75, 78, 77, 71, 73, 80, 81, 78, 78, 78, 77, 76, 76, 74, 73, 68, 63, 66, 67,\n    68, 74, 77, 79, 84, 86, 87, 87, 87, 86, 85, 85, 83, 80, 68, 72, 82, 80, 70, 71,\n    63, 67, 70, 73, 79, 81, 78, 78, 76, 76, 74, 70, 71, 70, 66, 59, 43, 49, 53, 54,\n    67, 72, 76, 77, 76, 75, 76, 75, 71, 69, 70, 69, 67, 64, 56, 56, 62, 64, 57, 61,\n    68, 73, 75, 73, 48, 70, 72, 72, 72, 73, 74, 74, 73, 72, 69, 66, 64, 65, 57, 52,\n    67, 72, 74, 74, 75, 77, 77, 75, 71, 66, 65, 68, 65, 67, 64, 62, 59, 57, 49, 40,\n    67, 73, 76, 77, 76, 73, 68, 62, 65, 59, 51, 61, 56, 52, 55, 50, 45, 43, 50, 53,\n    68, 72, 73, 75, 81, 83, 82, 82, 84, 85, 79, 85, 84, 82, 78, 77, 68, 60, 63, 58,\n    69, 74, 78, 81, 83, 83, 83, 83, 82, 83, 82, 80, 76, 67, 71, 69, 76, 70, 65, 62,\n    60, 62, 68, 72, 73, 73, 72, 71, 71, 70, 69, 68, 67, 64, 57, 59, 62, 61, 59, 60,\n    63, 68, 70, 72, 73, 73, 73, 73, 73, 73, 72, 70, 66, 57, 67, 69, 63, 66, 60, 52,\n    64, 67, 68, 68, 63, 56, 56, 57, 56, 58, 56, 54, 49, 41, 53, 52, 50, 42, 36, 40,\n    47, 50, 51, 42, 54, 56, 55, 55, 53, 51, 35, 39, 46, 50, 52, 37, 56, 49, 45, 45,\n    35, 51, 57, 57, 56, 55, 56, 58, 52, 52, 57, 59, 58, 54, 51, 49, 54, 50, 26, 44,\n    65, 70, 72, 73, 74, 74, 73, 72, 71, 70, 61, 66, 70, 63, 70, 68, 61, 66, 62, 55,\n    57, 62, 67, 69, 69, 70, 70, 71, 70, 68, 57, 62, 70, 62, 61, 65, 63, 53, 59, 47,\n    56, 56, 50, 49, 61, 65, 64, 64, 64, 62, 58, 55, 61, 54, 59, 56, 55, 34, 46, 46,\n    48, 55, 59, 61, 57, 57, 60, 63, 67, 64, 48, 63, 67, 55, 56, 60, 62, 59, 43, 47,\n    65, 67, 67, 66, 60, 60, 62, 64, 62, 61, 54, 49, 53, 60, 53, 49, 55, 55, 35, 49,\n    59, 46, 59, 62, 32, 62, 66, 63, 63, 63, 62, 60, 56, 45, 49, 41, 52, 46, 40, 24,\n    68, 72, 74, 74, 68, 52, 63, 68, 54, 54, 49, 35, 52, 47, 43, 49, 43, 25, 23, 20,\n    53, 54, 46, 55, 63, 65, 65, 65, 64, 64, 60, 60, 57, 50, 50, 56, 35, 46, 30, 26,\n    43, 53, 60, 62, 60, 58, 55, 54, 53, 50, 56, 48, 54, 51, 52, 46, 47, 48, 35, 37,\n    44, 47, 52, 56, 59, 60, 58, 55, 42, 48, 54, 29, 53, 54, 49, 48, 41, 41, 42, 33,\n    46, 49, 48, 42, 40, 45, 39, 40, 34, 46, 48, 42, 30, 43, 46, 42, 40, 34, 24, 23,\n    43, 40, 40, 46, 48, 45, 44, 46, 44, 40, 42, 39, 42, 42, 39, 36, 34, 24, 21, 13,\n    46, 50, 50, 49, 50, 51, 48, 50, 49, 52, 45, 49, 48, 49, 48, 45, 40, 33, 27, 26,\n    36, 38, 38, 38, 41, 41, 31, 29, 23, 21, 8, 30, 25, 20, 30, 29, 17, 20, 9, 13,\n    48, 52, 53, 52, 43, 39, 37, 30, 29, 37, 28, 23, 29, 28, 32, 26, 21, 26, 21, 20,\n    44, 45, 47, 48, 40, 37, 38, 34, 42, 37, 24, 32, 29, 38, 33, 30, 22, 22, 7, 11,\n    48, 49, 52, 56, 58, 55, 53, 49, 51, 45, 52, 51, 48, 45, 39, 45, 47, 38, 35, 19,\n    49, 53, 55, 55, 50, 50, 42, 38, 42, 46, 47, 37, 35, 40, 32, 31, 7, 21, 16, 14,\n    40, 44, 46, 48, 47, 49, 46, 47, 45, 44, 48, 39, 43, 43, 39, 38, 27, 25, 24, 17,\n    31, 38, 42, 43, 38, 45, 48, 40, 37, 28, 43, 22, 33, 39, 32, 3, 20, 27, 7, 9,\n    25, 33, 37, 37, 28, 39, 39, 36, 22, 28, 36, 16, 32, 31, 30, 16, 10, 18, 11, 10,\n    69, 73, 78, 82, 86, 84, 79, 61, 73, 61, 64, 53, 67, 67, 66, 67, 65, 64, 61, 57,\n    78, 82, 82, 84, 90, 92, 89, 86, 89, 88, 86, 86, 85, 84, 81, 79, 73, 66, 35, 56,\n    79, 85, 89, 91, 94, 95, 95, 93, 92, 87, 83, 81, 76, 70, 67, 61, 52, 29, 58, 63,\n    75, 82, 86, 87, 88, 89, 90, 91, 91, 91, 92, 92, 91, 90, 89, 88, 84, 81, 73, 67,\n    76, 78, 77, 77, 83, 85, 87, 89, 89, 89, 91, 90, 89, 88, 86, 83, 74, 71, 76, 73,\n    75, 80, 83, 84, 76, 78, 84, 86, 82, 80, 80, 80, 80, 79, 78, 76, 73, 68, 70, 72,\n    72, 78, 82, 84, 89, 92, 93, 93, 93, 92, 91, 91, 89, 86, 74, 78, 87, 86, 76, 76,\n    66, 70, 74, 78, 85, 87, 85, 85, 83, 84, 82, 80, 80, 76, 71, 66, 55, 53, 60, 62,\n    71, 78, 81, 83, 83, 82, 82, 81, 77, 78, 76, 76, 74, 70, 62, 63, 69, 70, 63, 66,\n    74, 79, 82, 81, 71, 75, 79, 78, 80, 81, 83, 83, 82, 81, 79, 75, 71, 70, 61, 58,\n    73, 78, 80, 81, 82, 84, 84, 83, 80, 78, 77, 80, 77, 78, 75, 75, 69, 67, 57, 53,\n    71, 78, 82, 83, 81, 79, 71, 58, 59, 66, 66, 67, 59, 61, 57, 49, 50, 51, 58, 59,\n    73, 77, 77, 78, 87, 90, 86, 86, 91, 92, 84, 91, 89, 87, 82, 82, 74, 63, 67, 65,\n    73, 79, 84, 87, 90, 90, 90, 89, 90, 89, 88, 87, 82, 72, 78, 75, 83, 77, 69, 66,\n    65, 68, 74, 78, 81, 81, 80, 80, 80, 79, 80, 79, 77, 74, 68, 69, 70, 70, 66, 68,\n    70, 76, 79, 80, 81, 81, 81, 82, 82, 82, 81, 80, 75, 65, 75, 77, 70, 75, 69, 63,\n    73, 76, 77, 77, 71, 65, 65, 64, 65, 65, 63, 61, 54, 51, 58, 56, 57, 51, 41, 46,\n    60, 61, 58, 52, 54, 61, 58, 61, 57, 49, 56, 56, 61, 60, 58, 38, 64, 53, 51, 51,\n    59, 55, 61, 63, 65, 67, 67, 68, 64, 68, 69, 68, 71, 67, 42, 52, 64, 63, 47, 56,\n    73, 78, 80, 81, 81, 82, 80, 80, 78, 77, 68, 72, 76, 71, 77, 74, 68, 72, 68, 61,\n    62, 70, 75, 78, 79, 78, 78, 79, 80, 78, 72, 68, 79, 74, 71, 75, 71, 59, 67, 56,\n    67, 68, 64, 59, 72, 74, 74, 73, 71, 71, 67, 67, 71, 64, 66, 64, 61, 53, 55, 52,\n    43, 65, 71, 74, 71, 69, 75, 76, 78, 76, 63, 70, 75, 49, 67, 68, 71, 68, 41, 55,\n    77, 79, 80, 78, 72, 71, 76, 77, 75, 73, 64, 65, 65, 72, 60, 59, 67, 67, 48, 60,\n    75, 68, 66, 73, 65, 72, 76, 73, 73, 71, 73, 70, 66, 50, 58, 51, 61, 55, 48, 32,\n    80, 85, 87, 88, 83, 68, 77, 81, 58, 66, 58, 50, 65, 59, 53, 58, 52, 44, 25, 26,\n    66, 69, 66, 55, 74, 77, 77, 77, 75, 74, 71, 72, 63, 63, 57, 62, 51, 57, 41, 43,\n    50, 60, 71, 74, 73, 70, 69, 68, 63, 57, 70, 63, 67, 59, 66, 58, 60, 59, 40, 48,\n    57, 57, 64, 70, 73, 73, 71, 65, 58, 62, 67, 60, 64, 67, 61, 59, 46, 54, 53, 39,\n    61, 65, 66, 63, 47, 61, 60, 62, 57, 52, 66, 56, 58, 62, 62, 51, 58, 41, 21, 31,\n    53, 48, 59, 64, 66, 62, 57, 62, 58, 54, 60, 54, 56, 56, 57, 54, 47, 40, 23, 24,\n    62, 65, 65, 64, 66, 66, 62, 62, 58, 64, 53, 65, 61, 64, 62, 59, 50, 39, 41, 41,\n    50, 52, 49, 41, 53, 54, 52, 47, 22, 34, 43, 47, 38, 41, 41, 42, 34, 39, 30, 18,\n    63, 67, 69, 68, 61, 51, 53, 50, 54, 51, 46, 46, 47, 50, 45, 41, 35, 38, 32, 18,\n    58, 62, 64, 65, 58, 53, 54, 50, 57, 54, 44, 43, 46, 53, 51, 36, 34, 24, 25, 28,\n    51, 59, 70, 75, 76, 72, 69, 59, 70, 59, 70, 66, 63, 64, 61, 58, 60, 48, 48, 33,\n    58, 65, 66, 61, 68, 70, 62, 70, 55, 67, 65, 63, 62, 57, 47, 45, 39, 35, 23, 20,\n    58, 64, 67, 67, 64, 66, 62, 63, 65, 64, 66, 59, 61, 58, 55, 56, 43, 43, 34, 12,\n    47, 49, 58, 61, 55, 60, 65, 57, 50, 50, 60, 58, 50, 55, 52, 48, 37, 44, 24, 22,\n    43, 50, 54, 53, 41, 54, 57, 56, 33, 51, 56, 50, 53, 51, 47, 33, 28, 33, 26, 22,\n    62, 67, 71, 73, 73, 73, 76, 76, 77, 78, 78, 77, 72, 62, 56, 48, 40, 43, 46, 45,\n    69, 70, 71, 71, 71, 70, 71, 68, 69, 70, 69, 67, 64, 60, 48, 50, 57, 56, 42, 37,\n    66, 70, 72, 73, 73, 72, 74, 74, 73, 72, 70, 69, 67, 66, 61, 56, 58, 61, 60, 50,\n    66, 70, 71, 71, 67, 56, 63, 67, 58, 54, 61, 58, 58, 58, 58, 57, 53, 50, 50, 46,\n    68, 71, 71, 68, 68, 66, 66, 65, 68, 68, 68, 67, 66, 65, 62, 59, 55, 48, 46, 48,\n    56, 53, 55, 65, 71, 73, 73, 70, 71, 69, 68, 66, 63, 60, 48, 52, 59, 59, 50, 43,\n    53, 56, 59, 62, 63, 64, 64, 64, 63, 63, 62, 62, 61, 60, 58, 56, 51, 43, 36, 33,\n    38, 37, 38, 41, 45, 42, 42, 43, 44, 44, 43, 38, 27, 26, 38, 39, 35, 30, 26, 23,\n    50, 53, 53, 53, 53, 52, 53, 51, 49, 49, 48, 45, 41, 34, 23, 36, 40, 38, 31, 25,\n    55, 56, 57, 57, 56, 55, 54, 54, 53, 52, 51, 51, 49, 47, 42, 33, 34, 30, 34, 33,\n    48, 50, 53, 55, 56, 52, 54, 53, 51, 50, 47, 41, 40, 47, 49, 45, 42, 45, 37, 37,\n    44, 46, 44, 39, 34, 42, 33, 40, 34, 32, 20, 25, 30, 33, 35, 33, 30, 30, 17, 18,\n    36, 38, 37, 36, 34, 31, 31, 33, 29, 27, 26, 31, 38, 41, 40, 37, 35, 31, 13, 31,\n    33, 37, 38, 39, 41, 40, 40, 40, 40, 38, 35, 30, 20, 33, 33, 21, 28, 15, 4, 21,\n    26, 30, 32, 33, 32, 33, 31, 31, 30, 31, 29, 24, 22, 25, 24, 19, 12, 21, 18, 17,\n    20, 23, 23, 16, 26, 32, 30, 26, 27, 25, 21, 19, 19, 17, 23, 25, 9, 24, 10, 8,\n    19, 17, 20, 20, 21, 22, 20, 18, 18, 21, 19, 22, 18, 9, 19, 17, 16, 19, 15, 0,\n    26, 27, 27, 28, 27, 28, 16, 26, 21, 19, 17, 14, 22, 23, 22, 23, 0, 13, 17, 12,\n    27, 25, 24, 23, 26, 19, 18, 21, 18, 26, 27, 29, 23, 16, 18, 15, 24, 19, 18, 6,\n    33, 33, 34, 34, 31, 26, 30, 28, 26, 23, 25, 26, 28, 28, 25, 22, 17, 17, 9, 11,\n    28, 32, 34, 34, 33, 25, 24, 29, 29, 28, 25, 20, 29, 34, 33, 27, 29, 25, 22, 17,\n    25, 25, 23, 18, 16, 27, 30, 24, 28, 22, 0, 20, 24, 9, 27, 14, 22, 20, 13, 12,\n    16, 18, 20, 22, 21, 16, 14, 14, 11, 17, 18, 16, 11, 20, 12, 14, 11, 16, 8, 7,\n    29, 30, 29, 27, 15, 15, 14, 11, 17, 18, 15, 3, 15, 12, 14, 9, 0, 2, 0, 12,\n    27, 24, 17, 12, 11, 1, 18, 11, 16, 10, 13, 8, 13, 6, 7, 8, 2, 9, 9, 9,\n    20, 19, 17, 12, 18, 22, 13, 10, 18, 10, 10, 9, 12, 9, 8, 8, 10, 6, 7, 9,\n    24, 23, 17, 6, 18, 24, 12, 17, 7, 15, 17, 0, 8, 4, 13, 15, 11, 9, 1, 1,\n    23, 23, 20, 12, 9, 19, 7, 4, 15, 16, 16, 16, 13, 18, 12, 8, 8, 10, 8, 12,\n    19, 20, 16, 8, 17, 15, 11, 11, 12, 12, 19, 11, 17, 11, 9, 6, 10, 1, 12, 0,\n    20, 19, 13, 3, 9, 14, 19, 19, 18, 21, 21, 17, 22, 13, 7, 13, 11, 9, 10, 14,\n    18, 18, 18, 19, 16, 17, 19, 19, 16, 22, 18, 17, 16, 7, 17, 5, 9, 8, 14, 11,\n    25, 26, 24, 21, 16, 14, 18, 10, 7, 0, 11, 17, 12, 0, 12, 4, 0, 3, 7, 0,\n    17, 22, 21, 15, 3, 19, 7, 12, 8, 7, 2, 0, 0, 14, 7, 11, 10, 8, 4, 11,\n    19, 15, 13, 7, 9, 9, 10, 7, 6, 14, 6, 3, 0, 5, 7, 0, 7, 7, 8, 6,\n    22, 21, 19, 17, 11, 4, 11, 12, 0, 9, 8, 8, 7, 0, 7, 8, 0, 2, 9, 5,\n    20, 25, 27, 26, 18, 13, 10, 14, 18, 19, 18, 12, 15, 18, 15, 16, 14, 18, 18, 14,\n    0, 8, 11, 7, 11, 0, 12, 9, 6, 9, 11, 7, 0, 7, 0, 5, 0, 0, 0, 2,\n    17, 20, 22, 21, 4, 11, 9, 0, 10, 0, 10, 10, 0, 9, 11, 3, 4, 2, 2, 7,\n    6, 0, 7, 13, 11, 1, 5, 6, 4, 11, 15, 2, 1, 2, 1, 5, 5, 4, 2, 4,\n    12, 13, 10, 8, 11, 8, 5, 14, 4, 5, 9, 15, 9, 9, 7, 9, 11, 5, 11, 12,\n    66, 72, 76, 79, 84, 84, 85, 86, 88, 89, 88, 87, 81, 76, 69, 59, 48, 45, 43, 46,\n    69, 78, 81, 83, 83, 82, 84, 83, 83, 85, 83, 82, 80, 77, 66, 65, 74, 73, 54, 55,\n    73, 76, 80, 83, 85, 85, 85, 86, 84, 83, 81, 79, 78, 77, 73, 67, 66, 71, 72, 66,\n    65, 75, 80, 82, 82, 77, 71, 78, 74, 73, 77, 76, 74, 73, 71, 68, 63, 60, 60, 59,\n    70, 78, 83, 84, 81, 80, 77, 78, 80, 81, 81, 80, 79, 77, 75, 72, 68, 64, 59, 58,\n    68, 73, 72, 60, 83, 87, 88, 86, 86, 84, 82, 81, 79, 76, 68, 55, 71, 73, 66, 60,\n    61, 69, 73, 76, 81, 82, 82, 82, 82, 80, 80, 80, 79, 77, 75, 74, 69, 63, 49, 53,\n    61, 62, 59, 59, 63, 64, 63, 66, 63, 62, 59, 57, 52, 42, 56, 57, 52, 47, 43, 45,\n    62, 71, 75, 77, 76, 76, 75, 73, 70, 71, 70, 68, 65, 60, 41, 51, 58, 58, 49, 45,\n    69, 77, 80, 81, 82, 80, 79, 79, 77, 76, 75, 74, 71, 69, 64, 61, 54, 44, 48, 50,\n    68, 73, 75, 78, 82, 81, 80, 79, 78, 78, 77, 73, 64, 61, 70, 68, 53, 67, 55, 52,\n    66, 72, 73, 71, 65, 66, 68, 70, 66, 61, 58, 50, 38, 53, 56, 54, 44, 48, 28, 33,\n    62, 68, 74, 77, 78, 77, 77, 78, 76, 76, 74, 72, 65, 58, 50, 66, 69, 65, 62, 45,\n    60, 68, 74, 76, 78, 79, 80, 79, 79, 79, 77, 76, 72, 69, 68, 67, 62, 64, 59, 48,\n    52, 49, 62, 67, 69, 70, 69, 70, 71, 70, 69, 68, 64, 60, 53, 47, 59, 60, 52, 44,\n    55, 60, 63, 65, 65, 64, 63, 64, 64, 63, 61, 58, 38, 53, 56, 58, 46, 54, 47, 36,\n    42, 44, 48, 52, 54, 57, 59, 58, 58, 56, 54, 52, 43, 39, 45, 49, 47, 38, 37, 26,\n    47, 49, 50, 48, 48, 46, 22, 48, 41, 49, 48, 49, 43, 36, 43, 48, 28, 27, 27, 0,\n    53, 55, 53, 49, 47, 52, 50, 52, 54, 53, 52, 53, 47, 30, 39, 36, 36, 38, 34, 24,\n    48, 56, 59, 62, 60, 58, 57, 57, 56, 54, 49, 43, 47, 53, 49, 49, 46, 37, 33, 30,\n    54, 60, 63, 64, 66, 66, 67, 67, 66, 65, 61, 54, 38, 56, 63, 61, 51, 57, 52, 46,\n    36, 40, 53, 58, 61, 62, 61, 59, 60, 62, 63, 61, 53, 55, 50, 43, 49, 50, 44, 36,\n    39, 44, 52, 55, 55, 57, 55, 56, 49, 48, 43, 44, 43, 47, 44, 50, 35, 23, 36, 28,\n    43, 45, 46, 49, 45, 44, 29, 34, 39, 29, 32, 34, 33, 36, 36, 31, 24, 11, 3, 11,\n    45, 49, 50, 48, 48, 46, 43, 43, 41, 39, 38, 31, 34, 36, 36, 32, 33, 23, 13, 13,\n    40, 43, 43, 39, 35, 25, 36, 40, 35, 26, 25, 24, 24, 31, 33, 25, 29, 18, 13, 15,\n    38, 40, 36, 24, 41, 45, 46, 39, 46, 35, 34, 35, 32, 33, 42, 35, 26, 17, 14, 12,\n    38, 41, 41, 39, 32, 31, 26, 34, 39, 32, 31, 29, 36, 43, 35, 37, 24, 12, 15, 9,\n    21, 21, 29, 31, 27, 27, 25, 26, 27, 9, 20, 22, 32, 31, 29, 27, 13, 16, 10, 3,\n    38, 40, 40, 39, 39, 35, 36, 35, 36, 37, 37, 30, 42, 40, 31, 32, 16, 21, 21, 10,\n    41, 43, 41, 41, 40, 34, 39, 39, 40, 38, 25, 42, 40, 40, 34, 36, 32, 21, 11, 7,\n    34, 33, 33, 38, 40, 41, 37, 40, 34, 33, 30, 30, 39, 30, 26, 19, 17, 18, 11, 5,\n    34, 35, 31, 27, 26, 31, 20, 22, 10, 20, 18, 13, 12, 8, 9, 9, 6, 2, 7, 6,\n    42, 47, 47, 44, 26, 36, 37, 32, 27, 20, 34, 20, 20, 22, 24, 20, 3, 10, 1, 4,\n    43, 48, 49, 46, 28, 36, 36, 33, 39, 39, 32, 34, 29, 25, 21, 20, 12, 12, 11, 8,\n    35, 39, 40, 38, 35, 36, 33, 30, 19, 31, 31, 31, 21, 26, 18, 20, 3, 6, 6, 9,\n    29, 24, 14, 14, 19, 26, 26, 19, 16, 23, 22, 18, 22, 14, 17, 9, 5, 9, 11, 2,\n    20, 22, 19, 23, 29, 31, 32, 29, 23, 30, 32, 24, 25, 19, 19, 23, 17, 14, 12, 6,\n    25, 24, 26, 28, 31, 31, 31, 31, 28, 35, 38, 36, 24, 35, 31, 22, 7, 12, 10, 0,\n    25, 28, 28, 27, 21, 20, 20, 17, 7, 22, 19, 20, 4, 17, 13, 8, 13, 4, 7, 7,\n    68, 74, 80, 85, 90, 91, 92, 94, 96, 95, 95, 94, 87, 82, 76, 68, 57, 40, 48, 41,\n    80, 87, 89, 90, 90, 91, 94, 92, 92, 93, 91, 90, 88, 85, 74, 71, 82, 81, 62, 63,\n    82, 85, 88, 91, 93, 93, 93, 94, 92, 90, 88, 87, 86, 85, 80, 73, 75, 80, 79, 70,\n    75, 84, 89, 91, 89, 85, 80, 85, 77, 78, 79, 76, 75, 75, 74, 72, 70, 68, 67, 66,\n    78, 86, 90, 92, 88, 87, 84, 85, 89, 88, 88, 88, 86, 85, 82, 79, 73, 69, 66, 66,\n    77, 81, 80, 65, 91, 96, 97, 95, 95, 94, 92, 90, 88, 85, 75, 68, 81, 81, 71, 67,\n    70, 78, 82, 85, 90, 91, 91, 90, 89, 89, 88, 88, 86, 84, 82, 81, 77, 69, 59, 56,\n    70, 72, 69, 70, 72, 75, 75, 78, 75, 75, 72, 69, 61, 49, 67, 68, 62, 57, 47, 51,\n    75, 83, 86, 87, 87, 87, 86, 85, 83, 82, 80, 78, 74, 69, 46, 62, 68, 67, 57, 51,\n    80, 88, 92, 93, 94, 92, 91, 91, 90, 89, 88, 87, 84, 81, 77, 73, 57, 64, 64, 63,\n    79, 84, 87, 91, 95, 93, 92, 90, 90, 90, 89, 86, 77, 70, 81, 80, 71, 79, 68, 66,\n    77, 82, 83, 81, 77, 77, 78, 78, 76, 74, 73, 69, 58, 58, 65, 68, 60, 61, 53, 36,\n    74, 79, 85, 88, 89, 88, 89, 89, 89, 89, 86, 85, 79, 72, 64, 79, 81, 72, 73, 64,\n    74, 82, 87, 90, 92, 93, 93, 92, 92, 92, 90, 89, 85, 82, 81, 80, 77, 77, 70, 61,\n    71, 70, 77, 81, 82, 83, 83, 84, 84, 82, 81, 79, 76, 73, 67, 67, 74, 73, 52, 63,\n    72, 77, 80, 81, 81, 80, 78, 80, 79, 78, 76, 74, 57, 67, 71, 71, 47, 67, 61, 53,\n    58, 60, 64, 65, 65, 70, 72, 72, 71, 70, 67, 66, 58, 54, 60, 64, 57, 47, 45, 42,\n    66, 66, 65, 60, 59, 63, 56, 63, 57, 66, 66, 69, 65, 53, 64, 68, 50, 50, 48, 33,\n    69, 73, 72, 70, 72, 73, 70, 73, 74, 74, 76, 75, 69, 60, 61, 58, 60, 61, 50, 48,\n    71, 75, 76, 77, 75, 72, 70, 70, 70, 70, 66, 62, 62, 67, 61, 61, 55, 53, 50, 43,\n    69, 78, 82, 83, 84, 84, 85, 84, 84, 83, 79, 73, 61, 73, 80, 77, 72, 70, 65, 59,\n    68, 70, 75, 79, 82, 82, 81, 75, 76, 79, 81, 81, 74, 74, 73, 59, 71, 70, 58, 43,\n    51, 68, 76, 80, 81, 81, 79, 79, 74, 70, 61, 67, 63, 68, 65, 70, 56, 49, 54, 44,\n    72, 78, 79, 79, 79, 77, 70, 66, 64, 61, 61, 61, 55, 60, 62, 57, 53, 41, 38, 33,\n    68, 69, 67, 67, 69, 70, 70, 70, 66, 61, 61, 59, 58, 57, 56, 51, 48, 42, 32, 22,\n    63, 66, 65, 62, 50, 48, 63, 51, 54, 54, 44, 43, 45, 42, 49, 37, 45, 44, 35, 28,\n    62, 65, 66, 68, 71, 71, 68, 55, 68, 59, 63, 60, 42, 59, 57, 55, 45, 49, 35, 16,\n    63, 66, 65, 58, 53, 58, 65, 68, 67, 66, 60, 53, 61, 66, 54, 60, 52, 45, 15, 25,\n    55, 58, 62, 63, 60, 60, 62, 65, 68, 68, 64, 47, 54, 54, 62, 54, 38, 41, 33, 26,\n    60, 61, 60, 57, 57, 60, 68, 71, 72, 71, 64, 62, 67, 70, 62, 59, 58, 35, 49, 37,\n    63, 66, 67, 67, 66, 66, 67, 67, 65, 63, 60, 63, 65, 62, 58, 57, 54, 48, 32, 34,\n    53, 57, 62, 65, 67, 67, 63, 62, 54, 47, 52, 55, 59, 59, 53, 43, 43, 36, 37, 31,\n    41, 41, 49, 47, 47, 46, 48, 46, 45, 37, 30, 35, 38, 37, 37, 34, 26, 23, 16, 7,\n    54, 59, 59, 56, 56, 60, 50, 53, 54, 55, 50, 50, 51, 47, 50, 29, 27, 25, 15, 14,\n    56, 59, 61, 59, 57, 43, 55, 58, 61, 58, 55, 50, 55, 52, 42, 35, 32, 26, 11, 11,\n    53, 59, 60, 59, 53, 60, 64, 58, 60, 39, 46, 57, 54, 51, 48, 46, 38, 37, 15, 17,\n    45, 40, 38, 34, 45, 49, 48, 43, 43, 46, 46, 29, 38, 31, 33, 28, 16, 16, 16, 6,\n    49, 51, 52, 53, 54, 56, 52, 40, 41, 47, 49, 41, 42, 42, 19, 37, 37, 28, 18, 2,\n    45, 48, 49, 49, 46, 51, 50, 41, 39, 47, 53, 49, 40, 47, 40, 31, 29, 26, 16, 9,\n    36, 40, 41, 39, 40, 37, 36, 39, 43, 41, 39, 36, 41, 22, 32, 30, 24, 5, 4, 0,\n    63, 70, 73, 74, 78, 80, 78, 76, 75, 78, 75, 73, 73, 73, 71, 70, 67, 65, 63, 57,\n    72, 74, 71, 60, 45, 51, 66, 64, 69, 66, 65, 65, 66, 65, 64, 62, 56, 52, 50, 47,\n    66, 68, 66, 61, 59, 64, 70, 66, 71, 70, 70, 70, 69, 68, 65, 63, 60, 53, 42, 53,\n    62, 66, 67, 66, 68, 68, 68, 69, 69, 69, 69, 68, 67, 66, 63, 59, 38, 55, 56, 51,\n    51, 51, 53, 60, 65, 66, 64, 64, 64, 63, 63, 62, 60, 59, 53, 44, 45, 47, 42, 50,\n    51, 49, 44, 39, 51, 56, 56, 53, 49, 46, 45, 47, 40, 30, 33, 37, 42, 39, 44, 43,\n    50, 50, 53, 56, 59, 57, 60, 58, 56, 56, 56, 54, 50, 44, 36, 46, 46, 38, 50, 43,\n    49, 51, 48, 45, 48, 45, 46, 48, 47, 46, 46, 44, 41, 39, 32, 33, 28, 30, 32, 33,\n    40, 42, 42, 44, 45, 46, 45, 45, 43, 42, 42, 39, 36, 31, 30, 34, 26, 31, 34, 28,\n    31, 37, 41, 43, 46, 46, 47, 46, 44, 43, 40, 33, 27, 36, 40, 38, 18, 38, 32, 19,\n    31, 31, 32, 32, 33, 33, 28, 30, 30, 30, 31, 27, 27, 31, 33, 21, 23, 24, 9, 18,\n    30, 24, 18, 15, 10, 25, 28, 30, 26, 20, 26, 26, 17, 13, 16, 13, 16, 21, 21, 8,\n    32, 35, 35, 35, 35, 34, 34, 32, 33, 29, 27, 18, 19, 12, 7, 27, 23, 23, 23, 20,\n    25, 21, 20, 22, 21, 17, 24, 24, 23, 23, 23, 14, 22, 24, 15, 14, 15, 19, 0, 5,\n    25, 21, 14, 5, 19, 20, 15, 22, 14, 20, 12, 23, 25, 24, 22, 9, 17, 12, 14, 14,\n    10, 15, 15, 20, 21, 19, 20, 13, 19, 19, 10, 21, 16, 3, 17, 13, 10, 0, 16, 17,\n    20, 17, 16, 10, 12, 24, 16, 15, 9, 9, 8, 10, 3, 13, 3, 4, 5, 5, 12, 7,\n    21, 16, 12, 21, 19, 17, 20, 16, 18, 20, 14, 9, 13, 4, 13, 0, 16, 0, 9, 9,\n    16, 22, 26, 26, 21, 23, 25, 24, 24, 25, 22, 23, 15, 14, 15, 14, 18, 13, 8, 7,\n    8, 14, 13, 13, 10, 16, 15, 13, 16, 13, 8, 6, 11, 16, 7, 5, 9, 7, 6, 8,\n    20, 18, 18, 17, 21, 15, 19, 13, 18, 15, 15, 16, 19, 23, 10, 4, 11, 10, 6, 2,\n    25, 25, 26, 27, 26, 26, 27, 27, 24, 25, 21, 18, 12, 20, 14, 13, 10, 17, 8, 6,\n    7, 15, 14, 12, 10, 7, 14, 12, 15, 6, 8, 14, 0, 7, 0, 0, 5, 6, 1, 6,\n    15, 0, 4, 8, 11, 3, 8, 12, 17, 14, 7, 14, 2, 8, 9, 0, 10, 0, 9, 11,\n    19, 14, 1, 3, 2, 0, 10, 3, 15, 16, 2, 12, 12, 8, 10, 9, 14, 7, 16, 2,\n    18, 7, 11, 15, 15, 11, 2, 10, 16, 11, 9, 0, 8, 0, 8, 5, 11, 7, 10, 14,\n    4, 9, 6, 4, 10, 9, 4, 9, 5, 11, 16, 10, 4, 7, 5, 0, 12, 7, 11, 8,\n    18, 14, 10, 11, 10, 12, 14, 8, 0, 0, 14, 4, 0, 10, 8, 9, 4, 0, 8, 10,\n    18, 16, 16, 16, 18, 18, 13, 15, 17, 8, 20, 18, 20, 15, 20, 14, 15, 16, 17, 17,\n    8, 11, 0, 12, 3, 0, 7, 9, 10, 0, 1, 4, 15, 12, 9, 11, 0, 8, 0, 6,\n    12, 1, 8, 12, 11, 13, 13, 0, 6, 2, 12, 5, 6, 13, 0, 12, 0, 12, 11, 1,\n    12, 12, 3, 12, 6, 16, 12, 12, 4, 8, 0, 7, 11, 11, 0, 0, 0, 6, 8, 13,\n    10, 13, 14, 7, 0, 3, 10, 0, 10, 0, 0, 12, 13, 14, 0, 6, 5, 12, 11, 11,\n    10, 7, 9, 9, 12, 12, 6, 10, 14, 9, 11, 12, 5, 3, 0, 9, 9, 6, 0, 0,\n    8, 9, 10, 10, 1, 8, 0, 9, 2, 0, 1, 9, 10, 13, 5, 13, 5, 14, 10, 11,\n    15, 15, 13, 14, 13, 17, 12, 3, 6, 10, 6, 9, 4, 8, 5, 0, 0, 6, 3, 10,\n    12, 8, 7, 7, 0, 0, 6, 7, 0, 12, 11, 5, 6, 11, 6, 1, 11, 6, 6, 4,\n    0, 15, 15, 15, 16, 16, 16, 14, 10, 15, 12, 6, 5, 4, 10, 12, 7, 5, 0, 10,\n    2, 2, 13, 17, 1, 9, 11, 11, 10, 0, 1, 9, 1, 7, 7, 9, 10, 12, 8, 7,\n    16, 11, 9, 8, 0, 6, 3, 0, 0, 12, 3, 4, 5, 5, 4, 4, 4, 9, 9, 10,\n    55, 68, 77, 82, 84, 89, 88, 87, 84, 87, 84, 84, 83, 82, 81, 79, 76, 74, 69, 63,\n    68, 79, 85, 85, 72, 65, 75, 79, 79, 78, 76, 77, 77, 76, 75, 72, 67, 62, 59, 59,\n    64, 75, 80, 80, 66, 71, 81, 76, 82, 80, 80, 80, 79, 78, 76, 74, 71, 66, 54, 64,\n    64, 72, 77, 78, 79, 79, 81, 81, 81, 81, 81, 80, 79, 77, 75, 71, 50, 65, 67, 60,\n    54, 61, 63, 65, 75, 78, 77, 77, 77, 77, 77, 76, 75, 74, 70, 64, 50, 61, 55, 62,\n    61, 66, 66, 64, 60, 69, 72, 68, 67, 69, 70, 68, 65, 62, 53, 33, 53, 52, 55, 56,\n    58, 67, 68, 70, 77, 78, 79, 79, 76, 76, 76, 75, 73, 69, 58, 61, 64, 58, 65, 59,\n    63, 68, 70, 70, 66, 69, 66, 68, 68, 67, 66, 64, 61, 58, 50, 49, 42, 46, 50, 52,\n    48, 60, 65, 67, 69, 68, 69, 69, 67, 65, 65, 64, 61, 57, 49, 55, 52, 52, 57, 49,\n    51, 44, 60, 66, 71, 74, 74, 76, 74, 73, 70, 67, 60, 52, 61, 63, 55, 60, 58, 46,\n    44, 51, 58, 61, 62, 64, 62, 62, 61, 62, 63, 62, 56, 47, 59, 56, 56, 50, 41, 37,\n    51, 52, 41, 52, 57, 57, 59, 60, 55, 56, 53, 53, 48, 43, 38, 31, 39, 45, 41, 24,\n    54, 62, 64, 65, 64, 64, 64, 64, 64, 62, 60, 57, 48, 39, 49, 47, 52, 47, 42, 40,\n    54, 59, 62, 62, 63, 61, 60, 57, 55, 53, 50, 48, 40, 45, 48, 40, 52, 41, 42, 20,\n    50, 56, 63, 64, 64, 63, 59, 60, 63, 63, 58, 56, 48, 47, 51, 49, 49, 41, 39, 34,\n    53, 58, 62, 62, 61, 60, 60, 61, 59, 59, 58, 55, 46, 36, 42, 50, 51, 37, 39, 26,\n    40, 50, 55, 55, 49, 58, 60, 54, 50, 43, 38, 45, 34, 37, 38, 36, 37, 20, 26, 9,\n    42, 47, 38, 47, 49, 46, 51, 49, 48, 42, 41, 42, 39, 33, 42, 35, 39, 30, 25, 23,\n    41, 49, 51, 51, 53, 53, 51, 52, 50, 47, 44, 45, 49, 50, 41, 37, 45, 39, 37, 27,\n    41, 47, 46, 42, 44, 41, 36, 32, 26, 27, 29, 30, 26, 29, 16, 36, 25, 17, 23, 19,\n    36, 47, 47, 47, 48, 48, 46, 45, 45, 43, 37, 41, 46, 45, 35, 45, 36, 35, 31, 19,\n    39, 50, 55, 57, 58, 58, 57, 56, 54, 52, 48, 51, 53, 48, 50, 46, 46, 39, 38, 29,\n    37, 43, 44, 43, 40, 39, 35, 34, 30, 36, 36, 35, 32, 35, 35, 40, 15, 25, 17, 16,\n    29, 36, 37, 37, 37, 36, 31, 29, 29, 26, 22, 27, 29, 25, 27, 25, 19, 21, 12, 5,\n    26, 30, 29, 21, 23, 18, 21, 30, 23, 23, 20, 19, 23, 19, 18, 21, 8, 4, 10, 14,\n    24, 25, 29, 32, 29, 21, 31, 30, 31, 30, 13, 16, 25, 19, 28, 22, 3, 14, 7, 5,\n    8, 24, 26, 22, 32, 33, 34, 30, 14, 19, 15, 24, 25, 22, 29, 29, 17, 17, 9, 9,\n    12, 10, 27, 31, 27, 27, 28, 27, 27, 26, 25, 21, 18, 0, 12, 13, 0, 3, 2, 9,\n    20, 23, 24, 27, 33, 29, 29, 27, 27, 30, 25, 29, 21, 20, 24, 20, 19, 18, 16, 13,\n    21, 22, 18, 18, 24, 18, 20, 26, 28, 29, 30, 27, 28, 34, 26, 25, 21, 0, 9, 9,\n    18, 16, 21, 24, 28, 31, 29, 29, 26, 29, 32, 30, 23, 26, 29, 24, 17, 16, 8, 4,\n    20, 30, 32, 26, 33, 33, 22, 9, 18, 23, 14, 26, 26, 23, 24, 22, 12, 13, 3, 6,\n    16, 25, 29, 29, 25, 26, 25, 21, 8, 7, 17, 14, 4, 0, 9, 0, 0, 1, 10, 2,\n    17, 14, 6, 13, 13, 14, 10, 13, 8, 14, 7, 0, 14, 19, 0, 6, 1, 8, 5, 8,\n    10, 5, 17, 21, 15, 21, 18, 21, 14, 17, 13, 20, 19, 15, 5, 15, 1, 0, 11, 13,\n    16, 24, 23, 21, 21, 20, 24, 21, 20, 21, 15, 13, 19, 16, 15, 17, 12, 10, 8, 0,\n    12, 22, 28, 30, 30, 29, 26, 22, 24, 24, 25, 22, 15, 22, 17, 16, 16, 11, 10, 4,\n    6, 7, 13, 17, 15, 15, 11, 13, 18, 17, 22, 18, 11, 18, 13, 11, 7, 0, 2, 4,\n    0, 22, 26, 25, 17, 22, 23, 23, 24, 22, 19, 20, 11, 10, 3, 12, 13, 7, 13, 0,\n    16, 0, 19, 21, 21, 21, 18, 13, 10, 11, 8, 4, 9, 10, 10, 8, 13, 0, 8, 0,\n    69, 87, 93, 96, 97, 102, 101, 99, 97, 97, 96, 96, 95, 94, 92, 90, 86, 83, 78, 70,\n    83, 93, 98, 96, 84, 81, 83, 88, 85, 86, 82, 83, 84, 83, 82, 80, 75, 67, 69, 69,\n    78, 89, 92, 91, 68, 85, 91, 84, 93, 94, 94, 94, 92, 91, 88, 86, 82, 76, 66, 75,\n    78, 86, 91, 92, 92, 92, 94, 95, 94, 94, 94, 94, 92, 91, 88, 84, 63, 77, 75, 72,\n    73, 78, 76, 76, 87, 89, 87, 86, 85, 84, 83, 83, 82, 80, 76, 70, 61, 68, 53, 70,\n    74, 79, 78, 74, 74, 81, 85, 82, 67, 71, 78, 75, 72, 68, 59, 53, 64, 60, 65, 65,\n    66, 75, 77, 83, 91, 92, 94, 93, 90, 88, 86, 84, 82, 78, 69, 71, 74, 68, 77, 66,\n    77, 82, 85, 86, 78, 83, 83, 83, 82, 83, 82, 81, 78, 74, 65, 63, 60, 63, 68, 65,\n    70, 73, 82, 85, 84, 83, 85, 86, 81, 80, 81, 79, 74, 71, 62, 65, 57, 67, 68, 58,\n    76, 73, 77, 82, 86, 89, 88, 90, 89, 88, 86, 84, 77, 63, 76, 78, 63, 78, 71, 54,\n    67, 71, 76, 77, 79, 81, 74, 73, 75, 75, 75, 73, 71, 71, 76, 76, 63, 55, 59, 54,\n    72, 74, 69, 57, 68, 70, 78, 79, 75, 77, 74, 72, 67, 65, 58, 53, 59, 70, 54, 52,\n    75, 80, 81, 80, 79, 79, 80, 81, 80, 79, 77, 76, 69, 60, 64, 63, 65, 64, 57, 57,\n    70, 75, 78, 80, 80, 77, 79, 81, 79, 81, 78, 76, 68, 61, 62, 64, 57, 68, 41, 53,\n    68, 78, 84, 86, 86, 85, 83, 81, 84, 81, 78, 77, 71, 47, 71, 70, 75, 67, 61, 52,\n    78, 82, 85, 85, 84, 83, 83, 85, 82, 81, 79, 75, 64, 54, 64, 68, 72, 64, 60, 49,\n    63, 75, 81, 80, 76, 83, 85, 78, 72, 76, 56, 66, 61, 43, 58, 55, 59, 50, 50, 44,\n    73, 76, 69, 76, 73, 73, 77, 74, 75, 71, 68, 66, 68, 68, 69, 64, 61, 48, 42, 45,\n    71, 77, 78, 77, 80, 81, 76, 81, 80, 79, 75, 69, 65, 73, 56, 68, 68, 58, 43, 52,\n    69, 73, 73, 72, 72, 66, 68, 71, 71, 69, 62, 57, 56, 54, 57, 62, 47, 52, 34, 20,\n    66, 72, 70, 70, 65, 70, 66, 67, 65, 67, 64, 59, 55, 58, 43, 61, 54, 52, 45, 33,\n    68, 79, 83, 85, 86, 86, 85, 85, 82, 80, 71, 66, 76, 76, 75, 65, 67, 56, 41, 52,\n    71, 78, 79, 79, 79, 79, 75, 72, 73, 72, 71, 69, 54, 63, 70, 75, 52, 62, 49, 32,\n    69, 75, 77, 77, 76, 76, 74, 74, 70, 70, 60, 54, 63, 56, 67, 66, 38, 57, 47, 40,\n    60, 62, 55, 50, 59, 58, 56, 51, 48, 47, 45, 41, 44, 28, 50, 33, 23, 38, 23, 13,\n    53, 55, 62, 66, 64, 61, 61, 61, 62, 61, 56, 51, 44, 53, 57, 35, 47, 33, 36, 24,\n    61, 65, 64, 62, 67, 68, 68, 67, 67, 66, 60, 48, 57, 47, 64, 59, 45, 46, 38, 29,\n    60, 67, 69, 67, 67, 66, 65, 65, 64, 62, 56, 34, 50, 45, 54, 50, 42, 42, 35, 26,\n    55, 61, 62, 58, 52, 53, 58, 59, 58, 55, 29, 47, 50, 56, 56, 42, 47, 39, 32, 23,\n    63, 66, 65, 68, 72, 72, 70, 67, 68, 69, 69, 66, 55, 72, 67, 58, 56, 51, 35, 29,\n    65, 66, 59, 65, 70, 68, 61, 65, 59, 55, 58, 59, 64, 58, 59, 60, 43, 28, 12, 24,\n    68, 74, 76, 77, 78, 75, 71, 69, 63, 66, 61, 63, 51, 60, 55, 48, 44, 40, 29, 19,\n    63, 69, 70, 68, 65, 65, 65, 60, 50, 57, 47, 52, 30, 46, 37, 33, 26, 30, 7, 8,\n    53, 58, 57, 55, 49, 55, 48, 52, 44, 38, 25, 39, 36, 46, 39, 34, 33, 12, 15, 3,\n    53, 59, 61, 60, 58, 58, 57, 55, 51, 43, 48, 50, 52, 46, 41, 40, 38, 27, 14, 9,\n    58, 63, 63, 63, 64, 63, 63, 63, 58, 53, 45, 49, 48, 51, 40, 45, 32, 21, 17, 15,\n    59, 67, 70, 70, 68, 66, 64, 60, 48, 53, 53, 53, 42, 55, 43, 49, 41, 31, 18, 7,\n    54, 62, 64, 64, 64, 64, 64, 59, 56, 46, 51, 50, 54, 58, 29, 44, 39, 29, 16, 12,\n    61, 67, 70, 70, 70, 69, 67, 66, 62, 58, 47, 50, 46, 55, 45, 37, 37, 23, 3, 10,\n    55, 63, 67, 68, 65, 62, 55, 50, 53, 58, 57, 52, 50, 49, 45, 21, 28, 18, 0, 8,\n    67, 71, 75, 76, 75, 73, 69, 67, 71, 67, 67, 66, 66, 64, 60, 58, 47, 28, 35, 25,\n    73, 75, 76, 78, 79, 79, 80, 81, 81, 81, 80, 80, 78, 77, 75, 72, 68, 61, 54, 59,\n    71, 74, 74, 74, 70, 68, 71, 69, 70, 70, 69, 68, 67, 65, 60, 55, 29, 46, 52, 50,\n    66, 66, 65, 68, 72, 72, 70, 68, 65, 64, 63, 61, 59, 56, 53, 52, 40, 47, 49, 24,\n    50, 52, 49, 47, 49, 44, 47, 36, 32, 49, 50, 49, 47, 46, 43, 35, 38, 41, 31, 35,\n    55, 56, 55, 54, 55, 56, 56, 53, 53, 50, 49, 48, 45, 43, 37, 28, 37, 38, 18, 32,\n    56, 58, 59, 59, 59, 59, 59, 59, 58, 58, 57, 56, 54, 52, 45, 34, 41, 36, 38, 34,\n    37, 38, 38, 40, 40, 42, 39, 40, 39, 41, 40, 38, 34, 34, 29, 26, 21, 25, 22, 21,\n    20, 29, 33, 34, 35, 31, 28, 19, 16, 27, 16, 8, 22, 21, 23, 20, 23, 25, 14, 20,\n    32, 36, 37, 34, 29, 33, 30, 29, 31, 33, 30, 27, 21, 16, 12, 27, 25, 18, 16, 7,\n    33, 37, 39, 38, 37, 38, 38, 38, 36, 35, 34, 31, 26, 12, 27, 31, 22, 16, 13, 0,\n    33, 38, 39, 38, 38, 36, 36, 36, 35, 35, 35, 33, 27, 10, 20, 17, 24, 15, 17, 18,\n    26, 28, 27, 25, 28, 27, 26, 27, 23, 27, 19, 23, 23, 11, 19, 20, 19, 17, 6, 13,\n    25, 21, 25, 18, 19, 22, 18, 21, 16, 18, 19, 20, 2, 14, 12, 11, 7, 15, 2, 0,\n    31, 30, 24, 26, 24, 26, 21, 25, 21, 20, 17, 18, 12, 12, 14, 10, 7, 11, 4, 17,\n    15, 11, 19, 13, 0, 0, 13, 11, 10, 12, 11, 4, 11, 12, 13, 11, 0, 10, 14, 11,\n    12, 11, 5, 10, 1, 9, 0, 18, 5, 14, 16, 13, 12, 0, 10, 11, 4, 7, 0, 12,\n    16, 13, 4, 0, 15, 7, 15, 0, 13, 18, 9, 9, 11, 9, 0, 0, 9, 13, 4, 10,\n    11, 13, 15, 12, 9, 8, 6, 16, 16, 7, 8, 8, 6, 1, 0, 7, 14, 15, 11, 1,\n    13, 19, 11, 10, 2, 3, 0, 11, 9, 0, 14, 1, 6, 7, 14, 1, 10, 0, 11, 16,\n    23, 19, 21, 18, 22, 16, 13, 0, 14, 13, 10, 7, 11, 7, 12, 7, 13, 0, 12, 13,\n    14, 13, 20, 23, 22, 18, 11, 17, 17, 6, 12, 16, 12, 10, 10, 11, 12, 11, 6, 0,\n    15, 12, 21, 19, 16, 15, 17, 18, 16, 17, 14, 16, 15, 12, 15, 20, 19, 13, 19, 15,\n    21, 22, 21, 12, 0, 9, 0, 17, 11, 0, 9, 6, 6, 3, 4, 3, 6, 11, 0, 0,\n    13, 15, 13, 13, 10, 9, 9, 1, 9, 6, 5, 12, 10, 11, 3, 10, 8, 15, 3, 9,\n    17, 3, 17, 19, 7, 15, 4, 12, 8, 11, 12, 6, 0, 9, 5, 0, 2, 3, 13, 6,\n    15, 8, 14, 17, 9, 13, 7, 7, 8, 14, 2, 9, 6, 13, 7, 0, 6, 9, 11, 10,\n    0, 7, 6, 13, 16, 12, 7, 11, 12, 14, 5, 3, 11, 14, 0, 7, 4, 7, 11, 0,\n    14, 8, 13, 3, 12, 18, 9, 0, 13, 9, 7, 1, 10, 10, 0, 8, 9, 0, 0, 14,\n    15, 14, 12, 0, 8, 4, 11, 6, 10, 0, 0, 4, 10, 4, 2, 7, 8, 0, 6, 6,\n    11, 10, 9, 17, 12, 1, 6, 13, 2, 11, 13, 1, 6, 9, 11, 12, 6, 13, 4, 12,\n    12, 4, 7, 5, 2, 11, 6, 0, 6, 10, 14, 15, 14, 0, 11, 7, 0, 9, 14, 9,\n    10, 10, 0, 10, 5, 12, 0, 4, 11, 12, 8, 1, 6, 11, 6, 0, 4, 9, 12, 14,\n    9, 5, 11, 7, 12, 1, 10, 10, 12, 7, 7, 4, 7, 0, 5, 10, 10, 11, 10, 12,\n    13, 16, 9, 12, 6, 16, 11, 12, 3, 12, 10, 6, 0, 0, 12, 9, 14, 9, 7, 11,\n    10, 8, 13, 16, 8, 10, 12, 10, 6, 11, 14, 9, 0, 7, 3, 16, 12, 13, 11, 10,\n    2, 6, 11, 10, 0, 7, 2, 4, 8, 14, 6, 18, 13, 10, 9, 7, 7, 5, 12, 11,\n    19, 16, 13, 13, 12, 7, 8, 15, 13, 10, 3, 12, 10, 12, 14, 7, 18, 3, 11, 13,\n    15, 16, 18, 7, 11, 13, 10, 11, 11, 7, 15, 11, 13, 0, 11, 7, 9, 1, 6, 7,\n    19, 14, 15, 16, 12, 1, 12, 9, 10, 12, 5, 13, 0, 2, 14, 3, 11, 11, 1, 5,\n    62, 78, 82, 86, 88, 85, 82, 82, 83, 80, 80, 78, 77, 76, 73, 70, 65, 60, 48, 43,\n    72, 83, 89, 89, 92, 92, 93, 93, 95, 94, 93, 93, 92, 91, 89, 86, 80, 72, 68, 73,\n    53, 81, 88, 89, 88, 84, 86, 85, 85, 86, 86, 84, 82, 80, 76, 70, 57, 63, 65, 63,\n    69, 80, 83, 82, 87, 88, 86, 86, 82, 81, 79, 77, 74, 72, 66, 65, 61, 53, 63, 53,\n    52, 66, 69, 67, 62, 62, 57, 56, 60, 67, 67, 67, 65, 64, 59, 53, 49, 55, 50, 41,\n    66, 74, 75, 76, 73, 75, 76, 73, 73, 69, 68, 67, 65, 63, 57, 41, 56, 57, 46, 52,\n    66, 78, 82, 83, 84, 83, 84, 84, 83, 83, 82, 81, 79, 76, 67, 62, 68, 64, 61, 58,\n    57, 61, 69, 65, 65, 66, 67, 68, 69, 69, 68, 68, 66, 62, 51, 52, 53, 34, 49, 43,\n    58, 60, 63, 67, 61, 64, 57, 53, 53, 54, 54, 52, 51, 47, 37, 42, 49, 43, 41, 32,\n    59, 68, 74, 76, 75, 74, 75, 74, 73, 72, 72, 70, 67, 63, 60, 63, 62, 53, 50, 41,\n    55, 65, 68, 70, 70, 70, 71, 70, 69, 68, 66, 64, 58, 45, 61, 63, 56, 45, 42, 42,\n    53, 61, 67, 68, 69, 68, 66, 67, 67, 67, 66, 66, 63, 59, 56, 54, 51, 45, 44, 29,\n    42, 59, 62, 60, 60, 59, 61, 64, 63, 60, 57, 57, 53, 40, 42, 41, 48, 42, 20, 25,\n    54, 68, 72, 72, 72, 71, 71, 71, 71, 71, 69, 67, 62, 52, 41, 54, 54, 46, 45, 38,\n    57, 68, 69, 63, 65, 64, 66, 67, 67, 63, 60, 56, 49, 47, 52, 54, 47, 41, 37, 29,\n    52, 52, 54, 56, 45, 49, 47, 49, 46, 33, 29, 33, 40, 44, 42, 40, 33, 29, 24, 19,\n    42, 47, 45, 46, 43, 43, 49, 46, 48, 47, 47, 45, 38, 40, 37, 35, 36, 28, 19, 9,\n    40, 48, 49, 49, 48, 48, 47, 44, 41, 42, 41, 35, 35, 36, 36, 33, 30, 24, 19, 11,\n    43, 49, 52, 51, 52, 54, 51, 52, 48, 50, 46, 40, 41, 47, 50, 47, 37, 35, 19, 20,\n    35, 30, 32, 35, 43, 45, 46, 47, 47, 46, 45, 43, 37, 34, 36, 35, 33, 18, 13, 13,\n    41, 44, 42, 42, 42, 39, 42, 41, 38, 40, 37, 37, 34, 35, 35, 33, 25, 19, 11, 9,\n    38, 41, 39, 28, 34, 33, 40, 40, 40, 40, 38, 34, 30, 36, 40, 37, 30, 28, 21, 3,\n    30, 36, 39, 41, 40, 43, 43, 44, 43, 42, 39, 36, 34, 38, 33, 32, 29, 24, 15, 12,\n    29, 29, 13, 15, 21, 24, 28, 28, 26, 29, 29, 20, 24, 25, 19, 21, 14, 9, 18, 7,\n    34, 33, 29, 15, 26, 31, 25, 18, 21, 19, 14, 19, 10, 23, 15, 17, 10, 16, 2, 4,\n    31, 34, 30, 32, 36, 33, 34, 35, 36, 36, 33, 29, 21, 25, 24, 29, 3, 15, 6, 0,\n    22, 30, 33, 34, 36, 35, 35, 34, 32, 31, 26, 20, 21, 26, 22, 13, 12, 1, 3, 0,\n    23, 33, 37, 38, 39, 40, 40, 40, 39, 37, 34, 31, 29, 30, 13, 20, 17, 9, 8, 15,\n    8, 10, 25, 27, 27, 15, 25, 24, 21, 24, 20, 16, 13, 12, 18, 9, 13, 3, 0, 9,\n    14, 28, 33, 33, 32, 33, 35, 25, 26, 29, 28, 25, 11, 21, 15, 5, 1, 7, 7, 7,\n    17, 22, 27, 28, 26, 13, 23, 17, 21, 22, 23, 17, 18, 13, 16, 12, 14, 11, 10, 8,\n    25, 26, 27, 27, 24, 21, 28, 27, 27, 27, 26, 21, 18, 19, 17, 21, 4, 8, 0, 4,\n    6, 7, 10, 10, 13, 19, 0, 14, 5, 11, 9, 0, 0, 7, 6, 14, 2, 11, 3, 10,\n    6, 16, 23, 25, 21, 25, 22, 23, 21, 20, 15, 0, 6, 15, 13, 7, 0, 10, 10, 6,\n    19, 17, 10, 7, 11, 13, 0, 17, 12, 6, 10, 5, 5, 0, 10, 5, 9, 7, 0, 9,\n    16, 28, 29, 23, 17, 23, 14, 18, 15, 20, 19, 0, 16, 16, 1, 7, 4, 3, 16, 7,\n    22, 7, 1, 7, 18, 17, 21, 17, 17, 13, 15, 12, 15, 10, 4, 7, 5, 5, 10, 15,\n    19, 17, 4, 11, 7, 13, 11, 6, 7, 5, 6, 13, 4, 14, 11, 6, 5, 4, 5, 11,\n    16, 14, 17, 21, 16, 19, 14, 18, 15, 11, 5, 13, 9, 6, 5, 2, 3, 11, 13, 0,\n    8, 12, 9, 6, 16, 18, 16, 9, 8, 0, 11, 15, 10, 13, 12, 0, 13, 14, 4, 8,\n    72, 86, 89, 94, 96, 93, 94, 89, 89, 89, 87, 87, 86, 85, 83, 80, 74, 68, 64, 55,\n    81, 91, 97, 97, 100, 101, 102, 102, 103, 103, 102, 102, 101, 99, 97, 95, 89, 80, 76, 80,\n    65, 91, 97, 98, 97, 94, 95, 94, 93, 93, 92, 91, 89, 87, 81, 75, 60, 69, 71, 72,\n    78, 89, 92, 91, 96, 97, 95, 95, 92, 93, 92, 91, 88, 86, 81, 77, 74, 68, 73, 62,\n    54, 75, 78, 78, 75, 73, 62, 68, 62, 72, 75, 72, 70, 68, 63, 55, 56, 61, 58, 50,\n    77, 82, 82, 83, 81, 83, 84, 80, 82, 80, 79, 79, 77, 75, 70, 62, 66, 68, 52, 60,\n    76, 88, 93, 94, 95, 94, 94, 94, 94, 94, 93, 92, 90, 87, 77, 73, 77, 73, 71, 68,\n    67, 74, 80, 74, 75, 79, 80, 80, 80, 79, 79, 79, 76, 72, 61, 63, 64, 45, 59, 51,\n    73, 76, 74, 80, 73, 78, 75, 72, 69, 66, 59, 49, 55, 51, 42, 60, 65, 61, 54, 39,\n    72, 81, 87, 89, 88, 87, 88, 87, 87, 87, 86, 85, 81, 76, 71, 76, 75, 66, 57, 59,\n    67, 78, 80, 82, 81, 81, 81, 81, 80, 79, 77, 76, 70, 63, 71, 73, 65, 55, 48, 48,\n    67, 76, 82, 84, 86, 85, 84, 84, 83, 82, 81, 80, 77, 71, 69, 68, 67, 62, 57, 34,\n    53, 72, 75, 76, 75, 75, 71, 74, 80, 74, 74, 74, 66, 58, 57, 60, 64, 56, 45, 37,\n    72, 83, 87, 87, 87, 86, 87, 87, 86, 85, 83, 81, 75, 62, 65, 70, 67, 61, 57, 51,\n    76, 86, 86, 79, 82, 80, 85, 84, 84, 80, 76, 70, 62, 66, 72, 70, 69, 53, 53, 36,\n    72, 71, 72, 75, 67, 68, 67, 65, 68, 63, 58, 28, 58, 62, 62, 58, 51, 50, 42, 36,\n    65, 71, 69, 69, 69, 68, 71, 71, 72, 72, 71, 68, 58, 59, 61, 55, 56, 50, 41, 25,\n    59, 69, 71, 73, 73, 73, 71, 70, 68, 68, 65, 61, 58, 59, 56, 54, 57, 45, 43, 34,\n    61, 68, 70, 69, 70, 74, 69, 70, 65, 68, 64, 60, 56, 64, 66, 62, 52, 52, 36, 30,\n    52, 45, 59, 63, 65, 67, 66, 68, 66, 64, 63, 61, 49, 56, 61, 58, 47, 40, 25, 35,\n    60, 63, 60, 58, 56, 58, 57, 55, 44, 52, 51, 43, 46, 48, 52, 37, 31, 38, 30, 24,\n    59, 65, 66, 61, 63, 60, 65, 67, 67, 66, 65, 63, 53, 55, 61, 60, 49, 45, 33, 17,\n    58, 64, 67, 70, 71, 73, 74, 74, 74, 73, 70, 68, 64, 68, 67, 61, 57, 53, 40, 25,\n    57, 61, 57, 46, 53, 54, 54, 54, 55, 52, 52, 49, 41, 24, 48, 48, 38, 29, 28, 13,\n    44, 51, 57, 59, 46, 40, 44, 54, 35, 50, 50, 44, 43, 45, 41, 33, 36, 23, 6, 11,\n    55, 56, 56, 56, 58, 58, 56, 54, 54, 54, 50, 46, 38, 45, 46, 47, 21, 37, 25, 19,\n    50, 56, 58, 60, 61, 59, 60, 61, 60, 59, 56, 53, 44, 48, 49, 42, 34, 32, 17, 11,\n    51, 53, 54, 54, 58, 59, 57, 55, 57, 52, 50, 49, 43, 41, 36, 39, 32, 23, 13, 11,\n    52, 51, 52, 52, 54, 46, 50, 46, 49, 50, 47, 35, 48, 45, 37, 33, 23, 24, 15, 10,\n    39, 59, 63, 62, 64, 62, 61, 62, 59, 60, 47, 47, 48, 50, 41, 38, 2, 18, 10, 5,\n    48, 60, 62, 58, 50, 59, 57, 60, 59, 54, 51, 55, 50, 45, 44, 29, 31, 25, 13, 12,\n    29, 51, 52, 50, 52, 51, 53, 52, 51, 48, 43, 36, 28, 35, 45, 39, 31, 21, 14, 0,\n    36, 46, 40, 37, 30, 28, 37, 31, 27, 29, 24, 26, 20, 18, 20, 20, 13, 10, 10, 8,\n    41, 45, 47, 50, 51, 51, 51, 51, 49, 47, 42, 37, 40, 42, 36, 22, 22, 19, 10, 9,\n    34, 42, 46, 43, 43, 42, 41, 40, 36, 35, 27, 29, 33, 29, 25, 23, 16, 11, 9, 16,\n    41, 43, 42, 42, 39, 37, 40, 36, 37, 31, 32, 36, 39, 37, 27, 28, 13, 16, 10, 2,\n    37, 26, 33, 36, 42, 43, 29, 35, 39, 39, 38, 36, 32, 31, 19, 24, 18, 11, 13, 9,\n    46, 39, 43, 38, 23, 38, 34, 41, 36, 38, 35, 33, 31, 32, 24, 13, 1, 13, 7, 7,\n    44, 50, 52, 51, 51, 51, 48, 47, 44, 37, 32, 39, 38, 32, 29, 29, 19, 7, 8, 10,\n    32, 37, 38, 35, 36, 31, 38, 42, 36, 33, 36, 32, 12, 22, 24, 15, 0, 2, 11, 11,\n    69, 79, 79, 76, 82, 80, 80, 78, 76, 79, 77, 77, 75, 74, 70, 65, 55, 49, 50, 51,\n    65, 74, 79, 79, 81, 83, 82, 83, 84, 84, 81, 79, 75, 70, 57, 58, 60, 55, 47, 34,\n    56, 53, 59, 67, 73, 75, 77, 76, 76, 75, 73, 73, 71, 69, 66, 62, 57, 61, 59, 56,\n    58, 66, 69, 67, 64, 61, 65, 64, 63, 65, 65, 64, 62, 60, 54, 43, 53, 42, 46, 34,\n    59, 57, 61, 64, 65, 65, 66, 67, 68, 68, 68, 67, 66, 63, 55, 51, 51, 52, 42, 40,\n    56, 64, 66, 67, 66, 66, 66, 67, 65, 65, 65, 64, 62, 60, 51, 50, 37, 52, 36, 40,\n    49, 51, 52, 52, 54, 55, 56, 56, 56, 56, 56, 56, 55, 53, 50, 50, 45, 37, 38, 32,\n    43, 40, 45, 45, 44, 44, 42, 43, 45, 44, 41, 39, 38, 29, 33, 34, 29, 21, 18, 16,\n    37, 40, 40, 43, 44, 44, 44, 45, 45, 44, 45, 42, 38, 30, 36, 32, 30, 24, 15, 17,\n    25, 29, 25, 12, 23, 23, 26, 23, 25, 21, 28, 28, 31, 30, 8, 23, 22, 20, 20, 0,\n    18, 31, 34, 35, 35, 37, 38, 39, 39, 40, 41, 41, 38, 30, 28, 17, 23, 15, 14, 7,\n    27, 33, 33, 31, 33, 33, 33, 33, 34, 34, 34, 34, 31, 21, 20, 21, 21, 18, 19, 9,\n    22, 25, 25, 28, 26, 23, 24, 24, 25, 25, 21, 24, 18, 18, 26, 12, 20, 7, 2, 8,\n    17, 6, 25, 28, 22, 27, 28, 27, 30, 31, 32, 32, 27, 14, 11, 14, 18, 5, 11, 2,\n    9, 19, 23, 21, 25, 25, 25, 22, 17, 19, 25, 9, 10, 19, 11, 5, 0, 0, 8, 5,\n    9, 1, 13, 10, 12, 8, 14, 9, 8, 11, 5, 15, 17, 6, 15, 3, 10, 8, 8, 15,\n    7, 7, 9, 1, 9, 20, 12, 14, 14, 8, 11, 11, 9, 14, 15, 1, 8, 7, 0, 7,\n    16, 20, 19, 23, 23, 21, 20, 23, 22, 21, 15, 12, 7, 0, 15, 14, 11, 8, 12, 6,\n    25, 22, 19, 22, 19, 15, 22, 14, 19, 12, 16, 10, 13, 14, 18, 18, 16, 18, 18, 17,\n    10, 3, 1, 14, 18, 15, 19, 4, 13, 9, 13, 13, 8, 8, 6, 8, 8, 11, 0, 15,\n    15, 21, 24, 27, 26, 25, 26, 24, 23, 21, 18, 0, 9, 18, 10, 15, 9, 7, 9, 15,\n    2, 5, 9, 0, 13, 6, 10, 0, 12, 5, 13, 11, 13, 7, 9, 8, 9, 12, 8, 4,\n    18, 14, 15, 12, 12, 14, 6, 8, 13, 5, 10, 9, 11, 11, 15, 9, 9, 14, 0, 10,\n    13, 13, 12, 1, 6, 14, 0, 13, 11, 13, 0, 8, 8, 0, 0, 14, 0, 4, 10, 8,\n    6, 5, 0, 6, 17, 12, 7, 6, 15, 9, 5, 12, 0, 12, 0, 9, 1, 4, 7, 7,\n    14, 7, 16, 16, 5, 4, 13, 7, 18, 11, 0, 5, 6, 3, 6, 13, 6, 11, 9, 7,\n    12, 12, 12, 7, 13, 7, 15, 15, 9, 7, 13, 12, 9, 14, 13, 0, 13, 16, 3, 9,\n    7, 9, 13, 15, 17, 16, 13, 12, 12, 11, 10, 10, 14, 0, 7, 9, 12, 0, 13, 5,\n    19, 16, 19, 19, 8, 14, 4, 0, 13, 16, 2, 15, 1, 4, 13, 0, 7, 12, 4, 11,\n    22, 22, 20, 16, 15, 9, 17, 12, 15, 8, 9, 14, 17, 5, 0, 0, 7, 9, 7, 0,\n    9, 12, 1, 12, 7, 18, 3, 8, 7, 8, 7, 10, 11, 7, 10, 9, 9, 10, 10, 9,\n    15, 12, 10, 8, 6, 13, 5, 15, 13, 3, 11, 6, 6, 3, 7, 13, 12, 8, 6, 1,\n    15, 12, 15, 18, 11, 11, 12, 15, 14, 16, 11, 12, 14, 16, 12, 17, 10, 16, 20, 18,\n    8, 7, 4, 13, 9, 15, 12, 13, 3, 5, 8, 12, 3, 2, 8, 0, 6, 10, 5, 7,\n    14, 8, 7, 7, 2, 11, 13, 8, 12, 4, 11, 14, 12, 11, 4, 7, 5, 7, 5, 13,\n    17, 14, 10, 11, 6, 11, 4, 0, 11, 6, 10, 4, 13, 13, 4, 8, 0, 13, 12, 3,\n    9, 12, 13, 0, 5, 8, 5, 13, 0, 11, 16, 8, 15, 11, 7, 5, 0, 0, 11, 9,\n    16, 5, 11, 17, 13, 15, 15, 7, 0, 12, 12, 13, 4, 0, 14, 9, 7, 0, 3, 0,\n    12, 7, 0, 12, 10, 7, 0, 0, 13, 8, 0, 0, 11, 9, 5, 13, 0, 16, 9, 2,\n    0, 12, 12, 5, 10, 12, 13, 6, 3, 6, 7, 7, 10, 12, 0, 6, 6, 0, 0, 8,\n    70, 84, 89, 87, 90, 90, 91, 88, 85, 89, 87, 87, 85, 83, 79, 75, 62, 60, 63, 54,\n    74, 81, 90, 91, 92, 94, 94, 94, 95, 95, 92, 90, 86, 81, 72, 71, 70, 66, 56, 52,\n    64, 74, 67, 79, 85, 88, 89, 88, 88, 87, 85, 84, 81, 77, 68, 64, 67, 68, 66, 65,\n    64, 78, 84, 85, 80, 79, 81, 81, 80, 81, 79, 77, 74, 70, 56, 61, 67, 51, 54, 55,\n    73, 73, 76, 79, 80, 80, 80, 82, 82, 82, 81, 80, 77, 72, 60, 69, 53, 68, 58, 60,\n    67, 79, 83, 84, 84, 84, 84, 85, 83, 83, 82, 80, 76, 69, 66, 68, 62, 65, 53, 45,\n    64, 73, 75, 74, 76, 76, 78, 79, 78, 77, 76, 76, 72, 69, 67, 58, 70, 58, 61, 54,\n    69, 67, 69, 74, 71, 73, 71, 71, 71, 70, 67, 61, 55, 57, 58, 44, 51, 42, 40, 41,\n    62, 72, 74, 75, 77, 76, 76, 77, 77, 76, 74, 71, 61, 63, 63, 60, 54, 53, 52, 43,\n    56, 58, 52, 59, 63, 65, 66, 65, 66, 66, 65, 63, 55, 53, 56, 50, 55, 53, 46, 34,\n    52, 64, 68, 69, 70, 70, 70, 71, 71, 70, 69, 67, 57, 52, 46, 59, 50, 42, 39, 33,\n    55, 65, 67, 66, 66, 66, 65, 66, 66, 66, 64, 61, 48, 55, 50, 49, 43, 33, 27, 29,\n    50, 60, 62, 63, 63, 65, 65, 63, 65, 65, 60, 52, 52, 56, 53, 44, 40, 38, 35, 20,\n    54, 48, 63, 64, 63, 64, 66, 66, 66, 67, 66, 63, 48, 51, 40, 43, 45, 43, 22, 27,\n    53, 53, 54, 58, 57, 61, 48, 55, 42, 52, 54, 49, 41, 49, 44, 41, 42, 29, 19, 19,\n    46, 43, 48, 46, 43, 44, 42, 40, 40, 40, 30, 21, 25, 25, 23, 12, 8, 12, 10, 11,\n    39, 37, 40, 39, 38, 36, 41, 41, 39, 41, 39, 31, 33, 35, 17, 29, 26, 14, 15, 8,\n    35, 45, 46, 46, 48, 48, 50, 50, 51, 51, 50, 45, 31, 40, 33, 37, 29, 25, 19, 7,\n    40, 46, 40, 38, 41, 34, 30, 29, 38, 40, 41, 41, 32, 24, 33, 26, 24, 11, 13, 14,\n    29, 32, 30, 27, 30, 34, 31, 32, 30, 23, 28, 30, 34, 33, 19, 24, 21, 17, 0, 14,\n    24, 32, 38, 41, 42, 43, 43, 43, 44, 43, 41, 38, 38, 31, 22, 22, 15, 11, 7, 9,\n    24, 24, 25, 28, 19, 26, 11, 12, 14, 20, 26, 27, 25, 23, 15, 19, 16, 14, 12, 8,\n    27, 24, 22, 23, 27, 28, 21, 17, 13, 11, 24, 25, 21, 19, 20, 18, 6, 5, 16, 10,\n    23, 21, 25, 25, 25, 26, 23, 27, 25, 26, 21, 21, 15, 17, 14, 5, 5, 16, 14, 0,\n    24, 25, 28, 26, 24, 22, 22, 10, 17, 21, 23, 26, 16, 23, 12, 14, 5, 9, 12, 8,\n    18, 24, 32, 30, 27, 26, 27, 27, 20, 10, 13, 24, 19, 8, 11, 10, 0, 5, 9, 9,\n    27, 32, 33, 33, 32, 28, 31, 30, 27, 27, 26, 29, 19, 20, 20, 12, 12, 5, 2, 7,\n    33, 39, 40, 38, 38, 35, 31, 28, 20, 28, 28, 31, 25, 6, 10, 11, 13, 9, 15, 6,\n    22, 29, 20, 27, 26, 23, 26, 23, 22, 25, 25, 15, 18, 19, 8, 0, 14, 3, 0, 15,\n    25, 30, 31, 31, 32, 32, 32, 31, 30, 24, 19, 26, 17, 22, 16, 16, 11, 0, 14, 8,\n    26, 20, 21, 13, 18, 18, 15, 17, 18, 8, 6, 19, 8, 10, 6, 14, 0, 0, 13, 5,\n    15, 9, 14, 15, 20, 14, 9, 15, 15, 13, 6, 9, 14, 0, 5, 7, 0, 1, 9, 1,\n    19, 18, 21, 15, 20, 19, 18, 17, 12, 16, 1, 7, 7, 13, 7, 9, 12, 5, 0, 16,\n    20, 15, 6, 5, 23, 9, 15, 13, 15, 10, 15, 15, 6, 0, 3, 6, 4, 11, 11, 11,\n    14, 15, 13, 6, 14, 16, 7, 14, 8, 14, 9, 9, 9, 6, 10, 8, 1, 11, 7, 4,\n    24, 25, 14, 21, 15, 21, 23, 24, 21, 18, 8, 12, 9, 0, 13, 11, 1, 9, 5, 7,\n    17, 19, 18, 12, 20, 22, 18, 18, 20, 13, 12, 10, 9, 4, 9, 11, 0, 9, 1, 4,\n    5, 8, 16, 19, 15, 0, 14, 15, 14, 11, 6, 12, 3, 14, 17, 9, 14, 7, 2, 0,\n    13, 9, 18, 10, 15, 18, 18, 20, 21, 14, 0, 15, 7, 14, 12, 2, 17, 14, 11, 14,\n    10, 5, 16, 13, 16, 13, 17, 17, 19, 10, 15, 12, 2, 8, 12, 14, 13, 0, 2, 5,\n    79, 89, 95, 94, 96, 99, 98, 98, 93, 95, 94, 94, 92, 91, 88, 84, 71, 67, 71, 62,\n    80, 88, 97, 98, 100, 102, 102, 103, 104, 103, 100, 98, 94, 89, 80, 80, 78, 73, 61, 56,\n    68, 82, 75, 86, 92, 95, 95, 95, 94, 93, 92, 90, 86, 80, 71, 74, 74, 74, 74, 71,\n    72, 86, 91, 92, 88, 88, 88, 87, 85, 87, 85, 83, 80, 75, 53, 70, 72, 48, 61, 57,\n    80, 82, 84, 87, 90, 89, 88, 90, 89, 89, 89, 88, 84, 78, 73, 78, 65, 77, 64, 68,\n    75, 87, 90, 91, 91, 91, 90, 90, 88, 88, 86, 84, 78, 67, 74, 71, 73, 70, 61, 55,\n    74, 82, 85, 83, 85, 86, 88, 88, 88, 88, 87, 86, 82, 79, 78, 62, 79, 71, 72, 63,\n    80, 77, 80, 85, 83, 84, 82, 82, 82, 81, 76, 65, 66, 63, 57, 56, 41, 55, 44, 32,\n    72, 84, 86, 87, 89, 88, 88, 88, 87, 86, 84, 80, 73, 77, 70, 75, 70, 62, 60, 55,\n    69, 72, 54, 71, 74, 78, 79, 79, 80, 80, 78, 73, 47, 69, 69, 62, 65, 66, 53, 51,\n    64, 77, 80, 81, 82, 82, 82, 83, 82, 81, 79, 75, 62, 69, 60, 72, 63, 57, 50, 44,\n    69, 79, 82, 80, 81, 81, 80, 80, 80, 80, 77, 72, 64, 71, 51, 65, 60, 56, 48, 41,\n    65, 73, 76, 76, 75, 76, 79, 75, 78, 76, 74, 66, 68, 66, 67, 54, 50, 38, 47, 26,\n    70, 68, 78, 79, 77, 77, 79, 78, 79, 79, 77, 73, 63, 67, 64, 62, 57, 36, 35, 31,\n    71, 69, 75, 79, 76, 82, 75, 79, 72, 67, 71, 63, 68, 69, 61, 57, 60, 49, 40, 22,\n    65, 65, 69, 68, 64, 66, 63, 64, 62, 57, 32, 51, 46, 53, 47, 42, 28, 36, 17, 12,\n    61, 62, 55, 57, 60, 47, 61, 61, 61, 61, 58, 50, 56, 48, 41, 47, 42, 31, 17, 11,\n    57, 64, 67, 69, 69, 69, 68, 68, 67, 65, 60, 55, 59, 50, 46, 51, 48, 17, 25, 22,\n    58, 63, 55, 50, 58, 57, 56, 61, 60, 58, 54, 55, 51, 38, 48, 50, 35, 36, 24, 22,\n    44, 54, 52, 53, 55, 56, 54, 54, 52, 52, 52, 54, 51, 50, 45, 47, 38, 30, 16, 1,\n    56, 62, 63, 62, 64, 63, 63, 62, 60, 57, 47, 45, 49, 38, 37, 41, 36, 18, 12, 8,\n    41, 38, 54, 53, 47, 48, 49, 51, 58, 58, 55, 49, 44, 47, 33, 45, 36, 29, 14, 0,\n    57, 60, 61, 62, 63, 63, 63, 63, 60, 57, 47, 53, 48, 43, 40, 36, 32, 34, 19, 10,\n    42, 50, 53, 54, 53, 53, 52, 49, 48, 46, 38, 42, 39, 39, 32, 32, 24, 17, 9, 9,\n    45, 40, 47, 46, 50, 48, 35, 43, 37, 45, 46, 41, 36, 35, 0, 29, 20, 19, 4, 13,\n    36, 45, 52, 49, 45, 47, 46, 44, 41, 36, 42, 45, 26, 33, 26, 21, 20, 3, 5, 0,\n    51, 55, 58, 58, 57, 51, 44, 49, 51, 39, 42, 52, 43, 42, 29, 23, 15, 20, 13, 5,\n    50, 53, 53, 56, 55, 54, 48, 48, 50, 45, 38, 46, 37, 32, 31, 22, 5, 13, 10, 8,\n    47, 49, 52, 51, 50, 50, 44, 41, 44, 43, 35, 38, 31, 26, 33, 24, 15, 14, 9, 8,\n    40, 50, 49, 47, 50, 49, 49, 48, 42, 36, 37, 32, 34, 29, 28, 19, 0, 9, 4, 8,\n    42, 32, 36, 32, 35, 34, 37, 38, 39, 38, 34, 27, 25, 24, 18, 15, 14, 8, 5, 0,\n    33, 26, 29, 13, 27, 26, 31, 26, 30, 27, 23, 20, 18, 22, 18, 2, 10, 5, 13, 8,\n    29, 30, 37, 37, 37, 33, 33, 34, 32, 19, 30, 14, 13, 18, 10, 19, 14, 15, 13, 15,\n    28, 33, 38, 36, 35, 32, 28, 34, 35, 33, 15, 25, 26, 19, 14, 12, 11, 13, 4, 0,\n    37, 39, 33, 38, 38, 37, 37, 31, 16, 22, 12, 26, 10, 16, 17, 2, 9, 10, 10, 3,\n    33, 41, 41, 42, 42, 45, 45, 46, 43, 39, 29, 28, 29, 31, 27, 12, 14, 1, 4, 7,\n    28, 21, 29, 28, 28, 27, 29, 29, 25, 16, 21, 12, 18, 3, 10, 9, 8, 0, 12, 0,\n    29, 33, 28, 32, 32, 13, 26, 31, 34, 36, 25, 28, 24, 0, 7, 11, 13, 3, 0, 0,\n    32, 33, 33, 35, 36, 36, 36, 30, 28, 23, 29, 29, 16, 16, 6, 11, 2, 12, 8, 4,\n    35, 43, 38, 42, 45, 46, 47, 47, 45, 37, 39, 34, 37, 31, 24, 4, 11, 2, 7, 15,\n    74, 74, 58, 70, 67, 62, 62, 67, 64, 64, 64, 65, 65, 64, 64, 63, 59, 56, 54, 55,\n    63, 71, 74, 72, 74, 75, 77, 77, 76, 75, 73, 71, 67, 63, 58, 56, 54, 57, 55, 51,\n    48, 53, 59, 63, 64, 63, 61, 62, 63, 61, 58, 54, 40, 51, 56, 55, 49, 48, 44, 47,\n    50, 53, 52, 51, 51, 51, 53, 54, 56, 56, 56, 56, 56, 52, 46, 48, 47, 32, 41, 41,\n    30, 40, 44, 47, 49, 50, 50, 49, 45, 40, 36, 44, 50, 52, 50, 45, 45, 46, 38, 36,\n    45, 48, 48, 50, 51, 50, 49, 49, 49, 48, 46, 45, 44, 43, 42, 41, 33, 39, 29, 28,\n    33, 26, 23, 30, 27, 29, 23, 31, 30, 27, 16, 14, 19, 22, 25, 23, 17, 17, 16, 8,\n    15, 2, 25, 19, 26, 26, 24, 22, 18, 20, 17, 23, 20, 21, 15, 15, 4, 19, 12, 21,\n    14, 10, 17, 9, 16, 15, 19, 13, 18, 19, 16, 18, 0, 9, 14, 18, 0, 5, 16, 0,\n    21, 19, 19, 24, 23, 22, 19, 17, 19, 14, 16, 16, 16, 17, 9, 8, 10, 9, 16, 8,\n    19, 22, 22, 25, 24, 24, 23, 21, 22, 22, 18, 16, 17, 13, 0, 0, 15, 5, 12, 8,\n    21, 21, 23, 17, 18, 20, 9, 9, 15, 20, 19, 17, 0, 14, 0, 9, 2, 8, 4, 3,\n    11, 20, 20, 21, 14, 17, 20, 20, 18, 14, 8, 0, 4, 9, 3, 16, 8, 15, 11, 7,\n    15, 20, 12, 8, 11, 14, 14, 15, 18, 15, 18, 8, 16, 5, 15, 8, 2, 8, 12, 7,\n    10, 17, 20, 21, 22, 15, 21, 18, 23, 21, 7, 18, 18, 16, 16, 18, 20, 11, 12, 0,\n    7, 12, 10, 16, 16, 10, 0, 13, 16, 1, 11, 4, 8, 9, 14, 0, 12, 3, 8, 7,\n    14, 13, 5, 7, 15, 15, 7, 2, 0, 16, 13, 18, 0, 9, 0, 7, 10, 11, 11, 4,\n    12, 11, 2, 12, 8, 9, 13, 15, 12, 15, 12, 17, 17, 4, 8, 6, 13, 13, 5, 2,\n    5, 14, 15, 17, 17, 13, 16, 14, 9, 0, 3, 12, 0, 4, 15, 7, 4, 3, 13, 13,\n    19, 19, 16, 11, 13, 16, 18, 7, 11, 15, 14, 13, 10, 8, 15, 2, 13, 9, 13, 0,\n    18, 18, 10, 18, 19, 19, 10, 16, 11, 17, 22, 12, 13, 11, 8, 1, 1, 14, 15, 7,\n    13, 17, 19, 6, 15, 17, 9, 14, 9, 5, 12, 9, 8, 5, 11, 12, 8, 1, 5, 5,\n    16, 7, 18, 17, 18, 12, 10, 2, 0, 17, 0, 14, 7, 11, 3, 11, 14, 6, 8, 12,\n    14, 0, 7, 11, 0, 1, 8, 1, 11, 9, 17, 3, 6, 0, 8, 1, 2, 8, 6, 9,\n    5, 14, 15, 16, 10, 13, 15, 16, 16, 15, 15, 15, 10, 6, 12, 7, 2, 7, 4, 15,\n    2, 14, 14, 13, 16, 15, 15, 10, 14, 6, 7, 11, 2, 15, 9, 10, 7, 8, 6, 10,\n    17, 7, 16, 14, 21, 18, 4, 15, 9, 8, 5, 12, 16, 17, 11, 13, 12, 11, 14, 10,\n    19, 16, 21, 14, 11, 15, 16, 15, 17, 10, 0, 12, 8, 12, 10, 2, 4, 12, 5, 5,\n    20, 17, 19, 16, 14, 19, 18, 15, 15, 0, 7, 13, 12, 1, 0, 8, 5, 8, 12, 13,\n    17, 11, 5, 11, 5, 13, 10, 14, 5, 13, 12, 13, 9, 17, 0, 6, 6, 13, 10, 2,\n    17, 16, 16, 14, 9, 8, 12, 8, 9, 16, 1, 10, 6, 14, 12, 12, 16, 15, 7, 4,\n    21, 16, 14, 15, 6, 4, 9, 12, 7, 11, 16, 8, 5, 4, 17, 9, 4, 13, 15, 6,\n    6, 8, 8, 0, 7, 15, 0, 3, 4, 8, 11, 0, 13, 12, 16, 10, 12, 12, 4, 8,\n    8, 9, 1, 10, 12, 10, 3, 0, 7, 5, 16, 16, 13, 9, 5, 7, 9, 8, 12, 6,\n    11, 6, 0, 15, 10, 13, 19, 15, 16, 7, 12, 6, 9, 9, 8, 18, 12, 11, 10, 14,\n    10, 14, 14, 19, 8, 6, 7, 8, 16, 6, 5, 7, 8, 6, 5, 9, 8, 6, 15, 8,\n    18, 9, 2, 4, 15, 8, 12, 6, 5, 7, 6, 17, 0, 9, 5, 7, 7, 7, 11, 6,\n    9, 4, 10, 7, 14, 13, 8, 6, 8, 15, 5, 9, 1, 9, 7, 16, 11, 9, 14, 0,\n    9, 8, 17, 12, 3, 3, 0, 10, 9, 7, 8, 9, 0, 8, 11, 0, 11, 4, 11, 6,\n    18, 10, 13, 7, 6, 8, 15, 15, 12, 16, 4, 7, 3, 13, 12, 6, 2, 0, 13, 8,\n    80, 87, 79, 80, 76, 66, 71, 80, 73, 70, 73, 73, 73, 73, 72, 71, 69, 65, 65, 67,\n    71, 84, 90, 90, 88, 92, 93, 93, 93, 92, 90, 89, 85, 80, 68, 54, 56, 67, 66, 59,\n    70, 59, 77, 81, 83, 83, 81, 82, 83, 82, 79, 77, 71, 62, 63, 65, 57, 66, 49, 52,\n    74, 80, 80, 80, 79, 77, 79, 80, 80, 77, 78, 78, 77, 74, 71, 71, 65, 60, 60, 59,\n    67, 68, 70, 68, 74, 78, 78, 78, 77, 76, 75, 75, 74, 73, 68, 68, 68, 62, 56, 42,\n    68, 71, 72, 73, 75, 75, 73, 75, 74, 73, 71, 67, 60, 52, 57, 48, 58, 57, 51, 47,\n    60, 52, 67, 63, 55, 58, 61, 61, 58, 56, 58, 60, 62, 60, 54, 53, 57, 50, 44, 42,\n    55, 53, 58, 60, 60, 60, 58, 57, 57, 57, 54, 54, 51, 50, 46, 26, 32, 31, 30, 16,\n    53, 56, 63, 65, 65, 63, 62, 61, 61, 60, 59, 57, 48, 53, 55, 45, 49, 32, 34, 30,\n    50, 52, 55, 57, 52, 51, 50, 51, 43, 38, 41, 40, 23, 35, 34, 41, 33, 32, 22, 19,\n    54, 59, 61, 60, 59, 60, 60, 60, 59, 58, 55, 45, 53, 55, 41, 49, 45, 38, 28, 24,\n    48, 52, 51, 51, 51, 51, 48, 49, 46, 46, 37, 25, 46, 50, 42, 41, 36, 29, 18, 16,\n    45, 51, 51, 49, 49, 34, 48, 33, 43, 46, 46, 46, 42, 36, 41, 20, 34, 24, 22, 12,\n    30, 27, 36, 39, 47, 49, 48, 50, 48, 42, 33, 27, 38, 41, 31, 37, 31, 26, 16, 13,\n    42, 39, 37, 35, 37, 45, 44, 45, 47, 46, 44, 36, 42, 35, 36, 25, 26, 20, 23, 17,\n    26, 31, 34, 32, 32, 31, 28, 27, 31, 30, 31, 32, 30, 26, 21, 17, 3, 1, 14, 10,\n    31, 36, 34, 30, 25, 29, 27, 21, 19, 24, 30, 31, 31, 21, 21, 18, 0, 11, 15, 11,\n    27, 40, 40, 38, 37, 38, 36, 35, 32, 33, 33, 32, 16, 26, 14, 19, 13, 16, 7, 5,\n    30, 33, 31, 30, 28, 28, 31, 29, 25, 22, 31, 32, 31, 24, 24, 17, 14, 13, 8, 6,\n    27, 26, 17, 25, 30, 30, 30, 28, 28, 30, 27, 23, 9, 22, 19, 5, 6, 6, 9, 10,\n    21, 25, 29, 30, 27, 24, 25, 19, 26, 29, 33, 32, 23, 21, 17, 7, 13, 11, 11, 14,\n    28, 19, 18, 13, 21, 29, 27, 24, 22, 27, 26, 25, 24, 9, 18, 8, 10, 13, 2, 0,\n    27, 26, 30, 30, 32, 32, 31, 31, 31, 29, 26, 19, 13, 18, 11, 10, 9, 0, 13, 1,\n    23, 5, 19, 27, 23, 22, 25, 22, 11, 17, 4, 17, 17, 13, 6, 0, 16, 9, 12, 12,\n    25, 10, 14, 18, 27, 20, 27, 23, 21, 19, 15, 12, 20, 11, 13, 13, 8, 14, 0, 9,\n    24, 24, 22, 21, 22, 24, 23, 23, 17, 16, 12, 17, 16, 10, 16, 13, 6, 0, 3, 0,\n    23, 27, 31, 18, 25, 16, 22, 9, 16, 17, 18, 9, 14, 8, 11, 14, 10, 0, 7, 14,\n    25, 24, 20, 17, 22, 19, 20, 19, 6, 1, 18, 10, 15, 12, 11, 12, 8, 11, 4, 12,\n    21, 19, 5, 16, 17, 19, 20, 19, 20, 15, 8, 18, 16, 16, 12, 10, 18, 15, 10, 8,\n    13, 13, 20, 22, 13, 16, 13, 16, 13, 18, 15, 17, 15, 9, 1, 11, 12, 10, 2, 10,\n    20, 25, 27, 24, 24, 24, 23, 23, 18, 19, 12, 14, 13, 15, 17, 16, 4, 12, 8, 12,\n    14, 8, 14, 6, 10, 10, 9, 17, 7, 8, 6, 0, 11, 16, 14, 3, 5, 13, 7, 11,\n    17, 10, 5, 12, 10, 11, 13, 13, 3, 6, 13, 14, 8, 4, 8, 15, 11, 0, 15, 10,\n    14, 9, 5, 7, 19, 24, 7, 9, 8, 5, 5, 13, 0, 12, 16, 13, 14, 4, 14, 8,\n    18, 25, 21, 15, 15, 18, 13, 16, 6, 17, 8, 13, 11, 5, 13, 10, 10, 3, 13, 19,\n    12, 0, 16, 18, 18, 19, 13, 8, 13, 17, 10, 5, 12, 6, 9, 2, 5, 9, 10, 7,\n    0, 15, 22, 19, 4, 19, 13, 12, 14, 10, 4, 17, 11, 15, 4, 7, 12, 9, 14, 9,\n    15, 11, 0, 17, 23, 10, 16, 7, 12, 12, 12, 15, 12, 5, 8, 18, 13, 10, 9, 7,\n    5, 9, 6, 1, 23, 6, 17, 20, 1, 14, 16, 11, 0, 12, 13, 7, 5, 5, 9, 18,\n    13, 15, 7, 11, 0, 16, 10, 11, 7, 15, 5, 12, 13, 8, 0, 10, 13, 0, 8, 8,\n    86, 96, 89, 93, 86, 80, 86, 82, 80, 78, 80, 81, 83, 82, 81, 81, 78, 75, 73, 75,\n    77, 93, 99, 99, 97, 101, 102, 101, 102, 101, 100, 99, 94, 89, 76, 69, 61, 75, 72, 70,\n    80, 67, 85, 90, 93, 93, 91, 91, 92, 89, 87, 84, 76, 64, 74, 72, 68, 73, 53, 55,\n    85, 89, 89, 91, 91, 90, 91, 92, 91, 89, 88, 87, 84, 82, 78, 80, 73, 71, 68, 66,\n    77, 81, 83, 80, 87, 90, 90, 90, 90, 88, 87, 84, 82, 81, 74, 76, 77, 69, 65, 53,\n    79, 83, 84, 84, 85, 86, 84, 84, 82, 81, 77, 72, 58, 62, 69, 61, 64, 62, 54, 50,\n    74, 64, 78, 73, 73, 72, 69, 74, 70, 63, 70, 72, 69, 65, 58, 63, 63, 50, 44, 43,\n    71, 64, 78, 78, 74, 76, 73, 72, 72, 70, 69, 66, 56, 55, 50, 51, 36, 40, 37, 28,\n    70, 75, 81, 84, 84, 81, 79, 77, 75, 69, 62, 59, 65, 70, 69, 49, 60, 42, 42, 39,\n    67, 71, 74, 75, 74, 72, 72, 72, 66, 70, 65, 58, 43, 51, 58, 55, 53, 47, 39, 33,\n    74, 79, 81, 79, 79, 79, 79, 79, 77, 74, 71, 66, 69, 70, 63, 58, 57, 50, 44, 28,\n    68, 70, 67, 68, 69, 68, 65, 66, 68, 67, 64, 58, 61, 63, 53, 55, 47, 39, 32, 19,\n    65, 73, 74, 72, 76, 70, 73, 61, 66, 70, 66, 61, 58, 59, 59, 49, 52, 45, 34, 26,\n    66, 70, 65, 67, 70, 70, 70, 72, 70, 67, 65, 55, 61, 63, 39, 57, 51, 45, 34, 22,\n    71, 68, 67, 67, 66, 74, 73, 73, 75, 74, 64, 59, 66, 56, 66, 47, 43, 36, 26, 21,\n    56, 62, 65, 66, 65, 64, 63, 62, 58, 55, 57, 58, 57, 55, 52, 44, 24, 20, 0, 4,\n    56, 63, 64, 57, 61, 59, 58, 56, 54, 52, 50, 55, 55, 34, 47, 37, 33, 28, 19, 3,\n    55, 61, 60, 61, 62, 61, 60, 59, 56, 47, 53, 53, 43, 48, 43, 32, 31, 24, 14, 15,\n    54, 57, 56, 59, 60, 58, 53, 52, 54, 51, 50, 51, 52, 41, 43, 31, 31, 22, 10, 7,\n    52, 58, 57, 56, 61, 62, 62, 62, 62, 60, 54, 55, 56, 49, 47, 36, 30, 27, 15, 13,\n    54, 56, 56, 55, 56, 54, 52, 47, 40, 48, 53, 53, 39, 44, 34, 26, 16, 9, 4, 7,\n    58, 57, 56, 58, 60, 58, 60, 59, 57, 54, 51, 56, 50, 46, 47, 38, 33, 25, 13, 9,\n    59, 62, 63, 62, 61, 62, 61, 59, 56, 50, 44, 46, 47, 43, 36, 16, 20, 18, 4, 8,\n    50, 47, 50, 50, 44, 44, 42, 35, 26, 28, 26, 28, 29, 24, 19, 12, 10, 13, 15, 10,\n    50, 46, 51, 55, 55, 53, 51, 53, 49, 47, 37, 40, 43, 40, 28, 26, 1, 9, 12, 1,\n    53, 53, 49, 51, 44, 46, 41, 39, 39, 28, 35, 35, 30, 29, 22, 10, 6, 11, 7, 9,\n    52, 48, 62, 59, 57, 58, 51, 54, 50, 46, 41, 44, 45, 32, 32, 15, 5, 11, 0, 12,\n    50, 49, 48, 52, 47, 47, 47, 46, 43, 42, 33, 38, 22, 11, 24, 7, 11, 9, 9, 4,\n    47, 42, 42, 43, 43, 40, 45, 47, 49, 50, 42, 32, 37, 33, 3, 13, 15, 6, 9, 13,\n    27, 40, 36, 31, 34, 38, 24, 32, 19, 19, 27, 19, 15, 14, 17, 6, 9, 10, 5, 6,\n    49, 52, 50, 49, 48, 47, 46, 41, 40, 36, 36, 28, 30, 30, 26, 14, 15, 8, 10, 9,\n    30, 40, 39, 34, 22, 23, 19, 26, 22, 25, 13, 20, 21, 15, 0, 5, 14, 13, 16, 0,\n    14, 33, 31, 30, 20, 24, 29, 33, 31, 27, 24, 12, 12, 0, 0, 10, 12, 13, 12, 16,\n    23, 41, 38, 30, 31, 31, 27, 29, 23, 16, 27, 21, 18, 18, 5, 16, 12, 13, 6, 9,\n    27, 41, 35, 37, 37, 37, 38, 39, 39, 35, 25, 29, 21, 15, 8, 15, 4, 14, 6, 4,\n    24, 42, 37, 35, 31, 30, 25, 27, 30, 30, 31, 26, 19, 4, 9, 14, 0, 17, 9, 12,\n    33, 43, 45, 41, 35, 31, 28, 26, 17, 7, 15, 8, 17, 12, 12, 4, 10, 7, 12, 9,\n    30, 39, 28, 30, 34, 30, 31, 29, 26, 31, 22, 14, 2, 2, 18, 4, 11, 12, 9, 12,\n    35, 38, 39, 39, 40, 32, 35, 38, 23, 27, 28, 26, 21, 17, 13, 13, 12, 13, 7, 7,\n    35, 28, 18, 31, 31, 31, 26, 20, 18, 9, 14, 3, 5, 12, 1, 8, 13, 9, 0, 0,\n    77, 82, 86, 87, 86, 86, 86, 87, 86, 85, 82, 80, 76, 73, 66, 59, 46, 52, 56, 52,\n    52, 57, 51, 62, 64, 65, 68, 68, 69, 69, 68, 66, 64, 65, 67, 66, 58, 56, 53, 36,\n    49, 37, 39, 42, 48, 51, 54, 54, 53, 52, 50, 48, 42, 40, 36, 37, 31, 32, 38, 34,\n    46, 49, 50, 53, 55, 55, 55, 55, 55, 54, 53, 50, 45, 46, 47, 40, 24, 40, 38, 27,\n    42, 47, 49, 50, 50, 51, 51, 50, 50, 48, 46, 44, 42, 42, 39, 39, 32, 31, 28, 25,\n    16, 21, 25, 29, 18, 28, 28, 25, 26, 29, 33, 31, 16, 27, 22, 18, 27, 20, 21, 13,\n    5, 24, 21, 27, 26, 22, 26, 29, 28, 29, 27, 27, 26, 22, 17, 16, 14, 8, 14, 10,\n    14, 21, 18, 17, 17, 8, 10, 19, 13, 7, 17, 17, 20, 16, 12, 8, 15, 12, 12, 18,\n    20, 23, 27, 28, 24, 26, 22, 20, 13, 21, 20, 21, 20, 17, 8, 16, 10, 13, 8, 12,\n    20, 18, 26, 23, 16, 23, 12, 10, 8, 5, 14, 13, 14, 10, 13, 15, 17, 14, 15, 18,\n    20, 22, 27, 12, 21, 12, 16, 21, 15, 14, 17, 12, 17, 15, 6, 17, 16, 14, 3, 5,\n    19, 22, 20, 22, 19, 23, 19, 22, 11, 22, 9, 23, 13, 14, 6, 14, 17, 18, 7, 17,\n    25, 14, 25, 24, 15, 22, 11, 22, 17, 9, 17, 14, 13, 10, 12, 14, 10, 14, 0, 4,\n    12, 7, 19, 22, 16, 8, 10, 0, 19, 6, 13, 5, 15, 17, 10, 13, 12, 7, 9, 6,\n    11, 10, 13, 24, 13, 20, 12, 12, 12, 5, 9, 10, 12, 12, 18, 17, 11, 8, 14, 11,\n    11, 14, 10, 18, 11, 13, 4, 3, 6, 14, 16, 14, 15, 11, 12, 12, 8, 0, 0, 12,\n    6, 15, 9, 13, 0, 12, 9, 2, 5, 12, 10, 5, 0, 11, 1, 16, 9, 18, 13, 7,\n    6, 16, 8, 17, 13, 14, 4, 4, 11, 11, 0, 9, 18, 6, 0, 6, 9, 18, 16, 10,\n    17, 9, 15, 21, 10, 10, 5, 14, 8, 11, 14, 8, 0, 9, 1, 6, 10, 6, 12, 2,\n    16, 19, 16, 10, 15, 14, 20, 8, 12, 9, 15, 15, 11, 17, 7, 16, 8, 5, 13, 15,\n    19, 1, 11, 6, 0, 16, 9, 14, 15, 14, 16, 14, 3, 13, 11, 11, 3, 10, 10, 1,\n    8, 12, 9, 14, 0, 14, 8, 9, 0, 11, 7, 14, 14, 2, 4, 6, 7, 11, 5, 12,\n    15, 13, 4, 16, 4, 0, 14, 6, 15, 3, 5, 11, 11, 16, 11, 14, 6, 11, 10, 14,\n    15, 5, 10, 14, 10, 19, 7, 17, 9, 12, 11, 7, 14, 18, 5, 15, 13, 16, 11, 4,\n    19, 11, 13, 13, 0, 8, 14, 0, 15, 12, 12, 0, 15, 14, 13, 16, 0, 13, 9, 14,\n    13, 9, 17, 15, 11, 14, 11, 10, 13, 14, 14, 10, 13, 8, 8, 10, 0, 9, 0, 16,\n    12, 7, 16, 19, 11, 0, 9, 13, 10, 8, 7, 10, 13, 1, 12, 9, 11, 1, 12, 8,\n    8, 6, 0, 22, 13, 8, 16, 6, 0, 12, 12, 11, 9, 0, 10, 13, 17, 11, 10, 15,\n    3, 17, 21, 12, 19, 20, 19, 16, 15, 8, 8, 10, 7, 0, 10, 8, 16, 10, 4, 11,\n    1, 16, 15, 13, 15, 16, 13, 17, 13, 7, 14, 3, 5, 16, 16, 15, 17, 5, 0, 9,\n    15, 17, 20, 20, 18, 13, 11, 10, 6, 8, 14, 11, 10, 8, 12, 10, 3, 13, 3, 11,\n    16, 7, 12, 20, 14, 17, 11, 16, 12, 7, 14, 9, 4, 8, 4, 11, 13, 11, 3, 13,\n    7, 5, 17, 9, 9, 16, 16, 1, 10, 0, 9, 17, 9, 7, 10, 9, 8, 18, 8, 8,\n    19, 9, 5, 15, 10, 17, 2, 5, 5, 8, 11, 14, 14, 11, 8, 0, 10, 17, 10, 18,\n    14, 10, 0, 12, 14, 13, 18, 9, 5, 6, 6, 20, 10, 7, 11, 4, 5, 18, 0, 9,\n    5, 18, 4, 16, 15, 11, 10, 11, 5, 7, 12, 6, 8, 13, 14, 6, 6, 4, 9, 4,\n    7, 15, 0, 0, 15, 15, 12, 9, 16, 11, 17, 13, 5, 10, 15, 9, 18, 9, 11, 14,\n    14, 11, 16, 6, 2, 2, 12, 5, 7, 13, 9, 0, 8, 7, 8, 8, 15, 6, 5, 18,\n    13, 15, 0, 11, 9, 3, 6, 9, 9, 12, 4, 13, 0, 5, 6, 15, 12, 11, 5, 15,\n    15, 9, 17, 14, 17, 1, 2, 7, 6, 0, 4, 12, 17, 15, 5, 5, 15, 10, 5, 5,\n    86, 91, 96, 99, 97, 97, 97, 97, 97, 96, 93, 91, 88, 84, 77, 69, 62, 58, 64, 62,\n    70, 72, 74, 80, 85, 85, 89, 89, 89, 89, 88, 86, 81, 77, 75, 75, 73, 73, 65, 56,\n    71, 66, 64, 67, 70, 75, 77, 78, 76, 76, 74, 72, 68, 66, 63, 58, 58, 45, 50, 43,\n    69, 70, 72, 76, 78, 78, 77, 77, 77, 76, 74, 72, 68, 68, 68, 62, 51, 57, 59, 47,\n    72, 77, 79, 80, 81, 82, 81, 81, 80, 79, 78, 76, 71, 63, 51, 52, 58, 52, 49, 44,\n    57, 59, 61, 66, 63, 66, 67, 67, 67, 67, 65, 63, 58, 51, 46, 41, 46, 48, 36, 30,\n    51, 62, 62, 62, 65, 66, 66, 67, 67, 67, 66, 65, 60, 52, 51, 44, 51, 35, 38, 31,\n    46, 47, 50, 45, 47, 47, 50, 50, 50, 49, 50, 49, 45, 40, 37, 33, 27, 26, 17, 17,\n    45, 53, 51, 50, 50, 48, 47, 45, 39, 45, 40, 40, 38, 25, 39, 32, 25, 17, 11, 8,\n    28, 38, 38, 36, 35, 36, 35, 29, 25, 25, 33, 32, 27, 20, 23, 22, 11, 9, 9, 17,\n    40, 38, 40, 44, 41, 41, 39, 37, 36, 35, 38, 43, 42, 34, 17, 29, 21, 23, 13, 11,\n    23, 32, 37, 41, 41, 42, 40, 40, 38, 32, 32, 37, 31, 32, 20, 25, 21, 23, 13, 21,\n    33, 29, 23, 32, 32, 37, 36, 35, 32, 29, 22, 21, 25, 26, 17, 23, 6, 12, 15, 9,\n    35, 38, 35, 16, 32, 27, 34, 28, 32, 25, 24, 20, 21, 18, 13, 18, 11, 13, 13, 11,\n    24, 31, 33, 34, 33, 33, 34, 33, 33, 29, 18, 16, 24, 8, 13, 9, 8, 3, 9, 3,\n    17, 16, 21, 16, 19, 22, 21, 22, 21, 20, 20, 18, 17, 8, 14, 11, 2, 13, 16, 8,\n    17, 1, 17, 15, 20, 17, 16, 19, 14, 16, 12, 15, 11, 0, 13, 4, 8, 9, 7, 11,\n    18, 20, 26, 24, 23, 22, 26, 23, 19, 20, 15, 16, 4, 17, 15, 14, 17, 13, 7, 3,\n    20, 14, 9, 15, 11, 15, 20, 19, 26, 23, 16, 10, 17, 11, 2, 17, 14, 5, 10, 14,\n    21, 24, 27, 27, 23, 27, 26, 27, 25, 22, 16, 21, 23, 10, 19, 10, 14, 11, 12, 16,\n    4, 19, 15, 0, 18, 17, 19, 8, 18, 14, 22, 8, 16, 14, 3, 16, 13, 12, 16, 12,\n    26, 27, 27, 26, 27, 23, 24, 19, 16, 11, 13, 18, 14, 11, 5, 8, 8, 15, 12, 7,\n    23, 18, 25, 22, 14, 22, 16, 15, 2, 4, 13, 0, 15, 13, 9, 9, 9, 2, 6, 13,\n    16, 12, 21, 12, 14, 14, 18, 6, 8, 13, 9, 4, 8, 16, 7, 4, 6, 15, 10, 2,\n    20, 0, 19, 14, 8, 9, 7, 4, 15, 10, 14, 14, 1, 8, 14, 11, 4, 2, 15, 11,\n    24, 25, 18, 4, 16, 15, 16, 8, 12, 4, 10, 12, 15, 0, 12, 3, 13, 14, 16, 4,\n    15, 16, 11, 8, 14, 18, 6, 11, 5, 5, 8, 12, 15, 1, 11, 0, 9, 7, 1, 14,\n    19, 3, 24, 18, 16, 19, 12, 12, 9, 17, 9, 15, 14, 14, 14, 11, 14, 15, 10, 19,\n    19, 10, 5, 20, 4, 4, 15, 12, 15, 13, 10, 12, 11, 15, 12, 14, 12, 8, 14, 10,\n    9, 8, 5, 8, 7, 4, 17, 19, 7, 17, 10, 13, 7, 12, 17, 1, 10, 16, 12, 9,\n    8, 14, 11, 9, 4, 11, 12, 15, 10, 20, 16, 11, 10, 13, 15, 13, 12, 14, 11, 12,\n    15, 13, 0, 2, 13, 10, 6, 18, 16, 3, 15, 0, 6, 10, 5, 14, 9, 12, 12, 9,\n    7, 6, 10, 6, 16, 7, 12, 9, 10, 16, 4, 11, 13, 6, 12, 16, 16, 7, 17, 1,\n    13, 5, 13, 1, 13, 13, 8, 12, 12, 14, 8, 0, 15, 5, 0, 2, 14, 11, 7, 5,\n    15, 6, 0, 10, 15, 18, 8, 14, 16, 14, 13, 8, 19, 1, 13, 18, 5, 0, 10, 11,\n    16, 15, 15, 4, 6, 14, 7, 9, 0, 9, 17, 10, 14, 16, 6, 15, 5, 18, 0, 9,\n    11, 14, 11, 3, 13, 15, 15, 0, 14, 0, 15, 12, 8, 12, 7, 5, 8, 17, 13, 11,\n    12, 16, 8, 16, 10, 8, 14, 18, 6, 11, 10, 7, 7, 11, 14, 13, 10, 22, 18, 15,\n    15, 14, 1, 8, 9, 8, 14, 11, 9, 12, 1, 19, 13, 9, 0, 15, 14, 18, 16, 8,\n    8, 13, 15, 11, 14, 12, 4, 4, 16, 10, 14, 11, 11, 16, 9, 19, 0, 11, 18, 12,\n    98, 105, 110, 112, 111, 111, 111, 111, 110, 109, 106, 105, 102, 98, 90, 81, 77, 73, 72, 72,\n    87, 85, 90, 94, 101, 103, 105, 106, 105, 104, 103, 101, 97, 92, 88, 88, 87, 87, 77, 71,\n    88, 82, 81, 85, 84, 90, 91, 91, 91, 89, 87, 85, 81, 78, 74, 63, 71, 62, 60, 57,\n    87, 87, 88, 93, 95, 95, 95, 95, 95, 93, 91, 88, 85, 83, 83, 79, 74, 63, 77, 64,\n    90, 95, 97, 99, 99, 100, 100, 99, 99, 97, 95, 93, 87, 80, 75, 76, 76, 66, 67, 60,\n    78, 79, 82, 86, 83, 87, 87, 83, 82, 81, 79, 76, 70, 60, 62, 63, 48, 63, 50, 39,\n    76, 85, 85, 83, 86, 85, 86, 87, 89, 88, 86, 84, 77, 76, 77, 63, 70, 60, 56, 48,\n    73, 78, 81, 77, 71, 75, 79, 76, 78, 78, 79, 77, 73, 67, 63, 61, 58, 46, 43, 38,\n    77, 86, 85, 82, 84, 83, 80, 67, 77, 77, 75, 78, 69, 73, 64, 68, 52, 51, 32, 14,\n    76, 68, 71, 70, 71, 76, 74, 75, 73, 75, 75, 74, 61, 54, 62, 52, 51, 46, 40, 28,\n    74, 74, 67, 74, 70, 70, 66, 61, 62, 66, 70, 72, 71, 62, 47, 56, 55, 46, 39, 32,\n    61, 62, 70, 75, 77, 76, 75, 74, 69, 63, 61, 64, 58, 56, 56, 51, 34, 42, 32, 20,\n    72, 70, 69, 69, 63, 73, 74, 75, 73, 71, 62, 48, 62, 59, 57, 56, 48, 44, 33, 25,\n    66, 75, 75, 68, 70, 70, 69, 72, 69, 68, 65, 63, 58, 57, 38, 51, 40, 31, 12, 16,\n    70, 74, 74, 75, 75, 76, 76, 76, 75, 75, 60, 62, 65, 59, 53, 51, 36, 36, 24, 15,\n    70, 71, 68, 66, 68, 68, 68, 64, 53, 55, 63, 65, 58, 52, 36, 38, 32, 26, 12, 6,\n    63, 58, 61, 59, 62, 63, 63, 61, 59, 52, 51, 57, 44, 45, 29, 36, 25, 11, 5, 19,\n    61, 67, 65, 66, 66, 66, 64, 62, 59, 55, 55, 53, 49, 47, 49, 36, 25, 27, 7, 12,\n    57, 60, 61, 62, 65, 65, 65, 65, 64, 61, 51, 50, 44, 35, 39, 39, 21, 13, 9, 5,\n    65, 66, 64, 63, 63, 64, 61, 60, 58, 58, 54, 50, 47, 47, 33, 36, 16, 12, 13, 14,\n    63, 66, 66, 67, 67, 66, 64, 62, 59, 59, 55, 40, 42, 29, 36, 34, 6, 15, 8, 20,\n    61, 56, 47, 45, 50, 51, 31, 46, 41, 37, 34, 39, 30, 28, 24, 21, 20, 6, 9, 15,\n    64, 62, 59, 57, 60, 55, 53, 57, 56, 51, 56, 49, 47, 41, 27, 28, 9, 11, 4, 10,\n    59, 58, 60, 59, 58, 57, 56, 53, 46, 37, 43, 30, 38, 34, 23, 14, 18, 12, 11, 12,\n    54, 52, 46, 46, 44, 47, 41, 43, 43, 20, 21, 32, 30, 15, 11, 12, 9, 14, 6, 19,\n    56, 54, 53, 58, 64, 56, 55, 57, 52, 50, 48, 46, 40, 38, 24, 22, 4, 5, 14, 12,\n    44, 54, 47, 49, 44, 34, 43, 45, 42, 30, 40, 38, 33, 25, 20, 15, 5, 3, 9, 5,\n    50, 52, 51, 47, 51, 47, 44, 40, 48, 42, 40, 30, 29, 24, 8, 16, 15, 13, 19, 8,\n    40, 35, 40, 40, 27, 29, 24, 29, 24, 18, 18, 23, 3, 13, 12, 15, 20, 16, 11, 15,\n    44, 44, 44, 46, 47, 48, 50, 49, 44, 38, 18, 32, 27, 11, 14, 12, 16, 3, 15, 1,\n    42, 41, 46, 44, 45, 45, 44, 44, 41, 37, 34, 26, 20, 14, 5, 10, 0, 13, 7, 7,\n    18, 43, 35, 26, 32, 33, 29, 21, 27, 28, 20, 15, 8, 13, 13, 18, 1, 11, 6, 8,\n    30, 25, 37, 31, 16, 27, 31, 27, 15, 14, 22, 10, 9, 9, 4, 0, 18, 14, 10, 12,\n    26, 35, 36, 15, 17, 24, 27, 25, 25, 18, 22, 18, 12, 18, 10, 10, 0, 10, 9, 0,\n    30, 39, 36, 38, 36, 34, 31, 30, 31, 25, 27, 24, 8, 12, 8, 17, 10, 10, 19, 18,\n    23, 28, 20, 29, 21, 25, 21, 26, 16, 17, 22, 10, 15, 10, 9, 18, 4, 13, 11, 10,\n    21, 28, 25, 24, 18, 24, 20, 23, 17, 17, 7, 19, 0, 2, 13, 5, 16, 6, 11, 18,\n    21, 28, 26, 27, 34, 33, 31, 27, 19, 10, 15, 15, 11, 16, 17, 12, 16, 14, 17, 14,\n    30, 35, 35, 32, 20, 21, 21, 16, 0, 23, 16, 14, 11, 0, 15, 11, 13, 9, 12, 7,\n    32, 29, 25, 28, 27, 26, 24, 9, 0, 14, 10, 14, 6, 8, 10, 12, 10, 10, 13, 16,\n    82, 78, 79, 83, 84, 83, 77, 82, 79, 80, 75, 74, 71, 67, 62, 47, 56, 54, 45, 51,\n    62, 72, 69, 69, 50, 44, 60, 58, 58, 54, 56, 58, 60, 61, 60, 58, 57, 54, 45, 47,\n    59, 63, 64, 65, 67, 67, 65, 65, 65, 63, 62, 60, 57, 55, 50, 49, 42, 43, 40, 45,\n    54, 56, 57, 57, 55, 54, 55, 54, 53, 51, 45, 42, 42, 38, 37, 37, 38, 36, 35, 27,\n    20, 33, 25, 22, 33, 34, 33, 30, 14, 26, 26, 26, 16, 26, 25, 21, 27, 29, 22, 15,\n    31, 34, 38, 35, 37, 35, 31, 34, 27, 26, 25, 22, 25, 29, 28, 26, 22, 5, 14, 13,\n    26, 20, 13, 12, 11, 15, 2, 7, 18, 16, 13, 21, 15, 13, 16, 8, 13, 3, 10, 21,\n    18, 14, 22, 12, 11, 8, 6, 16, 16, 14, 7, 14, 9, 15, 15, 15, 15, 9, 7, 17,\n    19, 19, 26, 18, 21, 19, 16, 19, 11, 10, 22, 1, 11, 19, 7, 16, 13, 16, 15, 20,\n    9, 20, 17, 23, 17, 19, 12, 17, 8, 19, 13, 4, 0, 16, 16, 8, 7, 12, 7, 17,\n    10, 22, 20, 10, 16, 15, 15, 14, 17, 7, 16, 7, 0, 14, 13, 12, 14, 10, 12, 13,\n    18, 21, 22, 16, 19, 16, 6, 20, 17, 21, 16, 11, 16, 12, 12, 12, 15, 8, 10, 7,\n    20, 20, 16, 22, 19, 14, 7, 7, 8, 15, 17, 14, 13, 13, 4, 15, 10, 0, 10, 11,\n    22, 22, 23, 13, 19, 19, 4, 15, 16, 1, 17, 7, 12, 14, 18, 6, 12, 14, 0, 10,\n    23, 22, 20, 22, 20, 23, 19, 22, 23, 18, 17, 15, 16, 6, 13, 3, 7, 15, 10, 9,\n    15, 10, 17, 15, 12, 16, 6, 15, 9, 10, 5, 15, 10, 11, 16, 11, 16, 16, 14, 3,\n    10, 23, 26, 17, 22, 20, 17, 12, 16, 18, 16, 12, 12, 8, 14, 13, 20, 16, 10, 20,\n    12, 21, 17, 16, 3, 1, 8, 17, 13, 7, 11, 4, 0, 10, 4, 8, 13, 4, 5, 14,\n    19, 16, 20, 18, 22, 18, 17, 19, 6, 9, 14, 8, 8, 11, 14, 2, 12, 15, 12, 2,\n    17, 23, 17, 18, 20, 19, 18, 4, 13, 10, 3, 17, 14, 6, 17, 11, 9, 12, 9, 13,\n    14, 11, 12, 15, 19, 13, 12, 9, 16, 10, 10, 14, 16, 12, 1, 13, 7, 13, 11, 9,\n    11, 14, 22, 15, 12, 4, 11, 15, 0, 14, 15, 10, 5, 11, 11, 14, 1, 15, 17, 13,\n    19, 9, 2, 16, 15, 1, 14, 11, 17, 6, 0, 21, 14, 2, 13, 14, 7, 15, 11, 11,\n    9, 14, 0, 8, 9, 9, 19, 10, 14, 14, 10, 7, 15, 9, 19, 17, 0, 12, 13, 13,\n    1, 13, 16, 21, 9, 9, 15, 17, 12, 8, 6, 16, 9, 3, 0, 8, 14, 18, 10, 20,\n    13, 19, 13, 7, 8, 22, 19, 13, 14, 15, 9, 12, 10, 14, 2, 18, 15, 4, 18, 6,\n    15, 16, 14, 9, 14, 7, 15, 14, 17, 8, 0, 10, 16, 13, 14, 6, 14, 2, 14, 7,\n    14, 16, 15, 0, 7, 0, 13, 8, 12, 16, 12, 19, 10, 10, 19, 18, 3, 14, 14, 11,\n    18, 16, 13, 15, 14, 11, 14, 13, 14, 14, 12, 1, 10, 15, 19, 13, 16, 6, 0, 6,\n    10, 11, 17, 21, 13, 17, 13, 16, 13, 14, 14, 8, 8, 2, 15, 18, 15, 14, 10, 3,\n    15, 11, 0, 14, 13, 8, 11, 16, 13, 9, 15, 10, 14, 0, 13, 13, 18, 11, 0, 7,\n    14, 13, 5, 20, 16, 13, 15, 17, 16, 4, 14, 18, 3, 3, 12, 12, 13, 8, 5, 15,\n    15, 9, 15, 13, 15, 9, 8, 6, 16, 11, 13, 10, 22, 9, 13, 11, 5, 16, 9, 20,\n    20, 2, 8, 16, 14, 8, 4, 13, 17, 3, 18, 16, 14, 4, 21, 10, 0, 9, 17, 13,\n    7, 11, 7, 16, 20, 11, 17, 5, 14, 15, 0, 15, 10, 8, 16, 14, 17, 10, 0, 10,\n    19, 8, 10, 16, 15, 9, 15, 14, 11, 17, 15, 13, 11, 7, 14, 11, 9, 6, 0, 15,\n    13, 3, 16, 15, 0, 12, 11, 12, 8, 6, 14, 9, 1, 0, 14, 18, 11, 9, 0, 11,\n    10, 14, 12, 7, 16, 0, 8, 20, 10, 13, 17, 12, 13, 5, 19, 17, 9, 13, 16, 17,\n    12, 15, 15, 12, 11, 10, 12, 13, 6, 10, 10, 16, 12, 21, 16, 17, 12, 16, 15, 7,\n    7, 17, 0, 6, 19, 6, 12, 12, 16, 12, 10, 14, 8, 8, 15, 14, 12, 11, 10, 15,\n    89, 86, 85, 91, 91, 91, 85, 89, 87, 88, 83, 82, 79, 75, 68, 61, 60, 60, 26, 55,\n    74, 83, 85, 82, 65, 67, 75, 75, 75, 74, 72, 69, 66, 67, 69, 67, 66, 65, 55, 57,\n    74, 81, 82, 83, 85, 85, 83, 83, 82, 81, 80, 79, 75, 72, 64, 67, 62, 49, 56, 54,\n    74, 78, 78, 79, 76, 76, 77, 77, 76, 75, 71, 68, 65, 62, 63, 62, 52, 40, 51, 46,\n    64, 68, 67, 70, 68, 69, 68, 67, 66, 65, 62, 59, 50, 47, 53, 51, 46, 40, 45, 32,\n    63, 64, 66, 65, 67, 67, 67, 67, 65, 64, 60, 56, 45, 34, 47, 46, 48, 41, 25, 23,\n    55, 51, 57, 60, 57, 59, 59, 59, 59, 57, 55, 52, 48, 48, 44, 46, 29, 39, 17, 23,\n    48, 56, 55, 52, 52, 50, 50, 51, 49, 46, 43, 39, 33, 36, 31, 17, 28, 21, 9, 17,\n    23, 41, 38, 37, 36, 35, 36, 37, 34, 34, 29, 27, 26, 25, 16, 17, 2, 8, 11, 17,\n    28, 32, 39, 38, 36, 37, 36, 33, 34, 29, 24, 14, 27, 27, 24, 0, 11, 14, 7, 14,\n    35, 38, 38, 33, 34, 35, 30, 27, 28, 26, 25, 26, 21, 18, 15, 20, 9, 8, 5, 14,\n    31, 33, 32, 31, 34, 33, 33, 33, 31, 30, 28, 26, 19, 12, 7, 15, 9, 13, 6, 9,\n    30, 30, 28, 26, 20, 8, 22, 20, 22, 18, 17, 18, 6, 10, 3, 15, 17, 15, 8, 11,\n    30, 29, 29, 30, 31, 30, 26, 19, 16, 15, 20, 19, 19, 17, 6, 6, 15, 16, 10, 0,\n    29, 28, 26, 25, 28, 28, 24, 23, 21, 16, 18, 10, 14, 17, 15, 13, 13, 7, 7, 6,\n    27, 25, 24, 22, 17, 11, 23, 15, 17, 14, 7, 14, 13, 18, 6, 11, 12, 14, 6, 13,\n    12, 15, 18, 12, 22, 13, 16, 15, 20, 17, 18, 8, 20, 5, 11, 15, 15, 0, 17, 5,\n    23, 24, 22, 26, 25, 22, 21, 23, 6, 18, 11, 14, 14, 15, 9, 10, 14, 12, 3, 3,\n    26, 27, 27, 27, 27, 22, 21, 20, 19, 20, 17, 17, 9, 7, 14, 19, 17, 11, 20, 1,\n    27, 30, 30, 29, 31, 24, 23, 18, 9, 20, 12, 14, 17, 13, 20, 19, 6, 9, 12, 12,\n    21, 18, 24, 17, 15, 21, 11, 12, 12, 15, 10, 10, 6, 14, 10, 10, 15, 6, 13, 13,\n    18, 22, 20, 17, 24, 19, 17, 13, 4, 18, 14, 17, 8, 15, 10, 11, 12, 2, 4, 4,\n    14, 0, 18, 14, 20, 5, 12, 0, 8, 9, 12, 10, 10, 9, 17, 19, 13, 1, 8, 19,\n    22, 20, 12, 13, 18, 11, 17, 15, 13, 12, 15, 18, 10, 0, 4, 16, 13, 9, 15, 12,\n    10, 15, 10, 10, 11, 3, 0, 12, 12, 4, 12, 8, 2, 6, 16, 7, 9, 13, 11, 11,\n    7, 13, 18, 7, 13, 20, 12, 9, 7, 12, 16, 8, 9, 11, 11, 6, 6, 5, 16, 10,\n    12, 17, 3, 12, 3, 8, 12, 10, 17, 18, 11, 6, 0, 13, 15, 15, 9, 3, 12, 11,\n    6, 8, 16, 11, 13, 10, 0, 10, 6, 15, 7, 12, 6, 1, 4, 16, 15, 17, 21, 6,\n    14, 15, 13, 13, 17, 15, 0, 12, 8, 15, 12, 0, 13, 16, 14, 12, 12, 16, 15, 12,\n    6, 4, 6, 10, 18, 11, 15, 10, 0, 3, 11, 4, 11, 12, 17, 18, 16, 15, 18, 16,\n    17, 8, 13, 10, 15, 13, 12, 9, 4, 18, 0, 9, 15, 9, 7, 10, 9, 7, 3, 0,\n    14, 9, 3, 19, 14, 0, 16, 3, 2, 4, 9, 13, 9, 6, 5, 21, 7, 21, 15, 17,\n    16, 14, 9, 13, 11, 13, 12, 15, 13, 10, 15, 0, 14, 17, 14, 6, 17, 6, 8, 19,\n    7, 10, 11, 9, 8, 11, 8, 20, 9, 11, 0, 16, 5, 0, 0, 8, 18, 19, 13, 15,\n    4, 11, 10, 11, 15, 7, 13, 9, 19, 9, 8, 11, 20, 12, 11, 17, 3, 6, 15, 0,\n    10, 8, 16, 12, 20, 15, 7, 17, 6, 4, 10, 17, 13, 6, 12, 11, 18, 1, 8, 9,\n    15, 17, 3, 10, 7, 6, 15, 5, 8, 18, 12, 4, 11, 13, 13, 20, 14, 11, 10, 5,\n    18, 15, 11, 5, 14, 8, 15, 7, 11, 15, 14, 18, 8, 16, 19, 13, 16, 9, 10, 13,\n    16, 5, 18, 5, 17, 14, 14, 11, 15, 4, 14, 16, 15, 3, 14, 12, 0, 15, 8, 15,\n    10, 15, 16, 8, 1, 8, 7, 0, 16, 6, 19, 16, 18, 2, 8, 13, 18, 13, 13, 13,\n    101, 97, 97, 103, 104, 103, 97, 102, 99, 101, 95, 95, 91, 88, 80, 68, 71, 70, 53, 66,\n    87, 96, 99, 95, 83, 82, 89, 91, 90, 90, 87, 85, 78, 71, 77, 77, 75, 76, 63, 66,\n    89, 96, 97, 98, 99, 100, 97, 97, 96, 95, 93, 91, 88, 83, 72, 78, 75, 59, 66, 65,\n    90, 94, 94, 95, 93, 93, 93, 94, 93, 91, 86, 83, 79, 70, 75, 75, 52, 67, 60, 57,\n    82, 86, 86, 88, 86, 87, 85, 85, 86, 85, 83, 81, 75, 67, 70, 70, 59, 53, 60, 46,\n    84, 86, 87, 87, 88, 88, 90, 88, 87, 85, 81, 77, 64, 55, 61, 64, 64, 62, 45, 37,\n    75, 78, 81, 82, 79, 81, 81, 80, 80, 78, 74, 68, 64, 68, 66, 64, 39, 55, 24, 39,\n    75, 87, 86, 83, 82, 81, 80, 81, 77, 77, 75, 74, 65, 61, 61, 45, 57, 48, 24, 33,\n    59, 79, 76, 75, 75, 73, 73, 70, 68, 63, 59, 57, 48, 56, 47, 53, 42, 33, 20, 22,\n    70, 79, 79, 79, 78, 78, 77, 76, 74, 72, 68, 63, 53, 60, 61, 40, 40, 35, 16, 13,\n    66, 72, 70, 65, 66, 64, 63, 63, 58, 58, 50, 38, 53, 52, 45, 38, 36, 30, 22, 0,\n    64, 68, 70, 70, 72, 72, 72, 71, 71, 68, 62, 61, 59, 52, 41, 40, 32, 11, 0, 5,\n    67, 72, 71, 73, 68, 65, 62, 59, 58, 58, 55, 40, 46, 40, 36, 33, 14, 8, 11, 5,\n    75, 76, 77, 76, 74, 74, 71, 66, 53, 59, 59, 47, 52, 55, 41, 46, 33, 27, 11, 7,\n    68, 65, 64, 66, 64, 64, 62, 60, 54, 48, 53, 51, 46, 39, 33, 27, 0, 22, 10, 12,\n    67, 65, 64, 63, 61, 59, 61, 61, 58, 58, 55, 47, 43, 39, 28, 26, 6, 8, 13, 12,\n    53, 56, 58, 59, 59, 51, 53, 50, 44, 47, 39, 42, 36, 31, 24, 25, 7, 15, 15, 9,\n    56, 57, 56, 53, 53, 54, 54, 53, 49, 48, 45, 39, 28, 27, 21, 15, 8, 13, 7, 12,\n    58, 59, 59, 59, 59, 58, 57, 54, 50, 46, 42, 29, 34, 28, 11, 17, 5, 5, 6, 4,\n    52, 53, 55, 53, 51, 47, 46, 40, 15, 27, 28, 29, 24, 21, 11, 15, 10, 12, 4, 5,\n    54, 57, 57, 51, 44, 40, 41, 41, 35, 33, 17, 27, 6, 21, 5, 7, 15, 13, 9, 12,\n    51, 47, 51, 45, 40, 32, 34, 30, 28, 20, 16, 17, 23, 20, 15, 16, 15, 18, 2, 18,\n    37, 39, 42, 36, 35, 19, 26, 22, 21, 19, 20, 18, 3, 17, 14, 13, 14, 11, 15, 14,\n    36, 42, 45, 45, 41, 40, 39, 35, 27, 22, 23, 27, 18, 18, 12, 12, 12, 16, 15, 19,\n    38, 33, 36, 28, 29, 28, 25, 25, 20, 16, 12, 15, 13, 2, 10, 14, 9, 12, 11, 7,\n    41, 44, 46, 37, 30, 33, 29, 22, 17, 19, 24, 14, 12, 2, 1, 12, 9, 14, 13, 0,\n    30, 34, 35, 32, 21, 21, 23, 19, 17, 15, 16, 15, 10, 13, 6, 13, 18, 12, 5, 1,\n    35, 27, 30, 26, 23, 23, 19, 22, 12, 19, 15, 4, 13, 14, 7, 17, 8, 13, 17, 16,\n    28, 29, 18, 20, 30, 22, 10, 14, 19, 16, 10, 17, 9, 11, 22, 17, 5, 4, 8, 11,\n    23, 26, 34, 19, 22, 19, 23, 22, 11, 7, 11, 13, 10, 6, 14, 13, 6, 19, 8, 12,\n    26, 18, 5, 24, 21, 22, 17, 15, 11, 16, 1, 11, 9, 11, 8, 13, 9, 17, 19, 11,\n    33, 34, 28, 30, 29, 18, 14, 17, 21, 18, 18, 2, 9, 10, 14, 17, 6, 16, 16, 20,\n    27, 29, 21, 27, 23, 24, 23, 20, 0, 1, 10, 12, 11, 15, 16, 5, 10, 17, 16, 20,\n    19, 23, 24, 14, 13, 20, 8, 18, 12, 15, 15, 9, 17, 16, 6, 15, 9, 12, 21, 20,\n    18, 21, 25, 27, 7, 22, 17, 9, 13, 19, 16, 13, 4, 1, 8, 0, 7, 10, 15, 13,\n    8, 18, 21, 19, 20, 13, 11, 13, 10, 15, 9, 17, 12, 14, 13, 6, 15, 15, 4, 11,\n    14, 24, 27, 23, 22, 13, 11, 14, 18, 1, 17, 15, 12, 11, 16, 14, 18, 10, 12, 1,\n    17, 25, 26, 18, 18, 12, 11, 10, 4, 10, 5, 14, 15, 15, 4, 15, 12, 15, 12, 17,\n    15, 17, 21, 10, 7, 9, 8, 16, 14, 13, 11, 11, 10, 15, 15, 6, 7, 11, 18, 14,\n    14, 27, 26, 17, 18, 1, 9, 1, 11, 10, 3, 10, 6, 9, 4, 8, 10, 12, 8, 14,\n    82, 86, 87, 89, 89, 91, 91, 91, 90, 89, 87, 85, 81, 77, 67, 43, 59, 55, 53, 56,\n    65, 69, 67, 67, 62, 62, 62, 61, 57, 55, 53, 55, 56, 55, 50, 51, 52, 45, 45, 41,\n    47, 51, 48, 52, 45, 50, 46, 47, 48, 47, 48, 46, 44, 41, 34, 31, 35, 33, 18, 27,\n    41, 49, 47, 48, 47, 47, 47, 47, 46, 46, 44, 39, 26, 18, 29, 22, 18, 23, 19, 16,\n    36, 37, 25, 34, 33, 32, 36, 38, 35, 30, 22, 29, 23, 13, 12, 18, 23, 10, 6, 12,\n    42, 44, 45, 45, 45, 46, 45, 45, 43, 41, 37, 29, 14, 22, 27, 22, 24, 21, 9, 15,\n    29, 31, 33, 33, 32, 31, 29, 30, 29, 24, 16, 22, 17, 17, 13, 15, 10, 14, 0, 9,\n    28, 28, 31, 33, 32, 28, 29, 29, 27, 25, 21, 21, 16, 10, 17, 11, 7, 6, 13, 13,\n    16, 16, 14, 20, 0, 11, 18, 6, 17, 18, 20, 0, 10, 10, 13, 2, 11, 10, 6, 19,\n    12, 21, 20, 16, 19, 9, 5, 4, 14, 16, 4, 9, 17, 10, 2, 11, 11, 12, 8, 4,\n    23, 18, 22, 15, 19, 7, 17, 18, 13, 16, 10, 13, 18, 14, 21, 8, 15, 14, 12, 10,\n    14, 7, 11, 16, 10, 0, 14, 11, 7, 17, 9, 10, 14, 11, 14, 14, 5, 8, 11, 16,\n    17, 16, 13, 18, 22, 21, 20, 18, 4, 11, 9, 14, 17, 14, 9, 15, 6, 7, 7, 15,\n    14, 10, 11, 16, 20, 13, 18, 4, 8, 17, 15, 15, 12, 12, 19, 8, 11, 20, 15, 19,\n    17, 10, 15, 5, 14, 10, 5, 7, 16, 0, 10, 16, 15, 13, 7, 12, 0, 17, 0, 14,\n    23, 20, 22, 14, 16, 15, 17, 16, 10, 10, 12, 18, 17, 18, 20, 19, 16, 10, 15, 0,\n    13, 13, 1, 2, 8, 12, 16, 19, 14, 16, 3, 10, 6, 13, 9, 11, 14, 12, 16, 14,\n    7, 16, 8, 13, 18, 11, 1, 1, 14, 18, 8, 7, 16, 14, 15, 1, 11, 19, 10, 14,\n    9, 11, 15, 17, 13, 22, 18, 7, 14, 17, 3, 17, 18, 10, 15, 10, 4, 16, 13, 13,\n    9, 13, 15, 10, 14, 14, 4, 13, 12, 11, 14, 13, 19, 13, 13, 10, 13, 6, 7, 9,\n    10, 15, 11, 17, 14, 19, 11, 17, 7, 12, 12, 15, 10, 16, 10, 14, 20, 17, 8, 9,\n    12, 0, 7, 7, 7, 16, 13, 7, 9, 23, 6, 7, 17, 12, 0, 13, 16, 15, 7, 6,\n    19, 14, 0, 11, 10, 14, 8, 11, 7, 10, 12, 15, 12, 20, 13, 11, 12, 12, 12, 0,\n    14, 11, 20, 1, 9, 13, 14, 18, 18, 15, 13, 3, 16, 15, 10, 15, 15, 12, 14, 14,\n    12, 10, 15, 10, 16, 8, 11, 3, 0, 13, 7, 16, 10, 7, 0, 10, 14, 12, 2, 17,\n    12, 11, 0, 14, 15, 7, 14, 13, 15, 11, 16, 13, 6, 16, 11, 0, 0, 3, 4, 16,\n    11, 0, 16, 4, 17, 13, 7, 12, 8, 16, 12, 15, 9, 19, 12, 15, 17, 5, 9, 0,\n    9, 12, 11, 0, 5, 1, 3, 15, 16, 15, 10, 10, 9, 14, 14, 17, 16, 20, 14, 14,\n    2, 22, 5, 11, 11, 12, 15, 16, 5, 14, 8, 14, 17, 14, 7, 10, 9, 13, 10, 8,\n    18, 15, 8, 6, 4, 17, 7, 9, 8, 8, 7, 13, 16, 11, 15, 11, 16, 11, 13, 9,\n    5, 4, 9, 8, 15, 0, 14, 15, 14, 8, 10, 15, 12, 15, 9, 0, 12, 12, 12, 12,\n    18, 5, 21, 14, 4, 13, 18, 0, 17, 4, 11, 6, 16, 14, 16, 16, 6, 21, 15, 9,\n    9, 13, 14, 7, 14, 18, 13, 16, 15, 11, 19, 18, 10, 8, 13, 15, 6, 12, 15, 14,\n    9, 11, 17, 9, 9, 17, 10, 14, 17, 16, 18, 1, 14, 0, 10, 13, 5, 11, 15, 4,\n    16, 4, 16, 19, 15, 7, 15, 11, 14, 14, 9, 0, 14, 14, 12, 15, 17, 4, 10, 14,\n    19, 2, 7, 14, 9, 0, 12, 12, 15, 18, 16, 14, 8, 16, 18, 13, 10, 9, 9, 11,\n    18, 14, 15, 12, 11, 3, 19, 14, 12, 8, 14, 10, 10, 16, 10, 9, 10, 14, 0, 11,\n    95, 98, 99, 103, 102, 104, 105, 104, 103, 102, 100, 98, 94, 90, 81, 67, 68, 66, 65, 66,\n    82, 88, 90, 87, 86, 87, 88, 88, 86, 85, 82, 79, 75, 71, 65, 63, 65, 61, 57, 52,\n    83, 81, 76, 80, 78, 76, 78, 78, 78, 77, 75, 73, 70, 65, 55, 56, 59, 54, 41, 41,\n    71, 78, 76, 76, 77, 76, 76, 76, 74, 72, 72, 68, 59, 58, 59, 55, 48, 44, 35, 22,\n    71, 71, 63, 71, 70, 70, 69, 70, 69, 67, 66, 63, 57, 48, 52, 53, 44, 38, 33, 28,\n    75, 79, 79, 79, 79, 79, 79, 79, 77, 76, 73, 69, 63, 60, 62, 56, 39, 44, 35, 30,\n    60, 63, 58, 61, 59, 59, 61, 62, 64, 64, 63, 61, 52, 36, 44, 39, 33, 27, 19, 6,\n    61, 65, 66, 67, 67, 66, 65, 64, 62, 60, 56, 51, 39, 47, 30, 33, 18, 20, 19, 14,\n    45, 48, 48, 43, 44, 43, 44, 43, 41, 41, 38, 30, 19, 19, 19, 16, 21, 15, 4, 9,\n    40, 39, 30, 36, 34, 25, 27, 33, 32, 33, 28, 23, 9, 23, 12, 13, 10, 0, 17, 21,\n    42, 45, 43, 41, 41, 41, 41, 41, 39, 36, 32, 25, 25, 21, 13, 9, 8, 13, 8, 20,\n    36, 33, 34, 35, 37, 38, 34, 31, 29, 27, 21, 23, 22, 19, 13, 14, 13, 12, 15, 20,\n    45, 48, 47, 46, 44, 46, 38, 39, 37, 33, 30, 23, 13, 17, 12, 3, 18, 17, 14, 16,\n    42, 42, 42, 40, 39, 38, 35, 32, 27, 8, 25, 25, 19, 18, 11, 3, 18, 15, 12, 16,\n    32, 31, 34, 32, 31, 32, 30, 28, 22, 17, 20, 16, 10, 13, 19, 6, 8, 3, 9, 16,\n    16, 24, 21, 28, 30, 23, 21, 17, 27, 24, 8, 19, 20, 11, 7, 12, 0, 20, 16, 7,\n    24, 12, 19, 5, 22, 11, 18, 12, 9, 9, 17, 15, 14, 20, 12, 15, 14, 7, 16, 11,\n    8, 12, 6, 15, 18, 18, 15, 8, 7, 17, 18, 7, 7, 14, 12, 11, 10, 3, 9, 11,\n    13, 19, 19, 25, 7, 18, 8, 12, 13, 7, 6, 6, 17, 16, 6, 5, 14, 15, 19, 8,\n    29, 24, 21, 25, 15, 14, 11, 9, 16, 14, 11, 13, 9, 0, 19, 8, 16, 3, 7, 7,\n    18, 21, 16, 26, 3, 17, 17, 5, 0, 0, 10, 16, 16, 17, 8, 16, 10, 8, 11, 14,\n    19, 22, 19, 1, 12, 6, 12, 2, 5, 10, 3, 18, 9, 8, 9, 0, 18, 7, 11, 15,\n    18, 17, 7, 19, 9, 15, 6, 15, 8, 14, 16, 4, 5, 11, 8, 1, 13, 5, 13, 17,\n    16, 16, 12, 19, 16, 11, 6, 11, 0, 20, 9, 18, 0, 12, 13, 14, 11, 19, 20, 10,\n    17, 15, 18, 13, 13, 16, 19, 8, 0, 6, 8, 2, 10, 2, 6, 16, 16, 13, 17, 11,\n    8, 7, 15, 4, 17, 16, 17, 9, 20, 9, 14, 5, 17, 13, 18, 3, 5, 11, 14, 16,\n    12, 18, 17, 15, 12, 7, 17, 17, 11, 20, 13, 14, 17, 19, 12, 20, 16, 17, 16, 15,\n    18, 17, 8, 10, 4, 14, 11, 11, 6, 18, 19, 17, 16, 21, 17, 17, 1, 17, 15, 15,\n    10, 12, 13, 13, 16, 8, 14, 12, 15, 13, 15, 12, 15, 12, 7, 13, 13, 15, 8, 17,\n    12, 5, 6, 21, 11, 18, 8, 16, 13, 21, 19, 15, 20, 14, 13, 15, 9, 17, 14, 16,\n    10, 16, 8, 15, 15, 1, 20, 17, 15, 16, 9, 13, 17, 13, 17, 14, 9, 12, 14, 0,\n    17, 9, 5, 14, 20, 16, 13, 15, 10, 15, 0, 11, 4, 11, 9, 15, 14, 17, 21, 15,\n    19, 5, 8, 5, 12, 8, 19, 10, 12, 14, 14, 8, 14, 7, 6, 3, 0, 14, 9, 4,\n    105, 109, 111, 114, 114, 115, 116, 115, 114, 113, 112, 110, 105, 100, 90, 75, 77, 75, 73, 74,\n    94, 99, 104, 100, 101, 100, 100, 100, 99, 98, 94, 91, 86, 84, 79, 76, 78, 74, 69, 60,\n    96, 96, 91, 93, 91, 91, 95, 96, 97, 95, 93, 91, 87, 82, 71, 70, 73, 69, 58, 55,\n    83, 88, 87, 88, 89, 89, 87, 87, 85, 82, 80, 80, 69, 69, 70, 67, 58, 54, 47, 29,\n    88, 88, 83, 90, 90, 89, 88, 89, 88, 85, 84, 81, 76, 64, 66, 68, 59, 54, 48, 39,\n    92, 96, 97, 97, 97, 97, 97, 97, 96, 94, 92, 88, 79, 72, 75, 69, 63, 55, 55, 39,\n    76, 82, 77, 78, 77, 74, 73, 76, 80, 80, 78, 75, 66, 54, 62, 52, 52, 38, 37, 3,\n    83, 87, 87, 89, 87, 87, 85, 84, 81, 79, 76, 73, 61, 66, 53, 50, 39, 33, 30, 13,\n    77, 77, 80, 75, 77, 76, 77, 78, 75, 72, 68, 62, 40, 46, 42, 42, 36, 26, 22, 10,\n    74, 79, 79, 78, 77, 77, 77, 77, 73, 68, 65, 65, 65, 61, 43, 40, 28, 13, 12, 8,\n    68, 73, 71, 70, 68, 68, 68, 67, 61, 61, 52, 53, 50, 50, 26, 32, 28, 22, 10, 12,\n    62, 75, 75, 76, 75, 73, 66, 64, 66, 53, 53, 55, 55, 42, 42, 25, 25, 8, 14, 14,\n    78, 80, 76, 74, 79, 74, 75, 72, 68, 61, 37, 38, 48, 43, 39, 31, 21, 17, 3, 10,\n    79, 77, 75, 77, 75, 71, 74, 68, 65, 60, 53, 49, 47, 36, 23, 7, 13, 6, 17, 16,\n    70, 70, 73, 70, 71, 72, 72, 69, 66, 62, 49, 50, 47, 42, 35, 28, 17, 17, 11, 9,\n    47, 65, 65, 67, 64, 56, 53, 57, 56, 53, 44, 47, 26, 23, 12, 13, 16, 19, 16, 15,\n    55, 47, 53, 56, 58, 48, 34, 51, 52, 48, 29, 36, 20, 17, 12, 14, 10, 10, 15, 3,\n    53, 48, 44, 47, 43, 34, 28, 32, 30, 23, 18, 18, 19, 13, 15, 3, 11, 16, 19, 19,\n    52, 45, 44, 43, 45, 22, 29, 33, 31, 27, 20, 5, 20, 18, 13, 16, 5, 16, 18, 12,\n    48, 46, 51, 47, 46, 41, 35, 32, 26, 24, 26, 12, 18, 18, 10, 16, 3, 8, 10, 18,\n    55, 54, 53, 52, 50, 47, 42, 35, 30, 35, 24, 8, 16, 12, 11, 14, 14, 14, 19, 13,\n    48, 51, 49, 49, 46, 45, 42, 36, 29, 7, 26, 16, 1, 14, 14, 4, 8, 10, 10, 18,\n    48, 47, 46, 39, 38, 33, 26, 14, 13, 20, 7, 10, 11, 15, 3, 13, 13, 7, 17, 9,\n    45, 50, 49, 50, 47, 38, 31, 32, 25, 19, 18, 14, 17, 5, 10, 17, 12, 17, 9, 0,\n    44, 39, 41, 32, 30, 36, 33, 28, 17, 27, 18, 12, 11, 12, 10, 10, 7, 12, 15, 20,\n    43, 43, 38, 36, 31, 30, 30, 29, 15, 9, 18, 4, 14, 14, 9, 12, 11, 2, 13, 12,\n    35, 39, 29, 25, 26, 9, 13, 13, 11, 13, 9, 9, 13, 16, 4, 20, 18, 17, 11, 17,\n    21, 34, 24, 28, 16, 18, 20, 15, 17, 19, 5, 18, 9, 18, 11, 19, 1, 19, 17, 18,\n    31, 30, 22, 16, 19, 22, 18, 23, 11, 11, 18, 15, 7, 14, 9, 16, 11, 19, 5, 7,\n    32, 20, 31, 3, 20, 14, 21, 17, 10, 11, 19, 13, 15, 12, 15, 15, 1, 18, 15, 13,\n    20, 31, 26, 24, 10, 16, 16, 12, 6, 0, 17, 7, 6, 11, 9, 2, 18, 19, 11, 18,\n    28, 25, 18, 21, 17, 12, 10, 12, 13, 16, 5, 9, 4, 9, 14, 10, 15, 18, 18, 8,\n    82, 87, 90, 92, 93, 93, 94, 94, 91, 90, 88, 85, 80, 73, 71, 75, 71, 68, 57, 59,\n    55, 51, 48, 51, 53, 57, 55, 56, 55, 55, 51, 45, 45, 46, 43, 40, 41, 29, 34, 26,\n    40, 40, 44, 44, 45, 48, 48, 48, 46, 45, 43, 40, 28, 32, 24, 26, 30, 16, 11, 22,\n    39, 43, 41, 36, 39, 39, 34, 37, 33, 33, 32, 26, 30, 33, 24, 9, 26, 7, 17, 21,\n    35, 32, 36, 33, 33, 31, 31, 30, 17, 26, 21, 24, 22, 13, 22, 17, 25, 11, 18, 12,\n    22, 33, 36, 33, 31, 28, 26, 28, 24, 21, 20, 19, 22, 11, 22, 16, 21, 19, 16, 22,\n    18, 19, 24, 21, 19, 18, 23, 20, 18, 19, 5, 15, 10, 9, 6, 16, 21, 11, 14, 22,\n    9, 19, 15, 19, 19, 19, 21, 15, 18, 18, 14, 18, 18, 6, 15, 18, 19, 16, 18, 5,\n    22, 12, 15, 9, 16, 16, 17, 17, 10, 21, 4, 13, 14, 10, 17, 9, 23, 7, 11, 17,\n    21, 13, 18, 16, 13, 11, 18, 16, 22, 14, 7, 14, 15, 11, 13, 17, 16, 20, 11, 6,\n    19, 3, 8, 16, 18, 12, 15, 11, 2, 7, 13, 18, 0, 12, 14, 19, 23, 6, 3, 13,\n    14, 21, 16, 13, 18, 11, 14, 13, 16, 17, 14, 13, 15, 17, 15, 19, 15, 9, 12, 8,\n    8, 10, 15, 10, 20, 18, 13, 13, 17, 10, 0, 12, 12, 11, 14, 12, 8, 8, 6, 18,\n    18, 16, 10, 13, 16, 16, 17, 18, 13, 14, 19, 6, 2, 12, 5, 9, 19, 15, 17, 14,\n    5, 18, 12, 17, 15, 16, 17, 20, 4, 16, 10, 15, 0, 20, 16, 11, 4, 0, 13, 13,\n    19, 17, 12, 18, 18, 15, 15, 13, 14, 20, 13, 14, 4, 1, 11, 7, 18, 14, 16, 13,\n    19, 15, 7, 15, 12, 20, 19, 9, 17, 19, 15, 16, 18, 16, 12, 22, 9, 17, 10, 12,\n    3, 5, 16, 0, 19, 19, 12, 15, 22, 15, 17, 14, 1, 13, 4, 13, 18, 4, 17, 12,\n    18, 15, 17, 17, 18, 12, 18, 17, 19, 7, 17, 20, 19, 16, 17, 6, 18, 15, 6, 11,\n    9, 13, 10, 19, 15, 15, 14, 9, 11, 7, 9, 5, 18, 5, 23, 10, 11, 21, 17, 18,\n    16, 15, 17, 18, 20, 18, 14, 16, 14, 19, 12, 16, 9, 17, 7, 17, 22, 8, 15, 10,\n    7, 6, 13, 15, 18, 22, 18, 18, 16, 19, 19, 17, 23, 13, 19, 18, 13, 10, 17, 8,\n    14, 21, 12, 19, 16, 21, 10, 21, 16, 11, 15, 17, 25, 15, 16, 10, 15, 14, 3, 17,\n    93, 98, 101, 103, 105, 104, 106, 105, 103, 102, 99, 96, 90, 82, 84, 87, 83, 77, 70, 71,\n    73, 76, 79, 77, 78, 78, 78, 77, 76, 76, 73, 70, 64, 70, 65, 69, 58, 63, 51, 48,\n    65, 72, 74, 74, 75, 75, 74, 72, 70, 68, 58, 55, 63, 60, 62, 54, 56, 51, 36, 31,\n    59, 62, 59, 56, 55, 55, 53, 55, 42, 38, 40, 37, 39, 46, 41, 38, 29, 23, 19, 16,\n    61, 63, 63, 62, 61, 60, 57, 56, 51, 49, 38, 44, 47, 51, 39, 49, 40, 34, 19, 13,\n    54, 50, 48, 49, 46, 47, 43, 43, 40, 35, 40, 35, 32, 40, 22, 31, 24, 23, 20, 18,\n    32, 36, 40, 39, 35, 36, 36, 36, 32, 30, 28, 31, 13, 21, 21, 17, 8, 8, 18, 17,\n    35, 38, 39, 39, 38, 38, 37, 35, 29, 23, 30, 26, 12, 9, 15, 16, 15, 14, 3, 8,\n    17, 20, 20, 22, 18, 22, 8, 10, 16, 17, 17, 12, 20, 15, 3, 13, 15, 9, 12, 0,\n    13, 18, 23, 13, 2, 21, 18, 19, 16, 17, 18, 14, 11, 22, 2, 15, 10, 9, 14, 19,\n    21, 6, 20, 16, 17, 20, 24, 19, 25, 24, 13, 20, 20, 0, 7, 7, 9, 10, 18, 18,\n    16, 3, 9, 11, 20, 11, 0, 9, 4, 4, 17, 17, 13, 12, 11, 9, 12, 14, 11, 18,\n    26, 19, 17, 19, 16, 6, 19, 14, 10, 14, 0, 20, 3, 12, 17, 20, 10, 10, 15, 0,\n    23, 20, 16, 10, 20, 4, 17, 17, 17, 1, 3, 14, 1, 12, 22, 11, 13, 13, 20, 8,\n    12, 10, 9, 17, 19, 8, 12, 16, 16, 16, 17, 19, 10, 20, 15, 15, 16, 12, 5, 19,\n    16, 17, 20, 15, 19, 15, 12, 16, 21, 12, 14, 19, 6, 17, 12, 15, 7, 11, 14, 10,\n    0, 26, 24, 19, 16, 9, 10, 16, 18, 5, 21, 13, 14, 16, 16, 14, 14, 14, 13, 7,\n    22, 3, 6, 18, 18, 12, 19, 16, 20, 8, 17, 4, 6, 12, 16, 13, 2, 11, 14, 19,\n    16, 22, 20, 16, 20, 18, 14, 13, 5, 13, 15, 10, 11, 17, 12, 21, 9, 14, 1, 13,\n    4, 8, 23, 14, 16, 16, 11, 12, 2, 18, 6, 16, 12, 22, 17, 9, 20, 1, 0, 5,\n    0, 8, 15, 14, 9, 15, 8, 0, 16, 16, 16, 18, 16, 13, 4, 19, 16, 11, 13, 4,\n    14, 8, 16, 5, 5, 18, 14, 11, 19, 11, 12, 20, 20, 20, 18, 14, 14, 10, 14, 3,\n    12, 3, 14, 10, 17, 16, 17, 17, 13, 12, 12, 1, 8, 16, 17, 14, 12, 8, 18, 21,\n    11, 17, 13, 8, 12, 20, 15, 11, 13, 9, 12, 7, 18, 12, 8, 5, 7, 16, 16, 15,\n    12, 14, 16, 12, 18, 9, 18, 18, 13, 16, 16, 17, 13, 8, 10, 14, 21, 15, 18, 16,\n    22, 15, 16, 12, 19, 12, 19, 4, 16, 10, 14, 5, 3, 16, 6, 4, 9, 8, 20, 21,\n    12, 19, 22, 14, 11, 4, 0, 13, 11, 1, 12, 10, 13, 17, 16, 13, 11, 15, 5, 8,\n    11, 6, 17, 19, 16, 13, 16, 16, 18, 11, 4, 16, 21, 16, 15, 13, 12, 17, 14, 8,\n    106, 110, 114, 117, 118, 117, 119, 118, 115, 114, 111, 108, 100, 84, 99, 99, 93, 85, 81, 81,\n    89, 91, 95, 92, 95, 92, 91, 92, 91, 90, 89, 85, 82, 88, 80, 83, 75, 71, 69, 63,\n    87, 94, 97, 97, 98, 98, 98, 97, 96, 93, 85, 82, 85, 82, 76, 63, 70, 66, 52, 34,\n    83, 91, 89, 87, 87, 85, 86, 85, 78, 77, 66, 70, 63, 70, 59, 61, 53, 48, 38, 21,\n    87, 91, 93, 92, 93, 91, 89, 88, 84, 80, 76, 79, 77, 68, 57, 71, 60, 44, 31, 21,\n    85, 85, 85, 84, 81, 79, 72, 75, 67, 66, 71, 72, 51, 65, 57, 58, 31, 35, 25, 5,\n    64, 69, 71, 69, 68, 62, 64, 65, 66, 64, 56, 53, 47, 49, 51, 38, 24, 24, 1, 8,\n    81, 83, 82, 82, 83, 81, 79, 77, 61, 65, 60, 61, 61, 59, 50, 51, 32, 25, 9, 6,\n    67, 61, 69, 66, 64, 65, 63, 63, 60, 58, 52, 44, 39, 42, 36, 30, 16, 17, 19, 18,\n    57, 59, 54, 52, 51, 48, 53, 57, 50, 50, 50, 43, 40, 38, 20, 27, 9, 17, 14, 17,\n    69, 71, 71, 70, 69, 68, 66, 63, 59, 54, 47, 44, 46, 49, 30, 29, 17, 14, 14, 10,\n    58, 61, 56, 47, 56, 56, 43, 49, 43, 42, 38, 44, 41, 44, 16, 12, 5, 19, 10, 10,\n    68, 68, 66, 64, 53, 51, 56, 56, 56, 52, 43, 32, 37, 43, 21, 19, 18, 11, 14, 18,\n    54, 59, 60, 61, 60, 58, 53, 38, 36, 39, 47, 43, 38, 42, 24, 10, 18, 9, 16, 16,\n    45, 50, 49, 48, 50, 46, 38, 42, 41, 32, 26, 22, 16, 41, 20, 8, 17, 17, 17, 12,\n    53, 56, 54, 52, 52, 51, 45, 42, 45, 37, 31, 31, 27, 41, 6, 20, 5, 11, 7, 13,\n    25, 31, 16, 33, 30, 22, 29, 34, 34, 28, 6, 16, 11, 40, 10, 12, 12, 18, 19, 16,\n    21, 31, 14, 25, 32, 22, 21, 16, 16, 24, 10, 13, 18, 40, 11, 11, 19, 11, 8, 15,\n    29, 25, 32, 29, 22, 23, 17, 5, 8, 23, 18, 13, 17, 40, 14, 7, 13, 1, 12, 11,\n    13, 24, 34, 24, 23, 12, 16, 18, 6, 9, 15, 12, 14, 40, 2, 14, 21, 16, 14, 15,\n    25, 30, 15, 21, 21, 14, 20, 10, 13, 11, 9, 15, 5, 39, 8, 18, 12, 15, 12, 17,\n    18, 21, 16, 16, 11, 21, 16, 16, 19, 20, 10, 13, 21, 39, 7, 4, 18, 16, 11, 16,\n    22, 14, 22, 13, 20, 21, 19, 17, 10, 17, 15, 21, 15, 39, 14, 17, 13, 12, 17, 17,\n    21, 13, 23, 18, 18, 17, 11, 12, 16, 9, 10, 10, 8, 39, 10, 4, 9, 5, 1, 15,\n    25, 20, 18, 8, 23, 22, 4, 18, 13, 11, 16, 15, 7, 38, 15, 17, 20, 16, 18, 18,\n    12, 17, 17, 17, 18, 18, 22, 20, 9, 20, 14, 0, 1, 38, 11, 4, 12, 20, 21, 9,\n    85, 88, 91, 93, 93, 93, 92, 90, 90, 88, 82, 78, 77, 75, 64, 59, 51, 70, 54, 60,\n    52, 48, 50, 55, 51, 50, 50, 48, 47, 45, 48, 47, 45, 43, 34, 32, 32, 37, 24, 30,\n    41, 47, 31, 20, 37, 36, 34, 28, 19, 25, 30, 30, 30, 21, 29, 21, 15, 13, 17, 4,\n    40, 35, 33, 36, 39, 40, 39, 39, 32, 27, 24, 28, 28, 24, 18, 23, 16, 17, 16, 12,\n    41, 36, 35, 29, 28, 26, 22, 30, 29, 28, 28, 18, 23, 19, 23, 18, 16, 18, 13, 14,\n    16, 27, 27, 22, 26, 25, 22, 24, 23, 24, 22, 24, 20, 9, 18, 18, 13, 15, 14, 12,\n    23, 27, 18, 26, 24, 24, 20, 7, 18, 23, 11, 20, 15, 16, 18, 16, 15, 10, 12, 18,\n    13, 13, 17, 21, 12, 18, 12, 0, 16, 18, 20, 17, 18, 10, 11, 8, 12, 12, 16, 19,\n    20, 12, 18, 12, 9, 14, 10, 15, 14, 16, 9, 1, 0, 10, 13, 8, 16, 12, 15, 19,\n    8, 13, 15, 13, 18, 21, 12, 16, 14, 23, 17, 16, 23, 15, 11, 10, 6, 11, 20, 8,\n    14, 13, 14, 15, 11, 11, 17, 21, 12, 12, 13, 8, 17, 13, 6, 14, 8, 21, 16, 7,\n    16, 12, 21, 23, 11, 22, 15, 22, 13, 4, 18, 20, 16, 15, 9, 20, 14, 12, 6, 8,\n    15, 13, 1, 2, 20, 21, 17, 6, 16, 8, 12, 17, 13, 20, 5, 18, 6, 16, 8, 16,\n    21, 23, 12, 18, 11, 15, 6, 20, 11, 12, 9, 12, 11, 15, 16, 17, 18, 8, 1, 15,\n    19, 18, 14, 18, 16, 13, 21, 12, 14, 7, 9, 16, 14, 15, 17, 15, 11, 12, 20, 16,\n    18, 16, 21, 17, 16, 15, 18, 7, 11, 19, 14, 16, 17, 14, 18, 0, 13, 20, 21, 20,\n    13, 15, 14, 17, 10, 18, 12, 5, 17, 22, 14, 11, 18, 4, 15, 10, 23, 15, 16, 12,\n    20, 15, 19, 7, 12, 11, 1, 20, 12, 18, 12, 15, 10, 22, 12, 18, 17, 8, 18, 16,\n    10, 12, 7, 8, 15, 7, 10, 6, 17, 0, 19, 8, 5, 12, 15, 7, 11, 18, 16, 13,\n    3, 11, 17, 19, 13, 11, 8, 11, 9, 19, 17, 8, 15, 18, 15, 18, 15, 5, 17, 16,\n    8, 13, 18, 11, 13, 8, 11, 6, 19, 14, 18, 13, 14, 19, 10, 19, 11, 17, 9, 18,\n    14, 18, 15, 14, 12, 18, 16, 10, 20, 15, 0, 13, 14, 18, 3, 15, 10, 13, 17, 18,\n    99, 102, 105, 107, 107, 106, 106, 105, 104, 102, 96, 90, 90, 89, 80, 74, 70, 82, 68, 70,\n    77, 80, 81, 83, 82, 83, 84, 82, 81, 80, 72, 73, 75, 63, 67, 64, 63, 64, 42, 41,\n    75, 66, 63, 63, 72, 72, 64, 67, 64, 58, 61, 60, 56, 49, 58, 52, 41, 34, 22, 18,\n    67, 57, 58, 61, 63, 63, 63, 62, 57, 48, 53, 48, 47, 46, 41, 41, 17, 23, 22, 13,\n    65, 63, 59, 55, 57, 57, 55, 54, 54, 47, 50, 49, 31, 46, 41, 22, 17, 21, 8, 21,\n    55, 59, 61, 60, 59, 58, 58, 57, 47, 47, 48, 40, 42, 29, 32, 18, 21, 16, 8, 4,\n    55, 54, 55, 56, 53, 53, 49, 46, 42, 36, 38, 38, 26, 30, 24, 18, 13, 14, 10, 1,\n    34, 44, 41, 40, 38, 42, 28, 30, 32, 27, 26, 30, 18, 24, 20, 15, 14, 6, 14, 14,\n    38, 18, 30, 21, 28, 23, 26, 23, 19, 24, 14, 18, 23, 12, 15, 18, 21, 17, 12, 9,\n    23, 27, 16, 24, 19, 17, 18, 22, 16, 16, 12, 18, 16, 18, 9, 17, 16, 19, 19, 15,\n    20, 22, 15, 19, 11, 18, 20, 14, 14, 19, 17, 9, 19, 8, 10, 13, 16, 19, 12, 15,\n    21, 26, 10, 17, 17, 2, 8, 21, 21, 21, 6, 16, 14, 13, 19, 15, 14, 18, 8, 0,\n    22, 26, 27, 25, 16, 17, 20, 14, 19, 19, 5, 23, 14, 11, 19, 18, 15, 17, 9, 15,\n    19, 15, 21, 20, 20, 12, 14, 12, 16, 16, 13, 12, 20, 21, 14, 18, 18, 7, 16, 12,\n    19, 19, 22, 17, 25, 18, 10, 19, 20, 11, 22, 8, 15, 21, 14, 15, 19, 18, 17, 14,\n    14, 20, 17, 14, 9, 21, 10, 16, 19, 16, 19, 16, 19, 6, 15, 16, 17, 18, 10, 16,\n    22, 19, 23, 17, 19, 17, 4, 17, 0, 8, 21, 3, 14, 18, 23, 1, 17, 0, 20, 9,\n    14, 14, 13, 8, 21, 10, 17, 16, 11, 15, 15, 12, 15, 17, 17, 14, 18, 21, 15, 20,\n    12, 13, 19, 17, 10, 16, 11, 18, 15, 4, 11, 8, 17, 14, 13, 17, 10, 21, 16, 18,\n    17, 17, 19, 18, 17, 15, 13, 14, 16, 20, 4, 16, 18, 14, 17, 10, 7, 11, 12, 18,\n    20, 20, 13, 19, 9, 17, 21, 6, 20, 9, 15, 19, 20, 10, 15, 22, 14, 16, 16, 20,\n    17, 21, 14, 5, 11, 0, 6, 23, 21, 5, 10, 21, 19, 0, 20, 17, 24, 13, 8, 22,\n    108, 111, 115, 116, 116, 116, 115, 113, 112, 110, 104, 99, 97, 97, 89, 87, 80, 88, 80, 75,\n    87, 92, 92, 94, 94, 95, 95, 93, 91, 89, 82, 84, 83, 77, 80, 76, 75, 71, 58, 50,\n    89, 81, 70, 72, 83, 84, 74, 77, 68, 73, 72, 70, 72, 67, 68, 62, 45, 46, 30, 24,\n    83, 78, 77, 80, 81, 80, 79, 78, 58, 70, 62, 64, 53, 63, 56, 55, 39, 37, 17, 22,\n    83, 82, 77, 72, 73, 70, 67, 59, 60, 69, 65, 60, 56, 62, 48, 49, 40, 28, 22, 18,\n    71, 76, 79, 79, 76, 76, 71, 70, 65, 69, 62, 56, 59, 48, 48, 36, 28, 24, 24, 18,\n    75, 75, 76, 77, 75, 75, 72, 68, 61, 64, 61, 53, 56, 51, 49, 32, 29, 23, 9, 12,\n    62, 63, 66, 67, 63, 62, 54, 61, 55, 51, 52, 50, 42, 26, 22, 19, 21, 6, 14, 14,\n    69, 66, 66, 64, 62, 62, 61, 63, 58, 55, 53, 47, 37, 36, 32, 25, 15, 17, 15, 18,\n    52, 51, 57, 48, 55, 51, 41, 43, 45, 37, 33, 23, 11, 18, 13, 14, 7, 18, 7, 16,\n    54, 46, 48, 50, 48, 44, 29, 43, 38, 21, 22, 18, 23, 23, 10, 11, 20, 22, 9, 18,\n    49, 49, 43, 50, 45, 42, 47, 46, 35, 39, 25, 28, 22, 19, 13, 14, 8, 15, 10, 6,\n    43, 46, 47, 51, 50, 50, 41, 27, 36, 29, 28, 20, 17, 23, 15, 18, 13, 19, 5, 6,\n    44, 46, 45, 46, 44, 41, 36, 34, 21, 16, 19, 15, 13, 21, 15, 20, 17, 15, 18, 12,\n    38, 31, 36, 34, 33, 23, 23, 13, 20, 11, 21, 18, 17, 19, 15, 18, 17, 4, 3, 7,\n    34, 26, 25, 16, 15, 16, 17, 12, 9, 17, 19, 14, 3, 16, 17, 0, 22, 9, 15, 19,\n    15, 29, 22, 25, 12, 20, 19, 13, 16, 20, 14, 15, 21, 0, 17, 16, 6, 10, 2, 10,\n    23, 27, 14, 21, 23, 13, 20, 24, 16, 12, 15, 13, 18, 18, 13, 12, 0, 19, 22, 11,\n    20, 19, 24, 17, 11, 16, 20, 21, 21, 10, 21, 21, 12, 13, 2, 19, 19, 19, 18, 10,\n    14, 28, 21, 21, 19, 18, 18, 9, 12, 3, 5, 14, 18, 18, 18, 6, 4, 18, 16, 11,\n    20, 20, 12, 14, 17, 8, 20, 17, 13, 11, 10, 14, 7, 7, 16, 19, 9, 9, 17, 17,\n    87, 88, 85, 85, 87, 86, 86, 85, 83, 78, 68, 71, 77, 76, 59, 68, 62, 58, 55, 40,\n    51, 48, 45, 51, 35, 46, 44, 45, 28, 40, 45, 41, 39, 39, 35, 24, 27, 16, 22, 21,\n    39, 35, 39, 38, 34, 32, 41, 38, 33, 36, 34, 30, 15, 28, 24, 16, 18, 22, 21, 7,\n    43, 43, 42, 40, 39, 38, 37, 33, 24, 15, 17, 26, 24, 22, 21, 23, 19, 23, 18, 13,\n    24, 25, 25, 12, 27, 20, 13, 22, 17, 23, 11, 15, 19, 11, 15, 19, 18, 13, 13, 9,\n    14, 23, 24, 16, 24, 21, 23, 12, 18, 21, 26, 17, 16, 3, 15, 11, 16, 13, 9, 20,\n    17, 29, 18, 22, 9, 11, 15, 17, 21, 20, 16, 16, 14, 16, 15, 8, 16, 12, 13, 15,\n    19, 17, 18, 26, 25, 8, 13, 9, 16, 12, 8, 11, 7, 16, 15, 9, 17, 18, 19, 16,\n    13, 13, 20, 11, 20, 19, 13, 19, 10, 13, 7, 19, 11, 17, 19, 16, 16, 21, 12, 20,\n    11, 14, 19, 15, 21, 15, 20, 10, 15, 18, 10, 16, 15, 13, 19, 9, 18, 13, 7, 18,\n    19, 12, 12, 17, 6, 18, 22, 20, 9, 22, 16, 16, 19, 7, 19, 9, 14, 18, 21, 19,\n    14, 16, 17, 17, 23, 17, 15, 18, 4, 15, 16, 6, 15, 18, 9, 13, 16, 15, 14, 3,\n    19, 18, 11, 12, 14, 22, 17, 9, 10, 10, 18, 23, 1, 18, 16, 8, 16, 7, 13, 21,\n    15, 12, 1, 22, 14, 16, 15, 22, 18, 19, 20, 19, 25, 14, 18, 13, 22, 20, 18, 18,\n    15, 13, 25, 13, 18, 18, 18, 13, 15, 17, 15, 9, 13, 14, 7, 13, 18, 12, 16, 10,\n    18, 17, 11, 15, 22, 18, 18, 11, 14, 16, 9, 22, 6, 14, 11, 11, 16, 24, 6, 13,\n    17, 16, 17, 16, 16, 20, 12, 13, 20, 21, 2, 20, 14, 18, 18, 16, 2, 14, 19, 19,\n    73, 98, 95, 94, 96, 95, 95, 95, 92, 88, 79, 81, 87, 85, 66, 76, 71, 67, 65, 53,\n    63, 60, 66, 68, 62, 64, 58, 63, 54, 39, 50, 49, 46, 44, 40, 36, 30, 22, 16, 24,\n    54, 42, 52, 39, 39, 42, 48, 42, 37, 42, 43, 23, 42, 38, 30, 24, 20, 18, 14, 15,\n    51, 60, 56, 55, 53, 49, 49, 45, 45, 44, 44, 41, 32, 26, 27, 26, 22, 22, 8, 14,\n    33, 29, 20, 31, 29, 13, 28, 36, 32, 27, 30, 11, 24, 18, 21, 12, 17, 19, 12, 16,\n    20, 24, 30, 22, 22, 21, 18, 23, 24, 12, 16, 15, 15, 15, 13, 17, 16, 10, 12, 21,\n    15, 25, 25, 21, 19, 16, 22, 24, 16, 15, 16, 17, 15, 16, 16, 18, 18, 19, 18, 12,\n    12, 22, 21, 11, 24, 15, 17, 18, 6, 14, 9, 17, 18, 16, 11, 15, 13, 10, 14, 10,\n    19, 18, 22, 7, 17, 18, 6, 21, 22, 10, 21, 14, 15, 10, 17, 14, 23, 17, 16, 16,\n    14, 16, 12, 22, 24, 21, 20, 13, 17, 19, 13, 14, 15, 8, 9, 18, 5, 6, 11, 21,\n    25, 21, 24, 12, 0, 20, 18, 13, 19, 22, 20, 22, 18, 19, 19, 16, 10, 15, 11, 16,\n    25, 17, 21, 20, 17, 19, 23, 10, 18, 23, 19, 16, 14, 7, 19, 11, 7, 19, 18, 5,\n    11, 12, 20, 11, 18, 13, 15, 15, 19, 10, 19, 20, 19, 15, 5, 18, 17, 19, 21, 15,\n    16, 13, 19, 12, 19, 20, 21, 12, 22, 12, 10, 18, 20, 18, 24, 13, 13, 16, 12, 13,\n    14, 16, 8, 17, 12, 20, 23, 19, 9, 9, 14, 16, 14, 16, 23, 21, 18, 13, 0, 20,\n    18, 12, 18, 11, 16, 15, 19, 19, 19, 15, 16, 8, 12, 16, 18, 10, 10, 18, 23, 18,\n    20, 4, 10, 21, 6, 14, 20, 17, 20, 20, 6, 21, 13, 16, 19, 23, 17, 14, 5, 6,\n    59, 105, 113, 108, 108, 109, 109, 108, 106, 101, 84, 96, 101, 97, 85, 88, 83, 80, 73, 64,\n    35, 87, 79, 83, 93, 87, 82, 85, 78, 81, 74, 84, 64, 69, 69, 60, 57, 52, 42, 35,\n    26, 79, 71, 81, 67, 75, 74, 65, 65, 72, 57, 68, 59, 44, 56, 47, 34, 29, 19, 16,\n    19, 84, 82, 78, 72, 72, 71, 69, 72, 72, 60, 53, 46, 39, 38, 35, 25, 22, 15, 18,\n    20, 65, 67, 67, 70, 66, 65, 64, 63, 60, 57, 49, 44, 41, 23, 14, 16, 22, 13, 11,\n    9, 59, 44, 58, 62, 60, 59, 57, 57, 53, 38, 38, 32, 19, 12, 22, 0, 5, 13, 19,\n    19, 66, 65, 63, 54, 51, 40, 58, 56, 50, 47, 47, 35, 14, 19, 10, 20, 18, 19, 20,\n    13, 60, 60, 50, 34, 38, 44, 36, 45, 42, 35, 28, 22, 17, 18, 2, 18, 12, 20, 13,\n    10, 55, 55, 56, 51, 49, 45, 42, 35, 38, 32, 35, 25, 20, 20, 16, 21, 16, 11, 18,\n    19, 44, 43, 48, 45, 40, 31, 16, 27, 19, 11, 10, 0, 19, 4, 10, 5, 11, 7, 4,\n    3, 33, 40, 38, 35, 34, 22, 31, 24, 22, 24, 13, 13, 12, 14, 23, 12, 19, 22, 18,\n    13, 35, 39, 41, 35, 31, 28, 28, 23, 22, 19, 14, 18, 18, 19, 21, 17, 20, 14, 22,\n    20, 32, 38, 34, 27, 21, 17, 9, 8, 15, 11, 18, 21, 13, 11, 25, 16, 12, 13, 15,\n    7, 32, 31, 28, 36, 33, 16, 25, 11, 17, 14, 10, 15, 19, 21, 18, 16, 12, 18, 17,\n    20, 21, 15, 19, 24, 21, 23, 22, 13, 20, 7, 10, 25, 17, 21, 21, 22, 19, 21, 9,\n    14, 25, 22, 20, 14, 12, 8, 13, 15, 23, 14, 23, 7, 10, 15, 19, 19, 14, 10, 7,\n    6, 27, 28, 24, 26, 11, 21, 16, 18, 13, 12, 15, 24, 11, 13, 18, 14, 12, 13, 13,\n    78, 77, 78, 78, 72, 63, 73, 72, 72, 72, 69, 67, 67, 68, 62, 61, 54, 35, 41, 38,\n    46, 47, 49, 53, 53, 52, 52, 51, 49, 45, 38, 42, 42, 36, 24, 29, 19, 19, 23, 12,\n    32, 37, 31, 26, 36, 27, 29, 28, 27, 19, 36, 34, 31, 21, 21, 26, 20, 17, 17, 14,\n    26, 28, 25, 23, 19, 20, 25, 24, 17, 21, 13, 23, 11, 21, 19, 16, 13, 13, 16, 20,\n    18, 22, 17, 21, 6, 16, 14, 11, 16, 11, 3, 18, 8, 20, 15, 19, 9, 26, 21, 15,\n    16, 16, 21, 15, 19, 13, 17, 7, 13, 20, 11, 11, 17, 11, 18, 14, 13, 20, 17, 10,\n    23, 23, 19, 18, 21, 13, 8, 13, 22, 6, 20, 20, 19, 14, 6, 10, 18, 8, 15, 19,\n    23, 20, 11, 14, 8, 16, 16, 13, 20, 9, 23, 18, 15, 17, 7, 13, 14, 11, 13, 14,\n    19, 15, 23, 19, 18, 23, 18, 26, 15, 16, 19, 17, 14, 6, 16, 19, 8, 23, 18, 18,\n    9, 14, 16, 10, 19, 7, 13, 16, 6, 21, 19, 18, 16, 19, 22, 19, 7, 7, 19, 22,\n    10, 7, 10, 20, 13, 12, 16, 14, 13, 23, 15, 15, 8, 21, 14, 16, 7, 19, 21, 7,\n    17, 5, 18, 12, 20, 16, 22, 23, 17, 7, 19, 6, 13, 23, 20, 18, 13, 18, 21, 21,\n    11, 10, 18, 9, 16, 9, 8, 20, 21, 16, 14, 21, 8, 18, 17, 12, 17, 15, 20, 11,\n    94, 92, 91, 93, 88, 80, 77, 75, 75, 72, 73, 72, 77, 76, 68, 70, 64, 47, 50, 43,\n    53, 59, 50, 59, 60, 55, 52, 50, 48, 54, 54, 41, 47, 49, 41, 35, 34, 26, 17, 24,\n    59, 51, 53, 55, 55, 52, 56, 55, 50, 51, 53, 45, 41, 41, 18, 22, 7, 0, 20, 20,\n    39, 41, 41, 37, 41, 41, 39, 39, 36, 33, 31, 9, 24, 6, 19, 9, 12, 20, 6, 19,\n    31, 33, 33, 25, 24, 30, 30, 23, 16, 13, 13, 19, 17, 16, 20, 12, 21, 17, 13, 9,\n    26, 20, 21, 20, 24, 18, 20, 16, 15, 17, 19, 20, 14, 8, 21, 15, 20, 14, 4, 11,\n    24, 22, 16, 20, 23, 17, 17, 22, 20, 16, 16, 20, 2, 15, 8, 19, 21, 21, 17, 14,\n    23, 26, 13, 12, 17, 19, 18, 21, 13, 20, 20, 13, 14, 8, 21, 9, 22, 14, 4, 14,\n    23, 14, 16, 18, 22, 16, 10, 13, 17, 22, 12, 19, 18, 22, 14, 16, 21, 19, 9, 15,\n    20, 22, 19, 22, 17, 13, 19, 17, 19, 22, 15, 19, 16, 20, 10, 18, 11, 21, 21, 12,\n    16, 16, 19, 16, 11, 13, 20, 9, 15, 18, 21, 17, 17, 19, 17, 21, 12, 10, 11, 24,\n    21, 14, 15, 15, 14, 14, 18, 14, 22, 21, 13, 18, 18, 19, 14, 16, 19, 21, 18, 9,\n    23, 21, 16, 23, 7, 19, 20, 19, 21, 18, 11, 18, 15, 10, 18, 20, 6, 17, 12, 23,\n    54, 103, 98, 103, 101, 100, 92, 89, 91, 89, 77, 86, 87, 85, 80, 78, 75, 66, 52, 51,\n    32, 88, 87, 86, 86, 86, 84, 86, 85, 80, 71, 68, 78, 70, 67, 63, 54, 41, 40, 30,\n    23, 80, 69, 69, 74, 70, 71, 67, 57, 63, 62, 58, 50, 51, 43, 44, 34, 27, 25, 24,\n    19, 65, 58, 65, 66, 66, 66, 59, 56, 45, 57, 51, 21, 42, 30, 29, 16, 16, 14, 20,\n    24, 58, 62, 61, 55, 46, 56, 51, 46, 49, 50, 47, 42, 29, 27, 23, 10, 22, 24, 18,\n    21, 51, 51, 32, 41, 36, 33, 31, 37, 36, 29, 25, 17, 20, 9, 20, 17, 12, 11, 18,\n    16, 55, 52, 50, 41, 42, 37, 42, 28, 29, 21, 21, 6, 10, 11, 18, 16, 17, 14, 16,\n    20, 38, 44, 43, 40, 42, 35, 36, 25, 32, 22, 23, 20, 8, 12, 16, 10, 17, 18, 20,\n    10, 48, 44, 39, 34, 21, 20, 26, 24, 27, 21, 21, 19, 13, 21, 17, 15, 19, 17, 16,\n    22, 34, 36, 30, 26, 27, 25, 13, 16, 22, 18, 17, 20, 18, 13, 21, 18, 9, 17, 18,\n    19, 18, 27, 21, 25, 20, 14, 13, 1, 10, 17, 20, 11, 21, 1, 15, 17, 19, 8, 26,\n    12, 28, 29, 23, 22, 16, 20, 24, 18, 10, 1, 21, 17, 17, 17, 8, 21, 12, 16, 18,\n    12, 27, 19, 19, 17, 16, 21, 15, 10, 20, 20, 17, 12, 20, 15, 20, 20, 24, 15, 19,\n    67, 70, 78, 81, 81, 78, 78, 78, 73, 71, 68, 63, 66, 67, 60, 56, 51, 50, 29, 37,\n    47, 52, 53, 56, 56, 55, 54, 53, 47, 40, 40, 41, 27, 30, 27, 25, 7, 16, 22, 18,\n    22, 33, 35, 36, 34, 37, 36, 35, 24, 17, 22, 18, 21, 23, 7, 16, 16, 19, 8, 15,\n    24, 26, 23, 20, 18, 18, 22, 24, 17, 17, 16, 19, 21, 13, 12, 16, 21, 24, 0, 12,\n    18, 20, 15, 26, 21, 22, 22, 16, 21, 11, 15, 17, 18, 17, 25, 24, 23, 18, 9, 12,\n    21, 7, 17, 16, 15, 16, 17, 20, 18, 13, 20, 16, 19, 20, 14, 8, 11, 18, 15, 18,\n    14, 13, 19, 18, 20, 19, 7, 15, 23, 21, 19, 18, 15, 16, 17, 18, 22, 15, 16, 13,\n    16, 26, 23, 21, 23, 9, 14, 22, 12, 16, 17, 23, 14, 16, 15, 13, 18, 21, 19, 15,\n    17, 6, 6, 15, 21, 25, 17, 23, 17, 20, 19, 16, 27, 18, 12, 14, 21, 10, 23, 11,\n    22, 11, 8, 20, 6, 21, 23, 17, 22, 20, 24, 22, 18, 24, 16, 11, 25, 17, 19, 20,\n    21, 14, 20, 22, 19, 26, 14, 18, 16, 12, 19, 24, 19, 24, 12, 20, 17, 23, 16, 21,\n    85, 90, 94, 96, 95, 95, 95, 95, 92, 89, 83, 77, 78, 79, 73, 72, 63, 63, 32, 46,\n    62, 61, 63, 63, 66, 65, 63, 63, 56, 46, 47, 52, 34, 38, 37, 34, 19, 18, 15, 21,\n    38, 48, 49, 49, 44, 43, 43, 41, 31, 31, 38, 35, 18, 30, 27, 22, 21, 17, 19, 23,\n    40, 40, 36, 30, 28, 24, 24, 30, 31, 27, 24, 21, 14, 17, 24, 10, 15, 13, 14, 22,\n    23, 34, 21, 26, 23, 28, 19, 20, 25, 20, 16, 15, 9, 12, 23, 3, 25, 7, 22, 7,\n    23, 19, 18, 20, 25, 16, 16, 19, 26, 20, 21, 18, 11, 19, 23, 21, 19, 17, 18, 22,\n    23, 26, 13, 20, 21, 18, 12, 9, 12, 12, 19, 19, 8, 19, 19, 16, 19, 18, 17, 19,\n    12, 20, 19, 18, 19, 14, 24, 15, 26, 16, 21, 8, 15, 16, 17, 20, 13, 15, 17, 20,\n    21, 17, 13, 18, 20, 17, 19, 23, 17, 22, 24, 1, 23, 14, 11, 12, 17, 16, 12, 12,\n    16, 5, 15, 20, 15, 14, 11, 20, 18, 14, 14, 12, 13, 19, 16, 13, 21, 5, 13, 11,\n    14, 21, 15, 20, 19, 17, 15, 19, 21, 18, 23, 7, 21, 8, 15, 17, 22, 14, 21, 22,\n    102, 107, 110, 112, 111, 111, 111, 111, 108, 105, 98, 91, 94, 93, 89, 84, 77, 76, 57, 57,\n    86, 86, 88, 89, 92, 91, 86, 77, 79, 68, 69, 74, 64, 67, 62, 56, 31, 37, 21, 16,\n    66, 72, 65, 53, 67, 64, 65, 60, 57, 47, 44, 49, 47, 42, 37, 29, 15, 20, 17, 18,\n    63, 64, 60, 37, 47, 52, 57, 55, 52, 49, 47, 47, 42, 24, 25, 18, 22, 13, 20, 16,\n    53, 52, 48, 45, 51, 52, 50, 49, 27, 42, 40, 29, 23, 12, 21, 8, 12, 22, 23, 10,\n    41, 44, 43, 38, 38, 28, 34, 30, 22, 21, 24, 18, 16, 10, 17, 17, 15, 20, 20, 12,\n    46, 43, 40, 29, 21, 30, 24, 28, 25, 23, 22, 11, 15, 16, 15, 18, 14, 16, 13, 18,\n    31, 37, 36, 35, 24, 29, 21, 20, 9, 20, 21, 16, 20, 16, 13, 20, 18, 20, 24, 22,\n    29, 25, 30, 18, 24, 12, 20, 24, 20, 18, 15, 19, 17, 13, 19, 10, 22, 8, 14, 20,\n    24, 28, 20, 18, 21, 16, 19, 2, 19, 13, 11, 21, 19, 20, 17, 25, 15, 20, 12, 14,\n    26, 28, 23, 23, 14, 18, 21, 23, 16, 13, 18, 23, 20, 14, 15, 19, 23, 19, 18, 19,\n    65, 73, 67, 72, 69, 67, 65, 65, 58, 54, 57, 48, 56, 37, 40, 42, 36, 31, 24, 19,\n    45, 45, 43, 42, 43, 40, 42, 41, 43, 42, 30, 36, 23, 15, 23, 8, 23, 21, 19, 22,\n    26, 21, 28, 26, 24, 19, 22, 20, 22, 15, 21, 20, 15, 20, 22, 11, 16, 22, 13, 18,\n    30, 32, 34, 35, 31, 32, 19, 18, 26, 15, 14, 11, 21, 18, 13, 13, 17, 17, 15, 12,\n    21, 25, 24, 22, 5, 12, 19, 14, 21, 20, 17, 20, 8, 18, 12, 24, 18, 17, 17, 10,\n    23, 25, 24, 26, 22, 16, 24, 22, 13, 22, 14, 22, 12, 15, 9, 14, 15, 18, 15, 18,\n    23, 11, 11, 22, 22, 20, 23, 22, 26, 11, 18, 20, 18, 10, 15, 19, 11, 17, 16, 17,\n    15, 22, 15, 19, 17, 20, 18, 25, 21, 22, 20, 17, 20, 21, 26, 19, 22, 18, 20, 20,\n    89, 93, 90, 92, 90, 87, 88, 85, 85, 82, 62, 72, 77, 71, 64, 58, 51, 41, 25, 26,\n    43, 59, 52, 46, 52, 48, 46, 50, 48, 50, 20, 46, 34, 13, 22, 26, 20, 22, 16, 18,\n    27, 36, 33, 37, 28, 31, 33, 31, 32, 21, 19, 20, 16, 17, 15, 20, 13, 23, 10, 13,\n    32, 42, 28, 27, 29, 32, 35, 33, 28, 31, 23, 19, 16, 20, 23, 23, 21, 16, 22, 20,\n    29, 22, 26, 33, 27, 24, 22, 24, 10, 15, 14, 16, 18, 17, 14, 5, 19, 14, 16, 23,\n    10, 22, 20, 13, 19, 21, 25, 20, 21, 23, 13, 9, 17, 17, 15, 20, 20, 21, 19, 10,\n    23, 18, 18, 22, 24, 29, 18, 15, 23, 21, 20, 20, 10, 15, 22, 16, 23, 17, 21, 18,\n    24, 11, 7, 8, 18, 17, 21, 16, 19, 24, 21, 23, 13, 22, 18, 19, 21, 16, 21, 27,\n    105, 107, 106, 106, 105, 104, 103, 101, 101, 97, 77, 91, 91, 86, 77, 70, 64, 54, 46, 40,\n    83, 80, 79, 68, 63, 78, 75, 73, 68, 72, 63, 66, 56, 56, 46, 31, 15, 8, 15, 18,\n    55, 51, 52, 56, 48, 51, 53, 47, 41, 40, 20, 34, 36, 28, 19, 20, 20, 19, 21, 19,\n    56, 53, 50, 40, 47, 54, 54, 49, 28, 50, 39, 40, 35, 30, 19, 26, 25, 28, 16, 21,\n    38, 43, 37, 41, 39, 39, 41, 40, 29, 20, 19, 20, 21, 21, 15, 12, 14, 17, 18, 11,\n    46, 38, 38, 33, 30, 29, 28, 22, 17, 17, 14, 12, 12, 15, 24, 18, 16, 19, 17, 15,\n    31, 38, 25, 27, 13, 21, 20, 19, 12, 15, 19, 24, 17, 13, 17, 20, 17, 18, 21, 16,\n    16, 23, 23, 27, 18, 26, 16, 15, 12, 8, 13, 22, 15, 15, 16, 18, 14, 22, 23, 22,\n    18, 24, 19, 25, 25, 21, 13, 12, 15, 19, 18, 23, 22, 12, 22, 16, 16, 26, 17, 20,\n    60, 58, 51, 66, 50, 61, 47, 51, 45, 56, 52, 50, 39, 48, 35, 36, 27, 31, 28, 25,\n    42, 43, 39, 37, 37, 42, 40, 29, 33, 23, 35, 29, 23, 23, 14, 21, 17, 17, 23, 21,\n    32, 23, 15, 21, 28, 32, 23, 25, 14, 25, 21, 20, 19, 23, 21, 18, 16, 9, 19, 13,\n    15, 18, 26, 24, 20, 24, 23, 18, 22, 16, 17, 20, 4, 20, 24, 18, 12, 11, 18, 12,\n    22, 25, 19, 18, 20, 16, 22, 26, 16, 24, 13, 19, 14, 17, 26, 17, 6, 21, 23, 18,\n    24, 19, 19, 26, 21, 18, 22, 17, 21, 23, 17, 19, 26, 21, 18, 24, 24, 23, 15, 23,\n    28, 18, 20, 29, 17, 22, 20, 16, 19, 22, 23, 19, 21, 15, 20, 11, 19, 21, 19, 21,\n    83, 78, 76, 78, 69, 69, 74, 77, 67, 77, 70, 70, 66, 66, 53, 52, 42, 32, 26, 23,\n    52, 53, 49, 49, 43, 35, 47, 42, 42, 40, 36, 37, 29, 23, 22, 19, 24, 25, 18, 19,\n    37, 39, 33, 34, 28, 33, 28, 27, 27, 27, 12, 24, 26, 19, 23, 20, 17, 18, 20, 14,\n    28, 24, 23, 28, 24, 22, 26, 26, 23, 24, 26, 26, 20, 20, 19, 22, 24, 13, 17, 20,\n    28, 15, 22, 23, 28, 25, 15, 25, 22, 20, 21, 20, 23, 21, 20, 27, 16, 19, 16, 19,\n    8, 19, 22, 25, 21, 25, 16, 21, 20, 20, 22, 26, 26, 19, 21, 14, 23, 23, 13, 16,\n    19, 14, 23, 25, 24, 24, 15, 26, 22, 20, 22, 22, 19, 21, 23, 22, 14, 18, 19, 21,\n    108, 106, 101, 101, 89, 89, 96, 101, 94, 98, 88, 90, 87, 76, 72, 69, 51, 51, 25, 21,\n    81, 73, 80, 81, 70, 77, 73, 64, 58, 60, 61, 52, 42, 46, 35, 28, 21, 20, 19, 15,\n    64, 60, 58, 61, 63, 56, 61, 52, 46, 43, 43, 23, 27, 21, 16, 23, 21, 21, 21, 11,\n    49, 54, 48, 58, 55, 33, 46, 48, 46, 25, 32, 27, 23, 20, 22, 18, 21, 12, 20, 13,\n    39, 43, 47, 37, 38, 29, 35, 32, 28, 20, 10, 16, 17, 12, 23, 13, 20, 17, 22, 22,\n    33, 32, 23, 34, 27, 29, 21, 16, 21, 18, 20, 14, 9, 19, 18, 22, 11, 21, 15, 20,\n    18, 27, 17, 24, 27, 18, 25, 24, 23, 20, 22, 16, 19, 24, 18, 21, 20, 21, 25, 16,\n    61, 71, 70, 72, 63, 58, 56, 54, 58, 50, 46, 50, 46, 34, 37, 28, 25, 26, 26, 25,\n    30, 40, 37, 38, 33, 31, 34, 31, 27, 30, 22, 22, 19, 25, 21, 21, 14, 17, 20, 25,\n    25, 30, 22, 26, 28, 24, 28, 24, 14, 20, 19, 19, 15, 23, 14, 18, 16, 16, 20, 18,\n    26, 19, 25, 22, 21, 20, 27, 16, 22, 15, 19, 18, 14, 22, 22, 22, 22, 18, 18, 22,\n    17, 23, 20, 20, 26, 21, 14, 23, 17, 8, 24, 21, 20, 8, 17, 20, 20, 20, 19, 24,\n    22, 23, 24, 23, 21, 20, 16, 27, 27, 18, 20, 18, 17, 19, 18, 14, 15, 19, 16, 19,\n    72, 82, 85, 83, 81, 79, 73, 68, 75, 69, 67, 69, 58, 51, 53, 46, 40, 35, 29, 25,\n    49, 49, 54, 52, 39, 45, 46, 37, 29, 40, 35, 28, 29, 26, 17, 23, 20, 27, 17, 20,\n    33, 36, 31, 33, 32, 35, 32, 35, 28, 28, 24, 23, 18, 22, 13, 19, 19, 22, 17, 19,\n    28, 28, 29, 27, 27, 25, 28, 21, 17, 20, 20, 24, 20, 23, 22, 19, 21, 15, 19, 22,\n    25, 26, 26, 22, 9, 24, 19, 20, 22, 23, 18, 14, 16, 22, 19, 26, 22, 22, 23, 21,\n    82, 93, 96, 100, 99, 94, 90, 83, 91, 79, 81, 80, 69, 66, 62, 54, 43, 35, 17, 21,\n    68, 66, 71, 61, 53, 64, 63, 57, 45, 51, 44, 40, 33, 28, 17, 25, 20, 24, 14, 16,\n    41, 51, 49, 50, 47, 48, 42, 39, 32, 29, 20, 23, 23, 22, 19, 20, 17, 27, 14, 12,\n    39, 43, 43, 37, 34, 36, 26, 26, 20, 17, 24, 21, 18, 21, 14, 11, 23, 16, 15, 23,\n    32, 30, 31, 26, 25, 21, 24, 23, 18, 16, 25, 25, 20, 17, 24, 24, 13, 19, 17, 23,\n    63, 69, 56, 66, 51, 62, 55, 47, 48, 45, 37, 37, 30, 28, 28, 23, 28, 23, 17, 25,\n    29, 28, 28, 34, 25, 32, 29, 28, 27, 21, 17, 20, 19, 22, 23, 19, 25, 16, 23, 21,\n    22, 23, 28, 28, 22, 27, 28, 20, 24, 22, 21, 23, 24, 24, 24, 25, 26, 15, 19, 27,\n    70, 84, 83, 83, 78, 70, 67, 64, 77, 66, 70, 66, 55, 52, 47, 35, 30, 26, 26, 25,\n    45, 55, 40, 47, 42, 46, 42, 36, 37, 37, 32, 22, 17, 24, 19, 14, 21, 27, 22, 18,\n    31, 32, 36, 34, 24, 23, 22, 19, 21, 24, 24, 20, 22, 23, 19, 15, 15, 20, 21, 21,\n    23, 24, 25, 29, 28, 22, 26, 22, 19, 25, 23, 22, 24, 24, 22, 23, 19, 18, 25, 23,\n    83, 91, 97, 98, 91, 90, 93, 89, 89, 78, 80, 76, 65, 65, 55, 41, 36, 27, 18, 22,\n    70, 68, 58, 58, 66, 61, 62, 53, 48, 47, 46, 33, 18, 24, 26, 20, 17, 16, 19, 16,\n    46, 52, 51, 47, 39, 41, 41, 27, 32, 29, 26, 22, 25, 17, 18, 19, 21, 16, 26, 24,\n    34, 36, 36, 36, 32, 27, 29, 23, 21, 21, 27, 17, 13, 26, 23, 19, 20, 25, 24, 18,\n};\n\nconst interp_partials_voice_t interp_partials_map[NUM_INTERP_PARTIALS_PRESETS] PROGMEM = {\n    {\n        NUM_PIANO_SAMPLE_TIMES_MS,\n        piano_sample_times_ms,\n        NUM_PIANO_VELOCITIES,\n        piano_velocities,\n        NUM_PIANO_NOTES,\n        piano_notes,\n        piano_num_harmonics,\n        piano_harmonics_freq,\n        piano_harmonics_mags,\n    },\n};\n\n#endif // ndef __INTERP_PARTIALS_H\n\n"
  },
  {
    "path": "src/libminiaudio-audio.c",
    "content": "// libminiaudio-audio.c\n// functions for running AMY on a computer\n#if !defined(ESP_PLATFORM) && !defined(PICO_ON_DEVICE) && !defined(ARDUINO)\n#include \"amy.h\"\n\n#define MA_NO_FLAC\n#define MA_NO_MP3\n#define MA_NO_RESOURCE_MANAGER\n#define MA_NO_NODE_GRAPH\n#define MA_NO_ENGINE\n#define MA_NO_GENERATION\n\nextern SAMPLE ** fbl;\n\n#ifdef __APPLE__\n    #define MA_NO_RUNTIME_LINKING\n#endif\n#define MINIAUDIO_IMPLEMENTATION\n\n#define MA_AUDIO_WORKLETS_THREAD_STACK_SIZE 131072\n#define MINIAUDIO_IMPLEMENTATION\n\n#include \"miniaudio.h\"\n\n#include <stdio.h>\n#ifdef _WIN32\n#include <windows.h>\n#else\n#include <unistd.h>\n#endif\n\n#define DEVICE_FORMAT       ma_format_s16\n\nint16_t * leftover_buf;\nuint16_t leftover_samples = 0;\n//pthread_t amy_live_thread;\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten.h>\nfloat amy_web_cv_1 = 0;\nfloat amy_web_cv_2 = 0;\nextern void sequencer_check_and_fill();\nvoid main_loop__em()\n{\n    // We call repeatedly here to fill the sequencer, for webassembly (no threads)\n    sequencer_check_and_fill();\n    amy_web_cv_1 = EM_ASM_DOUBLE({ \n        if(typeof cv_1_voltage != 'undefined') { return cv_1_voltage; } else { return 0; }\n    });\n    amy_web_cv_2 = EM_ASM_DOUBLE({ \n        if(typeof cv_2_voltage != 'undefined') { return cv_2_voltage; } else { return 0; }\n    });\n}\n#endif\n\n// Semaphore for passing most recent audio buffer to amy_update.\n// It's the pointer that's volatile, not the data it points to.\nint16_t *volatile last_audio_buffer = NULL;\n\nvoid amy_update_tasks() {\n}\n\nvoid amy_platform_init() {\n}\n\nvoid amy_platform_deinit() {\n}\n\nsize_t amy_i2s_write(const uint8_t *buffer, size_t nbytes) {\n    return 0;\n}\n\nint16_t *amy_render_audio() {\n    // For miniaudio, we just return a semaphore buffer.\n    while (last_audio_buffer == NULL)\n        ;\n    int16_t *buf = last_audio_buffer;\n    last_audio_buffer = NULL;\n    return buf;\n}\n\nvoid amy_print_devices() {\n    ma_context context;\n    if (ma_context_init(NULL, 0, NULL, &context) != MA_SUCCESS) {\n        fprintf(stderr,\"Failed to setup context for device list.\\n\");\n        exit(1);\n    }\n\n    ma_device_info* pPlaybackInfos;\n    ma_uint32 playbackCount;\n    ma_device_info* pCaptureInfos;\n    ma_uint32 captureCount;\n    if (ma_context_get_devices(&context, &pPlaybackInfos, &playbackCount, &pCaptureInfos, &captureCount) != MA_SUCCESS) {\n        fprintf(stderr,\"Failed to get device list.\\n\");\n        exit(1);\n    }\n    fprintf(stderr, \"output devices:\\n\");\n    for (ma_uint32 iDevice = 0; iDevice < playbackCount; iDevice += 1) {\n        fprintf(stderr,\"\\t%d - %s\\n\", iDevice, pPlaybackInfos[iDevice].name);\n    }\n\n    fprintf(stderr, \"input devices:\\n\");\n    for (ma_uint32 iDevice = 0; iDevice < captureCount; iDevice += 1) {\n        fprintf(stderr,\"\\t%d - %s\\n\", iDevice, pCaptureInfos[iDevice].name);\n    }\n\n    ma_context_uninit(&context);\n}\n\n\n// I've seen frame counts as big as 1440, I think *8 is enough room (2048)\n#define OUTPUT_RING_FRAMES (AMY_BLOCK_SIZE*8)\n#define OUTPUT_RING_LENGTH (OUTPUT_RING_FRAMES*AMY_NCHANS)\n\n\nint16_t output_ring[OUTPUT_RING_LENGTH];\n\nuint16_t ring_write_ptr = AMY_BLOCK_SIZE*AMY_NCHANS; // start after one AMY frame\nuint16_t ring_read_ptr = 0 ;\nuint16_t in_ptr = 0;\nextern output_sample_type *amy_in_block;\n\nstatic void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frame_count) {\n    short int *poke = (short *)pOutput;\n    short int *peek = (short *)pInput;\n    // We lag a AMY block behind input here because our frame size is never a multiple of AMY block size\n    for(uint16_t frame=0;frame<frame_count;frame++) {\n        if (peek != NULL) {\n            for(uint8_t c=0;c<AMY_NCHANS;c++) {\n                amy_in_block[in_ptr++] = peek[AMY_NCHANS * frame + c];\n            }\n        } else {\n            // no audio in, so fill it with 0s\n            for(uint8_t c=0;c<AMY_NCHANS;c++) {\n                amy_in_block[in_ptr++] = 0;\n            }\n        }\n        if(in_ptr == (AMY_BLOCK_SIZE*AMY_NCHANS)) { // we have a block of input ready\n            // render and copy into output ring buffer\n            int16_t * buf = amy_simple_fill_buffer();\n            // Maybe pass to amy_update.\n            last_audio_buffer = buf;\n            // reset the input pointer for future input data\n            in_ptr = 0;\n            // copy this output to a ring buffer\n            for(uint16_t amy_frame=0;amy_frame<AMY_BLOCK_SIZE;amy_frame++) {\n                for(uint8_t c=0;c<AMY_NCHANS;c++) {\n                    output_ring[ring_write_ptr++] = buf[AMY_NCHANS * amy_frame + c];\n                    if(ring_write_ptr == OUTPUT_RING_LENGTH) ring_write_ptr = 0;\n                }\n            }\n        }\n        // Per audio frame, copy (lagged by AMY_BLOCK_SIZE) output data from AMY into expected audio out buffer\n        for(uint8_t c=0;c<AMY_NCHANS;c++) {\n            poke[frame*AMY_NCHANS + c] = output_ring[ring_read_ptr++];\n            if(ring_read_ptr == OUTPUT_RING_LENGTH ) ring_read_ptr = 0;\n        }\n    }\n\n}\n\n\n\nma_device_config deviceConfig;\nma_device device;\nunsigned char _custom[4096];\nma_context context;\nma_device_info* pPlaybackInfos;\nma_uint32 playbackCount;\nma_device_info* pCaptureInfos;\nma_uint32 captureCount;\n\n// start \n\namy_err_t miniaudio_init() {\n    leftover_buf = malloc_caps(sizeof(int16_t)*AMY_BLOCK_SIZE*AMY_NCHANS, amy_global.config.ram_caps_fbl);\n\n    //fprintf(stderr, \"miniaudio_init: has_audio_in %d playback_id %d capture_id %d\\n\",\n    //        AMY_HAS_AUDIO_IN, amy_global.config.playback_device_id, amy_global.config.capture_device_id);\n\n    if (ma_context_init(NULL, 0, NULL, &context) != MA_SUCCESS) {\n        printf(\"Failed to setup context for device list.\\n\");\n        exit(1);\n    }\n    if (ma_context_get_devices(&context, &pPlaybackInfos, &playbackCount, &pCaptureInfos, &captureCount) != MA_SUCCESS) {\n        printf(\"Failed to get device list.\\n\");\n        exit(1);\n    }\n    \n    if(AMY_HAS_AUDIO_IN) {\n        if (amy_global.config.playback_device_id >= (int32_t)playbackCount || amy_global.config.capture_device_id >= (int32_t)captureCount) {\n            printf(\"invalid device\\n\");\n            exit(1);\n        }\n    } else {\n        if (amy_global.config.playback_device_id >= (int32_t)playbackCount) {\n            printf(\"invalid device\\n\");\n            exit(1);\n        }\n    }\n\n    if(AMY_HAS_AUDIO_IN) {\n        deviceConfig = ma_device_config_init(ma_device_type_duplex);\n    } else {\n        deviceConfig = ma_device_config_init(ma_device_type_playback);\n    }\n\n    if(amy_global.config.playback_device_id >= 0) {\n        deviceConfig.playback.pDeviceID = &pPlaybackInfos[amy_global.config.playback_device_id].id;\n    } else {\n        deviceConfig.playback.pDeviceID = NULL; // system default\n    }\n    deviceConfig.playback.format   = DEVICE_FORMAT;\n    deviceConfig.playback.channels = AMY_NCHANS;\n\n    if(AMY_HAS_AUDIO_IN) {\n        if(amy_global.config.capture_device_id >= 0) {\n            deviceConfig.capture.pDeviceID = &pCaptureInfos[amy_global.config.capture_device_id].id;\n        } else {\n            deviceConfig.capture.pDeviceID = NULL; // system default\n        }\n        deviceConfig.capture.format   = DEVICE_FORMAT;\n        deviceConfig.capture.channels = AMY_NCHANS;\n    }\n\n    deviceConfig.sampleRate        = AMY_SAMPLE_RATE;\n    deviceConfig.dataCallback      = data_callback;\n    deviceConfig.pUserData         = _custom;\n\n    // Force miniaudio's callback to be the same size as AMY. This helps us not loop too many fill_buffer calls\n    deviceConfig.periodSizeInFrames = AMY_BLOCK_SIZE;\n    \n    if (ma_device_init(&context, &deviceConfig, &device) != MA_SUCCESS) {\n        printf(\"Failed to open playback device.\\n\");\n        exit(1);\n    }\n\n    if (ma_device_start(&device) != MA_SUCCESS) {\n        printf(\"Failed to start playback device.\\n\");\n        ma_device_uninit(&device);\n        exit(1);\n    }\n    for(uint16_t i=0;i<OUTPUT_RING_LENGTH;i++) output_ring[i] = 0;\n    return AMY_OK;\n}\n\nvoid miniaudio_deinit(void) {\n    ma_device_uninit(&device);\n    ma_context_uninit(&context);\n    free(leftover_buf);\n}\n\n\n#ifdef _WIN32\nstatic HANDLE amy_live_thread_handle = NULL;\n\nstatic DWORD WINAPI miniaudio_run(LPVOID lpParam) {\n    (void)lpParam;\n    while(amy_global.running) {\n        Sleep(1000);\n    }\n    return 0;\n}\n\nvoid miniaudio_start(void) {\n    miniaudio_init();\n    amy_global.running = 1;\n    amy_live_thread_handle = CreateThread(NULL, 0, miniaudio_run, NULL, 0, NULL);\n}\n\nvoid miniaudio_stop(void) {\n    amy_global.running = 0;\n    if (amy_live_thread_handle) {\n        WaitForSingleObject(amy_live_thread_handle, 2000);\n        CloseHandle(amy_live_thread_handle);\n        amy_live_thread_handle = NULL;\n    }\n    miniaudio_deinit();\n}\n#else\nvoid *miniaudio_run(void *vargp) {\n    while(amy_global.running) {\n        sleep(1);\n    }\n    return NULL;\n}\n\nvoid miniaudio_start(void) {\n    miniaudio_init();\n    amy_global.running = 1;\n    pthread_t amy_live_thread;\n    pthread_create(&amy_live_thread, NULL, miniaudio_run, NULL);\n}\n\nvoid miniaudio_stop(void) {\n    amy_global.running = 0;\n    miniaudio_deinit();\n}\n#endif\n\n\n#ifdef __EMSCRIPTEN__\nvoid amy_live_start_web_audioin() {\n    amy_global.config.features.audio_in = 1;\n    emscripten_cancel_main_loop();\n    miniaudio_start();\n    emscripten_set_main_loop(main_loop__em, 0, 0);\n}\nvoid amy_live_start_web() {\n    amy_global.config.features.audio_in = 0;\n    emscripten_cancel_main_loop();\n    miniaudio_start();\n    emscripten_set_main_loop(main_loop__em, 0, 0);\n}\nvoid amy_live_stop() {\n    amy_global.running = 0;\n    emscripten_cancel_main_loop();\n    miniaudio_deinit();\n}\n#endif  // __EMSCRIPTEN__\n\n#endif  // Not ESP_PLATFORM or PICO_ON_DEVICE or ARDUINO\n"
  },
  {
    "path": "src/libminiaudio-audio.h",
    "content": "// libminiaudio-audio.h\n\n#ifndef __LIBMINIAUDIO_AUDIO_H\n#define __LIBMINIAUDIO_AUDIO_H\n#include \"amy.h\"\n\nvoid amy_print_devices();\n#endif\n"
  },
  {
    "path": "src/log2_exp2.c",
    "content": "// Lookup-table versions of log2/exp2.\n\n#include \"amy.h\"\n#include \"log2_exp2_fxpt_lutable.h\"\n\n\nstatic inline SAMPLE lut_val(SAMPLE frac, const LUTSAMPLE *table, const int log2_tab_size) {\n    int index = INT_OF_S(frac, log2_tab_size);\n    SAMPLE index_frac_part = S_FRAC_OF_S(frac, log2_tab_size);\n    // Tables are constructed to extend one value beyond the log2_tab_size bits max.\n    return L2S(table[index]) + MUL0_SS(L2S(table[index + 1] - table[index]), index_frac_part);\n}\n\n\nSAMPLE log2_lut(SAMPLE x) {\n    // assert(x > 0);\n    int scale = 0;\n    while (x < F2S(1.0f)) {\n        x = SHIFTL(x, 1);\n        --scale;\n    }\n    while (x >= F2S(2.0f)) {\n        x = SHIFTR(x, 1);\n        ++scale;\n    }\n    // lut_val is negated because table is stored as negative (to reach 1.0).\n    return AMY_I2S(scale, 0) - lut_val(x - F2S(1.0f), log2_fxpt_lutable, 8 /* =log_2(256) */);\n}\n\n\nSAMPLE exp2_lut(SAMPLE x) {\n    int offset = INT_OF_S(x, 0);\n    SAMPLE x_frac = S_FRAC_OF_S(x, 0);\n    // lut_val is negated because table is stored as negative (to reach 1.0).\n    SAMPLE unnorm = F2S(1.0f)\n        - lut_val(x_frac, exp2_fxpt_lutable, 8 /* =log_2(256) */);\n    if (offset > 0)\n        return SHIFTL(unnorm, offset);\n    else\n        return SHIFTR(unnorm, -offset);\n}\n"
  },
  {
    "path": "src/log2_exp2_fxpt_lutable.h",
    "content": "// Automatically-generated LUTset\n#ifndef LUTSET_EXP_LUT_FXPT_DEFINED\n#define LUTSET_EXP_LUT_FXPT_DEFINED\n\nconst int16_t log2_fxpt_lutable[257] PROGMEM = {\n0,-184,-368,-551,-733,-914,-1095,-1275,\n-1455,-1633,-1811,-1989,-2166,-2342,-2517,-2692,\n-2866,-3039,-3212,-3385,-3556,-3727,-3897,-4067,\n-4236,-4405,-4573,-4740,-4907,-5073,-5239,-5404,\n-5568,-5732,-5895,-6058,-6220,-6382,-6543,-6703,\n-6863,-7023,-7182,-7340,-7498,-7655,-7812,-7968,\n-8124,-8279,-8434,-8588,-8742,-8895,-9048,-9200,\n-9352,-9503,-9654,-9804,-9954,-10104,-10253,-10401,\n-10549,-10696,-10843,-10990,-11136,-11282,-11427,-11572,\n-11716,-11860,-12004,-12147,-12289,-12431,-12573,-12715,\n-12855,-12996,-13136,-13276,-13415,-13554,-13692,-13830,\n-13968,-14105,-14242,-14378,-14514,-14650,-14785,-14920,\n-15055,-15189,-15322,-15456,-15589,-15721,-15854,-15986,\n-16117,-16248,-16379,-16509,-16639,-16769,-16898,-17027,\n-17156,-17284,-17412,-17540,-17667,-17794,-17921,-18047,\n-18173,-18298,-18424,-18548,-18673,-18797,-18921,-19045,\n-19168,-19291,-19414,-19536,-19658,-19780,-19901,-20022,\n-20143,-20263,-20383,-20503,-20623,-20742,-20861,-20980,\n-21098,-21216,-21334,-21451,-21568,-21685,-21802,-21918,\n-22034,-22150,-22265,-22380,-22495,-22610,-22724,-22838,\n-22952,-23066,-23179,-23292,-23404,-23517,-23629,-23741,\n-23852,-23964,-24075,-24186,-24296,-24407,-24517,-24627,\n-24736,-24845,-24955,-25063,-25172,-25280,-25388,-25496,\n-25604,-25711,-25818,-25925,-26031,-26138,-26244,-26350,\n-26455,-26561,-26666,-26771,-26876,-26980,-27084,-27188,\n-27292,-27396,-27499,-27602,-27705,-27808,-27910,-28012,\n-28114,-28216,-28318,-28419,-28520,-28621,-28722,-28822,\n-28922,-29022,-29122,-29222,-29321,-29421,-29520,-29618,\n-29717,-29815,-29914,-30012,-30109,-30207,-30304,-30401,\n-30498,-30595,-30692,-30788,-30884,-30980,-31076,-31172,\n-31267,-31362,-31457,-31552,-31647,-31741,-31836,-31930,\n-32024,-32117,-32211,-32304,-32397,-32490,-32583,-32676,\n-32768,\n};\n\nconst int16_t exp2_fxpt_lutable[257] PROGMEM = {\n0,-89,-178,-267,-357,-447,-537,-627,\n-718,-808,-899,-991,-1082,-1174,-1266,-1358,\n-1451,-1544,-1637,-1730,-1823,-1917,-2011,-2106,\n-2200,-2295,-2390,-2485,-2581,-2677,-2773,-2869,\n-2966,-3063,-3160,-3257,-3355,-3453,-3551,-3649,\n-3748,-3847,-3947,-4046,-4146,-4246,-4346,-4447,\n-4548,-4649,-4750,-4852,-4954,-5056,-5159,-5262,\n-5365,-5468,-5572,-5676,-5780,-5885,-5989,-6095,\n-6200,-6306,-6412,-6518,-6624,-6731,-6838,-6946,\n-7053,-7161,-7269,-7378,-7487,-7596,-7705,-7815,\n-7925,-8036,-8146,-8257,-8368,-8480,-8592,-8704,\n-8816,-8929,-9042,-9155,-9269,-9383,-9497,-9612,\n-9727,-9842,-9958,-10073,-10190,-10306,-10423,-10540,\n-10657,-10775,-10893,-11012,-11130,-11249,-11369,-11488,\n-11608,-11729,-11849,-11970,-12091,-12213,-12335,-12457,\n-12580,-12703,-12826,-12950,-13074,-13198,-13323,-13448,\n-13573,-13699,-13825,-13951,-14078,-14205,-14332,-14460,\n-14588,-14716,-14845,-14974,-15103,-15233,-15363,-15494,\n-15625,-15756,-15887,-16019,-16152,-16284,-16417,-16551,\n-16684,-16818,-16953,-17088,-17223,-17358,-17494,-17631,\n-17767,-17904,-18042,-18179,-18317,-18456,-18595,-18734,\n-18874,-19014,-19154,-19295,-19436,-19578,-19720,-19862,\n-20005,-20148,-20291,-20435,-20579,-20724,-20869,-21014,\n-21160,-21306,-21453,-21600,-21747,-21895,-22043,-22192,\n-22341,-22490,-22640,-22790,-22941,-23092,-23244,-23395,\n-23548,-23700,-23854,-24007,-24161,-24315,-24470,-24625,\n-24781,-24937,-25093,-25250,-25408,-25565,-25723,-25882,\n-26041,-26200,-26360,-26521,-26681,-26843,-27004,-27166,\n-27329,-27492,-27655,-27819,-27983,-28148,-28313,-28479,\n-28645,-28811,-28978,-29146,-29313,-29482,-29651,-29820,\n-29989,-30160,-30330,-30501,-30673,-30845,-31017,-31190,\n-31364,-31538,-31712,-31887,-32062,-32238,-32414,-32591,\n-32768,\n};\n\n\n#endif // LUTSET_x_DEFINED\n"
  },
  {
    "path": "src/macos_midi.m",
    "content": "#ifndef __EMSCRIPTEN__\n#define unichar OSX_UNICHAR\n#import <Foundation/Foundation.h>\n#import <CoreGraphics/CoreGraphics.h>\n#import <CoreMidi/CoreMidi.h>\n#include <mach/mach_time.h>\n#include <pthread.h>\n#undef unichar\n#import \"amy_midi.h\"\n\nstatic CGEventSourceRef eventSource;\nMIDIClientRef midi_client;\nMIDIPortRef out_port;\n\n\nstatic void NotifyProc(const MIDINotification *message, void *refCon)\n{\n}\n\nstatic uint8_t midi_status_len(uint8_t status) {\n    // MIDI realtime/system common lengths.\n    if (status >= 0xF8) return 1;\n    if (status == 0xF6) return 1;\n    if (status == 0xF1 || status == 0xF3) return 2;\n    if (status == 0xF2) return 3;\n    if (status == 0xF4 || status == 0xF5 || status == 0xF9 || status == 0xFD) return 1;\n\n    // Channel voice lengths.\n    switch (status & 0xF0) {\n        case 0x80:\n        case 0x90:\n        case 0xA0:\n        case 0xB0:\n        case 0xE0:\n            return 3;\n        case 0xC0:\n        case 0xD0:\n            return 2;\n        default:\n            return 0;\n    }\n}\n\n\nvoid midi_out(uint8_t * bytes, uint16_t len) {\n    if (@available(macOS 11, *))  {\n        MIDIPacketList pl;\n        MIDIPacket *p;\n        p = MIDIPacketListInit(&pl);\n        p = MIDIPacketListAdd(&pl, 1024, p, 0, len, bytes);\n        for (NSUInteger endpointRefIndex = 0; endpointRefIndex < MIDIGetNumberOfDestinations(); ++endpointRefIndex) {\n            MIDIObjectRef destinationEndpoint = MIDIGetDestination(endpointRefIndex);\n            MIDISend(out_port, destinationEndpoint, &pl);\n        }\n    } else {\n        fprintf(stderr, \"Can only run MIDI on macOS Big Sur (11.0) or later, sorry\\n\");   \n    }\n\n}\n\nint midi_macos_should_exit = false;\n\nvoid* run_midi_macos(void*argp){\n    //sysex_buffer = malloc(MAX_SYSEX_BYTES);\n\n    if (@available(macOS 11, *))  {\n        @autoreleasepool {\n            //py_midi_callback = 0;\n\n            OSStatus status = MIDIClientCreate((__bridge CFStringRef)@\"Tulip\", NotifyProc, NULL, &midi_client);\n            if (status != noErr) {\n                fprintf(stderr, \"Error %d while setting up handlers\\n\", status);\n            }\n\n\n            status = MIDIOutputPortCreate(midi_client, (__bridge CFStringRef)[NSString stringWithFormat:@\"Tulip Output\"], &out_port );\n            if(status != noErr) {\n                fprintf(stderr, \"Error %d while setting up MIDI output port\\n\", status);\n            }\n\n            eventSource = CGEventSourceCreate(kCGEventSourceStatePrivate);\n            ItemCount number_sources = MIDIGetNumberOfSources();\n            for (unsigned long i = 0; i < number_sources; i++) {\n                MIDIEndpointRef source = MIDIGetSource(i);\n                MIDIPortRef in_port;\n                status = MIDIInputPortCreateWithProtocol(midi_client, (__bridge CFStringRef)[NSString stringWithFormat:@\"Tulip Input %lu\", i], kMIDIProtocol_1_0, &in_port, ^(const MIDIEventList *evtlist, void *srcConnRefCon) {\n                    OSStatus sysex_status = -1;\n                    for (uint32_t i = 0; i < evtlist->numPackets; i++) {\n                        const MIDIEventPacket* packet = &evtlist->packet[i];\n                        if(@available(macos 14, *)) {\n                            CFDataRef  outData;\n                            sysex_status = MIDIEventPacketSysexBytesForGroup(packet,0, &outData);\n                            if(sysex_status == noErr) {\n                                const uint8_t * sysex_bytes = CFDataGetBytePtr(outData);\n                                for(uint16_t i=0;i<CFDataGetLength(outData);i++) {\n                                    sysex_buffer[sysex_len++] = sysex_bytes[i];\n                                    if(sysex_bytes[i]==0xf7) parse_sysex();\n                                }\n                            }\n                        }\n                        // Just a plain ol midi packet\n                        if(sysex_status != noErr) { \n                            for(uint32_t j=0 ; j < packet->wordCount; j++) {\n                                const unsigned char *bytes = (unsigned char*)(&packet->words[j]);\n                                uint8_t mt = bytes[3] >> 4;\n                                // Accept MIDI 1.0 Channel Voice (0x2) and System (0x1) UMP words.\n                                if (mt == 0x1 || mt == 0x2) {\n                                    uint8_t data[3] = { bytes[2], bytes[1], bytes[0] };\n                                    uint8_t len = midi_status_len(data[0]);\n                                    if (len > 0) {\n                                        convert_midi_bytes_to_messages(data, len, 1);\n                                    }\n                                }\n                            }\n                        }\n                    }\n                });\n                if (status != noErr) {\n                    fprintf(stderr, \"Error %d while setting up MIDI input port\\n\", status);\n                }\n                status = MIDIPortConnectSource(in_port, source, NULL);\n                if (status != noErr) {\n                    fprintf(stderr, \"Error %d while connecting MIDI input port to source\\n\", status);\n                }\n            }\n            CFRunLoopRun();\n        }\n    } else {\n        fprintf(stderr, \"Can only run MIDI on macOS Big Sur (11.0) or later, sorry\\n\");\n    }\n    return NULL;\n}\n\nvoid run_midi() {\n    if (sysex_buffer == NULL) {  // has not been started yet.\n        sysex_buffer = malloc(MAX_SYSEX_BYTES);\n        pthread_t midi_thread_id;\n        pthread_create(&midi_thread_id, NULL, run_midi_macos, NULL);\n    }\n}\n\nvoid stop_midi() {\n     // Normally, we'd have to remove all the sources and timers from the CFRunLoop, but we'll fudge it.\n}\n\n#endif\n"
  },
  {
    "path": "src/midi_mappings.c",
    "content": "// midi_mappings.c\n// example midi mappings for controllers\n\n#include \"amy.h\"\n\n#include <assert.h>   // for buffer overruns in midi_fetch_control_code_command.\n\nvoid juno_filter_midi_handler(uint8_t * bytes, uint16_t len, uint8_t is_sysex) {\n    // An example of adding a handler for MIDI CCs.  Can't really build this in because it depends on your synth/patch config, controllers, wishes...\n    // Here, we use MIDI CC 70 to modify the Juno VCF center freq, and 71 for resonance.\n    amy_event e;\n    if (bytes[0] == 0xB0) {  // Channel 1 CC\n\tif (bytes[1] == 70) {\n\t    // Modify Synth 0 filter_freq.\n/* def to_filter_freq(val): */\n/*   # filter_freq goes from ? 100 to 6400 Hz with 18 steps/octave */\n/*   return float(\"%.3f\" % (13 * exp2(0.0938 * val * 127))) */\n\t    e = amy_default_event();\n\t    e.synth = 1;\n\t    e.filter_freq_coefs[COEF_CONST] = exp2f(0.0938f * (float)bytes[2]);\n\t    amy_add_event(&e);\n\t} else if (bytes[1] == 71) {\n/* def to_resonance(val): */\n/*   # Q goes from 0.5 to 16 exponentially */\n/*   return float(\"%.3f\" % (0.7 * exp2(4.0 * val))) */\n\t    e = amy_default_event();\n\t    e.synth = 1;\n\t    e.resonance = 0.7f * exp2f(0.03125f * (float)bytes[2]);\n\t    amy_add_event(&e);\n\t}\n    }\n}\n\nstruct cc_mapping {\n    struct cc_mapping *next;\n    int channel;\n    int code;\n    int is_log;\n    float min_val;\n    float max_val;\n    float offset_val;\n    char *message_template;\n};\n\nstruct cc_mapping *cc_mapping_root = NULL;\n\nvoid cc_mapping_print(struct cc_mapping *mapping) {\n    fprintf(stderr, \"mapping 0x%lx chan %d code 0x%x log %d min %.1f max %.1f offs %.1f msg %s\\n\",\n            (unsigned long)mapping, mapping->channel, mapping->code, mapping->is_log, mapping->min_val, mapping->max_val, mapping->offset_val, mapping->message_template);\n}\n\nstruct cc_mapping *cc_mapping_init(struct cc_mapping **p_root, int channel, int code, int is_log, float min_val, float max_val, float offset_val, char *message_template) {\n    struct cc_mapping *result = (struct cc_mapping *)malloc_caps(sizeof(struct cc_mapping) + strlen(message_template) + 1, amy_global.config.ram_caps_synth);\n    result->message_template = ((char *)result) + sizeof(struct cc_mapping);\n    result->channel = channel;\n    result->code = code;\n    result->is_log = is_log;\n    result->min_val = min_val;\n    result->max_val = max_val;\n    result->offset_val = offset_val;\n    strcpy(result->message_template, message_template);\n    // Insert into the linked list at the head.\n    result->next = *p_root;\n    *p_root = result;\n    return result;\n}\n\nvoid cc_mapping_debug(void) {\n    fprintf(stderr, \"cc_mapping_debug:\\n\");\n    struct cc_mapping **p_mapping = &cc_mapping_root;\n    while (*p_mapping != NULL) {\n        cc_mapping_print(*p_mapping);\n        p_mapping = &((*p_mapping)->next);\n    }\n}\n\nvoid cc_mapping_free(struct cc_mapping **p_mapping) {\n    // Close up the linked list.\n    struct cc_mapping *doomed = *p_mapping;\n    *p_mapping = doomed->next;\n    // Return the memory\n    free(doomed);\n}\n\nvoid midi_mappings_init(void) {\n    cc_mapping_root = NULL;\n}\n\nvoid midi_mappings_deinit(void) {\n    struct cc_mapping **p_mapping = &cc_mapping_root;\n    while (*p_mapping != NULL) {\n        cc_mapping_free(p_mapping);\n    }\n}\n\nvoid midi_clear_channel_mappings(int channel) {\n    struct cc_mapping **p_mapping = &cc_mapping_root;\n    while (*p_mapping != NULL) {\n        if ((*p_mapping)->channel == channel) {\n            cc_mapping_free(p_mapping);\n        } else {\n            p_mapping = &((*p_mapping)->next);\n        }\n    }\n}\n\nstruct cc_mapping **cc_mapping_find(int channel, int code) {\n    // Retrieve the mapping associated with a midi channel + code, if any.\n    struct cc_mapping **p_mapping = &cc_mapping_root;\n    while (*p_mapping != NULL) {\n        if ((*p_mapping)->channel == channel && (*p_mapping)->code == code)  return p_mapping;\n        p_mapping = &((*p_mapping)->next);\n    }\n    return NULL;\n}\n\nint midi_clear_control_code(int channel, int code) {\n    if (code == 255) {\n        // Magic value means clear all MIDI CCs for this channel\n        midi_clear_channel_mappings(channel);\n        return 1;\n    }\n    struct cc_mapping **p_mapping = cc_mapping_find(channel, code);\n    if (p_mapping) { cc_mapping_free(p_mapping); return 1; }\n    return 0;  // nothing found.\n}\n\nint midi_store_control_code(int channel, int code, int is_log, float min_val, float max_val, float offset_val, char *message) {\n    // Register a MIDI control code and mapping and a wire code template.\n    // Strip trailing wire protocol terminator(s) so they don't accumulate on round-trips.\n    size_t mlen = strlen(message);\n    while (mlen > 0 && message[mlen - 1] == 'Z') {\n        message[--mlen] = '\\0';\n    }\n    struct cc_mapping **p_mapping = cc_mapping_find(channel, code);\n    if (p_mapping) cc_mapping_free(p_mapping);\n    // store with an empty string removes mapping\n    if (mlen) {\n        /* struct cc_mapping *mapping = */ cc_mapping_init(&cc_mapping_root, channel, code, is_log, min_val, max_val, offset_val, message);\n        //cc_mapping_debug();\n    }\n    return 1;\n}\n\nbool midi_fetch_control_code_command(int channel, int code, char *s, size_t len) {\n    struct cc_mapping **p_mapping = cc_mapping_find(channel, code);\n    //fprintf(stderr, \"midi_fetch_control_code chan %d code %d mapping 0x%llx\\n\", channel, code, (uint64_t)p_mapping);\n    if (p_mapping == NULL)\n        return false;\n    // Format the control code - ic<C>,<L>,<N>,<X>,<O>,<CODE>\n    sprintf(s, \"ic%d,%d,%.3f,%.3f,%.3f,%sZ\", (*p_mapping)->code, (*p_mapping)->is_log, (*p_mapping)->min_val, (*p_mapping)->max_val, (*p_mapping)->offset_val, (*p_mapping)->message_template);\n    assert(strlen(s) < len);\n    return true;\n}\n\nfloat map_cc_value(struct cc_mapping *mapping, uint8_t value) {\n    if (mapping->is_log != 0) {\n        return (mapping->min_val + mapping->offset_val)\n            * expf(\n                logf((mapping->max_val + mapping->offset_val)\n                     / (mapping->min_val + mapping->offset_val))\n                * (float)value / 127.0f\n              )\n            - mapping->offset_val;\n    } else {  // Linear.\n        return mapping->min_val\n            + (mapping->max_val - mapping->min_val)\n              * (float)value / 127.0f;\n    }\n}\n\n#define WIRE_COMMAND_LEN 256\n\nvoid substitute_cc_special_values(char *dest, const char *src, int channel, float value) {\n    // Copy src string to dest, but replace \"%i\" with channel and \"%v\" with value.\n    const char *s;\n    const char *entry_src = src;\n    int n_remain = WIRE_COMMAND_LEN - 1;\n    while((s = strchr(src, '%')) != NULL && n_remain > (int)strlen(src)) {\n        // Copy up to the %.\n        int nchars = s - src;\n        strncpy(dest, src, nchars);\n        dest += nchars;\n        n_remain -= nchars;\n        src += nchars;\n        ++src;  // skip over the '%'\n        dest[0] = '\\0';\n        if (src[0] == 'v') {\n            sprintf(dest, \"%.3f\", value);\n        } else if (src[0] == 'V') {\n            sprintf(dest, \"%d\", (int)value);\n        } else if (src[0] == 'i') {\n            sprintf(dest, \"%d\", channel);\n        } else {\n            fprintf(stderr, \"substitute_cc: unrecognized '%%%c' in %s\\n\", src[0], entry_src);\n        }\n        ++src;  // skip over the code char\n        nchars = strlen(dest);\n        dest += nchars;\n        n_remain -= nchars;\n    }\n    // Copy anything left in the string.\n    if (n_remain > (int)strlen(src)) strcpy(dest, src);\n}\n\nvoid midi_cc_handler(uint8_t * bytes, uint16_t len, uint8_t is_sysex) {\n    if ((bytes[0] & 0xF0) == 0xB0) {  // CC\n        int channel = (bytes[0] & 0x0F) + 1;\n        int code = bytes[1];\n        struct cc_mapping **p_mapping = cc_mapping_find(channel, code);\n        if (p_mapping != NULL) {\n            float value = map_cc_value(*p_mapping, bytes[2]);\n            char message[WIRE_COMMAND_LEN];\n            substitute_cc_special_values(message, (*p_mapping)->message_template, channel, value);\n            //fprintf(stderr, \"midi_cc_handler: message %s\\n\", message);\n            amy_add_message(message);\n        }\n    }\n}\n"
  },
  {
    "path": "src/miniaudio.h",
    "content": "/*\nAudio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.\nminiaudio - v0.11.21 - 2023-11-15\n\nDavid Reid - mackron@gmail.com\n\nWebsite:       https://miniaud.io\nDocumentation: https://miniaud.io/docs\nGitHub:        https://github.com/mackron/miniaudio\n*/\n\n/*\n1. Introduction\n===============\nminiaudio is a single file library for audio playback and capture. To use it, do the following in\none .c file:\n\n    ```c\n    #define MINIAUDIO_IMPLEMENTATION\n    #include \"miniaudio.h\"\n    ```\n\nYou can do `#include \"miniaudio.h\"` in other parts of the program just like any other header.\n\nminiaudio includes both low level and high level APIs. The low level API is good for those who want\nto do all of their mixing themselves and only require a light weight interface to the underlying\naudio device. The high level API is good for those who have complex mixing and effect requirements.\n\nIn miniaudio, objects are transparent structures. Unlike many other libraries, there are no handles\nto opaque objects which means you need to allocate memory for objects yourself. In the examples\npresented in this documentation you will often see objects declared on the stack. You need to be\ncareful when translating these examples to your own code so that you don't accidentally declare\nyour objects on the stack and then cause them to become invalid once the function returns. In\naddition, you must ensure the memory address of your objects remain the same throughout their\nlifetime. You therefore cannot be making copies of your objects.\n\nA config/init pattern is used throughout the entire library. The idea is that you set up a config\nobject and pass that into the initialization routine. The advantage to this system is that the\nconfig object can be initialized with logical defaults and new properties added to it without\nbreaking the API. The config object can be allocated on the stack and does not need to be\nmaintained after initialization of the corresponding object.\n\n\n1.1. Low Level API\n------------------\nThe low level API gives you access to the raw audio data of an audio device. It supports playback,\ncapture, full-duplex and loopback (WASAPI only). You can enumerate over devices to determine which\nphysical device(s) you want to connect to.\n\nThe low level API uses the concept of a \"device\" as the abstraction for physical devices. The idea\nis that you choose a physical device to emit or capture audio from, and then move data to/from the\ndevice when miniaudio tells you to. Data is delivered to and from devices asynchronously via a\ncallback which you specify when initializing the device.\n\nWhen initializing the device you first need to configure it. The device configuration allows you to\nspecify things like the format of the data delivered via the callback, the size of the internal\nbuffer and the ID of the device you want to emit or capture audio from.\n\nOnce you have the device configuration set up you can initialize the device. When initializing a\ndevice you need to allocate memory for the device object beforehand. This gives the application\ncomplete control over how the memory is allocated. In the example below we initialize a playback\ndevice on the stack, but you could allocate it on the heap if that suits your situation better.\n\n    ```c\n    void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount)\n    {\n        // In playback mode copy data to pOutput. In capture mode read data from pInput. In full-duplex mode, both\n        // pOutput and pInput will be valid and you can move data from pInput into pOutput. Never process more than\n        // frameCount frames.\n    }\n\n    int main()\n    {\n        ma_device_config config = ma_device_config_init(ma_device_type_playback);\n        config.playback.format   = ma_format_f32;   // Set to ma_format_unknown to use the device's native format.\n        config.playback.channels = 2;               // Set to 0 to use the device's native channel count.\n        config.sampleRate        = 48000;           // Set to 0 to use the device's native sample rate.\n        config.dataCallback      = data_callback;   // This function will be called when miniaudio needs more data.\n        config.pUserData         = pMyCustomData;   // Can be accessed from the device object (device.pUserData).\n\n        ma_device device;\n        if (ma_device_init(NULL, &config, &device) != MA_SUCCESS) {\n            return -1;  // Failed to initialize the device.\n        }\n\n        ma_device_start(&device);     // The device is sleeping by default so you'll need to start it manually.\n\n        // Do something here. Probably your program's main loop.\n\n        ma_device_uninit(&device);\n        return 0;\n    }\n    ```\n\nIn the example above, `data_callback()` is where audio data is written and read from the device.\nThe idea is in playback mode you cause sound to be emitted from the speakers by writing audio data\nto the output buffer (`pOutput` in the example). In capture mode you read data from the input\nbuffer (`pInput`) to extract sound captured by the microphone. The `frameCount` parameter tells you\nhow many frames can be written to the output buffer and read from the input buffer. A \"frame\" is\none sample for each channel. For example, in a stereo stream (2 channels), one frame is 2\nsamples: one for the left, one for the right. The channel count is defined by the device config.\nThe size in bytes of an individual sample is defined by the sample format which is also specified\nin the device config. Multi-channel audio data is always interleaved, which means the samples for\neach frame are stored next to each other in memory. For example, in a stereo stream the first pair\nof samples will be the left and right samples for the first frame, the second pair of samples will\nbe the left and right samples for the second frame, etc.\n\nThe configuration of the device is defined by the `ma_device_config` structure. The config object\nis always initialized with `ma_device_config_init()`. It's important to always initialize the\nconfig with this function as it initializes it with logical defaults and ensures your program\ndoesn't break when new members are added to the `ma_device_config` structure. The example above\nuses a fairly simple and standard device configuration. The call to `ma_device_config_init()` takes\na single parameter, which is whether or not the device is a playback, capture, duplex or loopback\ndevice (loopback devices are not supported on all backends). The `config.playback.format` member\nsets the sample format which can be one of the following (all formats are native-endian):\n\n    +---------------+----------------------------------------+---------------------------+\n    | Symbol        | Description                            | Range                     |\n    +---------------+----------------------------------------+---------------------------+\n    | ma_format_f32 | 32-bit floating point                  | [-1, 1]                   |\n    | ma_format_s16 | 16-bit signed integer                  | [-32768, 32767]           |\n    | ma_format_s24 | 24-bit signed integer (tightly packed) | [-8388608, 8388607]       |\n    | ma_format_s32 | 32-bit signed integer                  | [-2147483648, 2147483647] |\n    | ma_format_u8  | 8-bit unsigned integer                 | [0, 255]                  |\n    +---------------+----------------------------------------+---------------------------+\n\nThe `config.playback.channels` member sets the number of channels to use with the device. The\nchannel count cannot exceed MA_MAX_CHANNELS. The `config.sampleRate` member sets the sample rate\n(which must be the same for both playback and capture in full-duplex configurations). This is\nusually set to 44100 or 48000, but can be set to anything. It's recommended to keep this between\n8000 and 384000, however.\n\nNote that leaving the format, channel count and/or sample rate at their default values will result\nin the internal device's native configuration being used which is useful if you want to avoid the\noverhead of miniaudio's automatic data conversion.\n\nIn addition to the sample format, channel count and sample rate, the data callback and user data\npointer are also set via the config. The user data pointer is not passed into the callback as a\nparameter, but is instead set to the `pUserData` member of `ma_device` which you can access\ndirectly since all miniaudio structures are transparent.\n\nInitializing the device is done with `ma_device_init()`. This will return a result code telling you\nwhat went wrong, if anything. On success it will return `MA_SUCCESS`. After initialization is\ncomplete the device will be in a stopped state. To start it, use `ma_device_start()`.\nUninitializing the device will stop it, which is what the example above does, but you can also stop\nthe device with `ma_device_stop()`. To resume the device simply call `ma_device_start()` again.\nNote that it's important to never stop or start the device from inside the callback. This will\nresult in a deadlock. Instead you set a variable or signal an event indicating that the device\nneeds to stop and handle it in a different thread. The following APIs must never be called inside\nthe callback:\n\n    ```c\n    ma_device_init()\n    ma_device_init_ex()\n    ma_device_uninit()\n    ma_device_start()\n    ma_device_stop()\n    ```\n\nYou must never try uninitializing and reinitializing a device inside the callback. You must also\nnever try to stop and start it from inside the callback. There are a few other things you shouldn't\ndo in the callback depending on your requirements, however this isn't so much a thread-safety\nthing, but rather a real-time processing thing which is beyond the scope of this introduction.\n\nThe example above demonstrates the initialization of a playback device, but it works exactly the\nsame for capture. All you need to do is change the device type from `ma_device_type_playback` to\n`ma_device_type_capture` when setting up the config, like so:\n\n    ```c\n    ma_device_config config = ma_device_config_init(ma_device_type_capture);\n    config.capture.format   = MY_FORMAT;\n    config.capture.channels = MY_CHANNEL_COUNT;\n    ```\n\nIn the data callback you just read from the input buffer (`pInput` in the example above) and leave\nthe output buffer alone (it will be set to NULL when the device type is set to\n`ma_device_type_capture`).\n\nThese are the available device types and how you should handle the buffers in the callback:\n\n    +-------------------------+--------------------------------------------------------+\n    | Device Type             | Callback Behavior                                      |\n    +-------------------------+--------------------------------------------------------+\n    | ma_device_type_playback | Write to output buffer, leave input buffer untouched.  |\n    | ma_device_type_capture  | Read from input buffer, leave output buffer untouched. |\n    | ma_device_type_duplex   | Read from input buffer, write to output buffer.        |\n    | ma_device_type_loopback | Read from input buffer, leave output buffer untouched. |\n    +-------------------------+--------------------------------------------------------+\n\nYou will notice in the example above that the sample format and channel count is specified\nseparately for playback and capture. This is to support different data formats between the playback\nand capture devices in a full-duplex system. An example may be that you want to capture audio data\nas a monaural stream (one channel), but output sound to a stereo speaker system. Note that if you\nuse different formats between playback and capture in a full-duplex configuration you will need to\nconvert the data yourself. There are functions available to help you do this which will be\nexplained later.\n\nThe example above did not specify a physical device to connect to which means it will use the\noperating system's default device. If you have multiple physical devices connected and you want to\nuse a specific one you will need to specify the device ID in the configuration, like so:\n\n    ```c\n    config.playback.pDeviceID = pMyPlaybackDeviceID;    // Only if requesting a playback or duplex device.\n    config.capture.pDeviceID = pMyCaptureDeviceID;      // Only if requesting a capture, duplex or loopback device.\n    ```\n\nTo retrieve the device ID you will need to perform device enumeration, however this requires the\nuse of a new concept called the \"context\". Conceptually speaking the context sits above the device.\nThere is one context to many devices. The purpose of the context is to represent the backend at a\nmore global level and to perform operations outside the scope of an individual device. Mainly it is\nused for performing run-time linking against backend libraries, initializing backends and\nenumerating devices. The example below shows how to enumerate devices.\n\n    ```c\n    ma_context context;\n    if (ma_context_init(NULL, 0, NULL, &context) != MA_SUCCESS) {\n        // Error.\n    }\n\n    ma_device_info* pPlaybackInfos;\n    ma_uint32 playbackCount;\n    ma_device_info* pCaptureInfos;\n    ma_uint32 captureCount;\n    if (ma_context_get_devices(&context, &pPlaybackInfos, &playbackCount, &pCaptureInfos, &captureCount) != MA_SUCCESS) {\n        // Error.\n    }\n\n    // Loop over each device info and do something with it. Here we just print the name with their index. You may want\n    // to give the user the opportunity to choose which device they'd prefer.\n    for (ma_uint32 iDevice = 0; iDevice < playbackCount; iDevice += 1) {\n        printf(\"%d - %s\\n\", iDevice, pPlaybackInfos[iDevice].name);\n    }\n\n    ma_device_config config = ma_device_config_init(ma_device_type_playback);\n    config.playback.pDeviceID = &pPlaybackInfos[chosenPlaybackDeviceIndex].id;\n    config.playback.format    = MY_FORMAT;\n    config.playback.channels  = MY_CHANNEL_COUNT;\n    config.sampleRate         = MY_SAMPLE_RATE;\n    config.dataCallback       = data_callback;\n    config.pUserData          = pMyCustomData;\n\n    ma_device device;\n    if (ma_device_init(&context, &config, &device) != MA_SUCCESS) {\n        // Error\n    }\n\n    ...\n\n    ma_device_uninit(&device);\n    ma_context_uninit(&context);\n    ```\n\nThe first thing we do in this example is initialize a `ma_context` object with `ma_context_init()`.\nThe first parameter is a pointer to a list of `ma_backend` values which are used to override the\ndefault backend priorities. When this is NULL, as in this example, miniaudio's default priorities\nare used. The second parameter is the number of backends listed in the array pointed to by the\nfirst parameter. The third parameter is a pointer to a `ma_context_config` object which can be\nNULL, in which case defaults are used. The context configuration is used for setting the logging\ncallback, custom memory allocation callbacks, user-defined data and some backend-specific\nconfigurations.\n\nOnce the context has been initialized you can enumerate devices. In the example above we use the\nsimpler `ma_context_get_devices()`, however you can also use a callback for handling devices by\nusing `ma_context_enumerate_devices()`. When using `ma_context_get_devices()` you provide a pointer\nto a pointer that will, upon output, be set to a pointer to a buffer containing a list of\n`ma_device_info` structures. You also provide a pointer to an unsigned integer that will receive\nthe number of items in the returned buffer. Do not free the returned buffers as their memory is\nmanaged internally by miniaudio.\n\nThe `ma_device_info` structure contains an `id` member which is the ID you pass to the device\nconfig. It also contains the name of the device which is useful for presenting a list of devices\nto the user via the UI.\n\nWhen creating your own context you will want to pass it to `ma_device_init()` when initializing the\ndevice. Passing in NULL, like we do in the first example, will result in miniaudio creating the\ncontext for you, which you don't want to do since you've already created a context. Note that\ninternally the context is only tracked by it's pointer which means you must not change the location\nof the `ma_context` object. If this is an issue, consider using `malloc()` to allocate memory for\nthe context.\n\n\n1.2. High Level API\n-------------------\nThe high level API consists of three main parts:\n\n  * Resource management for loading and streaming sounds.\n  * A node graph for advanced mixing and effect processing.\n  * A high level \"engine\" that wraps around the resource manager and node graph.\n\nThe resource manager (`ma_resource_manager`) is used for loading sounds. It supports loading sounds\nfully into memory and also streaming. It will also deal with reference counting for you which\navoids the same sound being loaded multiple times.\n\nThe node graph is used for mixing and effect processing. The idea is that you connect a number of\nnodes into the graph by connecting each node's outputs to another node's inputs. Each node can\nimplement it's own effect. By chaining nodes together, advanced mixing and effect processing can\nbe achieved.\n\nThe engine encapsulates both the resource manager and the node graph to create a simple, easy to\nuse high level API. The resource manager and node graph APIs are covered in more later sections of\nthis manual.\n\nThe code below shows how you can initialize an engine using it's default configuration.\n\n    ```c\n    ma_result result;\n    ma_engine engine;\n\n    result = ma_engine_init(NULL, &engine);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to initialize the engine.\n    }\n    ```\n\nThis creates an engine instance which will initialize a device internally which you can access with\n`ma_engine_get_device()`. It will also initialize a resource manager for you which can be accessed\nwith `ma_engine_get_resource_manager()`. The engine itself is a node graph (`ma_node_graph`) which\nmeans you can pass a pointer to the engine object into any of the `ma_node_graph` APIs (with a\ncast). Alternatively, you can use `ma_engine_get_node_graph()` instead of a cast.\n\nNote that all objects in miniaudio, including the `ma_engine` object in the example above, are\ntransparent structures. There are no handles to opaque structures in miniaudio which means you need\nto be mindful of how you declare them. In the example above we are declaring it on the stack, but\nthis will result in the struct being invalidated once the function encapsulating it returns. If\nallocating the engine on the heap is more appropriate, you can easily do so with a standard call\nto `malloc()` or whatever heap allocation routine you like:\n\n    ```c\n    ma_engine* pEngine = malloc(sizeof(*pEngine));\n    ```\n\nThe `ma_engine` API uses the same config/init pattern used all throughout miniaudio. To configure\nan engine, you can fill out a `ma_engine_config` object and pass it into the first parameter of\n`ma_engine_init()`:\n\n    ```c\n    ma_result result;\n    ma_engine engine;\n    ma_engine_config engineConfig;\n\n    engineConfig = ma_engine_config_init();\n    engineConfig.pResourceManager = &myCustomResourceManager;   // <-- Initialized as some earlier stage.\n\n    result = ma_engine_init(&engineConfig, &engine);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n    ```\n\nThis creates an engine instance using a custom config. In this particular example it's showing how\nyou can specify a custom resource manager rather than having the engine initialize one internally.\nThis is particularly useful if you want to have multiple engine's share the same resource manager.\n\nThe engine must be uninitialized with `ma_engine_uninit()` when it's no longer needed.\n\nBy default the engine will be started, but nothing will be playing because no sounds have been\ninitialized. The easiest but least flexible way of playing a sound is like so:\n\n    ```c\n    ma_engine_play_sound(&engine, \"my_sound.wav\", NULL);\n    ```\n\nThis plays what miniaudio calls an \"inline\" sound. It plays the sound once, and then puts the\ninternal sound up for recycling. The last parameter is used to specify which sound group the sound\nshould be associated with which will be explained later. This particular way of playing a sound is\nsimple, but lacks flexibility and features. A more flexible way of playing a sound is to first\ninitialize a sound:\n\n    ```c\n    ma_result result;\n    ma_sound sound;\n\n    result = ma_sound_init_from_file(&engine, \"my_sound.wav\", 0, NULL, NULL, &sound);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    ma_sound_start(&sound);\n    ```\n\nThis returns a `ma_sound` object which represents a single instance of the specified sound file. If\nyou want to play the same file multiple times simultaneously, you need to create one sound for each\ninstance.\n\nSounds should be uninitialized with `ma_sound_uninit()`.\n\nSounds are not started by default. Start a sound with `ma_sound_start()` and stop it with\n`ma_sound_stop()`. When a sound is stopped, it is not rewound to the start. Use\n`ma_sound_seek_to_pcm_frame(&sound, 0)` to seek back to the start of a sound. By default, starting\nand stopping sounds happens immediately, but sometimes it might be convenient to schedule the sound\nthe be started and/or stopped at a specific time. This can be done with the following functions:\n\n    ```c\n    ma_sound_set_start_time_in_pcm_frames()\n    ma_sound_set_start_time_in_milliseconds()\n    ma_sound_set_stop_time_in_pcm_frames()\n    ma_sound_set_stop_time_in_milliseconds()\n    ```\n\nThe start/stop time needs to be specified based on the absolute timer which is controlled by the\nengine. The current global time time in PCM frames can be retrieved with\n`ma_engine_get_time_in_pcm_frames()`. The engine's global time can be changed with\n`ma_engine_set_time_in_pcm_frames()` for synchronization purposes if required. Note that scheduling\na start time still requires an explicit call to `ma_sound_start()` before anything will play:\n\n    ```c\n    ma_sound_set_start_time_in_pcm_frames(&sound, ma_engine_get_time_in_pcm_frames(&engine) + (ma_engine_get_sample_rate(&engine) * 2);\n    ma_sound_start(&sound);\n    ```\n\nThe third parameter of `ma_sound_init_from_file()` is a set of flags that control how the sound be\nloaded and a few options on which features should be enabled for that sound. By default, the sound\nis synchronously loaded fully into memory straight from the file system without any kind of\ndecoding. If you want to decode the sound before storing it in memory, you need to specify the\n`MA_SOUND_FLAG_DECODE` flag. This is useful if you want to incur the cost of decoding at an earlier\nstage, such as a loading stage. Without this option, decoding will happen dynamically at mixing\ntime which might be too expensive on the audio thread.\n\nIf you want to load the sound asynchronously, you can specify the `MA_SOUND_FLAG_ASYNC` flag. This\nwill result in `ma_sound_init_from_file()` returning quickly, but the sound will not start playing\nuntil the sound has had some audio decoded.\n\nThe fourth parameter is a pointer to sound group. A sound group is used as a mechanism to organise\nsounds into groups which have their own effect processing and volume control. An example is a game\nwhich might have separate groups for sfx, voice and music. Each of these groups have their own\nindependent volume control. Use `ma_sound_group_init()` or `ma_sound_group_init_ex()` to initialize\na sound group.\n\nSounds and sound groups are nodes in the engine's node graph and can be plugged into any `ma_node`\nAPI. This makes it possible to connect sounds and sound groups to effect nodes to produce complex\neffect chains.\n\nA sound can have it's volume changed with `ma_sound_set_volume()`. If you prefer decibel volume\ncontrol you can use `ma_volume_db_to_linear()` to convert from decibel representation to linear.\n\nPanning and pitching is supported with `ma_sound_set_pan()` and `ma_sound_set_pitch()`. If you know\na sound will never have it's pitch changed with `ma_sound_set_pitch()` or via the doppler effect,\nyou can specify the `MA_SOUND_FLAG_NO_PITCH` flag when initializing the sound for an optimization.\n\nBy default, sounds and sound groups have spatialization enabled. If you don't ever want to\nspatialize your sounds, initialize the sound with the `MA_SOUND_FLAG_NO_SPATIALIZATION` flag. The\nspatialization model is fairly simple and is roughly on feature parity with OpenAL. HRTF and\nenvironmental occlusion are not currently supported, but planned for the future. The supported\nfeatures include:\n\n  * Sound and listener positioning and orientation with cones\n  * Attenuation models: none, inverse, linear and exponential\n  * Doppler effect\n\nSounds can be faded in and out with `ma_sound_set_fade_in_pcm_frames()`.\n\nTo check if a sound is currently playing, you can use `ma_sound_is_playing()`. To check if a sound\nis at the end, use `ma_sound_at_end()`. Looping of a sound can be controlled with\n`ma_sound_set_looping()`. Use `ma_sound_is_looping()` to check whether or not the sound is looping.\n\n\n\n2. Building\n===========\nminiaudio should work cleanly out of the box without the need to download or install any\ndependencies. See below for platform-specific details.\n\nNote that GCC and Clang require `-msse2`, `-mavx2`, etc. for SIMD optimizations.\n\nIf you get errors about undefined references to `__sync_val_compare_and_swap_8`, `__atomic_load_8`,\netc. you need to link with `-latomic`.\n\n\n2.1. Windows\n------------\nThe Windows build should compile cleanly on all popular compilers without the need to configure any\ninclude paths nor link to any libraries.\n\nThe UWP build may require linking to mmdevapi.lib if you get errors about an unresolved external\nsymbol for `ActivateAudioInterfaceAsync()`.\n\n\n2.2. macOS and iOS\n------------------\nThe macOS build should compile cleanly without the need to download any dependencies nor link to\nany libraries or frameworks. The iOS build needs to be compiled as Objective-C and will need to\nlink the relevant frameworks but should compile cleanly out of the box with Xcode. Compiling\nthrough the command line requires linking to `-lpthread` and `-lm`.\n\nDue to the way miniaudio links to frameworks at runtime, your application may not pass Apple's\nnotarization process. To fix this there are two options. The first is to use the\n`MA_NO_RUNTIME_LINKING` option, like so:\n\n    ```c\n    #ifdef __APPLE__\n        #define MA_NO_RUNTIME_LINKING\n    #endif\n    #define MINIAUDIO_IMPLEMENTATION\n    #include \"miniaudio.h\"\n    ```\n\nThis will require linking with `-framework CoreFoundation -framework CoreAudio -framework AudioToolbox`.\nIf you get errors about AudioToolbox, try with `-framework AudioUnit` instead. You may get this when\nusing older versions of iOS. Alternatively, if you would rather keep using runtime linking you can\nadd the following to your entitlements.xcent file:\n\n    ```\n    <key>com.apple.security.cs.allow-dyld-environment-variables</key>\n    <true/>\n    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>\n    <true/>\n    ```\n\nSee this discussion for more info: https://github.com/mackron/miniaudio/issues/203.\n\n\n2.3. Linux\n----------\nThe Linux build only requires linking to `-ldl`, `-lpthread` and `-lm`. You do not need any\ndevelopment packages. You may need to link with `-latomic` if you're compiling for 32-bit ARM.\n\n\n2.4. BSD\n--------\nThe BSD build only requires linking to `-lpthread` and `-lm`. NetBSD uses audio(4), OpenBSD uses\nsndio and FreeBSD uses OSS. You may need to link with `-latomic` if you're compiling for 32-bit\nARM.\n\n\n2.5. Android\n------------\nAAudio is the highest priority backend on Android. This should work out of the box without needing\nany kind of compiler configuration. Support for AAudio starts with Android 8 which means older\nversions will fall back to OpenSL|ES which requires API level 16+.\n\nThere have been reports that the OpenSL|ES backend fails to initialize on some Android based\ndevices due to `dlopen()` failing to open \"libOpenSLES.so\". If this happens on your platform\nyou'll need to disable run-time linking with `MA_NO_RUNTIME_LINKING` and link with -lOpenSLES.\n\n\n2.6. Emscripten\n---------------\nThe Emscripten build emits Web Audio JavaScript directly and should compile cleanly out of the box.\nYou cannot use `-std=c*` compiler flags, nor `-ansi`.\n\nYou can enable the use of AudioWorkets by defining `MA_ENABLE_AUDIO_WORKLETS` and then compiling\nwith the following options:\n\n    -sAUDIO_WORKLET=1 -sWASM_WORKERS=1 -sASYNCIFY\n\nAn example for compiling with AudioWorklet support might look like this:\n\n    emcc program.c -o bin/program.html -DMA_ENABLE_AUDIO_WORKLETS -sAUDIO_WORKLET=1 -sWASM_WORKERS=1 -sASYNCIFY\n\nTo run locally, you'll need to use emrun:\n\n    emrun bin/program.html\n\n\n\n2.7. Build Options\n------------------\n`#define` these options before including miniaudio.h.\n\n    +----------------------------------+--------------------------------------------------------------------+\n    | Option                           | Description                                                        |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_WASAPI                     | Disables the WASAPI backend.                                       |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_DSOUND                     | Disables the DirectSound backend.                                  |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_WINMM                      | Disables the WinMM backend.                                        |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_ALSA                       | Disables the ALSA backend.                                         |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_PULSEAUDIO                 | Disables the PulseAudio backend.                                   |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_JACK                       | Disables the JACK backend.                                         |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_COREAUDIO                  | Disables the Core Audio backend.                                   |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_SNDIO                      | Disables the sndio backend.                                        |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_AUDIO4                     | Disables the audio(4) backend.                                     |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_OSS                        | Disables the OSS backend.                                          |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_AAUDIO                     | Disables the AAudio backend.                                       |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_OPENSL                     | Disables the OpenSL|ES backend.                                    |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_WEBAUDIO                   | Disables the Web Audio backend.                                    |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_NULL                       | Disables the null backend.                                         |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_ONLY_SPECIFIC_BACKENDS | Disables all backends by default and requires `MA_ENABLE_*` to     |\n    |                                  | enable specific backends.                                          |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_WASAPI                 | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the WASAPI backend.                                         |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_DSOUND                 | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the DirectSound backend.                                    |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_WINMM                  | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the WinMM backend.                                          |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_ALSA                   | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the ALSA backend.                                           |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_PULSEAUDIO             | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the PulseAudio backend.                                     |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_JACK                   | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the JACK backend.                                           |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_COREAUDIO              | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the Core Audio backend.                                     |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_SNDIO                  | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the sndio backend.                                          |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_AUDIO4                 | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the audio(4) backend.                                       |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_OSS                    | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the OSS backend.                                            |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_AAUDIO                 | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the AAudio backend.                                         |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_OPENSL                 | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the OpenSL|ES backend.                                      |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_WEBAUDIO               | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the Web Audio backend.                                      |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_ENABLE_NULL                   | Used in conjunction with MA_ENABLE_ONLY_SPECIFIC_BACKENDS to       |\n    |                                  | enable the null backend.                                           |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_DECODING                   | Disables decoding APIs.                                            |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_ENCODING                   | Disables encoding APIs.                                            |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_WAV                        | Disables the built-in WAV decoder and encoder.                     |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_FLAC                       | Disables the built-in FLAC decoder.                                |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_MP3                        | Disables the built-in MP3 decoder.                                 |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_DEVICE_IO                  | Disables playback and recording. This will disable `ma_context`    |\n    |                                  | and `ma_device` APIs. This is useful if you only want to use       |\n    |                                  | miniaudio's data conversion and/or decoding APIs.                  |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_RESOURCE_MANAGER           | Disables the resource manager. When using the engine this will     |\n    |                                  | also disable the following functions:                              |\n    |                                  |                                                                    |\n    |                                  | ```                                                                |\n    |                                  | ma_sound_init_from_file()                                          |\n    |                                  | ma_sound_init_from_file_w()                                        |\n    |                                  | ma_sound_init_copy()                                               |\n    |                                  | ma_engine_play_sound_ex()                                          |\n    |                                  | ma_engine_play_sound()                                             |\n    |                                  | ```                                                                |\n    |                                  |                                                                    |\n    |                                  | The only way to initialize a `ma_sound` object is to initialize it |\n    |                                  | from a data source.                                                |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_NODE_GRAPH                 | Disables the node graph API. This will also disable the engine API |\n    |                                  | because it depends on the node graph.                              |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_ENGINE                     | Disables the engine API.                                           |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_THREADING                  | Disables the `ma_thread`, `ma_mutex`, `ma_semaphore` and           |\n    |                                  | `ma_event` APIs. This option is useful if you only need to use     |\n    |                                  | miniaudio for data conversion, decoding and/or encoding. Some      |\n    |                                  | families of APIs require threading which means the following       |\n    |                                  | options must also be set:                                          |\n    |                                  |                                                                    |\n    |                                  |     ```                                                            |\n    |                                  |     MA_NO_DEVICE_IO                                                |\n    |                                  |     ```                                                            |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_GENERATION                 | Disables generation APIs such a `ma_waveform` and `ma_noise`.      |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_SSE2                       | Disables SSE2 optimizations.                                       |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_AVX2                       | Disables AVX2 optimizations.                                       |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_NEON                       | Disables NEON optimizations.                                       |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_NO_RUNTIME_LINKING            | Disables runtime linking. This is useful for passing Apple's       |\n    |                                  | notarization process. When enabling this, you may need to avoid    |\n    |                                  | using `-std=c89` or `-std=c99` on Linux builds or else you may end |\n    |                                  | up with compilation errors due to conflicts with `timespec` and    |\n    |                                  | `timeval` data types.                                              |\n    |                                  |                                                                    |\n    |                                  | You may need to enable this if your target platform does not allow |\n    |                                  | runtime linking via `dlopen()`.                                    |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_DEBUG_OUTPUT                  | Enable `printf()` output of debug logs (`MA_LOG_LEVEL_DEBUG`).     |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_COINIT_VALUE                  | Windows only. The value to pass to internal calls to               |\n    |                                  | `CoInitializeEx()`. Defaults to `COINIT_MULTITHREADED`.            |\n    +----------------------------------+--------------------------------------------------------------------+\n    | MA_API                           | Controls how public APIs should be decorated. Default is `extern`. |\n    +----------------------------------+--------------------------------------------------------------------+\n\n\n3. Definitions\n==============\nThis section defines common terms used throughout miniaudio. Unfortunately there is often ambiguity\nin the use of terms throughout the audio space, so this section is intended to clarify how miniaudio\nuses each term.\n\n3.1. Sample\n-----------\nA sample is a single unit of audio data. If the sample format is f32, then one sample is one 32-bit\nfloating point number.\n\n3.2. Frame / PCM Frame\n----------------------\nA frame is a group of samples equal to the number of channels. For a stereo stream a frame is 2\nsamples, a mono frame is 1 sample, a 5.1 surround sound frame is 6 samples, etc. The terms \"frame\"\nand \"PCM frame\" are the same thing in miniaudio. Note that this is different to a compressed frame.\nIf ever miniaudio needs to refer to a compressed frame, such as a FLAC frame, it will always\nclarify what it's referring to with something like \"FLAC frame\".\n\n3.3. Channel\n------------\nA stream of monaural audio that is emitted from an individual speaker in a speaker system, or\nreceived from an individual microphone in a microphone system. A stereo stream has two channels (a\nleft channel, and a right channel), a 5.1 surround sound system has 6 channels, etc. Some audio\nsystems refer to a channel as a complex audio stream that's mixed with other channels to produce\nthe final mix - this is completely different to miniaudio's use of the term \"channel\" and should\nnot be confused.\n\n3.4. Sample Rate\n----------------\nThe sample rate in miniaudio is always expressed in Hz, such as 44100, 48000, etc. It's the number\nof PCM frames that are processed per second.\n\n3.5. Formats\n------------\nThroughout miniaudio you will see references to different sample formats:\n\n    +---------------+----------------------------------------+---------------------------+\n    | Symbol        | Description                            | Range                     |\n    +---------------+----------------------------------------+---------------------------+\n    | ma_format_f32 | 32-bit floating point                  | [-1, 1]                   |\n    | ma_format_s16 | 16-bit signed integer                  | [-32768, 32767]           |\n    | ma_format_s24 | 24-bit signed integer (tightly packed) | [-8388608, 8388607]       |\n    | ma_format_s32 | 32-bit signed integer                  | [-2147483648, 2147483647] |\n    | ma_format_u8  | 8-bit unsigned integer                 | [0, 255]                  |\n    +---------------+----------------------------------------+---------------------------+\n\nAll formats are native-endian.\n\n\n\n4. Data Sources\n===============\nThe data source abstraction in miniaudio is used for retrieving audio data from some source. A few\nexamples include `ma_decoder`, `ma_noise` and `ma_waveform`. You will need to be familiar with data\nsources in order to make sense of some of the higher level concepts in miniaudio.\n\nThe `ma_data_source` API is a generic interface for reading from a data source. Any object that\nimplements the data source interface can be plugged into any `ma_data_source` function.\n\nTo read data from a data source:\n\n    ```c\n    ma_result result;\n    ma_uint64 framesRead;\n\n    result = ma_data_source_read_pcm_frames(pDataSource, pFramesOut, frameCount, &framesRead);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to read data from the data source.\n    }\n    ```\n\nIf you don't need the number of frames that were successfully read you can pass in `NULL` to the\n`pFramesRead` parameter. If this returns a value less than the number of frames requested it means\nthe end of the file has been reached. `MA_AT_END` will be returned only when the number of frames\nread is 0.\n\nWhen calling any data source function, with the exception of `ma_data_source_init()` and\n`ma_data_source_uninit()`, you can pass in any object that implements a data source. For example,\nyou could plug in a decoder like so:\n\n    ```c\n    ma_result result;\n    ma_uint64 framesRead;\n    ma_decoder decoder;   // <-- This would be initialized with `ma_decoder_init_*()`.\n\n    result = ma_data_source_read_pcm_frames(&decoder, pFramesOut, frameCount, &framesRead);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to read data from the decoder.\n    }\n    ```\n\nIf you want to seek forward you can pass in `NULL` to the `pFramesOut` parameter. Alternatively you\ncan use `ma_data_source_seek_pcm_frames()`.\n\nTo seek to a specific PCM frame:\n\n    ```c\n    result = ma_data_source_seek_to_pcm_frame(pDataSource, frameIndex);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to seek to PCM frame.\n    }\n    ```\n\nYou can retrieve the total length of a data source in PCM frames, but note that some data sources\nmay not have the notion of a length, such as noise and waveforms, and others may just not have a\nway of determining the length such as some decoders. To retrieve the length:\n\n    ```c\n    ma_uint64 length;\n\n    result = ma_data_source_get_length_in_pcm_frames(pDataSource, &length);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to retrieve the length.\n    }\n    ```\n\nCare should be taken when retrieving the length of a data source where the underlying decoder is\npulling data from a data stream with an undefined length, such as internet radio or some kind of\nbroadcast. If you do this, `ma_data_source_get_length_in_pcm_frames()` may never return.\n\nThe current position of the cursor in PCM frames can also be retrieved:\n\n    ```c\n    ma_uint64 cursor;\n\n    result = ma_data_source_get_cursor_in_pcm_frames(pDataSource, &cursor);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to retrieve the cursor.\n    }\n    ```\n\nYou will often need to know the data format that will be returned after reading. This can be\nretrieved like so:\n\n    ```c\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    ma_channel channelMap[MA_MAX_CHANNELS];\n\n    result = ma_data_source_get_data_format(pDataSource, &format, &channels, &sampleRate, channelMap, MA_MAX_CHANNELS);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to retrieve data format.\n    }\n    ```\n\nIf you do not need a specific data format property, just pass in NULL to the respective parameter.\n\nThere may be cases where you want to implement something like a sound bank where you only want to\nread data within a certain range of the underlying data. To do this you can use a range:\n\n    ```c\n    result = ma_data_source_set_range_in_pcm_frames(pDataSource, rangeBegInFrames, rangeEndInFrames);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to set the range.\n    }\n    ```\n\nThis is useful if you have a sound bank where many sounds are stored in the same file and you want\nthe data source to only play one of those sub-sounds. Note that once the range is set, everything\nthat takes a position, such as cursors and loop points, should always be relatvie to the start of\nthe range. When the range is set, any previously defined loop point will be reset.\n\nCustom loop points can also be used with data sources. By default, data sources will loop after\nthey reach the end of the data source, but if you need to loop at a specific location, you can do\nthe following:\n\n    ```c\n    result = ma_data_set_loop_point_in_pcm_frames(pDataSource, loopBegInFrames, loopEndInFrames);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to set the loop point.\n    }\n    ```\n\nThe loop point is relative to the current range.\n\nIt's sometimes useful to chain data sources together so that a seamless transition can be achieved.\nTo do this, you can use chaining:\n\n    ```c\n    ma_decoder decoder1;\n    ma_decoder decoder2;\n\n    // ... initialize decoders with ma_decoder_init_*() ...\n\n    result = ma_data_source_set_next(&decoder1, &decoder2);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to set the next data source.\n    }\n\n    result = ma_data_source_read_pcm_frames(&decoder1, pFramesOut, frameCount, pFramesRead);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to read from the decoder.\n    }\n    ```\n\nIn the example above we're using decoders. When reading from a chain, you always want to read from\nthe top level data source in the chain. In the example above, `decoder1` is the top level data\nsource in the chain. When `decoder1` reaches the end, `decoder2` will start seamlessly without any\ngaps.\n\nNote that when looping is enabled, only the current data source will be looped. You can loop the\nentire chain by linking in a loop like so:\n\n    ```c\n    ma_data_source_set_next(&decoder1, &decoder2);  // decoder1 -> decoder2\n    ma_data_source_set_next(&decoder2, &decoder1);  // decoder2 -> decoder1 (loop back to the start).\n    ```\n\nNote that setting up chaining is not thread safe, so care needs to be taken if you're dynamically\nchanging links while the audio thread is in the middle of reading.\n\nDo not use `ma_decoder_seek_to_pcm_frame()` as a means to reuse a data source to play multiple\ninstances of the same sound simultaneously. This can be extremely inefficient depending on the type\nof data source and can result in glitching due to subtle changes to the state of internal filters.\nInstead, initialize multiple data sources for each instance.\n\n\n4.1. Custom Data Sources\n------------------------\nYou can implement a custom data source by implementing the functions in `ma_data_source_vtable`.\nYour custom object must have `ma_data_source_base` as it's first member:\n\n    ```c\n    struct my_data_source\n    {\n        ma_data_source_base base;\n        ...\n    };\n    ```\n\nIn your initialization routine, you need to call `ma_data_source_init()` in order to set up the\nbase object (`ma_data_source_base`):\n\n    ```c\n    static ma_result my_data_source_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n    {\n        // Read data here. Output in the same format returned by my_data_source_get_data_format().\n    }\n\n    static ma_result my_data_source_seek(ma_data_source* pDataSource, ma_uint64 frameIndex)\n    {\n        // Seek to a specific PCM frame here. Return MA_NOT_IMPLEMENTED if seeking is not supported.\n    }\n\n    static ma_result my_data_source_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n    {\n        // Return the format of the data here.\n    }\n\n    static ma_result my_data_source_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor)\n    {\n        // Retrieve the current position of the cursor here. Return MA_NOT_IMPLEMENTED and set *pCursor to 0 if there is no notion of a cursor.\n    }\n\n    static ma_result my_data_source_get_length(ma_data_source* pDataSource, ma_uint64* pLength)\n    {\n        // Retrieve the length in PCM frames here. Return MA_NOT_IMPLEMENTED and set *pLength to 0 if there is no notion of a length or if the length is unknown.\n    }\n\n    static ma_data_source_vtable g_my_data_source_vtable =\n    {\n        my_data_source_read,\n        my_data_source_seek,\n        my_data_source_get_data_format,\n        my_data_source_get_cursor,\n        my_data_source_get_length\n    };\n\n    ma_result my_data_source_init(my_data_source* pMyDataSource)\n    {\n        ma_result result;\n        ma_data_source_config baseConfig;\n\n        baseConfig = ma_data_source_config_init();\n        baseConfig.vtable = &g_my_data_source_vtable;\n\n        result = ma_data_source_init(&baseConfig, &pMyDataSource->base);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        // ... do the initialization of your custom data source here ...\n\n        return MA_SUCCESS;\n    }\n\n    void my_data_source_uninit(my_data_source* pMyDataSource)\n    {\n        // ... do the uninitialization of your custom data source here ...\n\n        // You must uninitialize the base data source.\n        ma_data_source_uninit(&pMyDataSource->base);\n    }\n    ```\n\nNote that `ma_data_source_init()` and `ma_data_source_uninit()` are never called directly outside\nof the custom data source. It's up to the custom data source itself to call these within their own\ninit/uninit functions.\n\n\n\n5. Engine\n=========\nThe `ma_engine` API is a high level API for managing and mixing sounds and effect processing. The\n`ma_engine` object encapsulates a resource manager and a node graph, both of which will be\nexplained in more detail later.\n\nSounds are called `ma_sound` and are created from an engine. Sounds can be associated with a mixing\ngroup called `ma_sound_group` which are also created from the engine. Both `ma_sound` and\n`ma_sound_group` objects are nodes within the engine's node graph.\n\nWhen the engine is initialized, it will normally create a device internally. If you would rather\nmanage the device yourself, you can do so and just pass a pointer to it via the engine config when\nyou initialize the engine. You can also just use the engine without a device, which again can be\nconfigured via the engine config.\n\nThe most basic way to initialize the engine is with a default config, like so:\n\n    ```c\n    ma_result result;\n    ma_engine engine;\n\n    result = ma_engine_init(NULL, &engine);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to initialize the engine.\n    }\n    ```\n\nThis will result in the engine initializing a playback device using the operating system's default\ndevice. This will be sufficient for many use cases, but if you need more flexibility you'll want to\nconfigure the engine with an engine config:\n\n    ```c\n    ma_result result;\n    ma_engine engine;\n    ma_engine_config engineConfig;\n\n    engineConfig = ma_engine_config_init();\n    engineConfig.pDevice = &myDevice;\n\n    result = ma_engine_init(&engineConfig, &engine);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to initialize the engine.\n    }\n    ```\n\nIn the example above we're passing in a pre-initialized device. Since the caller is the one in\ncontrol of the device's data callback, it's their responsibility to manually call\n`ma_engine_read_pcm_frames()` from inside their data callback:\n\n    ```c\n    void playback_data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount)\n    {\n        ma_engine_read_pcm_frames(&g_Engine, pOutput, frameCount, NULL);\n    }\n    ```\n\nYou can also use the engine independent of a device entirely:\n\n    ```c\n    ma_result result;\n    ma_engine engine;\n    ma_engine_config engineConfig;\n\n    engineConfig = ma_engine_config_init();\n    engineConfig.noDevice   = MA_TRUE;\n    engineConfig.channels   = 2;        // Must be set when not using a device.\n    engineConfig.sampleRate = 48000;    // Must be set when not using a device.\n\n    result = ma_engine_init(&engineConfig, &engine);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to initialize the engine.\n    }\n    ```\n\nNote that when you're not using a device, you must set the channel count and sample rate in the\nconfig or else miniaudio won't know what to use (miniaudio will use the device to determine this\nnormally). When not using a device, you need to use `ma_engine_read_pcm_frames()` to process audio\ndata from the engine. This kind of setup is useful if you want to do something like offline\nprocessing or want to use a different audio system for playback such as SDL.\n\nWhen a sound is loaded it goes through a resource manager. By default the engine will initialize a\nresource manager internally, but you can also specify a pre-initialized resource manager:\n\n    ```c\n    ma_result result;\n    ma_engine engine1;\n    ma_engine engine2;\n    ma_engine_config engineConfig;\n\n    engineConfig = ma_engine_config_init();\n    engineConfig.pResourceManager = &myResourceManager;\n\n    ma_engine_init(&engineConfig, &engine1);\n    ma_engine_init(&engineConfig, &engine2);\n    ```\n\nIn this example we are initializing two engines, both of which are sharing the same resource\nmanager. This is especially useful for saving memory when loading the same file across multiple\nengines. If you were not to use a shared resource manager, each engine instance would use their own\nwhich would result in any sounds that are used between both engine's being loaded twice. By using\na shared resource manager, it would only be loaded once. Using multiple engine's is useful when you\nneed to output to multiple playback devices, such as in a local multiplayer game where each player\nis using their own set of headphones.\n\nBy default an engine will be in a started state. To make it so the engine is not automatically\nstarted you can configure it as such:\n\n    ```c\n    engineConfig.noAutoStart = MA_TRUE;\n\n    // The engine will need to be started manually.\n    ma_engine_start(&engine);\n\n    // Later on the engine can be stopped with ma_engine_stop().\n    ma_engine_stop(&engine);\n    ```\n\nThe concept of starting or stopping an engine is only relevant when using the engine with a\ndevice. Attempting to start or stop an engine that is not associated with a device will result in\n`MA_INVALID_OPERATION`.\n\nThe master volume of the engine can be controlled with `ma_engine_set_volume()` which takes a\nlinear scale, with 0 resulting in silence and anything above 1 resulting in amplification. If you\nprefer decibel based volume control, use `ma_volume_db_to_linear()` to convert from dB to linear.\n\nWhen a sound is spatialized, it is done so relative to a listener. An engine can be configured to\nhave multiple listeners which can be configured via the config:\n\n    ```c\n    engineConfig.listenerCount = 2;\n    ```\n\nThe maximum number of listeners is restricted to `MA_ENGINE_MAX_LISTENERS`. By default, when a\nsound is spatialized, it will be done so relative to the closest listener. You can also pin a sound\nto a specific listener which will be explained later. Listener's have a position, direction, cone,\nand velocity (for doppler effect). A listener is referenced by an index, the meaning of which is up\nto the caller (the index is 0 based and cannot go beyond the listener count, minus 1). The\nposition, direction and velocity are all specified in absolute terms:\n\n    ```c\n    ma_engine_listener_set_position(&engine, listenerIndex, worldPosX, worldPosY, worldPosZ);\n    ```\n\nThe direction of the listener represents it's forward vector. The listener's up vector can also be\nspecified and defaults to +1 on the Y axis.\n\n    ```c\n    ma_engine_listener_set_direction(&engine, listenerIndex, forwardX, forwardY, forwardZ);\n    ma_engine_listener_set_world_up(&engine, listenerIndex, 0, 1, 0);\n    ```\n\nThe engine supports directional attenuation. The listener can have a cone the controls how sound is\nattenuated based on the listener's direction. When a sound is between the inner and outer cones, it\nwill be attenuated between 1 and the cone's outer gain:\n\n    ```c\n    ma_engine_listener_set_cone(&engine, listenerIndex, innerAngleInRadians, outerAngleInRadians, outerGain);\n    ```\n\nWhen a sound is inside the inner code, no directional attenuation is applied. When the sound is\noutside of the outer cone, the attenuation will be set to `outerGain` in the example above. When\nthe sound is in between the inner and outer cones, the attenuation will be interpolated between 1\nand the outer gain.\n\nThe engine's coordinate system follows the OpenGL coordinate system where positive X points right,\npositive Y points up and negative Z points forward.\n\nThe simplest and least flexible way to play a sound is like so:\n\n    ```c\n    ma_engine_play_sound(&engine, \"my_sound.wav\", pGroup);\n    ```\n\nThis is a \"fire and forget\" style of function. The engine will manage the `ma_sound` object\ninternally. When the sound finishes playing, it'll be put up for recycling. For more flexibility\nyou'll want to initialize a sound object:\n\n    ```c\n    ma_sound sound;\n\n    result = ma_sound_init_from_file(&engine, \"my_sound.wav\", flags, pGroup, NULL, &sound);\n    if (result != MA_SUCCESS) {\n        return result;  // Failed to load sound.\n    }\n    ```\n\nSounds need to be uninitialized with `ma_sound_uninit()`.\n\nThe example above loads a sound from a file. If the resource manager has been disabled you will not\nbe able to use this function and instead you'll need to initialize a sound directly from a data\nsource:\n\n    ```c\n    ma_sound sound;\n\n    result = ma_sound_init_from_data_source(&engine, &dataSource, flags, pGroup, &sound);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n    ```\n\nEach `ma_sound` object represents a single instance of the sound. If you want to play the same\nsound multiple times at the same time, you need to initialize a separate `ma_sound` object.\n\nFor the most flexibility when initializing sounds, use `ma_sound_init_ex()`. This uses miniaudio's\nstandard config/init pattern:\n\n    ```c\n    ma_sound sound;\n    ma_sound_config soundConfig;\n\n    soundConfig = ma_sound_config_init();\n    soundConfig.pFilePath   = NULL; // Set this to load from a file path.\n    soundConfig.pDataSource = NULL; // Set this to initialize from an existing data source.\n    soundConfig.pInitialAttachment = &someNodeInTheNodeGraph;\n    soundConfig.initialAttachmentInputBusIndex = 0;\n    soundConfig.channelsIn  = 1;\n    soundConfig.channelsOut = 0;    // Set to 0 to use the engine's native channel count.\n\n    result = ma_sound_init_ex(&soundConfig, &sound);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n    ```\n\nIn the example above, the sound is being initialized without a file nor a data source. This is\nvalid, in which case the sound acts as a node in the middle of the node graph. This means you can\nconnect other sounds to this sound and allow it to act like a sound group. Indeed, this is exactly\nwhat a `ma_sound_group` is.\n\nWhen loading a sound, you specify a set of flags that control how the sound is loaded and what\nfeatures are enabled for that sound. When no flags are set, the sound will be fully loaded into\nmemory in exactly the same format as how it's stored on the file system. The resource manager will\nallocate a block of memory and then load the file directly into it. When reading audio data, it\nwill be decoded dynamically on the fly. In order to save processing time on the audio thread, it\nmight be beneficial to pre-decode the sound. You can do this with the `MA_SOUND_FLAG_DECODE` flag:\n\n    ```c\n    ma_sound_init_from_file(&engine, \"my_sound.wav\", MA_SOUND_FLAG_DECODE, pGroup, NULL, &sound);\n    ```\n\nBy default, sounds will be loaded synchronously, meaning `ma_sound_init_*()` will not return until\nthe sound has been fully loaded. If this is prohibitive you can instead load sounds asynchronously\nby specifying the `MA_SOUND_FLAG_ASYNC` flag:\n\n    ```c\n    ma_sound_init_from_file(&engine, \"my_sound.wav\", MA_SOUND_FLAG_DECODE | MA_SOUND_FLAG_ASYNC, pGroup, NULL, &sound);\n    ```\n\nThis will result in `ma_sound_init_*()` returning quickly, but the sound won't yet have been fully\nloaded. When you start the sound, it won't output anything until some sound is available. The sound\nwill start outputting audio before the sound has been fully decoded when the `MA_SOUND_FLAG_DECODE`\nis specified.\n\nIf you need to wait for an asynchronously loaded sound to be fully loaded, you can use a fence. A\nfence in miniaudio is a simple synchronization mechanism which simply blocks until it's internal\ncounter hit's zero. You can specify a fence like so:\n\n    ```c\n    ma_result result;\n    ma_fence fence;\n    ma_sound sounds[4];\n\n    result = ma_fence_init(&fence);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    // Load some sounds asynchronously.\n    for (int iSound = 0; iSound < 4; iSound += 1) {\n        ma_sound_init_from_file(&engine, mySoundFilesPaths[iSound], MA_SOUND_FLAG_DECODE | MA_SOUND_FLAG_ASYNC, pGroup, &fence, &sounds[iSound]);\n    }\n\n    // ... do some other stuff here in the mean time ...\n\n    // Wait for all sounds to finish loading.\n    ma_fence_wait(&fence);\n    ```\n\nIf loading the entire sound into memory is prohibitive, you can also configure the engine to stream\nthe audio data:\n\n    ```c\n    ma_sound_init_from_file(&engine, \"my_sound.wav\", MA_SOUND_FLAG_STREAM, pGroup, NULL, &sound);\n    ```\n\nWhen streaming sounds, 2 seconds worth of audio data is stored in memory. Although it should work\nfine, it's inefficient to use streaming for short sounds. Streaming is useful for things like music\ntracks in games.\n\nWhen loading a sound from a file path, the engine will reference count the file to prevent it from\nbeing loaded if it's already in memory. When you uninitialize a sound, the reference count will be\ndecremented, and if it hits zero, the sound will be unloaded from memory. This reference counting\nsystem is not used for streams. The engine will use a 64-bit hash of the file name when comparing\nfile paths which means there's a small chance you might encounter a name collision. If this is an\nissue, you'll need to use a different name for one of the colliding file paths, or just not load\nfrom files and instead load from a data source.\n\nYou can use `ma_sound_init_copy()` to initialize a copy of another sound. Note, however, that this\nonly works for sounds that were initialized with `ma_sound_init_from_file()` and without the\n`MA_SOUND_FLAG_STREAM` flag.\n\nWhen you initialize a sound, if you specify a sound group the sound will be attached to that group\nautomatically. If you set it to NULL, it will be automatically attached to the engine's endpoint.\nIf you would instead rather leave the sound unattached by default, you can can specify the\n`MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT` flag. This is useful if you want to set up a complex node\ngraph.\n\nSounds are not started by default. To start a sound, use `ma_sound_start()`. Stop a sound with\n`ma_sound_stop()`.\n\nSounds can have their volume controlled with `ma_sound_set_volume()` in the same way as the\nengine's master volume.\n\nSounds support stereo panning and pitching. Set the pan with `ma_sound_set_pan()`. Setting the pan\nto 0 will result in an unpanned sound. Setting it to -1 will shift everything to the left, whereas\n+1 will shift it to the right. The pitch can be controlled with `ma_sound_set_pitch()`. A larger\nvalue will result in a higher pitch. The pitch must be greater than 0.\n\nThe engine supports 3D spatialization of sounds. By default sounds will have spatialization\nenabled, but if a sound does not need to be spatialized it's best to disable it. There are two ways\nto disable spatialization of a sound:\n\n    ```c\n    // Disable spatialization at initialization time via a flag:\n    ma_sound_init_from_file(&engine, \"my_sound.wav\", MA_SOUND_FLAG_NO_SPATIALIZATION, NULL, NULL, &sound);\n\n    // Dynamically disable or enable spatialization post-initialization:\n    ma_sound_set_spatialization_enabled(&sound, isSpatializationEnabled);\n    ```\n\nBy default sounds will be spatialized based on the closest listener. If a sound should always be\nspatialized relative to a specific listener it can be pinned to one:\n\n    ```c\n    ma_sound_set_pinned_listener_index(&sound, listenerIndex);\n    ```\n\nLike listeners, sounds have a position. By default, the position of a sound is in absolute space,\nbut it can be changed to be relative to a listener:\n\n    ```c\n    ma_sound_set_positioning(&sound, ma_positioning_relative);\n    ```\n\nNote that relative positioning of a sound only makes sense if there is either only one listener, or\nthe sound is pinned to a specific listener. To set the position of a sound:\n\n    ```c\n    ma_sound_set_position(&sound, posX, posY, posZ);\n    ```\n\nThe direction works the same way as a listener and represents the sound's forward direction:\n\n    ```c\n    ma_sound_set_direction(&sound, forwardX, forwardY, forwardZ);\n    ```\n\nSound's also have a cone for controlling directional attenuation. This works exactly the same as\nlisteners:\n\n    ```c\n    ma_sound_set_cone(&sound, innerAngleInRadians, outerAngleInRadians, outerGain);\n    ```\n\nThe velocity of a sound is used for doppler effect and can be set as such:\n\n    ```c\n    ma_sound_set_velocity(&sound, velocityX, velocityY, velocityZ);\n    ```\n\nThe engine supports different attenuation models which can be configured on a per-sound basis. By\ndefault the attenuation model is set to `ma_attenuation_model_inverse` which is the equivalent to\nOpenAL's `AL_INVERSE_DISTANCE_CLAMPED`. Configure the attenuation model like so:\n\n    ```c\n    ma_sound_set_attenuation_model(&sound, ma_attenuation_model_inverse);\n    ```\n\nThe supported attenuation models include the following:\n\n    +----------------------------------+----------------------------------------------+\n    | ma_attenuation_model_none        | No distance attenuation.                     |\n    +----------------------------------+----------------------------------------------+\n    | ma_attenuation_model_inverse     | Equivalent to `AL_INVERSE_DISTANCE_CLAMPED`. |\n    +----------------------------------+----------------------------------------------+\n    | ma_attenuation_model_linear      | Linear attenuation.                          |\n    +----------------------------------+----------------------------------------------+\n    | ma_attenuation_model_exponential | Exponential attenuation.                     |\n    +----------------------------------+----------------------------------------------+\n\nTo control how quickly a sound rolls off as it moves away from the listener, you need to configure\nthe rolloff:\n\n    ```c\n    ma_sound_set_rolloff(&sound, rolloff);\n    ```\n\nYou can control the minimum and maximum gain to apply from spatialization:\n\n    ```c\n    ma_sound_set_min_gain(&sound, minGain);\n    ma_sound_set_max_gain(&sound, maxGain);\n    ```\n\nLikewise, in the calculation of attenuation, you can control the minimum and maximum distances for\nthe attenuation calculation. This is useful if you want to ensure sounds don't drop below a certain\nvolume after the listener moves further away and to have sounds play a maximum volume when the\nlistener is within a certain distance:\n\n    ```c\n    ma_sound_set_min_distance(&sound, minDistance);\n    ma_sound_set_max_distance(&sound, maxDistance);\n    ```\n\nThe engine's spatialization system supports doppler effect. The doppler factor can be configure on\na per-sound basis like so:\n\n    ```c\n    ma_sound_set_doppler_factor(&sound, dopplerFactor);\n    ```\n\nYou can fade sounds in and out with `ma_sound_set_fade_in_pcm_frames()` and\n`ma_sound_set_fade_in_milliseconds()`. Set the volume to -1 to use the current volume as the\nstarting volume:\n\n    ```c\n    // Fade in over 1 second.\n    ma_sound_set_fade_in_milliseconds(&sound, 0, 1, 1000);\n\n    // ... sometime later ...\n\n    // Fade out over 1 second, starting from the current volume.\n    ma_sound_set_fade_in_milliseconds(&sound, -1, 0, 1000);\n    ```\n\nBy default sounds will start immediately, but sometimes for timing and synchronization purposes it\ncan be useful to schedule a sound to start or stop:\n\n    ```c\n    // Start the sound in 1 second from now.\n    ma_sound_set_start_time_in_pcm_frames(&sound, ma_engine_get_time_in_pcm_frames(&engine) + (ma_engine_get_sample_rate(&engine) * 1));\n\n    // Stop the sound in 2 seconds from now.\n    ma_sound_set_stop_time_in_pcm_frames(&sound, ma_engine_get_time_in_pcm_frames(&engine) + (ma_engine_get_sample_rate(&engine) * 2));\n    ```\n\nNote that scheduling a start time still requires an explicit call to `ma_sound_start()` before\nanything will play.\n\nThe time is specified in global time which is controlled by the engine. You can get the engine's\ncurrent time with `ma_engine_get_time_in_pcm_frames()`. The engine's global time is incremented\nautomatically as audio data is read, but it can be reset with `ma_engine_set_time_in_pcm_frames()`\nin case it needs to be resynchronized for some reason.\n\nTo determine whether or not a sound is currently playing, use `ma_sound_is_playing()`. This will\ntake the scheduled start and stop times into account.\n\nWhether or not a sound should loop can be controlled with `ma_sound_set_looping()`. Sounds will not\nbe looping by default. Use `ma_sound_is_looping()` to determine whether or not a sound is looping.\n\nUse `ma_sound_at_end()` to determine whether or not a sound is currently at the end. For a looping\nsound this should never return true. Alternatively, you can configure a callback that will be fired\nwhen the sound reaches the end. Note that the callback is fired from the audio thread which means\nyou cannot be uninitializing sound from the callback. To set the callback you can use\n`ma_sound_set_end_callback()`. Alternatively, if you're using `ma_sound_init_ex()`, you can pass it\ninto the config like so:\n\n    ```c\n    soundConfig.endCallback = my_end_callback;\n    soundConfig.pEndCallbackUserData = pMyEndCallbackUserData;\n    ```\n\nThe end callback is declared like so:\n\n    ```c\n    void my_end_callback(void* pUserData, ma_sound* pSound)\n    {\n        ...\n    }\n    ```\n\nInternally a sound wraps around a data source. Some APIs exist to control the underlying data\nsource, mainly for convenience:\n\n    ```c\n    ma_sound_seek_to_pcm_frame(&sound, frameIndex);\n    ma_sound_get_data_format(&sound, &format, &channels, &sampleRate, pChannelMap, channelMapCapacity);\n    ma_sound_get_cursor_in_pcm_frames(&sound, &cursor);\n    ma_sound_get_length_in_pcm_frames(&sound, &length);\n    ```\n\nSound groups have the same API as sounds, only they are called `ma_sound_group`, and since they do\nnot have any notion of a data source, anything relating to a data source is unavailable.\n\nInternally, sound data is loaded via the `ma_decoder` API which means by default it only supports\nfile formats that have built-in support in miniaudio. You can extend this to support any kind of\nfile format through the use of custom decoders. To do this you'll need to use a self-managed\nresource manager and configure it appropriately. See the \"Resource Management\" section below for\ndetails on how to set this up.\n\n\n6. Resource Management\n======================\nMany programs will want to manage sound resources for things such as reference counting and\nstreaming. This is supported by miniaudio via the `ma_resource_manager` API.\n\nThe resource manager is mainly responsible for the following:\n\n  * Loading of sound files into memory with reference counting.\n  * Streaming of sound data.\n\nWhen loading a sound file, the resource manager will give you back a `ma_data_source` compatible\nobject called `ma_resource_manager_data_source`. This object can be passed into any\n`ma_data_source` API which is how you can read and seek audio data. When loading a sound file, you\nspecify whether or not you want the sound to be fully loaded into memory (and optionally\npre-decoded) or streamed. When loading into memory, you can also specify whether or not you want\nthe data to be loaded asynchronously.\n\nThe example below is how you can initialize a resource manager using it's default configuration:\n\n    ```c\n    ma_resource_manager_config config;\n    ma_resource_manager resourceManager;\n\n    config = ma_resource_manager_config_init();\n    result = ma_resource_manager_init(&config, &resourceManager);\n    if (result != MA_SUCCESS) {\n        ma_device_uninit(&device);\n        printf(\"Failed to initialize the resource manager.\");\n        return -1;\n    }\n    ```\n\nYou can configure the format, channels and sample rate of the decoded audio data. By default it\nwill use the file's native data format, but you can configure it to use a consistent format. This\nis useful for offloading the cost of data conversion to load time rather than dynamically\nconverting at mixing time. To do this, you configure the decoded format, channels and sample rate\nlike the code below:\n\n    ```c\n    config = ma_resource_manager_config_init();\n    config.decodedFormat     = device.playback.format;\n    config.decodedChannels   = device.playback.channels;\n    config.decodedSampleRate = device.sampleRate;\n    ```\n\nIn the code above, the resource manager will be configured so that any decoded audio data will be\npre-converted at load time to the device's native data format. If instead you used defaults and\nthe data format of the file did not match the device's data format, you would need to convert the\ndata at mixing time which may be prohibitive in high-performance and large scale scenarios like\ngames.\n\nInternally the resource manager uses the `ma_decoder` API to load sounds. This means by default it\nonly supports decoders that are built into miniaudio. It's possible to support additional encoding\nformats through the use of custom decoders. To do so, pass in your `ma_decoding_backend_vtable`\nvtables into the resource manager config:\n\n    ```c\n    ma_decoding_backend_vtable* pCustomBackendVTables[] =\n    {\n        &g_ma_decoding_backend_vtable_libvorbis,\n        &g_ma_decoding_backend_vtable_libopus\n    };\n\n    ...\n\n    resourceManagerConfig.ppCustomDecodingBackendVTables = pCustomBackendVTables;\n    resourceManagerConfig.customDecodingBackendCount     = sizeof(pCustomBackendVTables) / sizeof(pCustomBackendVTables[0]);\n    resourceManagerConfig.pCustomDecodingBackendUserData = NULL;\n    ```\n\nThis system can allow you to support any kind of file format. See the \"Decoding\" section for\ndetails on how to implement custom decoders. The miniaudio repository includes examples for Opus\nvia libopus and libopusfile and Vorbis via libvorbis and libvorbisfile.\n\nAsynchronicity is achieved via a job system. When an operation needs to be performed, such as the\ndecoding of a page, a job will be posted to a queue which will then be processed by a job thread.\nBy default there will be only one job thread running, but this can be configured, like so:\n\n    ```c\n    config = ma_resource_manager_config_init();\n    config.jobThreadCount = MY_JOB_THREAD_COUNT;\n    ```\n\nBy default job threads are managed internally by the resource manager, however you can also self\nmanage your job threads if, for example, you want to integrate the job processing into your\nexisting job infrastructure, or if you simply don't like the way the resource manager does it. To\ndo this, just set the job thread count to 0 and process jobs manually. To process jobs, you first\nneed to retrieve a job using `ma_resource_manager_next_job()` and then process it using\n`ma_job_process()`:\n\n    ```c\n    config = ma_resource_manager_config_init();\n    config.jobThreadCount = 0;                            // Don't manage any job threads internally.\n    config.flags = MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING; // Optional. Makes `ma_resource_manager_next_job()` non-blocking.\n\n    // ... Initialize your custom job threads ...\n\n    void my_custom_job_thread(...)\n    {\n        for (;;) {\n            ma_job job;\n            ma_result result = ma_resource_manager_next_job(pMyResourceManager, &job);\n            if (result != MA_SUCCESS) {\n                if (result == MA_NO_DATA_AVAILABLE) {\n                    // No jobs are available. Keep going. Will only get this if the resource manager was initialized\n                    // with MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING.\n                    continue;\n                } else if (result == MA_CANCELLED) {\n                    // MA_JOB_TYPE_QUIT was posted. Exit.\n                    break;\n                } else {\n                    // Some other error occurred.\n                    break;\n                }\n            }\n\n            ma_job_process(&job);\n        }\n    }\n    ```\n\nIn the example above, the `MA_JOB_TYPE_QUIT` event is the used as the termination\nindicator, but you can use whatever you would like to terminate the thread. The call to\n`ma_resource_manager_next_job()` is blocking by default, but can be configured to be non-blocking\nby initializing the resource manager with the `MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING` configuration\nflag. Note that the `MA_JOB_TYPE_QUIT` will never be removed from the job queue. This\nis to give every thread the opportunity to catch the event and terminate naturally.\n\nWhen loading a file, it's sometimes convenient to be able to customize how files are opened and\nread instead of using standard `fopen()`, `fclose()`, etc. which is what miniaudio will use by\ndefault. This can be done by setting `pVFS` member of the resource manager's config:\n\n    ```c\n    // Initialize your custom VFS object. See documentation for VFS for information on how to do this.\n    my_custom_vfs vfs = my_custom_vfs_init();\n\n    config = ma_resource_manager_config_init();\n    config.pVFS = &vfs;\n    ```\n\nThis is particularly useful in programs like games where you want to read straight from an archive\nrather than the normal file system. If you do not specify a custom VFS, the resource manager will\nuse the operating system's normal file operations.\n\nTo load a sound file and create a data source, call `ma_resource_manager_data_source_init()`. When\nloading a sound you need to specify the file path and options for how the sounds should be loaded.\nBy default a sound will be loaded synchronously. The returned data source is owned by the caller\nwhich means the caller is responsible for the allocation and freeing of the data source. Below is\nan example for initializing a data source:\n\n    ```c\n    ma_resource_manager_data_source dataSource;\n    ma_result result = ma_resource_manager_data_source_init(pResourceManager, pFilePath, flags, &dataSource);\n    if (result != MA_SUCCESS) {\n        // Error.\n    }\n\n    // ...\n\n    // A ma_resource_manager_data_source object is compatible with the `ma_data_source` API. To read data, just call\n    // the `ma_data_source_read_pcm_frames()` like you would with any normal data source.\n    result = ma_data_source_read_pcm_frames(&dataSource, pDecodedData, frameCount, &framesRead);\n    if (result != MA_SUCCESS) {\n        // Failed to read PCM frames.\n    }\n\n    // ...\n\n    ma_resource_manager_data_source_uninit(&dataSource);\n    ```\n\nThe `flags` parameter specifies how you want to perform loading of the sound file. It can be a\ncombination of the following flags:\n\n    ```\n    MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM\n    MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE\n    MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC\n    MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT\n    ```\n\nWhen no flags are specified (set to 0), the sound will be fully loaded into memory, but not\ndecoded, meaning the raw file data will be stored in memory, and then dynamically decoded when\n`ma_data_source_read_pcm_frames()` is called. To instead decode the audio data before storing it in\nmemory, use the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE` flag. By default, the sound file will\nbe loaded synchronously, meaning `ma_resource_manager_data_source_init()` will only return after\nthe entire file has been loaded. This is good for simplicity, but can be prohibitively slow. You\ncan instead load the sound asynchronously using the `MA_RESOURCE_MANAGER_DATA_SOURCE_ASYNC` flag.\nThis will result in `ma_resource_manager_data_source_init()` returning quickly, but no data will be\nreturned by `ma_data_source_read_pcm_frames()` until some data is available. When no data is\navailable because the asynchronous decoding hasn't caught up, `MA_BUSY` will be returned by\n`ma_data_source_read_pcm_frames()`.\n\nFor large sounds, it's often prohibitive to store the entire file in memory. To mitigate this, you\ncan instead stream audio data which you can do by specifying the\n`MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM` flag. When streaming, data will be decoded in 1\nsecond pages. When a new page needs to be decoded, a job will be posted to the job queue and then\nsubsequently processed in a job thread.\n\nFor in-memory sounds, reference counting is used to ensure the data is loaded only once. This means\nmultiple calls to `ma_resource_manager_data_source_init()` with the same file path will result in\nthe file data only being loaded once. Each call to `ma_resource_manager_data_source_init()` must be\nmatched up with a call to `ma_resource_manager_data_source_uninit()`. Sometimes it can be useful\nfor a program to register self-managed raw audio data and associate it with a file path. Use the\n`ma_resource_manager_register_*()` and `ma_resource_manager_unregister_*()` APIs to do this.\n`ma_resource_manager_register_decoded_data()` is used to associate a pointer to raw, self-managed\ndecoded audio data in the specified data format with the specified name. Likewise,\n`ma_resource_manager_register_encoded_data()` is used to associate a pointer to raw self-managed\nencoded audio data (the raw file data) with the specified name. Note that these names need not be\nactual file paths. When `ma_resource_manager_data_source_init()` is called (without the\n`MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM` flag), the resource manager will look for these\nexplicitly registered data buffers and, if found, will use it as the backing data for the data\nsource. Note that the resource manager does *not* make a copy of this data so it is up to the\ncaller to ensure the pointer stays valid for it's lifetime. Use\n`ma_resource_manager_unregister_data()` to unregister the self-managed data. You can also use\n`ma_resource_manager_register_file()` and `ma_resource_manager_unregister_file()` to register and\nunregister a file. It does not make sense to use the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM`\nflag with a self-managed data pointer.\n\n\n6.1. Asynchronous Loading and Synchronization\n---------------------------------------------\nWhen loading asynchronously, it can be useful to poll whether or not loading has finished. Use\n`ma_resource_manager_data_source_result()` to determine this. For in-memory sounds, this will\nreturn `MA_SUCCESS` when the file has been *entirely* decoded. If the sound is still being decoded,\n`MA_BUSY` will be returned. Otherwise, some other error code will be returned if the sound failed\nto load. For streaming data sources, `MA_SUCCESS` will be returned when the first page has been\ndecoded and the sound is ready to be played. If the first page is still being decoded, `MA_BUSY`\nwill be returned. Otherwise, some other error code will be returned if the sound failed to load.\n\nIn addition to polling, you can also use a simple synchronization object called a \"fence\" to wait\nfor asynchronously loaded sounds to finish. This is called `ma_fence`. The advantage to using a\nfence is that it can be used to wait for a group of sounds to finish loading rather than waiting\nfor sounds on an individual basis. There are two stages to loading a sound:\n\n  * Initialization of the internal decoder; and\n  * Completion of decoding of the file (the file is fully decoded)\n\nYou can specify separate fences for each of the different stages. Waiting for the initialization\nof the internal decoder is important for when you need to know the sample format, channels and\nsample rate of the file.\n\nThe example below shows how you could use a fence when loading a number of sounds:\n\n    ```c\n    // This fence will be released when all sounds are finished loading entirely.\n    ma_fence fence;\n    ma_fence_init(&fence);\n\n    // This will be passed into the initialization routine for each sound.\n    ma_resource_manager_pipeline_notifications notifications = ma_resource_manager_pipeline_notifications_init();\n    notifications.done.pFence = &fence;\n\n    // Now load a bunch of sounds:\n    for (iSound = 0; iSound < soundCount; iSound += 1) {\n        ma_resource_manager_data_source_init(pResourceManager, pSoundFilePaths[iSound], flags, &notifications, &pSoundSources[iSound]);\n    }\n\n    // ... DO SOMETHING ELSE WHILE SOUNDS ARE LOADING ...\n\n    // Wait for loading of sounds to finish.\n    ma_fence_wait(&fence);\n    ```\n\nIn the example above we used a fence for waiting until the entire file has been fully decoded. If\nyou only need to wait for the initialization of the internal decoder to complete, you can use the\n`init` member of the `ma_resource_manager_pipeline_notifications` object:\n\n    ```c\n    notifications.init.pFence = &fence;\n    ```\n\nIf a fence is not appropriate for your situation, you can instead use a callback that is fired on\nan individual sound basis. This is done in a very similar way to fences:\n\n    ```c\n    typedef struct\n    {\n        ma_async_notification_callbacks cb;\n        void* pMyData;\n    } my_notification;\n\n    void my_notification_callback(ma_async_notification* pNotification)\n    {\n        my_notification* pMyNotification = (my_notification*)pNotification;\n\n        // Do something in response to the sound finishing loading.\n    }\n\n    ...\n\n    my_notification myCallback;\n    myCallback.cb.onSignal = my_notification_callback;\n    myCallback.pMyData     = pMyData;\n\n    ma_resource_manager_pipeline_notifications notifications = ma_resource_manager_pipeline_notifications_init();\n    notifications.done.pNotification = &myCallback;\n\n    ma_resource_manager_data_source_init(pResourceManager, \"my_sound.wav\", flags, &notifications, &mySound);\n    ```\n\nIn the example above we just extend the `ma_async_notification_callbacks` object and pass an\ninstantiation into the `ma_resource_manager_pipeline_notifications` in the same way as we did with\nthe fence, only we set `pNotification` instead of `pFence`. You can set both of these at the same\ntime and they should both work as expected. If using the `pNotification` system, you need to ensure\nyour `ma_async_notification_callbacks` object stays valid.\n\n\n\n6.2. Resource Manager Implementation Details\n--------------------------------------------\nResources are managed in two main ways:\n\n  * By storing the entire sound inside an in-memory buffer (referred to as a data buffer)\n  * By streaming audio data on the fly (referred to as a data stream)\n\nA resource managed data source (`ma_resource_manager_data_source`) encapsulates a data buffer or\ndata stream, depending on whether or not the data source was initialized with the\n`MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM` flag. If so, it will make use of a\n`ma_resource_manager_data_stream` object. Otherwise it will use a `ma_resource_manager_data_buffer`\nobject. Both of these objects are data sources which means they can be used with any\n`ma_data_source_*()` API.\n\nAnother major feature of the resource manager is the ability to asynchronously decode audio files.\nThis relieves the audio thread of time-consuming decoding which can negatively affect scalability\ndue to the audio thread needing to complete it's work extremely quickly to avoid glitching.\nAsynchronous decoding is achieved through a job system. There is a central multi-producer,\nmulti-consumer, fixed-capacity job queue. When some asynchronous work needs to be done, a job is\nposted to the queue which is then read by a job thread. The number of job threads can be\nconfigured for improved scalability, and job threads can all run in parallel without needing to\nworry about the order of execution (how this is achieved is explained below).\n\nWhen a sound is being loaded asynchronously, playback can begin before the sound has been fully\ndecoded. This enables the application to start playback of the sound quickly, while at the same\ntime allowing to resource manager to keep loading in the background. Since there may be less\nthreads than the number of sounds being loaded at a given time, a simple scheduling system is used\nto keep decoding time balanced and fair. The resource manager solves this by splitting decoding\ninto chunks called pages. By default, each page is 1 second long. When a page has been decoded, a\nnew job will be posted to start decoding the next page. By dividing up decoding into pages, an\nindividual sound shouldn't ever delay every other sound from having their first page decoded. Of\ncourse, when loading many sounds at the same time, there will always be an amount of time required\nto process jobs in the queue so in heavy load situations there will still be some delay. To\ndetermine if a data source is ready to have some frames read, use\n`ma_resource_manager_data_source_get_available_frames()`. This will return the number of frames\navailable starting from the current position.\n\n\n6.2.1. Job Queue\n----------------\nThe resource manager uses a job queue which is multi-producer, multi-consumer, and fixed-capacity.\nThis job queue is not currently lock-free, and instead uses a spinlock to achieve thread-safety.\nOnly a fixed number of jobs can be allocated and inserted into the queue which is done through a\nlock-free data structure for allocating an index into a fixed sized array, with reference counting\nfor mitigation of the ABA problem. The reference count is 32-bit.\n\nFor many types of jobs it's important that they execute in a specific order. In these cases, jobs\nare executed serially. For the resource manager, serial execution of jobs is only required on a\nper-object basis (per data buffer or per data stream). Each of these objects stores an execution\ncounter. When a job is posted it is associated with an execution counter. When the job is\nprocessed, it checks if the execution counter of the job equals the execution counter of the\nowning object and if so, processes the job. If the counters are not equal, the job will be posted\nback onto the job queue for later processing. When the job finishes processing the execution order\nof the main object is incremented. This system means the no matter how many job threads are\nexecuting, decoding of an individual sound will always get processed serially. The advantage to\nhaving multiple threads comes into play when loading multiple sounds at the same time.\n\nThe resource manager's job queue is not 100% lock-free and will use a spinlock to achieve\nthread-safety for a very small section of code. This is only relevant when the resource manager\nuses more than one job thread. If only using a single job thread, which is the default, the\nlock should never actually wait in practice. The amount of time spent locking should be quite\nshort, but it's something to be aware of for those who have pedantic lock-free requirements and\nneed to use more than one job thread. There are plans to remove this lock in a future version.\n\nIn addition, posting a job will release a semaphore, which on Win32 is implemented with\n`ReleaseSemaphore` and on POSIX platforms via a condition variable:\n\n    ```c\n    pthread_mutex_lock(&pSemaphore->lock);\n    {\n        pSemaphore->value += 1;\n        pthread_cond_signal(&pSemaphore->cond);\n    }\n    pthread_mutex_unlock(&pSemaphore->lock);\n    ```\n\nAgain, this is relevant for those with strict lock-free requirements in the audio thread. To avoid\nthis, you can use non-blocking mode (via the `MA_JOB_QUEUE_FLAG_NON_BLOCKING`\nflag) and implement your own job processing routine (see the \"Resource Manager\" section above for\ndetails on how to do this).\n\n\n\n6.2.2. Data Buffers\n-------------------\nWhen the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM` flag is excluded at initialization time, the\nresource manager will try to load the data into an in-memory data buffer. Before doing so, however,\nit will first check if the specified file is already loaded. If so, it will increment a reference\ncounter and just use the already loaded data. This saves both time and memory. When the data buffer\nis uninitialized, the reference counter will be decremented. If the counter hits zero, the file\nwill be unloaded. This is a detail to keep in mind because it could result in excessive loading and\nunloading of a sound. For example, the following sequence will result in a file be loaded twice,\nonce after the other:\n\n    ```c\n    ma_resource_manager_data_source_init(pResourceManager, \"my_file\", ..., &myDataBuffer0); // Refcount = 1. Initial load.\n    ma_resource_manager_data_source_uninit(&myDataBuffer0);                                 // Refcount = 0. Unloaded.\n\n    ma_resource_manager_data_source_init(pResourceManager, \"my_file\", ..., &myDataBuffer1); // Refcount = 1. Reloaded because previous uninit() unloaded it.\n    ma_resource_manager_data_source_uninit(&myDataBuffer1);                                 // Refcount = 0. Unloaded.\n    ```\n\nA binary search tree (BST) is used for storing data buffers as it has good balance between\nefficiency and simplicity. The key of the BST is a 64-bit hash of the file path that was passed\ninto `ma_resource_manager_data_source_init()`. The advantage of using a hash is that it saves\nmemory over storing the entire path, has faster comparisons, and results in a mostly balanced BST\ndue to the random nature of the hash. The disadvantages are that file names are case-sensitive and\nthere's a small chance of name collisions. If case-sensitivity is an issue, you should normalize\nyour file names to upper- or lower-case before initializing your data sources. If name collisions\nbecome an issue, you'll need to change the name of one of the colliding names or just not use the\nresource manager.\n\nWhen a sound file has not already been loaded and the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC`\nflag is excluded, the file will be decoded synchronously by the calling thread. There are two\noptions for controlling how the audio is stored in the data buffer - encoded or decoded. When the\n`MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE` option is excluded, the raw file data will be stored\nin memory. Otherwise the sound will be decoded before storing it in memory. Synchronous loading is\na very simple and standard process of simply adding an item to the BST, allocating a block of\nmemory and then decoding (if `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE` is specified).\n\nWhen the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC` flag is specified, loading of the data buffer\nis done asynchronously. In this case, a job is posted to the queue to start loading and then the\nfunction immediately returns, setting an internal result code to `MA_BUSY`. This result code is\nreturned when the program calls `ma_resource_manager_data_source_result()`. When decoding has fully\ncompleted `MA_SUCCESS` will be returned. This can be used to know if loading has fully completed.\n\nWhen loading asynchronously, a single job is posted to the queue of the type\n`MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE`. This involves making a copy of the file path and\nassociating it with job. When the job is processed by the job thread, it will first load the file\nusing the VFS associated with the resource manager. When using a custom VFS, it's important that it\nbe completely thread-safe because it will be used from one or more job threads at the same time.\nIndividual files should only ever be accessed by one thread at a time, however. After opening the\nfile via the VFS, the job will determine whether or not the file is being decoded. If not, it\nsimply allocates a block of memory and loads the raw file contents into it and returns. On the\nother hand, when the file is being decoded, it will first allocate a decoder on the heap and\ninitialize it. Then it will check if the length of the file is known. If so it will allocate a\nblock of memory to store the decoded output and initialize it to silence. If the size is unknown,\nit will allocate room for one page. After memory has been allocated, the first page will be\ndecoded. If the sound is shorter than a page, the result code will be set to `MA_SUCCESS` and the\ncompletion event will be signalled and loading is now complete. If, however, there is more to\ndecode, a job with the code `MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE` is posted. This job\nwill decode the next page and perform the same process if it reaches the end. If there is more to\ndecode, the job will post another `MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE` job which will\nkeep on happening until the sound has been fully decoded. For sounds of an unknown length, each\npage will be linked together as a linked list. Internally this is implemented via the\n`ma_paged_audio_buffer` object.\n\n\n6.2.3. Data Streams\n-------------------\nData streams only ever store two pages worth of data for each instance. They are most useful for\nlarge sounds like music tracks in games that would consume too much memory if fully decoded in\nmemory. After every frame from a page has been read, a job will be posted to load the next page\nwhich is done from the VFS.\n\nFor data streams, the `MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC` flag will determine whether or\nnot initialization of the data source waits until the two pages have been decoded. When unset,\n`ma_resource_manager_data_source_init()` will wait until the two pages have been loaded, otherwise\nit will return immediately.\n\nWhen frames are read from a data stream using `ma_resource_manager_data_source_read_pcm_frames()`,\n`MA_BUSY` will be returned if there are no frames available. If there are some frames available,\nbut less than the number requested, `MA_SUCCESS` will be returned, but the actual number of frames\nread will be less than the number requested. Due to the asynchronous nature of data streams,\nseeking is also asynchronous. If the data stream is in the middle of a seek, `MA_BUSY` will be\nreturned when trying to read frames.\n\nWhen `ma_resource_manager_data_source_read_pcm_frames()` results in a page getting fully consumed\na job is posted to load the next page. This will be posted from the same thread that called\n`ma_resource_manager_data_source_read_pcm_frames()`.\n\nData streams are uninitialized by posting a job to the queue, but the function won't return until\nthat job has been processed. The reason for this is that the caller owns the data stream object and\ntherefore miniaudio needs to ensure everything completes before handing back control to the caller.\nAlso, if the data stream is uninitialized while pages are in the middle of decoding, they must\ncomplete before destroying any underlying object and the job system handles this cleanly.\n\nNote that when a new page needs to be loaded, a job will be posted to the resource manager's job\nthread from the audio thread. You must keep in mind the details mentioned in the \"Job Queue\"\nsection above regarding locking when posting an event if you require a strictly lock-free audio\nthread.\n\n\n\n7. Node Graph\n=============\nminiaudio's routing infrastructure follows a node graph paradigm. The idea is that you create a\nnode whose outputs are attached to inputs of another node, thereby creating a graph. There are\ndifferent types of nodes, with each node in the graph processing input data to produce output,\nwhich is then fed through the chain. Each node in the graph can apply their own custom effects. At\nthe start of the graph will usually be one or more data source nodes which have no inputs and\ninstead pull their data from a data source. At the end of the graph is an endpoint which represents\nthe end of the chain and is where the final output is ultimately extracted from.\n\nEach node has a number of input buses and a number of output buses. An output bus from a node is\nattached to an input bus of another. Multiple nodes can connect their output buses to another\nnode's input bus, in which case their outputs will be mixed before processing by the node. Below is\na diagram that illustrates a hypothetical node graph setup:\n\n    ```\n    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Data flows left to right >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n\n    +---------------+                              +-----------------+\n    | Data Source 1 =----+    +----------+    +----= Low Pass Filter =----+\n    +---------------+    |    |          =----+    +-----------------+    |    +----------+\n                         +----= Splitter |                                +----= ENDPOINT |\n    +---------------+    |    |          =----+    +-----------------+    |    +----------+\n    | Data Source 2 =----+    +----------+    +----=  Echo / Delay   =----+\n    +---------------+                              +-----------------+\n    ```\n\nIn the above graph, it starts with two data sources whose outputs are attached to the input of a\nsplitter node. It's at this point that the two data sources are mixed. After mixing, the splitter\nperforms it's processing routine and produces two outputs which is simply a duplication of the\ninput stream. One output is attached to a low pass filter, whereas the other output is attached to\na echo/delay. The outputs of the the low pass filter and the echo are attached to the endpoint, and\nsince they're both connected to the same input bus, they'll be mixed.\n\nEach input bus must be configured to accept the same number of channels, but the number of channels\nused by input buses can be different to the number of channels for output buses in which case\nminiaudio will automatically convert the input data to the output channel count before processing.\nThe number of channels of an output bus of one node must match the channel count of the input bus\nit's attached to. The channel counts cannot be changed after the node has been initialized. If you\nattempt to attach an output bus to an input bus with a different channel count, attachment will\nfail.\n\nTo use a node graph, you first need to initialize a `ma_node_graph` object. This is essentially a\ncontainer around the entire graph. The `ma_node_graph` object is required for some thread-safety\nissues which will be explained later. A `ma_node_graph` object is initialized using miniaudio's\nstandard config/init system:\n\n    ```c\n    ma_node_graph_config nodeGraphConfig = ma_node_graph_config_init(myChannelCount);\n\n    result = ma_node_graph_init(&nodeGraphConfig, NULL, &nodeGraph);    // Second parameter is a pointer to allocation callbacks.\n    if (result != MA_SUCCESS) {\n        // Failed to initialize node graph.\n    }\n    ```\n\nWhen you initialize the node graph, you're specifying the channel count of the endpoint. The\nendpoint is a special node which has one input bus and one output bus, both of which have the\nsame channel count, which is specified in the config. Any nodes that connect directly to the\nendpoint must be configured such that their output buses have the same channel count. When you read\naudio data from the node graph, it'll have the channel count you specified in the config. To read\ndata from the graph:\n\n    ```c\n    ma_uint32 framesRead;\n    result = ma_node_graph_read_pcm_frames(&nodeGraph, pFramesOut, frameCount, &framesRead);\n    if (result != MA_SUCCESS) {\n        // Failed to read data from the node graph.\n    }\n    ```\n\nWhen you read audio data, miniaudio starts at the node graph's endpoint node which then pulls in\ndata from it's input attachments, which in turn recursively pull in data from their inputs, and so\non. At the start of the graph there will be some kind of data source node which will have zero\ninputs and will instead read directly from a data source. The base nodes don't literally need to\nread from a `ma_data_source` object, but they will always have some kind of underlying object that\nsources some kind of audio. The `ma_data_source_node` node can be used to read from a\n`ma_data_source`. Data is always in floating-point format and in the number of channels you\nspecified when the graph was initialized. The sample rate is defined by the underlying data sources.\nIt's up to you to ensure they use a consistent and appropriate sample rate.\n\nThe `ma_node` API is designed to allow custom nodes to be implemented with relative ease, but\nminiaudio includes a few stock nodes for common functionality. This is how you would initialize a\nnode which reads directly from a data source (`ma_data_source_node`) which is an example of one\nof the stock nodes that comes with miniaudio:\n\n    ```c\n    ma_data_source_node_config config = ma_data_source_node_config_init(pMyDataSource);\n\n    ma_data_source_node dataSourceNode;\n    result = ma_data_source_node_init(&nodeGraph, &config, NULL, &dataSourceNode);\n    if (result != MA_SUCCESS) {\n        // Failed to create data source node.\n    }\n    ```\n\nThe data source node will use the output channel count to determine the channel count of the output\nbus. There will be 1 output bus and 0 input buses (data will be drawn directly from the data\nsource). The data source must output to floating-point (`ma_format_f32`) or else an error will be\nreturned from `ma_data_source_node_init()`.\n\nBy default the node will not be attached to the graph. To do so, use `ma_node_attach_output_bus()`:\n\n    ```c\n    result = ma_node_attach_output_bus(&dataSourceNode, 0, ma_node_graph_get_endpoint(&nodeGraph), 0);\n    if (result != MA_SUCCESS) {\n        // Failed to attach node.\n    }\n    ```\n\nThe code above connects the data source node directly to the endpoint. Since the data source node\nhas only a single output bus, the index will always be 0. Likewise, the endpoint only has a single\ninput bus which means the input bus index will also always be 0.\n\nTo detach a specific output bus, use `ma_node_detach_output_bus()`. To detach all output buses, use\n`ma_node_detach_all_output_buses()`. If you want to just move the output bus from one attachment to\nanother, you do not need to detach first. You can just call `ma_node_attach_output_bus()` and it'll\ndeal with it for you.\n\nLess frequently you may want to create a specialized node. This will be a node where you implement\nyour own processing callback to apply a custom effect of some kind. This is similar to initializing\none of the stock node types, only this time you need to specify a pointer to a vtable containing a\npointer to the processing function and the number of input and output buses. Example:\n\n    ```c\n    static void my_custom_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n    {\n        // Do some processing of ppFramesIn (one stream of audio data per input bus)\n        const float* pFramesIn_0 = ppFramesIn[0]; // Input bus @ index 0.\n        const float* pFramesIn_1 = ppFramesIn[1]; // Input bus @ index 1.\n        float* pFramesOut_0 = ppFramesOut[0];     // Output bus @ index 0.\n\n        // Do some processing. On input, `pFrameCountIn` will be the number of input frames in each\n        // buffer in `ppFramesIn` and `pFrameCountOut` will be the capacity of each of the buffers\n        // in `ppFramesOut`. On output, `pFrameCountIn` should be set to the number of input frames\n        // your node consumed and `pFrameCountOut` should be set the number of output frames that\n        // were produced.\n        //\n        // You should process as many frames as you can. If your effect consumes input frames at the\n        // same rate as output frames (always the case, unless you're doing resampling), you need\n        // only look at `ppFramesOut` and process that exact number of frames. If you're doing\n        // resampling, you'll need to be sure to set both `pFrameCountIn` and `pFrameCountOut`\n        // properly.\n    }\n\n    static ma_node_vtable my_custom_node_vtable =\n    {\n        my_custom_node_process_pcm_frames, // The function that will be called to process your custom node. This is where you'd implement your effect processing.\n        NULL,   // Optional. A callback for calculating the number of input frames that are required to process a specified number of output frames.\n        2,      // 2 input buses.\n        1,      // 1 output bus.\n        0       // Default flags.\n    };\n\n    ...\n\n    // Each bus needs to have a channel count specified. To do this you need to specify the channel\n    // counts in an array and then pass that into the node config.\n    ma_uint32 inputChannels[2];     // Equal in size to the number of input channels specified in the vtable.\n    ma_uint32 outputChannels[1];    // Equal in size to the number of output channels specified in the vtable.\n\n    inputChannels[0]  = channelsIn;\n    inputChannels[1]  = channelsIn;\n    outputChannels[0] = channelsOut;\n\n    ma_node_config nodeConfig = ma_node_config_init();\n    nodeConfig.vtable          = &my_custom_node_vtable;\n    nodeConfig.pInputChannels  = inputChannels;\n    nodeConfig.pOutputChannels = outputChannels;\n\n    ma_node_base node;\n    result = ma_node_init(&nodeGraph, &nodeConfig, NULL, &node);\n    if (result != MA_SUCCESS) {\n        // Failed to initialize node.\n    }\n    ```\n\nWhen initializing a custom node, as in the code above, you'll normally just place your vtable in\nstatic space. The number of input and output buses are specified as part of the vtable. If you need\na variable number of buses on a per-node bases, the vtable should have the relevant bus count set\nto `MA_NODE_BUS_COUNT_UNKNOWN`. In this case, the bus count should be set in the node config:\n\n    ```c\n    static ma_node_vtable my_custom_node_vtable =\n    {\n        my_custom_node_process_pcm_frames, // The function that will be called process your custom node. This is where you'd implement your effect processing.\n        NULL,   // Optional. A callback for calculating the number of input frames that are required to process a specified number of output frames.\n        MA_NODE_BUS_COUNT_UNKNOWN,  // The number of input buses is determined on a per-node basis.\n        1,      // 1 output bus.\n        0       // Default flags.\n    };\n\n    ...\n\n    ma_node_config nodeConfig = ma_node_config_init();\n    nodeConfig.vtable          = &my_custom_node_vtable;\n    nodeConfig.inputBusCount   = myBusCount;        // <-- Since the vtable specifies MA_NODE_BUS_COUNT_UNKNOWN, the input bus count should be set here.\n    nodeConfig.pInputChannels  = inputChannels;     // <-- Make sure there are nodeConfig.inputBusCount elements in this array.\n    nodeConfig.pOutputChannels = outputChannels;    // <-- The vtable specifies 1 output bus, so there must be 1 element in this array.\n    ```\n\nIn the above example it's important to never set the `inputBusCount` and `outputBusCount` members\nto anything other than their defaults if the vtable specifies an explicit count. They can only be\nset if the vtable specifies MA_NODE_BUS_COUNT_UNKNOWN in the relevant bus count.\n\nMost often you'll want to create a structure to encapsulate your node with some extra data. You\nneed to make sure the `ma_node_base` object is your first member of the structure:\n\n    ```c\n    typedef struct\n    {\n        ma_node_base base; // <-- Make sure this is always the first member.\n        float someCustomData;\n    } my_custom_node;\n    ```\n\nBy doing this, your object will be compatible with all `ma_node` APIs and you can attach it to the\ngraph just like any other node.\n\nIn the custom processing callback (`my_custom_node_process_pcm_frames()` in the example above), the\nnumber of channels for each bus is what was specified by the config when the node was initialized\nwith `ma_node_init()`. In addition, all attachments to each of the input buses will have been\npre-mixed by miniaudio. The config allows you to specify different channel counts for each\nindividual input and output bus. It's up to the effect to handle it appropriate, and if it can't,\nreturn an error in it's initialization routine.\n\nCustom nodes can be assigned some flags to describe their behaviour. These are set via the vtable\nand include the following:\n\n    +-----------------------------------------+---------------------------------------------------+\n    | Flag Name                               | Description                                       |\n    +-----------------------------------------+---------------------------------------------------+\n    | MA_NODE_FLAG_PASSTHROUGH                | Useful for nodes that do not do any kind of audio |\n    |                                         | processing, but are instead used for tracking     |\n    |                                         | time, handling events, etc. Also used by the      |\n    |                                         | internal endpoint node. It reads directly from    |\n    |                                         | the input bus to the output bus. Nodes with this  |\n    |                                         | flag must have exactly 1 input bus and 1 output   |\n    |                                         | bus, and both buses must have the same channel    |\n    |                                         | counts.                                           |\n    +-----------------------------------------+---------------------------------------------------+\n    | MA_NODE_FLAG_CONTINUOUS_PROCESSING      | Causes the processing callback to be called even  |\n    |                                         | when no data is available to be read from input   |\n    |                                         | attachments. When a node has at least one input   |\n    |                                         | bus, but there are no inputs attached or the      |\n    |                                         | inputs do not deliver any data, the node's        |\n    |                                         | processing callback will not get fired. This flag |\n    |                                         | will make it so the callback is always fired      |\n    |                                         | regardless of whether or not any input data is    |\n    |                                         | received. This is useful for effects like         |\n    |                                         | echos where there will be a tail of audio data    |\n    |                                         | that still needs to be processed even when the    |\n    |                                         | original data sources have reached their ends. It |\n    |                                         | may also be useful for nodes that must always     |\n    |                                         | have their processing callback fired when there   |\n    |                                         | are no inputs attached.                           |\n    +-----------------------------------------+---------------------------------------------------+\n    | MA_NODE_FLAG_ALLOW_NULL_INPUT           | Used in conjunction with                          |\n    |                                         | `MA_NODE_FLAG_CONTINUOUS_PROCESSING`. When this   |\n    |                                         | is set, the `ppFramesIn` parameter of the         |\n    |                                         | processing callback will be set to NULL when      |\n    |                                         | there are no input frames are available. When     |\n    |                                         | this is unset, silence will be posted to the      |\n    |                                         | processing callback.                              |\n    +-----------------------------------------+---------------------------------------------------+\n    | MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES | Used to tell miniaudio that input and output      |\n    |                                         | frames are processed at different rates. You      |\n    |                                         | should set this for any nodes that perform        |\n    |                                         | resampling.                                       |\n    +-----------------------------------------+---------------------------------------------------+\n    | MA_NODE_FLAG_SILENT_OUTPUT              | Used to tell miniaudio that a node produces only  |\n    |                                         | silent output. This is useful for nodes where you |\n    |                                         | don't want the output to contribute to the final  |\n    |                                         | mix. An example might be if you want split your   |\n    |                                         | stream and have one branch be output to a file.   |\n    |                                         | When using this flag, you should avoid writing to |\n    |                                         | the output buffer of the node's processing        |\n    |                                         | callback because miniaudio will ignore it anyway. |\n    +-----------------------------------------+---------------------------------------------------+\n\n\nIf you need to make a copy of an audio stream for effect processing you can use a splitter node\ncalled `ma_splitter_node`. This takes has 1 input bus and splits the stream into 2 output buses.\nYou can use it like this:\n\n    ```c\n    ma_splitter_node_config splitterNodeConfig = ma_splitter_node_config_init(channels);\n\n    ma_splitter_node splitterNode;\n    result = ma_splitter_node_init(&nodeGraph, &splitterNodeConfig, NULL, &splitterNode);\n    if (result != MA_SUCCESS) {\n        // Failed to create node.\n    }\n\n    // Attach your output buses to two different input buses (can be on two different nodes).\n    ma_node_attach_output_bus(&splitterNode, 0, ma_node_graph_get_endpoint(&nodeGraph), 0); // Attach directly to the endpoint.\n    ma_node_attach_output_bus(&splitterNode, 1, &myEffectNode,                          0); // Attach to input bus 0 of some effect node.\n    ```\n\nThe volume of an output bus can be configured on a per-bus basis:\n\n    ```c\n    ma_node_set_output_bus_volume(&splitterNode, 0, 0.5f);\n    ma_node_set_output_bus_volume(&splitterNode, 1, 0.5f);\n    ```\n\nIn the code above we're using the splitter node from before and changing the volume of each of the\ncopied streams.\n\nYou can start and stop a node with the following:\n\n    ```c\n    ma_node_set_state(&splitterNode, ma_node_state_started);    // The default state.\n    ma_node_set_state(&splitterNode, ma_node_state_stopped);\n    ```\n\nBy default the node is in a started state, but since it won't be connected to anything won't\nactually be invoked by the node graph until it's connected. When you stop a node, data will not be\nread from any of it's input connections. You can use this property to stop a group of sounds\natomically.\n\nYou can configure the initial state of a node in it's config:\n\n    ```c\n    nodeConfig.initialState = ma_node_state_stopped;\n    ```\n\nNote that for the stock specialized nodes, all of their configs will have a `nodeConfig` member\nwhich is the config to use with the base node. This is where the initial state can be configured\nfor specialized nodes:\n\n    ```c\n    dataSourceNodeConfig.nodeConfig.initialState = ma_node_state_stopped;\n    ```\n\nWhen using a specialized node like `ma_data_source_node` or `ma_splitter_node`, be sure to not\nmodify the `vtable` member of the `nodeConfig` object.\n\n\n7.1. Timing\n-----------\nThe node graph supports starting and stopping nodes at scheduled times. This is especially useful\nfor data source nodes where you want to get the node set up, but only start playback at a specific\ntime. There are two clocks: local and global.\n\nA local clock is per-node, whereas the global clock is per graph. Scheduling starts and stops can\nonly be done based on the global clock because the local clock will not be running while the node\nis stopped. The global clocks advances whenever `ma_node_graph_read_pcm_frames()` is called. On the\nother hand, the local clock only advances when the node's processing callback is fired, and is\nadvanced based on the output frame count.\n\nTo retrieve the global time, use `ma_node_graph_get_time()`. The global time can be set with\n`ma_node_graph_set_time()` which might be useful if you want to do seeking on a global timeline.\nGetting and setting the local time is similar. Use `ma_node_get_time()` to retrieve the local time,\nand `ma_node_set_time()` to set the local time. The global and local times will be advanced by the\naudio thread, so care should be taken to avoid data races. Ideally you should avoid calling these\noutside of the node processing callbacks which are always run on the audio thread.\n\nThere is basic support for scheduling the starting and stopping of nodes. You can only schedule one\nstart and one stop at a time. This is mainly intended for putting nodes into a started or stopped\nstate in a frame-exact manner. Without this mechanism, starting and stopping of a node is limited\nto the resolution of a call to `ma_node_graph_read_pcm_frames()` which would typically be in blocks\nof several milliseconds. The following APIs can be used for scheduling node states:\n\n    ```c\n    ma_node_set_state_time()\n    ma_node_get_state_time()\n    ```\n\nThe time is absolute and must be based on the global clock. An example is below:\n\n    ```c\n    ma_node_set_state_time(&myNode, ma_node_state_started, sampleRate*1);   // Delay starting to 1 second.\n    ma_node_set_state_time(&myNode, ma_node_state_stopped, sampleRate*5);   // Delay stopping to 5 seconds.\n    ```\n\nAn example for changing the state using a relative time.\n\n    ```c\n    ma_node_set_state_time(&myNode, ma_node_state_started, sampleRate*1 + ma_node_graph_get_time(&myNodeGraph));\n    ma_node_set_state_time(&myNode, ma_node_state_stopped, sampleRate*5 + ma_node_graph_get_time(&myNodeGraph));\n    ```\n\nNote that due to the nature of multi-threading the times may not be 100% exact. If this is an\nissue, consider scheduling state changes from within a processing callback. An idea might be to\nhave some kind of passthrough trigger node that is used specifically for tracking time and handling\nevents.\n\n\n\n7.2. Thread Safety and Locking\n------------------------------\nWhen processing audio, it's ideal not to have any kind of locking in the audio thread. Since it's\nexpected that `ma_node_graph_read_pcm_frames()` would be run on the audio thread, it does so\nwithout the use of any locks. This section discusses the implementation used by miniaudio and goes\nover some of the compromises employed by miniaudio to achieve this goal. Note that the current\nimplementation may not be ideal - feedback and critiques are most welcome.\n\nThe node graph API is not *entirely* lock-free. Only `ma_node_graph_read_pcm_frames()` is expected\nto be lock-free. Attachment, detachment and uninitialization of nodes use locks to simplify the\nimplementation, but are crafted in a way such that such locking is not required when reading audio\ndata from the graph. Locking in these areas are achieved by means of spinlocks.\n\nThe main complication with keeping `ma_node_graph_read_pcm_frames()` lock-free stems from the fact\nthat a node can be uninitialized, and it's memory potentially freed, while in the middle of being\nprocessed on the audio thread. There are times when the audio thread will be referencing a node,\nwhich means the uninitialization process of a node needs to make sure it delays returning until the\naudio thread is finished so that control is not handed back to the caller thereby giving them a\nchance to free the node's memory.\n\nWhen the audio thread is processing a node, it does so by reading from each of the output buses of\nthe node. In order for a node to process data for one of it's output buses, it needs to read from\neach of it's input buses, and so on an so forth. It follows that once all output buses of a node\nare detached, the node as a whole will be disconnected and no further processing will occur unless\nit's output buses are reattached, which won't be happening when the node is being uninitialized.\nBy having `ma_node_detach_output_bus()` wait until the audio thread is finished with it, we can\nsimplify a few things, at the expense of making `ma_node_detach_output_bus()` a bit slower. By\ndoing this, the implementation of `ma_node_uninit()` becomes trivial - just detach all output\nnodes, followed by each of the attachments to each of it's input nodes, and then do any final clean\nup.\n\nWith the above design, the worst-case scenario is `ma_node_detach_output_bus()` taking as long as\nit takes to process the output bus being detached. This will happen if it's called at just the\nwrong moment where the audio thread has just iterated it and has just started processing. The\ncaller of `ma_node_detach_output_bus()` will stall until the audio thread is finished, which\nincludes the cost of recursively processing it's inputs. This is the biggest compromise made with\nthe approach taken by miniaudio for it's lock-free processing system. The cost of detaching nodes\nearlier in the pipeline (data sources, for example) will be cheaper than the cost of detaching\nhigher level nodes, such as some kind of final post-processing endpoint. If you need to do mass\ndetachments, detach starting from the lowest level nodes and work your way towards the final\nendpoint node (but don't try detaching the node graph's endpoint). If the audio thread is not\nrunning, detachment will be fast and detachment in any order will be the same. The reason nodes\nneed to wait for their input attachments to complete is due to the potential for desyncs between\ndata sources. If the node was to terminate processing mid way through processing it's inputs,\nthere's a chance that some of the underlying data sources will have been read, but then others not.\nThat will then result in a potential desynchronization when detaching and reattaching higher-level\nnodes. A possible solution to this is to have an option when detaching to terminate processing\nbefore processing all input attachments which should be fairly simple.\n\nAnother compromise, albeit less significant, is locking when attaching and detaching nodes. This\nlocking is achieved by means of a spinlock in order to reduce memory overhead. A lock is present\nfor each input bus and output bus. When an output bus is connected to an input bus, both the output\nbus and input bus is locked. This locking is specifically for attaching and detaching across\ndifferent threads and does not affect `ma_node_graph_read_pcm_frames()` in any way. The locking and\nunlocking is mostly self-explanatory, but a slightly less intuitive aspect comes into it when\nconsidering that iterating over attachments must not break as a result of attaching or detaching a\nnode while iteration is occurring.\n\nAttaching and detaching are both quite simple. When an output bus of a node is attached to an input\nbus of another node, it's added to a linked list. Basically, an input bus is a linked list, where\neach item in the list is and output bus. We have some intentional (and convenient) restrictions on\nwhat can done with the linked list in order to simplify the implementation. First of all, whenever\nsomething needs to iterate over the list, it must do so in a forward direction. Backwards iteration\nis not supported. Also, items can only be added to the start of the list.\n\nThe linked list is a doubly-linked list where each item in the list (an output bus) holds a pointer\nto the next item in the list, and another to the previous item. A pointer to the previous item is\nonly required for fast detachment of the node - it is never used in iteration. This is an\nimportant property because it means from the perspective of iteration, attaching and detaching of\nan item can be done with a single atomic assignment. This is exploited by both the attachment and\ndetachment process. When attaching the node, the first thing that is done is the setting of the\nlocal \"next\" and \"previous\" pointers of the node. After that, the item is \"attached\" to the list\nby simply performing an atomic exchange with the head pointer. After that, the node is \"attached\"\nto the list from the perspective of iteration. Even though the \"previous\" pointer of the next item\nhasn't yet been set, from the perspective of iteration it's been attached because iteration will\nonly be happening in a forward direction which means the \"previous\" pointer won't actually ever get\nused. The same general process applies to detachment. See `ma_node_attach_output_bus()` and\n`ma_node_detach_output_bus()` for the implementation of this mechanism.\n\n\n\n8. Decoding\n===========\nThe `ma_decoder` API is used for reading audio files. Decoders are completely decoupled from\ndevices and can be used independently. Built-in support is included for the following formats:\n\n    +---------+\n    | Format  |\n    +---------+\n    | WAV     |\n    | MP3     |\n    | FLAC    |\n    +---------+\n\nYou can disable the built-in decoders by specifying one or more of the following options before the\nminiaudio implementation:\n\n    ```c\n    #define MA_NO_WAV\n    #define MA_NO_MP3\n    #define MA_NO_FLAC\n    ```\n\nminiaudio supports the ability to plug in custom decoders. See the section below for details on how\nto use custom decoders.\n\nA decoder can be initialized from a file with `ma_decoder_init_file()`, a block of memory with\n`ma_decoder_init_memory()`, or from data delivered via callbacks with `ma_decoder_init()`. Here is\nan example for loading a decoder from a file:\n\n    ```c\n    ma_decoder decoder;\n    ma_result result = ma_decoder_init_file(\"MySong.mp3\", NULL, &decoder);\n    if (result != MA_SUCCESS) {\n        return false;   // An error occurred.\n    }\n\n    ...\n\n    ma_decoder_uninit(&decoder);\n    ```\n\nWhen initializing a decoder, you can optionally pass in a pointer to a `ma_decoder_config` object\n(the `NULL` argument in the example above) which allows you to configure the output format, channel\ncount, sample rate and channel map:\n\n    ```c\n    ma_decoder_config config = ma_decoder_config_init(ma_format_f32, 2, 48000);\n    ```\n\nWhen passing in `NULL` for decoder config in `ma_decoder_init*()`, the output format will be the\nsame as that defined by the decoding backend.\n\nData is read from the decoder as PCM frames. This will output the number of PCM frames actually\nread. If this is less than the requested number of PCM frames it means you've reached the end. The\nreturn value will be `MA_AT_END` if no samples have been read and the end has been reached.\n\n    ```c\n    ma_result result = ma_decoder_read_pcm_frames(pDecoder, pFrames, framesToRead, &framesRead);\n    if (framesRead < framesToRead) {\n        // Reached the end.\n    }\n    ```\n\nYou can also seek to a specific frame like so:\n\n    ```c\n    ma_result result = ma_decoder_seek_to_pcm_frame(pDecoder, targetFrame);\n    if (result != MA_SUCCESS) {\n        return false;   // An error occurred.\n    }\n    ```\n\nIf you want to loop back to the start, you can simply seek back to the first PCM frame:\n\n    ```c\n    ma_decoder_seek_to_pcm_frame(pDecoder, 0);\n    ```\n\nWhen loading a decoder, miniaudio uses a trial and error technique to find the appropriate decoding\nbackend. This can be unnecessarily inefficient if the type is already known. In this case you can\nuse `encodingFormat` variable in the device config to specify a specific encoding format you want\nto decode:\n\n    ```c\n    decoderConfig.encodingFormat = ma_encoding_format_wav;\n    ```\n\nSee the `ma_encoding_format` enum for possible encoding formats.\n\nThe `ma_decoder_init_file()` API will try using the file extension to determine which decoding\nbackend to prefer.\n\n\n8.1. Custom Decoders\n--------------------\nIt's possible to implement a custom decoder and plug it into miniaudio. This is extremely useful\nwhen you want to use the `ma_decoder` API, but need to support an encoding format that's not one of\nthe stock formats supported by miniaudio. This can be put to particularly good use when using the\n`ma_engine` and/or `ma_resource_manager` APIs because they use `ma_decoder` internally. If, for\nexample, you wanted to support Opus, you can do so with a custom decoder (there if a reference\nOpus decoder in the \"extras\" folder of the miniaudio repository which uses libopus + libopusfile).\n\nA custom decoder must implement a data source. A vtable called `ma_decoding_backend_vtable` needs\nto be implemented which is then passed into the decoder config:\n\n    ```c\n    ma_decoding_backend_vtable* pCustomBackendVTables[] =\n    {\n        &g_ma_decoding_backend_vtable_libvorbis,\n        &g_ma_decoding_backend_vtable_libopus\n    };\n\n    ...\n\n    decoderConfig = ma_decoder_config_init_default();\n    decoderConfig.pCustomBackendUserData = NULL;\n    decoderConfig.ppCustomBackendVTables = pCustomBackendVTables;\n    decoderConfig.customBackendCount     = sizeof(pCustomBackendVTables) / sizeof(pCustomBackendVTables[0]);\n    ```\n\nThe `ma_decoding_backend_vtable` vtable has the following functions:\n\n    ```\n    onInit\n    onInitFile\n    onInitFileW\n    onInitMemory\n    onUninit\n    ```\n\nThere are only two functions that must be implemented - `onInit` and `onUninit`. The other\nfunctions can be implemented for a small optimization for loading from a file path or memory. If\nthese are not specified, miniaudio will deal with it for you via a generic implementation.\n\nWhen you initialize a custom data source (by implementing the `onInit` function in the vtable) you\nwill need to output a pointer to a `ma_data_source` which implements your custom decoder. See the\nsection about data sources for details on how to implement this. Alternatively, see the\n\"custom_decoders\" example in the miniaudio repository.\n\nThe `onInit` function takes a pointer to some callbacks for the purpose of reading raw audio data\nfrom some arbitrary source. You'll use these functions to read from the raw data and perform the\ndecoding. When you call them, you will pass in the `pReadSeekTellUserData` pointer to the relevant\nparameter.\n\nThe `pConfig` parameter in `onInit` can be used to configure the backend if appropriate. It's only\nused as a hint and can be ignored. However, if any of the properties are relevant to your decoder,\nan optimal implementation will handle the relevant properties appropriately.\n\nIf memory allocation is required, it should be done so via the specified allocation callbacks if\npossible (the `pAllocationCallbacks` parameter).\n\nIf an error occurs when initializing the decoder, you should leave `ppBackend` unset, or set to\nNULL, and make sure everything is cleaned up appropriately and an appropriate result code returned.\nWhen multiple custom backends are specified, miniaudio will cycle through the vtables in the order\nthey're listed in the array that's passed into the decoder config so it's important that your\ninitialization routine is clean.\n\nWhen a decoder is uninitialized, the `onUninit` callback will be fired which will give you an\nopportunity to clean up and internal data.\n\n\n\n9. Encoding\n===========\nThe `ma_encoding` API is used for writing audio files. The only supported output format is WAV.\nThis can be disabled by specifying the following option before the implementation of miniaudio:\n\n    ```c\n    #define MA_NO_WAV\n    ```\n\nAn encoder can be initialized to write to a file with `ma_encoder_init_file()` or from data\ndelivered via callbacks with `ma_encoder_init()`. Below is an example for initializing an encoder\nto output to a file.\n\n    ```c\n    ma_encoder_config config = ma_encoder_config_init(ma_encoding_format_wav, FORMAT, CHANNELS, SAMPLE_RATE);\n    ma_encoder encoder;\n    ma_result result = ma_encoder_init_file(\"my_file.wav\", &config, &encoder);\n    if (result != MA_SUCCESS) {\n        // Error\n    }\n\n    ...\n\n    ma_encoder_uninit(&encoder);\n    ```\n\nWhen initializing an encoder you must specify a config which is initialized with\n`ma_encoder_config_init()`. Here you must specify the file type, the output sample format, output\nchannel count and output sample rate. The following file types are supported:\n\n    +------------------------+-------------+\n    | Enum                   | Description |\n    +------------------------+-------------+\n    | ma_encoding_format_wav | WAV         |\n    +------------------------+-------------+\n\nIf the format, channel count or sample rate is not supported by the output file type an error will\nbe returned. The encoder will not perform data conversion so you will need to convert it before\noutputting any audio data. To output audio data, use `ma_encoder_write_pcm_frames()`, like in the\nexample below:\n\n    ```c\n    ma_uint64 framesWritten;\n    result = ma_encoder_write_pcm_frames(&encoder, pPCMFramesToWrite, framesToWrite, &framesWritten);\n    if (result != MA_SUCCESS) {\n        ... handle error ...\n    }\n    ```\n\nThe `framesWritten` variable will contain the number of PCM frames that were actually written. This\nis optionally and you can pass in `NULL` if you need this.\n\nEncoders must be uninitialized with `ma_encoder_uninit()`.\n\n\n\n10. Data Conversion\n===================\nA data conversion API is included with miniaudio which supports the majority of data conversion\nrequirements. This supports conversion between sample formats, channel counts (with channel\nmapping) and sample rates.\n\n\n10.1. Sample Format Conversion\n------------------------------\nConversion between sample formats is achieved with the `ma_pcm_*_to_*()`, `ma_pcm_convert()` and\n`ma_convert_pcm_frames_format()` APIs. Use `ma_pcm_*_to_*()` to convert between two specific\nformats. Use `ma_pcm_convert()` to convert based on a `ma_format` variable. Use\n`ma_convert_pcm_frames_format()` to convert PCM frames where you want to specify the frame count\nand channel count as a variable instead of the total sample count.\n\n\n10.1.1. Dithering\n-----------------\nDithering can be set using the ditherMode parameter.\n\nThe different dithering modes include the following, in order of efficiency:\n\n    +-----------+--------------------------+\n    | Type      | Enum Token               |\n    +-----------+--------------------------+\n    | None      | ma_dither_mode_none      |\n    | Rectangle | ma_dither_mode_rectangle |\n    | Triangle  | ma_dither_mode_triangle  |\n    +-----------+--------------------------+\n\nNote that even if the dither mode is set to something other than `ma_dither_mode_none`, it will be\nignored for conversions where dithering is not needed. Dithering is available for the following\nconversions:\n\n    ```\n    s16 -> u8\n    s24 -> u8\n    s32 -> u8\n    f32 -> u8\n    s24 -> s16\n    s32 -> s16\n    f32 -> s16\n    ```\n\nNote that it is not an error to pass something other than ma_dither_mode_none for conversions where\ndither is not used. It will just be ignored.\n\n\n\n10.2. Channel Conversion\n------------------------\nChannel conversion is used for channel rearrangement and conversion from one channel count to\nanother. The `ma_channel_converter` API is used for channel conversion. Below is an example of\ninitializing a simple channel converter which converts from mono to stereo.\n\n    ```c\n    ma_channel_converter_config config = ma_channel_converter_config_init(\n        ma_format,                      // Sample format\n        1,                              // Input channels\n        NULL,                           // Input channel map\n        2,                              // Output channels\n        NULL,                           // Output channel map\n        ma_channel_mix_mode_default);   // The mixing algorithm to use when combining channels.\n\n    result = ma_channel_converter_init(&config, NULL, &converter);\n    if (result != MA_SUCCESS) {\n        // Error.\n    }\n    ```\n\nTo perform the conversion simply call `ma_channel_converter_process_pcm_frames()` like so:\n\n    ```c\n    ma_result result = ma_channel_converter_process_pcm_frames(&converter, pFramesOut, pFramesIn, frameCount);\n    if (result != MA_SUCCESS) {\n        // Error.\n    }\n    ```\n\nIt is up to the caller to ensure the output buffer is large enough to accommodate the new PCM\nframes.\n\nInput and output PCM frames are always interleaved. Deinterleaved layouts are not supported.\n\n\n10.2.1. Channel Mapping\n-----------------------\nIn addition to converting from one channel count to another, like the example above, the channel\nconverter can also be used to rearrange channels. When initializing the channel converter, you can\noptionally pass in channel maps for both the input and output frames. If the channel counts are the\nsame, and each channel map contains the same channel positions with the exception that they're in\na different order, a simple shuffling of the channels will be performed. If, however, there is not\na 1:1 mapping of channel positions, or the channel counts differ, the input channels will be mixed\nbased on a mixing mode which is specified when initializing the `ma_channel_converter_config`\nobject.\n\nWhen converting from mono to multi-channel, the mono channel is simply copied to each output\nchannel. When going the other way around, the audio of each output channel is simply averaged and\ncopied to the mono channel.\n\nIn more complicated cases blending is used. The `ma_channel_mix_mode_simple` mode will drop excess\nchannels and silence extra channels. For example, converting from 4 to 2 channels, the 3rd and 4th\nchannels will be dropped, whereas converting from 2 to 4 channels will put silence into the 3rd and\n4th channels.\n\nThe `ma_channel_mix_mode_rectangle` mode uses spacial locality based on a rectangle to compute a\nsimple distribution between input and output. Imagine sitting in the middle of a room, with\nspeakers on the walls representing channel positions. The `MA_CHANNEL_FRONT_LEFT` position can be\nthought of as being in the corner of the front and left walls.\n\nFinally, the `ma_channel_mix_mode_custom_weights` mode can be used to use custom user-defined\nweights. Custom weights can be passed in as the last parameter of\n`ma_channel_converter_config_init()`.\n\nPredefined channel maps can be retrieved with `ma_channel_map_init_standard()`. This takes a\n`ma_standard_channel_map` enum as it's first parameter, which can be one of the following:\n\n    +-----------------------------------+-----------------------------------------------------------+\n    | Name                              | Description                                               |\n    +-----------------------------------+-----------------------------------------------------------+\n    | ma_standard_channel_map_default   | Default channel map used by miniaudio. See below.         |\n    | ma_standard_channel_map_microsoft | Channel map used by Microsoft's bitfield channel maps.    |\n    | ma_standard_channel_map_alsa      | Default ALSA channel map.                                 |\n    | ma_standard_channel_map_rfc3551   | RFC 3551. Based on AIFF.                                  |\n    | ma_standard_channel_map_flac      | FLAC channel map.                                         |\n    | ma_standard_channel_map_vorbis    | Vorbis channel map.                                       |\n    | ma_standard_channel_map_sound4    | FreeBSD's sound(4).                                       |\n    | ma_standard_channel_map_sndio     | sndio channel map. http://www.sndio.org/tips.html.        |\n    | ma_standard_channel_map_webaudio  | https://webaudio.github.io/web-audio-api/#ChannelOrdering |\n    +-----------------------------------+-----------------------------------------------------------+\n\nBelow are the channel maps used by default in miniaudio (`ma_standard_channel_map_default`):\n\n    +---------------+---------------------------------+\n    | Channel Count | Mapping                         |\n    +---------------+---------------------------------+\n    | 1 (Mono)      | 0: MA_CHANNEL_MONO              |\n    +---------------+---------------------------------+\n    | 2 (Stereo)    | 0: MA_CHANNEL_FRONT_LEFT   <br> |\n    |               | 1: MA_CHANNEL_FRONT_RIGHT       |\n    +---------------+---------------------------------+\n    | 3             | 0: MA_CHANNEL_FRONT_LEFT   <br> |\n    |               | 1: MA_CHANNEL_FRONT_RIGHT  <br> |\n    |               | 2: MA_CHANNEL_FRONT_CENTER      |\n    +---------------+---------------------------------+\n    | 4 (Surround)  | 0: MA_CHANNEL_FRONT_LEFT   <br> |\n    |               | 1: MA_CHANNEL_FRONT_RIGHT  <br> |\n    |               | 2: MA_CHANNEL_FRONT_CENTER <br> |\n    |               | 3: MA_CHANNEL_BACK_CENTER       |\n    +---------------+---------------------------------+\n    | 5             | 0: MA_CHANNEL_FRONT_LEFT   <br> |\n    |               | 1: MA_CHANNEL_FRONT_RIGHT  <br> |\n    |               | 2: MA_CHANNEL_FRONT_CENTER <br> |\n    |               | 3: MA_CHANNEL_BACK_LEFT    <br> |\n    |               | 4: MA_CHANNEL_BACK_RIGHT        |\n    +---------------+---------------------------------+\n    | 6 (5.1)       | 0: MA_CHANNEL_FRONT_LEFT   <br> |\n    |               | 1: MA_CHANNEL_FRONT_RIGHT  <br> |\n    |               | 2: MA_CHANNEL_FRONT_CENTER <br> |\n    |               | 3: MA_CHANNEL_LFE          <br> |\n    |               | 4: MA_CHANNEL_SIDE_LEFT    <br> |\n    |               | 5: MA_CHANNEL_SIDE_RIGHT        |\n    +---------------+---------------------------------+\n    | 7             | 0: MA_CHANNEL_FRONT_LEFT   <br> |\n    |               | 1: MA_CHANNEL_FRONT_RIGHT  <br> |\n    |               | 2: MA_CHANNEL_FRONT_CENTER <br> |\n    |               | 3: MA_CHANNEL_LFE          <br> |\n    |               | 4: MA_CHANNEL_BACK_CENTER  <br> |\n    |               | 4: MA_CHANNEL_SIDE_LEFT    <br> |\n    |               | 5: MA_CHANNEL_SIDE_RIGHT        |\n    +---------------+---------------------------------+\n    | 8 (7.1)       | 0: MA_CHANNEL_FRONT_LEFT   <br> |\n    |               | 1: MA_CHANNEL_FRONT_RIGHT  <br> |\n    |               | 2: MA_CHANNEL_FRONT_CENTER <br> |\n    |               | 3: MA_CHANNEL_LFE          <br> |\n    |               | 4: MA_CHANNEL_BACK_LEFT    <br> |\n    |               | 5: MA_CHANNEL_BACK_RIGHT   <br> |\n    |               | 6: MA_CHANNEL_SIDE_LEFT    <br> |\n    |               | 7: MA_CHANNEL_SIDE_RIGHT        |\n    +---------------+---------------------------------+\n    | Other         | All channels set to 0. This     |\n    |               | is equivalent to the same       |\n    |               | mapping as the device.          |\n    +---------------+---------------------------------+\n\n\n\n10.3. Resampling\n----------------\nResampling is achieved with the `ma_resampler` object. To create a resampler object, do something\nlike the following:\n\n    ```c\n    ma_resampler_config config = ma_resampler_config_init(\n        ma_format_s16,\n        channels,\n        sampleRateIn,\n        sampleRateOut,\n        ma_resample_algorithm_linear);\n\n    ma_resampler resampler;\n    ma_result result = ma_resampler_init(&config, &resampler);\n    if (result != MA_SUCCESS) {\n        // An error occurred...\n    }\n    ```\n\nDo the following to uninitialize the resampler:\n\n    ```c\n    ma_resampler_uninit(&resampler);\n    ```\n\nThe following example shows how data can be processed\n\n    ```c\n    ma_uint64 frameCountIn  = 1000;\n    ma_uint64 frameCountOut = 2000;\n    ma_result result = ma_resampler_process_pcm_frames(&resampler, pFramesIn, &frameCountIn, pFramesOut, &frameCountOut);\n    if (result != MA_SUCCESS) {\n        // An error occurred...\n    }\n\n    // At this point, frameCountIn contains the number of input frames that were consumed and frameCountOut contains the\n    // number of output frames written.\n    ```\n\nTo initialize the resampler you first need to set up a config (`ma_resampler_config`) with\n`ma_resampler_config_init()`. You need to specify the sample format you want to use, the number of\nchannels, the input and output sample rate, and the algorithm.\n\nThe sample format can be either `ma_format_s16` or `ma_format_f32`. If you need a different format\nyou will need to perform pre- and post-conversions yourself where necessary. Note that the format\nis the same for both input and output. The format cannot be changed after initialization.\n\nThe resampler supports multiple channels and is always interleaved (both input and output). The\nchannel count cannot be changed after initialization.\n\nThe sample rates can be anything other than zero, and are always specified in hertz. They should be\nset to something like 44100, etc. The sample rate is the only configuration property that can be\nchanged after initialization.\n\nThe miniaudio resampler has built-in support for the following algorithms:\n\n    +-----------+------------------------------+\n    | Algorithm | Enum Token                   |\n    +-----------+------------------------------+\n    | Linear    | ma_resample_algorithm_linear |\n    | Custom    | ma_resample_algorithm_custom |\n    +-----------+------------------------------+\n\nThe algorithm cannot be changed after initialization.\n\nProcessing always happens on a per PCM frame basis and always assumes interleaved input and output.\nDe-interleaved processing is not supported. To process frames, use\n`ma_resampler_process_pcm_frames()`. On input, this function takes the number of output frames you\ncan fit in the output buffer and the number of input frames contained in the input buffer. On\noutput these variables contain the number of output frames that were written to the output buffer\nand the number of input frames that were consumed in the process. You can pass in NULL for the\ninput buffer in which case it will be treated as an infinitely large buffer of zeros. The output\nbuffer can also be NULL, in which case the processing will be treated as seek.\n\nThe sample rate can be changed dynamically on the fly. You can change this with explicit sample\nrates with `ma_resampler_set_rate()` and also with a decimal ratio with\n`ma_resampler_set_rate_ratio()`. The ratio is in/out.\n\nSometimes it's useful to know exactly how many input frames will be required to output a specific\nnumber of frames. You can calculate this with `ma_resampler_get_required_input_frame_count()`.\nLikewise, it's sometimes useful to know exactly how many frames would be output given a certain\nnumber of input frames. You can do this with `ma_resampler_get_expected_output_frame_count()`.\n\nDue to the nature of how resampling works, the resampler introduces some latency. This can be\nretrieved in terms of both the input rate and the output rate with\n`ma_resampler_get_input_latency()` and `ma_resampler_get_output_latency()`.\n\n\n10.3.1. Resampling Algorithms\n-----------------------------\nThe choice of resampling algorithm depends on your situation and requirements.\n\n\n10.3.1.1. Linear Resampling\n---------------------------\nThe linear resampler is the fastest, but comes at the expense of poorer quality. There is, however,\nsome control over the quality of the linear resampler which may make it a suitable option depending\non your requirements.\n\nThe linear resampler performs low-pass filtering before or after downsampling or upsampling,\ndepending on the sample rates you're converting between. When decreasing the sample rate, the\nlow-pass filter will be applied before downsampling. When increasing the rate it will be performed\nafter upsampling. By default a fourth order low-pass filter will be applied. This can be configured\nvia the `lpfOrder` configuration variable. Setting this to 0 will disable filtering.\n\nThe low-pass filter has a cutoff frequency which defaults to half the sample rate of the lowest of\nthe input and output sample rates (Nyquist Frequency).\n\nThe API for the linear resampler is the same as the main resampler API, only it's called\n`ma_linear_resampler`.\n\n\n10.3.2. Custom Resamplers\n-------------------------\nYou can implement a custom resampler by using the `ma_resample_algorithm_custom` resampling\nalgorithm and setting a vtable in the resampler config:\n\n    ```c\n    ma_resampler_config config = ma_resampler_config_init(..., ma_resample_algorithm_custom);\n    config.pBackendVTable = &g_customResamplerVTable;\n    ```\n\nCustom resamplers are useful if the stock algorithms are not appropriate for your use case. You\nneed to implement the required functions in `ma_resampling_backend_vtable`. Note that not all\nfunctions in the vtable need to be implemented, but if it's possible to implement, they should be.\n\nYou can use the `ma_linear_resampler` object for an example on how to implement the vtable. The\n`onGetHeapSize` callback is used to calculate the size of any internal heap allocation the custom\nresampler will need to make given the supplied config. When you initialize the resampler via the\n`onInit` callback, you'll be given a pointer to a heap allocation which is where you should store\nthe heap allocated data. You should not free this data in `onUninit` because miniaudio will manage\nit for you.\n\nThe `onProcess` callback is where the actual resampling takes place. On input, `pFrameCountIn`\npoints to a variable containing the number of frames in the `pFramesIn` buffer and\n`pFrameCountOut` points to a variable containing the capacity in frames of the `pFramesOut` buffer.\nOn output, `pFrameCountIn` should be set to the number of input frames that were fully consumed,\nwhereas `pFrameCountOut` should be set to the number of frames that were written to `pFramesOut`.\n\nThe `onSetRate` callback is optional and is used for dynamically changing the sample rate. If\ndynamic rate changes are not supported, you can set this callback to NULL.\n\nThe `onGetInputLatency` and `onGetOutputLatency` functions are used for retrieving the latency in\ninput and output rates respectively. These can be NULL in which case latency calculations will be\nassumed to be NULL.\n\nThe `onGetRequiredInputFrameCount` callback is used to give miniaudio a hint as to how many input\nframes are required to be available to produce the given number of output frames. Likewise, the\n`onGetExpectedOutputFrameCount` callback is used to determine how many output frames will be\nproduced given the specified number of input frames. miniaudio will use these as a hint, but they\nare optional and can be set to NULL if you're unable to implement them.\n\n\n\n10.4. General Data Conversion\n-----------------------------\nThe `ma_data_converter` API can be used to wrap sample format conversion, channel conversion and\nresampling into one operation. This is what miniaudio uses internally to convert between the format\nrequested when the device was initialized and the format of the backend's native device. The API\nfor general data conversion is very similar to the resampling API. Create a `ma_data_converter`\nobject like this:\n\n    ```c\n    ma_data_converter_config config = ma_data_converter_config_init(\n        inputFormat,\n        outputFormat,\n        inputChannels,\n        outputChannels,\n        inputSampleRate,\n        outputSampleRate\n    );\n\n    ma_data_converter converter;\n    ma_result result = ma_data_converter_init(&config, NULL, &converter);\n    if (result != MA_SUCCESS) {\n        // An error occurred...\n    }\n    ```\n\nIn the example above we use `ma_data_converter_config_init()` to initialize the config, however\nthere's many more properties that can be configured, such as channel maps and resampling quality.\nSomething like the following may be more suitable depending on your requirements:\n\n    ```c\n    ma_data_converter_config config = ma_data_converter_config_init_default();\n    config.formatIn = inputFormat;\n    config.formatOut = outputFormat;\n    config.channelsIn = inputChannels;\n    config.channelsOut = outputChannels;\n    config.sampleRateIn = inputSampleRate;\n    config.sampleRateOut = outputSampleRate;\n    ma_channel_map_init_standard(ma_standard_channel_map_flac, config.channelMapIn, sizeof(config.channelMapIn)/sizeof(config.channelMapIn[0]), config.channelCountIn);\n    config.resampling.linear.lpfOrder = MA_MAX_FILTER_ORDER;\n    ```\n\nDo the following to uninitialize the data converter:\n\n    ```c\n    ma_data_converter_uninit(&converter, NULL);\n    ```\n\nThe following example shows how data can be processed\n\n    ```c\n    ma_uint64 frameCountIn  = 1000;\n    ma_uint64 frameCountOut = 2000;\n    ma_result result = ma_data_converter_process_pcm_frames(&converter, pFramesIn, &frameCountIn, pFramesOut, &frameCountOut);\n    if (result != MA_SUCCESS) {\n        // An error occurred...\n    }\n\n    // At this point, frameCountIn contains the number of input frames that were consumed and frameCountOut contains the number\n    // of output frames written.\n    ```\n\nThe data converter supports multiple channels and is always interleaved (both input and output).\nThe channel count cannot be changed after initialization.\n\nSample rates can be anything other than zero, and are always specified in hertz. They should be set\nto something like 44100, etc. The sample rate is the only configuration property that can be\nchanged after initialization, but only if the `resampling.allowDynamicSampleRate` member of\n`ma_data_converter_config` is set to `MA_TRUE`. To change the sample rate, use\n`ma_data_converter_set_rate()` or `ma_data_converter_set_rate_ratio()`. The ratio must be in/out.\nThe resampling algorithm cannot be changed after initialization.\n\nProcessing always happens on a per PCM frame basis and always assumes interleaved input and output.\nDe-interleaved processing is not supported. To process frames, use\n`ma_data_converter_process_pcm_frames()`. On input, this function takes the number of output frames\nyou can fit in the output buffer and the number of input frames contained in the input buffer. On\noutput these variables contain the number of output frames that were written to the output buffer\nand the number of input frames that were consumed in the process. You can pass in NULL for the\ninput buffer in which case it will be treated as an infinitely large\nbuffer of zeros. The output buffer can also be NULL, in which case the processing will be treated\nas seek.\n\nSometimes it's useful to know exactly how many input frames will be required to output a specific\nnumber of frames. You can calculate this with `ma_data_converter_get_required_input_frame_count()`.\nLikewise, it's sometimes useful to know exactly how many frames would be output given a certain\nnumber of input frames. You can do this with `ma_data_converter_get_expected_output_frame_count()`.\n\nDue to the nature of how resampling works, the data converter introduces some latency if resampling\nis required. This can be retrieved in terms of both the input rate and the output rate with\n`ma_data_converter_get_input_latency()` and `ma_data_converter_get_output_latency()`.\n\n\n\n11. Filtering\n=============\n\n11.1. Biquad Filtering\n----------------------\nBiquad filtering is achieved with the `ma_biquad` API. Example:\n\n    ```c\n    ma_biquad_config config = ma_biquad_config_init(ma_format_f32, channels, b0, b1, b2, a0, a1, a2);\n    ma_result result = ma_biquad_init(&config, &biquad);\n    if (result != MA_SUCCESS) {\n        // Error.\n    }\n\n    ...\n\n    ma_biquad_process_pcm_frames(&biquad, pFramesOut, pFramesIn, frameCount);\n    ```\n\nBiquad filtering is implemented using transposed direct form 2. The numerator coefficients are b0,\nb1 and b2, and the denominator coefficients are a0, a1 and a2. The a0 coefficient is required and\ncoefficients must not be pre-normalized.\n\nSupported formats are `ma_format_s16` and `ma_format_f32`. If you need to use a different format\nyou need to convert it yourself beforehand. When using `ma_format_s16` the biquad filter will use\nfixed point arithmetic. When using `ma_format_f32`, floating point arithmetic will be used.\n\nInput and output frames are always interleaved.\n\nFiltering can be applied in-place by passing in the same pointer for both the input and output\nbuffers, like so:\n\n    ```c\n    ma_biquad_process_pcm_frames(&biquad, pMyData, pMyData, frameCount);\n    ```\n\nIf you need to change the values of the coefficients, but maintain the values in the registers you\ncan do so with `ma_biquad_reinit()`. This is useful if you need to change the properties of the\nfilter while keeping the values of registers valid to avoid glitching. Do not use\n`ma_biquad_init()` for this as it will do a full initialization which involves clearing the\nregisters to 0. Note that changing the format or channel count after initialization is invalid and\nwill result in an error.\n\n\n11.2. Low-Pass Filtering\n------------------------\nLow-pass filtering is achieved with the following APIs:\n\n    +---------+------------------------------------------+\n    | API     | Description                              |\n    +---------+------------------------------------------+\n    | ma_lpf1 | First order low-pass filter              |\n    | ma_lpf2 | Second order low-pass filter             |\n    | ma_lpf  | High order low-pass filter (Butterworth) |\n    +---------+------------------------------------------+\n\nLow-pass filter example:\n\n    ```c\n    ma_lpf_config config = ma_lpf_config_init(ma_format_f32, channels, sampleRate, cutoffFrequency, order);\n    ma_result result = ma_lpf_init(&config, &lpf);\n    if (result != MA_SUCCESS) {\n        // Error.\n    }\n\n    ...\n\n    ma_lpf_process_pcm_frames(&lpf, pFramesOut, pFramesIn, frameCount);\n    ```\n\nSupported formats are `ma_format_s16` and` ma_format_f32`. If you need to use a different format\nyou need to convert it yourself beforehand. Input and output frames are always interleaved.\n\nFiltering can be applied in-place by passing in the same pointer for both the input and output\nbuffers, like so:\n\n    ```c\n    ma_lpf_process_pcm_frames(&lpf, pMyData, pMyData, frameCount);\n    ```\n\nThe maximum filter order is limited to `MA_MAX_FILTER_ORDER` which is set to 8. If you need more,\nyou can chain first and second order filters together.\n\n    ```c\n    for (iFilter = 0; iFilter < filterCount; iFilter += 1) {\n        ma_lpf2_process_pcm_frames(&lpf2[iFilter], pMyData, pMyData, frameCount);\n    }\n    ```\n\nIf you need to change the configuration of the filter, but need to maintain the state of internal\nregisters you can do so with `ma_lpf_reinit()`. This may be useful if you need to change the sample\nrate and/or cutoff frequency dynamically while maintaining smooth transitions. Note that changing the\nformat or channel count after initialization is invalid and will result in an error.\n\nThe `ma_lpf` object supports a configurable order, but if you only need a first order filter you\nmay want to consider using `ma_lpf1`. Likewise, if you only need a second order filter you can use\n`ma_lpf2`. The advantage of this is that they're lighter weight and a bit more efficient.\n\nIf an even filter order is specified, a series of second order filters will be processed in a\nchain. If an odd filter order is specified, a first order filter will be applied, followed by a\nseries of second order filters in a chain.\n\n\n11.3. High-Pass Filtering\n-------------------------\nHigh-pass filtering is achieved with the following APIs:\n\n    +---------+-------------------------------------------+\n    | API     | Description                               |\n    +---------+-------------------------------------------+\n    | ma_hpf1 | First order high-pass filter              |\n    | ma_hpf2 | Second order high-pass filter             |\n    | ma_hpf  | High order high-pass filter (Butterworth) |\n    +---------+-------------------------------------------+\n\nHigh-pass filters work exactly the same as low-pass filters, only the APIs are called `ma_hpf1`,\n`ma_hpf2` and `ma_hpf`. See example code for low-pass filters for example usage.\n\n\n11.4. Band-Pass Filtering\n-------------------------\nBand-pass filtering is achieved with the following APIs:\n\n    +---------+-------------------------------+\n    | API     | Description                   |\n    +---------+-------------------------------+\n    | ma_bpf2 | Second order band-pass filter |\n    | ma_bpf  | High order band-pass filter   |\n    +---------+-------------------------------+\n\nBand-pass filters work exactly the same as low-pass filters, only the APIs are called `ma_bpf2` and\n`ma_hpf`. See example code for low-pass filters for example usage. Note that the order for\nband-pass filters must be an even number which means there is no first order band-pass filter,\nunlike low-pass and high-pass filters.\n\n\n11.5. Notch Filtering\n---------------------\nNotch filtering is achieved with the following APIs:\n\n    +-----------+------------------------------------------+\n    | API       | Description                              |\n    +-----------+------------------------------------------+\n    | ma_notch2 | Second order notching filter             |\n    +-----------+------------------------------------------+\n\n\n11.6. Peaking EQ Filtering\n-------------------------\nPeaking filtering is achieved with the following APIs:\n\n    +----------+------------------------------------------+\n    | API      | Description                              |\n    +----------+------------------------------------------+\n    | ma_peak2 | Second order peaking filter              |\n    +----------+------------------------------------------+\n\n\n11.7. Low Shelf Filtering\n-------------------------\nLow shelf filtering is achieved with the following APIs:\n\n    +-------------+------------------------------------------+\n    | API         | Description                              |\n    +-------------+------------------------------------------+\n    | ma_loshelf2 | Second order low shelf filter            |\n    +-------------+------------------------------------------+\n\nWhere a high-pass filter is used to eliminate lower frequencies, a low shelf filter can be used to\njust turn them down rather than eliminate them entirely.\n\n\n11.8. High Shelf Filtering\n--------------------------\nHigh shelf filtering is achieved with the following APIs:\n\n    +-------------+------------------------------------------+\n    | API         | Description                              |\n    +-------------+------------------------------------------+\n    | ma_hishelf2 | Second order high shelf filter           |\n    +-------------+------------------------------------------+\n\nThe high shelf filter has the same API as the low shelf filter, only you would use `ma_hishelf`\ninstead of `ma_loshelf`. Where a low shelf filter is used to adjust the volume of low frequencies,\nthe high shelf filter does the same thing for high frequencies.\n\n\n\n\n12. Waveform and Noise Generation\n=================================\n\n12.1. Waveforms\n---------------\nminiaudio supports generation of sine, square, triangle and sawtooth waveforms. This is achieved\nwith the `ma_waveform` API. Example:\n\n    ```c\n    ma_waveform_config config = ma_waveform_config_init(\n        FORMAT,\n        CHANNELS,\n        SAMPLE_RATE,\n        ma_waveform_type_sine,\n        amplitude,\n        frequency);\n\n    ma_waveform waveform;\n    ma_result result = ma_waveform_init(&config, &waveform);\n    if (result != MA_SUCCESS) {\n        // Error.\n    }\n\n    ...\n\n    ma_waveform_read_pcm_frames(&waveform, pOutput, frameCount);\n    ```\n\nThe amplitude, frequency, type, and sample rate can be changed dynamically with\n`ma_waveform_set_amplitude()`, `ma_waveform_set_frequency()`, `ma_waveform_set_type()`, and\n`ma_waveform_set_sample_rate()` respectively.\n\nYou can invert the waveform by setting the amplitude to a negative value. You can use this to\ncontrol whether or not a sawtooth has a positive or negative ramp, for example.\n\nBelow are the supported waveform types:\n\n    +---------------------------+\n    | Enum Name                 |\n    +---------------------------+\n    | ma_waveform_type_sine     |\n    | ma_waveform_type_square   |\n    | ma_waveform_type_triangle |\n    | ma_waveform_type_sawtooth |\n    +---------------------------+\n\n\n\n12.2. Noise\n-----------\nminiaudio supports generation of white, pink and Brownian noise via the `ma_noise` API. Example:\n\n    ```c\n    ma_noise_config config = ma_noise_config_init(\n        FORMAT,\n        CHANNELS,\n        ma_noise_type_white,\n        SEED,\n        amplitude);\n\n    ma_noise noise;\n    ma_result result = ma_noise_init(&config, &noise);\n    if (result != MA_SUCCESS) {\n        // Error.\n    }\n\n    ...\n\n    ma_noise_read_pcm_frames(&noise, pOutput, frameCount);\n    ```\n\nThe noise API uses simple LCG random number generation. It supports a custom seed which is useful\nfor things like automated testing requiring reproducibility. Setting the seed to zero will default\nto `MA_DEFAULT_LCG_SEED`.\n\nThe amplitude and seed can be changed dynamically with `ma_noise_set_amplitude()` and\n`ma_noise_set_seed()` respectively.\n\nBy default, the noise API will use different values for different channels. So, for example, the\nleft side in a stereo stream will be different to the right side. To instead have each channel use\nthe same random value, set the `duplicateChannels` member of the noise config to true, like so:\n\n    ```c\n    config.duplicateChannels = MA_TRUE;\n    ```\n\nBelow are the supported noise types.\n\n    +------------------------+\n    | Enum Name              |\n    +------------------------+\n    | ma_noise_type_white    |\n    | ma_noise_type_pink     |\n    | ma_noise_type_brownian |\n    +------------------------+\n\n\n\n13. Audio Buffers\n=================\nminiaudio supports reading from a buffer of raw audio data via the `ma_audio_buffer` API. This can\nread from memory that's managed by the application, but can also handle the memory management for\nyou internally. Memory management is flexible and should support most use cases.\n\nAudio buffers are initialized using the standard configuration system used everywhere in miniaudio:\n\n    ```c\n    ma_audio_buffer_config config = ma_audio_buffer_config_init(\n        format,\n        channels,\n        sizeInFrames,\n        pExistingData,\n        &allocationCallbacks);\n\n    ma_audio_buffer buffer;\n    result = ma_audio_buffer_init(&config, &buffer);\n    if (result != MA_SUCCESS) {\n        // Error.\n    }\n\n    ...\n\n    ma_audio_buffer_uninit(&buffer);\n    ```\n\nIn the example above, the memory pointed to by `pExistingData` will *not* be copied and is how an\napplication can do self-managed memory allocation. If you would rather make a copy of the data, use\n`ma_audio_buffer_init_copy()`. To uninitialize the buffer, use `ma_audio_buffer_uninit()`.\n\nSometimes it can be convenient to allocate the memory for the `ma_audio_buffer` structure and the\nraw audio data in a contiguous block of memory. That is, the raw audio data will be located\nimmediately after the `ma_audio_buffer` structure. To do this, use\n`ma_audio_buffer_alloc_and_init()`:\n\n    ```c\n    ma_audio_buffer_config config = ma_audio_buffer_config_init(\n        format,\n        channels,\n        sizeInFrames,\n        pExistingData,\n        &allocationCallbacks);\n\n    ma_audio_buffer* pBuffer\n    result = ma_audio_buffer_alloc_and_init(&config, &pBuffer);\n    if (result != MA_SUCCESS) {\n        // Error\n    }\n\n    ...\n\n    ma_audio_buffer_uninit_and_free(&buffer);\n    ```\n\nIf you initialize the buffer with `ma_audio_buffer_alloc_and_init()` you should uninitialize it\nwith `ma_audio_buffer_uninit_and_free()`. In the example above, the memory pointed to by\n`pExistingData` will be copied into the buffer, which is contrary to the behavior of\n`ma_audio_buffer_init()`.\n\nAn audio buffer has a playback cursor just like a decoder. As you read frames from the buffer, the\ncursor moves forward. The last parameter (`loop`) can be used to determine if the buffer should\nloop. The return value is the number of frames actually read. If this is less than the number of\nframes requested it means the end has been reached. This should never happen if the `loop`\nparameter is set to true. If you want to manually loop back to the start, you can do so with with\n`ma_audio_buffer_seek_to_pcm_frame(pAudioBuffer, 0)`. Below is an example for reading data from an\naudio buffer.\n\n    ```c\n    ma_uint64 framesRead = ma_audio_buffer_read_pcm_frames(pAudioBuffer, pFramesOut, desiredFrameCount, isLooping);\n    if (framesRead < desiredFrameCount) {\n        // If not looping, this means the end has been reached. This should never happen in looping mode with valid input.\n    }\n    ```\n\nSometimes you may want to avoid the cost of data movement between the internal buffer and the\noutput buffer. Instead you can use memory mapping to retrieve a pointer to a segment of data:\n\n    ```c\n    void* pMappedFrames;\n    ma_uint64 frameCount = frameCountToTryMapping;\n    ma_result result = ma_audio_buffer_map(pAudioBuffer, &pMappedFrames, &frameCount);\n    if (result == MA_SUCCESS) {\n        // Map was successful. The value in frameCount will be how many frames were _actually_ mapped, which may be\n        // less due to the end of the buffer being reached.\n        ma_copy_pcm_frames(pFramesOut, pMappedFrames, frameCount, pAudioBuffer->format, pAudioBuffer->channels);\n\n        // You must unmap the buffer.\n        ma_audio_buffer_unmap(pAudioBuffer, frameCount);\n    }\n    ```\n\nWhen you use memory mapping, the read cursor is increment by the frame count passed in to\n`ma_audio_buffer_unmap()`. If you decide not to process every frame you can pass in a value smaller\nthan the value returned by `ma_audio_buffer_map()`. The disadvantage to using memory mapping is\nthat it does not handle looping for you. You can determine if the buffer is at the end for the\npurpose of looping with `ma_audio_buffer_at_end()` or by inspecting the return value of\n`ma_audio_buffer_unmap()` and checking if it equals `MA_AT_END`. You should not treat `MA_AT_END`\nas an error when returned by `ma_audio_buffer_unmap()`.\n\n\n\n14. Ring Buffers\n================\nminiaudio supports lock free (single producer, single consumer) ring buffers which are exposed via\nthe `ma_rb` and `ma_pcm_rb` APIs. The `ma_rb` API operates on bytes, whereas the `ma_pcm_rb`\noperates on PCM frames. They are otherwise identical as `ma_pcm_rb` is just a wrapper around\n`ma_rb`.\n\nUnlike most other APIs in miniaudio, ring buffers support both interleaved and deinterleaved\nstreams. The caller can also allocate their own backing memory for the ring buffer to use\ninternally for added flexibility. Otherwise the ring buffer will manage it's internal memory for\nyou.\n\nThe examples below use the PCM frame variant of the ring buffer since that's most likely the one\nyou will want to use. To initialize a ring buffer, do something like the following:\n\n    ```c\n    ma_pcm_rb rb;\n    ma_result result = ma_pcm_rb_init(FORMAT, CHANNELS, BUFFER_SIZE_IN_FRAMES, NULL, NULL, &rb);\n    if (result != MA_SUCCESS) {\n        // Error\n    }\n    ```\n\nThe `ma_pcm_rb_init()` function takes the sample format and channel count as parameters because\nit's the PCM variant of the ring buffer API. For the regular ring buffer that operates on bytes you\nwould call `ma_rb_init()` which leaves these out and just takes the size of the buffer in bytes\ninstead of frames. The fourth parameter is an optional pre-allocated buffer and the fifth parameter\nis a pointer to a `ma_allocation_callbacks` structure for custom memory allocation routines.\nPassing in `NULL` for this results in `MA_MALLOC()` and `MA_FREE()` being used.\n\nUse `ma_pcm_rb_init_ex()` if you need a deinterleaved buffer. The data for each sub-buffer is\noffset from each other based on the stride. To manage your sub-buffers you can use\n`ma_pcm_rb_get_subbuffer_stride()`, `ma_pcm_rb_get_subbuffer_offset()` and\n`ma_pcm_rb_get_subbuffer_ptr()`.\n\nUse `ma_pcm_rb_acquire_read()` and `ma_pcm_rb_acquire_write()` to retrieve a pointer to a section\nof the ring buffer. You specify the number of frames you need, and on output it will set to what\nwas actually acquired. If the read or write pointer is positioned such that the number of frames\nrequested will require a loop, it will be clamped to the end of the buffer. Therefore, the number\nof frames you're given may be less than the number you requested.\n\nAfter calling `ma_pcm_rb_acquire_read()` or `ma_pcm_rb_acquire_write()`, you do your work on the\nbuffer and then \"commit\" it with `ma_pcm_rb_commit_read()` or `ma_pcm_rb_commit_write()`. This is\nwhere the read/write pointers are updated. When you commit you need to pass in the buffer that was\nreturned by the earlier call to `ma_pcm_rb_acquire_read()` or `ma_pcm_rb_acquire_write()` and is\nonly used for validation. The number of frames passed to `ma_pcm_rb_commit_read()` and\n`ma_pcm_rb_commit_write()` is what's used to increment the pointers, and can be less that what was\noriginally requested.\n\nIf you want to correct for drift between the write pointer and the read pointer you can use a\ncombination of `ma_pcm_rb_pointer_distance()`, `ma_pcm_rb_seek_read()` and\n`ma_pcm_rb_seek_write()`. Note that you can only move the pointers forward, and you should only\nmove the read pointer forward via the consumer thread, and the write pointer forward by the\nproducer thread. If there is too much space between the pointers, move the read pointer forward. If\nthere is too little space between the pointers, move the write pointer forward.\n\nYou can use a ring buffer at the byte level instead of the PCM frame level by using the `ma_rb`\nAPI. This is exactly the same, only you will use the `ma_rb` functions instead of `ma_pcm_rb` and\ninstead of frame counts you will pass around byte counts.\n\nThe maximum size of the buffer in bytes is `0x7FFFFFFF-(MA_SIMD_ALIGNMENT-1)` due to the most\nsignificant bit being used to encode a loop flag and the internally managed buffers always being\naligned to `MA_SIMD_ALIGNMENT`.\n\nNote that the ring buffer is only thread safe when used by a single consumer thread and single\nproducer thread.\n\n\n\n15. Backends\n============\nThe following backends are supported by miniaudio. These are listed in order of default priority.\nWhen no backend is specified when initializing a context or device, miniaudio will attempt to use\neach of these backends in the order listed in the table below.\n\nNote that backends that are not usable by the build target will not be included in the build. For\nexample, ALSA, which is specific to Linux, will not be included in the Windows build.\n\n    +-------------+-----------------------+--------------------------------------------------------+\n    | Name        | Enum Name             | Supported Operating Systems                            |\n    +-------------+-----------------------+--------------------------------------------------------+\n    | WASAPI      | ma_backend_wasapi     | Windows Vista+                                         |\n    | DirectSound | ma_backend_dsound     | Windows XP+                                            |\n    | WinMM       | ma_backend_winmm      | Windows 95+                                            |\n    | Core Audio  | ma_backend_coreaudio  | macOS, iOS                                             |\n    | sndio       | ma_backend_sndio      | OpenBSD                                                |\n    | audio(4)    | ma_backend_audio4     | NetBSD, OpenBSD                                        |\n    | OSS         | ma_backend_oss        | FreeBSD                                                |\n    | PulseAudio  | ma_backend_pulseaudio | Cross Platform (disabled on Windows, BSD and Android)  |\n    | ALSA        | ma_backend_alsa       | Linux                                                  |\n    | JACK        | ma_backend_jack       | Cross Platform (disabled on BSD and Android)           |\n    | AAudio      | ma_backend_aaudio     | Android 8+                                             |\n    | OpenSL ES   | ma_backend_opensl     | Android (API level 16+)                                |\n    | Web Audio   | ma_backend_webaudio   | Web (via Emscripten)                                   |\n    | Custom      | ma_backend_custom     | Cross Platform                                         |\n    | Null        | ma_backend_null       | Cross Platform (not used on Web)                       |\n    +-------------+-----------------------+--------------------------------------------------------+\n\nSome backends have some nuance details you may want to be aware of.\n\n15.1. WASAPI\n------------\n- Low-latency shared mode will be disabled when using an application-defined sample rate which is\n  different to the device's native sample rate. To work around this, set `wasapi.noAutoConvertSRC`\n  to true in the device config. This is due to IAudioClient3_InitializeSharedAudioStream() failing\n  when the `AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM` flag is specified. Setting wasapi.noAutoConvertSRC\n  will result in miniaudio's internal resampler being used instead which will in turn enable the\n  use of low-latency shared mode.\n\n15.2. PulseAudio\n----------------\n- If you experience bad glitching/noise on Arch Linux, consider this fix from the Arch wiki:\n  https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Glitches,_skips_or_crackling.\n  Alternatively, consider using a different backend such as ALSA.\n\n15.3. Android\n-------------\n- To capture audio on Android, remember to add the RECORD_AUDIO permission to your manifest:\n  `<uses-permission android:name=\"android.permission.RECORD_AUDIO\" />`\n- With OpenSL|ES, only a single ma_context can be active at any given time. This is due to a\n  limitation with OpenSL|ES.\n- With AAudio, only default devices are enumerated. This is due to AAudio not having an enumeration\n  API (devices are enumerated through Java). You can however perform your own device enumeration\n  through Java and then set the ID in the ma_device_id structure (ma_device_id.aaudio) and pass it\n  to ma_device_init().\n- The backend API will perform resampling where possible. The reason for this as opposed to using\n  miniaudio's built-in resampler is to take advantage of any potential device-specific\n  optimizations the driver may implement.\n\nBSD\n---\n- The sndio backend is currently only enabled on OpenBSD builds.\n- The audio(4) backend is supported on OpenBSD, but you may need to disable sndiod before you can\n  use it.\n\n15.4. UWP\n---------\n- UWP only supports default playback and capture devices.\n- UWP requires the Microphone capability to be enabled in the application's manifest (Package.appxmanifest):\n\n    ```\n    <Package ...>\n        ...\n        <Capabilities>\n            <DeviceCapability Name=\"microphone\" />\n        </Capabilities>\n    </Package>\n    ```\n\n15.5. Web Audio / Emscripten\n----------------------------\n- You cannot use `-std=c*` compiler flags, nor `-ansi`. This only applies to the Emscripten build.\n- The first time a context is initialized it will create a global object called \"miniaudio\" whose\n  primary purpose is to act as a factory for device objects.\n- Currently the Web Audio backend uses ScriptProcessorNode's, but this may need to change later as\n  they've been deprecated.\n- Google has implemented a policy in their browsers that prevent automatic media output without\n  first receiving some kind of user input. The following web page has additional details:\n  https://developers.google.com/web/updates/2017/09/autoplay-policy-changes. Starting the device\n  may fail if you try to start playback without first handling some kind of user input.\n\n\n\n16. Optimization Tips\n=====================\nSee below for some tips on improving performance.\n\n16.1. Low Level API\n-------------------\n- In the data callback, if your data is already clipped prior to copying it into the output buffer,\n  set the `noClip` config option in the device config to true. This will disable miniaudio's built\n  in clipping function.\n- By default, miniaudio will pre-silence the data callback's output buffer. If you know that you\n  will always write valid data to the output buffer you can disable pre-silencing by setting the\n  `noPreSilence` config option in the device config to true.\n\n16.2. High Level API\n--------------------\n- If a sound does not require doppler or pitch shifting, consider disabling pitching by\n  initializing the sound with the `MA_SOUND_FLAG_NO_PITCH` flag.\n- If a sound does not require spatialization, disable it by initializing the sound with the\n  `MA_SOUND_FLAG_NO_SPATIALIZATION` flag. It can be re-enabled again post-initialization with\n  `ma_sound_set_spatialization_enabled()`.\n- If you know all of your sounds will always be the same sample rate, set the engine's sample\n  rate to match that of the sounds. Likewise, if you're using a self-managed resource manager,\n  consider setting the decoded sample rate to match your sounds. By configuring everything to\n  use a consistent sample rate, sample rate conversion can be avoided.\n\n\n\n17. Miscellaneous Notes\n=======================\n- Automatic stream routing is enabled on a per-backend basis. Support is explicitly enabled for\n  WASAPI and Core Audio, however other backends such as PulseAudio may naturally support it, though\n  not all have been tested.\n- When compiling with VC6 and earlier, decoding is restricted to files less than 2GB in size. This\n  is due to 64-bit file APIs not being available.\n*/\n\n#ifndef miniaudio_h\n#define miniaudio_h\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define MA_STRINGIFY(x)     #x\n#define MA_XSTRINGIFY(x)    MA_STRINGIFY(x)\n\n#define MA_VERSION_MAJOR    0\n#define MA_VERSION_MINOR    11\n#define MA_VERSION_REVISION 21\n#define MA_VERSION_STRING   MA_XSTRINGIFY(MA_VERSION_MAJOR) \".\" MA_XSTRINGIFY(MA_VERSION_MINOR) \".\" MA_XSTRINGIFY(MA_VERSION_REVISION)\n\n#if defined(_MSC_VER) && !defined(__clang__)\n    #pragma warning(push)\n    #pragma warning(disable:4201)   /* nonstandard extension used: nameless struct/union */\n    #pragma warning(disable:4214)   /* nonstandard extension used: bit field types other than int */\n    #pragma warning(disable:4324)   /* structure was padded due to alignment specifier */\n#elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))\n    #pragma GCC diagnostic push\n    #pragma GCC diagnostic ignored \"-Wpedantic\" /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */\n    #if defined(__clang__)\n        #pragma GCC diagnostic ignored \"-Wc11-extensions\"   /* anonymous unions are a C11 extension */\n    #endif\n#endif\n\n\n\n#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined(_M_IA64) || defined(__aarch64__) || defined(_M_ARM64) || defined(__powerpc64__)\n    #define MA_SIZEOF_PTR   8\n#else\n    #define MA_SIZEOF_PTR   4\n#endif\n\n#include <stddef.h> /* For size_t. */\n\n/* Sized types. */\n#if defined(MA_USE_STDINT)\n    #include <stdint.h>\n    typedef int8_t   ma_int8;\n    typedef uint8_t  ma_uint8;\n    typedef int16_t  ma_int16;\n    typedef uint16_t ma_uint16;\n    typedef int32_t  ma_int32;\n    typedef uint32_t ma_uint32;\n    typedef int64_t  ma_int64;\n    typedef uint64_t ma_uint64;\n#else\n    typedef   signed char           ma_int8;\n    typedef unsigned char           ma_uint8;\n    typedef   signed short          ma_int16;\n    typedef unsigned short          ma_uint16;\n    typedef   signed int            ma_int32;\n    typedef unsigned int            ma_uint32;\n    #if defined(_MSC_VER) && !defined(__clang__)\n        typedef   signed __int64    ma_int64;\n        typedef unsigned __int64    ma_uint64;\n    #else\n        #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))\n            #pragma GCC diagnostic push\n            #pragma GCC diagnostic ignored \"-Wlong-long\"\n            #if defined(__clang__)\n                #pragma GCC diagnostic ignored \"-Wc++11-long-long\"\n            #endif\n        #endif\n        typedef   signed long long  ma_int64;\n        typedef unsigned long long  ma_uint64;\n        #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))\n            #pragma GCC diagnostic pop\n        #endif\n    #endif\n#endif  /* MA_USE_STDINT */\n\n#if MA_SIZEOF_PTR == 8\n    typedef ma_uint64           ma_uintptr;\n#else\n    typedef ma_uint32           ma_uintptr;\n#endif\n\ntypedef ma_uint8    ma_bool8;\ntypedef ma_uint32   ma_bool32;\n#define MA_TRUE     1\n#define MA_FALSE    0\n\n/* These float types are not used universally by miniaudio. It's to simplify some macro expansion for atomic types. */\ntypedef float       ma_float;\ntypedef double      ma_double;\n\ntypedef void* ma_handle;\ntypedef void* ma_ptr;\n\n/*\nma_proc is annoying because when compiling with GCC we get pendantic warnings about converting\nbetween `void*` and `void (*)()`. We can't use `void (*)()` with MSVC however, because we'll get\nwarning C4191 about \"type cast between incompatible function types\". To work around this I'm going\nto use a different data type depending on the compiler.\n*/\n#if defined(__GNUC__)\ntypedef void (*ma_proc)(void);\n#else\ntypedef void* ma_proc;\n#endif\n\n#if defined(_MSC_VER) && !defined(_WCHAR_T_DEFINED)\ntypedef ma_uint16 wchar_t;\n#endif\n\n/* Define NULL for some compilers. */\n#ifndef NULL\n#define NULL 0\n#endif\n\n#if defined(SIZE_MAX)\n    #define MA_SIZE_MAX    SIZE_MAX\n#else\n    #define MA_SIZE_MAX    0xFFFFFFFF  /* When SIZE_MAX is not defined by the standard library just default to the maximum 32-bit unsigned integer. */\n#endif\n\n\n/* Platform/backend detection. */\n#if defined(_WIN32) || defined(__COSMOPOLITAN__)\n    #define MA_WIN32\n    #if defined(MA_FORCE_UWP) || (defined(WINAPI_FAMILY) && ((defined(WINAPI_FAMILY_PC_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) || (defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)))\n        #define MA_WIN32_UWP\n    #elif defined(WINAPI_FAMILY) && (defined(WINAPI_FAMILY_GAMES) && WINAPI_FAMILY == WINAPI_FAMILY_GAMES)\n        #define MA_WIN32_GDK\n    #else\n        #define MA_WIN32_DESKTOP\n    #endif\n#endif\n#if !defined(_WIN32)    /* If it's not Win32, assume POSIX. */\n    #define MA_POSIX\n\n    /*\n    Use the MA_NO_PTHREAD_IN_HEADER option at your own risk. This is intentionally undocumented.\n    You can use this to avoid including pthread.h in the header section. The downside is that it\n    results in some fixed sized structures being declared for the various types that are used in\n    miniaudio. The risk here is that these types might be too small for a given platform. This\n    risk is yours to take and no support will be offered if you enable this option.\n    */\n    #ifndef MA_NO_PTHREAD_IN_HEADER\n        #include <pthread.h>    /* Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types. */\n        typedef pthread_t       ma_pthread_t;\n        typedef pthread_mutex_t ma_pthread_mutex_t;\n        typedef pthread_cond_t  ma_pthread_cond_t;\n    #else\n        typedef ma_uintptr      ma_pthread_t;\n        typedef union           ma_pthread_mutex_t { char __data[40]; ma_uint64 __alignment; } ma_pthread_mutex_t;\n        typedef union           ma_pthread_cond_t  { char __data[48]; ma_uint64 __alignment; } ma_pthread_cond_t;\n    #endif\n\n    #if defined(__unix__)\n        #define MA_UNIX\n    #endif\n    #if defined(__linux__)\n        #define MA_LINUX\n    #endif\n    #if defined(__APPLE__)\n        #define MA_APPLE\n    #endif\n    #if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)\n        #define MA_BSD\n    #endif\n    #if defined(__ANDROID__)\n        #define MA_ANDROID\n    #endif\n    #if defined(__EMSCRIPTEN__)\n        #define MA_EMSCRIPTEN\n    #endif\n    #if defined(__ORBIS__)\n        #define MA_ORBIS\n    #endif\n    #if defined(__PROSPERO__)\n        #define MA_PROSPERO\n    #endif\n    #if defined(__NX__)\n        #define MA_NX\n    #endif\n    #if defined(__BEOS__) || defined(__HAIKU__)\n        #define MA_BEOS\n    #endif\n    #if defined(__HAIKU__)\n        #define MA_HAIKU\n    #endif\n#endif\n\n#if defined(__has_c_attribute)\n    #if __has_c_attribute(fallthrough)\n        #define MA_FALLTHROUGH [[fallthrough]]\n    #endif\n#endif\n#if !defined(MA_FALLTHROUGH) && defined(__has_attribute) && (defined(__clang__) || defined(__GNUC__))\n    #if __has_attribute(fallthrough)\n        #define MA_FALLTHROUGH __attribute__((fallthrough))\n    #endif\n#endif\n#if !defined(MA_FALLTHROUGH)\n    #define MA_FALLTHROUGH ((void)0)\n#endif\n\n#ifdef _MSC_VER\n    #define MA_INLINE __forceinline\n\n    /* noinline was introduced in Visual Studio 2005. */\n    #if _MSC_VER >= 1400\n        #define MA_NO_INLINE __declspec(noinline)\n    #else\n        #define MA_NO_INLINE\n    #endif\n#elif defined(__GNUC__)\n    /*\n    I've had a bug report where GCC is emitting warnings about functions possibly not being inlineable. This warning happens when\n    the __attribute__((always_inline)) attribute is defined without an \"inline\" statement. I think therefore there must be some\n    case where \"__inline__\" is not always defined, thus the compiler emitting these warnings. When using -std=c89 or -ansi on the\n    command line, we cannot use the \"inline\" keyword and instead need to use \"__inline__\". In an attempt to work around this issue\n    I am using \"__inline__\" only when we're compiling in strict ANSI mode.\n    */\n    #if defined(__STRICT_ANSI__)\n        #define MA_GNUC_INLINE_HINT __inline__\n    #else\n        #define MA_GNUC_INLINE_HINT inline\n    #endif\n\n    #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) || defined(__clang__)\n        #define MA_INLINE MA_GNUC_INLINE_HINT __attribute__((always_inline))\n        #define MA_NO_INLINE __attribute__((noinline))\n    #else\n        #define MA_INLINE MA_GNUC_INLINE_HINT\n        #define MA_NO_INLINE __attribute__((noinline))\n    #endif\n#elif defined(__WATCOMC__)\n    #define MA_INLINE __inline\n    #define MA_NO_INLINE\n#else\n    #define MA_INLINE\n    #define MA_NO_INLINE\n#endif\n\n/* MA_DLL is not officially supported. You're on your own if you want to use this. */\n#if defined(MA_DLL)\n    #if defined(_WIN32)\n        #define MA_DLL_IMPORT  __declspec(dllimport)\n        #define MA_DLL_EXPORT  __declspec(dllexport)\n        #define MA_DLL_PRIVATE static\n    #else\n        #if defined(__GNUC__) && __GNUC__ >= 4\n            #define MA_DLL_IMPORT  __attribute__((visibility(\"default\")))\n            #define MA_DLL_EXPORT  __attribute__((visibility(\"default\")))\n            #define MA_DLL_PRIVATE __attribute__((visibility(\"hidden\")))\n        #else\n            #define MA_DLL_IMPORT\n            #define MA_DLL_EXPORT\n            #define MA_DLL_PRIVATE static\n        #endif\n    #endif\n#endif\n\n#if !defined(MA_API)\n    #if defined(MA_DLL)\n        #if defined(MINIAUDIO_IMPLEMENTATION) || defined(MA_IMPLEMENTATION)\n            #define MA_API  MA_DLL_EXPORT\n        #else\n            #define MA_API  MA_DLL_IMPORT\n        #endif\n    #else\n        #define MA_API extern\n    #endif\n#endif\n\n#if !defined(MA_STATIC)\n    #if defined(MA_DLL)\n        #define MA_PRIVATE MA_DLL_PRIVATE\n    #else\n        #define MA_PRIVATE static\n    #endif\n#endif\n\n\n/* SIMD alignment in bytes. Currently set to 32 bytes in preparation for future AVX optimizations. */\n#define MA_SIMD_ALIGNMENT  32\n\n/*\nSpecial wchar_t type to ensure any structures in the public sections that reference it have a\nconsistent size across all platforms.\n\nOn Windows, wchar_t is 2 bytes, whereas everywhere else it's 4 bytes. Since Windows likes to use\nwchar_t for it's IDs, we need a special explicitly sized wchar type that is always 2 bytes on all\nplatforms.\n*/\n#if !defined(MA_POSIX) && defined(MA_WIN32)\ntypedef wchar_t     ma_wchar_win32;\n#else\ntypedef ma_uint16   ma_wchar_win32;\n#endif\n\n\n\n/*\nLogging Levels\n==============\nLog levels are only used to give logging callbacks some context as to the severity of a log message\nso they can do filtering. All log levels will be posted to registered logging callbacks. If you\ndon't want to output a certain log level you can discriminate against the log level in the callback.\n\nMA_LOG_LEVEL_DEBUG\n    Used for debugging. Useful for debug and test builds, but should be disabled in release builds.\n\nMA_LOG_LEVEL_INFO\n    Informational logging. Useful for debugging. This will never be called from within the data\n    callback.\n\nMA_LOG_LEVEL_WARNING\n    Warnings. You should enable this in you development builds and action them when encounted. These\n    logs usually indicate a potential problem or misconfiguration, but still allow you to keep\n    running. This will never be called from within the data callback.\n\nMA_LOG_LEVEL_ERROR\n    Error logging. This will be fired when an operation fails and is subsequently aborted. This can\n    be fired from within the data callback, in which case the device will be stopped. You should\n    always have this log level enabled.\n*/\ntypedef enum\n{\n    MA_LOG_LEVEL_DEBUG   = 4,\n    MA_LOG_LEVEL_INFO    = 3,\n    MA_LOG_LEVEL_WARNING = 2,\n    MA_LOG_LEVEL_ERROR   = 1\n} ma_log_level;\n\n/*\nVariables needing to be accessed atomically should be declared with this macro for two reasons:\n\n    1) It allows people who read the code to identify a variable as such; and\n    2) It forces alignment on platforms where it's required or optimal.\n\nNote that for x86/64, alignment is not strictly necessary, but does have some performance\nimplications. Where supported by the compiler, alignment will be used, but otherwise if the CPU\narchitecture does not require it, it will simply leave it unaligned. This is the case with old\nversions of Visual Studio, which I've confirmed with at least VC6.\n*/\n#if !defined(_MSC_VER) && defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)\n    #include <stdalign.h>\n    #define MA_ATOMIC(alignment, type)            _Alignas(alignment) type\n#else\n    #if defined(__GNUC__)\n        /* GCC-style compilers. */\n        #define MA_ATOMIC(alignment, type)        type __attribute__((aligned(alignment)))\n    #elif defined(_MSC_VER) && _MSC_VER > 1200  /* 1200 = VC6. Alignment not supported, but not necessary because x86 is the only supported target. */\n        /* MSVC. */\n        #define MA_ATOMIC(alignment, type)        __declspec(align(alignment)) type\n    #else\n        /* Other compilers. */\n        #define MA_ATOMIC(alignment, type)        type\n    #endif\n#endif\n\ntypedef struct ma_context ma_context;\ntypedef struct ma_device ma_device;\n\ntypedef ma_uint8 ma_channel;\ntypedef enum\n{\n    MA_CHANNEL_NONE               = 0,\n    MA_CHANNEL_MONO               = 1,\n    MA_CHANNEL_FRONT_LEFT         = 2,\n    MA_CHANNEL_FRONT_RIGHT        = 3,\n    MA_CHANNEL_FRONT_CENTER       = 4,\n    MA_CHANNEL_LFE                = 5,\n    MA_CHANNEL_BACK_LEFT          = 6,\n    MA_CHANNEL_BACK_RIGHT         = 7,\n    MA_CHANNEL_FRONT_LEFT_CENTER  = 8,\n    MA_CHANNEL_FRONT_RIGHT_CENTER = 9,\n    MA_CHANNEL_BACK_CENTER        = 10,\n    MA_CHANNEL_SIDE_LEFT          = 11,\n    MA_CHANNEL_SIDE_RIGHT         = 12,\n    MA_CHANNEL_TOP_CENTER         = 13,\n    MA_CHANNEL_TOP_FRONT_LEFT     = 14,\n    MA_CHANNEL_TOP_FRONT_CENTER   = 15,\n    MA_CHANNEL_TOP_FRONT_RIGHT    = 16,\n    MA_CHANNEL_TOP_BACK_LEFT      = 17,\n    MA_CHANNEL_TOP_BACK_CENTER    = 18,\n    MA_CHANNEL_TOP_BACK_RIGHT     = 19,\n    MA_CHANNEL_AUX_0              = 20,\n    MA_CHANNEL_AUX_1              = 21,\n    MA_CHANNEL_AUX_2              = 22,\n    MA_CHANNEL_AUX_3              = 23,\n    MA_CHANNEL_AUX_4              = 24,\n    MA_CHANNEL_AUX_5              = 25,\n    MA_CHANNEL_AUX_6              = 26,\n    MA_CHANNEL_AUX_7              = 27,\n    MA_CHANNEL_AUX_8              = 28,\n    MA_CHANNEL_AUX_9              = 29,\n    MA_CHANNEL_AUX_10             = 30,\n    MA_CHANNEL_AUX_11             = 31,\n    MA_CHANNEL_AUX_12             = 32,\n    MA_CHANNEL_AUX_13             = 33,\n    MA_CHANNEL_AUX_14             = 34,\n    MA_CHANNEL_AUX_15             = 35,\n    MA_CHANNEL_AUX_16             = 36,\n    MA_CHANNEL_AUX_17             = 37,\n    MA_CHANNEL_AUX_18             = 38,\n    MA_CHANNEL_AUX_19             = 39,\n    MA_CHANNEL_AUX_20             = 40,\n    MA_CHANNEL_AUX_21             = 41,\n    MA_CHANNEL_AUX_22             = 42,\n    MA_CHANNEL_AUX_23             = 43,\n    MA_CHANNEL_AUX_24             = 44,\n    MA_CHANNEL_AUX_25             = 45,\n    MA_CHANNEL_AUX_26             = 46,\n    MA_CHANNEL_AUX_27             = 47,\n    MA_CHANNEL_AUX_28             = 48,\n    MA_CHANNEL_AUX_29             = 49,\n    MA_CHANNEL_AUX_30             = 50,\n    MA_CHANNEL_AUX_31             = 51,\n    MA_CHANNEL_LEFT               = MA_CHANNEL_FRONT_LEFT,\n    MA_CHANNEL_RIGHT              = MA_CHANNEL_FRONT_RIGHT,\n    MA_CHANNEL_POSITION_COUNT     = (MA_CHANNEL_AUX_31 + 1)\n} _ma_channel_position; /* Do not use `_ma_channel_position` directly. Use `ma_channel` instead. */\n\ntypedef enum\n{\n    MA_SUCCESS                        =  0,\n    MA_ERROR                          = -1,  /* A generic error. */\n    MA_INVALID_ARGS                   = -2,\n    MA_INVALID_OPERATION              = -3,\n    MA_OUT_OF_MEMORY                  = -4,\n    MA_OUT_OF_RANGE                   = -5,\n    MA_ACCESS_DENIED                  = -6,\n    MA_DOES_NOT_EXIST                 = -7,\n    MA_ALREADY_EXISTS                 = -8,\n    MA_TOO_MANY_OPEN_FILES            = -9,\n    MA_INVALID_FILE                   = -10,\n    MA_TOO_BIG                        = -11,\n    MA_PATH_TOO_LONG                  = -12,\n    MA_NAME_TOO_LONG                  = -13,\n    MA_NOT_DIRECTORY                  = -14,\n    MA_IS_DIRECTORY                   = -15,\n    MA_DIRECTORY_NOT_EMPTY            = -16,\n    MA_AT_END                         = -17,\n    MA_NO_SPACE                       = -18,\n    MA_BUSY                           = -19,\n    MA_IO_ERROR                       = -20,\n    MA_INTERRUPT                      = -21,\n    MA_UNAVAILABLE                    = -22,\n    MA_ALREADY_IN_USE                 = -23,\n    MA_BAD_ADDRESS                    = -24,\n    MA_BAD_SEEK                       = -25,\n    MA_BAD_PIPE                       = -26,\n    MA_DEADLOCK                       = -27,\n    MA_TOO_MANY_LINKS                 = -28,\n    MA_NOT_IMPLEMENTED                = -29,\n    MA_NO_MESSAGE                     = -30,\n    MA_BAD_MESSAGE                    = -31,\n    MA_NO_DATA_AVAILABLE              = -32,\n    MA_INVALID_DATA                   = -33,\n    MA_TIMEOUT                        = -34,\n    MA_NO_NETWORK                     = -35,\n    MA_NOT_UNIQUE                     = -36,\n    MA_NOT_SOCKET                     = -37,\n    MA_NO_ADDRESS                     = -38,\n    MA_BAD_PROTOCOL                   = -39,\n    MA_PROTOCOL_UNAVAILABLE           = -40,\n    MA_PROTOCOL_NOT_SUPPORTED         = -41,\n    MA_PROTOCOL_FAMILY_NOT_SUPPORTED  = -42,\n    MA_ADDRESS_FAMILY_NOT_SUPPORTED   = -43,\n    MA_SOCKET_NOT_SUPPORTED           = -44,\n    MA_CONNECTION_RESET               = -45,\n    MA_ALREADY_CONNECTED              = -46,\n    MA_NOT_CONNECTED                  = -47,\n    MA_CONNECTION_REFUSED             = -48,\n    MA_NO_HOST                        = -49,\n    MA_IN_PROGRESS                    = -50,\n    MA_CANCELLED                      = -51,\n    MA_MEMORY_ALREADY_MAPPED          = -52,\n\n    /* General non-standard errors. */\n    MA_CRC_MISMATCH                   = -100,\n\n    /* General miniaudio-specific errors. */\n    MA_FORMAT_NOT_SUPPORTED           = -200,\n    MA_DEVICE_TYPE_NOT_SUPPORTED      = -201,\n    MA_SHARE_MODE_NOT_SUPPORTED       = -202,\n    MA_NO_BACKEND                     = -203,\n    MA_NO_DEVICE                      = -204,\n    MA_API_NOT_FOUND                  = -205,\n    MA_INVALID_DEVICE_CONFIG          = -206,\n    MA_LOOP                           = -207,\n    MA_BACKEND_NOT_ENABLED            = -208,\n\n    /* State errors. */\n    MA_DEVICE_NOT_INITIALIZED         = -300,\n    MA_DEVICE_ALREADY_INITIALIZED     = -301,\n    MA_DEVICE_NOT_STARTED             = -302,\n    MA_DEVICE_NOT_STOPPED             = -303,\n\n    /* Operation errors. */\n    MA_FAILED_TO_INIT_BACKEND         = -400,\n    MA_FAILED_TO_OPEN_BACKEND_DEVICE  = -401,\n    MA_FAILED_TO_START_BACKEND_DEVICE = -402,\n    MA_FAILED_TO_STOP_BACKEND_DEVICE  = -403\n} ma_result;\n\n\n#define MA_MIN_CHANNELS                 1\n#ifndef MA_MAX_CHANNELS\n#define MA_MAX_CHANNELS                 254\n#endif\n\n#ifndef MA_MAX_FILTER_ORDER\n#define MA_MAX_FILTER_ORDER             8\n#endif\n\ntypedef enum\n{\n    ma_stream_format_pcm = 0\n} ma_stream_format;\n\ntypedef enum\n{\n    ma_stream_layout_interleaved = 0,\n    ma_stream_layout_deinterleaved\n} ma_stream_layout;\n\ntypedef enum\n{\n    ma_dither_mode_none = 0,\n    ma_dither_mode_rectangle,\n    ma_dither_mode_triangle\n} ma_dither_mode;\n\ntypedef enum\n{\n    /*\n    I like to keep these explicitly defined because they're used as a key into a lookup table. When items are\n    added to this, make sure there are no gaps and that they're added to the lookup table in ma_get_bytes_per_sample().\n    */\n    ma_format_unknown = 0,     /* Mainly used for indicating an error, but also used as the default for the output format for decoders. */\n    ma_format_u8      = 1,\n    ma_format_s16     = 2,     /* Seems to be the most widely supported format. */\n    ma_format_s24     = 3,     /* Tightly packed. 3 bytes per sample. */\n    ma_format_s32     = 4,\n    ma_format_f32     = 5,\n    ma_format_count\n} ma_format;\n\ntypedef enum\n{\n    /* Standard rates need to be in priority order. */\n    ma_standard_sample_rate_48000  = 48000,     /* Most common */\n    ma_standard_sample_rate_44100  = 44100,\n\n    ma_standard_sample_rate_32000  = 32000,     /* Lows */\n    ma_standard_sample_rate_24000  = 24000,\n    ma_standard_sample_rate_22050  = 22050,\n\n    ma_standard_sample_rate_88200  = 88200,     /* Highs */\n    ma_standard_sample_rate_96000  = 96000,\n    ma_standard_sample_rate_176400 = 176400,\n    ma_standard_sample_rate_192000 = 192000,\n\n    ma_standard_sample_rate_16000  = 16000,     /* Extreme lows */\n    ma_standard_sample_rate_11025  = 11025,\n    ma_standard_sample_rate_8000   = 8000,\n\n    ma_standard_sample_rate_352800 = 352800,    /* Extreme highs */\n    ma_standard_sample_rate_384000 = 384000,\n\n    ma_standard_sample_rate_min    = ma_standard_sample_rate_8000,\n    ma_standard_sample_rate_max    = ma_standard_sample_rate_384000,\n    ma_standard_sample_rate_count  = 14         /* Need to maintain the count manually. Make sure this is updated if items are added to enum. */\n} ma_standard_sample_rate;\n\n\ntypedef enum\n{\n    ma_channel_mix_mode_rectangular = 0,   /* Simple averaging based on the plane(s) the channel is sitting on. */\n    ma_channel_mix_mode_simple,            /* Drop excess channels; zeroed out extra channels. */\n    ma_channel_mix_mode_custom_weights,    /* Use custom weights specified in ma_channel_converter_config. */\n    ma_channel_mix_mode_default = ma_channel_mix_mode_rectangular\n} ma_channel_mix_mode;\n\ntypedef enum\n{\n    ma_standard_channel_map_microsoft,\n    ma_standard_channel_map_alsa,\n    ma_standard_channel_map_rfc3551,   /* Based off AIFF. */\n    ma_standard_channel_map_flac,\n    ma_standard_channel_map_vorbis,\n    ma_standard_channel_map_sound4,    /* FreeBSD's sound(4). */\n    ma_standard_channel_map_sndio,     /* www.sndio.org/tips.html */\n    ma_standard_channel_map_webaudio = ma_standard_channel_map_flac, /* https://webaudio.github.io/web-audio-api/#ChannelOrdering. Only 1, 2, 4 and 6 channels are defined, but can fill in the gaps with logical assumptions. */\n    ma_standard_channel_map_default = ma_standard_channel_map_microsoft\n} ma_standard_channel_map;\n\ntypedef enum\n{\n    ma_performance_profile_low_latency = 0,\n    ma_performance_profile_conservative\n} ma_performance_profile;\n\n\ntypedef struct\n{\n    void* pUserData;\n    void* (* onMalloc)(size_t sz, void* pUserData);\n    void* (* onRealloc)(void* p, size_t sz, void* pUserData);\n    void  (* onFree)(void* p, void* pUserData);\n} ma_allocation_callbacks;\n\ntypedef struct\n{\n    ma_int32 state;\n} ma_lcg;\n\n\n/*\nAtomics.\n\nThese are typesafe structures to prevent errors as a result of forgetting to reference variables atomically. It's too\neasy to introduce subtle bugs where you accidentally do a regular assignment instead of an atomic load/store, etc. By\nusing a struct we can enforce the use of atomics at compile time.\n\nThese types are declared in the header section because we need to reference them in structs below, but functions for\nusing them are only exposed in the implementation section. I do not want these to be part of the public API.\n\nThere's a few downsides to this system. The first is that you need to declare a new struct for each type. Below are\nsome macros to help with the declarations. They will be named like so:\n\n    ma_atomic_uint32 - atomic ma_uint32\n    ma_atomic_int32  - atomic ma_int32\n    ma_atomic_uint64 - atomic ma_uint64\n    ma_atomic_float  - atomic float\n    ma_atomic_bool32 - atomic ma_bool32\n\nThe other downside is that atomic pointers are extremely messy. You need to declare a new struct for each specific\ntype of pointer you need to make atomic. For example, an atomic ma_node* will look like this:\n\n    MA_ATOMIC_SAFE_TYPE_IMPL_PTR(node)\n\nWhich will declare a type struct that's named like so:\n\n    ma_atomic_ptr_node\n\nFunctions to use the atomic types are declared in the implementation section. All atomic functions are prefixed with\nthe name of the struct. For example:\n\n    ma_atomic_uint32_set() - Atomic store of ma_uint32\n    ma_atomic_uint32_get() - Atomic load of ma_uint32\n    etc.\n\nFor pointer types it's the same, which makes them a bit messy to use due to the length of each function name, but in\nreturn you get type safety and enforcement of atomic operations.\n*/\n#define MA_ATOMIC_SAFE_TYPE_DECL(c89TypeExtension, typeSize, type) \\\n    typedef struct \\\n    { \\\n        MA_ATOMIC(typeSize, ma_##type) value; \\\n    } ma_atomic_##type; \\\n\n#define MA_ATOMIC_SAFE_TYPE_DECL_PTR(type) \\\n    typedef struct \\\n    { \\\n        MA_ATOMIC(MA_SIZEOF_PTR, ma_##type*) value; \\\n    } ma_atomic_ptr_##type; \\\n\nMA_ATOMIC_SAFE_TYPE_DECL(32,  4, uint32)\nMA_ATOMIC_SAFE_TYPE_DECL(i32, 4, int32)\nMA_ATOMIC_SAFE_TYPE_DECL(64,  8, uint64)\nMA_ATOMIC_SAFE_TYPE_DECL(f32, 4, float)\nMA_ATOMIC_SAFE_TYPE_DECL(32,  4, bool32)\n\n\n/* Spinlocks are 32-bit for compatibility reasons. */\ntypedef ma_uint32 ma_spinlock;\n\n#ifndef MA_NO_THREADING\n    /* Thread priorities should be ordered such that the default priority of the worker thread is 0. */\n    typedef enum\n    {\n        ma_thread_priority_idle     = -5,\n        ma_thread_priority_lowest   = -4,\n        ma_thread_priority_low      = -3,\n        ma_thread_priority_normal   = -2,\n        ma_thread_priority_high     = -1,\n        ma_thread_priority_highest  =  0,\n        ma_thread_priority_realtime =  1,\n        ma_thread_priority_default  =  0\n    } ma_thread_priority;\n\n    #if defined(MA_POSIX)\n        typedef ma_pthread_t ma_thread;\n    #elif defined(MA_WIN32)\n        typedef ma_handle ma_thread;\n    #endif\n\n    #if defined(MA_POSIX)\n        typedef ma_pthread_mutex_t ma_mutex;\n    #elif defined(MA_WIN32)\n        typedef ma_handle ma_mutex;\n    #endif\n\n    #if defined(MA_POSIX)\n        typedef struct\n        {\n            ma_uint32 value;\n            ma_pthread_mutex_t lock;\n            ma_pthread_cond_t cond;\n        } ma_event;\n    #elif defined(MA_WIN32)\n        typedef ma_handle ma_event;\n    #endif\n\n    #if defined(MA_POSIX)\n        typedef struct\n        {\n            int value;\n            ma_pthread_mutex_t lock;\n            ma_pthread_cond_t cond;\n        } ma_semaphore;\n    #elif defined(MA_WIN32)\n        typedef ma_handle ma_semaphore;\n    #endif\n#else\n    /* MA_NO_THREADING is set which means threading is disabled. Threading is required by some API families. If any of these are enabled we need to throw an error. */\n    #ifndef MA_NO_DEVICE_IO\n        #error \"MA_NO_THREADING cannot be used without MA_NO_DEVICE_IO\";\n    #endif\n#endif  /* MA_NO_THREADING */\n\n\n/*\nRetrieves the version of miniaudio as separated integers. Each component can be NULL if it's not required.\n*/\nMA_API void ma_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision);\n\n/*\nRetrieves the version of miniaudio as a string which can be useful for logging purposes.\n*/\nMA_API const char* ma_version_string(void);\n\n\n/**************************************************************************************************************************************************************\n\nLogging\n\n**************************************************************************************************************************************************************/\n#include <stdarg.h> /* For va_list. */\n\n#if defined(__has_attribute)\n    #if __has_attribute(format)\n        #define MA_ATTRIBUTE_FORMAT(fmt, va) __attribute__((format(printf, fmt, va)))\n    #endif\n#endif\n#ifndef MA_ATTRIBUTE_FORMAT\n#define MA_ATTRIBUTE_FORMAT(fmt, va)\n#endif\n\n#ifndef MA_MAX_LOG_CALLBACKS\n#define MA_MAX_LOG_CALLBACKS    4\n#endif\n\n\n/*\nThe callback for handling log messages.\n\n\nParameters\n----------\npUserData (in)\n    The user data pointer that was passed into ma_log_register_callback().\n\nlogLevel (in)\n    The log level. This can be one of the following:\n\n    +----------------------+\n    | Log Level            |\n    +----------------------+\n    | MA_LOG_LEVEL_DEBUG   |\n    | MA_LOG_LEVEL_INFO    |\n    | MA_LOG_LEVEL_WARNING |\n    | MA_LOG_LEVEL_ERROR   |\n    +----------------------+\n\npMessage (in)\n    The log message.\n*/\ntypedef void (* ma_log_callback_proc)(void* pUserData, ma_uint32 level, const char* pMessage);\n\ntypedef struct\n{\n    ma_log_callback_proc onLog;\n    void* pUserData;\n} ma_log_callback;\n\nMA_API ma_log_callback ma_log_callback_init(ma_log_callback_proc onLog, void* pUserData);\n\n\ntypedef struct\n{\n    ma_log_callback callbacks[MA_MAX_LOG_CALLBACKS];\n    ma_uint32 callbackCount;\n    ma_allocation_callbacks allocationCallbacks;    /* Need to store these persistently because ma_log_postv() might need to allocate a buffer on the heap. */\n#ifndef MA_NO_THREADING\n    ma_mutex lock;  /* For thread safety just to make it easier and safer for the logging implementation. */\n#endif\n} ma_log;\n\nMA_API ma_result ma_log_init(const ma_allocation_callbacks* pAllocationCallbacks, ma_log* pLog);\nMA_API void ma_log_uninit(ma_log* pLog);\nMA_API ma_result ma_log_register_callback(ma_log* pLog, ma_log_callback callback);\nMA_API ma_result ma_log_unregister_callback(ma_log* pLog, ma_log_callback callback);\nMA_API ma_result ma_log_post(ma_log* pLog, ma_uint32 level, const char* pMessage);\nMA_API ma_result ma_log_postv(ma_log* pLog, ma_uint32 level, const char* pFormat, va_list args);\nMA_API ma_result ma_log_postf(ma_log* pLog, ma_uint32 level, const char* pFormat, ...) MA_ATTRIBUTE_FORMAT(3, 4);\n\n\n/**************************************************************************************************************************************************************\n\nBiquad Filtering\n\n**************************************************************************************************************************************************************/\ntypedef union\n{\n    float    f32;\n    ma_int32 s32;\n} ma_biquad_coefficient;\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    double b0;\n    double b1;\n    double b2;\n    double a0;\n    double a1;\n    double a2;\n} ma_biquad_config;\n\nMA_API ma_biquad_config ma_biquad_config_init(ma_format format, ma_uint32 channels, double b0, double b1, double b2, double a0, double a1, double a2);\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_biquad_coefficient b0;\n    ma_biquad_coefficient b1;\n    ma_biquad_coefficient b2;\n    ma_biquad_coefficient a1;\n    ma_biquad_coefficient a2;\n    ma_biquad_coefficient* pR1;\n    ma_biquad_coefficient* pR2;\n\n    /* Memory management. */\n    void* _pHeap;\n    ma_bool32 _ownsHeap;\n} ma_biquad;\n\nMA_API ma_result ma_biquad_get_heap_size(const ma_biquad_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_biquad_init_preallocated(const ma_biquad_config* pConfig, void* pHeap, ma_biquad* pBQ);\nMA_API ma_result ma_biquad_init(const ma_biquad_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_biquad* pBQ);\nMA_API void ma_biquad_uninit(ma_biquad* pBQ, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_biquad_reinit(const ma_biquad_config* pConfig, ma_biquad* pBQ);\nMA_API ma_result ma_biquad_clear_cache(ma_biquad* pBQ);\nMA_API ma_result ma_biquad_process_pcm_frames(ma_biquad* pBQ, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_uint32 ma_biquad_get_latency(const ma_biquad* pBQ);\n\n\n/**************************************************************************************************************************************************************\n\nLow-Pass Filtering\n\n**************************************************************************************************************************************************************/\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    double cutoffFrequency;\n    double q;\n} ma_lpf1_config, ma_lpf2_config;\n\nMA_API ma_lpf1_config ma_lpf1_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency);\nMA_API ma_lpf2_config ma_lpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q);\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_biquad_coefficient a;\n    ma_biquad_coefficient* pR1;\n\n    /* Memory management. */\n    void* _pHeap;\n    ma_bool32 _ownsHeap;\n} ma_lpf1;\n\nMA_API ma_result ma_lpf1_get_heap_size(const ma_lpf1_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_lpf1_init_preallocated(const ma_lpf1_config* pConfig, void* pHeap, ma_lpf1* pLPF);\nMA_API ma_result ma_lpf1_init(const ma_lpf1_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf1* pLPF);\nMA_API void ma_lpf1_uninit(ma_lpf1* pLPF, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_lpf1_reinit(const ma_lpf1_config* pConfig, ma_lpf1* pLPF);\nMA_API ma_result ma_lpf1_clear_cache(ma_lpf1* pLPF);\nMA_API ma_result ma_lpf1_process_pcm_frames(ma_lpf1* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_uint32 ma_lpf1_get_latency(const ma_lpf1* pLPF);\n\ntypedef struct\n{\n    ma_biquad bq;   /* The second order low-pass filter is implemented as a biquad filter. */\n} ma_lpf2;\n\nMA_API ma_result ma_lpf2_get_heap_size(const ma_lpf2_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_lpf2_init_preallocated(const ma_lpf2_config* pConfig, void* pHeap, ma_lpf2* pHPF);\nMA_API ma_result ma_lpf2_init(const ma_lpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf2* pLPF);\nMA_API void ma_lpf2_uninit(ma_lpf2* pLPF, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_lpf2_reinit(const ma_lpf2_config* pConfig, ma_lpf2* pLPF);\nMA_API ma_result ma_lpf2_clear_cache(ma_lpf2* pLPF);\nMA_API ma_result ma_lpf2_process_pcm_frames(ma_lpf2* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_uint32 ma_lpf2_get_latency(const ma_lpf2* pLPF);\n\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    double cutoffFrequency;\n    ma_uint32 order;    /* If set to 0, will be treated as a passthrough (no filtering will be applied). */\n} ma_lpf_config;\n\nMA_API ma_lpf_config ma_lpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order);\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    ma_uint32 lpf1Count;\n    ma_uint32 lpf2Count;\n    ma_lpf1* pLPF1;\n    ma_lpf2* pLPF2;\n\n    /* Memory management. */\n    void* _pHeap;\n    ma_bool32 _ownsHeap;\n} ma_lpf;\n\nMA_API ma_result ma_lpf_get_heap_size(const ma_lpf_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_lpf_init_preallocated(const ma_lpf_config* pConfig, void* pHeap, ma_lpf* pLPF);\nMA_API ma_result ma_lpf_init(const ma_lpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf* pLPF);\nMA_API void ma_lpf_uninit(ma_lpf* pLPF, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_lpf_reinit(const ma_lpf_config* pConfig, ma_lpf* pLPF);\nMA_API ma_result ma_lpf_clear_cache(ma_lpf* pLPF);\nMA_API ma_result ma_lpf_process_pcm_frames(ma_lpf* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_uint32 ma_lpf_get_latency(const ma_lpf* pLPF);\n\n\n/**************************************************************************************************************************************************************\n\nHigh-Pass Filtering\n\n**************************************************************************************************************************************************************/\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    double cutoffFrequency;\n    double q;\n} ma_hpf1_config, ma_hpf2_config;\n\nMA_API ma_hpf1_config ma_hpf1_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency);\nMA_API ma_hpf2_config ma_hpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q);\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_biquad_coefficient a;\n    ma_biquad_coefficient* pR1;\n\n    /* Memory management. */\n    void* _pHeap;\n    ma_bool32 _ownsHeap;\n} ma_hpf1;\n\nMA_API ma_result ma_hpf1_get_heap_size(const ma_hpf1_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_hpf1_init_preallocated(const ma_hpf1_config* pConfig, void* pHeap, ma_hpf1* pLPF);\nMA_API ma_result ma_hpf1_init(const ma_hpf1_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf1* pHPF);\nMA_API void ma_hpf1_uninit(ma_hpf1* pHPF, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_hpf1_reinit(const ma_hpf1_config* pConfig, ma_hpf1* pHPF);\nMA_API ma_result ma_hpf1_process_pcm_frames(ma_hpf1* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_uint32 ma_hpf1_get_latency(const ma_hpf1* pHPF);\n\ntypedef struct\n{\n    ma_biquad bq;   /* The second order high-pass filter is implemented as a biquad filter. */\n} ma_hpf2;\n\nMA_API ma_result ma_hpf2_get_heap_size(const ma_hpf2_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_hpf2_init_preallocated(const ma_hpf2_config* pConfig, void* pHeap, ma_hpf2* pHPF);\nMA_API ma_result ma_hpf2_init(const ma_hpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf2* pHPF);\nMA_API void ma_hpf2_uninit(ma_hpf2* pHPF, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_hpf2_reinit(const ma_hpf2_config* pConfig, ma_hpf2* pHPF);\nMA_API ma_result ma_hpf2_process_pcm_frames(ma_hpf2* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_uint32 ma_hpf2_get_latency(const ma_hpf2* pHPF);\n\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    double cutoffFrequency;\n    ma_uint32 order;    /* If set to 0, will be treated as a passthrough (no filtering will be applied). */\n} ma_hpf_config;\n\nMA_API ma_hpf_config ma_hpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order);\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    ma_uint32 hpf1Count;\n    ma_uint32 hpf2Count;\n    ma_hpf1* pHPF1;\n    ma_hpf2* pHPF2;\n\n    /* Memory management. */\n    void* _pHeap;\n    ma_bool32 _ownsHeap;\n} ma_hpf;\n\nMA_API ma_result ma_hpf_get_heap_size(const ma_hpf_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_hpf_init_preallocated(const ma_hpf_config* pConfig, void* pHeap, ma_hpf* pLPF);\nMA_API ma_result ma_hpf_init(const ma_hpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf* pHPF);\nMA_API void ma_hpf_uninit(ma_hpf* pHPF, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_hpf_reinit(const ma_hpf_config* pConfig, ma_hpf* pHPF);\nMA_API ma_result ma_hpf_process_pcm_frames(ma_hpf* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_uint32 ma_hpf_get_latency(const ma_hpf* pHPF);\n\n\n/**************************************************************************************************************************************************************\n\nBand-Pass Filtering\n\n**************************************************************************************************************************************************************/\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    double cutoffFrequency;\n    double q;\n} ma_bpf2_config;\n\nMA_API ma_bpf2_config ma_bpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q);\n\ntypedef struct\n{\n    ma_biquad bq;   /* The second order band-pass filter is implemented as a biquad filter. */\n} ma_bpf2;\n\nMA_API ma_result ma_bpf2_get_heap_size(const ma_bpf2_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_bpf2_init_preallocated(const ma_bpf2_config* pConfig, void* pHeap, ma_bpf2* pBPF);\nMA_API ma_result ma_bpf2_init(const ma_bpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf2* pBPF);\nMA_API void ma_bpf2_uninit(ma_bpf2* pBPF, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_bpf2_reinit(const ma_bpf2_config* pConfig, ma_bpf2* pBPF);\nMA_API ma_result ma_bpf2_process_pcm_frames(ma_bpf2* pBPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_uint32 ma_bpf2_get_latency(const ma_bpf2* pBPF);\n\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    double cutoffFrequency;\n    ma_uint32 order;    /* If set to 0, will be treated as a passthrough (no filtering will be applied). */\n} ma_bpf_config;\n\nMA_API ma_bpf_config ma_bpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order);\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 bpf2Count;\n    ma_bpf2* pBPF2;\n\n    /* Memory management. */\n    void* _pHeap;\n    ma_bool32 _ownsHeap;\n} ma_bpf;\n\nMA_API ma_result ma_bpf_get_heap_size(const ma_bpf_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_bpf_init_preallocated(const ma_bpf_config* pConfig, void* pHeap, ma_bpf* pBPF);\nMA_API ma_result ma_bpf_init(const ma_bpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf* pBPF);\nMA_API void ma_bpf_uninit(ma_bpf* pBPF, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_bpf_reinit(const ma_bpf_config* pConfig, ma_bpf* pBPF);\nMA_API ma_result ma_bpf_process_pcm_frames(ma_bpf* pBPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_uint32 ma_bpf_get_latency(const ma_bpf* pBPF);\n\n\n/**************************************************************************************************************************************************************\n\nNotching Filter\n\n**************************************************************************************************************************************************************/\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    double q;\n    double frequency;\n} ma_notch2_config, ma_notch_config;\n\nMA_API ma_notch2_config ma_notch2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double q, double frequency);\n\ntypedef struct\n{\n    ma_biquad bq;\n} ma_notch2;\n\nMA_API ma_result ma_notch2_get_heap_size(const ma_notch2_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_notch2_init_preallocated(const ma_notch2_config* pConfig, void* pHeap, ma_notch2* pFilter);\nMA_API ma_result ma_notch2_init(const ma_notch2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_notch2* pFilter);\nMA_API void ma_notch2_uninit(ma_notch2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_notch2_reinit(const ma_notch2_config* pConfig, ma_notch2* pFilter);\nMA_API ma_result ma_notch2_process_pcm_frames(ma_notch2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_uint32 ma_notch2_get_latency(const ma_notch2* pFilter);\n\n\n/**************************************************************************************************************************************************************\n\nPeaking EQ Filter\n\n**************************************************************************************************************************************************************/\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    double gainDB;\n    double q;\n    double frequency;\n} ma_peak2_config, ma_peak_config;\n\nMA_API ma_peak2_config ma_peak2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency);\n\ntypedef struct\n{\n    ma_biquad bq;\n} ma_peak2;\n\nMA_API ma_result ma_peak2_get_heap_size(const ma_peak2_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_peak2_init_preallocated(const ma_peak2_config* pConfig, void* pHeap, ma_peak2* pFilter);\nMA_API ma_result ma_peak2_init(const ma_peak2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_peak2* pFilter);\nMA_API void ma_peak2_uninit(ma_peak2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_peak2_reinit(const ma_peak2_config* pConfig, ma_peak2* pFilter);\nMA_API ma_result ma_peak2_process_pcm_frames(ma_peak2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_uint32 ma_peak2_get_latency(const ma_peak2* pFilter);\n\n\n/**************************************************************************************************************************************************************\n\nLow Shelf Filter\n\n**************************************************************************************************************************************************************/\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    double gainDB;\n    double shelfSlope;\n    double frequency;\n} ma_loshelf2_config, ma_loshelf_config;\n\nMA_API ma_loshelf2_config ma_loshelf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double shelfSlope, double frequency);\n\ntypedef struct\n{\n    ma_biquad bq;\n} ma_loshelf2;\n\nMA_API ma_result ma_loshelf2_get_heap_size(const ma_loshelf2_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_loshelf2_init_preallocated(const ma_loshelf2_config* pConfig, void* pHeap, ma_loshelf2* pFilter);\nMA_API ma_result ma_loshelf2_init(const ma_loshelf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_loshelf2* pFilter);\nMA_API void ma_loshelf2_uninit(ma_loshelf2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_loshelf2_reinit(const ma_loshelf2_config* pConfig, ma_loshelf2* pFilter);\nMA_API ma_result ma_loshelf2_process_pcm_frames(ma_loshelf2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_uint32 ma_loshelf2_get_latency(const ma_loshelf2* pFilter);\n\n\n/**************************************************************************************************************************************************************\n\nHigh Shelf Filter\n\n**************************************************************************************************************************************************************/\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    double gainDB;\n    double shelfSlope;\n    double frequency;\n} ma_hishelf2_config, ma_hishelf_config;\n\nMA_API ma_hishelf2_config ma_hishelf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double shelfSlope, double frequency);\n\ntypedef struct\n{\n    ma_biquad bq;\n} ma_hishelf2;\n\nMA_API ma_result ma_hishelf2_get_heap_size(const ma_hishelf2_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_hishelf2_init_preallocated(const ma_hishelf2_config* pConfig, void* pHeap, ma_hishelf2* pFilter);\nMA_API ma_result ma_hishelf2_init(const ma_hishelf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hishelf2* pFilter);\nMA_API void ma_hishelf2_uninit(ma_hishelf2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_hishelf2_reinit(const ma_hishelf2_config* pConfig, ma_hishelf2* pFilter);\nMA_API ma_result ma_hishelf2_process_pcm_frames(ma_hishelf2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_uint32 ma_hishelf2_get_latency(const ma_hishelf2* pFilter);\n\n\n\n/*\nDelay\n*/\ntypedef struct\n{\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    ma_uint32 delayInFrames;\n    ma_bool32 delayStart;       /* Set to true to delay the start of the output; false otherwise. */\n    float wet;                  /* 0..1. Default = 1. */\n    float dry;                  /* 0..1. Default = 1. */\n    float decay;                /* 0..1. Default = 0 (no feedback). Feedback decay. Use this for echo. */\n} ma_delay_config;\n\nMA_API ma_delay_config ma_delay_config_init(ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 delayInFrames, float decay);\n\n\ntypedef struct\n{\n    ma_delay_config config;\n    ma_uint32 cursor;               /* Feedback is written to this cursor. Always equal or in front of the read cursor. */\n    ma_uint32 bufferSizeInFrames;\n    float* pBuffer;\n} ma_delay;\n\nMA_API ma_result ma_delay_init(const ma_delay_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_delay* pDelay);\nMA_API void ma_delay_uninit(ma_delay* pDelay, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_delay_process_pcm_frames(ma_delay* pDelay, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount);\nMA_API void ma_delay_set_wet(ma_delay* pDelay, float value);\nMA_API float ma_delay_get_wet(const ma_delay* pDelay);\nMA_API void ma_delay_set_dry(ma_delay* pDelay, float value);\nMA_API float ma_delay_get_dry(const ma_delay* pDelay);\nMA_API void ma_delay_set_decay(ma_delay* pDelay, float value);\nMA_API float ma_delay_get_decay(const ma_delay* pDelay);\n\n\n/* Gainer for smooth volume changes. */\ntypedef struct\n{\n    ma_uint32 channels;\n    ma_uint32 smoothTimeInFrames;\n} ma_gainer_config;\n\nMA_API ma_gainer_config ma_gainer_config_init(ma_uint32 channels, ma_uint32 smoothTimeInFrames);\n\n\ntypedef struct\n{\n    ma_gainer_config config;\n    ma_uint32 t;\n    float masterVolume;\n    float* pOldGains;\n    float* pNewGains;\n\n    /* Memory management. */\n    void* _pHeap;\n    ma_bool32 _ownsHeap;\n} ma_gainer;\n\nMA_API ma_result ma_gainer_get_heap_size(const ma_gainer_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_gainer_init_preallocated(const ma_gainer_config* pConfig, void* pHeap, ma_gainer* pGainer);\nMA_API ma_result ma_gainer_init(const ma_gainer_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_gainer* pGainer);\nMA_API void ma_gainer_uninit(ma_gainer* pGainer, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_result ma_gainer_set_gain(ma_gainer* pGainer, float newGain);\nMA_API ma_result ma_gainer_set_gains(ma_gainer* pGainer, float* pNewGains);\nMA_API ma_result ma_gainer_set_master_volume(ma_gainer* pGainer, float volume);\nMA_API ma_result ma_gainer_get_master_volume(const ma_gainer* pGainer, float* pVolume);\n\n\n\n/* Stereo panner. */\ntypedef enum\n{\n    ma_pan_mode_balance = 0,    /* Does not blend one side with the other. Technically just a balance. Compatible with other popular audio engines and therefore the default. */\n    ma_pan_mode_pan             /* A true pan. The sound from one side will \"move\" to the other side and blend with it. */\n} ma_pan_mode;\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_pan_mode mode;\n    float pan;\n} ma_panner_config;\n\nMA_API ma_panner_config ma_panner_config_init(ma_format format, ma_uint32 channels);\n\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_pan_mode mode;\n    float pan;  /* -1..1 where 0 is no pan, -1 is left side, +1 is right side. Defaults to 0. */\n} ma_panner;\n\nMA_API ma_result ma_panner_init(const ma_panner_config* pConfig, ma_panner* pPanner);\nMA_API ma_result ma_panner_process_pcm_frames(ma_panner* pPanner, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API void ma_panner_set_mode(ma_panner* pPanner, ma_pan_mode mode);\nMA_API ma_pan_mode ma_panner_get_mode(const ma_panner* pPanner);\nMA_API void ma_panner_set_pan(ma_panner* pPanner, float pan);\nMA_API float ma_panner_get_pan(const ma_panner* pPanner);\n\n\n\n/* Fader. */\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n} ma_fader_config;\n\nMA_API ma_fader_config ma_fader_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate);\n\ntypedef struct\n{\n    ma_fader_config config;\n    float volumeBeg;            /* If volumeBeg and volumeEnd is equal to 1, no fading happens (ma_fader_process_pcm_frames() will run as a passthrough). */\n    float volumeEnd;\n    ma_uint64 lengthInFrames;   /* The total length of the fade. */\n    ma_int64  cursorInFrames;   /* The current time in frames. Incremented by ma_fader_process_pcm_frames(). Signed because it'll be offset by startOffsetInFrames in set_fade_ex(). */\n} ma_fader;\n\nMA_API ma_result ma_fader_init(const ma_fader_config* pConfig, ma_fader* pFader);\nMA_API ma_result ma_fader_process_pcm_frames(ma_fader* pFader, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API void ma_fader_get_data_format(const ma_fader* pFader, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate);\nMA_API void ma_fader_set_fade(ma_fader* pFader, float volumeBeg, float volumeEnd, ma_uint64 lengthInFrames);\nMA_API void ma_fader_set_fade_ex(ma_fader* pFader, float volumeBeg, float volumeEnd, ma_uint64 lengthInFrames, ma_int64 startOffsetInFrames);\nMA_API float ma_fader_get_current_volume(const ma_fader* pFader);\n\n\n\n/* Spatializer. */\ntypedef struct\n{\n    float x;\n    float y;\n    float z;\n} ma_vec3f;\n\ntypedef struct\n{\n    ma_vec3f v;\n    ma_spinlock lock;\n} ma_atomic_vec3f;\n\ntypedef enum\n{\n    ma_attenuation_model_none,          /* No distance attenuation and no spatialization. */\n    ma_attenuation_model_inverse,       /* Equivalent to OpenAL's AL_INVERSE_DISTANCE_CLAMPED. */\n    ma_attenuation_model_linear,        /* Linear attenuation. Equivalent to OpenAL's AL_LINEAR_DISTANCE_CLAMPED. */\n    ma_attenuation_model_exponential    /* Exponential attenuation. Equivalent to OpenAL's AL_EXPONENT_DISTANCE_CLAMPED. */\n} ma_attenuation_model;\n\ntypedef enum\n{\n    ma_positioning_absolute,\n    ma_positioning_relative\n} ma_positioning;\n\ntypedef enum\n{\n    ma_handedness_right,\n    ma_handedness_left\n} ma_handedness;\n\n\ntypedef struct\n{\n    ma_uint32 channelsOut;\n    ma_channel* pChannelMapOut;\n    ma_handedness handedness;   /* Defaults to right. Forward is -1 on the Z axis. In a left handed system, forward is +1 on the Z axis. */\n    float coneInnerAngleInRadians;\n    float coneOuterAngleInRadians;\n    float coneOuterGain;\n    float speedOfSound;\n    ma_vec3f worldUp;\n} ma_spatializer_listener_config;\n\nMA_API ma_spatializer_listener_config ma_spatializer_listener_config_init(ma_uint32 channelsOut);\n\n\ntypedef struct\n{\n    ma_spatializer_listener_config config;\n    ma_atomic_vec3f position;  /* The absolute position of the listener. */\n    ma_atomic_vec3f direction; /* The direction the listener is facing. The world up vector is config.worldUp. */\n    ma_atomic_vec3f velocity;\n    ma_bool32 isEnabled;\n\n    /* Memory management. */\n    ma_bool32 _ownsHeap;\n    void* _pHeap;\n} ma_spatializer_listener;\n\nMA_API ma_result ma_spatializer_listener_get_heap_size(const ma_spatializer_listener_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_spatializer_listener_init_preallocated(const ma_spatializer_listener_config* pConfig, void* pHeap, ma_spatializer_listener* pListener);\nMA_API ma_result ma_spatializer_listener_init(const ma_spatializer_listener_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_spatializer_listener* pListener);\nMA_API void ma_spatializer_listener_uninit(ma_spatializer_listener* pListener, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_channel* ma_spatializer_listener_get_channel_map(ma_spatializer_listener* pListener);\nMA_API void ma_spatializer_listener_set_cone(ma_spatializer_listener* pListener, float innerAngleInRadians, float outerAngleInRadians, float outerGain);\nMA_API void ma_spatializer_listener_get_cone(const ma_spatializer_listener* pListener, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain);\nMA_API void ma_spatializer_listener_set_position(ma_spatializer_listener* pListener, float x, float y, float z);\nMA_API ma_vec3f ma_spatializer_listener_get_position(const ma_spatializer_listener* pListener);\nMA_API void ma_spatializer_listener_set_direction(ma_spatializer_listener* pListener, float x, float y, float z);\nMA_API ma_vec3f ma_spatializer_listener_get_direction(const ma_spatializer_listener* pListener);\nMA_API void ma_spatializer_listener_set_velocity(ma_spatializer_listener* pListener, float x, float y, float z);\nMA_API ma_vec3f ma_spatializer_listener_get_velocity(const ma_spatializer_listener* pListener);\nMA_API void ma_spatializer_listener_set_speed_of_sound(ma_spatializer_listener* pListener, float speedOfSound);\nMA_API float ma_spatializer_listener_get_speed_of_sound(const ma_spatializer_listener* pListener);\nMA_API void ma_spatializer_listener_set_world_up(ma_spatializer_listener* pListener, float x, float y, float z);\nMA_API ma_vec3f ma_spatializer_listener_get_world_up(const ma_spatializer_listener* pListener);\nMA_API void ma_spatializer_listener_set_enabled(ma_spatializer_listener* pListener, ma_bool32 isEnabled);\nMA_API ma_bool32 ma_spatializer_listener_is_enabled(const ma_spatializer_listener* pListener);\n\n\ntypedef struct\n{\n    ma_uint32 channelsIn;\n    ma_uint32 channelsOut;\n    ma_channel* pChannelMapIn;\n    ma_attenuation_model attenuationModel;\n    ma_positioning positioning;\n    ma_handedness handedness;           /* Defaults to right. Forward is -1 on the Z axis. In a left handed system, forward is +1 on the Z axis. */\n    float minGain;\n    float maxGain;\n    float minDistance;\n    float maxDistance;\n    float rolloff;\n    float coneInnerAngleInRadians;\n    float coneOuterAngleInRadians;\n    float coneOuterGain;\n    float dopplerFactor;                /* Set to 0 to disable doppler effect. */\n    float directionalAttenuationFactor; /* Set to 0 to disable directional attenuation. */\n    float minSpatializationChannelGain; /* The minimal scaling factor to apply to channel gains when accounting for the direction of the sound relative to the listener. Must be in the range of 0..1. Smaller values means more aggressive directional panning, larger values means more subtle directional panning. */\n    ma_uint32 gainSmoothTimeInFrames;   /* When the gain of a channel changes during spatialization, the transition will be linearly interpolated over this number of frames. */\n} ma_spatializer_config;\n\nMA_API ma_spatializer_config ma_spatializer_config_init(ma_uint32 channelsIn, ma_uint32 channelsOut);\n\n\ntypedef struct\n{\n    ma_uint32 channelsIn;\n    ma_uint32 channelsOut;\n    ma_channel* pChannelMapIn;\n    ma_attenuation_model attenuationModel;\n    ma_positioning positioning;\n    ma_handedness handedness;           /* Defaults to right. Forward is -1 on the Z axis. In a left handed system, forward is +1 on the Z axis. */\n    float minGain;\n    float maxGain;\n    float minDistance;\n    float maxDistance;\n    float rolloff;\n    float coneInnerAngleInRadians;\n    float coneOuterAngleInRadians;\n    float coneOuterGain;\n    float dopplerFactor;                /* Set to 0 to disable doppler effect. */\n    float directionalAttenuationFactor; /* Set to 0 to disable directional attenuation. */\n    ma_uint32 gainSmoothTimeInFrames;   /* When the gain of a channel changes during spatialization, the transition will be linearly interpolated over this number of frames. */\n    ma_atomic_vec3f position;\n    ma_atomic_vec3f direction;\n    ma_atomic_vec3f velocity;  /* For doppler effect. */\n    float dopplerPitch; /* Will be updated by ma_spatializer_process_pcm_frames() and can be used by higher level functions to apply a pitch shift for doppler effect. */\n    float minSpatializationChannelGain;\n    ma_gainer gainer;   /* For smooth gain transitions. */\n    float* pNewChannelGainsOut; /* An offset of _pHeap. Used by ma_spatializer_process_pcm_frames() to store new channel gains. The number of elements in this array is equal to config.channelsOut. */\n\n    /* Memory management. */\n    void* _pHeap;\n    ma_bool32 _ownsHeap;\n} ma_spatializer;\n\nMA_API ma_result ma_spatializer_get_heap_size(const ma_spatializer_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_spatializer_init_preallocated(const ma_spatializer_config* pConfig, void* pHeap, ma_spatializer* pSpatializer);\nMA_API ma_result ma_spatializer_init(const ma_spatializer_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_uninit(ma_spatializer* pSpatializer, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_spatializer_process_pcm_frames(ma_spatializer* pSpatializer, ma_spatializer_listener* pListener, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_result ma_spatializer_set_master_volume(ma_spatializer* pSpatializer, float volume);\nMA_API ma_result ma_spatializer_get_master_volume(const ma_spatializer* pSpatializer, float* pVolume);\nMA_API ma_uint32 ma_spatializer_get_input_channels(const ma_spatializer* pSpatializer);\nMA_API ma_uint32 ma_spatializer_get_output_channels(const ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_set_attenuation_model(ma_spatializer* pSpatializer, ma_attenuation_model attenuationModel);\nMA_API ma_attenuation_model ma_spatializer_get_attenuation_model(const ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_set_positioning(ma_spatializer* pSpatializer, ma_positioning positioning);\nMA_API ma_positioning ma_spatializer_get_positioning(const ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_set_rolloff(ma_spatializer* pSpatializer, float rolloff);\nMA_API float ma_spatializer_get_rolloff(const ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_set_min_gain(ma_spatializer* pSpatializer, float minGain);\nMA_API float ma_spatializer_get_min_gain(const ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_set_max_gain(ma_spatializer* pSpatializer, float maxGain);\nMA_API float ma_spatializer_get_max_gain(const ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_set_min_distance(ma_spatializer* pSpatializer, float minDistance);\nMA_API float ma_spatializer_get_min_distance(const ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_set_max_distance(ma_spatializer* pSpatializer, float maxDistance);\nMA_API float ma_spatializer_get_max_distance(const ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_set_cone(ma_spatializer* pSpatializer, float innerAngleInRadians, float outerAngleInRadians, float outerGain);\nMA_API void ma_spatializer_get_cone(const ma_spatializer* pSpatializer, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain);\nMA_API void ma_spatializer_set_doppler_factor(ma_spatializer* pSpatializer, float dopplerFactor);\nMA_API float ma_spatializer_get_doppler_factor(const ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_set_directional_attenuation_factor(ma_spatializer* pSpatializer, float directionalAttenuationFactor);\nMA_API float ma_spatializer_get_directional_attenuation_factor(const ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_set_position(ma_spatializer* pSpatializer, float x, float y, float z);\nMA_API ma_vec3f ma_spatializer_get_position(const ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_set_direction(ma_spatializer* pSpatializer, float x, float y, float z);\nMA_API ma_vec3f ma_spatializer_get_direction(const ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_set_velocity(ma_spatializer* pSpatializer, float x, float y, float z);\nMA_API ma_vec3f ma_spatializer_get_velocity(const ma_spatializer* pSpatializer);\nMA_API void ma_spatializer_get_relative_position_and_direction(const ma_spatializer* pSpatializer, const ma_spatializer_listener* pListener, ma_vec3f* pRelativePos, ma_vec3f* pRelativeDir);\n\n\n\n/************************************************************************************************************************************************************\n*************************************************************************************************************************************************************\n\nDATA CONVERSION\n===============\n\nThis section contains the APIs for data conversion. You will find everything here for channel mapping, sample format conversion, resampling, etc.\n\n*************************************************************************************************************************************************************\n************************************************************************************************************************************************************/\n\n/**************************************************************************************************************************************************************\n\nResampling\n\n**************************************************************************************************************************************************************/\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRateIn;\n    ma_uint32 sampleRateOut;\n    ma_uint32 lpfOrder;         /* The low-pass filter order. Setting this to 0 will disable low-pass filtering. */\n    double    lpfNyquistFactor; /* 0..1. Defaults to 1. 1 = Half the sampling frequency (Nyquist Frequency), 0.5 = Quarter the sampling frequency (half Nyquest Frequency), etc. */\n} ma_linear_resampler_config;\n\nMA_API ma_linear_resampler_config ma_linear_resampler_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut);\n\ntypedef struct\n{\n    ma_linear_resampler_config config;\n    ma_uint32 inAdvanceInt;\n    ma_uint32 inAdvanceFrac;\n    ma_uint32 inTimeInt;\n    ma_uint32 inTimeFrac;\n    union\n    {\n        float* f32;\n        ma_int16* s16;\n    } x0; /* The previous input frame. */\n    union\n    {\n        float* f32;\n        ma_int16* s16;\n    } x1; /* The next input frame. */\n    ma_lpf lpf;\n\n    /* Memory management. */\n    void* _pHeap;\n    ma_bool32 _ownsHeap;\n} ma_linear_resampler;\n\nMA_API ma_result ma_linear_resampler_get_heap_size(const ma_linear_resampler_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_linear_resampler_init_preallocated(const ma_linear_resampler_config* pConfig, void* pHeap, ma_linear_resampler* pResampler);\nMA_API ma_result ma_linear_resampler_init(const ma_linear_resampler_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_linear_resampler* pResampler);\nMA_API void ma_linear_resampler_uninit(ma_linear_resampler* pResampler, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_linear_resampler_process_pcm_frames(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut);\nMA_API ma_result ma_linear_resampler_set_rate(ma_linear_resampler* pResampler, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut);\nMA_API ma_result ma_linear_resampler_set_rate_ratio(ma_linear_resampler* pResampler, float ratioInOut);\nMA_API ma_uint64 ma_linear_resampler_get_input_latency(const ma_linear_resampler* pResampler);\nMA_API ma_uint64 ma_linear_resampler_get_output_latency(const ma_linear_resampler* pResampler);\nMA_API ma_result ma_linear_resampler_get_required_input_frame_count(const ma_linear_resampler* pResampler, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount);\nMA_API ma_result ma_linear_resampler_get_expected_output_frame_count(const ma_linear_resampler* pResampler, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount);\nMA_API ma_result ma_linear_resampler_reset(ma_linear_resampler* pResampler);\n\n\ntypedef struct ma_resampler_config ma_resampler_config;\n\ntypedef void ma_resampling_backend;\ntypedef struct\n{\n    ma_result (* onGetHeapSize                )(void* pUserData, const ma_resampler_config* pConfig, size_t* pHeapSizeInBytes);\n    ma_result (* onInit                       )(void* pUserData, const ma_resampler_config* pConfig, void* pHeap, ma_resampling_backend** ppBackend);\n    void      (* onUninit                     )(void* pUserData, ma_resampling_backend* pBackend, const ma_allocation_callbacks* pAllocationCallbacks);\n    ma_result (* onProcess                    )(void* pUserData, ma_resampling_backend* pBackend, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut);\n    ma_result (* onSetRate                    )(void* pUserData, ma_resampling_backend* pBackend, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut);                 /* Optional. Rate changes will be disabled. */\n    ma_uint64 (* onGetInputLatency            )(void* pUserData, const ma_resampling_backend* pBackend);                                                            /* Optional. Latency will be reported as 0. */\n    ma_uint64 (* onGetOutputLatency           )(void* pUserData, const ma_resampling_backend* pBackend);                                                            /* Optional. Latency will be reported as 0. */\n    ma_result (* onGetRequiredInputFrameCount )(void* pUserData, const ma_resampling_backend* pBackend, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount);   /* Optional. Latency mitigation will be disabled. */\n    ma_result (* onGetExpectedOutputFrameCount)(void* pUserData, const ma_resampling_backend* pBackend, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount);   /* Optional. Latency mitigation will be disabled. */\n    ma_result (* onReset                      )(void* pUserData, ma_resampling_backend* pBackend);\n} ma_resampling_backend_vtable;\n\ntypedef enum\n{\n    ma_resample_algorithm_linear = 0,    /* Fastest, lowest quality. Optional low-pass filtering. Default. */\n    ma_resample_algorithm_custom,\n} ma_resample_algorithm;\n\nstruct ma_resampler_config\n{\n    ma_format format;   /* Must be either ma_format_f32 or ma_format_s16. */\n    ma_uint32 channels;\n    ma_uint32 sampleRateIn;\n    ma_uint32 sampleRateOut;\n    ma_resample_algorithm algorithm;    /* When set to ma_resample_algorithm_custom, pBackendVTable will be used. */\n    ma_resampling_backend_vtable* pBackendVTable;\n    void* pBackendUserData;\n    struct\n    {\n        ma_uint32 lpfOrder;\n    } linear;\n};\n\nMA_API ma_resampler_config ma_resampler_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut, ma_resample_algorithm algorithm);\n\ntypedef struct\n{\n    ma_resampling_backend* pBackend;\n    ma_resampling_backend_vtable* pBackendVTable;\n    void* pBackendUserData;\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRateIn;\n    ma_uint32 sampleRateOut;\n    union\n    {\n        ma_linear_resampler linear;\n    } state;    /* State for stock resamplers so we can avoid a malloc. For stock resamplers, pBackend will point here. */\n\n    /* Memory management. */\n    void* _pHeap;\n    ma_bool32 _ownsHeap;\n} ma_resampler;\n\nMA_API ma_result ma_resampler_get_heap_size(const ma_resampler_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_resampler_init_preallocated(const ma_resampler_config* pConfig, void* pHeap, ma_resampler* pResampler);\n\n/*\nInitializes a new resampler object from a config.\n*/\nMA_API ma_result ma_resampler_init(const ma_resampler_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_resampler* pResampler);\n\n/*\nUninitializes a resampler.\n*/\nMA_API void ma_resampler_uninit(ma_resampler* pResampler, const ma_allocation_callbacks* pAllocationCallbacks);\n\n/*\nConverts the given input data.\n\nBoth the input and output frames must be in the format specified in the config when the resampler was initialized.\n\nOn input, [pFrameCountOut] contains the number of output frames to process. On output it contains the number of output frames that\nwere actually processed, which may be less than the requested amount which will happen if there's not enough input data. You can use\nma_resampler_get_expected_output_frame_count() to know how many output frames will be processed for a given number of input frames.\n\nOn input, [pFrameCountIn] contains the number of input frames contained in [pFramesIn]. On output it contains the number of whole\ninput frames that were actually processed. You can use ma_resampler_get_required_input_frame_count() to know how many input frames\nyou should provide for a given number of output frames. [pFramesIn] can be NULL, in which case zeroes will be used instead.\n\nIf [pFramesOut] is NULL, a seek is performed. In this case, if [pFrameCountOut] is not NULL it will seek by the specified number of\noutput frames. Otherwise, if [pFramesCountOut] is NULL and [pFrameCountIn] is not NULL, it will seek by the specified number of input\nframes. When seeking, [pFramesIn] is allowed to NULL, in which case the internal timing state will be updated, but no input will be\nprocessed. In this case, any internal filter state will be updated as if zeroes were passed in.\n\nIt is an error for [pFramesOut] to be non-NULL and [pFrameCountOut] to be NULL.\n\nIt is an error for both [pFrameCountOut] and [pFrameCountIn] to be NULL.\n*/\nMA_API ma_result ma_resampler_process_pcm_frames(ma_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut);\n\n\n/*\nSets the input and output sample rate.\n*/\nMA_API ma_result ma_resampler_set_rate(ma_resampler* pResampler, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut);\n\n/*\nSets the input and output sample rate as a ratio.\n\nThe ration is in/out.\n*/\nMA_API ma_result ma_resampler_set_rate_ratio(ma_resampler* pResampler, float ratio);\n\n/*\nRetrieves the latency introduced by the resampler in input frames.\n*/\nMA_API ma_uint64 ma_resampler_get_input_latency(const ma_resampler* pResampler);\n\n/*\nRetrieves the latency introduced by the resampler in output frames.\n*/\nMA_API ma_uint64 ma_resampler_get_output_latency(const ma_resampler* pResampler);\n\n/*\nCalculates the number of whole input frames that would need to be read from the client in order to output the specified\nnumber of output frames.\n\nThe returned value does not include cached input frames. It only returns the number of extra frames that would need to be\nread from the input buffer in order to output the specified number of output frames.\n*/\nMA_API ma_result ma_resampler_get_required_input_frame_count(const ma_resampler* pResampler, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount);\n\n/*\nCalculates the number of whole output frames that would be output after fully reading and consuming the specified number of\ninput frames.\n*/\nMA_API ma_result ma_resampler_get_expected_output_frame_count(const ma_resampler* pResampler, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount);\n\n/*\nResets the resampler's timer and clears it's internal cache.\n*/\nMA_API ma_result ma_resampler_reset(ma_resampler* pResampler);\n\n\n/**************************************************************************************************************************************************************\n\nChannel Conversion\n\n**************************************************************************************************************************************************************/\ntypedef enum\n{\n    ma_channel_conversion_path_unknown,\n    ma_channel_conversion_path_passthrough,\n    ma_channel_conversion_path_mono_out,    /* Converting to mono. */\n    ma_channel_conversion_path_mono_in,     /* Converting from mono. */\n    ma_channel_conversion_path_shuffle,     /* Simple shuffle. Will use this when all channels are present in both input and output channel maps, but just in a different order. */\n    ma_channel_conversion_path_weights      /* Blended based on weights. */\n} ma_channel_conversion_path;\n\ntypedef enum\n{\n    ma_mono_expansion_mode_duplicate = 0,   /* The default. */\n    ma_mono_expansion_mode_average,         /* Average the mono channel across all channels. */\n    ma_mono_expansion_mode_stereo_only,     /* Duplicate to the left and right channels only and ignore the others. */\n    ma_mono_expansion_mode_default = ma_mono_expansion_mode_duplicate\n} ma_mono_expansion_mode;\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channelsIn;\n    ma_uint32 channelsOut;\n    const ma_channel* pChannelMapIn;\n    const ma_channel* pChannelMapOut;\n    ma_channel_mix_mode mixingMode;\n    ma_bool32 calculateLFEFromSpatialChannels;  /* When an output LFE channel is present, but no input LFE, set to true to set the output LFE to the average of all spatial channels (LR, FR, etc.). Ignored when an input LFE is present. */\n    float** ppWeights;  /* [in][out]. Only used when mixingMode is set to ma_channel_mix_mode_custom_weights. */\n} ma_channel_converter_config;\n\nMA_API ma_channel_converter_config ma_channel_converter_config_init(ma_format format, ma_uint32 channelsIn, const ma_channel* pChannelMapIn, ma_uint32 channelsOut, const ma_channel* pChannelMapOut, ma_channel_mix_mode mixingMode);\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channelsIn;\n    ma_uint32 channelsOut;\n    ma_channel_mix_mode mixingMode;\n    ma_channel_conversion_path conversionPath;\n    ma_channel* pChannelMapIn;\n    ma_channel* pChannelMapOut;\n    ma_uint8* pShuffleTable;    /* Indexed by output channel index. */\n    union\n    {\n        float**    f32;\n        ma_int32** s16;\n    } weights;  /* [in][out] */\n\n    /* Memory management. */\n    void* _pHeap;\n    ma_bool32 _ownsHeap;\n} ma_channel_converter;\n\nMA_API ma_result ma_channel_converter_get_heap_size(const ma_channel_converter_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_channel_converter_init_preallocated(const ma_channel_converter_config* pConfig, void* pHeap, ma_channel_converter* pConverter);\nMA_API ma_result ma_channel_converter_init(const ma_channel_converter_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_channel_converter* pConverter);\nMA_API void ma_channel_converter_uninit(ma_channel_converter* pConverter, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_channel_converter_process_pcm_frames(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount);\nMA_API ma_result ma_channel_converter_get_input_channel_map(const ma_channel_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap);\nMA_API ma_result ma_channel_converter_get_output_channel_map(const ma_channel_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap);\n\n\n/**************************************************************************************************************************************************************\n\nData Conversion\n\n**************************************************************************************************************************************************************/\ntypedef struct\n{\n    ma_format formatIn;\n    ma_format formatOut;\n    ma_uint32 channelsIn;\n    ma_uint32 channelsOut;\n    ma_uint32 sampleRateIn;\n    ma_uint32 sampleRateOut;\n    ma_channel* pChannelMapIn;\n    ma_channel* pChannelMapOut;\n    ma_dither_mode ditherMode;\n    ma_channel_mix_mode channelMixMode;\n    ma_bool32 calculateLFEFromSpatialChannels;  /* When an output LFE channel is present, but no input LFE, set to true to set the output LFE to the average of all spatial channels (LR, FR, etc.). Ignored when an input LFE is present. */\n    float** ppChannelWeights;  /* [in][out]. Only used when mixingMode is set to ma_channel_mix_mode_custom_weights. */\n    ma_bool32 allowDynamicSampleRate;\n    ma_resampler_config resampling;\n} ma_data_converter_config;\n\nMA_API ma_data_converter_config ma_data_converter_config_init_default(void);\nMA_API ma_data_converter_config ma_data_converter_config_init(ma_format formatIn, ma_format formatOut, ma_uint32 channelsIn, ma_uint32 channelsOut, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut);\n\n\ntypedef enum\n{\n    ma_data_converter_execution_path_passthrough,       /* No conversion. */\n    ma_data_converter_execution_path_format_only,       /* Only format conversion. */\n    ma_data_converter_execution_path_channels_only,     /* Only channel conversion. */\n    ma_data_converter_execution_path_resample_only,     /* Only resampling. */\n    ma_data_converter_execution_path_resample_first,    /* All conversions, but resample as the first step. */\n    ma_data_converter_execution_path_channels_first     /* All conversions, but channels as the first step. */\n} ma_data_converter_execution_path;\n\ntypedef struct\n{\n    ma_format formatIn;\n    ma_format formatOut;\n    ma_uint32 channelsIn;\n    ma_uint32 channelsOut;\n    ma_uint32 sampleRateIn;\n    ma_uint32 sampleRateOut;\n    ma_dither_mode ditherMode;\n    ma_data_converter_execution_path executionPath; /* The execution path the data converter will follow when processing. */\n    ma_channel_converter channelConverter;\n    ma_resampler resampler;\n    ma_bool8 hasPreFormatConversion;\n    ma_bool8 hasPostFormatConversion;\n    ma_bool8 hasChannelConverter;\n    ma_bool8 hasResampler;\n    ma_bool8 isPassthrough;\n\n    /* Memory management. */\n    ma_bool8 _ownsHeap;\n    void* _pHeap;\n} ma_data_converter;\n\nMA_API ma_result ma_data_converter_get_heap_size(const ma_data_converter_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_data_converter_init_preallocated(const ma_data_converter_config* pConfig, void* pHeap, ma_data_converter* pConverter);\nMA_API ma_result ma_data_converter_init(const ma_data_converter_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_converter* pConverter);\nMA_API void ma_data_converter_uninit(ma_data_converter* pConverter, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_data_converter_process_pcm_frames(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut);\nMA_API ma_result ma_data_converter_set_rate(ma_data_converter* pConverter, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut);\nMA_API ma_result ma_data_converter_set_rate_ratio(ma_data_converter* pConverter, float ratioInOut);\nMA_API ma_uint64 ma_data_converter_get_input_latency(const ma_data_converter* pConverter);\nMA_API ma_uint64 ma_data_converter_get_output_latency(const ma_data_converter* pConverter);\nMA_API ma_result ma_data_converter_get_required_input_frame_count(const ma_data_converter* pConverter, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount);\nMA_API ma_result ma_data_converter_get_expected_output_frame_count(const ma_data_converter* pConverter, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount);\nMA_API ma_result ma_data_converter_get_input_channel_map(const ma_data_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap);\nMA_API ma_result ma_data_converter_get_output_channel_map(const ma_data_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap);\nMA_API ma_result ma_data_converter_reset(ma_data_converter* pConverter);\n\n\n/************************************************************************************************************************************************************\n\nFormat Conversion\n\n************************************************************************************************************************************************************/\nMA_API void ma_pcm_u8_to_s16(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_u8_to_s24(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_u8_to_s32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_u8_to_f32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_s16_to_u8(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_s16_to_s24(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_s16_to_s32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_s16_to_f32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_s24_to_u8(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_s24_to_s16(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_s24_to_s32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_s24_to_f32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_s32_to_u8(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_s32_to_s16(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_s32_to_s24(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_s32_to_f32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_f32_to_u8(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_f32_to_s16(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_f32_to_s24(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_f32_to_s32(void* pOut, const void* pIn, ma_uint64 count, ma_dither_mode ditherMode);\nMA_API void ma_pcm_convert(void* pOut, ma_format formatOut, const void* pIn, ma_format formatIn, ma_uint64 sampleCount, ma_dither_mode ditherMode);\nMA_API void ma_convert_pcm_frames_format(void* pOut, ma_format formatOut, const void* pIn, ma_format formatIn, ma_uint64 frameCount, ma_uint32 channels, ma_dither_mode ditherMode);\n\n/*\nDeinterleaves an interleaved buffer.\n*/\nMA_API void ma_deinterleave_pcm_frames(ma_format format, ma_uint32 channels, ma_uint64 frameCount, const void* pInterleavedPCMFrames, void** ppDeinterleavedPCMFrames);\n\n/*\nInterleaves a group of deinterleaved buffers.\n*/\nMA_API void ma_interleave_pcm_frames(ma_format format, ma_uint32 channels, ma_uint64 frameCount, const void** ppDeinterleavedPCMFrames, void* pInterleavedPCMFrames);\n\n\n/************************************************************************************************************************************************************\n\nChannel Maps\n\n************************************************************************************************************************************************************/\n/*\nThis is used in the shuffle table to indicate that the channel index is undefined and should be ignored.\n*/\n#define MA_CHANNEL_INDEX_NULL   255\n\n/*\nRetrieves the channel position of the specified channel in the given channel map.\n\nThe pChannelMap parameter can be null, in which case miniaudio's default channel map will be assumed.\n*/\nMA_API ma_channel ma_channel_map_get_channel(const ma_channel* pChannelMap, ma_uint32 channelCount, ma_uint32 channelIndex);\n\n/*\nInitializes a blank channel map.\n\nWhen a blank channel map is specified anywhere it indicates that the native channel map should be used.\n*/\nMA_API void ma_channel_map_init_blank(ma_channel* pChannelMap, ma_uint32 channels);\n\n/*\nHelper for retrieving a standard channel map.\n\nThe output channel map buffer must have a capacity of at least `channelMapCap`.\n*/\nMA_API void ma_channel_map_init_standard(ma_standard_channel_map standardChannelMap, ma_channel* pChannelMap, size_t channelMapCap, ma_uint32 channels);\n\n/*\nCopies a channel map.\n\nBoth input and output channel map buffers must have a capacity of at at least `channels`.\n*/\nMA_API void ma_channel_map_copy(ma_channel* pOut, const ma_channel* pIn, ma_uint32 channels);\n\n/*\nCopies a channel map if one is specified, otherwise copies the default channel map.\n\nThe output buffer must have a capacity of at least `channels`. If not NULL, the input channel map must also have a capacity of at least `channels`.\n*/\nMA_API void ma_channel_map_copy_or_default(ma_channel* pOut, size_t channelMapCapOut, const ma_channel* pIn, ma_uint32 channels);\n\n\n/*\nDetermines whether or not a channel map is valid.\n\nA blank channel map is valid (all channels set to MA_CHANNEL_NONE). The way a blank channel map is handled is context specific, but\nis usually treated as a passthrough.\n\nInvalid channel maps:\n  - A channel map with no channels\n  - A channel map with more than one channel and a mono channel\n\nThe channel map buffer must have a capacity of at least `channels`.\n*/\nMA_API ma_bool32 ma_channel_map_is_valid(const ma_channel* pChannelMap, ma_uint32 channels);\n\n/*\nHelper for comparing two channel maps for equality.\n\nThis assumes the channel count is the same between the two.\n\nBoth channels map buffers must have a capacity of at least `channels`.\n*/\nMA_API ma_bool32 ma_channel_map_is_equal(const ma_channel* pChannelMapA, const ma_channel* pChannelMapB, ma_uint32 channels);\n\n/*\nHelper for determining if a channel map is blank (all channels set to MA_CHANNEL_NONE).\n\nThe channel map buffer must have a capacity of at least `channels`.\n*/\nMA_API ma_bool32 ma_channel_map_is_blank(const ma_channel* pChannelMap, ma_uint32 channels);\n\n/*\nHelper for determining whether or not a channel is present in the given channel map.\n\nThe channel map buffer must have a capacity of at least `channels`.\n*/\nMA_API ma_bool32 ma_channel_map_contains_channel_position(ma_uint32 channels, const ma_channel* pChannelMap, ma_channel channelPosition);\n\n/*\nFind a channel position in the given channel map. Returns MA_TRUE if the channel is found; MA_FALSE otherwise. The\nindex of the channel is output to `pChannelIndex`.\n\nThe channel map buffer must have a capacity of at least `channels`.\n*/\nMA_API ma_bool32 ma_channel_map_find_channel_position(ma_uint32 channels, const ma_channel* pChannelMap, ma_channel channelPosition, ma_uint32* pChannelIndex);\n\n/*\nGenerates a string representing the given channel map.\n\nThis is for printing and debugging purposes, not serialization/deserialization.\n\nReturns the length of the string, not including the null terminator.\n*/\nMA_API size_t ma_channel_map_to_string(const ma_channel* pChannelMap, ma_uint32 channels, char* pBufferOut, size_t bufferCap);\n\n/*\nRetrieves a human readable version of a channel position.\n*/\nMA_API const char* ma_channel_position_to_string(ma_channel channel);\n\n\n/************************************************************************************************************************************************************\n\nConversion Helpers\n\n************************************************************************************************************************************************************/\n\n/*\nHigh-level helper for doing a full format conversion in one go. Returns the number of output frames. Call this with pOut set to NULL to\ndetermine the required size of the output buffer. frameCountOut should be set to the capacity of pOut. If pOut is NULL, frameCountOut is\nignored.\n\nA return value of 0 indicates an error.\n\nThis function is useful for one-off bulk conversions, but if you're streaming data you should use the ma_data_converter APIs instead.\n*/\nMA_API ma_uint64 ma_convert_frames(void* pOut, ma_uint64 frameCountOut, ma_format formatOut, ma_uint32 channelsOut, ma_uint32 sampleRateOut, const void* pIn, ma_uint64 frameCountIn, ma_format formatIn, ma_uint32 channelsIn, ma_uint32 sampleRateIn);\nMA_API ma_uint64 ma_convert_frames_ex(void* pOut, ma_uint64 frameCountOut, const void* pIn, ma_uint64 frameCountIn, const ma_data_converter_config* pConfig);\n\n\n/************************************************************************************************************************************************************\n\nData Source\n\n************************************************************************************************************************************************************/\ntypedef void ma_data_source;\n\n#define MA_DATA_SOURCE_SELF_MANAGED_RANGE_AND_LOOP_POINT    0x00000001\n\ntypedef struct\n{\n    ma_result (* onRead)(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\n    ma_result (* onSeek)(ma_data_source* pDataSource, ma_uint64 frameIndex);\n    ma_result (* onGetDataFormat)(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);\n    ma_result (* onGetCursor)(ma_data_source* pDataSource, ma_uint64* pCursor);\n    ma_result (* onGetLength)(ma_data_source* pDataSource, ma_uint64* pLength);\n    ma_result (* onSetLooping)(ma_data_source* pDataSource, ma_bool32 isLooping);\n    ma_uint32 flags;\n} ma_data_source_vtable;\n\ntypedef ma_data_source* (* ma_data_source_get_next_proc)(ma_data_source* pDataSource);\n\ntypedef struct\n{\n    const ma_data_source_vtable* vtable;\n} ma_data_source_config;\n\nMA_API ma_data_source_config ma_data_source_config_init(void);\n\n\ntypedef struct\n{\n    const ma_data_source_vtable* vtable;\n    ma_uint64 rangeBegInFrames;\n    ma_uint64 rangeEndInFrames;             /* Set to -1 for unranged (default). */\n    ma_uint64 loopBegInFrames;              /* Relative to rangeBegInFrames. */\n    ma_uint64 loopEndInFrames;              /* Relative to rangeBegInFrames. Set to -1 for the end of the range. */\n    ma_data_source* pCurrent;               /* When non-NULL, the data source being initialized will act as a proxy and will route all operations to pCurrent. Used in conjunction with pNext/onGetNext for seamless chaining. */\n    ma_data_source* pNext;                  /* When set to NULL, onGetNext will be used. */\n    ma_data_source_get_next_proc onGetNext; /* Will be used when pNext is NULL. If both are NULL, no next will be used. */\n    MA_ATOMIC(4, ma_bool32) isLooping;\n} ma_data_source_base;\n\nMA_API ma_result ma_data_source_init(const ma_data_source_config* pConfig, ma_data_source* pDataSource);\nMA_API void ma_data_source_uninit(ma_data_source* pDataSource);\nMA_API ma_result ma_data_source_read_pcm_frames(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);   /* Must support pFramesOut = NULL in which case a forward seek should be performed. */\nMA_API ma_result ma_data_source_seek_pcm_frames(ma_data_source* pDataSource, ma_uint64 frameCount, ma_uint64* pFramesSeeked); /* Can only seek forward. Equivalent to ma_data_source_read_pcm_frames(pDataSource, NULL, frameCount, &framesRead); */\nMA_API ma_result ma_data_source_seek_to_pcm_frame(ma_data_source* pDataSource, ma_uint64 frameIndex);\nMA_API ma_result ma_data_source_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);\nMA_API ma_result ma_data_source_get_cursor_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pCursor);\nMA_API ma_result ma_data_source_get_length_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pLength);    /* Returns MA_NOT_IMPLEMENTED if the length is unknown or cannot be determined. Decoders can return this. */\nMA_API ma_result ma_data_source_get_cursor_in_seconds(ma_data_source* pDataSource, float* pCursor);\nMA_API ma_result ma_data_source_get_length_in_seconds(ma_data_source* pDataSource, float* pLength);\nMA_API ma_result ma_data_source_set_looping(ma_data_source* pDataSource, ma_bool32 isLooping);\nMA_API ma_bool32 ma_data_source_is_looping(const ma_data_source* pDataSource);\nMA_API ma_result ma_data_source_set_range_in_pcm_frames(ma_data_source* pDataSource, ma_uint64 rangeBegInFrames, ma_uint64 rangeEndInFrames);\nMA_API void ma_data_source_get_range_in_pcm_frames(const ma_data_source* pDataSource, ma_uint64* pRangeBegInFrames, ma_uint64* pRangeEndInFrames);\nMA_API ma_result ma_data_source_set_loop_point_in_pcm_frames(ma_data_source* pDataSource, ma_uint64 loopBegInFrames, ma_uint64 loopEndInFrames);\nMA_API void ma_data_source_get_loop_point_in_pcm_frames(const ma_data_source* pDataSource, ma_uint64* pLoopBegInFrames, ma_uint64* pLoopEndInFrames);\nMA_API ma_result ma_data_source_set_current(ma_data_source* pDataSource, ma_data_source* pCurrentDataSource);\nMA_API ma_data_source* ma_data_source_get_current(const ma_data_source* pDataSource);\nMA_API ma_result ma_data_source_set_next(ma_data_source* pDataSource, ma_data_source* pNextDataSource);\nMA_API ma_data_source* ma_data_source_get_next(const ma_data_source* pDataSource);\nMA_API ma_result ma_data_source_set_next_callback(ma_data_source* pDataSource, ma_data_source_get_next_proc onGetNext);\nMA_API ma_data_source_get_next_proc ma_data_source_get_next_callback(const ma_data_source* pDataSource);\n\n\ntypedef struct\n{\n    ma_data_source_base ds;\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    ma_uint64 cursor;\n    ma_uint64 sizeInFrames;\n    const void* pData;\n} ma_audio_buffer_ref;\n\nMA_API ma_result ma_audio_buffer_ref_init(ma_format format, ma_uint32 channels, const void* pData, ma_uint64 sizeInFrames, ma_audio_buffer_ref* pAudioBufferRef);\nMA_API void ma_audio_buffer_ref_uninit(ma_audio_buffer_ref* pAudioBufferRef);\nMA_API ma_result ma_audio_buffer_ref_set_data(ma_audio_buffer_ref* pAudioBufferRef, const void* pData, ma_uint64 sizeInFrames);\nMA_API ma_uint64 ma_audio_buffer_ref_read_pcm_frames(ma_audio_buffer_ref* pAudioBufferRef, void* pFramesOut, ma_uint64 frameCount, ma_bool32 loop);\nMA_API ma_result ma_audio_buffer_ref_seek_to_pcm_frame(ma_audio_buffer_ref* pAudioBufferRef, ma_uint64 frameIndex);\nMA_API ma_result ma_audio_buffer_ref_map(ma_audio_buffer_ref* pAudioBufferRef, void** ppFramesOut, ma_uint64* pFrameCount);\nMA_API ma_result ma_audio_buffer_ref_unmap(ma_audio_buffer_ref* pAudioBufferRef, ma_uint64 frameCount);    /* Returns MA_AT_END if the end has been reached. This should be considered successful. */\nMA_API ma_bool32 ma_audio_buffer_ref_at_end(const ma_audio_buffer_ref* pAudioBufferRef);\nMA_API ma_result ma_audio_buffer_ref_get_cursor_in_pcm_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pCursor);\nMA_API ma_result ma_audio_buffer_ref_get_length_in_pcm_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pLength);\nMA_API ma_result ma_audio_buffer_ref_get_available_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pAvailableFrames);\n\n\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    ma_uint64 sizeInFrames;\n    const void* pData;  /* If set to NULL, will allocate a block of memory for you. */\n    ma_allocation_callbacks allocationCallbacks;\n} ma_audio_buffer_config;\n\nMA_API ma_audio_buffer_config ma_audio_buffer_config_init(ma_format format, ma_uint32 channels, ma_uint64 sizeInFrames, const void* pData, const ma_allocation_callbacks* pAllocationCallbacks);\n\ntypedef struct\n{\n    ma_audio_buffer_ref ref;\n    ma_allocation_callbacks allocationCallbacks;\n    ma_bool32 ownsData;             /* Used to control whether or not miniaudio owns the data buffer. If set to true, pData will be freed in ma_audio_buffer_uninit(). */\n    ma_uint8 _pExtraData[1];        /* For allocating a buffer with the memory located directly after the other memory of the structure. */\n} ma_audio_buffer;\n\nMA_API ma_result ma_audio_buffer_init(const ma_audio_buffer_config* pConfig, ma_audio_buffer* pAudioBuffer);\nMA_API ma_result ma_audio_buffer_init_copy(const ma_audio_buffer_config* pConfig, ma_audio_buffer* pAudioBuffer);\nMA_API ma_result ma_audio_buffer_alloc_and_init(const ma_audio_buffer_config* pConfig, ma_audio_buffer** ppAudioBuffer);  /* Always copies the data. Doesn't make sense to use this otherwise. Use ma_audio_buffer_uninit_and_free() to uninit. */\nMA_API void ma_audio_buffer_uninit(ma_audio_buffer* pAudioBuffer);\nMA_API void ma_audio_buffer_uninit_and_free(ma_audio_buffer* pAudioBuffer);\nMA_API ma_uint64 ma_audio_buffer_read_pcm_frames(ma_audio_buffer* pAudioBuffer, void* pFramesOut, ma_uint64 frameCount, ma_bool32 loop);\nMA_API ma_result ma_audio_buffer_seek_to_pcm_frame(ma_audio_buffer* pAudioBuffer, ma_uint64 frameIndex);\nMA_API ma_result ma_audio_buffer_map(ma_audio_buffer* pAudioBuffer, void** ppFramesOut, ma_uint64* pFrameCount);\nMA_API ma_result ma_audio_buffer_unmap(ma_audio_buffer* pAudioBuffer, ma_uint64 frameCount);    /* Returns MA_AT_END if the end has been reached. This should be considered successful. */\nMA_API ma_bool32 ma_audio_buffer_at_end(const ma_audio_buffer* pAudioBuffer);\nMA_API ma_result ma_audio_buffer_get_cursor_in_pcm_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pCursor);\nMA_API ma_result ma_audio_buffer_get_length_in_pcm_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pLength);\nMA_API ma_result ma_audio_buffer_get_available_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pAvailableFrames);\n\n\n/*\nPaged Audio Buffer\n==================\nA paged audio buffer is made up of a linked list of pages. It's expandable, but not shrinkable. It\ncan be used for cases where audio data is streamed in asynchronously while allowing data to be read\nat the same time.\n\nThis is lock-free, but not 100% thread safe. You can append a page and read from the buffer across\nsimultaneously across different threads, however only one thread at a time can append, and only one\nthread at a time can read and seek.\n*/\ntypedef struct ma_paged_audio_buffer_page ma_paged_audio_buffer_page;\nstruct ma_paged_audio_buffer_page\n{\n    MA_ATOMIC(MA_SIZEOF_PTR, ma_paged_audio_buffer_page*) pNext;\n    ma_uint64 sizeInFrames;\n    ma_uint8 pAudioData[1];\n};\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_paged_audio_buffer_page head;                                /* Dummy head for the lock-free algorithm. Always has a size of 0. */\n    MA_ATOMIC(MA_SIZEOF_PTR, ma_paged_audio_buffer_page*) pTail;    /* Never null. Initially set to &head. */\n} ma_paged_audio_buffer_data;\n\nMA_API ma_result ma_paged_audio_buffer_data_init(ma_format format, ma_uint32 channels, ma_paged_audio_buffer_data* pData);\nMA_API void ma_paged_audio_buffer_data_uninit(ma_paged_audio_buffer_data* pData, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_paged_audio_buffer_page* ma_paged_audio_buffer_data_get_head(ma_paged_audio_buffer_data* pData);\nMA_API ma_paged_audio_buffer_page* ma_paged_audio_buffer_data_get_tail(ma_paged_audio_buffer_data* pData);\nMA_API ma_result ma_paged_audio_buffer_data_get_length_in_pcm_frames(ma_paged_audio_buffer_data* pData, ma_uint64* pLength);\nMA_API ma_result ma_paged_audio_buffer_data_allocate_page(ma_paged_audio_buffer_data* pData, ma_uint64 pageSizeInFrames, const void* pInitialData, const ma_allocation_callbacks* pAllocationCallbacks, ma_paged_audio_buffer_page** ppPage);\nMA_API ma_result ma_paged_audio_buffer_data_free_page(ma_paged_audio_buffer_data* pData, ma_paged_audio_buffer_page* pPage, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_paged_audio_buffer_data_append_page(ma_paged_audio_buffer_data* pData, ma_paged_audio_buffer_page* pPage);\nMA_API ma_result ma_paged_audio_buffer_data_allocate_and_append_page(ma_paged_audio_buffer_data* pData, ma_uint32 pageSizeInFrames, const void* pInitialData, const ma_allocation_callbacks* pAllocationCallbacks);\n\n\ntypedef struct\n{\n    ma_paged_audio_buffer_data* pData;  /* Must not be null. */\n} ma_paged_audio_buffer_config;\n\nMA_API ma_paged_audio_buffer_config ma_paged_audio_buffer_config_init(ma_paged_audio_buffer_data* pData);\n\n\ntypedef struct\n{\n    ma_data_source_base ds;\n    ma_paged_audio_buffer_data* pData;              /* Audio data is read from here. Cannot be null. */\n    ma_paged_audio_buffer_page* pCurrent;\n    ma_uint64 relativeCursor;                       /* Relative to the current page. */\n    ma_uint64 absoluteCursor;\n} ma_paged_audio_buffer;\n\nMA_API ma_result ma_paged_audio_buffer_init(const ma_paged_audio_buffer_config* pConfig, ma_paged_audio_buffer* pPagedAudioBuffer);\nMA_API void ma_paged_audio_buffer_uninit(ma_paged_audio_buffer* pPagedAudioBuffer);\nMA_API ma_result ma_paged_audio_buffer_read_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);   /* Returns MA_AT_END if no more pages available. */\nMA_API ma_result ma_paged_audio_buffer_seek_to_pcm_frame(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64 frameIndex);\nMA_API ma_result ma_paged_audio_buffer_get_cursor_in_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64* pCursor);\nMA_API ma_result ma_paged_audio_buffer_get_length_in_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64* pLength);\n\n\n\n/************************************************************************************************************************************************************\n\nRing Buffer\n\n************************************************************************************************************************************************************/\ntypedef struct\n{\n    void* pBuffer;\n    ma_uint32 subbufferSizeInBytes;\n    ma_uint32 subbufferCount;\n    ma_uint32 subbufferStrideInBytes;\n    MA_ATOMIC(4, ma_uint32) encodedReadOffset;  /* Most significant bit is the loop flag. Lower 31 bits contains the actual offset in bytes. Must be used atomically. */\n    MA_ATOMIC(4, ma_uint32) encodedWriteOffset; /* Most significant bit is the loop flag. Lower 31 bits contains the actual offset in bytes. Must be used atomically. */\n    ma_bool8 ownsBuffer;                        /* Used to know whether or not miniaudio is responsible for free()-ing the buffer. */\n    ma_bool8 clearOnWriteAcquire;               /* When set, clears the acquired write buffer before returning from ma_rb_acquire_write(). */\n    ma_allocation_callbacks allocationCallbacks;\n} ma_rb;\n\nMA_API ma_result ma_rb_init_ex(size_t subbufferSizeInBytes, size_t subbufferCount, size_t subbufferStrideInBytes, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_rb* pRB);\nMA_API ma_result ma_rb_init(size_t bufferSizeInBytes, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_rb* pRB);\nMA_API void ma_rb_uninit(ma_rb* pRB);\nMA_API void ma_rb_reset(ma_rb* pRB);\nMA_API ma_result ma_rb_acquire_read(ma_rb* pRB, size_t* pSizeInBytes, void** ppBufferOut);\nMA_API ma_result ma_rb_commit_read(ma_rb* pRB, size_t sizeInBytes);\nMA_API ma_result ma_rb_acquire_write(ma_rb* pRB, size_t* pSizeInBytes, void** ppBufferOut);\nMA_API ma_result ma_rb_commit_write(ma_rb* pRB, size_t sizeInBytes);\nMA_API ma_result ma_rb_seek_read(ma_rb* pRB, size_t offsetInBytes);\nMA_API ma_result ma_rb_seek_write(ma_rb* pRB, size_t offsetInBytes);\nMA_API ma_int32 ma_rb_pointer_distance(ma_rb* pRB);    /* Returns the distance between the write pointer and the read pointer. Should never be negative for a correct program. Will return the number of bytes that can be read before the read pointer hits the write pointer. */\nMA_API ma_uint32 ma_rb_available_read(ma_rb* pRB);\nMA_API ma_uint32 ma_rb_available_write(ma_rb* pRB);\nMA_API size_t ma_rb_get_subbuffer_size(ma_rb* pRB);\nMA_API size_t ma_rb_get_subbuffer_stride(ma_rb* pRB);\nMA_API size_t ma_rb_get_subbuffer_offset(ma_rb* pRB, size_t subbufferIndex);\nMA_API void* ma_rb_get_subbuffer_ptr(ma_rb* pRB, size_t subbufferIndex, void* pBuffer);\n\n\ntypedef struct\n{\n    ma_data_source_base ds;\n    ma_rb rb;\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate; /* Not required for the ring buffer itself, but useful for associating the data with some sample rate, particularly for data sources. */\n} ma_pcm_rb;\n\nMA_API ma_result ma_pcm_rb_init_ex(ma_format format, ma_uint32 channels, ma_uint32 subbufferSizeInFrames, ma_uint32 subbufferCount, ma_uint32 subbufferStrideInFrames, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_pcm_rb* pRB);\nMA_API ma_result ma_pcm_rb_init(ma_format format, ma_uint32 channels, ma_uint32 bufferSizeInFrames, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_pcm_rb* pRB);\nMA_API void ma_pcm_rb_uninit(ma_pcm_rb* pRB);\nMA_API void ma_pcm_rb_reset(ma_pcm_rb* pRB);\nMA_API ma_result ma_pcm_rb_acquire_read(ma_pcm_rb* pRB, ma_uint32* pSizeInFrames, void** ppBufferOut);\nMA_API ma_result ma_pcm_rb_commit_read(ma_pcm_rb* pRB, ma_uint32 sizeInFrames);\nMA_API ma_result ma_pcm_rb_acquire_write(ma_pcm_rb* pRB, ma_uint32* pSizeInFrames, void** ppBufferOut);\nMA_API ma_result ma_pcm_rb_commit_write(ma_pcm_rb* pRB, ma_uint32 sizeInFrames);\nMA_API ma_result ma_pcm_rb_seek_read(ma_pcm_rb* pRB, ma_uint32 offsetInFrames);\nMA_API ma_result ma_pcm_rb_seek_write(ma_pcm_rb* pRB, ma_uint32 offsetInFrames);\nMA_API ma_int32 ma_pcm_rb_pointer_distance(ma_pcm_rb* pRB); /* Return value is in frames. */\nMA_API ma_uint32 ma_pcm_rb_available_read(ma_pcm_rb* pRB);\nMA_API ma_uint32 ma_pcm_rb_available_write(ma_pcm_rb* pRB);\nMA_API ma_uint32 ma_pcm_rb_get_subbuffer_size(ma_pcm_rb* pRB);\nMA_API ma_uint32 ma_pcm_rb_get_subbuffer_stride(ma_pcm_rb* pRB);\nMA_API ma_uint32 ma_pcm_rb_get_subbuffer_offset(ma_pcm_rb* pRB, ma_uint32 subbufferIndex);\nMA_API void* ma_pcm_rb_get_subbuffer_ptr(ma_pcm_rb* pRB, ma_uint32 subbufferIndex, void* pBuffer);\nMA_API ma_format ma_pcm_rb_get_format(const ma_pcm_rb* pRB);\nMA_API ma_uint32 ma_pcm_rb_get_channels(const ma_pcm_rb* pRB);\nMA_API ma_uint32 ma_pcm_rb_get_sample_rate(const ma_pcm_rb* pRB);\nMA_API void ma_pcm_rb_set_sample_rate(ma_pcm_rb* pRB, ma_uint32 sampleRate);\n\n\n/*\nThe idea of the duplex ring buffer is to act as the intermediary buffer when running two asynchronous devices in a duplex set up. The\ncapture device writes to it, and then a playback device reads from it.\n\nAt the moment this is just a simple naive implementation, but in the future I want to implement some dynamic resampling to seamlessly\nhandle desyncs. Note that the API is work in progress and may change at any time in any version.\n\nThe size of the buffer is based on the capture side since that's what'll be written to the buffer. It is based on the capture period size\nin frames. The internal sample rate of the capture device is also needed in order to calculate the size.\n*/\ntypedef struct\n{\n    ma_pcm_rb rb;\n} ma_duplex_rb;\n\nMA_API ma_result ma_duplex_rb_init(ma_format captureFormat, ma_uint32 captureChannels, ma_uint32 sampleRate, ma_uint32 captureInternalSampleRate, ma_uint32 captureInternalPeriodSizeInFrames, const ma_allocation_callbacks* pAllocationCallbacks, ma_duplex_rb* pRB);\nMA_API ma_result ma_duplex_rb_uninit(ma_duplex_rb* pRB);\n\n\n/************************************************************************************************************************************************************\n\nMiscellaneous Helpers\n\n************************************************************************************************************************************************************/\n/*\nRetrieves a human readable description of the given result code.\n*/\nMA_API const char* ma_result_description(ma_result result);\n\n/*\nmalloc()\n*/\nMA_API void* ma_malloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks);\n\n/*\ncalloc()\n*/\nMA_API void* ma_calloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks);\n\n/*\nrealloc()\n*/\nMA_API void* ma_realloc(void* p, size_t sz, const ma_allocation_callbacks* pAllocationCallbacks);\n\n/*\nfree()\n*/\nMA_API void ma_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks);\n\n/*\nPerforms an aligned malloc, with the assumption that the alignment is a power of 2.\n*/\nMA_API void* ma_aligned_malloc(size_t sz, size_t alignment, const ma_allocation_callbacks* pAllocationCallbacks);\n\n/*\nFree's an aligned malloc'd buffer.\n*/\nMA_API void ma_aligned_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks);\n\n/*\nRetrieves a friendly name for a format.\n*/\nMA_API const char* ma_get_format_name(ma_format format);\n\n/*\nBlends two frames in floating point format.\n*/\nMA_API void ma_blend_f32(float* pOut, float* pInA, float* pInB, float factor, ma_uint32 channels);\n\n/*\nRetrieves the size of a sample in bytes for the given format.\n\nThis API is efficient and is implemented using a lookup table.\n\nThread Safety: SAFE\n  This API is pure.\n*/\nMA_API ma_uint32 ma_get_bytes_per_sample(ma_format format);\nstatic MA_INLINE ma_uint32 ma_get_bytes_per_frame(ma_format format, ma_uint32 channels) { return ma_get_bytes_per_sample(format) * channels; }\n\n/*\nConverts a log level to a string.\n*/\nMA_API const char* ma_log_level_to_string(ma_uint32 logLevel);\n\n\n\n\n/************************************************************************************************************************************************************\n\nSynchronization\n\n************************************************************************************************************************************************************/\n/*\nLocks a spinlock.\n*/\nMA_API ma_result ma_spinlock_lock(volatile ma_spinlock* pSpinlock);\n\n/*\nLocks a spinlock, but does not yield() when looping.\n*/\nMA_API ma_result ma_spinlock_lock_noyield(volatile ma_spinlock* pSpinlock);\n\n/*\nUnlocks a spinlock.\n*/\nMA_API ma_result ma_spinlock_unlock(volatile ma_spinlock* pSpinlock);\n\n\n#ifndef MA_NO_THREADING\n\n/*\nCreates a mutex.\n\nA mutex must be created from a valid context. A mutex is initially unlocked.\n*/\nMA_API ma_result ma_mutex_init(ma_mutex* pMutex);\n\n/*\nDeletes a mutex.\n*/\nMA_API void ma_mutex_uninit(ma_mutex* pMutex);\n\n/*\nLocks a mutex with an infinite timeout.\n*/\nMA_API void ma_mutex_lock(ma_mutex* pMutex);\n\n/*\nUnlocks a mutex.\n*/\nMA_API void ma_mutex_unlock(ma_mutex* pMutex);\n\n\n/*\nInitializes an auto-reset event.\n*/\nMA_API ma_result ma_event_init(ma_event* pEvent);\n\n/*\nUninitializes an auto-reset event.\n*/\nMA_API void ma_event_uninit(ma_event* pEvent);\n\n/*\nWaits for the specified auto-reset event to become signalled.\n*/\nMA_API ma_result ma_event_wait(ma_event* pEvent);\n\n/*\nSignals the specified auto-reset event.\n*/\nMA_API ma_result ma_event_signal(ma_event* pEvent);\n#endif  /* MA_NO_THREADING */\n\n\n/*\nFence\n=====\nThis locks while the counter is larger than 0. Counter can be incremented and decremented by any\nthread, but care needs to be taken when waiting. It is possible for one thread to acquire the\nfence just as another thread returns from ma_fence_wait().\n\nThe idea behind a fence is to allow you to wait for a group of operations to complete. When an\noperation starts, the counter is incremented which locks the fence. When the operation completes,\nthe fence will be released which decrements the counter. ma_fence_wait() will block until the\ncounter hits zero.\n\nIf threading is disabled, ma_fence_wait() will spin on the counter.\n*/\ntypedef struct\n{\n#ifndef MA_NO_THREADING\n    ma_event e;\n#endif\n    ma_uint32 counter;\n} ma_fence;\n\nMA_API ma_result ma_fence_init(ma_fence* pFence);\nMA_API void ma_fence_uninit(ma_fence* pFence);\nMA_API ma_result ma_fence_acquire(ma_fence* pFence);    /* Increment counter. */\nMA_API ma_result ma_fence_release(ma_fence* pFence);    /* Decrement counter. */\nMA_API ma_result ma_fence_wait(ma_fence* pFence);       /* Wait for counter to reach 0. */\n\n\n\n/*\nNotification callback for asynchronous operations.\n*/\ntypedef void ma_async_notification;\n\ntypedef struct\n{\n    void (* onSignal)(ma_async_notification* pNotification);\n} ma_async_notification_callbacks;\n\nMA_API ma_result ma_async_notification_signal(ma_async_notification* pNotification);\n\n\n/*\nSimple polling notification.\n\nThis just sets a variable when the notification has been signalled which is then polled with ma_async_notification_poll_is_signalled()\n*/\ntypedef struct\n{\n    ma_async_notification_callbacks cb;\n    ma_bool32 signalled;\n} ma_async_notification_poll;\n\nMA_API ma_result ma_async_notification_poll_init(ma_async_notification_poll* pNotificationPoll);\nMA_API ma_bool32 ma_async_notification_poll_is_signalled(const ma_async_notification_poll* pNotificationPoll);\n\n\n/*\nEvent Notification\n\nThis uses an ma_event. If threading is disabled (MA_NO_THREADING), initialization will fail.\n*/\ntypedef struct\n{\n    ma_async_notification_callbacks cb;\n#ifndef MA_NO_THREADING\n    ma_event e;\n#endif\n} ma_async_notification_event;\n\nMA_API ma_result ma_async_notification_event_init(ma_async_notification_event* pNotificationEvent);\nMA_API ma_result ma_async_notification_event_uninit(ma_async_notification_event* pNotificationEvent);\nMA_API ma_result ma_async_notification_event_wait(ma_async_notification_event* pNotificationEvent);\nMA_API ma_result ma_async_notification_event_signal(ma_async_notification_event* pNotificationEvent);\n\n\n\n\n/************************************************************************************************************************************************************\n\nJob Queue\n\n************************************************************************************************************************************************************/\n\n/*\nSlot Allocator\n--------------\nThe idea of the slot allocator is for it to be used in conjunction with a fixed sized buffer. You use the slot allocator to allocator an index that can be used\nas the insertion point for an object.\n\nSlots are reference counted to help mitigate the ABA problem in the lock-free queue we use for tracking jobs.\n\nThe slot index is stored in the low 32 bits. The reference counter is stored in the high 32 bits:\n\n    +-----------------+-----------------+\n    | 32 Bits         | 32 Bits         |\n    +-----------------+-----------------+\n    | Reference Count | Slot Index      |\n    +-----------------+-----------------+\n*/\ntypedef struct\n{\n    ma_uint32 capacity;    /* The number of slots to make available. */\n} ma_slot_allocator_config;\n\nMA_API ma_slot_allocator_config ma_slot_allocator_config_init(ma_uint32 capacity);\n\n\ntypedef struct\n{\n    MA_ATOMIC(4, ma_uint32) bitfield;   /* Must be used atomically because the allocation and freeing routines need to make copies of this which must never be optimized away by the compiler. */\n} ma_slot_allocator_group;\n\ntypedef struct\n{\n    ma_slot_allocator_group* pGroups;   /* Slots are grouped in chunks of 32. */\n    ma_uint32* pSlots;                  /* 32 bits for reference counting for ABA mitigation. */\n    ma_uint32 count;                    /* Allocation count. */\n    ma_uint32 capacity;\n\n    /* Memory management. */\n    ma_bool32 _ownsHeap;\n    void* _pHeap;\n} ma_slot_allocator;\n\nMA_API ma_result ma_slot_allocator_get_heap_size(const ma_slot_allocator_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_slot_allocator_init_preallocated(const ma_slot_allocator_config* pConfig, void* pHeap, ma_slot_allocator* pAllocator);\nMA_API ma_result ma_slot_allocator_init(const ma_slot_allocator_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_slot_allocator* pAllocator);\nMA_API void ma_slot_allocator_uninit(ma_slot_allocator* pAllocator, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_slot_allocator_alloc(ma_slot_allocator* pAllocator, ma_uint64* pSlot);\nMA_API ma_result ma_slot_allocator_free(ma_slot_allocator* pAllocator, ma_uint64 slot);\n\n\ntypedef struct ma_job ma_job;\n\n/*\nCallback for processing a job. Each job type will have their own processing callback which will be\ncalled by ma_job_process().\n*/\ntypedef ma_result (* ma_job_proc)(ma_job* pJob);\n\n/* When a job type is added here an callback needs to be added go \"g_jobVTable\" in the implementation section. */\ntypedef enum\n{\n    /* Miscellaneous. */\n    MA_JOB_TYPE_QUIT = 0,\n    MA_JOB_TYPE_CUSTOM,\n\n    /* Resource Manager. */\n    MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE,\n    MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER_NODE,\n    MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE,\n    MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER,\n    MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER,\n    MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_STREAM,\n    MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_STREAM,\n    MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_STREAM,\n    MA_JOB_TYPE_RESOURCE_MANAGER_SEEK_DATA_STREAM,\n\n    /* Device. */\n    MA_JOB_TYPE_DEVICE_AAUDIO_REROUTE,\n\n    /* Count. Must always be last. */\n    MA_JOB_TYPE_COUNT\n} ma_job_type;\n\nstruct ma_job\n{\n    union\n    {\n        struct\n        {\n            ma_uint16 code;         /* Job type. */\n            ma_uint16 slot;         /* Index into a ma_slot_allocator. */\n            ma_uint32 refcount;\n        } breakup;\n        ma_uint64 allocation;\n    } toc;  /* 8 bytes. We encode the job code into the slot allocation data to save space. */\n    MA_ATOMIC(8, ma_uint64) next; /* refcount + slot for the next item. Does not include the job code. */\n    ma_uint32 order;    /* Execution order. Used to create a data dependency and ensure a job is executed in order. Usage is contextual depending on the job type. */\n\n    union\n    {\n        /* Miscellaneous. */\n        struct\n        {\n            ma_job_proc proc;\n            ma_uintptr data0;\n            ma_uintptr data1;\n        } custom;\n\n        /* Resource Manager */\n        union\n        {\n            struct\n            {\n                /*ma_resource_manager**/ void* pResourceManager;\n                /*ma_resource_manager_data_buffer_node**/ void* pDataBufferNode;\n                char* pFilePath;\n                wchar_t* pFilePathW;\n                ma_uint32 flags;                                /* Resource manager data source flags that were used when initializing the data buffer. */\n                ma_async_notification* pInitNotification;       /* Signalled when the data buffer has been initialized and the format/channels/rate can be retrieved. */\n                ma_async_notification* pDoneNotification;       /* Signalled when the data buffer has been fully decoded. Will be passed through to MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE when decoding. */\n                ma_fence* pInitFence;                           /* Released when initialization of the decoder is complete. */\n                ma_fence* pDoneFence;                           /* Released if initialization of the decoder fails. Passed through to PAGE_DATA_BUFFER_NODE untouched if init is successful. */\n            } loadDataBufferNode;\n            struct\n            {\n                /*ma_resource_manager**/ void* pResourceManager;\n                /*ma_resource_manager_data_buffer_node**/ void* pDataBufferNode;\n                ma_async_notification* pDoneNotification;\n                ma_fence* pDoneFence;\n            } freeDataBufferNode;\n            struct\n            {\n                /*ma_resource_manager**/ void* pResourceManager;\n                /*ma_resource_manager_data_buffer_node**/ void* pDataBufferNode;\n                /*ma_decoder**/ void* pDecoder;\n                ma_async_notification* pDoneNotification;       /* Signalled when the data buffer has been fully decoded. */\n                ma_fence* pDoneFence;                           /* Passed through from LOAD_DATA_BUFFER_NODE and released when the data buffer completes decoding or an error occurs. */\n            } pageDataBufferNode;\n\n            struct\n            {\n                /*ma_resource_manager_data_buffer**/ void* pDataBuffer;\n                ma_async_notification* pInitNotification;       /* Signalled when the data buffer has been initialized and the format/channels/rate can be retrieved. */\n                ma_async_notification* pDoneNotification;       /* Signalled when the data buffer has been fully decoded. */\n                ma_fence* pInitFence;                           /* Released when the data buffer has been initialized and the format/channels/rate can be retrieved. */\n                ma_fence* pDoneFence;                           /* Released when the data buffer has been fully decoded. */\n                ma_uint64 rangeBegInPCMFrames;\n                ma_uint64 rangeEndInPCMFrames;\n                ma_uint64 loopPointBegInPCMFrames;\n                ma_uint64 loopPointEndInPCMFrames;\n                ma_uint32 isLooping;\n            } loadDataBuffer;\n            struct\n            {\n                /*ma_resource_manager_data_buffer**/ void* pDataBuffer;\n                ma_async_notification* pDoneNotification;\n                ma_fence* pDoneFence;\n            } freeDataBuffer;\n\n            struct\n            {\n                /*ma_resource_manager_data_stream**/ void* pDataStream;\n                char* pFilePath;                            /* Allocated when the job is posted, freed by the job thread after loading. */\n                wchar_t* pFilePathW;                        /* ^ As above ^. Only used if pFilePath is NULL. */\n                ma_uint64 initialSeekPoint;\n                ma_async_notification* pInitNotification;   /* Signalled after the first two pages have been decoded and frames can be read from the stream. */\n                ma_fence* pInitFence;\n            } loadDataStream;\n            struct\n            {\n                /*ma_resource_manager_data_stream**/ void* pDataStream;\n                ma_async_notification* pDoneNotification;\n                ma_fence* pDoneFence;\n            } freeDataStream;\n            struct\n            {\n                /*ma_resource_manager_data_stream**/ void* pDataStream;\n                ma_uint32 pageIndex;                    /* The index of the page to decode into. */\n            } pageDataStream;\n            struct\n            {\n                /*ma_resource_manager_data_stream**/ void* pDataStream;\n                ma_uint64 frameIndex;\n            } seekDataStream;\n        } resourceManager;\n\n        /* Device. */\n        union\n        {\n            union\n            {\n                struct\n                {\n                    /*ma_device**/ void* pDevice;\n                    /*ma_device_type*/ ma_uint32 deviceType;\n                } reroute;\n            } aaudio;\n        } device;\n    } data;\n};\n\nMA_API ma_job ma_job_init(ma_uint16 code);\nMA_API ma_result ma_job_process(ma_job* pJob);\n\n\n/*\nWhen set, ma_job_queue_next() will not wait and no semaphore will be signaled in\nma_job_queue_post(). ma_job_queue_next() will return MA_NO_DATA_AVAILABLE if nothing is available.\n\nThis flag should always be used for platforms that do not support multithreading.\n*/\ntypedef enum\n{\n    MA_JOB_QUEUE_FLAG_NON_BLOCKING = 0x00000001\n} ma_job_queue_flags;\n\ntypedef struct\n{\n    ma_uint32 flags;\n    ma_uint32 capacity; /* The maximum number of jobs that can fit in the queue at a time. */\n} ma_job_queue_config;\n\nMA_API ma_job_queue_config ma_job_queue_config_init(ma_uint32 flags, ma_uint32 capacity);\n\n\ntypedef struct\n{\n    ma_uint32 flags;                /* Flags passed in at initialization time. */\n    ma_uint32 capacity;             /* The maximum number of jobs that can fit in the queue at a time. Set by the config. */\n    MA_ATOMIC(8, ma_uint64) head;   /* The first item in the list. Required for removing from the top of the list. */\n    MA_ATOMIC(8, ma_uint64) tail;   /* The last item in the list. Required for appending to the end of the list. */\n#ifndef MA_NO_THREADING\n    ma_semaphore sem;               /* Only used when MA_JOB_QUEUE_FLAG_NON_BLOCKING is unset. */\n#endif\n    ma_slot_allocator allocator;\n    ma_job* pJobs;\n#ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE\n    ma_spinlock lock;\n#endif\n\n    /* Memory management. */\n    void* _pHeap;\n    ma_bool32 _ownsHeap;\n} ma_job_queue;\n\nMA_API ma_result ma_job_queue_get_heap_size(const ma_job_queue_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_job_queue_init_preallocated(const ma_job_queue_config* pConfig, void* pHeap, ma_job_queue* pQueue);\nMA_API ma_result ma_job_queue_init(const ma_job_queue_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_job_queue* pQueue);\nMA_API void ma_job_queue_uninit(ma_job_queue* pQueue, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_job_queue_post(ma_job_queue* pQueue, const ma_job* pJob);\nMA_API ma_result ma_job_queue_next(ma_job_queue* pQueue, ma_job* pJob); /* Returns MA_CANCELLED if the next job is a quit job. */\n\n\n\n/************************************************************************************************************************************************************\n*************************************************************************************************************************************************************\n\nDEVICE I/O\n==========\n\nThis section contains the APIs for device playback and capture. Here is where you'll find ma_device_init(), etc.\n\n*************************************************************************************************************************************************************\n************************************************************************************************************************************************************/\n#ifndef MA_NO_DEVICE_IO\n/* Some backends are only supported on certain platforms. */\n#if defined(MA_WIN32)\n    #define MA_SUPPORT_WASAPI\n\n    #if defined(MA_WIN32_DESKTOP)   /* DirectSound and WinMM backends are only supported on desktops. */\n        #define MA_SUPPORT_DSOUND\n        #define MA_SUPPORT_WINMM\n\n        /* Don't enable JACK here if compiling with Cosmopolitan. It'll be enabled in the Linux section below. */\n        #if !defined(__COSMOPOLITAN__)\n            #define MA_SUPPORT_JACK    /* JACK is technically supported on Windows, but I don't know how many people use it in practice... */\n        #endif\n    #endif\n#endif\n#if defined(MA_UNIX) && !defined(MA_ORBIS) && !defined(MA_PROSPERO)\n    #if defined(MA_LINUX)\n        #if !defined(MA_ANDROID) && !defined(__COSMOPOLITAN__)   /* ALSA is not supported on Android. */\n            #define MA_SUPPORT_ALSA\n        #endif\n    #endif\n    #if !defined(MA_BSD) && !defined(MA_ANDROID) && !defined(MA_EMSCRIPTEN)\n        #define MA_SUPPORT_PULSEAUDIO\n        #define MA_SUPPORT_JACK\n    #endif\n    #if defined(__OpenBSD__)        /* <-- Change this to \"#if defined(MA_BSD)\" to enable sndio on all BSD flavors. */\n        #define MA_SUPPORT_SNDIO    /* sndio is only supported on OpenBSD for now. May be expanded later if there's demand. */\n    #endif\n    #if defined(__NetBSD__) || defined(__OpenBSD__)\n        #define MA_SUPPORT_AUDIO4   /* Only support audio(4) on platforms with known support. */\n    #endif\n    #if defined(__FreeBSD__) || defined(__DragonFly__)\n        #define MA_SUPPORT_OSS      /* Only support OSS on specific platforms with known support. */\n    #endif\n#endif\n#if defined(MA_ANDROID)\n    #define MA_SUPPORT_AAUDIO\n    #define MA_SUPPORT_OPENSL\n#endif\n#if defined(MA_APPLE)\n    #define MA_SUPPORT_COREAUDIO\n#endif\n#if defined(MA_EMSCRIPTEN)\n    #define MA_SUPPORT_WEBAUDIO\n#endif\n\n/* All platforms should support custom backends. */\n#define MA_SUPPORT_CUSTOM\n\n/* Explicitly disable the Null backend for Emscripten because it uses a background thread which is not properly supported right now. */\n#if !defined(MA_EMSCRIPTEN)\n#define MA_SUPPORT_NULL\n#endif\n\n\n#if defined(MA_SUPPORT_WASAPI) && !defined(MA_NO_WASAPI) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_WASAPI))\n    #define MA_HAS_WASAPI\n#endif\n#if defined(MA_SUPPORT_DSOUND) && !defined(MA_NO_DSOUND) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_DSOUND))\n    #define MA_HAS_DSOUND\n#endif\n#if defined(MA_SUPPORT_WINMM) && !defined(MA_NO_WINMM) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_WINMM))\n    #define MA_HAS_WINMM\n#endif\n#if defined(MA_SUPPORT_ALSA) && !defined(MA_NO_ALSA) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_ALSA))\n    #define MA_HAS_ALSA\n#endif\n#if defined(MA_SUPPORT_PULSEAUDIO) && !defined(MA_NO_PULSEAUDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_PULSEAUDIO))\n    #define MA_HAS_PULSEAUDIO\n#endif\n#if defined(MA_SUPPORT_JACK) && !defined(MA_NO_JACK) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_JACK))\n    #define MA_HAS_JACK\n#endif\n#if defined(MA_SUPPORT_COREAUDIO) && !defined(MA_NO_COREAUDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_COREAUDIO))\n    #define MA_HAS_COREAUDIO\n#endif\n#if defined(MA_SUPPORT_SNDIO) && !defined(MA_NO_SNDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_SNDIO))\n    #define MA_HAS_SNDIO\n#endif\n#if defined(MA_SUPPORT_AUDIO4) && !defined(MA_NO_AUDIO4) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_AUDIO4))\n    #define MA_HAS_AUDIO4\n#endif\n#if defined(MA_SUPPORT_OSS) && !defined(MA_NO_OSS) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_OSS))\n    #define MA_HAS_OSS\n#endif\n#if defined(MA_SUPPORT_AAUDIO) && !defined(MA_NO_AAUDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_AAUDIO))\n    #define MA_HAS_AAUDIO\n#endif\n#if defined(MA_SUPPORT_OPENSL) && !defined(MA_NO_OPENSL) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_OPENSL))\n    #define MA_HAS_OPENSL\n#endif\n#if defined(MA_SUPPORT_WEBAUDIO) && !defined(MA_NO_WEBAUDIO) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_WEBAUDIO))\n    #define MA_HAS_WEBAUDIO\n#endif\n#if defined(MA_SUPPORT_CUSTOM) && !defined(MA_NO_CUSTOM) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_CUSTOM))\n    #define MA_HAS_CUSTOM\n#endif\n#if defined(MA_SUPPORT_NULL) && !defined(MA_NO_NULL) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_NULL))\n    #define MA_HAS_NULL\n#endif\n\ntypedef enum\n{\n    ma_device_state_uninitialized = 0,\n    ma_device_state_stopped       = 1,  /* The device's default state after initialization. */\n    ma_device_state_started       = 2,  /* The device is started and is requesting and/or delivering audio data. */\n    ma_device_state_starting      = 3,  /* Transitioning from a stopped state to started. */\n    ma_device_state_stopping      = 4   /* Transitioning from a started state to stopped. */\n} ma_device_state;\n\nMA_ATOMIC_SAFE_TYPE_DECL(i32, 4, device_state)\n\n\n#ifdef MA_SUPPORT_WASAPI\n/* We need a IMMNotificationClient object for WASAPI. */\ntypedef struct\n{\n    void* lpVtbl;\n    ma_uint32 counter;\n    ma_device* pDevice;\n} ma_IMMNotificationClient;\n#endif\n\n/* Backend enums must be in priority order. */\ntypedef enum\n{\n    ma_backend_wasapi,\n    ma_backend_dsound,\n    ma_backend_winmm,\n    ma_backend_coreaudio,\n    ma_backend_sndio,\n    ma_backend_audio4,\n    ma_backend_oss,\n    ma_backend_pulseaudio,\n    ma_backend_alsa,\n    ma_backend_jack,\n    ma_backend_aaudio,\n    ma_backend_opensl,\n    ma_backend_webaudio,\n    ma_backend_custom,  /* <-- Custom backend, with callbacks defined by the context config. */\n    ma_backend_null     /* <-- Must always be the last item. Lowest priority, and used as the terminator for backend enumeration. */\n} ma_backend;\n\n#define MA_BACKEND_COUNT (ma_backend_null+1)\n\n\n/*\nDevice job thread. This is used by backends that require asynchronous processing of certain\noperations. It is not used by all backends.\n\nThe device job thread is made up of a thread and a job queue. You can post a job to the thread with\nma_device_job_thread_post(). The thread will do the processing of the job.\n*/\ntypedef struct\n{\n    ma_bool32 noThread; /* Set this to true if you want to process jobs yourself. */\n    ma_uint32 jobQueueCapacity;\n    ma_uint32 jobQueueFlags;\n} ma_device_job_thread_config;\n\nMA_API ma_device_job_thread_config ma_device_job_thread_config_init(void);\n\ntypedef struct\n{\n    ma_thread thread;\n    ma_job_queue jobQueue;\n    ma_bool32 _hasThread;\n} ma_device_job_thread;\n\nMA_API ma_result ma_device_job_thread_init(const ma_device_job_thread_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_device_job_thread* pJobThread);\nMA_API void ma_device_job_thread_uninit(ma_device_job_thread* pJobThread, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_device_job_thread_post(ma_device_job_thread* pJobThread, const ma_job* pJob);\nMA_API ma_result ma_device_job_thread_next(ma_device_job_thread* pJobThread, ma_job* pJob);\n\n\n\n/* Device notification types. */\ntypedef enum\n{\n    ma_device_notification_type_started,\n    ma_device_notification_type_stopped,\n    ma_device_notification_type_rerouted,\n    ma_device_notification_type_interruption_began,\n    ma_device_notification_type_interruption_ended,\n    ma_device_notification_type_unlocked\n} ma_device_notification_type;\n\ntypedef struct\n{\n    ma_device* pDevice;\n    ma_device_notification_type type;\n    union\n    {\n        struct\n        {\n            int _unused;\n        } started;\n        struct\n        {\n            int _unused;\n        } stopped;\n        struct\n        {\n            int _unused;\n        } rerouted;\n        struct\n        {\n            int _unused;\n        } interruption;\n    } data;\n} ma_device_notification;\n\n/*\nThe notification callback for when the application should be notified of a change to the device.\n\nThis callback is used for notifying the application of changes such as when the device has started,\nstopped, rerouted or an interruption has occurred. Note that not all backends will post all\nnotification types. For example, some backends will perform automatic stream routing without any\nkind of notification to the host program which means miniaudio will never know about it and will\nnever be able to fire the rerouted notification. You should keep this in mind when designing your\nprogram.\n\nThe stopped notification will *not* get fired when a device is rerouted.\n\n\nParameters\n----------\npNotification (in)\n    A pointer to a structure containing information about the event. Use the `pDevice` member of\n    this object to retrieve the relevant device. The `type` member can be used to discriminate\n    against each of the notification types.\n\n\nRemarks\n-------\nDo not restart or uninitialize the device from the callback.\n\nNot all notifications will be triggered by all backends, however the started and stopped events\nshould be reliable for all backends. Some backends do not have a good way to detect device\nstoppages due to unplugging the device which may result in the stopped callback not getting\nfired. This has been observed with at least one BSD variant.\n\nThe rerouted notification is fired *after* the reroute has occurred. The stopped notification will\n*not* get fired when a device is rerouted. The following backends are known to do automatic stream\nrerouting, but do not have a way to be notified of the change:\n\n  * DirectSound\n\nThe interruption notifications are used on mobile platforms for detecting when audio is interrupted\ndue to things like an incoming phone call. Currently this is only implemented on iOS. None of the\nAndroid backends will report this notification.\n*/\ntypedef void (* ma_device_notification_proc)(const ma_device_notification* pNotification);\n\n\n/*\nThe callback for processing audio data from the device.\n\nThe data callback is fired by miniaudio whenever the device needs to have more data delivered to a playback device, or when a capture device has some data\navailable. This is called as soon as the backend asks for more data which means it may be called with inconsistent frame counts. You cannot assume the\ncallback will be fired with a consistent frame count.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to the relevant device.\n\npOutput (out)\n    A pointer to the output buffer that will receive audio data that will later be played back through the speakers. This will be non-null for a playback or\n    full-duplex device and null for a capture and loopback device.\n\npInput (in)\n    A pointer to the buffer containing input data from a recording device. This will be non-null for a capture, full-duplex or loopback device and null for a\n    playback device.\n\nframeCount (in)\n    The number of PCM frames to process. Note that this will not necessarily be equal to what you requested when you initialized the device. The\n    `periodSizeInFrames` and `periodSizeInMilliseconds` members of the device config are just hints, and are not necessarily exactly what you'll get. You must\n    not assume this will always be the same value each time the callback is fired.\n\n\nRemarks\n-------\nYou cannot stop and start the device from inside the callback or else you'll get a deadlock. You must also not uninitialize the device from inside the\ncallback. The following APIs cannot be called from inside the callback:\n\n    ma_device_init()\n    ma_device_init_ex()\n    ma_device_uninit()\n    ma_device_start()\n    ma_device_stop()\n\nThe proper way to stop the device is to call `ma_device_stop()` from a different thread, normally the main application thread.\n*/\ntypedef void (* ma_device_data_proc)(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount);\n\n\n\n\n/*\nDEPRECATED. Use ma_device_notification_proc instead.\n\nThe callback for when the device has been stopped.\n\nThis will be called when the device is stopped explicitly with `ma_device_stop()` and also called implicitly when the device is stopped through external forces\nsuch as being unplugged or an internal error occurring.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to the device that has just stopped.\n\n\nRemarks\n-------\nDo not restart or uninitialize the device from the callback.\n*/\ntypedef void (* ma_stop_proc)(ma_device* pDevice);  /* DEPRECATED. Use ma_device_notification_proc instead. */\n\ntypedef enum\n{\n    ma_device_type_playback = 1,\n    ma_device_type_capture  = 2,\n    ma_device_type_duplex   = ma_device_type_playback | ma_device_type_capture, /* 3 */\n    ma_device_type_loopback = 4\n} ma_device_type;\n\ntypedef enum\n{\n    ma_share_mode_shared = 0,\n    ma_share_mode_exclusive\n} ma_share_mode;\n\n/* iOS/tvOS/watchOS session categories. */\ntypedef enum\n{\n    ma_ios_session_category_default = 0,        /* AVAudioSessionCategoryPlayAndRecord. */\n    ma_ios_session_category_none,               /* Leave the session category unchanged. */\n    ma_ios_session_category_ambient,            /* AVAudioSessionCategoryAmbient */\n    ma_ios_session_category_solo_ambient,       /* AVAudioSessionCategorySoloAmbient */\n    ma_ios_session_category_playback,           /* AVAudioSessionCategoryPlayback */\n    ma_ios_session_category_record,             /* AVAudioSessionCategoryRecord */\n    ma_ios_session_category_play_and_record,    /* AVAudioSessionCategoryPlayAndRecord */\n    ma_ios_session_category_multi_route         /* AVAudioSessionCategoryMultiRoute */\n} ma_ios_session_category;\n\n/* iOS/tvOS/watchOS session category options */\ntypedef enum\n{\n    ma_ios_session_category_option_mix_with_others                            = 0x01,   /* AVAudioSessionCategoryOptionMixWithOthers */\n    ma_ios_session_category_option_duck_others                                = 0x02,   /* AVAudioSessionCategoryOptionDuckOthers */\n    ma_ios_session_category_option_allow_bluetooth                            = 0x04,   /* AVAudioSessionCategoryOptionAllowBluetooth */\n    ma_ios_session_category_option_default_to_speaker                         = 0x08,   /* AVAudioSessionCategoryOptionDefaultToSpeaker */\n    ma_ios_session_category_option_interrupt_spoken_audio_and_mix_with_others = 0x11,   /* AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers */\n    ma_ios_session_category_option_allow_bluetooth_a2dp                       = 0x20,   /* AVAudioSessionCategoryOptionAllowBluetoothA2DP */\n    ma_ios_session_category_option_allow_air_play                             = 0x40,   /* AVAudioSessionCategoryOptionAllowAirPlay */\n} ma_ios_session_category_option;\n\n/* OpenSL stream types. */\ntypedef enum\n{\n    ma_opensl_stream_type_default = 0,              /* Leaves the stream type unset. */\n    ma_opensl_stream_type_voice,                    /* SL_ANDROID_STREAM_VOICE */\n    ma_opensl_stream_type_system,                   /* SL_ANDROID_STREAM_SYSTEM */\n    ma_opensl_stream_type_ring,                     /* SL_ANDROID_STREAM_RING */\n    ma_opensl_stream_type_media,                    /* SL_ANDROID_STREAM_MEDIA */\n    ma_opensl_stream_type_alarm,                    /* SL_ANDROID_STREAM_ALARM */\n    ma_opensl_stream_type_notification              /* SL_ANDROID_STREAM_NOTIFICATION */\n} ma_opensl_stream_type;\n\n/* OpenSL recording presets. */\ntypedef enum\n{\n    ma_opensl_recording_preset_default = 0,         /* Leaves the input preset unset. */\n    ma_opensl_recording_preset_generic,             /* SL_ANDROID_RECORDING_PRESET_GENERIC */\n    ma_opensl_recording_preset_camcorder,           /* SL_ANDROID_RECORDING_PRESET_CAMCORDER */\n    ma_opensl_recording_preset_voice_recognition,   /* SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION */\n    ma_opensl_recording_preset_voice_communication, /* SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION */\n    ma_opensl_recording_preset_voice_unprocessed    /* SL_ANDROID_RECORDING_PRESET_UNPROCESSED */\n} ma_opensl_recording_preset;\n\n/* WASAPI audio thread priority characteristics. */\ntypedef enum\n{\n    ma_wasapi_usage_default = 0,\n    ma_wasapi_usage_games,\n    ma_wasapi_usage_pro_audio,\n} ma_wasapi_usage;\n\n/* AAudio usage types. */\ntypedef enum\n{\n    ma_aaudio_usage_default = 0,                    /* Leaves the usage type unset. */\n    ma_aaudio_usage_media,                          /* AAUDIO_USAGE_MEDIA */\n    ma_aaudio_usage_voice_communication,            /* AAUDIO_USAGE_VOICE_COMMUNICATION */\n    ma_aaudio_usage_voice_communication_signalling, /* AAUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING */\n    ma_aaudio_usage_alarm,                          /* AAUDIO_USAGE_ALARM */\n    ma_aaudio_usage_notification,                   /* AAUDIO_USAGE_NOTIFICATION */\n    ma_aaudio_usage_notification_ringtone,          /* AAUDIO_USAGE_NOTIFICATION_RINGTONE */\n    ma_aaudio_usage_notification_event,             /* AAUDIO_USAGE_NOTIFICATION_EVENT */\n    ma_aaudio_usage_assistance_accessibility,       /* AAUDIO_USAGE_ASSISTANCE_ACCESSIBILITY */\n    ma_aaudio_usage_assistance_navigation_guidance, /* AAUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE */\n    ma_aaudio_usage_assistance_sonification,        /* AAUDIO_USAGE_ASSISTANCE_SONIFICATION */\n    ma_aaudio_usage_game,                           /* AAUDIO_USAGE_GAME */\n    ma_aaudio_usage_assitant,                       /* AAUDIO_USAGE_ASSISTANT */\n    ma_aaudio_usage_emergency,                      /* AAUDIO_SYSTEM_USAGE_EMERGENCY */\n    ma_aaudio_usage_safety,                         /* AAUDIO_SYSTEM_USAGE_SAFETY */\n    ma_aaudio_usage_vehicle_status,                 /* AAUDIO_SYSTEM_USAGE_VEHICLE_STATUS */\n    ma_aaudio_usage_announcement                    /* AAUDIO_SYSTEM_USAGE_ANNOUNCEMENT */\n} ma_aaudio_usage;\n\n/* AAudio content types. */\ntypedef enum\n{\n    ma_aaudio_content_type_default = 0,             /* Leaves the content type unset. */\n    ma_aaudio_content_type_speech,                  /* AAUDIO_CONTENT_TYPE_SPEECH */\n    ma_aaudio_content_type_music,                   /* AAUDIO_CONTENT_TYPE_MUSIC */\n    ma_aaudio_content_type_movie,                   /* AAUDIO_CONTENT_TYPE_MOVIE */\n    ma_aaudio_content_type_sonification             /* AAUDIO_CONTENT_TYPE_SONIFICATION */\n} ma_aaudio_content_type;\n\n/* AAudio input presets. */\ntypedef enum\n{\n    ma_aaudio_input_preset_default = 0,             /* Leaves the input preset unset. */\n    ma_aaudio_input_preset_generic,                 /* AAUDIO_INPUT_PRESET_GENERIC */\n    ma_aaudio_input_preset_camcorder,               /* AAUDIO_INPUT_PRESET_CAMCORDER */\n    ma_aaudio_input_preset_voice_recognition,       /* AAUDIO_INPUT_PRESET_VOICE_RECOGNITION */\n    ma_aaudio_input_preset_voice_communication,     /* AAUDIO_INPUT_PRESET_VOICE_COMMUNICATION */\n    ma_aaudio_input_preset_unprocessed,             /* AAUDIO_INPUT_PRESET_UNPROCESSED */\n    ma_aaudio_input_preset_voice_performance        /* AAUDIO_INPUT_PRESET_VOICE_PERFORMANCE */\n} ma_aaudio_input_preset;\n\ntypedef enum\n{\n    ma_aaudio_allow_capture_default = 0,            /* Leaves the allowed capture policy unset. */\n    ma_aaudio_allow_capture_by_all,                 /* AAUDIO_ALLOW_CAPTURE_BY_ALL */\n    ma_aaudio_allow_capture_by_system,              /* AAUDIO_ALLOW_CAPTURE_BY_SYSTEM */\n    ma_aaudio_allow_capture_by_none                 /* AAUDIO_ALLOW_CAPTURE_BY_NONE */\n} ma_aaudio_allowed_capture_policy;\n\ntypedef union\n{\n    ma_int64 counter;\n    double counterD;\n} ma_timer;\n\ntypedef union\n{\n    ma_wchar_win32 wasapi[64];      /* WASAPI uses a wchar_t string for identification. */\n    ma_uint8 dsound[16];            /* DirectSound uses a GUID for identification. */\n    /*UINT_PTR*/ ma_uint32 winmm;   /* When creating a device, WinMM expects a Win32 UINT_PTR for device identification. In practice it's actually just a UINT. */\n    char alsa[256];                 /* ALSA uses a name string for identification. */\n    char pulse[256];                /* PulseAudio uses a name string for identification. */\n    int jack;                       /* JACK always uses default devices. */\n    char coreaudio[256];            /* Core Audio uses a string for identification. */\n    char sndio[256];                /* \"snd/0\", etc. */\n    char audio4[256];               /* \"/dev/audio\", etc. */\n    char oss[64];                   /* \"dev/dsp0\", etc. \"dev/dsp\" for the default device. */\n    ma_int32 aaudio;                /* AAudio uses a 32-bit integer for identification. */\n    ma_uint32 opensl;               /* OpenSL|ES uses a 32-bit unsigned integer for identification. */\n    char webaudio[32];              /* Web Audio always uses default devices for now, but if this changes it'll be a GUID. */\n    union\n    {\n        int i;\n        char s[256];\n        void* p;\n    } custom;                       /* The custom backend could be anything. Give them a few options. */\n    int nullbackend;                /* The null backend uses an integer for device IDs. */\n} ma_device_id;\n\n\ntypedef struct ma_context_config    ma_context_config;\ntypedef struct ma_device_config     ma_device_config;\ntypedef struct ma_backend_callbacks ma_backend_callbacks;\n\n#define MA_DATA_FORMAT_FLAG_EXCLUSIVE_MODE (1U << 1)    /* If set, this is supported in exclusive mode. Otherwise not natively supported by exclusive mode. */\n\n#ifndef MA_MAX_DEVICE_NAME_LENGTH\n#define MA_MAX_DEVICE_NAME_LENGTH   255\n#endif\n\ntypedef struct\n{\n    /* Basic info. This is the only information guaranteed to be filled in during device enumeration. */\n    ma_device_id id;\n    char name[MA_MAX_DEVICE_NAME_LENGTH + 1];   /* +1 for null terminator. */\n    ma_bool32 isDefault;\n\n    ma_uint32 nativeDataFormatCount;\n    struct\n    {\n        ma_format format;       /* Sample format. If set to ma_format_unknown, all sample formats are supported. */\n        ma_uint32 channels;     /* If set to 0, all channels are supported. */\n        ma_uint32 sampleRate;   /* If set to 0, all sample rates are supported. */\n        ma_uint32 flags;        /* A combination of MA_DATA_FORMAT_FLAG_* flags. */\n    } nativeDataFormats[/*ma_format_count * ma_standard_sample_rate_count * MA_MAX_CHANNELS*/ 64];  /* Not sure how big to make this. There can be *many* permutations for virtual devices which can support anything. */\n} ma_device_info;\n\nstruct ma_device_config\n{\n    ma_device_type deviceType;\n    ma_uint32 sampleRate;\n    ma_uint32 periodSizeInFrames;\n    ma_uint32 periodSizeInMilliseconds;\n    ma_uint32 periods;\n    ma_performance_profile performanceProfile;\n    ma_bool8 noPreSilencedOutputBuffer; /* When set to true, the contents of the output buffer passed into the data callback will be left undefined rather than initialized to silence. */\n    ma_bool8 noClip;                    /* When set to true, the contents of the output buffer passed into the data callback will not be clipped after returning. Only applies when the playback sample format is f32. */\n    ma_bool8 noDisableDenormals;        /* Do not disable denormals when firing the data callback. */\n    ma_bool8 noFixedSizedCallback;      /* Disables strict fixed-sized data callbacks. Setting this to true will result in the period size being treated only as a hint to the backend. This is an optimization for those who don't need fixed sized callbacks. */\n    ma_device_data_proc dataCallback;\n    ma_device_notification_proc notificationCallback;\n    ma_stop_proc stopCallback;\n    void* pUserData;\n    ma_resampler_config resampling;\n    struct\n    {\n        const ma_device_id* pDeviceID;\n        ma_format format;\n        ma_uint32 channels;\n        ma_channel* pChannelMap;\n        ma_channel_mix_mode channelMixMode;\n        ma_bool32 calculateLFEFromSpatialChannels;  /* When an output LFE channel is present, but no input LFE, set to true to set the output LFE to the average of all spatial channels (LR, FR, etc.). Ignored when an input LFE is present. */\n        ma_share_mode shareMode;\n    } playback;\n    struct\n    {\n        const ma_device_id* pDeviceID;\n        ma_format format;\n        ma_uint32 channels;\n        ma_channel* pChannelMap;\n        ma_channel_mix_mode channelMixMode;\n        ma_bool32 calculateLFEFromSpatialChannels;  /* When an output LFE channel is present, but no input LFE, set to true to set the output LFE to the average of all spatial channels (LR, FR, etc.). Ignored when an input LFE is present. */\n        ma_share_mode shareMode;\n    } capture;\n\n    struct\n    {\n        ma_wasapi_usage usage;              /* When configured, uses Avrt APIs to set the thread characteristics. */\n        ma_bool8 noAutoConvertSRC;          /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM. */\n        ma_bool8 noDefaultQualitySRC;       /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY. */\n        ma_bool8 noAutoStreamRouting;       /* Disables automatic stream routing. */\n        ma_bool8 noHardwareOffloading;      /* Disables WASAPI's hardware offloading feature. */\n        ma_uint32 loopbackProcessID;        /* The process ID to include or exclude for loopback mode. Set to 0 to capture audio from all processes. Ignored when an explicit device ID is specified. */\n        ma_bool8 loopbackProcessExclude;    /* When set to true, excludes the process specified by loopbackProcessID. By default, the process will be included. */\n    } wasapi;\n    struct\n    {\n        ma_bool32 noMMap;           /* Disables MMap mode. */\n        ma_bool32 noAutoFormat;     /* Opens the ALSA device with SND_PCM_NO_AUTO_FORMAT. */\n        ma_bool32 noAutoChannels;   /* Opens the ALSA device with SND_PCM_NO_AUTO_CHANNELS. */\n        ma_bool32 noAutoResample;   /* Opens the ALSA device with SND_PCM_NO_AUTO_RESAMPLE. */\n    } alsa;\n    struct\n    {\n        const char* pStreamNamePlayback;\n        const char* pStreamNameCapture;\n    } pulse;\n    struct\n    {\n        ma_bool32 allowNominalSampleRateChange; /* Desktop only. When enabled, allows changing of the sample rate at the operating system level. */\n    } coreaudio;\n    struct\n    {\n        ma_opensl_stream_type streamType;\n        ma_opensl_recording_preset recordingPreset;\n        ma_bool32 enableCompatibilityWorkarounds;\n    } opensl;\n    struct\n    {\n        ma_aaudio_usage usage;\n        ma_aaudio_content_type contentType;\n        ma_aaudio_input_preset inputPreset;\n        ma_aaudio_allowed_capture_policy allowedCapturePolicy;\n        ma_bool32 noAutoStartAfterReroute;\n        ma_bool32 enableCompatibilityWorkarounds;\n    } aaudio;\n};\n\n\n/*\nThe callback for handling device enumeration. This is fired from `ma_context_enumerate_devices()`.\n\n\nParameters\n----------\npContext (in)\n    A pointer to the context performing the enumeration.\n\ndeviceType (in)\n    The type of the device being enumerated. This will always be either `ma_device_type_playback` or `ma_device_type_capture`.\n\npInfo (in)\n    A pointer to a `ma_device_info` containing the ID and name of the enumerated device. Note that this will not include detailed information about the device,\n    only basic information (ID and name). The reason for this is that it would otherwise require opening the backend device to probe for the information which\n    is too inefficient.\n\npUserData (in)\n    The user data pointer passed into `ma_context_enumerate_devices()`.\n*/\ntypedef ma_bool32 (* ma_enum_devices_callback_proc)(ma_context* pContext, ma_device_type deviceType, const ma_device_info* pInfo, void* pUserData);\n\n\n/*\nDescribes some basic details about a playback or capture device.\n*/\ntypedef struct\n{\n    const ma_device_id* pDeviceID;\n    ma_share_mode shareMode;\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    ma_channel channelMap[MA_MAX_CHANNELS];\n    ma_uint32 periodSizeInFrames;\n    ma_uint32 periodSizeInMilliseconds;\n    ma_uint32 periodCount;\n} ma_device_descriptor;\n\n/*\nThese are the callbacks required to be implemented for a backend. These callbacks are grouped into two parts: context and device. There is one context\nto many devices. A device is created from a context.\n\nThe general flow goes like this:\n\n  1) A context is created with `onContextInit()`\n     1a) Available devices can be enumerated with `onContextEnumerateDevices()` if required.\n     1b) Detailed information about a device can be queried with `onContextGetDeviceInfo()` if required.\n  2) A device is created from the context that was created in the first step using `onDeviceInit()`, and optionally a device ID that was\n     selected from device enumeration via `onContextEnumerateDevices()`.\n  3) A device is started or stopped with `onDeviceStart()` / `onDeviceStop()`\n  4) Data is delivered to and from the device by the backend. This is always done based on the native format returned by the prior call\n     to `onDeviceInit()`. Conversion between the device's native format and the format requested by the application will be handled by\n     miniaudio internally.\n\nInitialization of the context is quite simple. You need to do any necessary initialization of internal objects and then output the\ncallbacks defined in this structure.\n\nOnce the context has been initialized you can initialize a device. Before doing so, however, the application may want to know which\nphysical devices are available. This is where `onContextEnumerateDevices()` comes in. This is fairly simple. For each device, fire the\ngiven callback with, at a minimum, the basic information filled out in `ma_device_info`. When the callback returns `MA_FALSE`, enumeration\nneeds to stop and the `onContextEnumerateDevices()` function returns with a success code.\n\nDetailed device information can be retrieved from a device ID using `onContextGetDeviceInfo()`. This takes as input the device type and ID,\nand on output returns detailed information about the device in `ma_device_info`. The `onContextGetDeviceInfo()` callback must handle the\ncase when the device ID is NULL, in which case information about the default device needs to be retrieved.\n\nOnce the context has been created and the device ID retrieved (if using anything other than the default device), the device can be created.\nThis is a little bit more complicated than initialization of the context due to it's more complicated configuration. When initializing a\ndevice, a duplex device may be requested. This means a separate data format needs to be specified for both playback and capture. On input,\nthe data format is set to what the application wants. On output it's set to the native format which should match as closely as possible to\nthe requested format. The conversion between the format requested by the application and the device's native format will be handled\ninternally by miniaudio.\n\nOn input, if the sample format is set to `ma_format_unknown`, the backend is free to use whatever sample format it desires, so long as it's\nsupported by miniaudio. When the channel count is set to 0, the backend should use the device's native channel count. The same applies for\nsample rate. For the channel map, the default should be used when `ma_channel_map_is_blank()` returns true (all channels set to\n`MA_CHANNEL_NONE`). On input, the `periodSizeInFrames` or `periodSizeInMilliseconds` option should always be set. The backend should\ninspect both of these variables. If `periodSizeInFrames` is set, it should take priority, otherwise it needs to be derived from the period\nsize in milliseconds (`periodSizeInMilliseconds`) and the sample rate, keeping in mind that the sample rate may be 0, in which case the\nsample rate will need to be determined before calculating the period size in frames. On output, all members of the `ma_device_descriptor`\nobject should be set to a valid value, except for `periodSizeInMilliseconds` which is optional (`periodSizeInFrames` *must* be set).\n\nStarting and stopping of the device is done with `onDeviceStart()` and `onDeviceStop()` and should be self-explanatory. If the backend uses\nasynchronous reading and writing, `onDeviceStart()` and `onDeviceStop()` should always be implemented.\n\nThe handling of data delivery between the application and the device is the most complicated part of the process. To make this a bit\neasier, some helper callbacks are available. If the backend uses a blocking read/write style of API, the `onDeviceRead()` and\n`onDeviceWrite()` callbacks can optionally be implemented. These are blocking and work just like reading and writing from a file. If the\nbackend uses a callback for data delivery, that callback must call `ma_device_handle_backend_data_callback()` from within it's callback.\nThis allows miniaudio to then process any necessary data conversion and then pass it to the miniaudio data callback.\n\nIf the backend requires absolute flexibility with it's data delivery, it can optionally implement the `onDeviceDataLoop()` callback\nwhich will allow it to implement the logic that will run on the audio thread. This is much more advanced and is completely optional.\n\nThe audio thread should run data delivery logic in a loop while `ma_device_get_state() == ma_device_state_started` and no errors have been\nencountered. Do not start or stop the device here. That will be handled from outside the `onDeviceDataLoop()` callback.\n\nThe invocation of the `onDeviceDataLoop()` callback will be handled by miniaudio. When you start the device, miniaudio will fire this\ncallback. When the device is stopped, the `ma_device_get_state() == ma_device_state_started` condition will fail and the loop will be terminated\nwhich will then fall through to the part that stops the device. For an example on how to implement the `onDeviceDataLoop()` callback,\nlook at `ma_device_audio_thread__default_read_write()`. Implement the `onDeviceDataLoopWakeup()` callback if you need a mechanism to\nwake up the audio thread.\n\nIf the backend supports an optimized retrieval of device information from an initialized `ma_device` object, it should implement the\n`onDeviceGetInfo()` callback. This is optional, in which case it will fall back to `onContextGetDeviceInfo()` which is less efficient.\n*/\nstruct ma_backend_callbacks\n{\n    ma_result (* onContextInit)(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks);\n    ma_result (* onContextUninit)(ma_context* pContext);\n    ma_result (* onContextEnumerateDevices)(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData);\n    ma_result (* onContextGetDeviceInfo)(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo);\n    ma_result (* onDeviceInit)(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture);\n    ma_result (* onDeviceUninit)(ma_device* pDevice);\n    ma_result (* onDeviceStart)(ma_device* pDevice);\n    ma_result (* onDeviceStop)(ma_device* pDevice);\n    ma_result (* onDeviceRead)(ma_device* pDevice, void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesRead);\n    ma_result (* onDeviceWrite)(ma_device* pDevice, const void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten);\n    ma_result (* onDeviceDataLoop)(ma_device* pDevice);\n    ma_result (* onDeviceDataLoopWakeup)(ma_device* pDevice);\n    ma_result (* onDeviceGetInfo)(ma_device* pDevice, ma_device_type type, ma_device_info* pDeviceInfo);\n};\n\nstruct ma_context_config\n{\n    ma_log* pLog;\n    ma_thread_priority threadPriority;\n    size_t threadStackSize;\n    void* pUserData;\n    ma_allocation_callbacks allocationCallbacks;\n    struct\n    {\n        ma_bool32 useVerboseDeviceEnumeration;\n    } alsa;\n    struct\n    {\n        const char* pApplicationName;\n        const char* pServerName;\n        ma_bool32 tryAutoSpawn; /* Enables autospawning of the PulseAudio daemon if necessary. */\n    } pulse;\n    struct\n    {\n        ma_ios_session_category sessionCategory;\n        ma_uint32 sessionCategoryOptions;\n        ma_bool32 noAudioSessionActivate;   /* iOS only. When set to true, does not perform an explicit [[AVAudioSession sharedInstace] setActive:true] on initialization. */\n        ma_bool32 noAudioSessionDeactivate; /* iOS only. When set to true, does not perform an explicit [[AVAudioSession sharedInstace] setActive:false] on uninitialization. */\n    } coreaudio;\n    struct\n    {\n        const char* pClientName;\n        ma_bool32 tryStartServer;\n    } jack;\n    ma_backend_callbacks custom;\n};\n\n/* WASAPI specific structure for some commands which must run on a common thread due to bugs in WASAPI. */\ntypedef struct\n{\n    int code;\n    ma_event* pEvent;   /* This will be signalled when the event is complete. */\n    union\n    {\n        struct\n        {\n            int _unused;\n        } quit;\n        struct\n        {\n            ma_device_type deviceType;\n            void* pAudioClient;\n            void** ppAudioClientService;\n            ma_result* pResult; /* The result from creating the audio client service. */\n        } createAudioClient;\n        struct\n        {\n            ma_device* pDevice;\n            ma_device_type deviceType;\n        } releaseAudioClient;\n    } data;\n} ma_context_command__wasapi;\n\nstruct ma_context\n{\n    ma_backend_callbacks callbacks;\n    ma_backend backend;                 /* DirectSound, ALSA, etc. */\n    ma_log* pLog;\n    ma_log log; /* Only used if the log is owned by the context. The pLog member will be set to &log in this case. */\n    ma_thread_priority threadPriority;\n    size_t threadStackSize;\n    void* pUserData;\n    ma_allocation_callbacks allocationCallbacks;\n    ma_mutex deviceEnumLock;            /* Used to make ma_context_get_devices() thread safe. */\n    ma_mutex deviceInfoLock;            /* Used to make ma_context_get_device_info() thread safe. */\n    ma_uint32 deviceInfoCapacity;       /* Total capacity of pDeviceInfos. */\n    ma_uint32 playbackDeviceInfoCount;\n    ma_uint32 captureDeviceInfoCount;\n    ma_device_info* pDeviceInfos;       /* Playback devices first, then capture. */\n\n    union\n    {\n#ifdef MA_SUPPORT_WASAPI\n        struct\n        {\n            ma_thread commandThread;\n            ma_mutex commandLock;\n            ma_semaphore commandSem;\n            ma_uint32 commandIndex;\n            ma_uint32 commandCount;\n            ma_context_command__wasapi commands[4];\n            ma_handle hAvrt;\n            ma_proc AvSetMmThreadCharacteristicsA;\n            ma_proc AvRevertMmThreadcharacteristics;\n            ma_handle hMMDevapi;\n            ma_proc ActivateAudioInterfaceAsync;\n        } wasapi;\n#endif\n#ifdef MA_SUPPORT_DSOUND\n        struct\n        {\n            ma_handle hDSoundDLL;\n            ma_proc DirectSoundCreate;\n            ma_proc DirectSoundEnumerateA;\n            ma_proc DirectSoundCaptureCreate;\n            ma_proc DirectSoundCaptureEnumerateA;\n        } dsound;\n#endif\n#ifdef MA_SUPPORT_WINMM\n        struct\n        {\n            ma_handle hWinMM;\n            ma_proc waveOutGetNumDevs;\n            ma_proc waveOutGetDevCapsA;\n            ma_proc waveOutOpen;\n            ma_proc waveOutClose;\n            ma_proc waveOutPrepareHeader;\n            ma_proc waveOutUnprepareHeader;\n            ma_proc waveOutWrite;\n            ma_proc waveOutReset;\n            ma_proc waveInGetNumDevs;\n            ma_proc waveInGetDevCapsA;\n            ma_proc waveInOpen;\n            ma_proc waveInClose;\n            ma_proc waveInPrepareHeader;\n            ma_proc waveInUnprepareHeader;\n            ma_proc waveInAddBuffer;\n            ma_proc waveInStart;\n            ma_proc waveInReset;\n        } winmm;\n#endif\n#ifdef MA_SUPPORT_ALSA\n        struct\n        {\n            ma_handle asoundSO;\n            ma_proc snd_pcm_open;\n            ma_proc snd_pcm_close;\n            ma_proc snd_pcm_hw_params_sizeof;\n            ma_proc snd_pcm_hw_params_any;\n            ma_proc snd_pcm_hw_params_set_format;\n            ma_proc snd_pcm_hw_params_set_format_first;\n            ma_proc snd_pcm_hw_params_get_format_mask;\n            ma_proc snd_pcm_hw_params_set_channels;\n            ma_proc snd_pcm_hw_params_set_channels_near;\n            ma_proc snd_pcm_hw_params_set_channels_minmax;\n            ma_proc snd_pcm_hw_params_set_rate_resample;\n            ma_proc snd_pcm_hw_params_set_rate;\n            ma_proc snd_pcm_hw_params_set_rate_near;\n            ma_proc snd_pcm_hw_params_set_buffer_size_near;\n            ma_proc snd_pcm_hw_params_set_periods_near;\n            ma_proc snd_pcm_hw_params_set_access;\n            ma_proc snd_pcm_hw_params_get_format;\n            ma_proc snd_pcm_hw_params_get_channels;\n            ma_proc snd_pcm_hw_params_get_channels_min;\n            ma_proc snd_pcm_hw_params_get_channels_max;\n            ma_proc snd_pcm_hw_params_get_rate;\n            ma_proc snd_pcm_hw_params_get_rate_min;\n            ma_proc snd_pcm_hw_params_get_rate_max;\n            ma_proc snd_pcm_hw_params_get_buffer_size;\n            ma_proc snd_pcm_hw_params_get_periods;\n            ma_proc snd_pcm_hw_params_get_access;\n            ma_proc snd_pcm_hw_params_test_format;\n            ma_proc snd_pcm_hw_params_test_channels;\n            ma_proc snd_pcm_hw_params_test_rate;\n            ma_proc snd_pcm_hw_params;\n            ma_proc snd_pcm_sw_params_sizeof;\n            ma_proc snd_pcm_sw_params_current;\n            ma_proc snd_pcm_sw_params_get_boundary;\n            ma_proc snd_pcm_sw_params_set_avail_min;\n            ma_proc snd_pcm_sw_params_set_start_threshold;\n            ma_proc snd_pcm_sw_params_set_stop_threshold;\n            ma_proc snd_pcm_sw_params;\n            ma_proc snd_pcm_format_mask_sizeof;\n            ma_proc snd_pcm_format_mask_test;\n            ma_proc snd_pcm_get_chmap;\n            ma_proc snd_pcm_state;\n            ma_proc snd_pcm_prepare;\n            ma_proc snd_pcm_start;\n            ma_proc snd_pcm_drop;\n            ma_proc snd_pcm_drain;\n            ma_proc snd_pcm_reset;\n            ma_proc snd_device_name_hint;\n            ma_proc snd_device_name_get_hint;\n            ma_proc snd_card_get_index;\n            ma_proc snd_device_name_free_hint;\n            ma_proc snd_pcm_mmap_begin;\n            ma_proc snd_pcm_mmap_commit;\n            ma_proc snd_pcm_recover;\n            ma_proc snd_pcm_readi;\n            ma_proc snd_pcm_writei;\n            ma_proc snd_pcm_avail;\n            ma_proc snd_pcm_avail_update;\n            ma_proc snd_pcm_wait;\n            ma_proc snd_pcm_nonblock;\n            ma_proc snd_pcm_info;\n            ma_proc snd_pcm_info_sizeof;\n            ma_proc snd_pcm_info_get_name;\n            ma_proc snd_pcm_poll_descriptors;\n            ma_proc snd_pcm_poll_descriptors_count;\n            ma_proc snd_pcm_poll_descriptors_revents;\n            ma_proc snd_config_update_free_global;\n\n            ma_mutex internalDeviceEnumLock;\n            ma_bool32 useVerboseDeviceEnumeration;\n        } alsa;\n#endif\n#ifdef MA_SUPPORT_PULSEAUDIO\n        struct\n        {\n            ma_handle pulseSO;\n            ma_proc pa_mainloop_new;\n            ma_proc pa_mainloop_free;\n            ma_proc pa_mainloop_quit;\n            ma_proc pa_mainloop_get_api;\n            ma_proc pa_mainloop_iterate;\n            ma_proc pa_mainloop_wakeup;\n            ma_proc pa_threaded_mainloop_new;\n            ma_proc pa_threaded_mainloop_free;\n            ma_proc pa_threaded_mainloop_start;\n            ma_proc pa_threaded_mainloop_stop;\n            ma_proc pa_threaded_mainloop_lock;\n            ma_proc pa_threaded_mainloop_unlock;\n            ma_proc pa_threaded_mainloop_wait;\n            ma_proc pa_threaded_mainloop_signal;\n            ma_proc pa_threaded_mainloop_accept;\n            ma_proc pa_threaded_mainloop_get_retval;\n            ma_proc pa_threaded_mainloop_get_api;\n            ma_proc pa_threaded_mainloop_in_thread;\n            ma_proc pa_threaded_mainloop_set_name;\n            ma_proc pa_context_new;\n            ma_proc pa_context_unref;\n            ma_proc pa_context_connect;\n            ma_proc pa_context_disconnect;\n            ma_proc pa_context_set_state_callback;\n            ma_proc pa_context_get_state;\n            ma_proc pa_context_get_sink_info_list;\n            ma_proc pa_context_get_source_info_list;\n            ma_proc pa_context_get_sink_info_by_name;\n            ma_proc pa_context_get_source_info_by_name;\n            ma_proc pa_operation_unref;\n            ma_proc pa_operation_get_state;\n            ma_proc pa_channel_map_init_extend;\n            ma_proc pa_channel_map_valid;\n            ma_proc pa_channel_map_compatible;\n            ma_proc pa_stream_new;\n            ma_proc pa_stream_unref;\n            ma_proc pa_stream_connect_playback;\n            ma_proc pa_stream_connect_record;\n            ma_proc pa_stream_disconnect;\n            ma_proc pa_stream_get_state;\n            ma_proc pa_stream_get_sample_spec;\n            ma_proc pa_stream_get_channel_map;\n            ma_proc pa_stream_get_buffer_attr;\n            ma_proc pa_stream_set_buffer_attr;\n            ma_proc pa_stream_get_device_name;\n            ma_proc pa_stream_set_write_callback;\n            ma_proc pa_stream_set_read_callback;\n            ma_proc pa_stream_set_suspended_callback;\n            ma_proc pa_stream_set_moved_callback;\n            ma_proc pa_stream_is_suspended;\n            ma_proc pa_stream_flush;\n            ma_proc pa_stream_drain;\n            ma_proc pa_stream_is_corked;\n            ma_proc pa_stream_cork;\n            ma_proc pa_stream_trigger;\n            ma_proc pa_stream_begin_write;\n            ma_proc pa_stream_write;\n            ma_proc pa_stream_peek;\n            ma_proc pa_stream_drop;\n            ma_proc pa_stream_writable_size;\n            ma_proc pa_stream_readable_size;\n\n            /*pa_mainloop**/ ma_ptr pMainLoop;\n            /*pa_context**/ ma_ptr pPulseContext;\n            char* pApplicationName; /* Set when the context is initialized. Used by devices for their local pa_context objects. */\n            char* pServerName;      /* Set when the context is initialized. Used by devices for their local pa_context objects. */\n        } pulse;\n#endif\n#ifdef MA_SUPPORT_JACK\n        struct\n        {\n            ma_handle jackSO;\n            ma_proc jack_client_open;\n            ma_proc jack_client_close;\n            ma_proc jack_client_name_size;\n            ma_proc jack_set_process_callback;\n            ma_proc jack_set_buffer_size_callback;\n            ma_proc jack_on_shutdown;\n            ma_proc jack_get_sample_rate;\n            ma_proc jack_get_buffer_size;\n            ma_proc jack_get_ports;\n            ma_proc jack_activate;\n            ma_proc jack_deactivate;\n            ma_proc jack_connect;\n            ma_proc jack_port_register;\n            ma_proc jack_port_name;\n            ma_proc jack_port_get_buffer;\n            ma_proc jack_free;\n\n            char* pClientName;\n            ma_bool32 tryStartServer;\n        } jack;\n#endif\n#ifdef MA_SUPPORT_COREAUDIO\n        struct\n        {\n            ma_handle hCoreFoundation;\n            ma_proc CFStringGetCString;\n            ma_proc CFRelease;\n\n            ma_handle hCoreAudio;\n            ma_proc AudioObjectGetPropertyData;\n            ma_proc AudioObjectGetPropertyDataSize;\n            ma_proc AudioObjectSetPropertyData;\n            ma_proc AudioObjectAddPropertyListener;\n            ma_proc AudioObjectRemovePropertyListener;\n\n            ma_handle hAudioUnit;  /* Could possibly be set to AudioToolbox on later versions of macOS. */\n            ma_proc AudioComponentFindNext;\n            ma_proc AudioComponentInstanceDispose;\n            ma_proc AudioComponentInstanceNew;\n            ma_proc AudioOutputUnitStart;\n            ma_proc AudioOutputUnitStop;\n            ma_proc AudioUnitAddPropertyListener;\n            ma_proc AudioUnitGetPropertyInfo;\n            ma_proc AudioUnitGetProperty;\n            ma_proc AudioUnitSetProperty;\n            ma_proc AudioUnitInitialize;\n            ma_proc AudioUnitRender;\n\n            /*AudioComponent*/ ma_ptr component;\n            ma_bool32 noAudioSessionDeactivate; /* For tracking whether or not the iOS audio session should be explicitly deactivated. Set from the config in ma_context_init__coreaudio(). */\n        } coreaudio;\n#endif\n#ifdef MA_SUPPORT_SNDIO\n        struct\n        {\n            ma_handle sndioSO;\n            ma_proc sio_open;\n            ma_proc sio_close;\n            ma_proc sio_setpar;\n            ma_proc sio_getpar;\n            ma_proc sio_getcap;\n            ma_proc sio_start;\n            ma_proc sio_stop;\n            ma_proc sio_read;\n            ma_proc sio_write;\n            ma_proc sio_onmove;\n            ma_proc sio_nfds;\n            ma_proc sio_pollfd;\n            ma_proc sio_revents;\n            ma_proc sio_eof;\n            ma_proc sio_setvol;\n            ma_proc sio_onvol;\n            ma_proc sio_initpar;\n        } sndio;\n#endif\n#ifdef MA_SUPPORT_AUDIO4\n        struct\n        {\n            int _unused;\n        } audio4;\n#endif\n#ifdef MA_SUPPORT_OSS\n        struct\n        {\n            int versionMajor;\n            int versionMinor;\n        } oss;\n#endif\n#ifdef MA_SUPPORT_AAUDIO\n        struct\n        {\n            ma_handle hAAudio; /* libaaudio.so */\n            ma_proc AAudio_createStreamBuilder;\n            ma_proc AAudioStreamBuilder_delete;\n            ma_proc AAudioStreamBuilder_setDeviceId;\n            ma_proc AAudioStreamBuilder_setDirection;\n            ma_proc AAudioStreamBuilder_setSharingMode;\n            ma_proc AAudioStreamBuilder_setFormat;\n            ma_proc AAudioStreamBuilder_setChannelCount;\n            ma_proc AAudioStreamBuilder_setSampleRate;\n            ma_proc AAudioStreamBuilder_setBufferCapacityInFrames;\n            ma_proc AAudioStreamBuilder_setFramesPerDataCallback;\n            ma_proc AAudioStreamBuilder_setDataCallback;\n            ma_proc AAudioStreamBuilder_setErrorCallback;\n            ma_proc AAudioStreamBuilder_setPerformanceMode;\n            ma_proc AAudioStreamBuilder_setUsage;\n            ma_proc AAudioStreamBuilder_setContentType;\n            ma_proc AAudioStreamBuilder_setInputPreset;\n            ma_proc AAudioStreamBuilder_setAllowedCapturePolicy;\n            ma_proc AAudioStreamBuilder_openStream;\n            ma_proc AAudioStream_close;\n            ma_proc AAudioStream_getState;\n            ma_proc AAudioStream_waitForStateChange;\n            ma_proc AAudioStream_getFormat;\n            ma_proc AAudioStream_getChannelCount;\n            ma_proc AAudioStream_getSampleRate;\n            ma_proc AAudioStream_getBufferCapacityInFrames;\n            ma_proc AAudioStream_getFramesPerDataCallback;\n            ma_proc AAudioStream_getFramesPerBurst;\n            ma_proc AAudioStream_requestStart;\n            ma_proc AAudioStream_requestStop;\n            ma_device_job_thread jobThread; /* For processing operations outside of the error callback, specifically device disconnections and rerouting. */\n        } aaudio;\n#endif\n#ifdef MA_SUPPORT_OPENSL\n        struct\n        {\n            ma_handle libOpenSLES;\n            ma_handle SL_IID_ENGINE;\n            ma_handle SL_IID_AUDIOIODEVICECAPABILITIES;\n            ma_handle SL_IID_ANDROIDSIMPLEBUFFERQUEUE;\n            ma_handle SL_IID_RECORD;\n            ma_handle SL_IID_PLAY;\n            ma_handle SL_IID_OUTPUTMIX;\n            ma_handle SL_IID_ANDROIDCONFIGURATION;\n            ma_proc   slCreateEngine;\n        } opensl;\n#endif\n#ifdef MA_SUPPORT_WEBAUDIO\n        struct\n        {\n            int _unused;\n        } webaudio;\n#endif\n#ifdef MA_SUPPORT_NULL\n        struct\n        {\n            int _unused;\n        } null_backend;\n#endif\n    };\n\n    union\n    {\n#if defined(MA_WIN32)\n        struct\n        {\n            /*HMODULE*/ ma_handle hOle32DLL;\n            ma_proc CoInitialize;\n            ma_proc CoInitializeEx;\n            ma_proc CoUninitialize;\n            ma_proc CoCreateInstance;\n            ma_proc CoTaskMemFree;\n            ma_proc PropVariantClear;\n            ma_proc StringFromGUID2;\n\n            /*HMODULE*/ ma_handle hUser32DLL;\n            ma_proc GetForegroundWindow;\n            ma_proc GetDesktopWindow;\n\n            /*HMODULE*/ ma_handle hAdvapi32DLL;\n            ma_proc RegOpenKeyExA;\n            ma_proc RegCloseKey;\n            ma_proc RegQueryValueExA;\n\n            /*HRESULT*/ long CoInitializeResult;\n        } win32;\n#endif\n#ifdef MA_POSIX\n        struct\n        {\n            int _unused;\n        } posix;\n#endif\n        int _unused;\n    };\n};\n\nstruct ma_device\n{\n    ma_context* pContext;\n    ma_device_type type;\n    ma_uint32 sampleRate;\n    ma_atomic_device_state state;               /* The state of the device is variable and can change at any time on any thread. Must be used atomically. */\n    ma_device_data_proc onData;                 /* Set once at initialization time and should not be changed after. */\n    ma_device_notification_proc onNotification; /* Set once at initialization time and should not be changed after. */\n    ma_stop_proc onStop;                        /* DEPRECATED. Use the notification callback instead. Set once at initialization time and should not be changed after. */\n    void* pUserData;                            /* Application defined data. */\n    ma_mutex startStopLock;\n    ma_event wakeupEvent;\n    ma_event startEvent;\n    ma_event stopEvent;\n    ma_thread thread;\n    ma_result workResult;                       /* This is set by the worker thread after it's finished doing a job. */\n    ma_bool8 isOwnerOfContext;                  /* When set to true, uninitializing the device will also uninitialize the context. Set to true when NULL is passed into ma_device_init(). */\n    ma_bool8 noPreSilencedOutputBuffer;\n    ma_bool8 noClip;\n    ma_bool8 noDisableDenormals;\n    ma_bool8 noFixedSizedCallback;\n    ma_atomic_float masterVolumeFactor;         /* Linear 0..1. Can be read and written simultaneously by different threads. Must be used atomically. */\n    ma_duplex_rb duplexRB;                      /* Intermediary buffer for duplex device on asynchronous backends. */\n    struct\n    {\n        ma_resample_algorithm algorithm;\n        ma_resampling_backend_vtable* pBackendVTable;\n        void* pBackendUserData;\n        struct\n        {\n            ma_uint32 lpfOrder;\n        } linear;\n    } resampling;\n    struct\n    {\n        ma_device_id* pID;                  /* Set to NULL if using default ID, otherwise set to the address of \"id\". */\n        ma_device_id id;                    /* If using an explicit device, will be set to a copy of the ID used for initialization. Otherwise cleared to 0. */\n        char name[MA_MAX_DEVICE_NAME_LENGTH + 1];                     /* Maybe temporary. Likely to be replaced with a query API. */\n        ma_share_mode shareMode;            /* Set to whatever was passed in when the device was initialized. */\n        ma_format format;\n        ma_uint32 channels;\n        ma_channel channelMap[MA_MAX_CHANNELS];\n        ma_format internalFormat;\n        ma_uint32 internalChannels;\n        ma_uint32 internalSampleRate;\n        ma_channel internalChannelMap[MA_MAX_CHANNELS];\n        ma_uint32 internalPeriodSizeInFrames;\n        ma_uint32 internalPeriods;\n        ma_channel_mix_mode channelMixMode;\n        ma_bool32 calculateLFEFromSpatialChannels;\n        ma_data_converter converter;\n        void* pIntermediaryBuffer;          /* For implementing fixed sized buffer callbacks. Will be null if using variable sized callbacks. */\n        ma_uint32 intermediaryBufferCap;\n        ma_uint32 intermediaryBufferLen;    /* How many valid frames are sitting in the intermediary buffer. */\n        void* pInputCache;                  /* In external format. Can be null. */\n        ma_uint64 inputCacheCap;\n        ma_uint64 inputCacheConsumed;\n        ma_uint64 inputCacheRemaining;\n    } playback;\n    struct\n    {\n        ma_device_id* pID;                  /* Set to NULL if using default ID, otherwise set to the address of \"id\". */\n        ma_device_id id;                    /* If using an explicit device, will be set to a copy of the ID used for initialization. Otherwise cleared to 0. */\n        char name[MA_MAX_DEVICE_NAME_LENGTH + 1];                     /* Maybe temporary. Likely to be replaced with a query API. */\n        ma_share_mode shareMode;            /* Set to whatever was passed in when the device was initialized. */\n        ma_format format;\n        ma_uint32 channels;\n        ma_channel channelMap[MA_MAX_CHANNELS];\n        ma_format internalFormat;\n        ma_uint32 internalChannels;\n        ma_uint32 internalSampleRate;\n        ma_channel internalChannelMap[MA_MAX_CHANNELS];\n        ma_uint32 internalPeriodSizeInFrames;\n        ma_uint32 internalPeriods;\n        ma_channel_mix_mode channelMixMode;\n        ma_bool32 calculateLFEFromSpatialChannels;\n        ma_data_converter converter;\n        void* pIntermediaryBuffer;          /* For implementing fixed sized buffer callbacks. Will be null if using variable sized callbacks. */\n        ma_uint32 intermediaryBufferCap;\n        ma_uint32 intermediaryBufferLen;    /* How many valid frames are sitting in the intermediary buffer. */\n    } capture;\n\n    union\n    {\n#ifdef MA_SUPPORT_WASAPI\n        struct\n        {\n            /*IAudioClient**/ ma_ptr pAudioClientPlayback;\n            /*IAudioClient**/ ma_ptr pAudioClientCapture;\n            /*IAudioRenderClient**/ ma_ptr pRenderClient;\n            /*IAudioCaptureClient**/ ma_ptr pCaptureClient;\n            /*IMMDeviceEnumerator**/ ma_ptr pDeviceEnumerator;      /* Used for IMMNotificationClient notifications. Required for detecting default device changes. */\n            ma_IMMNotificationClient notificationClient;\n            /*HANDLE*/ ma_handle hEventPlayback;                    /* Auto reset. Initialized to signaled. */\n            /*HANDLE*/ ma_handle hEventCapture;                     /* Auto reset. Initialized to unsignaled. */\n            ma_uint32 actualBufferSizeInFramesPlayback;             /* Value from GetBufferSize(). internalPeriodSizeInFrames is not set to the _actual_ buffer size when low-latency shared mode is being used due to the way the IAudioClient3 API works. */\n            ma_uint32 actualBufferSizeInFramesCapture;\n            ma_uint32 originalPeriodSizeInFrames;\n            ma_uint32 originalPeriodSizeInMilliseconds;\n            ma_uint32 originalPeriods;\n            ma_performance_profile originalPerformanceProfile;\n            ma_uint32 periodSizeInFramesPlayback;\n            ma_uint32 periodSizeInFramesCapture;\n            void* pMappedBufferCapture;\n            ma_uint32 mappedBufferCaptureCap;\n            ma_uint32 mappedBufferCaptureLen;\n            void* pMappedBufferPlayback;\n            ma_uint32 mappedBufferPlaybackCap;\n            ma_uint32 mappedBufferPlaybackLen;\n            ma_atomic_bool32 isStartedCapture;                      /* Can be read and written simultaneously across different threads. Must be used atomically, and must be 32-bit. */\n            ma_atomic_bool32 isStartedPlayback;                     /* Can be read and written simultaneously across different threads. Must be used atomically, and must be 32-bit. */\n            ma_uint32 loopbackProcessID;\n            ma_bool8 loopbackProcessExclude;\n            ma_bool8 noAutoConvertSRC;                              /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM. */\n            ma_bool8 noDefaultQualitySRC;                           /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY. */\n            ma_bool8 noHardwareOffloading;\n            ma_bool8 allowCaptureAutoStreamRouting;\n            ma_bool8 allowPlaybackAutoStreamRouting;\n            ma_bool8 isDetachedPlayback;\n            ma_bool8 isDetachedCapture;\n            ma_wasapi_usage usage;\n            void* hAvrtHandle;\n            ma_mutex rerouteLock;\n        } wasapi;\n#endif\n#ifdef MA_SUPPORT_DSOUND\n        struct\n        {\n            /*LPDIRECTSOUND*/ ma_ptr pPlayback;\n            /*LPDIRECTSOUNDBUFFER*/ ma_ptr pPlaybackPrimaryBuffer;\n            /*LPDIRECTSOUNDBUFFER*/ ma_ptr pPlaybackBuffer;\n            /*LPDIRECTSOUNDCAPTURE*/ ma_ptr pCapture;\n            /*LPDIRECTSOUNDCAPTUREBUFFER*/ ma_ptr pCaptureBuffer;\n        } dsound;\n#endif\n#ifdef MA_SUPPORT_WINMM\n        struct\n        {\n            /*HWAVEOUT*/ ma_handle hDevicePlayback;\n            /*HWAVEIN*/ ma_handle hDeviceCapture;\n            /*HANDLE*/ ma_handle hEventPlayback;\n            /*HANDLE*/ ma_handle hEventCapture;\n            ma_uint32 fragmentSizeInFrames;\n            ma_uint32 iNextHeaderPlayback;             /* [0,periods). Used as an index into pWAVEHDRPlayback. */\n            ma_uint32 iNextHeaderCapture;              /* [0,periods). Used as an index into pWAVEHDRCapture. */\n            ma_uint32 headerFramesConsumedPlayback;    /* The number of PCM frames consumed in the buffer in pWAVEHEADER[iNextHeader]. */\n            ma_uint32 headerFramesConsumedCapture;     /* ^^^ */\n            /*WAVEHDR**/ ma_uint8* pWAVEHDRPlayback;   /* One instantiation for each period. */\n            /*WAVEHDR**/ ma_uint8* pWAVEHDRCapture;    /* One instantiation for each period. */\n            ma_uint8* pIntermediaryBufferPlayback;\n            ma_uint8* pIntermediaryBufferCapture;\n            ma_uint8* _pHeapData;                      /* Used internally and is used for the heap allocated data for the intermediary buffer and the WAVEHDR structures. */\n        } winmm;\n#endif\n#ifdef MA_SUPPORT_ALSA\n        struct\n        {\n            /*snd_pcm_t**/ ma_ptr pPCMPlayback;\n            /*snd_pcm_t**/ ma_ptr pPCMCapture;\n            /*struct pollfd**/ void* pPollDescriptorsPlayback;\n            /*struct pollfd**/ void* pPollDescriptorsCapture;\n            int pollDescriptorCountPlayback;\n            int pollDescriptorCountCapture;\n            int wakeupfdPlayback;   /* eventfd for waking up from poll() when the playback device is stopped. */\n            int wakeupfdCapture;    /* eventfd for waking up from poll() when the capture device is stopped. */\n            ma_bool8 isUsingMMapPlayback;\n            ma_bool8 isUsingMMapCapture;\n        } alsa;\n#endif\n#ifdef MA_SUPPORT_PULSEAUDIO\n        struct\n        {\n            /*pa_mainloop**/ ma_ptr pMainLoop;\n            /*pa_context**/ ma_ptr pPulseContext;\n            /*pa_stream**/ ma_ptr pStreamPlayback;\n            /*pa_stream**/ ma_ptr pStreamCapture;\n        } pulse;\n#endif\n#ifdef MA_SUPPORT_JACK\n        struct\n        {\n            /*jack_client_t**/ ma_ptr pClient;\n            /*jack_port_t**/ ma_ptr* ppPortsPlayback;\n            /*jack_port_t**/ ma_ptr* ppPortsCapture;\n            float* pIntermediaryBufferPlayback; /* Typed as a float because JACK is always floating point. */\n            float* pIntermediaryBufferCapture;\n        } jack;\n#endif\n#ifdef MA_SUPPORT_COREAUDIO\n        struct\n        {\n            ma_uint32 deviceObjectIDPlayback;\n            ma_uint32 deviceObjectIDCapture;\n            /*AudioUnit*/ ma_ptr audioUnitPlayback;\n            /*AudioUnit*/ ma_ptr audioUnitCapture;\n            /*AudioBufferList**/ ma_ptr pAudioBufferList;   /* Only used for input devices. */\n            ma_uint32 audioBufferCapInFrames;               /* Only used for input devices. The capacity in frames of each buffer in pAudioBufferList. */\n            ma_event stopEvent;\n            ma_uint32 originalPeriodSizeInFrames;\n            ma_uint32 originalPeriodSizeInMilliseconds;\n            ma_uint32 originalPeriods;\n            ma_performance_profile originalPerformanceProfile;\n            ma_bool32 isDefaultPlaybackDevice;\n            ma_bool32 isDefaultCaptureDevice;\n            ma_bool32 isSwitchingPlaybackDevice;   /* <-- Set to true when the default device has changed and miniaudio is in the process of switching. */\n            ma_bool32 isSwitchingCaptureDevice;    /* <-- Set to true when the default device has changed and miniaudio is in the process of switching. */\n            void* pNotificationHandler;             /* Only used on mobile platforms. Obj-C object for handling route changes. */\n        } coreaudio;\n#endif\n#ifdef MA_SUPPORT_SNDIO\n        struct\n        {\n            ma_ptr handlePlayback;\n            ma_ptr handleCapture;\n            ma_bool32 isStartedPlayback;\n            ma_bool32 isStartedCapture;\n        } sndio;\n#endif\n#ifdef MA_SUPPORT_AUDIO4\n        struct\n        {\n            int fdPlayback;\n            int fdCapture;\n        } audio4;\n#endif\n#ifdef MA_SUPPORT_OSS\n        struct\n        {\n            int fdPlayback;\n            int fdCapture;\n        } oss;\n#endif\n#ifdef MA_SUPPORT_AAUDIO\n        struct\n        {\n            /*AAudioStream**/ ma_ptr pStreamPlayback;\n            /*AAudioStream**/ ma_ptr pStreamCapture;\n            ma_aaudio_usage usage;\n            ma_aaudio_content_type contentType;\n            ma_aaudio_input_preset inputPreset;\n            ma_aaudio_allowed_capture_policy allowedCapturePolicy;\n            ma_bool32 noAutoStartAfterReroute;\n        } aaudio;\n#endif\n#ifdef MA_SUPPORT_OPENSL\n        struct\n        {\n            /*SLObjectItf*/ ma_ptr pOutputMixObj;\n            /*SLOutputMixItf*/ ma_ptr pOutputMix;\n            /*SLObjectItf*/ ma_ptr pAudioPlayerObj;\n            /*SLPlayItf*/ ma_ptr pAudioPlayer;\n            /*SLObjectItf*/ ma_ptr pAudioRecorderObj;\n            /*SLRecordItf*/ ma_ptr pAudioRecorder;\n            /*SLAndroidSimpleBufferQueueItf*/ ma_ptr pBufferQueuePlayback;\n            /*SLAndroidSimpleBufferQueueItf*/ ma_ptr pBufferQueueCapture;\n            ma_bool32 isDrainingCapture;\n            ma_bool32 isDrainingPlayback;\n            ma_uint32 currentBufferIndexPlayback;\n            ma_uint32 currentBufferIndexCapture;\n            ma_uint8* pBufferPlayback;      /* This is malloc()'d and is used for storing audio data. Typed as ma_uint8 for easy offsetting. */\n            ma_uint8* pBufferCapture;\n        } opensl;\n#endif\n#ifdef MA_SUPPORT_WEBAUDIO\n        struct\n        {\n            /* AudioWorklets path. */\n            /* EMSCRIPTEN_WEBAUDIO_T */ int audioContext;\n            /* EMSCRIPTEN_WEBAUDIO_T */ int audioWorklet;\n            float* pIntermediaryBuffer;\n            void* pStackBuffer;\n            ma_result initResult;   /* Set to MA_BUSY while initialization is in progress. */\n            int deviceIndex;        /* We store the device in a list on the JavaScript side. This is used to map our C object to the JS object. */\n        } webaudio;\n#endif\n#ifdef MA_SUPPORT_NULL\n        struct\n        {\n            ma_thread deviceThread;\n            ma_event operationEvent;\n            ma_event operationCompletionEvent;\n            ma_semaphore operationSemaphore;\n            ma_uint32 operation;\n            ma_result operationResult;\n            ma_timer timer;\n            double priorRunTime;\n            ma_uint32 currentPeriodFramesRemainingPlayback;\n            ma_uint32 currentPeriodFramesRemainingCapture;\n            ma_uint64 lastProcessedFramePlayback;\n            ma_uint64 lastProcessedFrameCapture;\n            ma_atomic_bool32 isStarted; /* Read and written by multiple threads. Must be used atomically, and must be 32-bit for compiler compatibility. */\n        } null_device;\n#endif\n    };\n};\n#if defined(_MSC_VER) && !defined(__clang__)\n    #pragma warning(pop)\n#elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))\n    #pragma GCC diagnostic pop  /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */\n#endif\n\n/*\nInitializes a `ma_context_config` object.\n\n\nReturn Value\n------------\nA `ma_context_config` initialized to defaults.\n\n\nRemarks\n-------\nYou must always use this to initialize the default state of the `ma_context_config` object. Not using this will result in your program breaking when miniaudio\nis updated and new members are added to `ma_context_config`. It also sets logical defaults.\n\nYou can override members of the returned object by changing it's members directly.\n\n\nSee Also\n--------\nma_context_init()\n*/\nMA_API ma_context_config ma_context_config_init(void);\n\n/*\nInitializes a context.\n\nThe context is used for selecting and initializing an appropriate backend and to represent the backend at a more global level than that of an individual\ndevice. There is one context to many devices, and a device is created from a context. A context is required to enumerate devices.\n\n\nParameters\n----------\nbackends (in, optional)\n    A list of backends to try initializing, in priority order. Can be NULL, in which case it uses default priority order.\n\nbackendCount (in, optional)\n    The number of items in `backend`. Ignored if `backend` is NULL.\n\npConfig (in, optional)\n    The context configuration.\n\npContext (in)\n    A pointer to the context object being initialized.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful; any other error code otherwise.\n\n\nThread Safety\n-------------\nUnsafe. Do not call this function across multiple threads as some backends read and write to global state.\n\n\nRemarks\n-------\nWhen `backends` is NULL, the default priority order will be used. Below is a list of backends in priority order:\n\n    |-------------|-----------------------|--------------------------------------------------------|\n    | Name        | Enum Name             | Supported Operating Systems                            |\n    |-------------|-----------------------|--------------------------------------------------------|\n    | WASAPI      | ma_backend_wasapi     | Windows Vista+                                         |\n    | DirectSound | ma_backend_dsound     | Windows XP+                                            |\n    | WinMM       | ma_backend_winmm      | Windows XP+ (may work on older versions, but untested) |\n    | Core Audio  | ma_backend_coreaudio  | macOS, iOS                                             |\n    | ALSA        | ma_backend_alsa       | Linux                                                  |\n    | PulseAudio  | ma_backend_pulseaudio | Cross Platform (disabled on Windows, BSD and Android)  |\n    | JACK        | ma_backend_jack       | Cross Platform (disabled on BSD and Android)           |\n    | sndio       | ma_backend_sndio      | OpenBSD                                                |\n    | audio(4)    | ma_backend_audio4     | NetBSD, OpenBSD                                        |\n    | OSS         | ma_backend_oss        | FreeBSD                                                |\n    | AAudio      | ma_backend_aaudio     | Android 8+                                             |\n    | OpenSL|ES   | ma_backend_opensl     | Android (API level 16+)                                |\n    | Web Audio   | ma_backend_webaudio   | Web (via Emscripten)                                   |\n    | Null        | ma_backend_null       | Cross Platform (not used on Web)                       |\n    |-------------|-----------------------|--------------------------------------------------------|\n\nThe context can be configured via the `pConfig` argument. The config object is initialized with `ma_context_config_init()`. Individual configuration settings\ncan then be set directly on the structure. Below are the members of the `ma_context_config` object.\n\n    pLog\n        A pointer to the `ma_log` to post log messages to. Can be NULL if the application does not\n        require logging. See the `ma_log` API for details on how to use the logging system.\n\n    threadPriority\n        The desired priority to use for the audio thread. Allowable values include the following:\n\n        |--------------------------------------|\n        | Thread Priority                      |\n        |--------------------------------------|\n        | ma_thread_priority_idle              |\n        | ma_thread_priority_lowest            |\n        | ma_thread_priority_low               |\n        | ma_thread_priority_normal            |\n        | ma_thread_priority_high              |\n        | ma_thread_priority_highest (default) |\n        | ma_thread_priority_realtime          |\n        | ma_thread_priority_default           |\n        |--------------------------------------|\n\n    threadStackSize\n        The desired size of the stack for the audio thread. Defaults to the operating system's default.\n\n    pUserData\n        A pointer to application-defined data. This can be accessed from the context object directly such as `context.pUserData`.\n\n    allocationCallbacks\n        Structure containing custom allocation callbacks. Leaving this at defaults will cause it to use MA_MALLOC, MA_REALLOC and MA_FREE. These allocation\n        callbacks will be used for anything tied to the context, including devices.\n\n    alsa.useVerboseDeviceEnumeration\n        ALSA will typically enumerate many different devices which can be intrusive and not user-friendly. To combat this, miniaudio will enumerate only unique\n        card/device pairs by default. The problem with this is that you lose a bit of flexibility and control. Setting alsa.useVerboseDeviceEnumeration makes\n        it so the ALSA backend includes all devices. Defaults to false.\n\n    pulse.pApplicationName\n        PulseAudio only. The application name to use when initializing the PulseAudio context with `pa_context_new()`.\n\n    pulse.pServerName\n        PulseAudio only. The name of the server to connect to with `pa_context_connect()`.\n\n    pulse.tryAutoSpawn\n        PulseAudio only. Whether or not to try automatically starting the PulseAudio daemon. Defaults to false. If you set this to true, keep in mind that\n        miniaudio uses a trial and error method to find the most appropriate backend, and this will result in the PulseAudio daemon starting which may be\n        intrusive for the end user.\n\n    coreaudio.sessionCategory\n        iOS only. The session category to use for the shared AudioSession instance. Below is a list of allowable values and their Core Audio equivalents.\n\n        |-----------------------------------------|-------------------------------------|\n        | miniaudio Token                         | Core Audio Token                    |\n        |-----------------------------------------|-------------------------------------|\n        | ma_ios_session_category_ambient         | AVAudioSessionCategoryAmbient       |\n        | ma_ios_session_category_solo_ambient    | AVAudioSessionCategorySoloAmbient   |\n        | ma_ios_session_category_playback        | AVAudioSessionCategoryPlayback      |\n        | ma_ios_session_category_record          | AVAudioSessionCategoryRecord        |\n        | ma_ios_session_category_play_and_record | AVAudioSessionCategoryPlayAndRecord |\n        | ma_ios_session_category_multi_route     | AVAudioSessionCategoryMultiRoute    |\n        | ma_ios_session_category_none            | AVAudioSessionCategoryAmbient       |\n        | ma_ios_session_category_default         | AVAudioSessionCategoryAmbient       |\n        |-----------------------------------------|-------------------------------------|\n\n    coreaudio.sessionCategoryOptions\n        iOS only. Session category options to use with the shared AudioSession instance. Below is a list of allowable values and their Core Audio equivalents.\n\n        |---------------------------------------------------------------------------|------------------------------------------------------------------|\n        | miniaudio Token                                                           | Core Audio Token                                                 |\n        |---------------------------------------------------------------------------|------------------------------------------------------------------|\n        | ma_ios_session_category_option_mix_with_others                            | AVAudioSessionCategoryOptionMixWithOthers                        |\n        | ma_ios_session_category_option_duck_others                                | AVAudioSessionCategoryOptionDuckOthers                           |\n        | ma_ios_session_category_option_allow_bluetooth                            | AVAudioSessionCategoryOptionAllowBluetooth                       |\n        | ma_ios_session_category_option_default_to_speaker                         | AVAudioSessionCategoryOptionDefaultToSpeaker                     |\n        | ma_ios_session_category_option_interrupt_spoken_audio_and_mix_with_others | AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers |\n        | ma_ios_session_category_option_allow_bluetooth_a2dp                       | AVAudioSessionCategoryOptionAllowBluetoothA2DP                   |\n        | ma_ios_session_category_option_allow_air_play                             | AVAudioSessionCategoryOptionAllowAirPlay                         |\n        |---------------------------------------------------------------------------|------------------------------------------------------------------|\n\n    coreaudio.noAudioSessionActivate\n        iOS only. When set to true, does not perform an explicit [[AVAudioSession sharedInstace] setActive:true] on initialization.\n\n    coreaudio.noAudioSessionDeactivate\n        iOS only. When set to true, does not perform an explicit [[AVAudioSession sharedInstace] setActive:false] on uninitialization.\n\n    jack.pClientName\n        The name of the client to pass to `jack_client_open()`.\n\n    jack.tryStartServer\n        Whether or not to try auto-starting the JACK server. Defaults to false.\n\n\nIt is recommended that only a single context is active at any given time because it's a bulky data structure which performs run-time linking for the\nrelevant backends every time it's initialized.\n\nThe location of the context cannot change throughout it's lifetime. Consider allocating the `ma_context` object with `malloc()` if this is an issue. The\nreason for this is that a pointer to the context is stored in the `ma_device` structure.\n\n\nExample 1 - Default Initialization\n----------------------------------\nThe example below shows how to initialize the context using the default configuration.\n\n```c\nma_context context;\nma_result result = ma_context_init(NULL, 0, NULL, &context);\nif (result != MA_SUCCESS) {\n    // Error.\n}\n```\n\n\nExample 2 - Custom Configuration\n--------------------------------\nThe example below shows how to initialize the context using custom backend priorities and a custom configuration. In this hypothetical example, the program\nwants to prioritize ALSA over PulseAudio on Linux. They also want to avoid using the WinMM backend on Windows because it's latency is too high. They also\nwant an error to be returned if no valid backend is available which they achieve by excluding the Null backend.\n\nFor the configuration, the program wants to capture any log messages so they can, for example, route it to a log file and user interface.\n\n```c\nma_backend backends[] = {\n    ma_backend_alsa,\n    ma_backend_pulseaudio,\n    ma_backend_wasapi,\n    ma_backend_dsound\n};\n\nma_log log;\nma_log_init(&log);\nma_log_register_callback(&log, ma_log_callback_init(my_log_callbac, pMyLogUserData));\n\nma_context_config config = ma_context_config_init();\nconfig.pLog = &log; // Specify a custom log object in the config so any logs that are posted from ma_context_init() are captured.\n\nma_context context;\nma_result result = ma_context_init(backends, sizeof(backends)/sizeof(backends[0]), &config, &context);\nif (result != MA_SUCCESS) {\n    // Error.\n    if (result == MA_NO_BACKEND) {\n        // Couldn't find an appropriate backend.\n    }\n}\n\n// You could also attach a log callback post-initialization:\nma_log_register_callback(ma_context_get_log(&context), ma_log_callback_init(my_log_callback, pMyLogUserData));\n```\n\n\nSee Also\n--------\nma_context_config_init()\nma_context_uninit()\n*/\nMA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendCount, const ma_context_config* pConfig, ma_context* pContext);\n\n/*\nUninitializes a context.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful; any other error code otherwise.\n\n\nThread Safety\n-------------\nUnsafe. Do not call this function across multiple threads as some backends read and write to global state.\n\n\nRemarks\n-------\nResults are undefined if you call this while any device created by this context is still active.\n\n\nSee Also\n--------\nma_context_init()\n*/\nMA_API ma_result ma_context_uninit(ma_context* pContext);\n\n/*\nRetrieves the size of the ma_context object.\n\nThis is mainly for the purpose of bindings to know how much memory to allocate.\n*/\nMA_API size_t ma_context_sizeof(void);\n\n/*\nRetrieves a pointer to the log object associated with this context.\n\n\nRemarks\n-------\nPass the returned pointer to `ma_log_post()`, `ma_log_postv()` or `ma_log_postf()` to post a log\nmessage.\n\nYou can attach your own logging callback to the log with `ma_log_register_callback()`\n\n\nReturn Value\n------------\nA pointer to the `ma_log` object that the context uses to post log messages. If some error occurs,\nNULL will be returned.\n*/\nMA_API ma_log* ma_context_get_log(ma_context* pContext);\n\n/*\nEnumerates over every device (both playback and capture).\n\nThis is a lower-level enumeration function to the easier to use `ma_context_get_devices()`. Use `ma_context_enumerate_devices()` if you would rather not incur\nan internal heap allocation, or it simply suits your code better.\n\nNote that this only retrieves the ID and name/description of the device. The reason for only retrieving basic information is that it would otherwise require\nopening the backend device in order to probe it for more detailed information which can be inefficient. Consider using `ma_context_get_device_info()` for this,\nbut don't call it from within the enumeration callback.\n\nReturning false from the callback will stop enumeration. Returning true will continue enumeration.\n\n\nParameters\n----------\npContext (in)\n    A pointer to the context performing the enumeration.\n\ncallback (in)\n    The callback to fire for each enumerated device.\n\npUserData (in)\n    A pointer to application-defined data passed to the callback.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful; any other error code otherwise.\n\n\nThread Safety\n-------------\nSafe. This is guarded using a simple mutex lock.\n\n\nRemarks\n-------\nDo _not_ assume the first enumerated device of a given type is the default device.\n\nSome backends and platforms may only support default playback and capture devices.\n\nIn general, you should not do anything complicated from within the callback. In particular, do not try initializing a device from within the callback. Also,\ndo not try to call `ma_context_get_device_info()` from within the callback.\n\nConsider using `ma_context_get_devices()` for a simpler and safer API, albeit at the expense of an internal heap allocation.\n\n\nExample 1 - Simple Enumeration\n------------------------------\nma_bool32 ma_device_enum_callback(ma_context* pContext, ma_device_type deviceType, const ma_device_info* pInfo, void* pUserData)\n{\n    printf(\"Device Name: %s\\n\", pInfo->name);\n    return MA_TRUE;\n}\n\nma_result result = ma_context_enumerate_devices(&context, my_device_enum_callback, pMyUserData);\nif (result != MA_SUCCESS) {\n    // Error.\n}\n\n\nSee Also\n--------\nma_context_get_devices()\n*/\nMA_API ma_result ma_context_enumerate_devices(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData);\n\n/*\nRetrieves basic information about every active playback and/or capture device.\n\nThis function will allocate memory internally for the device lists and return a pointer to them through the `ppPlaybackDeviceInfos` and `ppCaptureDeviceInfos`\nparameters. If you do not want to incur the overhead of these allocations consider using `ma_context_enumerate_devices()` which will instead use a callback.\n\n\nParameters\n----------\npContext (in)\n    A pointer to the context performing the enumeration.\n\nppPlaybackDeviceInfos (out)\n    A pointer to a pointer that will receive the address of a buffer containing the list of `ma_device_info` structures for playback devices.\n\npPlaybackDeviceCount (out)\n    A pointer to an unsigned integer that will receive the number of playback devices.\n\nppCaptureDeviceInfos (out)\n    A pointer to a pointer that will receive the address of a buffer containing the list of `ma_device_info` structures for capture devices.\n\npCaptureDeviceCount (out)\n    A pointer to an unsigned integer that will receive the number of capture devices.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful; any other error code otherwise.\n\n\nThread Safety\n-------------\nUnsafe. Since each call to this function invalidates the pointers from the previous call, you should not be calling this simultaneously across multiple\nthreads. Instead, you need to make a copy of the returned data with your own higher level synchronization.\n\n\nRemarks\n-------\nIt is _not_ safe to assume the first device in the list is the default device.\n\nYou can pass in NULL for the playback or capture lists in which case they'll be ignored.\n\nThe returned pointers will become invalid upon the next call this this function, or when the context is uninitialized. Do not free the returned pointers.\n\n\nSee Also\n--------\nma_context_get_devices()\n*/\nMA_API ma_result ma_context_get_devices(ma_context* pContext, ma_device_info** ppPlaybackDeviceInfos, ma_uint32* pPlaybackDeviceCount, ma_device_info** ppCaptureDeviceInfos, ma_uint32* pCaptureDeviceCount);\n\n/*\nRetrieves information about a device of the given type, with the specified ID and share mode.\n\n\nParameters\n----------\npContext (in)\n    A pointer to the context performing the query.\n\ndeviceType (in)\n    The type of the device being queried. Must be either `ma_device_type_playback` or `ma_device_type_capture`.\n\npDeviceID (in)\n    The ID of the device being queried.\n\npDeviceInfo (out)\n    A pointer to the `ma_device_info` structure that will receive the device information.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful; any other error code otherwise.\n\n\nThread Safety\n-------------\nSafe. This is guarded using a simple mutex lock.\n\n\nRemarks\n-------\nDo _not_ call this from within the `ma_context_enumerate_devices()` callback.\n\nIt's possible for a device to have different information and capabilities depending on whether or not it's opened in shared or exclusive mode. For example, in\nshared mode, WASAPI always uses floating point samples for mixing, but in exclusive mode it can be anything. Therefore, this function allows you to specify\nwhich share mode you want information for. Note that not all backends and devices support shared or exclusive mode, in which case this function will fail if\nthe requested share mode is unsupported.\n\nThis leaves pDeviceInfo unmodified in the result of an error.\n*/\nMA_API ma_result ma_context_get_device_info(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo);\n\n/*\nDetermines if the given context supports loopback mode.\n\n\nParameters\n----------\npContext (in)\n    A pointer to the context getting queried.\n\n\nReturn Value\n------------\nMA_TRUE if the context supports loopback mode; MA_FALSE otherwise.\n*/\nMA_API ma_bool32 ma_context_is_loopback_supported(ma_context* pContext);\n\n\n\n/*\nInitializes a device config with default settings.\n\n\nParameters\n----------\ndeviceType (in)\n    The type of the device this config is being initialized for. This must set to one of the following:\n\n    |-------------------------|\n    | Device Type             |\n    |-------------------------|\n    | ma_device_type_playback |\n    | ma_device_type_capture  |\n    | ma_device_type_duplex   |\n    | ma_device_type_loopback |\n    |-------------------------|\n\n\nReturn Value\n------------\nA new device config object with default settings. You will typically want to adjust the config after this function returns. See remarks.\n\n\nThread Safety\n-------------\nSafe.\n\n\nCallback Safety\n---------------\nSafe, but don't try initializing a device in a callback.\n\n\nRemarks\n-------\nThe returned config will be initialized to defaults. You will normally want to customize a few variables before initializing the device. See Example 1 for a\ntypical configuration which sets the sample format, channel count, sample rate, data callback and user data. These are usually things you will want to change\nbefore initializing the device.\n\nSee `ma_device_init()` for details on specific configuration options.\n\n\nExample 1 - Simple Configuration\n--------------------------------\nThe example below is what a program will typically want to configure for each device at a minimum. Notice how `ma_device_config_init()` is called first, and\nthen the returned object is modified directly. This is important because it ensures that your program continues to work as new configuration options are added\nto the `ma_device_config` structure.\n\n```c\nma_device_config config = ma_device_config_init(ma_device_type_playback);\nconfig.playback.format   = ma_format_f32;\nconfig.playback.channels = 2;\nconfig.sampleRate        = 48000;\nconfig.dataCallback      = ma_data_callback;\nconfig.pUserData         = pMyUserData;\n```\n\n\nSee Also\n--------\nma_device_init()\nma_device_init_ex()\n*/\nMA_API ma_device_config ma_device_config_init(ma_device_type deviceType);\n\n\n/*\nInitializes a device.\n\nA device represents a physical audio device. The idea is you send or receive audio data from the device to either play it back through a speaker, or capture it\nfrom a microphone. Whether or not you should send or receive data from the device (or both) depends on the type of device you are initializing which can be\nplayback, capture, full-duplex or loopback. (Note that loopback mode is only supported on select backends.) Sending and receiving audio data to and from the\ndevice is done via a callback which is fired by miniaudio at periodic time intervals.\n\nThe frequency at which data is delivered to and from a device depends on the size of it's period. The size of the period can be defined in terms of PCM frames\nor milliseconds, whichever is more convenient. Generally speaking, the smaller the period, the lower the latency at the expense of higher CPU usage and\nincreased risk of glitching due to the more frequent and granular data deliver intervals. The size of a period will depend on your requirements, but\nminiaudio's defaults should work fine for most scenarios. If you're building a game you should leave this fairly small, whereas if you're building a simple\nmedia player you can make it larger. Note that the period size you request is actually just a hint - miniaudio will tell the backend what you want, but the\nbackend is ultimately responsible for what it gives you. You cannot assume you will get exactly what you ask for.\n\nWhen delivering data to and from a device you need to make sure it's in the correct format which you can set through the device configuration. You just set the\nformat that you want to use and miniaudio will perform all of the necessary conversion for you internally. When delivering data to and from the callback you\ncan assume the format is the same as what you requested when you initialized the device. See Remarks for more details on miniaudio's data conversion pipeline.\n\n\nParameters\n----------\npContext (in, optional)\n    A pointer to the context that owns the device. This can be null, in which case it creates a default context internally.\n\npConfig (in)\n    A pointer to the device configuration. Cannot be null. See remarks for details.\n\npDevice (out)\n    A pointer to the device object being initialized.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful; any other error code otherwise.\n\n\nThread Safety\n-------------\nUnsafe. It is not safe to call this function simultaneously for different devices because some backends depend on and mutate global state. The same applies to\ncalling this at the same time as `ma_device_uninit()`.\n\n\nCallback Safety\n---------------\nUnsafe. It is not safe to call this inside any callback.\n\n\nRemarks\n-------\nSetting `pContext` to NULL will result in miniaudio creating a default context internally and is equivalent to passing in a context initialized like so:\n\n    ```c\n    ma_context_init(NULL, 0, NULL, &context);\n    ```\n\nDo not set `pContext` to NULL if you are needing to open multiple devices. You can, however, use NULL when initializing the first device, and then use\ndevice.pContext for the initialization of other devices.\n\nThe device can be configured via the `pConfig` argument. The config object is initialized with `ma_device_config_init()`. Individual configuration settings can\nthen be set directly on the structure. Below are the members of the `ma_device_config` object.\n\n    deviceType\n        Must be `ma_device_type_playback`, `ma_device_type_capture`, `ma_device_type_duplex` of `ma_device_type_loopback`.\n\n    sampleRate\n        The sample rate, in hertz. The most common sample rates are 48000 and 44100. Setting this to 0 will use the device's native sample rate.\n\n    periodSizeInFrames\n        The desired size of a period in PCM frames. If this is 0, `periodSizeInMilliseconds` will be used instead. If both are 0 the default buffer size will\n        be used depending on the selected performance profile. This value affects latency. See below for details.\n\n    periodSizeInMilliseconds\n        The desired size of a period in milliseconds. If this is 0, `periodSizeInFrames` will be used instead. If both are 0 the default buffer size will be\n        used depending on the selected performance profile. The value affects latency. See below for details.\n\n    periods\n        The number of periods making up the device's entire buffer. The total buffer size is `periodSizeInFrames` or `periodSizeInMilliseconds` multiplied by\n        this value. This is just a hint as backends will be the ones who ultimately decide how your periods will be configured.\n\n    performanceProfile\n        A hint to miniaudio as to the performance requirements of your program. Can be either `ma_performance_profile_low_latency` (default) or\n        `ma_performance_profile_conservative`. This mainly affects the size of default buffers and can usually be left at it's default value.\n\n    noPreSilencedOutputBuffer\n        When set to true, the contents of the output buffer passed into the data callback will be left undefined. When set to false (default), the contents of\n        the output buffer will be cleared the zero. You can use this to avoid the overhead of zeroing out the buffer if you can guarantee that your data\n        callback will write to every sample in the output buffer, or if you are doing your own clearing.\n\n    noClip\n        When set to true, the contents of the output buffer are left alone after returning and it will be left up to the backend itself to decide whether or\n        not to clip. When set to false (default), the contents of the output buffer passed into the data callback will be clipped after returning. This only\n        applies when the playback sample format is f32.\n\n    noDisableDenormals\n        By default, miniaudio will disable denormals when the data callback is called. Setting this to true will prevent the disabling of denormals.\n\n    noFixedSizedCallback\n        Allows miniaudio to fire the data callback with any frame count. When this is set to false (the default), the data callback will be fired with a\n        consistent frame count as specified by `periodSizeInFrames` or `periodSizeInMilliseconds`. When set to true, miniaudio will fire the callback with\n        whatever the backend requests, which could be anything.\n\n    dataCallback\n        The callback to fire whenever data is ready to be delivered to or from the device.\n\n    notificationCallback\n        The callback to fire when something has changed with the device, such as whether or not it has been started or stopped.\n\n    pUserData\n        The user data pointer to use with the device. You can access this directly from the device object like `device.pUserData`.\n\n    resampling.algorithm\n        The resampling algorithm to use when miniaudio needs to perform resampling between the rate specified by `sampleRate` and the device's native rate. The\n        default value is `ma_resample_algorithm_linear`, and the quality can be configured with `resampling.linear.lpfOrder`.\n\n    resampling.pBackendVTable\n        A pointer to an optional vtable that can be used for plugging in a custom resampler.\n\n    resampling.pBackendUserData\n        A pointer that will passed to callbacks in pBackendVTable.\n\n    resampling.linear.lpfOrder\n        The linear resampler applies a low-pass filter as part of it's processing for anti-aliasing. This setting controls the order of the filter. The higher\n        the value, the better the quality, in general. Setting this to 0 will disable low-pass filtering altogether. The maximum value is\n        `MA_MAX_FILTER_ORDER`. The default value is `min(4, MA_MAX_FILTER_ORDER)`.\n\n    playback.pDeviceID\n        A pointer to a `ma_device_id` structure containing the ID of the playback device to initialize. Setting this NULL (default) will use the system's\n        default playback device. Retrieve the device ID from the `ma_device_info` structure, which can be retrieved using device enumeration.\n\n    playback.format\n        The sample format to use for playback. When set to `ma_format_unknown` the device's native format will be used. This can be retrieved after\n        initialization from the device object directly with `device.playback.format`.\n\n    playback.channels\n        The number of channels to use for playback. When set to 0 the device's native channel count will be used. This can be retrieved after initialization\n        from the device object directly with `device.playback.channels`.\n\n    playback.pChannelMap\n        The channel map to use for playback. When left empty, the device's native channel map will be used. This can be retrieved after initialization from the\n        device object direct with `device.playback.pChannelMap`. When set, the buffer should contain `channels` items.\n\n    playback.shareMode\n        The preferred share mode to use for playback. Can be either `ma_share_mode_shared` (default) or `ma_share_mode_exclusive`. Note that if you specify\n        exclusive mode, but it's not supported by the backend, initialization will fail. You can then fall back to shared mode if desired by changing this to\n        ma_share_mode_shared and reinitializing.\n\n    capture.pDeviceID\n        A pointer to a `ma_device_id` structure containing the ID of the capture device to initialize. Setting this NULL (default) will use the system's\n        default capture device. Retrieve the device ID from the `ma_device_info` structure, which can be retrieved using device enumeration.\n\n    capture.format\n        The sample format to use for capture. When set to `ma_format_unknown` the device's native format will be used. This can be retrieved after\n        initialization from the device object directly with `device.capture.format`.\n\n    capture.channels\n        The number of channels to use for capture. When set to 0 the device's native channel count will be used. This can be retrieved after initialization\n        from the device object directly with `device.capture.channels`.\n\n    capture.pChannelMap\n        The channel map to use for capture. When left empty, the device's native channel map will be used. This can be retrieved after initialization from the\n        device object direct with `device.capture.pChannelMap`. When set, the buffer should contain `channels` items.\n\n    capture.shareMode\n        The preferred share mode to use for capture. Can be either `ma_share_mode_shared` (default) or `ma_share_mode_exclusive`. Note that if you specify\n        exclusive mode, but it's not supported by the backend, initialization will fail. You can then fall back to shared mode if desired by changing this to\n        ma_share_mode_shared and reinitializing.\n\n    wasapi.noAutoConvertSRC\n        WASAPI only. When set to true, disables WASAPI's automatic resampling and forces the use of miniaudio's resampler. Defaults to false.\n\n    wasapi.noDefaultQualitySRC\n        WASAPI only. Only used when `wasapi.noAutoConvertSRC` is set to false. When set to true, disables the use of `AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY`.\n        You should usually leave this set to false, which is the default.\n\n    wasapi.noAutoStreamRouting\n        WASAPI only. When set to true, disables automatic stream routing on the WASAPI backend. Defaults to false.\n\n    wasapi.noHardwareOffloading\n        WASAPI only. When set to true, disables the use of WASAPI's hardware offloading feature. Defaults to false.\n\n    alsa.noMMap\n        ALSA only. When set to true, disables MMap mode. Defaults to false.\n\n    alsa.noAutoFormat\n        ALSA only. When set to true, disables ALSA's automatic format conversion by including the SND_PCM_NO_AUTO_FORMAT flag. Defaults to false.\n\n    alsa.noAutoChannels\n        ALSA only. When set to true, disables ALSA's automatic channel conversion by including the SND_PCM_NO_AUTO_CHANNELS flag. Defaults to false.\n\n    alsa.noAutoResample\n        ALSA only. When set to true, disables ALSA's automatic resampling by including the SND_PCM_NO_AUTO_RESAMPLE flag. Defaults to false.\n\n    pulse.pStreamNamePlayback\n        PulseAudio only. Sets the stream name for playback.\n\n    pulse.pStreamNameCapture\n        PulseAudio only. Sets the stream name for capture.\n\n    coreaudio.allowNominalSampleRateChange\n        Core Audio only. Desktop only. When enabled, allows the sample rate of the device to be changed at the operating system level. This\n        is disabled by default in order to prevent intrusive changes to the user's system. This is useful if you want to use a sample rate\n        that is known to be natively supported by the hardware thereby avoiding the cost of resampling. When set to true, miniaudio will\n        find the closest match between the sample rate requested in the device config and the sample rates natively supported by the\n        hardware. When set to false, the sample rate currently set by the operating system will always be used.\n\n    opensl.streamType\n        OpenSL only. Explicitly sets the stream type. If left unset (`ma_opensl_stream_type_default`), the\n        stream type will be left unset. Think of this as the type of audio you're playing.\n\n    opensl.recordingPreset\n        OpenSL only. Explicitly sets the type of recording your program will be doing. When left\n        unset, the recording preset will be left unchanged.\n\n    aaudio.usage\n        AAudio only. Explicitly sets the nature of the audio the program will be consuming. When\n        left unset, the usage will be left unchanged.\n\n    aaudio.contentType\n        AAudio only. Sets the content type. When left unset, the content type will be left unchanged.\n\n    aaudio.inputPreset\n        AAudio only. Explicitly sets the type of recording your program will be doing. When left\n        unset, the input preset will be left unchanged.\n\n    aaudio.noAutoStartAfterReroute\n        AAudio only. Controls whether or not the device should be automatically restarted after a\n        stream reroute. When set to false (default) the device will be restarted automatically;\n        otherwise the device will be stopped.\n\n\nOnce initialized, the device's config is immutable. If you need to change the config you will need to initialize a new device.\n\nAfter initializing the device it will be in a stopped state. To start it, use `ma_device_start()`.\n\nIf both `periodSizeInFrames` and `periodSizeInMilliseconds` are set to zero, it will default to `MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY` or\n`MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE`, depending on whether or not `performanceProfile` is set to `ma_performance_profile_low_latency` or\n`ma_performance_profile_conservative`.\n\nIf you request exclusive mode and the backend does not support it an error will be returned. For robustness, you may want to first try initializing the device\nin exclusive mode, and then fall back to shared mode if required. Alternatively you can just request shared mode (the default if you leave it unset in the\nconfig) which is the most reliable option. Some backends do not have a practical way of choosing whether or not the device should be exclusive or not (ALSA,\nfor example) in which case it just acts as a hint. Unless you have special requirements you should try avoiding exclusive mode as it's intrusive to the user.\nStarting with Windows 10, miniaudio will use low-latency shared mode where possible which may make exclusive mode unnecessary.\n\nWhen sending or receiving data to/from a device, miniaudio will internally perform a format conversion to convert between the format specified by the config\nand the format used internally by the backend. If you pass in 0 for the sample format, channel count, sample rate _and_ channel map, data transmission will run\non an optimized pass-through fast path. You can retrieve the format, channel count and sample rate by inspecting the `playback/capture.format`,\n`playback/capture.channels` and `sampleRate` members of the device object.\n\nWhen compiling for UWP you must ensure you call this function on the main UI thread because the operating system may need to present the user with a message\nasking for permissions. Please refer to the official documentation for ActivateAudioInterfaceAsync() for more information.\n\nALSA Specific: When initializing the default device, requesting shared mode will try using the \"dmix\" device for playback and the \"dsnoop\" device for capture.\nIf these fail it will try falling back to the \"hw\" device.\n\n\nExample 1 - Simple Initialization\n---------------------------------\nThis example shows how to initialize a simple playback device using a standard configuration. If you are just needing to do simple playback from the default\nplayback device this is usually all you need.\n\n```c\nma_device_config config = ma_device_config_init(ma_device_type_playback);\nconfig.playback.format   = ma_format_f32;\nconfig.playback.channels = 2;\nconfig.sampleRate        = 48000;\nconfig.dataCallback      = ma_data_callback;\nconfig.pMyUserData       = pMyUserData;\n\nma_device device;\nma_result result = ma_device_init(NULL, &config, &device);\nif (result != MA_SUCCESS) {\n    // Error\n}\n```\n\n\nExample 2 - Advanced Initialization\n-----------------------------------\nThis example shows how you might do some more advanced initialization. In this hypothetical example we want to control the latency by setting the buffer size\nand period count. We also want to allow the user to be able to choose which device to output from which means we need a context so we can perform device\nenumeration.\n\n```c\nma_context context;\nma_result result = ma_context_init(NULL, 0, NULL, &context);\nif (result != MA_SUCCESS) {\n    // Error\n}\n\nma_device_info* pPlaybackDeviceInfos;\nma_uint32 playbackDeviceCount;\nresult = ma_context_get_devices(&context, &pPlaybackDeviceInfos, &playbackDeviceCount, NULL, NULL);\nif (result != MA_SUCCESS) {\n    // Error\n}\n\n// ... choose a device from pPlaybackDeviceInfos ...\n\nma_device_config config = ma_device_config_init(ma_device_type_playback);\nconfig.playback.pDeviceID       = pMyChosenDeviceID;    // <-- Get this from the `id` member of one of the `ma_device_info` objects returned by ma_context_get_devices().\nconfig.playback.format          = ma_format_f32;\nconfig.playback.channels        = 2;\nconfig.sampleRate               = 48000;\nconfig.dataCallback             = ma_data_callback;\nconfig.pUserData                = pMyUserData;\nconfig.periodSizeInMilliseconds = 10;\nconfig.periods                  = 3;\n\nma_device device;\nresult = ma_device_init(&context, &config, &device);\nif (result != MA_SUCCESS) {\n    // Error\n}\n```\n\n\nSee Also\n--------\nma_device_config_init()\nma_device_uninit()\nma_device_start()\nma_context_init()\nma_context_get_devices()\nma_context_enumerate_devices()\n*/\nMA_API ma_result ma_device_init(ma_context* pContext, const ma_device_config* pConfig, ma_device* pDevice);\n\n/*\nInitializes a device without a context, with extra parameters for controlling the configuration of the internal self-managed context.\n\nThis is the same as `ma_device_init()`, only instead of a context being passed in, the parameters from `ma_context_init()` are passed in instead. This function\nallows you to configure the internally created context.\n\n\nParameters\n----------\nbackends (in, optional)\n    A list of backends to try initializing, in priority order. Can be NULL, in which case it uses default priority order.\n\nbackendCount (in, optional)\n    The number of items in `backend`. Ignored if `backend` is NULL.\n\npContextConfig (in, optional)\n    The context configuration.\n\npConfig (in)\n    A pointer to the device configuration. Cannot be null. See remarks for details.\n\npDevice (out)\n    A pointer to the device object being initialized.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful; any other error code otherwise.\n\n\nThread Safety\n-------------\nUnsafe. It is not safe to call this function simultaneously for different devices because some backends depend on and mutate global state. The same applies to\ncalling this at the same time as `ma_device_uninit()`.\n\n\nCallback Safety\n---------------\nUnsafe. It is not safe to call this inside any callback.\n\n\nRemarks\n-------\nYou only need to use this function if you want to configure the context differently to it's defaults. You should never use this function if you want to manage\nyour own context.\n\nSee the documentation for `ma_context_init()` for information on the different context configuration options.\n\n\nSee Also\n--------\nma_device_init()\nma_device_uninit()\nma_device_config_init()\nma_context_init()\n*/\nMA_API ma_result ma_device_init_ex(const ma_backend backends[], ma_uint32 backendCount, const ma_context_config* pContextConfig, const ma_device_config* pConfig, ma_device* pDevice);\n\n/*\nUninitializes a device.\n\nThis will explicitly stop the device. You do not need to call `ma_device_stop()` beforehand, but it's harmless if you do.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to the device to stop.\n\n\nReturn Value\n------------\nNothing\n\n\nThread Safety\n-------------\nUnsafe. As soon as this API is called the device should be considered undefined.\n\n\nCallback Safety\n---------------\nUnsafe. It is not safe to call this inside any callback. Doing this will result in a deadlock.\n\n\nSee Also\n--------\nma_device_init()\nma_device_stop()\n*/\nMA_API void ma_device_uninit(ma_device* pDevice);\n\n\n/*\nRetrieves a pointer to the context that owns the given device.\n*/\nMA_API ma_context* ma_device_get_context(ma_device* pDevice);\n\n/*\nHelper function for retrieving the log object associated with the context that owns this device.\n*/\nMA_API ma_log* ma_device_get_log(ma_device* pDevice);\n\n\n/*\nRetrieves information about the device.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to the device whose information is being retrieved.\n\ntype (in)\n    The device type. This parameter is required for duplex devices. When retrieving device\n    information, you are doing so for an individual playback or capture device.\n\npDeviceInfo (out)\n    A pointer to the `ma_device_info` that will receive the device information.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful; any other error code otherwise.\n\n\nThread Safety\n-------------\nUnsafe. This should be considered unsafe because it may be calling into the backend which may or\nmay not be safe.\n\n\nCallback Safety\n---------------\nUnsafe. You should avoid calling this in the data callback because it may call into the backend\nwhich may or may not be safe.\n*/\nMA_API ma_result ma_device_get_info(ma_device* pDevice, ma_device_type type, ma_device_info* pDeviceInfo);\n\n\n/*\nRetrieves the name of the device.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to the device whose information is being retrieved.\n\ntype (in)\n    The device type. This parameter is required for duplex devices. When retrieving device\n    information, you are doing so for an individual playback or capture device.\n\npName (out)\n    A pointer to the buffer that will receive the name.\n\nnameCap (in)\n    The capacity of the output buffer, including space for the null terminator.\n\npLengthNotIncludingNullTerminator (out, optional)\n    A pointer to the variable that will receive the length of the name, not including the null\n    terminator.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful; any other error code otherwise.\n\n\nThread Safety\n-------------\nUnsafe. This should be considered unsafe because it may be calling into the backend which may or\nmay not be safe.\n\n\nCallback Safety\n---------------\nUnsafe. You should avoid calling this in the data callback because it may call into the backend\nwhich may or may not be safe.\n\n\nRemarks\n-------\nIf the name does not fully fit into the output buffer, it'll be truncated. You can pass in NULL to\n`pName` if you want to first get the length of the name for the purpose of memory allocation of the\noutput buffer. Allocating a buffer of size `MA_MAX_DEVICE_NAME_LENGTH + 1` should be enough for\nmost cases and will avoid the need for the inefficiency of calling this function twice.\n\nThis is implemented in terms of `ma_device_get_info()`.\n*/\nMA_API ma_result ma_device_get_name(ma_device* pDevice, ma_device_type type, char* pName, size_t nameCap, size_t* pLengthNotIncludingNullTerminator);\n\n\n/*\nStarts the device. For playback devices this begins playback. For capture devices it begins recording.\n\nUse `ma_device_stop()` to stop the device.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to the device to start.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful; any other error code otherwise.\n\n\nThread Safety\n-------------\nSafe. It's safe to call this from any thread with the exception of the callback thread.\n\n\nCallback Safety\n---------------\nUnsafe. It is not safe to call this inside any callback.\n\n\nRemarks\n-------\nFor a playback device, this will retrieve an initial chunk of audio data from the client before returning. The reason for this is to ensure there is valid\naudio data in the buffer, which needs to be done before the device begins playback.\n\nThis API waits until the backend device has been started for real by the worker thread. It also waits on a mutex for thread-safety.\n\nDo not call this in any callback.\n\n\nSee Also\n--------\nma_device_stop()\n*/\nMA_API ma_result ma_device_start(ma_device* pDevice);\n\n/*\nStops the device. For playback devices this stops playback. For capture devices it stops recording.\n\nUse `ma_device_start()` to start the device again.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to the device to stop.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful; any other error code otherwise.\n\n\nThread Safety\n-------------\nSafe. It's safe to call this from any thread with the exception of the callback thread.\n\n\nCallback Safety\n---------------\nUnsafe. It is not safe to call this inside any callback. Doing this will result in a deadlock.\n\n\nRemarks\n-------\nThis API needs to wait on the worker thread to stop the backend device properly before returning. It also waits on a mutex for thread-safety. In addition, some\nbackends need to wait for the device to finish playback/recording of the current fragment which can take some time (usually proportionate to the buffer size\nthat was specified at initialization time).\n\nBackends are required to either pause the stream in-place or drain the buffer if pausing is not possible. The reason for this is that stopping the device and\nthe resuming it with ma_device_start() (which you might do when your program loses focus) may result in a situation where those samples are never output to the\nspeakers or received from the microphone which can in turn result in de-syncs.\n\nDo not call this in any callback.\n\n\nSee Also\n--------\nma_device_start()\n*/\nMA_API ma_result ma_device_stop(ma_device* pDevice);\n\n/*\nDetermines whether or not the device is started.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to the device whose start state is being retrieved.\n\n\nReturn Value\n------------\nTrue if the device is started, false otherwise.\n\n\nThread Safety\n-------------\nSafe. If another thread calls `ma_device_start()` or `ma_device_stop()` at this same time as this function is called, there's a very small chance the return\nvalue will be out of sync.\n\n\nCallback Safety\n---------------\nSafe. This is implemented as a simple accessor.\n\n\nSee Also\n--------\nma_device_start()\nma_device_stop()\n*/\nMA_API ma_bool32 ma_device_is_started(const ma_device* pDevice);\n\n\n/*\nRetrieves the state of the device.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to the device whose state is being retrieved.\n\n\nReturn Value\n------------\nThe current state of the device. The return value will be one of the following:\n\n    +-------------------------------+------------------------------------------------------------------------------+\n    | ma_device_state_uninitialized | Will only be returned if the device is in the middle of initialization.      |\n    +-------------------------------+------------------------------------------------------------------------------+\n    | ma_device_state_stopped       | The device is stopped. The initial state of the device after initialization. |\n    +-------------------------------+------------------------------------------------------------------------------+\n    | ma_device_state_started       | The device started and requesting and/or delivering audio data.              |\n    +-------------------------------+------------------------------------------------------------------------------+\n    | ma_device_state_starting      | The device is in the process of starting.                                    |\n    +-------------------------------+------------------------------------------------------------------------------+\n    | ma_device_state_stopping      | The device is in the process of stopping.                                    |\n    +-------------------------------+------------------------------------------------------------------------------+\n\n\nThread Safety\n-------------\nSafe. This is implemented as a simple accessor. Note that if the device is started or stopped at the same time as this function is called,\nthere's a possibility the return value could be out of sync. See remarks.\n\n\nCallback Safety\n---------------\nSafe. This is implemented as a simple accessor.\n\n\nRemarks\n-------\nThe general flow of a devices state goes like this:\n\n    ```\n    ma_device_init()  -> ma_device_state_uninitialized -> ma_device_state_stopped\n    ma_device_start() -> ma_device_state_starting      -> ma_device_state_started\n    ma_device_stop()  -> ma_device_state_stopping      -> ma_device_state_stopped\n    ```\n\nWhen the state of the device is changed with `ma_device_start()` or `ma_device_stop()` at this same time as this function is called, the\nvalue returned by this function could potentially be out of sync. If this is significant to your program you need to implement your own\nsynchronization.\n*/\nMA_API ma_device_state ma_device_get_state(const ma_device* pDevice);\n\n\n/*\nPerforms post backend initialization routines for setting up internal data conversion.\n\nThis should be called whenever the backend is initialized. The only time this should be called from\noutside of miniaudio is if you're implementing a custom backend, and you would only do it if you\nare reinitializing the backend due to rerouting or reinitializing for some reason.\n\n\nParameters\n----------\npDevice [in]\n    A pointer to the device.\n\ndeviceType [in]\n    The type of the device that was just reinitialized.\n\npPlaybackDescriptor [in]\n    The descriptor of the playback device containing the internal data format and buffer sizes.\n\npPlaybackDescriptor [in]\n    The descriptor of the capture device containing the internal data format and buffer sizes.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful; any other error otherwise.\n\n\nThread Safety\n-------------\nUnsafe. This will be reinitializing internal data converters which may be in use by another thread.\n\n\nCallback Safety\n---------------\nUnsafe. This will be reinitializing internal data converters which may be in use by the callback.\n\n\nRemarks\n-------\nFor a duplex device, you can call this for only one side of the system. This is why the deviceType\nis specified as a parameter rather than deriving it from the device.\n\nYou do not need to call this manually unless you are doing a custom backend, in which case you need\nonly do it if you're manually performing rerouting or reinitialization.\n*/\nMA_API ma_result ma_device_post_init(ma_device* pDevice, ma_device_type deviceType, const ma_device_descriptor* pPlaybackDescriptor, const ma_device_descriptor* pCaptureDescriptor);\n\n\n/*\nSets the master volume factor for the device.\n\nThe volume factor must be between 0 (silence) and 1 (full volume). Use `ma_device_set_master_volume_db()` to use decibel notation, where 0 is full volume and\nvalues less than 0 decreases the volume.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to the device whose volume is being set.\n\nvolume (in)\n    The new volume factor. Must be >= 0.\n\n\nReturn Value\n------------\nMA_SUCCESS if the volume was set successfully.\nMA_INVALID_ARGS if pDevice is NULL.\nMA_INVALID_ARGS if volume is negative.\n\n\nThread Safety\n-------------\nSafe. This just sets a local member of the device object.\n\n\nCallback Safety\n---------------\nSafe. If you set the volume in the data callback, that data written to the output buffer will have the new volume applied.\n\n\nRemarks\n-------\nThis applies the volume factor across all channels.\n\nThis does not change the operating system's volume. It only affects the volume for the given `ma_device` object's audio stream.\n\n\nSee Also\n--------\nma_device_get_master_volume()\nma_device_set_master_volume_db()\nma_device_get_master_volume_db()\n*/\nMA_API ma_result ma_device_set_master_volume(ma_device* pDevice, float volume);\n\n/*\nRetrieves the master volume factor for the device.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to the device whose volume factor is being retrieved.\n\npVolume (in)\n    A pointer to the variable that will receive the volume factor. The returned value will be in the range of [0, 1].\n\n\nReturn Value\n------------\nMA_SUCCESS if successful.\nMA_INVALID_ARGS if pDevice is NULL.\nMA_INVALID_ARGS if pVolume is NULL.\n\n\nThread Safety\n-------------\nSafe. This just a simple member retrieval.\n\n\nCallback Safety\n---------------\nSafe.\n\n\nRemarks\n-------\nIf an error occurs, `*pVolume` will be set to 0.\n\n\nSee Also\n--------\nma_device_set_master_volume()\nma_device_set_master_volume_gain_db()\nma_device_get_master_volume_gain_db()\n*/\nMA_API ma_result ma_device_get_master_volume(ma_device* pDevice, float* pVolume);\n\n/*\nSets the master volume for the device as gain in decibels.\n\nA gain of 0 is full volume, whereas a gain of < 0 will decrease the volume.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to the device whose gain is being set.\n\ngainDB (in)\n    The new volume as gain in decibels. Must be less than or equal to 0, where 0 is full volume and anything less than 0 decreases the volume.\n\n\nReturn Value\n------------\nMA_SUCCESS if the volume was set successfully.\nMA_INVALID_ARGS if pDevice is NULL.\nMA_INVALID_ARGS if the gain is > 0.\n\n\nThread Safety\n-------------\nSafe. This just sets a local member of the device object.\n\n\nCallback Safety\n---------------\nSafe. If you set the volume in the data callback, that data written to the output buffer will have the new volume applied.\n\n\nRemarks\n-------\nThis applies the gain across all channels.\n\nThis does not change the operating system's volume. It only affects the volume for the given `ma_device` object's audio stream.\n\n\nSee Also\n--------\nma_device_get_master_volume_gain_db()\nma_device_set_master_volume()\nma_device_get_master_volume()\n*/\nMA_API ma_result ma_device_set_master_volume_db(ma_device* pDevice, float gainDB);\n\n/*\nRetrieves the master gain in decibels.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to the device whose gain is being retrieved.\n\npGainDB (in)\n    A pointer to the variable that will receive the gain in decibels. The returned value will be <= 0.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful.\nMA_INVALID_ARGS if pDevice is NULL.\nMA_INVALID_ARGS if pGainDB is NULL.\n\n\nThread Safety\n-------------\nSafe. This just a simple member retrieval.\n\n\nCallback Safety\n---------------\nSafe.\n\n\nRemarks\n-------\nIf an error occurs, `*pGainDB` will be set to 0.\n\n\nSee Also\n--------\nma_device_set_master_volume_db()\nma_device_set_master_volume()\nma_device_get_master_volume()\n*/\nMA_API ma_result ma_device_get_master_volume_db(ma_device* pDevice, float* pGainDB);\n\n\n/*\nCalled from the data callback of asynchronous backends to allow miniaudio to process the data and fire the miniaudio data callback.\n\n\nParameters\n----------\npDevice (in)\n    A pointer to device whose processing the data callback.\n\npOutput (out)\n    A pointer to the buffer that will receive the output PCM frame data. On a playback device this must not be NULL. On a duplex device\n    this can be NULL, in which case pInput must not be NULL.\n\npInput (in)\n    A pointer to the buffer containing input PCM frame data. On a capture device this must not be NULL. On a duplex device this can be\n    NULL, in which case `pOutput` must not be NULL.\n\nframeCount (in)\n    The number of frames being processed.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful; any other result code otherwise.\n\n\nThread Safety\n-------------\nThis function should only ever be called from the internal data callback of the backend. It is safe to call this simultaneously between a\nplayback and capture device in duplex setups.\n\n\nCallback Safety\n---------------\nDo not call this from the miniaudio data callback. It should only ever be called from the internal data callback of the backend.\n\n\nRemarks\n-------\nIf both `pOutput` and `pInput` are NULL, and error will be returned. In duplex scenarios, both `pOutput` and `pInput` can be non-NULL, in\nwhich case `pInput` will be processed first, followed by `pOutput`.\n\nIf you are implementing a custom backend, and that backend uses a callback for data delivery, you'll need to call this from inside that\ncallback.\n*/\nMA_API ma_result ma_device_handle_backend_data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount);\n\n\n/*\nCalculates an appropriate buffer size from a descriptor, native sample rate and performance profile.\n\nThis function is used by backends for helping determine an appropriately sized buffer to use with\nthe device depending on the values of `periodSizeInFrames` and `periodSizeInMilliseconds` in the\n`pDescriptor` object. Since buffer size calculations based on time depends on the sample rate, a\nbest guess at the device's native sample rate is also required which is where `nativeSampleRate`\ncomes in. In addition, the performance profile is also needed for cases where both the period size\nin frames and milliseconds are both zero.\n\n\nParameters\n----------\npDescriptor (in)\n    A pointer to device descriptor whose `periodSizeInFrames` and `periodSizeInMilliseconds` members\n    will be used for the calculation of the buffer size.\n\nnativeSampleRate (in)\n    The device's native sample rate. This is only ever used when the `periodSizeInFrames` member of\n    `pDescriptor` is zero. In this case, `periodSizeInMilliseconds` will be used instead, in which\n    case a sample rate is required to convert to a size in frames.\n\nperformanceProfile (in)\n    When both the `periodSizeInFrames` and `periodSizeInMilliseconds` members of `pDescriptor` are\n    zero, miniaudio will fall back to a buffer size based on the performance profile. The profile\n    to use for this calculation is determine by this parameter.\n\n\nReturn Value\n------------\nThe calculated buffer size in frames.\n\n\nThread Safety\n-------------\nThis is safe so long as nothing modifies `pDescriptor` at the same time. However, this function\nshould only ever be called from within the backend's device initialization routine and therefore\nshouldn't have any multithreading concerns.\n\n\nCallback Safety\n---------------\nThis is safe to call within the data callback, but there is no reason to ever do this.\n\n\nRemarks\n-------\nIf `nativeSampleRate` is zero, this function will fall back to `pDescriptor->sampleRate`. If that\nis also zero, `MA_DEFAULT_SAMPLE_RATE` will be used instead.\n*/\nMA_API ma_uint32 ma_calculate_buffer_size_in_frames_from_descriptor(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile);\n\n\n\n/*\nRetrieves a friendly name for a backend.\n*/\nMA_API const char* ma_get_backend_name(ma_backend backend);\n\n/*\nRetrieves the backend enum from the given name.\n*/\nMA_API ma_result ma_get_backend_from_name(const char* pBackendName, ma_backend* pBackend);\n\n/*\nDetermines whether or not the given backend is available by the compilation environment.\n*/\nMA_API ma_bool32 ma_is_backend_enabled(ma_backend backend);\n\n/*\nRetrieves compile-time enabled backends.\n\n\nParameters\n----------\npBackends (out, optional)\n    A pointer to the buffer that will receive the enabled backends. Set to NULL to retrieve the backend count. Setting\n    the capacity of the buffer to `MA_BUFFER_COUNT` will guarantee it's large enough for all backends.\n\nbackendCap (in)\n    The capacity of the `pBackends` buffer.\n\npBackendCount (out)\n    A pointer to the variable that will receive the enabled backend count.\n\n\nReturn Value\n------------\nMA_SUCCESS if successful.\nMA_INVALID_ARGS if `pBackendCount` is NULL.\nMA_NO_SPACE if the capacity of `pBackends` is not large enough.\n\nIf `MA_NO_SPACE` is returned, the `pBackends` buffer will be filled with `*pBackendCount` values.\n\n\nThread Safety\n-------------\nSafe.\n\n\nCallback Safety\n---------------\nSafe.\n\n\nRemarks\n-------\nIf you want to retrieve the number of backends so you can determine the capacity of `pBackends` buffer, you can call\nthis function with `pBackends` set to NULL.\n\nThis will also enumerate the null backend. If you don't want to include this you need to check for `ma_backend_null`\nwhen you enumerate over the returned backends and handle it appropriately. Alternatively, you can disable it at\ncompile time with `MA_NO_NULL`.\n\nThe returned backends are determined based on compile time settings, not the platform it's currently running on. For\nexample, PulseAudio will be returned if it was enabled at compile time, even when the user doesn't actually have\nPulseAudio installed.\n\n\nExample 1\n---------\nThe example below retrieves the enabled backend count using a fixed sized buffer allocated on the stack. The buffer is\ngiven a capacity of `MA_BACKEND_COUNT` which will guarantee it'll be large enough to store all available backends.\nSince `MA_BACKEND_COUNT` is always a relatively small value, this should be suitable for most scenarios.\n\n```\nma_backend enabledBackends[MA_BACKEND_COUNT];\nsize_t enabledBackendCount;\n\nresult = ma_get_enabled_backends(enabledBackends, MA_BACKEND_COUNT, &enabledBackendCount);\nif (result != MA_SUCCESS) {\n    // Failed to retrieve enabled backends. Should never happen in this example since all inputs are valid.\n}\n```\n\n\nSee Also\n--------\nma_is_backend_enabled()\n*/\nMA_API ma_result ma_get_enabled_backends(ma_backend* pBackends, size_t backendCap, size_t* pBackendCount);\n\n/*\nDetermines whether or not loopback mode is support by a backend.\n*/\nMA_API ma_bool32 ma_is_loopback_supported(ma_backend backend);\n\n#endif  /* MA_NO_DEVICE_IO */\n\n\n\n/************************************************************************************************************************************************************\n\nUtilities\n\n************************************************************************************************************************************************************/\n\n/*\nCalculates a buffer size in milliseconds from the specified number of frames and sample rate.\n*/\nMA_API ma_uint32 ma_calculate_buffer_size_in_milliseconds_from_frames(ma_uint32 bufferSizeInFrames, ma_uint32 sampleRate);\n\n/*\nCalculates a buffer size in frames from the specified number of milliseconds and sample rate.\n*/\nMA_API ma_uint32 ma_calculate_buffer_size_in_frames_from_milliseconds(ma_uint32 bufferSizeInMilliseconds, ma_uint32 sampleRate);\n\n/*\nCopies PCM frames from one buffer to another.\n*/\nMA_API void ma_copy_pcm_frames(void* dst, const void* src, ma_uint64 frameCount, ma_format format, ma_uint32 channels);\n\n/*\nCopies silent frames into the given buffer.\n\nRemarks\n-------\nFor all formats except `ma_format_u8`, the output buffer will be filled with 0. For `ma_format_u8` it will be filled with 128. The reason for this is that it\nmakes more sense for the purpose of mixing to initialize it to the center point.\n*/\nMA_API void ma_silence_pcm_frames(void* p, ma_uint64 frameCount, ma_format format, ma_uint32 channels);\n\n\n/*\nOffsets a pointer by the specified number of PCM frames.\n*/\nMA_API void* ma_offset_pcm_frames_ptr(void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels);\nMA_API const void* ma_offset_pcm_frames_const_ptr(const void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels);\nstatic MA_INLINE float* ma_offset_pcm_frames_ptr_f32(float* p, ma_uint64 offsetInFrames, ma_uint32 channels) { return (float*)ma_offset_pcm_frames_ptr((void*)p, offsetInFrames, ma_format_f32, channels); }\nstatic MA_INLINE const float* ma_offset_pcm_frames_const_ptr_f32(const float* p, ma_uint64 offsetInFrames, ma_uint32 channels) { return (const float*)ma_offset_pcm_frames_const_ptr((const void*)p, offsetInFrames, ma_format_f32, channels); }\n\n\n/*\nClips samples.\n*/\nMA_API void ma_clip_samples_u8(ma_uint8* pDst, const ma_int16* pSrc, ma_uint64 count);\nMA_API void ma_clip_samples_s16(ma_int16* pDst, const ma_int32* pSrc, ma_uint64 count);\nMA_API void ma_clip_samples_s24(ma_uint8* pDst, const ma_int64* pSrc, ma_uint64 count);\nMA_API void ma_clip_samples_s32(ma_int32* pDst, const ma_int64* pSrc, ma_uint64 count);\nMA_API void ma_clip_samples_f32(float* pDst, const float* pSrc, ma_uint64 count);\nMA_API void ma_clip_pcm_frames(void* pDst, const void* pSrc, ma_uint64 frameCount, ma_format format, ma_uint32 channels);\n\n/*\nHelper for applying a volume factor to samples.\n\nNote that the source and destination buffers can be the same, in which case it'll perform the operation in-place.\n*/\nMA_API void ma_copy_and_apply_volume_factor_u8(ma_uint8* pSamplesOut, const ma_uint8* pSamplesIn, ma_uint64 sampleCount, float factor);\nMA_API void ma_copy_and_apply_volume_factor_s16(ma_int16* pSamplesOut, const ma_int16* pSamplesIn, ma_uint64 sampleCount, float factor);\nMA_API void ma_copy_and_apply_volume_factor_s24(void* pSamplesOut, const void* pSamplesIn, ma_uint64 sampleCount, float factor);\nMA_API void ma_copy_and_apply_volume_factor_s32(ma_int32* pSamplesOut, const ma_int32* pSamplesIn, ma_uint64 sampleCount, float factor);\nMA_API void ma_copy_and_apply_volume_factor_f32(float* pSamplesOut, const float* pSamplesIn, ma_uint64 sampleCount, float factor);\n\nMA_API void ma_apply_volume_factor_u8(ma_uint8* pSamples, ma_uint64 sampleCount, float factor);\nMA_API void ma_apply_volume_factor_s16(ma_int16* pSamples, ma_uint64 sampleCount, float factor);\nMA_API void ma_apply_volume_factor_s24(void* pSamples, ma_uint64 sampleCount, float factor);\nMA_API void ma_apply_volume_factor_s32(ma_int32* pSamples, ma_uint64 sampleCount, float factor);\nMA_API void ma_apply_volume_factor_f32(float* pSamples, ma_uint64 sampleCount, float factor);\n\nMA_API void ma_copy_and_apply_volume_factor_pcm_frames_u8(ma_uint8* pFramesOut, const ma_uint8* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor);\nMA_API void ma_copy_and_apply_volume_factor_pcm_frames_s16(ma_int16* pFramesOut, const ma_int16* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor);\nMA_API void ma_copy_and_apply_volume_factor_pcm_frames_s24(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor);\nMA_API void ma_copy_and_apply_volume_factor_pcm_frames_s32(ma_int32* pFramesOut, const ma_int32* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor);\nMA_API void ma_copy_and_apply_volume_factor_pcm_frames_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor);\nMA_API void ma_copy_and_apply_volume_factor_pcm_frames(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float factor);\n\nMA_API void ma_apply_volume_factor_pcm_frames_u8(ma_uint8* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor);\nMA_API void ma_apply_volume_factor_pcm_frames_s16(ma_int16* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor);\nMA_API void ma_apply_volume_factor_pcm_frames_s24(void* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor);\nMA_API void ma_apply_volume_factor_pcm_frames_s32(ma_int32* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor);\nMA_API void ma_apply_volume_factor_pcm_frames_f32(float* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor);\nMA_API void ma_apply_volume_factor_pcm_frames(void* pFrames, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float factor);\n\nMA_API void ma_copy_and_apply_volume_factor_per_channel_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float* pChannelGains);\n\n\nMA_API void ma_copy_and_apply_volume_and_clip_samples_u8(ma_uint8* pDst, const ma_int16* pSrc, ma_uint64 count, float volume);\nMA_API void ma_copy_and_apply_volume_and_clip_samples_s16(ma_int16* pDst, const ma_int32* pSrc, ma_uint64 count, float volume);\nMA_API void ma_copy_and_apply_volume_and_clip_samples_s24(ma_uint8* pDst, const ma_int64* pSrc, ma_uint64 count, float volume);\nMA_API void ma_copy_and_apply_volume_and_clip_samples_s32(ma_int32* pDst, const ma_int64* pSrc, ma_uint64 count, float volume);\nMA_API void ma_copy_and_apply_volume_and_clip_samples_f32(float* pDst, const float* pSrc, ma_uint64 count, float volume);\nMA_API void ma_copy_and_apply_volume_and_clip_pcm_frames(void* pDst, const void* pSrc, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float volume);\n\n\n/*\nHelper for converting a linear factor to gain in decibels.\n*/\nMA_API float ma_volume_linear_to_db(float factor);\n\n/*\nHelper for converting gain in decibels to a linear factor.\n*/\nMA_API float ma_volume_db_to_linear(float gain);\n\n\n/*\nMixes the specified number of frames in floating point format with a volume factor.\n\nThis will run on an optimized path when the volume is equal to 1.\n*/\nMA_API ma_result ma_mix_pcm_frames_f32(float* pDst, const float* pSrc, ma_uint64 frameCount, ma_uint32 channels, float volume);\n\n\n\n\n/************************************************************************************************************************************************************\n\nVFS\n===\n\nThe VFS object (virtual file system) is what's used to customize file access. This is useful in cases where stdio FILE* based APIs may not be entirely\nappropriate for a given situation.\n\n************************************************************************************************************************************************************/\ntypedef void      ma_vfs;\ntypedef ma_handle ma_vfs_file;\n\ntypedef enum\n{\n    MA_OPEN_MODE_READ  = 0x00000001,\n    MA_OPEN_MODE_WRITE = 0x00000002\n} ma_open_mode_flags;\n\ntypedef enum\n{\n    ma_seek_origin_start,\n    ma_seek_origin_current,\n    ma_seek_origin_end  /* Not used by decoders. */\n} ma_seek_origin;\n\ntypedef struct\n{\n    ma_uint64 sizeInBytes;\n} ma_file_info;\n\ntypedef struct\n{\n    ma_result (* onOpen) (ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile);\n    ma_result (* onOpenW)(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile);\n    ma_result (* onClose)(ma_vfs* pVFS, ma_vfs_file file);\n    ma_result (* onRead) (ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead);\n    ma_result (* onWrite)(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten);\n    ma_result (* onSeek) (ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin);\n    ma_result (* onTell) (ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor);\n    ma_result (* onInfo) (ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo);\n} ma_vfs_callbacks;\n\nMA_API ma_result ma_vfs_open(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile);\nMA_API ma_result ma_vfs_open_w(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile);\nMA_API ma_result ma_vfs_close(ma_vfs* pVFS, ma_vfs_file file);\nMA_API ma_result ma_vfs_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead);\nMA_API ma_result ma_vfs_write(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten);\nMA_API ma_result ma_vfs_seek(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin);\nMA_API ma_result ma_vfs_tell(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor);\nMA_API ma_result ma_vfs_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo);\nMA_API ma_result ma_vfs_open_and_read_file(ma_vfs* pVFS, const char* pFilePath, void** ppData, size_t* pSize, const ma_allocation_callbacks* pAllocationCallbacks);\n\ntypedef struct\n{\n    ma_vfs_callbacks cb;\n    ma_allocation_callbacks allocationCallbacks;    /* Only used for the wchar_t version of open() on non-Windows platforms. */\n} ma_default_vfs;\n\nMA_API ma_result ma_default_vfs_init(ma_default_vfs* pVFS, const ma_allocation_callbacks* pAllocationCallbacks);\n\n\n\ntypedef ma_result (* ma_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead);\ntypedef ma_result (* ma_seek_proc)(void* pUserData, ma_int64 offset, ma_seek_origin origin);\ntypedef ma_result (* ma_tell_proc)(void* pUserData, ma_int64* pCursor);\n\n\n\n#if !defined(MA_NO_DECODING) || !defined(MA_NO_ENCODING)\ntypedef enum\n{\n    ma_encoding_format_unknown = 0,\n    ma_encoding_format_wav,\n    ma_encoding_format_flac,\n    ma_encoding_format_mp3,\n    ma_encoding_format_vorbis\n} ma_encoding_format;\n#endif\n\n/************************************************************************************************************************************************************\n\nDecoding\n========\n\nDecoders are independent of the main device API. Decoding APIs can be called freely inside the device's data callback, but they are not thread safe unless\nyou do your own synchronization.\n\n************************************************************************************************************************************************************/\n#ifndef MA_NO_DECODING\ntypedef struct ma_decoder ma_decoder;\n\n\ntypedef struct\n{\n    ma_format preferredFormat;\n    ma_uint32 seekPointCount;   /* Set to > 0 to generate a seektable if the decoding backend supports it. */\n} ma_decoding_backend_config;\n\nMA_API ma_decoding_backend_config ma_decoding_backend_config_init(ma_format preferredFormat, ma_uint32 seekPointCount);\n\n\ntypedef struct\n{\n    ma_result (* onInit      )(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend);\n    ma_result (* onInitFile  )(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend);               /* Optional. */\n    ma_result (* onInitFileW )(void* pUserData, const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend);            /* Optional. */\n    ma_result (* onInitMemory)(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend);  /* Optional. */\n    void      (* onUninit    )(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks);\n} ma_decoding_backend_vtable;\n\n\ntypedef ma_result (* ma_decoder_read_proc)(ma_decoder* pDecoder, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead);         /* Returns the number of bytes read. */\ntypedef ma_result (* ma_decoder_seek_proc)(ma_decoder* pDecoder, ma_int64 byteOffset, ma_seek_origin origin);\ntypedef ma_result (* ma_decoder_tell_proc)(ma_decoder* pDecoder, ma_int64* pCursor);\n\ntypedef struct\n{\n    ma_format format;      /* Set to 0 or ma_format_unknown to use the stream's internal format. */\n    ma_uint32 channels;    /* Set to 0 to use the stream's internal channels. */\n    ma_uint32 sampleRate;  /* Set to 0 to use the stream's internal sample rate. */\n    ma_channel* pChannelMap;\n    ma_channel_mix_mode channelMixMode;\n    ma_dither_mode ditherMode;\n    ma_resampler_config resampling;\n    ma_allocation_callbacks allocationCallbacks;\n    ma_encoding_format encodingFormat;\n    ma_uint32 seekPointCount;   /* When set to > 0, specifies the number of seek points to use for the generation of a seek table. Not all decoding backends support this. */\n    ma_decoding_backend_vtable** ppCustomBackendVTables;\n    ma_uint32 customBackendCount;\n    void* pCustomBackendUserData;\n} ma_decoder_config;\n\nstruct ma_decoder\n{\n    ma_data_source_base ds;\n    ma_data_source* pBackend;                   /* The decoding backend we'll be pulling data from. */\n    const ma_decoding_backend_vtable* pBackendVTable; /* The vtable for the decoding backend. This needs to be stored so we can access the onUninit() callback. */\n    void* pBackendUserData;\n    ma_decoder_read_proc onRead;\n    ma_decoder_seek_proc onSeek;\n    ma_decoder_tell_proc onTell;\n    void* pUserData;\n    ma_uint64 readPointerInPCMFrames;      /* In output sample rate. Used for keeping track of how many frames are available for decoding. */\n    ma_format outputFormat;\n    ma_uint32 outputChannels;\n    ma_uint32 outputSampleRate;\n    ma_data_converter converter;    /* Data conversion is achieved by running frames through this. */\n    void* pInputCache;              /* In input format. Can be null if it's not needed. */\n    ma_uint64 inputCacheCap;        /* The capacity of the input cache. */\n    ma_uint64 inputCacheConsumed;   /* The number of frames that have been consumed in the cache. Used for determining the next valid frame. */\n    ma_uint64 inputCacheRemaining;  /* The number of valid frames remaining in the cahce. */\n    ma_allocation_callbacks allocationCallbacks;\n    union\n    {\n        struct\n        {\n            ma_vfs* pVFS;\n            ma_vfs_file file;\n        } vfs;\n        struct\n        {\n            const ma_uint8* pData;\n            size_t dataSize;\n            size_t currentReadPos;\n        } memory;               /* Only used for decoders that were opened against a block of memory. */\n    } data;\n};\n\nMA_API ma_decoder_config ma_decoder_config_init(ma_format outputFormat, ma_uint32 outputChannels, ma_uint32 outputSampleRate);\nMA_API ma_decoder_config ma_decoder_config_init_default(void);\n\nMA_API ma_result ma_decoder_init(ma_decoder_read_proc onRead, ma_decoder_seek_proc onSeek, void* pUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder);\nMA_API ma_result ma_decoder_init_memory(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder);\nMA_API ma_result ma_decoder_init_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder);\nMA_API ma_result ma_decoder_init_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder);\nMA_API ma_result ma_decoder_init_file(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder);\nMA_API ma_result ma_decoder_init_file_w(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder);\n\n/*\nUninitializes a decoder.\n*/\nMA_API ma_result ma_decoder_uninit(ma_decoder* pDecoder);\n\n/*\nReads PCM frames from the given decoder.\n\nThis is not thread safe without your own synchronization.\n*/\nMA_API ma_result ma_decoder_read_pcm_frames(ma_decoder* pDecoder, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\n\n/*\nSeeks to a PCM frame based on it's absolute index.\n\nThis is not thread safe without your own synchronization.\n*/\nMA_API ma_result ma_decoder_seek_to_pcm_frame(ma_decoder* pDecoder, ma_uint64 frameIndex);\n\n/*\nRetrieves the decoder's output data format.\n*/\nMA_API ma_result ma_decoder_get_data_format(ma_decoder* pDecoder, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);\n\n/*\nRetrieves the current position of the read cursor in PCM frames.\n*/\nMA_API ma_result ma_decoder_get_cursor_in_pcm_frames(ma_decoder* pDecoder, ma_uint64* pCursor);\n\n/*\nRetrieves the length of the decoder in PCM frames.\n\nDo not call this on streams of an undefined length, such as internet radio.\n\nIf the length is unknown or an error occurs, 0 will be returned.\n\nThis will always return 0 for Vorbis decoders. This is due to a limitation with stb_vorbis in push mode which is what miniaudio\nuses internally.\n\nFor MP3's, this will decode the entire file. Do not call this in time critical scenarios.\n\nThis function is not thread safe without your own synchronization.\n*/\nMA_API ma_result ma_decoder_get_length_in_pcm_frames(ma_decoder* pDecoder, ma_uint64* pLength);\n\n/*\nRetrieves the number of frames that can be read before reaching the end.\n\nThis calls `ma_decoder_get_length_in_pcm_frames()` so you need to be aware of the rules for that function, in\nparticular ensuring you do not call it on streams of an undefined length, such as internet radio.\n\nIf the total length of the decoder cannot be retrieved, such as with Vorbis decoders, `MA_NOT_IMPLEMENTED` will be\nreturned.\n*/\nMA_API ma_result ma_decoder_get_available_frames(ma_decoder* pDecoder, ma_uint64* pAvailableFrames);\n\n/*\nHelper for opening and decoding a file into a heap allocated block of memory. Free the returned pointer with ma_free(). On input,\npConfig should be set to what you want. On output it will be set to what you got.\n*/\nMA_API ma_result ma_decode_from_vfs(ma_vfs* pVFS, const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut);\nMA_API ma_result ma_decode_file(const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut);\nMA_API ma_result ma_decode_memory(const void* pData, size_t dataSize, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut);\n\n#endif  /* MA_NO_DECODING */\n\n\n/************************************************************************************************************************************************************\n\nEncoding\n========\n\nEncoders do not perform any format conversion for you. If your target format does not support the format, and error will be returned.\n\n************************************************************************************************************************************************************/\n#ifndef MA_NO_ENCODING\ntypedef struct ma_encoder ma_encoder;\n\ntypedef ma_result (* ma_encoder_write_proc)           (ma_encoder* pEncoder, const void* pBufferIn, size_t bytesToWrite, size_t* pBytesWritten);\ntypedef ma_result (* ma_encoder_seek_proc)            (ma_encoder* pEncoder, ma_int64 offset, ma_seek_origin origin);\ntypedef ma_result (* ma_encoder_init_proc)            (ma_encoder* pEncoder);\ntypedef void      (* ma_encoder_uninit_proc)          (ma_encoder* pEncoder);\ntypedef ma_result (* ma_encoder_write_pcm_frames_proc)(ma_encoder* pEncoder, const void* pFramesIn, ma_uint64 frameCount, ma_uint64* pFramesWritten);\n\ntypedef struct\n{\n    ma_encoding_format encodingFormat;\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    ma_allocation_callbacks allocationCallbacks;\n} ma_encoder_config;\n\nMA_API ma_encoder_config ma_encoder_config_init(ma_encoding_format encodingFormat, ma_format format, ma_uint32 channels, ma_uint32 sampleRate);\n\nstruct ma_encoder\n{\n    ma_encoder_config config;\n    ma_encoder_write_proc onWrite;\n    ma_encoder_seek_proc onSeek;\n    ma_encoder_init_proc onInit;\n    ma_encoder_uninit_proc onUninit;\n    ma_encoder_write_pcm_frames_proc onWritePCMFrames;\n    void* pUserData;\n    void* pInternalEncoder;\n    union\n    {\n        struct\n        {\n            ma_vfs* pVFS;\n            ma_vfs_file file;\n        } vfs;\n    } data;\n};\n\nMA_API ma_result ma_encoder_init(ma_encoder_write_proc onWrite, ma_encoder_seek_proc onSeek, void* pUserData, const ma_encoder_config* pConfig, ma_encoder* pEncoder);\nMA_API ma_result ma_encoder_init_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder);\nMA_API ma_result ma_encoder_init_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder);\nMA_API ma_result ma_encoder_init_file(const char* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder);\nMA_API ma_result ma_encoder_init_file_w(const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder);\nMA_API void ma_encoder_uninit(ma_encoder* pEncoder);\nMA_API ma_result ma_encoder_write_pcm_frames(ma_encoder* pEncoder, const void* pFramesIn, ma_uint64 frameCount, ma_uint64* pFramesWritten);\n\n#endif /* MA_NO_ENCODING */\n\n\n/************************************************************************************************************************************************************\n\nGeneration\n\n************************************************************************************************************************************************************/\n#ifndef MA_NO_GENERATION\ntypedef enum\n{\n    ma_waveform_type_sine,\n    ma_waveform_type_square,\n    ma_waveform_type_triangle,\n    ma_waveform_type_sawtooth\n} ma_waveform_type;\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    ma_waveform_type type;\n    double amplitude;\n    double frequency;\n} ma_waveform_config;\n\nMA_API ma_waveform_config ma_waveform_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_waveform_type type, double amplitude, double frequency);\n\ntypedef struct\n{\n    ma_data_source_base ds;\n    ma_waveform_config config;\n    double advance;\n    double time;\n} ma_waveform;\n\nMA_API ma_result ma_waveform_init(const ma_waveform_config* pConfig, ma_waveform* pWaveform);\nMA_API void ma_waveform_uninit(ma_waveform* pWaveform);\nMA_API ma_result ma_waveform_read_pcm_frames(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\nMA_API ma_result ma_waveform_seek_to_pcm_frame(ma_waveform* pWaveform, ma_uint64 frameIndex);\nMA_API ma_result ma_waveform_set_amplitude(ma_waveform* pWaveform, double amplitude);\nMA_API ma_result ma_waveform_set_frequency(ma_waveform* pWaveform, double frequency);\nMA_API ma_result ma_waveform_set_type(ma_waveform* pWaveform, ma_waveform_type type);\nMA_API ma_result ma_waveform_set_sample_rate(ma_waveform* pWaveform, ma_uint32 sampleRate);\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    double dutyCycle;\n    double amplitude;\n    double frequency;\n} ma_pulsewave_config;\n\nMA_API ma_pulsewave_config ma_pulsewave_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double dutyCycle, double amplitude, double frequency);\n\ntypedef struct\n{\n    ma_waveform waveform;\n    ma_pulsewave_config config;\n} ma_pulsewave;\n\nMA_API ma_result ma_pulsewave_init(const ma_pulsewave_config* pConfig, ma_pulsewave* pWaveform);\nMA_API void ma_pulsewave_uninit(ma_pulsewave* pWaveform);\nMA_API ma_result ma_pulsewave_read_pcm_frames(ma_pulsewave* pWaveform, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\nMA_API ma_result ma_pulsewave_seek_to_pcm_frame(ma_pulsewave* pWaveform, ma_uint64 frameIndex);\nMA_API ma_result ma_pulsewave_set_amplitude(ma_pulsewave* pWaveform, double amplitude);\nMA_API ma_result ma_pulsewave_set_frequency(ma_pulsewave* pWaveform, double frequency);\nMA_API ma_result ma_pulsewave_set_sample_rate(ma_pulsewave* pWaveform, ma_uint32 sampleRate);\nMA_API ma_result ma_pulsewave_set_duty_cycle(ma_pulsewave* pWaveform, double dutyCycle);\n\ntypedef enum\n{\n    ma_noise_type_white,\n    ma_noise_type_pink,\n    ma_noise_type_brownian\n} ma_noise_type;\n\n\ntypedef struct\n{\n    ma_format format;\n    ma_uint32 channels;\n    ma_noise_type type;\n    ma_int32 seed;\n    double amplitude;\n    ma_bool32 duplicateChannels;\n} ma_noise_config;\n\nMA_API ma_noise_config ma_noise_config_init(ma_format format, ma_uint32 channels, ma_noise_type type, ma_int32 seed, double amplitude);\n\ntypedef struct\n{\n    ma_data_source_base ds;\n    ma_noise_config config;\n    ma_lcg lcg;\n    union\n    {\n        struct\n        {\n            double** bin;\n            double* accumulation;\n            ma_uint32* counter;\n        } pink;\n        struct\n        {\n            double* accumulation;\n        } brownian;\n    } state;\n\n    /* Memory management. */\n    void* _pHeap;\n    ma_bool32 _ownsHeap;\n} ma_noise;\n\nMA_API ma_result ma_noise_get_heap_size(const ma_noise_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_noise_init_preallocated(const ma_noise_config* pConfig, void* pHeap, ma_noise* pNoise);\nMA_API ma_result ma_noise_init(const ma_noise_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_noise* pNoise);\nMA_API void ma_noise_uninit(ma_noise* pNoise, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_noise_read_pcm_frames(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\nMA_API ma_result ma_noise_set_amplitude(ma_noise* pNoise, double amplitude);\nMA_API ma_result ma_noise_set_seed(ma_noise* pNoise, ma_int32 seed);\nMA_API ma_result ma_noise_set_type(ma_noise* pNoise, ma_noise_type type);\n\n#endif  /* MA_NO_GENERATION */\n\n\n\n/************************************************************************************************************************************************************\n\nResource Manager\n\n************************************************************************************************************************************************************/\n/* The resource manager cannot be enabled if there is no decoder. */\n#if !defined(MA_NO_RESOURCE_MANAGER) && defined(MA_NO_DECODING)\n#define MA_NO_RESOURCE_MANAGER\n#endif\n\n#ifndef MA_NO_RESOURCE_MANAGER\ntypedef struct ma_resource_manager                  ma_resource_manager;\ntypedef struct ma_resource_manager_data_buffer_node ma_resource_manager_data_buffer_node;\ntypedef struct ma_resource_manager_data_buffer      ma_resource_manager_data_buffer;\ntypedef struct ma_resource_manager_data_stream      ma_resource_manager_data_stream;\ntypedef struct ma_resource_manager_data_source      ma_resource_manager_data_source;\n\ntypedef enum\n{\n    MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM         = 0x00000001,   /* When set, does not load the entire data source in memory. Disk I/O will happen on job threads. */\n    MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE         = 0x00000002,   /* Decode data before storing in memory. When set, decoding is done at the resource manager level rather than the mixing thread. Results in faster mixing, but higher memory usage. */\n    MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC          = 0x00000004,   /* When set, the resource manager will load the data source asynchronously. */\n    MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT      = 0x00000008,   /* When set, waits for initialization of the underlying data source before returning from ma_resource_manager_data_source_init(). */\n    MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_UNKNOWN_LENGTH = 0x00000010    /* Gives the resource manager a hint that the length of the data source is unknown and calling `ma_data_source_get_length_in_pcm_frames()` should be avoided. */\n} ma_resource_manager_data_source_flags;\n\n\n/*\nPipeline notifications used by the resource manager. Made up of both an async notification and a fence, both of which are optional.\n*/\ntypedef struct\n{\n    ma_async_notification* pNotification;\n    ma_fence* pFence;\n} ma_resource_manager_pipeline_stage_notification;\n\ntypedef struct\n{\n    ma_resource_manager_pipeline_stage_notification init;    /* Initialization of the decoder. */\n    ma_resource_manager_pipeline_stage_notification done;    /* Decoding fully completed. */\n} ma_resource_manager_pipeline_notifications;\n\nMA_API ma_resource_manager_pipeline_notifications ma_resource_manager_pipeline_notifications_init(void);\n\n\n\n/* BEGIN BACKWARDS COMPATIBILITY */\n/* TODO: Remove this block in version 0.12. */\n#if 1\n#define ma_resource_manager_job                         ma_job\n#define ma_resource_manager_job_init                    ma_job_init\n#define MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_FLAG_NON_BLOCKING MA_JOB_QUEUE_FLAG_NON_BLOCKING\n#define ma_resource_manager_job_queue_config            ma_job_queue_config\n#define ma_resource_manager_job_queue_config_init       ma_job_queue_config_init\n#define ma_resource_manager_job_queue                   ma_job_queue\n#define ma_resource_manager_job_queue_get_heap_size     ma_job_queue_get_heap_size\n#define ma_resource_manager_job_queue_init_preallocated ma_job_queue_init_preallocated\n#define ma_resource_manager_job_queue_init              ma_job_queue_init\n#define ma_resource_manager_job_queue_uninit            ma_job_queue_uninit\n#define ma_resource_manager_job_queue_post              ma_job_queue_post\n#define ma_resource_manager_job_queue_next              ma_job_queue_next\n#endif\n/* END BACKWARDS COMPATIBILITY */\n\n\n\n\n/* Maximum job thread count will be restricted to this, but this may be removed later and replaced with a heap allocation thereby removing any limitation. */\n#ifndef MA_RESOURCE_MANAGER_MAX_JOB_THREAD_COUNT\n#define MA_RESOURCE_MANAGER_MAX_JOB_THREAD_COUNT    64\n#endif\n\ntypedef enum\n{\n    /* Indicates ma_resource_manager_next_job() should not block. Only valid when the job thread count is 0. */\n    MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING = 0x00000001,\n\n    /* Disables any kind of multithreading. Implicitly enables MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING. */\n    MA_RESOURCE_MANAGER_FLAG_NO_THREADING = 0x00000002\n} ma_resource_manager_flags;\n\ntypedef struct\n{\n    const char* pFilePath;\n    const wchar_t* pFilePathW;\n    const ma_resource_manager_pipeline_notifications* pNotifications;\n    ma_uint64 initialSeekPointInPCMFrames;\n    ma_uint64 rangeBegInPCMFrames;\n    ma_uint64 rangeEndInPCMFrames;\n    ma_uint64 loopPointBegInPCMFrames;\n    ma_uint64 loopPointEndInPCMFrames;\n    ma_bool32 isLooping;\n    ma_uint32 flags;\n} ma_resource_manager_data_source_config;\n\nMA_API ma_resource_manager_data_source_config ma_resource_manager_data_source_config_init(void);\n\n\ntypedef enum\n{\n    ma_resource_manager_data_supply_type_unknown = 0,   /* Used for determining whether or the data supply has been initialized. */\n    ma_resource_manager_data_supply_type_encoded,       /* Data supply is an encoded buffer. Connector is ma_decoder. */\n    ma_resource_manager_data_supply_type_decoded,       /* Data supply is a decoded buffer. Connector is ma_audio_buffer. */\n    ma_resource_manager_data_supply_type_decoded_paged  /* Data supply is a linked list of decoded buffers. Connector is ma_paged_audio_buffer. */\n} ma_resource_manager_data_supply_type;\n\ntypedef struct\n{\n    MA_ATOMIC(4, ma_resource_manager_data_supply_type) type;    /* Read and written from different threads so needs to be accessed atomically. */\n    union\n    {\n        struct\n        {\n            const void* pData;\n            size_t sizeInBytes;\n        } encoded;\n        struct\n        {\n            const void* pData;\n            ma_uint64 totalFrameCount;\n            ma_uint64 decodedFrameCount;\n            ma_format format;\n            ma_uint32 channels;\n            ma_uint32 sampleRate;\n        } decoded;\n        struct\n        {\n            ma_paged_audio_buffer_data data;\n            ma_uint64 decodedFrameCount;\n            ma_uint32 sampleRate;\n        } decodedPaged;\n    } backend;\n} ma_resource_manager_data_supply;\n\nstruct ma_resource_manager_data_buffer_node\n{\n    ma_uint32 hashedName32;                         /* The hashed name. This is the key. */\n    ma_uint32 refCount;\n    MA_ATOMIC(4, ma_result) result;                 /* Result from asynchronous loading. When loading set to MA_BUSY. When fully loaded set to MA_SUCCESS. When deleting set to MA_UNAVAILABLE. */\n    MA_ATOMIC(4, ma_uint32) executionCounter;       /* For allocating execution orders for jobs. */\n    MA_ATOMIC(4, ma_uint32) executionPointer;       /* For managing the order of execution for asynchronous jobs relating to this object. Incremented as jobs complete processing. */\n    ma_bool32 isDataOwnedByResourceManager;         /* Set to true when the underlying data buffer was allocated the resource manager. Set to false if it is owned by the application (via ma_resource_manager_register_*()). */\n    ma_resource_manager_data_supply data;\n    ma_resource_manager_data_buffer_node* pParent;\n    ma_resource_manager_data_buffer_node* pChildLo;\n    ma_resource_manager_data_buffer_node* pChildHi;\n};\n\nstruct ma_resource_manager_data_buffer\n{\n    ma_data_source_base ds;                         /* Base data source. A data buffer is a data source. */\n    ma_resource_manager* pResourceManager;          /* A pointer to the resource manager that owns this buffer. */\n    ma_resource_manager_data_buffer_node* pNode;    /* The data node. This is reference counted and is what supplies the data. */\n    ma_uint32 flags;                                /* The flags that were passed used to initialize the buffer. */\n    MA_ATOMIC(4, ma_uint32) executionCounter;       /* For allocating execution orders for jobs. */\n    MA_ATOMIC(4, ma_uint32) executionPointer;       /* For managing the order of execution for asynchronous jobs relating to this object. Incremented as jobs complete processing. */\n    ma_uint64 seekTargetInPCMFrames;                /* Only updated by the public API. Never written nor read from the job thread. */\n    ma_bool32 seekToCursorOnNextRead;               /* On the next read we need to seek to the frame cursor. */\n    MA_ATOMIC(4, ma_result) result;                 /* Keeps track of a result of decoding. Set to MA_BUSY while the buffer is still loading. Set to MA_SUCCESS when loading is finished successfully. Otherwise set to some other code. */\n    MA_ATOMIC(4, ma_bool32) isLooping;              /* Can be read and written by different threads at the same time. Must be used atomically. */\n    ma_atomic_bool32 isConnectorInitialized;        /* Used for asynchronous loading to ensure we don't try to initialize the connector multiple times while waiting for the node to fully load. */\n    union\n    {\n        ma_decoder decoder;                 /* Supply type is ma_resource_manager_data_supply_type_encoded */\n        ma_audio_buffer buffer;             /* Supply type is ma_resource_manager_data_supply_type_decoded */\n        ma_paged_audio_buffer pagedBuffer;  /* Supply type is ma_resource_manager_data_supply_type_decoded_paged */\n    } connector;    /* Connects this object to the node's data supply. */\n};\n\nstruct ma_resource_manager_data_stream\n{\n    ma_data_source_base ds;                     /* Base data source. A data stream is a data source. */\n    ma_resource_manager* pResourceManager;      /* A pointer to the resource manager that owns this data stream. */\n    ma_uint32 flags;                            /* The flags that were passed used to initialize the stream. */\n    ma_decoder decoder;                         /* Used for filling pages with data. This is only ever accessed by the job thread. The public API should never touch this. */\n    ma_bool32 isDecoderInitialized;             /* Required for determining whether or not the decoder should be uninitialized in MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_STREAM. */\n    ma_uint64 totalLengthInPCMFrames;           /* This is calculated when first loaded by the MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_STREAM. */\n    ma_uint32 relativeCursor;                   /* The playback cursor, relative to the current page. Only ever accessed by the public API. Never accessed by the job thread. */\n    MA_ATOMIC(8, ma_uint64) absoluteCursor;     /* The playback cursor, in absolute position starting from the start of the file. */\n    ma_uint32 currentPageIndex;                 /* Toggles between 0 and 1. Index 0 is the first half of pPageData. Index 1 is the second half. Only ever accessed by the public API. Never accessed by the job thread. */\n    MA_ATOMIC(4, ma_uint32) executionCounter;   /* For allocating execution orders for jobs. */\n    MA_ATOMIC(4, ma_uint32) executionPointer;   /* For managing the order of execution for asynchronous jobs relating to this object. Incremented as jobs complete processing. */\n\n    /* Written by the public API, read by the job thread. */\n    MA_ATOMIC(4, ma_bool32) isLooping;          /* Whether or not the stream is looping. It's important to set the looping flag at the data stream level for smooth loop transitions. */\n\n    /* Written by the job thread, read by the public API. */\n    void* pPageData;                            /* Buffer containing the decoded data of each page. Allocated once at initialization time. */\n    MA_ATOMIC(4, ma_uint32) pageFrameCount[2];  /* The number of valid PCM frames in each page. Used to determine the last valid frame. */\n\n    /* Written and read by both the public API and the job thread. These must be atomic. */\n    MA_ATOMIC(4, ma_result) result;             /* Result from asynchronous loading. When loading set to MA_BUSY. When initialized set to MA_SUCCESS. When deleting set to MA_UNAVAILABLE. If an error occurs when loading, set to an error code. */\n    MA_ATOMIC(4, ma_bool32) isDecoderAtEnd;     /* Whether or not the decoder has reached the end. */\n    MA_ATOMIC(4, ma_bool32) isPageValid[2];     /* Booleans to indicate whether or not a page is valid. Set to false by the public API, set to true by the job thread. Set to false as the pages are consumed, true when they are filled. */\n    MA_ATOMIC(4, ma_bool32) seekCounter;        /* When 0, no seeking is being performed. When > 0, a seek is being performed and reading should be delayed with MA_BUSY. */\n};\n\nstruct ma_resource_manager_data_source\n{\n    union\n    {\n        ma_resource_manager_data_buffer buffer;\n        ma_resource_manager_data_stream stream;\n    } backend;  /* Must be the first item because we need the first item to be the data source callbacks for the buffer or stream. */\n\n    ma_uint32 flags;                          /* The flags that were passed in to ma_resource_manager_data_source_init(). */\n    MA_ATOMIC(4, ma_uint32) executionCounter;     /* For allocating execution orders for jobs. */\n    MA_ATOMIC(4, ma_uint32) executionPointer;     /* For managing the order of execution for asynchronous jobs relating to this object. Incremented as jobs complete processing. */\n};\n\ntypedef struct\n{\n    ma_allocation_callbacks allocationCallbacks;\n    ma_log* pLog;\n    ma_format decodedFormat;        /* The decoded format to use. Set to ma_format_unknown (default) to use the file's native format. */\n    ma_uint32 decodedChannels;      /* The decoded channel count to use. Set to 0 (default) to use the file's native channel count. */\n    ma_uint32 decodedSampleRate;    /* the decoded sample rate to use. Set to 0 (default) to use the file's native sample rate. */\n    ma_uint32 jobThreadCount;       /* Set to 0 if you want to self-manage your job threads. Defaults to 1. */\n    size_t jobThreadStackSize;\n    ma_uint32 jobQueueCapacity;     /* The maximum number of jobs that can fit in the queue at a time. Defaults to MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_CAPACITY. Cannot be zero. */\n    ma_uint32 flags;\n    ma_vfs* pVFS;                   /* Can be NULL in which case defaults will be used. */\n    ma_decoding_backend_vtable** ppCustomDecodingBackendVTables;\n    ma_uint32 customDecodingBackendCount;\n    void* pCustomDecodingBackendUserData;\n} ma_resource_manager_config;\n\nMA_API ma_resource_manager_config ma_resource_manager_config_init(void);\n\nstruct ma_resource_manager\n{\n    ma_resource_manager_config config;\n    ma_resource_manager_data_buffer_node* pRootDataBufferNode;      /* The root buffer in the binary tree. */\n#ifndef MA_NO_THREADING\n    ma_mutex dataBufferBSTLock;                                     /* For synchronizing access to the data buffer binary tree. */\n    ma_thread jobThreads[MA_RESOURCE_MANAGER_MAX_JOB_THREAD_COUNT]; /* The threads for executing jobs. */\n#endif\n    ma_job_queue jobQueue;                                          /* Multi-consumer, multi-producer job queue for managing jobs for asynchronous decoding and streaming. */\n    ma_default_vfs defaultVFS;                                      /* Only used if a custom VFS is not specified. */\n    ma_log log;                                                     /* Only used if no log was specified in the config. */\n};\n\n/* Init. */\nMA_API ma_result ma_resource_manager_init(const ma_resource_manager_config* pConfig, ma_resource_manager* pResourceManager);\nMA_API void ma_resource_manager_uninit(ma_resource_manager* pResourceManager);\nMA_API ma_log* ma_resource_manager_get_log(ma_resource_manager* pResourceManager);\n\n/* Registration. */\nMA_API ma_result ma_resource_manager_register_file(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags);\nMA_API ma_result ma_resource_manager_register_file_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags);\nMA_API ma_result ma_resource_manager_register_decoded_data(ma_resource_manager* pResourceManager, const char* pName, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate);  /* Does not copy. Increments the reference count if already exists and returns MA_SUCCESS. */\nMA_API ma_result ma_resource_manager_register_decoded_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate);\nMA_API ma_result ma_resource_manager_register_encoded_data(ma_resource_manager* pResourceManager, const char* pName, const void* pData, size_t sizeInBytes);    /* Does not copy. Increments the reference count if already exists and returns MA_SUCCESS. */\nMA_API ma_result ma_resource_manager_register_encoded_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName, const void* pData, size_t sizeInBytes);\nMA_API ma_result ma_resource_manager_unregister_file(ma_resource_manager* pResourceManager, const char* pFilePath);\nMA_API ma_result ma_resource_manager_unregister_file_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath);\nMA_API ma_result ma_resource_manager_unregister_data(ma_resource_manager* pResourceManager, const char* pName);\nMA_API ma_result ma_resource_manager_unregister_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName);\n\n/* Data Buffers. */\nMA_API ma_result ma_resource_manager_data_buffer_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_buffer* pDataBuffer);\nMA_API ma_result ma_resource_manager_data_buffer_init(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_buffer* pDataBuffer);\nMA_API ma_result ma_resource_manager_data_buffer_init_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_buffer* pDataBuffer);\nMA_API ma_result ma_resource_manager_data_buffer_init_copy(ma_resource_manager* pResourceManager, const ma_resource_manager_data_buffer* pExistingDataBuffer, ma_resource_manager_data_buffer* pDataBuffer);\nMA_API ma_result ma_resource_manager_data_buffer_uninit(ma_resource_manager_data_buffer* pDataBuffer);\nMA_API ma_result ma_resource_manager_data_buffer_read_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\nMA_API ma_result ma_resource_manager_data_buffer_seek_to_pcm_frame(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64 frameIndex);\nMA_API ma_result ma_resource_manager_data_buffer_get_data_format(ma_resource_manager_data_buffer* pDataBuffer, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);\nMA_API ma_result ma_resource_manager_data_buffer_get_cursor_in_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pCursor);\nMA_API ma_result ma_resource_manager_data_buffer_get_length_in_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pLength);\nMA_API ma_result ma_resource_manager_data_buffer_result(const ma_resource_manager_data_buffer* pDataBuffer);\nMA_API ma_result ma_resource_manager_data_buffer_set_looping(ma_resource_manager_data_buffer* pDataBuffer, ma_bool32 isLooping);\nMA_API ma_bool32 ma_resource_manager_data_buffer_is_looping(const ma_resource_manager_data_buffer* pDataBuffer);\nMA_API ma_result ma_resource_manager_data_buffer_get_available_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pAvailableFrames);\n\n/* Data Streams. */\nMA_API ma_result ma_resource_manager_data_stream_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_stream* pDataStream);\nMA_API ma_result ma_resource_manager_data_stream_init(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_stream* pDataStream);\nMA_API ma_result ma_resource_manager_data_stream_init_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_stream* pDataStream);\nMA_API ma_result ma_resource_manager_data_stream_uninit(ma_resource_manager_data_stream* pDataStream);\nMA_API ma_result ma_resource_manager_data_stream_read_pcm_frames(ma_resource_manager_data_stream* pDataStream, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\nMA_API ma_result ma_resource_manager_data_stream_seek_to_pcm_frame(ma_resource_manager_data_stream* pDataStream, ma_uint64 frameIndex);\nMA_API ma_result ma_resource_manager_data_stream_get_data_format(ma_resource_manager_data_stream* pDataStream, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);\nMA_API ma_result ma_resource_manager_data_stream_get_cursor_in_pcm_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pCursor);\nMA_API ma_result ma_resource_manager_data_stream_get_length_in_pcm_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pLength);\nMA_API ma_result ma_resource_manager_data_stream_result(const ma_resource_manager_data_stream* pDataStream);\nMA_API ma_result ma_resource_manager_data_stream_set_looping(ma_resource_manager_data_stream* pDataStream, ma_bool32 isLooping);\nMA_API ma_bool32 ma_resource_manager_data_stream_is_looping(const ma_resource_manager_data_stream* pDataStream);\nMA_API ma_result ma_resource_manager_data_stream_get_available_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pAvailableFrames);\n\n/* Data Sources. */\nMA_API ma_result ma_resource_manager_data_source_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_source* pDataSource);\nMA_API ma_result ma_resource_manager_data_source_init(ma_resource_manager* pResourceManager, const char* pName, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_source* pDataSource);\nMA_API ma_result ma_resource_manager_data_source_init_w(ma_resource_manager* pResourceManager, const wchar_t* pName, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_source* pDataSource);\nMA_API ma_result ma_resource_manager_data_source_init_copy(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source* pExistingDataSource, ma_resource_manager_data_source* pDataSource);\nMA_API ma_result ma_resource_manager_data_source_uninit(ma_resource_manager_data_source* pDataSource);\nMA_API ma_result ma_resource_manager_data_source_read_pcm_frames(ma_resource_manager_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\nMA_API ma_result ma_resource_manager_data_source_seek_to_pcm_frame(ma_resource_manager_data_source* pDataSource, ma_uint64 frameIndex);\nMA_API ma_result ma_resource_manager_data_source_get_data_format(ma_resource_manager_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);\nMA_API ma_result ma_resource_manager_data_source_get_cursor_in_pcm_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pCursor);\nMA_API ma_result ma_resource_manager_data_source_get_length_in_pcm_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pLength);\nMA_API ma_result ma_resource_manager_data_source_result(const ma_resource_manager_data_source* pDataSource);\nMA_API ma_result ma_resource_manager_data_source_set_looping(ma_resource_manager_data_source* pDataSource, ma_bool32 isLooping);\nMA_API ma_bool32 ma_resource_manager_data_source_is_looping(const ma_resource_manager_data_source* pDataSource);\nMA_API ma_result ma_resource_manager_data_source_get_available_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pAvailableFrames);\n\n/* Job management. */\nMA_API ma_result ma_resource_manager_post_job(ma_resource_manager* pResourceManager, const ma_job* pJob);\nMA_API ma_result ma_resource_manager_post_job_quit(ma_resource_manager* pResourceManager);  /* Helper for posting a quit job. */\nMA_API ma_result ma_resource_manager_next_job(ma_resource_manager* pResourceManager, ma_job* pJob);\nMA_API ma_result ma_resource_manager_process_job(ma_resource_manager* pResourceManager, ma_job* pJob);  /* DEPRECATED. Use ma_job_process(). Will be removed in version 0.12. */\nMA_API ma_result ma_resource_manager_process_next_job(ma_resource_manager* pResourceManager);   /* Returns MA_CANCELLED if a MA_JOB_TYPE_QUIT job is found. In non-blocking mode, returns MA_NO_DATA_AVAILABLE if no jobs are available. */\n#endif  /* MA_NO_RESOURCE_MANAGER */\n\n\n\n/************************************************************************************************************************************************************\n\nNode Graph\n\n************************************************************************************************************************************************************/\n#ifndef MA_NO_NODE_GRAPH\n/* Must never exceed 254. */\n#ifndef MA_MAX_NODE_BUS_COUNT\n#define MA_MAX_NODE_BUS_COUNT       254\n#endif\n\n/* Used internally by miniaudio for memory management. Must never exceed MA_MAX_NODE_BUS_COUNT. */\n#ifndef MA_MAX_NODE_LOCAL_BUS_COUNT\n#define MA_MAX_NODE_LOCAL_BUS_COUNT 2\n#endif\n\n/* Use this when the bus count is determined by the node instance rather than the vtable. */\n#define MA_NODE_BUS_COUNT_UNKNOWN   255\n\ntypedef struct ma_node_graph ma_node_graph;\ntypedef void ma_node;\n\n\n/* Node flags. */\ntypedef enum\n{\n    MA_NODE_FLAG_PASSTHROUGH                = 0x00000001,\n    MA_NODE_FLAG_CONTINUOUS_PROCESSING      = 0x00000002,\n    MA_NODE_FLAG_ALLOW_NULL_INPUT           = 0x00000004,\n    MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES = 0x00000008,\n    MA_NODE_FLAG_SILENT_OUTPUT              = 0x00000010\n} ma_node_flags;\n\n\n/* The playback state of a node. Either started or stopped. */\ntypedef enum\n{\n    ma_node_state_started = 0,\n    ma_node_state_stopped = 1\n} ma_node_state;\n\n\ntypedef struct\n{\n    /*\n    Extended processing callback. This callback is used for effects that process input and output\n    at different rates (i.e. they perform resampling). This is similar to the simple version, only\n    they take two separate frame counts: one for input, and one for output.\n\n    On input, `pFrameCountOut` is equal to the capacity of the output buffer for each bus, whereas\n    `pFrameCountIn` will be equal to the number of PCM frames in each of the buffers in `ppFramesIn`.\n\n    On output, set `pFrameCountOut` to the number of PCM frames that were actually output and set\n    `pFrameCountIn` to the number of input frames that were consumed.\n    */\n    void (* onProcess)(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut);\n\n    /*\n    A callback for retrieving the number of a input frames that are required to output the\n    specified number of output frames. You would only want to implement this when the node performs\n    resampling. This is optional, even for nodes that perform resampling, but it does offer a\n    small reduction in latency as it allows miniaudio to calculate the exact number of input frames\n    to read at a time instead of having to estimate.\n    */\n    ma_result (* onGetRequiredInputFrameCount)(ma_node* pNode, ma_uint32 outputFrameCount, ma_uint32* pInputFrameCount);\n\n    /*\n    The number of input buses. This is how many sub-buffers will be contained in the `ppFramesIn`\n    parameters of the callbacks above.\n    */\n    ma_uint8 inputBusCount;\n\n    /*\n    The number of output buses. This is how many sub-buffers will be contained in the `ppFramesOut`\n    parameters of the callbacks above.\n    */\n    ma_uint8 outputBusCount;\n\n    /*\n    Flags describing characteristics of the node. This is currently just a placeholder for some\n    ideas for later on.\n    */\n    ma_uint32 flags;\n} ma_node_vtable;\n\ntypedef struct\n{\n    const ma_node_vtable* vtable;       /* Should never be null. Initialization of the node will fail if so. */\n    ma_node_state initialState;         /* Defaults to ma_node_state_started. */\n    ma_uint32 inputBusCount;            /* Only used if the vtable specifies an input bus count of `MA_NODE_BUS_COUNT_UNKNOWN`, otherwise must be set to `MA_NODE_BUS_COUNT_UNKNOWN` (default). */\n    ma_uint32 outputBusCount;           /* Only used if the vtable specifies an output bus count of `MA_NODE_BUS_COUNT_UNKNOWN`, otherwise  be set to `MA_NODE_BUS_COUNT_UNKNOWN` (default). */\n    const ma_uint32* pInputChannels;    /* The number of elements are determined by the input bus count as determined by the vtable, or `inputBusCount` if the vtable specifies `MA_NODE_BUS_COUNT_UNKNOWN`. */\n    const ma_uint32* pOutputChannels;   /* The number of elements are determined by the output bus count as determined by the vtable, or `outputBusCount` if the vtable specifies `MA_NODE_BUS_COUNT_UNKNOWN`. */\n} ma_node_config;\n\nMA_API ma_node_config ma_node_config_init(void);\n\n\n/*\nA node has multiple output buses. An output bus is attached to an input bus as an item in a linked\nlist. Think of the input bus as a linked list, with the output bus being an item in that list.\n*/\ntypedef struct ma_node_output_bus ma_node_output_bus;\nstruct ma_node_output_bus\n{\n    /* Immutable. */\n    ma_node* pNode;                                         /* The node that owns this output bus. The input node. Will be null for dummy head and tail nodes. */\n    ma_uint8 outputBusIndex;                                /* The index of the output bus on pNode that this output bus represents. */\n    ma_uint8 channels;                                      /* The number of channels in the audio stream for this bus. */\n\n    /* Mutable via multiple threads. Must be used atomically. The weird ordering here is for packing reasons. */\n    ma_uint8 inputNodeInputBusIndex;                        /* The index of the input bus on the input. Required for detaching. Will only be used within the spinlock so does not need to be atomic. */\n    MA_ATOMIC(4, ma_uint32) flags;                          /* Some state flags for tracking the read state of the output buffer. A combination of MA_NODE_OUTPUT_BUS_FLAG_*. */\n    MA_ATOMIC(4, ma_uint32) refCount;                       /* Reference count for some thread-safety when detaching. */\n    MA_ATOMIC(4, ma_bool32) isAttached;                     /* This is used to prevent iteration of nodes that are in the middle of being detached. Used for thread safety. */\n    MA_ATOMIC(4, ma_spinlock) lock;                         /* Unfortunate lock, but significantly simplifies the implementation. Required for thread-safe attaching and detaching. */\n    MA_ATOMIC(4, float) volume;                             /* Linear. */\n    MA_ATOMIC(MA_SIZEOF_PTR, ma_node_output_bus*) pNext;    /* If null, it's the tail node or detached. */\n    MA_ATOMIC(MA_SIZEOF_PTR, ma_node_output_bus*) pPrev;    /* If null, it's the head node or detached. */\n    MA_ATOMIC(MA_SIZEOF_PTR, ma_node*) pInputNode;          /* The node that this output bus is attached to. Required for detaching. */\n};\n\n/*\nA node has multiple input buses. The output buses of a node are connecting to the input busses of\nanother. An input bus is essentially just a linked list of output buses.\n*/\ntypedef struct ma_node_input_bus ma_node_input_bus;\nstruct ma_node_input_bus\n{\n    /* Mutable via multiple threads. */\n    ma_node_output_bus head;                /* Dummy head node for simplifying some lock-free thread-safety stuff. */\n    MA_ATOMIC(4, ma_uint32) nextCounter;    /* This is used to determine whether or not the input bus is finding the next node in the list. Used for thread safety when detaching output buses. */\n    MA_ATOMIC(4, ma_spinlock) lock;         /* Unfortunate lock, but significantly simplifies the implementation. Required for thread-safe attaching and detaching. */\n\n    /* Set once at startup. */\n    ma_uint8 channels;                      /* The number of channels in the audio stream for this bus. */\n};\n\n\ntypedef struct ma_node_base ma_node_base;\nstruct ma_node_base\n{\n    /* These variables are set once at startup. */\n    ma_node_graph* pNodeGraph;              /* The graph this node belongs to. */\n    const ma_node_vtable* vtable;\n    float* pCachedData;                     /* Allocated on the heap. Fixed size. Needs to be stored on the heap because reading from output buses is done in separate function calls. */\n    ma_uint16 cachedDataCapInFramesPerBus;  /* The capacity of the input data cache in frames, per bus. */\n\n    /* These variables are read and written only from the audio thread. */\n    ma_uint16 cachedFrameCountOut;\n    ma_uint16 cachedFrameCountIn;\n    ma_uint16 consumedFrameCountIn;\n\n    /* These variables are read and written between different threads. */\n    MA_ATOMIC(4, ma_node_state) state;      /* When set to stopped, nothing will be read, regardless of the times in stateTimes. */\n    MA_ATOMIC(8, ma_uint64) stateTimes[2];  /* Indexed by ma_node_state. Specifies the time based on the global clock that a node should be considered to be in the relevant state. */\n    MA_ATOMIC(8, ma_uint64) localTime;      /* The node's local clock. This is just a running sum of the number of output frames that have been processed. Can be modified by any thread with `ma_node_set_time()`. */\n    ma_uint32 inputBusCount;\n    ma_uint32 outputBusCount;\n    ma_node_input_bus* pInputBuses;\n    ma_node_output_bus* pOutputBuses;\n\n    /* Memory management. */\n    ma_node_input_bus _inputBuses[MA_MAX_NODE_LOCAL_BUS_COUNT];\n    ma_node_output_bus _outputBuses[MA_MAX_NODE_LOCAL_BUS_COUNT];\n    void* _pHeap;   /* A heap allocation for internal use only. pInputBuses and/or pOutputBuses will point to this if the bus count exceeds MA_MAX_NODE_LOCAL_BUS_COUNT. */\n    ma_bool32 _ownsHeap;    /* If set to true, the node owns the heap allocation and _pHeap will be freed in ma_node_uninit(). */\n};\n\nMA_API ma_result ma_node_get_heap_size(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_node_init_preallocated(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, void* pHeap, ma_node* pNode);\nMA_API ma_result ma_node_init(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_node* pNode);\nMA_API void ma_node_uninit(ma_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_node_graph* ma_node_get_node_graph(const ma_node* pNode);\nMA_API ma_uint32 ma_node_get_input_bus_count(const ma_node* pNode);\nMA_API ma_uint32 ma_node_get_output_bus_count(const ma_node* pNode);\nMA_API ma_uint32 ma_node_get_input_channels(const ma_node* pNode, ma_uint32 inputBusIndex);\nMA_API ma_uint32 ma_node_get_output_channels(const ma_node* pNode, ma_uint32 outputBusIndex);\nMA_API ma_result ma_node_attach_output_bus(ma_node* pNode, ma_uint32 outputBusIndex, ma_node* pOtherNode, ma_uint32 otherNodeInputBusIndex);\nMA_API ma_result ma_node_detach_output_bus(ma_node* pNode, ma_uint32 outputBusIndex);\nMA_API ma_result ma_node_detach_all_output_buses(ma_node* pNode);\nMA_API ma_result ma_node_set_output_bus_volume(ma_node* pNode, ma_uint32 outputBusIndex, float volume);\nMA_API float ma_node_get_output_bus_volume(const ma_node* pNode, ma_uint32 outputBusIndex);\nMA_API ma_result ma_node_set_state(ma_node* pNode, ma_node_state state);\nMA_API ma_node_state ma_node_get_state(const ma_node* pNode);\nMA_API ma_result ma_node_set_state_time(ma_node* pNode, ma_node_state state, ma_uint64 globalTime);\nMA_API ma_uint64 ma_node_get_state_time(const ma_node* pNode, ma_node_state state);\nMA_API ma_node_state ma_node_get_state_by_time(const ma_node* pNode, ma_uint64 globalTime);\nMA_API ma_node_state ma_node_get_state_by_time_range(const ma_node* pNode, ma_uint64 globalTimeBeg, ma_uint64 globalTimeEnd);\nMA_API ma_uint64 ma_node_get_time(const ma_node* pNode);\nMA_API ma_result ma_node_set_time(ma_node* pNode, ma_uint64 localTime);\n\n\ntypedef struct\n{\n    ma_uint32 channels;\n    ma_uint16 nodeCacheCapInFrames;\n} ma_node_graph_config;\n\nMA_API ma_node_graph_config ma_node_graph_config_init(ma_uint32 channels);\n\n\nstruct ma_node_graph\n{\n    /* Immutable. */\n    ma_node_base base;                  /* The node graph itself is a node so it can be connected as an input to different node graph. This has zero inputs and calls ma_node_graph_read_pcm_frames() to generate it's output. */\n    ma_node_base endpoint;              /* Special node that all nodes eventually connect to. Data is read from this node in ma_node_graph_read_pcm_frames(). */\n    ma_uint16 nodeCacheCapInFrames;\n\n    /* Read and written by multiple threads. */\n    MA_ATOMIC(4, ma_bool32) isReading;\n};\n\nMA_API ma_result ma_node_graph_init(const ma_node_graph_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_node_graph* pNodeGraph);\nMA_API void ma_node_graph_uninit(ma_node_graph* pNodeGraph, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_node* ma_node_graph_get_endpoint(ma_node_graph* pNodeGraph);\nMA_API ma_result ma_node_graph_read_pcm_frames(ma_node_graph* pNodeGraph, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\nMA_API ma_uint32 ma_node_graph_get_channels(const ma_node_graph* pNodeGraph);\nMA_API ma_uint64 ma_node_graph_get_time(const ma_node_graph* pNodeGraph);\nMA_API ma_result ma_node_graph_set_time(ma_node_graph* pNodeGraph, ma_uint64 globalTime);\n\n\n\n/* Data source node. 0 input buses, 1 output bus. Used for reading from a data source. */\ntypedef struct\n{\n    ma_node_config nodeConfig;\n    ma_data_source* pDataSource;\n} ma_data_source_node_config;\n\nMA_API ma_data_source_node_config ma_data_source_node_config_init(ma_data_source* pDataSource);\n\n\ntypedef struct\n{\n    ma_node_base base;\n    ma_data_source* pDataSource;\n} ma_data_source_node;\n\nMA_API ma_result ma_data_source_node_init(ma_node_graph* pNodeGraph, const ma_data_source_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source_node* pDataSourceNode);\nMA_API void ma_data_source_node_uninit(ma_data_source_node* pDataSourceNode, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_data_source_node_set_looping(ma_data_source_node* pDataSourceNode, ma_bool32 isLooping);\nMA_API ma_bool32 ma_data_source_node_is_looping(ma_data_source_node* pDataSourceNode);\n\n\n/* Splitter Node. 1 input, many outputs. Used for splitting/copying a stream so it can be as input into two separate output nodes. */\ntypedef struct\n{\n    ma_node_config nodeConfig;\n    ma_uint32 channels;\n    ma_uint32 outputBusCount;\n} ma_splitter_node_config;\n\nMA_API ma_splitter_node_config ma_splitter_node_config_init(ma_uint32 channels);\n\n\ntypedef struct\n{\n    ma_node_base base;\n} ma_splitter_node;\n\nMA_API ma_result ma_splitter_node_init(ma_node_graph* pNodeGraph, const ma_splitter_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_splitter_node* pSplitterNode);\nMA_API void ma_splitter_node_uninit(ma_splitter_node* pSplitterNode, const ma_allocation_callbacks* pAllocationCallbacks);\n\n\n/*\nBiquad Node\n*/\ntypedef struct\n{\n    ma_node_config nodeConfig;\n    ma_biquad_config biquad;\n} ma_biquad_node_config;\n\nMA_API ma_biquad_node_config ma_biquad_node_config_init(ma_uint32 channels, float b0, float b1, float b2, float a0, float a1, float a2);\n\n\ntypedef struct\n{\n    ma_node_base baseNode;\n    ma_biquad biquad;\n} ma_biquad_node;\n\nMA_API ma_result ma_biquad_node_init(ma_node_graph* pNodeGraph, const ma_biquad_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_biquad_node* pNode);\nMA_API ma_result ma_biquad_node_reinit(const ma_biquad_config* pConfig, ma_biquad_node* pNode);\nMA_API void ma_biquad_node_uninit(ma_biquad_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks);\n\n\n/*\nLow Pass Filter Node\n*/\ntypedef struct\n{\n    ma_node_config nodeConfig;\n    ma_lpf_config lpf;\n} ma_lpf_node_config;\n\nMA_API ma_lpf_node_config ma_lpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order);\n\n\ntypedef struct\n{\n    ma_node_base baseNode;\n    ma_lpf lpf;\n} ma_lpf_node;\n\nMA_API ma_result ma_lpf_node_init(ma_node_graph* pNodeGraph, const ma_lpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf_node* pNode);\nMA_API ma_result ma_lpf_node_reinit(const ma_lpf_config* pConfig, ma_lpf_node* pNode);\nMA_API void ma_lpf_node_uninit(ma_lpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks);\n\n\n/*\nHigh Pass Filter Node\n*/\ntypedef struct\n{\n    ma_node_config nodeConfig;\n    ma_hpf_config hpf;\n} ma_hpf_node_config;\n\nMA_API ma_hpf_node_config ma_hpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order);\n\n\ntypedef struct\n{\n    ma_node_base baseNode;\n    ma_hpf hpf;\n} ma_hpf_node;\n\nMA_API ma_result ma_hpf_node_init(ma_node_graph* pNodeGraph, const ma_hpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf_node* pNode);\nMA_API ma_result ma_hpf_node_reinit(const ma_hpf_config* pConfig, ma_hpf_node* pNode);\nMA_API void ma_hpf_node_uninit(ma_hpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks);\n\n\n/*\nBand Pass Filter Node\n*/\ntypedef struct\n{\n    ma_node_config nodeConfig;\n    ma_bpf_config bpf;\n} ma_bpf_node_config;\n\nMA_API ma_bpf_node_config ma_bpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order);\n\n\ntypedef struct\n{\n    ma_node_base baseNode;\n    ma_bpf bpf;\n} ma_bpf_node;\n\nMA_API ma_result ma_bpf_node_init(ma_node_graph* pNodeGraph, const ma_bpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf_node* pNode);\nMA_API ma_result ma_bpf_node_reinit(const ma_bpf_config* pConfig, ma_bpf_node* pNode);\nMA_API void ma_bpf_node_uninit(ma_bpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks);\n\n\n/*\nNotching Filter Node\n*/\ntypedef struct\n{\n    ma_node_config nodeConfig;\n    ma_notch_config notch;\n} ma_notch_node_config;\n\nMA_API ma_notch_node_config ma_notch_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double q, double frequency);\n\n\ntypedef struct\n{\n    ma_node_base baseNode;\n    ma_notch2 notch;\n} ma_notch_node;\n\nMA_API ma_result ma_notch_node_init(ma_node_graph* pNodeGraph, const ma_notch_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_notch_node* pNode);\nMA_API ma_result ma_notch_node_reinit(const ma_notch_config* pConfig, ma_notch_node* pNode);\nMA_API void ma_notch_node_uninit(ma_notch_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks);\n\n\n/*\nPeaking Filter Node\n*/\ntypedef struct\n{\n    ma_node_config nodeConfig;\n    ma_peak_config peak;\n} ma_peak_node_config;\n\nMA_API ma_peak_node_config ma_peak_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency);\n\n\ntypedef struct\n{\n    ma_node_base baseNode;\n    ma_peak2 peak;\n} ma_peak_node;\n\nMA_API ma_result ma_peak_node_init(ma_node_graph* pNodeGraph, const ma_peak_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_peak_node* pNode);\nMA_API ma_result ma_peak_node_reinit(const ma_peak_config* pConfig, ma_peak_node* pNode);\nMA_API void ma_peak_node_uninit(ma_peak_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks);\n\n\n/*\nLow Shelf Filter Node\n*/\ntypedef struct\n{\n    ma_node_config nodeConfig;\n    ma_loshelf_config loshelf;\n} ma_loshelf_node_config;\n\nMA_API ma_loshelf_node_config ma_loshelf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency);\n\n\ntypedef struct\n{\n    ma_node_base baseNode;\n    ma_loshelf2 loshelf;\n} ma_loshelf_node;\n\nMA_API ma_result ma_loshelf_node_init(ma_node_graph* pNodeGraph, const ma_loshelf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_loshelf_node* pNode);\nMA_API ma_result ma_loshelf_node_reinit(const ma_loshelf_config* pConfig, ma_loshelf_node* pNode);\nMA_API void ma_loshelf_node_uninit(ma_loshelf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks);\n\n\n/*\nHigh Shelf Filter Node\n*/\ntypedef struct\n{\n    ma_node_config nodeConfig;\n    ma_hishelf_config hishelf;\n} ma_hishelf_node_config;\n\nMA_API ma_hishelf_node_config ma_hishelf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency);\n\n\ntypedef struct\n{\n    ma_node_base baseNode;\n    ma_hishelf2 hishelf;\n} ma_hishelf_node;\n\nMA_API ma_result ma_hishelf_node_init(ma_node_graph* pNodeGraph, const ma_hishelf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hishelf_node* pNode);\nMA_API ma_result ma_hishelf_node_reinit(const ma_hishelf_config* pConfig, ma_hishelf_node* pNode);\nMA_API void ma_hishelf_node_uninit(ma_hishelf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks);\n\n\ntypedef struct\n{\n    ma_node_config nodeConfig;\n    ma_delay_config delay;\n} ma_delay_node_config;\n\nMA_API ma_delay_node_config ma_delay_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 delayInFrames, float decay);\n\n\ntypedef struct\n{\n    ma_node_base baseNode;\n    ma_delay delay;\n} ma_delay_node;\n\nMA_API ma_result ma_delay_node_init(ma_node_graph* pNodeGraph, const ma_delay_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_delay_node* pDelayNode);\nMA_API void ma_delay_node_uninit(ma_delay_node* pDelayNode, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API void ma_delay_node_set_wet(ma_delay_node* pDelayNode, float value);\nMA_API float ma_delay_node_get_wet(const ma_delay_node* pDelayNode);\nMA_API void ma_delay_node_set_dry(ma_delay_node* pDelayNode, float value);\nMA_API float ma_delay_node_get_dry(const ma_delay_node* pDelayNode);\nMA_API void ma_delay_node_set_decay(ma_delay_node* pDelayNode, float value);\nMA_API float ma_delay_node_get_decay(const ma_delay_node* pDelayNode);\n#endif  /* MA_NO_NODE_GRAPH */\n\n\n/* SECTION: miniaudio_engine.h */\n/************************************************************************************************************************************************************\n\nEngine\n\n************************************************************************************************************************************************************/\n#if !defined(MA_NO_ENGINE) && !defined(MA_NO_NODE_GRAPH)\ntypedef struct ma_engine ma_engine;\ntypedef struct ma_sound  ma_sound;\n\n\n/* Sound flags. */\ntypedef enum\n{\n    /* Resource manager flags. */\n    MA_SOUND_FLAG_STREAM                = 0x00000001,   /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM */\n    MA_SOUND_FLAG_DECODE                = 0x00000002,   /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE */\n    MA_SOUND_FLAG_ASYNC                 = 0x00000004,   /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC */\n    MA_SOUND_FLAG_WAIT_INIT             = 0x00000008,   /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT */\n    MA_SOUND_FLAG_UNKNOWN_LENGTH        = 0x00000010,   /* MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_UNKNOWN_LENGTH */\n\n    /* ma_sound specific flags. */\n    MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT = 0x00001000,   /* Do not attach to the endpoint by default. Useful for when setting up nodes in a complex graph system. */\n    MA_SOUND_FLAG_NO_PITCH              = 0x00002000,   /* Disable pitch shifting with ma_sound_set_pitch() and ma_sound_group_set_pitch(). This is an optimization. */\n    MA_SOUND_FLAG_NO_SPATIALIZATION     = 0x00004000    /* Disable spatialization. */\n} ma_sound_flags;\n\n#ifndef MA_ENGINE_MAX_LISTENERS\n#define MA_ENGINE_MAX_LISTENERS             4\n#endif\n\n#define MA_LISTENER_INDEX_CLOSEST           ((ma_uint8)-1)\n\ntypedef enum\n{\n    ma_engine_node_type_sound,\n    ma_engine_node_type_group\n} ma_engine_node_type;\n\ntypedef struct\n{\n    ma_engine* pEngine;\n    ma_engine_node_type type;\n    ma_uint32 channelsIn;\n    ma_uint32 channelsOut;\n    ma_uint32 sampleRate;               /* Only used when the type is set to ma_engine_node_type_sound. */\n    ma_uint32 volumeSmoothTimeInPCMFrames;  /* The number of frames to smooth over volume changes. Defaults to 0 in which case no smoothing is used. */\n    ma_mono_expansion_mode monoExpansionMode;\n    ma_bool8 isPitchDisabled;           /* Pitching can be explicitly disabled with MA_SOUND_FLAG_NO_PITCH to optimize processing. */\n    ma_bool8 isSpatializationDisabled;  /* Spatialization can be explicitly disabled with MA_SOUND_FLAG_NO_SPATIALIZATION. */\n    ma_uint8 pinnedListenerIndex;       /* The index of the listener this node should always use for spatialization. If set to MA_LISTENER_INDEX_CLOSEST the engine will use the closest listener. */\n} ma_engine_node_config;\n\nMA_API ma_engine_node_config ma_engine_node_config_init(ma_engine* pEngine, ma_engine_node_type type, ma_uint32 flags);\n\n\n/* Base node object for both ma_sound and ma_sound_group. */\ntypedef struct\n{\n    ma_node_base baseNode;                              /* Must be the first member for compatiblity with the ma_node API. */\n    ma_engine* pEngine;                                 /* A pointer to the engine. Set based on the value from the config. */\n    ma_uint32 sampleRate;                               /* The sample rate of the input data. For sounds backed by a data source, this will be the data source's sample rate. Otherwise it'll be the engine's sample rate. */\n    ma_uint32 volumeSmoothTimeInPCMFrames;\n    ma_mono_expansion_mode monoExpansionMode;\n    ma_fader fader;\n    ma_linear_resampler resampler;                      /* For pitch shift. */\n    ma_spatializer spatializer;\n    ma_panner panner;\n    ma_gainer volumeGainer;                             /* This will only be used if volumeSmoothTimeInPCMFrames is > 0. */\n    ma_atomic_float volume;                             /* Defaults to 1. */\n    MA_ATOMIC(4, float) pitch;\n    float oldPitch;                                     /* For determining whether or not the resampler needs to be updated to reflect the new pitch. The resampler will be updated on the mixing thread. */\n    float oldDopplerPitch;                              /* For determining whether or not the resampler needs to be updated to take a new doppler pitch into account. */\n    MA_ATOMIC(4, ma_bool32) isPitchDisabled;            /* When set to true, pitching will be disabled which will allow the resampler to be bypassed to save some computation. */\n    MA_ATOMIC(4, ma_bool32) isSpatializationDisabled;   /* Set to false by default. When set to false, will not have spatialisation applied. */\n    MA_ATOMIC(4, ma_uint32) pinnedListenerIndex;        /* The index of the listener this node should always use for spatialization. If set to MA_LISTENER_INDEX_CLOSEST the engine will use the closest listener. */\n\n    /* When setting a fade, it's not done immediately in ma_sound_set_fade(). It's deferred to the audio thread which means we need to store the settings here. */\n    struct\n    {\n        ma_atomic_float volumeBeg;\n        ma_atomic_float volumeEnd;\n        ma_atomic_uint64 fadeLengthInFrames;            /* <-- Defaults to (~(ma_uint64)0) which is used to indicate that no fade should be applied. */\n        ma_atomic_uint64 absoluteGlobalTimeInFrames;    /* <-- The time to start the fade. */\n    } fadeSettings;\n\n    /* Memory management. */\n    ma_bool8 _ownsHeap;\n    void* _pHeap;\n} ma_engine_node;\n\nMA_API ma_result ma_engine_node_get_heap_size(const ma_engine_node_config* pConfig, size_t* pHeapSizeInBytes);\nMA_API ma_result ma_engine_node_init_preallocated(const ma_engine_node_config* pConfig, void* pHeap, ma_engine_node* pEngineNode);\nMA_API ma_result ma_engine_node_init(const ma_engine_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_engine_node* pEngineNode);\nMA_API void ma_engine_node_uninit(ma_engine_node* pEngineNode, const ma_allocation_callbacks* pAllocationCallbacks);\n\n\n#define MA_SOUND_SOURCE_CHANNEL_COUNT   0xFFFFFFFF\n\n/* Callback for when a sound reaches the end. */\ntypedef void (* ma_sound_end_proc)(void* pUserData, ma_sound* pSound);\n\ntypedef struct\n{\n    const char* pFilePath;                      /* Set this to load from the resource manager. */\n    const wchar_t* pFilePathW;                  /* Set this to load from the resource manager. */\n    ma_data_source* pDataSource;                /* Set this to load from an existing data source. */\n    ma_node* pInitialAttachment;                /* If set, the sound will be attached to an input of this node. This can be set to a ma_sound. If set to NULL, the sound will be attached directly to the endpoint unless MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT is set in `flags`. */\n    ma_uint32 initialAttachmentInputBusIndex;   /* The index of the input bus of pInitialAttachment to attach the sound to. */\n    ma_uint32 channelsIn;                       /* Ignored if using a data source as input (the data source's channel count will be used always). Otherwise, setting to 0 will cause the engine's channel count to be used. */\n    ma_uint32 channelsOut;                      /* Set this to 0 (default) to use the engine's channel count. Set to MA_SOUND_SOURCE_CHANNEL_COUNT to use the data source's channel count (only used if using a data source as input). */\n    ma_mono_expansion_mode monoExpansionMode;   /* Controls how the mono channel should be expanded to other channels when spatialization is disabled on a sound. */\n    ma_uint32 flags;                            /* A combination of MA_SOUND_FLAG_* flags. */\n    ma_uint32 volumeSmoothTimeInPCMFrames;      /* The number of frames to smooth over volume changes. Defaults to 0 in which case no smoothing is used. */\n    ma_uint64 initialSeekPointInPCMFrames;      /* Initializes the sound such that it's seeked to this location by default. */\n    ma_uint64 rangeBegInPCMFrames;\n    ma_uint64 rangeEndInPCMFrames;\n    ma_uint64 loopPointBegInPCMFrames;\n    ma_uint64 loopPointEndInPCMFrames;\n    ma_bool32 isLooping;\n    ma_sound_end_proc endCallback;              /* Fired when the sound reaches the end. Will be fired from the audio thread. Do not restart, uninitialize or otherwise change the state of the sound from here. Instead fire an event or set a variable to indicate to a different thread to change the start of the sound. Will not be fired in response to a scheduled stop with ma_sound_set_stop_time_*(). */\n    void* pEndCallbackUserData;\n#ifndef MA_NO_RESOURCE_MANAGER\n    ma_resource_manager_pipeline_notifications initNotifications;\n#endif\n    ma_fence* pDoneFence;                       /* Deprecated. Use initNotifications instead. Released when the resource manager has finished decoding the entire sound. Not used with streams. */\n} ma_sound_config;\n\nMA_API ma_sound_config ma_sound_config_init(void);                  /* Deprecated. Will be removed in version 0.12. Use ma_sound_config_2() instead. */\nMA_API ma_sound_config ma_sound_config_init_2(ma_engine* pEngine);  /* Will be renamed to ma_sound_config_init() in version 0.12. */\n\nstruct ma_sound\n{\n    ma_engine_node engineNode;          /* Must be the first member for compatibility with the ma_node API. */\n    ma_data_source* pDataSource;\n    MA_ATOMIC(8, ma_uint64) seekTarget; /* The PCM frame index to seek to in the mixing thread. Set to (~(ma_uint64)0) to not perform any seeking. */\n    MA_ATOMIC(4, ma_bool32) atEnd;\n    ma_sound_end_proc endCallback;\n    void* pEndCallbackUserData;\n    ma_bool8 ownsDataSource;\n\n    /*\n    We're declaring a resource manager data source object here to save us a malloc when loading a\n    sound via the resource manager, which I *think* will be the most common scenario.\n    */\n#ifndef MA_NO_RESOURCE_MANAGER\n    ma_resource_manager_data_source* pResourceManagerDataSource;\n#endif\n};\n\n/* Structure specifically for sounds played with ma_engine_play_sound(). Making this a separate structure to reduce overhead. */\ntypedef struct ma_sound_inlined ma_sound_inlined;\nstruct ma_sound_inlined\n{\n    ma_sound sound;\n    ma_sound_inlined* pNext;\n    ma_sound_inlined* pPrev;\n};\n\n/* A sound group is just a sound. */\ntypedef ma_sound_config ma_sound_group_config;\ntypedef ma_sound        ma_sound_group;\n\nMA_API ma_sound_group_config ma_sound_group_config_init(void);                  /* Deprecated. Will be removed in version 0.12. Use ma_sound_config_2() instead. */\nMA_API ma_sound_group_config ma_sound_group_config_init_2(ma_engine* pEngine);  /* Will be renamed to ma_sound_config_init() in version 0.12. */\n\ntypedef void (* ma_engine_process_proc)(void* pUserData, float* pFramesOut, ma_uint64 frameCount);\n\ntypedef struct\n{\n#if !defined(MA_NO_RESOURCE_MANAGER)\n    ma_resource_manager* pResourceManager;          /* Can be null in which case a resource manager will be created for you. */\n#endif\n#if !defined(MA_NO_DEVICE_IO)\n    ma_context* pContext;\n    ma_device* pDevice;                             /* If set, the caller is responsible for calling ma_engine_data_callback() in the device's data callback. */\n    ma_device_id* pPlaybackDeviceID;                /* The ID of the playback device to use with the default listener. */\n    ma_device_data_proc dataCallback;               /* Can be null. Can be used to provide a custom device data callback. */\n    ma_device_notification_proc notificationCallback;\n#endif\n    ma_log* pLog;                                   /* When set to NULL, will use the context's log. */\n    ma_uint32 listenerCount;                        /* Must be between 1 and MA_ENGINE_MAX_LISTENERS. */\n    ma_uint32 channels;                             /* The number of channels to use when mixing and spatializing. When set to 0, will use the native channel count of the device. */\n    ma_uint32 sampleRate;                           /* The sample rate. When set to 0 will use the native channel count of the device. */\n    ma_uint32 periodSizeInFrames;                   /* If set to something other than 0, updates will always be exactly this size. The underlying device may be a different size, but from the perspective of the mixer that won't matter.*/\n    ma_uint32 periodSizeInMilliseconds;             /* Used if periodSizeInFrames is unset. */\n    ma_uint32 gainSmoothTimeInFrames;               /* The number of frames to interpolate the gain of spatialized sounds across. If set to 0, will use gainSmoothTimeInMilliseconds. */\n    ma_uint32 gainSmoothTimeInMilliseconds;         /* When set to 0, gainSmoothTimeInFrames will be used. If both are set to 0, a default value will be used. */\n    ma_uint32 defaultVolumeSmoothTimeInPCMFrames;   /* Defaults to 0. Controls the default amount of smoothing to apply to volume changes to sounds. High values means more smoothing at the expense of high latency (will take longer to reach the new volume). */\n    ma_allocation_callbacks allocationCallbacks;\n    ma_bool32 noAutoStart;                          /* When set to true, requires an explicit call to ma_engine_start(). This is false by default, meaning the engine will be started automatically in ma_engine_init(). */\n    ma_bool32 noDevice;                             /* When set to true, don't create a default device. ma_engine_read_pcm_frames() can be called manually to read data. */\n    ma_mono_expansion_mode monoExpansionMode;       /* Controls how the mono channel should be expanded to other channels when spatialization is disabled on a sound. */\n    ma_vfs* pResourceManagerVFS;                    /* A pointer to a pre-allocated VFS object to use with the resource manager. This is ignored if pResourceManager is not NULL. */\n    ma_engine_process_proc onProcess;               /* Fired at the end of each call to ma_engine_read_pcm_frames(). For engine's that manage their own internal device (the default configuration), this will be fired from the audio thread, and you do not need to call ma_engine_read_pcm_frames() manually in order to trigger this. */\n    void* pProcessUserData;                         /* User data that's passed into onProcess. */\n} ma_engine_config;\n\nMA_API ma_engine_config ma_engine_config_init(void);\n\n\nstruct ma_engine\n{\n    ma_node_graph nodeGraph;                /* An engine is a node graph. It should be able to be plugged into any ma_node_graph API (with a cast) which means this must be the first member of this struct. */\n#if !defined(MA_NO_RESOURCE_MANAGER)\n    ma_resource_manager* pResourceManager;\n#endif\n#if !defined(MA_NO_DEVICE_IO)\n    ma_device* pDevice;                     /* Optionally set via the config, otherwise allocated by the engine in ma_engine_init(). */\n#endif\n    ma_log* pLog;\n    ma_uint32 sampleRate;\n    ma_uint32 listenerCount;\n    ma_spatializer_listener listeners[MA_ENGINE_MAX_LISTENERS];\n    ma_allocation_callbacks allocationCallbacks;\n    ma_bool8 ownsResourceManager;\n    ma_bool8 ownsDevice;\n    ma_spinlock inlinedSoundLock;               /* For synchronizing access so the inlined sound list. */\n    ma_sound_inlined* pInlinedSoundHead;        /* The first inlined sound. Inlined sounds are tracked in a linked list. */\n    MA_ATOMIC(4, ma_uint32) inlinedSoundCount;  /* The total number of allocated inlined sound objects. Used for debugging. */\n    ma_uint32 gainSmoothTimeInFrames;           /* The number of frames to interpolate the gain of spatialized sounds across. */\n    ma_uint32 defaultVolumeSmoothTimeInPCMFrames;\n    ma_mono_expansion_mode monoExpansionMode;\n    ma_engine_process_proc onProcess;\n    void* pProcessUserData;\n};\n\nMA_API ma_result ma_engine_init(const ma_engine_config* pConfig, ma_engine* pEngine);\nMA_API void ma_engine_uninit(ma_engine* pEngine);\nMA_API ma_result ma_engine_read_pcm_frames(ma_engine* pEngine, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\nMA_API ma_node_graph* ma_engine_get_node_graph(ma_engine* pEngine);\n#if !defined(MA_NO_RESOURCE_MANAGER)\nMA_API ma_resource_manager* ma_engine_get_resource_manager(ma_engine* pEngine);\n#endif\nMA_API ma_device* ma_engine_get_device(ma_engine* pEngine);\nMA_API ma_log* ma_engine_get_log(ma_engine* pEngine);\nMA_API ma_node* ma_engine_get_endpoint(ma_engine* pEngine);\nMA_API ma_uint64 ma_engine_get_time_in_pcm_frames(const ma_engine* pEngine);\nMA_API ma_uint64 ma_engine_get_time_in_milliseconds(const ma_engine* pEngine);\nMA_API ma_result ma_engine_set_time_in_pcm_frames(ma_engine* pEngine, ma_uint64 globalTime);\nMA_API ma_result ma_engine_set_time_in_milliseconds(ma_engine* pEngine, ma_uint64 globalTime);\nMA_API ma_uint64 ma_engine_get_time(const ma_engine* pEngine);                  /* Deprecated. Use ma_engine_get_time_in_pcm_frames(). Will be removed in version 0.12. */\nMA_API ma_result ma_engine_set_time(ma_engine* pEngine, ma_uint64 globalTime);  /* Deprecated. Use ma_engine_set_time_in_pcm_frames(). Will be removed in version 0.12. */\nMA_API ma_uint32 ma_engine_get_channels(const ma_engine* pEngine);\nMA_API ma_uint32 ma_engine_get_sample_rate(const ma_engine* pEngine);\n\nMA_API ma_result ma_engine_start(ma_engine* pEngine);\nMA_API ma_result ma_engine_stop(ma_engine* pEngine);\nMA_API ma_result ma_engine_set_volume(ma_engine* pEngine, float volume);\nMA_API float ma_engine_get_volume(ma_engine* pEngine);\nMA_API ma_result ma_engine_set_gain_db(ma_engine* pEngine, float gainDB);\nMA_API float ma_engine_get_gain_db(ma_engine* pEngine);\n\nMA_API ma_uint32 ma_engine_get_listener_count(const ma_engine* pEngine);\nMA_API ma_uint32 ma_engine_find_closest_listener(const ma_engine* pEngine, float absolutePosX, float absolutePosY, float absolutePosZ);\nMA_API void ma_engine_listener_set_position(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z);\nMA_API ma_vec3f ma_engine_listener_get_position(const ma_engine* pEngine, ma_uint32 listenerIndex);\nMA_API void ma_engine_listener_set_direction(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z);\nMA_API ma_vec3f ma_engine_listener_get_direction(const ma_engine* pEngine, ma_uint32 listenerIndex);\nMA_API void ma_engine_listener_set_velocity(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z);\nMA_API ma_vec3f ma_engine_listener_get_velocity(const ma_engine* pEngine, ma_uint32 listenerIndex);\nMA_API void ma_engine_listener_set_cone(ma_engine* pEngine, ma_uint32 listenerIndex, float innerAngleInRadians, float outerAngleInRadians, float outerGain);\nMA_API void ma_engine_listener_get_cone(const ma_engine* pEngine, ma_uint32 listenerIndex, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain);\nMA_API void ma_engine_listener_set_world_up(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z);\nMA_API ma_vec3f ma_engine_listener_get_world_up(const ma_engine* pEngine, ma_uint32 listenerIndex);\nMA_API void ma_engine_listener_set_enabled(ma_engine* pEngine, ma_uint32 listenerIndex, ma_bool32 isEnabled);\nMA_API ma_bool32 ma_engine_listener_is_enabled(const ma_engine* pEngine, ma_uint32 listenerIndex);\n\n#ifndef MA_NO_RESOURCE_MANAGER\nMA_API ma_result ma_engine_play_sound_ex(ma_engine* pEngine, const char* pFilePath, ma_node* pNode, ma_uint32 nodeInputBusIndex);\nMA_API ma_result ma_engine_play_sound(ma_engine* pEngine, const char* pFilePath, ma_sound_group* pGroup);   /* Fire and forget. */\n#endif\n\n#ifndef MA_NO_RESOURCE_MANAGER\nMA_API ma_result ma_sound_init_from_file(ma_engine* pEngine, const char* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound);\nMA_API ma_result ma_sound_init_from_file_w(ma_engine* pEngine, const wchar_t* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound);\nMA_API ma_result ma_sound_init_copy(ma_engine* pEngine, const ma_sound* pExistingSound, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound);\n#endif\nMA_API ma_result ma_sound_init_from_data_source(ma_engine* pEngine, ma_data_source* pDataSource, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound);\nMA_API ma_result ma_sound_init_ex(ma_engine* pEngine, const ma_sound_config* pConfig, ma_sound* pSound);\nMA_API void ma_sound_uninit(ma_sound* pSound);\nMA_API ma_engine* ma_sound_get_engine(const ma_sound* pSound);\nMA_API ma_data_source* ma_sound_get_data_source(const ma_sound* pSound);\nMA_API ma_result ma_sound_start(ma_sound* pSound);\nMA_API ma_result ma_sound_stop(ma_sound* pSound);\nMA_API ma_result ma_sound_stop_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 fadeLengthInFrames);     /* Will overwrite any scheduled stop and fade. */\nMA_API ma_result ma_sound_stop_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 fadeLengthInFrames);   /* Will overwrite any scheduled stop and fade. */\nMA_API void ma_sound_set_volume(ma_sound* pSound, float volume);\nMA_API float ma_sound_get_volume(const ma_sound* pSound);\nMA_API void ma_sound_set_pan(ma_sound* pSound, float pan);\nMA_API float ma_sound_get_pan(const ma_sound* pSound);\nMA_API void ma_sound_set_pan_mode(ma_sound* pSound, ma_pan_mode panMode);\nMA_API ma_pan_mode ma_sound_get_pan_mode(const ma_sound* pSound);\nMA_API void ma_sound_set_pitch(ma_sound* pSound, float pitch);\nMA_API float ma_sound_get_pitch(const ma_sound* pSound);\nMA_API void ma_sound_set_spatialization_enabled(ma_sound* pSound, ma_bool32 enabled);\nMA_API ma_bool32 ma_sound_is_spatialization_enabled(const ma_sound* pSound);\nMA_API void ma_sound_set_pinned_listener_index(ma_sound* pSound, ma_uint32 listenerIndex);\nMA_API ma_uint32 ma_sound_get_pinned_listener_index(const ma_sound* pSound);\nMA_API ma_uint32 ma_sound_get_listener_index(const ma_sound* pSound);\nMA_API ma_vec3f ma_sound_get_direction_to_listener(const ma_sound* pSound);\nMA_API void ma_sound_set_position(ma_sound* pSound, float x, float y, float z);\nMA_API ma_vec3f ma_sound_get_position(const ma_sound* pSound);\nMA_API void ma_sound_set_direction(ma_sound* pSound, float x, float y, float z);\nMA_API ma_vec3f ma_sound_get_direction(const ma_sound* pSound);\nMA_API void ma_sound_set_velocity(ma_sound* pSound, float x, float y, float z);\nMA_API ma_vec3f ma_sound_get_velocity(const ma_sound* pSound);\nMA_API void ma_sound_set_attenuation_model(ma_sound* pSound, ma_attenuation_model attenuationModel);\nMA_API ma_attenuation_model ma_sound_get_attenuation_model(const ma_sound* pSound);\nMA_API void ma_sound_set_positioning(ma_sound* pSound, ma_positioning positioning);\nMA_API ma_positioning ma_sound_get_positioning(const ma_sound* pSound);\nMA_API void ma_sound_set_rolloff(ma_sound* pSound, float rolloff);\nMA_API float ma_sound_get_rolloff(const ma_sound* pSound);\nMA_API void ma_sound_set_min_gain(ma_sound* pSound, float minGain);\nMA_API float ma_sound_get_min_gain(const ma_sound* pSound);\nMA_API void ma_sound_set_max_gain(ma_sound* pSound, float maxGain);\nMA_API float ma_sound_get_max_gain(const ma_sound* pSound);\nMA_API void ma_sound_set_min_distance(ma_sound* pSound, float minDistance);\nMA_API float ma_sound_get_min_distance(const ma_sound* pSound);\nMA_API void ma_sound_set_max_distance(ma_sound* pSound, float maxDistance);\nMA_API float ma_sound_get_max_distance(const ma_sound* pSound);\nMA_API void ma_sound_set_cone(ma_sound* pSound, float innerAngleInRadians, float outerAngleInRadians, float outerGain);\nMA_API void ma_sound_get_cone(const ma_sound* pSound, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain);\nMA_API void ma_sound_set_doppler_factor(ma_sound* pSound, float dopplerFactor);\nMA_API float ma_sound_get_doppler_factor(const ma_sound* pSound);\nMA_API void ma_sound_set_directional_attenuation_factor(ma_sound* pSound, float directionalAttenuationFactor);\nMA_API float ma_sound_get_directional_attenuation_factor(const ma_sound* pSound);\nMA_API void ma_sound_set_fade_in_pcm_frames(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames);\nMA_API void ma_sound_set_fade_in_milliseconds(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds);\nMA_API void ma_sound_set_fade_start_in_pcm_frames(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames, ma_uint64 absoluteGlobalTimeInFrames);\nMA_API void ma_sound_set_fade_start_in_milliseconds(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds, ma_uint64 absoluteGlobalTimeInMilliseconds);\nMA_API float ma_sound_get_current_fade_volume(const ma_sound* pSound);\nMA_API void ma_sound_set_start_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames);\nMA_API void ma_sound_set_start_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds);\nMA_API void ma_sound_set_stop_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames);\nMA_API void ma_sound_set_stop_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds);\nMA_API void ma_sound_set_stop_time_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 stopAbsoluteGlobalTimeInFrames, ma_uint64 fadeLengthInFrames);\nMA_API void ma_sound_set_stop_time_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 stopAbsoluteGlobalTimeInMilliseconds, ma_uint64 fadeLengthInMilliseconds);\nMA_API ma_bool32 ma_sound_is_playing(const ma_sound* pSound);\nMA_API ma_uint64 ma_sound_get_time_in_pcm_frames(const ma_sound* pSound);\nMA_API ma_uint64 ma_sound_get_time_in_milliseconds(const ma_sound* pSound);\nMA_API void ma_sound_set_looping(ma_sound* pSound, ma_bool32 isLooping);\nMA_API ma_bool32 ma_sound_is_looping(const ma_sound* pSound);\nMA_API ma_bool32 ma_sound_at_end(const ma_sound* pSound);\nMA_API ma_result ma_sound_seek_to_pcm_frame(ma_sound* pSound, ma_uint64 frameIndex); /* Just a wrapper around ma_data_source_seek_to_pcm_frame(). */\nMA_API ma_result ma_sound_get_data_format(ma_sound* pSound, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);\nMA_API ma_result ma_sound_get_cursor_in_pcm_frames(ma_sound* pSound, ma_uint64* pCursor);\nMA_API ma_result ma_sound_get_length_in_pcm_frames(ma_sound* pSound, ma_uint64* pLength);\nMA_API ma_result ma_sound_get_cursor_in_seconds(ma_sound* pSound, float* pCursor);\nMA_API ma_result ma_sound_get_length_in_seconds(ma_sound* pSound, float* pLength);\nMA_API ma_result ma_sound_set_end_callback(ma_sound* pSound, ma_sound_end_proc callback, void* pUserData);\n\nMA_API ma_result ma_sound_group_init(ma_engine* pEngine, ma_uint32 flags, ma_sound_group* pParentGroup, ma_sound_group* pGroup);\nMA_API ma_result ma_sound_group_init_ex(ma_engine* pEngine, const ma_sound_group_config* pConfig, ma_sound_group* pGroup);\nMA_API void ma_sound_group_uninit(ma_sound_group* pGroup);\nMA_API ma_engine* ma_sound_group_get_engine(const ma_sound_group* pGroup);\nMA_API ma_result ma_sound_group_start(ma_sound_group* pGroup);\nMA_API ma_result ma_sound_group_stop(ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_volume(ma_sound_group* pGroup, float volume);\nMA_API float ma_sound_group_get_volume(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_pan(ma_sound_group* pGroup, float pan);\nMA_API float ma_sound_group_get_pan(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_pan_mode(ma_sound_group* pGroup, ma_pan_mode panMode);\nMA_API ma_pan_mode ma_sound_group_get_pan_mode(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_pitch(ma_sound_group* pGroup, float pitch);\nMA_API float ma_sound_group_get_pitch(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_spatialization_enabled(ma_sound_group* pGroup, ma_bool32 enabled);\nMA_API ma_bool32 ma_sound_group_is_spatialization_enabled(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_pinned_listener_index(ma_sound_group* pGroup, ma_uint32 listenerIndex);\nMA_API ma_uint32 ma_sound_group_get_pinned_listener_index(const ma_sound_group* pGroup);\nMA_API ma_uint32 ma_sound_group_get_listener_index(const ma_sound_group* pGroup);\nMA_API ma_vec3f ma_sound_group_get_direction_to_listener(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_position(ma_sound_group* pGroup, float x, float y, float z);\nMA_API ma_vec3f ma_sound_group_get_position(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_direction(ma_sound_group* pGroup, float x, float y, float z);\nMA_API ma_vec3f ma_sound_group_get_direction(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_velocity(ma_sound_group* pGroup, float x, float y, float z);\nMA_API ma_vec3f ma_sound_group_get_velocity(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_attenuation_model(ma_sound_group* pGroup, ma_attenuation_model attenuationModel);\nMA_API ma_attenuation_model ma_sound_group_get_attenuation_model(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_positioning(ma_sound_group* pGroup, ma_positioning positioning);\nMA_API ma_positioning ma_sound_group_get_positioning(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_rolloff(ma_sound_group* pGroup, float rolloff);\nMA_API float ma_sound_group_get_rolloff(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_min_gain(ma_sound_group* pGroup, float minGain);\nMA_API float ma_sound_group_get_min_gain(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_max_gain(ma_sound_group* pGroup, float maxGain);\nMA_API float ma_sound_group_get_max_gain(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_min_distance(ma_sound_group* pGroup, float minDistance);\nMA_API float ma_sound_group_get_min_distance(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_max_distance(ma_sound_group* pGroup, float maxDistance);\nMA_API float ma_sound_group_get_max_distance(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_cone(ma_sound_group* pGroup, float innerAngleInRadians, float outerAngleInRadians, float outerGain);\nMA_API void ma_sound_group_get_cone(const ma_sound_group* pGroup, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain);\nMA_API void ma_sound_group_set_doppler_factor(ma_sound_group* pGroup, float dopplerFactor);\nMA_API float ma_sound_group_get_doppler_factor(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_directional_attenuation_factor(ma_sound_group* pGroup, float directionalAttenuationFactor);\nMA_API float ma_sound_group_get_directional_attenuation_factor(const ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_fade_in_pcm_frames(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames);\nMA_API void ma_sound_group_set_fade_in_milliseconds(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds);\nMA_API float ma_sound_group_get_current_fade_volume(ma_sound_group* pGroup);\nMA_API void ma_sound_group_set_start_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames);\nMA_API void ma_sound_group_set_start_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds);\nMA_API void ma_sound_group_set_stop_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames);\nMA_API void ma_sound_group_set_stop_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds);\nMA_API ma_bool32 ma_sound_group_is_playing(const ma_sound_group* pGroup);\nMA_API ma_uint64 ma_sound_group_get_time_in_pcm_frames(const ma_sound_group* pGroup);\n#endif  /* MA_NO_ENGINE */\n/* END SECTION: miniaudio_engine.h */\n\n#ifdef __cplusplus\n}\n#endif\n#endif  /* miniaudio_h */\n\n\n/*\nThis is for preventing greying out of the implementation section.\n*/\n#if defined(Q_CREATOR_RUN) || defined(__INTELLISENSE__) || defined(__CDT_PARSER__)\n#define MINIAUDIO_IMPLEMENTATION\n#endif\n\n/************************************************************************************************************************************************************\n*************************************************************************************************************************************************************\n\nIMPLEMENTATION\n\n*************************************************************************************************************************************************************\n************************************************************************************************************************************************************/\n#if defined(MINIAUDIO_IMPLEMENTATION) || defined(MA_IMPLEMENTATION)\n#ifndef miniaudio_c\n#define miniaudio_c\n\n#include <assert.h>\n#include <limits.h>         /* For INT_MAX */\n#include <math.h>           /* sin(), etc. */\n#include <stdlib.h>         /* For malloc(), free(), wcstombs(). */\n#include <string.h>         /* For memset() */\n\n#include <stdarg.h>\n#include <stdio.h>\n#if !defined(_MSC_VER) && !defined(__DMC__)\n    #include <strings.h>    /* For strcasecmp(). */\n    #include <wchar.h>      /* For wcslen(), wcsrtombs() */\n#endif\n#ifdef _MSC_VER\n    #include <float.h>      /* For _controlfp_s constants */\n#endif\n\n#if defined(MA_WIN32)\n    #include <windows.h>\n\n    /*\n    There's a possibility that WIN32_LEAN_AND_MEAN has been defined which will exclude some symbols\n    such as STGM_READ and CLSCTL_ALL. We need to check these and define them ourselves if they're\n    unavailable.\n    */\n    #ifndef STGM_READ\n    #define STGM_READ   0x00000000L\n    #endif\n    #ifndef CLSCTX_ALL\n    #define CLSCTX_ALL  23\n    #endif\n\n    /* IUnknown is used by both the WASAPI and DirectSound backends. It easier to just declare our version here. */\n    typedef struct ma_IUnknown  ma_IUnknown;\n#endif\n\n#if !defined(MA_WIN32)\n#include <sched.h>\n#include <sys/time.h>   /* select() (used for ma_sleep()). */\n#include <pthread.h>\n#endif\n\n#ifdef MA_NX\n#include <time.h>       /* For nanosleep() */\n#endif\n\n#include <sys/stat.h>   /* For fstat(), etc. */\n\n#ifdef MA_EMSCRIPTEN\n#include <emscripten/emscripten.h>\n#endif\n\n\n/* Architecture Detection */\n#if !defined(MA_64BIT) && !defined(MA_32BIT)\n#ifdef _WIN32\n#ifdef _WIN64\n#define MA_64BIT\n#else\n#define MA_32BIT\n#endif\n#endif\n#endif\n\n#if !defined(MA_64BIT) && !defined(MA_32BIT)\n#ifdef __GNUC__\n#ifdef __LP64__\n#define MA_64BIT\n#else\n#define MA_32BIT\n#endif\n#endif\n#endif\n\n#if !defined(MA_64BIT) && !defined(MA_32BIT)\n#include <stdint.h>\n#if INTPTR_MAX == INT64_MAX\n#define MA_64BIT\n#else\n#define MA_32BIT\n#endif\n#endif\n\n#if defined(__arm__) || defined(_M_ARM)\n#define MA_ARM32\n#endif\n#if defined(__arm64) || defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64)\n#define MA_ARM64\n#endif\n\n#if defined(__x86_64__) || defined(_M_X64)\n#define MA_X64\n#elif defined(__i386) || defined(_M_IX86)\n#define MA_X86\n#elif defined(MA_ARM32) || defined(MA_ARM64)\n#define MA_ARM\n#endif\n\n/* Intrinsics Support */\n#if (defined(MA_X64) || defined(MA_X86)) && !defined(__COSMOPOLITAN__)\n    #if defined(_MSC_VER) && !defined(__clang__)\n        /* MSVC. */\n        #if _MSC_VER >= 1400 && !defined(MA_NO_SSE2)   /* 2005 */\n            #define MA_SUPPORT_SSE2\n        #endif\n        /*#if _MSC_VER >= 1600 && !defined(MA_NO_AVX)*/    /* 2010 */\n        /*    #define MA_SUPPORT_AVX*/\n        /*#endif*/\n        #if _MSC_VER >= 1700 && !defined(MA_NO_AVX2)   /* 2012 */\n            #define MA_SUPPORT_AVX2\n        #endif\n    #else\n        /* Assume GNUC-style. */\n        #if defined(__SSE2__) && !defined(MA_NO_SSE2)\n            #define MA_SUPPORT_SSE2\n        #endif\n        /*#if defined(__AVX__) && !defined(MA_NO_AVX)*/\n        /*    #define MA_SUPPORT_AVX*/\n        /*#endif*/\n        #if defined(__AVX2__) && !defined(MA_NO_AVX2)\n            #define MA_SUPPORT_AVX2\n        #endif\n    #endif\n\n    /* If at this point we still haven't determined compiler support for the intrinsics just fall back to __has_include. */\n    #if !defined(__GNUC__) && !defined(__clang__) && defined(__has_include)\n        #if !defined(MA_SUPPORT_SSE2)   && !defined(MA_NO_SSE2)   && __has_include(<emmintrin.h>)\n            #define MA_SUPPORT_SSE2\n        #endif\n        /*#if !defined(MA_SUPPORT_AVX)    && !defined(MA_NO_AVX)    && __has_include(<immintrin.h>)*/\n        /*    #define MA_SUPPORT_AVX*/\n        /*#endif*/\n        #if !defined(MA_SUPPORT_AVX2)   && !defined(MA_NO_AVX2)   && __has_include(<immintrin.h>)\n            #define MA_SUPPORT_AVX2\n        #endif\n    #endif\n\n    #if defined(MA_SUPPORT_AVX2) || defined(MA_SUPPORT_AVX)\n        #include <immintrin.h>\n    #elif defined(MA_SUPPORT_SSE2)\n        #include <emmintrin.h>\n    #endif\n#endif\n\n#if defined(MA_ARM)\n    #if !defined(MA_NO_NEON) && (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64))\n        #define MA_SUPPORT_NEON\n        #include <arm_neon.h>\n    #endif\n#endif\n\n/* Begin globally disabled warnings. */\n#if defined(_MSC_VER)\n    #pragma warning(push)\n    #pragma warning(disable:4752)   /* found Intel(R) Advanced Vector Extensions; consider using /arch:AVX */\n    #pragma warning(disable:4049)   /* compiler limit : terminating line number emission */\n#endif\n\n#if defined(MA_X64) || defined(MA_X86)\n    #if defined(_MSC_VER) && !defined(__clang__)\n        #if _MSC_VER >= 1400\n            #include <intrin.h>\n            static MA_INLINE void ma_cpuid(int info[4], int fid)\n            {\n                __cpuid(info, fid);\n            }\n        #else\n            #define MA_NO_CPUID\n        #endif\n\n        #if _MSC_VER >= 1600 && (defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040219)\n            static MA_INLINE unsigned __int64 ma_xgetbv(int reg)\n            {\n                return _xgetbv(reg);\n            }\n        #else\n            #define MA_NO_XGETBV\n        #endif\n    #elif (defined(__GNUC__) || defined(__clang__)) && !defined(MA_ANDROID)\n        static MA_INLINE void ma_cpuid(int info[4], int fid)\n        {\n            /*\n            It looks like the -fPIC option uses the ebx register which GCC complains about. We can work around this by just using a different register, the\n            specific register of which I'm letting the compiler decide on. The \"k\" prefix is used to specify a 32-bit register. The {...} syntax is for\n            supporting different assembly dialects.\n\n            What's basically happening is that we're saving and restoring the ebx register manually.\n            */\n            #if defined(MA_X86) && defined(__PIC__)\n                __asm__ __volatile__ (\n                    \"xchg{l} {%%}ebx, %k1;\"\n                    \"cpuid;\"\n                    \"xchg{l} {%%}ebx, %k1;\"\n                    : \"=a\"(info[0]), \"=&r\"(info[1]), \"=c\"(info[2]), \"=d\"(info[3]) : \"a\"(fid), \"c\"(0)\n                );\n            #else\n                __asm__ __volatile__ (\n                    \"cpuid\" : \"=a\"(info[0]), \"=b\"(info[1]), \"=c\"(info[2]), \"=d\"(info[3]) : \"a\"(fid), \"c\"(0)\n                );\n            #endif\n        }\n\n        static MA_INLINE ma_uint64 ma_xgetbv(int reg)\n        {\n            unsigned int hi;\n            unsigned int lo;\n\n            __asm__ __volatile__ (\n                \"xgetbv\" : \"=a\"(lo), \"=d\"(hi) : \"c\"(reg)\n            );\n\n            return ((ma_uint64)hi << 32) | (ma_uint64)lo;\n        }\n    #else\n        #define MA_NO_CPUID\n        #define MA_NO_XGETBV\n    #endif\n#else\n    #define MA_NO_CPUID\n    #define MA_NO_XGETBV\n#endif\n\nstatic MA_INLINE ma_bool32 ma_has_sse2(void)\n{\n#if defined(MA_SUPPORT_SSE2)\n    #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_NO_SSE2)\n        #if defined(MA_X64)\n            return MA_TRUE;    /* 64-bit targets always support SSE2. */\n        #elif (defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__)\n            return MA_TRUE;    /* If the compiler is allowed to freely generate SSE2 code we can assume support. */\n        #else\n            #if defined(MA_NO_CPUID)\n                return MA_FALSE;\n            #else\n                int info[4];\n                ma_cpuid(info, 1);\n                return (info[3] & (1 << 26)) != 0;\n            #endif\n        #endif\n    #else\n        return MA_FALSE;       /* SSE2 is only supported on x86 and x64 architectures. */\n    #endif\n#else\n    return MA_FALSE;           /* No compiler support. */\n#endif\n}\n\n#if 0\nstatic MA_INLINE ma_bool32 ma_has_avx()\n{\n#if defined(MA_SUPPORT_AVX)\n    #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_NO_AVX)\n        #if defined(_AVX_) || defined(__AVX__)\n            return MA_TRUE;    /* If the compiler is allowed to freely generate AVX code we can assume support. */\n        #else\n            /* AVX requires both CPU and OS support. */\n            #if defined(MA_NO_CPUID) || defined(MA_NO_XGETBV)\n                return MA_FALSE;\n            #else\n                int info[4];\n                ma_cpuid(info, 1);\n                if (((info[2] & (1 << 27)) != 0) && ((info[2] & (1 << 28)) != 0)) {\n                    ma_uint64 xrc = ma_xgetbv(0);\n                    if ((xrc & 0x06) == 0x06) {\n                        return MA_TRUE;\n                    } else {\n                        return MA_FALSE;\n                    }\n                } else {\n                    return MA_FALSE;\n                }\n            #endif\n        #endif\n    #else\n        return MA_FALSE;       /* AVX is only supported on x86 and x64 architectures. */\n    #endif\n#else\n    return MA_FALSE;           /* No compiler support. */\n#endif\n}\n#endif\n\nstatic MA_INLINE ma_bool32 ma_has_avx2(void)\n{\n#if defined(MA_SUPPORT_AVX2)\n    #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_NO_AVX2)\n        #if defined(_AVX2_) || defined(__AVX2__)\n            return MA_TRUE;    /* If the compiler is allowed to freely generate AVX2 code we can assume support. */\n        #else\n            /* AVX2 requires both CPU and OS support. */\n            #if defined(MA_NO_CPUID) || defined(MA_NO_XGETBV)\n                return MA_FALSE;\n            #else\n                int info1[4];\n                int info7[4];\n                ma_cpuid(info1, 1);\n                ma_cpuid(info7, 7);\n                if (((info1[2] & (1 << 27)) != 0) && ((info7[1] & (1 << 5)) != 0)) {\n                    ma_uint64 xrc = ma_xgetbv(0);\n                    if ((xrc & 0x06) == 0x06) {\n                        return MA_TRUE;\n                    } else {\n                        return MA_FALSE;\n                    }\n                } else {\n                    return MA_FALSE;\n                }\n            #endif\n        #endif\n    #else\n        return MA_FALSE;       /* AVX2 is only supported on x86 and x64 architectures. */\n    #endif\n#else\n    return MA_FALSE;           /* No compiler support. */\n#endif\n}\n\nstatic MA_INLINE ma_bool32 ma_has_neon(void)\n{\n#if defined(MA_SUPPORT_NEON)\n    #if defined(MA_ARM) && !defined(MA_NO_NEON)\n        #if (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64))\n            return MA_TRUE;    /* If the compiler is allowed to freely generate NEON code we can assume support. */\n        #else\n            /* TODO: Runtime check. */\n            return MA_FALSE;\n        #endif\n    #else\n        return MA_FALSE;       /* NEON is only supported on ARM architectures. */\n    #endif\n#else\n    return MA_FALSE;           /* No compiler support. */\n#endif\n}\n\n#if defined(__has_builtin)\n    #define MA_COMPILER_HAS_BUILTIN(x) __has_builtin(x)\n#else\n    #define MA_COMPILER_HAS_BUILTIN(x) 0\n#endif\n\n#ifndef MA_ASSUME\n    #if MA_COMPILER_HAS_BUILTIN(__builtin_assume)\n        #define MA_ASSUME(x) __builtin_assume(x)\n    #elif MA_COMPILER_HAS_BUILTIN(__builtin_unreachable)\n        #define MA_ASSUME(x) do { if (!(x)) __builtin_unreachable(); } while (0)\n    #elif defined(_MSC_VER)\n        #define MA_ASSUME(x) __assume(x)\n    #else\n        #define MA_ASSUME(x) (void)(x)\n    #endif\n#endif\n\n#ifndef MA_RESTRICT\n    #if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER)\n        #define MA_RESTRICT __restrict\n    #else\n        #define MA_RESTRICT\n    #endif\n#endif\n\n#if defined(_MSC_VER) && _MSC_VER >= 1400\n    #define MA_HAS_BYTESWAP16_INTRINSIC\n    #define MA_HAS_BYTESWAP32_INTRINSIC\n    #define MA_HAS_BYTESWAP64_INTRINSIC\n#elif defined(__clang__)\n    #if MA_COMPILER_HAS_BUILTIN(__builtin_bswap16)\n        #define MA_HAS_BYTESWAP16_INTRINSIC\n    #endif\n    #if MA_COMPILER_HAS_BUILTIN(__builtin_bswap32)\n        #define MA_HAS_BYTESWAP32_INTRINSIC\n    #endif\n    #if MA_COMPILER_HAS_BUILTIN(__builtin_bswap64)\n        #define MA_HAS_BYTESWAP64_INTRINSIC\n    #endif\n#elif defined(__GNUC__)\n    #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))\n        #define MA_HAS_BYTESWAP32_INTRINSIC\n        #define MA_HAS_BYTESWAP64_INTRINSIC\n    #endif\n    #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))\n        #define MA_HAS_BYTESWAP16_INTRINSIC\n    #endif\n#endif\n\n\nstatic MA_INLINE ma_bool32 ma_is_little_endian(void)\n{\n#if defined(MA_X86) || defined(MA_X64)\n    return MA_TRUE;\n#else\n    int n = 1;\n    return (*(char*)&n) == 1;\n#endif\n}\n\nstatic MA_INLINE ma_bool32 ma_is_big_endian(void)\n{\n    return !ma_is_little_endian();\n}\n\n\nstatic MA_INLINE ma_uint32 ma_swap_endian_uint32(ma_uint32 n)\n{\n#ifdef MA_HAS_BYTESWAP32_INTRINSIC\n    #if defined(_MSC_VER)\n        return _byteswap_ulong(n);\n    #elif defined(__GNUC__) || defined(__clang__)\n        #if defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 6) && !defined(MA_64BIT)   /* <-- 64-bit inline assembly has not been tested, so disabling for now. */\n            /* Inline assembly optimized implementation for ARM. In my testing, GCC does not generate optimized code with __builtin_bswap32(). */\n            ma_uint32 r;\n            __asm__ __volatile__ (\n            #if defined(MA_64BIT)\n                \"rev %w[out], %w[in]\" : [out]\"=r\"(r) : [in]\"r\"(n)   /* <-- This is untested. If someone in the community could test this, that would be appreciated! */\n            #else\n                \"rev %[out], %[in]\" : [out]\"=r\"(r) : [in]\"r\"(n)\n            #endif\n            );\n            return r;\n        #else\n            return __builtin_bswap32(n);\n        #endif\n    #else\n        #error \"This compiler does not support the byte swap intrinsic.\"\n    #endif\n#else\n    return ((n & 0xFF000000) >> 24) |\n           ((n & 0x00FF0000) >>  8) |\n           ((n & 0x0000FF00) <<  8) |\n           ((n & 0x000000FF) << 24);\n#endif\n}\n\n\n#if !defined(MA_EMSCRIPTEN)\n#ifdef MA_WIN32\nstatic void ma_sleep__win32(ma_uint32 milliseconds)\n{\n    Sleep((DWORD)milliseconds);\n}\n#endif\n#ifdef MA_POSIX\nstatic void ma_sleep__posix(ma_uint32 milliseconds)\n{\n#ifdef MA_EMSCRIPTEN\n    (void)milliseconds;\n    MA_ASSERT(MA_FALSE);  /* The Emscripten build should never sleep. */\n#else\n    #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L) || defined(MA_NX)\n        struct timespec ts;\n        ts.tv_sec  = milliseconds / 1000;\n        ts.tv_nsec = milliseconds % 1000 * 1000000;\n        nanosleep(&ts, NULL);\n    #else\n        struct timeval tv;\n        tv.tv_sec  = milliseconds / 1000;\n        tv.tv_usec = milliseconds % 1000 * 1000;\n        select(0, NULL, NULL, NULL, &tv);\n    #endif\n#endif\n}\n#endif\n\nstatic MA_INLINE void ma_sleep(ma_uint32 milliseconds)\n{\n#ifdef MA_WIN32\n    ma_sleep__win32(milliseconds);\n#endif\n#ifdef MA_POSIX\n    ma_sleep__posix(milliseconds);\n#endif\n}\n#endif\n\nstatic MA_INLINE void ma_yield(void)\n{\n#if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)\n    /* x86/x64 */\n    #if (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__DMC__)) && !defined(__clang__)\n        #if _MSC_VER >= 1400\n            _mm_pause();\n        #else\n            #if defined(__DMC__)\n                /* Digital Mars does not recognize the PAUSE opcode. Fall back to NOP. */\n                __asm nop;\n            #else\n                __asm pause;\n            #endif\n        #endif\n    #else\n        __asm__ __volatile__ (\"pause\");\n    #endif\n#elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(_M_ARM64) || (defined(_M_ARM) && _M_ARM >= 7) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__)\n    /* ARM */\n    #if defined(_MSC_VER)\n        /* Apparently there is a __yield() intrinsic that's compatible with ARM, but I cannot find documentation for it nor can I find where it's declared. */\n        __yield();\n    #else\n        __asm__ __volatile__ (\"yield\"); /* ARMv6K/ARMv6T2 and above. */\n    #endif\n#else\n    /* Unknown or unsupported architecture. No-op. */\n#endif\n}\n\n\n#define MA_MM_DENORMALS_ZERO_MASK   0x0040\n#define MA_MM_FLUSH_ZERO_MASK       0x8000\n\nstatic MA_INLINE unsigned int ma_disable_denormals(void)\n{\n    unsigned int prevState;\n\n    #if defined(_MSC_VER)\n    {\n        /*\n        Older versions of Visual Studio don't support the \"safe\" versions of _controlfp_s(). I don't\n        know which version of Visual Studio first added support for _controlfp_s(), but I do know\n        that VC6 lacks support. _MSC_VER = 1200 is VC6, but if you get compilation errors on older\n        versions of Visual Studio, let me know and I'll make the necessary adjustment.\n        */\n        #if _MSC_VER <= 1200\n        {\n            prevState = _statusfp();\n            _controlfp(prevState | _DN_FLUSH, _MCW_DN);\n        }\n        #else\n        {\n            unsigned int unused;\n            _controlfp_s(&prevState, 0, 0);\n            _controlfp_s(&unused, prevState | _DN_FLUSH, _MCW_DN);\n        }\n        #endif\n    }\n    #elif defined(MA_X86) || defined(MA_X64)\n    {\n        #if defined(__SSE2__) && !(defined(__TINYC__) || defined(__WATCOMC__) || defined(__COSMOPOLITAN__)) /* <-- Add compilers that lack support for _mm_getcsr() and _mm_setcsr() to this list. */\n        {\n            prevState = _mm_getcsr();\n            _mm_setcsr(prevState | MA_MM_DENORMALS_ZERO_MASK | MA_MM_FLUSH_ZERO_MASK);\n        }\n        #else\n        {\n            /* x88/64, but no support for _mm_getcsr()/_mm_setcsr(). May need to fall back to inlined assembly here. */\n            prevState = 0;\n        }\n        #endif\n    }\n    #else\n    {\n        /* Unknown or unsupported architecture. No-op. */\n        prevState = 0;\n    }\n    #endif\n\n    return prevState;\n}\n\nstatic MA_INLINE void ma_restore_denormals(unsigned int prevState)\n{\n    #if defined(_MSC_VER)\n    {\n        /* Older versions of Visual Studio do not support _controlfp_s(). See ma_disable_denormals(). */\n        #if _MSC_VER <= 1200\n        {\n            _controlfp(prevState, _MCW_DN);\n        }\n        #else\n        {\n            unsigned int unused;\n            _controlfp_s(&unused, prevState, _MCW_DN);\n        }\n        #endif\n    }\n    #elif defined(MA_X86) || defined(MA_X64)\n    {\n        #if defined(__SSE2__) && !(defined(__TINYC__) || defined(__WATCOMC__) || defined(__COSMOPOLITAN__))   /* <-- Add compilers that lack support for _mm_getcsr() and _mm_setcsr() to this list. */\n        {\n            _mm_setcsr(prevState);\n        }\n        #else\n        {\n            /* x88/64, but no support for _mm_getcsr()/_mm_setcsr(). May need to fall back to inlined assembly here. */\n            (void)prevState;\n        }\n        #endif\n    }\n    #else\n    {\n        /* Unknown or unsupported architecture. No-op. */\n        (void)prevState;\n    }\n    #endif\n}\n\n\n#ifdef MA_ANDROID\n#include <sys/system_properties.h>\n\nint ma_android_sdk_version()\n{\n    char sdkVersion[PROP_VALUE_MAX + 1] = {0, };\n    if (__system_property_get(\"ro.build.version.sdk\", sdkVersion)) {\n        return atoi(sdkVersion);\n    }\n\n    return 0;\n}\n#endif\n\n\n#ifndef MA_COINIT_VALUE\n#define MA_COINIT_VALUE    0   /* 0 = COINIT_MULTITHREADED */\n#endif\n\n\n#ifndef MA_FLT_MAX\n    #ifdef FLT_MAX\n        #define MA_FLT_MAX FLT_MAX\n    #else\n        #define MA_FLT_MAX 3.402823466e+38F\n    #endif\n#endif\n\n\n#ifndef MA_PI\n#define MA_PI      3.14159265358979323846264f\n#endif\n#ifndef MA_PI_D\n#define MA_PI_D    3.14159265358979323846264\n#endif\n#ifndef MA_TAU\n#define MA_TAU     6.28318530717958647693f\n#endif\n#ifndef MA_TAU_D\n#define MA_TAU_D   6.28318530717958647693\n#endif\n\n\n/* The default format when ma_format_unknown (0) is requested when initializing a device. */\n#ifndef MA_DEFAULT_FORMAT\n#define MA_DEFAULT_FORMAT                                   ma_format_f32\n#endif\n\n/* The default channel count to use when 0 is used when initializing a device. */\n#ifndef MA_DEFAULT_CHANNELS\n#define MA_DEFAULT_CHANNELS                                 2\n#endif\n\n/* The default sample rate to use when 0 is used when initializing a device. */\n#ifndef MA_DEFAULT_SAMPLE_RATE\n#define MA_DEFAULT_SAMPLE_RATE                              48000\n#endif\n\n/* Default periods when none is specified in ma_device_init(). More periods means more work on the CPU. */\n#ifndef MA_DEFAULT_PERIODS\n#define MA_DEFAULT_PERIODS                                  3\n#endif\n\n/* The default period size in milliseconds for low latency mode. */\n#ifndef MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY\n#define MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY  10\n#endif\n\n/* The default buffer size in milliseconds for conservative mode. */\n#ifndef MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE\n#define MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE 100\n#endif\n\n/* The default LPF filter order for linear resampling. Note that this is clamped to MA_MAX_FILTER_ORDER. */\n#ifndef MA_DEFAULT_RESAMPLER_LPF_ORDER\n    #if MA_MAX_FILTER_ORDER >= 4\n        #define MA_DEFAULT_RESAMPLER_LPF_ORDER  4\n    #else\n        #define MA_DEFAULT_RESAMPLER_LPF_ORDER  MA_MAX_FILTER_ORDER\n    #endif\n#endif\n\n\n#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))\n    #pragma GCC diagnostic push\n    #pragma GCC diagnostic ignored \"-Wunused-variable\"\n#endif\n\n/* Standard sample rates, in order of priority. */\nstatic ma_uint32 g_maStandardSampleRatePriorities[] = {\n    (ma_uint32)ma_standard_sample_rate_48000,\n    (ma_uint32)ma_standard_sample_rate_44100,\n\n    (ma_uint32)ma_standard_sample_rate_32000,\n    (ma_uint32)ma_standard_sample_rate_24000,\n    (ma_uint32)ma_standard_sample_rate_22050,\n\n    (ma_uint32)ma_standard_sample_rate_88200,\n    (ma_uint32)ma_standard_sample_rate_96000,\n    (ma_uint32)ma_standard_sample_rate_176400,\n    (ma_uint32)ma_standard_sample_rate_192000,\n\n    (ma_uint32)ma_standard_sample_rate_16000,\n    (ma_uint32)ma_standard_sample_rate_11025,\n    (ma_uint32)ma_standard_sample_rate_8000,\n\n    (ma_uint32)ma_standard_sample_rate_352800,\n    (ma_uint32)ma_standard_sample_rate_384000\n};\n\nstatic MA_INLINE ma_bool32 ma_is_standard_sample_rate(ma_uint32 sampleRate)\n{\n    ma_uint32 iSampleRate;\n\n    for (iSampleRate = 0; iSampleRate < sizeof(g_maStandardSampleRatePriorities) / sizeof(g_maStandardSampleRatePriorities[0]); iSampleRate += 1) {\n        if (g_maStandardSampleRatePriorities[iSampleRate] == sampleRate) {\n            return MA_TRUE;\n        }\n    }\n\n    /* Getting here means the sample rate is not supported. */\n    return MA_FALSE;\n}\n\n\nstatic ma_format g_maFormatPriorities[] = {\n    ma_format_s16,         /* Most common */\n    ma_format_f32,\n\n    /*ma_format_s24_32,*/    /* Clean alignment */\n    ma_format_s32,\n\n    ma_format_s24,         /* Unclean alignment */\n\n    ma_format_u8           /* Low quality */\n};\n#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))\n    #pragma GCC diagnostic pop\n#endif\n\n\nMA_API void ma_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision)\n{\n    if (pMajor) {\n        *pMajor = MA_VERSION_MAJOR;\n    }\n\n    if (pMinor) {\n        *pMinor = MA_VERSION_MINOR;\n    }\n\n    if (pRevision) {\n        *pRevision = MA_VERSION_REVISION;\n    }\n}\n\nMA_API const char* ma_version_string(void)\n{\n    return MA_VERSION_STRING;\n}\n\n\n/******************************************************************************\n\nStandard Library Stuff\n\n******************************************************************************/\n#ifndef MA_ASSERT\n#define MA_ASSERT(condition)            assert(condition)\n#endif\n\n#ifndef MA_MALLOC\n#define MA_MALLOC(sz)                   malloc((sz))\n#endif\n#ifndef MA_REALLOC\n#define MA_REALLOC(p, sz)               realloc((p), (sz))\n#endif\n#ifndef MA_FREE\n#define MA_FREE(p)                      free((p))\n#endif\n\nstatic MA_INLINE void ma_zero_memory_default(void* p, size_t sz)\n{\n    if (p == NULL) {\n        MA_ASSERT(sz == 0); /* If this is triggered there's an error with the calling code. */\n        return;\n    }\n\n    if (sz > 0) {\n        memset(p, 0, sz);\n    }\n}\n\n\n#ifndef MA_ZERO_MEMORY\n#define MA_ZERO_MEMORY(p, sz)           ma_zero_memory_default((p), (sz))\n#endif\n#ifndef MA_COPY_MEMORY\n#define MA_COPY_MEMORY(dst, src, sz)    memcpy((dst), (src), (sz))\n#endif\n#ifndef MA_MOVE_MEMORY\n#define MA_MOVE_MEMORY(dst, src, sz)    memmove((dst), (src), (sz))\n#endif\n\n#define MA_ZERO_OBJECT(p)               MA_ZERO_MEMORY((p), sizeof(*(p)))\n\n#define ma_countof(x)                   (sizeof(x) / sizeof(x[0]))\n#define ma_max(x, y)                    (((x) > (y)) ? (x) : (y))\n#define ma_min(x, y)                    (((x) < (y)) ? (x) : (y))\n#define ma_abs(x)                       (((x) > 0) ? (x) : -(x))\n#define ma_clamp(x, lo, hi)             (ma_max(lo, ma_min(x, hi)))\n#define ma_offset_ptr(p, offset)        (((ma_uint8*)(p)) + (offset))\n#define ma_align(x, a)                  (((x) + ((a)-1)) & ~((a)-1))\n#define ma_align_64(x)                  ma_align(x, 8)\n\n#define ma_buffer_frame_capacity(buffer, channels, format) (sizeof(buffer) / ma_get_bytes_per_sample(format) / (channels))\n\nstatic MA_INLINE double ma_sind(double x)\n{\n    /* TODO: Implement custom sin(x). */\n    return sin(x);\n}\n\nstatic MA_INLINE double ma_expd(double x)\n{\n    /* TODO: Implement custom exp(x). */\n    return exp(x);\n}\n\nstatic MA_INLINE double ma_logd(double x)\n{\n    /* TODO: Implement custom log(x). */\n    return log(x);\n}\n\nstatic MA_INLINE double ma_powd(double x, double y)\n{\n    /* TODO: Implement custom pow(x, y). */\n    return pow(x, y);\n}\n\nstatic MA_INLINE double ma_sqrtd(double x)\n{\n    /* TODO: Implement custom sqrt(x). */\n    return sqrt(x);\n}\n\n\nstatic MA_INLINE float ma_rsqrtf(float x)\n{\n    #if defined(MA_SUPPORT_SSE2) && !defined(MA_NO_SSE2) && (defined(MA_X64) || (defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__))\n    {\n        /*\n        For SSE we can use RSQRTSS.\n\n        This Stack Overflow post suggests that compilers don't necessarily generate optimal code\n        when using intrinsics:\n\n            https://web.archive.org/web/20221211012522/https://stackoverflow.com/questions/32687079/getting-fewest-instructions-for-rsqrtss-wrapper\n\n        I'm going to do something similar here, but a bit simpler.\n        */\n        #if defined(__GNUC__) || defined(__clang__)\n        {\n            float result;\n            __asm__ __volatile__(\"rsqrtss %1, %0\" : \"=x\"(result) : \"x\"(x));\n            return result;\n        }\n        #else\n        {\n            return _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ps1(x)));\n        }\n        #endif\n    }\n    #else\n    {\n        return 1 / (float)ma_sqrtd(x);\n    }\n    #endif\n}\n\n\nstatic MA_INLINE float ma_sinf(float x)\n{\n    return (float)ma_sind((float)x);\n}\n\nstatic MA_INLINE double ma_cosd(double x)\n{\n    return ma_sind((MA_PI_D*0.5) - x);\n}\n\nstatic MA_INLINE float ma_cosf(float x)\n{\n    return (float)ma_cosd((float)x);\n}\n\nstatic MA_INLINE double ma_log10d(double x)\n{\n    return ma_logd(x) * 0.43429448190325182765;\n}\n\nstatic MA_INLINE float ma_powf(float x, float y)\n{\n    return (float)ma_powd((double)x, (double)y);\n}\n\nstatic MA_INLINE float ma_log10f(float x)\n{\n    return (float)ma_log10d((double)x);\n}\n\n\nstatic MA_INLINE double ma_degrees_to_radians(double degrees)\n{\n    return degrees * 0.01745329252;\n}\n\nstatic MA_INLINE double ma_radians_to_degrees(double radians)\n{\n    return radians * 57.295779512896;\n}\n\nstatic MA_INLINE float ma_degrees_to_radians_f(float degrees)\n{\n    return degrees * 0.01745329252f;\n}\n\nstatic MA_INLINE float ma_radians_to_degrees_f(float radians)\n{\n    return radians * 57.295779512896f;\n}\n\n\n/*\nReturn Values:\n  0:  Success\n  22: EINVAL\n  34: ERANGE\n\nNot using symbolic constants for errors because I want to avoid #including errno.h\n\nThese are marked as no-inline because of some bad code generation by Clang. None of these functions\nare used in any performance-critical code within miniaudio.\n*/\nMA_API MA_NO_INLINE int ma_strcpy_s(char* dst, size_t dstSizeInBytes, const char* src)\n{\n    size_t i;\n\n    if (dst == 0) {\n        return 22;\n    }\n    if (dstSizeInBytes == 0) {\n        return 34;\n    }\n    if (src == 0) {\n        dst[0] = '\\0';\n        return 22;\n    }\n\n    for (i = 0; i < dstSizeInBytes && src[i] != '\\0'; ++i) {\n        dst[i] = src[i];\n    }\n\n    if (i < dstSizeInBytes) {\n        dst[i] = '\\0';\n        return 0;\n    }\n\n    dst[0] = '\\0';\n    return 34;\n}\n\nMA_API MA_NO_INLINE int ma_wcscpy_s(wchar_t* dst, size_t dstCap, const wchar_t* src)\n{\n    size_t i;\n\n    if (dst == 0) {\n        return 22;\n    }\n    if (dstCap == 0) {\n        return 34;\n    }\n    if (src == 0) {\n        dst[0] = '\\0';\n        return 22;\n    }\n\n    for (i = 0; i < dstCap && src[i] != '\\0'; ++i) {\n        dst[i] = src[i];\n    }\n\n    if (i < dstCap) {\n        dst[i] = '\\0';\n        return 0;\n    }\n\n    dst[0] = '\\0';\n    return 34;\n}\n\n\nMA_API MA_NO_INLINE int ma_strncpy_s(char* dst, size_t dstSizeInBytes, const char* src, size_t count)\n{\n    size_t maxcount;\n    size_t i;\n\n    if (dst == 0) {\n        return 22;\n    }\n    if (dstSizeInBytes == 0) {\n        return 34;\n    }\n    if (src == 0) {\n        dst[0] = '\\0';\n        return 22;\n    }\n\n    maxcount = count;\n    if (count == ((size_t)-1) || count >= dstSizeInBytes) {        /* -1 = _TRUNCATE */\n        maxcount = dstSizeInBytes - 1;\n    }\n\n    for (i = 0; i < maxcount && src[i] != '\\0'; ++i) {\n        dst[i] = src[i];\n    }\n\n    if (src[i] == '\\0' || i == count || count == ((size_t)-1)) {\n        dst[i] = '\\0';\n        return 0;\n    }\n\n    dst[0] = '\\0';\n    return 34;\n}\n\nMA_API MA_NO_INLINE int ma_strcat_s(char* dst, size_t dstSizeInBytes, const char* src)\n{\n    char* dstorig;\n\n    if (dst == 0) {\n        return 22;\n    }\n    if (dstSizeInBytes == 0) {\n        return 34;\n    }\n    if (src == 0) {\n        dst[0] = '\\0';\n        return 22;\n    }\n\n    dstorig = dst;\n\n    while (dstSizeInBytes > 0 && dst[0] != '\\0') {\n        dst += 1;\n        dstSizeInBytes -= 1;\n    }\n\n    if (dstSizeInBytes == 0) {\n        return 22;  /* Unterminated. */\n    }\n\n\n    while (dstSizeInBytes > 0 && src[0] != '\\0') {\n        *dst++ = *src++;\n        dstSizeInBytes -= 1;\n    }\n\n    if (dstSizeInBytes > 0) {\n        dst[0] = '\\0';\n    } else {\n        dstorig[0] = '\\0';\n        return 34;\n    }\n\n    return 0;\n}\n\nMA_API MA_NO_INLINE int ma_strncat_s(char* dst, size_t dstSizeInBytes, const char* src, size_t count)\n{\n    char* dstorig;\n\n    if (dst == 0) {\n        return 22;\n    }\n    if (dstSizeInBytes == 0) {\n        return 34;\n    }\n    if (src == 0) {\n        return 22;\n    }\n\n    dstorig = dst;\n\n    while (dstSizeInBytes > 0 && dst[0] != '\\0') {\n        dst += 1;\n        dstSizeInBytes -= 1;\n    }\n\n    if (dstSizeInBytes == 0) {\n        return 22;  /* Unterminated. */\n    }\n\n\n    if (count == ((size_t)-1)) {        /* _TRUNCATE */\n        count = dstSizeInBytes - 1;\n    }\n\n    while (dstSizeInBytes > 0 && src[0] != '\\0' && count > 0) {\n        *dst++ = *src++;\n        dstSizeInBytes -= 1;\n        count -= 1;\n    }\n\n    if (dstSizeInBytes > 0) {\n        dst[0] = '\\0';\n    } else {\n        dstorig[0] = '\\0';\n        return 34;\n    }\n\n    return 0;\n}\n\nMA_API MA_NO_INLINE int ma_itoa_s(int value, char* dst, size_t dstSizeInBytes, int radix)\n{\n    int sign;\n    unsigned int valueU;\n    char* dstEnd;\n\n    if (dst == NULL || dstSizeInBytes == 0) {\n        return 22;\n    }\n    if (radix < 2 || radix > 36) {\n        dst[0] = '\\0';\n        return 22;\n    }\n\n    sign = (value < 0 && radix == 10) ? -1 : 1;     /* The negative sign is only used when the base is 10. */\n\n    if (value < 0) {\n        valueU = -value;\n    } else {\n        valueU = value;\n    }\n\n    dstEnd = dst;\n    do\n    {\n        int remainder = valueU % radix;\n        if (remainder > 9) {\n            *dstEnd = (char)((remainder - 10) + 'a');\n        } else {\n            *dstEnd = (char)(remainder + '0');\n        }\n\n        dstEnd += 1;\n        dstSizeInBytes -= 1;\n        valueU /= radix;\n    } while (dstSizeInBytes > 0 && valueU > 0);\n\n    if (dstSizeInBytes == 0) {\n        dst[0] = '\\0';\n        return 22;  /* Ran out of room in the output buffer. */\n    }\n\n    if (sign < 0) {\n        *dstEnd++ = '-';\n        dstSizeInBytes -= 1;\n    }\n\n    if (dstSizeInBytes == 0) {\n        dst[0] = '\\0';\n        return 22;  /* Ran out of room in the output buffer. */\n    }\n\n    *dstEnd = '\\0';\n\n\n    /* At this point the string will be reversed. */\n    dstEnd -= 1;\n    while (dst < dstEnd) {\n        char temp = *dst;\n        *dst = *dstEnd;\n        *dstEnd = temp;\n\n        dst += 1;\n        dstEnd -= 1;\n    }\n\n    return 0;\n}\n\nMA_API MA_NO_INLINE int ma_strcmp(const char* str1, const char* str2)\n{\n    if (str1 == str2) return  0;\n\n    /* These checks differ from the standard implementation. It's not important, but I prefer it just for sanity. */\n    if (str1 == NULL) return -1;\n    if (str2 == NULL) return  1;\n\n    for (;;) {\n        if (str1[0] == '\\0') {\n            break;\n        }\n        if (str1[0] != str2[0]) {\n            break;\n        }\n\n        str1 += 1;\n        str2 += 1;\n    }\n\n    return ((unsigned char*)str1)[0] - ((unsigned char*)str2)[0];\n}\n\nMA_API MA_NO_INLINE int ma_strappend(char* dst, size_t dstSize, const char* srcA, const char* srcB)\n{\n    int result;\n\n    result = ma_strncpy_s(dst, dstSize, srcA, (size_t)-1);\n    if (result != 0) {\n        return result;\n    }\n\n    result = ma_strncat_s(dst, dstSize, srcB, (size_t)-1);\n    if (result != 0) {\n        return result;\n    }\n\n    return result;\n}\n\nMA_API MA_NO_INLINE char* ma_copy_string(const char* src, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    size_t sz;\n    char* dst;\n\n    if (src == NULL) {\n        return NULL;\n    }\n\n    sz = strlen(src)+1;\n    dst = (char*)ma_malloc(sz, pAllocationCallbacks);\n    if (dst == NULL) {\n        return NULL;\n    }\n\n    ma_strcpy_s(dst, sz, src);\n\n    return dst;\n}\n\nMA_API MA_NO_INLINE wchar_t* ma_copy_string_w(const wchar_t* src, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    size_t sz = wcslen(src)+1;\n    wchar_t* dst = (wchar_t*)ma_malloc(sz * sizeof(*dst), pAllocationCallbacks);\n    if (dst == NULL) {\n        return NULL;\n    }\n\n    ma_wcscpy_s(dst, sz, src);\n\n    return dst;\n}\n\n\n\n#include <errno.h>\nstatic ma_result ma_result_from_errno(int e)\n{\n    if (e == 0) {\n        return MA_SUCCESS;\n    }\n#ifdef EPERM\n    else if (e == EPERM) { return MA_INVALID_OPERATION; }\n#endif\n#ifdef ENOENT\n    else if (e == ENOENT) { return MA_DOES_NOT_EXIST; }\n#endif\n#ifdef ESRCH\n    else if (e == ESRCH) { return MA_DOES_NOT_EXIST; }\n#endif\n#ifdef EINTR\n    else if (e == EINTR) { return MA_INTERRUPT; }\n#endif\n#ifdef EIO\n    else if (e == EIO) { return MA_IO_ERROR; }\n#endif\n#ifdef ENXIO\n    else if (e == ENXIO) { return MA_DOES_NOT_EXIST; }\n#endif\n#ifdef E2BIG\n    else if (e == E2BIG) { return MA_INVALID_ARGS; }\n#endif\n#ifdef ENOEXEC\n    else if (e == ENOEXEC) { return MA_INVALID_FILE; }\n#endif\n#ifdef EBADF\n    else if (e == EBADF) { return MA_INVALID_FILE; }\n#endif\n#ifdef ECHILD\n    else if (e == ECHILD) { return MA_ERROR; }\n#endif\n#ifdef EAGAIN\n    else if (e == EAGAIN) { return MA_UNAVAILABLE; }\n#endif\n#ifdef ENOMEM\n    else if (e == ENOMEM) { return MA_OUT_OF_MEMORY; }\n#endif\n#ifdef EACCES\n    else if (e == EACCES) { return MA_ACCESS_DENIED; }\n#endif\n#ifdef EFAULT\n    else if (e == EFAULT) { return MA_BAD_ADDRESS; }\n#endif\n#ifdef ENOTBLK\n    else if (e == ENOTBLK) { return MA_ERROR; }\n#endif\n#ifdef EBUSY\n    else if (e == EBUSY) { return MA_BUSY; }\n#endif\n#ifdef EEXIST\n    else if (e == EEXIST) { return MA_ALREADY_EXISTS; }\n#endif\n#ifdef EXDEV\n    else if (e == EXDEV) { return MA_ERROR; }\n#endif\n#ifdef ENODEV\n    else if (e == ENODEV) { return MA_DOES_NOT_EXIST; }\n#endif\n#ifdef ENOTDIR\n    else if (e == ENOTDIR) { return MA_NOT_DIRECTORY; }\n#endif\n#ifdef EISDIR\n    else if (e == EISDIR) { return MA_IS_DIRECTORY; }\n#endif\n#ifdef EINVAL\n    else if (e == EINVAL) { return MA_INVALID_ARGS; }\n#endif\n#ifdef ENFILE\n    else if (e == ENFILE) { return MA_TOO_MANY_OPEN_FILES; }\n#endif\n#ifdef EMFILE\n    else if (e == EMFILE) { return MA_TOO_MANY_OPEN_FILES; }\n#endif\n#ifdef ENOTTY\n    else if (e == ENOTTY) { return MA_INVALID_OPERATION; }\n#endif\n#ifdef ETXTBSY\n    else if (e == ETXTBSY) { return MA_BUSY; }\n#endif\n#ifdef EFBIG\n    else if (e == EFBIG) { return MA_TOO_BIG; }\n#endif\n#ifdef ENOSPC\n    else if (e == ENOSPC) { return MA_NO_SPACE; }\n#endif\n#ifdef ESPIPE\n    else if (e == ESPIPE) { return MA_BAD_SEEK; }\n#endif\n#ifdef EROFS\n    else if (e == EROFS) { return MA_ACCESS_DENIED; }\n#endif\n#ifdef EMLINK\n    else if (e == EMLINK) { return MA_TOO_MANY_LINKS; }\n#endif\n#ifdef EPIPE\n    else if (e == EPIPE) { return MA_BAD_PIPE; }\n#endif\n#ifdef EDOM\n    else if (e == EDOM) { return MA_OUT_OF_RANGE; }\n#endif\n#ifdef ERANGE\n    else if (e == ERANGE) { return MA_OUT_OF_RANGE; }\n#endif\n#ifdef EDEADLK\n    else if (e == EDEADLK) { return MA_DEADLOCK; }\n#endif\n#ifdef ENAMETOOLONG\n    else if (e == ENAMETOOLONG) { return MA_PATH_TOO_LONG; }\n#endif\n#ifdef ENOLCK\n    else if (e == ENOLCK) { return MA_ERROR; }\n#endif\n#ifdef ENOSYS\n    else if (e == ENOSYS) { return MA_NOT_IMPLEMENTED; }\n#endif\n#ifdef ENOTEMPTY\n    else if (e == ENOTEMPTY) { return MA_DIRECTORY_NOT_EMPTY; }\n#endif\n#ifdef ELOOP\n    else if (e == ELOOP) { return MA_TOO_MANY_LINKS; }\n#endif\n#ifdef ENOMSG\n    else if (e == ENOMSG) { return MA_NO_MESSAGE; }\n#endif\n#ifdef EIDRM\n    else if (e == EIDRM) { return MA_ERROR; }\n#endif\n#ifdef ECHRNG\n    else if (e == ECHRNG) { return MA_ERROR; }\n#endif\n#ifdef EL2NSYNC\n    else if (e == EL2NSYNC) { return MA_ERROR; }\n#endif\n#ifdef EL3HLT\n    else if (e == EL3HLT) { return MA_ERROR; }\n#endif\n#ifdef EL3RST\n    else if (e == EL3RST) { return MA_ERROR; }\n#endif\n#ifdef ELNRNG\n    else if (e == ELNRNG) { return MA_OUT_OF_RANGE; }\n#endif\n#ifdef EUNATCH\n    else if (e == EUNATCH) { return MA_ERROR; }\n#endif\n#ifdef ENOCSI\n    else if (e == ENOCSI) { return MA_ERROR; }\n#endif\n#ifdef EL2HLT\n    else if (e == EL2HLT) { return MA_ERROR; }\n#endif\n#ifdef EBADE\n    else if (e == EBADE) { return MA_ERROR; }\n#endif\n#ifdef EBADR\n    else if (e == EBADR) { return MA_ERROR; }\n#endif\n#ifdef EXFULL\n    else if (e == EXFULL) { return MA_ERROR; }\n#endif\n#ifdef ENOANO\n    else if (e == ENOANO) { return MA_ERROR; }\n#endif\n#ifdef EBADRQC\n    else if (e == EBADRQC) { return MA_ERROR; }\n#endif\n#ifdef EBADSLT\n    else if (e == EBADSLT) { return MA_ERROR; }\n#endif\n#ifdef EBFONT\n    else if (e == EBFONT) { return MA_INVALID_FILE; }\n#endif\n#ifdef ENOSTR\n    else if (e == ENOSTR) { return MA_ERROR; }\n#endif\n#ifdef ENODATA\n    else if (e == ENODATA) { return MA_NO_DATA_AVAILABLE; }\n#endif\n#ifdef ETIME\n    else if (e == ETIME) { return MA_TIMEOUT; }\n#endif\n#ifdef ENOSR\n    else if (e == ENOSR) { return MA_NO_DATA_AVAILABLE; }\n#endif\n#ifdef ENONET\n    else if (e == ENONET) { return MA_NO_NETWORK; }\n#endif\n#ifdef ENOPKG\n    else if (e == ENOPKG) { return MA_ERROR; }\n#endif\n#ifdef EREMOTE\n    else if (e == EREMOTE) { return MA_ERROR; }\n#endif\n#ifdef ENOLINK\n    else if (e == ENOLINK) { return MA_ERROR; }\n#endif\n#ifdef EADV\n    else if (e == EADV) { return MA_ERROR; }\n#endif\n#ifdef ESRMNT\n    else if (e == ESRMNT) { return MA_ERROR; }\n#endif\n#ifdef ECOMM\n    else if (e == ECOMM) { return MA_ERROR; }\n#endif\n#ifdef EPROTO\n    else if (e == EPROTO) { return MA_ERROR; }\n#endif\n#ifdef EMULTIHOP\n    else if (e == EMULTIHOP) { return MA_ERROR; }\n#endif\n#ifdef EDOTDOT\n    else if (e == EDOTDOT) { return MA_ERROR; }\n#endif\n#ifdef EBADMSG\n    else if (e == EBADMSG) { return MA_BAD_MESSAGE; }\n#endif\n#ifdef EOVERFLOW\n    else if (e == EOVERFLOW) { return MA_TOO_BIG; }\n#endif\n#ifdef ENOTUNIQ\n    else if (e == ENOTUNIQ) { return MA_NOT_UNIQUE; }\n#endif\n#ifdef EBADFD\n    else if (e == EBADFD) { return MA_ERROR; }\n#endif\n#ifdef EREMCHG\n    else if (e == EREMCHG) { return MA_ERROR; }\n#endif\n#ifdef ELIBACC\n    else if (e == ELIBACC) { return MA_ACCESS_DENIED; }\n#endif\n#ifdef ELIBBAD\n    else if (e == ELIBBAD) { return MA_INVALID_FILE; }\n#endif\n#ifdef ELIBSCN\n    else if (e == ELIBSCN) { return MA_INVALID_FILE; }\n#endif\n#ifdef ELIBMAX\n    else if (e == ELIBMAX) { return MA_ERROR; }\n#endif\n#ifdef ELIBEXEC\n    else if (e == ELIBEXEC) { return MA_ERROR; }\n#endif\n#ifdef EILSEQ\n    else if (e == EILSEQ) { return MA_INVALID_DATA; }\n#endif\n#ifdef ERESTART\n    else if (e == ERESTART) { return MA_ERROR; }\n#endif\n#ifdef ESTRPIPE\n    else if (e == ESTRPIPE) { return MA_ERROR; }\n#endif\n#ifdef EUSERS\n    else if (e == EUSERS) { return MA_ERROR; }\n#endif\n#ifdef ENOTSOCK\n    else if (e == ENOTSOCK) { return MA_NOT_SOCKET; }\n#endif\n#ifdef EDESTADDRREQ\n    else if (e == EDESTADDRREQ) { return MA_NO_ADDRESS; }\n#endif\n#ifdef EMSGSIZE\n    else if (e == EMSGSIZE) { return MA_TOO_BIG; }\n#endif\n#ifdef EPROTOTYPE\n    else if (e == EPROTOTYPE) { return MA_BAD_PROTOCOL; }\n#endif\n#ifdef ENOPROTOOPT\n    else if (e == ENOPROTOOPT) { return MA_PROTOCOL_UNAVAILABLE; }\n#endif\n#ifdef EPROTONOSUPPORT\n    else if (e == EPROTONOSUPPORT) { return MA_PROTOCOL_NOT_SUPPORTED; }\n#endif\n#ifdef ESOCKTNOSUPPORT\n    else if (e == ESOCKTNOSUPPORT) { return MA_SOCKET_NOT_SUPPORTED; }\n#endif\n#ifdef EOPNOTSUPP\n    else if (e == EOPNOTSUPP) { return MA_INVALID_OPERATION; }\n#endif\n#ifdef EPFNOSUPPORT\n    else if (e == EPFNOSUPPORT) { return MA_PROTOCOL_FAMILY_NOT_SUPPORTED; }\n#endif\n#ifdef EAFNOSUPPORT\n    else if (e == EAFNOSUPPORT) { return MA_ADDRESS_FAMILY_NOT_SUPPORTED; }\n#endif\n#ifdef EADDRINUSE\n    else if (e == EADDRINUSE) { return MA_ALREADY_IN_USE; }\n#endif\n#ifdef EADDRNOTAVAIL\n    else if (e == EADDRNOTAVAIL) { return MA_ERROR; }\n#endif\n#ifdef ENETDOWN\n    else if (e == ENETDOWN) { return MA_NO_NETWORK; }\n#endif\n#ifdef ENETUNREACH\n    else if (e == ENETUNREACH) { return MA_NO_NETWORK; }\n#endif\n#ifdef ENETRESET\n    else if (e == ENETRESET) { return MA_NO_NETWORK; }\n#endif\n#ifdef ECONNABORTED\n    else if (e == ECONNABORTED) { return MA_NO_NETWORK; }\n#endif\n#ifdef ECONNRESET\n    else if (e == ECONNRESET) { return MA_CONNECTION_RESET; }\n#endif\n#ifdef ENOBUFS\n    else if (e == ENOBUFS) { return MA_NO_SPACE; }\n#endif\n#ifdef EISCONN\n    else if (e == EISCONN) { return MA_ALREADY_CONNECTED; }\n#endif\n#ifdef ENOTCONN\n    else if (e == ENOTCONN) { return MA_NOT_CONNECTED; }\n#endif\n#ifdef ESHUTDOWN\n    else if (e == ESHUTDOWN) { return MA_ERROR; }\n#endif\n#ifdef ETOOMANYREFS\n    else if (e == ETOOMANYREFS) { return MA_ERROR; }\n#endif\n#ifdef ETIMEDOUT\n    else if (e == ETIMEDOUT) { return MA_TIMEOUT; }\n#endif\n#ifdef ECONNREFUSED\n    else if (e == ECONNREFUSED) { return MA_CONNECTION_REFUSED; }\n#endif\n#ifdef EHOSTDOWN\n    else if (e == EHOSTDOWN) { return MA_NO_HOST; }\n#endif\n#ifdef EHOSTUNREACH\n    else if (e == EHOSTUNREACH) { return MA_NO_HOST; }\n#endif\n#ifdef EALREADY\n    else if (e == EALREADY) { return MA_IN_PROGRESS; }\n#endif\n#ifdef EINPROGRESS\n    else if (e == EINPROGRESS) { return MA_IN_PROGRESS; }\n#endif\n#ifdef ESTALE\n    else if (e == ESTALE) { return MA_INVALID_FILE; }\n#endif\n#ifdef EUCLEAN\n    else if (e == EUCLEAN) { return MA_ERROR; }\n#endif\n#ifdef ENOTNAM\n    else if (e == ENOTNAM) { return MA_ERROR; }\n#endif\n#ifdef ENAVAIL\n    else if (e == ENAVAIL) { return MA_ERROR; }\n#endif\n#ifdef EISNAM\n    else if (e == EISNAM) { return MA_ERROR; }\n#endif\n#ifdef EREMOTEIO\n    else if (e == EREMOTEIO) { return MA_IO_ERROR; }\n#endif\n#ifdef EDQUOT\n    else if (e == EDQUOT) { return MA_NO_SPACE; }\n#endif\n#ifdef ENOMEDIUM\n    else if (e == ENOMEDIUM) { return MA_DOES_NOT_EXIST; }\n#endif\n#ifdef EMEDIUMTYPE\n    else if (e == EMEDIUMTYPE) { return MA_ERROR; }\n#endif\n#ifdef ECANCELED\n    else if (e == ECANCELED) { return MA_CANCELLED; }\n#endif\n#ifdef ENOKEY\n    else if (e == ENOKEY) { return MA_ERROR; }\n#endif\n#ifdef EKEYEXPIRED\n    else if (e == EKEYEXPIRED) { return MA_ERROR; }\n#endif\n#ifdef EKEYREVOKED\n    else if (e == EKEYREVOKED) { return MA_ERROR; }\n#endif\n#ifdef EKEYREJECTED\n    else if (e == EKEYREJECTED) { return MA_ERROR; }\n#endif\n#ifdef EOWNERDEAD\n    else if (e == EOWNERDEAD) { return MA_ERROR; }\n#endif\n#ifdef ENOTRECOVERABLE\n    else if (e == ENOTRECOVERABLE) { return MA_ERROR; }\n#endif\n#ifdef ERFKILL\n    else if (e == ERFKILL) { return MA_ERROR; }\n#endif\n#ifdef EHWPOISON\n    else if (e == EHWPOISON) { return MA_ERROR; }\n#endif\n    else {\n        return MA_ERROR;\n    }\n}\n\nMA_API ma_result ma_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode)\n{\n#if defined(_MSC_VER) && _MSC_VER >= 1400\n    errno_t err;\n#endif\n\n    if (ppFile != NULL) {\n        *ppFile = NULL;  /* Safety. */\n    }\n\n    if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(_MSC_VER) && _MSC_VER >= 1400\n    err = fopen_s(ppFile, pFilePath, pOpenMode);\n    if (err != 0) {\n        return ma_result_from_errno(err);\n    }\n#else\n#if defined(_WIN32) || defined(__APPLE__)\n    *ppFile = fopen(pFilePath, pOpenMode);\n#else\n    #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && defined(_LARGEFILE64_SOURCE)\n        *ppFile = fopen64(pFilePath, pOpenMode);\n    #else\n        *ppFile = fopen(pFilePath, pOpenMode);\n    #endif\n#endif\n    if (*ppFile == NULL) {\n        ma_result result = ma_result_from_errno(errno);\n        if (result == MA_SUCCESS) {\n            result = MA_ERROR;   /* Just a safety check to make sure we never ever return success when pFile == NULL. */\n        }\n\n        return result;\n    }\n#endif\n\n    return MA_SUCCESS;\n}\n\n\n\n/*\n_wfopen() isn't always available in all compilation environments.\n\n    * Windows only.\n    * MSVC seems to support it universally as far back as VC6 from what I can tell (haven't checked further back).\n    * MinGW-64 (both 32- and 64-bit) seems to support it.\n    * MinGW wraps it in !defined(__STRICT_ANSI__).\n    * OpenWatcom wraps it in !defined(_NO_EXT_KEYS).\n\nThis can be reviewed as compatibility issues arise. The preference is to use _wfopen_s() and _wfopen() as opposed to the wcsrtombs()\nfallback, so if you notice your compiler not detecting this properly I'm happy to look at adding support.\n*/\n#if defined(_WIN32)\n    #if defined(_MSC_VER) || defined(__MINGW64__) || (!defined(__STRICT_ANSI__) && !defined(_NO_EXT_KEYS))\n        #define MA_HAS_WFOPEN\n    #endif\n#endif\n\nMA_API ma_result ma_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_t* pOpenMode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (ppFile != NULL) {\n        *ppFile = NULL;  /* Safety. */\n    }\n\n    if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_HAS_WFOPEN)\n    {\n        /* Use _wfopen() on Windows. */\n    #if defined(_MSC_VER) && _MSC_VER >= 1400\n        errno_t err = _wfopen_s(ppFile, pFilePath, pOpenMode);\n        if (err != 0) {\n            return ma_result_from_errno(err);\n        }\n    #else\n        *ppFile = _wfopen(pFilePath, pOpenMode);\n        if (*ppFile == NULL) {\n            return ma_result_from_errno(errno);\n        }\n    #endif\n        (void)pAllocationCallbacks;\n    }\n#else\n    /*\n    Use fopen() on anything other than Windows. Requires a conversion. This is annoying because fopen() is locale specific. The only real way I can\n    think of to do this is with wcsrtombs(). Note that wcstombs() is apparently not thread-safe because it uses a static global mbstate_t object for\n    maintaining state. I've checked this with -std=c89 and it works, but if somebody get's a compiler error I'll look into improving compatibility.\n    */\n    {\n        mbstate_t mbs;\n        size_t lenMB;\n        const wchar_t* pFilePathTemp = pFilePath;\n        char* pFilePathMB = NULL;\n        char pOpenModeMB[32] = {0};\n\n        /* Get the length first. */\n        MA_ZERO_OBJECT(&mbs);\n        lenMB = wcsrtombs(NULL, &pFilePathTemp, 0, &mbs);\n        if (lenMB == (size_t)-1) {\n            return ma_result_from_errno(errno);\n        }\n\n        pFilePathMB = (char*)ma_malloc(lenMB + 1, pAllocationCallbacks);\n        if (pFilePathMB == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n\n        pFilePathTemp = pFilePath;\n        MA_ZERO_OBJECT(&mbs);\n        wcsrtombs(pFilePathMB, &pFilePathTemp, lenMB + 1, &mbs);\n\n        /* The open mode should always consist of ASCII characters so we should be able to do a trivial conversion. */\n        {\n            size_t i = 0;\n            for (;;) {\n                if (pOpenMode[i] == 0) {\n                    pOpenModeMB[i] = '\\0';\n                    break;\n                }\n\n                pOpenModeMB[i] = (char)pOpenMode[i];\n                i += 1;\n            }\n        }\n\n        *ppFile = fopen(pFilePathMB, pOpenModeMB);\n\n        ma_free(pFilePathMB, pAllocationCallbacks);\n    }\n\n    if (*ppFile == NULL) {\n        return MA_ERROR;\n    }\n#endif\n\n    return MA_SUCCESS;\n}\n\n\n\nstatic MA_INLINE void ma_copy_memory_64(void* dst, const void* src, ma_uint64 sizeInBytes)\n{\n#if 0xFFFFFFFFFFFFFFFF <= MA_SIZE_MAX\n    MA_COPY_MEMORY(dst, src, (size_t)sizeInBytes);\n#else\n    while (sizeInBytes > 0) {\n        ma_uint64 bytesToCopyNow = sizeInBytes;\n        if (bytesToCopyNow > MA_SIZE_MAX) {\n            bytesToCopyNow = MA_SIZE_MAX;\n        }\n\n        MA_COPY_MEMORY(dst, src, (size_t)bytesToCopyNow);  /* Safe cast to size_t. */\n\n        sizeInBytes -= bytesToCopyNow;\n        dst = (      void*)((      ma_uint8*)dst + bytesToCopyNow);\n        src = (const void*)((const ma_uint8*)src + bytesToCopyNow);\n    }\n#endif\n}\n\nstatic MA_INLINE void ma_zero_memory_64(void* dst, ma_uint64 sizeInBytes)\n{\n#if 0xFFFFFFFFFFFFFFFF <= MA_SIZE_MAX\n    MA_ZERO_MEMORY(dst, (size_t)sizeInBytes);\n#else\n    while (sizeInBytes > 0) {\n        ma_uint64 bytesToZeroNow = sizeInBytes;\n        if (bytesToZeroNow > MA_SIZE_MAX) {\n            bytesToZeroNow = MA_SIZE_MAX;\n        }\n\n        MA_ZERO_MEMORY(dst, (size_t)bytesToZeroNow);  /* Safe cast to size_t. */\n\n        sizeInBytes -= bytesToZeroNow;\n        dst = (void*)((ma_uint8*)dst + bytesToZeroNow);\n    }\n#endif\n}\n\n\n/* Thanks to good old Bit Twiddling Hacks for this one: http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 */\nstatic MA_INLINE unsigned int ma_next_power_of_2(unsigned int x)\n{\n    x--;\n    x |= x >> 1;\n    x |= x >> 2;\n    x |= x >> 4;\n    x |= x >> 8;\n    x |= x >> 16;\n    x++;\n\n    return x;\n}\n\nstatic MA_INLINE unsigned int ma_prev_power_of_2(unsigned int x)\n{\n    return ma_next_power_of_2(x) >> 1;\n}\n\nstatic MA_INLINE unsigned int ma_round_to_power_of_2(unsigned int x)\n{\n    unsigned int prev = ma_prev_power_of_2(x);\n    unsigned int next = ma_next_power_of_2(x);\n    if ((next - x) > (x - prev)) {\n        return prev;\n    } else {\n        return next;\n    }\n}\n\nstatic MA_INLINE unsigned int ma_count_set_bits(unsigned int x)\n{\n    unsigned int count = 0;\n    while (x != 0) {\n        if (x & 1) {\n            count += 1;\n        }\n\n        x = x >> 1;\n    }\n\n    return count;\n}\n\n\n\n/**************************************************************************************************************************************************************\n\nAllocation Callbacks\n\n**************************************************************************************************************************************************************/\nstatic void* ma__malloc_default(size_t sz, void* pUserData)\n{\n    (void)pUserData;\n    return MA_MALLOC(sz);\n}\n\nstatic void* ma__realloc_default(void* p, size_t sz, void* pUserData)\n{\n    (void)pUserData;\n    return MA_REALLOC(p, sz);\n}\n\nstatic void ma__free_default(void* p, void* pUserData)\n{\n    (void)pUserData;\n    MA_FREE(p);\n}\n\nstatic ma_allocation_callbacks ma_allocation_callbacks_init_default(void)\n{\n    ma_allocation_callbacks callbacks;\n    callbacks.pUserData = NULL;\n    callbacks.onMalloc  = ma__malloc_default;\n    callbacks.onRealloc = ma__realloc_default;\n    callbacks.onFree    = ma__free_default;\n\n    return callbacks;\n}\n\nstatic ma_result ma_allocation_callbacks_init_copy(ma_allocation_callbacks* pDst, const ma_allocation_callbacks* pSrc)\n{\n    if (pDst == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pSrc == NULL) {\n        *pDst = ma_allocation_callbacks_init_default();\n    } else {\n        if (pSrc->pUserData == NULL && pSrc->onFree == NULL && pSrc->onMalloc == NULL && pSrc->onRealloc == NULL) {\n            *pDst = ma_allocation_callbacks_init_default();\n        } else {\n            if (pSrc->onFree == NULL || (pSrc->onMalloc == NULL && pSrc->onRealloc == NULL)) {\n                return MA_INVALID_ARGS;    /* Invalid allocation callbacks. */\n            } else {\n                *pDst = *pSrc;\n            }\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\n\n\n\n/**************************************************************************************************************************************************************\n\nLogging\n\n**************************************************************************************************************************************************************/\nMA_API const char* ma_log_level_to_string(ma_uint32 logLevel)\n{\n    switch (logLevel)\n    {\n        case MA_LOG_LEVEL_DEBUG:   return \"DEBUG\";\n        case MA_LOG_LEVEL_INFO:    return \"INFO\";\n        case MA_LOG_LEVEL_WARNING: return \"WARNING\";\n        case MA_LOG_LEVEL_ERROR:   return \"ERROR\";\n        default:                   return \"ERROR\";\n    }\n}\n\n#if defined(MA_DEBUG_OUTPUT)\n#if defined(MA_ANDROID)\n    #include <android/log.h>\n#endif\n\n/* Customize this to use a specific tag in __android_log_print() for debug output messages. */\n#ifndef MA_ANDROID_LOG_TAG\n#define MA_ANDROID_LOG_TAG  \"miniaudio\"\n#endif\n\nvoid ma_log_callback_debug(void* pUserData, ma_uint32 level, const char* pMessage)\n{\n    (void)pUserData;\n\n    /* Special handling for some platforms. */\n    #if defined(MA_ANDROID)\n    {\n        /* Android. */\n        __android_log_print(ANDROID_LOG_DEBUG, MA_ANDROID_LOG_TAG, \"%s: %s\", ma_log_level_to_string(level), pMessage);\n    }\n    #else\n    {\n        /* Everything else. */\n        printf(\"%s: %s\", ma_log_level_to_string(level), pMessage);\n    }\n    #endif\n}\n#endif\n\nMA_API ma_log_callback ma_log_callback_init(ma_log_callback_proc onLog, void* pUserData)\n{\n    ma_log_callback callback;\n\n    MA_ZERO_OBJECT(&callback);\n    callback.onLog     = onLog;\n    callback.pUserData = pUserData;\n\n    return callback;\n}\n\n\nMA_API ma_result ma_log_init(const ma_allocation_callbacks* pAllocationCallbacks, ma_log* pLog)\n{\n    if (pLog == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pLog);\n    ma_allocation_callbacks_init_copy(&pLog->allocationCallbacks, pAllocationCallbacks);\n\n    /* We need a mutex for thread safety. */\n    #ifndef MA_NO_THREADING\n    {\n        ma_result result = ma_mutex_init(&pLog->lock);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n    #endif\n\n    /* If we're using debug output, enable it. */\n    #if defined(MA_DEBUG_OUTPUT)\n    {\n        ma_log_register_callback(pLog, ma_log_callback_init(ma_log_callback_debug, NULL)); /* Doesn't really matter if this fails. */\n    }\n    #endif\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_log_uninit(ma_log* pLog)\n{\n    if (pLog == NULL) {\n        return;\n    }\n\n#ifndef MA_NO_THREADING\n    ma_mutex_uninit(&pLog->lock);\n#endif\n}\n\nstatic void ma_log_lock(ma_log* pLog)\n{\n#ifndef MA_NO_THREADING\n    ma_mutex_lock(&pLog->lock);\n#else\n    (void)pLog;\n#endif\n}\n\nstatic void ma_log_unlock(ma_log* pLog)\n{\n#ifndef MA_NO_THREADING\n    ma_mutex_unlock(&pLog->lock);\n#else\n    (void)pLog;\n#endif\n}\n\nMA_API ma_result ma_log_register_callback(ma_log* pLog, ma_log_callback callback)\n{\n    ma_result result = MA_SUCCESS;\n\n    if (pLog == NULL || callback.onLog == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_log_lock(pLog);\n    {\n        if (pLog->callbackCount == ma_countof(pLog->callbacks)) {\n            result = MA_OUT_OF_MEMORY;  /* Reached the maximum allowed log callbacks. */\n        } else {\n            pLog->callbacks[pLog->callbackCount] = callback;\n            pLog->callbackCount += 1;\n        }\n    }\n    ma_log_unlock(pLog);\n\n    return result;\n}\n\nMA_API ma_result ma_log_unregister_callback(ma_log* pLog, ma_log_callback callback)\n{\n    if (pLog == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_log_lock(pLog);\n    {\n        ma_uint32 iLog;\n        for (iLog = 0; iLog < pLog->callbackCount; ) {\n            if (pLog->callbacks[iLog].onLog == callback.onLog) {\n                /* Found. Move everything down a slot. */\n                ma_uint32 jLog;\n                for (jLog = iLog; jLog < pLog->callbackCount-1; jLog += 1) {\n                    pLog->callbacks[jLog] = pLog->callbacks[jLog + 1];\n                }\n\n                pLog->callbackCount -= 1;\n            } else {\n                /* Not found. */\n                iLog += 1;\n            }\n        }\n    }\n    ma_log_unlock(pLog);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_log_post(ma_log* pLog, ma_uint32 level, const char* pMessage)\n{\n    if (pLog == NULL || pMessage == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_log_lock(pLog);\n    {\n        ma_uint32 iLog;\n        for (iLog = 0; iLog < pLog->callbackCount; iLog += 1) {\n            if (pLog->callbacks[iLog].onLog) {\n                pLog->callbacks[iLog].onLog(pLog->callbacks[iLog].pUserData, level, pMessage);\n            }\n        }\n    }\n    ma_log_unlock(pLog);\n\n    return MA_SUCCESS;\n}\n\n\n/*\nWe need to emulate _vscprintf() for the VC6 build. This can be more efficient, but since it's only VC6, and it's just a\nlogging function, I'm happy to keep this simple. In the VC6 build we can implement this in terms of _vsnprintf().\n*/\n#if defined(_MSC_VER) && _MSC_VER < 1900\nstatic int ma_vscprintf(const ma_allocation_callbacks* pAllocationCallbacks, const char* format, va_list args)\n{\n#if _MSC_VER > 1200\n    return _vscprintf(format, args);\n#else\n    int result;\n    char* pTempBuffer = NULL;\n    size_t tempBufferCap = 1024;\n\n    if (format == NULL) {\n        errno = EINVAL;\n        return -1;\n    }\n\n    for (;;) {\n        char* pNewTempBuffer = (char*)ma_realloc(pTempBuffer, tempBufferCap, pAllocationCallbacks);\n        if (pNewTempBuffer == NULL) {\n            ma_free(pTempBuffer, pAllocationCallbacks);\n            errno = ENOMEM;\n            return -1;  /* Out of memory. */\n        }\n\n        pTempBuffer = pNewTempBuffer;\n\n        result = _vsnprintf(pTempBuffer, tempBufferCap, format, args);\n        ma_free(pTempBuffer, NULL);\n\n        if (result != -1) {\n            break;  /* Got it. */\n        }\n\n        /* Buffer wasn't big enough. Ideally it'd be nice to use an error code to know the reason for sure, but this is reliable enough. */\n        tempBufferCap *= 2;\n    }\n\n    return result;\n#endif\n}\n#endif\n\nMA_API ma_result ma_log_postv(ma_log* pLog, ma_uint32 level, const char* pFormat, va_list args)\n{\n    if (pLog == NULL || pFormat == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || ((!defined(_MSC_VER) || _MSC_VER >= 1900) && !defined(__STRICT_ANSI__) && !defined(_NO_EXT_KEYS)) || (defined(__cplusplus) && __cplusplus >= 201103L)\n    {\n        ma_result result;\n        int length;\n        char  pFormattedMessageStack[1024];\n        char* pFormattedMessageHeap = NULL;\n\n        /* First try formatting into our fixed sized stack allocated buffer. If this is too small we'll fallback to a heap allocation. */\n        length = vsnprintf(pFormattedMessageStack, sizeof(pFormattedMessageStack), pFormat, args);\n        if (length < 0) {\n            return MA_INVALID_OPERATION;    /* An error occurred when trying to convert the buffer. */\n        }\n\n        if ((size_t)length < sizeof(pFormattedMessageStack)) {\n            /* The string was written to the stack. */\n            result = ma_log_post(pLog, level, pFormattedMessageStack);\n        } else {\n            /* The stack buffer was too small, try the heap. */\n            pFormattedMessageHeap = (char*)ma_malloc(length + 1, &pLog->allocationCallbacks);\n            if (pFormattedMessageHeap == NULL) {\n                return MA_OUT_OF_MEMORY;\n            }\n\n            length = vsnprintf(pFormattedMessageHeap, length + 1, pFormat, args);\n            if (length < 0) {\n                ma_free(pFormattedMessageHeap, &pLog->allocationCallbacks);\n                return MA_INVALID_OPERATION;\n            }\n\n            result = ma_log_post(pLog, level, pFormattedMessageHeap);\n            ma_free(pFormattedMessageHeap, &pLog->allocationCallbacks);\n        }\n\n        return result;\n    }\n    #else\n    {\n        /*\n        Without snprintf() we need to first measure the string and then heap allocate it. I'm only aware of Visual Studio having support for this without snprintf(), so we'll\n        need to restrict this branch to Visual Studio. For other compilers we need to just not support formatted logging because I don't want the security risk of overflowing\n        a fixed sized stack allocated buffer.\n        */\n        #if defined(_MSC_VER) && _MSC_VER >= 1200   /* 1200 = VC6 */\n        {\n            ma_result result;\n            int formattedLen;\n            char* pFormattedMessage = NULL;\n            va_list args2;\n\n            #if _MSC_VER >= 1800\n            {\n                va_copy(args2, args);\n            }\n            #else\n            {\n                args2 = args;\n            }\n            #endif\n\n            formattedLen = ma_vscprintf(&pLog->allocationCallbacks, pFormat, args2);\n            va_end(args2);\n\n            if (formattedLen <= 0) {\n                return MA_INVALID_OPERATION;\n            }\n\n            pFormattedMessage = (char*)ma_malloc(formattedLen + 1, &pLog->allocationCallbacks);\n            if (pFormattedMessage == NULL) {\n                return MA_OUT_OF_MEMORY;\n            }\n\n            /* We'll get errors on newer versions of Visual Studio if we try to use vsprintf().  */\n            #if _MSC_VER >= 1400    /* 1400 = Visual Studio 2005 */\n            {\n                vsprintf_s(pFormattedMessage, formattedLen + 1, pFormat, args);\n            }\n            #else\n            {\n                vsprintf(pFormattedMessage, pFormat, args);\n            }\n            #endif\n\n            result = ma_log_post(pLog, level, pFormattedMessage);\n            ma_free(pFormattedMessage, &pLog->allocationCallbacks);\n\n            return result;\n        }\n        #else\n        {\n            /* Can't do anything because we don't have a safe way of to emulate vsnprintf() without a manual solution. */\n            (void)level;\n            (void)args;\n\n            return MA_INVALID_OPERATION;\n        }\n        #endif\n    }\n    #endif\n}\n\nMA_API ma_result ma_log_postf(ma_log* pLog, ma_uint32 level, const char* pFormat, ...)\n{\n    ma_result result;\n    va_list args;\n\n    if (pLog == NULL || pFormat == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    va_start(args, pFormat);\n    {\n        result = ma_log_postv(pLog, level, pFormat, args);\n    }\n    va_end(args);\n\n    return result;\n}\n\n\n\nstatic MA_INLINE ma_uint8 ma_clip_u8(ma_int32 x)\n{\n    return (ma_uint8)(ma_clamp(x, -128, 127) + 128);\n}\n\nstatic MA_INLINE ma_int16 ma_clip_s16(ma_int32 x)\n{\n    return (ma_int16)ma_clamp(x, -32768, 32767);\n}\n\nstatic MA_INLINE ma_int64 ma_clip_s24(ma_int64 x)\n{\n    return (ma_int64)ma_clamp(x, -8388608, 8388607);\n}\n\nstatic MA_INLINE ma_int32 ma_clip_s32(ma_int64 x)\n{\n    /* This dance is to silence warnings with -std=c89. A good compiler should be able to optimize this away. */\n    ma_int64 clipMin;\n    ma_int64 clipMax;\n    clipMin = -((ma_int64)2147483647 + 1);\n    clipMax =   (ma_int64)2147483647;\n\n    return (ma_int32)ma_clamp(x, clipMin, clipMax);\n}\n\nstatic MA_INLINE float ma_clip_f32(float x)\n{\n    if (x < -1) return -1;\n    if (x > +1) return +1;\n    return x;\n}\n\n\nstatic MA_INLINE float ma_mix_f32(float x, float y, float a)\n{\n    return x*(1-a) + y*a;\n}\nstatic MA_INLINE float ma_mix_f32_fast(float x, float y, float a)\n{\n    float r0 = (y - x);\n    float r1 = r0*a;\n    return x + r1;\n    /*return x + (y - x)*a;*/\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE __m128 ma_mix_f32_fast__sse2(__m128 x, __m128 y, __m128 a)\n{\n    return _mm_add_ps(x, _mm_mul_ps(_mm_sub_ps(y, x), a));\n}\n#endif\n#if defined(MA_SUPPORT_AVX2)\nstatic MA_INLINE __m256 ma_mix_f32_fast__avx2(__m256 x, __m256 y, __m256 a)\n{\n    return _mm256_add_ps(x, _mm256_mul_ps(_mm256_sub_ps(y, x), a));\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE float32x4_t ma_mix_f32_fast__neon(float32x4_t x, float32x4_t y, float32x4_t a)\n{\n    return vaddq_f32(x, vmulq_f32(vsubq_f32(y, x), a));\n}\n#endif\n\n\nstatic MA_INLINE double ma_mix_f64(double x, double y, double a)\n{\n    return x*(1-a) + y*a;\n}\nstatic MA_INLINE double ma_mix_f64_fast(double x, double y, double a)\n{\n    return x + (y - x)*a;\n}\n\nstatic MA_INLINE float ma_scale_to_range_f32(float x, float lo, float hi)\n{\n    return lo + x*(hi-lo);\n}\n\n\n/*\nGreatest common factor using Euclid's algorithm iteratively.\n*/\nstatic MA_INLINE ma_uint32 ma_gcf_u32(ma_uint32 a, ma_uint32 b)\n{\n    for (;;) {\n        if (b == 0) {\n            break;\n        } else {\n            ma_uint32 t = a;\n            a = b;\n            b = t % a;\n        }\n    }\n\n    return a;\n}\n\n\nstatic ma_uint32 ma_ffs_32(ma_uint32 x)\n{\n    ma_uint32 i;\n\n    /* Just a naive implementation just to get things working for now. Will optimize this later. */\n    for (i = 0; i < 32; i += 1) {\n        if ((x & (1 << i)) != 0) {\n            return i;\n        }\n    }\n\n    return i;\n}\n\nstatic MA_INLINE ma_int16 ma_float_to_fixed_16(float x)\n{\n    return (ma_int16)(x * (1 << 8));\n}\n\n\n\n/*\nRandom Number Generation\n\nminiaudio uses the LCG random number generation algorithm. This is good enough for audio.\n\nNote that miniaudio's global LCG implementation uses global state which is _not_ thread-local. When this is called across\nmultiple threads, results will be unpredictable. However, it won't crash and results will still be random enough for\nminiaudio's purposes.\n*/\n#ifndef MA_DEFAULT_LCG_SEED\n#define MA_DEFAULT_LCG_SEED 4321\n#endif\n\n#define MA_LCG_M   2147483647\n#define MA_LCG_A   48271\n#define MA_LCG_C   0\n\nstatic ma_lcg g_maLCG = {MA_DEFAULT_LCG_SEED}; /* Non-zero initial seed. Use ma_seed() to use an explicit seed. */\n\nstatic MA_INLINE void ma_lcg_seed(ma_lcg* pLCG, ma_int32 seed)\n{\n    MA_ASSERT(pLCG != NULL);\n    pLCG->state = seed;\n}\n\nstatic MA_INLINE ma_int32 ma_lcg_rand_s32(ma_lcg* pLCG)\n{\n    pLCG->state = (MA_LCG_A * pLCG->state + MA_LCG_C) % MA_LCG_M;\n    return pLCG->state;\n}\n\nstatic MA_INLINE ma_uint32 ma_lcg_rand_u32(ma_lcg* pLCG)\n{\n    return (ma_uint32)ma_lcg_rand_s32(pLCG);\n}\n\nstatic MA_INLINE ma_int16 ma_lcg_rand_s16(ma_lcg* pLCG)\n{\n    return (ma_int16)(ma_lcg_rand_s32(pLCG) & 0xFFFF);\n}\n\nstatic MA_INLINE double ma_lcg_rand_f64(ma_lcg* pLCG)\n{\n    return ma_lcg_rand_s32(pLCG) / (double)0x7FFFFFFF;\n}\n\nstatic MA_INLINE float ma_lcg_rand_f32(ma_lcg* pLCG)\n{\n    return (float)ma_lcg_rand_f64(pLCG);\n}\n\nstatic MA_INLINE float ma_lcg_rand_range_f32(ma_lcg* pLCG, float lo, float hi)\n{\n    return ma_scale_to_range_f32(ma_lcg_rand_f32(pLCG), lo, hi);\n}\n\nstatic MA_INLINE ma_int32 ma_lcg_rand_range_s32(ma_lcg* pLCG, ma_int32 lo, ma_int32 hi)\n{\n    if (lo == hi) {\n        return lo;\n    }\n\n    return lo + ma_lcg_rand_u32(pLCG) / (0xFFFFFFFF / (hi - lo + 1) + 1);\n}\n\n\n\nstatic MA_INLINE void ma_seed(ma_int32 seed)\n{\n    ma_lcg_seed(&g_maLCG, seed);\n}\n\nstatic MA_INLINE ma_int32 ma_rand_s32(void)\n{\n    return ma_lcg_rand_s32(&g_maLCG);\n}\n\nstatic MA_INLINE ma_uint32 ma_rand_u32(void)\n{\n    return ma_lcg_rand_u32(&g_maLCG);\n}\n\nstatic MA_INLINE double ma_rand_f64(void)\n{\n    return ma_lcg_rand_f64(&g_maLCG);\n}\n\nstatic MA_INLINE float ma_rand_f32(void)\n{\n    return ma_lcg_rand_f32(&g_maLCG);\n}\n\nstatic MA_INLINE float ma_rand_range_f32(float lo, float hi)\n{\n    return ma_lcg_rand_range_f32(&g_maLCG, lo, hi);\n}\n\nstatic MA_INLINE ma_int32 ma_rand_range_s32(ma_int32 lo, ma_int32 hi)\n{\n    return ma_lcg_rand_range_s32(&g_maLCG, lo, hi);\n}\n\n\nstatic MA_INLINE float ma_dither_f32_rectangle(float ditherMin, float ditherMax)\n{\n    return ma_rand_range_f32(ditherMin, ditherMax);\n}\n\nstatic MA_INLINE float ma_dither_f32_triangle(float ditherMin, float ditherMax)\n{\n    float a = ma_rand_range_f32(ditherMin, 0);\n    float b = ma_rand_range_f32(0, ditherMax);\n    return a + b;\n}\n\nstatic MA_INLINE float ma_dither_f32(ma_dither_mode ditherMode, float ditherMin, float ditherMax)\n{\n    if (ditherMode == ma_dither_mode_rectangle) {\n        return ma_dither_f32_rectangle(ditherMin, ditherMax);\n    }\n    if (ditherMode == ma_dither_mode_triangle) {\n        return ma_dither_f32_triangle(ditherMin, ditherMax);\n    }\n\n    return 0;\n}\n\nstatic MA_INLINE ma_int32 ma_dither_s32(ma_dither_mode ditherMode, ma_int32 ditherMin, ma_int32 ditherMax)\n{\n    if (ditherMode == ma_dither_mode_rectangle) {\n        ma_int32 a = ma_rand_range_s32(ditherMin, ditherMax);\n        return a;\n    }\n    if (ditherMode == ma_dither_mode_triangle) {\n        ma_int32 a = ma_rand_range_s32(ditherMin, 0);\n        ma_int32 b = ma_rand_range_s32(0, ditherMax);\n        return a + b;\n    }\n\n    return 0;\n}\n\n\n/**************************************************************************************************************************************************************\n\nAtomics\n\n**************************************************************************************************************************************************************/\n/* ma_atomic.h begin */\n#ifndef ma_atomic_h\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))\n    #pragma GCC diagnostic push\n    #pragma GCC diagnostic ignored \"-Wlong-long\"\n    #if defined(__clang__)\n        #pragma GCC diagnostic ignored \"-Wc++11-long-long\"\n    #endif\n#endif\ntypedef int ma_atomic_memory_order;\n#define MA_ATOMIC_HAS_8\n#define MA_ATOMIC_HAS_16\n#define MA_ATOMIC_HAS_32\n#define MA_ATOMIC_HAS_64\n#if (defined(_MSC_VER) ) || defined(__WATCOMC__) || defined(__DMC__)\n    #define MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, intrin, ma_atomicType, msvcType)   \\\n        ma_atomicType result; \\\n        switch (order) \\\n        { \\\n            case ma_atomic_memory_order_relaxed: \\\n            { \\\n                result = (ma_atomicType)intrin##_nf((volatile msvcType*)dst, (msvcType)src); \\\n            } break; \\\n            case ma_atomic_memory_order_consume: \\\n            case ma_atomic_memory_order_acquire: \\\n            { \\\n                result = (ma_atomicType)intrin##_acq((volatile msvcType*)dst, (msvcType)src); \\\n            } break; \\\n            case ma_atomic_memory_order_release: \\\n            { \\\n                result = (ma_atomicType)intrin##_rel((volatile msvcType*)dst, (msvcType)src); \\\n            } break; \\\n            case ma_atomic_memory_order_acq_rel: \\\n            case ma_atomic_memory_order_seq_cst: \\\n            default: \\\n            { \\\n                result = (ma_atomicType)intrin((volatile msvcType*)dst, (msvcType)src); \\\n            } break; \\\n        } \\\n        return result;\n    #define MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, expected, desired, order, intrin, ma_atomicType, msvcType)   \\\n        ma_atomicType result; \\\n        switch (order) \\\n        { \\\n            case ma_atomic_memory_order_relaxed: \\\n            { \\\n                result = (ma_atomicType)intrin##_nf((volatile msvcType*)ptr, (msvcType)expected, (msvcType)desired); \\\n            } break; \\\n            case ma_atomic_memory_order_consume: \\\n            case ma_atomic_memory_order_acquire: \\\n            { \\\n                result = (ma_atomicType)intrin##_acq((volatile msvcType*)ptr, (msvcType)expected, (msvcType)desired); \\\n            } break; \\\n            case ma_atomic_memory_order_release: \\\n            { \\\n                result = (ma_atomicType)intrin##_rel((volatile msvcType*)ptr, (msvcType)expected, (msvcType)desired); \\\n            } break; \\\n            case ma_atomic_memory_order_acq_rel: \\\n            case ma_atomic_memory_order_seq_cst: \\\n            default: \\\n            { \\\n                result = (ma_atomicType)intrin((volatile msvcType*)ptr, (msvcType)expected, (msvcType)desired); \\\n            } break; \\\n        } \\\n        return result;\n    #define ma_atomic_memory_order_relaxed  0\n    #define ma_atomic_memory_order_consume  1\n    #define ma_atomic_memory_order_acquire  2\n    #define ma_atomic_memory_order_release  3\n    #define ma_atomic_memory_order_acq_rel  4\n    #define ma_atomic_memory_order_seq_cst  5\n    #if _MSC_VER < 1600 && defined(MA_X86)\n        #define MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY\n    #endif\n    #if _MSC_VER < 1600\n        #undef MA_ATOMIC_HAS_8\n        #undef MA_ATOMIC_HAS_16\n    #endif\n    #if !defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY)\n        #include <intrin.h>\n    #endif\n    #if defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY)\n        #if defined(MA_ATOMIC_HAS_8)\n            static MA_INLINE ma_uint8 __stdcall ma_atomic_compare_and_swap_8(volatile ma_uint8* dst, ma_uint8 expected, ma_uint8 desired)\n            {\n                ma_uint8 result = 0;\n                __asm {\n                    mov ecx, dst\n                    mov al,  expected\n                    mov dl,  desired\n                    lock cmpxchg [ecx], dl\n                    mov result, al\n                }\n                return result;\n            }\n        #endif\n        #if defined(MA_ATOMIC_HAS_16)\n            static MA_INLINE ma_uint16 __stdcall ma_atomic_compare_and_swap_16(volatile ma_uint16* dst, ma_uint16 expected, ma_uint16 desired)\n            {\n                ma_uint16 result = 0;\n                __asm {\n                    mov ecx, dst\n                    mov ax,  expected\n                    mov dx,  desired\n                    lock cmpxchg [ecx], dx\n                    mov result, ax\n                }\n                return result;\n            }\n        #endif\n        #if defined(MA_ATOMIC_HAS_32)\n            static MA_INLINE ma_uint32 __stdcall ma_atomic_compare_and_swap_32(volatile ma_uint32* dst, ma_uint32 expected, ma_uint32 desired)\n            {\n                ma_uint32 result = 0;\n                __asm {\n                    mov ecx, dst\n                    mov eax, expected\n                    mov edx, desired\n                    lock cmpxchg [ecx], edx\n                    mov result, eax\n                }\n                return result;\n            }\n        #endif\n        #if defined(MA_ATOMIC_HAS_64)\n            static MA_INLINE ma_uint64 __stdcall ma_atomic_compare_and_swap_64(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired)\n            {\n                ma_uint32 resultEAX = 0;\n                ma_uint32 resultEDX = 0;\n                __asm {\n                    mov esi, dst\n                    mov eax, dword ptr expected\n                    mov edx, dword ptr expected + 4\n                    mov ebx, dword ptr desired\n                    mov ecx, dword ptr desired + 4\n                    lock cmpxchg8b qword ptr [esi]\n                    mov resultEAX, eax\n                    mov resultEDX, edx\n                }\n                return ((ma_uint64)resultEDX << 32) | resultEAX;\n            }\n        #endif\n    #else\n        #if defined(MA_ATOMIC_HAS_8)\n            #define ma_atomic_compare_and_swap_8( dst, expected, desired) (ma_uint8 )_InterlockedCompareExchange8((volatile char*)dst, (char)desired, (char)expected)\n        #endif\n        #if defined(MA_ATOMIC_HAS_16)\n            #define ma_atomic_compare_and_swap_16(dst, expected, desired) (ma_uint16)_InterlockedCompareExchange16((volatile short*)dst, (short)desired, (short)expected)\n        #endif\n        #if defined(MA_ATOMIC_HAS_32)\n            #define ma_atomic_compare_and_swap_32(dst, expected, desired) (ma_uint32)_InterlockedCompareExchange((volatile long*)dst, (long)desired, (long)expected)\n        #endif\n        #if defined(MA_ATOMIC_HAS_64)\n            #define ma_atomic_compare_and_swap_64(dst, expected, desired) (ma_uint64)_InterlockedCompareExchange64((volatile ma_int64*)dst, (ma_int64)desired, (ma_int64)expected)\n        #endif\n    #endif\n    #if defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY)\n        #if defined(MA_ATOMIC_HAS_8)\n            static MA_INLINE ma_uint8 __stdcall ma_atomic_exchange_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n            {\n                ma_uint8 result = 0;\n                (void)order;\n                __asm {\n                    mov ecx, dst\n                    mov al,  src\n                    lock xchg [ecx], al\n                    mov result, al\n                }\n                return result;\n            }\n        #endif\n        #if defined(MA_ATOMIC_HAS_16)\n            static MA_INLINE ma_uint16 __stdcall ma_atomic_exchange_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n            {\n                ma_uint16 result = 0;\n                (void)order;\n                __asm {\n                    mov ecx, dst\n                    mov ax,  src\n                    lock xchg [ecx], ax\n                    mov result, ax\n                }\n                return result;\n            }\n        #endif\n        #if defined(MA_ATOMIC_HAS_32)\n            static MA_INLINE ma_uint32 __stdcall ma_atomic_exchange_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n            {\n                ma_uint32 result = 0;\n                (void)order;\n                __asm {\n                    mov ecx, dst\n                    mov eax, src\n                    lock xchg [ecx], eax\n                    mov result, eax\n                }\n                return result;\n            }\n        #endif\n    #else\n        #if defined(MA_ATOMIC_HAS_8)\n            static MA_INLINE ma_uint8 __stdcall ma_atomic_exchange_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n            {\n            #if defined(MA_ARM)\n                MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchange8, ma_uint8, char);\n            #else\n                (void)order;\n                return (ma_uint8)_InterlockedExchange8((volatile char*)dst, (char)src);\n            #endif\n            }\n        #endif\n        #if defined(MA_ATOMIC_HAS_16)\n            static MA_INLINE ma_uint16 __stdcall ma_atomic_exchange_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n            {\n            #if defined(MA_ARM)\n                MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchange16, ma_uint16, short);\n            #else\n                (void)order;\n                return (ma_uint16)_InterlockedExchange16((volatile short*)dst, (short)src);\n            #endif\n            }\n        #endif\n        #if defined(MA_ATOMIC_HAS_32)\n            static MA_INLINE ma_uint32 __stdcall ma_atomic_exchange_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n            {\n            #if defined(MA_ARM)\n                MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchange, ma_uint32, long);\n            #else\n                (void)order;\n                return (ma_uint32)_InterlockedExchange((volatile long*)dst, (long)src);\n            #endif\n            }\n        #endif\n        #if defined(MA_ATOMIC_HAS_64) && defined(MA_64BIT)\n            static MA_INLINE ma_uint64 __stdcall ma_atomic_exchange_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n            {\n            #if defined(MA_ARM)\n                MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchange64, ma_uint64, long long);\n            #else\n                (void)order;\n                return (ma_uint64)_InterlockedExchange64((volatile long long*)dst, (long long)src);\n            #endif\n            }\n        #else\n        #endif\n    #endif\n    #if defined(MA_ATOMIC_HAS_64) && !defined(MA_64BIT)\n        static MA_INLINE ma_uint64 __stdcall ma_atomic_exchange_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            ma_uint64 oldValue;\n            do {\n                oldValue = *dst;\n            } while (ma_atomic_compare_and_swap_64(dst, oldValue, src) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n    #endif\n    #if defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY)\n        #if defined(MA_ATOMIC_HAS_8)\n            static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_add_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n            {\n                ma_uint8 result = 0;\n                (void)order;\n                __asm {\n                    mov ecx, dst\n                    mov al,  src\n                    lock xadd [ecx], al\n                    mov result, al\n                }\n                return result;\n            }\n        #endif\n        #if defined(MA_ATOMIC_HAS_16)\n            static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_add_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n            {\n                ma_uint16 result = 0;\n                (void)order;\n                __asm {\n                    mov ecx, dst\n                    mov ax,  src\n                    lock xadd [ecx], ax\n                    mov result, ax\n                }\n                return result;\n            }\n        #endif\n        #if defined(MA_ATOMIC_HAS_32)\n            static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_add_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n            {\n                ma_uint32 result = 0;\n                (void)order;\n                __asm {\n                    mov ecx, dst\n                    mov eax, src\n                    lock xadd [ecx], eax\n                    mov result, eax\n                }\n                return result;\n            }\n        #endif\n    #else\n        #if defined(MA_ATOMIC_HAS_8)\n            static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_add_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n            {\n            #if defined(MA_ARM)\n                MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchangeAdd8, ma_uint8, char);\n            #else\n                (void)order;\n                return (ma_uint8)_InterlockedExchangeAdd8((volatile char*)dst, (char)src);\n            #endif\n            }\n        #endif\n        #if defined(MA_ATOMIC_HAS_16)\n            static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_add_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n            {\n            #if defined(MA_ARM)\n                MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchangeAdd16, ma_uint16, short);\n            #else\n                (void)order;\n                return (ma_uint16)_InterlockedExchangeAdd16((volatile short*)dst, (short)src);\n            #endif\n            }\n        #endif\n        #if defined(MA_ATOMIC_HAS_32)\n            static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_add_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n            {\n            #if defined(MA_ARM)\n                MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchangeAdd, ma_uint32, long);\n            #else\n                (void)order;\n                return (ma_uint32)_InterlockedExchangeAdd((volatile long*)dst, (long)src);\n            #endif\n            }\n        #endif\n        #if defined(MA_ATOMIC_HAS_64) && defined(MA_64BIT)\n            static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_add_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n            {\n            #if defined(MA_ARM)\n                MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedExchangeAdd64, ma_uint64, long long);\n            #else\n                (void)order;\n                return (ma_uint64)_InterlockedExchangeAdd64((volatile long long*)dst, (long long)src);\n            #endif\n            }\n        #else\n        #endif\n    #endif\n    #if defined(MA_ATOMIC_HAS_64) && !defined(MA_64BIT)\n        static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_add_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            ma_uint64 oldValue;\n            ma_uint64 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue + src;\n            } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n    #endif\n    #if defined(MA_ATOMIC_MSVC_USE_INLINED_ASSEMBLY)\n        static MA_INLINE void __stdcall ma_atomic_thread_fence(ma_atomic_memory_order order)\n        {\n            (void)order;\n            __asm {\n                lock add [esp], 0\n            }\n        }\n    #else\n        #if defined(MA_X64)\n            #define ma_atomic_thread_fence(order)   __faststorefence(), (void)order\n        #elif defined(MA_ARM64)\n            #define ma_atomic_thread_fence(order)   __dmb(_ARM64_BARRIER_ISH), (void)order\n        #else\n            static MA_INLINE void ma_atomic_thread_fence(ma_atomic_memory_order order)\n            {\n                volatile ma_uint32 barrier = 0;\n                ma_atomic_fetch_add_explicit_32(&barrier, 0, order);\n            }\n        #endif\n    #endif\n    #define ma_atomic_compiler_fence()      ma_atomic_thread_fence(ma_atomic_memory_order_seq_cst)\n    #define ma_atomic_signal_fence(order)   ma_atomic_thread_fence(order)\n    #if defined(MA_ATOMIC_HAS_8)\n        static MA_INLINE ma_uint8 ma_atomic_load_explicit_8(volatile const ma_uint8* ptr, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, 0, 0, order, _InterlockedCompareExchange8, ma_uint8, char);\n        #else\n            (void)order;\n            return ma_atomic_compare_and_swap_8((volatile ma_uint8*)ptr, 0, 0);\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_16)\n        static MA_INLINE ma_uint16 ma_atomic_load_explicit_16(volatile const ma_uint16* ptr, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, 0, 0, order, _InterlockedCompareExchange16, ma_uint16, short);\n        #else\n            (void)order;\n            return ma_atomic_compare_and_swap_16((volatile ma_uint16*)ptr, 0, 0);\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_32)\n        static MA_INLINE ma_uint32 ma_atomic_load_explicit_32(volatile const ma_uint32* ptr, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, 0, 0, order, _InterlockedCompareExchange, ma_uint32, long);\n        #else\n            (void)order;\n            return ma_atomic_compare_and_swap_32((volatile ma_uint32*)ptr, 0, 0);\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_64)\n        static MA_INLINE ma_uint64 ma_atomic_load_explicit_64(volatile const ma_uint64* ptr, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC_COMPARE_EXCHANGE(ptr, 0, 0, order, _InterlockedCompareExchange64, ma_uint64, long long);\n        #else\n            (void)order;\n            return ma_atomic_compare_and_swap_64((volatile ma_uint64*)ptr, 0, 0);\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_8)\n        #define ma_atomic_store_explicit_8( dst, src, order) (void)ma_atomic_exchange_explicit_8 (dst, src, order)\n    #endif\n    #if defined(MA_ATOMIC_HAS_16)\n        #define ma_atomic_store_explicit_16(dst, src, order) (void)ma_atomic_exchange_explicit_16(dst, src, order)\n    #endif\n    #if defined(MA_ATOMIC_HAS_32)\n        #define ma_atomic_store_explicit_32(dst, src, order) (void)ma_atomic_exchange_explicit_32(dst, src, order)\n    #endif\n    #if defined(MA_ATOMIC_HAS_64)\n        #define ma_atomic_store_explicit_64(dst, src, order) (void)ma_atomic_exchange_explicit_64(dst, src, order)\n    #endif\n    #if defined(MA_ATOMIC_HAS_8)\n        static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_sub_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n            ma_uint8 oldValue;\n            ma_uint8 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint8)(oldValue - src);\n            } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_16)\n        static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_sub_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n            ma_uint16 oldValue;\n            ma_uint16 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint16)(oldValue - src);\n            } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_32)\n        static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_sub_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n            ma_uint32 oldValue;\n            ma_uint32 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue - src;\n            } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_64)\n        static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_sub_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            ma_uint64 oldValue;\n            ma_uint64 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue - src;\n            } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_8)\n        static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_and_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedAnd8, ma_uint8, char);\n        #else\n            ma_uint8 oldValue;\n            ma_uint8 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint8)(oldValue & src);\n            } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_16)\n        static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_and_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedAnd16, ma_uint16, short);\n        #else\n            ma_uint16 oldValue;\n            ma_uint16 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint16)(oldValue & src);\n            } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_32)\n        static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_and_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedAnd, ma_uint32, long);\n        #else\n            ma_uint32 oldValue;\n            ma_uint32 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue & src;\n            } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_64)\n        static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_and_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedAnd64, ma_uint64, long long);\n        #else\n            ma_uint64 oldValue;\n            ma_uint64 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue & src;\n            } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_8)\n        static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_xor_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedXor8, ma_uint8, char);\n        #else\n            ma_uint8 oldValue;\n            ma_uint8 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint8)(oldValue ^ src);\n            } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_16)\n        static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_xor_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedXor16, ma_uint16, short);\n        #else\n            ma_uint16 oldValue;\n            ma_uint16 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint16)(oldValue ^ src);\n            } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_32)\n        static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_xor_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedXor, ma_uint32, long);\n        #else\n            ma_uint32 oldValue;\n            ma_uint32 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue ^ src;\n            } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_64)\n        static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_xor_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedXor64, ma_uint64, long long);\n        #else\n            ma_uint64 oldValue;\n            ma_uint64 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue ^ src;\n            } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_8)\n        static MA_INLINE ma_uint8 __stdcall ma_atomic_fetch_or_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedOr8, ma_uint8, char);\n        #else\n            ma_uint8 oldValue;\n            ma_uint8 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint8)(oldValue | src);\n            } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_16)\n        static MA_INLINE ma_uint16 __stdcall ma_atomic_fetch_or_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedOr16, ma_uint16, short);\n        #else\n            ma_uint16 oldValue;\n            ma_uint16 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint16)(oldValue | src);\n            } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_32)\n        static MA_INLINE ma_uint32 __stdcall ma_atomic_fetch_or_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedOr, ma_uint32, long);\n        #else\n            ma_uint32 oldValue;\n            ma_uint32 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue | src;\n            } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_64)\n        static MA_INLINE ma_uint64 __stdcall ma_atomic_fetch_or_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n        #if defined(MA_ARM)\n            MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, _InterlockedOr64, ma_uint64, long long);\n        #else\n            ma_uint64 oldValue;\n            ma_uint64 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue | src;\n            } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        #endif\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_8)\n        #define ma_atomic_test_and_set_explicit_8( dst, order) ma_atomic_exchange_explicit_8 (dst, 1, order)\n    #endif\n    #if defined(MA_ATOMIC_HAS_16)\n        #define ma_atomic_test_and_set_explicit_16(dst, order) ma_atomic_exchange_explicit_16(dst, 1, order)\n    #endif\n    #if defined(MA_ATOMIC_HAS_32)\n        #define ma_atomic_test_and_set_explicit_32(dst, order) ma_atomic_exchange_explicit_32(dst, 1, order)\n    #endif\n    #if defined(MA_ATOMIC_HAS_64)\n        #define ma_atomic_test_and_set_explicit_64(dst, order) ma_atomic_exchange_explicit_64(dst, 1, order)\n    #endif\n    #if defined(MA_ATOMIC_HAS_8)\n        #define ma_atomic_clear_explicit_8( dst, order) ma_atomic_store_explicit_8 (dst, 0, order)\n    #endif\n    #if defined(MA_ATOMIC_HAS_16)\n        #define ma_atomic_clear_explicit_16(dst, order) ma_atomic_store_explicit_16(dst, 0, order)\n    #endif\n    #if defined(MA_ATOMIC_HAS_32)\n        #define ma_atomic_clear_explicit_32(dst, order) ma_atomic_store_explicit_32(dst, 0, order)\n    #endif\n    #if defined(MA_ATOMIC_HAS_64)\n        #define ma_atomic_clear_explicit_64(dst, order) ma_atomic_store_explicit_64(dst, 0, order)\n    #endif\n    #if defined(MA_ATOMIC_HAS_8)\n        typedef ma_uint8 ma_atomic_flag;\n        #define ma_atomic_flag_test_and_set_explicit(ptr, order)    (ma_bool32)ma_atomic_test_and_set_explicit_8(ptr, order)\n        #define ma_atomic_flag_clear_explicit(ptr, order)           ma_atomic_clear_explicit_8(ptr, order)\n        #define c89atoimc_flag_load_explicit(ptr, order)            ma_atomic_load_explicit_8(ptr, order)\n    #else\n        typedef ma_uint32 ma_atomic_flag;\n        #define ma_atomic_flag_test_and_set_explicit(ptr, order)    (ma_bool32)ma_atomic_test_and_set_explicit_32(ptr, order)\n        #define ma_atomic_flag_clear_explicit(ptr, order)           ma_atomic_clear_explicit_32(ptr, order)\n        #define c89atoimc_flag_load_explicit(ptr, order)            ma_atomic_load_explicit_32(ptr, order)\n    #endif\n#elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)))\n    #define MA_ATOMIC_HAS_NATIVE_COMPARE_EXCHANGE\n    #define MA_ATOMIC_HAS_NATIVE_IS_LOCK_FREE\n    #define ma_atomic_memory_order_relaxed                          __ATOMIC_RELAXED\n    #define ma_atomic_memory_order_consume                          __ATOMIC_CONSUME\n    #define ma_atomic_memory_order_acquire                          __ATOMIC_ACQUIRE\n    #define ma_atomic_memory_order_release                          __ATOMIC_RELEASE\n    #define ma_atomic_memory_order_acq_rel                          __ATOMIC_ACQ_REL\n    #define ma_atomic_memory_order_seq_cst                          __ATOMIC_SEQ_CST\n    #define ma_atomic_compiler_fence()                              __asm__ __volatile__(\"\":::\"memory\")\n    #define ma_atomic_thread_fence(order)                           __atomic_thread_fence(order)\n    #define ma_atomic_signal_fence(order)                           __atomic_signal_fence(order)\n    #define ma_atomic_is_lock_free_8(ptr)                           __atomic_is_lock_free(1, ptr)\n    #define ma_atomic_is_lock_free_16(ptr)                          __atomic_is_lock_free(2, ptr)\n    #define ma_atomic_is_lock_free_32(ptr)                          __atomic_is_lock_free(4, ptr)\n    #define ma_atomic_is_lock_free_64(ptr)                          __atomic_is_lock_free(8, ptr)\n    #define ma_atomic_test_and_set_explicit_8( dst, order)          __atomic_exchange_n(dst, 1, order)\n    #define ma_atomic_test_and_set_explicit_16(dst, order)          __atomic_exchange_n(dst, 1, order)\n    #define ma_atomic_test_and_set_explicit_32(dst, order)          __atomic_exchange_n(dst, 1, order)\n    #define ma_atomic_test_and_set_explicit_64(dst, order)          __atomic_exchange_n(dst, 1, order)\n    #define ma_atomic_clear_explicit_8( dst, order)                 __atomic_store_n(dst, 0, order)\n    #define ma_atomic_clear_explicit_16(dst, order)                 __atomic_store_n(dst, 0, order)\n    #define ma_atomic_clear_explicit_32(dst, order)                 __atomic_store_n(dst, 0, order)\n    #define ma_atomic_clear_explicit_64(dst, order)                 __atomic_store_n(dst, 0, order)\n    #define ma_atomic_store_explicit_8( dst, src, order)            __atomic_store_n(dst, src, order)\n    #define ma_atomic_store_explicit_16(dst, src, order)            __atomic_store_n(dst, src, order)\n    #define ma_atomic_store_explicit_32(dst, src, order)            __atomic_store_n(dst, src, order)\n    #define ma_atomic_store_explicit_64(dst, src, order)            __atomic_store_n(dst, src, order)\n    #define ma_atomic_load_explicit_8( dst, order)                  __atomic_load_n(dst, order)\n    #define ma_atomic_load_explicit_16(dst, order)                  __atomic_load_n(dst, order)\n    #define ma_atomic_load_explicit_32(dst, order)                  __atomic_load_n(dst, order)\n    #define ma_atomic_load_explicit_64(dst, order)                  __atomic_load_n(dst, order)\n    #define ma_atomic_exchange_explicit_8( dst, src, order)         __atomic_exchange_n(dst, src, order)\n    #define ma_atomic_exchange_explicit_16(dst, src, order)         __atomic_exchange_n(dst, src, order)\n    #define ma_atomic_exchange_explicit_32(dst, src, order)         __atomic_exchange_n(dst, src, order)\n    #define ma_atomic_exchange_explicit_64(dst, src, order)         __atomic_exchange_n(dst, src, order)\n    #define ma_atomic_compare_exchange_strong_explicit_8( dst, expected, desired, successOrder, failureOrder)   __atomic_compare_exchange_n(dst, expected, desired, 0, successOrder, failureOrder)\n    #define ma_atomic_compare_exchange_strong_explicit_16(dst, expected, desired, successOrder, failureOrder)   __atomic_compare_exchange_n(dst, expected, desired, 0, successOrder, failureOrder)\n    #define ma_atomic_compare_exchange_strong_explicit_32(dst, expected, desired, successOrder, failureOrder)   __atomic_compare_exchange_n(dst, expected, desired, 0, successOrder, failureOrder)\n    #define ma_atomic_compare_exchange_strong_explicit_64(dst, expected, desired, successOrder, failureOrder)   __atomic_compare_exchange_n(dst, expected, desired, 0, successOrder, failureOrder)\n    #define ma_atomic_compare_exchange_weak_explicit_8( dst, expected, desired, successOrder, failureOrder)     __atomic_compare_exchange_n(dst, expected, desired, 1, successOrder, failureOrder)\n    #define ma_atomic_compare_exchange_weak_explicit_16(dst, expected, desired, successOrder, failureOrder)     __atomic_compare_exchange_n(dst, expected, desired, 1, successOrder, failureOrder)\n    #define ma_atomic_compare_exchange_weak_explicit_32(dst, expected, desired, successOrder, failureOrder)     __atomic_compare_exchange_n(dst, expected, desired, 1, successOrder, failureOrder)\n    #define ma_atomic_compare_exchange_weak_explicit_64(dst, expected, desired, successOrder, failureOrder)     __atomic_compare_exchange_n(dst, expected, desired, 1, successOrder, failureOrder)\n    #define ma_atomic_fetch_add_explicit_8( dst, src, order)        __atomic_fetch_add(dst, src, order)\n    #define ma_atomic_fetch_add_explicit_16(dst, src, order)        __atomic_fetch_add(dst, src, order)\n    #define ma_atomic_fetch_add_explicit_32(dst, src, order)        __atomic_fetch_add(dst, src, order)\n    #define ma_atomic_fetch_add_explicit_64(dst, src, order)        __atomic_fetch_add(dst, src, order)\n    #define ma_atomic_fetch_sub_explicit_8( dst, src, order)        __atomic_fetch_sub(dst, src, order)\n    #define ma_atomic_fetch_sub_explicit_16(dst, src, order)        __atomic_fetch_sub(dst, src, order)\n    #define ma_atomic_fetch_sub_explicit_32(dst, src, order)        __atomic_fetch_sub(dst, src, order)\n    #define ma_atomic_fetch_sub_explicit_64(dst, src, order)        __atomic_fetch_sub(dst, src, order)\n    #define ma_atomic_fetch_or_explicit_8( dst, src, order)         __atomic_fetch_or(dst, src, order)\n    #define ma_atomic_fetch_or_explicit_16(dst, src, order)         __atomic_fetch_or(dst, src, order)\n    #define ma_atomic_fetch_or_explicit_32(dst, src, order)         __atomic_fetch_or(dst, src, order)\n    #define ma_atomic_fetch_or_explicit_64(dst, src, order)         __atomic_fetch_or(dst, src, order)\n    #define ma_atomic_fetch_xor_explicit_8( dst, src, order)        __atomic_fetch_xor(dst, src, order)\n    #define ma_atomic_fetch_xor_explicit_16(dst, src, order)        __atomic_fetch_xor(dst, src, order)\n    #define ma_atomic_fetch_xor_explicit_32(dst, src, order)        __atomic_fetch_xor(dst, src, order)\n    #define ma_atomic_fetch_xor_explicit_64(dst, src, order)        __atomic_fetch_xor(dst, src, order)\n    #define ma_atomic_fetch_and_explicit_8( dst, src, order)        __atomic_fetch_and(dst, src, order)\n    #define ma_atomic_fetch_and_explicit_16(dst, src, order)        __atomic_fetch_and(dst, src, order)\n    #define ma_atomic_fetch_and_explicit_32(dst, src, order)        __atomic_fetch_and(dst, src, order)\n    #define ma_atomic_fetch_and_explicit_64(dst, src, order)        __atomic_fetch_and(dst, src, order)\n    static MA_INLINE ma_uint8 ma_atomic_compare_and_swap_8(volatile ma_uint8* dst, ma_uint8 expected, ma_uint8 desired)\n    {\n        __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);\n        return expected;\n    }\n    static MA_INLINE ma_uint16 ma_atomic_compare_and_swap_16(volatile ma_uint16* dst, ma_uint16 expected, ma_uint16 desired)\n    {\n        __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);\n        return expected;\n    }\n    static MA_INLINE ma_uint32 ma_atomic_compare_and_swap_32(volatile ma_uint32* dst, ma_uint32 expected, ma_uint32 desired)\n    {\n        __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);\n        return expected;\n    }\n    static MA_INLINE ma_uint64 ma_atomic_compare_and_swap_64(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired)\n    {\n        __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);\n        return expected;\n    }\n    typedef ma_uint8 ma_atomic_flag;\n    #define ma_atomic_flag_test_and_set_explicit(dst, order)        (ma_bool32)__atomic_test_and_set(dst, order)\n    #define ma_atomic_flag_clear_explicit(dst, order)               __atomic_clear(dst, order)\n    #define c89atoimc_flag_load_explicit(ptr, order)                ma_atomic_load_explicit_8(ptr, order)\n#else\n    #define ma_atomic_memory_order_relaxed  1\n    #define ma_atomic_memory_order_consume  2\n    #define ma_atomic_memory_order_acquire  3\n    #define ma_atomic_memory_order_release  4\n    #define ma_atomic_memory_order_acq_rel  5\n    #define ma_atomic_memory_order_seq_cst  6\n    #define ma_atomic_compiler_fence() __asm__ __volatile__(\"\":::\"memory\")\n    #if defined(__GNUC__)\n        #define ma_atomic_thread_fence(order) __sync_synchronize(), (void)order\n        static MA_INLINE ma_uint8 ma_atomic_exchange_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n            if (order > ma_atomic_memory_order_acquire) {\n                __sync_synchronize();\n            }\n            return __sync_lock_test_and_set(dst, src);\n        }\n        static MA_INLINE ma_uint16 ma_atomic_exchange_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n            ma_uint16 oldValue;\n            do {\n                oldValue = *dst;\n            } while (__sync_val_compare_and_swap(dst, oldValue, src) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint32 ma_atomic_exchange_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n            ma_uint32 oldValue;\n            do {\n                oldValue = *dst;\n            } while (__sync_val_compare_and_swap(dst, oldValue, src) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint64 ma_atomic_exchange_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            ma_uint64 oldValue;\n            do {\n                oldValue = *dst;\n            } while (__sync_val_compare_and_swap(dst, oldValue, src) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint8 ma_atomic_fetch_add_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_add(dst, src);\n        }\n        static MA_INLINE ma_uint16 ma_atomic_fetch_add_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_add(dst, src);\n        }\n        static MA_INLINE ma_uint32 ma_atomic_fetch_add_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_add(dst, src);\n        }\n        static MA_INLINE ma_uint64 ma_atomic_fetch_add_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_add(dst, src);\n        }\n        static MA_INLINE ma_uint8 ma_atomic_fetch_sub_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_sub(dst, src);\n        }\n        static MA_INLINE ma_uint16 ma_atomic_fetch_sub_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_sub(dst, src);\n        }\n        static MA_INLINE ma_uint32 ma_atomic_fetch_sub_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_sub(dst, src);\n        }\n        static MA_INLINE ma_uint64 ma_atomic_fetch_sub_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_sub(dst, src);\n        }\n        static MA_INLINE ma_uint8 ma_atomic_fetch_or_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_or(dst, src);\n        }\n        static MA_INLINE ma_uint16 ma_atomic_fetch_or_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_or(dst, src);\n        }\n        static MA_INLINE ma_uint32 ma_atomic_fetch_or_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_or(dst, src);\n        }\n        static MA_INLINE ma_uint64 ma_atomic_fetch_or_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_or(dst, src);\n        }\n        static MA_INLINE ma_uint8 ma_atomic_fetch_xor_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_xor(dst, src);\n        }\n        static MA_INLINE ma_uint16 ma_atomic_fetch_xor_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_xor(dst, src);\n        }\n        static MA_INLINE ma_uint32 ma_atomic_fetch_xor_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_xor(dst, src);\n        }\n        static MA_INLINE ma_uint64 ma_atomic_fetch_xor_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_xor(dst, src);\n        }\n        static MA_INLINE ma_uint8 ma_atomic_fetch_and_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_and(dst, src);\n        }\n        static MA_INLINE ma_uint16 ma_atomic_fetch_and_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_and(dst, src);\n        }\n        static MA_INLINE ma_uint32 ma_atomic_fetch_and_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_and(dst, src);\n        }\n        static MA_INLINE ma_uint64 ma_atomic_fetch_and_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            (void)order;\n            return __sync_fetch_and_and(dst, src);\n        }\n        #define ma_atomic_compare_and_swap_8( dst, expected, desired)   __sync_val_compare_and_swap(dst, expected, desired)\n        #define ma_atomic_compare_and_swap_16(dst, expected, desired)   __sync_val_compare_and_swap(dst, expected, desired)\n        #define ma_atomic_compare_and_swap_32(dst, expected, desired)   __sync_val_compare_and_swap(dst, expected, desired)\n        #define ma_atomic_compare_and_swap_64(dst, expected, desired)   __sync_val_compare_and_swap(dst, expected, desired)\n    #else\n        #if defined(MA_X86)\n            #define ma_atomic_thread_fence(order) __asm__ __volatile__(\"lock; addl $0, (%%esp)\" ::: \"memory\", \"cc\")\n        #elif defined(MA_X64)\n            #define ma_atomic_thread_fence(order) __asm__ __volatile__(\"lock; addq $0, (%%rsp)\" ::: \"memory\", \"cc\")\n        #else\n            #error Unsupported architecture. Please submit a feature request.\n        #endif\n        static MA_INLINE ma_uint8 ma_atomic_compare_and_swap_8(volatile ma_uint8* dst, ma_uint8 expected, ma_uint8 desired)\n        {\n            ma_uint8 result;\n        #if defined(MA_X86) || defined(MA_X64)\n            __asm__ __volatile__(\"lock; cmpxchg %3, %0\" : \"+m\"(*dst), \"=a\"(result) : \"a\"(expected), \"d\"(desired) : \"cc\");\n        #else\n            #error Unsupported architecture. Please submit a feature request.\n        #endif\n            return result;\n        }\n        static MA_INLINE ma_uint16 ma_atomic_compare_and_swap_16(volatile ma_uint16* dst, ma_uint16 expected, ma_uint16 desired)\n        {\n            ma_uint16 result;\n        #if defined(MA_X86) || defined(MA_X64)\n            __asm__ __volatile__(\"lock; cmpxchg %3, %0\" : \"+m\"(*dst), \"=a\"(result) : \"a\"(expected), \"d\"(desired) : \"cc\");\n        #else\n            #error Unsupported architecture. Please submit a feature request.\n        #endif\n            return result;\n        }\n        static MA_INLINE ma_uint32 ma_atomic_compare_and_swap_32(volatile ma_uint32* dst, ma_uint32 expected, ma_uint32 desired)\n        {\n            ma_uint32 result;\n        #if defined(MA_X86) || defined(MA_X64)\n            __asm__ __volatile__(\"lock; cmpxchg %3, %0\" : \"+m\"(*dst), \"=a\"(result) : \"a\"(expected), \"d\"(desired) : \"cc\");\n        #else\n            #error Unsupported architecture. Please submit a feature request.\n        #endif\n            return result;\n        }\n        static MA_INLINE ma_uint64 ma_atomic_compare_and_swap_64(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired)\n        {\n            volatile ma_uint64 result;\n        #if defined(MA_X86)\n            ma_uint32 resultEAX;\n            ma_uint32 resultEDX;\n            __asm__ __volatile__(\"push %%ebx; xchg %5, %%ebx; lock; cmpxchg8b %0; pop %%ebx\" : \"+m\"(*dst), \"=a\"(resultEAX), \"=d\"(resultEDX) : \"a\"(expected & 0xFFFFFFFF), \"d\"(expected >> 32), \"r\"(desired & 0xFFFFFFFF), \"c\"(desired >> 32) : \"cc\");\n            result = ((ma_uint64)resultEDX << 32) | resultEAX;\n        #elif defined(MA_X64)\n            __asm__ __volatile__(\"lock; cmpxchg %3, %0\" : \"+m\"(*dst), \"=a\"(result) : \"a\"(expected), \"d\"(desired) : \"cc\");\n        #else\n            #error Unsupported architecture. Please submit a feature request.\n        #endif\n            return result;\n        }\n        static MA_INLINE ma_uint8 ma_atomic_exchange_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n            ma_uint8 result = 0;\n            (void)order;\n        #if defined(MA_X86) || defined(MA_X64)\n            __asm__ __volatile__(\"lock; xchg %1, %0\" : \"+m\"(*dst), \"=a\"(result) : \"a\"(src));\n        #else\n            #error Unsupported architecture. Please submit a feature request.\n        #endif\n            return result;\n        }\n        static MA_INLINE ma_uint16 ma_atomic_exchange_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n            ma_uint16 result = 0;\n            (void)order;\n        #if defined(MA_X86) || defined(MA_X64)\n            __asm__ __volatile__(\"lock; xchg %1, %0\" : \"+m\"(*dst), \"=a\"(result) : \"a\"(src));\n        #else\n            #error Unsupported architecture. Please submit a feature request.\n        #endif\n            return result;\n        }\n        static MA_INLINE ma_uint32 ma_atomic_exchange_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n            ma_uint32 result;\n            (void)order;\n        #if defined(MA_X86) || defined(MA_X64)\n            __asm__ __volatile__(\"lock; xchg %1, %0\" : \"+m\"(*dst), \"=a\"(result) : \"a\"(src));\n        #else\n            #error Unsupported architecture. Please submit a feature request.\n        #endif\n            return result;\n        }\n        static MA_INLINE ma_uint64 ma_atomic_exchange_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            ma_uint64 result;\n            (void)order;\n        #if defined(MA_X86)\n            do {\n                result = *dst;\n            } while (ma_atomic_compare_and_swap_64(dst, result, src) != result);\n        #elif defined(MA_X64)\n            __asm__ __volatile__(\"lock; xchg %1, %0\" : \"+m\"(*dst), \"=a\"(result) : \"a\"(src));\n        #else\n            #error Unsupported architecture. Please submit a feature request.\n        #endif\n            return result;\n        }\n        static MA_INLINE ma_uint8 ma_atomic_fetch_add_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n            ma_uint8 result;\n            (void)order;\n        #if defined(MA_X86) || defined(MA_X64)\n            __asm__ __volatile__(\"lock; xadd %1, %0\" : \"+m\"(*dst), \"=a\"(result) : \"a\"(src) : \"cc\");\n        #else\n            #error Unsupported architecture. Please submit a feature request.\n        #endif\n            return result;\n        }\n        static MA_INLINE ma_uint16 ma_atomic_fetch_add_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n            ma_uint16 result;\n            (void)order;\n        #if defined(MA_X86) || defined(MA_X64)\n            __asm__ __volatile__(\"lock; xadd %1, %0\" : \"+m\"(*dst), \"=a\"(result) : \"a\"(src) : \"cc\");\n        #else\n            #error Unsupported architecture. Please submit a feature request.\n        #endif\n            return result;\n        }\n        static MA_INLINE ma_uint32 ma_atomic_fetch_add_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n            ma_uint32 result;\n            (void)order;\n        #if defined(MA_X86) || defined(MA_X64)\n            __asm__ __volatile__(\"lock; xadd %1, %0\" : \"+m\"(*dst), \"=a\"(result) : \"a\"(src) : \"cc\");\n        #else\n            #error Unsupported architecture. Please submit a feature request.\n        #endif\n            return result;\n        }\n        static MA_INLINE ma_uint64 ma_atomic_fetch_add_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n        #if defined(MA_X86)\n            ma_uint64 oldValue;\n            ma_uint64 newValue;\n            (void)order;\n            do {\n                oldValue = *dst;\n                newValue = oldValue + src;\n            } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue);\n            return oldValue;\n        #elif defined(MA_X64)\n            ma_uint64 result;\n            (void)order;\n            __asm__ __volatile__(\"lock; xadd %1, %0\" : \"+m\"(*dst), \"=a\"(result) : \"a\"(src) : \"cc\");\n            return result;\n        #endif\n        }\n        static MA_INLINE ma_uint8 ma_atomic_fetch_sub_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n            ma_uint8 oldValue;\n            ma_uint8 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint8)(oldValue - src);\n            } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint16 ma_atomic_fetch_sub_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n            ma_uint16 oldValue;\n            ma_uint16 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint16)(oldValue - src);\n            } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint32 ma_atomic_fetch_sub_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n            ma_uint32 oldValue;\n            ma_uint32 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue - src;\n            } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint64 ma_atomic_fetch_sub_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            ma_uint64 oldValue;\n            ma_uint64 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue - src;\n            } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint8 ma_atomic_fetch_and_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n            ma_uint8 oldValue;\n            ma_uint8 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint8)(oldValue & src);\n            } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint16 ma_atomic_fetch_and_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n            ma_uint16 oldValue;\n            ma_uint16 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint16)(oldValue & src);\n            } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint32 ma_atomic_fetch_and_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n            ma_uint32 oldValue;\n            ma_uint32 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue & src;\n            } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint64 ma_atomic_fetch_and_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            ma_uint64 oldValue;\n            ma_uint64 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue & src;\n            } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint8 ma_atomic_fetch_xor_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n            ma_uint8 oldValue;\n            ma_uint8 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint8)(oldValue ^ src);\n            } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint16 ma_atomic_fetch_xor_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n            ma_uint16 oldValue;\n            ma_uint16 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint16)(oldValue ^ src);\n            } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint32 ma_atomic_fetch_xor_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n            ma_uint32 oldValue;\n            ma_uint32 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue ^ src;\n            } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint64 ma_atomic_fetch_xor_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            ma_uint64 oldValue;\n            ma_uint64 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue ^ src;\n            } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint8 ma_atomic_fetch_or_explicit_8(volatile ma_uint8* dst, ma_uint8 src, ma_atomic_memory_order order)\n        {\n            ma_uint8 oldValue;\n            ma_uint8 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint8)(oldValue | src);\n            } while (ma_atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint16 ma_atomic_fetch_or_explicit_16(volatile ma_uint16* dst, ma_uint16 src, ma_atomic_memory_order order)\n        {\n            ma_uint16 oldValue;\n            ma_uint16 newValue;\n            do {\n                oldValue = *dst;\n                newValue = (ma_uint16)(oldValue | src);\n            } while (ma_atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint32 ma_atomic_fetch_or_explicit_32(volatile ma_uint32* dst, ma_uint32 src, ma_atomic_memory_order order)\n        {\n            ma_uint32 oldValue;\n            ma_uint32 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue | src;\n            } while (ma_atomic_compare_and_swap_32(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n        static MA_INLINE ma_uint64 ma_atomic_fetch_or_explicit_64(volatile ma_uint64* dst, ma_uint64 src, ma_atomic_memory_order order)\n        {\n            ma_uint64 oldValue;\n            ma_uint64 newValue;\n            do {\n                oldValue = *dst;\n                newValue = oldValue | src;\n            } while (ma_atomic_compare_and_swap_64(dst, oldValue, newValue) != oldValue);\n            (void)order;\n            return oldValue;\n        }\n    #endif\n    #define ma_atomic_signal_fence(order)                           ma_atomic_thread_fence(order)\n    static MA_INLINE ma_uint8 ma_atomic_load_explicit_8(volatile const ma_uint8* ptr, ma_atomic_memory_order order)\n    {\n        (void)order;\n        return ma_atomic_compare_and_swap_8((ma_uint8*)ptr, 0, 0);\n    }\n    static MA_INLINE ma_uint16 ma_atomic_load_explicit_16(volatile const ma_uint16* ptr, ma_atomic_memory_order order)\n    {\n        (void)order;\n        return ma_atomic_compare_and_swap_16((ma_uint16*)ptr, 0, 0);\n    }\n    static MA_INLINE ma_uint32 ma_atomic_load_explicit_32(volatile const ma_uint32* ptr, ma_atomic_memory_order order)\n    {\n        (void)order;\n        return ma_atomic_compare_and_swap_32((ma_uint32*)ptr, 0, 0);\n    }\n    static MA_INLINE ma_uint64 ma_atomic_load_explicit_64(volatile const ma_uint64* ptr, ma_atomic_memory_order order)\n    {\n        (void)order;\n        return ma_atomic_compare_and_swap_64((ma_uint64*)ptr, 0, 0);\n    }\n    #define ma_atomic_store_explicit_8( dst, src, order)            (void)ma_atomic_exchange_explicit_8 (dst, src, order)\n    #define ma_atomic_store_explicit_16(dst, src, order)            (void)ma_atomic_exchange_explicit_16(dst, src, order)\n    #define ma_atomic_store_explicit_32(dst, src, order)            (void)ma_atomic_exchange_explicit_32(dst, src, order)\n    #define ma_atomic_store_explicit_64(dst, src, order)            (void)ma_atomic_exchange_explicit_64(dst, src, order)\n    #define ma_atomic_test_and_set_explicit_8( dst, order)          ma_atomic_exchange_explicit_8 (dst, 1, order)\n    #define ma_atomic_test_and_set_explicit_16(dst, order)          ma_atomic_exchange_explicit_16(dst, 1, order)\n    #define ma_atomic_test_and_set_explicit_32(dst, order)          ma_atomic_exchange_explicit_32(dst, 1, order)\n    #define ma_atomic_test_and_set_explicit_64(dst, order)          ma_atomic_exchange_explicit_64(dst, 1, order)\n    #define ma_atomic_clear_explicit_8( dst, order)                 ma_atomic_store_explicit_8 (dst, 0, order)\n    #define ma_atomic_clear_explicit_16(dst, order)                 ma_atomic_store_explicit_16(dst, 0, order)\n    #define ma_atomic_clear_explicit_32(dst, order)                 ma_atomic_store_explicit_32(dst, 0, order)\n    #define ma_atomic_clear_explicit_64(dst, order)                 ma_atomic_store_explicit_64(dst, 0, order)\n    typedef ma_uint8 ma_atomic_flag;\n    #define ma_atomic_flag_test_and_set_explicit(ptr, order)        (ma_bool32)ma_atomic_test_and_set_explicit_8(ptr, order)\n    #define ma_atomic_flag_clear_explicit(ptr, order)               ma_atomic_clear_explicit_8(ptr, order)\n    #define c89atoimc_flag_load_explicit(ptr, order)                ma_atomic_load_explicit_8(ptr, order)\n#endif\n#if !defined(MA_ATOMIC_HAS_NATIVE_COMPARE_EXCHANGE)\n    #if defined(MA_ATOMIC_HAS_8)\n        static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_8(volatile ma_uint8* dst, ma_uint8* expected, ma_uint8 desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder)\n        {\n            ma_uint8 expectedValue;\n            ma_uint8 result;\n            (void)successOrder;\n            (void)failureOrder;\n            expectedValue = ma_atomic_load_explicit_8(expected, ma_atomic_memory_order_seq_cst);\n            result = ma_atomic_compare_and_swap_8(dst, expectedValue, desired);\n            if (result == expectedValue) {\n                return 1;\n            } else {\n                ma_atomic_store_explicit_8(expected, result, failureOrder);\n                return 0;\n            }\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_16)\n        static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_16(volatile ma_uint16* dst, ma_uint16* expected, ma_uint16 desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder)\n        {\n            ma_uint16 expectedValue;\n            ma_uint16 result;\n            (void)successOrder;\n            (void)failureOrder;\n            expectedValue = ma_atomic_load_explicit_16(expected, ma_atomic_memory_order_seq_cst);\n            result = ma_atomic_compare_and_swap_16(dst, expectedValue, desired);\n            if (result == expectedValue) {\n                return 1;\n            } else {\n                ma_atomic_store_explicit_16(expected, result, failureOrder);\n                return 0;\n            }\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_32)\n        static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_32(volatile ma_uint32* dst, ma_uint32* expected, ma_uint32 desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder)\n        {\n            ma_uint32 expectedValue;\n            ma_uint32 result;\n            (void)successOrder;\n            (void)failureOrder;\n            expectedValue = ma_atomic_load_explicit_32(expected, ma_atomic_memory_order_seq_cst);\n            result = ma_atomic_compare_and_swap_32(dst, expectedValue, desired);\n            if (result == expectedValue) {\n                return 1;\n            } else {\n                ma_atomic_store_explicit_32(expected, result, failureOrder);\n                return 0;\n            }\n        }\n    #endif\n    #if defined(MA_ATOMIC_HAS_64)\n        static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_64(volatile ma_uint64* dst, volatile ma_uint64* expected, ma_uint64 desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder)\n        {\n            ma_uint64 expectedValue;\n            ma_uint64 result;\n            (void)successOrder;\n            (void)failureOrder;\n            expectedValue = ma_atomic_load_explicit_64(expected, ma_atomic_memory_order_seq_cst);\n            result = ma_atomic_compare_and_swap_64(dst, expectedValue, desired);\n            if (result == expectedValue) {\n                return 1;\n            } else {\n                ma_atomic_store_explicit_64(expected, result, failureOrder);\n                return 0;\n            }\n        }\n    #endif\n    #define ma_atomic_compare_exchange_weak_explicit_8( dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_8 (dst, expected, desired, successOrder, failureOrder)\n    #define ma_atomic_compare_exchange_weak_explicit_16(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_16(dst, expected, desired, successOrder, failureOrder)\n    #define ma_atomic_compare_exchange_weak_explicit_32(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_32(dst, expected, desired, successOrder, failureOrder)\n    #define ma_atomic_compare_exchange_weak_explicit_64(dst, expected, desired, successOrder, failureOrder) ma_atomic_compare_exchange_strong_explicit_64(dst, expected, desired, successOrder, failureOrder)\n#endif\n#if !defined(MA_ATOMIC_HAS_NATIVE_IS_LOCK_FREE)\n    static MA_INLINE ma_bool32 ma_atomic_is_lock_free_8(volatile void* ptr)\n    {\n        (void)ptr;\n        return 1;\n    }\n    static MA_INLINE ma_bool32 ma_atomic_is_lock_free_16(volatile void* ptr)\n    {\n        (void)ptr;\n        return 1;\n    }\n    static MA_INLINE ma_bool32 ma_atomic_is_lock_free_32(volatile void* ptr)\n    {\n        (void)ptr;\n        return 1;\n    }\n    static MA_INLINE ma_bool32 ma_atomic_is_lock_free_64(volatile void* ptr)\n    {\n        (void)ptr;\n    #if defined(MA_64BIT)\n        return 1;\n    #else\n        #if defined(MA_X86) || defined(MA_X64)\n            return 1;\n        #else\n            return 0;\n        #endif\n    #endif\n    }\n#endif\n#if defined(MA_64BIT)\n    static MA_INLINE ma_bool32 ma_atomic_is_lock_free_ptr(volatile void** ptr)\n    {\n        return ma_atomic_is_lock_free_64((volatile ma_uint64*)ptr);\n    }\n    static MA_INLINE void* ma_atomic_load_explicit_ptr(volatile void** ptr, ma_atomic_memory_order order)\n    {\n        return (void*)ma_atomic_load_explicit_64((volatile ma_uint64*)ptr, order);\n    }\n    static MA_INLINE void ma_atomic_store_explicit_ptr(volatile void** dst, void* src, ma_atomic_memory_order order)\n    {\n        ma_atomic_store_explicit_64((volatile ma_uint64*)dst, (ma_uint64)src, order);\n    }\n    static MA_INLINE void* ma_atomic_exchange_explicit_ptr(volatile void** dst, void* src, ma_atomic_memory_order order)\n    {\n        return (void*)ma_atomic_exchange_explicit_64((volatile ma_uint64*)dst, (ma_uint64)src, order);\n    }\n    static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_ptr(volatile void** dst, void** expected, void* desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder)\n    {\n        return ma_atomic_compare_exchange_strong_explicit_64((volatile ma_uint64*)dst, (ma_uint64*)expected, (ma_uint64)desired, successOrder, failureOrder);\n    }\n    static MA_INLINE ma_bool32 ma_atomic_compare_exchange_weak_explicit_ptr(volatile void** dst, void** expected, void* desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder)\n    {\n        return ma_atomic_compare_exchange_weak_explicit_64((volatile ma_uint64*)dst, (ma_uint64*)expected, (ma_uint64)desired, successOrder, failureOrder);\n    }\n    static MA_INLINE void* ma_atomic_compare_and_swap_ptr(volatile void** dst, void* expected, void* desired)\n    {\n        return (void*)ma_atomic_compare_and_swap_64((volatile ma_uint64*)dst, (ma_uint64)expected, (ma_uint64)desired);\n    }\n#elif defined(MA_32BIT)\n    static MA_INLINE ma_bool32 ma_atomic_is_lock_free_ptr(volatile void** ptr)\n    {\n        return ma_atomic_is_lock_free_32((volatile ma_uint32*)ptr);\n    }\n    static MA_INLINE void* ma_atomic_load_explicit_ptr(volatile void** ptr, ma_atomic_memory_order order)\n    {\n        return (void*)ma_atomic_load_explicit_32((volatile ma_uint32*)ptr, order);\n    }\n    static MA_INLINE void ma_atomic_store_explicit_ptr(volatile void** dst, void* src, ma_atomic_memory_order order)\n    {\n        ma_atomic_store_explicit_32((volatile ma_uint32*)dst, (ma_uint32)src, order);\n    }\n    static MA_INLINE void* ma_atomic_exchange_explicit_ptr(volatile void** dst, void* src, ma_atomic_memory_order order)\n    {\n        return (void*)ma_atomic_exchange_explicit_32((volatile ma_uint32*)dst, (ma_uint32)src, order);\n    }\n    static MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_ptr(volatile void** dst, void** expected, void* desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder)\n    {\n        return ma_atomic_compare_exchange_strong_explicit_32((volatile ma_uint32*)dst, (ma_uint32*)expected, (ma_uint32)desired, successOrder, failureOrder);\n    }\n    static MA_INLINE ma_bool32 ma_atomic_compare_exchange_weak_explicit_ptr(volatile void** dst, void** expected, void* desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder)\n    {\n        return ma_atomic_compare_exchange_weak_explicit_32((volatile ma_uint32*)dst, (ma_uint32*)expected, (ma_uint32)desired, successOrder, failureOrder);\n    }\n    static MA_INLINE void* ma_atomic_compare_and_swap_ptr(volatile void** dst, void* expected, void* desired)\n    {\n        return (void*)ma_atomic_compare_and_swap_32((volatile ma_uint32*)dst, (ma_uint32)expected, (ma_uint32)desired);\n    }\n#else\n    #error Unsupported architecture.\n#endif\n#define ma_atomic_flag_test_and_set(ptr)                                ma_atomic_flag_test_and_set_explicit(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_flag_clear(ptr)                                       ma_atomic_flag_clear_explicit(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_store_ptr(dst, src)                                   ma_atomic_store_explicit_ptr((volatile void**)dst, (void*)src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_load_ptr(ptr)                                         ma_atomic_load_explicit_ptr((volatile void**)ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_exchange_ptr(dst, src)                                ma_atomic_exchange_explicit_ptr((volatile void**)dst, (void*)src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_strong_ptr(dst, expected, desired)   ma_atomic_compare_exchange_strong_explicit_ptr((volatile void**)dst, (void**)expected, (void*)desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_weak_ptr(dst, expected, desired)     ma_atomic_compare_exchange_weak_explicit_ptr((volatile void**)dst, (void**)expected, (void*)desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_test_and_set_8( ptr)                                  ma_atomic_test_and_set_explicit_8( ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_test_and_set_16(ptr)                                  ma_atomic_test_and_set_explicit_16(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_test_and_set_32(ptr)                                  ma_atomic_test_and_set_explicit_32(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_test_and_set_64(ptr)                                  ma_atomic_test_and_set_explicit_64(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_clear_8( ptr)                                         ma_atomic_clear_explicit_8( ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_clear_16(ptr)                                         ma_atomic_clear_explicit_16(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_clear_32(ptr)                                         ma_atomic_clear_explicit_32(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_clear_64(ptr)                                         ma_atomic_clear_explicit_64(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_store_8( dst, src)                                    ma_atomic_store_explicit_8( dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_store_16(dst, src)                                    ma_atomic_store_explicit_16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_store_32(dst, src)                                    ma_atomic_store_explicit_32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_store_64(dst, src)                                    ma_atomic_store_explicit_64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_load_8( ptr)                                          ma_atomic_load_explicit_8( ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_load_16(ptr)                                          ma_atomic_load_explicit_16(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_load_32(ptr)                                          ma_atomic_load_explicit_32(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_load_64(ptr)                                          ma_atomic_load_explicit_64(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_exchange_8( dst, src)                                 ma_atomic_exchange_explicit_8( dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_exchange_16(dst, src)                                 ma_atomic_exchange_explicit_16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_exchange_32(dst, src)                                 ma_atomic_exchange_explicit_32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_exchange_64(dst, src)                                 ma_atomic_exchange_explicit_64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_strong_8( dst, expected, desired)    ma_atomic_compare_exchange_strong_explicit_8( dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_strong_16(dst, expected, desired)    ma_atomic_compare_exchange_strong_explicit_16(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_strong_32(dst, expected, desired)    ma_atomic_compare_exchange_strong_explicit_32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_strong_64(dst, expected, desired)    ma_atomic_compare_exchange_strong_explicit_64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_weak_8(  dst, expected, desired)     ma_atomic_compare_exchange_weak_explicit_8( dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_weak_16( dst, expected, desired)     ma_atomic_compare_exchange_weak_explicit_16(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_weak_32( dst, expected, desired)     ma_atomic_compare_exchange_weak_explicit_32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_weak_64( dst, expected, desired)     ma_atomic_compare_exchange_weak_explicit_64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_add_8( dst, src)                                ma_atomic_fetch_add_explicit_8( dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_add_16(dst, src)                                ma_atomic_fetch_add_explicit_16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_add_32(dst, src)                                ma_atomic_fetch_add_explicit_32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_add_64(dst, src)                                ma_atomic_fetch_add_explicit_64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_sub_8( dst, src)                                ma_atomic_fetch_sub_explicit_8( dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_sub_16(dst, src)                                ma_atomic_fetch_sub_explicit_16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_sub_32(dst, src)                                ma_atomic_fetch_sub_explicit_32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_sub_64(dst, src)                                ma_atomic_fetch_sub_explicit_64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_or_8( dst, src)                                 ma_atomic_fetch_or_explicit_8( dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_or_16(dst, src)                                 ma_atomic_fetch_or_explicit_16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_or_32(dst, src)                                 ma_atomic_fetch_or_explicit_32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_or_64(dst, src)                                 ma_atomic_fetch_or_explicit_64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_xor_8( dst, src)                                ma_atomic_fetch_xor_explicit_8( dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_xor_16(dst, src)                                ma_atomic_fetch_xor_explicit_16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_xor_32(dst, src)                                ma_atomic_fetch_xor_explicit_32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_xor_64(dst, src)                                ma_atomic_fetch_xor_explicit_64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_and_8( dst, src)                                ma_atomic_fetch_and_explicit_8 (dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_and_16(dst, src)                                ma_atomic_fetch_and_explicit_16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_and_32(dst, src)                                ma_atomic_fetch_and_explicit_32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_and_64(dst, src)                                ma_atomic_fetch_and_explicit_64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_test_and_set_explicit_i8( ptr, order)                 (ma_int8 )ma_atomic_test_and_set_explicit_8( (ma_uint8* )ptr, order)\n#define ma_atomic_test_and_set_explicit_i16(ptr, order)                 (ma_int16)ma_atomic_test_and_set_explicit_16((ma_uint16*)ptr, order)\n#define ma_atomic_test_and_set_explicit_i32(ptr, order)                 (ma_int32)ma_atomic_test_and_set_explicit_32((ma_uint32*)ptr, order)\n#define ma_atomic_test_and_set_explicit_i64(ptr, order)                 (ma_int64)ma_atomic_test_and_set_explicit_64((ma_uint64*)ptr, order)\n#define ma_atomic_clear_explicit_i8( ptr, order)                        ma_atomic_clear_explicit_8( (ma_uint8* )ptr, order)\n#define ma_atomic_clear_explicit_i16(ptr, order)                        ma_atomic_clear_explicit_16((ma_uint16*)ptr, order)\n#define ma_atomic_clear_explicit_i32(ptr, order)                        ma_atomic_clear_explicit_32((ma_uint32*)ptr, order)\n#define ma_atomic_clear_explicit_i64(ptr, order)                        ma_atomic_clear_explicit_64((ma_uint64*)ptr, order)\n#define ma_atomic_store_explicit_i8( dst, src, order)                   ma_atomic_store_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order)\n#define ma_atomic_store_explicit_i16(dst, src, order)                   ma_atomic_store_explicit_16((ma_uint16*)dst, (ma_uint16)src, order)\n#define ma_atomic_store_explicit_i32(dst, src, order)                   ma_atomic_store_explicit_32((ma_uint32*)dst, (ma_uint32)src, order)\n#define ma_atomic_store_explicit_i64(dst, src, order)                   ma_atomic_store_explicit_64((ma_uint64*)dst, (ma_uint64)src, order)\n#define ma_atomic_load_explicit_i8( ptr, order)                         (ma_int8 )ma_atomic_load_explicit_8( (ma_uint8* )ptr, order)\n#define ma_atomic_load_explicit_i16(ptr, order)                         (ma_int16)ma_atomic_load_explicit_16((ma_uint16*)ptr, order)\n#define ma_atomic_load_explicit_i32(ptr, order)                         (ma_int32)ma_atomic_load_explicit_32((ma_uint32*)ptr, order)\n#define ma_atomic_load_explicit_i64(ptr, order)                         (ma_int64)ma_atomic_load_explicit_64((ma_uint64*)ptr, order)\n#define ma_atomic_exchange_explicit_i8( dst, src, order)                (ma_int8 )ma_atomic_exchange_explicit_8 ((ma_uint8* )dst, (ma_uint8 )src, order)\n#define ma_atomic_exchange_explicit_i16(dst, src, order)                (ma_int16)ma_atomic_exchange_explicit_16((ma_uint16*)dst, (ma_uint16)src, order)\n#define ma_atomic_exchange_explicit_i32(dst, src, order)                (ma_int32)ma_atomic_exchange_explicit_32((ma_uint32*)dst, (ma_uint32)src, order)\n#define ma_atomic_exchange_explicit_i64(dst, src, order)                (ma_int64)ma_atomic_exchange_explicit_64((ma_uint64*)dst, (ma_uint64)src, order)\n#define ma_atomic_compare_exchange_strong_explicit_i8( dst, expected, desired, successOrder, failureOrder)  ma_atomic_compare_exchange_strong_explicit_8( (ma_uint8* )dst, (ma_uint8* )expected, (ma_uint8 )desired, successOrder, failureOrder)\n#define ma_atomic_compare_exchange_strong_explicit_i16(dst, expected, desired, successOrder, failureOrder)  ma_atomic_compare_exchange_strong_explicit_16((ma_uint16*)dst, (ma_uint16*)expected, (ma_uint16)desired, successOrder, failureOrder)\n#define ma_atomic_compare_exchange_strong_explicit_i32(dst, expected, desired, successOrder, failureOrder)  ma_atomic_compare_exchange_strong_explicit_32((ma_uint32*)dst, (ma_uint32*)expected, (ma_uint32)desired, successOrder, failureOrder)\n#define ma_atomic_compare_exchange_strong_explicit_i64(dst, expected, desired, successOrder, failureOrder)  ma_atomic_compare_exchange_strong_explicit_64((ma_uint64*)dst, (ma_uint64*)expected, (ma_uint64)desired, successOrder, failureOrder)\n#define ma_atomic_compare_exchange_weak_explicit_i8( dst, expected, desired, successOrder, failureOrder)    ma_atomic_compare_exchange_weak_explicit_8( (ma_uint8* )dst, (ma_uint8* )expected, (ma_uint8 )desired, successOrder, failureOrder)\n#define ma_atomic_compare_exchange_weak_explicit_i16(dst, expected, desired, successOrder, failureOrder)    ma_atomic_compare_exchange_weak_explicit_16((ma_uint16*)dst, (ma_uint16*)expected, (ma_uint16)desired, successOrder, failureOrder)\n#define ma_atomic_compare_exchange_weak_explicit_i32(dst, expected, desired, successOrder, failureOrder)    ma_atomic_compare_exchange_weak_explicit_32((ma_uint32*)dst, (ma_uint32*)expected, (ma_uint32)desired, successOrder, failureOrder)\n#define ma_atomic_compare_exchange_weak_explicit_i64(dst, expected, desired, successOrder, failureOrder)    ma_atomic_compare_exchange_weak_explicit_64((ma_uint64*)dst, (ma_uint64*)expected, (ma_uint64)desired, successOrder, failureOrder)\n#define ma_atomic_fetch_add_explicit_i8( dst, src, order)               (ma_int8 )ma_atomic_fetch_add_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order)\n#define ma_atomic_fetch_add_explicit_i16(dst, src, order)               (ma_int16)ma_atomic_fetch_add_explicit_16((ma_uint16*)dst, (ma_uint16)src, order)\n#define ma_atomic_fetch_add_explicit_i32(dst, src, order)               (ma_int32)ma_atomic_fetch_add_explicit_32((ma_uint32*)dst, (ma_uint32)src, order)\n#define ma_atomic_fetch_add_explicit_i64(dst, src, order)               (ma_int64)ma_atomic_fetch_add_explicit_64((ma_uint64*)dst, (ma_uint64)src, order)\n#define ma_atomic_fetch_sub_explicit_i8( dst, src, order)               (ma_int8 )ma_atomic_fetch_sub_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order)\n#define ma_atomic_fetch_sub_explicit_i16(dst, src, order)               (ma_int16)ma_atomic_fetch_sub_explicit_16((ma_uint16*)dst, (ma_uint16)src, order)\n#define ma_atomic_fetch_sub_explicit_i32(dst, src, order)               (ma_int32)ma_atomic_fetch_sub_explicit_32((ma_uint32*)dst, (ma_uint32)src, order)\n#define ma_atomic_fetch_sub_explicit_i64(dst, src, order)               (ma_int64)ma_atomic_fetch_sub_explicit_64((ma_uint64*)dst, (ma_uint64)src, order)\n#define ma_atomic_fetch_or_explicit_i8( dst, src, order)                (ma_int8 )ma_atomic_fetch_or_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order)\n#define ma_atomic_fetch_or_explicit_i16(dst, src, order)                (ma_int16)ma_atomic_fetch_or_explicit_16((ma_uint16*)dst, (ma_uint16)src, order)\n#define ma_atomic_fetch_or_explicit_i32(dst, src, order)                (ma_int32)ma_atomic_fetch_or_explicit_32((ma_uint32*)dst, (ma_uint32)src, order)\n#define ma_atomic_fetch_or_explicit_i64(dst, src, order)                (ma_int64)ma_atomic_fetch_or_explicit_64((ma_uint64*)dst, (ma_uint64)src, order)\n#define ma_atomic_fetch_xor_explicit_i8( dst, src, order)               (ma_int8 )ma_atomic_fetch_xor_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order)\n#define ma_atomic_fetch_xor_explicit_i16(dst, src, order)               (ma_int16)ma_atomic_fetch_xor_explicit_16((ma_uint16*)dst, (ma_uint16)src, order)\n#define ma_atomic_fetch_xor_explicit_i32(dst, src, order)               (ma_int32)ma_atomic_fetch_xor_explicit_32((ma_uint32*)dst, (ma_uint32)src, order)\n#define ma_atomic_fetch_xor_explicit_i64(dst, src, order)               (ma_int64)ma_atomic_fetch_xor_explicit_64((ma_uint64*)dst, (ma_uint64)src, order)\n#define ma_atomic_fetch_and_explicit_i8( dst, src, order)               (ma_int8 )ma_atomic_fetch_and_explicit_8( (ma_uint8* )dst, (ma_uint8 )src, order)\n#define ma_atomic_fetch_and_explicit_i16(dst, src, order)               (ma_int16)ma_atomic_fetch_and_explicit_16((ma_uint16*)dst, (ma_uint16)src, order)\n#define ma_atomic_fetch_and_explicit_i32(dst, src, order)               (ma_int32)ma_atomic_fetch_and_explicit_32((ma_uint32*)dst, (ma_uint32)src, order)\n#define ma_atomic_fetch_and_explicit_i64(dst, src, order)               (ma_int64)ma_atomic_fetch_and_explicit_64((ma_uint64*)dst, (ma_uint64)src, order)\n#define ma_atomic_test_and_set_i8( ptr)                                 ma_atomic_test_and_set_explicit_i8( ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_test_and_set_i16(ptr)                                 ma_atomic_test_and_set_explicit_i16(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_test_and_set_i32(ptr)                                 ma_atomic_test_and_set_explicit_i32(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_test_and_set_i64(ptr)                                 ma_atomic_test_and_set_explicit_i64(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_clear_i8( ptr)                                        ma_atomic_clear_explicit_i8( ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_clear_i16(ptr)                                        ma_atomic_clear_explicit_i16(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_clear_i32(ptr)                                        ma_atomic_clear_explicit_i32(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_clear_i64(ptr)                                        ma_atomic_clear_explicit_i64(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_store_i8( dst, src)                                   ma_atomic_store_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_store_i16(dst, src)                                   ma_atomic_store_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_store_i32(dst, src)                                   ma_atomic_store_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_store_i64(dst, src)                                   ma_atomic_store_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_load_i8( ptr)                                         ma_atomic_load_explicit_i8( ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_load_i16(ptr)                                         ma_atomic_load_explicit_i16(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_load_i32(ptr)                                         ma_atomic_load_explicit_i32(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_load_i64(ptr)                                         ma_atomic_load_explicit_i64(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_exchange_i8( dst, src)                                ma_atomic_exchange_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_exchange_i16(dst, src)                                ma_atomic_exchange_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_exchange_i32(dst, src)                                ma_atomic_exchange_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_exchange_i64(dst, src)                                ma_atomic_exchange_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_strong_i8( dst, expected, desired)   ma_atomic_compare_exchange_strong_explicit_i8( dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_strong_i16(dst, expected, desired)   ma_atomic_compare_exchange_strong_explicit_i16(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_strong_i32(dst, expected, desired)   ma_atomic_compare_exchange_strong_explicit_i32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_strong_i64(dst, expected, desired)   ma_atomic_compare_exchange_strong_explicit_i64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_weak_i8( dst, expected, desired)     ma_atomic_compare_exchange_weak_explicit_i8( dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_weak_i16(dst, expected, desired)     ma_atomic_compare_exchange_weak_explicit_i16(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_weak_i32(dst, expected, desired)     ma_atomic_compare_exchange_weak_explicit_i32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_weak_i64(dst, expected, desired)     ma_atomic_compare_exchange_weak_explicit_i64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_add_i8( dst, src)                               ma_atomic_fetch_add_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_add_i16(dst, src)                               ma_atomic_fetch_add_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_add_i32(dst, src)                               ma_atomic_fetch_add_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_add_i64(dst, src)                               ma_atomic_fetch_add_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_sub_i8( dst, src)                               ma_atomic_fetch_sub_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_sub_i16(dst, src)                               ma_atomic_fetch_sub_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_sub_i32(dst, src)                               ma_atomic_fetch_sub_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_sub_i64(dst, src)                               ma_atomic_fetch_sub_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_or_i8( dst, src)                                ma_atomic_fetch_or_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_or_i16(dst, src)                                ma_atomic_fetch_or_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_or_i32(dst, src)                                ma_atomic_fetch_or_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_or_i64(dst, src)                                ma_atomic_fetch_or_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_xor_i8( dst, src)                               ma_atomic_fetch_xor_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_xor_i16(dst, src)                               ma_atomic_fetch_xor_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_xor_i32(dst, src)                               ma_atomic_fetch_xor_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_xor_i64(dst, src)                               ma_atomic_fetch_xor_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_and_i8( dst, src)                               ma_atomic_fetch_and_explicit_i8( dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_and_i16(dst, src)                               ma_atomic_fetch_and_explicit_i16(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_and_i32(dst, src)                               ma_atomic_fetch_and_explicit_i32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_and_i64(dst, src)                               ma_atomic_fetch_and_explicit_i64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_and_swap_i8( dst, expected, dedsired)         (ma_int8 )ma_atomic_compare_and_swap_8( (ma_uint8* )dst, (ma_uint8 )expected, (ma_uint8 )dedsired)\n#define ma_atomic_compare_and_swap_i16(dst, expected, dedsired)         (ma_int16)ma_atomic_compare_and_swap_16((ma_uint16*)dst, (ma_uint16)expected, (ma_uint16)dedsired)\n#define ma_atomic_compare_and_swap_i32(dst, expected, dedsired)         (ma_int32)ma_atomic_compare_and_swap_32((ma_uint32*)dst, (ma_uint32)expected, (ma_uint32)dedsired)\n#define ma_atomic_compare_and_swap_i64(dst, expected, dedsired)         (ma_int64)ma_atomic_compare_and_swap_64((ma_uint64*)dst, (ma_uint64)expected, (ma_uint64)dedsired)\ntypedef union\n{\n    ma_uint32 i;\n    float f;\n} ma_atomic_if32;\ntypedef union\n{\n    ma_uint64 i;\n    double f;\n} ma_atomic_if64;\n#define ma_atomic_clear_explicit_f32(ptr, order)                        ma_atomic_clear_explicit_32((ma_uint32*)ptr, order)\n#define ma_atomic_clear_explicit_f64(ptr, order)                        ma_atomic_clear_explicit_64((ma_uint64*)ptr, order)\nstatic MA_INLINE void ma_atomic_store_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order)\n{\n    ma_atomic_if32 x;\n    x.f = src;\n    ma_atomic_store_explicit_32((volatile ma_uint32*)dst, x.i, order);\n}\nstatic MA_INLINE void ma_atomic_store_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order)\n{\n    ma_atomic_if64 x;\n    x.f = src;\n    ma_atomic_store_explicit_64((volatile ma_uint64*)dst, x.i, order);\n}\nstatic MA_INLINE float ma_atomic_load_explicit_f32(volatile const float* ptr, ma_atomic_memory_order order)\n{\n    ma_atomic_if32 r;\n    r.i = ma_atomic_load_explicit_32((volatile const ma_uint32*)ptr, order);\n    return r.f;\n}\nstatic MA_INLINE double ma_atomic_load_explicit_f64(volatile const double* ptr, ma_atomic_memory_order order)\n{\n    ma_atomic_if64 r;\n    r.i = ma_atomic_load_explicit_64((volatile const ma_uint64*)ptr, order);\n    return r.f;\n}\nstatic MA_INLINE float ma_atomic_exchange_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order)\n{\n    ma_atomic_if32 r;\n    ma_atomic_if32 x;\n    x.f = src;\n    r.i = ma_atomic_exchange_explicit_32((volatile ma_uint32*)dst, x.i, order);\n    return r.f;\n}\nstatic MA_INLINE double ma_atomic_exchange_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order)\n{\n    ma_atomic_if64 r;\n    ma_atomic_if64 x;\n    x.f = src;\n    r.i = ma_atomic_exchange_explicit_64((volatile ma_uint64*)dst, x.i, order);\n    return r.f;\n}\nstatic MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_f32(volatile float* dst, float* expected, float desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder)\n{\n    ma_atomic_if32 d;\n    d.f = desired;\n    return ma_atomic_compare_exchange_strong_explicit_32((volatile ma_uint32*)dst, (ma_uint32*)expected, d.i, successOrder, failureOrder);\n}\nstatic MA_INLINE ma_bool32 ma_atomic_compare_exchange_strong_explicit_f64(volatile double* dst, double* expected, double desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder)\n{\n    ma_atomic_if64 d;\n    d.f = desired;\n    return ma_atomic_compare_exchange_strong_explicit_64((volatile ma_uint64*)dst, (ma_uint64*)expected, d.i, successOrder, failureOrder);\n}\nstatic MA_INLINE ma_bool32 ma_atomic_compare_exchange_weak_explicit_f32(volatile float* dst, float* expected, float desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder)\n{\n    ma_atomic_if32 d;\n    d.f = desired;\n    return ma_atomic_compare_exchange_weak_explicit_32((volatile ma_uint32*)dst, (ma_uint32*)expected, d.i, successOrder, failureOrder);\n}\nstatic MA_INLINE ma_bool32 ma_atomic_compare_exchange_weak_explicit_f64(volatile double* dst, double* expected, double desired, ma_atomic_memory_order successOrder, ma_atomic_memory_order failureOrder)\n{\n    ma_atomic_if64 d;\n    d.f = desired;\n    return ma_atomic_compare_exchange_weak_explicit_64((volatile ma_uint64*)dst, (ma_uint64*)expected, d.i, successOrder, failureOrder);\n}\nstatic MA_INLINE float ma_atomic_fetch_add_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order)\n{\n    ma_atomic_if32 r;\n    ma_atomic_if32 x;\n    x.f = src;\n    r.i = ma_atomic_fetch_add_explicit_32((volatile ma_uint32*)dst, x.i, order);\n    return r.f;\n}\nstatic MA_INLINE double ma_atomic_fetch_add_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order)\n{\n    ma_atomic_if64 r;\n    ma_atomic_if64 x;\n    x.f = src;\n    r.i = ma_atomic_fetch_add_explicit_64((volatile ma_uint64*)dst, x.i, order);\n    return r.f;\n}\nstatic MA_INLINE float ma_atomic_fetch_sub_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order)\n{\n    ma_atomic_if32 r;\n    ma_atomic_if32 x;\n    x.f = src;\n    r.i = ma_atomic_fetch_sub_explicit_32((volatile ma_uint32*)dst, x.i, order);\n    return r.f;\n}\nstatic MA_INLINE double ma_atomic_fetch_sub_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order)\n{\n    ma_atomic_if64 r;\n    ma_atomic_if64 x;\n    x.f = src;\n    r.i = ma_atomic_fetch_sub_explicit_64((volatile ma_uint64*)dst, x.i, order);\n    return r.f;\n}\nstatic MA_INLINE float ma_atomic_fetch_or_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order)\n{\n    ma_atomic_if32 r;\n    ma_atomic_if32 x;\n    x.f = src;\n    r.i = ma_atomic_fetch_or_explicit_32((volatile ma_uint32*)dst, x.i, order);\n    return r.f;\n}\nstatic MA_INLINE double ma_atomic_fetch_or_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order)\n{\n    ma_atomic_if64 r;\n    ma_atomic_if64 x;\n    x.f = src;\n    r.i = ma_atomic_fetch_or_explicit_64((volatile ma_uint64*)dst, x.i, order);\n    return r.f;\n}\nstatic MA_INLINE float ma_atomic_fetch_xor_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order)\n{\n    ma_atomic_if32 r;\n    ma_atomic_if32 x;\n    x.f = src;\n    r.i = ma_atomic_fetch_xor_explicit_32((volatile ma_uint32*)dst, x.i, order);\n    return r.f;\n}\nstatic MA_INLINE double ma_atomic_fetch_xor_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order)\n{\n    ma_atomic_if64 r;\n    ma_atomic_if64 x;\n    x.f = src;\n    r.i = ma_atomic_fetch_xor_explicit_64((volatile ma_uint64*)dst, x.i, order);\n    return r.f;\n}\nstatic MA_INLINE float ma_atomic_fetch_and_explicit_f32(volatile float* dst, float src, ma_atomic_memory_order order)\n{\n    ma_atomic_if32 r;\n    ma_atomic_if32 x;\n    x.f = src;\n    r.i = ma_atomic_fetch_and_explicit_32((volatile ma_uint32*)dst, x.i, order);\n    return r.f;\n}\nstatic MA_INLINE double ma_atomic_fetch_and_explicit_f64(volatile double* dst, double src, ma_atomic_memory_order order)\n{\n    ma_atomic_if64 r;\n    ma_atomic_if64 x;\n    x.f = src;\n    r.i = ma_atomic_fetch_and_explicit_64((volatile ma_uint64*)dst, x.i, order);\n    return r.f;\n}\n#define ma_atomic_clear_f32(ptr)                                        (float )ma_atomic_clear_explicit_f32(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_clear_f64(ptr)                                        (double)ma_atomic_clear_explicit_f64(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_store_f32(dst, src)                                   ma_atomic_store_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_store_f64(dst, src)                                   ma_atomic_store_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_load_f32(ptr)                                         (float )ma_atomic_load_explicit_f32(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_load_f64(ptr)                                         (double)ma_atomic_load_explicit_f64(ptr, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_exchange_f32(dst, src)                                (float )ma_atomic_exchange_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_exchange_f64(dst, src)                                (double)ma_atomic_exchange_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_strong_f32(dst, expected, desired)   ma_atomic_compare_exchange_strong_explicit_f32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_strong_f64(dst, expected, desired)   ma_atomic_compare_exchange_strong_explicit_f64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_weak_f32(dst, expected, desired)     ma_atomic_compare_exchange_weak_explicit_f32(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_compare_exchange_weak_f64(dst, expected, desired)     ma_atomic_compare_exchange_weak_explicit_f64(dst, expected, desired, ma_atomic_memory_order_seq_cst, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_add_f32(dst, src)                               ma_atomic_fetch_add_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_add_f64(dst, src)                               ma_atomic_fetch_add_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_sub_f32(dst, src)                               ma_atomic_fetch_sub_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_sub_f64(dst, src)                               ma_atomic_fetch_sub_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_or_f32(dst, src)                                ma_atomic_fetch_or_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_or_f64(dst, src)                                ma_atomic_fetch_or_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_xor_f32(dst, src)                               ma_atomic_fetch_xor_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_xor_f64(dst, src)                               ma_atomic_fetch_xor_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_and_f32(dst, src)                               ma_atomic_fetch_and_explicit_f32(dst, src, ma_atomic_memory_order_seq_cst)\n#define ma_atomic_fetch_and_f64(dst, src)                               ma_atomic_fetch_and_explicit_f64(dst, src, ma_atomic_memory_order_seq_cst)\nstatic MA_INLINE float ma_atomic_compare_and_swap_f32(volatile float* dst, float expected, float desired)\n{\n    ma_atomic_if32 r;\n    ma_atomic_if32 e, d;\n    e.f = expected;\n    d.f = desired;\n    r.i = ma_atomic_compare_and_swap_32((volatile ma_uint32*)dst, e.i, d.i);\n    return r.f;\n}\nstatic MA_INLINE double ma_atomic_compare_and_swap_f64(volatile double* dst, double expected, double desired)\n{\n    ma_atomic_if64 r;\n    ma_atomic_if64 e, d;\n    e.f = expected;\n    d.f = desired;\n    r.i = ma_atomic_compare_and_swap_64((volatile ma_uint64*)dst, e.i, d.i);\n    return r.f;\n}\ntypedef ma_atomic_flag ma_atomic_spinlock;\nstatic MA_INLINE void ma_atomic_spinlock_lock(volatile ma_atomic_spinlock* pSpinlock)\n{\n    for (;;) {\n        if (ma_atomic_flag_test_and_set_explicit(pSpinlock, ma_atomic_memory_order_acquire) == 0) {\n            break;\n        }\n        while (c89atoimc_flag_load_explicit(pSpinlock, ma_atomic_memory_order_relaxed) == 1) {\n        }\n    }\n}\nstatic MA_INLINE void ma_atomic_spinlock_unlock(volatile ma_atomic_spinlock* pSpinlock)\n{\n    ma_atomic_flag_clear_explicit(pSpinlock, ma_atomic_memory_order_release);\n}\n#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))\n    #pragma GCC diagnostic pop\n#endif\n#if defined(__cplusplus)\n}\n#endif\n#endif\n/* ma_atomic.h end */\n\n#define MA_ATOMIC_SAFE_TYPE_IMPL(c89TypeExtension, type) \\\n    static MA_INLINE ma_##type ma_atomic_##type##_get(ma_atomic_##type* x) \\\n    { \\\n        return (ma_##type)ma_atomic_load_##c89TypeExtension(&x->value); \\\n    } \\\n    static MA_INLINE void ma_atomic_##type##_set(ma_atomic_##type* x, ma_##type value) \\\n    { \\\n        ma_atomic_store_##c89TypeExtension(&x->value, value); \\\n    } \\\n    static MA_INLINE ma_##type ma_atomic_##type##_exchange(ma_atomic_##type* x, ma_##type value) \\\n    { \\\n        return (ma_##type)ma_atomic_exchange_##c89TypeExtension(&x->value, value); \\\n    } \\\n    static MA_INLINE ma_bool32 ma_atomic_##type##_compare_exchange(ma_atomic_##type* x, ma_##type* expected, ma_##type desired) \\\n    { \\\n        return ma_atomic_compare_exchange_weak_##c89TypeExtension(&x->value, expected, desired); \\\n    } \\\n    static MA_INLINE ma_##type ma_atomic_##type##_fetch_add(ma_atomic_##type* x, ma_##type y) \\\n    { \\\n        return (ma_##type)ma_atomic_fetch_add_##c89TypeExtension(&x->value, y); \\\n    } \\\n    static MA_INLINE ma_##type ma_atomic_##type##_fetch_sub(ma_atomic_##type* x, ma_##type y) \\\n    { \\\n        return (ma_##type)ma_atomic_fetch_sub_##c89TypeExtension(&x->value, y); \\\n    } \\\n    static MA_INLINE ma_##type ma_atomic_##type##_fetch_or(ma_atomic_##type* x, ma_##type y) \\\n    { \\\n        return (ma_##type)ma_atomic_fetch_or_##c89TypeExtension(&x->value, y); \\\n    } \\\n    static MA_INLINE ma_##type ma_atomic_##type##_fetch_xor(ma_atomic_##type* x, ma_##type y) \\\n    { \\\n        return (ma_##type)ma_atomic_fetch_xor_##c89TypeExtension(&x->value, y); \\\n    } \\\n    static MA_INLINE ma_##type ma_atomic_##type##_fetch_and(ma_atomic_##type* x, ma_##type y) \\\n    { \\\n        return (ma_##type)ma_atomic_fetch_and_##c89TypeExtension(&x->value, y); \\\n    } \\\n    static MA_INLINE ma_##type ma_atomic_##type##_compare_and_swap(ma_atomic_##type* x, ma_##type expected, ma_##type desired) \\\n    { \\\n        return (ma_##type)ma_atomic_compare_and_swap_##c89TypeExtension(&x->value, expected, desired); \\\n    } \\\n\n#define MA_ATOMIC_SAFE_TYPE_IMPL_PTR(type) \\\n    static MA_INLINE ma_##type* ma_atomic_ptr_##type##_get(ma_atomic_ptr_##type* x) \\\n    { \\\n        return ma_atomic_load_ptr((void**)&x->value); \\\n    } \\\n    static MA_INLINE void ma_atomic_ptr_##type##_set(ma_atomic_ptr_##type* x, ma_##type* value) \\\n    { \\\n        ma_atomic_store_ptr((void**)&x->value, (void*)value); \\\n    } \\\n    static MA_INLINE ma_##type* ma_atomic_ptr_##type##_exchange(ma_atomic_ptr_##type* x, ma_##type* value) \\\n    { \\\n        return ma_atomic_exchange_ptr((void**)&x->value, (void*)value); \\\n    } \\\n    static MA_INLINE ma_bool32 ma_atomic_ptr_##type##_compare_exchange(ma_atomic_ptr_##type* x, ma_##type** expected, ma_##type* desired) \\\n    { \\\n        return ma_atomic_compare_exchange_weak_ptr((void**)&x->value, (void*)expected, (void*)desired); \\\n    } \\\n    static MA_INLINE ma_##type* ma_atomic_ptr_##type##_compare_and_swap(ma_atomic_ptr_##type* x, ma_##type* expected, ma_##type* desired) \\\n    { \\\n        return (ma_##type*)ma_atomic_compare_and_swap_ptr((void**)&x->value, (void*)expected, (void*)desired); \\\n    } \\\n\nMA_ATOMIC_SAFE_TYPE_IMPL(32,  uint32)\nMA_ATOMIC_SAFE_TYPE_IMPL(i32, int32)\nMA_ATOMIC_SAFE_TYPE_IMPL(64,  uint64)\nMA_ATOMIC_SAFE_TYPE_IMPL(f32, float)\nMA_ATOMIC_SAFE_TYPE_IMPL(32,  bool32)\n\n#if !defined(MA_NO_DEVICE_IO)\nMA_ATOMIC_SAFE_TYPE_IMPL(i32, device_state)\n#endif\n\n\nMA_API ma_uint64 ma_calculate_frame_count_after_resampling(ma_uint32 sampleRateOut, ma_uint32 sampleRateIn, ma_uint64 frameCountIn)\n{\n    /* This is based on the calculation in ma_linear_resampler_get_expected_output_frame_count(). */\n    ma_uint64 outputFrameCount;\n    ma_uint64 preliminaryInputFrameCountFromFrac;\n    ma_uint64 preliminaryInputFrameCount;\n\n    if (sampleRateIn == 0 || sampleRateOut == 0 || frameCountIn == 0) {\n        return 0;\n    }\n\n    if (sampleRateOut == sampleRateIn) {\n        return frameCountIn;\n    }\n\n    outputFrameCount = (frameCountIn * sampleRateOut) / sampleRateIn;\n\n    preliminaryInputFrameCountFromFrac = (outputFrameCount * (sampleRateIn / sampleRateOut)) / sampleRateOut;\n    preliminaryInputFrameCount         = (outputFrameCount * (sampleRateIn % sampleRateOut)) + preliminaryInputFrameCountFromFrac;\n\n    if (preliminaryInputFrameCount <= frameCountIn) {\n        outputFrameCount += 1;\n    }\n\n    return outputFrameCount;\n}\n\n#ifndef MA_DATA_CONVERTER_STACK_BUFFER_SIZE\n#define MA_DATA_CONVERTER_STACK_BUFFER_SIZE     4096\n#endif\n\n\n\n#if defined(MA_WIN32)\nstatic ma_result ma_result_from_GetLastError(DWORD error)\n{\n    switch (error)\n    {\n        case ERROR_SUCCESS:             return MA_SUCCESS;\n        case ERROR_PATH_NOT_FOUND:      return MA_DOES_NOT_EXIST;\n        case ERROR_TOO_MANY_OPEN_FILES: return MA_TOO_MANY_OPEN_FILES;\n        case ERROR_NOT_ENOUGH_MEMORY:   return MA_OUT_OF_MEMORY;\n        case ERROR_DISK_FULL:           return MA_NO_SPACE;\n        case ERROR_HANDLE_EOF:          return MA_AT_END;\n        case ERROR_NEGATIVE_SEEK:       return MA_BAD_SEEK;\n        case ERROR_INVALID_PARAMETER:   return MA_INVALID_ARGS;\n        case ERROR_ACCESS_DENIED:       return MA_ACCESS_DENIED;\n        case ERROR_SEM_TIMEOUT:         return MA_TIMEOUT;\n        case ERROR_FILE_NOT_FOUND:      return MA_DOES_NOT_EXIST;\n        default: break;\n    }\n\n    return MA_ERROR;\n}\n#endif  /* MA_WIN32 */\n\n\n/*******************************************************************************\n\nThreading\n\n*******************************************************************************/\nstatic MA_INLINE ma_result ma_spinlock_lock_ex(volatile ma_spinlock* pSpinlock, ma_bool32 yield)\n{\n    if (pSpinlock == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    for (;;) {\n        if (ma_atomic_exchange_explicit_32(pSpinlock, 1, ma_atomic_memory_order_acquire) == 0) {\n            break;\n        }\n\n        while (ma_atomic_load_explicit_32(pSpinlock, ma_atomic_memory_order_relaxed) == 1) {\n            if (yield) {\n                ma_yield();\n            }\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_spinlock_lock(volatile ma_spinlock* pSpinlock)\n{\n    return ma_spinlock_lock_ex(pSpinlock, MA_TRUE);\n}\n\nMA_API ma_result ma_spinlock_lock_noyield(volatile ma_spinlock* pSpinlock)\n{\n    return ma_spinlock_lock_ex(pSpinlock, MA_FALSE);\n}\n\nMA_API ma_result ma_spinlock_unlock(volatile ma_spinlock* pSpinlock)\n{\n    if (pSpinlock == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_atomic_store_explicit_32(pSpinlock, 0, ma_atomic_memory_order_release);\n    return MA_SUCCESS;\n}\n\n\n#ifndef MA_NO_THREADING\n#if defined(MA_POSIX)\n    #define MA_THREADCALL\n    typedef void* ma_thread_result;\n#elif defined(MA_WIN32)\n    #define MA_THREADCALL WINAPI\n    typedef unsigned long ma_thread_result;\n#endif\n\ntypedef ma_thread_result (MA_THREADCALL * ma_thread_entry_proc)(void* pData);\n\n#ifdef MA_POSIX\nstatic ma_result ma_thread_create__posix(ma_thread* pThread, ma_thread_priority priority, size_t stackSize, ma_thread_entry_proc entryProc, void* pData)\n{\n    int result;\n    pthread_attr_t* pAttr = NULL;\n\n#if !defined(__EMSCRIPTEN__)\n    /* Try setting the thread priority. It's not critical if anything fails here. */\n    pthread_attr_t attr;\n    if (pthread_attr_init(&attr) == 0) {\n        int scheduler = -1;\n\n        /* We successfully initialized our attributes object so we can assign the pointer so it's passed into pthread_create(). */\n        pAttr = &attr;\n\n        /* We need to set the scheduler policy. Only do this if the OS supports pthread_attr_setschedpolicy() */\n        #if !defined(MA_BEOS)\n        {\n            if (priority == ma_thread_priority_idle) {\n            #ifdef SCHED_IDLE\n                if (pthread_attr_setschedpolicy(&attr, SCHED_IDLE) == 0) {\n                    scheduler = SCHED_IDLE;\n                }\n            #endif\n            } else if (priority == ma_thread_priority_realtime) {\n            #ifdef SCHED_FIFO\n                if (pthread_attr_setschedpolicy(&attr, SCHED_FIFO) == 0) {\n                    scheduler = SCHED_FIFO;\n                }\n            #endif\n            #ifdef MA_LINUX\n            } else {\n                scheduler = sched_getscheduler(0);\n            #endif\n            }\n        }\n        #endif\n\n        if (stackSize > 0) {\n            pthread_attr_setstacksize(&attr, stackSize);\n        }\n\n        if (scheduler != -1) {\n            int priorityMin = sched_get_priority_min(scheduler);\n            int priorityMax = sched_get_priority_max(scheduler);\n            int priorityStep = (priorityMax - priorityMin) / 7;  /* 7 = number of priorities supported by miniaudio. */\n\n            struct sched_param sched;\n            if (pthread_attr_getschedparam(&attr, &sched) == 0) {\n                if (priority == ma_thread_priority_idle) {\n                    sched.sched_priority = priorityMin;\n                } else if (priority == ma_thread_priority_realtime) {\n                    sched.sched_priority = priorityMax;\n                } else {\n                    sched.sched_priority += ((int)priority + 5) * priorityStep;  /* +5 because the lowest priority is -5. */\n                    if (sched.sched_priority < priorityMin) {\n                        sched.sched_priority = priorityMin;\n                    }\n                    if (sched.sched_priority > priorityMax) {\n                        sched.sched_priority = priorityMax;\n                    }\n                }\n\n                /* I'm not treating a failure of setting the priority as a critical error so not checking the return value here. */\n                pthread_attr_setschedparam(&attr, &sched);\n            }\n        }\n    }\n#else\n    /* It's the emscripten build. We'll have a few unused parameters. */\n    (void)priority;\n    (void)stackSize;\n#endif\n\n    result = pthread_create((pthread_t*)pThread, pAttr, entryProc, pData);\n\n    /* The thread attributes object is no longer required. */\n    if (pAttr != NULL) {\n        pthread_attr_destroy(pAttr);\n    }\n\n    if (result != 0) {\n        return ma_result_from_errno(result);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_thread_wait__posix(ma_thread* pThread)\n{\n    pthread_join((pthread_t)*pThread, NULL);\n}\n\n\nstatic ma_result ma_mutex_init__posix(ma_mutex* pMutex)\n{\n    int result;\n    \n    if (pMutex == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pMutex);\n\n    result = pthread_mutex_init((pthread_mutex_t*)pMutex, NULL);\n    if (result != 0) {\n        return ma_result_from_errno(result);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_mutex_uninit__posix(ma_mutex* pMutex)\n{\n    pthread_mutex_destroy((pthread_mutex_t*)pMutex);\n}\n\nstatic void ma_mutex_lock__posix(ma_mutex* pMutex)\n{\n    pthread_mutex_lock((pthread_mutex_t*)pMutex);\n}\n\nstatic void ma_mutex_unlock__posix(ma_mutex* pMutex)\n{\n    pthread_mutex_unlock((pthread_mutex_t*)pMutex);\n}\n\n\nstatic ma_result ma_event_init__posix(ma_event* pEvent)\n{\n    int result;\n\n    result = pthread_mutex_init((pthread_mutex_t*)&pEvent->lock, NULL);\n    if (result != 0) {\n        return ma_result_from_errno(result);\n    }\n\n    result = pthread_cond_init((pthread_cond_t*)&pEvent->cond, NULL);\n    if (result != 0) {\n        pthread_mutex_destroy((pthread_mutex_t*)&pEvent->lock);\n        return ma_result_from_errno(result);\n    }\n\n    pEvent->value = 0;\n    return MA_SUCCESS;\n}\n\nstatic void ma_event_uninit__posix(ma_event* pEvent)\n{\n    pthread_cond_destroy((pthread_cond_t*)&pEvent->cond);\n    pthread_mutex_destroy((pthread_mutex_t*)&pEvent->lock);\n}\n\nstatic ma_result ma_event_wait__posix(ma_event* pEvent)\n{\n    pthread_mutex_lock((pthread_mutex_t*)&pEvent->lock);\n    {\n        while (pEvent->value == 0) {\n            pthread_cond_wait((pthread_cond_t*)&pEvent->cond, (pthread_mutex_t*)&pEvent->lock);\n        }\n        pEvent->value = 0;  /* Auto-reset. */\n    }\n    pthread_mutex_unlock((pthread_mutex_t*)&pEvent->lock);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_event_signal__posix(ma_event* pEvent)\n{\n    pthread_mutex_lock((pthread_mutex_t*)&pEvent->lock);\n    {\n        pEvent->value = 1;\n        pthread_cond_signal((pthread_cond_t*)&pEvent->cond);\n    }\n    pthread_mutex_unlock((pthread_mutex_t*)&pEvent->lock);\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_semaphore_init__posix(int initialValue, ma_semaphore* pSemaphore)\n{\n    int result;\n\n    if (pSemaphore == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pSemaphore->value = initialValue;\n\n    result = pthread_mutex_init((pthread_mutex_t*)&pSemaphore->lock, NULL);\n    if (result != 0) {\n        return ma_result_from_errno(result);  /* Failed to create mutex. */\n    }\n\n    result = pthread_cond_init((pthread_cond_t*)&pSemaphore->cond, NULL);\n    if (result != 0) {\n        pthread_mutex_destroy((pthread_mutex_t*)&pSemaphore->lock);\n        return ma_result_from_errno(result);  /* Failed to create condition variable. */\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_semaphore_uninit__posix(ma_semaphore* pSemaphore)\n{\n    if (pSemaphore == NULL) {\n        return;\n    }\n\n    pthread_cond_destroy((pthread_cond_t*)&pSemaphore->cond);\n    pthread_mutex_destroy((pthread_mutex_t*)&pSemaphore->lock);\n}\n\nstatic ma_result ma_semaphore_wait__posix(ma_semaphore* pSemaphore)\n{\n    if (pSemaphore == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pthread_mutex_lock((pthread_mutex_t*)&pSemaphore->lock);\n    {\n        /* We need to wait on a condition variable before escaping. We can't return from this function until the semaphore has been signaled. */\n        while (pSemaphore->value == 0) {\n            pthread_cond_wait((pthread_cond_t*)&pSemaphore->cond, (pthread_mutex_t*)&pSemaphore->lock);\n        }\n\n        pSemaphore->value -= 1;\n    }\n    pthread_mutex_unlock((pthread_mutex_t*)&pSemaphore->lock);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_semaphore_release__posix(ma_semaphore* pSemaphore)\n{\n    if (pSemaphore == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pthread_mutex_lock((pthread_mutex_t*)&pSemaphore->lock);\n    {\n        pSemaphore->value += 1;\n        pthread_cond_signal((pthread_cond_t*)&pSemaphore->cond);\n    }\n    pthread_mutex_unlock((pthread_mutex_t*)&pSemaphore->lock);\n\n    return MA_SUCCESS;\n}\n#elif defined(MA_WIN32)\nstatic int ma_thread_priority_to_win32(ma_thread_priority priority)\n{\n    switch (priority) {\n        case ma_thread_priority_idle:     return THREAD_PRIORITY_IDLE;\n        case ma_thread_priority_lowest:   return THREAD_PRIORITY_LOWEST;\n        case ma_thread_priority_low:      return THREAD_PRIORITY_BELOW_NORMAL;\n        case ma_thread_priority_normal:   return THREAD_PRIORITY_NORMAL;\n        case ma_thread_priority_high:     return THREAD_PRIORITY_ABOVE_NORMAL;\n        case ma_thread_priority_highest:  return THREAD_PRIORITY_HIGHEST;\n        case ma_thread_priority_realtime: return THREAD_PRIORITY_TIME_CRITICAL;\n        default:                          return THREAD_PRIORITY_NORMAL;\n    }\n}\n\nstatic ma_result ma_thread_create__win32(ma_thread* pThread, ma_thread_priority priority, size_t stackSize, ma_thread_entry_proc entryProc, void* pData)\n{\n    DWORD threadID; /* Not used. Only used for passing into CreateThread() so it doesn't fail on Windows 98. */\n\n    *pThread = CreateThread(NULL, stackSize, entryProc, pData, 0, &threadID);\n    if (*pThread == NULL) {\n        return ma_result_from_GetLastError(GetLastError());\n    }\n\n    SetThreadPriority((HANDLE)*pThread, ma_thread_priority_to_win32(priority));\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_thread_wait__win32(ma_thread* pThread)\n{\n    WaitForSingleObject((HANDLE)*pThread, INFINITE);\n    CloseHandle((HANDLE)*pThread);\n}\n\n\nstatic ma_result ma_mutex_init__win32(ma_mutex* pMutex)\n{\n    *pMutex = CreateEventA(NULL, FALSE, TRUE, NULL);\n    if (*pMutex == NULL) {\n        return ma_result_from_GetLastError(GetLastError());\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_mutex_uninit__win32(ma_mutex* pMutex)\n{\n    CloseHandle((HANDLE)*pMutex);\n}\n\nstatic void ma_mutex_lock__win32(ma_mutex* pMutex)\n{\n    WaitForSingleObject((HANDLE)*pMutex, INFINITE);\n}\n\nstatic void ma_mutex_unlock__win32(ma_mutex* pMutex)\n{\n    SetEvent((HANDLE)*pMutex);\n}\n\n\nstatic ma_result ma_event_init__win32(ma_event* pEvent)\n{\n    *pEvent = CreateEventA(NULL, FALSE, FALSE, NULL);\n    if (*pEvent == NULL) {\n        return ma_result_from_GetLastError(GetLastError());\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_event_uninit__win32(ma_event* pEvent)\n{\n    CloseHandle((HANDLE)*pEvent);\n}\n\nstatic ma_result ma_event_wait__win32(ma_event* pEvent)\n{\n    DWORD result = WaitForSingleObject((HANDLE)*pEvent, INFINITE);\n    if (result == WAIT_OBJECT_0) {\n        return MA_SUCCESS;\n    }\n\n    if (result == WAIT_TIMEOUT) {\n        return MA_TIMEOUT;\n    }\n\n    return ma_result_from_GetLastError(GetLastError());\n}\n\nstatic ma_result ma_event_signal__win32(ma_event* pEvent)\n{\n    BOOL result = SetEvent((HANDLE)*pEvent);\n    if (result == 0) {\n        return ma_result_from_GetLastError(GetLastError());\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_semaphore_init__win32(int initialValue, ma_semaphore* pSemaphore)\n{\n    *pSemaphore = CreateSemaphoreW(NULL, (LONG)initialValue, LONG_MAX, NULL);\n    if (*pSemaphore == NULL) {\n        return ma_result_from_GetLastError(GetLastError());\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_semaphore_uninit__win32(ma_semaphore* pSemaphore)\n{\n    CloseHandle((HANDLE)*pSemaphore);\n}\n\nstatic ma_result ma_semaphore_wait__win32(ma_semaphore* pSemaphore)\n{\n    DWORD result = WaitForSingleObject((HANDLE)*pSemaphore, INFINITE);\n    if (result == WAIT_OBJECT_0) {\n        return MA_SUCCESS;\n    }\n\n    if (result == WAIT_TIMEOUT) {\n        return MA_TIMEOUT;\n    }\n\n    return ma_result_from_GetLastError(GetLastError());\n}\n\nstatic ma_result ma_semaphore_release__win32(ma_semaphore* pSemaphore)\n{\n    BOOL result = ReleaseSemaphore((HANDLE)*pSemaphore, 1, NULL);\n    if (result == 0) {\n        return ma_result_from_GetLastError(GetLastError());\n    }\n\n    return MA_SUCCESS;\n}\n#endif\n\ntypedef struct\n{\n    ma_thread_entry_proc entryProc;\n    void* pData;\n    ma_allocation_callbacks allocationCallbacks;\n} ma_thread_proxy_data;\n\nstatic ma_thread_result MA_THREADCALL ma_thread_entry_proxy(void* pData)\n{\n    ma_thread_proxy_data* pProxyData = (ma_thread_proxy_data*)pData;\n    ma_thread_entry_proc entryProc;\n    void* pEntryProcData;\n    ma_thread_result result;\n\n    #if defined(MA_ON_THREAD_ENTRY)\n        MA_ON_THREAD_ENTRY\n    #endif\n\n    entryProc = pProxyData->entryProc;\n    pEntryProcData = pProxyData->pData;\n\n    /* Free the proxy data before getting into the real thread entry proc. */\n    ma_free(pProxyData, &pProxyData->allocationCallbacks);\n\n    result = entryProc(pEntryProcData);\n\n    #if defined(MA_ON_THREAD_EXIT)\n        MA_ON_THREAD_EXIT\n    #endif\n\n    return result;\n}\n\nstatic ma_result ma_thread_create(ma_thread* pThread, ma_thread_priority priority, size_t stackSize, ma_thread_entry_proc entryProc, void* pData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_result result;\n    ma_thread_proxy_data* pProxyData;\n\n    if (pThread == NULL || entryProc == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pProxyData = (ma_thread_proxy_data*)ma_malloc(sizeof(*pProxyData), pAllocationCallbacks);   /* Will be freed by the proxy entry proc. */\n    if (pProxyData == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n#if defined(MA_THREAD_DEFAULT_STACK_SIZE)\n    if (stackSize == 0) {\n        stackSize = MA_THREAD_DEFAULT_STACK_SIZE;\n    }\n#endif\n\n    pProxyData->entryProc = entryProc;\n    pProxyData->pData     = pData;\n    ma_allocation_callbacks_init_copy(&pProxyData->allocationCallbacks, pAllocationCallbacks);\n\n#if defined(MA_POSIX)\n    result = ma_thread_create__posix(pThread, priority, stackSize, ma_thread_entry_proxy, pProxyData);\n#elif defined(MA_WIN32)\n    result = ma_thread_create__win32(pThread, priority, stackSize, ma_thread_entry_proxy, pProxyData);\n#endif\n\n    if (result != MA_SUCCESS) {\n        ma_free(pProxyData, pAllocationCallbacks);\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_thread_wait(ma_thread* pThread)\n{\n    if (pThread == NULL) {\n        return;\n    }\n\n#if defined(MA_POSIX)\n    ma_thread_wait__posix(pThread);\n#elif defined(MA_WIN32)\n    ma_thread_wait__win32(pThread);\n#endif\n}\n\n\nMA_API ma_result ma_mutex_init(ma_mutex* pMutex)\n{\n    if (pMutex == NULL) {\n        MA_ASSERT(MA_FALSE);    /* Fire an assert so the caller is aware of this bug. */\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_POSIX)\n    return ma_mutex_init__posix(pMutex);\n#elif defined(MA_WIN32)\n    return ma_mutex_init__win32(pMutex);\n#endif\n}\n\nMA_API void ma_mutex_uninit(ma_mutex* pMutex)\n{\n    if (pMutex == NULL) {\n        return;\n    }\n\n#if defined(MA_POSIX)\n    ma_mutex_uninit__posix(pMutex);\n#elif defined(MA_WIN32)\n    ma_mutex_uninit__win32(pMutex);\n#endif\n}\n\nMA_API void ma_mutex_lock(ma_mutex* pMutex)\n{\n    if (pMutex == NULL) {\n        MA_ASSERT(MA_FALSE);    /* Fire an assert so the caller is aware of this bug. */\n        return;\n    }\n\n#if defined(MA_POSIX)\n    ma_mutex_lock__posix(pMutex);\n#elif defined(MA_WIN32)\n    ma_mutex_lock__win32(pMutex);\n#endif\n}\n\nMA_API void ma_mutex_unlock(ma_mutex* pMutex)\n{\n    if (pMutex == NULL) {\n        MA_ASSERT(MA_FALSE);    /* Fire an assert so the caller is aware of this bug. */\n        return;\n    }\n\n#if defined(MA_POSIX)\n    ma_mutex_unlock__posix(pMutex);\n#elif defined(MA_WIN32)\n    ma_mutex_unlock__win32(pMutex);\n#endif\n}\n\n\nMA_API ma_result ma_event_init(ma_event* pEvent)\n{\n    if (pEvent == NULL) {\n        MA_ASSERT(MA_FALSE);    /* Fire an assert so the caller is aware of this bug. */\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_POSIX)\n    return ma_event_init__posix(pEvent);\n#elif defined(MA_WIN32)\n    return ma_event_init__win32(pEvent);\n#endif\n}\n\n#if 0\nstatic ma_result ma_event_alloc_and_init(ma_event** ppEvent, ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_result result;\n    ma_event* pEvent;\n\n    if (ppEvent == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *ppEvent = NULL;\n\n    pEvent = ma_malloc(sizeof(*pEvent), pAllocationCallbacks);\n    if (pEvent == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_event_init(pEvent);\n    if (result != MA_SUCCESS) {\n        ma_free(pEvent, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppEvent = pEvent;\n    return result;\n}\n#endif\n\nMA_API void ma_event_uninit(ma_event* pEvent)\n{\n    if (pEvent == NULL) {\n        return;\n    }\n\n#if defined(MA_POSIX)\n    ma_event_uninit__posix(pEvent);\n#elif defined(MA_WIN32)\n    ma_event_uninit__win32(pEvent);\n#endif\n}\n\n#if 0\nstatic void ma_event_uninit_and_free(ma_event* pEvent, ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pEvent == NULL) {\n        return;\n    }\n\n    ma_event_uninit(pEvent);\n    ma_free(pEvent, pAllocationCallbacks);\n}\n#endif\n\nMA_API ma_result ma_event_wait(ma_event* pEvent)\n{\n    if (pEvent == NULL) {\n        MA_ASSERT(MA_FALSE);    /* Fire an assert to the caller is aware of this bug. */\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_POSIX)\n    return ma_event_wait__posix(pEvent);\n#elif defined(MA_WIN32)\n    return ma_event_wait__win32(pEvent);\n#endif\n}\n\nMA_API ma_result ma_event_signal(ma_event* pEvent)\n{\n    if (pEvent == NULL) {\n        MA_ASSERT(MA_FALSE);    /* Fire an assert to the caller is aware of this bug. */\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_POSIX)\n    return ma_event_signal__posix(pEvent);\n#elif defined(MA_WIN32)\n    return ma_event_signal__win32(pEvent);\n#endif\n}\n\n\nMA_API ma_result ma_semaphore_init(int initialValue, ma_semaphore* pSemaphore)\n{\n    if (pSemaphore == NULL) {\n        MA_ASSERT(MA_FALSE);    /* Fire an assert so the caller is aware of this bug. */\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_POSIX)\n    return ma_semaphore_init__posix(initialValue, pSemaphore);\n#elif defined(MA_WIN32)\n    return ma_semaphore_init__win32(initialValue, pSemaphore);\n#endif\n}\n\nMA_API void ma_semaphore_uninit(ma_semaphore* pSemaphore)\n{\n    if (pSemaphore == NULL) {\n        MA_ASSERT(MA_FALSE);    /* Fire an assert so the caller is aware of this bug. */\n        return;\n    }\n\n#if defined(MA_POSIX)\n    ma_semaphore_uninit__posix(pSemaphore);\n#elif defined(MA_WIN32)\n    ma_semaphore_uninit__win32(pSemaphore);\n#endif\n}\n\nMA_API ma_result ma_semaphore_wait(ma_semaphore* pSemaphore)\n{\n    if (pSemaphore == NULL) {\n        MA_ASSERT(MA_FALSE);    /* Fire an assert so the caller is aware of this bug. */\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_POSIX)\n    return ma_semaphore_wait__posix(pSemaphore);\n#elif defined(MA_WIN32)\n    return ma_semaphore_wait__win32(pSemaphore);\n#endif\n}\n\nMA_API ma_result ma_semaphore_release(ma_semaphore* pSemaphore)\n{\n    if (pSemaphore == NULL) {\n        MA_ASSERT(MA_FALSE);    /* Fire an assert so the caller is aware of this bug. */\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_POSIX)\n    return ma_semaphore_release__posix(pSemaphore);\n#elif defined(MA_WIN32)\n    return ma_semaphore_release__win32(pSemaphore);\n#endif\n}\n#else\n/* MA_NO_THREADING is set which means threading is disabled. Threading is required by some API families. If any of these are enabled we need to throw an error. */\n#ifndef MA_NO_DEVICE_IO\n#error \"MA_NO_THREADING cannot be used without MA_NO_DEVICE_IO\";\n#endif\n#endif  /* MA_NO_THREADING */\n\n\n\n#define MA_FENCE_COUNTER_MAX    0x7FFFFFFF\n\nMA_API ma_result ma_fence_init(ma_fence* pFence)\n{\n    if (pFence == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pFence);\n    pFence->counter = 0;\n\n    #ifndef MA_NO_THREADING\n    {\n        ma_result result;\n\n        result = ma_event_init(&pFence->e);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n    #endif\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_fence_uninit(ma_fence* pFence)\n{\n    if (pFence == NULL) {\n        return;\n    }\n\n    #ifndef MA_NO_THREADING\n    {\n        ma_event_uninit(&pFence->e);\n    }\n    #endif\n\n    MA_ZERO_OBJECT(pFence);\n}\n\nMA_API ma_result ma_fence_acquire(ma_fence* pFence)\n{\n    if (pFence == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    for (;;) {\n        ma_uint32 oldCounter = ma_atomic_load_32(&pFence->counter);\n        ma_uint32 newCounter = oldCounter + 1;\n\n        /* Make sure we're not about to exceed our maximum value. */\n        if (newCounter > MA_FENCE_COUNTER_MAX) {\n            MA_ASSERT(MA_FALSE);\n            return MA_OUT_OF_RANGE;\n        }\n\n        if (ma_atomic_compare_exchange_weak_32(&pFence->counter, &oldCounter, newCounter)) {\n            return MA_SUCCESS;\n        } else {\n            if (oldCounter == MA_FENCE_COUNTER_MAX) {\n                MA_ASSERT(MA_FALSE);\n                return MA_OUT_OF_RANGE; /* The other thread took the last available slot. Abort. */\n            }\n        }\n    }\n\n    /* Should never get here. */\n    /*return MA_SUCCESS;*/\n}\n\nMA_API ma_result ma_fence_release(ma_fence* pFence)\n{\n    if (pFence == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    for (;;) {\n        ma_uint32 oldCounter = ma_atomic_load_32(&pFence->counter);\n        ma_uint32 newCounter = oldCounter - 1;\n\n        if (oldCounter == 0) {\n            MA_ASSERT(MA_FALSE);\n            return MA_INVALID_OPERATION;    /* Acquire/release mismatch. */\n        }\n\n        if (ma_atomic_compare_exchange_weak_32(&pFence->counter, &oldCounter, newCounter)) {\n            #ifndef MA_NO_THREADING\n            {\n                if (newCounter == 0) {\n                    ma_event_signal(&pFence->e);    /* <-- ma_fence_wait() will be waiting on this. */\n                }\n            }\n            #endif\n\n            return MA_SUCCESS;\n        } else {\n            if (oldCounter == 0) {\n                MA_ASSERT(MA_FALSE);\n                return MA_INVALID_OPERATION;    /* Another thread has taken the 0 slot. Acquire/release mismatch. */\n            }\n        }\n    }\n\n    /* Should never get here. */\n    /*return MA_SUCCESS;*/\n}\n\nMA_API ma_result ma_fence_wait(ma_fence* pFence)\n{\n    if (pFence == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    for (;;) {\n        ma_uint32 counter;\n\n        counter = ma_atomic_load_32(&pFence->counter);\n        if (counter == 0) {\n            /*\n            Counter has hit zero. By the time we get here some other thread may have acquired the\n            fence again, but that is where the caller needs to take care with how they se the fence.\n            */\n            return MA_SUCCESS;\n        }\n\n        /* Getting here means the counter is > 0. We'll need to wait for something to happen. */\n        #ifndef MA_NO_THREADING\n        {\n            ma_result result;\n\n            result = ma_event_wait(&pFence->e);\n            if (result != MA_SUCCESS) {\n                return result;\n            }\n        }\n        #endif\n    }\n\n    /* Should never get here. */\n    /*return MA_INVALID_OPERATION;*/\n}\n\n\nMA_API ma_result ma_async_notification_signal(ma_async_notification* pNotification)\n{\n    ma_async_notification_callbacks* pNotificationCallbacks = (ma_async_notification_callbacks*)pNotification;\n\n    if (pNotification == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pNotificationCallbacks->onSignal == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    pNotificationCallbacks->onSignal(pNotification);\n    return MA_INVALID_ARGS;\n}\n\n\nstatic void ma_async_notification_poll__on_signal(ma_async_notification* pNotification)\n{\n    ((ma_async_notification_poll*)pNotification)->signalled = MA_TRUE;\n}\n\nMA_API ma_result ma_async_notification_poll_init(ma_async_notification_poll* pNotificationPoll)\n{\n    if (pNotificationPoll == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pNotificationPoll->cb.onSignal = ma_async_notification_poll__on_signal;\n    pNotificationPoll->signalled = MA_FALSE;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_bool32 ma_async_notification_poll_is_signalled(const ma_async_notification_poll* pNotificationPoll)\n{\n    if (pNotificationPoll == NULL) {\n        return MA_FALSE;\n    }\n\n    return pNotificationPoll->signalled;\n}\n\n\nstatic void ma_async_notification_event__on_signal(ma_async_notification* pNotification)\n{\n    ma_async_notification_event_signal((ma_async_notification_event*)pNotification);\n}\n\nMA_API ma_result ma_async_notification_event_init(ma_async_notification_event* pNotificationEvent)\n{\n    if (pNotificationEvent == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pNotificationEvent->cb.onSignal = ma_async_notification_event__on_signal;\n\n    #ifndef MA_NO_THREADING\n    {\n        ma_result result;\n\n        result = ma_event_init(&pNotificationEvent->e);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        return MA_NOT_IMPLEMENTED;  /* Threading is disabled. */\n    }\n    #endif\n}\n\nMA_API ma_result ma_async_notification_event_uninit(ma_async_notification_event* pNotificationEvent)\n{\n    if (pNotificationEvent == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #ifndef MA_NO_THREADING\n    {\n        ma_event_uninit(&pNotificationEvent->e);\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        return MA_NOT_IMPLEMENTED;  /* Threading is disabled. */\n    }\n    #endif\n}\n\nMA_API ma_result ma_async_notification_event_wait(ma_async_notification_event* pNotificationEvent)\n{\n    if (pNotificationEvent == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #ifndef MA_NO_THREADING\n    {\n        return ma_event_wait(&pNotificationEvent->e);\n    }\n    #else\n    {\n        return MA_NOT_IMPLEMENTED;  /* Threading is disabled. */\n    }\n    #endif\n}\n\nMA_API ma_result ma_async_notification_event_signal(ma_async_notification_event* pNotificationEvent)\n{\n    if (pNotificationEvent == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #ifndef MA_NO_THREADING\n    {\n        return ma_event_signal(&pNotificationEvent->e);\n    }\n    #else\n    {\n        return MA_NOT_IMPLEMENTED;  /* Threading is disabled. */\n    }\n    #endif\n}\n\n\n\n/************************************************************************************************************************************************************\n\nJob Queue\n\n************************************************************************************************************************************************************/\nMA_API ma_slot_allocator_config ma_slot_allocator_config_init(ma_uint32 capacity)\n{\n    ma_slot_allocator_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.capacity = capacity;\n\n    return config;\n}\n\n\nstatic MA_INLINE ma_uint32 ma_slot_allocator_calculate_group_capacity(ma_uint32 slotCapacity)\n{\n    ma_uint32 cap = slotCapacity / 32;\n    if ((slotCapacity % 32) != 0) {\n        cap += 1;\n    }\n\n    return cap;\n}\n\nstatic MA_INLINE ma_uint32 ma_slot_allocator_group_capacity(const ma_slot_allocator* pAllocator)\n{\n    return ma_slot_allocator_calculate_group_capacity(pAllocator->capacity);\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t groupsOffset;\n    size_t slotsOffset;\n} ma_slot_allocator_heap_layout;\n\nstatic ma_result ma_slot_allocator_get_heap_layout(const ma_slot_allocator_config* pConfig, ma_slot_allocator_heap_layout* pHeapLayout)\n{\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->capacity == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* Groups. */\n    pHeapLayout->groupsOffset = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += ma_align_64(ma_slot_allocator_calculate_group_capacity(pConfig->capacity) * sizeof(ma_slot_allocator_group));\n\n    /* Slots. */\n    pHeapLayout->slotsOffset  = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += ma_align_64(pConfig->capacity * sizeof(ma_uint32));\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_slot_allocator_get_heap_size(const ma_slot_allocator_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_slot_allocator_heap_layout layout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_slot_allocator_get_heap_layout(pConfig, &layout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = layout.sizeInBytes;\n\n    return result;\n}\n\nMA_API ma_result ma_slot_allocator_init_preallocated(const ma_slot_allocator_config* pConfig, void* pHeap, ma_slot_allocator* pAllocator)\n{\n    ma_result result;\n    ma_slot_allocator_heap_layout heapLayout;\n\n    if (pAllocator == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pAllocator);\n\n    if (pHeap == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_slot_allocator_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pAllocator->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n    pAllocator->pGroups  = (ma_slot_allocator_group*)ma_offset_ptr(pHeap, heapLayout.groupsOffset);\n    pAllocator->pSlots   = (ma_uint32*)ma_offset_ptr(pHeap, heapLayout.slotsOffset);\n    pAllocator->capacity = pConfig->capacity;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_slot_allocator_init(const ma_slot_allocator_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_slot_allocator* pAllocator)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_slot_allocator_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to retrieve the size of the heap allocation. */\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_slot_allocator_init_preallocated(pConfig, pHeap, pAllocator);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pAllocator->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_slot_allocator_uninit(ma_slot_allocator* pAllocator, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocator == NULL) {\n        return;\n    }\n\n    if (pAllocator->_ownsHeap) {\n        ma_free(pAllocator->_pHeap, pAllocationCallbacks);\n    }\n}\n\nMA_API ma_result ma_slot_allocator_alloc(ma_slot_allocator* pAllocator, ma_uint64* pSlot)\n{\n    ma_uint32 iAttempt;\n    const ma_uint32 maxAttempts = 2;    /* The number of iterations to perform until returning MA_OUT_OF_MEMORY if no slots can be found. */\n\n    if (pAllocator == NULL || pSlot == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    for (iAttempt = 0; iAttempt < maxAttempts; iAttempt += 1) {\n        /* We need to acquire a suitable bitfield first. This is a bitfield that's got an available slot within it. */\n        ma_uint32 iGroup;\n        for (iGroup = 0; iGroup < ma_slot_allocator_group_capacity(pAllocator); iGroup += 1) {\n            /* CAS */\n            for (;;) {\n                ma_uint32 oldBitfield;\n                ma_uint32 newBitfield;\n                ma_uint32 bitOffset;\n\n                oldBitfield = ma_atomic_load_32(&pAllocator->pGroups[iGroup].bitfield);  /* <-- This copy must happen. The compiler must not optimize this away. */\n\n                /* Fast check to see if anything is available. */\n                if (oldBitfield == 0xFFFFFFFF) {\n                    break;  /* No available bits in this bitfield. */\n                }\n\n                bitOffset = ma_ffs_32(~oldBitfield);\n                MA_ASSERT(bitOffset < 32);\n\n                newBitfield = oldBitfield | (1 << bitOffset);\n\n                if (ma_atomic_compare_and_swap_32(&pAllocator->pGroups[iGroup].bitfield, oldBitfield, newBitfield) == oldBitfield) {\n                    ma_uint32 slotIndex;\n\n                    /* Increment the counter as soon as possible to have other threads report out-of-memory sooner than later. */\n                    ma_atomic_fetch_add_32(&pAllocator->count, 1);\n\n                    /* The slot index is required for constructing the output value. */\n                    slotIndex = (iGroup << 5) + bitOffset;  /* iGroup << 5 = iGroup * 32 */\n                    if (slotIndex >= pAllocator->capacity) {\n                        return MA_OUT_OF_MEMORY;\n                    }\n\n                    /* Increment the reference count before constructing the output value. */\n                    pAllocator->pSlots[slotIndex] += 1;\n\n                    /* Construct the output value. */\n                    *pSlot = (((ma_uint64)pAllocator->pSlots[slotIndex] << 32) | slotIndex);\n\n                    return MA_SUCCESS;\n                }\n            }\n        }\n\n        /* We weren't able to find a slot. If it's because we've reached our capacity we need to return MA_OUT_OF_MEMORY. Otherwise we need to do another iteration and try again. */\n        if (pAllocator->count < pAllocator->capacity) {\n            ma_yield();\n        } else {\n            return MA_OUT_OF_MEMORY;\n        }\n    }\n\n    /* We couldn't find a slot within the maximum number of attempts. */\n    return MA_OUT_OF_MEMORY;\n}\n\nMA_API ma_result ma_slot_allocator_free(ma_slot_allocator* pAllocator, ma_uint64 slot)\n{\n    ma_uint32 iGroup;\n    ma_uint32 iBit;\n\n    if (pAllocator == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    iGroup = (ma_uint32)((slot & 0xFFFFFFFF) >> 5);   /* slot / 32 */\n    iBit   = (ma_uint32)((slot & 0xFFFFFFFF) & 31);   /* slot % 32 */\n\n    if (iGroup >= ma_slot_allocator_group_capacity(pAllocator)) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ASSERT(iBit < 32);   /* This must be true due to the logic we used to actually calculate it. */\n\n    while (ma_atomic_load_32(&pAllocator->count) > 0) {\n        /* CAS */\n        ma_uint32 oldBitfield;\n        ma_uint32 newBitfield;\n\n        oldBitfield = ma_atomic_load_32(&pAllocator->pGroups[iGroup].bitfield);  /* <-- This copy must happen. The compiler must not optimize this away. */\n        newBitfield = oldBitfield & ~(1 << iBit);\n\n        /* Debugging for checking for double-frees. */\n        #if defined(MA_DEBUG_OUTPUT)\n        {\n            if ((oldBitfield & (1 << iBit)) == 0) {\n                MA_ASSERT(MA_FALSE);    /* Double free detected.*/\n            }\n        }\n        #endif\n\n        if (ma_atomic_compare_and_swap_32(&pAllocator->pGroups[iGroup].bitfield, oldBitfield, newBitfield) == oldBitfield) {\n            ma_atomic_fetch_sub_32(&pAllocator->count, 1);\n            return MA_SUCCESS;\n        }\n    }\n\n    /* Getting here means there are no allocations available for freeing. */\n    return MA_INVALID_OPERATION;\n}\n\n\n#define MA_JOB_ID_NONE      ~((ma_uint64)0)\n#define MA_JOB_SLOT_NONE    (ma_uint16)(~0)\n\nstatic MA_INLINE ma_uint32 ma_job_extract_refcount(ma_uint64 toc)\n{\n    return (ma_uint32)(toc >> 32);\n}\n\nstatic MA_INLINE ma_uint16 ma_job_extract_slot(ma_uint64 toc)\n{\n    return (ma_uint16)(toc & 0x0000FFFF);\n}\n\nstatic MA_INLINE ma_uint16 ma_job_extract_code(ma_uint64 toc)\n{\n    return (ma_uint16)((toc & 0xFFFF0000) >> 16);\n}\n\nstatic MA_INLINE ma_uint64 ma_job_toc_to_allocation(ma_uint64 toc)\n{\n    return ((ma_uint64)ma_job_extract_refcount(toc) << 32) | (ma_uint64)ma_job_extract_slot(toc);\n}\n\nstatic MA_INLINE ma_uint64 ma_job_set_refcount(ma_uint64 toc, ma_uint32 refcount)\n{\n    /* Clear the reference count first. */\n    toc = toc & ~((ma_uint64)0xFFFFFFFF << 32);\n    toc = toc |  ((ma_uint64)refcount   << 32);\n\n    return toc;\n}\n\n\nMA_API ma_job ma_job_init(ma_uint16 code)\n{\n    ma_job job;\n\n    MA_ZERO_OBJECT(&job);\n    job.toc.breakup.code = code;\n    job.toc.breakup.slot = MA_JOB_SLOT_NONE;    /* Temp value. Will be allocated when posted to a queue. */\n    job.next             = MA_JOB_ID_NONE;\n\n    return job;\n}\n\n\nstatic ma_result ma_job_process__noop(ma_job* pJob);\nstatic ma_result ma_job_process__quit(ma_job* pJob);\nstatic ma_result ma_job_process__custom(ma_job* pJob);\nstatic ma_result ma_job_process__resource_manager__load_data_buffer_node(ma_job* pJob);\nstatic ma_result ma_job_process__resource_manager__free_data_buffer_node(ma_job* pJob);\nstatic ma_result ma_job_process__resource_manager__page_data_buffer_node(ma_job* pJob);\nstatic ma_result ma_job_process__resource_manager__load_data_buffer(ma_job* pJob);\nstatic ma_result ma_job_process__resource_manager__free_data_buffer(ma_job* pJob);\nstatic ma_result ma_job_process__resource_manager__load_data_stream(ma_job* pJob);\nstatic ma_result ma_job_process__resource_manager__free_data_stream(ma_job* pJob);\nstatic ma_result ma_job_process__resource_manager__page_data_stream(ma_job* pJob);\nstatic ma_result ma_job_process__resource_manager__seek_data_stream(ma_job* pJob);\n\n#if !defined(MA_NO_DEVICE_IO)\nstatic ma_result ma_job_process__device__aaudio_reroute(ma_job* pJob);\n#endif\n\nstatic ma_job_proc g_jobVTable[MA_JOB_TYPE_COUNT] =\n{\n    /* Miscellaneous. */\n    ma_job_process__quit,                                       /* MA_JOB_TYPE_QUIT */\n    ma_job_process__custom,                                     /* MA_JOB_TYPE_CUSTOM */\n\n    /* Resource Manager. */\n    ma_job_process__resource_manager__load_data_buffer_node,    /* MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE */\n    ma_job_process__resource_manager__free_data_buffer_node,    /* MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER_NODE */\n    ma_job_process__resource_manager__page_data_buffer_node,    /* MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE */\n    ma_job_process__resource_manager__load_data_buffer,         /* MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER */\n    ma_job_process__resource_manager__free_data_buffer,         /* MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER */\n    ma_job_process__resource_manager__load_data_stream,         /* MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_STREAM */\n    ma_job_process__resource_manager__free_data_stream,         /* MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_STREAM */\n    ma_job_process__resource_manager__page_data_stream,         /* MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_STREAM */\n    ma_job_process__resource_manager__seek_data_stream,         /* MA_JOB_TYPE_RESOURCE_MANAGER_SEEK_DATA_STREAM */\n\n    /* Device. */\n#if !defined(MA_NO_DEVICE_IO)\n    ma_job_process__device__aaudio_reroute                      /*MA_JOB_TYPE_DEVICE_AAUDIO_REROUTE*/\n#endif\n};\n\nMA_API ma_result ma_job_process(ma_job* pJob)\n{\n    if (pJob == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pJob->toc.breakup.code >= MA_JOB_TYPE_COUNT) {\n        return MA_INVALID_OPERATION;\n    }\n\n    return g_jobVTable[pJob->toc.breakup.code](pJob);\n}\n\nstatic ma_result ma_job_process__noop(ma_job* pJob)\n{\n    MA_ASSERT(pJob != NULL);\n\n    /* No-op. */\n    (void)pJob;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_job_process__quit(ma_job* pJob)\n{\n    return ma_job_process__noop(pJob);\n}\n\nstatic ma_result ma_job_process__custom(ma_job* pJob)\n{\n    MA_ASSERT(pJob != NULL);\n\n    /* No-op if there's no callback. */\n    if (pJob->data.custom.proc == NULL) {\n        return MA_SUCCESS;\n    }\n\n    return pJob->data.custom.proc(pJob);\n}\n\n\n\nMA_API ma_job_queue_config ma_job_queue_config_init(ma_uint32 flags, ma_uint32 capacity)\n{\n    ma_job_queue_config config;\n\n    config.flags    = flags;\n    config.capacity = capacity;\n\n    return config;\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t allocatorOffset;\n    size_t jobsOffset;\n} ma_job_queue_heap_layout;\n\nstatic ma_result ma_job_queue_get_heap_layout(const ma_job_queue_config* pConfig, ma_job_queue_heap_layout* pHeapLayout)\n{\n    ma_result result;\n\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->capacity == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* Allocator. */\n    {\n        ma_slot_allocator_config allocatorConfig;\n        size_t allocatorHeapSizeInBytes;\n\n        allocatorConfig = ma_slot_allocator_config_init(pConfig->capacity);\n        result = ma_slot_allocator_get_heap_size(&allocatorConfig, &allocatorHeapSizeInBytes);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pHeapLayout->allocatorOffset = pHeapLayout->sizeInBytes;\n        pHeapLayout->sizeInBytes    += allocatorHeapSizeInBytes;\n    }\n\n    /* Jobs. */\n    pHeapLayout->jobsOffset   = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += ma_align_64(pConfig->capacity * sizeof(ma_job));\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_job_queue_get_heap_size(const ma_job_queue_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_job_queue_heap_layout layout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_job_queue_get_heap_layout(pConfig, &layout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = layout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_job_queue_init_preallocated(const ma_job_queue_config* pConfig, void* pHeap, ma_job_queue* pQueue)\n{\n    ma_result result;\n    ma_job_queue_heap_layout heapLayout;\n    ma_slot_allocator_config allocatorConfig;\n\n    if (pQueue == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pQueue);\n\n    result = ma_job_queue_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pQueue->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n    pQueue->flags    = pConfig->flags;\n    pQueue->capacity = pConfig->capacity;\n    pQueue->pJobs    = (ma_job*)ma_offset_ptr(pHeap, heapLayout.jobsOffset);\n\n    allocatorConfig = ma_slot_allocator_config_init(pConfig->capacity);\n    result = ma_slot_allocator_init_preallocated(&allocatorConfig, ma_offset_ptr(pHeap, heapLayout.allocatorOffset), &pQueue->allocator);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* We need a semaphore if we're running in non-blocking mode. If threading is disabled we need to return an error. */\n    if ((pQueue->flags & MA_JOB_QUEUE_FLAG_NON_BLOCKING) == 0) {\n        #ifndef MA_NO_THREADING\n        {\n            ma_semaphore_init(0, &pQueue->sem);\n        }\n        #else\n        {\n            /* Threading is disabled and we've requested non-blocking mode. */\n            return MA_INVALID_OPERATION;\n        }\n        #endif\n    }\n\n    /*\n    Our queue needs to be initialized with a free standing node. This should always be slot 0. Required for the lock free algorithm. The first job in the queue is\n    just a dummy item for giving us the first item in the list which is stored in the \"next\" member.\n    */\n    ma_slot_allocator_alloc(&pQueue->allocator, &pQueue->head);  /* Will never fail. */\n    pQueue->pJobs[ma_job_extract_slot(pQueue->head)].next = MA_JOB_ID_NONE;\n    pQueue->tail = pQueue->head;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_job_queue_init(const ma_job_queue_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_job_queue* pQueue)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_job_queue_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_job_queue_init_preallocated(pConfig, pHeap, pQueue);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pQueue->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_job_queue_uninit(ma_job_queue* pQueue, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pQueue == NULL) {\n        return;\n    }\n\n    /* All we need to do is uninitialize the semaphore. */\n    if ((pQueue->flags & MA_JOB_QUEUE_FLAG_NON_BLOCKING) == 0) {\n        #ifndef MA_NO_THREADING\n        {\n            ma_semaphore_uninit(&pQueue->sem);\n        }\n        #else\n        {\n            MA_ASSERT(MA_FALSE);    /* Should never get here. Should have been checked at initialization time. */\n        }\n        #endif\n    }\n\n    ma_slot_allocator_uninit(&pQueue->allocator, pAllocationCallbacks);\n\n    if (pQueue->_ownsHeap) {\n        ma_free(pQueue->_pHeap, pAllocationCallbacks);\n    }\n}\n\nstatic ma_bool32 ma_job_queue_cas(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired)\n{\n    /* The new counter is taken from the expected value. */\n    return ma_atomic_compare_and_swap_64(dst, expected, ma_job_set_refcount(desired, ma_job_extract_refcount(expected) + 1)) == expected;\n}\n\nMA_API ma_result ma_job_queue_post(ma_job_queue* pQueue, const ma_job* pJob)\n{\n    /*\n    Lock free queue implementation based on the paper by Michael and Scott: Nonblocking Algorithms and Preemption-Safe Locking on Multiprogrammed Shared Memory Multiprocessors\n    */\n    ma_result result;\n    ma_uint64 slot;\n    ma_uint64 tail;\n    ma_uint64 next;\n\n    if (pQueue == NULL || pJob == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* We need a new slot. */\n    result = ma_slot_allocator_alloc(&pQueue->allocator, &slot);\n    if (result != MA_SUCCESS) {\n        return result;  /* Probably ran out of slots. If so, MA_OUT_OF_MEMORY will be returned. */\n    }\n\n    /* At this point we should have a slot to place the job. */\n    MA_ASSERT(ma_job_extract_slot(slot) < pQueue->capacity);\n\n    /* We need to put the job into memory before we do anything. */\n    pQueue->pJobs[ma_job_extract_slot(slot)]                  = *pJob;\n    pQueue->pJobs[ma_job_extract_slot(slot)].toc.allocation   = slot;                    /* This will overwrite the job code. */\n    pQueue->pJobs[ma_job_extract_slot(slot)].toc.breakup.code = pJob->toc.breakup.code;  /* The job code needs to be applied again because the line above overwrote it. */\n    pQueue->pJobs[ma_job_extract_slot(slot)].next             = MA_JOB_ID_NONE;          /* Reset for safety. */\n\n    #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE\n    ma_spinlock_lock(&pQueue->lock);\n    #endif\n    {\n        /* The job is stored in memory so now we need to add it to our linked list. We only ever add items to the end of the list. */\n        for (;;) {\n            tail = ma_atomic_load_64(&pQueue->tail);\n            next = ma_atomic_load_64(&pQueue->pJobs[ma_job_extract_slot(tail)].next);\n\n            if (ma_job_toc_to_allocation(tail) == ma_job_toc_to_allocation(ma_atomic_load_64(&pQueue->tail))) {\n                if (ma_job_extract_slot(next) == 0xFFFF) {\n                    if (ma_job_queue_cas(&pQueue->pJobs[ma_job_extract_slot(tail)].next, next, slot)) {\n                        break;\n                    }\n                } else {\n                    ma_job_queue_cas(&pQueue->tail, tail, ma_job_extract_slot(next));\n                }\n            }\n        }\n        ma_job_queue_cas(&pQueue->tail, tail, slot);\n    }\n    #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE\n    ma_spinlock_unlock(&pQueue->lock);\n    #endif\n\n\n    /* Signal the semaphore as the last step if we're using synchronous mode. */\n    if ((pQueue->flags & MA_JOB_QUEUE_FLAG_NON_BLOCKING) == 0) {\n        #ifndef MA_NO_THREADING\n        {\n            ma_semaphore_release(&pQueue->sem);\n        }\n        #else\n        {\n            MA_ASSERT(MA_FALSE);    /* Should never get here. Should have been checked at initialization time. */\n        }\n        #endif\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_job_queue_next(ma_job_queue* pQueue, ma_job* pJob)\n{\n    ma_uint64 head;\n    ma_uint64 tail;\n    ma_uint64 next;\n\n    if (pQueue == NULL || pJob == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* If we're running in synchronous mode we'll need to wait on a semaphore. */\n    if ((pQueue->flags & MA_JOB_QUEUE_FLAG_NON_BLOCKING) == 0) {\n        #ifndef MA_NO_THREADING\n        {\n            ma_semaphore_wait(&pQueue->sem);\n        }\n        #else\n        {\n            MA_ASSERT(MA_FALSE);    /* Should never get here. Should have been checked at initialization time. */\n        }\n        #endif\n    }\n\n    #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE\n    ma_spinlock_lock(&pQueue->lock);\n    #endif\n    {\n        /*\n        BUG: In lock-free mode, multiple threads can be in this section of code. The \"head\" variable in the loop below\n        is stored. One thread can fall through to the freeing of this item while another is still using \"head\" for the\n        retrieval of the \"next\" variable.\n\n        The slot allocator might need to make use of some reference counting to ensure it's only truely freed when\n        there are no more references to the item. This must be fixed before removing these locks.\n        */\n\n        /* Now we need to remove the root item from the list. */\n        for (;;) {\n            head = ma_atomic_load_64(&pQueue->head);\n            tail = ma_atomic_load_64(&pQueue->tail);\n            next = ma_atomic_load_64(&pQueue->pJobs[ma_job_extract_slot(head)].next);\n\n            if (ma_job_toc_to_allocation(head) == ma_job_toc_to_allocation(ma_atomic_load_64(&pQueue->head))) {\n                if (ma_job_extract_slot(head) == ma_job_extract_slot(tail)) {\n                    if (ma_job_extract_slot(next) == 0xFFFF) {\n                        #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE\n                        ma_spinlock_unlock(&pQueue->lock);\n                        #endif\n                        return MA_NO_DATA_AVAILABLE;\n                    }\n                    ma_job_queue_cas(&pQueue->tail, tail, ma_job_extract_slot(next));\n                } else {\n                    *pJob = pQueue->pJobs[ma_job_extract_slot(next)];\n                    if (ma_job_queue_cas(&pQueue->head, head, ma_job_extract_slot(next))) {\n                        break;\n                    }\n                }\n            }\n        }\n    }\n    #ifndef MA_USE_EXPERIMENTAL_LOCK_FREE_JOB_QUEUE\n    ma_spinlock_unlock(&pQueue->lock);\n    #endif\n\n    ma_slot_allocator_free(&pQueue->allocator, head);\n\n    /*\n    If it's a quit job make sure it's put back on the queue to ensure other threads have an opportunity to detect it and terminate naturally. We\n    could instead just leave it on the queue, but that would involve fiddling with the lock-free code above and I want to keep that as simple as\n    possible.\n    */\n    if (pJob->toc.breakup.code == MA_JOB_TYPE_QUIT) {\n        ma_job_queue_post(pQueue, pJob);\n        return MA_CANCELLED;    /* Return a cancelled status just in case the thread is checking return codes and not properly checking for a quit job. */\n    }\n\n    return MA_SUCCESS;\n}\n\n\n\n/*******************************************************************************\n\nDynamic Linking\n\n*******************************************************************************/\n#ifdef MA_POSIX\n    /* No need for dlfcn.h if we're not using runtime linking. */\n    #ifndef MA_NO_RUNTIME_LINKING\n        #include <dlfcn.h>\n    #endif\n#endif\n\nMA_API ma_handle ma_dlopen(ma_log* pLog, const char* filename)\n{\n#ifndef MA_NO_RUNTIME_LINKING\n    ma_handle handle;\n\n    ma_log_postf(pLog, MA_LOG_LEVEL_DEBUG, \"Loading library: %s\\n\", filename);\n\n    #ifdef MA_WIN32\n        /* From MSDN: Desktop applications cannot use LoadPackagedLibrary; if a desktop application calls this function it fails with APPMODEL_ERROR_NO_PACKAGE.*/\n        #if !defined(MA_WIN32_UWP) || !(defined(WINAPI_FAMILY) && ((defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)))\n            handle = (ma_handle)LoadLibraryA(filename);\n        #else\n            /* *sigh* It appears there is no ANSI version of LoadPackagedLibrary()... */\n            WCHAR filenameW[4096];\n            if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, filenameW, sizeof(filenameW)) == 0) {\n                handle = NULL;\n            } else {\n                handle = (ma_handle)LoadPackagedLibrary(filenameW, 0);\n            }\n        #endif\n    #else\n        handle = (ma_handle)dlopen(filename, RTLD_NOW);\n    #endif\n\n    /*\n    I'm not considering failure to load a library an error nor a warning because seamlessly falling through to a lower-priority\n    backend is a deliberate design choice. Instead I'm logging it as an informational message.\n    */\n    if (handle == NULL) {\n        ma_log_postf(pLog, MA_LOG_LEVEL_INFO, \"Failed to load library: %s\\n\", filename);\n    }\n\n    return handle;\n#else\n    /* Runtime linking is disabled. */\n    (void)pLog;\n    (void)filename;\n    return NULL;\n#endif\n}\n\nMA_API void ma_dlclose(ma_log* pLog, ma_handle handle)\n{\n#ifndef MA_NO_RUNTIME_LINKING\n    #ifdef MA_WIN32\n        FreeLibrary((HMODULE)handle);\n    #else\n        dlclose((void*)handle);\n    #endif\n\n    (void)pLog;\n#else\n    /* Runtime linking is disabled. */\n    (void)pLog;\n    (void)handle;\n#endif\n}\n\nMA_API ma_proc ma_dlsym(ma_log* pLog, ma_handle handle, const char* symbol)\n{\n#ifndef MA_NO_RUNTIME_LINKING\n    ma_proc proc;\n\n    ma_log_postf(pLog, MA_LOG_LEVEL_DEBUG, \"Loading symbol: %s\\n\", symbol);\n\n#ifdef _WIN32\n    proc = (ma_proc)GetProcAddress((HMODULE)handle, symbol);\n#else\n#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))\n    #pragma GCC diagnostic push\n    #pragma GCC diagnostic ignored \"-Wpedantic\"\n#endif\n    proc = (ma_proc)dlsym((void*)handle, symbol);\n#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))\n    #pragma GCC diagnostic pop\n#endif\n#endif\n\n    if (proc == NULL) {\n        ma_log_postf(pLog, MA_LOG_LEVEL_WARNING, \"Failed to load symbol: %s\\n\", symbol);\n    }\n\n    (void)pLog; /* It's possible for pContext to be unused. */\n    return proc;\n#else\n    /* Runtime linking is disabled. */\n    (void)pLog;\n    (void)handle;\n    (void)symbol;\n    return NULL;\n#endif\n}\n\n\n\n/************************************************************************************************************************************************************\n*************************************************************************************************************************************************************\n\nDEVICE I/O\n==========\n\n*************************************************************************************************************************************************************\n************************************************************************************************************************************************************/\n\n/* Disable run-time linking on certain backends and platforms. */\n#ifndef MA_NO_RUNTIME_LINKING\n    #if defined(MA_EMSCRIPTEN) || defined(MA_ORBIS) || defined(MA_PROSPERO)\n        #define MA_NO_RUNTIME_LINKING\n    #endif\n#endif\n\n#ifndef MA_NO_DEVICE_IO\n\n#if defined(MA_APPLE) && (__MAC_OS_X_VERSION_MIN_REQUIRED < 101200)\n    #include <mach/mach_time.h> /* For mach_absolute_time() */\n#endif\n\n#ifdef MA_POSIX\n    #include <sys/types.h>\n    #include <unistd.h>\n\n    /* No need for dlfcn.h if we're not using runtime linking. */\n    #ifndef MA_NO_RUNTIME_LINKING\n        #include <dlfcn.h>\n    #endif\n#endif\n\n\n\nMA_API void ma_device_info_add_native_data_format(ma_device_info* pDeviceInfo, ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 flags)\n{\n    if (pDeviceInfo == NULL) {\n        return;\n    }\n\n    if (pDeviceInfo->nativeDataFormatCount < ma_countof(pDeviceInfo->nativeDataFormats)) {\n        pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format     = format;\n        pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels   = channels;\n        pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = sampleRate;\n        pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags      = flags;\n        pDeviceInfo->nativeDataFormatCount += 1;\n    }\n}\n\n\ntypedef struct\n{\n    ma_backend backend;\n    const char* pName;\n} ma_backend_info;\n\nstatic ma_backend_info gBackendInfo[] = /* Indexed by the backend enum. Must be in the order backends are declared in the ma_backend enum. */\n{\n    {ma_backend_wasapi,     \"WASAPI\"},\n    {ma_backend_dsound,     \"DirectSound\"},\n    {ma_backend_winmm,      \"WinMM\"},\n    {ma_backend_coreaudio,  \"Core Audio\"},\n    {ma_backend_sndio,      \"sndio\"},\n    {ma_backend_audio4,     \"audio(4)\"},\n    {ma_backend_oss,        \"OSS\"},\n    {ma_backend_pulseaudio, \"PulseAudio\"},\n    {ma_backend_alsa,       \"ALSA\"},\n    {ma_backend_jack,       \"JACK\"},\n    {ma_backend_aaudio,     \"AAudio\"},\n    {ma_backend_opensl,     \"OpenSL|ES\"},\n    {ma_backend_webaudio,   \"Web Audio\"},\n    {ma_backend_custom,     \"Custom\"},\n    {ma_backend_null,       \"Null\"}\n};\n\nMA_API const char* ma_get_backend_name(ma_backend backend)\n{\n    if (backend < 0 || backend >= (int)ma_countof(gBackendInfo)) {\n        return \"Unknown\";\n    }\n\n    return gBackendInfo[backend].pName;\n}\n\nMA_API ma_result ma_get_backend_from_name(const char* pBackendName, ma_backend* pBackend)\n{\n    size_t iBackend;\n\n    if (pBackendName == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    for (iBackend = 0; iBackend < ma_countof(gBackendInfo); iBackend += 1) {\n        if (ma_strcmp(pBackendName, gBackendInfo[iBackend].pName) == 0) {\n            if (pBackend != NULL) {\n                *pBackend = gBackendInfo[iBackend].backend;\n            }\n\n            return MA_SUCCESS;\n        }\n    }\n\n    /* Getting here means the backend name is unknown. */\n    return MA_INVALID_ARGS;\n}\n\nMA_API ma_bool32 ma_is_backend_enabled(ma_backend backend)\n{\n    /*\n    This looks a little bit gross, but we want all backends to be included in the switch to avoid warnings on some compilers\n    about some enums not being handled by the switch statement.\n    */\n    switch (backend)\n    {\n        case ma_backend_wasapi:\n        #if defined(MA_HAS_WASAPI)\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_dsound:\n        #if defined(MA_HAS_DSOUND)\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_winmm:\n        #if defined(MA_HAS_WINMM)\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_coreaudio:\n        #if defined(MA_HAS_COREAUDIO)\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_sndio:\n        #if defined(MA_HAS_SNDIO)\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_audio4:\n        #if defined(MA_HAS_AUDIO4)\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_oss:\n        #if defined(MA_HAS_OSS)\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_pulseaudio:\n        #if defined(MA_HAS_PULSEAUDIO)\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_alsa:\n        #if defined(MA_HAS_ALSA)\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_jack:\n        #if defined(MA_HAS_JACK)\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_aaudio:\n        #if defined(MA_HAS_AAUDIO)\n            #if defined(MA_ANDROID)\n            {\n                return ma_android_sdk_version() >= 26;\n            }\n            #else\n                return MA_FALSE;\n            #endif\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_opensl:\n        #if defined(MA_HAS_OPENSL)\n            #if defined(MA_ANDROID)\n            {\n                return ma_android_sdk_version() >= 9;\n            }\n            #else\n                return MA_TRUE;\n            #endif\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_webaudio:\n        #if defined(MA_HAS_WEBAUDIO)\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_custom:\n        #if defined(MA_HAS_CUSTOM)\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n        case ma_backend_null:\n        #if defined(MA_HAS_NULL)\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n\n        default: return MA_FALSE;\n    }\n}\n\nMA_API ma_result ma_get_enabled_backends(ma_backend* pBackends, size_t backendCap, size_t* pBackendCount)\n{\n    size_t backendCount;\n    size_t iBackend;\n    ma_result result = MA_SUCCESS;\n\n    if (pBackendCount == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    backendCount = 0;\n\n    for (iBackend = 0; iBackend <= ma_backend_null; iBackend += 1) {\n        ma_backend backend = (ma_backend)iBackend;\n\n        if (ma_is_backend_enabled(backend)) {\n            /* The backend is enabled. Try adding it to the list. If there's no room, MA_NO_SPACE needs to be returned. */\n            if (backendCount == backendCap) {\n                result = MA_NO_SPACE;\n                break;\n            } else {\n                pBackends[backendCount] = backend;\n                backendCount += 1;\n            }\n        }\n    }\n\n    if (pBackendCount != NULL) {\n        *pBackendCount = backendCount;\n    }\n\n    return result;\n}\n\nMA_API ma_bool32 ma_is_loopback_supported(ma_backend backend)\n{\n    switch (backend)\n    {\n        case ma_backend_wasapi:     return MA_TRUE;\n        case ma_backend_dsound:     return MA_FALSE;\n        case ma_backend_winmm:      return MA_FALSE;\n        case ma_backend_coreaudio:  return MA_FALSE;\n        case ma_backend_sndio:      return MA_FALSE;\n        case ma_backend_audio4:     return MA_FALSE;\n        case ma_backend_oss:        return MA_FALSE;\n        case ma_backend_pulseaudio: return MA_FALSE;\n        case ma_backend_alsa:       return MA_FALSE;\n        case ma_backend_jack:       return MA_FALSE;\n        case ma_backend_aaudio:     return MA_FALSE;\n        case ma_backend_opensl:     return MA_FALSE;\n        case ma_backend_webaudio:   return MA_FALSE;\n        case ma_backend_custom:     return MA_FALSE;    /* <-- Will depend on the implementation of the backend. */\n        case ma_backend_null:       return MA_FALSE;\n        default:                    return MA_FALSE;\n    }\n}\n\n\n\n#if defined(MA_WIN32)\n/* WASAPI error codes. */\n#define MA_AUDCLNT_E_NOT_INITIALIZED              ((HRESULT)0x88890001)\n#define MA_AUDCLNT_E_ALREADY_INITIALIZED          ((HRESULT)0x88890002)\n#define MA_AUDCLNT_E_WRONG_ENDPOINT_TYPE          ((HRESULT)0x88890003)\n#define MA_AUDCLNT_E_DEVICE_INVALIDATED           ((HRESULT)0x88890004)\n#define MA_AUDCLNT_E_NOT_STOPPED                  ((HRESULT)0x88890005)\n#define MA_AUDCLNT_E_BUFFER_TOO_LARGE             ((HRESULT)0x88890006)\n#define MA_AUDCLNT_E_OUT_OF_ORDER                 ((HRESULT)0x88890007)\n#define MA_AUDCLNT_E_UNSUPPORTED_FORMAT           ((HRESULT)0x88890008)\n#define MA_AUDCLNT_E_INVALID_SIZE                 ((HRESULT)0x88890009)\n#define MA_AUDCLNT_E_DEVICE_IN_USE                ((HRESULT)0x8889000A)\n#define MA_AUDCLNT_E_BUFFER_OPERATION_PENDING     ((HRESULT)0x8889000B)\n#define MA_AUDCLNT_E_THREAD_NOT_REGISTERED        ((HRESULT)0x8889000C)\n#define MA_AUDCLNT_E_NO_SINGLE_PROCESS            ((HRESULT)0x8889000D)\n#define MA_AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED   ((HRESULT)0x8889000E)\n#define MA_AUDCLNT_E_ENDPOINT_CREATE_FAILED       ((HRESULT)0x8889000F)\n#define MA_AUDCLNT_E_SERVICE_NOT_RUNNING          ((HRESULT)0x88890010)\n#define MA_AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED     ((HRESULT)0x88890011)\n#define MA_AUDCLNT_E_EXCLUSIVE_MODE_ONLY          ((HRESULT)0x88890012)\n#define MA_AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL ((HRESULT)0x88890013)\n#define MA_AUDCLNT_E_EVENTHANDLE_NOT_SET          ((HRESULT)0x88890014)\n#define MA_AUDCLNT_E_INCORRECT_BUFFER_SIZE        ((HRESULT)0x88890015)\n#define MA_AUDCLNT_E_BUFFER_SIZE_ERROR            ((HRESULT)0x88890016)\n#define MA_AUDCLNT_E_CPUUSAGE_EXCEEDED            ((HRESULT)0x88890017)\n#define MA_AUDCLNT_E_BUFFER_ERROR                 ((HRESULT)0x88890018)\n#define MA_AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED      ((HRESULT)0x88890019)\n#define MA_AUDCLNT_E_INVALID_DEVICE_PERIOD        ((HRESULT)0x88890020)\n#define MA_AUDCLNT_E_INVALID_STREAM_FLAG          ((HRESULT)0x88890021)\n#define MA_AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE ((HRESULT)0x88890022)\n#define MA_AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES     ((HRESULT)0x88890023)\n#define MA_AUDCLNT_E_OFFLOAD_MODE_ONLY            ((HRESULT)0x88890024)\n#define MA_AUDCLNT_E_NONOFFLOAD_MODE_ONLY         ((HRESULT)0x88890025)\n#define MA_AUDCLNT_E_RESOURCES_INVALIDATED        ((HRESULT)0x88890026)\n#define MA_AUDCLNT_E_RAW_MODE_UNSUPPORTED         ((HRESULT)0x88890027)\n#define MA_AUDCLNT_E_ENGINE_PERIODICITY_LOCKED    ((HRESULT)0x88890028)\n#define MA_AUDCLNT_E_ENGINE_FORMAT_LOCKED         ((HRESULT)0x88890029)\n#define MA_AUDCLNT_E_HEADTRACKING_ENABLED         ((HRESULT)0x88890030)\n#define MA_AUDCLNT_E_HEADTRACKING_UNSUPPORTED     ((HRESULT)0x88890040)\n#define MA_AUDCLNT_S_BUFFER_EMPTY                 ((HRESULT)0x08890001)\n#define MA_AUDCLNT_S_THREAD_ALREADY_REGISTERED    ((HRESULT)0x08890002)\n#define MA_AUDCLNT_S_POSITION_STALLED             ((HRESULT)0x08890003)\n\n#define MA_DS_OK                                  ((HRESULT)0)\n#define MA_DS_NO_VIRTUALIZATION                   ((HRESULT)0x0878000A)\n#define MA_DSERR_ALLOCATED                        ((HRESULT)0x8878000A)\n#define MA_DSERR_CONTROLUNAVAIL                   ((HRESULT)0x8878001E)\n#define MA_DSERR_INVALIDPARAM                     ((HRESULT)0x80070057) /*E_INVALIDARG*/\n#define MA_DSERR_INVALIDCALL                      ((HRESULT)0x88780032)\n#define MA_DSERR_GENERIC                          ((HRESULT)0x80004005) /*E_FAIL*/\n#define MA_DSERR_PRIOLEVELNEEDED                  ((HRESULT)0x88780046)\n#define MA_DSERR_OUTOFMEMORY                      ((HRESULT)0x8007000E) /*E_OUTOFMEMORY*/\n#define MA_DSERR_BADFORMAT                        ((HRESULT)0x88780064)\n#define MA_DSERR_UNSUPPORTED                      ((HRESULT)0x80004001) /*E_NOTIMPL*/\n#define MA_DSERR_NODRIVER                         ((HRESULT)0x88780078)\n#define MA_DSERR_ALREADYINITIALIZED               ((HRESULT)0x88780082)\n#define MA_DSERR_NOAGGREGATION                    ((HRESULT)0x80040110) /*CLASS_E_NOAGGREGATION*/\n#define MA_DSERR_BUFFERLOST                       ((HRESULT)0x88780096)\n#define MA_DSERR_OTHERAPPHASPRIO                  ((HRESULT)0x887800A0)\n#define MA_DSERR_UNINITIALIZED                    ((HRESULT)0x887800AA)\n#define MA_DSERR_NOINTERFACE                      ((HRESULT)0x80004002) /*E_NOINTERFACE*/\n#define MA_DSERR_ACCESSDENIED                     ((HRESULT)0x80070005) /*E_ACCESSDENIED*/\n#define MA_DSERR_BUFFERTOOSMALL                   ((HRESULT)0x887800B4)\n#define MA_DSERR_DS8_REQUIRED                     ((HRESULT)0x887800BE)\n#define MA_DSERR_SENDLOOP                         ((HRESULT)0x887800C8)\n#define MA_DSERR_BADSENDBUFFERGUID                ((HRESULT)0x887800D2)\n#define MA_DSERR_OBJECTNOTFOUND                   ((HRESULT)0x88781161)\n#define MA_DSERR_FXUNAVAILABLE                    ((HRESULT)0x887800DC)\n\nstatic ma_result ma_result_from_HRESULT(HRESULT hr)\n{\n    switch (hr)\n    {\n        case NOERROR:                                   return MA_SUCCESS;\n        /*case S_OK:                                      return MA_SUCCESS;*/\n\n        case E_POINTER:                                 return MA_INVALID_ARGS;\n        case E_UNEXPECTED:                              return MA_ERROR;\n        case E_NOTIMPL:                                 return MA_NOT_IMPLEMENTED;\n        case E_OUTOFMEMORY:                             return MA_OUT_OF_MEMORY;\n        case E_INVALIDARG:                              return MA_INVALID_ARGS;\n        case E_NOINTERFACE:                             return MA_API_NOT_FOUND;\n        case E_HANDLE:                                  return MA_INVALID_ARGS;\n        case E_ABORT:                                   return MA_ERROR;\n        case E_FAIL:                                    return MA_ERROR;\n        case E_ACCESSDENIED:                            return MA_ACCESS_DENIED;\n\n        /* WASAPI */\n        case MA_AUDCLNT_E_NOT_INITIALIZED:              return MA_DEVICE_NOT_INITIALIZED;\n        case MA_AUDCLNT_E_ALREADY_INITIALIZED:          return MA_DEVICE_ALREADY_INITIALIZED;\n        case MA_AUDCLNT_E_WRONG_ENDPOINT_TYPE:          return MA_INVALID_ARGS;\n        case MA_AUDCLNT_E_DEVICE_INVALIDATED:           return MA_UNAVAILABLE;\n        case MA_AUDCLNT_E_NOT_STOPPED:                  return MA_DEVICE_NOT_STOPPED;\n        case MA_AUDCLNT_E_BUFFER_TOO_LARGE:             return MA_TOO_BIG;\n        case MA_AUDCLNT_E_OUT_OF_ORDER:                 return MA_INVALID_OPERATION;\n        case MA_AUDCLNT_E_UNSUPPORTED_FORMAT:           return MA_FORMAT_NOT_SUPPORTED;\n        case MA_AUDCLNT_E_INVALID_SIZE:                 return MA_INVALID_ARGS;\n        case MA_AUDCLNT_E_DEVICE_IN_USE:                return MA_BUSY;\n        case MA_AUDCLNT_E_BUFFER_OPERATION_PENDING:     return MA_INVALID_OPERATION;\n        case MA_AUDCLNT_E_THREAD_NOT_REGISTERED:        return MA_DOES_NOT_EXIST;\n        case MA_AUDCLNT_E_NO_SINGLE_PROCESS:            return MA_INVALID_OPERATION;\n        case MA_AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED:   return MA_SHARE_MODE_NOT_SUPPORTED;\n        case MA_AUDCLNT_E_ENDPOINT_CREATE_FAILED:       return MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n        case MA_AUDCLNT_E_SERVICE_NOT_RUNNING:          return MA_NOT_CONNECTED;\n        case MA_AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED:     return MA_INVALID_ARGS;\n        case MA_AUDCLNT_E_EXCLUSIVE_MODE_ONLY:          return MA_SHARE_MODE_NOT_SUPPORTED;\n        case MA_AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL: return MA_INVALID_ARGS;\n        case MA_AUDCLNT_E_EVENTHANDLE_NOT_SET:          return MA_INVALID_ARGS;\n        case MA_AUDCLNT_E_INCORRECT_BUFFER_SIZE:        return MA_INVALID_ARGS;\n        case MA_AUDCLNT_E_BUFFER_SIZE_ERROR:            return MA_INVALID_ARGS;\n        case MA_AUDCLNT_E_CPUUSAGE_EXCEEDED:            return MA_ERROR;\n        case MA_AUDCLNT_E_BUFFER_ERROR:                 return MA_ERROR;\n        case MA_AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED:      return MA_INVALID_ARGS;\n        case MA_AUDCLNT_E_INVALID_DEVICE_PERIOD:        return MA_INVALID_ARGS;\n        case MA_AUDCLNT_E_INVALID_STREAM_FLAG:          return MA_INVALID_ARGS;\n        case MA_AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE: return MA_INVALID_OPERATION;\n        case MA_AUDCLNT_E_OUT_OF_OFFLOAD_RESOURCES:     return MA_OUT_OF_MEMORY;\n        case MA_AUDCLNT_E_OFFLOAD_MODE_ONLY:            return MA_INVALID_OPERATION;\n        case MA_AUDCLNT_E_NONOFFLOAD_MODE_ONLY:         return MA_INVALID_OPERATION;\n        case MA_AUDCLNT_E_RESOURCES_INVALIDATED:        return MA_INVALID_DATA;\n        case MA_AUDCLNT_E_RAW_MODE_UNSUPPORTED:         return MA_INVALID_OPERATION;\n        case MA_AUDCLNT_E_ENGINE_PERIODICITY_LOCKED:    return MA_INVALID_OPERATION;\n        case MA_AUDCLNT_E_ENGINE_FORMAT_LOCKED:         return MA_INVALID_OPERATION;\n        case MA_AUDCLNT_E_HEADTRACKING_ENABLED:         return MA_INVALID_OPERATION;\n        case MA_AUDCLNT_E_HEADTRACKING_UNSUPPORTED:     return MA_INVALID_OPERATION;\n        case MA_AUDCLNT_S_BUFFER_EMPTY:                 return MA_NO_SPACE;\n        case MA_AUDCLNT_S_THREAD_ALREADY_REGISTERED:    return MA_ALREADY_EXISTS;\n        case MA_AUDCLNT_S_POSITION_STALLED:             return MA_ERROR;\n\n        /* DirectSound */\n        /*case MA_DS_OK:                                  return MA_SUCCESS;*/          /* S_OK */\n        case MA_DS_NO_VIRTUALIZATION:                   return MA_SUCCESS;\n        case MA_DSERR_ALLOCATED:                        return MA_ALREADY_IN_USE;\n        case MA_DSERR_CONTROLUNAVAIL:                   return MA_INVALID_OPERATION;\n        /*case MA_DSERR_INVALIDPARAM:                    return MA_INVALID_ARGS;*/      /* E_INVALIDARG */\n        case MA_DSERR_INVALIDCALL:                      return MA_INVALID_OPERATION;\n        /*case MA_DSERR_GENERIC:                          return MA_ERROR;*/            /* E_FAIL */\n        case MA_DSERR_PRIOLEVELNEEDED:                  return MA_INVALID_OPERATION;\n        /*case MA_DSERR_OUTOFMEMORY:                      return MA_OUT_OF_MEMORY;*/    /* E_OUTOFMEMORY */\n        case MA_DSERR_BADFORMAT:                        return MA_FORMAT_NOT_SUPPORTED;\n        /*case MA_DSERR_UNSUPPORTED:                      return MA_NOT_IMPLEMENTED;*/  /* E_NOTIMPL */\n        case MA_DSERR_NODRIVER:                         return MA_FAILED_TO_INIT_BACKEND;\n        case MA_DSERR_ALREADYINITIALIZED:               return MA_DEVICE_ALREADY_INITIALIZED;\n        case MA_DSERR_NOAGGREGATION:                    return MA_ERROR;\n        case MA_DSERR_BUFFERLOST:                       return MA_UNAVAILABLE;\n        case MA_DSERR_OTHERAPPHASPRIO:                  return MA_ACCESS_DENIED;\n        case MA_DSERR_UNINITIALIZED:                    return MA_DEVICE_NOT_INITIALIZED;\n        /*case MA_DSERR_NOINTERFACE:                      return MA_API_NOT_FOUND;*/    /* E_NOINTERFACE */\n        /*case MA_DSERR_ACCESSDENIED:                     return MA_ACCESS_DENIED;*/    /* E_ACCESSDENIED */\n        case MA_DSERR_BUFFERTOOSMALL:                   return MA_NO_SPACE;\n        case MA_DSERR_DS8_REQUIRED:                     return MA_INVALID_OPERATION;\n        case MA_DSERR_SENDLOOP:                         return MA_DEADLOCK;\n        case MA_DSERR_BADSENDBUFFERGUID:                return MA_INVALID_ARGS;\n        case MA_DSERR_OBJECTNOTFOUND:                   return MA_NO_DEVICE;\n        case MA_DSERR_FXUNAVAILABLE:                    return MA_UNAVAILABLE;\n\n        default:                                        return MA_ERROR;\n    }\n}\n\n/* PROPVARIANT */\n#define MA_VT_LPWSTR    31\n#define MA_VT_BLOB      65\n\n#if defined(_MSC_VER) && !defined(__clang__)\n    #pragma warning(push)\n    #pragma warning(disable:4201)   /* nonstandard extension used: nameless struct/union */\n#elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))\n    #pragma GCC diagnostic push\n    #pragma GCC diagnostic ignored \"-Wpedantic\" /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */\n    #if defined(__clang__)\n        #pragma GCC diagnostic ignored \"-Wc11-extensions\"   /* anonymous unions are a C11 extension */\n    #endif\n#endif\ntypedef struct\n{\n    WORD vt;\n    WORD wReserved1;\n    WORD wReserved2;\n    WORD wReserved3;\n    union\n    {\n        struct\n        {\n            ULONG cbSize;\n            BYTE* pBlobData;\n        } blob;\n        WCHAR* pwszVal;\n        char pad[16];   /* Just to ensure the size of the struct matches the official version. */\n    };\n} MA_PROPVARIANT;\n#if defined(_MSC_VER) && !defined(__clang__)\n    #pragma warning(pop)\n#elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))\n    #pragma GCC diagnostic pop\n#endif\n\ntypedef HRESULT (WINAPI * MA_PFN_CoInitialize)(void* pvReserved);\ntypedef HRESULT (WINAPI * MA_PFN_CoInitializeEx)(void* pvReserved, DWORD  dwCoInit);\ntypedef void    (WINAPI * MA_PFN_CoUninitialize)(void);\ntypedef HRESULT (WINAPI * MA_PFN_CoCreateInstance)(const IID* rclsid, void* pUnkOuter, DWORD dwClsContext, const IID* riid, void* ppv);\ntypedef void    (WINAPI * MA_PFN_CoTaskMemFree)(void* pv);\ntypedef HRESULT (WINAPI * MA_PFN_PropVariantClear)(MA_PROPVARIANT *pvar);\ntypedef int     (WINAPI * MA_PFN_StringFromGUID2)(const GUID* const rguid, WCHAR* lpsz, int cchMax);\n\ntypedef HWND    (WINAPI * MA_PFN_GetForegroundWindow)(void);\ntypedef HWND    (WINAPI * MA_PFN_GetDesktopWindow)(void);\n\n#if defined(MA_WIN32_DESKTOP)\n/* Microsoft documents these APIs as returning LSTATUS, but the Win32 API shipping with some compilers do not define it. It's just a LONG. */\ntypedef LONG    (WINAPI * MA_PFN_RegOpenKeyExA)(HKEY hKey, const char* lpSubKey, DWORD ulOptions, DWORD samDesired, HKEY* phkResult);\ntypedef LONG    (WINAPI * MA_PFN_RegCloseKey)(HKEY hKey);\ntypedef LONG    (WINAPI * MA_PFN_RegQueryValueExA)(HKEY hKey, const char* lpValueName, DWORD* lpReserved, DWORD* lpType, BYTE* lpData, DWORD* lpcbData);\n#endif  /* MA_WIN32_DESKTOP */\n\n\nMA_API size_t ma_strlen_WCHAR(const WCHAR* str)\n{\n    size_t len = 0;\n    while (str[len] != '\\0') {\n        len += 1;\n    }\n\n    return len;\n}\n\nMA_API int ma_strcmp_WCHAR(const WCHAR *s1, const WCHAR *s2)\n{\n    while (*s1 != '\\0' && *s1 == *s2) {\n        s1 += 1;\n        s2 += 1;\n    }\n\n    return *s1 - *s2;\n}\n\nMA_API int ma_strcpy_s_WCHAR(WCHAR* dst, size_t dstCap, const WCHAR* src)\n{\n    size_t i;\n\n    if (dst == 0) {\n        return 22;\n    }\n    if (dstCap == 0) {\n        return 34;\n    }\n    if (src == 0) {\n        dst[0] = '\\0';\n        return 22;\n    }\n\n    for (i = 0; i < dstCap && src[i] != '\\0'; ++i) {\n        dst[i] = src[i];\n    }\n\n    if (i < dstCap) {\n        dst[i] = '\\0';\n        return 0;\n    }\n\n    dst[0] = '\\0';\n    return 34;\n}\n#endif  /* MA_WIN32 */\n\n\n#define MA_DEFAULT_PLAYBACK_DEVICE_NAME    \"Default Playback Device\"\n#define MA_DEFAULT_CAPTURE_DEVICE_NAME     \"Default Capture Device\"\n\n\n\n\n/*******************************************************************************\n\nTiming\n\n*******************************************************************************/\n#if defined(MA_WIN32) && !defined(MA_POSIX)\n    static LARGE_INTEGER g_ma_TimerFrequency;   /* <-- Initialized to zero since it's static. */\n    static void ma_timer_init(ma_timer* pTimer)\n    {\n        LARGE_INTEGER counter;\n\n        if (g_ma_TimerFrequency.QuadPart == 0) {\n            QueryPerformanceFrequency(&g_ma_TimerFrequency);\n        }\n\n        QueryPerformanceCounter(&counter);\n        pTimer->counter = counter.QuadPart;\n    }\n\n    static double ma_timer_get_time_in_seconds(ma_timer* pTimer)\n    {\n        LARGE_INTEGER counter;\n        if (!QueryPerformanceCounter(&counter)) {\n            return 0;\n        }\n\n        return (double)(counter.QuadPart - pTimer->counter) / g_ma_TimerFrequency.QuadPart;\n    }\n#elif defined(MA_APPLE) && (__MAC_OS_X_VERSION_MIN_REQUIRED < 101200)\n    static ma_uint64 g_ma_TimerFrequency = 0;\n    static void ma_timer_init(ma_timer* pTimer)\n    {\n        mach_timebase_info_data_t baseTime;\n        mach_timebase_info(&baseTime);\n        g_ma_TimerFrequency = (baseTime.denom * 1e9) / baseTime.numer;\n\n        pTimer->counter = mach_absolute_time();\n    }\n\n    static double ma_timer_get_time_in_seconds(ma_timer* pTimer)\n    {\n        ma_uint64 newTimeCounter = mach_absolute_time();\n        ma_uint64 oldTimeCounter = pTimer->counter;\n\n        return (newTimeCounter - oldTimeCounter) / g_ma_TimerFrequency;\n    }\n#elif defined(MA_EMSCRIPTEN)\n    static MA_INLINE void ma_timer_init(ma_timer* pTimer)\n    {\n        pTimer->counterD = emscripten_get_now();\n    }\n\n    static MA_INLINE double ma_timer_get_time_in_seconds(ma_timer* pTimer)\n    {\n        return (emscripten_get_now() - pTimer->counterD) / 1000;    /* Emscripten is in milliseconds. */\n    }\n#else\n    #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L\n        #if defined(CLOCK_MONOTONIC)\n            #define MA_CLOCK_ID CLOCK_MONOTONIC\n        #else\n            #define MA_CLOCK_ID CLOCK_REALTIME\n        #endif\n\n        static void ma_timer_init(ma_timer* pTimer)\n        {\n            struct timespec newTime;\n            clock_gettime(MA_CLOCK_ID, &newTime);\n\n            pTimer->counter = (newTime.tv_sec * 1000000000) + newTime.tv_nsec;\n        }\n\n        static double ma_timer_get_time_in_seconds(ma_timer* pTimer)\n        {\n            ma_uint64 newTimeCounter;\n            ma_uint64 oldTimeCounter;\n\n            struct timespec newTime;\n            clock_gettime(MA_CLOCK_ID, &newTime);\n\n            newTimeCounter = (newTime.tv_sec * 1000000000) + newTime.tv_nsec;\n            oldTimeCounter = pTimer->counter;\n\n            return (newTimeCounter - oldTimeCounter) / 1000000000.0;\n        }\n    #else\n        static void ma_timer_init(ma_timer* pTimer)\n        {\n            struct timeval newTime;\n            gettimeofday(&newTime, NULL);\n\n            pTimer->counter = (newTime.tv_sec * 1000000) + newTime.tv_usec;\n        }\n\n        static double ma_timer_get_time_in_seconds(ma_timer* pTimer)\n        {\n            ma_uint64 newTimeCounter;\n            ma_uint64 oldTimeCounter;\n\n            struct timeval newTime;\n            gettimeofday(&newTime, NULL);\n\n            newTimeCounter = (newTime.tv_sec * 1000000) + newTime.tv_usec;\n            oldTimeCounter = pTimer->counter;\n\n            return (newTimeCounter - oldTimeCounter) / 1000000.0;\n        }\n    #endif\n#endif\n\n\n\n#if 0\nstatic ma_uint32 ma_get_closest_standard_sample_rate(ma_uint32 sampleRateIn)\n{\n    ma_uint32 closestRate = 0;\n    ma_uint32 closestDiff = 0xFFFFFFFF;\n    size_t iStandardRate;\n\n    for (iStandardRate = 0; iStandardRate < ma_countof(g_maStandardSampleRatePriorities); ++iStandardRate) {\n        ma_uint32 standardRate = g_maStandardSampleRatePriorities[iStandardRate];\n        ma_uint32 diff;\n\n        if (sampleRateIn > standardRate) {\n            diff = sampleRateIn - standardRate;\n        } else {\n            diff = standardRate - sampleRateIn;\n        }\n\n        if (diff == 0) {\n            return standardRate;    /* The input sample rate is a standard rate. */\n        }\n\n        if (closestDiff > diff) {\n            closestDiff = diff;\n            closestRate = standardRate;\n        }\n    }\n\n    return closestRate;\n}\n#endif\n\n\nstatic MA_INLINE unsigned int ma_device_disable_denormals(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (!pDevice->noDisableDenormals) {\n        return ma_disable_denormals();\n    } else {\n        return 0;\n    }\n}\n\nstatic MA_INLINE void ma_device_restore_denormals(ma_device* pDevice, unsigned int prevState)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (!pDevice->noDisableDenormals) {\n        ma_restore_denormals(prevState);\n    } else {\n        /* Do nothing. */\n        (void)prevState;\n    }\n}\n\nstatic ma_device_notification ma_device_notification_init(ma_device* pDevice, ma_device_notification_type type)\n{\n    ma_device_notification notification;\n\n    MA_ZERO_OBJECT(&notification);\n    notification.pDevice = pDevice;\n    notification.type    = type;\n\n    return notification;\n}\n\nstatic void ma_device__on_notification(ma_device_notification notification)\n{\n    if(notification.pDevice != NULL) {\n        MA_ASSERT(notification.pDevice != NULL);\n\n        if (notification.pDevice->onNotification != NULL) {\n            notification.pDevice->onNotification(&notification);\n        }\n\n        /* TEMP FOR COMPATIBILITY: If it's a stopped notification, fire the onStop callback as well. This is only for backwards compatibility and will be removed. */\n        if (notification.pDevice->onStop != NULL && notification.type == ma_device_notification_type_stopped) {\n            notification.pDevice->onStop(notification.pDevice);\n        }\n    }\n}\n\nstatic void ma_device__on_notification_started(ma_device* pDevice)\n{\n    ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_started));\n}\n\nstatic void ma_device__on_notification_stopped(ma_device* pDevice)\n{\n    ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_stopped));\n}\n\n/* Not all platforms support reroute notifications. */\n#if !defined(MA_EMSCRIPTEN)\nstatic void ma_device__on_notification_rerouted(ma_device* pDevice)\n{\n    ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_rerouted));\n}\n#endif\n\n#if defined(MA_EMSCRIPTEN)\nEMSCRIPTEN_KEEPALIVE\nvoid ma_device__on_notification_unlocked(ma_device* pDevice)\n{\n    ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_unlocked));\n}\n#endif\n\n\nstatic void ma_device__on_data_inner(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount)\n{\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(pDevice->onData != NULL);\n\n    if (!pDevice->noPreSilencedOutputBuffer && pFramesOut != NULL) {\n        ma_silence_pcm_frames(pFramesOut, frameCount, pDevice->playback.format, pDevice->playback.channels);\n    }\n\n    pDevice->onData(pDevice, pFramesOut, pFramesIn, frameCount);\n}\n\nstatic void ma_device__on_data(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    /* Don't read more data from the client if we're in the process of stopping. */\n    if (ma_device_get_state(pDevice) == ma_device_state_stopping) {\n        return;\n    }\n\n    if (pDevice->noFixedSizedCallback) {\n        /* Fast path. Not using a fixed sized callback. Process directly from the specified buffers. */\n        ma_device__on_data_inner(pDevice, pFramesOut, pFramesIn, frameCount);\n    } else {\n        /* Slow path. Using a fixed sized callback. Need to use the intermediary buffer. */\n        ma_uint32 totalFramesProcessed = 0;\n\n        while (totalFramesProcessed < frameCount) {\n            ma_uint32 totalFramesRemaining = frameCount - totalFramesProcessed;\n            ma_uint32 framesToProcessThisIteration = 0;\n\n            if (pFramesIn != NULL) {\n                /* Capturing. Write to the intermediary buffer. If there's no room, fire the callback to empty it. */\n                if (pDevice->capture.intermediaryBufferLen < pDevice->capture.intermediaryBufferCap) {\n                    /* There's some room left in the intermediary buffer. Write to it without firing the callback. */\n                    framesToProcessThisIteration = totalFramesRemaining;\n                    if (framesToProcessThisIteration > pDevice->capture.intermediaryBufferCap - pDevice->capture.intermediaryBufferLen) {\n                        framesToProcessThisIteration = pDevice->capture.intermediaryBufferCap - pDevice->capture.intermediaryBufferLen;\n                    }\n\n                    ma_copy_pcm_frames(\n                        ma_offset_pcm_frames_ptr(pDevice->capture.pIntermediaryBuffer, pDevice->capture.intermediaryBufferLen, pDevice->capture.format, pDevice->capture.channels),\n                        ma_offset_pcm_frames_const_ptr(pFramesIn, totalFramesProcessed, pDevice->capture.format, pDevice->capture.channels),\n                        framesToProcessThisIteration,\n                        pDevice->capture.format, pDevice->capture.channels);\n\n                    pDevice->capture.intermediaryBufferLen += framesToProcessThisIteration;\n                }\n\n                if (pDevice->capture.intermediaryBufferLen == pDevice->capture.intermediaryBufferCap) {\n                    /* No room left in the intermediary buffer. Fire the data callback. */\n                    if (pDevice->type == ma_device_type_duplex) {\n                        /* We'll do the duplex data callback later after we've processed the playback data. */\n                    } else {\n                        ma_device__on_data_inner(pDevice, NULL, pDevice->capture.pIntermediaryBuffer, pDevice->capture.intermediaryBufferCap);\n\n                        /* The intermediary buffer has just been drained. */\n                        pDevice->capture.intermediaryBufferLen = 0;\n                    }\n                }\n            }\n\n            if (pFramesOut != NULL) {\n                /* Playing back. Read from the intermediary buffer. If there's nothing in it, fire the callback to fill it. */\n                if (pDevice->playback.intermediaryBufferLen > 0) {\n                    /* There's some content in the intermediary buffer. Read from that without firing the callback. */\n                    if (pDevice->type == ma_device_type_duplex) {\n                        /* The frames processed this iteration for a duplex device will always be based on the capture side. Leave it unmodified. */\n                    } else {\n                        framesToProcessThisIteration = totalFramesRemaining;\n                        if (framesToProcessThisIteration > pDevice->playback.intermediaryBufferLen) {\n                            framesToProcessThisIteration = pDevice->playback.intermediaryBufferLen;\n                        }\n                    }\n\n                    ma_copy_pcm_frames(\n                        ma_offset_pcm_frames_ptr(pFramesOut, totalFramesProcessed, pDevice->playback.format, pDevice->playback.channels),\n                        ma_offset_pcm_frames_ptr(pDevice->playback.pIntermediaryBuffer, pDevice->playback.intermediaryBufferCap - pDevice->playback.intermediaryBufferLen, pDevice->playback.format, pDevice->playback.channels),\n                        framesToProcessThisIteration,\n                        pDevice->playback.format, pDevice->playback.channels);\n\n                    pDevice->playback.intermediaryBufferLen -= framesToProcessThisIteration;\n                }\n\n                if (pDevice->playback.intermediaryBufferLen == 0) {\n                    /* There's nothing in the intermediary buffer. Fire the data callback to fill it. */\n                    if (pDevice->type == ma_device_type_duplex) {\n                        /* In duplex mode, the data callback will be fired later. Nothing to do here. */\n                    } else {\n                        ma_device__on_data_inner(pDevice, pDevice->playback.pIntermediaryBuffer, NULL, pDevice->playback.intermediaryBufferCap);\n\n                        /* The intermediary buffer has just been filled. */\n                        pDevice->playback.intermediaryBufferLen = pDevice->playback.intermediaryBufferCap;\n                    }\n                }\n            }\n\n            /* If we're in duplex mode we might need to do a refill of the data. */\n            if (pDevice->type == ma_device_type_duplex) {\n                if (pDevice->capture.intermediaryBufferLen == pDevice->capture.intermediaryBufferCap) {\n                    ma_device__on_data_inner(pDevice, pDevice->playback.pIntermediaryBuffer, pDevice->capture.pIntermediaryBuffer, pDevice->capture.intermediaryBufferCap);\n\n                    pDevice->playback.intermediaryBufferLen = pDevice->playback.intermediaryBufferCap;  /* The playback buffer will have just been filled. */\n                    pDevice->capture.intermediaryBufferLen  = 0;                                        /* The intermediary buffer has just been drained. */\n                }\n            }\n\n            /* Make sure this is only incremented once in the duplex case. */\n            totalFramesProcessed += framesToProcessThisIteration;\n        }\n    }\n}\n\nstatic void ma_device__handle_data_callback(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount)\n{\n    float masterVolumeFactor;\n\n    ma_device_get_master_volume(pDevice, &masterVolumeFactor);  /* Use ma_device_get_master_volume() to ensure the volume is loaded atomically. */\n\n    if (pDevice->onData) {\n        unsigned int prevDenormalState = ma_device_disable_denormals(pDevice);\n        {\n            /* Volume control of input makes things a bit awkward because the input buffer is read-only. We'll need to use a temp buffer and loop in this case. */\n            if (pFramesIn != NULL && masterVolumeFactor < 1) {\n                ma_uint8 tempFramesIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n                ma_uint32 bpfCapture  = ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels);\n                ma_uint32 bpfPlayback = ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels);\n                ma_uint32 totalFramesProcessed = 0;\n                while (totalFramesProcessed < frameCount) {\n                    ma_uint32 framesToProcessThisIteration = frameCount - totalFramesProcessed;\n                    if (framesToProcessThisIteration > sizeof(tempFramesIn)/bpfCapture) {\n                        framesToProcessThisIteration = sizeof(tempFramesIn)/bpfCapture;\n                    }\n\n                    ma_copy_and_apply_volume_factor_pcm_frames(tempFramesIn, ma_offset_ptr(pFramesIn, totalFramesProcessed*bpfCapture), framesToProcessThisIteration, pDevice->capture.format, pDevice->capture.channels, masterVolumeFactor);\n\n                    ma_device__on_data(pDevice, ma_offset_ptr(pFramesOut, totalFramesProcessed*bpfPlayback), tempFramesIn, framesToProcessThisIteration);\n\n                    totalFramesProcessed += framesToProcessThisIteration;\n                }\n            } else {\n                ma_device__on_data(pDevice, pFramesOut, pFramesIn, frameCount);\n            }\n\n            /* Volume control and clipping for playback devices. */\n            if (pFramesOut != NULL) {\n                if (masterVolumeFactor < 1) {\n                    if (pFramesIn == NULL) {    /* <-- In full-duplex situations, the volume will have been applied to the input samples before the data callback. Applying it again post-callback will incorrectly compound it. */\n                        ma_apply_volume_factor_pcm_frames(pFramesOut, frameCount, pDevice->playback.format, pDevice->playback.channels, masterVolumeFactor);\n                    }\n                }\n\n                if (!pDevice->noClip && pDevice->playback.format == ma_format_f32) {\n                    ma_clip_samples_f32((float*)pFramesOut, (const float*)pFramesOut, frameCount * pDevice->playback.channels);   /* Intentionally specifying the same pointer for both input and output for in-place processing. */\n                }\n            }\n        }\n        ma_device_restore_denormals(pDevice, prevDenormalState);\n    }\n}\n\n\n\n/* A helper function for reading sample data from the client. */\nstatic void ma_device__read_frames_from_client(ma_device* pDevice, ma_uint32 frameCount, void* pFramesOut)\n{\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(frameCount > 0);\n    MA_ASSERT(pFramesOut != NULL);\n\n    if (pDevice->playback.converter.isPassthrough) {\n        ma_device__handle_data_callback(pDevice, pFramesOut, NULL, frameCount);\n    } else {\n        ma_result result;\n        ma_uint64 totalFramesReadOut;\n        void* pRunningFramesOut;\n\n        totalFramesReadOut = 0;\n        pRunningFramesOut  = pFramesOut;\n\n        /*\n        We run slightly different logic depending on whether or not we're using a heap-allocated\n        buffer for caching input data. This will be the case if the data converter does not have\n        the ability to retrieve the required input frame count for a given output frame count.\n        */\n        if (pDevice->playback.pInputCache != NULL) {\n            while (totalFramesReadOut < frameCount) {\n                ma_uint64 framesToReadThisIterationIn;\n                ma_uint64 framesToReadThisIterationOut;\n\n                /* If there's any data available in the cache, that needs to get processed first. */\n                if (pDevice->playback.inputCacheRemaining > 0) {\n                    framesToReadThisIterationOut = (frameCount - totalFramesReadOut);\n                    framesToReadThisIterationIn  = framesToReadThisIterationOut;\n                    if (framesToReadThisIterationIn > pDevice->playback.inputCacheRemaining) {\n                        framesToReadThisIterationIn = pDevice->playback.inputCacheRemaining;\n                    }\n\n                    result = ma_data_converter_process_pcm_frames(&pDevice->playback.converter, ma_offset_pcm_frames_ptr(pDevice->playback.pInputCache, pDevice->playback.inputCacheConsumed, pDevice->playback.format, pDevice->playback.channels), &framesToReadThisIterationIn, pRunningFramesOut, &framesToReadThisIterationOut);\n                    if (result != MA_SUCCESS) {\n                        break;\n                    }\n\n                    pDevice->playback.inputCacheConsumed  += framesToReadThisIterationIn;\n                    pDevice->playback.inputCacheRemaining -= framesToReadThisIterationIn;\n\n                    totalFramesReadOut += framesToReadThisIterationOut;\n                    pRunningFramesOut   = ma_offset_ptr(pRunningFramesOut, framesToReadThisIterationOut * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels));\n\n                    if (framesToReadThisIterationIn == 0 && framesToReadThisIterationOut == 0) {\n                        break;  /* We're done. */\n                    }\n                }\n\n                /* Getting here means there's no data in the cache and we need to fill it up with data from the client. */\n                if (pDevice->playback.inputCacheRemaining == 0) {\n                    ma_device__handle_data_callback(pDevice, pDevice->playback.pInputCache, NULL, (ma_uint32)pDevice->playback.inputCacheCap);\n\n                    pDevice->playback.inputCacheConsumed  = 0;\n                    pDevice->playback.inputCacheRemaining = pDevice->playback.inputCacheCap;\n                }\n            }\n        } else {\n            while (totalFramesReadOut < frameCount) {\n                ma_uint8 pIntermediaryBuffer[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];  /* In client format. */\n                ma_uint64 intermediaryBufferCap = sizeof(pIntermediaryBuffer) / ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels);\n                ma_uint64 framesToReadThisIterationIn;\n                ma_uint64 framesReadThisIterationIn;\n                ma_uint64 framesToReadThisIterationOut;\n                ma_uint64 framesReadThisIterationOut;\n                ma_uint64 requiredInputFrameCount;\n\n                framesToReadThisIterationOut = (frameCount - totalFramesReadOut);\n                framesToReadThisIterationIn = framesToReadThisIterationOut;\n                if (framesToReadThisIterationIn > intermediaryBufferCap) {\n                    framesToReadThisIterationIn = intermediaryBufferCap;\n                }\n\n                ma_data_converter_get_required_input_frame_count(&pDevice->playback.converter, framesToReadThisIterationOut, &requiredInputFrameCount);\n                if (framesToReadThisIterationIn > requiredInputFrameCount) {\n                    framesToReadThisIterationIn = requiredInputFrameCount;\n                }\n\n                if (framesToReadThisIterationIn > 0) {\n                    ma_device__handle_data_callback(pDevice, pIntermediaryBuffer, NULL, (ma_uint32)framesToReadThisIterationIn);\n                }\n\n                /*\n                At this point we have our decoded data in input format and now we need to convert to output format. Note that even if we didn't read any\n                input frames, we still want to try processing frames because there may some output frames generated from cached input data.\n                */\n                framesReadThisIterationIn  = framesToReadThisIterationIn;\n                framesReadThisIterationOut = framesToReadThisIterationOut;\n                result = ma_data_converter_process_pcm_frames(&pDevice->playback.converter, pIntermediaryBuffer, &framesReadThisIterationIn, pRunningFramesOut, &framesReadThisIterationOut);\n                if (result != MA_SUCCESS) {\n                    break;\n                }\n\n                totalFramesReadOut += framesReadThisIterationOut;\n                pRunningFramesOut   = ma_offset_ptr(pRunningFramesOut, framesReadThisIterationOut * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels));\n\n                if (framesReadThisIterationIn == 0 && framesReadThisIterationOut == 0) {\n                    break;  /* We're done. */\n                }\n            }\n        }\n    }\n}\n\n/* A helper for sending sample data to the client. */\nstatic void ma_device__send_frames_to_client(ma_device* pDevice, ma_uint32 frameCountInDeviceFormat, const void* pFramesInDeviceFormat)\n{\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(frameCountInDeviceFormat > 0);\n    MA_ASSERT(pFramesInDeviceFormat != NULL);\n\n    if (pDevice->capture.converter.isPassthrough) {\n        ma_device__handle_data_callback(pDevice, NULL, pFramesInDeviceFormat, frameCountInDeviceFormat);\n    } else {\n        ma_result result;\n        ma_uint8 pFramesInClientFormat[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n        ma_uint64 framesInClientFormatCap = sizeof(pFramesInClientFormat) / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels);\n        ma_uint64 totalDeviceFramesProcessed = 0;\n        ma_uint64 totalClientFramesProcessed = 0;\n        const void* pRunningFramesInDeviceFormat = pFramesInDeviceFormat;\n\n        /* We just keep going until we've exhaused all of our input frames and cannot generate any more output frames. */\n        for (;;) {\n            ma_uint64 deviceFramesProcessedThisIteration;\n            ma_uint64 clientFramesProcessedThisIteration;\n\n            deviceFramesProcessedThisIteration = (frameCountInDeviceFormat - totalDeviceFramesProcessed);\n            clientFramesProcessedThisIteration = framesInClientFormatCap;\n\n            result = ma_data_converter_process_pcm_frames(&pDevice->capture.converter, pRunningFramesInDeviceFormat, &deviceFramesProcessedThisIteration, pFramesInClientFormat, &clientFramesProcessedThisIteration);\n            if (result != MA_SUCCESS) {\n                break;\n            }\n\n            if (clientFramesProcessedThisIteration > 0) {\n                ma_device__handle_data_callback(pDevice, NULL, pFramesInClientFormat, (ma_uint32)clientFramesProcessedThisIteration);    /* Safe cast. */\n            }\n\n            pRunningFramesInDeviceFormat = ma_offset_ptr(pRunningFramesInDeviceFormat, deviceFramesProcessedThisIteration * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels));\n            totalDeviceFramesProcessed  += deviceFramesProcessedThisIteration;\n            totalClientFramesProcessed  += clientFramesProcessedThisIteration;\n\n            /* This is just to silence a warning. I might want to use this variable later so leaving in place for now. */\n            (void)totalClientFramesProcessed;\n\n            if (deviceFramesProcessedThisIteration == 0 && clientFramesProcessedThisIteration == 0) {\n                break;  /* We're done. */\n            }\n        }\n    }\n}\n\nstatic ma_result ma_device__handle_duplex_callback_capture(ma_device* pDevice, ma_uint32 frameCountInDeviceFormat, const void* pFramesInDeviceFormat, ma_pcm_rb* pRB)\n{\n    ma_result result;\n    ma_uint32 totalDeviceFramesProcessed = 0;\n    const void* pRunningFramesInDeviceFormat = pFramesInDeviceFormat;\n\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(frameCountInDeviceFormat > 0);\n    MA_ASSERT(pFramesInDeviceFormat != NULL);\n    MA_ASSERT(pRB != NULL);\n\n    /* Write to the ring buffer. The ring buffer is in the client format which means we need to convert. */\n    for (;;) {\n        ma_uint32 framesToProcessInDeviceFormat = (frameCountInDeviceFormat - totalDeviceFramesProcessed);\n        ma_uint32 framesToProcessInClientFormat = MA_DATA_CONVERTER_STACK_BUFFER_SIZE / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels);\n        ma_uint64 framesProcessedInDeviceFormat;\n        ma_uint64 framesProcessedInClientFormat;\n        void* pFramesInClientFormat;\n\n        result = ma_pcm_rb_acquire_write(pRB, &framesToProcessInClientFormat, &pFramesInClientFormat);\n        if (result != MA_SUCCESS) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"Failed to acquire capture PCM frames from ring buffer.\");\n            break;\n        }\n\n        if (framesToProcessInClientFormat == 0) {\n            if (ma_pcm_rb_pointer_distance(pRB) == (ma_int32)ma_pcm_rb_get_subbuffer_size(pRB)) {\n                break;  /* Overrun. Not enough room in the ring buffer for input frame. Excess frames are dropped. */\n            }\n        }\n\n        /* Convert. */\n        framesProcessedInDeviceFormat = framesToProcessInDeviceFormat;\n        framesProcessedInClientFormat = framesToProcessInClientFormat;\n        result = ma_data_converter_process_pcm_frames(&pDevice->capture.converter, pRunningFramesInDeviceFormat, &framesProcessedInDeviceFormat, pFramesInClientFormat, &framesProcessedInClientFormat);\n        if (result != MA_SUCCESS) {\n            break;\n        }\n\n        result = ma_pcm_rb_commit_write(pRB, (ma_uint32)framesProcessedInClientFormat);  /* Safe cast. */\n        if (result != MA_SUCCESS) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"Failed to commit capture PCM frames to ring buffer.\");\n            break;\n        }\n\n        pRunningFramesInDeviceFormat = ma_offset_ptr(pRunningFramesInDeviceFormat, framesProcessedInDeviceFormat * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels));\n        totalDeviceFramesProcessed += (ma_uint32)framesProcessedInDeviceFormat; /* Safe cast. */\n\n        /* We're done when we're unable to process any client nor device frames. */\n        if (framesProcessedInClientFormat == 0 && framesProcessedInDeviceFormat == 0) {\n            break;  /* Done. */\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device__handle_duplex_callback_playback(ma_device* pDevice, ma_uint32 frameCount, void* pFramesInInternalFormat, ma_pcm_rb* pRB)\n{\n    ma_result result;\n    ma_uint8 silentInputFrames[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n    ma_uint32 totalFramesReadOut = 0;\n\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(frameCount > 0);\n    MA_ASSERT(pFramesInInternalFormat != NULL);\n    MA_ASSERT(pRB != NULL);\n    MA_ASSERT(pDevice->playback.pInputCache != NULL);\n\n    /*\n    Sitting in the ring buffer should be captured data from the capture callback in external format. If there's not enough data in there for\n    the whole frameCount frames we just use silence instead for the input data.\n    */\n    MA_ZERO_MEMORY(silentInputFrames, sizeof(silentInputFrames));\n\n    while (totalFramesReadOut < frameCount && ma_device_is_started(pDevice)) {\n        /*\n        We should have a buffer allocated on the heap. Any playback frames still sitting in there\n        need to be sent to the internal device before we process any more data from the client.\n        */\n        if (pDevice->playback.inputCacheRemaining > 0) {\n            ma_uint64 framesConvertedIn  = pDevice->playback.inputCacheRemaining;\n            ma_uint64 framesConvertedOut = (frameCount - totalFramesReadOut);\n            ma_data_converter_process_pcm_frames(&pDevice->playback.converter, ma_offset_pcm_frames_ptr(pDevice->playback.pInputCache, pDevice->playback.inputCacheConsumed, pDevice->playback.format, pDevice->playback.channels), &framesConvertedIn, pFramesInInternalFormat, &framesConvertedOut);\n\n            pDevice->playback.inputCacheConsumed  += framesConvertedIn;\n            pDevice->playback.inputCacheRemaining -= framesConvertedIn;\n\n            totalFramesReadOut        += (ma_uint32)framesConvertedOut; /* Safe cast. */\n            pFramesInInternalFormat    = ma_offset_ptr(pFramesInInternalFormat, framesConvertedOut * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels));\n        }\n\n        /* If there's no more data in the cache we'll need to fill it with some. */\n        if (totalFramesReadOut < frameCount && pDevice->playback.inputCacheRemaining == 0) {\n            ma_uint32 inputFrameCount;\n            void* pInputFrames;\n\n            inputFrameCount = (ma_uint32)pDevice->playback.inputCacheCap;\n            result = ma_pcm_rb_acquire_read(pRB, &inputFrameCount, &pInputFrames);\n            if (result == MA_SUCCESS) {\n                if (inputFrameCount > 0) {\n                    ma_device__handle_data_callback(pDevice, pDevice->playback.pInputCache, pInputFrames, inputFrameCount);\n                } else {\n                    if (ma_pcm_rb_pointer_distance(pRB) == 0) {\n                        break;  /* Underrun. */\n                    }\n                }\n            } else {\n                /* No capture data available. Feed in silence. */\n                inputFrameCount = (ma_uint32)ma_min(pDevice->playback.inputCacheCap, sizeof(silentInputFrames) / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels));\n                ma_device__handle_data_callback(pDevice, pDevice->playback.pInputCache, silentInputFrames, inputFrameCount);\n            }\n\n            pDevice->playback.inputCacheConsumed  = 0;\n            pDevice->playback.inputCacheRemaining = inputFrameCount;\n\n            result = ma_pcm_rb_commit_read(pRB, inputFrameCount);\n            if (result != MA_SUCCESS) {\n                return result;  /* Should never happen. */\n            }\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\n/* A helper for changing the state of the device. */\nstatic MA_INLINE void ma_device__set_state(ma_device* pDevice, ma_device_state newState)\n{\n    ma_atomic_device_state_set(&pDevice->state, newState);\n}\n\n\n#if defined(MA_WIN32)\n    static GUID MA_GUID_KSDATAFORMAT_SUBTYPE_PCM        = {0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};\n    static GUID MA_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = {0x00000003, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};\n    /*static GUID MA_GUID_KSDATAFORMAT_SUBTYPE_ALAW       = {0x00000006, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};*/\n    /*static GUID MA_GUID_KSDATAFORMAT_SUBTYPE_MULAW      = {0x00000007, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};*/\n#endif\n\n\n\nMA_API ma_uint32 ma_get_format_priority_index(ma_format format) /* Lower = better. */\n{\n    ma_uint32 i;\n    for (i = 0; i < ma_countof(g_maFormatPriorities); ++i) {\n        if (g_maFormatPriorities[i] == format) {\n            return i;\n        }\n    }\n\n    /* Getting here means the format could not be found or is equal to ma_format_unknown. */\n    return (ma_uint32)-1;\n}\n\nstatic ma_result ma_device__post_init_setup(ma_device* pDevice, ma_device_type deviceType);\n\nstatic ma_bool32 ma_device_descriptor_is_valid(const ma_device_descriptor* pDeviceDescriptor)\n{\n    if (pDeviceDescriptor == NULL) {\n        return MA_FALSE;\n    }\n\n    if (pDeviceDescriptor->format == ma_format_unknown) {\n        return MA_FALSE;\n    }\n\n    if (pDeviceDescriptor->channels == 0 || pDeviceDescriptor->channels > MA_MAX_CHANNELS) {\n        return MA_FALSE;\n    }\n\n    if (pDeviceDescriptor->sampleRate == 0) {\n        return MA_FALSE;\n    }\n\n    return MA_TRUE;\n}\n\n\nstatic ma_result ma_device_audio_thread__default_read_write(ma_device* pDevice)\n{\n    ma_result result = MA_SUCCESS;\n    ma_bool32 exitLoop = MA_FALSE;\n    ma_uint8  capturedDeviceData[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n    ma_uint8  playbackDeviceData[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n    ma_uint32 capturedDeviceDataCapInFrames = 0;\n    ma_uint32 playbackDeviceDataCapInFrames = 0;\n\n    MA_ASSERT(pDevice != NULL);\n\n    /* Just some quick validation on the device type and the available callbacks. */\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) {\n        if (pDevice->pContext->callbacks.onDeviceRead == NULL) {\n            return MA_NOT_IMPLEMENTED;\n        }\n\n        capturedDeviceDataCapInFrames = sizeof(capturedDeviceData) / ma_get_bytes_per_frame(pDevice->capture.internalFormat,  pDevice->capture.internalChannels);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        if (pDevice->pContext->callbacks.onDeviceWrite == NULL) {\n            return MA_NOT_IMPLEMENTED;\n        }\n\n        playbackDeviceDataCapInFrames = sizeof(playbackDeviceData) / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels);\n    }\n\n    /* NOTE: The device was started outside of this function, in the worker thread. */\n\n    while (ma_device_get_state(pDevice) == ma_device_state_started && !exitLoop) {\n        switch (pDevice->type) {\n            case ma_device_type_duplex:\n            {\n                /* The process is: onDeviceRead() -> convert -> callback -> convert -> onDeviceWrite() */\n                ma_uint32 totalCapturedDeviceFramesProcessed = 0;\n                ma_uint32 capturedDevicePeriodSizeInFrames = ma_min(pDevice->capture.internalPeriodSizeInFrames, pDevice->playback.internalPeriodSizeInFrames);\n\n                while (totalCapturedDeviceFramesProcessed < capturedDevicePeriodSizeInFrames) {\n                    ma_uint32 capturedDeviceFramesRemaining;\n                    ma_uint32 capturedDeviceFramesProcessed;\n                    ma_uint32 capturedDeviceFramesToProcess;\n                    ma_uint32 capturedDeviceFramesToTryProcessing = capturedDevicePeriodSizeInFrames - totalCapturedDeviceFramesProcessed;\n                    if (capturedDeviceFramesToTryProcessing > capturedDeviceDataCapInFrames) {\n                        capturedDeviceFramesToTryProcessing = capturedDeviceDataCapInFrames;\n                    }\n\n                    result = pDevice->pContext->callbacks.onDeviceRead(pDevice, capturedDeviceData, capturedDeviceFramesToTryProcessing, &capturedDeviceFramesToProcess);\n                    if (result != MA_SUCCESS) {\n                        exitLoop = MA_TRUE;\n                        break;\n                    }\n\n                    capturedDeviceFramesRemaining = capturedDeviceFramesToProcess;\n                    capturedDeviceFramesProcessed = 0;\n\n                    /* At this point we have our captured data in device format and we now need to convert it to client format. */\n                    for (;;) {\n                        ma_uint8  capturedClientData[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n                        ma_uint8  playbackClientData[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n                        ma_uint32 capturedClientDataCapInFrames = sizeof(capturedClientData) / ma_get_bytes_per_frame(pDevice->capture.format,  pDevice->capture.channels);\n                        ma_uint32 playbackClientDataCapInFrames = sizeof(playbackClientData) / ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels);\n                        ma_uint64 capturedClientFramesToProcessThisIteration = ma_min(capturedClientDataCapInFrames, playbackClientDataCapInFrames);\n                        ma_uint64 capturedDeviceFramesToProcessThisIteration = capturedDeviceFramesRemaining;\n                        ma_uint8* pRunningCapturedDeviceFrames = ma_offset_ptr(capturedDeviceData, capturedDeviceFramesProcessed * ma_get_bytes_per_frame(pDevice->capture.internalFormat,  pDevice->capture.internalChannels));\n\n                        /* Convert capture data from device format to client format. */\n                        result = ma_data_converter_process_pcm_frames(&pDevice->capture.converter, pRunningCapturedDeviceFrames, &capturedDeviceFramesToProcessThisIteration, capturedClientData, &capturedClientFramesToProcessThisIteration);\n                        if (result != MA_SUCCESS) {\n                            break;\n                        }\n\n                        /*\n                        If we weren't able to generate any output frames it must mean we've exhaused all of our input. The only time this would not be the case is if capturedClientData was too small\n                        which should never be the case when it's of the size MA_DATA_CONVERTER_STACK_BUFFER_SIZE.\n                        */\n                        if (capturedClientFramesToProcessThisIteration == 0) {\n                            break;\n                        }\n\n                        ma_device__handle_data_callback(pDevice, playbackClientData, capturedClientData, (ma_uint32)capturedClientFramesToProcessThisIteration);    /* Safe cast .*/\n\n                        capturedDeviceFramesProcessed += (ma_uint32)capturedDeviceFramesToProcessThisIteration; /* Safe cast. */\n                        capturedDeviceFramesRemaining -= (ma_uint32)capturedDeviceFramesToProcessThisIteration; /* Safe cast. */\n\n                        /* At this point the playbackClientData buffer should be holding data that needs to be written to the device. */\n                        for (;;) {\n                            ma_uint64 convertedClientFrameCount = capturedClientFramesToProcessThisIteration;\n                            ma_uint64 convertedDeviceFrameCount = playbackDeviceDataCapInFrames;\n                            result = ma_data_converter_process_pcm_frames(&pDevice->playback.converter, playbackClientData, &convertedClientFrameCount, playbackDeviceData, &convertedDeviceFrameCount);\n                            if (result != MA_SUCCESS) {\n                                break;\n                            }\n\n                            result = pDevice->pContext->callbacks.onDeviceWrite(pDevice, playbackDeviceData, (ma_uint32)convertedDeviceFrameCount, NULL);   /* Safe cast. */\n                            if (result != MA_SUCCESS) {\n                                exitLoop = MA_TRUE;\n                                break;\n                            }\n\n                            capturedClientFramesToProcessThisIteration -= (ma_uint32)convertedClientFrameCount;  /* Safe cast. */\n                            if (capturedClientFramesToProcessThisIteration == 0) {\n                                break;\n                            }\n                        }\n\n                        /* In case an error happened from ma_device_write__null()... */\n                        if (result != MA_SUCCESS) {\n                            exitLoop = MA_TRUE;\n                            break;\n                        }\n                    }\n\n                    /* Make sure we don't get stuck in the inner loop. */\n                    if (capturedDeviceFramesProcessed == 0) {\n                        break;\n                    }\n\n                    totalCapturedDeviceFramesProcessed += capturedDeviceFramesProcessed;\n                }\n            } break;\n\n            case ma_device_type_capture:\n            case ma_device_type_loopback:\n            {\n                ma_uint32 periodSizeInFrames = pDevice->capture.internalPeriodSizeInFrames;\n                ma_uint32 framesReadThisPeriod = 0;\n                while (framesReadThisPeriod < periodSizeInFrames) {\n                    ma_uint32 framesRemainingInPeriod = periodSizeInFrames - framesReadThisPeriod;\n                    ma_uint32 framesProcessed;\n                    ma_uint32 framesToReadThisIteration = framesRemainingInPeriod;\n                    if (framesToReadThisIteration > capturedDeviceDataCapInFrames) {\n                        framesToReadThisIteration = capturedDeviceDataCapInFrames;\n                    }\n\n                    result = pDevice->pContext->callbacks.onDeviceRead(pDevice, capturedDeviceData, framesToReadThisIteration, &framesProcessed);\n                    if (result != MA_SUCCESS) {\n                        exitLoop = MA_TRUE;\n                        break;\n                    }\n\n                    /* Make sure we don't get stuck in the inner loop. */\n                    if (framesProcessed == 0) {\n                        break;\n                    }\n\n                    ma_device__send_frames_to_client(pDevice, framesProcessed, capturedDeviceData);\n\n                    framesReadThisPeriod += framesProcessed;\n                }\n            } break;\n\n            case ma_device_type_playback:\n            {\n                /* We write in chunks of the period size, but use a stack allocated buffer for the intermediary. */\n                ma_uint32 periodSizeInFrames = pDevice->playback.internalPeriodSizeInFrames;\n                ma_uint32 framesWrittenThisPeriod = 0;\n                while (framesWrittenThisPeriod < periodSizeInFrames) {\n                    ma_uint32 framesRemainingInPeriod = periodSizeInFrames - framesWrittenThisPeriod;\n                    ma_uint32 framesProcessed;\n                    ma_uint32 framesToWriteThisIteration = framesRemainingInPeriod;\n                    if (framesToWriteThisIteration > playbackDeviceDataCapInFrames) {\n                        framesToWriteThisIteration = playbackDeviceDataCapInFrames;\n                    }\n\n                    ma_device__read_frames_from_client(pDevice, framesToWriteThisIteration, playbackDeviceData);\n\n                    result = pDevice->pContext->callbacks.onDeviceWrite(pDevice, playbackDeviceData, framesToWriteThisIteration, &framesProcessed);\n                    if (result != MA_SUCCESS) {\n                        exitLoop = MA_TRUE;\n                        break;\n                    }\n\n                    /* Make sure we don't get stuck in the inner loop. */\n                    if (framesProcessed == 0) {\n                        break;\n                    }\n\n                    framesWrittenThisPeriod += framesProcessed;\n                }\n            } break;\n\n            /* Should never get here. */\n            default: break;\n        }\n    }\n\n    return result;\n}\n\n\n\n/*******************************************************************************\n\nNull Backend\n\n*******************************************************************************/\n#ifdef MA_HAS_NULL\n\n#define MA_DEVICE_OP_NONE__NULL    0\n#define MA_DEVICE_OP_START__NULL   1\n#define MA_DEVICE_OP_SUSPEND__NULL 2\n#define MA_DEVICE_OP_KILL__NULL    3\n\nstatic ma_thread_result MA_THREADCALL ma_device_thread__null(void* pData)\n{\n    ma_device* pDevice = (ma_device*)pData;\n    MA_ASSERT(pDevice != NULL);\n\n    for (;;) {  /* Keep the thread alive until the device is uninitialized. */\n        ma_uint32 operation;\n\n        /* Wait for an operation to be requested. */\n        ma_event_wait(&pDevice->null_device.operationEvent);\n\n        /* At this point an event should have been triggered. */\n        operation = pDevice->null_device.operation;\n\n        /* Starting the device needs to put the thread into a loop. */\n        if (operation == MA_DEVICE_OP_START__NULL) {\n            /* Reset the timer just in case. */\n            ma_timer_init(&pDevice->null_device.timer);\n\n            /* Getting here means a suspend or kill operation has been requested. */\n            pDevice->null_device.operationResult = MA_SUCCESS;\n            ma_event_signal(&pDevice->null_device.operationCompletionEvent);\n            ma_semaphore_release(&pDevice->null_device.operationSemaphore);\n            continue;\n        }\n\n        /* Suspending the device means we need to stop the timer and just continue the loop. */\n        if (operation == MA_DEVICE_OP_SUSPEND__NULL) {\n            /* We need to add the current run time to the prior run time, then reset the timer. */\n            pDevice->null_device.priorRunTime += ma_timer_get_time_in_seconds(&pDevice->null_device.timer);\n            ma_timer_init(&pDevice->null_device.timer);\n\n            /* We're done. */\n            pDevice->null_device.operationResult = MA_SUCCESS;\n            ma_event_signal(&pDevice->null_device.operationCompletionEvent);\n            ma_semaphore_release(&pDevice->null_device.operationSemaphore);\n            continue;\n        }\n\n        /* Killing the device means we need to get out of this loop so that this thread can terminate. */\n        if (operation == MA_DEVICE_OP_KILL__NULL) {\n            pDevice->null_device.operationResult = MA_SUCCESS;\n            ma_event_signal(&pDevice->null_device.operationCompletionEvent);\n            ma_semaphore_release(&pDevice->null_device.operationSemaphore);\n            break;\n        }\n\n        /* Getting a signal on a \"none\" operation probably means an error. Return invalid operation. */\n        if (operation == MA_DEVICE_OP_NONE__NULL) {\n            MA_ASSERT(MA_FALSE);  /* <-- Trigger this in debug mode to ensure developers are aware they're doing something wrong (or there's a bug in a miniaudio). */\n            pDevice->null_device.operationResult = MA_INVALID_OPERATION;\n            ma_event_signal(&pDevice->null_device.operationCompletionEvent);\n            ma_semaphore_release(&pDevice->null_device.operationSemaphore);\n            continue;   /* Continue the loop. Don't terminate. */\n        }\n    }\n\n    return (ma_thread_result)0;\n}\n\nstatic ma_result ma_device_do_operation__null(ma_device* pDevice, ma_uint32 operation)\n{\n    ma_result result;\n\n    /*\n    TODO: Need to review this and consider just using mutual exclusion. I think the original motivation\n    for this was to just post the event to a queue and return immediately, but that has since changed\n    and now this function is synchronous. I think this can be simplified to just use a mutex.\n    */\n\n    /*\n    The first thing to do is wait for an operation slot to become available. We only have a single slot for this, but we could extend this later\n    to support queing of operations.\n    */\n    result = ma_semaphore_wait(&pDevice->null_device.operationSemaphore);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to wait for the event. */\n    }\n\n    /*\n    When we get here it means the background thread is not referencing the operation code and it can be changed. After changing this we need to\n    signal an event to the worker thread to let it know that it can start work.\n    */\n    pDevice->null_device.operation = operation;\n\n    /* Once the operation code has been set, the worker thread can start work. */\n    if (ma_event_signal(&pDevice->null_device.operationEvent) != MA_SUCCESS) {\n        return MA_ERROR;\n    }\n\n    /* We want everything to be synchronous so we're going to wait for the worker thread to complete it's operation. */\n    if (ma_event_wait(&pDevice->null_device.operationCompletionEvent) != MA_SUCCESS) {\n        return MA_ERROR;\n    }\n\n    return pDevice->null_device.operationResult;\n}\n\nstatic ma_uint64 ma_device_get_total_run_time_in_frames__null(ma_device* pDevice)\n{\n    ma_uint32 internalSampleRate;\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        internalSampleRate = pDevice->capture.internalSampleRate;\n    } else {\n        internalSampleRate = pDevice->playback.internalSampleRate;\n    }\n\n    return (ma_uint64)((pDevice->null_device.priorRunTime + ma_timer_get_time_in_seconds(&pDevice->null_device.timer)) * internalSampleRate);\n}\n\nstatic ma_result ma_context_enumerate_devices__null(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    ma_bool32 cbResult = MA_TRUE;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(callback != NULL);\n\n    /* Playback. */\n    if (cbResult) {\n        ma_device_info deviceInfo;\n        MA_ZERO_OBJECT(&deviceInfo);\n        ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), \"NULL Playback Device\", (size_t)-1);\n        deviceInfo.isDefault = MA_TRUE; /* Only one playback and capture device for the null backend, so might as well mark as default. */\n        cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData);\n    }\n\n    /* Capture. */\n    if (cbResult) {\n        ma_device_info deviceInfo;\n        MA_ZERO_OBJECT(&deviceInfo);\n        ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), \"NULL Capture Device\", (size_t)-1);\n        deviceInfo.isDefault = MA_TRUE; /* Only one playback and capture device for the null backend, so might as well mark as default. */\n        cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData);\n    }\n\n    (void)cbResult; /* Silence a static analysis warning. */\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_get_device_info__null(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    MA_ASSERT(pContext != NULL);\n\n    if (pDeviceID != NULL && pDeviceID->nullbackend != 0) {\n        return MA_NO_DEVICE;   /* Don't know the device. */\n    }\n\n    /* Name / Description */\n    if (deviceType == ma_device_type_playback) {\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), \"NULL Playback Device\", (size_t)-1);\n    } else {\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), \"NULL Capture Device\", (size_t)-1);\n    }\n\n    pDeviceInfo->isDefault = MA_TRUE;   /* Only one playback and capture device for the null backend, so might as well mark as default. */\n\n    /* Support everything on the null backend. */\n    pDeviceInfo->nativeDataFormats[0].format     = ma_format_unknown;\n    pDeviceInfo->nativeDataFormats[0].channels   = 0;\n    pDeviceInfo->nativeDataFormats[0].sampleRate = 0;\n    pDeviceInfo->nativeDataFormats[0].flags      = 0;\n    pDeviceInfo->nativeDataFormatCount = 1;\n\n    (void)pContext;\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_device_uninit__null(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    /* Keep it clean and wait for the device thread to finish before returning. */\n    ma_device_do_operation__null(pDevice, MA_DEVICE_OP_KILL__NULL);\n\n    /* Wait for the thread to finish before continuing. */\n    ma_thread_wait(&pDevice->null_device.deviceThread);\n\n    /* At this point the loop in the device thread is as good as terminated so we can uninitialize our events. */\n    ma_semaphore_uninit(&pDevice->null_device.operationSemaphore);\n    ma_event_uninit(&pDevice->null_device.operationCompletionEvent);\n    ma_event_uninit(&pDevice->null_device.operationEvent);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_init__null(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n    ma_result result;\n\n    MA_ASSERT(pDevice != NULL);\n\n    MA_ZERO_OBJECT(&pDevice->null_device);\n\n    if (pConfig->deviceType == ma_device_type_loopback) {\n        return MA_DEVICE_TYPE_NOT_SUPPORTED;\n    }\n\n    /* The null backend supports everything exactly as we specify it. */\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        pDescriptorCapture->format     = (pDescriptorCapture->format     != ma_format_unknown) ? pDescriptorCapture->format     : MA_DEFAULT_FORMAT;\n        pDescriptorCapture->channels   = (pDescriptorCapture->channels   != 0)                 ? pDescriptorCapture->channels   : MA_DEFAULT_CHANNELS;\n        pDescriptorCapture->sampleRate = (pDescriptorCapture->sampleRate != 0)                 ? pDescriptorCapture->sampleRate : MA_DEFAULT_SAMPLE_RATE;\n\n        if (pDescriptorCapture->channelMap[0] == MA_CHANNEL_NONE) {\n            ma_channel_map_init_standard(ma_standard_channel_map_default, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorCapture->channels);\n        }\n\n        pDescriptorCapture->periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptorCapture, pDescriptorCapture->sampleRate, pConfig->performanceProfile);\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        pDescriptorPlayback->format     = (pDescriptorPlayback->format     != ma_format_unknown) ? pDescriptorPlayback->format     : MA_DEFAULT_FORMAT;\n        pDescriptorPlayback->channels   = (pDescriptorPlayback->channels   != 0)                 ? pDescriptorPlayback->channels   : MA_DEFAULT_CHANNELS;\n        pDescriptorPlayback->sampleRate = (pDescriptorPlayback->sampleRate != 0)                 ? pDescriptorPlayback->sampleRate : MA_DEFAULT_SAMPLE_RATE;\n\n        if (pDescriptorPlayback->channelMap[0] == MA_CHANNEL_NONE) {\n            ma_channel_map_init_standard(ma_standard_channel_map_default, pDescriptorPlayback->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorPlayback->channels);\n        }\n\n        pDescriptorPlayback->periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptorPlayback, pDescriptorPlayback->sampleRate, pConfig->performanceProfile);\n    }\n\n    /*\n    In order to get timing right, we need to create a thread that does nothing but keeps track of the timer. This timer is started when the\n    first period is \"written\" to it, and then stopped in ma_device_stop__null().\n    */\n    result = ma_event_init(&pDevice->null_device.operationEvent);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    result = ma_event_init(&pDevice->null_device.operationCompletionEvent);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    result = ma_semaphore_init(1, &pDevice->null_device.operationSemaphore);    /* <-- It's important that the initial value is set to 1. */\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    result = ma_thread_create(&pDevice->null_device.deviceThread, pDevice->pContext->threadPriority, 0, ma_device_thread__null, pDevice, &pDevice->pContext->allocationCallbacks);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_start__null(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    ma_device_do_operation__null(pDevice, MA_DEVICE_OP_START__NULL);\n\n    ma_atomic_bool32_set(&pDevice->null_device.isStarted, MA_TRUE);\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop__null(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    ma_device_do_operation__null(pDevice, MA_DEVICE_OP_SUSPEND__NULL);\n\n    ma_atomic_bool32_set(&pDevice->null_device.isStarted, MA_FALSE);\n    return MA_SUCCESS;\n}\n\nstatic ma_bool32 ma_device_is_started__null(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    return ma_atomic_bool32_get(&pDevice->null_device.isStarted);\n}\n\nstatic ma_result ma_device_write__null(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint32 totalPCMFramesProcessed;\n    ma_bool32 wasStartedOnEntry;\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = 0;\n    }\n\n    wasStartedOnEntry = ma_device_is_started__null(pDevice);\n\n    /* Keep going until everything has been read. */\n    totalPCMFramesProcessed = 0;\n    while (totalPCMFramesProcessed < frameCount) {\n        ma_uint64 targetFrame;\n\n        /* If there are any frames remaining in the current period, consume those first. */\n        if (pDevice->null_device.currentPeriodFramesRemainingPlayback > 0) {\n            ma_uint32 framesRemaining = (frameCount - totalPCMFramesProcessed);\n            ma_uint32 framesToProcess = pDevice->null_device.currentPeriodFramesRemainingPlayback;\n            if (framesToProcess > framesRemaining) {\n                framesToProcess = framesRemaining;\n            }\n\n            /* We don't actually do anything with pPCMFrames, so just mark it as unused to prevent a warning. */\n            (void)pPCMFrames;\n\n            pDevice->null_device.currentPeriodFramesRemainingPlayback -= framesToProcess;\n            totalPCMFramesProcessed += framesToProcess;\n        }\n\n        /* If we've consumed the current period we'll need to mark it as such an ensure the device is started if it's not already. */\n        if (pDevice->null_device.currentPeriodFramesRemainingPlayback == 0) {\n            pDevice->null_device.currentPeriodFramesRemainingPlayback = 0;\n\n            if (!ma_device_is_started__null(pDevice) && !wasStartedOnEntry) {\n                result = ma_device_start__null(pDevice);\n                if (result != MA_SUCCESS) {\n                    break;\n                }\n            }\n        }\n\n        /* If we've consumed the whole buffer we can return now. */\n        MA_ASSERT(totalPCMFramesProcessed <= frameCount);\n        if (totalPCMFramesProcessed == frameCount) {\n            break;\n        }\n\n        /* Getting here means we've still got more frames to consume, we but need to wait for it to become available. */\n        targetFrame = pDevice->null_device.lastProcessedFramePlayback;\n        for (;;) {\n            ma_uint64 currentFrame;\n\n            /* Stop waiting if the device has been stopped. */\n            if (!ma_device_is_started__null(pDevice)) {\n                break;\n            }\n\n            currentFrame = ma_device_get_total_run_time_in_frames__null(pDevice);\n            if (currentFrame >= targetFrame) {\n                break;\n            }\n\n            /* Getting here means we haven't yet reached the target sample, so continue waiting. */\n            ma_sleep(10);\n        }\n\n        pDevice->null_device.lastProcessedFramePlayback          += pDevice->playback.internalPeriodSizeInFrames;\n        pDevice->null_device.currentPeriodFramesRemainingPlayback = pDevice->playback.internalPeriodSizeInFrames;\n    }\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = totalPCMFramesProcessed;\n    }\n\n    return result;\n}\n\nstatic ma_result ma_device_read__null(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint32 totalPCMFramesProcessed;\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    /* Keep going until everything has been read. */\n    totalPCMFramesProcessed = 0;\n    while (totalPCMFramesProcessed < frameCount) {\n        ma_uint64 targetFrame;\n\n        /* If there are any frames remaining in the current period, consume those first. */\n        if (pDevice->null_device.currentPeriodFramesRemainingCapture > 0) {\n            ma_uint32 bpf = ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels);\n            ma_uint32 framesRemaining = (frameCount - totalPCMFramesProcessed);\n            ma_uint32 framesToProcess = pDevice->null_device.currentPeriodFramesRemainingCapture;\n            if (framesToProcess > framesRemaining) {\n                framesToProcess = framesRemaining;\n            }\n\n            /* We need to ensure the output buffer is zeroed. */\n            MA_ZERO_MEMORY(ma_offset_ptr(pPCMFrames, totalPCMFramesProcessed*bpf), framesToProcess*bpf);\n\n            pDevice->null_device.currentPeriodFramesRemainingCapture -= framesToProcess;\n            totalPCMFramesProcessed += framesToProcess;\n        }\n\n        /* If we've consumed the current period we'll need to mark it as such an ensure the device is started if it's not already. */\n        if (pDevice->null_device.currentPeriodFramesRemainingCapture == 0) {\n            pDevice->null_device.currentPeriodFramesRemainingCapture = 0;\n        }\n\n        /* If we've consumed the whole buffer we can return now. */\n        MA_ASSERT(totalPCMFramesProcessed <= frameCount);\n        if (totalPCMFramesProcessed == frameCount) {\n            break;\n        }\n\n        /* Getting here means we've still got more frames to consume, we but need to wait for it to become available. */\n        targetFrame = pDevice->null_device.lastProcessedFrameCapture + pDevice->capture.internalPeriodSizeInFrames;\n        for (;;) {\n            ma_uint64 currentFrame;\n\n            /* Stop waiting if the device has been stopped. */\n            if (!ma_device_is_started__null(pDevice)) {\n                break;\n            }\n\n            currentFrame = ma_device_get_total_run_time_in_frames__null(pDevice);\n            if (currentFrame >= targetFrame) {\n                break;\n            }\n\n            /* Getting here means we haven't yet reached the target sample, so continue waiting. */\n            ma_sleep(10);\n        }\n\n        pDevice->null_device.lastProcessedFrameCapture          += pDevice->capture.internalPeriodSizeInFrames;\n        pDevice->null_device.currentPeriodFramesRemainingCapture = pDevice->capture.internalPeriodSizeInFrames;\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = totalPCMFramesProcessed;\n    }\n\n    return result;\n}\n\nstatic ma_result ma_context_uninit__null(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_null);\n\n    (void)pContext;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init__null(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n    MA_ASSERT(pContext != NULL);\n\n    (void)pConfig;\n    (void)pContext;\n\n    pCallbacks->onContextInit             = ma_context_init__null;\n    pCallbacks->onContextUninit           = ma_context_uninit__null;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__null;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__null;\n    pCallbacks->onDeviceInit              = ma_device_init__null;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__null;\n    pCallbacks->onDeviceStart             = ma_device_start__null;\n    pCallbacks->onDeviceStop              = ma_device_stop__null;\n    pCallbacks->onDeviceRead              = ma_device_read__null;\n    pCallbacks->onDeviceWrite             = ma_device_write__null;\n    pCallbacks->onDeviceDataLoop          = NULL;   /* Our backend is asynchronous with a blocking read-write API which means we can get miniaudio to deal with the audio thread. */\n\n    /* The null backend always works. */\n    return MA_SUCCESS;\n}\n#endif\n\n\n\n/*******************************************************************************\n\nWIN32 COMMON\n\n*******************************************************************************/\n#if defined(MA_WIN32)\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    #define ma_CoInitializeEx(pContext, pvReserved, dwCoInit)                          ((pContext->win32.CoInitializeEx) ? ((MA_PFN_CoInitializeEx)pContext->win32.CoInitializeEx)(pvReserved, dwCoInit) : ((MA_PFN_CoInitialize)pContext->win32.CoInitialize)(pvReserved))\n    #define ma_CoUninitialize(pContext)                                                ((MA_PFN_CoUninitialize)pContext->win32.CoUninitialize)()\n    #define ma_CoCreateInstance(pContext, rclsid, pUnkOuter, dwClsContext, riid, ppv)  ((MA_PFN_CoCreateInstance)pContext->win32.CoCreateInstance)(rclsid, pUnkOuter, dwClsContext, riid, ppv)\n    #define ma_CoTaskMemFree(pContext, pv)                                             ((MA_PFN_CoTaskMemFree)pContext->win32.CoTaskMemFree)(pv)\n    #define ma_PropVariantClear(pContext, pvar)                                        ((MA_PFN_PropVariantClear)pContext->win32.PropVariantClear)(pvar)\n#else\n    #define ma_CoInitializeEx(pContext, pvReserved, dwCoInit)                          CoInitializeEx(pvReserved, dwCoInit)\n    #define ma_CoUninitialize(pContext)                                                CoUninitialize()\n    #define ma_CoCreateInstance(pContext, rclsid, pUnkOuter, dwClsContext, riid, ppv)  CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv)\n    #define ma_CoTaskMemFree(pContext, pv)                                             CoTaskMemFree(pv)\n    #define ma_PropVariantClear(pContext, pvar)                                        PropVariantClear(pvar)\n#endif\n\n#if !defined(MAXULONG_PTR) && !defined(__WATCOMC__)\ntypedef size_t DWORD_PTR;\n#endif\n\n#if !defined(WAVE_FORMAT_1M08)\n#define WAVE_FORMAT_1M08    0x00000001\n#define WAVE_FORMAT_1S08    0x00000002\n#define WAVE_FORMAT_1M16    0x00000004\n#define WAVE_FORMAT_1S16    0x00000008\n#define WAVE_FORMAT_2M08    0x00000010\n#define WAVE_FORMAT_2S08    0x00000020\n#define WAVE_FORMAT_2M16    0x00000040\n#define WAVE_FORMAT_2S16    0x00000080\n#define WAVE_FORMAT_4M08    0x00000100\n#define WAVE_FORMAT_4S08    0x00000200\n#define WAVE_FORMAT_4M16    0x00000400\n#define WAVE_FORMAT_4S16    0x00000800\n#endif\n\n#if !defined(WAVE_FORMAT_44M08)\n#define WAVE_FORMAT_44M08   0x00000100\n#define WAVE_FORMAT_44S08   0x00000200\n#define WAVE_FORMAT_44M16   0x00000400\n#define WAVE_FORMAT_44S16   0x00000800\n#define WAVE_FORMAT_48M08   0x00001000\n#define WAVE_FORMAT_48S08   0x00002000\n#define WAVE_FORMAT_48M16   0x00004000\n#define WAVE_FORMAT_48S16   0x00008000\n#define WAVE_FORMAT_96M08   0x00010000\n#define WAVE_FORMAT_96S08   0x00020000\n#define WAVE_FORMAT_96M16   0x00040000\n#define WAVE_FORMAT_96S16   0x00080000\n#endif\n\n#ifndef SPEAKER_FRONT_LEFT\n#define SPEAKER_FRONT_LEFT            0x1\n#define SPEAKER_FRONT_RIGHT           0x2\n#define SPEAKER_FRONT_CENTER          0x4\n#define SPEAKER_LOW_FREQUENCY         0x8\n#define SPEAKER_BACK_LEFT             0x10\n#define SPEAKER_BACK_RIGHT            0x20\n#define SPEAKER_FRONT_LEFT_OF_CENTER  0x40\n#define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80\n#define SPEAKER_BACK_CENTER           0x100\n#define SPEAKER_SIDE_LEFT             0x200\n#define SPEAKER_SIDE_RIGHT            0x400\n#define SPEAKER_TOP_CENTER            0x800\n#define SPEAKER_TOP_FRONT_LEFT        0x1000\n#define SPEAKER_TOP_FRONT_CENTER      0x2000\n#define SPEAKER_TOP_FRONT_RIGHT       0x4000\n#define SPEAKER_TOP_BACK_LEFT         0x8000\n#define SPEAKER_TOP_BACK_CENTER       0x10000\n#define SPEAKER_TOP_BACK_RIGHT        0x20000\n#endif\n\n/*\nImplement our own version of MA_WAVEFORMATEXTENSIBLE so we can avoid a header. Be careful with this\nbecause MA_WAVEFORMATEX has an extra two bytes over standard WAVEFORMATEX due to padding. The\nstandard version uses tight packing, but for compiler compatibility we're not doing that with ours.\n*/\ntypedef struct\n{\n    WORD wFormatTag;\n    WORD nChannels;\n    DWORD nSamplesPerSec;\n    DWORD nAvgBytesPerSec;\n    WORD nBlockAlign;\n    WORD wBitsPerSample;\n    WORD cbSize;\n} MA_WAVEFORMATEX;\n\ntypedef struct\n{\n    WORD wFormatTag;\n    WORD nChannels;\n    DWORD nSamplesPerSec;\n    DWORD nAvgBytesPerSec;\n    WORD nBlockAlign;\n    WORD wBitsPerSample;\n    WORD cbSize;\n    union\n    {\n        WORD wValidBitsPerSample;\n        WORD wSamplesPerBlock;\n        WORD wReserved;\n    } Samples;\n    DWORD dwChannelMask;\n    GUID SubFormat;\n} MA_WAVEFORMATEXTENSIBLE;\n\n\n\n#ifndef WAVE_FORMAT_EXTENSIBLE\n#define WAVE_FORMAT_EXTENSIBLE  0xFFFE\n#endif\n\n#ifndef WAVE_FORMAT_PCM\n#define WAVE_FORMAT_PCM         1\n#endif\n\n#ifndef WAVE_FORMAT_IEEE_FLOAT\n#define WAVE_FORMAT_IEEE_FLOAT  0x0003\n#endif\n\n/* Converts an individual Win32-style channel identifier (SPEAKER_FRONT_LEFT, etc.) to miniaudio. */\nstatic ma_uint8 ma_channel_id_to_ma__win32(DWORD id)\n{\n    switch (id)\n    {\n        case SPEAKER_FRONT_LEFT:            return MA_CHANNEL_FRONT_LEFT;\n        case SPEAKER_FRONT_RIGHT:           return MA_CHANNEL_FRONT_RIGHT;\n        case SPEAKER_FRONT_CENTER:          return MA_CHANNEL_FRONT_CENTER;\n        case SPEAKER_LOW_FREQUENCY:         return MA_CHANNEL_LFE;\n        case SPEAKER_BACK_LEFT:             return MA_CHANNEL_BACK_LEFT;\n        case SPEAKER_BACK_RIGHT:            return MA_CHANNEL_BACK_RIGHT;\n        case SPEAKER_FRONT_LEFT_OF_CENTER:  return MA_CHANNEL_FRONT_LEFT_CENTER;\n        case SPEAKER_FRONT_RIGHT_OF_CENTER: return MA_CHANNEL_FRONT_RIGHT_CENTER;\n        case SPEAKER_BACK_CENTER:           return MA_CHANNEL_BACK_CENTER;\n        case SPEAKER_SIDE_LEFT:             return MA_CHANNEL_SIDE_LEFT;\n        case SPEAKER_SIDE_RIGHT:            return MA_CHANNEL_SIDE_RIGHT;\n        case SPEAKER_TOP_CENTER:            return MA_CHANNEL_TOP_CENTER;\n        case SPEAKER_TOP_FRONT_LEFT:        return MA_CHANNEL_TOP_FRONT_LEFT;\n        case SPEAKER_TOP_FRONT_CENTER:      return MA_CHANNEL_TOP_FRONT_CENTER;\n        case SPEAKER_TOP_FRONT_RIGHT:       return MA_CHANNEL_TOP_FRONT_RIGHT;\n        case SPEAKER_TOP_BACK_LEFT:         return MA_CHANNEL_TOP_BACK_LEFT;\n        case SPEAKER_TOP_BACK_CENTER:       return MA_CHANNEL_TOP_BACK_CENTER;\n        case SPEAKER_TOP_BACK_RIGHT:        return MA_CHANNEL_TOP_BACK_RIGHT;\n        default: return 0;\n    }\n}\n\n/* Converts an individual miniaudio channel identifier (MA_CHANNEL_FRONT_LEFT, etc.) to Win32-style. */\nstatic DWORD ma_channel_id_to_win32(DWORD id)\n{\n    switch (id)\n    {\n        case MA_CHANNEL_MONO:               return SPEAKER_FRONT_CENTER;\n        case MA_CHANNEL_FRONT_LEFT:         return SPEAKER_FRONT_LEFT;\n        case MA_CHANNEL_FRONT_RIGHT:        return SPEAKER_FRONT_RIGHT;\n        case MA_CHANNEL_FRONT_CENTER:       return SPEAKER_FRONT_CENTER;\n        case MA_CHANNEL_LFE:                return SPEAKER_LOW_FREQUENCY;\n        case MA_CHANNEL_BACK_LEFT:          return SPEAKER_BACK_LEFT;\n        case MA_CHANNEL_BACK_RIGHT:         return SPEAKER_BACK_RIGHT;\n        case MA_CHANNEL_FRONT_LEFT_CENTER:  return SPEAKER_FRONT_LEFT_OF_CENTER;\n        case MA_CHANNEL_FRONT_RIGHT_CENTER: return SPEAKER_FRONT_RIGHT_OF_CENTER;\n        case MA_CHANNEL_BACK_CENTER:        return SPEAKER_BACK_CENTER;\n        case MA_CHANNEL_SIDE_LEFT:          return SPEAKER_SIDE_LEFT;\n        case MA_CHANNEL_SIDE_RIGHT:         return SPEAKER_SIDE_RIGHT;\n        case MA_CHANNEL_TOP_CENTER:         return SPEAKER_TOP_CENTER;\n        case MA_CHANNEL_TOP_FRONT_LEFT:     return SPEAKER_TOP_FRONT_LEFT;\n        case MA_CHANNEL_TOP_FRONT_CENTER:   return SPEAKER_TOP_FRONT_CENTER;\n        case MA_CHANNEL_TOP_FRONT_RIGHT:    return SPEAKER_TOP_FRONT_RIGHT;\n        case MA_CHANNEL_TOP_BACK_LEFT:      return SPEAKER_TOP_BACK_LEFT;\n        case MA_CHANNEL_TOP_BACK_CENTER:    return SPEAKER_TOP_BACK_CENTER;\n        case MA_CHANNEL_TOP_BACK_RIGHT:     return SPEAKER_TOP_BACK_RIGHT;\n        default: return 0;\n    }\n}\n\n/* Converts a channel mapping to a Win32-style channel mask. */\nstatic DWORD ma_channel_map_to_channel_mask__win32(const ma_channel* pChannelMap, ma_uint32 channels)\n{\n    DWORD dwChannelMask = 0;\n    ma_uint32 iChannel;\n\n    for (iChannel = 0; iChannel < channels; ++iChannel) {\n        dwChannelMask |= ma_channel_id_to_win32(pChannelMap[iChannel]);\n    }\n\n    return dwChannelMask;\n}\n\n/* Converts a Win32-style channel mask to a miniaudio channel map. */\nstatic void ma_channel_mask_to_channel_map__win32(DWORD dwChannelMask, ma_uint32 channels, ma_channel* pChannelMap)\n{\n    /* If the channel mask is set to 0, just assume a default Win32 channel map. */\n    if (dwChannelMask == 0) {\n        ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pChannelMap, channels, channels);\n    } else {\n        if (channels == 1 && (dwChannelMask & SPEAKER_FRONT_CENTER) != 0) {\n            pChannelMap[0] = MA_CHANNEL_MONO;\n        } else {\n            /* Just iterate over each bit. */\n            ma_uint32 iChannel = 0;\n            ma_uint32 iBit;\n\n            for (iBit = 0; iBit < 32 && iChannel < channels; ++iBit) {\n                DWORD bitValue = (dwChannelMask & (1UL << iBit));\n                if (bitValue != 0) {\n                    /* The bit is set. */\n                    pChannelMap[iChannel] = ma_channel_id_to_ma__win32(bitValue);\n                    iChannel += 1;\n                }\n            }\n        }\n    }\n}\n\n#ifdef __cplusplus\nstatic ma_bool32 ma_is_guid_equal(const void* a, const void* b)\n{\n    return IsEqualGUID(*(const GUID*)a, *(const GUID*)b);\n}\n#else\n#define ma_is_guid_equal(a, b) IsEqualGUID((const GUID*)a, (const GUID*)b)\n#endif\n\nstatic MA_INLINE ma_bool32 ma_is_guid_null(const void* guid)\n{\n    static GUID nullguid = {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};\n    return ma_is_guid_equal(guid, &nullguid);\n}\n\nstatic ma_format ma_format_from_WAVEFORMATEX(const MA_WAVEFORMATEX* pWF)\n{\n    MA_ASSERT(pWF != NULL);\n\n    if (pWF->wFormatTag == WAVE_FORMAT_EXTENSIBLE) {\n        const MA_WAVEFORMATEXTENSIBLE* pWFEX = (const MA_WAVEFORMATEXTENSIBLE*)pWF;\n        if (ma_is_guid_equal(&pWFEX->SubFormat, &MA_GUID_KSDATAFORMAT_SUBTYPE_PCM)) {\n            if (pWFEX->Samples.wValidBitsPerSample == 32) {\n                return ma_format_s32;\n            }\n            if (pWFEX->Samples.wValidBitsPerSample == 24) {\n                if (pWFEX->wBitsPerSample == 32) {\n                    return ma_format_s32;\n                }\n                if (pWFEX->wBitsPerSample == 24) {\n                    return ma_format_s24;\n                }\n            }\n            if (pWFEX->Samples.wValidBitsPerSample == 16) {\n                return ma_format_s16;\n            }\n            if (pWFEX->Samples.wValidBitsPerSample == 8) {\n                return ma_format_u8;\n            }\n        }\n        if (ma_is_guid_equal(&pWFEX->SubFormat, &MA_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)) {\n            if (pWFEX->Samples.wValidBitsPerSample == 32) {\n                return ma_format_f32;\n            }\n            /*\n            if (pWFEX->Samples.wValidBitsPerSample == 64) {\n                return ma_format_f64;\n            }\n            */\n        }\n    } else {\n        if (pWF->wFormatTag == WAVE_FORMAT_PCM) {\n            if (pWF->wBitsPerSample == 32) {\n                return ma_format_s32;\n            }\n            if (pWF->wBitsPerSample == 24) {\n                return ma_format_s24;\n            }\n            if (pWF->wBitsPerSample == 16) {\n                return ma_format_s16;\n            }\n            if (pWF->wBitsPerSample == 8) {\n                return ma_format_u8;\n            }\n        }\n        if (pWF->wFormatTag == WAVE_FORMAT_IEEE_FLOAT) {\n            if (pWF->wBitsPerSample == 32) {\n                return ma_format_f32;\n            }\n            if (pWF->wBitsPerSample == 64) {\n                /*return ma_format_f64;*/\n            }\n        }\n    }\n\n    return ma_format_unknown;\n}\n#endif\n\n\n/*******************************************************************************\n\nWASAPI Backend\n\n*******************************************************************************/\n#ifdef MA_HAS_WASAPI\n#if 0\n#if defined(_MSC_VER)\n    #pragma warning(push)\n    #pragma warning(disable:4091)   /* 'typedef ': ignored on left of '' when no variable is declared */\n#endif\n#include <audioclient.h>\n#include <mmdeviceapi.h>\n#if defined(_MSC_VER)\n    #pragma warning(pop)\n#endif\n#endif  /* 0 */\n\nstatic ma_result ma_device_reroute__wasapi(ma_device* pDevice, ma_device_type deviceType);\n\n/* Some compilers don't define VerifyVersionInfoW. Need to write this ourselves. */\n#define MA_WIN32_WINNT_VISTA    0x0600\n#define MA_VER_MINORVERSION     0x01\n#define MA_VER_MAJORVERSION     0x02\n#define MA_VER_SERVICEPACKMAJOR 0x20\n#define MA_VER_GREATER_EQUAL    0x03\n\ntypedef struct  {\n    DWORD dwOSVersionInfoSize;\n    DWORD dwMajorVersion;\n    DWORD dwMinorVersion;\n    DWORD dwBuildNumber;\n    DWORD dwPlatformId;\n    WCHAR szCSDVersion[128];\n    WORD  wServicePackMajor;\n    WORD  wServicePackMinor;\n    WORD  wSuiteMask;\n    BYTE  wProductType;\n    BYTE  wReserved;\n} ma_OSVERSIONINFOEXW;\n\ntypedef BOOL      (WINAPI * ma_PFNVerifyVersionInfoW) (ma_OSVERSIONINFOEXW* lpVersionInfo, DWORD dwTypeMask, DWORDLONG dwlConditionMask);\ntypedef ULONGLONG (WINAPI * ma_PFNVerSetConditionMask)(ULONGLONG dwlConditionMask, DWORD dwTypeBitMask, BYTE dwConditionMask);\n\n\n#ifndef PROPERTYKEY_DEFINED\n#define PROPERTYKEY_DEFINED\n#ifndef __WATCOMC__\ntypedef struct\n{\n    GUID fmtid;\n    DWORD pid;\n} PROPERTYKEY;\n#endif\n#endif\n\n/* Some compilers don't define PropVariantInit(). We just do this ourselves since it's just a memset(). */\nstatic MA_INLINE void ma_PropVariantInit(MA_PROPVARIANT* pProp)\n{\n    MA_ZERO_OBJECT(pProp);\n}\n\n\nstatic const PROPERTYKEY MA_PKEY_Device_FriendlyName             = {{0xA45C254E, 0xDF1C, 0x4EFD, {0x80, 0x20, 0x67, 0xD1, 0x46, 0xA8, 0x50, 0xE0}}, 14};\nstatic const PROPERTYKEY MA_PKEY_AudioEngine_DeviceFormat        = {{0xF19F064D, 0x82C,  0x4E27, {0xBC, 0x73, 0x68, 0x82, 0xA1, 0xBB, 0x8E, 0x4C}},  0};\n\nstatic const IID MA_IID_IUnknown                                 = {0x00000000, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}}; /* 00000000-0000-0000-C000-000000000046 */\n#if !defined(MA_WIN32_DESKTOP) && !defined(MA_WIN32_GDK)\nstatic const IID MA_IID_IAgileObject                             = {0x94EA2B94, 0xE9CC, 0x49E0, {0xC0, 0xFF, 0xEE, 0x64, 0xCA, 0x8F, 0x5B, 0x90}}; /* 94EA2B94-E9CC-49E0-C0FF-EE64CA8F5B90 */\n#endif\n\nstatic const IID MA_IID_IAudioClient                             = {0x1CB9AD4C, 0xDBFA, 0x4C32, {0xB1, 0x78, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2}}; /* 1CB9AD4C-DBFA-4C32-B178-C2F568A703B2 = __uuidof(IAudioClient) */\nstatic const IID MA_IID_IAudioClient2                            = {0x726778CD, 0xF60A, 0x4EDA, {0x82, 0xDE, 0xE4, 0x76, 0x10, 0xCD, 0x78, 0xAA}}; /* 726778CD-F60A-4EDA-82DE-E47610CD78AA = __uuidof(IAudioClient2) */\nstatic const IID MA_IID_IAudioClient3                            = {0x7ED4EE07, 0x8E67, 0x4CD4, {0x8C, 0x1A, 0x2B, 0x7A, 0x59, 0x87, 0xAD, 0x42}}; /* 7ED4EE07-8E67-4CD4-8C1A-2B7A5987AD42 = __uuidof(IAudioClient3) */\nstatic const IID MA_IID_IAudioRenderClient                       = {0xF294ACFC, 0x3146, 0x4483, {0xA7, 0xBF, 0xAD, 0xDC, 0xA7, 0xC2, 0x60, 0xE2}}; /* F294ACFC-3146-4483-A7BF-ADDCA7C260E2 = __uuidof(IAudioRenderClient) */\nstatic const IID MA_IID_IAudioCaptureClient                      = {0xC8ADBD64, 0xE71E, 0x48A0, {0xA4, 0xDE, 0x18, 0x5C, 0x39, 0x5C, 0xD3, 0x17}}; /* C8ADBD64-E71E-48A0-A4DE-185C395CD317 = __uuidof(IAudioCaptureClient) */\nstatic const IID MA_IID_IMMNotificationClient                    = {0x7991EEC9, 0x7E89, 0x4D85, {0x83, 0x90, 0x6C, 0x70, 0x3C, 0xEC, 0x60, 0xC0}}; /* 7991EEC9-7E89-4D85-8390-6C703CEC60C0 = __uuidof(IMMNotificationClient) */\n#if !defined(MA_WIN32_DESKTOP) && !defined(MA_WIN32_GDK)\nstatic const IID MA_IID_DEVINTERFACE_AUDIO_RENDER                = {0xE6327CAD, 0xDCEC, 0x4949, {0xAE, 0x8A, 0x99, 0x1E, 0x97, 0x6A, 0x79, 0xD2}}; /* E6327CAD-DCEC-4949-AE8A-991E976A79D2 */\nstatic const IID MA_IID_DEVINTERFACE_AUDIO_CAPTURE               = {0x2EEF81BE, 0x33FA, 0x4800, {0x96, 0x70, 0x1C, 0xD4, 0x74, 0x97, 0x2C, 0x3F}}; /* 2EEF81BE-33FA-4800-9670-1CD474972C3F */\nstatic const IID MA_IID_IActivateAudioInterfaceCompletionHandler = {0x41D949AB, 0x9862, 0x444A, {0x80, 0xF6, 0xC2, 0x61, 0x33, 0x4D, 0xA5, 0xEB}}; /* 41D949AB-9862-444A-80F6-C261334DA5EB */\n#endif\n\nstatic const IID MA_CLSID_MMDeviceEnumerator                     = {0xBCDE0395, 0xE52F, 0x467C, {0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E}}; /* BCDE0395-E52F-467C-8E3D-C4579291692E = __uuidof(MMDeviceEnumerator) */\nstatic const IID MA_IID_IMMDeviceEnumerator                      = {0xA95664D2, 0x9614, 0x4F35, {0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6}}; /* A95664D2-9614-4F35-A746-DE8DB63617E6 = __uuidof(IMMDeviceEnumerator) */\n\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n#define MA_MM_DEVICE_STATE_ACTIVE                          1\n#define MA_MM_DEVICE_STATE_DISABLED                        2\n#define MA_MM_DEVICE_STATE_NOTPRESENT                      4\n#define MA_MM_DEVICE_STATE_UNPLUGGED                       8\n\ntypedef struct ma_IMMDeviceEnumerator                      ma_IMMDeviceEnumerator;\ntypedef struct ma_IMMDeviceCollection                      ma_IMMDeviceCollection;\ntypedef struct ma_IMMDevice                                ma_IMMDevice;\n#else\ntypedef struct ma_IActivateAudioInterfaceCompletionHandler ma_IActivateAudioInterfaceCompletionHandler;\ntypedef struct ma_IActivateAudioInterfaceAsyncOperation    ma_IActivateAudioInterfaceAsyncOperation;\n#endif\ntypedef struct ma_IPropertyStore                           ma_IPropertyStore;\ntypedef struct ma_IAudioClient                             ma_IAudioClient;\ntypedef struct ma_IAudioClient2                            ma_IAudioClient2;\ntypedef struct ma_IAudioClient3                            ma_IAudioClient3;\ntypedef struct ma_IAudioRenderClient                       ma_IAudioRenderClient;\ntypedef struct ma_IAudioCaptureClient                      ma_IAudioCaptureClient;\n\ntypedef ma_int64                                           MA_REFERENCE_TIME;\n\n#define MA_AUDCLNT_STREAMFLAGS_CROSSPROCESS                0x00010000\n#define MA_AUDCLNT_STREAMFLAGS_LOOPBACK                    0x00020000\n#define MA_AUDCLNT_STREAMFLAGS_EVENTCALLBACK               0x00040000\n#define MA_AUDCLNT_STREAMFLAGS_NOPERSIST                   0x00080000\n#define MA_AUDCLNT_STREAMFLAGS_RATEADJUST                  0x00100000\n#define MA_AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY         0x08000000\n#define MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM              0x80000000\n#define MA_AUDCLNT_SESSIONFLAGS_EXPIREWHENUNOWNED          0x10000000\n#define MA_AUDCLNT_SESSIONFLAGS_DISPLAY_HIDE               0x20000000\n#define MA_AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED    0x40000000\n\n/* Buffer flags. */\n#define MA_AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY          1\n#define MA_AUDCLNT_BUFFERFLAGS_SILENT                      2\n#define MA_AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR             4\n\ntypedef enum\n{\n    ma_eRender  = 0,\n    ma_eCapture = 1,\n    ma_eAll     = 2\n} ma_EDataFlow;\n\ntypedef enum\n{\n    ma_eConsole        = 0,\n    ma_eMultimedia     = 1,\n    ma_eCommunications = 2\n} ma_ERole;\n\ntypedef enum\n{\n    MA_AUDCLNT_SHAREMODE_SHARED,\n    MA_AUDCLNT_SHAREMODE_EXCLUSIVE\n} MA_AUDCLNT_SHAREMODE;\n\ntypedef enum\n{\n    MA_AudioCategory_Other = 0  /* <-- miniaudio is only caring about Other. */\n} MA_AUDIO_STREAM_CATEGORY;\n\ntypedef struct\n{\n    ma_uint32 cbSize;\n    BOOL bIsOffload;\n    MA_AUDIO_STREAM_CATEGORY eCategory;\n} ma_AudioClientProperties;\n\n/* IUnknown */\ntypedef struct\n{\n    /* IUnknown */\n    HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IUnknown* pThis, const IID* const riid, void** ppObject);\n    ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IUnknown* pThis);\n    ULONG   (STDMETHODCALLTYPE * Release)       (ma_IUnknown* pThis);\n} ma_IUnknownVtbl;\nstruct ma_IUnknown\n{\n    ma_IUnknownVtbl* lpVtbl;\n};\nstatic MA_INLINE HRESULT ma_IUnknown_QueryInterface(ma_IUnknown* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\nstatic MA_INLINE ULONG   ma_IUnknown_AddRef(ma_IUnknown* pThis)                                                 { return pThis->lpVtbl->AddRef(pThis); }\nstatic MA_INLINE ULONG   ma_IUnknown_Release(ma_IUnknown* pThis)                                                { return pThis->lpVtbl->Release(pThis); }\n\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    /* IMMNotificationClient */\n    typedef struct\n    {\n        /* IUnknown */\n        HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IMMNotificationClient* pThis, const IID* const riid, void** ppObject);\n        ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IMMNotificationClient* pThis);\n        ULONG   (STDMETHODCALLTYPE * Release)       (ma_IMMNotificationClient* pThis);\n\n        /* IMMNotificationClient */\n        HRESULT (STDMETHODCALLTYPE * OnDeviceStateChanged)  (ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID, DWORD dwNewState);\n        HRESULT (STDMETHODCALLTYPE * OnDeviceAdded)         (ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID);\n        HRESULT (STDMETHODCALLTYPE * OnDeviceRemoved)       (ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID);\n        HRESULT (STDMETHODCALLTYPE * OnDefaultDeviceChanged)(ma_IMMNotificationClient* pThis, ma_EDataFlow dataFlow, ma_ERole role, const WCHAR* pDefaultDeviceID);\n        HRESULT (STDMETHODCALLTYPE * OnPropertyValueChanged)(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID, const PROPERTYKEY key);\n    } ma_IMMNotificationClientVtbl;\n\n    /* IMMDeviceEnumerator */\n    typedef struct\n    {\n        /* IUnknown */\n        HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IMMDeviceEnumerator* pThis, const IID* const riid, void** ppObject);\n        ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IMMDeviceEnumerator* pThis);\n        ULONG   (STDMETHODCALLTYPE * Release)       (ma_IMMDeviceEnumerator* pThis);\n\n        /* IMMDeviceEnumerator */\n        HRESULT (STDMETHODCALLTYPE * EnumAudioEndpoints)                    (ma_IMMDeviceEnumerator* pThis, ma_EDataFlow dataFlow, DWORD dwStateMask, ma_IMMDeviceCollection** ppDevices);\n        HRESULT (STDMETHODCALLTYPE * GetDefaultAudioEndpoint)               (ma_IMMDeviceEnumerator* pThis, ma_EDataFlow dataFlow, ma_ERole role, ma_IMMDevice** ppEndpoint);\n        HRESULT (STDMETHODCALLTYPE * GetDevice)                             (ma_IMMDeviceEnumerator* pThis, const WCHAR* pID, ma_IMMDevice** ppDevice);\n        HRESULT (STDMETHODCALLTYPE * RegisterEndpointNotificationCallback)  (ma_IMMDeviceEnumerator* pThis, ma_IMMNotificationClient* pClient);\n        HRESULT (STDMETHODCALLTYPE * UnregisterEndpointNotificationCallback)(ma_IMMDeviceEnumerator* pThis, ma_IMMNotificationClient* pClient);\n    } ma_IMMDeviceEnumeratorVtbl;\n    struct ma_IMMDeviceEnumerator\n    {\n        ma_IMMDeviceEnumeratorVtbl* lpVtbl;\n    };\n    static MA_INLINE HRESULT ma_IMMDeviceEnumerator_QueryInterface(ma_IMMDeviceEnumerator* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\n    static MA_INLINE ULONG   ma_IMMDeviceEnumerator_AddRef(ma_IMMDeviceEnumerator* pThis)                                                 { return pThis->lpVtbl->AddRef(pThis); }\n    static MA_INLINE ULONG   ma_IMMDeviceEnumerator_Release(ma_IMMDeviceEnumerator* pThis)                                                { return pThis->lpVtbl->Release(pThis); }\n    static MA_INLINE HRESULT ma_IMMDeviceEnumerator_EnumAudioEndpoints(ma_IMMDeviceEnumerator* pThis, ma_EDataFlow dataFlow, DWORD dwStateMask, ma_IMMDeviceCollection** ppDevices) { return pThis->lpVtbl->EnumAudioEndpoints(pThis, dataFlow, dwStateMask, ppDevices); }\n    static MA_INLINE HRESULT ma_IMMDeviceEnumerator_GetDefaultAudioEndpoint(ma_IMMDeviceEnumerator* pThis, ma_EDataFlow dataFlow, ma_ERole role, ma_IMMDevice** ppEndpoint) { return pThis->lpVtbl->GetDefaultAudioEndpoint(pThis, dataFlow, role, ppEndpoint); }\n    static MA_INLINE HRESULT ma_IMMDeviceEnumerator_GetDevice(ma_IMMDeviceEnumerator* pThis, const WCHAR* pID, ma_IMMDevice** ppDevice) { return pThis->lpVtbl->GetDevice(pThis, pID, ppDevice); }\n    static MA_INLINE HRESULT ma_IMMDeviceEnumerator_RegisterEndpointNotificationCallback(ma_IMMDeviceEnumerator* pThis, ma_IMMNotificationClient* pClient) { return pThis->lpVtbl->RegisterEndpointNotificationCallback(pThis, pClient); }\n    static MA_INLINE HRESULT ma_IMMDeviceEnumerator_UnregisterEndpointNotificationCallback(ma_IMMDeviceEnumerator* pThis, ma_IMMNotificationClient* pClient) { return pThis->lpVtbl->UnregisterEndpointNotificationCallback(pThis, pClient); }\n\n\n    /* IMMDeviceCollection */\n    typedef struct\n    {\n        /* IUnknown */\n        HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IMMDeviceCollection* pThis, const IID* const riid, void** ppObject);\n        ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IMMDeviceCollection* pThis);\n        ULONG   (STDMETHODCALLTYPE * Release)       (ma_IMMDeviceCollection* pThis);\n\n        /* IMMDeviceCollection */\n        HRESULT (STDMETHODCALLTYPE * GetCount)(ma_IMMDeviceCollection* pThis, UINT* pDevices);\n        HRESULT (STDMETHODCALLTYPE * Item)    (ma_IMMDeviceCollection* pThis, UINT nDevice, ma_IMMDevice** ppDevice);\n    } ma_IMMDeviceCollectionVtbl;\n    struct ma_IMMDeviceCollection\n    {\n        ma_IMMDeviceCollectionVtbl* lpVtbl;\n    };\n    static MA_INLINE HRESULT ma_IMMDeviceCollection_QueryInterface(ma_IMMDeviceCollection* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\n    static MA_INLINE ULONG   ma_IMMDeviceCollection_AddRef(ma_IMMDeviceCollection* pThis)                                                 { return pThis->lpVtbl->AddRef(pThis); }\n    static MA_INLINE ULONG   ma_IMMDeviceCollection_Release(ma_IMMDeviceCollection* pThis)                                                { return pThis->lpVtbl->Release(pThis); }\n    static MA_INLINE HRESULT ma_IMMDeviceCollection_GetCount(ma_IMMDeviceCollection* pThis, UINT* pDevices)                               { return pThis->lpVtbl->GetCount(pThis, pDevices); }\n    static MA_INLINE HRESULT ma_IMMDeviceCollection_Item(ma_IMMDeviceCollection* pThis, UINT nDevice, ma_IMMDevice** ppDevice)            { return pThis->lpVtbl->Item(pThis, nDevice, ppDevice); }\n\n\n    /* IMMDevice */\n    typedef struct\n    {\n        /* IUnknown */\n        HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IMMDevice* pThis, const IID* const riid, void** ppObject);\n        ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IMMDevice* pThis);\n        ULONG   (STDMETHODCALLTYPE * Release)       (ma_IMMDevice* pThis);\n\n        /* IMMDevice */\n        HRESULT (STDMETHODCALLTYPE * Activate)         (ma_IMMDevice* pThis, const IID* const iid, DWORD dwClsCtx, MA_PROPVARIANT* pActivationParams, void** ppInterface);\n        HRESULT (STDMETHODCALLTYPE * OpenPropertyStore)(ma_IMMDevice* pThis, DWORD stgmAccess, ma_IPropertyStore** ppProperties);\n        HRESULT (STDMETHODCALLTYPE * GetId)            (ma_IMMDevice* pThis, WCHAR** pID);\n        HRESULT (STDMETHODCALLTYPE * GetState)         (ma_IMMDevice* pThis, DWORD *pState);\n    } ma_IMMDeviceVtbl;\n    struct ma_IMMDevice\n    {\n        ma_IMMDeviceVtbl* lpVtbl;\n    };\n    static MA_INLINE HRESULT ma_IMMDevice_QueryInterface(ma_IMMDevice* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\n    static MA_INLINE ULONG   ma_IMMDevice_AddRef(ma_IMMDevice* pThis)                                                 { return pThis->lpVtbl->AddRef(pThis); }\n    static MA_INLINE ULONG   ma_IMMDevice_Release(ma_IMMDevice* pThis)                                                { return pThis->lpVtbl->Release(pThis); }\n    static MA_INLINE HRESULT ma_IMMDevice_Activate(ma_IMMDevice* pThis, const IID* const iid, DWORD dwClsCtx, MA_PROPVARIANT* pActivationParams, void** ppInterface) { return pThis->lpVtbl->Activate(pThis, iid, dwClsCtx, pActivationParams, ppInterface); }\n    static MA_INLINE HRESULT ma_IMMDevice_OpenPropertyStore(ma_IMMDevice* pThis, DWORD stgmAccess, ma_IPropertyStore** ppProperties) { return pThis->lpVtbl->OpenPropertyStore(pThis, stgmAccess, ppProperties); }\n    static MA_INLINE HRESULT ma_IMMDevice_GetId(ma_IMMDevice* pThis, WCHAR** pID)                                     { return pThis->lpVtbl->GetId(pThis, pID); }\n    static MA_INLINE HRESULT ma_IMMDevice_GetState(ma_IMMDevice* pThis, DWORD *pState)                                { return pThis->lpVtbl->GetState(pThis, pState); }\n#else\n    /* IActivateAudioInterfaceAsyncOperation */\n    typedef struct\n    {\n        /* IUnknown */\n        HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IActivateAudioInterfaceAsyncOperation* pThis, const IID* const riid, void** ppObject);\n        ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IActivateAudioInterfaceAsyncOperation* pThis);\n        ULONG   (STDMETHODCALLTYPE * Release)       (ma_IActivateAudioInterfaceAsyncOperation* pThis);\n\n        /* IActivateAudioInterfaceAsyncOperation */\n        HRESULT (STDMETHODCALLTYPE * GetActivateResult)(ma_IActivateAudioInterfaceAsyncOperation* pThis, HRESULT *pActivateResult, ma_IUnknown** ppActivatedInterface);\n    } ma_IActivateAudioInterfaceAsyncOperationVtbl;\n    struct ma_IActivateAudioInterfaceAsyncOperation\n    {\n        ma_IActivateAudioInterfaceAsyncOperationVtbl* lpVtbl;\n    };\n    static MA_INLINE HRESULT ma_IActivateAudioInterfaceAsyncOperation_QueryInterface(ma_IActivateAudioInterfaceAsyncOperation* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\n    static MA_INLINE ULONG   ma_IActivateAudioInterfaceAsyncOperation_AddRef(ma_IActivateAudioInterfaceAsyncOperation* pThis)                                                 { return pThis->lpVtbl->AddRef(pThis); }\n    static MA_INLINE ULONG   ma_IActivateAudioInterfaceAsyncOperation_Release(ma_IActivateAudioInterfaceAsyncOperation* pThis)                                                { return pThis->lpVtbl->Release(pThis); }\n    static MA_INLINE HRESULT ma_IActivateAudioInterfaceAsyncOperation_GetActivateResult(ma_IActivateAudioInterfaceAsyncOperation* pThis, HRESULT *pActivateResult, ma_IUnknown** ppActivatedInterface) { return pThis->lpVtbl->GetActivateResult(pThis, pActivateResult, ppActivatedInterface); }\n#endif\n\n/* IPropertyStore */\ntypedef struct\n{\n    /* IUnknown */\n    HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IPropertyStore* pThis, const IID* const riid, void** ppObject);\n    ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IPropertyStore* pThis);\n    ULONG   (STDMETHODCALLTYPE * Release)       (ma_IPropertyStore* pThis);\n\n    /* IPropertyStore */\n    HRESULT (STDMETHODCALLTYPE * GetCount)(ma_IPropertyStore* pThis, DWORD* pPropCount);\n    HRESULT (STDMETHODCALLTYPE * GetAt)   (ma_IPropertyStore* pThis, DWORD propIndex, PROPERTYKEY* pPropKey);\n    HRESULT (STDMETHODCALLTYPE * GetValue)(ma_IPropertyStore* pThis, const PROPERTYKEY* const pKey, MA_PROPVARIANT* pPropVar);\n    HRESULT (STDMETHODCALLTYPE * SetValue)(ma_IPropertyStore* pThis, const PROPERTYKEY* const pKey, const MA_PROPVARIANT* const pPropVar);\n    HRESULT (STDMETHODCALLTYPE * Commit)  (ma_IPropertyStore* pThis);\n} ma_IPropertyStoreVtbl;\nstruct ma_IPropertyStore\n{\n    ma_IPropertyStoreVtbl* lpVtbl;\n};\nstatic MA_INLINE HRESULT ma_IPropertyStore_QueryInterface(ma_IPropertyStore* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\nstatic MA_INLINE ULONG   ma_IPropertyStore_AddRef(ma_IPropertyStore* pThis)                                                 { return pThis->lpVtbl->AddRef(pThis); }\nstatic MA_INLINE ULONG   ma_IPropertyStore_Release(ma_IPropertyStore* pThis)                                                { return pThis->lpVtbl->Release(pThis); }\nstatic MA_INLINE HRESULT ma_IPropertyStore_GetCount(ma_IPropertyStore* pThis, DWORD* pPropCount)                            { return pThis->lpVtbl->GetCount(pThis, pPropCount); }\nstatic MA_INLINE HRESULT ma_IPropertyStore_GetAt(ma_IPropertyStore* pThis, DWORD propIndex, PROPERTYKEY* pPropKey)          { return pThis->lpVtbl->GetAt(pThis, propIndex, pPropKey); }\nstatic MA_INLINE HRESULT ma_IPropertyStore_GetValue(ma_IPropertyStore* pThis, const PROPERTYKEY* const pKey, MA_PROPVARIANT* pPropVar) { return pThis->lpVtbl->GetValue(pThis, pKey, pPropVar); }\nstatic MA_INLINE HRESULT ma_IPropertyStore_SetValue(ma_IPropertyStore* pThis, const PROPERTYKEY* const pKey, const MA_PROPVARIANT* const pPropVar) { return pThis->lpVtbl->SetValue(pThis, pKey, pPropVar); }\nstatic MA_INLINE HRESULT ma_IPropertyStore_Commit(ma_IPropertyStore* pThis)                                                 { return pThis->lpVtbl->Commit(pThis); }\n\n\n/* IAudioClient */\ntypedef struct\n{\n    /* IUnknown */\n    HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioClient* pThis, const IID* const riid, void** ppObject);\n    ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IAudioClient* pThis);\n    ULONG   (STDMETHODCALLTYPE * Release)       (ma_IAudioClient* pThis);\n\n    /* IAudioClient */\n    HRESULT (STDMETHODCALLTYPE * Initialize)       (ma_IAudioClient* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid);\n    HRESULT (STDMETHODCALLTYPE * GetBufferSize)    (ma_IAudioClient* pThis, ma_uint32* pNumBufferFrames);\n    HRESULT (STDMETHODCALLTYPE * GetStreamLatency) (ma_IAudioClient* pThis, MA_REFERENCE_TIME* pLatency);\n    HRESULT (STDMETHODCALLTYPE * GetCurrentPadding)(ma_IAudioClient* pThis, ma_uint32* pNumPaddingFrames);\n    HRESULT (STDMETHODCALLTYPE * IsFormatSupported)(ma_IAudioClient* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch);\n    HRESULT (STDMETHODCALLTYPE * GetMixFormat)     (ma_IAudioClient* pThis, MA_WAVEFORMATEX** ppDeviceFormat);\n    HRESULT (STDMETHODCALLTYPE * GetDevicePeriod)  (ma_IAudioClient* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod);\n    HRESULT (STDMETHODCALLTYPE * Start)            (ma_IAudioClient* pThis);\n    HRESULT (STDMETHODCALLTYPE * Stop)             (ma_IAudioClient* pThis);\n    HRESULT (STDMETHODCALLTYPE * Reset)            (ma_IAudioClient* pThis);\n    HRESULT (STDMETHODCALLTYPE * SetEventHandle)   (ma_IAudioClient* pThis, HANDLE eventHandle);\n    HRESULT (STDMETHODCALLTYPE * GetService)       (ma_IAudioClient* pThis, const IID* const riid, void** pp);\n} ma_IAudioClientVtbl;\nstruct ma_IAudioClient\n{\n    ma_IAudioClientVtbl* lpVtbl;\n};\nstatic MA_INLINE HRESULT ma_IAudioClient_QueryInterface(ma_IAudioClient* pThis, const IID* const riid, void** ppObject)    { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\nstatic MA_INLINE ULONG   ma_IAudioClient_AddRef(ma_IAudioClient* pThis)                                                    { return pThis->lpVtbl->AddRef(pThis); }\nstatic MA_INLINE ULONG   ma_IAudioClient_Release(ma_IAudioClient* pThis)                                                   { return pThis->lpVtbl->Release(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioClient_Initialize(ma_IAudioClient* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid) { return pThis->lpVtbl->Initialize(pThis, shareMode, streamFlags, bufferDuration, periodicity, pFormat, pAudioSessionGuid); }\nstatic MA_INLINE HRESULT ma_IAudioClient_GetBufferSize(ma_IAudioClient* pThis, ma_uint32* pNumBufferFrames)                { return pThis->lpVtbl->GetBufferSize(pThis, pNumBufferFrames); }\nstatic MA_INLINE HRESULT ma_IAudioClient_GetStreamLatency(ma_IAudioClient* pThis, MA_REFERENCE_TIME* pLatency)             { return pThis->lpVtbl->GetStreamLatency(pThis, pLatency); }\nstatic MA_INLINE HRESULT ma_IAudioClient_GetCurrentPadding(ma_IAudioClient* pThis, ma_uint32* pNumPaddingFrames)           { return pThis->lpVtbl->GetCurrentPadding(pThis, pNumPaddingFrames); }\nstatic MA_INLINE HRESULT ma_IAudioClient_IsFormatSupported(ma_IAudioClient* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch) { return pThis->lpVtbl->IsFormatSupported(pThis, shareMode, pFormat, ppClosestMatch); }\nstatic MA_INLINE HRESULT ma_IAudioClient_GetMixFormat(ma_IAudioClient* pThis, MA_WAVEFORMATEX** ppDeviceFormat)            { return pThis->lpVtbl->GetMixFormat(pThis, ppDeviceFormat); }\nstatic MA_INLINE HRESULT ma_IAudioClient_GetDevicePeriod(ma_IAudioClient* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod) { return pThis->lpVtbl->GetDevicePeriod(pThis, pDefaultDevicePeriod, pMinimumDevicePeriod); }\nstatic MA_INLINE HRESULT ma_IAudioClient_Start(ma_IAudioClient* pThis)                                                     { return pThis->lpVtbl->Start(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioClient_Stop(ma_IAudioClient* pThis)                                                      { return pThis->lpVtbl->Stop(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioClient_Reset(ma_IAudioClient* pThis)                                                     { return pThis->lpVtbl->Reset(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioClient_SetEventHandle(ma_IAudioClient* pThis, HANDLE eventHandle)                        { return pThis->lpVtbl->SetEventHandle(pThis, eventHandle); }\nstatic MA_INLINE HRESULT ma_IAudioClient_GetService(ma_IAudioClient* pThis, const IID* const riid, void** pp)              { return pThis->lpVtbl->GetService(pThis, riid, pp); }\n\n/* IAudioClient2 */\ntypedef struct\n{\n    /* IUnknown */\n    HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioClient2* pThis, const IID* const riid, void** ppObject);\n    ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IAudioClient2* pThis);\n    ULONG   (STDMETHODCALLTYPE * Release)       (ma_IAudioClient2* pThis);\n\n    /* IAudioClient */\n    HRESULT (STDMETHODCALLTYPE * Initialize)       (ma_IAudioClient2* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid);\n    HRESULT (STDMETHODCALLTYPE * GetBufferSize)    (ma_IAudioClient2* pThis, ma_uint32* pNumBufferFrames);\n    HRESULT (STDMETHODCALLTYPE * GetStreamLatency) (ma_IAudioClient2* pThis, MA_REFERENCE_TIME* pLatency);\n    HRESULT (STDMETHODCALLTYPE * GetCurrentPadding)(ma_IAudioClient2* pThis, ma_uint32* pNumPaddingFrames);\n    HRESULT (STDMETHODCALLTYPE * IsFormatSupported)(ma_IAudioClient2* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch);\n    HRESULT (STDMETHODCALLTYPE * GetMixFormat)     (ma_IAudioClient2* pThis, MA_WAVEFORMATEX** ppDeviceFormat);\n    HRESULT (STDMETHODCALLTYPE * GetDevicePeriod)  (ma_IAudioClient2* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod);\n    HRESULT (STDMETHODCALLTYPE * Start)            (ma_IAudioClient2* pThis);\n    HRESULT (STDMETHODCALLTYPE * Stop)             (ma_IAudioClient2* pThis);\n    HRESULT (STDMETHODCALLTYPE * Reset)            (ma_IAudioClient2* pThis);\n    HRESULT (STDMETHODCALLTYPE * SetEventHandle)   (ma_IAudioClient2* pThis, HANDLE eventHandle);\n    HRESULT (STDMETHODCALLTYPE * GetService)       (ma_IAudioClient2* pThis, const IID* const riid, void** pp);\n\n    /* IAudioClient2 */\n    HRESULT (STDMETHODCALLTYPE * IsOffloadCapable)   (ma_IAudioClient2* pThis, MA_AUDIO_STREAM_CATEGORY category, BOOL* pOffloadCapable);\n    HRESULT (STDMETHODCALLTYPE * SetClientProperties)(ma_IAudioClient2* pThis, const ma_AudioClientProperties* pProperties);\n    HRESULT (STDMETHODCALLTYPE * GetBufferSizeLimits)(ma_IAudioClient2* pThis, const MA_WAVEFORMATEX* pFormat, BOOL eventDriven, MA_REFERENCE_TIME* pMinBufferDuration, MA_REFERENCE_TIME* pMaxBufferDuration);\n} ma_IAudioClient2Vtbl;\nstruct ma_IAudioClient2\n{\n    ma_IAudioClient2Vtbl* lpVtbl;\n};\nstatic MA_INLINE HRESULT ma_IAudioClient2_QueryInterface(ma_IAudioClient2* pThis, const IID* const riid, void** ppObject)    { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\nstatic MA_INLINE ULONG   ma_IAudioClient2_AddRef(ma_IAudioClient2* pThis)                                                    { return pThis->lpVtbl->AddRef(pThis); }\nstatic MA_INLINE ULONG   ma_IAudioClient2_Release(ma_IAudioClient2* pThis)                                                   { return pThis->lpVtbl->Release(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_Initialize(ma_IAudioClient2* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid) { return pThis->lpVtbl->Initialize(pThis, shareMode, streamFlags, bufferDuration, periodicity, pFormat, pAudioSessionGuid); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_GetBufferSize(ma_IAudioClient2* pThis, ma_uint32* pNumBufferFrames)                { return pThis->lpVtbl->GetBufferSize(pThis, pNumBufferFrames); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_GetStreamLatency(ma_IAudioClient2* pThis, MA_REFERENCE_TIME* pLatency)             { return pThis->lpVtbl->GetStreamLatency(pThis, pLatency); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_GetCurrentPadding(ma_IAudioClient2* pThis, ma_uint32* pNumPaddingFrames)           { return pThis->lpVtbl->GetCurrentPadding(pThis, pNumPaddingFrames); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_IsFormatSupported(ma_IAudioClient2* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch) { return pThis->lpVtbl->IsFormatSupported(pThis, shareMode, pFormat, ppClosestMatch); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_GetMixFormat(ma_IAudioClient2* pThis, MA_WAVEFORMATEX** ppDeviceFormat)            { return pThis->lpVtbl->GetMixFormat(pThis, ppDeviceFormat); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_GetDevicePeriod(ma_IAudioClient2* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod) { return pThis->lpVtbl->GetDevicePeriod(pThis, pDefaultDevicePeriod, pMinimumDevicePeriod); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_Start(ma_IAudioClient2* pThis)                                                     { return pThis->lpVtbl->Start(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_Stop(ma_IAudioClient2* pThis)                                                      { return pThis->lpVtbl->Stop(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_Reset(ma_IAudioClient2* pThis)                                                     { return pThis->lpVtbl->Reset(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_SetEventHandle(ma_IAudioClient2* pThis, HANDLE eventHandle)                        { return pThis->lpVtbl->SetEventHandle(pThis, eventHandle); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_GetService(ma_IAudioClient2* pThis, const IID* const riid, void** pp)              { return pThis->lpVtbl->GetService(pThis, riid, pp); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_IsOffloadCapable(ma_IAudioClient2* pThis, MA_AUDIO_STREAM_CATEGORY category, BOOL* pOffloadCapable) { return pThis->lpVtbl->IsOffloadCapable(pThis, category, pOffloadCapable); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_SetClientProperties(ma_IAudioClient2* pThis, const ma_AudioClientProperties* pProperties)           { return pThis->lpVtbl->SetClientProperties(pThis, pProperties); }\nstatic MA_INLINE HRESULT ma_IAudioClient2_GetBufferSizeLimits(ma_IAudioClient2* pThis, const MA_WAVEFORMATEX* pFormat, BOOL eventDriven, MA_REFERENCE_TIME* pMinBufferDuration, MA_REFERENCE_TIME* pMaxBufferDuration) { return pThis->lpVtbl->GetBufferSizeLimits(pThis, pFormat, eventDriven, pMinBufferDuration, pMaxBufferDuration); }\n\n\n/* IAudioClient3 */\ntypedef struct\n{\n    /* IUnknown */\n    HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioClient3* pThis, const IID* const riid, void** ppObject);\n    ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IAudioClient3* pThis);\n    ULONG   (STDMETHODCALLTYPE * Release)       (ma_IAudioClient3* pThis);\n\n    /* IAudioClient */\n    HRESULT (STDMETHODCALLTYPE * Initialize)       (ma_IAudioClient3* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid);\n    HRESULT (STDMETHODCALLTYPE * GetBufferSize)    (ma_IAudioClient3* pThis, ma_uint32* pNumBufferFrames);\n    HRESULT (STDMETHODCALLTYPE * GetStreamLatency) (ma_IAudioClient3* pThis, MA_REFERENCE_TIME* pLatency);\n    HRESULT (STDMETHODCALLTYPE * GetCurrentPadding)(ma_IAudioClient3* pThis, ma_uint32* pNumPaddingFrames);\n    HRESULT (STDMETHODCALLTYPE * IsFormatSupported)(ma_IAudioClient3* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch);\n    HRESULT (STDMETHODCALLTYPE * GetMixFormat)     (ma_IAudioClient3* pThis, MA_WAVEFORMATEX** ppDeviceFormat);\n    HRESULT (STDMETHODCALLTYPE * GetDevicePeriod)  (ma_IAudioClient3* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod);\n    HRESULT (STDMETHODCALLTYPE * Start)            (ma_IAudioClient3* pThis);\n    HRESULT (STDMETHODCALLTYPE * Stop)             (ma_IAudioClient3* pThis);\n    HRESULT (STDMETHODCALLTYPE * Reset)            (ma_IAudioClient3* pThis);\n    HRESULT (STDMETHODCALLTYPE * SetEventHandle)   (ma_IAudioClient3* pThis, HANDLE eventHandle);\n    HRESULT (STDMETHODCALLTYPE * GetService)       (ma_IAudioClient3* pThis, const IID* const riid, void** pp);\n\n    /* IAudioClient2 */\n    HRESULT (STDMETHODCALLTYPE * IsOffloadCapable)   (ma_IAudioClient3* pThis, MA_AUDIO_STREAM_CATEGORY category, BOOL* pOffloadCapable);\n    HRESULT (STDMETHODCALLTYPE * SetClientProperties)(ma_IAudioClient3* pThis, const ma_AudioClientProperties* pProperties);\n    HRESULT (STDMETHODCALLTYPE * GetBufferSizeLimits)(ma_IAudioClient3* pThis, const MA_WAVEFORMATEX* pFormat, BOOL eventDriven, MA_REFERENCE_TIME* pMinBufferDuration, MA_REFERENCE_TIME* pMaxBufferDuration);\n\n    /* IAudioClient3 */\n    HRESULT (STDMETHODCALLTYPE * GetSharedModeEnginePeriod)       (ma_IAudioClient3* pThis, const MA_WAVEFORMATEX* pFormat, ma_uint32* pDefaultPeriodInFrames, ma_uint32* pFundamentalPeriodInFrames, ma_uint32* pMinPeriodInFrames, ma_uint32* pMaxPeriodInFrames);\n    HRESULT (STDMETHODCALLTYPE * GetCurrentSharedModeEnginePeriod)(ma_IAudioClient3* pThis, MA_WAVEFORMATEX** ppFormat, ma_uint32* pCurrentPeriodInFrames);\n    HRESULT (STDMETHODCALLTYPE * InitializeSharedAudioStream)     (ma_IAudioClient3* pThis, DWORD streamFlags, ma_uint32 periodInFrames, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid);\n} ma_IAudioClient3Vtbl;\nstruct ma_IAudioClient3\n{\n    ma_IAudioClient3Vtbl* lpVtbl;\n};\nstatic MA_INLINE HRESULT ma_IAudioClient3_QueryInterface(ma_IAudioClient3* pThis, const IID* const riid, void** ppObject)    { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\nstatic MA_INLINE ULONG   ma_IAudioClient3_AddRef(ma_IAudioClient3* pThis)                                                    { return pThis->lpVtbl->AddRef(pThis); }\nstatic MA_INLINE ULONG   ma_IAudioClient3_Release(ma_IAudioClient3* pThis)                                                   { return pThis->lpVtbl->Release(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_Initialize(ma_IAudioClient3* pThis, MA_AUDCLNT_SHAREMODE shareMode, DWORD streamFlags, MA_REFERENCE_TIME bufferDuration, MA_REFERENCE_TIME periodicity, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGuid) { return pThis->lpVtbl->Initialize(pThis, shareMode, streamFlags, bufferDuration, periodicity, pFormat, pAudioSessionGuid); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_GetBufferSize(ma_IAudioClient3* pThis, ma_uint32* pNumBufferFrames)                { return pThis->lpVtbl->GetBufferSize(pThis, pNumBufferFrames); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_GetStreamLatency(ma_IAudioClient3* pThis, MA_REFERENCE_TIME* pLatency)             { return pThis->lpVtbl->GetStreamLatency(pThis, pLatency); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_GetCurrentPadding(ma_IAudioClient3* pThis, ma_uint32* pNumPaddingFrames)           { return pThis->lpVtbl->GetCurrentPadding(pThis, pNumPaddingFrames); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_IsFormatSupported(ma_IAudioClient3* pThis, MA_AUDCLNT_SHAREMODE shareMode, const MA_WAVEFORMATEX* pFormat, MA_WAVEFORMATEX** ppClosestMatch) { return pThis->lpVtbl->IsFormatSupported(pThis, shareMode, pFormat, ppClosestMatch); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_GetMixFormat(ma_IAudioClient3* pThis, MA_WAVEFORMATEX** ppDeviceFormat)               { return pThis->lpVtbl->GetMixFormat(pThis, ppDeviceFormat); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_GetDevicePeriod(ma_IAudioClient3* pThis, MA_REFERENCE_TIME* pDefaultDevicePeriod, MA_REFERENCE_TIME* pMinimumDevicePeriod) { return pThis->lpVtbl->GetDevicePeriod(pThis, pDefaultDevicePeriod, pMinimumDevicePeriod); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_Start(ma_IAudioClient3* pThis)                                                     { return pThis->lpVtbl->Start(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_Stop(ma_IAudioClient3* pThis)                                                      { return pThis->lpVtbl->Stop(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_Reset(ma_IAudioClient3* pThis)                                                     { return pThis->lpVtbl->Reset(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_SetEventHandle(ma_IAudioClient3* pThis, HANDLE eventHandle)                        { return pThis->lpVtbl->SetEventHandle(pThis, eventHandle); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_GetService(ma_IAudioClient3* pThis, const IID* const riid, void** pp)              { return pThis->lpVtbl->GetService(pThis, riid, pp); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_IsOffloadCapable(ma_IAudioClient3* pThis, MA_AUDIO_STREAM_CATEGORY category, BOOL* pOffloadCapable) { return pThis->lpVtbl->IsOffloadCapable(pThis, category, pOffloadCapable); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_SetClientProperties(ma_IAudioClient3* pThis, const ma_AudioClientProperties* pProperties)           { return pThis->lpVtbl->SetClientProperties(pThis, pProperties); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_GetBufferSizeLimits(ma_IAudioClient3* pThis, const MA_WAVEFORMATEX* pFormat, BOOL eventDriven, MA_REFERENCE_TIME* pMinBufferDuration, MA_REFERENCE_TIME* pMaxBufferDuration) { return pThis->lpVtbl->GetBufferSizeLimits(pThis, pFormat, eventDriven, pMinBufferDuration, pMaxBufferDuration); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_GetSharedModeEnginePeriod(ma_IAudioClient3* pThis, const MA_WAVEFORMATEX* pFormat, ma_uint32* pDefaultPeriodInFrames, ma_uint32* pFundamentalPeriodInFrames, ma_uint32* pMinPeriodInFrames, ma_uint32* pMaxPeriodInFrames) { return pThis->lpVtbl->GetSharedModeEnginePeriod(pThis, pFormat, pDefaultPeriodInFrames, pFundamentalPeriodInFrames, pMinPeriodInFrames, pMaxPeriodInFrames); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_GetCurrentSharedModeEnginePeriod(ma_IAudioClient3* pThis, MA_WAVEFORMATEX** ppFormat, ma_uint32* pCurrentPeriodInFrames) { return pThis->lpVtbl->GetCurrentSharedModeEnginePeriod(pThis, ppFormat, pCurrentPeriodInFrames); }\nstatic MA_INLINE HRESULT ma_IAudioClient3_InitializeSharedAudioStream(ma_IAudioClient3* pThis, DWORD streamFlags, ma_uint32 periodInFrames, const MA_WAVEFORMATEX* pFormat, const GUID* pAudioSessionGUID) { return pThis->lpVtbl->InitializeSharedAudioStream(pThis, streamFlags, periodInFrames, pFormat, pAudioSessionGUID); }\n\n\n/* IAudioRenderClient */\ntypedef struct\n{\n    /* IUnknown */\n    HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioRenderClient* pThis, const IID* const riid, void** ppObject);\n    ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IAudioRenderClient* pThis);\n    ULONG   (STDMETHODCALLTYPE * Release)       (ma_IAudioRenderClient* pThis);\n\n    /* IAudioRenderClient */\n    HRESULT (STDMETHODCALLTYPE * GetBuffer)    (ma_IAudioRenderClient* pThis, ma_uint32 numFramesRequested, BYTE** ppData);\n    HRESULT (STDMETHODCALLTYPE * ReleaseBuffer)(ma_IAudioRenderClient* pThis, ma_uint32 numFramesWritten, DWORD dwFlags);\n} ma_IAudioRenderClientVtbl;\nstruct ma_IAudioRenderClient\n{\n    ma_IAudioRenderClientVtbl* lpVtbl;\n};\nstatic MA_INLINE HRESULT ma_IAudioRenderClient_QueryInterface(ma_IAudioRenderClient* pThis, const IID* const riid, void** ppObject)   { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\nstatic MA_INLINE ULONG   ma_IAudioRenderClient_AddRef(ma_IAudioRenderClient* pThis)                                                   { return pThis->lpVtbl->AddRef(pThis); }\nstatic MA_INLINE ULONG   ma_IAudioRenderClient_Release(ma_IAudioRenderClient* pThis)                                                  { return pThis->lpVtbl->Release(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioRenderClient_GetBuffer(ma_IAudioRenderClient* pThis, ma_uint32 numFramesRequested, BYTE** ppData)   { return pThis->lpVtbl->GetBuffer(pThis, numFramesRequested, ppData); }\nstatic MA_INLINE HRESULT ma_IAudioRenderClient_ReleaseBuffer(ma_IAudioRenderClient* pThis, ma_uint32 numFramesWritten, DWORD dwFlags) { return pThis->lpVtbl->ReleaseBuffer(pThis, numFramesWritten, dwFlags); }\n\n\n/* IAudioCaptureClient */\ntypedef struct\n{\n    /* IUnknown */\n    HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IAudioCaptureClient* pThis, const IID* const riid, void** ppObject);\n    ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IAudioCaptureClient* pThis);\n    ULONG   (STDMETHODCALLTYPE * Release)       (ma_IAudioCaptureClient* pThis);\n\n    /* IAudioRenderClient */\n    HRESULT (STDMETHODCALLTYPE * GetBuffer)        (ma_IAudioCaptureClient* pThis, BYTE** ppData, ma_uint32* pNumFramesToRead, DWORD* pFlags, ma_uint64* pDevicePosition, ma_uint64* pQPCPosition);\n    HRESULT (STDMETHODCALLTYPE * ReleaseBuffer)    (ma_IAudioCaptureClient* pThis, ma_uint32 numFramesRead);\n    HRESULT (STDMETHODCALLTYPE * GetNextPacketSize)(ma_IAudioCaptureClient* pThis, ma_uint32* pNumFramesInNextPacket);\n} ma_IAudioCaptureClientVtbl;\nstruct ma_IAudioCaptureClient\n{\n    ma_IAudioCaptureClientVtbl* lpVtbl;\n};\nstatic MA_INLINE HRESULT ma_IAudioCaptureClient_QueryInterface(ma_IAudioCaptureClient* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\nstatic MA_INLINE ULONG   ma_IAudioCaptureClient_AddRef(ma_IAudioCaptureClient* pThis)                                                 { return pThis->lpVtbl->AddRef(pThis); }\nstatic MA_INLINE ULONG   ma_IAudioCaptureClient_Release(ma_IAudioCaptureClient* pThis)                                                { return pThis->lpVtbl->Release(pThis); }\nstatic MA_INLINE HRESULT ma_IAudioCaptureClient_GetBuffer(ma_IAudioCaptureClient* pThis, BYTE** ppData, ma_uint32* pNumFramesToRead, DWORD* pFlags, ma_uint64* pDevicePosition, ma_uint64* pQPCPosition) { return pThis->lpVtbl->GetBuffer(pThis, ppData, pNumFramesToRead, pFlags, pDevicePosition, pQPCPosition); }\nstatic MA_INLINE HRESULT ma_IAudioCaptureClient_ReleaseBuffer(ma_IAudioCaptureClient* pThis, ma_uint32 numFramesRead)                 { return pThis->lpVtbl->ReleaseBuffer(pThis, numFramesRead); }\nstatic MA_INLINE HRESULT ma_IAudioCaptureClient_GetNextPacketSize(ma_IAudioCaptureClient* pThis, ma_uint32* pNumFramesInNextPacket)   { return pThis->lpVtbl->GetNextPacketSize(pThis, pNumFramesInNextPacket); }\n\n#if defined(MA_WIN32_UWP)\n/* mmdevapi Functions */\ntypedef HRESULT (WINAPI * MA_PFN_ActivateAudioInterfaceAsync)(const wchar_t* deviceInterfacePath, const IID* riid, MA_PROPVARIANT* activationParams, ma_IActivateAudioInterfaceCompletionHandler* completionHandler, ma_IActivateAudioInterfaceAsyncOperation** activationOperation);\n#endif\n\n/* Avrt Functions */\ntypedef HANDLE (WINAPI * MA_PFN_AvSetMmThreadCharacteristicsA)(const char* TaskName, DWORD* TaskIndex);\ntypedef BOOL   (WINAPI * MA_PFN_AvRevertMmThreadCharacteristics)(HANDLE AvrtHandle);\n\n#if !defined(MA_WIN32_DESKTOP) && !defined(MA_WIN32_GDK)\ntypedef struct ma_completion_handler_uwp ma_completion_handler_uwp;\n\ntypedef struct\n{\n    /* IUnknown */\n    HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_completion_handler_uwp* pThis, const IID* const riid, void** ppObject);\n    ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_completion_handler_uwp* pThis);\n    ULONG   (STDMETHODCALLTYPE * Release)       (ma_completion_handler_uwp* pThis);\n\n    /* IActivateAudioInterfaceCompletionHandler */\n    HRESULT (STDMETHODCALLTYPE * ActivateCompleted)(ma_completion_handler_uwp* pThis, ma_IActivateAudioInterfaceAsyncOperation* pActivateOperation);\n} ma_completion_handler_uwp_vtbl;\nstruct ma_completion_handler_uwp\n{\n    ma_completion_handler_uwp_vtbl* lpVtbl;\n    MA_ATOMIC(4, ma_uint32) counter;\n    HANDLE hEvent;\n};\n\nstatic HRESULT STDMETHODCALLTYPE ma_completion_handler_uwp_QueryInterface(ma_completion_handler_uwp* pThis, const IID* const riid, void** ppObject)\n{\n    /*\n    We need to \"implement\" IAgileObject which is just an indicator that's used internally by WASAPI for some multithreading management. To\n    \"implement\" this, we just make sure we return pThis when the IAgileObject is requested.\n    */\n    if (!ma_is_guid_equal(riid, &MA_IID_IUnknown) && !ma_is_guid_equal(riid, &MA_IID_IActivateAudioInterfaceCompletionHandler) && !ma_is_guid_equal(riid, &MA_IID_IAgileObject)) {\n        *ppObject = NULL;\n        return E_NOINTERFACE;\n    }\n\n    /* Getting here means the IID is IUnknown or IMMNotificationClient. */\n    *ppObject = (void*)pThis;\n    ((ma_completion_handler_uwp_vtbl*)pThis->lpVtbl)->AddRef(pThis);\n    return S_OK;\n}\n\nstatic ULONG STDMETHODCALLTYPE ma_completion_handler_uwp_AddRef(ma_completion_handler_uwp* pThis)\n{\n    return (ULONG)ma_atomic_fetch_add_32(&pThis->counter, 1) + 1;\n}\n\nstatic ULONG STDMETHODCALLTYPE ma_completion_handler_uwp_Release(ma_completion_handler_uwp* pThis)\n{\n    ma_uint32 newRefCount = ma_atomic_fetch_sub_32(&pThis->counter, 1) - 1;\n    if (newRefCount == 0) {\n        return 0;   /* We don't free anything here because we never allocate the object on the heap. */\n    }\n\n    return (ULONG)newRefCount;\n}\n\nstatic HRESULT STDMETHODCALLTYPE ma_completion_handler_uwp_ActivateCompleted(ma_completion_handler_uwp* pThis, ma_IActivateAudioInterfaceAsyncOperation* pActivateOperation)\n{\n    (void)pActivateOperation;\n    SetEvent(pThis->hEvent);\n    return S_OK;\n}\n\n\nstatic ma_completion_handler_uwp_vtbl g_maCompletionHandlerVtblInstance = {\n    ma_completion_handler_uwp_QueryInterface,\n    ma_completion_handler_uwp_AddRef,\n    ma_completion_handler_uwp_Release,\n    ma_completion_handler_uwp_ActivateCompleted\n};\n\nstatic ma_result ma_completion_handler_uwp_init(ma_completion_handler_uwp* pHandler)\n{\n    MA_ASSERT(pHandler != NULL);\n    MA_ZERO_OBJECT(pHandler);\n\n    pHandler->lpVtbl = &g_maCompletionHandlerVtblInstance;\n    pHandler->counter = 1;\n    pHandler->hEvent = CreateEventA(NULL, FALSE, FALSE, NULL);\n    if (pHandler->hEvent == NULL) {\n        return ma_result_from_GetLastError(GetLastError());\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_completion_handler_uwp_uninit(ma_completion_handler_uwp* pHandler)\n{\n    if (pHandler->hEvent != NULL) {\n        CloseHandle(pHandler->hEvent);\n    }\n}\n\nstatic void ma_completion_handler_uwp_wait(ma_completion_handler_uwp* pHandler)\n{\n    WaitForSingleObject((HANDLE)pHandler->hEvent, INFINITE);\n}\n#endif  /* !MA_WIN32_DESKTOP */\n\n/* We need a virtual table for our notification client object that's used for detecting changes to the default device. */\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\nstatic HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_QueryInterface(ma_IMMNotificationClient* pThis, const IID* const riid, void** ppObject)\n{\n    /*\n    We care about two interfaces - IUnknown and IMMNotificationClient. If the requested IID is something else\n    we just return E_NOINTERFACE. Otherwise we need to increment the reference counter and return S_OK.\n    */\n    if (!ma_is_guid_equal(riid, &MA_IID_IUnknown) && !ma_is_guid_equal(riid, &MA_IID_IMMNotificationClient)) {\n        *ppObject = NULL;\n        return E_NOINTERFACE;\n    }\n\n    /* Getting here means the IID is IUnknown or IMMNotificationClient. */\n    *ppObject = (void*)pThis;\n    ((ma_IMMNotificationClientVtbl*)pThis->lpVtbl)->AddRef(pThis);\n    return S_OK;\n}\n\nstatic ULONG STDMETHODCALLTYPE ma_IMMNotificationClient_AddRef(ma_IMMNotificationClient* pThis)\n{\n    return (ULONG)ma_atomic_fetch_add_32(&pThis->counter, 1) + 1;\n}\n\nstatic ULONG STDMETHODCALLTYPE ma_IMMNotificationClient_Release(ma_IMMNotificationClient* pThis)\n{\n    ma_uint32 newRefCount = ma_atomic_fetch_sub_32(&pThis->counter, 1) - 1;\n    if (newRefCount == 0) {\n        return 0;   /* We don't free anything here because we never allocate the object on the heap. */\n    }\n\n    return (ULONG)newRefCount;\n}\n\nstatic HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnDeviceStateChanged(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID, DWORD dwNewState)\n{\n    ma_bool32 isThisDevice = MA_FALSE;\n    ma_bool32 isCapture    = MA_FALSE;\n    ma_bool32 isPlayback   = MA_FALSE;\n\n#ifdef MA_DEBUG_OUTPUT\n    /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, \"IMMNotificationClient_OnDeviceStateChanged(pDeviceID=%S, dwNewState=%u)\\n\", (pDeviceID != NULL) ? pDeviceID : L\"(NULL)\", (unsigned int)dwNewState);*/\n#endif\n\n    /*\n    There have been reports of a hang when a playback device is disconnected. The idea with this code is to explicitly stop the device if we detect\n    that the device is disabled or has been unplugged.\n    */\n    if (pThis->pDevice->wasapi.allowCaptureAutoStreamRouting && (pThis->pDevice->type == ma_device_type_capture || pThis->pDevice->type == ma_device_type_duplex || pThis->pDevice->type == ma_device_type_loopback)) {\n        isCapture = MA_TRUE;\n        if (ma_strcmp_WCHAR(pThis->pDevice->capture.id.wasapi, pDeviceID) == 0) {\n            isThisDevice = MA_TRUE;\n        }\n    }\n\n    if (pThis->pDevice->wasapi.allowPlaybackAutoStreamRouting && (pThis->pDevice->type == ma_device_type_playback || pThis->pDevice->type == ma_device_type_duplex)) {\n        isPlayback = MA_TRUE;\n        if (ma_strcmp_WCHAR(pThis->pDevice->playback.id.wasapi, pDeviceID) == 0) {\n            isThisDevice = MA_TRUE;\n        }\n    }\n\n\n    /*\n    If the device ID matches our device we need to mark our device as detached and stop it. When a\n    device is added in OnDeviceAdded(), we'll restart it. We only mark it as detached if the device\n    was started at the time of being removed.\n    */\n    if (isThisDevice) {\n        if ((dwNewState & MA_MM_DEVICE_STATE_ACTIVE) == 0) {\n            /*\n            Unplugged or otherwise unavailable. Mark as detached if we were in a playing state. We'll\n            use this to determine whether or not we need to automatically start the device when it's\n            plugged back in again.\n            */\n            if (ma_device_get_state(pThis->pDevice) == ma_device_state_started) {\n                if (isPlayback) {\n                    pThis->pDevice->wasapi.isDetachedPlayback = MA_TRUE;\n                }\n                if (isCapture) {\n                    pThis->pDevice->wasapi.isDetachedCapture = MA_TRUE;\n                }\n\n                ma_device_stop(pThis->pDevice);\n            }\n        }\n\n        if ((dwNewState & MA_MM_DEVICE_STATE_ACTIVE) != 0) {\n            /* The device was activated. If we were detached, we need to start it again. */\n            ma_bool8 tryRestartingDevice = MA_FALSE;\n\n            if (isPlayback) {\n                if (pThis->pDevice->wasapi.isDetachedPlayback) {\n                    pThis->pDevice->wasapi.isDetachedPlayback = MA_FALSE;\n                    ma_device_reroute__wasapi(pThis->pDevice, ma_device_type_playback);\n                    tryRestartingDevice = MA_TRUE;\n                }\n            }\n\n            if (isCapture) {\n                if (pThis->pDevice->wasapi.isDetachedCapture) {\n                    pThis->pDevice->wasapi.isDetachedCapture = MA_FALSE;\n                    ma_device_reroute__wasapi(pThis->pDevice, (pThis->pDevice->type == ma_device_type_loopback) ? ma_device_type_loopback : ma_device_type_capture);\n                    tryRestartingDevice = MA_TRUE;\n                }\n            }\n\n            if (tryRestartingDevice) {\n                if (pThis->pDevice->wasapi.isDetachedPlayback == MA_FALSE && pThis->pDevice->wasapi.isDetachedCapture == MA_FALSE) {\n                    ma_device_start(pThis->pDevice);\n                }\n            }\n        }\n    }\n\n    return S_OK;\n}\n\nstatic HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnDeviceAdded(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID)\n{\n#ifdef MA_DEBUG_OUTPUT\n    /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, \"IMMNotificationClient_OnDeviceAdded(pDeviceID=%S)\\n\", (pDeviceID != NULL) ? pDeviceID : L\"(NULL)\");*/\n#endif\n\n    /* We don't need to worry about this event for our purposes. */\n    (void)pThis;\n    (void)pDeviceID;\n    return S_OK;\n}\n\nstatic HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnDeviceRemoved(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID)\n{\n#ifdef MA_DEBUG_OUTPUT\n    /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, \"IMMNotificationClient_OnDeviceRemoved(pDeviceID=%S)\\n\", (pDeviceID != NULL) ? pDeviceID : L\"(NULL)\");*/\n#endif\n\n    /* We don't need to worry about this event for our purposes. */\n    (void)pThis;\n    (void)pDeviceID;\n    return S_OK;\n}\n\nstatic HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnDefaultDeviceChanged(ma_IMMNotificationClient* pThis, ma_EDataFlow dataFlow, ma_ERole role, const WCHAR* pDefaultDeviceID)\n{\n#ifdef MA_DEBUG_OUTPUT\n    /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, \"IMMNotificationClient_OnDefaultDeviceChanged(dataFlow=%d, role=%d, pDefaultDeviceID=%S)\\n\", dataFlow, role, (pDefaultDeviceID != NULL) ? pDefaultDeviceID : L\"(NULL)\");*/\n#endif\n\n    (void)role;\n\n    /* We only care about devices with the same data flow as the current device. */\n    if ((pThis->pDevice->type == ma_device_type_playback && dataFlow != ma_eRender)  ||\n        (pThis->pDevice->type == ma_device_type_capture  && dataFlow != ma_eCapture) ||\n        (pThis->pDevice->type == ma_device_type_loopback && dataFlow != ma_eRender)) {\n        ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Stream rerouting abandoned because dataFlow does match device type.\\n\");\n        return S_OK;\n    }\n\n    /* We need to consider dataFlow as ma_eCapture if device is ma_device_type_loopback */\n    if (pThis->pDevice->type == ma_device_type_loopback) {\n        dataFlow = ma_eCapture;\n    }\n\n    /* Don't do automatic stream routing if we're not allowed. */\n    if ((dataFlow == ma_eRender  && pThis->pDevice->wasapi.allowPlaybackAutoStreamRouting == MA_FALSE) ||\n        (dataFlow == ma_eCapture && pThis->pDevice->wasapi.allowCaptureAutoStreamRouting  == MA_FALSE)) {\n        ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Stream rerouting abandoned because automatic stream routing has been disabled by the device config.\\n\");\n        return S_OK;\n    }\n\n    /*\n    Not currently supporting automatic stream routing in exclusive mode. This is not working correctly on my machine due to\n    AUDCLNT_E_DEVICE_IN_USE errors when reinitializing the device. If this is a bug in miniaudio, we can try re-enabling this once\n    it's fixed.\n    */\n    if ((dataFlow == ma_eRender  && pThis->pDevice->playback.shareMode == ma_share_mode_exclusive) ||\n        (dataFlow == ma_eCapture && pThis->pDevice->capture.shareMode  == ma_share_mode_exclusive)) {\n        ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Stream rerouting abandoned because the device shared mode is exclusive.\\n\");\n        return S_OK;\n    }\n\n\n\n    /*\n    Second attempt at device rerouting. We're going to retrieve the device's state at the time of\n    the route change. We're then going to stop the device, reinitialize the device, and then start\n    it again if the state before stopping was ma_device_state_started.\n    */\n    {\n        ma_uint32 previousState = ma_device_get_state(pThis->pDevice);\n        ma_bool8 restartDevice = MA_FALSE;\n\n        if (previousState == ma_device_state_uninitialized || previousState == ma_device_state_starting) {\n            ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Stream rerouting abandoned because the device is in the process of starting.\\n\");\n            return S_OK;\n        }\n\n        if (previousState == ma_device_state_started) {\n            ma_device_stop(pThis->pDevice);\n            restartDevice = MA_TRUE;\n        }\n\n        if (pDefaultDeviceID != NULL) { /* <-- The input device ID will be null if there's no other device available. */\n            ma_mutex_lock(&pThis->pDevice->wasapi.rerouteLock);\n            {\n                if (dataFlow == ma_eRender) {\n                    ma_device_reroute__wasapi(pThis->pDevice, ma_device_type_playback);\n\n                    if (pThis->pDevice->wasapi.isDetachedPlayback) {\n                        pThis->pDevice->wasapi.isDetachedPlayback = MA_FALSE;\n\n                        if (pThis->pDevice->type == ma_device_type_duplex && pThis->pDevice->wasapi.isDetachedCapture) {\n                            restartDevice = MA_FALSE;   /* It's a duplex device and the capture side is detached. We cannot be restarting the device just yet. */\n                        }\n                        else {\n                            restartDevice = MA_TRUE;    /* It's not a duplex device, or the capture side is also attached so we can go ahead and restart the device. */\n                        }\n                    }\n                }\n                else {\n                    ma_device_reroute__wasapi(pThis->pDevice, (pThis->pDevice->type == ma_device_type_loopback) ? ma_device_type_loopback : ma_device_type_capture);\n\n                    if (pThis->pDevice->wasapi.isDetachedCapture) {\n                        pThis->pDevice->wasapi.isDetachedCapture = MA_FALSE;\n\n                        if (pThis->pDevice->type == ma_device_type_duplex && pThis->pDevice->wasapi.isDetachedPlayback) {\n                            restartDevice = MA_FALSE;   /* It's a duplex device and the playback side is detached. We cannot be restarting the device just yet. */\n                        }\n                        else {\n                            restartDevice = MA_TRUE;    /* It's not a duplex device, or the playback side is also attached so we can go ahead and restart the device. */\n                        }\n                    }\n                }\n            }\n            ma_mutex_unlock(&pThis->pDevice->wasapi.rerouteLock);\n\n            if (restartDevice) {\n                ma_device_start(pThis->pDevice);\n            }\n        }\n    }\n\n    return S_OK;\n}\n\nstatic HRESULT STDMETHODCALLTYPE ma_IMMNotificationClient_OnPropertyValueChanged(ma_IMMNotificationClient* pThis, const WCHAR* pDeviceID, const PROPERTYKEY key)\n{\n#ifdef MA_DEBUG_OUTPUT\n    /*ma_log_postf(ma_device_get_log(pThis->pDevice), MA_LOG_LEVEL_DEBUG, \"IMMNotificationClient_OnPropertyValueChanged(pDeviceID=%S)\\n\", (pDeviceID != NULL) ? pDeviceID : L\"(NULL)\");*/\n#endif\n\n    (void)pThis;\n    (void)pDeviceID;\n    (void)key;\n    return S_OK;\n}\n\nstatic ma_IMMNotificationClientVtbl g_maNotificationCientVtbl = {\n    ma_IMMNotificationClient_QueryInterface,\n    ma_IMMNotificationClient_AddRef,\n    ma_IMMNotificationClient_Release,\n    ma_IMMNotificationClient_OnDeviceStateChanged,\n    ma_IMMNotificationClient_OnDeviceAdded,\n    ma_IMMNotificationClient_OnDeviceRemoved,\n    ma_IMMNotificationClient_OnDefaultDeviceChanged,\n    ma_IMMNotificationClient_OnPropertyValueChanged\n};\n#endif  /* MA_WIN32_DESKTOP */\n\nstatic const char* ma_to_usage_string__wasapi(ma_wasapi_usage usage)\n{\n    switch (usage)\n    {\n        case ma_wasapi_usage_default:   return NULL;\n        case ma_wasapi_usage_games:     return \"Games\";\n        case ma_wasapi_usage_pro_audio: return \"Pro Audio\";\n        default: break;\n    }\n\n    return NULL;\n}\n\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\ntypedef ma_IMMDevice ma_WASAPIDeviceInterface;\n#else\ntypedef ma_IUnknown ma_WASAPIDeviceInterface;\n#endif\n\n\n#define MA_CONTEXT_COMMAND_QUIT__WASAPI                 1\n#define MA_CONTEXT_COMMAND_CREATE_IAUDIOCLIENT__WASAPI  2\n#define MA_CONTEXT_COMMAND_RELEASE_IAUDIOCLIENT__WASAPI 3\n\nstatic ma_context_command__wasapi ma_context_init_command__wasapi(int code)\n{\n    ma_context_command__wasapi cmd;\n\n    MA_ZERO_OBJECT(&cmd);\n    cmd.code = code;\n\n    return cmd;\n}\n\nstatic ma_result ma_context_post_command__wasapi(ma_context* pContext, const ma_context_command__wasapi* pCmd)\n{\n    /* For now we are doing everything synchronously, but I might relax this later if the need arises. */\n    ma_result result;\n    ma_bool32 isUsingLocalEvent = MA_FALSE;\n    ma_event localEvent;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pCmd     != NULL);\n\n    if (pCmd->pEvent == NULL) {\n        isUsingLocalEvent = MA_TRUE;\n\n        result = ma_event_init(&localEvent);\n        if (result != MA_SUCCESS) {\n            return result;  /* Failed to create the event for this command. */\n        }\n    }\n\n    /* Here is where we add the command to the list. If there's not enough room we'll spin until there is. */\n    ma_mutex_lock(&pContext->wasapi.commandLock);\n    {\n        ma_uint32 index;\n\n        /* Spin until we've got some space available. */\n        while (pContext->wasapi.commandCount == ma_countof(pContext->wasapi.commands)) {\n            ma_yield();\n        }\n\n        /* Space is now available. Can safely add to the list. */\n        index = (pContext->wasapi.commandIndex + pContext->wasapi.commandCount) % ma_countof(pContext->wasapi.commands);\n        pContext->wasapi.commands[index]        = *pCmd;\n        pContext->wasapi.commands[index].pEvent = &localEvent;\n        pContext->wasapi.commandCount += 1;\n\n        /* Now that the command has been added, release the semaphore so ma_context_next_command__wasapi() can return. */\n        ma_semaphore_release(&pContext->wasapi.commandSem);\n    }\n    ma_mutex_unlock(&pContext->wasapi.commandLock);\n\n    if (isUsingLocalEvent) {\n        ma_event_wait(&localEvent);\n        ma_event_uninit(&localEvent);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_next_command__wasapi(ma_context* pContext, ma_context_command__wasapi* pCmd)\n{\n    ma_result result = MA_SUCCESS;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pCmd     != NULL);\n\n    result = ma_semaphore_wait(&pContext->wasapi.commandSem);\n    if (result == MA_SUCCESS) {\n        ma_mutex_lock(&pContext->wasapi.commandLock);\n        {\n            *pCmd = pContext->wasapi.commands[pContext->wasapi.commandIndex];\n            pContext->wasapi.commandIndex  = (pContext->wasapi.commandIndex + 1) % ma_countof(pContext->wasapi.commands);\n            pContext->wasapi.commandCount -= 1;\n        }\n        ma_mutex_unlock(&pContext->wasapi.commandLock);\n    }\n\n    return result;\n}\n\nstatic ma_thread_result MA_THREADCALL ma_context_command_thread__wasapi(void* pUserData)\n{\n    ma_result result;\n    ma_context* pContext = (ma_context*)pUserData;\n    MA_ASSERT(pContext != NULL);\n\n    for (;;) {\n        ma_context_command__wasapi cmd;\n        result = ma_context_next_command__wasapi(pContext, &cmd);\n        if (result != MA_SUCCESS) {\n            break;\n        }\n\n        switch (cmd.code)\n        {\n            case MA_CONTEXT_COMMAND_QUIT__WASAPI:\n            {\n                /* Do nothing. Handled after the switch. */\n            } break;\n\n            case MA_CONTEXT_COMMAND_CREATE_IAUDIOCLIENT__WASAPI:\n            {\n                if (cmd.data.createAudioClient.deviceType == ma_device_type_playback) {\n                    *cmd.data.createAudioClient.pResult = ma_result_from_HRESULT(ma_IAudioClient_GetService((ma_IAudioClient*)cmd.data.createAudioClient.pAudioClient, &MA_IID_IAudioRenderClient, cmd.data.createAudioClient.ppAudioClientService));\n                } else {\n                    *cmd.data.createAudioClient.pResult = ma_result_from_HRESULT(ma_IAudioClient_GetService((ma_IAudioClient*)cmd.data.createAudioClient.pAudioClient, &MA_IID_IAudioCaptureClient, cmd.data.createAudioClient.ppAudioClientService));\n                }\n            } break;\n\n            case MA_CONTEXT_COMMAND_RELEASE_IAUDIOCLIENT__WASAPI:\n            {\n                if (cmd.data.releaseAudioClient.deviceType == ma_device_type_playback) {\n                    if (cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientPlayback != NULL) {\n                        ma_IAudioClient_Release((ma_IAudioClient*)cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientPlayback);\n                        cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientPlayback = NULL;\n                    }\n                }\n\n                if (cmd.data.releaseAudioClient.deviceType == ma_device_type_capture) {\n                    if (cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientCapture != NULL) {\n                        ma_IAudioClient_Release((ma_IAudioClient*)cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientCapture);\n                        cmd.data.releaseAudioClient.pDevice->wasapi.pAudioClientCapture = NULL;\n                    }\n                }\n            } break;\n\n            default:\n            {\n                /* Unknown command. Ignore it, but trigger an assert in debug mode so we're aware of it. */\n                MA_ASSERT(MA_FALSE);\n            } break;\n        }\n\n        if (cmd.pEvent != NULL) {\n            ma_event_signal(cmd.pEvent);\n        }\n\n        if (cmd.code == MA_CONTEXT_COMMAND_QUIT__WASAPI) {\n            break;  /* Received a quit message. Get out of here. */\n        }\n    }\n\n    return (ma_thread_result)0;\n}\n\nstatic ma_result ma_device_create_IAudioClient_service__wasapi(ma_context* pContext, ma_device_type deviceType, ma_IAudioClient* pAudioClient, void** ppAudioClientService)\n{\n    ma_result result;\n    ma_result cmdResult;\n    ma_context_command__wasapi cmd = ma_context_init_command__wasapi(MA_CONTEXT_COMMAND_CREATE_IAUDIOCLIENT__WASAPI);\n    cmd.data.createAudioClient.deviceType           = deviceType;\n    cmd.data.createAudioClient.pAudioClient         = (void*)pAudioClient;\n    cmd.data.createAudioClient.ppAudioClientService = ppAudioClientService;\n    cmd.data.createAudioClient.pResult              = &cmdResult;   /* Declared locally, but won't be dereferenced after this function returns since execution of the command will wait here. */\n\n    result = ma_context_post_command__wasapi(pContext, &cmd);  /* This will not return until the command has actually been run. */\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return *cmd.data.createAudioClient.pResult;\n}\n\n#if 0   /* Not used at the moment, but leaving here for future use. */\nstatic ma_result ma_device_release_IAudioClient_service__wasapi(ma_device* pDevice, ma_device_type deviceType)\n{\n    ma_result result;\n    ma_context_command__wasapi cmd = ma_context_init_command__wasapi(MA_CONTEXT_COMMAND_RELEASE_IAUDIOCLIENT__WASAPI);\n    cmd.data.releaseAudioClient.pDevice    = pDevice;\n    cmd.data.releaseAudioClient.deviceType = deviceType;\n\n    result = ma_context_post_command__wasapi(pDevice->pContext, &cmd);  /* This will not return until the command has actually been run. */\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n#endif\n\n\nstatic void ma_add_native_data_format_to_device_info_from_WAVEFORMATEX(const MA_WAVEFORMATEX* pWF, ma_share_mode shareMode, ma_device_info* pInfo)\n{\n    MA_ASSERT(pWF != NULL);\n    MA_ASSERT(pInfo != NULL);\n\n    if (pInfo->nativeDataFormatCount >= ma_countof(pInfo->nativeDataFormats)) {\n        return; /* Too many data formats. Need to ignore this one. Don't think this should ever happen with WASAPI. */\n    }\n\n    pInfo->nativeDataFormats[pInfo->nativeDataFormatCount].format     = ma_format_from_WAVEFORMATEX(pWF);\n    pInfo->nativeDataFormats[pInfo->nativeDataFormatCount].channels   = pWF->nChannels;\n    pInfo->nativeDataFormats[pInfo->nativeDataFormatCount].sampleRate = pWF->nSamplesPerSec;\n    pInfo->nativeDataFormats[pInfo->nativeDataFormatCount].flags      = (shareMode == ma_share_mode_exclusive) ? MA_DATA_FORMAT_FLAG_EXCLUSIVE_MODE : 0;\n    pInfo->nativeDataFormatCount += 1;\n}\n\nstatic ma_result ma_context_get_device_info_from_IAudioClient__wasapi(ma_context* pContext, /*ma_IMMDevice**/void* pMMDevice, ma_IAudioClient* pAudioClient, ma_device_info* pInfo)\n{\n    HRESULT hr;\n    MA_WAVEFORMATEX* pWF = NULL;\n\n    MA_ASSERT(pAudioClient != NULL);\n    MA_ASSERT(pInfo != NULL);\n\n    /* Shared Mode. We use GetMixFormat() here. */\n    hr = ma_IAudioClient_GetMixFormat((ma_IAudioClient*)pAudioClient, (MA_WAVEFORMATEX**)&pWF);\n    if (SUCCEEDED(hr)) {\n        ma_add_native_data_format_to_device_info_from_WAVEFORMATEX(pWF, ma_share_mode_shared, pInfo);\n    } else {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to retrieve mix format for device info retrieval.\");\n        return ma_result_from_HRESULT(hr);\n    }\n\n    /*\n    Exlcusive Mode. We repeatedly call IsFormatSupported() here. This is not currently supported on\n    UWP. Failure to retrieve the exclusive mode format is not considered an error, so from here on\n    out, MA_SUCCESS is guaranteed to be returned.\n    */\n    #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    {\n        ma_IPropertyStore *pProperties;\n\n        /*\n        The first thing to do is get the format from PKEY_AudioEngine_DeviceFormat. This should give us a channel count we assume is\n        correct which will simplify our searching.\n        */\n        hr = ma_IMMDevice_OpenPropertyStore((ma_IMMDevice*)pMMDevice, STGM_READ, &pProperties);\n        if (SUCCEEDED(hr)) {\n            MA_PROPVARIANT var;\n            ma_PropVariantInit(&var);\n\n            hr = ma_IPropertyStore_GetValue(pProperties, &MA_PKEY_AudioEngine_DeviceFormat, &var);\n            if (SUCCEEDED(hr)) {\n                pWF = (MA_WAVEFORMATEX*)var.blob.pBlobData;\n\n                /*\n                In my testing, the format returned by PKEY_AudioEngine_DeviceFormat is suitable for exclusive mode so we check this format\n                first. If this fails, fall back to a search.\n                */\n                hr = ma_IAudioClient_IsFormatSupported((ma_IAudioClient*)pAudioClient, MA_AUDCLNT_SHAREMODE_EXCLUSIVE, pWF, NULL);\n                if (SUCCEEDED(hr)) {\n                    /* The format returned by PKEY_AudioEngine_DeviceFormat is supported. */\n                    ma_add_native_data_format_to_device_info_from_WAVEFORMATEX(pWF, ma_share_mode_exclusive, pInfo);\n                } else {\n                    /*\n                    The format returned by PKEY_AudioEngine_DeviceFormat is not supported, so fall back to a search. We assume the channel\n                    count returned by MA_PKEY_AudioEngine_DeviceFormat is valid and correct. For simplicity we're only returning one format.\n                    */\n                    ma_uint32 channels = pWF->nChannels;\n                    ma_channel defaultChannelMap[MA_MAX_CHANNELS];\n                    MA_WAVEFORMATEXTENSIBLE wf;\n                    ma_bool32 found;\n                    ma_uint32 iFormat;\n\n                    /* Make sure we don't overflow the channel map. */\n                    if (channels > MA_MAX_CHANNELS) {\n                        channels = MA_MAX_CHANNELS;\n                    }\n\n                    ma_channel_map_init_standard(ma_standard_channel_map_microsoft, defaultChannelMap, ma_countof(defaultChannelMap), channels);\n\n                    MA_ZERO_OBJECT(&wf);\n                    wf.cbSize     = sizeof(wf);\n                    wf.wFormatTag = WAVE_FORMAT_EXTENSIBLE;\n                    wf.nChannels  = (WORD)channels;\n                    wf.dwChannelMask     = ma_channel_map_to_channel_mask__win32(defaultChannelMap, channels);\n\n                    found = MA_FALSE;\n                    for (iFormat = 0; iFormat < ma_countof(g_maFormatPriorities); ++iFormat) {\n                        ma_format format = g_maFormatPriorities[iFormat];\n                        ma_uint32 iSampleRate;\n\n                        wf.wBitsPerSample       = (WORD)(ma_get_bytes_per_sample(format)*8);\n                        wf.nBlockAlign          = (WORD)(wf.nChannels * wf.wBitsPerSample / 8);\n                        wf.nAvgBytesPerSec      = wf.nBlockAlign * wf.nSamplesPerSec;\n                        wf.Samples.wValidBitsPerSample = /*(format == ma_format_s24_32) ? 24 :*/ wf.wBitsPerSample;\n                        if (format == ma_format_f32) {\n                            wf.SubFormat = MA_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;\n                        } else {\n                            wf.SubFormat = MA_GUID_KSDATAFORMAT_SUBTYPE_PCM;\n                        }\n\n                        for (iSampleRate = 0; iSampleRate < ma_countof(g_maStandardSampleRatePriorities); ++iSampleRate) {\n                            wf.nSamplesPerSec = g_maStandardSampleRatePriorities[iSampleRate];\n\n                            hr = ma_IAudioClient_IsFormatSupported((ma_IAudioClient*)pAudioClient, MA_AUDCLNT_SHAREMODE_EXCLUSIVE, (MA_WAVEFORMATEX*)&wf, NULL);\n                            if (SUCCEEDED(hr)) {\n                                ma_add_native_data_format_to_device_info_from_WAVEFORMATEX((MA_WAVEFORMATEX*)&wf, ma_share_mode_exclusive, pInfo);\n                                found = MA_TRUE;\n                                break;\n                            }\n                        }\n\n                        if (found) {\n                            break;\n                        }\n                    }\n\n                    ma_PropVariantClear(pContext, &var);\n\n                    if (!found) {\n                        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, \"[WASAPI] Failed to find suitable device format for device info retrieval.\");\n                    }\n                }\n            } else {\n                ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, \"[WASAPI] Failed to retrieve device format for device info retrieval.\");\n            }\n\n            ma_IPropertyStore_Release(pProperties);\n        } else {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, \"[WASAPI] Failed to open property store for device info retrieval.\");\n        }\n    }\n    #else\n    {\n        (void)pMMDevice;    /* Unused. */\n    }\n    #endif\n\n    return MA_SUCCESS;\n}\n\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\nstatic ma_EDataFlow ma_device_type_to_EDataFlow(ma_device_type deviceType)\n{\n    if (deviceType == ma_device_type_playback) {\n        return ma_eRender;\n    } else if (deviceType == ma_device_type_capture) {\n        return ma_eCapture;\n    } else {\n        MA_ASSERT(MA_FALSE);\n        return ma_eRender; /* Should never hit this. */\n    }\n}\n\nstatic ma_result ma_context_create_IMMDeviceEnumerator__wasapi(ma_context* pContext, ma_IMMDeviceEnumerator** ppDeviceEnumerator)\n{\n    HRESULT hr;\n    ma_IMMDeviceEnumerator* pDeviceEnumerator;\n\n    MA_ASSERT(pContext           != NULL);\n    MA_ASSERT(ppDeviceEnumerator != NULL);\n\n    *ppDeviceEnumerator = NULL; /* Safety. */\n\n    hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);\n    if (FAILED(hr)) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to create device enumerator.\");\n        return ma_result_from_HRESULT(hr);\n    }\n\n    *ppDeviceEnumerator = pDeviceEnumerator;\n\n    return MA_SUCCESS;\n}\n\nstatic WCHAR* ma_context_get_default_device_id_from_IMMDeviceEnumerator__wasapi(ma_context* pContext, ma_IMMDeviceEnumerator* pDeviceEnumerator, ma_device_type deviceType)\n{\n    HRESULT hr;\n    ma_IMMDevice* pMMDefaultDevice = NULL;\n    WCHAR* pDefaultDeviceID = NULL;\n    ma_EDataFlow dataFlow;\n    ma_ERole role;\n\n    MA_ASSERT(pContext          != NULL);\n    MA_ASSERT(pDeviceEnumerator != NULL);\n\n    (void)pContext;\n\n    /* Grab the EDataFlow type from the device type. */\n    dataFlow = ma_device_type_to_EDataFlow(deviceType);\n\n    /* The role is always eConsole, but we may make this configurable later. */\n    role = ma_eConsole;\n\n    hr = ma_IMMDeviceEnumerator_GetDefaultAudioEndpoint(pDeviceEnumerator, dataFlow, role, &pMMDefaultDevice);\n    if (FAILED(hr)) {\n        return NULL;\n    }\n\n    hr = ma_IMMDevice_GetId(pMMDefaultDevice, &pDefaultDeviceID);\n\n    ma_IMMDevice_Release(pMMDefaultDevice);\n    pMMDefaultDevice = NULL;\n\n    if (FAILED(hr)) {\n        return NULL;\n    }\n\n    return pDefaultDeviceID;\n}\n\nstatic WCHAR* ma_context_get_default_device_id__wasapi(ma_context* pContext, ma_device_type deviceType)    /* Free the returned pointer with ma_CoTaskMemFree() */\n{\n    ma_result result;\n    ma_IMMDeviceEnumerator* pDeviceEnumerator;\n    WCHAR* pDefaultDeviceID = NULL;\n\n    MA_ASSERT(pContext != NULL);\n\n    result = ma_context_create_IMMDeviceEnumerator__wasapi(pContext, &pDeviceEnumerator);\n    if (result != MA_SUCCESS) {\n        return NULL;\n    }\n\n    pDefaultDeviceID = ma_context_get_default_device_id_from_IMMDeviceEnumerator__wasapi(pContext, pDeviceEnumerator, deviceType);\n\n    ma_IMMDeviceEnumerator_Release(pDeviceEnumerator);\n    return pDefaultDeviceID;\n}\n\nstatic ma_result ma_context_get_MMDevice__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_IMMDevice** ppMMDevice)\n{\n    ma_IMMDeviceEnumerator* pDeviceEnumerator;\n    HRESULT hr;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(ppMMDevice != NULL);\n\n    hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);\n    if (FAILED(hr)) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to create IMMDeviceEnumerator.\\n\");\n        return ma_result_from_HRESULT(hr);\n    }\n\n    if (pDeviceID == NULL) {\n        hr = ma_IMMDeviceEnumerator_GetDefaultAudioEndpoint(pDeviceEnumerator, (deviceType == ma_device_type_capture) ? ma_eCapture : ma_eRender, ma_eConsole, ppMMDevice);\n    } else {\n        hr = ma_IMMDeviceEnumerator_GetDevice(pDeviceEnumerator, pDeviceID->wasapi, ppMMDevice);\n    }\n\n    ma_IMMDeviceEnumerator_Release(pDeviceEnumerator);\n    if (FAILED(hr)) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to retrieve IMMDevice.\\n\");\n        return ma_result_from_HRESULT(hr);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_get_device_id_from_MMDevice__wasapi(ma_context* pContext, ma_IMMDevice* pMMDevice, ma_device_id* pDeviceID)\n{\n    WCHAR* pDeviceIDString;\n    HRESULT hr;\n\n    MA_ASSERT(pDeviceID != NULL);\n\n    hr = ma_IMMDevice_GetId(pMMDevice, &pDeviceIDString);\n    if (SUCCEEDED(hr)) {\n        size_t idlen = ma_strlen_WCHAR(pDeviceIDString);\n        if (idlen+1 > ma_countof(pDeviceID->wasapi)) {\n            ma_CoTaskMemFree(pContext, pDeviceIDString);\n            MA_ASSERT(MA_FALSE);  /* NOTE: If this is triggered, please report it. It means the format of the ID must haved change and is too long to fit in our fixed sized buffer. */\n            return MA_ERROR;\n        }\n\n        MA_COPY_MEMORY(pDeviceID->wasapi, pDeviceIDString, idlen * sizeof(wchar_t));\n        pDeviceID->wasapi[idlen] = '\\0';\n\n        ma_CoTaskMemFree(pContext, pDeviceIDString);\n\n        return MA_SUCCESS;\n    }\n\n    return MA_ERROR;\n}\n\nstatic ma_result ma_context_get_device_info_from_MMDevice__wasapi(ma_context* pContext, ma_IMMDevice* pMMDevice, WCHAR* pDefaultDeviceID, ma_bool32 onlySimpleInfo, ma_device_info* pInfo)\n{\n    ma_result result;\n    HRESULT hr;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pMMDevice != NULL);\n    MA_ASSERT(pInfo != NULL);\n\n    /* ID. */\n    result = ma_context_get_device_id_from_MMDevice__wasapi(pContext, pMMDevice, &pInfo->id);\n    if (result == MA_SUCCESS) {\n        if (pDefaultDeviceID != NULL) {\n            if (ma_strcmp_WCHAR(pInfo->id.wasapi, pDefaultDeviceID) == 0) {\n                pInfo->isDefault = MA_TRUE;\n            }\n        }\n    }\n\n    /* Description / Friendly Name */\n    {\n        ma_IPropertyStore *pProperties;\n        hr = ma_IMMDevice_OpenPropertyStore(pMMDevice, STGM_READ, &pProperties);\n        if (SUCCEEDED(hr)) {\n            MA_PROPVARIANT var;\n\n            ma_PropVariantInit(&var);\n            hr = ma_IPropertyStore_GetValue(pProperties, &MA_PKEY_Device_FriendlyName, &var);\n            if (SUCCEEDED(hr)) {\n                WideCharToMultiByte(CP_UTF8, 0, var.pwszVal, -1, pInfo->name, sizeof(pInfo->name), 0, FALSE);\n                ma_PropVariantClear(pContext, &var);\n            }\n\n            ma_IPropertyStore_Release(pProperties);\n        }\n    }\n\n    /* Format */\n    if (!onlySimpleInfo) {\n        ma_IAudioClient* pAudioClient;\n        hr = ma_IMMDevice_Activate(pMMDevice, &MA_IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&pAudioClient);\n        if (SUCCEEDED(hr)) {\n            result = ma_context_get_device_info_from_IAudioClient__wasapi(pContext, pMMDevice, pAudioClient, pInfo);\n\n            ma_IAudioClient_Release(pAudioClient);\n            return result;\n        } else {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to activate audio client for device info retrieval.\");\n            return ma_result_from_HRESULT(hr);\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_enumerate_devices_by_type__wasapi(ma_context* pContext, ma_IMMDeviceEnumerator* pDeviceEnumerator, ma_device_type deviceType, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    ma_result result = MA_SUCCESS;\n    UINT deviceCount;\n    HRESULT hr;\n    ma_uint32 iDevice;\n    WCHAR* pDefaultDeviceID = NULL;\n    ma_IMMDeviceCollection* pDeviceCollection = NULL;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(callback != NULL);\n\n    /* Grab the default device. We use this to know whether or not flag the returned device info as being the default. */\n    pDefaultDeviceID = ma_context_get_default_device_id_from_IMMDeviceEnumerator__wasapi(pContext, pDeviceEnumerator, deviceType);\n\n    /* We need to enumerate the devices which returns a device collection. */\n    hr = ma_IMMDeviceEnumerator_EnumAudioEndpoints(pDeviceEnumerator, ma_device_type_to_EDataFlow(deviceType), MA_MM_DEVICE_STATE_ACTIVE, &pDeviceCollection);\n    if (SUCCEEDED(hr)) {\n        hr = ma_IMMDeviceCollection_GetCount(pDeviceCollection, &deviceCount);\n        if (FAILED(hr)) {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to get device count.\\n\");\n            result = ma_result_from_HRESULT(hr);\n            goto done;\n        }\n\n        for (iDevice = 0; iDevice < deviceCount; ++iDevice) {\n            ma_device_info deviceInfo;\n            ma_IMMDevice* pMMDevice;\n\n            MA_ZERO_OBJECT(&deviceInfo);\n\n            hr = ma_IMMDeviceCollection_Item(pDeviceCollection, iDevice, &pMMDevice);\n            if (SUCCEEDED(hr)) {\n                result = ma_context_get_device_info_from_MMDevice__wasapi(pContext, pMMDevice, pDefaultDeviceID, MA_TRUE, &deviceInfo);   /* MA_TRUE = onlySimpleInfo. */\n\n                ma_IMMDevice_Release(pMMDevice);\n                if (result == MA_SUCCESS) {\n                    ma_bool32 cbResult = callback(pContext, deviceType, &deviceInfo, pUserData);\n                    if (cbResult == MA_FALSE) {\n                        break;\n                    }\n                }\n            }\n        }\n    }\n\ndone:\n    if (pDefaultDeviceID != NULL) {\n        ma_CoTaskMemFree(pContext, pDefaultDeviceID);\n        pDefaultDeviceID = NULL;\n    }\n\n    if (pDeviceCollection != NULL) {\n        ma_IMMDeviceCollection_Release(pDeviceCollection);\n        pDeviceCollection = NULL;\n    }\n\n    return result;\n}\n\nstatic ma_result ma_context_get_IAudioClient_Desktop__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, MA_PROPVARIANT* pActivationParams, ma_IAudioClient** ppAudioClient, ma_IMMDevice** ppMMDevice)\n{\n    ma_result result;\n    HRESULT hr;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(ppAudioClient != NULL);\n    MA_ASSERT(ppMMDevice != NULL);\n\n    result = ma_context_get_MMDevice__wasapi(pContext, deviceType, pDeviceID, ppMMDevice);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    hr = ma_IMMDevice_Activate(*ppMMDevice, &MA_IID_IAudioClient, CLSCTX_ALL, pActivationParams, (void**)ppAudioClient);\n    if (FAILED(hr)) {\n        return ma_result_from_HRESULT(hr);\n    }\n\n    return MA_SUCCESS;\n}\n#else\nstatic ma_result ma_context_get_IAudioClient_UWP__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, MA_PROPVARIANT* pActivationParams, ma_IAudioClient** ppAudioClient, ma_IUnknown** ppActivatedInterface)\n{\n    ma_IActivateAudioInterfaceAsyncOperation *pAsyncOp = NULL;\n    ma_completion_handler_uwp completionHandler;\n    IID iid;\n    WCHAR* iidStr;\n    HRESULT hr;\n    ma_result result;\n    HRESULT activateResult;\n    ma_IUnknown* pActivatedInterface;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(ppAudioClient != NULL);\n\n    if (pDeviceID != NULL) {\n        iidStr = (WCHAR*)pDeviceID->wasapi;\n    } else {\n        if (deviceType == ma_device_type_capture) {\n            iid = MA_IID_DEVINTERFACE_AUDIO_CAPTURE;\n        } else {\n            iid = MA_IID_DEVINTERFACE_AUDIO_RENDER;\n        }\n\n    #if defined(__cplusplus)\n        hr = StringFromIID(iid, &iidStr);\n    #else\n        hr = StringFromIID(&iid, &iidStr);\n    #endif\n        if (FAILED(hr)) {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to convert device IID to string for ActivateAudioInterfaceAsync(). Out of memory.\\n\");\n            return ma_result_from_HRESULT(hr);\n        }\n    }\n\n    result = ma_completion_handler_uwp_init(&completionHandler);\n    if (result != MA_SUCCESS) {\n        ma_CoTaskMemFree(pContext, iidStr);\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to create event for waiting for ActivateAudioInterfaceAsync().\\n\");\n        return result;\n    }\n\n    hr = ((MA_PFN_ActivateAudioInterfaceAsync)pContext->wasapi.ActivateAudioInterfaceAsync)(iidStr, &MA_IID_IAudioClient, pActivationParams, (ma_IActivateAudioInterfaceCompletionHandler*)&completionHandler, (ma_IActivateAudioInterfaceAsyncOperation**)&pAsyncOp);\n    if (FAILED(hr)) {\n        ma_completion_handler_uwp_uninit(&completionHandler);\n        ma_CoTaskMemFree(pContext, iidStr);\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[WASAPI] ActivateAudioInterfaceAsync() failed.\\n\");\n        return ma_result_from_HRESULT(hr);\n    }\n\n    if (pDeviceID == NULL) {\n        ma_CoTaskMemFree(pContext, iidStr);\n    }\n\n    /* Wait for the async operation for finish. */\n    ma_completion_handler_uwp_wait(&completionHandler);\n    ma_completion_handler_uwp_uninit(&completionHandler);\n\n    hr = ma_IActivateAudioInterfaceAsyncOperation_GetActivateResult(pAsyncOp, &activateResult, &pActivatedInterface);\n    ma_IActivateAudioInterfaceAsyncOperation_Release(pAsyncOp);\n\n    if (FAILED(hr) || FAILED(activateResult)) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to activate device.\\n\");\n        return FAILED(hr) ? ma_result_from_HRESULT(hr) : ma_result_from_HRESULT(activateResult);\n    }\n\n    /* Here is where we grab the IAudioClient interface. */\n    hr = ma_IUnknown_QueryInterface(pActivatedInterface, &MA_IID_IAudioClient, (void**)ppAudioClient);\n    if (FAILED(hr)) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to query IAudioClient interface.\\n\");\n        return ma_result_from_HRESULT(hr);\n    }\n\n    if (ppActivatedInterface) {\n        *ppActivatedInterface = pActivatedInterface;\n    } else {\n        ma_IUnknown_Release(pActivatedInterface);\n    }\n\n    return MA_SUCCESS;\n}\n#endif\n\n\n/* https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ne-audioclientactivationparams-audioclient_activation_type */\ntypedef enum\n{\n    MA_AUDIOCLIENT_ACTIVATION_TYPE_DEFAULT,\n    MA_AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK\n} MA_AUDIOCLIENT_ACTIVATION_TYPE;\n\n/* https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ne-audioclientactivationparams-process_loopback_mode */\ntypedef enum\n{\n    MA_PROCESS_LOOPBACK_MODE_INCLUDE_TARGET_PROCESS_TREE,\n    MA_PROCESS_LOOPBACK_MODE_EXCLUDE_TARGET_PROCESS_TREE\n} MA_PROCESS_LOOPBACK_MODE;\n\n/* https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ns-audioclientactivationparams-audioclient_process_loopback_params */\ntypedef struct\n{\n    DWORD TargetProcessId;\n    MA_PROCESS_LOOPBACK_MODE ProcessLoopbackMode;\n} MA_AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS;\n\n#if defined(_MSC_VER) && !defined(__clang__)\n    #pragma warning(push)\n    #pragma warning(disable:4201)   /* nonstandard extension used: nameless struct/union */\n#elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))\n    #pragma GCC diagnostic push\n    #pragma GCC diagnostic ignored \"-Wpedantic\" /* For ISO C99 doesn't support unnamed structs/unions [-Wpedantic] */\n    #if defined(__clang__)\n        #pragma GCC diagnostic ignored \"-Wc11-extensions\"   /* anonymous unions are a C11 extension */\n    #endif\n#endif\n/* https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ns-audioclientactivationparams-audioclient_activation_params */\ntypedef struct\n{\n    MA_AUDIOCLIENT_ACTIVATION_TYPE ActivationType;\n    union\n    {\n        MA_AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS ProcessLoopbackParams;\n    };\n} MA_AUDIOCLIENT_ACTIVATION_PARAMS;\n#if defined(_MSC_VER) && !defined(__clang__)\n    #pragma warning(pop)\n#elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))\n    #pragma GCC diagnostic pop\n#endif\n\n#define MA_VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK L\"VAD\\\\Process_Loopback\"\n\nstatic ma_result ma_context_get_IAudioClient__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_uint32 loopbackProcessID, ma_bool32 loopbackProcessExclude, ma_IAudioClient** ppAudioClient, ma_WASAPIDeviceInterface** ppDeviceInterface)\n{\n    ma_result result;\n    ma_bool32 usingProcessLoopback = MA_FALSE;\n    MA_AUDIOCLIENT_ACTIVATION_PARAMS audioclientActivationParams;\n    MA_PROPVARIANT activationParams;\n    MA_PROPVARIANT* pActivationParams = NULL;\n    ma_device_id virtualDeviceID;\n\n    /* Activation parameters specific to loopback mode. Note that process-specific loopback will only work when a default device ID is specified. */\n    if (deviceType == ma_device_type_loopback && loopbackProcessID != 0 && pDeviceID == NULL) {\n        usingProcessLoopback = MA_TRUE;\n    }\n\n    if (usingProcessLoopback) {\n        MA_ZERO_OBJECT(&audioclientActivationParams);\n        audioclientActivationParams.ActivationType                            = MA_AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK;\n        audioclientActivationParams.ProcessLoopbackParams.ProcessLoopbackMode = (loopbackProcessExclude) ? MA_PROCESS_LOOPBACK_MODE_EXCLUDE_TARGET_PROCESS_TREE : MA_PROCESS_LOOPBACK_MODE_INCLUDE_TARGET_PROCESS_TREE;\n        audioclientActivationParams.ProcessLoopbackParams.TargetProcessId     = (DWORD)loopbackProcessID;\n\n        ma_PropVariantInit(&activationParams);\n        activationParams.vt             = MA_VT_BLOB;\n        activationParams.blob.cbSize    = sizeof(audioclientActivationParams);\n        activationParams.blob.pBlobData = (BYTE*)&audioclientActivationParams;\n        pActivationParams = &activationParams;\n\n        /* When requesting a specific device ID we need to use a special device ID. */\n        MA_COPY_MEMORY(virtualDeviceID.wasapi, MA_VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK, (wcslen(MA_VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK) + 1) * sizeof(wchar_t)); /* +1 for the null terminator. */\n        pDeviceID = &virtualDeviceID;\n    } else {\n        pActivationParams = NULL;   /* No activation parameters required. */\n    }\n\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    result = ma_context_get_IAudioClient_Desktop__wasapi(pContext, deviceType, pDeviceID, pActivationParams, ppAudioClient, ppDeviceInterface);\n#else\n    result = ma_context_get_IAudioClient_UWP__wasapi(pContext, deviceType, pDeviceID, pActivationParams, ppAudioClient, ppDeviceInterface);\n#endif\n\n    /*\n    If loopback mode was requested with a process ID and initialization failed, it could be because it's\n    trying to run on an older version of Windows where it's not supported. We need to let the caller\n    know about this with a log message.\n    */\n    if (result != MA_SUCCESS) {\n        if (usingProcessLoopback) {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[WASAPI] Loopback mode requested to %s process ID %u, but initialization failed. Support for this feature begins with Windows 10 Build 20348. Confirm your version of Windows or consider not using process-specific loopback.\\n\", (loopbackProcessExclude) ? \"exclude\" : \"include\", loopbackProcessID);\n        }\n    }\n\n    return result;\n}\n\n\nstatic ma_result ma_context_enumerate_devices__wasapi(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    /* Different enumeration for desktop and UWP. */\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    /* Desktop */\n    HRESULT hr;\n    ma_IMMDeviceEnumerator* pDeviceEnumerator;\n\n    hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);\n    if (FAILED(hr)) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to create device enumerator.\");\n        return ma_result_from_HRESULT(hr);\n    }\n\n    ma_context_enumerate_devices_by_type__wasapi(pContext, pDeviceEnumerator, ma_device_type_playback, callback, pUserData);\n    ma_context_enumerate_devices_by_type__wasapi(pContext, pDeviceEnumerator, ma_device_type_capture,  callback, pUserData);\n\n    ma_IMMDeviceEnumerator_Release(pDeviceEnumerator);\n#else\n    /*\n    UWP\n\n    The MMDevice API is only supported on desktop applications. For now, while I'm still figuring out how to properly enumerate\n    over devices without using MMDevice, I'm restricting devices to defaults.\n\n    Hint: DeviceInformation::FindAllAsync() with DeviceClass.AudioCapture/AudioRender. https://blogs.windows.com/buildingapps/2014/05/15/real-time-audio-in-windows-store-and-windows-phone-apps/\n    */\n    if (callback) {\n        ma_bool32 cbResult = MA_TRUE;\n\n        /* Playback. */\n        if (cbResult) {\n            ma_device_info deviceInfo;\n            MA_ZERO_OBJECT(&deviceInfo);\n            ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n            deviceInfo.isDefault = MA_TRUE;\n            cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData);\n        }\n\n        /* Capture. */\n        if (cbResult) {\n            ma_device_info deviceInfo;\n            MA_ZERO_OBJECT(&deviceInfo);\n            ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n            deviceInfo.isDefault = MA_TRUE;\n            cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData);\n        }\n    }\n#endif\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_get_device_info__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    ma_result result;\n    ma_IMMDevice* pMMDevice = NULL;\n    WCHAR* pDefaultDeviceID = NULL;\n\n    result = ma_context_get_MMDevice__wasapi(pContext, deviceType, pDeviceID, &pMMDevice);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* We need the default device ID so we can set the isDefault flag in the device info. */\n    pDefaultDeviceID = ma_context_get_default_device_id__wasapi(pContext, deviceType);\n\n    result = ma_context_get_device_info_from_MMDevice__wasapi(pContext, pMMDevice, pDefaultDeviceID, MA_FALSE, pDeviceInfo);   /* MA_FALSE = !onlySimpleInfo. */\n\n    if (pDefaultDeviceID != NULL) {\n        ma_CoTaskMemFree(pContext, pDefaultDeviceID);\n        pDefaultDeviceID = NULL;\n    }\n\n    ma_IMMDevice_Release(pMMDevice);\n\n    return result;\n#else\n    ma_IAudioClient* pAudioClient;\n    ma_result result;\n\n    /* UWP currently only uses default devices. */\n    if (deviceType == ma_device_type_playback) {\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n    } else {\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n    }\n\n    result = ma_context_get_IAudioClient_UWP__wasapi(pContext, deviceType, pDeviceID, NULL, &pAudioClient, NULL);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    result = ma_context_get_device_info_from_IAudioClient__wasapi(pContext, NULL, pAudioClient, pDeviceInfo);\n\n    pDeviceInfo->isDefault = MA_TRUE;  /* UWP only supports default devices. */\n\n    ma_IAudioClient_Release(pAudioClient);\n    return result;\n#endif\n}\n\nstatic ma_result ma_device_uninit__wasapi(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    if (pDevice->wasapi.pDeviceEnumerator) {\n        ((ma_IMMDeviceEnumerator*)pDevice->wasapi.pDeviceEnumerator)->lpVtbl->UnregisterEndpointNotificationCallback((ma_IMMDeviceEnumerator*)pDevice->wasapi.pDeviceEnumerator, &pDevice->wasapi.notificationClient);\n        ma_IMMDeviceEnumerator_Release((ma_IMMDeviceEnumerator*)pDevice->wasapi.pDeviceEnumerator);\n    }\n#endif\n\n    if (pDevice->wasapi.pRenderClient) {\n        if (pDevice->wasapi.pMappedBufferPlayback != NULL) {\n            ma_IAudioRenderClient_ReleaseBuffer((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient, pDevice->wasapi.mappedBufferPlaybackCap, 0);\n            pDevice->wasapi.pMappedBufferPlayback   = NULL;\n            pDevice->wasapi.mappedBufferPlaybackCap = 0;\n            pDevice->wasapi.mappedBufferPlaybackLen = 0;\n        }\n\n        ma_IAudioRenderClient_Release((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient);\n    }\n    if (pDevice->wasapi.pCaptureClient) {\n        if (pDevice->wasapi.pMappedBufferCapture != NULL) {\n            ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap);\n            pDevice->wasapi.pMappedBufferCapture   = NULL;\n            pDevice->wasapi.mappedBufferCaptureCap = 0;\n            pDevice->wasapi.mappedBufferCaptureLen = 0;\n        }\n\n        ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient);\n    }\n\n    if (pDevice->wasapi.pAudioClientPlayback) {\n        ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback);\n    }\n    if (pDevice->wasapi.pAudioClientCapture) {\n        ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture);\n    }\n\n    if (pDevice->wasapi.hEventPlayback) {\n        CloseHandle((HANDLE)pDevice->wasapi.hEventPlayback);\n    }\n    if (pDevice->wasapi.hEventCapture) {\n        CloseHandle((HANDLE)pDevice->wasapi.hEventCapture);\n    }\n\n    return MA_SUCCESS;\n}\n\n\ntypedef struct\n{\n    /* Input. */\n    ma_format formatIn;\n    ma_uint32 channelsIn;\n    ma_uint32 sampleRateIn;\n    ma_channel channelMapIn[MA_MAX_CHANNELS];\n    ma_uint32 periodSizeInFramesIn;\n    ma_uint32 periodSizeInMillisecondsIn;\n    ma_uint32 periodsIn;\n    ma_share_mode shareMode;\n    ma_performance_profile performanceProfile;\n    ma_bool32 noAutoConvertSRC;\n    ma_bool32 noDefaultQualitySRC;\n    ma_bool32 noHardwareOffloading;\n    ma_uint32 loopbackProcessID;\n    ma_bool32 loopbackProcessExclude;\n\n    /* Output. */\n    ma_IAudioClient* pAudioClient;\n    ma_IAudioRenderClient* pRenderClient;\n    ma_IAudioCaptureClient* pCaptureClient;\n    ma_format formatOut;\n    ma_uint32 channelsOut;\n    ma_uint32 sampleRateOut;\n    ma_channel channelMapOut[MA_MAX_CHANNELS];\n    ma_uint32 periodSizeInFramesOut;\n    ma_uint32 periodsOut;\n    ma_bool32 usingAudioClient3;\n    char deviceName[256];\n    ma_device_id id;\n} ma_device_init_internal_data__wasapi;\n\nstatic ma_result ma_device_init_internal__wasapi(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_init_internal_data__wasapi* pData)\n{\n    HRESULT hr;\n    ma_result result = MA_SUCCESS;\n    const char* errorMsg = \"\";\n    MA_AUDCLNT_SHAREMODE shareMode = MA_AUDCLNT_SHAREMODE_SHARED;\n    DWORD streamFlags = 0;\n    MA_REFERENCE_TIME periodDurationInMicroseconds;\n    ma_bool32 wasInitializedUsingIAudioClient3 = MA_FALSE;\n    MA_WAVEFORMATEXTENSIBLE wf;\n    ma_WASAPIDeviceInterface* pDeviceInterface = NULL;\n    ma_IAudioClient2* pAudioClient2;\n    ma_uint32 nativeSampleRate;\n    ma_bool32 usingProcessLoopback = MA_FALSE;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pData != NULL);\n\n    /* This function is only used to initialize one device type: either playback, capture or loopback. Never full-duplex. */\n    if (deviceType == ma_device_type_duplex) {\n        return MA_INVALID_ARGS;\n    }\n\n    usingProcessLoopback = deviceType == ma_device_type_loopback && pData->loopbackProcessID != 0 && pDeviceID == NULL;\n\n    pData->pAudioClient = NULL;\n    pData->pRenderClient = NULL;\n    pData->pCaptureClient = NULL;\n\n    streamFlags = MA_AUDCLNT_STREAMFLAGS_EVENTCALLBACK;\n    if (!pData->noAutoConvertSRC && pData->sampleRateIn != 0 && pData->shareMode != ma_share_mode_exclusive) {    /* <-- Exclusive streams must use the native sample rate. */\n        streamFlags |= MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM;\n    }\n    if (!pData->noDefaultQualitySRC && pData->sampleRateIn != 0 && (streamFlags & MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM) != 0) {\n        streamFlags |= MA_AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY;\n    }\n    if (deviceType == ma_device_type_loopback) {\n        streamFlags |= MA_AUDCLNT_STREAMFLAGS_LOOPBACK;\n    }\n\n    result = ma_context_get_IAudioClient__wasapi(pContext, deviceType, pDeviceID, pData->loopbackProcessID, pData->loopbackProcessExclude, &pData->pAudioClient, &pDeviceInterface);\n    if (result != MA_SUCCESS) {\n        goto done;\n    }\n\n    MA_ZERO_OBJECT(&wf);\n\n    /* Try enabling hardware offloading. */\n    if (!pData->noHardwareOffloading) {\n        hr = ma_IAudioClient_QueryInterface(pData->pAudioClient, &MA_IID_IAudioClient2, (void**)&pAudioClient2);\n        if (SUCCEEDED(hr)) {\n            BOOL isHardwareOffloadingSupported = 0;\n            hr = ma_IAudioClient2_IsOffloadCapable(pAudioClient2, MA_AudioCategory_Other, &isHardwareOffloadingSupported);\n            if (SUCCEEDED(hr) && isHardwareOffloadingSupported) {\n                ma_AudioClientProperties clientProperties;\n                MA_ZERO_OBJECT(&clientProperties);\n                clientProperties.cbSize = sizeof(clientProperties);\n                clientProperties.bIsOffload = 1;\n                clientProperties.eCategory = MA_AudioCategory_Other;\n                ma_IAudioClient2_SetClientProperties(pAudioClient2, &clientProperties);\n            }\n\n            pAudioClient2->lpVtbl->Release(pAudioClient2);\n        }\n    }\n\n    /* Here is where we try to determine the best format to use with the device. If the client if wanting exclusive mode, first try finding the best format for that. If this fails, fall back to shared mode. */\n    result = MA_FORMAT_NOT_SUPPORTED;\n    if (pData->shareMode == ma_share_mode_exclusive) {\n    #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n        /* In exclusive mode on desktop we always use the backend's native format. */\n        ma_IPropertyStore* pStore = NULL;\n        hr = ma_IMMDevice_OpenPropertyStore(pDeviceInterface, STGM_READ, &pStore);\n        if (SUCCEEDED(hr)) {\n            MA_PROPVARIANT prop;\n            ma_PropVariantInit(&prop);\n            hr = ma_IPropertyStore_GetValue(pStore, &MA_PKEY_AudioEngine_DeviceFormat, &prop);\n            if (SUCCEEDED(hr)) {\n                MA_WAVEFORMATEX* pActualFormat = (MA_WAVEFORMATEX*)prop.blob.pBlobData;\n                hr = ma_IAudioClient_IsFormatSupported((ma_IAudioClient*)pData->pAudioClient, MA_AUDCLNT_SHAREMODE_EXCLUSIVE, pActualFormat, NULL);\n                if (SUCCEEDED(hr)) {\n                    MA_COPY_MEMORY(&wf, pActualFormat, sizeof(MA_WAVEFORMATEXTENSIBLE));\n                }\n\n                ma_PropVariantClear(pContext, &prop);\n            }\n\n            ma_IPropertyStore_Release(pStore);\n        }\n    #else\n        /*\n        I do not know how to query the device's native format on UWP so for now I'm just disabling support for\n        exclusive mode. The alternative is to enumerate over different formats and check IsFormatSupported()\n        until you find one that works.\n\n        TODO: Add support for exclusive mode to UWP.\n        */\n        hr = S_FALSE;\n    #endif\n\n        if (hr == S_OK) {\n            shareMode = MA_AUDCLNT_SHAREMODE_EXCLUSIVE;\n            result = MA_SUCCESS;\n        } else {\n            result = MA_SHARE_MODE_NOT_SUPPORTED;\n        }\n    } else {\n        /* In shared mode we are always using the format reported by the operating system. */\n        MA_WAVEFORMATEXTENSIBLE* pNativeFormat = NULL;\n        hr = ma_IAudioClient_GetMixFormat((ma_IAudioClient*)pData->pAudioClient, (MA_WAVEFORMATEX**)&pNativeFormat);\n        if (hr != S_OK) {\n            /* When using process-specific loopback, GetMixFormat() seems to always fail. */\n            if (usingProcessLoopback) {\n                wf.wFormatTag      = WAVE_FORMAT_IEEE_FLOAT;\n                wf.nChannels       = 2;\n                wf.nSamplesPerSec  = 44100;\n                wf.wBitsPerSample  = 32;\n                wf.nBlockAlign     = wf.nChannels * wf.wBitsPerSample / 8;\n                wf.nAvgBytesPerSec = wf.nSamplesPerSec * wf.nBlockAlign;\n                wf.cbSize          = sizeof(MA_WAVEFORMATEX);\n\n                result = MA_SUCCESS;\n            } else {\n                result = MA_FORMAT_NOT_SUPPORTED;\n            }\n        } else {\n            /*\n            I've seen cases where cbSize will be set to sizeof(WAVEFORMATEX) even though the structure itself\n            is given the format tag of WAVE_FORMAT_EXTENSIBLE. If the format tag is WAVE_FORMAT_EXTENSIBLE\n            want to make sure we copy the whole WAVEFORMATEXTENSIBLE structure. Otherwise we'll have to be\n            safe and only copy the WAVEFORMATEX part.\n            */\n            if (pNativeFormat->wFormatTag == WAVE_FORMAT_EXTENSIBLE) {\n                MA_COPY_MEMORY(&wf, pNativeFormat, sizeof(MA_WAVEFORMATEXTENSIBLE));\n            } else {\n                /* I've seen a case where cbSize was set to 0. Assume sizeof(WAVEFORMATEX) in this case. */\n                size_t cbSize = pNativeFormat->cbSize;\n                if (cbSize == 0) {\n                    cbSize = sizeof(MA_WAVEFORMATEX);\n                }\n\n                /* Make sure we don't copy more than the capacity of `wf`. */\n                if (cbSize > sizeof(wf)) {\n                    cbSize = sizeof(wf);\n                }\n\n                MA_COPY_MEMORY(&wf, pNativeFormat, cbSize);\n            }\n\n            result = MA_SUCCESS;\n        }\n\n        ma_CoTaskMemFree(pContext, pNativeFormat);\n\n        shareMode = MA_AUDCLNT_SHAREMODE_SHARED;\n    }\n\n    /* Return an error if we still haven't found a format. */\n    if (result != MA_SUCCESS) {\n        errorMsg = \"[WASAPI] Failed to find best device mix format.\";\n        goto done;\n    }\n\n    /*\n    Override the native sample rate with the one requested by the caller, but only if we're not using the default sample rate. We'll use\n    WASAPI to perform the sample rate conversion.\n    */\n    nativeSampleRate = wf.nSamplesPerSec;\n    if (streamFlags & MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM) {\n        wf.nSamplesPerSec = (pData->sampleRateIn != 0) ? pData->sampleRateIn : MA_DEFAULT_SAMPLE_RATE;\n        wf.nAvgBytesPerSec = wf.nSamplesPerSec * wf.nBlockAlign;\n    }\n\n    pData->formatOut = ma_format_from_WAVEFORMATEX((MA_WAVEFORMATEX*)&wf);\n    if (pData->formatOut == ma_format_unknown) {\n        /*\n        The format isn't supported. This is almost certainly because the exclusive mode format isn't supported by miniaudio. We need to return MA_SHARE_MODE_NOT_SUPPORTED\n        in this case so that the caller can detect it and fall back to shared mode if desired. We should never get here if shared mode was requested, but just for\n        completeness we'll check for it and return MA_FORMAT_NOT_SUPPORTED.\n        */\n        if (shareMode == MA_AUDCLNT_SHAREMODE_EXCLUSIVE) {\n            result = MA_SHARE_MODE_NOT_SUPPORTED;\n        } else {\n            result = MA_FORMAT_NOT_SUPPORTED;\n        }\n\n        errorMsg = \"[WASAPI] Native format not supported.\";\n        goto done;\n    }\n\n    pData->channelsOut = wf.nChannels;\n    pData->sampleRateOut = wf.nSamplesPerSec;\n\n    /*\n    Get the internal channel map based on the channel mask. There is a possibility that GetMixFormat() returns\n    a WAVEFORMATEX instead of a WAVEFORMATEXTENSIBLE, in which case the channel mask will be undefined. In this\n    case we'll just use the default channel map.\n    */\n    if (wf.wFormatTag == WAVE_FORMAT_EXTENSIBLE || wf.cbSize >= sizeof(MA_WAVEFORMATEXTENSIBLE)) {\n        ma_channel_mask_to_channel_map__win32(wf.dwChannelMask, pData->channelsOut, pData->channelMapOut);\n    } else {\n        ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pData->channelMapOut, ma_countof(pData->channelMapOut), pData->channelsOut);\n    }\n\n    /* Period size. */\n    pData->periodsOut = (pData->periodsIn != 0) ? pData->periodsIn : MA_DEFAULT_PERIODS;\n    pData->periodSizeInFramesOut = pData->periodSizeInFramesIn;\n    if (pData->periodSizeInFramesOut == 0) {\n        if (pData->periodSizeInMillisecondsIn == 0) {\n            if (pData->performanceProfile == ma_performance_profile_low_latency) {\n                pData->periodSizeInFramesOut = ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY, wf.nSamplesPerSec);\n            } else {\n                pData->periodSizeInFramesOut = ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE, wf.nSamplesPerSec);\n            }\n        } else {\n            pData->periodSizeInFramesOut = ma_calculate_buffer_size_in_frames_from_milliseconds(pData->periodSizeInMillisecondsIn, wf.nSamplesPerSec);\n        }\n    }\n\n    periodDurationInMicroseconds = ((ma_uint64)pData->periodSizeInFramesOut * 1000 * 1000) / wf.nSamplesPerSec;\n\n\n    /* Slightly different initialization for shared and exclusive modes. We try exclusive mode first, and if it fails, fall back to shared mode. */\n    if (shareMode == MA_AUDCLNT_SHAREMODE_EXCLUSIVE) {\n        MA_REFERENCE_TIME bufferDuration = periodDurationInMicroseconds * pData->periodsOut * 10;\n\n        /*\n        If the periodicy is too small, Initialize() will fail with AUDCLNT_E_INVALID_DEVICE_PERIOD. In this case we should just keep increasing\n        it and trying it again.\n        */\n        hr = E_FAIL;\n        for (;;) {\n            hr = ma_IAudioClient_Initialize((ma_IAudioClient*)pData->pAudioClient, shareMode, streamFlags, bufferDuration, bufferDuration, (MA_WAVEFORMATEX*)&wf, NULL);\n            if (hr == MA_AUDCLNT_E_INVALID_DEVICE_PERIOD) {\n                if (bufferDuration > 500*10000) {\n                    break;\n                } else {\n                    if (bufferDuration == 0) {  /* <-- Just a sanity check to prevent an infinit loop. Should never happen, but it makes me feel better. */\n                        break;\n                    }\n\n                    bufferDuration = bufferDuration * 2;\n                    continue;\n                }\n            } else {\n                break;\n            }\n        }\n\n        if (hr == MA_AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED) {\n            ma_uint32 bufferSizeInFrames;\n            hr = ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pData->pAudioClient, &bufferSizeInFrames);\n            if (SUCCEEDED(hr)) {\n                bufferDuration = (MA_REFERENCE_TIME)((10000.0 * 1000 / wf.nSamplesPerSec * bufferSizeInFrames) + 0.5);\n\n                /* Unfortunately we need to release and re-acquire the audio client according to MSDN. Seems silly - why not just call IAudioClient_Initialize() again?! */\n                ma_IAudioClient_Release((ma_IAudioClient*)pData->pAudioClient);\n\n            #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n                hr = ma_IMMDevice_Activate(pDeviceInterface, &MA_IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&pData->pAudioClient);\n            #else\n                hr = ma_IUnknown_QueryInterface(pDeviceInterface, &MA_IID_IAudioClient, (void**)&pData->pAudioClient);\n            #endif\n\n                if (SUCCEEDED(hr)) {\n                    hr = ma_IAudioClient_Initialize((ma_IAudioClient*)pData->pAudioClient, shareMode, streamFlags, bufferDuration, bufferDuration, (MA_WAVEFORMATEX*)&wf, NULL);\n                }\n            }\n        }\n\n        if (FAILED(hr)) {\n            /* Failed to initialize in exclusive mode. Don't fall back to shared mode - instead tell the client about it. They can reinitialize in shared mode if they want. */\n            if (hr == E_ACCESSDENIED) {\n                errorMsg = \"[WASAPI] Failed to initialize device in exclusive mode. Access denied.\", result = MA_ACCESS_DENIED;\n            } else if (hr == MA_AUDCLNT_E_DEVICE_IN_USE) {\n                errorMsg = \"[WASAPI] Failed to initialize device in exclusive mode. Device in use.\", result = MA_BUSY;\n            } else {\n                errorMsg = \"[WASAPI] Failed to initialize device in exclusive mode.\"; result = ma_result_from_HRESULT(hr);\n            }\n            goto done;\n        }\n    }\n\n    if (shareMode == MA_AUDCLNT_SHAREMODE_SHARED) {\n        /*\n        Low latency shared mode via IAudioClient3.\n\n        NOTE\n        ====\n        Contrary to the documentation on MSDN (https://docs.microsoft.com/en-us/windows/win32/api/audioclient/nf-audioclient-iaudioclient3-initializesharedaudiostream), the\n        use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM and AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY with IAudioClient3_InitializeSharedAudioStream() absolutely does not work. Using\n        any of these flags will result in HRESULT code 0x88890021. The other problem is that calling IAudioClient3_GetSharedModeEnginePeriod() with a sample rate different to\n        that returned by IAudioClient_GetMixFormat() also results in an error. I'm therefore disabling low-latency shared mode with AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM.\n        */\n        #ifndef MA_WASAPI_NO_LOW_LATENCY_SHARED_MODE\n        {\n            if ((streamFlags & MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM) == 0 || nativeSampleRate == wf.nSamplesPerSec) {\n                ma_IAudioClient3* pAudioClient3 = NULL;\n                hr = ma_IAudioClient_QueryInterface(pData->pAudioClient, &MA_IID_IAudioClient3, (void**)&pAudioClient3);\n                if (SUCCEEDED(hr)) {\n                    ma_uint32 defaultPeriodInFrames;\n                    ma_uint32 fundamentalPeriodInFrames;\n                    ma_uint32 minPeriodInFrames;\n                    ma_uint32 maxPeriodInFrames;\n                    hr = ma_IAudioClient3_GetSharedModeEnginePeriod(pAudioClient3, (MA_WAVEFORMATEX*)&wf, &defaultPeriodInFrames, &fundamentalPeriodInFrames, &minPeriodInFrames, &maxPeriodInFrames);\n                    if (SUCCEEDED(hr)) {\n                        ma_uint32 desiredPeriodInFrames = pData->periodSizeInFramesOut;\n                        ma_uint32 actualPeriodInFrames  = desiredPeriodInFrames;\n\n                        /* Make sure the period size is a multiple of fundamentalPeriodInFrames. */\n                        actualPeriodInFrames = actualPeriodInFrames / fundamentalPeriodInFrames;\n                        actualPeriodInFrames = actualPeriodInFrames * fundamentalPeriodInFrames;\n\n                        /* The period needs to be clamped between minPeriodInFrames and maxPeriodInFrames. */\n                        actualPeriodInFrames = ma_clamp(actualPeriodInFrames, minPeriodInFrames, maxPeriodInFrames);\n\n                        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Trying IAudioClient3_InitializeSharedAudioStream(actualPeriodInFrames=%d)\\n\", actualPeriodInFrames);\n                        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"    defaultPeriodInFrames=%d\\n\", defaultPeriodInFrames);\n                        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"    fundamentalPeriodInFrames=%d\\n\", fundamentalPeriodInFrames);\n                        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"    minPeriodInFrames=%d\\n\", minPeriodInFrames);\n                        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"    maxPeriodInFrames=%d\\n\", maxPeriodInFrames);\n\n                        /* If the client requested a largish buffer than we don't actually want to use low latency shared mode because it forces small buffers. */\n                        if (actualPeriodInFrames >= desiredPeriodInFrames) {\n                            /*\n                            MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM | MA_AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY must not be in the stream flags. If either of these are specified,\n                            IAudioClient3_InitializeSharedAudioStream() will fail.\n                            */\n                            hr = ma_IAudioClient3_InitializeSharedAudioStream(pAudioClient3, streamFlags & ~(MA_AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM | MA_AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY), actualPeriodInFrames, (MA_WAVEFORMATEX*)&wf, NULL);\n                            if (SUCCEEDED(hr)) {\n                                wasInitializedUsingIAudioClient3 = MA_TRUE;\n                                pData->periodSizeInFramesOut = actualPeriodInFrames;\n\n                                ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Using IAudioClient3\\n\");\n                                ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"    periodSizeInFramesOut=%d\\n\", pData->periodSizeInFramesOut);\n                            } else {\n                                ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"[WASAPI] IAudioClient3_InitializeSharedAudioStream failed. Falling back to IAudioClient.\\n\");\n                            }\n                        } else {\n                            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Not using IAudioClient3 because the desired period size is larger than the maximum supported by IAudioClient3.\\n\");\n                        }\n                    } else {\n                        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"[WASAPI] IAudioClient3_GetSharedModeEnginePeriod failed. Falling back to IAudioClient.\\n\");\n                    }\n\n                    ma_IAudioClient3_Release(pAudioClient3);\n                    pAudioClient3 = NULL;\n                }\n            }\n        }\n        #else\n        {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Not using IAudioClient3 because MA_WASAPI_NO_LOW_LATENCY_SHARED_MODE is enabled.\\n\");\n        }\n        #endif\n\n        /* If we don't have an IAudioClient3 then we need to use the normal initialization routine. */\n        if (!wasInitializedUsingIAudioClient3) {\n            MA_REFERENCE_TIME bufferDuration = periodDurationInMicroseconds * pData->periodsOut * 10;   /* <-- Multiply by 10 for microseconds to 100-nanoseconds. */\n            hr = ma_IAudioClient_Initialize((ma_IAudioClient*)pData->pAudioClient, shareMode, streamFlags, bufferDuration, 0, (const MA_WAVEFORMATEX*)&wf, NULL);\n            if (FAILED(hr)) {\n                if (hr == E_ACCESSDENIED) {\n                    errorMsg = \"[WASAPI] Failed to initialize device. Access denied.\", result = MA_ACCESS_DENIED;\n                } else if (hr == MA_AUDCLNT_E_DEVICE_IN_USE) {\n                    errorMsg = \"[WASAPI] Failed to initialize device. Device in use.\", result = MA_BUSY;\n                } else {\n                    errorMsg = \"[WASAPI] Failed to initialize device.\", result = ma_result_from_HRESULT(hr);\n                }\n\n                goto done;\n            }\n        }\n    }\n\n    if (!wasInitializedUsingIAudioClient3) {\n        ma_uint32 bufferSizeInFrames = 0;\n        hr = ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pData->pAudioClient, &bufferSizeInFrames);\n        if (FAILED(hr)) {\n            errorMsg = \"[WASAPI] Failed to get audio client's actual buffer size.\", result = ma_result_from_HRESULT(hr);\n            goto done;\n        }\n\n        /*\n        When using process loopback mode, retrieval of the buffer size seems to result in totally\n        incorrect values. In this case we'll just assume it's the same size as what we requested\n        when we initialized the client.\n        */\n        if (usingProcessLoopback) {\n            bufferSizeInFrames = (ma_uint32)((periodDurationInMicroseconds * pData->periodsOut) * pData->sampleRateOut / 1000000);\n        }\n\n        pData->periodSizeInFramesOut = bufferSizeInFrames / pData->periodsOut;\n    }\n\n    pData->usingAudioClient3 = wasInitializedUsingIAudioClient3;\n\n\n    if (deviceType == ma_device_type_playback) {\n        result = ma_device_create_IAudioClient_service__wasapi(pContext, deviceType, (ma_IAudioClient*)pData->pAudioClient, (void**)&pData->pRenderClient);\n    } else {\n        result = ma_device_create_IAudioClient_service__wasapi(pContext, deviceType, (ma_IAudioClient*)pData->pAudioClient, (void**)&pData->pCaptureClient);\n    }\n\n    /*if (FAILED(hr)) {*/\n    if (result != MA_SUCCESS) {\n        errorMsg = \"[WASAPI] Failed to get audio client service.\";\n        goto done;\n    }\n\n\n    /* Grab the name of the device. */\n    #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    {\n        ma_IPropertyStore *pProperties;\n        hr = ma_IMMDevice_OpenPropertyStore(pDeviceInterface, STGM_READ, &pProperties);\n        if (SUCCEEDED(hr)) {\n            MA_PROPVARIANT varName;\n            ma_PropVariantInit(&varName);\n            hr = ma_IPropertyStore_GetValue(pProperties, &MA_PKEY_Device_FriendlyName, &varName);\n            if (SUCCEEDED(hr)) {\n                WideCharToMultiByte(CP_UTF8, 0, varName.pwszVal, -1, pData->deviceName, sizeof(pData->deviceName), 0, FALSE);\n                ma_PropVariantClear(pContext, &varName);\n            }\n\n            ma_IPropertyStore_Release(pProperties);\n        }\n    }\n    #endif\n\n    /*\n    For the WASAPI backend we need to know the actual IDs of the device in order to do automatic\n    stream routing so that IDs can be compared and we can determine which device has been detached\n    and whether or not it matches with our ma_device.\n    */\n    #if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    {\n        /* Desktop */\n        ma_context_get_device_id_from_MMDevice__wasapi(pContext, pDeviceInterface, &pData->id);\n    }\n    #else\n    {\n        /* UWP */\n        /* TODO: Implement me. Need to figure out how to get the ID of the default device. */\n    }\n    #endif\n\ndone:\n    /* Clean up. */\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    if (pDeviceInterface != NULL) {\n        ma_IMMDevice_Release(pDeviceInterface);\n    }\n#else\n    if (pDeviceInterface != NULL) {\n        ma_IUnknown_Release(pDeviceInterface);\n    }\n#endif\n\n    if (result != MA_SUCCESS) {\n        if (pData->pRenderClient) {\n            ma_IAudioRenderClient_Release((ma_IAudioRenderClient*)pData->pRenderClient);\n            pData->pRenderClient = NULL;\n        }\n        if (pData->pCaptureClient) {\n            ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pData->pCaptureClient);\n            pData->pCaptureClient = NULL;\n        }\n        if (pData->pAudioClient) {\n            ma_IAudioClient_Release((ma_IAudioClient*)pData->pAudioClient);\n            pData->pAudioClient = NULL;\n        }\n\n        if (errorMsg != NULL && errorMsg[0] != '\\0') {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"%s\\n\", errorMsg);\n        }\n\n        return result;\n    } else {\n        return MA_SUCCESS;\n    }\n}\n\nstatic ma_result ma_device_reinit__wasapi(ma_device* pDevice, ma_device_type deviceType)\n{\n    ma_device_init_internal_data__wasapi data;\n    ma_result result;\n\n    MA_ASSERT(pDevice != NULL);\n\n    /* We only re-initialize the playback or capture device. Never a full-duplex device. */\n    if (deviceType == ma_device_type_duplex) {\n        return MA_INVALID_ARGS;\n    }\n\n\n    /*\n    Before reinitializing the device we need to free the previous audio clients.\n\n    There's a known memory leak here. We will be calling this from the routing change callback that\n    is fired by WASAPI. If we attempt to release the IAudioClient we will deadlock. In my opinion\n    this is a bug. I'm not sure what I need to do to handle this cleanly, but I think we'll probably\n    need some system where we post an event, but delay the execution of it until the callback has\n    returned. I'm not sure how to do this reliably, however. I have set up some infrastructure for\n    a command thread which might be useful for this.\n    */\n    if (deviceType == ma_device_type_capture || deviceType == ma_device_type_loopback) {\n        if (pDevice->wasapi.pCaptureClient) {\n            ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient);\n            pDevice->wasapi.pCaptureClient = NULL;\n        }\n\n        if (pDevice->wasapi.pAudioClientCapture) {\n            /*ma_device_release_IAudioClient_service__wasapi(pDevice, ma_device_type_capture);*/\n            pDevice->wasapi.pAudioClientCapture = NULL;\n        }\n    }\n\n    if (deviceType == ma_device_type_playback) {\n        if (pDevice->wasapi.pRenderClient) {\n            ma_IAudioRenderClient_Release((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient);\n            pDevice->wasapi.pRenderClient = NULL;\n        }\n\n        if (pDevice->wasapi.pAudioClientPlayback) {\n            /*ma_device_release_IAudioClient_service__wasapi(pDevice, ma_device_type_playback);*/\n            pDevice->wasapi.pAudioClientPlayback = NULL;\n        }\n    }\n\n\n    if (deviceType == ma_device_type_playback) {\n        data.formatIn               = pDevice->playback.format;\n        data.channelsIn             = pDevice->playback.channels;\n        MA_COPY_MEMORY(data.channelMapIn, pDevice->playback.channelMap, sizeof(pDevice->playback.channelMap));\n        data.shareMode              = pDevice->playback.shareMode;\n    } else {\n        data.formatIn               = pDevice->capture.format;\n        data.channelsIn             = pDevice->capture.channels;\n        MA_COPY_MEMORY(data.channelMapIn, pDevice->capture.channelMap, sizeof(pDevice->capture.channelMap));\n        data.shareMode              = pDevice->capture.shareMode;\n    }\n\n    data.sampleRateIn               = pDevice->sampleRate;\n    data.periodSizeInFramesIn       = pDevice->wasapi.originalPeriodSizeInFrames;\n    data.periodSizeInMillisecondsIn = pDevice->wasapi.originalPeriodSizeInMilliseconds;\n    data.periodsIn                  = pDevice->wasapi.originalPeriods;\n    data.performanceProfile         = pDevice->wasapi.originalPerformanceProfile;\n    data.noAutoConvertSRC           = pDevice->wasapi.noAutoConvertSRC;\n    data.noDefaultQualitySRC        = pDevice->wasapi.noDefaultQualitySRC;\n    data.noHardwareOffloading       = pDevice->wasapi.noHardwareOffloading;\n    data.loopbackProcessID          = pDevice->wasapi.loopbackProcessID;\n    data.loopbackProcessExclude     = pDevice->wasapi.loopbackProcessExclude;\n    result = ma_device_init_internal__wasapi(pDevice->pContext, deviceType, NULL, &data);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* At this point we have some new objects ready to go. We need to uninitialize the previous ones and then set the new ones. */\n    if (deviceType == ma_device_type_capture || deviceType == ma_device_type_loopback) {\n        pDevice->wasapi.pAudioClientCapture         = data.pAudioClient;\n        pDevice->wasapi.pCaptureClient              = data.pCaptureClient;\n\n        pDevice->capture.internalFormat             = data.formatOut;\n        pDevice->capture.internalChannels           = data.channelsOut;\n        pDevice->capture.internalSampleRate         = data.sampleRateOut;\n        MA_COPY_MEMORY(pDevice->capture.internalChannelMap, data.channelMapOut, sizeof(data.channelMapOut));\n        pDevice->capture.internalPeriodSizeInFrames = data.periodSizeInFramesOut;\n        pDevice->capture.internalPeriods            = data.periodsOut;\n        ma_strcpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), data.deviceName);\n\n        ma_IAudioClient_SetEventHandle((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture, (HANDLE)pDevice->wasapi.hEventCapture);\n\n        pDevice->wasapi.periodSizeInFramesCapture = data.periodSizeInFramesOut;\n        ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture, &pDevice->wasapi.actualBufferSizeInFramesCapture);\n\n        /* We must always have a valid ID. */\n        ma_strcpy_s_WCHAR(pDevice->capture.id.wasapi, sizeof(pDevice->capture.id.wasapi), data.id.wasapi);\n    }\n\n    if (deviceType == ma_device_type_playback) {\n        pDevice->wasapi.pAudioClientPlayback         = data.pAudioClient;\n        pDevice->wasapi.pRenderClient                = data.pRenderClient;\n\n        pDevice->playback.internalFormat             = data.formatOut;\n        pDevice->playback.internalChannels           = data.channelsOut;\n        pDevice->playback.internalSampleRate         = data.sampleRateOut;\n        MA_COPY_MEMORY(pDevice->playback.internalChannelMap, data.channelMapOut, sizeof(data.channelMapOut));\n        pDevice->playback.internalPeriodSizeInFrames = data.periodSizeInFramesOut;\n        pDevice->playback.internalPeriods            = data.periodsOut;\n        ma_strcpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), data.deviceName);\n\n        ma_IAudioClient_SetEventHandle((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, (HANDLE)pDevice->wasapi.hEventPlayback);\n\n        pDevice->wasapi.periodSizeInFramesPlayback = data.periodSizeInFramesOut;\n        ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, &pDevice->wasapi.actualBufferSizeInFramesPlayback);\n\n        /* We must always have a valid ID because rerouting will look at it. */\n        ma_strcpy_s_WCHAR(pDevice->playback.id.wasapi, sizeof(pDevice->playback.id.wasapi), data.id.wasapi);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_init__wasapi(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n    ma_result result = MA_SUCCESS;\n\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    HRESULT hr;\n    ma_IMMDeviceEnumerator* pDeviceEnumerator;\n#endif\n\n    MA_ASSERT(pDevice != NULL);\n\n    MA_ZERO_OBJECT(&pDevice->wasapi);\n    pDevice->wasapi.usage                  = pConfig->wasapi.usage;\n    pDevice->wasapi.noAutoConvertSRC       = pConfig->wasapi.noAutoConvertSRC;\n    pDevice->wasapi.noDefaultQualitySRC    = pConfig->wasapi.noDefaultQualitySRC;\n    pDevice->wasapi.noHardwareOffloading   = pConfig->wasapi.noHardwareOffloading;\n    pDevice->wasapi.loopbackProcessID      = pConfig->wasapi.loopbackProcessID;\n    pDevice->wasapi.loopbackProcessExclude = pConfig->wasapi.loopbackProcessExclude;\n\n    /* Exclusive mode is not allowed with loopback. */\n    if (pConfig->deviceType == ma_device_type_loopback && pConfig->playback.shareMode == ma_share_mode_exclusive) {\n        return MA_INVALID_DEVICE_CONFIG;\n    }\n\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) {\n        ma_device_init_internal_data__wasapi data;\n        data.formatIn                   = pDescriptorCapture->format;\n        data.channelsIn                 = pDescriptorCapture->channels;\n        data.sampleRateIn               = pDescriptorCapture->sampleRate;\n        MA_COPY_MEMORY(data.channelMapIn, pDescriptorCapture->channelMap, sizeof(pDescriptorCapture->channelMap));\n        data.periodSizeInFramesIn       = pDescriptorCapture->periodSizeInFrames;\n        data.periodSizeInMillisecondsIn = pDescriptorCapture->periodSizeInMilliseconds;\n        data.periodsIn                  = pDescriptorCapture->periodCount;\n        data.shareMode                  = pDescriptorCapture->shareMode;\n        data.performanceProfile         = pConfig->performanceProfile;\n        data.noAutoConvertSRC           = pConfig->wasapi.noAutoConvertSRC;\n        data.noDefaultQualitySRC        = pConfig->wasapi.noDefaultQualitySRC;\n        data.noHardwareOffloading       = pConfig->wasapi.noHardwareOffloading;\n        data.loopbackProcessID          = pConfig->wasapi.loopbackProcessID;\n        data.loopbackProcessExclude     = pConfig->wasapi.loopbackProcessExclude;\n\n        result = ma_device_init_internal__wasapi(pDevice->pContext, (pConfig->deviceType == ma_device_type_loopback) ? ma_device_type_loopback : ma_device_type_capture, pDescriptorCapture->pDeviceID, &data);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pDevice->wasapi.pAudioClientCapture              = data.pAudioClient;\n        pDevice->wasapi.pCaptureClient                   = data.pCaptureClient;\n        pDevice->wasapi.originalPeriodSizeInMilliseconds = pDescriptorCapture->periodSizeInMilliseconds;\n        pDevice->wasapi.originalPeriodSizeInFrames       = pDescriptorCapture->periodSizeInFrames;\n        pDevice->wasapi.originalPeriods                  = pDescriptorCapture->periodCount;\n        pDevice->wasapi.originalPerformanceProfile       = pConfig->performanceProfile;\n\n        /*\n        The event for capture needs to be manual reset for the same reason as playback. We keep the initial state set to unsignaled,\n        however, because we want to block until we actually have something for the first call to ma_device_read().\n        */\n        pDevice->wasapi.hEventCapture = (ma_handle)CreateEventA(NULL, FALSE, FALSE, NULL);  /* Auto reset, unsignaled by default. */\n        if (pDevice->wasapi.hEventCapture == NULL) {\n            result = ma_result_from_GetLastError(GetLastError());\n\n            if (pDevice->wasapi.pCaptureClient != NULL) {\n                ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient);\n                pDevice->wasapi.pCaptureClient = NULL;\n            }\n            if (pDevice->wasapi.pAudioClientCapture != NULL) {\n                ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture);\n                pDevice->wasapi.pAudioClientCapture = NULL;\n            }\n\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to create event for capture.\");\n            return result;\n        }\n        ma_IAudioClient_SetEventHandle((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture, (HANDLE)pDevice->wasapi.hEventCapture);\n\n        pDevice->wasapi.periodSizeInFramesCapture = data.periodSizeInFramesOut;\n        ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture, &pDevice->wasapi.actualBufferSizeInFramesCapture);\n\n        /* We must always have a valid ID. */\n        ma_strcpy_s_WCHAR(pDevice->capture.id.wasapi, sizeof(pDevice->capture.id.wasapi), data.id.wasapi);\n\n        /* The descriptor needs to be updated with actual values. */\n        pDescriptorCapture->format             = data.formatOut;\n        pDescriptorCapture->channels           = data.channelsOut;\n        pDescriptorCapture->sampleRate         = data.sampleRateOut;\n        MA_COPY_MEMORY(pDescriptorCapture->channelMap, data.channelMapOut, sizeof(data.channelMapOut));\n        pDescriptorCapture->periodSizeInFrames = data.periodSizeInFramesOut;\n        pDescriptorCapture->periodCount        = data.periodsOut;\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        ma_device_init_internal_data__wasapi data;\n        data.formatIn                   = pDescriptorPlayback->format;\n        data.channelsIn                 = pDescriptorPlayback->channels;\n        data.sampleRateIn               = pDescriptorPlayback->sampleRate;\n        MA_COPY_MEMORY(data.channelMapIn, pDescriptorPlayback->channelMap, sizeof(pDescriptorPlayback->channelMap));\n        data.periodSizeInFramesIn       = pDescriptorPlayback->periodSizeInFrames;\n        data.periodSizeInMillisecondsIn = pDescriptorPlayback->periodSizeInMilliseconds;\n        data.periodsIn                  = pDescriptorPlayback->periodCount;\n        data.shareMode                  = pDescriptorPlayback->shareMode;\n        data.performanceProfile         = pConfig->performanceProfile;\n        data.noAutoConvertSRC           = pConfig->wasapi.noAutoConvertSRC;\n        data.noDefaultQualitySRC        = pConfig->wasapi.noDefaultQualitySRC;\n        data.noHardwareOffloading       = pConfig->wasapi.noHardwareOffloading;\n        data.loopbackProcessID          = pConfig->wasapi.loopbackProcessID;\n        data.loopbackProcessExclude     = pConfig->wasapi.loopbackProcessExclude;\n\n        result = ma_device_init_internal__wasapi(pDevice->pContext, ma_device_type_playback, pDescriptorPlayback->pDeviceID, &data);\n        if (result != MA_SUCCESS) {\n            if (pConfig->deviceType == ma_device_type_duplex) {\n                if (pDevice->wasapi.pCaptureClient != NULL) {\n                    ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient);\n                    pDevice->wasapi.pCaptureClient = NULL;\n                }\n                if (pDevice->wasapi.pAudioClientCapture != NULL) {\n                    ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture);\n                    pDevice->wasapi.pAudioClientCapture = NULL;\n                }\n\n                CloseHandle((HANDLE)pDevice->wasapi.hEventCapture);\n                pDevice->wasapi.hEventCapture = NULL;\n            }\n            return result;\n        }\n\n        pDevice->wasapi.pAudioClientPlayback             = data.pAudioClient;\n        pDevice->wasapi.pRenderClient                    = data.pRenderClient;\n        pDevice->wasapi.originalPeriodSizeInMilliseconds = pDescriptorPlayback->periodSizeInMilliseconds;\n        pDevice->wasapi.originalPeriodSizeInFrames       = pDescriptorPlayback->periodSizeInFrames;\n        pDevice->wasapi.originalPeriods                  = pDescriptorPlayback->periodCount;\n        pDevice->wasapi.originalPerformanceProfile       = pConfig->performanceProfile;\n\n        /*\n        The event for playback is needs to be manual reset because we want to explicitly control the fact that it becomes signalled\n        only after the whole available space has been filled, never before.\n\n        The playback event also needs to be initially set to a signaled state so that the first call to ma_device_write() is able\n        to get passed WaitForMultipleObjects().\n        */\n        pDevice->wasapi.hEventPlayback = (ma_handle)CreateEventA(NULL, FALSE, TRUE, NULL);  /* Auto reset, signaled by default. */\n        if (pDevice->wasapi.hEventPlayback == NULL) {\n            result = ma_result_from_GetLastError(GetLastError());\n\n            if (pConfig->deviceType == ma_device_type_duplex) {\n                if (pDevice->wasapi.pCaptureClient != NULL) {\n                    ma_IAudioCaptureClient_Release((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient);\n                    pDevice->wasapi.pCaptureClient = NULL;\n                }\n                if (pDevice->wasapi.pAudioClientCapture != NULL) {\n                    ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture);\n                    pDevice->wasapi.pAudioClientCapture = NULL;\n                }\n\n                CloseHandle((HANDLE)pDevice->wasapi.hEventCapture);\n                pDevice->wasapi.hEventCapture = NULL;\n            }\n\n            if (pDevice->wasapi.pRenderClient != NULL) {\n                ma_IAudioRenderClient_Release((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient);\n                pDevice->wasapi.pRenderClient = NULL;\n            }\n            if (pDevice->wasapi.pAudioClientPlayback != NULL) {\n                ma_IAudioClient_Release((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback);\n                pDevice->wasapi.pAudioClientPlayback = NULL;\n            }\n\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to create event for playback.\");\n            return result;\n        }\n        ma_IAudioClient_SetEventHandle((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, (HANDLE)pDevice->wasapi.hEventPlayback);\n\n        pDevice->wasapi.periodSizeInFramesPlayback = data.periodSizeInFramesOut;\n        ma_IAudioClient_GetBufferSize((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, &pDevice->wasapi.actualBufferSizeInFramesPlayback);\n\n        /* We must always have a valid ID because rerouting will look at it. */\n        ma_strcpy_s_WCHAR(pDevice->playback.id.wasapi, sizeof(pDevice->playback.id.wasapi), data.id.wasapi);\n\n        /* The descriptor needs to be updated with actual values. */\n        pDescriptorPlayback->format             = data.formatOut;\n        pDescriptorPlayback->channels           = data.channelsOut;\n        pDescriptorPlayback->sampleRate         = data.sampleRateOut;\n        MA_COPY_MEMORY(pDescriptorPlayback->channelMap, data.channelMapOut, sizeof(data.channelMapOut));\n        pDescriptorPlayback->periodSizeInFrames = data.periodSizeInFramesOut;\n        pDescriptorPlayback->periodCount        = data.periodsOut;\n    }\n\n    /*\n    We need to register a notification client to detect when the device has been disabled, unplugged or re-routed (when the default device changes). When\n    we are connecting to the default device we want to do automatic stream routing when the device is disabled or unplugged. Otherwise we want to just\n    stop the device outright and let the application handle it.\n    */\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    if (pConfig->wasapi.noAutoStreamRouting == MA_FALSE) {\n        if ((pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) && pConfig->capture.pDeviceID == NULL) {\n            pDevice->wasapi.allowCaptureAutoStreamRouting = MA_TRUE;\n        }\n        if ((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pConfig->playback.pDeviceID == NULL) {\n            pDevice->wasapi.allowPlaybackAutoStreamRouting = MA_TRUE;\n        }\n    }\n\n    ma_mutex_init(&pDevice->wasapi.rerouteLock);\n\n    hr = ma_CoCreateInstance(pDevice->pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);\n    if (FAILED(hr)) {\n        ma_device_uninit__wasapi(pDevice);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to create device enumerator.\");\n        return ma_result_from_HRESULT(hr);\n    }\n\n    pDevice->wasapi.notificationClient.lpVtbl  = (void*)&g_maNotificationCientVtbl;\n    pDevice->wasapi.notificationClient.counter = 1;\n    pDevice->wasapi.notificationClient.pDevice = pDevice;\n\n    hr = pDeviceEnumerator->lpVtbl->RegisterEndpointNotificationCallback(pDeviceEnumerator, &pDevice->wasapi.notificationClient);\n    if (SUCCEEDED(hr)) {\n        pDevice->wasapi.pDeviceEnumerator = (ma_ptr)pDeviceEnumerator;\n    } else {\n        /* Not the end of the world if we fail to register the notification callback. We just won't support automatic stream routing. */\n        ma_IMMDeviceEnumerator_Release(pDeviceEnumerator);\n    }\n#endif\n\n    ma_atomic_bool32_set(&pDevice->wasapi.isStartedCapture,  MA_FALSE);\n    ma_atomic_bool32_set(&pDevice->wasapi.isStartedPlayback, MA_FALSE);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device__get_available_frames__wasapi(ma_device* pDevice, ma_IAudioClient* pAudioClient, ma_uint32* pFrameCount)\n{\n    ma_uint32 paddingFramesCount;\n    HRESULT hr;\n    ma_share_mode shareMode;\n\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(pFrameCount != NULL);\n\n    *pFrameCount = 0;\n\n    if ((ma_ptr)pAudioClient != pDevice->wasapi.pAudioClientPlayback && (ma_ptr)pAudioClient != pDevice->wasapi.pAudioClientCapture) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /*\n    I've had a report that GetCurrentPadding() is returning a frame count of 0 which is preventing\n    higher level function calls from doing anything because it thinks nothing is available. I have\n    taken a look at the documentation and it looks like this is unnecessary in exclusive mode.\n\n    From Microsoft's documentation:\n\n        For an exclusive-mode rendering or capture stream that was initialized with the\n        AUDCLNT_STREAMFLAGS_EVENTCALLBACK flag, the client typically has no use for the padding\n        value reported by GetCurrentPadding. Instead, the client accesses an entire buffer during\n        each processing pass.\n\n    Considering this, I'm going to skip GetCurrentPadding() for exclusive mode and just report the\n    entire buffer. This depends on the caller making sure they wait on the event handler.\n    */\n    shareMode = ((ma_ptr)pAudioClient == pDevice->wasapi.pAudioClientPlayback) ? pDevice->playback.shareMode : pDevice->capture.shareMode;\n    if (shareMode == ma_share_mode_shared) {\n        /* Shared mode. */\n        hr = ma_IAudioClient_GetCurrentPadding(pAudioClient, &paddingFramesCount);\n        if (FAILED(hr)) {\n            return ma_result_from_HRESULT(hr);\n        }\n\n        if ((ma_ptr)pAudioClient == pDevice->wasapi.pAudioClientPlayback) {\n            *pFrameCount = pDevice->wasapi.actualBufferSizeInFramesPlayback - paddingFramesCount;\n        } else {\n            *pFrameCount = paddingFramesCount;\n        }\n    } else {\n        /* Exclusive mode. */\n        if ((ma_ptr)pAudioClient == pDevice->wasapi.pAudioClientPlayback) {\n            *pFrameCount = pDevice->wasapi.actualBufferSizeInFramesPlayback;\n        } else {\n            *pFrameCount = pDevice->wasapi.actualBufferSizeInFramesCapture;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_device_reroute__wasapi(ma_device* pDevice, ma_device_type deviceType)\n{\n    ma_result result;\n\n    if (deviceType == ma_device_type_duplex) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"=== CHANGING DEVICE ===\\n\");\n\n    result = ma_device_reinit__wasapi(pDevice, deviceType);\n    if (result != MA_SUCCESS) {\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, \"[WASAPI] Reinitializing device after route change failed.\\n\");\n        return result;\n    }\n\n    ma_device__post_init_setup(pDevice, deviceType);\n    ma_device__on_notification_rerouted(pDevice);\n\n    ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"=== DEVICE CHANGED ===\\n\");\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_start__wasapi_nolock(ma_device* pDevice)\n{\n    HRESULT hr;\n\n    if (pDevice->pContext->wasapi.hAvrt) {\n        const char* pTaskName = ma_to_usage_string__wasapi(pDevice->wasapi.usage);\n        if (pTaskName) {\n            DWORD idx = 0;\n            pDevice->wasapi.hAvrtHandle = (ma_handle)((MA_PFN_AvSetMmThreadCharacteristicsA)pDevice->pContext->wasapi.AvSetMmThreadCharacteristicsA)(pTaskName, &idx);\n        }\n    }\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) {\n        hr = ma_IAudioClient_Start((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture);\n        if (FAILED(hr)) {\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to start internal capture device. HRESULT = %d.\", (int)hr);\n            return ma_result_from_HRESULT(hr);\n        }\n\n        ma_atomic_bool32_set(&pDevice->wasapi.isStartedCapture, MA_TRUE);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        hr = ma_IAudioClient_Start((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback);\n        if (FAILED(hr)) {\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to start internal playback device. HRESULT = %d.\", (int)hr);\n            return ma_result_from_HRESULT(hr);\n        }\n\n        ma_atomic_bool32_set(&pDevice->wasapi.isStartedPlayback, MA_TRUE);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_start__wasapi(ma_device* pDevice)\n{\n    ma_result result;\n\n    MA_ASSERT(pDevice != NULL);\n\n    /* Wait for any rerouting to finish before attempting to start the device. */\n    ma_mutex_lock(&pDevice->wasapi.rerouteLock);\n    {\n        result = ma_device_start__wasapi_nolock(pDevice);\n    }\n    ma_mutex_unlock(&pDevice->wasapi.rerouteLock);\n\n    return result;\n}\n\nstatic ma_result ma_device_stop__wasapi_nolock(ma_device* pDevice)\n{\n    ma_result result;\n    HRESULT hr;\n\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->wasapi.hAvrtHandle) {\n        ((MA_PFN_AvRevertMmThreadCharacteristics)pDevice->pContext->wasapi.AvRevertMmThreadcharacteristics)((HANDLE)pDevice->wasapi.hAvrtHandle);\n        pDevice->wasapi.hAvrtHandle = NULL;\n    }\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) {\n        hr = ma_IAudioClient_Stop((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture);\n        if (FAILED(hr)) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to stop internal capture device.\");\n            return ma_result_from_HRESULT(hr);\n        }\n\n        /* The audio client needs to be reset otherwise restarting will fail. */\n        hr = ma_IAudioClient_Reset((ma_IAudioClient*)pDevice->wasapi.pAudioClientCapture);\n        if (FAILED(hr)) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to reset internal capture device.\");\n            return ma_result_from_HRESULT(hr);\n        }\n\n        /* If we have a mapped buffer we need to release it. */\n        if (pDevice->wasapi.pMappedBufferCapture != NULL) {\n            ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap);\n            pDevice->wasapi.pMappedBufferCapture = NULL;\n            pDevice->wasapi.mappedBufferCaptureCap = 0;\n            pDevice->wasapi.mappedBufferCaptureLen = 0;\n        }\n\n        ma_atomic_bool32_set(&pDevice->wasapi.isStartedCapture, MA_FALSE);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        /*\n        The buffer needs to be drained before stopping the device. Not doing this will result in the last few frames not getting output to\n        the speakers. This is a problem for very short sounds because it'll result in a significant portion of it not getting played.\n        */\n        if (ma_atomic_bool32_get(&pDevice->wasapi.isStartedPlayback)) {\n            /* We need to make sure we put a timeout here or else we'll risk getting stuck in a deadlock in some cases. */\n            DWORD waitTime = pDevice->wasapi.actualBufferSizeInFramesPlayback / pDevice->playback.internalSampleRate;\n\n            if (pDevice->playback.shareMode == ma_share_mode_exclusive) {\n                WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, waitTime);\n            }\n            else {\n                ma_uint32 prevFramesAvaialablePlayback = (ma_uint32)-1;\n                ma_uint32 framesAvailablePlayback;\n                for (;;) {\n                    result = ma_device__get_available_frames__wasapi(pDevice, (ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback, &framesAvailablePlayback);\n                    if (result != MA_SUCCESS) {\n                        break;\n                    }\n\n                    if (framesAvailablePlayback >= pDevice->wasapi.actualBufferSizeInFramesPlayback) {\n                        break;\n                    }\n\n                    /*\n                    Just a safety check to avoid an infinite loop. If this iteration results in a situation where the number of available frames\n                    has not changed, get out of the loop. I don't think this should ever happen, but I think it's nice to have just in case.\n                    */\n                    if (framesAvailablePlayback == prevFramesAvaialablePlayback) {\n                        break;\n                    }\n                    prevFramesAvaialablePlayback = framesAvailablePlayback;\n\n                    WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, waitTime * 1000);\n                    ResetEvent((HANDLE)pDevice->wasapi.hEventPlayback); /* Manual reset. */\n                }\n            }\n        }\n\n        hr = ma_IAudioClient_Stop((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback);\n        if (FAILED(hr)) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to stop internal playback device.\");\n            return ma_result_from_HRESULT(hr);\n        }\n\n        /* The audio client needs to be reset otherwise restarting will fail. */\n        hr = ma_IAudioClient_Reset((ma_IAudioClient*)pDevice->wasapi.pAudioClientPlayback);\n        if (FAILED(hr)) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to reset internal playback device.\");\n            return ma_result_from_HRESULT(hr);\n        }\n\n        if (pDevice->wasapi.pMappedBufferPlayback != NULL) {\n            ma_IAudioRenderClient_ReleaseBuffer((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient, pDevice->wasapi.mappedBufferPlaybackCap, 0);\n            pDevice->wasapi.pMappedBufferPlayback = NULL;\n            pDevice->wasapi.mappedBufferPlaybackCap = 0;\n            pDevice->wasapi.mappedBufferPlaybackLen = 0;\n        }\n\n        ma_atomic_bool32_set(&pDevice->wasapi.isStartedPlayback, MA_FALSE);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop__wasapi(ma_device* pDevice)\n{\n    ma_result result;\n\n    MA_ASSERT(pDevice != NULL);\n\n    /* Wait for any rerouting to finish before attempting to stop the device. */\n    ma_mutex_lock(&pDevice->wasapi.rerouteLock);\n    {\n        result = ma_device_stop__wasapi_nolock(pDevice);\n    }\n    ma_mutex_unlock(&pDevice->wasapi.rerouteLock);\n\n    return result;\n}\n\n\n#ifndef MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS\n#define MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS 5000\n#endif\n\nstatic ma_result ma_device_read__wasapi(ma_device* pDevice, void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesRead)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint32 totalFramesProcessed = 0;\n\n    /*\n    When reading, we need to get a buffer and process all of it before releasing it. Because the\n    frame count (frameCount) can be different to the size of the buffer, we'll need to cache the\n    pointer to the buffer.\n    */\n\n    /* Keep running until we've processed the requested number of frames. */\n    while (ma_device_get_state(pDevice) == ma_device_state_started && totalFramesProcessed < frameCount) {\n        ma_uint32 framesRemaining = frameCount - totalFramesProcessed;\n\n        /* If we have a mapped data buffer, consume that first. */\n        if (pDevice->wasapi.pMappedBufferCapture != NULL) {\n            /* We have a cached data pointer so consume that before grabbing another one from WASAPI. */\n            ma_uint32 framesToProcessNow = framesRemaining;\n            if (framesToProcessNow > pDevice->wasapi.mappedBufferCaptureLen) {\n                framesToProcessNow = pDevice->wasapi.mappedBufferCaptureLen;\n            }\n\n            /* Now just copy the data over to the output buffer. */\n            ma_copy_pcm_frames(\n                ma_offset_pcm_frames_ptr(pFrames, totalFramesProcessed, pDevice->capture.internalFormat, pDevice->capture.internalChannels),\n                ma_offset_pcm_frames_const_ptr(pDevice->wasapi.pMappedBufferCapture, pDevice->wasapi.mappedBufferCaptureCap - pDevice->wasapi.mappedBufferCaptureLen, pDevice->capture.internalFormat, pDevice->capture.internalChannels),\n                framesToProcessNow,\n                pDevice->capture.internalFormat, pDevice->capture.internalChannels\n            );\n\n            totalFramesProcessed                   += framesToProcessNow;\n            pDevice->wasapi.mappedBufferCaptureLen -= framesToProcessNow;\n\n            /* If the data buffer has been fully consumed we need to release it. */\n            if (pDevice->wasapi.mappedBufferCaptureLen == 0) {\n                ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap);\n                pDevice->wasapi.pMappedBufferCapture   = NULL;\n                pDevice->wasapi.mappedBufferCaptureCap = 0;\n            }\n        } else {\n            /* We don't have any cached data pointer, so grab another one. */\n            HRESULT hr;\n            DWORD flags = 0;\n\n            /* First just ask WASAPI for a data buffer. If it's not available, we'll wait for more. */\n            hr = ma_IAudioCaptureClient_GetBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, (BYTE**)&pDevice->wasapi.pMappedBufferCapture, &pDevice->wasapi.mappedBufferCaptureCap, &flags, NULL, NULL);\n            if (hr == S_OK) {\n                /* We got a data buffer. Continue to the next loop iteration which will then read from the mapped pointer. */\n                pDevice->wasapi.mappedBufferCaptureLen = pDevice->wasapi.mappedBufferCaptureCap;\n\n                /*\n                There have been reports that indicate that at times the AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY is reported for every\n                call to IAudioCaptureClient_GetBuffer() above which results in spamming of the debug messages below. To partially\n                work around this, I'm only outputting these messages when MA_DEBUG_OUTPUT is explicitly defined. The better solution\n                would be to figure out why the flag is always getting reported.\n                */\n                #if defined(MA_DEBUG_OUTPUT)\n                {\n                    if (flags != 0) {\n                        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Capture Flags: %ld\\n\", flags);\n\n                        if ((flags & MA_AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY) != 0) {\n                            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Data discontinuity (possible overrun). Attempting recovery. mappedBufferCaptureCap=%d\\n\", pDevice->wasapi.mappedBufferCaptureCap);\n                        }\n                    }\n                }\n                #endif\n\n                /* Overrun detection. */\n                if ((flags & MA_AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY) != 0) {\n                    /* Glitched. Probably due to an overrun. */\n\n                    /*\n                    If we got an overrun it probably means we're straddling the end of the buffer. In normal capture\n                    mode this is the fault of the client application because they're responsible for ensuring data is\n                    processed fast enough. In duplex mode, however, the processing of audio is tied to the playback\n                    device, so this can possibly be the result of a timing de-sync.\n\n                    In capture mode we're not going to do any kind of recovery because the real fix is for the client\n                    application to process faster. In duplex mode, we'll treat this as a desync and reset the buffers\n                    to prevent a never-ending sequence of glitches due to straddling the end of the buffer.\n                    */\n                    if (pDevice->type == ma_device_type_duplex) {\n                        /*\n                        Experiment:\n\n                        If we empty out the *entire* buffer we may end up putting ourselves into an underrun position\n                        which isn't really any better than the overrun we're probably in right now. Instead we'll just\n                        empty out about half.\n                        */\n                        ma_uint32 i;\n                        ma_uint32 periodCount = (pDevice->wasapi.actualBufferSizeInFramesCapture / pDevice->wasapi.periodSizeInFramesCapture);\n                        ma_uint32 iterationCount = periodCount / 2;\n                        if ((periodCount % 2) > 0) {\n                            iterationCount += 1;\n                        }\n\n                        for (i = 0; i < iterationCount; i += 1) {\n                            hr = ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap);\n                            if (FAILED(hr)) {\n                                ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Data discontinuity recovery: IAudioCaptureClient_ReleaseBuffer() failed with %ld.\\n\", hr);\n                                break;\n                            }\n\n                            flags = 0;\n                            hr = ma_IAudioCaptureClient_GetBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, (BYTE**)&pDevice->wasapi.pMappedBufferCapture, &pDevice->wasapi.mappedBufferCaptureCap, &flags, NULL, NULL);\n                            if (hr == MA_AUDCLNT_S_BUFFER_EMPTY || FAILED(hr)) {\n                                /*\n                                The buffer has been completely emptied or an error occurred. In this case we'll need\n                                to reset the state of the mapped buffer which will trigger the next iteration to get\n                                a fresh buffer from WASAPI.\n                                */\n                                pDevice->wasapi.pMappedBufferCapture   = NULL;\n                                pDevice->wasapi.mappedBufferCaptureCap = 0;\n                                pDevice->wasapi.mappedBufferCaptureLen = 0;\n\n                                if (hr == MA_AUDCLNT_S_BUFFER_EMPTY) {\n                                    if ((flags & MA_AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY) != 0) {\n                                        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Data discontinuity recovery: Buffer emptied, and data discontinuity still reported.\\n\");\n                                    } else {\n                                        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Data discontinuity recovery: Buffer emptied.\\n\");\n                                    }\n                                }\n\n                                if (FAILED(hr)) {\n                                    ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[WASAPI] Data discontinuity recovery: IAudioCaptureClient_GetBuffer() failed with %ld.\\n\", hr);\n                                }\n\n                                break;\n                            }\n                        }\n\n                        /* If at this point we have a valid buffer mapped, make sure the buffer length is set appropriately. */\n                        if (pDevice->wasapi.pMappedBufferCapture != NULL) {\n                            pDevice->wasapi.mappedBufferCaptureLen = pDevice->wasapi.mappedBufferCaptureCap;\n                        }\n                    }\n                }\n\n                continue;\n            } else {\n                if (hr == MA_AUDCLNT_S_BUFFER_EMPTY || hr == MA_AUDCLNT_E_BUFFER_ERROR) {\n                    /*\n                    No data is available. We need to wait for more. There's two situations to consider\n                    here. The first is normal capture mode. If this times out it probably means the\n                    microphone isn't delivering data for whatever reason. In this case we'll just\n                    abort the read and return whatever we were able to get. The other situations is\n                    loopback mode, in which case a timeout probably just means the nothing is playing\n                    through the speakers.\n                    */\n\n                    /* Experiment: Use a shorter timeout for loopback mode. */\n                    DWORD timeoutInMilliseconds = MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS;\n                    if (pDevice->type == ma_device_type_loopback) {\n                        timeoutInMilliseconds = 10;\n                    }\n\n                    if (WaitForSingleObject((HANDLE)pDevice->wasapi.hEventCapture, timeoutInMilliseconds) != WAIT_OBJECT_0) {\n                        if (pDevice->type == ma_device_type_loopback) {\n                            continue;   /* Keep waiting in loopback mode. */\n                        } else {\n                            result = MA_ERROR;\n                            break;      /* Wait failed. */\n                        }\n                    }\n\n                    /* At this point we should be able to loop back to the start of the loop and try retrieving a data buffer again. */\n                } else {\n                    /* An error occurred and we need to abort. */\n                    ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to retrieve internal buffer from capture device in preparation for reading from the device. HRESULT = %d. Stopping device.\\n\", (int)hr);\n                    result = ma_result_from_HRESULT(hr);\n                    break;\n                }\n            }\n        }\n    }\n\n    /*\n    If we were unable to process the entire requested frame count, but we still have a mapped buffer,\n    there's a good chance either an error occurred or the device was stopped mid-read. In this case\n    we'll need to make sure the buffer is released.\n    */\n    if (totalFramesProcessed < frameCount && pDevice->wasapi.pMappedBufferCapture != NULL) {\n        ma_IAudioCaptureClient_ReleaseBuffer((ma_IAudioCaptureClient*)pDevice->wasapi.pCaptureClient, pDevice->wasapi.mappedBufferCaptureCap);\n        pDevice->wasapi.pMappedBufferCapture   = NULL;\n        pDevice->wasapi.mappedBufferCaptureCap = 0;\n        pDevice->wasapi.mappedBufferCaptureLen = 0;\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = totalFramesProcessed;\n    }\n\n    return result;\n}\n\nstatic ma_result ma_device_write__wasapi(ma_device* pDevice, const void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint32 totalFramesProcessed = 0;\n\n    /* Keep writing to the device until it's stopped or we've consumed all of our input. */\n    while (ma_device_get_state(pDevice) == ma_device_state_started && totalFramesProcessed < frameCount) {\n        ma_uint32 framesRemaining = frameCount - totalFramesProcessed;\n\n        /*\n        We're going to do this in a similar way to capture. We'll first check if the cached data pointer\n        is valid, and if so, read from that. Otherwise We will call IAudioRenderClient_GetBuffer() with\n        a requested buffer size equal to our actual period size. If it returns AUDCLNT_E_BUFFER_TOO_LARGE\n        it means we need to wait for some data to become available.\n        */\n        if (pDevice->wasapi.pMappedBufferPlayback != NULL) {\n            /* We still have some space available in the mapped data buffer. Write to it. */\n            ma_uint32 framesToProcessNow = framesRemaining;\n            if (framesToProcessNow > (pDevice->wasapi.mappedBufferPlaybackCap - pDevice->wasapi.mappedBufferPlaybackLen)) {\n                framesToProcessNow = (pDevice->wasapi.mappedBufferPlaybackCap - pDevice->wasapi.mappedBufferPlaybackLen);\n            }\n\n            /* Now just copy the data over to the output buffer. */\n            ma_copy_pcm_frames(\n                ma_offset_pcm_frames_ptr(pDevice->wasapi.pMappedBufferPlayback, pDevice->wasapi.mappedBufferPlaybackLen, pDevice->playback.internalFormat, pDevice->playback.internalChannels),\n                ma_offset_pcm_frames_const_ptr(pFrames, totalFramesProcessed, pDevice->playback.internalFormat, pDevice->playback.internalChannels),\n                framesToProcessNow,\n                pDevice->playback.internalFormat, pDevice->playback.internalChannels\n            );\n\n            totalFramesProcessed                    += framesToProcessNow;\n            pDevice->wasapi.mappedBufferPlaybackLen += framesToProcessNow;\n\n            /* If the data buffer has been fully consumed we need to release it. */\n            if (pDevice->wasapi.mappedBufferPlaybackLen == pDevice->wasapi.mappedBufferPlaybackCap) {\n                ma_IAudioRenderClient_ReleaseBuffer((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient, pDevice->wasapi.mappedBufferPlaybackCap, 0);\n                pDevice->wasapi.pMappedBufferPlayback   = NULL;\n                pDevice->wasapi.mappedBufferPlaybackCap = 0;\n                pDevice->wasapi.mappedBufferPlaybackLen = 0;\n\n                /*\n                In exclusive mode we need to wait here. Exclusive mode is weird because GetBuffer() never\n                seems to return AUDCLNT_E_BUFFER_TOO_LARGE, which is what we normally use to determine\n                whether or not we need to wait for more data.\n                */\n                if (pDevice->playback.shareMode == ma_share_mode_exclusive) {\n                    if (WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS) != WAIT_OBJECT_0) {\n                        result = MA_ERROR;\n                        break;   /* Wait failed. Probably timed out. */\n                    }\n                }\n            }\n        } else {\n            /* We don't have a mapped data buffer so we'll need to get one. */\n            HRESULT hr;\n            ma_uint32 bufferSizeInFrames;\n\n            /* Special rules for exclusive mode. */\n            if (pDevice->playback.shareMode == ma_share_mode_exclusive) {\n                bufferSizeInFrames = pDevice->wasapi.actualBufferSizeInFramesPlayback;\n            } else {\n                bufferSizeInFrames = pDevice->wasapi.periodSizeInFramesPlayback;\n            }\n\n            hr = ma_IAudioRenderClient_GetBuffer((ma_IAudioRenderClient*)pDevice->wasapi.pRenderClient, bufferSizeInFrames, (BYTE**)&pDevice->wasapi.pMappedBufferPlayback);\n            if (hr == S_OK) {\n                /* We have data available. */\n                pDevice->wasapi.mappedBufferPlaybackCap = bufferSizeInFrames;\n                pDevice->wasapi.mappedBufferPlaybackLen = 0;\n            } else {\n                if (hr == MA_AUDCLNT_E_BUFFER_TOO_LARGE || hr == MA_AUDCLNT_E_BUFFER_ERROR) {\n                    /* Not enough data available. We need to wait for more. */\n                    if (WaitForSingleObject((HANDLE)pDevice->wasapi.hEventPlayback, MA_WASAPI_WAIT_TIMEOUT_MILLISECONDS) != WAIT_OBJECT_0) {\n                        result = MA_ERROR;\n                        break;   /* Wait failed. Probably timed out. */\n                    }\n                } else {\n                    /* Some error occurred. We'll need to abort. */\n                    ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WASAPI] Failed to retrieve internal buffer from playback device in preparation for writing to the device. HRESULT = %d. Stopping device.\\n\", (int)hr);\n                    result = ma_result_from_HRESULT(hr);\n                    break;\n                }\n            }\n        }\n    }\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = totalFramesProcessed;\n    }\n\n    return result;\n}\n\nstatic ma_result ma_device_data_loop_wakeup__wasapi(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) {\n        SetEvent((HANDLE)pDevice->wasapi.hEventCapture);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        SetEvent((HANDLE)pDevice->wasapi.hEventPlayback);\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_context_uninit__wasapi(ma_context* pContext)\n{\n    ma_context_command__wasapi cmd = ma_context_init_command__wasapi(MA_CONTEXT_COMMAND_QUIT__WASAPI);\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_wasapi);\n\n    ma_context_post_command__wasapi(pContext, &cmd);\n    ma_thread_wait(&pContext->wasapi.commandThread);\n\n    if (pContext->wasapi.hAvrt) {\n        ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hAvrt);\n        pContext->wasapi.hAvrt = NULL;\n    }\n\n    #if defined(MA_WIN32_UWP)\n    {\n        if (pContext->wasapi.hMMDevapi) {\n            ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hMMDevapi);\n            pContext->wasapi.hMMDevapi = NULL;\n        }\n    }\n    #endif\n\n    /* Only after the thread has been terminated can we uninitialize the sync objects for the command thread. */\n    ma_semaphore_uninit(&pContext->wasapi.commandSem);\n    ma_mutex_uninit(&pContext->wasapi.commandLock);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init__wasapi(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n    ma_result result = MA_SUCCESS;\n\n    MA_ASSERT(pContext != NULL);\n\n    (void)pConfig;\n\n#ifdef MA_WIN32_DESKTOP\n    /*\n    WASAPI is only supported in Vista SP1 and newer. The reason for SP1 and not the base version of Vista is that event-driven\n    exclusive mode does not work until SP1.\n\n    Unfortunately older compilers don't define these functions so we need to dynamically load them in order to avoid a link error.\n    */\n    {\n        ma_OSVERSIONINFOEXW osvi;\n        ma_handle kernel32DLL;\n        ma_PFNVerifyVersionInfoW _VerifyVersionInfoW;\n        ma_PFNVerSetConditionMask _VerSetConditionMask;\n\n        kernel32DLL = ma_dlopen(ma_context_get_log(pContext), \"kernel32.dll\");\n        if (kernel32DLL == NULL) {\n            return MA_NO_BACKEND;\n        }\n\n        _VerifyVersionInfoW  = (ma_PFNVerifyVersionInfoW )ma_dlsym(ma_context_get_log(pContext), kernel32DLL, \"VerifyVersionInfoW\");\n        _VerSetConditionMask = (ma_PFNVerSetConditionMask)ma_dlsym(ma_context_get_log(pContext), kernel32DLL, \"VerSetConditionMask\");\n        if (_VerifyVersionInfoW == NULL || _VerSetConditionMask == NULL) {\n            ma_dlclose(ma_context_get_log(pContext), kernel32DLL);\n            return MA_NO_BACKEND;\n        }\n\n        MA_ZERO_OBJECT(&osvi);\n        osvi.dwOSVersionInfoSize = sizeof(osvi);\n        osvi.dwMajorVersion = ((MA_WIN32_WINNT_VISTA >> 8) & 0xFF);\n        osvi.dwMinorVersion = ((MA_WIN32_WINNT_VISTA >> 0) & 0xFF);\n        osvi.wServicePackMajor = 1;\n        if (_VerifyVersionInfoW(&osvi, MA_VER_MAJORVERSION | MA_VER_MINORVERSION | MA_VER_SERVICEPACKMAJOR, _VerSetConditionMask(_VerSetConditionMask(_VerSetConditionMask(0, MA_VER_MAJORVERSION, MA_VER_GREATER_EQUAL), MA_VER_MINORVERSION, MA_VER_GREATER_EQUAL), MA_VER_SERVICEPACKMAJOR, MA_VER_GREATER_EQUAL))) {\n            result = MA_SUCCESS;\n        } else {\n            result = MA_NO_BACKEND;\n        }\n\n        ma_dlclose(ma_context_get_log(pContext), kernel32DLL);\n    }\n#endif\n\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    MA_ZERO_OBJECT(&pContext->wasapi);\n\n\n    #if defined(MA_WIN32_UWP)\n    {\n        /* Link to mmdevapi so we can get access to ActivateAudioInterfaceAsync(). */\n        pContext->wasapi.hMMDevapi = ma_dlopen(ma_context_get_log(pContext), \"mmdevapi.dll\");\n        if (pContext->wasapi.hMMDevapi) {\n            pContext->wasapi.ActivateAudioInterfaceAsync = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hMMDevapi, \"ActivateAudioInterfaceAsync\");\n            if (pContext->wasapi.ActivateAudioInterfaceAsync == NULL) {\n                ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hMMDevapi);\n                return MA_NO_BACKEND;   /* ActivateAudioInterfaceAsync() could not be loaded. */\n            }\n        } else {\n            return MA_NO_BACKEND;   /* Failed to load mmdevapi.dll which is required for ActivateAudioInterfaceAsync() */\n        }\n    }\n    #endif\n\n    /* Optionally use the Avrt API to specify the audio thread's latency sensitivity requirements */\n    pContext->wasapi.hAvrt = ma_dlopen(ma_context_get_log(pContext), \"avrt.dll\");\n    if (pContext->wasapi.hAvrt) {\n        pContext->wasapi.AvSetMmThreadCharacteristicsA   = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hAvrt, \"AvSetMmThreadCharacteristicsA\");\n        pContext->wasapi.AvRevertMmThreadcharacteristics = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hAvrt, \"AvRevertMmThreadCharacteristics\");\n\n        /* If either function could not be found, disable use of avrt entirely. */\n        if (!pContext->wasapi.AvSetMmThreadCharacteristicsA || !pContext->wasapi.AvRevertMmThreadcharacteristics) {\n            pContext->wasapi.AvSetMmThreadCharacteristicsA   = NULL;\n            pContext->wasapi.AvRevertMmThreadcharacteristics = NULL;\n            ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hAvrt);\n            pContext->wasapi.hAvrt = NULL;\n        }\n    }\n\n\n    /*\n    Annoyingly, WASAPI does not allow you to release an IAudioClient object from a different thread\n    than the one that retrieved it with GetService(). This can result in a deadlock in two\n    situations:\n\n        1) When calling ma_device_uninit() from a different thread to ma_device_init(); and\n        2) When uninitializing and reinitializing the internal IAudioClient object in response to\n           automatic stream routing.\n\n    We could define ma_device_uninit() such that it must be called on the same thread as\n    ma_device_init(). We could also just not release the IAudioClient when performing automatic\n    stream routing to avoid the deadlock. Neither of these are acceptable solutions in my view so\n    we're going to have to work around this with a worker thread. This is not ideal, but I can't\n    think of a better way to do this.\n\n    More information about this can be found here:\n\n        https://docs.microsoft.com/en-us/windows/win32/api/audioclient/nn-audioclient-iaudiorenderclient\n\n    Note this section:\n\n        When releasing an IAudioRenderClient interface instance, the client must call the interface's\n        Release method from the same thread as the call to IAudioClient::GetService that created the\n        object.\n    */\n    {\n        result = ma_mutex_init(&pContext->wasapi.commandLock);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        result = ma_semaphore_init(0, &pContext->wasapi.commandSem);\n        if (result != MA_SUCCESS) {\n            ma_mutex_uninit(&pContext->wasapi.commandLock);\n            return result;\n        }\n\n        result = ma_thread_create(&pContext->wasapi.commandThread, ma_thread_priority_normal, 0, ma_context_command_thread__wasapi, pContext, &pContext->allocationCallbacks);\n        if (result != MA_SUCCESS) {\n            ma_semaphore_uninit(&pContext->wasapi.commandSem);\n            ma_mutex_uninit(&pContext->wasapi.commandLock);\n            return result;\n        }\n    }\n\n\n    pCallbacks->onContextInit             = ma_context_init__wasapi;\n    pCallbacks->onContextUninit           = ma_context_uninit__wasapi;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__wasapi;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__wasapi;\n    pCallbacks->onDeviceInit              = ma_device_init__wasapi;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__wasapi;\n    pCallbacks->onDeviceStart             = ma_device_start__wasapi;\n    pCallbacks->onDeviceStop              = ma_device_stop__wasapi;\n    pCallbacks->onDeviceRead              = ma_device_read__wasapi;\n    pCallbacks->onDeviceWrite             = ma_device_write__wasapi;\n    pCallbacks->onDeviceDataLoop          = NULL;\n    pCallbacks->onDeviceDataLoopWakeup    = ma_device_data_loop_wakeup__wasapi;\n\n    return MA_SUCCESS;\n}\n#endif\n\n/******************************************************************************\n\nDirectSound Backend\n\n******************************************************************************/\n#ifdef MA_HAS_DSOUND\n/*#include <dsound.h>*/\n\n/*static const GUID MA_GUID_IID_DirectSoundNotify = {0xb0210783, 0x89cd, 0x11d0, {0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16}};*/\n\n/* miniaudio only uses priority or exclusive modes. */\n#define MA_DSSCL_NORMAL                 1\n#define MA_DSSCL_PRIORITY               2\n#define MA_DSSCL_EXCLUSIVE              3\n#define MA_DSSCL_WRITEPRIMARY           4\n\n#define MA_DSCAPS_PRIMARYMONO           0x00000001\n#define MA_DSCAPS_PRIMARYSTEREO         0x00000002\n#define MA_DSCAPS_PRIMARY8BIT           0x00000004\n#define MA_DSCAPS_PRIMARY16BIT          0x00000008\n#define MA_DSCAPS_CONTINUOUSRATE        0x00000010\n#define MA_DSCAPS_EMULDRIVER            0x00000020\n#define MA_DSCAPS_CERTIFIED             0x00000040\n#define MA_DSCAPS_SECONDARYMONO         0x00000100\n#define MA_DSCAPS_SECONDARYSTEREO       0x00000200\n#define MA_DSCAPS_SECONDARY8BIT         0x00000400\n#define MA_DSCAPS_SECONDARY16BIT        0x00000800\n\n#define MA_DSBCAPS_PRIMARYBUFFER        0x00000001\n#define MA_DSBCAPS_STATIC               0x00000002\n#define MA_DSBCAPS_LOCHARDWARE          0x00000004\n#define MA_DSBCAPS_LOCSOFTWARE          0x00000008\n#define MA_DSBCAPS_CTRL3D               0x00000010\n#define MA_DSBCAPS_CTRLFREQUENCY        0x00000020\n#define MA_DSBCAPS_CTRLPAN              0x00000040\n#define MA_DSBCAPS_CTRLVOLUME           0x00000080\n#define MA_DSBCAPS_CTRLPOSITIONNOTIFY   0x00000100\n#define MA_DSBCAPS_CTRLFX               0x00000200\n#define MA_DSBCAPS_STICKYFOCUS          0x00004000\n#define MA_DSBCAPS_GLOBALFOCUS          0x00008000\n#define MA_DSBCAPS_GETCURRENTPOSITION2  0x00010000\n#define MA_DSBCAPS_MUTE3DATMAXDISTANCE  0x00020000\n#define MA_DSBCAPS_LOCDEFER             0x00040000\n#define MA_DSBCAPS_TRUEPLAYPOSITION     0x00080000\n\n#define MA_DSBPLAY_LOOPING              0x00000001\n#define MA_DSBPLAY_LOCHARDWARE          0x00000002\n#define MA_DSBPLAY_LOCSOFTWARE          0x00000004\n#define MA_DSBPLAY_TERMINATEBY_TIME     0x00000008\n#define MA_DSBPLAY_TERMINATEBY_DISTANCE 0x00000010\n#define MA_DSBPLAY_TERMINATEBY_PRIORITY 0x00000020\n\n#define MA_DSCBSTART_LOOPING            0x00000001\n\ntypedef struct\n{\n    DWORD dwSize;\n    DWORD dwFlags;\n    DWORD dwBufferBytes;\n    DWORD dwReserved;\n    MA_WAVEFORMATEX* lpwfxFormat;\n    GUID guid3DAlgorithm;\n} MA_DSBUFFERDESC;\n\ntypedef struct\n{\n    DWORD dwSize;\n    DWORD dwFlags;\n    DWORD dwBufferBytes;\n    DWORD dwReserved;\n    MA_WAVEFORMATEX* lpwfxFormat;\n    DWORD dwFXCount;\n    void* lpDSCFXDesc;  /* <-- miniaudio doesn't use this, so set to void*. */\n} MA_DSCBUFFERDESC;\n\ntypedef struct\n{\n    DWORD dwSize;\n    DWORD dwFlags;\n    DWORD dwMinSecondarySampleRate;\n    DWORD dwMaxSecondarySampleRate;\n    DWORD dwPrimaryBuffers;\n    DWORD dwMaxHwMixingAllBuffers;\n    DWORD dwMaxHwMixingStaticBuffers;\n    DWORD dwMaxHwMixingStreamingBuffers;\n    DWORD dwFreeHwMixingAllBuffers;\n    DWORD dwFreeHwMixingStaticBuffers;\n    DWORD dwFreeHwMixingStreamingBuffers;\n    DWORD dwMaxHw3DAllBuffers;\n    DWORD dwMaxHw3DStaticBuffers;\n    DWORD dwMaxHw3DStreamingBuffers;\n    DWORD dwFreeHw3DAllBuffers;\n    DWORD dwFreeHw3DStaticBuffers;\n    DWORD dwFreeHw3DStreamingBuffers;\n    DWORD dwTotalHwMemBytes;\n    DWORD dwFreeHwMemBytes;\n    DWORD dwMaxContigFreeHwMemBytes;\n    DWORD dwUnlockTransferRateHwBuffers;\n    DWORD dwPlayCpuOverheadSwBuffers;\n    DWORD dwReserved1;\n    DWORD dwReserved2;\n} MA_DSCAPS;\n\ntypedef struct\n{\n    DWORD dwSize;\n    DWORD dwFlags;\n    DWORD dwBufferBytes;\n    DWORD dwUnlockTransferRate;\n    DWORD dwPlayCpuOverhead;\n} MA_DSBCAPS;\n\ntypedef struct\n{\n    DWORD dwSize;\n    DWORD dwFlags;\n    DWORD dwFormats;\n    DWORD dwChannels;\n} MA_DSCCAPS;\n\ntypedef struct\n{\n    DWORD dwSize;\n    DWORD dwFlags;\n    DWORD dwBufferBytes;\n    DWORD dwReserved;\n} MA_DSCBCAPS;\n\ntypedef struct\n{\n    DWORD  dwOffset;\n    HANDLE hEventNotify;\n} MA_DSBPOSITIONNOTIFY;\n\ntypedef struct ma_IDirectSound              ma_IDirectSound;\ntypedef struct ma_IDirectSoundBuffer        ma_IDirectSoundBuffer;\ntypedef struct ma_IDirectSoundCapture       ma_IDirectSoundCapture;\ntypedef struct ma_IDirectSoundCaptureBuffer ma_IDirectSoundCaptureBuffer;\ntypedef struct ma_IDirectSoundNotify        ma_IDirectSoundNotify;\n\n\n/*\nCOM objects. The way these work is that you have a vtable (a list of function pointers, kind of\nlike how C++ works internally), and then you have a structure with a single member, which is a\npointer to the vtable. The vtable is where the methods of the object are defined. Methods need\nto be in a specific order, and parent classes need to have their methods declared first.\n*/\n\n/* IDirectSound */\ntypedef struct\n{\n    /* IUnknown */\n    HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSound* pThis, const IID* const riid, void** ppObject);\n    ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IDirectSound* pThis);\n    ULONG   (STDMETHODCALLTYPE * Release)       (ma_IDirectSound* pThis);\n\n    /* IDirectSound */\n    HRESULT (STDMETHODCALLTYPE * CreateSoundBuffer)   (ma_IDirectSound* pThis, const MA_DSBUFFERDESC* pDSBufferDesc, ma_IDirectSoundBuffer** ppDSBuffer, void* pUnkOuter);\n    HRESULT (STDMETHODCALLTYPE * GetCaps)             (ma_IDirectSound* pThis, MA_DSCAPS* pDSCaps);\n    HRESULT (STDMETHODCALLTYPE * DuplicateSoundBuffer)(ma_IDirectSound* pThis, ma_IDirectSoundBuffer* pDSBufferOriginal, ma_IDirectSoundBuffer** ppDSBufferDuplicate);\n    HRESULT (STDMETHODCALLTYPE * SetCooperativeLevel) (ma_IDirectSound* pThis, HWND hwnd, DWORD dwLevel);\n    HRESULT (STDMETHODCALLTYPE * Compact)             (ma_IDirectSound* pThis);\n    HRESULT (STDMETHODCALLTYPE * GetSpeakerConfig)    (ma_IDirectSound* pThis, DWORD* pSpeakerConfig);\n    HRESULT (STDMETHODCALLTYPE * SetSpeakerConfig)    (ma_IDirectSound* pThis, DWORD dwSpeakerConfig);\n    HRESULT (STDMETHODCALLTYPE * Initialize)          (ma_IDirectSound* pThis, const GUID* pGuidDevice);\n} ma_IDirectSoundVtbl;\nstruct ma_IDirectSound\n{\n    ma_IDirectSoundVtbl* lpVtbl;\n};\nstatic MA_INLINE HRESULT ma_IDirectSound_QueryInterface(ma_IDirectSound* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\nstatic MA_INLINE ULONG   ma_IDirectSound_AddRef(ma_IDirectSound* pThis)                                                 { return pThis->lpVtbl->AddRef(pThis); }\nstatic MA_INLINE ULONG   ma_IDirectSound_Release(ma_IDirectSound* pThis)                                                { return pThis->lpVtbl->Release(pThis); }\nstatic MA_INLINE HRESULT ma_IDirectSound_CreateSoundBuffer(ma_IDirectSound* pThis, const MA_DSBUFFERDESC* pDSBufferDesc, ma_IDirectSoundBuffer** ppDSBuffer, void* pUnkOuter) { return pThis->lpVtbl->CreateSoundBuffer(pThis, pDSBufferDesc, ppDSBuffer, pUnkOuter); }\nstatic MA_INLINE HRESULT ma_IDirectSound_GetCaps(ma_IDirectSound* pThis, MA_DSCAPS* pDSCaps)                            { return pThis->lpVtbl->GetCaps(pThis, pDSCaps); }\nstatic MA_INLINE HRESULT ma_IDirectSound_DuplicateSoundBuffer(ma_IDirectSound* pThis, ma_IDirectSoundBuffer* pDSBufferOriginal, ma_IDirectSoundBuffer** ppDSBufferDuplicate) { return pThis->lpVtbl->DuplicateSoundBuffer(pThis, pDSBufferOriginal, ppDSBufferDuplicate); }\nstatic MA_INLINE HRESULT ma_IDirectSound_SetCooperativeLevel(ma_IDirectSound* pThis, HWND hwnd, DWORD dwLevel)          { return pThis->lpVtbl->SetCooperativeLevel(pThis, hwnd, dwLevel); }\nstatic MA_INLINE HRESULT ma_IDirectSound_Compact(ma_IDirectSound* pThis)                                                { return pThis->lpVtbl->Compact(pThis); }\nstatic MA_INLINE HRESULT ma_IDirectSound_GetSpeakerConfig(ma_IDirectSound* pThis, DWORD* pSpeakerConfig)                { return pThis->lpVtbl->GetSpeakerConfig(pThis, pSpeakerConfig); }\nstatic MA_INLINE HRESULT ma_IDirectSound_SetSpeakerConfig(ma_IDirectSound* pThis, DWORD dwSpeakerConfig)                { return pThis->lpVtbl->SetSpeakerConfig(pThis, dwSpeakerConfig); }\nstatic MA_INLINE HRESULT ma_IDirectSound_Initialize(ma_IDirectSound* pThis, const GUID* pGuidDevice)                    { return pThis->lpVtbl->Initialize(pThis, pGuidDevice); }\n\n\n/* IDirectSoundBuffer */\ntypedef struct\n{\n    /* IUnknown */\n    HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSoundBuffer* pThis, const IID* const riid, void** ppObject);\n    ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IDirectSoundBuffer* pThis);\n    ULONG   (STDMETHODCALLTYPE * Release)       (ma_IDirectSoundBuffer* pThis);\n\n    /* IDirectSoundBuffer */\n    HRESULT (STDMETHODCALLTYPE * GetCaps)           (ma_IDirectSoundBuffer* pThis, MA_DSBCAPS* pDSBufferCaps);\n    HRESULT (STDMETHODCALLTYPE * GetCurrentPosition)(ma_IDirectSoundBuffer* pThis, DWORD* pCurrentPlayCursor, DWORD* pCurrentWriteCursor);\n    HRESULT (STDMETHODCALLTYPE * GetFormat)         (ma_IDirectSoundBuffer* pThis, MA_WAVEFORMATEX* pFormat, DWORD dwSizeAllocated, DWORD* pSizeWritten);\n    HRESULT (STDMETHODCALLTYPE * GetVolume)         (ma_IDirectSoundBuffer* pThis, LONG* pVolume);\n    HRESULT (STDMETHODCALLTYPE * GetPan)            (ma_IDirectSoundBuffer* pThis, LONG* pPan);\n    HRESULT (STDMETHODCALLTYPE * GetFrequency)      (ma_IDirectSoundBuffer* pThis, DWORD* pFrequency);\n    HRESULT (STDMETHODCALLTYPE * GetStatus)         (ma_IDirectSoundBuffer* pThis, DWORD* pStatus);\n    HRESULT (STDMETHODCALLTYPE * Initialize)        (ma_IDirectSoundBuffer* pThis, ma_IDirectSound* pDirectSound, const MA_DSBUFFERDESC* pDSBufferDesc);\n    HRESULT (STDMETHODCALLTYPE * Lock)              (ma_IDirectSoundBuffer* pThis, DWORD dwOffset, DWORD dwBytes, void** ppAudioPtr1, DWORD* pAudioBytes1, void** ppAudioPtr2, DWORD* pAudioBytes2, DWORD dwFlags);\n    HRESULT (STDMETHODCALLTYPE * Play)              (ma_IDirectSoundBuffer* pThis, DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags);\n    HRESULT (STDMETHODCALLTYPE * SetCurrentPosition)(ma_IDirectSoundBuffer* pThis, DWORD dwNewPosition);\n    HRESULT (STDMETHODCALLTYPE * SetFormat)         (ma_IDirectSoundBuffer* pThis, const MA_WAVEFORMATEX* pFormat);\n    HRESULT (STDMETHODCALLTYPE * SetVolume)         (ma_IDirectSoundBuffer* pThis, LONG volume);\n    HRESULT (STDMETHODCALLTYPE * SetPan)            (ma_IDirectSoundBuffer* pThis, LONG pan);\n    HRESULT (STDMETHODCALLTYPE * SetFrequency)      (ma_IDirectSoundBuffer* pThis, DWORD dwFrequency);\n    HRESULT (STDMETHODCALLTYPE * Stop)              (ma_IDirectSoundBuffer* pThis);\n    HRESULT (STDMETHODCALLTYPE * Unlock)            (ma_IDirectSoundBuffer* pThis, void* pAudioPtr1, DWORD dwAudioBytes1, void* pAudioPtr2, DWORD dwAudioBytes2);\n    HRESULT (STDMETHODCALLTYPE * Restore)           (ma_IDirectSoundBuffer* pThis);\n} ma_IDirectSoundBufferVtbl;\nstruct ma_IDirectSoundBuffer\n{\n    ma_IDirectSoundBufferVtbl* lpVtbl;\n};\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_QueryInterface(ma_IDirectSoundBuffer* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\nstatic MA_INLINE ULONG   ma_IDirectSoundBuffer_AddRef(ma_IDirectSoundBuffer* pThis)                                                 { return pThis->lpVtbl->AddRef(pThis); }\nstatic MA_INLINE ULONG   ma_IDirectSoundBuffer_Release(ma_IDirectSoundBuffer* pThis)                                                { return pThis->lpVtbl->Release(pThis); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_GetCaps(ma_IDirectSoundBuffer* pThis, MA_DSBCAPS* pDSBufferCaps)                     { return pThis->lpVtbl->GetCaps(pThis, pDSBufferCaps); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_GetCurrentPosition(ma_IDirectSoundBuffer* pThis, DWORD* pCurrentPlayCursor, DWORD* pCurrentWriteCursor) { return pThis->lpVtbl->GetCurrentPosition(pThis, pCurrentPlayCursor, pCurrentWriteCursor); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_GetFormat(ma_IDirectSoundBuffer* pThis, MA_WAVEFORMATEX* pFormat, DWORD dwSizeAllocated, DWORD* pSizeWritten) { return pThis->lpVtbl->GetFormat(pThis, pFormat, dwSizeAllocated, pSizeWritten); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_GetVolume(ma_IDirectSoundBuffer* pThis, LONG* pVolume)                               { return pThis->lpVtbl->GetVolume(pThis, pVolume); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_GetPan(ma_IDirectSoundBuffer* pThis, LONG* pPan)                                     { return pThis->lpVtbl->GetPan(pThis, pPan); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_GetFrequency(ma_IDirectSoundBuffer* pThis, DWORD* pFrequency)                        { return pThis->lpVtbl->GetFrequency(pThis, pFrequency); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_GetStatus(ma_IDirectSoundBuffer* pThis, DWORD* pStatus)                              { return pThis->lpVtbl->GetStatus(pThis, pStatus); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_Initialize(ma_IDirectSoundBuffer* pThis, ma_IDirectSound* pDirectSound, const MA_DSBUFFERDESC* pDSBufferDesc) { return pThis->lpVtbl->Initialize(pThis, pDirectSound, pDSBufferDesc); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_Lock(ma_IDirectSoundBuffer* pThis, DWORD dwOffset, DWORD dwBytes, void** ppAudioPtr1, DWORD* pAudioBytes1, void** ppAudioPtr2, DWORD* pAudioBytes2, DWORD dwFlags) { return pThis->lpVtbl->Lock(pThis, dwOffset, dwBytes, ppAudioPtr1, pAudioBytes1, ppAudioPtr2, pAudioBytes2, dwFlags); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_Play(ma_IDirectSoundBuffer* pThis, DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) { return pThis->lpVtbl->Play(pThis, dwReserved1, dwPriority, dwFlags); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_SetCurrentPosition(ma_IDirectSoundBuffer* pThis, DWORD dwNewPosition)                { return pThis->lpVtbl->SetCurrentPosition(pThis, dwNewPosition); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_SetFormat(ma_IDirectSoundBuffer* pThis, const MA_WAVEFORMATEX* pFormat)              { return pThis->lpVtbl->SetFormat(pThis, pFormat); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_SetVolume(ma_IDirectSoundBuffer* pThis, LONG volume)                                 { return pThis->lpVtbl->SetVolume(pThis, volume); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_SetPan(ma_IDirectSoundBuffer* pThis, LONG pan)                                       { return pThis->lpVtbl->SetPan(pThis, pan); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_SetFrequency(ma_IDirectSoundBuffer* pThis, DWORD dwFrequency)                        { return pThis->lpVtbl->SetFrequency(pThis, dwFrequency); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_Stop(ma_IDirectSoundBuffer* pThis)                                                   { return pThis->lpVtbl->Stop(pThis); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_Unlock(ma_IDirectSoundBuffer* pThis, void* pAudioPtr1, DWORD dwAudioBytes1, void* pAudioPtr2, DWORD dwAudioBytes2) { return pThis->lpVtbl->Unlock(pThis, pAudioPtr1, dwAudioBytes1, pAudioPtr2, dwAudioBytes2); }\nstatic MA_INLINE HRESULT ma_IDirectSoundBuffer_Restore(ma_IDirectSoundBuffer* pThis)                                                { return pThis->lpVtbl->Restore(pThis); }\n\n\n/* IDirectSoundCapture */\ntypedef struct\n{\n    /* IUnknown */\n    HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSoundCapture* pThis, const IID* const riid, void** ppObject);\n    ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IDirectSoundCapture* pThis);\n    ULONG   (STDMETHODCALLTYPE * Release)       (ma_IDirectSoundCapture* pThis);\n\n    /* IDirectSoundCapture */\n    HRESULT (STDMETHODCALLTYPE * CreateCaptureBuffer)(ma_IDirectSoundCapture* pThis, const MA_DSCBUFFERDESC* pDSCBufferDesc, ma_IDirectSoundCaptureBuffer** ppDSCBuffer, void* pUnkOuter);\n    HRESULT (STDMETHODCALLTYPE * GetCaps)            (ma_IDirectSoundCapture* pThis, MA_DSCCAPS* pDSCCaps);\n    HRESULT (STDMETHODCALLTYPE * Initialize)         (ma_IDirectSoundCapture* pThis, const GUID* pGuidDevice);\n} ma_IDirectSoundCaptureVtbl;\nstruct ma_IDirectSoundCapture\n{\n    ma_IDirectSoundCaptureVtbl* lpVtbl;\n};\nstatic MA_INLINE HRESULT ma_IDirectSoundCapture_QueryInterface     (ma_IDirectSoundCapture* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\nstatic MA_INLINE ULONG   ma_IDirectSoundCapture_AddRef             (ma_IDirectSoundCapture* pThis)                                    { return pThis->lpVtbl->AddRef(pThis); }\nstatic MA_INLINE ULONG   ma_IDirectSoundCapture_Release            (ma_IDirectSoundCapture* pThis)                                    { return pThis->lpVtbl->Release(pThis); }\nstatic MA_INLINE HRESULT ma_IDirectSoundCapture_CreateCaptureBuffer(ma_IDirectSoundCapture* pThis, const MA_DSCBUFFERDESC* pDSCBufferDesc, ma_IDirectSoundCaptureBuffer** ppDSCBuffer, void* pUnkOuter) { return pThis->lpVtbl->CreateCaptureBuffer(pThis, pDSCBufferDesc, ppDSCBuffer, pUnkOuter); }\nstatic MA_INLINE HRESULT ma_IDirectSoundCapture_GetCaps            (ma_IDirectSoundCapture* pThis, MA_DSCCAPS* pDSCCaps)              { return pThis->lpVtbl->GetCaps(pThis, pDSCCaps); }\nstatic MA_INLINE HRESULT ma_IDirectSoundCapture_Initialize         (ma_IDirectSoundCapture* pThis, const GUID* pGuidDevice)           { return pThis->lpVtbl->Initialize(pThis, pGuidDevice); }\n\n\n/* IDirectSoundCaptureBuffer */\ntypedef struct\n{\n    /* IUnknown */\n    HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSoundCaptureBuffer* pThis, const IID* const riid, void** ppObject);\n    ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IDirectSoundCaptureBuffer* pThis);\n    ULONG   (STDMETHODCALLTYPE * Release)       (ma_IDirectSoundCaptureBuffer* pThis);\n\n    /* IDirectSoundCaptureBuffer */\n    HRESULT (STDMETHODCALLTYPE * GetCaps)           (ma_IDirectSoundCaptureBuffer* pThis, MA_DSCBCAPS* pDSCBCaps);\n    HRESULT (STDMETHODCALLTYPE * GetCurrentPosition)(ma_IDirectSoundCaptureBuffer* pThis, DWORD* pCapturePosition, DWORD* pReadPosition);\n    HRESULT (STDMETHODCALLTYPE * GetFormat)         (ma_IDirectSoundCaptureBuffer* pThis, MA_WAVEFORMATEX* pFormat, DWORD dwSizeAllocated, DWORD* pSizeWritten);\n    HRESULT (STDMETHODCALLTYPE * GetStatus)         (ma_IDirectSoundCaptureBuffer* pThis, DWORD* pStatus);\n    HRESULT (STDMETHODCALLTYPE * Initialize)        (ma_IDirectSoundCaptureBuffer* pThis, ma_IDirectSoundCapture* pDirectSoundCapture, const MA_DSCBUFFERDESC* pDSCBufferDesc);\n    HRESULT (STDMETHODCALLTYPE * Lock)              (ma_IDirectSoundCaptureBuffer* pThis, DWORD dwOffset, DWORD dwBytes, void** ppAudioPtr1, DWORD* pAudioBytes1, void** ppAudioPtr2, DWORD* pAudioBytes2, DWORD dwFlags);\n    HRESULT (STDMETHODCALLTYPE * Start)             (ma_IDirectSoundCaptureBuffer* pThis, DWORD dwFlags);\n    HRESULT (STDMETHODCALLTYPE * Stop)              (ma_IDirectSoundCaptureBuffer* pThis);\n    HRESULT (STDMETHODCALLTYPE * Unlock)            (ma_IDirectSoundCaptureBuffer* pThis, void* pAudioPtr1, DWORD dwAudioBytes1, void* pAudioPtr2, DWORD dwAudioBytes2);\n} ma_IDirectSoundCaptureBufferVtbl;\nstruct ma_IDirectSoundCaptureBuffer\n{\n    ma_IDirectSoundCaptureBufferVtbl* lpVtbl;\n};\nstatic MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_QueryInterface(ma_IDirectSoundCaptureBuffer* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\nstatic MA_INLINE ULONG   ma_IDirectSoundCaptureBuffer_AddRef(ma_IDirectSoundCaptureBuffer* pThis)                                                 { return pThis->lpVtbl->AddRef(pThis); }\nstatic MA_INLINE ULONG   ma_IDirectSoundCaptureBuffer_Release(ma_IDirectSoundCaptureBuffer* pThis)                                                { return pThis->lpVtbl->Release(pThis); }\nstatic MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_GetCaps(ma_IDirectSoundCaptureBuffer* pThis, MA_DSCBCAPS* pDSCBCaps)                        { return pThis->lpVtbl->GetCaps(pThis, pDSCBCaps); }\nstatic MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_GetCurrentPosition(ma_IDirectSoundCaptureBuffer* pThis, DWORD* pCapturePosition, DWORD* pReadPosition) { return pThis->lpVtbl->GetCurrentPosition(pThis, pCapturePosition, pReadPosition); }\nstatic MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_GetFormat(ma_IDirectSoundCaptureBuffer* pThis, MA_WAVEFORMATEX* pFormat, DWORD dwSizeAllocated, DWORD* pSizeWritten) { return pThis->lpVtbl->GetFormat(pThis, pFormat, dwSizeAllocated, pSizeWritten); }\nstatic MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_GetStatus(ma_IDirectSoundCaptureBuffer* pThis, DWORD* pStatus)                              { return pThis->lpVtbl->GetStatus(pThis, pStatus); }\nstatic MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Initialize(ma_IDirectSoundCaptureBuffer* pThis, ma_IDirectSoundCapture* pDirectSoundCapture, const MA_DSCBUFFERDESC* pDSCBufferDesc) { return pThis->lpVtbl->Initialize(pThis, pDirectSoundCapture, pDSCBufferDesc); }\nstatic MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Lock(ma_IDirectSoundCaptureBuffer* pThis, DWORD dwOffset, DWORD dwBytes, void** ppAudioPtr1, DWORD* pAudioBytes1, void** ppAudioPtr2, DWORD* pAudioBytes2, DWORD dwFlags) { return pThis->lpVtbl->Lock(pThis, dwOffset, dwBytes, ppAudioPtr1, pAudioBytes1, ppAudioPtr2, pAudioBytes2, dwFlags); }\nstatic MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Start(ma_IDirectSoundCaptureBuffer* pThis, DWORD dwFlags)                                   { return pThis->lpVtbl->Start(pThis, dwFlags); }\nstatic MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Stop(ma_IDirectSoundCaptureBuffer* pThis)                                                   { return pThis->lpVtbl->Stop(pThis); }\nstatic MA_INLINE HRESULT ma_IDirectSoundCaptureBuffer_Unlock(ma_IDirectSoundCaptureBuffer* pThis, void* pAudioPtr1, DWORD dwAudioBytes1, void* pAudioPtr2, DWORD dwAudioBytes2) { return pThis->lpVtbl->Unlock(pThis, pAudioPtr1, dwAudioBytes1, pAudioPtr2, dwAudioBytes2); }\n\n\n/* IDirectSoundNotify */\ntypedef struct\n{\n    /* IUnknown */\n    HRESULT (STDMETHODCALLTYPE * QueryInterface)(ma_IDirectSoundNotify* pThis, const IID* const riid, void** ppObject);\n    ULONG   (STDMETHODCALLTYPE * AddRef)        (ma_IDirectSoundNotify* pThis);\n    ULONG   (STDMETHODCALLTYPE * Release)       (ma_IDirectSoundNotify* pThis);\n\n    /* IDirectSoundNotify */\n    HRESULT (STDMETHODCALLTYPE * SetNotificationPositions)(ma_IDirectSoundNotify* pThis, DWORD dwPositionNotifies, const MA_DSBPOSITIONNOTIFY* pPositionNotifies);\n} ma_IDirectSoundNotifyVtbl;\nstruct ma_IDirectSoundNotify\n{\n    ma_IDirectSoundNotifyVtbl* lpVtbl;\n};\nstatic MA_INLINE HRESULT ma_IDirectSoundNotify_QueryInterface(ma_IDirectSoundNotify* pThis, const IID* const riid, void** ppObject) { return pThis->lpVtbl->QueryInterface(pThis, riid, ppObject); }\nstatic MA_INLINE ULONG   ma_IDirectSoundNotify_AddRef(ma_IDirectSoundNotify* pThis)                                                 { return pThis->lpVtbl->AddRef(pThis); }\nstatic MA_INLINE ULONG   ma_IDirectSoundNotify_Release(ma_IDirectSoundNotify* pThis)                                                { return pThis->lpVtbl->Release(pThis); }\nstatic MA_INLINE HRESULT ma_IDirectSoundNotify_SetNotificationPositions(ma_IDirectSoundNotify* pThis, DWORD dwPositionNotifies, const MA_DSBPOSITIONNOTIFY* pPositionNotifies) { return pThis->lpVtbl->SetNotificationPositions(pThis, dwPositionNotifies, pPositionNotifies); }\n\n\ntypedef BOOL    (CALLBACK * ma_DSEnumCallbackAProc)             (GUID* pDeviceGUID, const char* pDeviceDescription, const char* pModule, void* pContext);\ntypedef HRESULT (WINAPI   * ma_DirectSoundCreateProc)           (const GUID* pcGuidDevice, ma_IDirectSound** ppDS8, ma_IUnknown* pUnkOuter);\ntypedef HRESULT (WINAPI   * ma_DirectSoundEnumerateAProc)       (ma_DSEnumCallbackAProc pDSEnumCallback, void* pContext);\ntypedef HRESULT (WINAPI   * ma_DirectSoundCaptureCreateProc)    (const GUID* pcGuidDevice, ma_IDirectSoundCapture** ppDSC8, ma_IUnknown* pUnkOuter);\ntypedef HRESULT (WINAPI   * ma_DirectSoundCaptureEnumerateAProc)(ma_DSEnumCallbackAProc pDSEnumCallback, void* pContext);\n\nstatic ma_uint32 ma_get_best_sample_rate_within_range(ma_uint32 sampleRateMin, ma_uint32 sampleRateMax)\n{\n    /* Normalize the range in case we were given something stupid. */\n    if (sampleRateMin < (ma_uint32)ma_standard_sample_rate_min) {\n        sampleRateMin = (ma_uint32)ma_standard_sample_rate_min;\n    }\n    if (sampleRateMax > (ma_uint32)ma_standard_sample_rate_max) {\n        sampleRateMax = (ma_uint32)ma_standard_sample_rate_max;\n    }\n    if (sampleRateMin > sampleRateMax) {\n        sampleRateMin = sampleRateMax;\n    }\n\n    if (sampleRateMin == sampleRateMax) {\n        return sampleRateMax;\n    } else {\n        size_t iStandardRate;\n        for (iStandardRate = 0; iStandardRate < ma_countof(g_maStandardSampleRatePriorities); ++iStandardRate) {\n            ma_uint32 standardRate = g_maStandardSampleRatePriorities[iStandardRate];\n            if (standardRate >= sampleRateMin && standardRate <= sampleRateMax) {\n                return standardRate;\n            }\n        }\n    }\n\n    /* Should never get here. */\n    MA_ASSERT(MA_FALSE);\n    return 0;\n}\n\n/*\nRetrieves the channel count and channel map for the given speaker configuration. If the speaker configuration is unknown,\nthe channel count and channel map will be left unmodified.\n*/\nstatic void ma_get_channels_from_speaker_config__dsound(DWORD speakerConfig, WORD* pChannelsOut, DWORD* pChannelMapOut)\n{\n    WORD  channels;\n    DWORD channelMap;\n\n    channels = 0;\n    if (pChannelsOut != NULL) {\n        channels = *pChannelsOut;\n    }\n\n    channelMap = 0;\n    if (pChannelMapOut != NULL) {\n        channelMap = *pChannelMapOut;\n    }\n\n    /*\n    The speaker configuration is a combination of speaker config and speaker geometry. The lower 8 bits is what we care about. The upper\n    16 bits is for the geometry.\n    */\n    switch ((BYTE)(speakerConfig)) {\n        case 1 /*DSSPEAKER_HEADPHONE*/:                          channels = 2; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; break;\n        case 2 /*DSSPEAKER_MONO*/:                               channels = 1; channelMap = SPEAKER_FRONT_CENTER; break;\n        case 3 /*DSSPEAKER_QUAD*/:                               channels = 4; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT; break;\n        case 4 /*DSSPEAKER_STEREO*/:                             channels = 2; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; break;\n        case 5 /*DSSPEAKER_SURROUND*/:                           channels = 4; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER; break;\n        case 6 /*DSSPEAKER_5POINT1_BACK*/ /*DSSPEAKER_5POINT1*/: channels = 6; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT; break;\n        case 7 /*DSSPEAKER_7POINT1_WIDE*/ /*DSSPEAKER_7POINT1*/: channels = 8; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER; break;\n        case 8 /*DSSPEAKER_7POINT1_SURROUND*/:                   channels = 8; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT; break;\n        case 9 /*DSSPEAKER_5POINT1_SURROUND*/:                   channels = 6; channelMap = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT; break;\n        default: break;\n    }\n\n    if (pChannelsOut != NULL) {\n        *pChannelsOut = channels;\n    }\n\n    if (pChannelMapOut != NULL) {\n        *pChannelMapOut = channelMap;\n    }\n}\n\n\nstatic ma_result ma_context_create_IDirectSound__dsound(ma_context* pContext, ma_share_mode shareMode, const ma_device_id* pDeviceID, ma_IDirectSound** ppDirectSound)\n{\n    ma_IDirectSound* pDirectSound;\n    HWND hWnd;\n    HRESULT hr;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(ppDirectSound != NULL);\n\n    *ppDirectSound = NULL;\n    pDirectSound = NULL;\n\n    if (FAILED(((ma_DirectSoundCreateProc)pContext->dsound.DirectSoundCreate)((pDeviceID == NULL) ? NULL : (const GUID*)pDeviceID->dsound, &pDirectSound, NULL))) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[DirectSound] DirectSoundCreate() failed for playback device.\");\n        return MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n    }\n\n    /* The cooperative level must be set before doing anything else. */\n    hWnd = ((MA_PFN_GetForegroundWindow)pContext->win32.GetForegroundWindow)();\n    if (hWnd == 0) {\n        hWnd = ((MA_PFN_GetDesktopWindow)pContext->win32.GetDesktopWindow)();\n    }\n\n    hr = ma_IDirectSound_SetCooperativeLevel(pDirectSound, hWnd, (shareMode == ma_share_mode_exclusive) ? MA_DSSCL_EXCLUSIVE : MA_DSSCL_PRIORITY);\n    if (FAILED(hr)) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSound_SetCooperateiveLevel() failed for playback device.\");\n        return ma_result_from_HRESULT(hr);\n    }\n\n    *ppDirectSound = pDirectSound;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_create_IDirectSoundCapture__dsound(ma_context* pContext, ma_share_mode shareMode, const ma_device_id* pDeviceID, ma_IDirectSoundCapture** ppDirectSoundCapture)\n{\n    ma_IDirectSoundCapture* pDirectSoundCapture;\n    HRESULT hr;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(ppDirectSoundCapture != NULL);\n\n    /* DirectSound does not support exclusive mode for capture. */\n    if (shareMode == ma_share_mode_exclusive) {\n        return MA_SHARE_MODE_NOT_SUPPORTED;\n    }\n\n    *ppDirectSoundCapture = NULL;\n    pDirectSoundCapture = NULL;\n\n    hr = ((ma_DirectSoundCaptureCreateProc)pContext->dsound.DirectSoundCaptureCreate)((pDeviceID == NULL) ? NULL : (const GUID*)pDeviceID->dsound, &pDirectSoundCapture, NULL);\n    if (FAILED(hr)) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[DirectSound] DirectSoundCaptureCreate() failed for capture device.\");\n        return ma_result_from_HRESULT(hr);\n    }\n\n    *ppDirectSoundCapture = pDirectSoundCapture;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_get_format_info_for_IDirectSoundCapture__dsound(ma_context* pContext, ma_IDirectSoundCapture* pDirectSoundCapture, WORD* pChannels, WORD* pBitsPerSample, DWORD* pSampleRate)\n{\n    HRESULT hr;\n    MA_DSCCAPS caps;\n    WORD bitsPerSample;\n    DWORD sampleRate;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pDirectSoundCapture != NULL);\n\n    if (pChannels) {\n        *pChannels = 0;\n    }\n    if (pBitsPerSample) {\n        *pBitsPerSample = 0;\n    }\n    if (pSampleRate) {\n        *pSampleRate = 0;\n    }\n\n    MA_ZERO_OBJECT(&caps);\n    caps.dwSize = sizeof(caps);\n    hr = ma_IDirectSoundCapture_GetCaps(pDirectSoundCapture, &caps);\n    if (FAILED(hr)) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSoundCapture_GetCaps() failed for capture device.\");\n        return ma_result_from_HRESULT(hr);\n    }\n\n    if (pChannels) {\n        *pChannels = (WORD)caps.dwChannels;\n    }\n\n    /* The device can support multiple formats. We just go through the different formats in order of priority and pick the first one. This the same type of system as the WinMM backend. */\n    bitsPerSample = 16;\n    sampleRate = 48000;\n\n    if (caps.dwChannels == 1) {\n        if ((caps.dwFormats & WAVE_FORMAT_48M16) != 0) {\n            sampleRate = 48000;\n        } else if ((caps.dwFormats & WAVE_FORMAT_44M16) != 0) {\n            sampleRate = 44100;\n        } else if ((caps.dwFormats & WAVE_FORMAT_2M16) != 0) {\n            sampleRate = 22050;\n        } else if ((caps.dwFormats & WAVE_FORMAT_1M16) != 0) {\n            sampleRate = 11025;\n        } else if ((caps.dwFormats & WAVE_FORMAT_96M16) != 0) {\n            sampleRate = 96000;\n        } else {\n            bitsPerSample = 8;\n            if ((caps.dwFormats & WAVE_FORMAT_48M08) != 0) {\n                sampleRate = 48000;\n            } else if ((caps.dwFormats & WAVE_FORMAT_44M08) != 0) {\n                sampleRate = 44100;\n            } else if ((caps.dwFormats & WAVE_FORMAT_2M08) != 0) {\n                sampleRate = 22050;\n            } else if ((caps.dwFormats & WAVE_FORMAT_1M08) != 0) {\n                sampleRate = 11025;\n            } else if ((caps.dwFormats & WAVE_FORMAT_96M08) != 0) {\n                sampleRate = 96000;\n            } else {\n                bitsPerSample = 16;  /* Didn't find it. Just fall back to 16-bit. */\n            }\n        }\n    } else if (caps.dwChannels == 2) {\n        if ((caps.dwFormats & WAVE_FORMAT_48S16) != 0) {\n            sampleRate = 48000;\n        } else if ((caps.dwFormats & WAVE_FORMAT_44S16) != 0) {\n            sampleRate = 44100;\n        } else if ((caps.dwFormats & WAVE_FORMAT_2S16) != 0) {\n            sampleRate = 22050;\n        } else if ((caps.dwFormats & WAVE_FORMAT_1S16) != 0) {\n            sampleRate = 11025;\n        } else if ((caps.dwFormats & WAVE_FORMAT_96S16) != 0) {\n            sampleRate = 96000;\n        } else {\n            bitsPerSample = 8;\n            if ((caps.dwFormats & WAVE_FORMAT_48S08) != 0) {\n                sampleRate = 48000;\n            } else if ((caps.dwFormats & WAVE_FORMAT_44S08) != 0) {\n                sampleRate = 44100;\n            } else if ((caps.dwFormats & WAVE_FORMAT_2S08) != 0) {\n                sampleRate = 22050;\n            } else if ((caps.dwFormats & WAVE_FORMAT_1S08) != 0) {\n                sampleRate = 11025;\n            } else if ((caps.dwFormats & WAVE_FORMAT_96S08) != 0) {\n                sampleRate = 96000;\n            } else {\n                bitsPerSample = 16;  /* Didn't find it. Just fall back to 16-bit. */\n            }\n        }\n    }\n\n    if (pBitsPerSample) {\n        *pBitsPerSample = bitsPerSample;\n    }\n    if (pSampleRate) {\n        *pSampleRate = sampleRate;\n    }\n\n    return MA_SUCCESS;\n}\n\n\ntypedef struct\n{\n    ma_context* pContext;\n    ma_device_type deviceType;\n    ma_enum_devices_callback_proc callback;\n    void* pUserData;\n    ma_bool32 terminated;\n} ma_context_enumerate_devices_callback_data__dsound;\n\nstatic BOOL CALLBACK ma_context_enumerate_devices_callback__dsound(GUID* lpGuid, const char* lpcstrDescription, const char* lpcstrModule, void* lpContext)\n{\n    ma_context_enumerate_devices_callback_data__dsound* pData = (ma_context_enumerate_devices_callback_data__dsound*)lpContext;\n    ma_device_info deviceInfo;\n\n    (void)lpcstrModule;\n\n    MA_ZERO_OBJECT(&deviceInfo);\n\n    /* ID. */\n    if (lpGuid != NULL) {\n        MA_COPY_MEMORY(deviceInfo.id.dsound, lpGuid, 16);\n    } else {\n        MA_ZERO_MEMORY(deviceInfo.id.dsound, 16);\n        deviceInfo.isDefault = MA_TRUE;\n    }\n\n    /* Name / Description */\n    ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), lpcstrDescription, (size_t)-1);\n\n\n    /* Call the callback function, but make sure we stop enumerating if the callee requested so. */\n    MA_ASSERT(pData != NULL);\n    pData->terminated = (pData->callback(pData->pContext, pData->deviceType, &deviceInfo, pData->pUserData) == MA_FALSE);\n    if (pData->terminated) {\n        return FALSE;   /* Stop enumeration. */\n    } else {\n        return TRUE;    /* Continue enumeration. */\n    }\n}\n\nstatic ma_result ma_context_enumerate_devices__dsound(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    ma_context_enumerate_devices_callback_data__dsound data;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(callback != NULL);\n\n    data.pContext = pContext;\n    data.callback = callback;\n    data.pUserData = pUserData;\n    data.terminated = MA_FALSE;\n\n    /* Playback. */\n    if (!data.terminated) {\n        data.deviceType = ma_device_type_playback;\n        ((ma_DirectSoundEnumerateAProc)pContext->dsound.DirectSoundEnumerateA)(ma_context_enumerate_devices_callback__dsound, &data);\n    }\n\n    /* Capture. */\n    if (!data.terminated) {\n        data.deviceType = ma_device_type_capture;\n        ((ma_DirectSoundCaptureEnumerateAProc)pContext->dsound.DirectSoundCaptureEnumerateA)(ma_context_enumerate_devices_callback__dsound, &data);\n    }\n\n    return MA_SUCCESS;\n}\n\n\ntypedef struct\n{\n    const ma_device_id* pDeviceID;\n    ma_device_info* pDeviceInfo;\n    ma_bool32 found;\n} ma_context_get_device_info_callback_data__dsound;\n\nstatic BOOL CALLBACK ma_context_get_device_info_callback__dsound(GUID* lpGuid, const char* lpcstrDescription, const char* lpcstrModule, void* lpContext)\n{\n    ma_context_get_device_info_callback_data__dsound* pData = (ma_context_get_device_info_callback_data__dsound*)lpContext;\n    MA_ASSERT(pData != NULL);\n\n    if ((pData->pDeviceID == NULL || ma_is_guid_null(pData->pDeviceID->dsound)) && (lpGuid == NULL || ma_is_guid_null(lpGuid))) {\n        /* Default device. */\n        ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), lpcstrDescription, (size_t)-1);\n        pData->pDeviceInfo->isDefault = MA_TRUE;\n        pData->found = MA_TRUE;\n        return FALSE;   /* Stop enumeration. */\n    } else {\n        /* Not the default device. */\n        if (lpGuid != NULL && pData->pDeviceID != NULL) {\n            if (memcmp(pData->pDeviceID->dsound, lpGuid, sizeof(pData->pDeviceID->dsound)) == 0) {\n                ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), lpcstrDescription, (size_t)-1);\n                pData->found = MA_TRUE;\n                return FALSE;   /* Stop enumeration. */\n            }\n        }\n    }\n\n    (void)lpcstrModule;\n    return TRUE;\n}\n\nstatic ma_result ma_context_get_device_info__dsound(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    ma_result result;\n    HRESULT hr;\n\n    if (pDeviceID != NULL) {\n        ma_context_get_device_info_callback_data__dsound data;\n\n        /* ID. */\n        MA_COPY_MEMORY(pDeviceInfo->id.dsound, pDeviceID->dsound, 16);\n\n        /* Name / Description. This is retrieved by enumerating over each device until we find that one that matches the input ID. */\n        data.pDeviceID = pDeviceID;\n        data.pDeviceInfo = pDeviceInfo;\n        data.found = MA_FALSE;\n        if (deviceType == ma_device_type_playback) {\n            ((ma_DirectSoundEnumerateAProc)pContext->dsound.DirectSoundEnumerateA)(ma_context_get_device_info_callback__dsound, &data);\n        } else {\n            ((ma_DirectSoundCaptureEnumerateAProc)pContext->dsound.DirectSoundCaptureEnumerateA)(ma_context_get_device_info_callback__dsound, &data);\n        }\n\n        if (!data.found) {\n            return MA_NO_DEVICE;\n        }\n    } else {\n        /* I don't think there's a way to get the name of the default device with DirectSound. In this case we just need to use defaults. */\n\n        /* ID */\n        MA_ZERO_MEMORY(pDeviceInfo->id.dsound, 16);\n\n        /* Name / Description */\n        if (deviceType == ma_device_type_playback) {\n            ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n        } else {\n            ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n        }\n\n        pDeviceInfo->isDefault = MA_TRUE;\n    }\n\n    /* Retrieving detailed information is slightly different depending on the device type. */\n    if (deviceType == ma_device_type_playback) {\n        /* Playback. */\n        ma_IDirectSound* pDirectSound;\n        MA_DSCAPS caps;\n        WORD channels;\n\n        result = ma_context_create_IDirectSound__dsound(pContext, ma_share_mode_shared, pDeviceID, &pDirectSound);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        MA_ZERO_OBJECT(&caps);\n        caps.dwSize = sizeof(caps);\n        hr = ma_IDirectSound_GetCaps(pDirectSound, &caps);\n        if (FAILED(hr)) {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSound_GetCaps() failed for playback device.\");\n            return ma_result_from_HRESULT(hr);\n        }\n\n\n        /* Channels. Only a single channel count is reported for DirectSound. */\n        if ((caps.dwFlags & MA_DSCAPS_PRIMARYSTEREO) != 0) {\n            /* It supports at least stereo, but could support more. */\n            DWORD speakerConfig;\n\n            channels = 2;\n\n            /* Look at the speaker configuration to get a better idea on the channel count. */\n            hr = ma_IDirectSound_GetSpeakerConfig(pDirectSound, &speakerConfig);\n            if (SUCCEEDED(hr)) {\n                ma_get_channels_from_speaker_config__dsound(speakerConfig, &channels, NULL);\n            }\n        } else {\n            /* It does not support stereo, which means we are stuck with mono. */\n            channels = 1;\n        }\n\n\n        /*\n        In DirectSound, our native formats are centered around sample rates. All formats are supported, and we're only reporting a single channel\n        count. However, DirectSound can report a range of supported sample rates. We're only going to include standard rates known by miniaudio\n        in order to keep the size of this within reason.\n        */\n        if ((caps.dwFlags & MA_DSCAPS_CONTINUOUSRATE) != 0) {\n            /* Multiple sample rates are supported. We'll report in order of our preferred sample rates. */\n            size_t iStandardSampleRate;\n            for (iStandardSampleRate = 0; iStandardSampleRate < ma_countof(g_maStandardSampleRatePriorities); iStandardSampleRate += 1) {\n                ma_uint32 sampleRate = g_maStandardSampleRatePriorities[iStandardSampleRate];\n                if (sampleRate >= caps.dwMinSecondarySampleRate && sampleRate <= caps.dwMaxSecondarySampleRate) {\n                    pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format     = ma_format_unknown;\n                    pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels   = channels;\n                    pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = sampleRate;\n                    pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags      = 0;\n                    pDeviceInfo->nativeDataFormatCount += 1;\n                }\n            }\n        } else {\n            /* Only a single sample rate is supported. */\n            pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format     = ma_format_unknown;\n            pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels   = channels;\n            pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = caps.dwMaxSecondarySampleRate;\n            pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags      = 0;\n            pDeviceInfo->nativeDataFormatCount += 1;\n        }\n\n        ma_IDirectSound_Release(pDirectSound);\n    } else {\n        /*\n        Capture. This is a little different to playback due to the say the supported formats are reported. Technically capture\n        devices can support a number of different formats, but for simplicity and consistency with ma_device_init() I'm just\n        reporting the best format.\n        */\n        ma_IDirectSoundCapture* pDirectSoundCapture;\n        WORD channels;\n        WORD bitsPerSample;\n        DWORD sampleRate;\n\n        result = ma_context_create_IDirectSoundCapture__dsound(pContext, ma_share_mode_shared, pDeviceID, &pDirectSoundCapture);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        result = ma_context_get_format_info_for_IDirectSoundCapture__dsound(pContext, pDirectSoundCapture, &channels, &bitsPerSample, &sampleRate);\n        if (result != MA_SUCCESS) {\n            ma_IDirectSoundCapture_Release(pDirectSoundCapture);\n            return result;\n        }\n\n        ma_IDirectSoundCapture_Release(pDirectSoundCapture);\n\n        /* The format is always an integer format and is based on the bits per sample. */\n        if (bitsPerSample == 8) {\n            pDeviceInfo->nativeDataFormats[0].format = ma_format_u8;\n        } else if (bitsPerSample == 16) {\n            pDeviceInfo->nativeDataFormats[0].format = ma_format_s16;\n        } else if (bitsPerSample == 24) {\n            pDeviceInfo->nativeDataFormats[0].format = ma_format_s24;\n        } else if (bitsPerSample == 32) {\n            pDeviceInfo->nativeDataFormats[0].format = ma_format_s32;\n        } else {\n            return MA_FORMAT_NOT_SUPPORTED;\n        }\n\n        pDeviceInfo->nativeDataFormats[0].channels   = channels;\n        pDeviceInfo->nativeDataFormats[0].sampleRate = sampleRate;\n        pDeviceInfo->nativeDataFormats[0].flags      = 0;\n        pDeviceInfo->nativeDataFormatCount = 1;\n    }\n\n    return MA_SUCCESS;\n}\n\n\n\nstatic ma_result ma_device_uninit__dsound(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->dsound.pCaptureBuffer != NULL) {\n        ma_IDirectSoundCaptureBuffer_Release((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer);\n    }\n    if (pDevice->dsound.pCapture != NULL) {\n        ma_IDirectSoundCapture_Release((ma_IDirectSoundCapture*)pDevice->dsound.pCapture);\n    }\n\n    if (pDevice->dsound.pPlaybackBuffer != NULL) {\n        ma_IDirectSoundBuffer_Release((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer);\n    }\n    if (pDevice->dsound.pPlaybackPrimaryBuffer != NULL) {\n        ma_IDirectSoundBuffer_Release((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackPrimaryBuffer);\n    }\n    if (pDevice->dsound.pPlayback != NULL) {\n        ma_IDirectSound_Release((ma_IDirectSound*)pDevice->dsound.pPlayback);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_config_to_WAVEFORMATEXTENSIBLE(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, const ma_channel* pChannelMap, MA_WAVEFORMATEXTENSIBLE* pWF)\n{\n    GUID subformat;\n\n    if (format == ma_format_unknown) {\n        format = MA_DEFAULT_FORMAT;\n    }\n\n    if (channels == 0) {\n        channels = MA_DEFAULT_CHANNELS;\n    }\n\n    if (sampleRate == 0) {\n        sampleRate = MA_DEFAULT_SAMPLE_RATE;\n    }\n\n    switch (format)\n    {\n        case ma_format_u8:\n        case ma_format_s16:\n        case ma_format_s24:\n        /*case ma_format_s24_32:*/\n        case ma_format_s32:\n        {\n            subformat = MA_GUID_KSDATAFORMAT_SUBTYPE_PCM;\n        } break;\n\n        case ma_format_f32:\n        {\n            subformat = MA_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;\n        } break;\n\n        default:\n        return MA_FORMAT_NOT_SUPPORTED;\n    }\n\n    MA_ZERO_OBJECT(pWF);\n    pWF->cbSize                      = sizeof(*pWF);\n    pWF->wFormatTag                  = WAVE_FORMAT_EXTENSIBLE;\n    pWF->nChannels                   = (WORD)channels;\n    pWF->nSamplesPerSec              = (DWORD)sampleRate;\n    pWF->wBitsPerSample              = (WORD)(ma_get_bytes_per_sample(format)*8);\n    pWF->nBlockAlign                 = (WORD)(pWF->nChannels * pWF->wBitsPerSample / 8);\n    pWF->nAvgBytesPerSec             = pWF->nBlockAlign * pWF->nSamplesPerSec;\n    pWF->Samples.wValidBitsPerSample = pWF->wBitsPerSample;\n    pWF->dwChannelMask               = ma_channel_map_to_channel_mask__win32(pChannelMap, channels);\n    pWF->SubFormat                   = subformat;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__dsound(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile)\n{\n    /*\n    DirectSound has a minimum period size of 20ms. In practice, this doesn't seem to be enough for\n    reliable glitch-free processing so going to use 30ms instead.\n    */\n    ma_uint32 minPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(30, nativeSampleRate);\n    ma_uint32 periodSizeInFrames;\n\n    periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, nativeSampleRate, performanceProfile);\n    if (periodSizeInFrames < minPeriodSizeInFrames) {\n        periodSizeInFrames = minPeriodSizeInFrames;\n    }\n\n    return periodSizeInFrames;\n}\n\nstatic ma_result ma_device_init__dsound(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n    ma_result result;\n    HRESULT hr;\n\n    MA_ASSERT(pDevice != NULL);\n\n    MA_ZERO_OBJECT(&pDevice->dsound);\n\n    if (pConfig->deviceType == ma_device_type_loopback) {\n        return MA_DEVICE_TYPE_NOT_SUPPORTED;\n    }\n\n    /*\n    Unfortunately DirectSound uses different APIs and data structures for playback and catpure devices. We need to initialize\n    the capture device first because we'll want to match it's buffer size and period count on the playback side if we're using\n    full-duplex mode.\n    */\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        MA_WAVEFORMATEXTENSIBLE wf;\n        MA_DSCBUFFERDESC descDS;\n        ma_uint32 periodSizeInFrames;\n        ma_uint32 periodCount;\n        char rawdata[1024]; /* <-- Ugly hack to avoid a malloc() due to a crappy DirectSound API. */\n        MA_WAVEFORMATEXTENSIBLE* pActualFormat;\n\n        result = ma_config_to_WAVEFORMATEXTENSIBLE(pDescriptorCapture->format, pDescriptorCapture->channels, pDescriptorCapture->sampleRate, pDescriptorCapture->channelMap, &wf);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        result = ma_context_create_IDirectSoundCapture__dsound(pDevice->pContext, pDescriptorCapture->shareMode, pDescriptorCapture->pDeviceID, (ma_IDirectSoundCapture**)&pDevice->dsound.pCapture);\n        if (result != MA_SUCCESS) {\n            ma_device_uninit__dsound(pDevice);\n            return result;\n        }\n\n        result = ma_context_get_format_info_for_IDirectSoundCapture__dsound(pDevice->pContext, (ma_IDirectSoundCapture*)pDevice->dsound.pCapture, &wf.nChannels, &wf.wBitsPerSample, &wf.nSamplesPerSec);\n        if (result != MA_SUCCESS) {\n            ma_device_uninit__dsound(pDevice);\n            return result;\n        }\n\n        wf.nBlockAlign                 = (WORD)(wf.nChannels * wf.wBitsPerSample / 8);\n        wf.nAvgBytesPerSec             = wf.nBlockAlign * wf.nSamplesPerSec;\n        wf.Samples.wValidBitsPerSample = wf.wBitsPerSample;\n        wf.SubFormat                   = MA_GUID_KSDATAFORMAT_SUBTYPE_PCM;\n\n        /* The size of the buffer must be a clean multiple of the period count. */\n        periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__dsound(pDescriptorCapture, wf.nSamplesPerSec, pConfig->performanceProfile);\n        periodCount = (pDescriptorCapture->periodCount > 0) ? pDescriptorCapture->periodCount : MA_DEFAULT_PERIODS;\n\n        MA_ZERO_OBJECT(&descDS);\n        descDS.dwSize        = sizeof(descDS);\n        descDS.dwFlags       = 0;\n        descDS.dwBufferBytes = periodSizeInFrames * periodCount * wf.nBlockAlign;\n        descDS.lpwfxFormat   = (MA_WAVEFORMATEX*)&wf;\n        hr = ma_IDirectSoundCapture_CreateCaptureBuffer((ma_IDirectSoundCapture*)pDevice->dsound.pCapture, &descDS, (ma_IDirectSoundCaptureBuffer**)&pDevice->dsound.pCaptureBuffer, NULL);\n        if (FAILED(hr)) {\n            ma_device_uninit__dsound(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSoundCapture_CreateCaptureBuffer() failed for capture device.\");\n            return ma_result_from_HRESULT(hr);\n        }\n\n        /* Get the _actual_ properties of the buffer. */\n        pActualFormat = (MA_WAVEFORMATEXTENSIBLE*)rawdata;\n        hr = ma_IDirectSoundCaptureBuffer_GetFormat((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, (MA_WAVEFORMATEX*)pActualFormat, sizeof(rawdata), NULL);\n        if (FAILED(hr)) {\n            ma_device_uninit__dsound(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] Failed to retrieve the actual format of the capture device's buffer.\");\n            return ma_result_from_HRESULT(hr);\n        }\n\n        /* We can now start setting the output data formats. */\n        pDescriptorCapture->format     = ma_format_from_WAVEFORMATEX((MA_WAVEFORMATEX*)pActualFormat);\n        pDescriptorCapture->channels   = pActualFormat->nChannels;\n        pDescriptorCapture->sampleRate = pActualFormat->nSamplesPerSec;\n\n        /* Get the native channel map based on the channel mask. */\n        if (pActualFormat->wFormatTag == WAVE_FORMAT_EXTENSIBLE) {\n            ma_channel_mask_to_channel_map__win32(pActualFormat->dwChannelMask, pDescriptorCapture->channels, pDescriptorCapture->channelMap);\n        } else {\n            ma_channel_mask_to_channel_map__win32(wf.dwChannelMask, pDescriptorCapture->channels, pDescriptorCapture->channelMap);\n        }\n\n        /*\n        After getting the actual format the size of the buffer in frames may have actually changed. However, we want this to be as close to what the\n        user has asked for as possible, so let's go ahead and release the old capture buffer and create a new one in this case.\n        */\n        if (periodSizeInFrames != (descDS.dwBufferBytes / ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels) / periodCount)) {\n            descDS.dwBufferBytes = periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels) * periodCount;\n            ma_IDirectSoundCaptureBuffer_Release((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer);\n\n            hr = ma_IDirectSoundCapture_CreateCaptureBuffer((ma_IDirectSoundCapture*)pDevice->dsound.pCapture, &descDS, (ma_IDirectSoundCaptureBuffer**)&pDevice->dsound.pCaptureBuffer, NULL);\n            if (FAILED(hr)) {\n                ma_device_uninit__dsound(pDevice);\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] Second attempt at IDirectSoundCapture_CreateCaptureBuffer() failed for capture device.\");\n                return ma_result_from_HRESULT(hr);\n            }\n        }\n\n        /* DirectSound should give us a buffer exactly the size we asked for. */\n        pDescriptorCapture->periodSizeInFrames = periodSizeInFrames;\n        pDescriptorCapture->periodCount        = periodCount;\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        MA_WAVEFORMATEXTENSIBLE wf;\n        MA_DSBUFFERDESC descDSPrimary;\n        MA_DSCAPS caps;\n        char rawdata[1024]; /* <-- Ugly hack to avoid a malloc() due to a crappy DirectSound API. */\n        MA_WAVEFORMATEXTENSIBLE* pActualFormat;\n        ma_uint32 periodSizeInFrames;\n        ma_uint32 periodCount;\n        MA_DSBUFFERDESC descDS;\n        WORD nativeChannelCount;\n        DWORD nativeChannelMask = 0;\n\n        result = ma_config_to_WAVEFORMATEXTENSIBLE(pDescriptorPlayback->format, pDescriptorPlayback->channels, pDescriptorPlayback->sampleRate, pDescriptorPlayback->channelMap, &wf);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        result = ma_context_create_IDirectSound__dsound(pDevice->pContext, pDescriptorPlayback->shareMode, pDescriptorPlayback->pDeviceID, (ma_IDirectSound**)&pDevice->dsound.pPlayback);\n        if (result != MA_SUCCESS) {\n            ma_device_uninit__dsound(pDevice);\n            return result;\n        }\n\n        MA_ZERO_OBJECT(&descDSPrimary);\n        descDSPrimary.dwSize  = sizeof(MA_DSBUFFERDESC);\n        descDSPrimary.dwFlags = MA_DSBCAPS_PRIMARYBUFFER | MA_DSBCAPS_CTRLVOLUME;\n        hr = ma_IDirectSound_CreateSoundBuffer((ma_IDirectSound*)pDevice->dsound.pPlayback, &descDSPrimary, (ma_IDirectSoundBuffer**)&pDevice->dsound.pPlaybackPrimaryBuffer, NULL);\n        if (FAILED(hr)) {\n            ma_device_uninit__dsound(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSound_CreateSoundBuffer() failed for playback device's primary buffer.\");\n            return ma_result_from_HRESULT(hr);\n        }\n\n\n        /* We may want to make some adjustments to the format if we are using defaults. */\n        MA_ZERO_OBJECT(&caps);\n        caps.dwSize = sizeof(caps);\n        hr = ma_IDirectSound_GetCaps((ma_IDirectSound*)pDevice->dsound.pPlayback, &caps);\n        if (FAILED(hr)) {\n            ma_device_uninit__dsound(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSound_GetCaps() failed for playback device.\");\n            return ma_result_from_HRESULT(hr);\n        }\n\n        if ((caps.dwFlags & MA_DSCAPS_PRIMARYSTEREO) != 0) {\n            DWORD speakerConfig;\n\n            /* It supports at least stereo, but could support more. */\n            nativeChannelCount = 2;\n\n            /* Look at the speaker configuration to get a better idea on the channel count. */\n            if (SUCCEEDED(ma_IDirectSound_GetSpeakerConfig((ma_IDirectSound*)pDevice->dsound.pPlayback, &speakerConfig))) {\n                ma_get_channels_from_speaker_config__dsound(speakerConfig, &nativeChannelCount, &nativeChannelMask);\n            }\n        } else {\n            /* It does not support stereo, which means we are stuck with mono. */\n            nativeChannelCount = 1;\n            nativeChannelMask  = 0x00000001;\n        }\n\n        if (pDescriptorPlayback->channels == 0) {\n            wf.nChannels = nativeChannelCount;\n            wf.dwChannelMask    = nativeChannelMask;\n        }\n\n        if (pDescriptorPlayback->sampleRate == 0) {\n            /* We base the sample rate on the values returned by GetCaps(). */\n            if ((caps.dwFlags & MA_DSCAPS_CONTINUOUSRATE) != 0) {\n                wf.nSamplesPerSec = ma_get_best_sample_rate_within_range(caps.dwMinSecondarySampleRate, caps.dwMaxSecondarySampleRate);\n            } else {\n                wf.nSamplesPerSec = caps.dwMaxSecondarySampleRate;\n            }\n        }\n\n        wf.nBlockAlign     = (WORD)(wf.nChannels * wf.wBitsPerSample / 8);\n        wf.nAvgBytesPerSec = wf.nBlockAlign * wf.nSamplesPerSec;\n\n        /*\n        From MSDN:\n\n        The method succeeds even if the hardware does not support the requested format; DirectSound sets the buffer to the closest\n        supported format. To determine whether this has happened, an application can call the GetFormat method for the primary buffer\n        and compare the result with the format that was requested with the SetFormat method.\n        */\n        hr = ma_IDirectSoundBuffer_SetFormat((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackPrimaryBuffer, (MA_WAVEFORMATEX*)&wf);\n        if (FAILED(hr)) {\n            /*\n            If setting of the format failed we'll try again with some fallback settings. On Windows 98 I have\n            observed that IEEE_FLOAT does not work. We'll therefore enforce PCM. I also had issues where a\n            sample rate of 48000 did not work correctly. Not sure if it was a driver issue or not, but will\n            use 44100 for the sample rate.\n            */\n            wf.cbSize          = 18;    /* NOTE: Don't use sizeof(MA_WAVEFORMATEX) here because it's got an extra 2 bytes due to padding. */\n            wf.wFormatTag      = WAVE_FORMAT_PCM;\n            wf.wBitsPerSample  = 16;\n            wf.nChannels       = nativeChannelCount;\n            wf.nSamplesPerSec  = 44100;\n            wf.nBlockAlign     = wf.nChannels * (wf.wBitsPerSample / 8);\n            wf.nAvgBytesPerSec = wf.nSamplesPerSec * wf.nBlockAlign;\n\n            hr = ma_IDirectSoundBuffer_SetFormat((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackPrimaryBuffer, (MA_WAVEFORMATEX*)&wf);\n            if (FAILED(hr)) {\n                ma_device_uninit__dsound(pDevice);\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] Failed to set format of playback device's primary buffer.\");\n                return ma_result_from_HRESULT(hr);\n            }\n        }\n\n        /* Get the _actual_ properties of the buffer. */\n        pActualFormat = (MA_WAVEFORMATEXTENSIBLE*)rawdata;\n        hr = ma_IDirectSoundBuffer_GetFormat((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackPrimaryBuffer, (MA_WAVEFORMATEX*)pActualFormat, sizeof(rawdata), NULL);\n        if (FAILED(hr)) {\n            ma_device_uninit__dsound(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] Failed to retrieve the actual format of the playback device's primary buffer.\");\n            return ma_result_from_HRESULT(hr);\n        }\n\n        /* We now have enough information to start setting some output properties. */\n        pDescriptorPlayback->format     = ma_format_from_WAVEFORMATEX((MA_WAVEFORMATEX*)pActualFormat);\n        pDescriptorPlayback->channels   = pActualFormat->nChannels;\n        pDescriptorPlayback->sampleRate = pActualFormat->nSamplesPerSec;\n\n        /* Get the internal channel map based on the channel mask. */\n        if (pActualFormat->wFormatTag == WAVE_FORMAT_EXTENSIBLE) {\n            ma_channel_mask_to_channel_map__win32(pActualFormat->dwChannelMask, pDescriptorPlayback->channels, pDescriptorPlayback->channelMap);\n        } else {\n            ma_channel_mask_to_channel_map__win32(wf.dwChannelMask, pDescriptorPlayback->channels, pDescriptorPlayback->channelMap);\n        }\n\n        /* The size of the buffer must be a clean multiple of the period count. */\n        periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__dsound(pDescriptorPlayback, pDescriptorPlayback->sampleRate, pConfig->performanceProfile);\n        periodCount = (pDescriptorPlayback->periodCount > 0) ? pDescriptorPlayback->periodCount : MA_DEFAULT_PERIODS;\n\n        /*\n        Meaning of dwFlags (from MSDN):\n\n        DSBCAPS_CTRLPOSITIONNOTIFY\n          The buffer has position notification capability.\n\n        DSBCAPS_GLOBALFOCUS\n          With this flag set, an application using DirectSound can continue to play its buffers if the user switches focus to\n          another application, even if the new application uses DirectSound.\n\n        DSBCAPS_GETCURRENTPOSITION2\n          In the first version of DirectSound, the play cursor was significantly ahead of the actual playing sound on emulated\n          sound cards; it was directly behind the write cursor. Now, if the DSBCAPS_GETCURRENTPOSITION2 flag is specified, the\n          application can get a more accurate play cursor.\n        */\n        MA_ZERO_OBJECT(&descDS);\n        descDS.dwSize = sizeof(descDS);\n        descDS.dwFlags = MA_DSBCAPS_CTRLPOSITIONNOTIFY | MA_DSBCAPS_GLOBALFOCUS | MA_DSBCAPS_GETCURRENTPOSITION2;\n        descDS.dwBufferBytes = periodSizeInFrames * periodCount * ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels);\n        descDS.lpwfxFormat = (MA_WAVEFORMATEX*)pActualFormat;\n        hr = ma_IDirectSound_CreateSoundBuffer((ma_IDirectSound*)pDevice->dsound.pPlayback, &descDS, (ma_IDirectSoundBuffer**)&pDevice->dsound.pPlaybackBuffer, NULL);\n        if (FAILED(hr)) {\n            ma_device_uninit__dsound(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSound_CreateSoundBuffer() failed for playback device's secondary buffer.\");\n            return ma_result_from_HRESULT(hr);\n        }\n\n        /* DirectSound should give us a buffer exactly the size we asked for. */\n        pDescriptorPlayback->periodSizeInFrames = periodSizeInFrames;\n        pDescriptorPlayback->periodCount        = periodCount;\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_device_data_loop__dsound(ma_device* pDevice)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint32 bpfDeviceCapture  = ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels);\n    ma_uint32 bpfDevicePlayback = ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels);\n    HRESULT hr;\n    DWORD lockOffsetInBytesCapture;\n    DWORD lockSizeInBytesCapture;\n    DWORD mappedSizeInBytesCapture;\n    DWORD mappedDeviceFramesProcessedCapture;\n    void* pMappedDeviceBufferCapture;\n    DWORD lockOffsetInBytesPlayback;\n    DWORD lockSizeInBytesPlayback;\n    DWORD mappedSizeInBytesPlayback;\n    void* pMappedDeviceBufferPlayback;\n    DWORD prevReadCursorInBytesCapture = 0;\n    DWORD prevPlayCursorInBytesPlayback = 0;\n    ma_bool32 physicalPlayCursorLoopFlagPlayback = 0;\n    DWORD virtualWriteCursorInBytesPlayback = 0;\n    ma_bool32 virtualWriteCursorLoopFlagPlayback = 0;\n    ma_bool32 isPlaybackDeviceStarted = MA_FALSE;\n    ma_uint32 framesWrittenToPlaybackDevice = 0;   /* For knowing whether or not the playback device needs to be started. */\n    ma_uint32 waitTimeInMilliseconds = 1;\n\n    MA_ASSERT(pDevice != NULL);\n\n    /* The first thing to do is start the capture device. The playback device is only started after the first period is written. */\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        hr = ma_IDirectSoundCaptureBuffer_Start((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, MA_DSCBSTART_LOOPING);\n        if (FAILED(hr)) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSoundCaptureBuffer_Start() failed.\");\n            return ma_result_from_HRESULT(hr);\n        }\n    }\n\n    while (ma_device_get_state(pDevice) == ma_device_state_started) {\n        switch (pDevice->type)\n        {\n            case ma_device_type_duplex:\n            {\n                DWORD physicalCaptureCursorInBytes;\n                DWORD physicalReadCursorInBytes;\n                hr = ma_IDirectSoundCaptureBuffer_GetCurrentPosition((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, &physicalCaptureCursorInBytes, &physicalReadCursorInBytes);\n                if (FAILED(hr)) {\n                    return ma_result_from_HRESULT(hr);\n                }\n\n                /* If nothing is available we just sleep for a bit and return from this iteration. */\n                if (physicalReadCursorInBytes == prevReadCursorInBytesCapture) {\n                    ma_sleep(waitTimeInMilliseconds);\n                    continue; /* Nothing is available in the capture buffer. */\n                }\n\n                /*\n                The current position has moved. We need to map all of the captured samples and write them to the playback device, making sure\n                we don't return until every frame has been copied over.\n                */\n                if (prevReadCursorInBytesCapture < physicalReadCursorInBytes) {\n                    /* The capture position has not looped. This is the simple case. */\n                    lockOffsetInBytesCapture = prevReadCursorInBytesCapture;\n                    lockSizeInBytesCapture   = (physicalReadCursorInBytes - prevReadCursorInBytesCapture);\n                } else {\n                    /*\n                    The capture position has looped. This is the more complex case. Map to the end of the buffer. If this does not return anything,\n                    do it again from the start.\n                    */\n                    if (prevReadCursorInBytesCapture < pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture) {\n                        /* Lock up to the end of the buffer. */\n                        lockOffsetInBytesCapture = prevReadCursorInBytesCapture;\n                        lockSizeInBytesCapture   = (pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture) - prevReadCursorInBytesCapture;\n                    } else {\n                        /* Lock starting from the start of the buffer. */\n                        lockOffsetInBytesCapture = 0;\n                        lockSizeInBytesCapture   = physicalReadCursorInBytes;\n                    }\n                }\n\n                if (lockSizeInBytesCapture == 0) {\n                    ma_sleep(waitTimeInMilliseconds);\n                    continue; /* Nothing is available in the capture buffer. */\n                }\n\n                hr = ma_IDirectSoundCaptureBuffer_Lock((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, lockOffsetInBytesCapture, lockSizeInBytesCapture, &pMappedDeviceBufferCapture, &mappedSizeInBytesCapture, NULL, NULL, 0);\n                if (FAILED(hr)) {\n                    ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] Failed to map buffer from capture device in preparation for writing to the device.\");\n                    return ma_result_from_HRESULT(hr);\n                }\n\n\n                /* At this point we have some input data that we need to output. We do not return until every mapped frame of the input data is written to the playback device. */\n                mappedDeviceFramesProcessedCapture = 0;\n\n                for (;;) {  /* Keep writing to the playback device. */\n                    ma_uint8  inputFramesInClientFormat[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n                    ma_uint32 inputFramesInClientFormatCap = sizeof(inputFramesInClientFormat) / ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels);\n                    ma_uint8  outputFramesInClientFormat[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n                    ma_uint32 outputFramesInClientFormatCap = sizeof(outputFramesInClientFormat) / ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels);\n                    ma_uint32 outputFramesInClientFormatCount;\n                    ma_uint32 outputFramesInClientFormatConsumed = 0;\n                    ma_uint64 clientCapturedFramesToProcess = ma_min(inputFramesInClientFormatCap, outputFramesInClientFormatCap);\n                    ma_uint64 deviceCapturedFramesToProcess = (mappedSizeInBytesCapture / bpfDeviceCapture) - mappedDeviceFramesProcessedCapture;\n                    void* pRunningMappedDeviceBufferCapture = ma_offset_ptr(pMappedDeviceBufferCapture, mappedDeviceFramesProcessedCapture * bpfDeviceCapture);\n\n                    result = ma_data_converter_process_pcm_frames(&pDevice->capture.converter, pRunningMappedDeviceBufferCapture, &deviceCapturedFramesToProcess, inputFramesInClientFormat, &clientCapturedFramesToProcess);\n                    if (result != MA_SUCCESS) {\n                        break;\n                    }\n\n                    outputFramesInClientFormatCount     = (ma_uint32)clientCapturedFramesToProcess;\n                    mappedDeviceFramesProcessedCapture += (ma_uint32)deviceCapturedFramesToProcess;\n\n                    ma_device__handle_data_callback(pDevice, outputFramesInClientFormat, inputFramesInClientFormat, (ma_uint32)clientCapturedFramesToProcess);\n\n                    /* At this point we have input and output data in client format. All we need to do now is convert it to the output device format. This may take a few passes. */\n                    for (;;) {\n                        ma_uint32 framesWrittenThisIteration;\n                        DWORD physicalPlayCursorInBytes;\n                        DWORD physicalWriteCursorInBytes;\n                        DWORD availableBytesPlayback;\n                        DWORD silentPaddingInBytes = 0; /* <-- Must be initialized to 0. */\n\n                        /* We need the physical play and write cursors. */\n                        if (FAILED(ma_IDirectSoundBuffer_GetCurrentPosition((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, &physicalPlayCursorInBytes, &physicalWriteCursorInBytes))) {\n                            break;\n                        }\n\n                        if (physicalPlayCursorInBytes < prevPlayCursorInBytesPlayback) {\n                            physicalPlayCursorLoopFlagPlayback = !physicalPlayCursorLoopFlagPlayback;\n                        }\n                        prevPlayCursorInBytesPlayback  = physicalPlayCursorInBytes;\n\n                        /* If there's any bytes available for writing we can do that now. The space between the virtual cursor position and play cursor. */\n                        if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) {\n                            /* Same loop iteration. The available bytes wraps all the way around from the virtual write cursor to the physical play cursor. */\n                            if (physicalPlayCursorInBytes <= virtualWriteCursorInBytesPlayback) {\n                                availableBytesPlayback  = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback;\n                                availableBytesPlayback += physicalPlayCursorInBytes;    /* Wrap around. */\n                            } else {\n                                /* This is an error. */\n                                ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, \"[DirectSound] (Duplex/Playback): Play cursor has moved in front of the write cursor (same loop iteration). physicalPlayCursorInBytes=%ld, virtualWriteCursorInBytes=%ld.\\n\", physicalPlayCursorInBytes, virtualWriteCursorInBytesPlayback);\n                                availableBytesPlayback = 0;\n                            }\n                        } else {\n                            /* Different loop iterations. The available bytes only goes from the virtual write cursor to the physical play cursor. */\n                            if (physicalPlayCursorInBytes >= virtualWriteCursorInBytesPlayback) {\n                                availableBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback;\n                            } else {\n                                /* This is an error. */\n                                ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, \"[DirectSound] (Duplex/Playback): Write cursor has moved behind the play cursor (different loop iterations). physicalPlayCursorInBytes=%ld, virtualWriteCursorInBytes=%ld.\\n\", physicalPlayCursorInBytes, virtualWriteCursorInBytesPlayback);\n                                availableBytesPlayback = 0;\n                            }\n                        }\n\n                        /* If there's no room available for writing we need to wait for more. */\n                        if (availableBytesPlayback == 0) {\n                            /* If we haven't started the device yet, this will never get beyond 0. In this case we need to get the device started. */\n                            if (!isPlaybackDeviceStarted) {\n                                hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING);\n                                if (FAILED(hr)) {\n                                    ma_IDirectSoundCaptureBuffer_Stop((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer);\n                                    ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSoundBuffer_Play() failed.\");\n                                    return ma_result_from_HRESULT(hr);\n                                }\n                                isPlaybackDeviceStarted = MA_TRUE;\n                            } else {\n                                ma_sleep(waitTimeInMilliseconds);\n                                continue;\n                            }\n                        }\n\n\n                        /* Getting here means there room available somewhere. We limit this to either the end of the buffer or the physical play cursor, whichever is closest. */\n                        lockOffsetInBytesPlayback = virtualWriteCursorInBytesPlayback;\n                        if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) {\n                            /* Same loop iteration. Go up to the end of the buffer. */\n                            lockSizeInBytesPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback;\n                        } else {\n                            /* Different loop iterations. Go up to the physical play cursor. */\n                            lockSizeInBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback;\n                        }\n\n                        hr = ma_IDirectSoundBuffer_Lock((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, lockOffsetInBytesPlayback, lockSizeInBytesPlayback, &pMappedDeviceBufferPlayback, &mappedSizeInBytesPlayback, NULL, NULL, 0);\n                        if (FAILED(hr)) {\n                            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] Failed to map buffer from playback device in preparation for writing to the device.\");\n                            result = ma_result_from_HRESULT(hr);\n                            break;\n                        }\n\n                        /*\n                        Experiment: If the playback buffer is being starved, pad it with some silence to get it back in sync. This will cause a glitch, but it may prevent\n                        endless glitching due to it constantly running out of data.\n                        */\n                        if (isPlaybackDeviceStarted) {\n                            DWORD bytesQueuedForPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - availableBytesPlayback;\n                            if (bytesQueuedForPlayback < (pDevice->playback.internalPeriodSizeInFrames*bpfDevicePlayback)) {\n                                silentPaddingInBytes   = (pDevice->playback.internalPeriodSizeInFrames*2*bpfDevicePlayback) - bytesQueuedForPlayback;\n                                if (silentPaddingInBytes > lockSizeInBytesPlayback) {\n                                    silentPaddingInBytes = lockSizeInBytesPlayback;\n                                }\n\n                                ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, \"[DirectSound] (Duplex/Playback) Playback buffer starved. availableBytesPlayback=%ld, silentPaddingInBytes=%ld\\n\", availableBytesPlayback, silentPaddingInBytes);\n                            }\n                        }\n\n                        /* At this point we have a buffer for output. */\n                        if (silentPaddingInBytes > 0) {\n                            MA_ZERO_MEMORY(pMappedDeviceBufferPlayback, silentPaddingInBytes);\n                            framesWrittenThisIteration = silentPaddingInBytes/bpfDevicePlayback;\n                        } else {\n                            ma_uint64 convertedFrameCountIn  = (outputFramesInClientFormatCount - outputFramesInClientFormatConsumed);\n                            ma_uint64 convertedFrameCountOut = mappedSizeInBytesPlayback/bpfDevicePlayback;\n                            void* pConvertedFramesIn  = ma_offset_ptr(outputFramesInClientFormat, outputFramesInClientFormatConsumed * bpfDevicePlayback);\n                            void* pConvertedFramesOut = pMappedDeviceBufferPlayback;\n\n                            result = ma_data_converter_process_pcm_frames(&pDevice->playback.converter, pConvertedFramesIn, &convertedFrameCountIn, pConvertedFramesOut, &convertedFrameCountOut);\n                            if (result != MA_SUCCESS) {\n                                break;\n                            }\n\n                            outputFramesInClientFormatConsumed += (ma_uint32)convertedFrameCountOut;\n                            framesWrittenThisIteration          = (ma_uint32)convertedFrameCountOut;\n                        }\n\n\n                        hr = ma_IDirectSoundBuffer_Unlock((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, pMappedDeviceBufferPlayback, framesWrittenThisIteration*bpfDevicePlayback, NULL, 0);\n                        if (FAILED(hr)) {\n                            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] Failed to unlock internal buffer from playback device after writing to the device.\");\n                            result = ma_result_from_HRESULT(hr);\n                            break;\n                        }\n\n                        virtualWriteCursorInBytesPlayback += framesWrittenThisIteration*bpfDevicePlayback;\n                        if ((virtualWriteCursorInBytesPlayback/bpfDevicePlayback) == pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods) {\n                            virtualWriteCursorInBytesPlayback  = 0;\n                            virtualWriteCursorLoopFlagPlayback = !virtualWriteCursorLoopFlagPlayback;\n                        }\n\n                        /*\n                        We may need to start the device. We want two full periods to be written before starting the playback device. Having an extra period adds\n                        a bit of a buffer to prevent the playback buffer from getting starved.\n                        */\n                        framesWrittenToPlaybackDevice += framesWrittenThisIteration;\n                        if (!isPlaybackDeviceStarted && framesWrittenToPlaybackDevice >= (pDevice->playback.internalPeriodSizeInFrames*2)) {\n                            hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING);\n                            if (FAILED(hr)) {\n                                ma_IDirectSoundCaptureBuffer_Stop((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer);\n                                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSoundBuffer_Play() failed.\");\n                                return ma_result_from_HRESULT(hr);\n                            }\n                            isPlaybackDeviceStarted = MA_TRUE;\n                        }\n\n                        if (framesWrittenThisIteration < mappedSizeInBytesPlayback/bpfDevicePlayback) {\n                            break;  /* We're finished with the output data.*/\n                        }\n                    }\n\n                    if (clientCapturedFramesToProcess == 0) {\n                        break;  /* We just consumed every input sample. */\n                    }\n                }\n\n\n                /* At this point we're done with the mapped portion of the capture buffer. */\n                hr = ma_IDirectSoundCaptureBuffer_Unlock((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, pMappedDeviceBufferCapture, mappedSizeInBytesCapture, NULL, 0);\n                if (FAILED(hr)) {\n                    ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] Failed to unlock internal buffer from capture device after reading from the device.\");\n                    return ma_result_from_HRESULT(hr);\n                }\n                prevReadCursorInBytesCapture = (lockOffsetInBytesCapture + mappedSizeInBytesCapture);\n            } break;\n\n\n\n            case ma_device_type_capture:\n            {\n                DWORD physicalCaptureCursorInBytes;\n                DWORD physicalReadCursorInBytes;\n                hr = ma_IDirectSoundCaptureBuffer_GetCurrentPosition((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, &physicalCaptureCursorInBytes, &physicalReadCursorInBytes);\n                if (FAILED(hr)) {\n                    return MA_ERROR;\n                }\n\n                /* If the previous capture position is the same as the current position we need to wait a bit longer. */\n                if (prevReadCursorInBytesCapture == physicalReadCursorInBytes) {\n                    ma_sleep(waitTimeInMilliseconds);\n                    continue;\n                }\n\n                /* Getting here means we have capture data available. */\n                if (prevReadCursorInBytesCapture < physicalReadCursorInBytes) {\n                    /* The capture position has not looped. This is the simple case. */\n                    lockOffsetInBytesCapture = prevReadCursorInBytesCapture;\n                    lockSizeInBytesCapture   = (physicalReadCursorInBytes - prevReadCursorInBytesCapture);\n                } else {\n                    /*\n                    The capture position has looped. This is the more complex case. Map to the end of the buffer. If this does not return anything,\n                    do it again from the start.\n                    */\n                    if (prevReadCursorInBytesCapture < pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture) {\n                        /* Lock up to the end of the buffer. */\n                        lockOffsetInBytesCapture = prevReadCursorInBytesCapture;\n                        lockSizeInBytesCapture   = (pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture) - prevReadCursorInBytesCapture;\n                    } else {\n                        /* Lock starting from the start of the buffer. */\n                        lockOffsetInBytesCapture = 0;\n                        lockSizeInBytesCapture   = physicalReadCursorInBytes;\n                    }\n                }\n\n                if (lockSizeInBytesCapture < pDevice->capture.internalPeriodSizeInFrames) {\n                    ma_sleep(waitTimeInMilliseconds);\n                    continue; /* Nothing is available in the capture buffer. */\n                }\n\n                hr = ma_IDirectSoundCaptureBuffer_Lock((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, lockOffsetInBytesCapture, lockSizeInBytesCapture, &pMappedDeviceBufferCapture, &mappedSizeInBytesCapture, NULL, NULL, 0);\n                if (FAILED(hr)) {\n                    ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] Failed to map buffer from capture device in preparation for writing to the device.\");\n                    result = ma_result_from_HRESULT(hr);\n                }\n\n                if (lockSizeInBytesCapture != mappedSizeInBytesCapture) {\n                    ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[DirectSound] (Capture) lockSizeInBytesCapture=%ld != mappedSizeInBytesCapture=%ld\\n\", lockSizeInBytesCapture, mappedSizeInBytesCapture);\n                }\n\n                ma_device__send_frames_to_client(pDevice, mappedSizeInBytesCapture/bpfDeviceCapture, pMappedDeviceBufferCapture);\n\n                hr = ma_IDirectSoundCaptureBuffer_Unlock((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer, pMappedDeviceBufferCapture, mappedSizeInBytesCapture, NULL, 0);\n                if (FAILED(hr)) {\n                    ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] Failed to unlock internal buffer from capture device after reading from the device.\");\n                    return ma_result_from_HRESULT(hr);\n                }\n                prevReadCursorInBytesCapture = lockOffsetInBytesCapture + mappedSizeInBytesCapture;\n\n                if (prevReadCursorInBytesCapture == (pDevice->capture.internalPeriodSizeInFrames*pDevice->capture.internalPeriods*bpfDeviceCapture)) {\n                    prevReadCursorInBytesCapture = 0;\n                }\n            } break;\n\n\n\n            case ma_device_type_playback:\n            {\n                DWORD availableBytesPlayback;\n                DWORD physicalPlayCursorInBytes;\n                DWORD physicalWriteCursorInBytes;\n                hr = ma_IDirectSoundBuffer_GetCurrentPosition((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, &physicalPlayCursorInBytes, &physicalWriteCursorInBytes);\n                if (FAILED(hr)) {\n                    break;\n                }\n\n                if (physicalPlayCursorInBytes < prevPlayCursorInBytesPlayback) {\n                    physicalPlayCursorLoopFlagPlayback = !physicalPlayCursorLoopFlagPlayback;\n                }\n                prevPlayCursorInBytesPlayback  = physicalPlayCursorInBytes;\n\n                /* If there's any bytes available for writing we can do that now. The space between the virtual cursor position and play cursor. */\n                if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) {\n                    /* Same loop iteration. The available bytes wraps all the way around from the virtual write cursor to the physical play cursor. */\n                    if (physicalPlayCursorInBytes <= virtualWriteCursorInBytesPlayback) {\n                        availableBytesPlayback  = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback;\n                        availableBytesPlayback += physicalPlayCursorInBytes;    /* Wrap around. */\n                    } else {\n                        /* This is an error. */\n                        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, \"[DirectSound] (Playback): Play cursor has moved in front of the write cursor (same loop iterations). physicalPlayCursorInBytes=%ld, virtualWriteCursorInBytes=%ld.\\n\", physicalPlayCursorInBytes, virtualWriteCursorInBytesPlayback);\n                        availableBytesPlayback = 0;\n                    }\n                } else {\n                    /* Different loop iterations. The available bytes only goes from the virtual write cursor to the physical play cursor. */\n                    if (physicalPlayCursorInBytes >= virtualWriteCursorInBytesPlayback) {\n                        availableBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback;\n                    } else {\n                        /* This is an error. */\n                        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, \"[DirectSound] (Playback): Write cursor has moved behind the play cursor (different loop iterations). physicalPlayCursorInBytes=%ld, virtualWriteCursorInBytes=%ld.\\n\", physicalPlayCursorInBytes, virtualWriteCursorInBytesPlayback);\n                        availableBytesPlayback = 0;\n                    }\n                }\n\n                /* If there's no room available for writing we need to wait for more. */\n                if (availableBytesPlayback < pDevice->playback.internalPeriodSizeInFrames) {\n                    /* If we haven't started the device yet, this will never get beyond 0. In this case we need to get the device started. */\n                    if (availableBytesPlayback == 0 && !isPlaybackDeviceStarted) {\n                        hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING);\n                        if (FAILED(hr)) {\n                            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSoundBuffer_Play() failed.\");\n                            return ma_result_from_HRESULT(hr);\n                        }\n                        isPlaybackDeviceStarted = MA_TRUE;\n                    } else {\n                        ma_sleep(waitTimeInMilliseconds);\n                        continue;\n                    }\n                }\n\n                /* Getting here means there room available somewhere. We limit this to either the end of the buffer or the physical play cursor, whichever is closest. */\n                lockOffsetInBytesPlayback = virtualWriteCursorInBytesPlayback;\n                if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) {\n                    /* Same loop iteration. Go up to the end of the buffer. */\n                    lockSizeInBytesPlayback = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback;\n                } else {\n                    /* Different loop iterations. Go up to the physical play cursor. */\n                    lockSizeInBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback;\n                }\n\n                hr = ma_IDirectSoundBuffer_Lock((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, lockOffsetInBytesPlayback, lockSizeInBytesPlayback, &pMappedDeviceBufferPlayback, &mappedSizeInBytesPlayback, NULL, NULL, 0);\n                if (FAILED(hr)) {\n                    ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] Failed to map buffer from playback device in preparation for writing to the device.\");\n                    result = ma_result_from_HRESULT(hr);\n                    break;\n                }\n\n                /* At this point we have a buffer for output. */\n                ma_device__read_frames_from_client(pDevice, (mappedSizeInBytesPlayback/bpfDevicePlayback), pMappedDeviceBufferPlayback);\n\n                hr = ma_IDirectSoundBuffer_Unlock((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, pMappedDeviceBufferPlayback, mappedSizeInBytesPlayback, NULL, 0);\n                if (FAILED(hr)) {\n                    ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] Failed to unlock internal buffer from playback device after writing to the device.\");\n                    result = ma_result_from_HRESULT(hr);\n                    break;\n                }\n\n                virtualWriteCursorInBytesPlayback += mappedSizeInBytesPlayback;\n                if (virtualWriteCursorInBytesPlayback == pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) {\n                    virtualWriteCursorInBytesPlayback  = 0;\n                    virtualWriteCursorLoopFlagPlayback = !virtualWriteCursorLoopFlagPlayback;\n                }\n\n                /*\n                We may need to start the device. We want two full periods to be written before starting the playback device. Having an extra period adds\n                a bit of a buffer to prevent the playback buffer from getting starved.\n                */\n                framesWrittenToPlaybackDevice += mappedSizeInBytesPlayback/bpfDevicePlayback;\n                if (!isPlaybackDeviceStarted && framesWrittenToPlaybackDevice >= pDevice->playback.internalPeriodSizeInFrames) {\n                    hr = ma_IDirectSoundBuffer_Play((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0, 0, MA_DSBPLAY_LOOPING);\n                    if (FAILED(hr)) {\n                        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSoundBuffer_Play() failed.\");\n                        return ma_result_from_HRESULT(hr);\n                    }\n                    isPlaybackDeviceStarted = MA_TRUE;\n                }\n            } break;\n\n\n            default: return MA_INVALID_ARGS;   /* Invalid device type. */\n        }\n\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    /* Getting here means the device is being stopped. */\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        hr = ma_IDirectSoundCaptureBuffer_Stop((ma_IDirectSoundCaptureBuffer*)pDevice->dsound.pCaptureBuffer);\n        if (FAILED(hr)) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSoundCaptureBuffer_Stop() failed.\");\n            return ma_result_from_HRESULT(hr);\n        }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        /* The playback device should be drained before stopping. All we do is wait until the available bytes is equal to the size of the buffer. */\n        if (isPlaybackDeviceStarted) {\n            for (;;) {\n                DWORD availableBytesPlayback = 0;\n                DWORD physicalPlayCursorInBytes;\n                DWORD physicalWriteCursorInBytes;\n                hr = ma_IDirectSoundBuffer_GetCurrentPosition((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, &physicalPlayCursorInBytes, &physicalWriteCursorInBytes);\n                if (FAILED(hr)) {\n                    break;\n                }\n\n                if (physicalPlayCursorInBytes < prevPlayCursorInBytesPlayback) {\n                    physicalPlayCursorLoopFlagPlayback = !physicalPlayCursorLoopFlagPlayback;\n                }\n                prevPlayCursorInBytesPlayback  = physicalPlayCursorInBytes;\n\n                if (physicalPlayCursorLoopFlagPlayback == virtualWriteCursorLoopFlagPlayback) {\n                    /* Same loop iteration. The available bytes wraps all the way around from the virtual write cursor to the physical play cursor. */\n                    if (physicalPlayCursorInBytes <= virtualWriteCursorInBytesPlayback) {\n                        availableBytesPlayback  = (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback) - virtualWriteCursorInBytesPlayback;\n                        availableBytesPlayback += physicalPlayCursorInBytes;    /* Wrap around. */\n                    } else {\n                        break;\n                    }\n                } else {\n                    /* Different loop iterations. The available bytes only goes from the virtual write cursor to the physical play cursor. */\n                    if (physicalPlayCursorInBytes >= virtualWriteCursorInBytesPlayback) {\n                        availableBytesPlayback = physicalPlayCursorInBytes - virtualWriteCursorInBytesPlayback;\n                    } else {\n                        break;\n                    }\n                }\n\n                if (availableBytesPlayback >= (pDevice->playback.internalPeriodSizeInFrames*pDevice->playback.internalPeriods*bpfDevicePlayback)) {\n                    break;\n                }\n\n                ma_sleep(waitTimeInMilliseconds);\n            }\n        }\n\n        hr = ma_IDirectSoundBuffer_Stop((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer);\n        if (FAILED(hr)) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[DirectSound] IDirectSoundBuffer_Stop() failed.\");\n            return ma_result_from_HRESULT(hr);\n        }\n\n        ma_IDirectSoundBuffer_SetCurrentPosition((ma_IDirectSoundBuffer*)pDevice->dsound.pPlaybackBuffer, 0);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_uninit__dsound(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_dsound);\n\n    ma_dlclose(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init__dsound(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n    MA_ASSERT(pContext != NULL);\n\n    (void)pConfig;\n\n    pContext->dsound.hDSoundDLL = ma_dlopen(ma_context_get_log(pContext), \"dsound.dll\");\n    if (pContext->dsound.hDSoundDLL == NULL) {\n        return MA_API_NOT_FOUND;\n    }\n\n    pContext->dsound.DirectSoundCreate            = ma_dlsym(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL, \"DirectSoundCreate\");\n    pContext->dsound.DirectSoundEnumerateA        = ma_dlsym(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL, \"DirectSoundEnumerateA\");\n    pContext->dsound.DirectSoundCaptureCreate     = ma_dlsym(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL, \"DirectSoundCaptureCreate\");\n    pContext->dsound.DirectSoundCaptureEnumerateA = ma_dlsym(ma_context_get_log(pContext), pContext->dsound.hDSoundDLL, \"DirectSoundCaptureEnumerateA\");\n\n    /*\n    We need to support all functions or nothing. DirectSound with Windows 95 seems to not work too\n    well in my testing. For example, it's missing DirectSoundCaptureEnumerateA(). This is a convenient\n    place to just disable the DirectSound backend for Windows 95.\n    */\n    if (pContext->dsound.DirectSoundCreate            == NULL ||\n        pContext->dsound.DirectSoundEnumerateA        == NULL ||\n        pContext->dsound.DirectSoundCaptureCreate     == NULL ||\n        pContext->dsound.DirectSoundCaptureEnumerateA == NULL) {\n        return MA_API_NOT_FOUND;\n    }\n\n    pCallbacks->onContextInit             = ma_context_init__dsound;\n    pCallbacks->onContextUninit           = ma_context_uninit__dsound;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__dsound;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__dsound;\n    pCallbacks->onDeviceInit              = ma_device_init__dsound;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__dsound;\n    pCallbacks->onDeviceStart             = NULL;   /* Not used. Started in onDeviceDataLoop. */\n    pCallbacks->onDeviceStop              = NULL;   /* Not used. Stopped in onDeviceDataLoop. */\n    pCallbacks->onDeviceRead              = NULL;   /* Not used. Data is read directly in onDeviceDataLoop. */\n    pCallbacks->onDeviceWrite             = NULL;   /* Not used. Data is written directly in onDeviceDataLoop. */\n    pCallbacks->onDeviceDataLoop          = ma_device_data_loop__dsound;\n\n    return MA_SUCCESS;\n}\n#endif\n\n\n\n/******************************************************************************\n\nWinMM Backend\n\n******************************************************************************/\n#ifdef MA_HAS_WINMM\n\n/*\nSome build configurations will exclude the WinMM API. An example is when WIN32_LEAN_AND_MEAN\nis defined. We need to define the types and functions we need manually.\n*/\n#define MA_MMSYSERR_NOERROR     0\n#define MA_MMSYSERR_ERROR       1\n#define MA_MMSYSERR_BADDEVICEID 2\n#define MA_MMSYSERR_INVALHANDLE 5\n#define MA_MMSYSERR_NOMEM       7\n#define MA_MMSYSERR_INVALFLAG   10\n#define MA_MMSYSERR_INVALPARAM  11\n#define MA_MMSYSERR_HANDLEBUSY  12\n\n#define MA_CALLBACK_EVENT       0x00050000\n#define MA_WAVE_ALLOWSYNC       0x0002\n\n#define MA_WHDR_DONE            0x00000001\n#define MA_WHDR_PREPARED        0x00000002\n#define MA_WHDR_BEGINLOOP       0x00000004\n#define MA_WHDR_ENDLOOP         0x00000008\n#define MA_WHDR_INQUEUE         0x00000010\n\n#define MA_MAXPNAMELEN          32\n\ntypedef void* MA_HWAVEIN;\ntypedef void* MA_HWAVEOUT;\ntypedef UINT MA_MMRESULT;\ntypedef UINT MA_MMVERSION;\n\ntypedef struct\n{\n    WORD wMid;\n    WORD wPid;\n    MA_MMVERSION vDriverVersion;\n    CHAR szPname[MA_MAXPNAMELEN];\n    DWORD dwFormats;\n    WORD wChannels;\n    WORD wReserved1;\n} MA_WAVEINCAPSA;\n\ntypedef struct\n{\n    WORD wMid;\n    WORD wPid;\n    MA_MMVERSION vDriverVersion;\n    CHAR szPname[MA_MAXPNAMELEN];\n    DWORD dwFormats;\n    WORD wChannels;\n    WORD wReserved1;\n    DWORD dwSupport;\n} MA_WAVEOUTCAPSA;\n\ntypedef struct tagWAVEHDR\n{\n    char* lpData;\n    DWORD dwBufferLength;\n    DWORD dwBytesRecorded;\n    DWORD_PTR dwUser;\n    DWORD dwFlags;\n    DWORD dwLoops;\n    struct tagWAVEHDR* lpNext;\n    DWORD_PTR reserved;\n} MA_WAVEHDR;\n\ntypedef struct\n{\n    WORD wMid;\n    WORD wPid;\n    MA_MMVERSION vDriverVersion;\n    CHAR szPname[MA_MAXPNAMELEN];\n    DWORD dwFormats;\n    WORD wChannels;\n    WORD wReserved1;\n    DWORD dwSupport;\n    GUID ManufacturerGuid;\n    GUID ProductGuid;\n    GUID NameGuid;\n} MA_WAVEOUTCAPS2A;\n\ntypedef struct\n{\n    WORD wMid;\n    WORD wPid;\n    MA_MMVERSION vDriverVersion;\n    CHAR szPname[MA_MAXPNAMELEN];\n    DWORD dwFormats;\n    WORD wChannels;\n    WORD wReserved1;\n    GUID ManufacturerGuid;\n    GUID ProductGuid;\n    GUID NameGuid;\n} MA_WAVEINCAPS2A;\n\ntypedef UINT        (WINAPI * MA_PFN_waveOutGetNumDevs)(void);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveOutGetDevCapsA)(ma_uintptr uDeviceID, MA_WAVEOUTCAPSA* pwoc, UINT cbwoc);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveOutOpen)(MA_HWAVEOUT* phwo, UINT uDeviceID, const MA_WAVEFORMATEX* pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveOutClose)(MA_HWAVEOUT hwo);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveOutPrepareHeader)(MA_HWAVEOUT hwo, MA_WAVEHDR* pwh, UINT cbwh);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveOutUnprepareHeader)(MA_HWAVEOUT hwo, MA_WAVEHDR* pwh, UINT cbwh);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveOutWrite)(MA_HWAVEOUT hwo, MA_WAVEHDR* pwh, UINT cbwh);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveOutReset)(MA_HWAVEOUT hwo);\ntypedef UINT        (WINAPI * MA_PFN_waveInGetNumDevs)(void);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveInGetDevCapsA)(ma_uintptr uDeviceID, MA_WAVEINCAPSA* pwic, UINT cbwic);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveInOpen)(MA_HWAVEIN* phwi, UINT uDeviceID, const MA_WAVEFORMATEX* pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveInClose)(MA_HWAVEIN hwi);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveInPrepareHeader)(MA_HWAVEIN hwi, MA_WAVEHDR* pwh, UINT cbwh);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveInUnprepareHeader)(MA_HWAVEIN hwi, MA_WAVEHDR* pwh, UINT cbwh);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveInAddBuffer)(MA_HWAVEIN hwi, MA_WAVEHDR* pwh, UINT cbwh);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveInStart)(MA_HWAVEIN hwi);\ntypedef MA_MMRESULT (WINAPI * MA_PFN_waveInReset)(MA_HWAVEIN hwi);\n\nstatic ma_result ma_result_from_MMRESULT(MA_MMRESULT resultMM)\n{\n    switch (resultMM)\n    {\n        case MA_MMSYSERR_NOERROR:       return MA_SUCCESS;\n        case MA_MMSYSERR_BADDEVICEID:   return MA_INVALID_ARGS;\n        case MA_MMSYSERR_INVALHANDLE:   return MA_INVALID_ARGS;\n        case MA_MMSYSERR_NOMEM:         return MA_OUT_OF_MEMORY;\n        case MA_MMSYSERR_INVALFLAG:     return MA_INVALID_ARGS;\n        case MA_MMSYSERR_INVALPARAM:    return MA_INVALID_ARGS;\n        case MA_MMSYSERR_HANDLEBUSY:    return MA_BUSY;\n        case MA_MMSYSERR_ERROR:         return MA_ERROR;\n        default:                        return MA_ERROR;\n    }\n}\n\nstatic char* ma_find_last_character(char* str, char ch)\n{\n    char* last;\n\n    if (str == NULL) {\n        return NULL;\n    }\n\n    last = NULL;\n    while (*str != '\\0') {\n        if (*str == ch) {\n            last = str;\n        }\n\n        str += 1;\n    }\n\n    return last;\n}\n\nstatic ma_uint32 ma_get_period_size_in_bytes(ma_uint32 periodSizeInFrames, ma_format format, ma_uint32 channels)\n{\n    return periodSizeInFrames * ma_get_bytes_per_frame(format, channels);\n}\n\n\n/*\nOur own \"WAVECAPS\" structure that contains generic information shared between WAVEOUTCAPS2 and WAVEINCAPS2 so\nwe can do things generically and typesafely. Names are being kept the same for consistency.\n*/\ntypedef struct\n{\n    CHAR szPname[MA_MAXPNAMELEN];\n    DWORD dwFormats;\n    WORD wChannels;\n    GUID NameGuid;\n} MA_WAVECAPSA;\n\nstatic ma_result ma_get_best_info_from_formats_flags__winmm(DWORD dwFormats, WORD channels, WORD* pBitsPerSample, DWORD* pSampleRate)\n{\n    WORD bitsPerSample = 0;\n    DWORD sampleRate = 0;\n\n    if (pBitsPerSample) {\n        *pBitsPerSample = 0;\n    }\n    if (pSampleRate) {\n        *pSampleRate = 0;\n    }\n\n    if (channels == 1) {\n        bitsPerSample = 16;\n        if ((dwFormats & WAVE_FORMAT_48M16) != 0) {\n            sampleRate = 48000;\n        } else if ((dwFormats & WAVE_FORMAT_44M16) != 0) {\n            sampleRate = 44100;\n        } else if ((dwFormats & WAVE_FORMAT_2M16) != 0) {\n            sampleRate = 22050;\n        } else if ((dwFormats & WAVE_FORMAT_1M16) != 0) {\n            sampleRate = 11025;\n        } else if ((dwFormats & WAVE_FORMAT_96M16) != 0) {\n            sampleRate = 96000;\n        } else {\n            bitsPerSample = 8;\n            if ((dwFormats & WAVE_FORMAT_48M08) != 0) {\n                sampleRate = 48000;\n            } else if ((dwFormats & WAVE_FORMAT_44M08) != 0) {\n                sampleRate = 44100;\n            } else if ((dwFormats & WAVE_FORMAT_2M08) != 0) {\n                sampleRate = 22050;\n            } else if ((dwFormats & WAVE_FORMAT_1M08) != 0) {\n                sampleRate = 11025;\n            } else if ((dwFormats & WAVE_FORMAT_96M08) != 0) {\n                sampleRate = 96000;\n            } else {\n                return MA_FORMAT_NOT_SUPPORTED;\n            }\n        }\n    } else {\n        bitsPerSample = 16;\n        if ((dwFormats & WAVE_FORMAT_48S16) != 0) {\n            sampleRate = 48000;\n        } else if ((dwFormats & WAVE_FORMAT_44S16) != 0) {\n            sampleRate = 44100;\n        } else if ((dwFormats & WAVE_FORMAT_2S16) != 0) {\n            sampleRate = 22050;\n        } else if ((dwFormats & WAVE_FORMAT_1S16) != 0) {\n            sampleRate = 11025;\n        } else if ((dwFormats & WAVE_FORMAT_96S16) != 0) {\n            sampleRate = 96000;\n        } else {\n            bitsPerSample = 8;\n            if ((dwFormats & WAVE_FORMAT_48S08) != 0) {\n                sampleRate = 48000;\n            } else if ((dwFormats & WAVE_FORMAT_44S08) != 0) {\n                sampleRate = 44100;\n            } else if ((dwFormats & WAVE_FORMAT_2S08) != 0) {\n                sampleRate = 22050;\n            } else if ((dwFormats & WAVE_FORMAT_1S08) != 0) {\n                sampleRate = 11025;\n            } else if ((dwFormats & WAVE_FORMAT_96S08) != 0) {\n                sampleRate = 96000;\n            } else {\n                return MA_FORMAT_NOT_SUPPORTED;\n            }\n        }\n    }\n\n    if (pBitsPerSample) {\n        *pBitsPerSample = bitsPerSample;\n    }\n    if (pSampleRate) {\n        *pSampleRate = sampleRate;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_formats_flags_to_WAVEFORMATEX__winmm(DWORD dwFormats, WORD channels, MA_WAVEFORMATEX* pWF)\n{\n    ma_result result;\n\n    MA_ASSERT(pWF != NULL);\n\n    MA_ZERO_OBJECT(pWF);\n    pWF->cbSize     = sizeof(*pWF);\n    pWF->wFormatTag = WAVE_FORMAT_PCM;\n    pWF->nChannels  = (WORD)channels;\n    if (pWF->nChannels > 2) {\n        pWF->nChannels = 2;\n    }\n\n    result = ma_get_best_info_from_formats_flags__winmm(dwFormats, channels, &pWF->wBitsPerSample, &pWF->nSamplesPerSec);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pWF->nBlockAlign     = (WORD)(pWF->nChannels * pWF->wBitsPerSample / 8);\n    pWF->nAvgBytesPerSec = pWF->nBlockAlign * pWF->nSamplesPerSec;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_get_device_info_from_WAVECAPS(ma_context* pContext, MA_WAVECAPSA* pCaps, ma_device_info* pDeviceInfo)\n{\n    WORD bitsPerSample;\n    DWORD sampleRate;\n    ma_result result;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pCaps != NULL);\n    MA_ASSERT(pDeviceInfo != NULL);\n\n    /*\n    Name / Description\n\n    Unfortunately the name specified in WAVE(OUT/IN)CAPS2 is limited to 31 characters. This results in an unprofessional looking\n    situation where the names of the devices are truncated. To help work around this, we need to look at the name GUID and try\n    looking in the registry for the full name. If we can't find it there, we need to just fall back to the default name.\n    */\n\n    /* Set the default to begin with. */\n    ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), pCaps->szPname, (size_t)-1);\n\n    /*\n    Now try the registry. There's a few things to consider here:\n    - The name GUID can be null, in which we case we just need to stick to the original 31 characters.\n    - If the name GUID is not present in the registry we'll also need to stick to the original 31 characters.\n    - I like consistency, so I want the returned device names to be consistent with those returned by WASAPI and DirectSound. The\n      problem, however is that WASAPI and DirectSound use \"<component> (<name>)\" format (such as \"Speakers (High Definition Audio)\"),\n      but WinMM does not specificy the component name. From my admittedly limited testing, I've notice the component name seems to\n      usually fit within the 31 characters of the fixed sized buffer, so what I'm going to do is parse that string for the component\n      name, and then concatenate the name from the registry.\n    */\n    if (!ma_is_guid_null(&pCaps->NameGuid)) {\n        WCHAR guidStrW[256];\n        if (((MA_PFN_StringFromGUID2)pContext->win32.StringFromGUID2)(&pCaps->NameGuid, guidStrW, ma_countof(guidStrW)) > 0) {\n            char guidStr[256];\n            char keyStr[1024];\n            HKEY hKey;\n\n            WideCharToMultiByte(CP_UTF8, 0, guidStrW, -1, guidStr, sizeof(guidStr), 0, FALSE);\n\n            ma_strcpy_s(keyStr, sizeof(keyStr), \"SYSTEM\\\\CurrentControlSet\\\\Control\\\\MediaCategories\\\\\");\n            ma_strcat_s(keyStr, sizeof(keyStr), guidStr);\n\n            if (((MA_PFN_RegOpenKeyExA)pContext->win32.RegOpenKeyExA)(HKEY_LOCAL_MACHINE, keyStr, 0, KEY_READ, &hKey) == ERROR_SUCCESS) {\n                BYTE nameFromReg[512];\n                DWORD nameFromRegSize = sizeof(nameFromReg);\n                LONG resultWin32 = ((MA_PFN_RegQueryValueExA)pContext->win32.RegQueryValueExA)(hKey, \"Name\", 0, NULL, (BYTE*)nameFromReg, (DWORD*)&nameFromRegSize);\n                ((MA_PFN_RegCloseKey)pContext->win32.RegCloseKey)(hKey);\n\n                if (resultWin32 == ERROR_SUCCESS) {\n                    /* We have the value from the registry, so now we need to construct the name string. */\n                    char name[1024];\n                    if (ma_strcpy_s(name, sizeof(name), pDeviceInfo->name) == 0) {\n                        char* nameBeg = ma_find_last_character(name, '(');\n                        if (nameBeg != NULL) {\n                            size_t leadingLen = (nameBeg - name);\n                            ma_strncpy_s(nameBeg + 1, sizeof(name) - leadingLen, (const char*)nameFromReg, (size_t)-1);\n\n                            /* The closing \")\", if it can fit. */\n                            if (leadingLen + nameFromRegSize < sizeof(name)-1) {\n                                ma_strcat_s(name, sizeof(name), \")\");\n                            }\n\n                            ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), name, (size_t)-1);\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n\n    result = ma_get_best_info_from_formats_flags__winmm(pCaps->dwFormats, pCaps->wChannels, &bitsPerSample, &sampleRate);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (bitsPerSample == 8) {\n        pDeviceInfo->nativeDataFormats[0].format = ma_format_u8;\n    } else if (bitsPerSample == 16) {\n        pDeviceInfo->nativeDataFormats[0].format = ma_format_s16;\n    } else if (bitsPerSample == 24) {\n        pDeviceInfo->nativeDataFormats[0].format = ma_format_s24;\n    } else if (bitsPerSample == 32) {\n        pDeviceInfo->nativeDataFormats[0].format = ma_format_s32;\n    } else {\n        return MA_FORMAT_NOT_SUPPORTED;\n    }\n    pDeviceInfo->nativeDataFormats[0].channels   = pCaps->wChannels;\n    pDeviceInfo->nativeDataFormats[0].sampleRate = sampleRate;\n    pDeviceInfo->nativeDataFormats[0].flags      = 0;\n    pDeviceInfo->nativeDataFormatCount = 1;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_get_device_info_from_WAVEOUTCAPS2(ma_context* pContext, MA_WAVEOUTCAPS2A* pCaps, ma_device_info* pDeviceInfo)\n{\n    MA_WAVECAPSA caps;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pCaps != NULL);\n    MA_ASSERT(pDeviceInfo != NULL);\n\n    MA_COPY_MEMORY(caps.szPname, pCaps->szPname, sizeof(caps.szPname));\n    caps.dwFormats = pCaps->dwFormats;\n    caps.wChannels = pCaps->wChannels;\n    caps.NameGuid  = pCaps->NameGuid;\n    return ma_context_get_device_info_from_WAVECAPS(pContext, &caps, pDeviceInfo);\n}\n\nstatic ma_result ma_context_get_device_info_from_WAVEINCAPS2(ma_context* pContext, MA_WAVEINCAPS2A* pCaps, ma_device_info* pDeviceInfo)\n{\n    MA_WAVECAPSA caps;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pCaps != NULL);\n    MA_ASSERT(pDeviceInfo != NULL);\n\n    MA_COPY_MEMORY(caps.szPname, pCaps->szPname, sizeof(caps.szPname));\n    caps.dwFormats = pCaps->dwFormats;\n    caps.wChannels = pCaps->wChannels;\n    caps.NameGuid  = pCaps->NameGuid;\n    return ma_context_get_device_info_from_WAVECAPS(pContext, &caps, pDeviceInfo);\n}\n\n\nstatic ma_result ma_context_enumerate_devices__winmm(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    UINT playbackDeviceCount;\n    UINT captureDeviceCount;\n    UINT iPlaybackDevice;\n    UINT iCaptureDevice;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(callback != NULL);\n\n    /* Playback. */\n    playbackDeviceCount = ((MA_PFN_waveOutGetNumDevs)pContext->winmm.waveOutGetNumDevs)();\n    for (iPlaybackDevice = 0; iPlaybackDevice < playbackDeviceCount; ++iPlaybackDevice) {\n        MA_MMRESULT result;\n        MA_WAVEOUTCAPS2A caps;\n\n        MA_ZERO_OBJECT(&caps);\n\n        result = ((MA_PFN_waveOutGetDevCapsA)pContext->winmm.waveOutGetDevCapsA)(iPlaybackDevice, (MA_WAVEOUTCAPSA*)&caps, sizeof(caps));\n        if (result == MA_MMSYSERR_NOERROR) {\n            ma_device_info deviceInfo;\n\n            MA_ZERO_OBJECT(&deviceInfo);\n            deviceInfo.id.winmm = iPlaybackDevice;\n\n            /* The first enumerated device is the default device. */\n            if (iPlaybackDevice == 0) {\n                deviceInfo.isDefault = MA_TRUE;\n            }\n\n            if (ma_context_get_device_info_from_WAVEOUTCAPS2(pContext, &caps, &deviceInfo) == MA_SUCCESS) {\n                ma_bool32 cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData);\n                if (cbResult == MA_FALSE) {\n                    return MA_SUCCESS; /* Enumeration was stopped. */\n                }\n            }\n        }\n    }\n\n    /* Capture. */\n    captureDeviceCount = ((MA_PFN_waveInGetNumDevs)pContext->winmm.waveInGetNumDevs)();\n    for (iCaptureDevice = 0; iCaptureDevice < captureDeviceCount; ++iCaptureDevice) {\n        MA_MMRESULT result;\n        MA_WAVEINCAPS2A caps;\n\n        MA_ZERO_OBJECT(&caps);\n\n        result = ((MA_PFN_waveInGetDevCapsA)pContext->winmm.waveInGetDevCapsA)(iCaptureDevice, (MA_WAVEINCAPSA*)&caps, sizeof(caps));\n        if (result == MA_MMSYSERR_NOERROR) {\n            ma_device_info deviceInfo;\n\n            MA_ZERO_OBJECT(&deviceInfo);\n            deviceInfo.id.winmm = iCaptureDevice;\n\n            /* The first enumerated device is the default device. */\n            if (iCaptureDevice == 0) {\n                deviceInfo.isDefault = MA_TRUE;\n            }\n\n            if (ma_context_get_device_info_from_WAVEINCAPS2(pContext, &caps, &deviceInfo) == MA_SUCCESS) {\n                ma_bool32 cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData);\n                if (cbResult == MA_FALSE) {\n                    return MA_SUCCESS; /* Enumeration was stopped. */\n                }\n            }\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_get_device_info__winmm(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    UINT winMMDeviceID;\n\n    MA_ASSERT(pContext != NULL);\n\n    winMMDeviceID = 0;\n    if (pDeviceID != NULL) {\n        winMMDeviceID = (UINT)pDeviceID->winmm;\n    }\n\n    pDeviceInfo->id.winmm = winMMDeviceID;\n\n    /* The first ID is the default device. */\n    if (winMMDeviceID == 0) {\n        pDeviceInfo->isDefault = MA_TRUE;\n    }\n\n    if (deviceType == ma_device_type_playback) {\n        MA_MMRESULT result;\n        MA_WAVEOUTCAPS2A caps;\n\n        MA_ZERO_OBJECT(&caps);\n\n        result = ((MA_PFN_waveOutGetDevCapsA)pContext->winmm.waveOutGetDevCapsA)(winMMDeviceID, (MA_WAVEOUTCAPSA*)&caps, sizeof(caps));\n        if (result == MA_MMSYSERR_NOERROR) {\n            return ma_context_get_device_info_from_WAVEOUTCAPS2(pContext, &caps, pDeviceInfo);\n        }\n    } else {\n        MA_MMRESULT result;\n        MA_WAVEINCAPS2A caps;\n\n        MA_ZERO_OBJECT(&caps);\n\n        result = ((MA_PFN_waveInGetDevCapsA)pContext->winmm.waveInGetDevCapsA)(winMMDeviceID, (MA_WAVEINCAPSA*)&caps, sizeof(caps));\n        if (result == MA_MMSYSERR_NOERROR) {\n            return ma_context_get_device_info_from_WAVEINCAPS2(pContext, &caps, pDeviceInfo);\n        }\n    }\n\n    return MA_NO_DEVICE;\n}\n\n\nstatic ma_result ma_device_uninit__winmm(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        ((MA_PFN_waveInClose)pDevice->pContext->winmm.waveInClose)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture);\n        CloseHandle((HANDLE)pDevice->winmm.hEventCapture);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ((MA_PFN_waveOutReset)pDevice->pContext->winmm.waveOutReset)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback);\n        ((MA_PFN_waveOutClose)pDevice->pContext->winmm.waveOutClose)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback);\n        CloseHandle((HANDLE)pDevice->winmm.hEventPlayback);\n    }\n\n    ma_free(pDevice->winmm._pHeapData, &pDevice->pContext->allocationCallbacks);\n\n    MA_ZERO_OBJECT(&pDevice->winmm);   /* Safety. */\n\n    return MA_SUCCESS;\n}\n\nstatic ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__winmm(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile)\n{\n    /* WinMM has a minimum period size of 40ms. */\n    ma_uint32 minPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(40, nativeSampleRate);\n    ma_uint32 periodSizeInFrames;\n\n    periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, nativeSampleRate, performanceProfile);\n    if (periodSizeInFrames < minPeriodSizeInFrames) {\n        periodSizeInFrames = minPeriodSizeInFrames;\n    }\n\n    return periodSizeInFrames;\n}\n\nstatic ma_result ma_device_init__winmm(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n    const char* errorMsg = \"\";\n    ma_result errorCode = MA_ERROR;\n    ma_result result = MA_SUCCESS;\n    ma_uint32 heapSize;\n    UINT winMMDeviceIDPlayback = 0;\n    UINT winMMDeviceIDCapture  = 0;\n\n    MA_ASSERT(pDevice != NULL);\n\n    MA_ZERO_OBJECT(&pDevice->winmm);\n\n    if (pConfig->deviceType == ma_device_type_loopback) {\n        return MA_DEVICE_TYPE_NOT_SUPPORTED;\n    }\n\n    /* No exlusive mode with WinMM. */\n    if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) ||\n        ((pConfig->deviceType == ma_device_type_capture  || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode  == ma_share_mode_exclusive)) {\n        return MA_SHARE_MODE_NOT_SUPPORTED;\n    }\n\n    if (pDescriptorPlayback->pDeviceID != NULL) {\n        winMMDeviceIDPlayback = (UINT)pDescriptorPlayback->pDeviceID->winmm;\n    }\n    if (pDescriptorCapture->pDeviceID != NULL) {\n        winMMDeviceIDCapture = (UINT)pDescriptorCapture->pDeviceID->winmm;\n    }\n\n    /* The capture device needs to be initialized first. */\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        MA_WAVEINCAPSA caps;\n        MA_WAVEFORMATEX wf;\n        MA_MMRESULT resultMM;\n\n        /* We use an event to know when a new fragment needs to be enqueued. */\n        pDevice->winmm.hEventCapture = (ma_handle)CreateEventA(NULL, TRUE, TRUE, NULL);\n        if (pDevice->winmm.hEventCapture == NULL) {\n            errorMsg = \"[WinMM] Failed to create event for fragment enqueing for the capture device.\", errorCode = ma_result_from_GetLastError(GetLastError());\n            goto on_error;\n        }\n\n        /* The format should be based on the device's actual format. */\n        if (((MA_PFN_waveInGetDevCapsA)pDevice->pContext->winmm.waveInGetDevCapsA)(winMMDeviceIDCapture, &caps, sizeof(caps)) != MA_MMSYSERR_NOERROR) {\n            errorMsg = \"[WinMM] Failed to retrieve internal device caps.\", errorCode = MA_FORMAT_NOT_SUPPORTED;\n            goto on_error;\n        }\n\n        result = ma_formats_flags_to_WAVEFORMATEX__winmm(caps.dwFormats, caps.wChannels, &wf);\n        if (result != MA_SUCCESS) {\n            errorMsg = \"[WinMM] Could not find appropriate format for internal device.\", errorCode = result;\n            goto on_error;\n        }\n\n        resultMM = ((MA_PFN_waveInOpen)pDevice->pContext->winmm.waveInOpen)((MA_HWAVEIN*)&pDevice->winmm.hDeviceCapture, winMMDeviceIDCapture, &wf, (DWORD_PTR)pDevice->winmm.hEventCapture, (DWORD_PTR)pDevice, MA_CALLBACK_EVENT | MA_WAVE_ALLOWSYNC);\n        if (resultMM != MA_MMSYSERR_NOERROR) {\n            errorMsg = \"[WinMM] Failed to open capture device.\", errorCode = MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n            goto on_error;\n        }\n\n        pDescriptorCapture->format             = ma_format_from_WAVEFORMATEX(&wf);\n        pDescriptorCapture->channels           = wf.nChannels;\n        pDescriptorCapture->sampleRate         = wf.nSamplesPerSec;\n        ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorCapture->channels);\n        pDescriptorCapture->periodCount        = pDescriptorCapture->periodCount;\n        pDescriptorCapture->periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__winmm(pDescriptorCapture, pDescriptorCapture->sampleRate, pConfig->performanceProfile);\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        MA_WAVEOUTCAPSA caps;\n        MA_WAVEFORMATEX wf;\n        MA_MMRESULT resultMM;\n\n        /* We use an event to know when a new fragment needs to be enqueued. */\n        pDevice->winmm.hEventPlayback = (ma_handle)CreateEventA(NULL, TRUE, TRUE, NULL);\n        if (pDevice->winmm.hEventPlayback == NULL) {\n            errorMsg = \"[WinMM] Failed to create event for fragment enqueing for the playback device.\", errorCode = ma_result_from_GetLastError(GetLastError());\n            goto on_error;\n        }\n\n        /* The format should be based on the device's actual format. */\n        if (((MA_PFN_waveOutGetDevCapsA)pDevice->pContext->winmm.waveOutGetDevCapsA)(winMMDeviceIDPlayback, &caps, sizeof(caps)) != MA_MMSYSERR_NOERROR) {\n            errorMsg = \"[WinMM] Failed to retrieve internal device caps.\", errorCode = MA_FORMAT_NOT_SUPPORTED;\n            goto on_error;\n        }\n\n        result = ma_formats_flags_to_WAVEFORMATEX__winmm(caps.dwFormats, caps.wChannels, &wf);\n        if (result != MA_SUCCESS) {\n            errorMsg = \"[WinMM] Could not find appropriate format for internal device.\", errorCode = result;\n            goto on_error;\n        }\n\n        resultMM = ((MA_PFN_waveOutOpen)pDevice->pContext->winmm.waveOutOpen)((MA_HWAVEOUT*)&pDevice->winmm.hDevicePlayback, winMMDeviceIDPlayback, &wf, (DWORD_PTR)pDevice->winmm.hEventPlayback, (DWORD_PTR)pDevice, MA_CALLBACK_EVENT | MA_WAVE_ALLOWSYNC);\n        if (resultMM != MA_MMSYSERR_NOERROR) {\n            errorMsg = \"[WinMM] Failed to open playback device.\", errorCode = MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n            goto on_error;\n        }\n\n        pDescriptorPlayback->format             = ma_format_from_WAVEFORMATEX(&wf);\n        pDescriptorPlayback->channels           = wf.nChannels;\n        pDescriptorPlayback->sampleRate         = wf.nSamplesPerSec;\n        ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pDescriptorPlayback->channelMap, ma_countof(pDescriptorPlayback->channelMap), pDescriptorPlayback->channels);\n        pDescriptorPlayback->periodCount        = pDescriptorPlayback->periodCount;\n        pDescriptorPlayback->periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__winmm(pDescriptorPlayback, pDescriptorPlayback->sampleRate, pConfig->performanceProfile);\n    }\n\n    /*\n    The heap allocated data is allocated like so:\n\n    [Capture WAVEHDRs][Playback WAVEHDRs][Capture Intermediary Buffer][Playback Intermediary Buffer]\n    */\n    heapSize = 0;\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        heapSize += sizeof(MA_WAVEHDR)*pDescriptorCapture->periodCount + (pDescriptorCapture->periodSizeInFrames * pDescriptorCapture->periodCount * ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels));\n    }\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        heapSize += sizeof(MA_WAVEHDR)*pDescriptorPlayback->periodCount + (pDescriptorPlayback->periodSizeInFrames * pDescriptorPlayback->periodCount * ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels));\n    }\n\n    pDevice->winmm._pHeapData = (ma_uint8*)ma_calloc(heapSize, &pDevice->pContext->allocationCallbacks);\n    if (pDevice->winmm._pHeapData == NULL) {\n        errorMsg = \"[WinMM] Failed to allocate memory for the intermediary buffer.\", errorCode = MA_OUT_OF_MEMORY;\n        goto on_error;\n    }\n\n    MA_ZERO_MEMORY(pDevice->winmm._pHeapData, heapSize);\n\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        ma_uint32 iPeriod;\n\n        if (pConfig->deviceType == ma_device_type_capture) {\n            pDevice->winmm.pWAVEHDRCapture            = pDevice->winmm._pHeapData;\n            pDevice->winmm.pIntermediaryBufferCapture = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*(pDescriptorCapture->periodCount));\n        } else {\n            pDevice->winmm.pWAVEHDRCapture            = pDevice->winmm._pHeapData;\n            pDevice->winmm.pIntermediaryBufferCapture = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*(pDescriptorCapture->periodCount + pDescriptorPlayback->periodCount));\n        }\n\n        /* Prepare headers. */\n        for (iPeriod = 0; iPeriod < pDescriptorCapture->periodCount; ++iPeriod) {\n            ma_uint32 periodSizeInBytes = ma_get_period_size_in_bytes(pDescriptorCapture->periodSizeInFrames, pDescriptorCapture->format, pDescriptorCapture->channels);\n\n            ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].lpData         = (char*)(pDevice->winmm.pIntermediaryBufferCapture + (periodSizeInBytes*iPeriod));\n            ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].dwBufferLength = periodSizeInBytes;\n            ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].dwFlags        = 0L;\n            ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].dwLoops        = 0L;\n            ((MA_PFN_waveInPrepareHeader)pDevice->pContext->winmm.waveInPrepareHeader)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod], sizeof(MA_WAVEHDR));\n\n            /*\n            The user data of the MA_WAVEHDR structure is a single flag the controls whether or not it is ready for writing. Consider it to be named \"isLocked\". A value of 0 means\n            it's unlocked and available for writing. A value of 1 means it's locked.\n            */\n            ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod].dwUser = 0;\n        }\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        ma_uint32 iPeriod;\n\n        if (pConfig->deviceType == ma_device_type_playback) {\n            pDevice->winmm.pWAVEHDRPlayback            = pDevice->winmm._pHeapData;\n            pDevice->winmm.pIntermediaryBufferPlayback = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*pDescriptorPlayback->periodCount);\n        } else {\n            pDevice->winmm.pWAVEHDRPlayback            = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*(pDescriptorCapture->periodCount));\n            pDevice->winmm.pIntermediaryBufferPlayback = pDevice->winmm._pHeapData + (sizeof(MA_WAVEHDR)*(pDescriptorCapture->periodCount + pDescriptorPlayback->periodCount)) + (pDescriptorCapture->periodSizeInFrames*pDescriptorCapture->periodCount*ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels));\n        }\n\n        /* Prepare headers. */\n        for (iPeriod = 0; iPeriod < pDescriptorPlayback->periodCount; ++iPeriod) {\n            ma_uint32 periodSizeInBytes = ma_get_period_size_in_bytes(pDescriptorPlayback->periodSizeInFrames, pDescriptorPlayback->format, pDescriptorPlayback->channels);\n\n            ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].lpData         = (char*)(pDevice->winmm.pIntermediaryBufferPlayback + (periodSizeInBytes*iPeriod));\n            ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].dwBufferLength = periodSizeInBytes;\n            ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].dwFlags        = 0L;\n            ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].dwLoops        = 0L;\n            ((MA_PFN_waveOutPrepareHeader)pDevice->pContext->winmm.waveOutPrepareHeader)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod], sizeof(MA_WAVEHDR));\n\n            /*\n            The user data of the MA_WAVEHDR structure is a single flag the controls whether or not it is ready for writing. Consider it to be named \"isLocked\". A value of 0 means\n            it's unlocked and available for writing. A value of 1 means it's locked.\n            */\n            ((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod].dwUser = 0;\n        }\n    }\n\n    return MA_SUCCESS;\n\non_error:\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        if (pDevice->winmm.pWAVEHDRCapture != NULL) {\n            ma_uint32 iPeriod;\n            for (iPeriod = 0; iPeriod < pDescriptorCapture->periodCount; ++iPeriod) {\n                ((MA_PFN_waveInUnprepareHeader)pDevice->pContext->winmm.waveInUnprepareHeader)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod], sizeof(MA_WAVEHDR));\n            }\n        }\n\n        ((MA_PFN_waveInClose)pDevice->pContext->winmm.waveInClose)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        if (pDevice->winmm.pWAVEHDRCapture != NULL) {\n            ma_uint32 iPeriod;\n            for (iPeriod = 0; iPeriod < pDescriptorPlayback->periodCount; ++iPeriod) {\n                ((MA_PFN_waveOutUnprepareHeader)pDevice->pContext->winmm.waveOutUnprepareHeader)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback)[iPeriod], sizeof(MA_WAVEHDR));\n            }\n        }\n\n        ((MA_PFN_waveOutClose)pDevice->pContext->winmm.waveOutClose)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback);\n    }\n\n    ma_free(pDevice->winmm._pHeapData, &pDevice->pContext->allocationCallbacks);\n\n    if (errorMsg != NULL && errorMsg[0] != '\\0') {\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"%s\", errorMsg);\n    }\n\n    return errorCode;\n}\n\nstatic ma_result ma_device_start__winmm(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        MA_MMRESULT resultMM;\n        MA_WAVEHDR* pWAVEHDR;\n        ma_uint32 iPeriod;\n\n        pWAVEHDR = (MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture;\n\n        /* Make sure the event is reset to a non-signaled state to ensure we don't prematurely return from WaitForSingleObject(). */\n        ResetEvent((HANDLE)pDevice->winmm.hEventCapture);\n\n        /* To start the device we attach all of the buffers and then start it. As the buffers are filled with data we will get notifications. */\n        for (iPeriod = 0; iPeriod < pDevice->capture.internalPeriods; ++iPeriod) {\n            resultMM = ((MA_PFN_waveInAddBuffer)pDevice->pContext->winmm.waveInAddBuffer)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[iPeriod], sizeof(MA_WAVEHDR));\n            if (resultMM != MA_MMSYSERR_NOERROR) {\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WinMM] Failed to attach input buffers to capture device in preparation for capture.\");\n                return ma_result_from_MMRESULT(resultMM);\n            }\n\n            /* Make sure all of the buffers start out locked. We don't want to access them until the backend tells us we can. */\n            pWAVEHDR[iPeriod].dwUser = 1;   /* 1 = locked. */\n        }\n\n        /* Capture devices need to be explicitly started, unlike playback devices. */\n        resultMM = ((MA_PFN_waveInStart)pDevice->pContext->winmm.waveInStart)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture);\n        if (resultMM != MA_MMSYSERR_NOERROR) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WinMM] Failed to start backend device.\");\n            return ma_result_from_MMRESULT(resultMM);\n        }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        /* Don't need to do anything for playback. It'll be started automatically in ma_device_start__winmm(). */\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop__winmm(ma_device* pDevice)\n{\n    MA_MMRESULT resultMM;\n\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        if (pDevice->winmm.hDeviceCapture == NULL) {\n            return MA_INVALID_ARGS;\n        }\n\n        resultMM = ((MA_PFN_waveInReset)pDevice->pContext->winmm.waveInReset)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture);\n        if (resultMM != MA_MMSYSERR_NOERROR) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, \"[WinMM] WARNING: Failed to reset capture device.\");\n        }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ma_uint32 iPeriod;\n        MA_WAVEHDR* pWAVEHDR;\n\n        if (pDevice->winmm.hDevicePlayback == NULL) {\n            return MA_INVALID_ARGS;\n        }\n\n        /* We need to drain the device. To do this we just loop over each header and if it's locked just wait for the event. */\n        pWAVEHDR = (MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback;\n        for (iPeriod = 0; iPeriod < pDevice->playback.internalPeriods; iPeriod += 1) {\n            if (pWAVEHDR[iPeriod].dwUser == 1) { /* 1 = locked. */\n                if (WaitForSingleObject((HANDLE)pDevice->winmm.hEventPlayback, INFINITE) != WAIT_OBJECT_0) {\n                    break;  /* An error occurred so just abandon ship and stop the device without draining. */\n                }\n\n                pWAVEHDR[iPeriod].dwUser = 0;\n            }\n        }\n\n        resultMM = ((MA_PFN_waveOutReset)pDevice->pContext->winmm.waveOutReset)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback);\n        if (resultMM != MA_MMSYSERR_NOERROR) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, \"[WinMM] WARNING: Failed to reset playback device.\");\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_write__winmm(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten)\n{\n    ma_result result = MA_SUCCESS;\n    MA_MMRESULT resultMM;\n    ma_uint32 totalFramesWritten;\n    MA_WAVEHDR* pWAVEHDR;\n\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(pPCMFrames != NULL);\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = 0;\n    }\n\n    pWAVEHDR = (MA_WAVEHDR*)pDevice->winmm.pWAVEHDRPlayback;\n\n    /* Keep processing as much data as possible. */\n    totalFramesWritten = 0;\n    while (totalFramesWritten < frameCount) {\n        /* If the current header has some space available we need to write part of it. */\n        if (pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwUser == 0) { /* 0 = unlocked. */\n            /*\n            This header has room in it. We copy as much of it as we can. If we end up fully consuming the buffer we need to\n            write it out and move on to the next iteration.\n            */\n            ma_uint32 bpf = ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels);\n            ma_uint32 framesRemainingInHeader = (pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwBufferLength/bpf) - pDevice->winmm.headerFramesConsumedPlayback;\n\n            ma_uint32 framesToCopy = ma_min(framesRemainingInHeader, (frameCount - totalFramesWritten));\n            const void* pSrc = ma_offset_ptr(pPCMFrames, totalFramesWritten*bpf);\n            void* pDst = ma_offset_ptr(pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].lpData, pDevice->winmm.headerFramesConsumedPlayback*bpf);\n            MA_COPY_MEMORY(pDst, pSrc, framesToCopy*bpf);\n\n            pDevice->winmm.headerFramesConsumedPlayback += framesToCopy;\n            totalFramesWritten += framesToCopy;\n\n            /* If we've consumed the buffer entirely we need to write it out to the device. */\n            if (pDevice->winmm.headerFramesConsumedPlayback == (pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwBufferLength/bpf)) {\n                pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwUser = 1;            /* 1 = locked. */\n                pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwFlags &= ~MA_WHDR_DONE; /* <-- Need to make sure the WHDR_DONE flag is unset. */\n\n                /* Make sure the event is reset to a non-signaled state to ensure we don't prematurely return from WaitForSingleObject(). */\n                ResetEvent((HANDLE)pDevice->winmm.hEventPlayback);\n\n                /* The device will be started here. */\n                resultMM = ((MA_PFN_waveOutWrite)pDevice->pContext->winmm.waveOutWrite)((MA_HWAVEOUT)pDevice->winmm.hDevicePlayback, &pWAVEHDR[pDevice->winmm.iNextHeaderPlayback], sizeof(MA_WAVEHDR));\n                if (resultMM != MA_MMSYSERR_NOERROR) {\n                    result = ma_result_from_MMRESULT(resultMM);\n                    ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WinMM] waveOutWrite() failed.\");\n                    break;\n                }\n\n                /* Make sure we move to the next header. */\n                pDevice->winmm.iNextHeaderPlayback = (pDevice->winmm.iNextHeaderPlayback + 1) % pDevice->playback.internalPeriods;\n                pDevice->winmm.headerFramesConsumedPlayback = 0;\n            }\n\n            /* If at this point we have consumed the entire input buffer we can return. */\n            MA_ASSERT(totalFramesWritten <= frameCount);\n            if (totalFramesWritten == frameCount) {\n                break;\n            }\n\n            /* Getting here means there's more to process. */\n            continue;\n        }\n\n        /* Getting here means there isn't enough room in the buffer and we need to wait for one to become available. */\n        if (WaitForSingleObject((HANDLE)pDevice->winmm.hEventPlayback, INFINITE) != WAIT_OBJECT_0) {\n            result = MA_ERROR;\n            break;\n        }\n\n        /* Something happened. If the next buffer has been marked as done we need to reset a bit of state. */\n        if ((pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwFlags & MA_WHDR_DONE) != 0) {\n            pWAVEHDR[pDevice->winmm.iNextHeaderPlayback].dwUser = 0;    /* 0 = unlocked (make it available for writing). */\n            pDevice->winmm.headerFramesConsumedPlayback = 0;\n        }\n\n        /* If the device has been stopped we need to break. */\n        if (ma_device_get_state(pDevice) != ma_device_state_started) {\n            break;\n        }\n    }\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = totalFramesWritten;\n    }\n\n    return result;\n}\n\nstatic ma_result ma_device_read__winmm(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead)\n{\n    ma_result result = MA_SUCCESS;\n    MA_MMRESULT resultMM;\n    ma_uint32 totalFramesRead;\n    MA_WAVEHDR* pWAVEHDR;\n\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(pPCMFrames != NULL);\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    pWAVEHDR = (MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture;\n\n    /* Keep processing as much data as possible. */\n    totalFramesRead = 0;\n    while (totalFramesRead < frameCount) {\n        /* If the current header has some space available we need to write part of it. */\n        if (pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwUser == 0) { /* 0 = unlocked. */\n            /* The buffer is available for reading. If we fully consume it we need to add it back to the buffer. */\n            ma_uint32 bpf = ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels);\n            ma_uint32 framesRemainingInHeader = (pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwBufferLength/bpf) - pDevice->winmm.headerFramesConsumedCapture;\n\n            ma_uint32 framesToCopy = ma_min(framesRemainingInHeader, (frameCount - totalFramesRead));\n            const void* pSrc = ma_offset_ptr(pWAVEHDR[pDevice->winmm.iNextHeaderCapture].lpData, pDevice->winmm.headerFramesConsumedCapture*bpf);\n            void* pDst = ma_offset_ptr(pPCMFrames, totalFramesRead*bpf);\n            MA_COPY_MEMORY(pDst, pSrc, framesToCopy*bpf);\n\n            pDevice->winmm.headerFramesConsumedCapture += framesToCopy;\n            totalFramesRead += framesToCopy;\n\n            /* If we've consumed the buffer entirely we need to add it back to the device. */\n            if (pDevice->winmm.headerFramesConsumedCapture == (pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwBufferLength/bpf)) {\n                pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwUser = 1;            /* 1 = locked. */\n                pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwFlags &= ~MA_WHDR_DONE; /* <-- Need to make sure the WHDR_DONE flag is unset. */\n\n                /* Make sure the event is reset to a non-signaled state to ensure we don't prematurely return from WaitForSingleObject(). */\n                ResetEvent((HANDLE)pDevice->winmm.hEventCapture);\n\n                /* The device will be started here. */\n                resultMM = ((MA_PFN_waveInAddBuffer)pDevice->pContext->winmm.waveInAddBuffer)((MA_HWAVEIN)pDevice->winmm.hDeviceCapture, &((MA_WAVEHDR*)pDevice->winmm.pWAVEHDRCapture)[pDevice->winmm.iNextHeaderCapture], sizeof(MA_WAVEHDR));\n                if (resultMM != MA_MMSYSERR_NOERROR) {\n                    result = ma_result_from_MMRESULT(resultMM);\n                    ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[WinMM] waveInAddBuffer() failed.\");\n                    break;\n                }\n\n                /* Make sure we move to the next header. */\n                pDevice->winmm.iNextHeaderCapture = (pDevice->winmm.iNextHeaderCapture + 1) % pDevice->capture.internalPeriods;\n                pDevice->winmm.headerFramesConsumedCapture = 0;\n            }\n\n            /* If at this point we have filled the entire input buffer we can return. */\n            MA_ASSERT(totalFramesRead <= frameCount);\n            if (totalFramesRead == frameCount) {\n                break;\n            }\n\n            /* Getting here means there's more to process. */\n            continue;\n        }\n\n        /* Getting here means there isn't enough any data left to send to the client which means we need to wait for more. */\n        if (WaitForSingleObject((HANDLE)pDevice->winmm.hEventCapture, INFINITE) != WAIT_OBJECT_0) {\n            result = MA_ERROR;\n            break;\n        }\n\n        /* Something happened. If the next buffer has been marked as done we need to reset a bit of state. */\n        if ((pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwFlags & MA_WHDR_DONE) != 0) {\n            pWAVEHDR[pDevice->winmm.iNextHeaderCapture].dwUser = 0;    /* 0 = unlocked (make it available for reading). */\n            pDevice->winmm.headerFramesConsumedCapture = 0;\n        }\n\n        /* If the device has been stopped we need to break. */\n        if (ma_device_get_state(pDevice) != ma_device_state_started) {\n            break;\n        }\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = totalFramesRead;\n    }\n\n    return result;\n}\n\nstatic ma_result ma_context_uninit__winmm(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_winmm);\n\n    ma_dlclose(ma_context_get_log(pContext), pContext->winmm.hWinMM);\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init__winmm(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n    MA_ASSERT(pContext != NULL);\n\n    (void)pConfig;\n\n    pContext->winmm.hWinMM = ma_dlopen(ma_context_get_log(pContext), \"winmm.dll\");\n    if (pContext->winmm.hWinMM == NULL) {\n        return MA_NO_BACKEND;\n    }\n\n    pContext->winmm.waveOutGetNumDevs      = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveOutGetNumDevs\");\n    pContext->winmm.waveOutGetDevCapsA     = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveOutGetDevCapsA\");\n    pContext->winmm.waveOutOpen            = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveOutOpen\");\n    pContext->winmm.waveOutClose           = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveOutClose\");\n    pContext->winmm.waveOutPrepareHeader   = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveOutPrepareHeader\");\n    pContext->winmm.waveOutUnprepareHeader = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveOutUnprepareHeader\");\n    pContext->winmm.waveOutWrite           = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveOutWrite\");\n    pContext->winmm.waveOutReset           = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveOutReset\");\n    pContext->winmm.waveInGetNumDevs       = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveInGetNumDevs\");\n    pContext->winmm.waveInGetDevCapsA      = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveInGetDevCapsA\");\n    pContext->winmm.waveInOpen             = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveInOpen\");\n    pContext->winmm.waveInClose            = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveInClose\");\n    pContext->winmm.waveInPrepareHeader    = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveInPrepareHeader\");\n    pContext->winmm.waveInUnprepareHeader  = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveInUnprepareHeader\");\n    pContext->winmm.waveInAddBuffer        = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveInAddBuffer\");\n    pContext->winmm.waveInStart            = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveInStart\");\n    pContext->winmm.waveInReset            = ma_dlsym(ma_context_get_log(pContext), pContext->winmm.hWinMM, \"waveInReset\");\n\n    pCallbacks->onContextInit             = ma_context_init__winmm;\n    pCallbacks->onContextUninit           = ma_context_uninit__winmm;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__winmm;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__winmm;\n    pCallbacks->onDeviceInit              = ma_device_init__winmm;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__winmm;\n    pCallbacks->onDeviceStart             = ma_device_start__winmm;\n    pCallbacks->onDeviceStop              = ma_device_stop__winmm;\n    pCallbacks->onDeviceRead              = ma_device_read__winmm;\n    pCallbacks->onDeviceWrite             = ma_device_write__winmm;\n    pCallbacks->onDeviceDataLoop          = NULL;   /* This is a blocking read-write API, so this can be NULL since miniaudio will manage the audio thread for us. */\n\n    return MA_SUCCESS;\n}\n#endif\n\n\n\n\n/******************************************************************************\n\nALSA Backend\n\n******************************************************************************/\n#ifdef MA_HAS_ALSA\n\n#include <poll.h>           /* poll(), struct pollfd */\n#include <sys/eventfd.h>    /* eventfd() */\n\n#ifdef MA_NO_RUNTIME_LINKING\n\n/* asoundlib.h marks some functions with \"inline\" which isn't always supported. Need to emulate it. */\n#if !defined(__cplusplus)\n    #if defined(__STRICT_ANSI__)\n        #if !defined(inline)\n            #define inline __inline__ __attribute__((always_inline))\n            #define MA_INLINE_DEFINED\n        #endif\n    #endif\n#endif\n#include <alsa/asoundlib.h>\n#if defined(MA_INLINE_DEFINED)\n    #undef inline\n    #undef MA_INLINE_DEFINED\n#endif\n\ntypedef snd_pcm_uframes_t                       ma_snd_pcm_uframes_t;\ntypedef snd_pcm_sframes_t                       ma_snd_pcm_sframes_t;\ntypedef snd_pcm_stream_t                        ma_snd_pcm_stream_t;\ntypedef snd_pcm_format_t                        ma_snd_pcm_format_t;\ntypedef snd_pcm_access_t                        ma_snd_pcm_access_t;\ntypedef snd_pcm_t                               ma_snd_pcm_t;\ntypedef snd_pcm_hw_params_t                     ma_snd_pcm_hw_params_t;\ntypedef snd_pcm_sw_params_t                     ma_snd_pcm_sw_params_t;\ntypedef snd_pcm_format_mask_t                   ma_snd_pcm_format_mask_t;\ntypedef snd_pcm_info_t                          ma_snd_pcm_info_t;\ntypedef snd_pcm_channel_area_t                  ma_snd_pcm_channel_area_t;\ntypedef snd_pcm_chmap_t                         ma_snd_pcm_chmap_t;\ntypedef snd_pcm_state_t                         ma_snd_pcm_state_t;\n\n/* snd_pcm_stream_t */\n#define MA_SND_PCM_STREAM_PLAYBACK              SND_PCM_STREAM_PLAYBACK\n#define MA_SND_PCM_STREAM_CAPTURE               SND_PCM_STREAM_CAPTURE\n\n/* snd_pcm_format_t */\n#define MA_SND_PCM_FORMAT_UNKNOWN               SND_PCM_FORMAT_UNKNOWN\n#define MA_SND_PCM_FORMAT_U8                    SND_PCM_FORMAT_U8\n#define MA_SND_PCM_FORMAT_S16_LE                SND_PCM_FORMAT_S16_LE\n#define MA_SND_PCM_FORMAT_S16_BE                SND_PCM_FORMAT_S16_BE\n#define MA_SND_PCM_FORMAT_S24_LE                SND_PCM_FORMAT_S24_LE\n#define MA_SND_PCM_FORMAT_S24_BE                SND_PCM_FORMAT_S24_BE\n#define MA_SND_PCM_FORMAT_S32_LE                SND_PCM_FORMAT_S32_LE\n#define MA_SND_PCM_FORMAT_S32_BE                SND_PCM_FORMAT_S32_BE\n#define MA_SND_PCM_FORMAT_FLOAT_LE              SND_PCM_FORMAT_FLOAT_LE\n#define MA_SND_PCM_FORMAT_FLOAT_BE              SND_PCM_FORMAT_FLOAT_BE\n#define MA_SND_PCM_FORMAT_FLOAT64_LE            SND_PCM_FORMAT_FLOAT64_LE\n#define MA_SND_PCM_FORMAT_FLOAT64_BE            SND_PCM_FORMAT_FLOAT64_BE\n#define MA_SND_PCM_FORMAT_MU_LAW                SND_PCM_FORMAT_MU_LAW\n#define MA_SND_PCM_FORMAT_A_LAW                 SND_PCM_FORMAT_A_LAW\n#define MA_SND_PCM_FORMAT_S24_3LE               SND_PCM_FORMAT_S24_3LE\n#define MA_SND_PCM_FORMAT_S24_3BE               SND_PCM_FORMAT_S24_3BE\n\n/* ma_snd_pcm_access_t */\n#define MA_SND_PCM_ACCESS_MMAP_INTERLEAVED      SND_PCM_ACCESS_MMAP_INTERLEAVED\n#define MA_SND_PCM_ACCESS_MMAP_NONINTERLEAVED   SND_PCM_ACCESS_MMAP_NONINTERLEAVED\n#define MA_SND_PCM_ACCESS_MMAP_COMPLEX          SND_PCM_ACCESS_MMAP_COMPLEX\n#define MA_SND_PCM_ACCESS_RW_INTERLEAVED        SND_PCM_ACCESS_RW_INTERLEAVED\n#define MA_SND_PCM_ACCESS_RW_NONINTERLEAVED     SND_PCM_ACCESS_RW_NONINTERLEAVED\n\n/* Channel positions. */\n#define MA_SND_CHMAP_UNKNOWN                    SND_CHMAP_UNKNOWN\n#define MA_SND_CHMAP_NA                         SND_CHMAP_NA\n#define MA_SND_CHMAP_MONO                       SND_CHMAP_MONO\n#define MA_SND_CHMAP_FL                         SND_CHMAP_FL\n#define MA_SND_CHMAP_FR                         SND_CHMAP_FR\n#define MA_SND_CHMAP_RL                         SND_CHMAP_RL\n#define MA_SND_CHMAP_RR                         SND_CHMAP_RR\n#define MA_SND_CHMAP_FC                         SND_CHMAP_FC\n#define MA_SND_CHMAP_LFE                        SND_CHMAP_LFE\n#define MA_SND_CHMAP_SL                         SND_CHMAP_SL\n#define MA_SND_CHMAP_SR                         SND_CHMAP_SR\n#define MA_SND_CHMAP_RC                         SND_CHMAP_RC\n#define MA_SND_CHMAP_FLC                        SND_CHMAP_FLC\n#define MA_SND_CHMAP_FRC                        SND_CHMAP_FRC\n#define MA_SND_CHMAP_RLC                        SND_CHMAP_RLC\n#define MA_SND_CHMAP_RRC                        SND_CHMAP_RRC\n#define MA_SND_CHMAP_FLW                        SND_CHMAP_FLW\n#define MA_SND_CHMAP_FRW                        SND_CHMAP_FRW\n#define MA_SND_CHMAP_FLH                        SND_CHMAP_FLH\n#define MA_SND_CHMAP_FCH                        SND_CHMAP_FCH\n#define MA_SND_CHMAP_FRH                        SND_CHMAP_FRH\n#define MA_SND_CHMAP_TC                         SND_CHMAP_TC\n#define MA_SND_CHMAP_TFL                        SND_CHMAP_TFL\n#define MA_SND_CHMAP_TFR                        SND_CHMAP_TFR\n#define MA_SND_CHMAP_TFC                        SND_CHMAP_TFC\n#define MA_SND_CHMAP_TRL                        SND_CHMAP_TRL\n#define MA_SND_CHMAP_TRR                        SND_CHMAP_TRR\n#define MA_SND_CHMAP_TRC                        SND_CHMAP_TRC\n#define MA_SND_CHMAP_TFLC                       SND_CHMAP_TFLC\n#define MA_SND_CHMAP_TFRC                       SND_CHMAP_TFRC\n#define MA_SND_CHMAP_TSL                        SND_CHMAP_TSL\n#define MA_SND_CHMAP_TSR                        SND_CHMAP_TSR\n#define MA_SND_CHMAP_LLFE                       SND_CHMAP_LLFE\n#define MA_SND_CHMAP_RLFE                       SND_CHMAP_RLFE\n#define MA_SND_CHMAP_BC                         SND_CHMAP_BC\n#define MA_SND_CHMAP_BLC                        SND_CHMAP_BLC\n#define MA_SND_CHMAP_BRC                        SND_CHMAP_BRC\n\n/* Open mode flags. */\n#define MA_SND_PCM_NO_AUTO_RESAMPLE             SND_PCM_NO_AUTO_RESAMPLE\n#define MA_SND_PCM_NO_AUTO_CHANNELS             SND_PCM_NO_AUTO_CHANNELS\n#define MA_SND_PCM_NO_AUTO_FORMAT               SND_PCM_NO_AUTO_FORMAT\n#else\n#include <errno.h>  /* For EPIPE, etc. */\ntypedef unsigned long                           ma_snd_pcm_uframes_t;\ntypedef long                                    ma_snd_pcm_sframes_t;\ntypedef int                                     ma_snd_pcm_stream_t;\ntypedef int                                     ma_snd_pcm_format_t;\ntypedef int                                     ma_snd_pcm_access_t;\ntypedef int                                     ma_snd_pcm_state_t;\ntypedef struct ma_snd_pcm_t                     ma_snd_pcm_t;\ntypedef struct ma_snd_pcm_hw_params_t           ma_snd_pcm_hw_params_t;\ntypedef struct ma_snd_pcm_sw_params_t           ma_snd_pcm_sw_params_t;\ntypedef struct ma_snd_pcm_format_mask_t         ma_snd_pcm_format_mask_t;\ntypedef struct ma_snd_pcm_info_t                ma_snd_pcm_info_t;\ntypedef struct\n{\n    void* addr;\n    unsigned int first;\n    unsigned int step;\n} ma_snd_pcm_channel_area_t;\ntypedef struct\n{\n    unsigned int channels;\n    unsigned int pos[1];\n} ma_snd_pcm_chmap_t;\n\n/* snd_pcm_state_t */\n#define MA_SND_PCM_STATE_OPEN                  0\n#define MA_SND_PCM_STATE_SETUP                 1\n#define MA_SND_PCM_STATE_PREPARED              2\n#define MA_SND_PCM_STATE_RUNNING               3\n#define MA_SND_PCM_STATE_XRUN                  4\n#define MA_SND_PCM_STATE_DRAINING              5\n#define MA_SND_PCM_STATE_PAUSED                6\n#define MA_SND_PCM_STATE_SUSPENDED             7\n#define MA_SND_PCM_STATE_DISCONNECTED          8\n\n/* snd_pcm_stream_t */\n#define MA_SND_PCM_STREAM_PLAYBACK             0\n#define MA_SND_PCM_STREAM_CAPTURE              1\n\n/* snd_pcm_format_t */\n#define MA_SND_PCM_FORMAT_UNKNOWN              -1\n#define MA_SND_PCM_FORMAT_U8                   1\n#define MA_SND_PCM_FORMAT_S16_LE               2\n#define MA_SND_PCM_FORMAT_S16_BE               3\n#define MA_SND_PCM_FORMAT_S24_LE               6\n#define MA_SND_PCM_FORMAT_S24_BE               7\n#define MA_SND_PCM_FORMAT_S32_LE               10\n#define MA_SND_PCM_FORMAT_S32_BE               11\n#define MA_SND_PCM_FORMAT_FLOAT_LE             14\n#define MA_SND_PCM_FORMAT_FLOAT_BE             15\n#define MA_SND_PCM_FORMAT_FLOAT64_LE           16\n#define MA_SND_PCM_FORMAT_FLOAT64_BE           17\n#define MA_SND_PCM_FORMAT_MU_LAW               20\n#define MA_SND_PCM_FORMAT_A_LAW                21\n#define MA_SND_PCM_FORMAT_S24_3LE              32\n#define MA_SND_PCM_FORMAT_S24_3BE              33\n\n/* snd_pcm_access_t */\n#define MA_SND_PCM_ACCESS_MMAP_INTERLEAVED     0\n#define MA_SND_PCM_ACCESS_MMAP_NONINTERLEAVED  1\n#define MA_SND_PCM_ACCESS_MMAP_COMPLEX         2\n#define MA_SND_PCM_ACCESS_RW_INTERLEAVED       3\n#define MA_SND_PCM_ACCESS_RW_NONINTERLEAVED    4\n\n/* Channel positions. */\n#define MA_SND_CHMAP_UNKNOWN                   0\n#define MA_SND_CHMAP_NA                        1\n#define MA_SND_CHMAP_MONO                      2\n#define MA_SND_CHMAP_FL                        3\n#define MA_SND_CHMAP_FR                        4\n#define MA_SND_CHMAP_RL                        5\n#define MA_SND_CHMAP_RR                        6\n#define MA_SND_CHMAP_FC                        7\n#define MA_SND_CHMAP_LFE                       8\n#define MA_SND_CHMAP_SL                        9\n#define MA_SND_CHMAP_SR                        10\n#define MA_SND_CHMAP_RC                        11\n#define MA_SND_CHMAP_FLC                       12\n#define MA_SND_CHMAP_FRC                       13\n#define MA_SND_CHMAP_RLC                       14\n#define MA_SND_CHMAP_RRC                       15\n#define MA_SND_CHMAP_FLW                       16\n#define MA_SND_CHMAP_FRW                       17\n#define MA_SND_CHMAP_FLH                       18\n#define MA_SND_CHMAP_FCH                       19\n#define MA_SND_CHMAP_FRH                       20\n#define MA_SND_CHMAP_TC                        21\n#define MA_SND_CHMAP_TFL                       22\n#define MA_SND_CHMAP_TFR                       23\n#define MA_SND_CHMAP_TFC                       24\n#define MA_SND_CHMAP_TRL                       25\n#define MA_SND_CHMAP_TRR                       26\n#define MA_SND_CHMAP_TRC                       27\n#define MA_SND_CHMAP_TFLC                      28\n#define MA_SND_CHMAP_TFRC                      29\n#define MA_SND_CHMAP_TSL                       30\n#define MA_SND_CHMAP_TSR                       31\n#define MA_SND_CHMAP_LLFE                      32\n#define MA_SND_CHMAP_RLFE                      33\n#define MA_SND_CHMAP_BC                        34\n#define MA_SND_CHMAP_BLC                       35\n#define MA_SND_CHMAP_BRC                       36\n\n/* Open mode flags. */\n#define MA_SND_PCM_NO_AUTO_RESAMPLE            0x00010000\n#define MA_SND_PCM_NO_AUTO_CHANNELS            0x00020000\n#define MA_SND_PCM_NO_AUTO_FORMAT              0x00040000\n#endif\n\ntypedef int                  (* ma_snd_pcm_open_proc)                          (ma_snd_pcm_t **pcm, const char *name, ma_snd_pcm_stream_t stream, int mode);\ntypedef int                  (* ma_snd_pcm_close_proc)                         (ma_snd_pcm_t *pcm);\ntypedef size_t               (* ma_snd_pcm_hw_params_sizeof_proc)              (void);\ntypedef int                  (* ma_snd_pcm_hw_params_any_proc)                 (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params);\ntypedef int                  (* ma_snd_pcm_hw_params_set_format_proc)          (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_t val);\ntypedef int                  (* ma_snd_pcm_hw_params_set_format_first_proc)    (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_t *format);\ntypedef void                 (* ma_snd_pcm_hw_params_get_format_mask_proc)     (ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_mask_t *mask);\ntypedef int                  (* ma_snd_pcm_hw_params_set_channels_proc)        (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val);\ntypedef int                  (* ma_snd_pcm_hw_params_set_channels_near_proc)   (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int *val);\ntypedef int                  (* ma_snd_pcm_hw_params_set_channels_minmax_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int *minimum, unsigned int *maximum);\ntypedef int                  (* ma_snd_pcm_hw_params_set_rate_resample_proc)   (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val);\ntypedef int                  (* ma_snd_pcm_hw_params_set_rate_proc)            (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val, int dir);\ntypedef int                  (* ma_snd_pcm_hw_params_set_rate_near_proc)       (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int *val, int *dir);\ntypedef int                  (* ma_snd_pcm_hw_params_set_buffer_size_near_proc)(ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_uframes_t *val);\ntypedef int                  (* ma_snd_pcm_hw_params_set_periods_near_proc)    (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int *val, int *dir);\ntypedef int                  (* ma_snd_pcm_hw_params_set_access_proc)          (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_access_t _access);\ntypedef int                  (* ma_snd_pcm_hw_params_get_format_proc)          (const ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_t *format);\ntypedef int                  (* ma_snd_pcm_hw_params_get_channels_proc)        (const ma_snd_pcm_hw_params_t *params, unsigned int *val);\ntypedef int                  (* ma_snd_pcm_hw_params_get_channels_min_proc)    (const ma_snd_pcm_hw_params_t *params, unsigned int *val);\ntypedef int                  (* ma_snd_pcm_hw_params_get_channels_max_proc)    (const ma_snd_pcm_hw_params_t *params, unsigned int *val);\ntypedef int                  (* ma_snd_pcm_hw_params_get_rate_proc)            (const ma_snd_pcm_hw_params_t *params, unsigned int *rate, int *dir);\ntypedef int                  (* ma_snd_pcm_hw_params_get_rate_min_proc)        (const ma_snd_pcm_hw_params_t *params, unsigned int *rate, int *dir);\ntypedef int                  (* ma_snd_pcm_hw_params_get_rate_max_proc)        (const ma_snd_pcm_hw_params_t *params, unsigned int *rate, int *dir);\ntypedef int                  (* ma_snd_pcm_hw_params_get_buffer_size_proc)     (const ma_snd_pcm_hw_params_t *params, ma_snd_pcm_uframes_t *val);\ntypedef int                  (* ma_snd_pcm_hw_params_get_periods_proc)         (const ma_snd_pcm_hw_params_t *params, unsigned int *val, int *dir);\ntypedef int                  (* ma_snd_pcm_hw_params_get_access_proc)          (const ma_snd_pcm_hw_params_t *params, ma_snd_pcm_access_t *_access);\ntypedef int                  (* ma_snd_pcm_hw_params_test_format_proc)         (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, ma_snd_pcm_format_t val);\ntypedef int                  (* ma_snd_pcm_hw_params_test_channels_proc)       (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val);\ntypedef int                  (* ma_snd_pcm_hw_params_test_rate_proc)           (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params, unsigned int val, int dir);\ntypedef int                  (* ma_snd_pcm_hw_params_proc)                     (ma_snd_pcm_t *pcm, ma_snd_pcm_hw_params_t *params);\ntypedef size_t               (* ma_snd_pcm_sw_params_sizeof_proc)              (void);\ntypedef int                  (* ma_snd_pcm_sw_params_current_proc)             (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params);\ntypedef int                  (* ma_snd_pcm_sw_params_get_boundary_proc)        (const ma_snd_pcm_sw_params_t *params, ma_snd_pcm_uframes_t* val);\ntypedef int                  (* ma_snd_pcm_sw_params_set_avail_min_proc)       (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params, ma_snd_pcm_uframes_t val);\ntypedef int                  (* ma_snd_pcm_sw_params_set_start_threshold_proc) (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params, ma_snd_pcm_uframes_t val);\ntypedef int                  (* ma_snd_pcm_sw_params_set_stop_threshold_proc)  (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params, ma_snd_pcm_uframes_t val);\ntypedef int                  (* ma_snd_pcm_sw_params_proc)                     (ma_snd_pcm_t *pcm, ma_snd_pcm_sw_params_t *params);\ntypedef size_t               (* ma_snd_pcm_format_mask_sizeof_proc)            (void);\ntypedef int                  (* ma_snd_pcm_format_mask_test_proc)              (const ma_snd_pcm_format_mask_t *mask, ma_snd_pcm_format_t val);\ntypedef ma_snd_pcm_chmap_t * (* ma_snd_pcm_get_chmap_proc)                     (ma_snd_pcm_t *pcm);\ntypedef ma_snd_pcm_state_t   (* ma_snd_pcm_state_proc)                         (ma_snd_pcm_t *pcm);\ntypedef int                  (* ma_snd_pcm_prepare_proc)                       (ma_snd_pcm_t *pcm);\ntypedef int                  (* ma_snd_pcm_start_proc)                         (ma_snd_pcm_t *pcm);\ntypedef int                  (* ma_snd_pcm_drop_proc)                          (ma_snd_pcm_t *pcm);\ntypedef int                  (* ma_snd_pcm_drain_proc)                         (ma_snd_pcm_t *pcm);\ntypedef int                  (* ma_snd_pcm_reset_proc)                         (ma_snd_pcm_t *pcm);\ntypedef int                  (* ma_snd_device_name_hint_proc)                  (int card, const char *iface, void ***hints);\ntypedef char *               (* ma_snd_device_name_get_hint_proc)              (const void *hint, const char *id);\ntypedef int                  (* ma_snd_card_get_index_proc)                    (const char *name);\ntypedef int                  (* ma_snd_device_name_free_hint_proc)             (void **hints);\ntypedef int                  (* ma_snd_pcm_mmap_begin_proc)                    (ma_snd_pcm_t *pcm, const ma_snd_pcm_channel_area_t **areas, ma_snd_pcm_uframes_t *offset, ma_snd_pcm_uframes_t *frames);\ntypedef ma_snd_pcm_sframes_t (* ma_snd_pcm_mmap_commit_proc)                   (ma_snd_pcm_t *pcm, ma_snd_pcm_uframes_t offset, ma_snd_pcm_uframes_t frames);\ntypedef int                  (* ma_snd_pcm_recover_proc)                       (ma_snd_pcm_t *pcm, int err, int silent);\ntypedef ma_snd_pcm_sframes_t (* ma_snd_pcm_readi_proc)                         (ma_snd_pcm_t *pcm, void *buffer, ma_snd_pcm_uframes_t size);\ntypedef ma_snd_pcm_sframes_t (* ma_snd_pcm_writei_proc)                        (ma_snd_pcm_t *pcm, const void *buffer, ma_snd_pcm_uframes_t size);\ntypedef ma_snd_pcm_sframes_t (* ma_snd_pcm_avail_proc)                         (ma_snd_pcm_t *pcm);\ntypedef ma_snd_pcm_sframes_t (* ma_snd_pcm_avail_update_proc)                  (ma_snd_pcm_t *pcm);\ntypedef int                  (* ma_snd_pcm_wait_proc)                          (ma_snd_pcm_t *pcm, int timeout);\ntypedef int                  (* ma_snd_pcm_nonblock_proc)                      (ma_snd_pcm_t *pcm, int nonblock);\ntypedef int                  (* ma_snd_pcm_info_proc)                          (ma_snd_pcm_t *pcm, ma_snd_pcm_info_t* info);\ntypedef size_t               (* ma_snd_pcm_info_sizeof_proc)                   (void);\ntypedef const char*          (* ma_snd_pcm_info_get_name_proc)                 (const ma_snd_pcm_info_t* info);\ntypedef int                  (* ma_snd_pcm_poll_descriptors_proc)              (ma_snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space);\ntypedef int                  (* ma_snd_pcm_poll_descriptors_count_proc)        (ma_snd_pcm_t *pcm);\ntypedef int                  (* ma_snd_pcm_poll_descriptors_revents_proc)      (ma_snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);\ntypedef int                  (* ma_snd_config_update_free_global_proc)         (void);\n\n/* This array specifies each of the common devices that can be used for both playback and capture. */\nstatic const char* g_maCommonDeviceNamesALSA[] = {\n    \"default\",\n    \"null\",\n    \"pulse\",\n    \"jack\"\n};\n\n/* This array allows us to blacklist specific playback devices. */\nstatic const char* g_maBlacklistedPlaybackDeviceNamesALSA[] = {\n    \"\"\n};\n\n/* This array allows us to blacklist specific capture devices. */\nstatic const char* g_maBlacklistedCaptureDeviceNamesALSA[] = {\n    \"\"\n};\n\n\nstatic ma_snd_pcm_format_t ma_convert_ma_format_to_alsa_format(ma_format format)\n{\n    ma_snd_pcm_format_t ALSAFormats[] = {\n        MA_SND_PCM_FORMAT_UNKNOWN,     /* ma_format_unknown */\n        MA_SND_PCM_FORMAT_U8,          /* ma_format_u8 */\n        MA_SND_PCM_FORMAT_S16_LE,      /* ma_format_s16 */\n        MA_SND_PCM_FORMAT_S24_3LE,     /* ma_format_s24 */\n        MA_SND_PCM_FORMAT_S32_LE,      /* ma_format_s32 */\n        MA_SND_PCM_FORMAT_FLOAT_LE     /* ma_format_f32 */\n    };\n\n    if (ma_is_big_endian()) {\n        ALSAFormats[0] = MA_SND_PCM_FORMAT_UNKNOWN;\n        ALSAFormats[1] = MA_SND_PCM_FORMAT_U8;\n        ALSAFormats[2] = MA_SND_PCM_FORMAT_S16_BE;\n        ALSAFormats[3] = MA_SND_PCM_FORMAT_S24_3BE;\n        ALSAFormats[4] = MA_SND_PCM_FORMAT_S32_BE;\n        ALSAFormats[5] = MA_SND_PCM_FORMAT_FLOAT_BE;\n    }\n\n    return ALSAFormats[format];\n}\n\nstatic ma_format ma_format_from_alsa(ma_snd_pcm_format_t formatALSA)\n{\n    if (ma_is_little_endian()) {\n        switch (formatALSA) {\n            case MA_SND_PCM_FORMAT_S16_LE:   return ma_format_s16;\n            case MA_SND_PCM_FORMAT_S24_3LE:  return ma_format_s24;\n            case MA_SND_PCM_FORMAT_S32_LE:   return ma_format_s32;\n            case MA_SND_PCM_FORMAT_FLOAT_LE: return ma_format_f32;\n            default: break;\n        }\n    } else {\n        switch (formatALSA) {\n            case MA_SND_PCM_FORMAT_S16_BE:   return ma_format_s16;\n            case MA_SND_PCM_FORMAT_S24_3BE:  return ma_format_s24;\n            case MA_SND_PCM_FORMAT_S32_BE:   return ma_format_s32;\n            case MA_SND_PCM_FORMAT_FLOAT_BE: return ma_format_f32;\n            default: break;\n        }\n    }\n\n    /* Endian agnostic. */\n    switch (formatALSA) {\n        case MA_SND_PCM_FORMAT_U8: return ma_format_u8;\n        default: return ma_format_unknown;\n    }\n}\n\nstatic ma_channel ma_convert_alsa_channel_position_to_ma_channel(unsigned int alsaChannelPos)\n{\n    switch (alsaChannelPos)\n    {\n        case MA_SND_CHMAP_MONO: return MA_CHANNEL_MONO;\n        case MA_SND_CHMAP_FL:   return MA_CHANNEL_FRONT_LEFT;\n        case MA_SND_CHMAP_FR:   return MA_CHANNEL_FRONT_RIGHT;\n        case MA_SND_CHMAP_RL:   return MA_CHANNEL_BACK_LEFT;\n        case MA_SND_CHMAP_RR:   return MA_CHANNEL_BACK_RIGHT;\n        case MA_SND_CHMAP_FC:   return MA_CHANNEL_FRONT_CENTER;\n        case MA_SND_CHMAP_LFE:  return MA_CHANNEL_LFE;\n        case MA_SND_CHMAP_SL:   return MA_CHANNEL_SIDE_LEFT;\n        case MA_SND_CHMAP_SR:   return MA_CHANNEL_SIDE_RIGHT;\n        case MA_SND_CHMAP_RC:   return MA_CHANNEL_BACK_CENTER;\n        case MA_SND_CHMAP_FLC:  return MA_CHANNEL_FRONT_LEFT_CENTER;\n        case MA_SND_CHMAP_FRC:  return MA_CHANNEL_FRONT_RIGHT_CENTER;\n        case MA_SND_CHMAP_RLC:  return 0;\n        case MA_SND_CHMAP_RRC:  return 0;\n        case MA_SND_CHMAP_FLW:  return 0;\n        case MA_SND_CHMAP_FRW:  return 0;\n        case MA_SND_CHMAP_FLH:  return 0;\n        case MA_SND_CHMAP_FCH:  return 0;\n        case MA_SND_CHMAP_FRH:  return 0;\n        case MA_SND_CHMAP_TC:   return MA_CHANNEL_TOP_CENTER;\n        case MA_SND_CHMAP_TFL:  return MA_CHANNEL_TOP_FRONT_LEFT;\n        case MA_SND_CHMAP_TFR:  return MA_CHANNEL_TOP_FRONT_RIGHT;\n        case MA_SND_CHMAP_TFC:  return MA_CHANNEL_TOP_FRONT_CENTER;\n        case MA_SND_CHMAP_TRL:  return MA_CHANNEL_TOP_BACK_LEFT;\n        case MA_SND_CHMAP_TRR:  return MA_CHANNEL_TOP_BACK_RIGHT;\n        case MA_SND_CHMAP_TRC:  return MA_CHANNEL_TOP_BACK_CENTER;\n        default: break;\n    }\n\n    return 0;\n}\n\nstatic ma_bool32 ma_is_common_device_name__alsa(const char* name)\n{\n    size_t iName;\n    for (iName = 0; iName < ma_countof(g_maCommonDeviceNamesALSA); ++iName) {\n        if (ma_strcmp(name, g_maCommonDeviceNamesALSA[iName]) == 0) {\n            return MA_TRUE;\n        }\n    }\n\n    return MA_FALSE;\n}\n\n\nstatic ma_bool32 ma_is_playback_device_blacklisted__alsa(const char* name)\n{\n    size_t iName;\n    for (iName = 0; iName < ma_countof(g_maBlacklistedPlaybackDeviceNamesALSA); ++iName) {\n        if (ma_strcmp(name, g_maBlacklistedPlaybackDeviceNamesALSA[iName]) == 0) {\n            return MA_TRUE;\n        }\n    }\n\n    return MA_FALSE;\n}\n\nstatic ma_bool32 ma_is_capture_device_blacklisted__alsa(const char* name)\n{\n    size_t iName;\n    for (iName = 0; iName < ma_countof(g_maBlacklistedCaptureDeviceNamesALSA); ++iName) {\n        if (ma_strcmp(name, g_maBlacklistedCaptureDeviceNamesALSA[iName]) == 0) {\n            return MA_TRUE;\n        }\n    }\n\n    return MA_FALSE;\n}\n\nstatic ma_bool32 ma_is_device_blacklisted__alsa(ma_device_type deviceType, const char* name)\n{\n    if (deviceType == ma_device_type_playback) {\n        return ma_is_playback_device_blacklisted__alsa(name);\n    } else {\n        return ma_is_capture_device_blacklisted__alsa(name);\n    }\n}\n\n\nstatic const char* ma_find_char(const char* str, char c, int* index)\n{\n    int i = 0;\n    for (;;) {\n        if (str[i] == '\\0') {\n            if (index) *index = -1;\n            return NULL;\n        }\n\n        if (str[i] == c) {\n            if (index) *index = i;\n            return str + i;\n        }\n\n        i += 1;\n    }\n\n    /* Should never get here, but treat it as though the character was not found to make me feel better inside. */\n    if (index) *index = -1;\n    return NULL;\n}\n\nstatic ma_bool32 ma_is_device_name_in_hw_format__alsa(const char* hwid)\n{\n    /* This function is just checking whether or not hwid is in \"hw:%d,%d\" format. */\n\n    int commaPos;\n    const char* dev;\n    int i;\n\n    if (hwid == NULL) {\n        return MA_FALSE;\n    }\n\n    if (hwid[0] != 'h' || hwid[1] != 'w' || hwid[2] != ':') {\n        return MA_FALSE;\n    }\n\n    hwid += 3;\n\n    dev = ma_find_char(hwid, ',', &commaPos);\n    if (dev == NULL) {\n        return MA_FALSE;\n    } else {\n        dev += 1;   /* Skip past the \",\". */\n    }\n\n    /* Check if the part between the \":\" and the \",\" contains only numbers. If not, return false. */\n    for (i = 0; i < commaPos; ++i) {\n        if (hwid[i] < '0' || hwid[i] > '9') {\n            return MA_FALSE;\n        }\n    }\n\n    /* Check if everything after the \",\" is numeric. If not, return false. */\n    i = 0;\n    while (dev[i] != '\\0') {\n        if (dev[i] < '0' || dev[i] > '9') {\n            return MA_FALSE;\n        }\n        i += 1;\n    }\n\n    return MA_TRUE;\n}\n\nstatic int ma_convert_device_name_to_hw_format__alsa(ma_context* pContext, char* dst, size_t dstSize, const char* src)  /* Returns 0 on success, non-0 on error. */\n{\n    /* src should look something like this: \"hw:CARD=I82801AAICH,DEV=0\" */\n\n    int colonPos;\n    int commaPos;\n    char card[256];\n    const char* dev;\n    int cardIndex;\n\n    if (dst == NULL) {\n        return -1;\n    }\n    if (dstSize < 7) {\n        return -1;     /* Absolute minimum size of the output buffer is 7 bytes. */\n    }\n\n    *dst = '\\0';    /* Safety. */\n    if (src == NULL) {\n        return -1;\n    }\n\n    /* If the input name is already in \"hw:%d,%d\" format, just return that verbatim. */\n    if (ma_is_device_name_in_hw_format__alsa(src)) {\n        return ma_strcpy_s(dst, dstSize, src);\n    }\n\n    src = ma_find_char(src, ':', &colonPos);\n    if (src == NULL) {\n        return -1;  /* Couldn't find a colon */\n    }\n\n    dev = ma_find_char(src, ',', &commaPos);\n    if (dev == NULL) {\n        dev = \"0\";\n        ma_strncpy_s(card, sizeof(card), src+6, (size_t)-1);   /* +6 = \":CARD=\" */\n    } else {\n        dev = dev + 5;  /* +5 = \",DEV=\" */\n        ma_strncpy_s(card, sizeof(card), src+6, commaPos-6);   /* +6 = \":CARD=\" */\n    }\n\n    cardIndex = ((ma_snd_card_get_index_proc)pContext->alsa.snd_card_get_index)(card);\n    if (cardIndex < 0) {\n        return -2;  /* Failed to retrieve the card index. */\n    }\n\n\n    /* Construction. */\n    dst[0] = 'h'; dst[1] = 'w'; dst[2] = ':';\n    if (ma_itoa_s(cardIndex, dst+3, dstSize-3, 10) != 0) {\n        return -3;\n    }\n    if (ma_strcat_s(dst, dstSize, \",\") != 0) {\n        return -3;\n    }\n    if (ma_strcat_s(dst, dstSize, dev) != 0) {\n        return -3;\n    }\n\n    return 0;\n}\n\nstatic ma_bool32 ma_does_id_exist_in_list__alsa(ma_device_id* pUniqueIDs, ma_uint32 count, const char* pHWID)\n{\n    ma_uint32 i;\n\n    MA_ASSERT(pHWID != NULL);\n\n    for (i = 0; i < count; ++i) {\n        if (ma_strcmp(pUniqueIDs[i].alsa, pHWID) == 0) {\n            return MA_TRUE;\n        }\n    }\n\n    return MA_FALSE;\n}\n\n\nstatic ma_result ma_context_open_pcm__alsa(ma_context* pContext, ma_share_mode shareMode, ma_device_type deviceType, const ma_device_id* pDeviceID, int openMode, ma_snd_pcm_t** ppPCM)\n{\n    ma_snd_pcm_t* pPCM;\n    ma_snd_pcm_stream_t stream;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(ppPCM != NULL);\n\n    *ppPCM = NULL;\n    pPCM = NULL;\n\n    stream = (deviceType == ma_device_type_playback) ? MA_SND_PCM_STREAM_PLAYBACK : MA_SND_PCM_STREAM_CAPTURE;\n\n    if (pDeviceID == NULL) {\n        ma_bool32 isDeviceOpen;\n        size_t i;\n\n        /*\n        We're opening the default device. I don't know if trying anything other than \"default\" is necessary, but it makes\n        me feel better to try as hard as we can get to get _something_ working.\n        */\n        const char* defaultDeviceNames[] = {\n            \"default\",\n            NULL,\n            NULL,\n            NULL,\n            NULL,\n            NULL,\n            NULL\n        };\n\n        if (shareMode == ma_share_mode_exclusive) {\n            defaultDeviceNames[1] = \"hw\";\n            defaultDeviceNames[2] = \"hw:0\";\n            defaultDeviceNames[3] = \"hw:0,0\";\n        } else {\n            if (deviceType == ma_device_type_playback) {\n                defaultDeviceNames[1] = \"dmix\";\n                defaultDeviceNames[2] = \"dmix:0\";\n                defaultDeviceNames[3] = \"dmix:0,0\";\n            } else {\n                defaultDeviceNames[1] = \"dsnoop\";\n                defaultDeviceNames[2] = \"dsnoop:0\";\n                defaultDeviceNames[3] = \"dsnoop:0,0\";\n            }\n            defaultDeviceNames[4] = \"hw\";\n            defaultDeviceNames[5] = \"hw:0\";\n            defaultDeviceNames[6] = \"hw:0,0\";\n        }\n\n        isDeviceOpen = MA_FALSE;\n        for (i = 0; i < ma_countof(defaultDeviceNames); ++i) {\n            if (defaultDeviceNames[i] != NULL && defaultDeviceNames[i][0] != '\\0') {\n                if (((ma_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)(&pPCM, defaultDeviceNames[i], stream, openMode) == 0) {\n                    isDeviceOpen = MA_TRUE;\n                    break;\n                }\n            }\n        }\n\n        if (!isDeviceOpen) {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[ALSA] snd_pcm_open() failed when trying to open an appropriate default device.\");\n            return MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n        }\n    } else {\n        /*\n        We're trying to open a specific device. There's a few things to consider here:\n\n        miniaudio recongnizes a special format of device id that excludes the \"hw\", \"dmix\", etc. prefix. It looks like this: \":0,0\", \":0,1\", etc. When\n        an ID of this format is specified, it indicates to miniaudio that it can try different combinations of plugins (\"hw\", \"dmix\", etc.) until it\n        finds an appropriate one that works. This comes in very handy when trying to open a device in shared mode (\"dmix\"), vs exclusive mode (\"hw\").\n        */\n\n        /* May end up needing to make small adjustments to the ID, so make a copy. */\n        ma_device_id deviceID = *pDeviceID;\n        int resultALSA = -ENODEV;\n\n        if (deviceID.alsa[0] != ':') {\n            /* The ID is not in \":0,0\" format. Use the ID exactly as-is. */\n            resultALSA = ((ma_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)(&pPCM, deviceID.alsa, stream, openMode);\n        } else {\n            char hwid[256];\n\n            /* The ID is in \":0,0\" format. Try different plugins depending on the shared mode. */\n            if (deviceID.alsa[1] == '\\0') {\n                deviceID.alsa[0] = '\\0';  /* An ID of \":\" should be converted to \"\". */\n            }\n\n            if (shareMode == ma_share_mode_shared) {\n                if (deviceType == ma_device_type_playback) {\n                    ma_strcpy_s(hwid, sizeof(hwid), \"dmix\");\n                } else {\n                    ma_strcpy_s(hwid, sizeof(hwid), \"dsnoop\");\n                }\n\n                if (ma_strcat_s(hwid, sizeof(hwid), deviceID.alsa) == 0) {\n                    resultALSA = ((ma_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)(&pPCM, hwid, stream, openMode);\n                }\n            }\n\n            /* If at this point we still don't have an open device it means we're either preferencing exclusive mode or opening with \"dmix\"/\"dsnoop\" failed. */\n            if (resultALSA != 0) {\n                ma_strcpy_s(hwid, sizeof(hwid), \"hw\");\n                if (ma_strcat_s(hwid, sizeof(hwid), deviceID.alsa) == 0) {\n                    resultALSA = ((ma_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)(&pPCM, hwid, stream, openMode);\n                }\n            }\n        }\n\n        if (resultALSA < 0) {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[ALSA] snd_pcm_open() failed.\");\n            return ma_result_from_errno(-resultALSA);\n        }\n    }\n\n    *ppPCM = pPCM;\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_context_enumerate_devices__alsa(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    int resultALSA;\n    ma_bool32 cbResult = MA_TRUE;\n    char** ppDeviceHints;\n    ma_device_id* pUniqueIDs = NULL;\n    ma_uint32 uniqueIDCount = 0;\n    char** ppNextDeviceHint;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(callback != NULL);\n\n    ma_mutex_lock(&pContext->alsa.internalDeviceEnumLock);\n\n    resultALSA = ((ma_snd_device_name_hint_proc)pContext->alsa.snd_device_name_hint)(-1, \"pcm\", (void***)&ppDeviceHints);\n    if (resultALSA < 0) {\n        ma_mutex_unlock(&pContext->alsa.internalDeviceEnumLock);\n        return ma_result_from_errno(-resultALSA);\n    }\n\n    ppNextDeviceHint = ppDeviceHints;\n    while (*ppNextDeviceHint != NULL) {\n        char* NAME = ((ma_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, \"NAME\");\n        char* DESC = ((ma_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, \"DESC\");\n        char* IOID = ((ma_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, \"IOID\");\n        ma_device_type deviceType = ma_device_type_playback;\n        ma_bool32 stopEnumeration = MA_FALSE;\n        char hwid[sizeof(pUniqueIDs->alsa)];\n        ma_device_info deviceInfo;\n\n        if ((IOID == NULL || ma_strcmp(IOID, \"Output\") == 0)) {\n            deviceType = ma_device_type_playback;\n        }\n        if ((IOID != NULL && ma_strcmp(IOID, \"Input\" ) == 0)) {\n            deviceType = ma_device_type_capture;\n        }\n\n        if (NAME != NULL) {\n            if (pContext->alsa.useVerboseDeviceEnumeration) {\n                /* Verbose mode. Use the name exactly as-is. */\n                ma_strncpy_s(hwid, sizeof(hwid), NAME, (size_t)-1);\n            } else {\n                /* Simplified mode. Use \":%d,%d\" format. */\n                if (ma_convert_device_name_to_hw_format__alsa(pContext, hwid, sizeof(hwid), NAME) == 0) {\n                    /*\n                    At this point, hwid looks like \"hw:0,0\". In simplified enumeration mode, we actually want to strip off the\n                    plugin name so it looks like \":0,0\". The reason for this is that this special format is detected at device\n                    initialization time and is used as an indicator to try and use the most appropriate plugin depending on the\n                    device type and sharing mode.\n                    */\n                    char* dst = hwid;\n                    char* src = hwid+2;\n                    while ((*dst++ = *src++));\n                } else {\n                    /* Conversion to \"hw:%d,%d\" failed. Just use the name as-is. */\n                    ma_strncpy_s(hwid, sizeof(hwid), NAME, (size_t)-1);\n                }\n\n                if (ma_does_id_exist_in_list__alsa(pUniqueIDs, uniqueIDCount, hwid)) {\n                    goto next_device;   /* The device has already been enumerated. Move on to the next one. */\n                } else {\n                    /* The device has not yet been enumerated. Make sure it's added to our list so that it's not enumerated again. */\n                    size_t newCapacity = sizeof(*pUniqueIDs) * (uniqueIDCount + 1);\n                    ma_device_id* pNewUniqueIDs = (ma_device_id*)ma_realloc(pUniqueIDs, newCapacity, &pContext->allocationCallbacks);\n                    if (pNewUniqueIDs == NULL) {\n                        goto next_device;   /* Failed to allocate memory. */\n                    }\n\n                    pUniqueIDs = pNewUniqueIDs;\n                    MA_COPY_MEMORY(pUniqueIDs[uniqueIDCount].alsa, hwid, sizeof(hwid));\n                    uniqueIDCount += 1;\n                }\n            }\n        } else {\n            MA_ZERO_MEMORY(hwid, sizeof(hwid));\n        }\n\n        MA_ZERO_OBJECT(&deviceInfo);\n        ma_strncpy_s(deviceInfo.id.alsa, sizeof(deviceInfo.id.alsa), hwid, (size_t)-1);\n\n        /*\n        There's no good way to determine whether or not a device is the default on Linux. We're just going to do something simple and\n        just use the name of \"default\" as the indicator.\n        */\n        if (ma_strcmp(deviceInfo.id.alsa, \"default\") == 0) {\n            deviceInfo.isDefault = MA_TRUE;\n        }\n\n\n        /*\n        DESC is the friendly name. We treat this slightly differently depending on whether or not we are using verbose\n        device enumeration. In verbose mode we want to take the entire description so that the end-user can distinguish\n        between the subdevices of each card/dev pair. In simplified mode, however, we only want the first part of the\n        description.\n\n        The value in DESC seems to be split into two lines, with the first line being the name of the device and the\n        second line being a description of the device. I don't like having the description be across two lines because\n        it makes formatting ugly and annoying. I'm therefore deciding to put it all on a single line with the second line\n        being put into parentheses. In simplified mode I'm just stripping the second line entirely.\n        */\n        if (DESC != NULL) {\n            int lfPos;\n            const char* line2 = ma_find_char(DESC, '\\n', &lfPos);\n            if (line2 != NULL) {\n                line2 += 1; /* Skip past the new-line character. */\n\n                if (pContext->alsa.useVerboseDeviceEnumeration) {\n                    /* Verbose mode. Put the second line in brackets. */\n                    ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), DESC, lfPos);\n                    ma_strcat_s (deviceInfo.name, sizeof(deviceInfo.name), \" (\");\n                    ma_strcat_s (deviceInfo.name, sizeof(deviceInfo.name), line2);\n                    ma_strcat_s (deviceInfo.name, sizeof(deviceInfo.name), \")\");\n                } else {\n                    /* Simplified mode. Strip the second line entirely. */\n                    ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), DESC, lfPos);\n                }\n            } else {\n                /* There's no second line. Just copy the whole description. */\n                ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), DESC, (size_t)-1);\n            }\n        }\n\n        if (!ma_is_device_blacklisted__alsa(deviceType, NAME)) {\n            cbResult = callback(pContext, deviceType, &deviceInfo, pUserData);\n        }\n\n        /*\n        Some devices are both playback and capture, but they are only enumerated by ALSA once. We need to fire the callback\n        again for the other device type in this case. We do this for known devices and where the IOID hint is NULL, which\n        means both Input and Output.\n        */\n        if (cbResult) {\n            if (ma_is_common_device_name__alsa(NAME) || IOID == NULL) {\n                if (deviceType == ma_device_type_playback) {\n                    if (!ma_is_capture_device_blacklisted__alsa(NAME)) {\n                        cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData);\n                    }\n                } else {\n                    if (!ma_is_playback_device_blacklisted__alsa(NAME)) {\n                        cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData);\n                    }\n                }\n            }\n        }\n\n        if (cbResult == MA_FALSE) {\n            stopEnumeration = MA_TRUE;\n        }\n\n    next_device:\n        free(NAME);\n        free(DESC);\n        free(IOID);\n        ppNextDeviceHint += 1;\n\n        /* We need to stop enumeration if the callback returned false. */\n        if (stopEnumeration) {\n            break;\n        }\n    }\n\n    ma_free(pUniqueIDs, &pContext->allocationCallbacks);\n    ((ma_snd_device_name_free_hint_proc)pContext->alsa.snd_device_name_free_hint)((void**)ppDeviceHints);\n\n    ma_mutex_unlock(&pContext->alsa.internalDeviceEnumLock);\n\n    return MA_SUCCESS;\n}\n\n\ntypedef struct\n{\n    ma_device_type deviceType;\n    const ma_device_id* pDeviceID;\n    ma_share_mode shareMode;\n    ma_device_info* pDeviceInfo;\n    ma_bool32 foundDevice;\n} ma_context_get_device_info_enum_callback_data__alsa;\n\nstatic ma_bool32 ma_context_get_device_info_enum_callback__alsa(ma_context* pContext, ma_device_type deviceType, const ma_device_info* pDeviceInfo, void* pUserData)\n{\n    ma_context_get_device_info_enum_callback_data__alsa* pData = (ma_context_get_device_info_enum_callback_data__alsa*)pUserData;\n    MA_ASSERT(pData != NULL);\n\n    (void)pContext;\n\n    if (pData->pDeviceID == NULL && ma_strcmp(pDeviceInfo->id.alsa, \"default\") == 0) {\n        ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), pDeviceInfo->name, (size_t)-1);\n        pData->foundDevice = MA_TRUE;\n    } else {\n        if (pData->deviceType == deviceType && (pData->pDeviceID != NULL && ma_strcmp(pData->pDeviceID->alsa, pDeviceInfo->id.alsa) == 0)) {\n            ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), pDeviceInfo->name, (size_t)-1);\n            pData->foundDevice = MA_TRUE;\n        }\n    }\n\n    /* Keep enumerating until we have found the device. */\n    return !pData->foundDevice;\n}\n\nstatic void ma_context_test_rate_and_add_native_data_format__alsa(ma_context* pContext, ma_snd_pcm_t* pPCM, ma_snd_pcm_hw_params_t* pHWParams, ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 flags, ma_device_info* pDeviceInfo)\n{\n    MA_ASSERT(pPCM        != NULL);\n    MA_ASSERT(pHWParams   != NULL);\n    MA_ASSERT(pDeviceInfo != NULL);\n\n    if (pDeviceInfo->nativeDataFormatCount < ma_countof(pDeviceInfo->nativeDataFormats) && ((ma_snd_pcm_hw_params_test_rate_proc)pContext->alsa.snd_pcm_hw_params_test_rate)(pPCM, pHWParams, sampleRate, 0) == 0) {\n        pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format     = format;\n        pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels   = channels;\n        pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = sampleRate;\n        pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags      = flags;\n        pDeviceInfo->nativeDataFormatCount += 1;\n    }\n}\n\nstatic void ma_context_iterate_rates_and_add_native_data_format__alsa(ma_context* pContext, ma_snd_pcm_t* pPCM, ma_snd_pcm_hw_params_t* pHWParams, ma_format format, ma_uint32 channels, ma_uint32 flags, ma_device_info* pDeviceInfo)\n{\n    ma_uint32 iSampleRate;\n    unsigned int minSampleRate;\n    unsigned int maxSampleRate;\n    int sampleRateDir;  /* Not used. Just passed into snd_pcm_hw_params_get_rate_min/max(). */\n\n    /* There could be a range. */\n    ((ma_snd_pcm_hw_params_get_rate_min_proc)pContext->alsa.snd_pcm_hw_params_get_rate_min)(pHWParams, &minSampleRate, &sampleRateDir);\n    ((ma_snd_pcm_hw_params_get_rate_max_proc)pContext->alsa.snd_pcm_hw_params_get_rate_max)(pHWParams, &maxSampleRate, &sampleRateDir);\n\n    /* Make sure our sample rates are clamped to sane values. Stupid devices like \"pulse\" will reports rates like \"1\" which is ridiculus. */\n    minSampleRate = ma_clamp(minSampleRate, (unsigned int)ma_standard_sample_rate_min, (unsigned int)ma_standard_sample_rate_max);\n    maxSampleRate = ma_clamp(maxSampleRate, (unsigned int)ma_standard_sample_rate_min, (unsigned int)ma_standard_sample_rate_max);\n\n    for (iSampleRate = 0; iSampleRate < ma_countof(g_maStandardSampleRatePriorities); iSampleRate += 1) {\n        ma_uint32 standardSampleRate = g_maStandardSampleRatePriorities[iSampleRate];\n\n        if (standardSampleRate >= minSampleRate && standardSampleRate <= maxSampleRate) {\n            ma_context_test_rate_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, channels, standardSampleRate, flags, pDeviceInfo);\n        }\n    }\n\n    /* Now make sure our min and max rates are included just in case they aren't in the range of our standard rates. */\n    if (!ma_is_standard_sample_rate(minSampleRate)) {\n        ma_context_test_rate_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, channels, minSampleRate, flags, pDeviceInfo);\n    }\n\n    if (!ma_is_standard_sample_rate(maxSampleRate) && maxSampleRate != minSampleRate) {\n        ma_context_test_rate_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, channels, maxSampleRate, flags, pDeviceInfo);\n    }\n}\n\nstatic ma_result ma_context_get_device_info__alsa(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    ma_context_get_device_info_enum_callback_data__alsa data;\n    ma_result result;\n    int resultALSA;\n    ma_snd_pcm_t* pPCM;\n    ma_snd_pcm_hw_params_t* pHWParams;\n    ma_uint32 iFormat;\n    ma_uint32 iChannel;\n\n    MA_ASSERT(pContext != NULL);\n\n    /* We just enumerate to find basic information about the device. */\n    data.deviceType  = deviceType;\n    data.pDeviceID   = pDeviceID;\n    data.pDeviceInfo = pDeviceInfo;\n    data.foundDevice = MA_FALSE;\n    result = ma_context_enumerate_devices__alsa(pContext, ma_context_get_device_info_enum_callback__alsa, &data);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (!data.foundDevice) {\n        return MA_NO_DEVICE;\n    }\n\n    if (ma_strcmp(pDeviceInfo->id.alsa, \"default\") == 0) {\n        pDeviceInfo->isDefault = MA_TRUE;\n    }\n\n    /* For detailed info we need to open the device. */\n    result = ma_context_open_pcm__alsa(pContext, ma_share_mode_shared, deviceType, pDeviceID, 0, &pPCM);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* We need to initialize a HW parameters object in order to know what formats are supported. */\n    pHWParams = (ma_snd_pcm_hw_params_t*)ma_calloc(((ma_snd_pcm_hw_params_sizeof_proc)pContext->alsa.snd_pcm_hw_params_sizeof)(), &pContext->allocationCallbacks);\n    if (pHWParams == NULL) {\n        ((ma_snd_pcm_close_proc)pContext->alsa.snd_pcm_close)(pPCM);\n        return MA_OUT_OF_MEMORY;\n    }\n\n    resultALSA = ((ma_snd_pcm_hw_params_any_proc)pContext->alsa.snd_pcm_hw_params_any)(pPCM, pHWParams);\n    if (resultALSA < 0) {\n        ma_free(pHWParams, &pContext->allocationCallbacks);\n        ((ma_snd_pcm_close_proc)pContext->alsa.snd_pcm_close)(pPCM);\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to initialize hardware parameters. snd_pcm_hw_params_any() failed.\");\n        return ma_result_from_errno(-resultALSA);\n    }\n\n    /*\n    Some ALSA devices can support many permutations of formats, channels and rates. We only support\n    a fixed number of permutations which means we need to employ some strategies to ensure the best\n    combinations are returned. An example is the \"pulse\" device which can do it's own data conversion\n    in software and as a result can support any combination of format, channels and rate.\n\n    We want to ensure the the first data formats are the best. We have a list of favored sample\n    formats and sample rates, so these will be the basis of our iteration.\n    */\n\n    /* Formats. We just iterate over our standard formats and test them, making sure we reset the configuration space each iteration. */\n    for (iFormat = 0; iFormat < ma_countof(g_maFormatPriorities); iFormat += 1) {\n        ma_format format = g_maFormatPriorities[iFormat];\n\n        /*\n        For each format we need to make sure we reset the configuration space so we don't return\n        channel counts and rates that aren't compatible with a format.\n        */\n        ((ma_snd_pcm_hw_params_any_proc)pContext->alsa.snd_pcm_hw_params_any)(pPCM, pHWParams);\n\n        /* Test the format first. If this fails it means the format is not supported and we can skip it. */\n        if (((ma_snd_pcm_hw_params_test_format_proc)pContext->alsa.snd_pcm_hw_params_test_format)(pPCM, pHWParams, ma_convert_ma_format_to_alsa_format(format)) == 0) {\n            /* The format is supported. */\n            unsigned int minChannels;\n            unsigned int maxChannels;\n\n            /*\n            The configuration space needs to be restricted to this format so we can get an accurate\n            picture of which sample rates and channel counts are support with this format.\n            */\n            ((ma_snd_pcm_hw_params_set_format_proc)pContext->alsa.snd_pcm_hw_params_set_format)(pPCM, pHWParams, ma_convert_ma_format_to_alsa_format(format));\n\n            /* Now we need to check for supported channels. */\n            ((ma_snd_pcm_hw_params_get_channels_min_proc)pContext->alsa.snd_pcm_hw_params_get_channels_min)(pHWParams, &minChannels);\n            ((ma_snd_pcm_hw_params_get_channels_max_proc)pContext->alsa.snd_pcm_hw_params_get_channels_max)(pHWParams, &maxChannels);\n\n            if (minChannels > MA_MAX_CHANNELS) {\n                continue;   /* Too many channels. */\n            }\n            if (maxChannels < MA_MIN_CHANNELS) {\n                continue;   /* Not enough channels. */\n            }\n\n            /*\n            Make sure the channel count is clamped. This is mainly intended for the max channels\n            because some devices can report an unbound maximum.\n            */\n            minChannels = ma_clamp(minChannels, MA_MIN_CHANNELS, MA_MAX_CHANNELS);\n            maxChannels = ma_clamp(maxChannels, MA_MIN_CHANNELS, MA_MAX_CHANNELS);\n\n            if (minChannels == MA_MIN_CHANNELS && maxChannels == MA_MAX_CHANNELS) {\n                /* The device supports all channels. Don't iterate over every single one. Instead just set the channels to 0 which means all channels are supported. */\n                ma_context_iterate_rates_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, 0, 0, pDeviceInfo);    /* Intentionally setting the channel count to 0 as that means all channels are supported. */\n            } else {\n                /* The device only supports a specific set of channels. We need to iterate over all of them. */\n                for (iChannel = minChannels; iChannel <= maxChannels; iChannel += 1) {\n                    /* Test the channel before applying it to the configuration space. */\n                    unsigned int channels = iChannel;\n\n                    /* Make sure our channel range is reset before testing again or else we'll always fail the test. */\n                    ((ma_snd_pcm_hw_params_any_proc)pContext->alsa.snd_pcm_hw_params_any)(pPCM, pHWParams);\n                    ((ma_snd_pcm_hw_params_set_format_proc)pContext->alsa.snd_pcm_hw_params_set_format)(pPCM, pHWParams, ma_convert_ma_format_to_alsa_format(format));\n\n                    if (((ma_snd_pcm_hw_params_test_channels_proc)pContext->alsa.snd_pcm_hw_params_test_channels)(pPCM, pHWParams, channels) == 0) {\n                        /* The channel count is supported. */\n\n                        /* The configuration space now needs to be restricted to the channel count before extracting the sample rate. */\n                        ((ma_snd_pcm_hw_params_set_channels_proc)pContext->alsa.snd_pcm_hw_params_set_channels)(pPCM, pHWParams, channels);\n\n                        /* Only after the configuration space has been restricted to the specific channel count should we iterate over our sample rates. */\n                        ma_context_iterate_rates_and_add_native_data_format__alsa(pContext, pPCM, pHWParams, format, channels, 0, pDeviceInfo);\n                    } else {\n                        /* The channel count is not supported. Skip. */\n                    }\n                }\n            }\n        } else {\n            /* The format is not supported. Skip. */\n        }\n    }\n\n    ma_free(pHWParams, &pContext->allocationCallbacks);\n\n    ((ma_snd_pcm_close_proc)pContext->alsa.snd_pcm_close)(pPCM);\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_uninit__alsa(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if ((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture) {\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture);\n        close(pDevice->alsa.wakeupfdCapture);\n        ma_free(pDevice->alsa.pPollDescriptorsCapture, &pDevice->pContext->allocationCallbacks);\n    }\n\n    if ((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback) {\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback);\n        close(pDevice->alsa.wakeupfdPlayback);\n        ma_free(pDevice->alsa.pPollDescriptorsPlayback, &pDevice->pContext->allocationCallbacks);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_init_by_type__alsa(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptor, ma_device_type deviceType)\n{\n    ma_result result;\n    int resultALSA;\n    ma_snd_pcm_t* pPCM;\n    ma_bool32 isUsingMMap;\n    ma_snd_pcm_format_t formatALSA;\n    ma_format internalFormat;\n    ma_uint32 internalChannels;\n    ma_uint32 internalSampleRate;\n    ma_channel internalChannelMap[MA_MAX_CHANNELS];\n    ma_uint32 internalPeriodSizeInFrames;\n    ma_uint32 internalPeriods;\n    int openMode;\n    ma_snd_pcm_hw_params_t* pHWParams;\n    ma_snd_pcm_sw_params_t* pSWParams;\n    ma_snd_pcm_uframes_t bufferBoundary;\n    int pollDescriptorCount;\n    struct pollfd* pPollDescriptors;\n    int wakeupfd;\n\n    MA_ASSERT(pConfig != NULL);\n    MA_ASSERT(deviceType != ma_device_type_duplex); /* This function should only be called for playback _or_ capture, never duplex. */\n    MA_ASSERT(pDevice != NULL);\n\n    formatALSA = ma_convert_ma_format_to_alsa_format(pDescriptor->format);\n\n    openMode = 0;\n    if (pConfig->alsa.noAutoResample) {\n        openMode |= MA_SND_PCM_NO_AUTO_RESAMPLE;\n    }\n    if (pConfig->alsa.noAutoChannels) {\n        openMode |= MA_SND_PCM_NO_AUTO_CHANNELS;\n    }\n    if (pConfig->alsa.noAutoFormat) {\n        openMode |= MA_SND_PCM_NO_AUTO_FORMAT;\n    }\n\n    result = ma_context_open_pcm__alsa(pDevice->pContext, pDescriptor->shareMode, deviceType, pDescriptor->pDeviceID, openMode, &pPCM);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n\n    /* Hardware parameters. */\n    pHWParams = (ma_snd_pcm_hw_params_t*)ma_calloc(((ma_snd_pcm_hw_params_sizeof_proc)pDevice->pContext->alsa.snd_pcm_hw_params_sizeof)(), &pDevice->pContext->allocationCallbacks);\n    if (pHWParams == NULL) {\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to allocate memory for hardware parameters.\");\n        return MA_OUT_OF_MEMORY;\n    }\n\n    resultALSA = ((ma_snd_pcm_hw_params_any_proc)pDevice->pContext->alsa.snd_pcm_hw_params_any)(pPCM, pHWParams);\n    if (resultALSA < 0) {\n        ma_free(pHWParams, &pDevice->pContext->allocationCallbacks);\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to initialize hardware parameters. snd_pcm_hw_params_any() failed.\");\n        return ma_result_from_errno(-resultALSA);\n    }\n\n    /* MMAP Mode. Try using interleaved MMAP access. If this fails, fall back to standard readi/writei. */\n    isUsingMMap = MA_FALSE;\n#if 0   /* NOTE: MMAP mode temporarily disabled. */\n    if (deviceType != ma_device_type_capture) {    /* <-- Disabling MMAP mode for capture devices because I apparently do not have a device that supports it which means I can't test it... Contributions welcome. */\n        if (!pConfig->alsa.noMMap) {\n            if (((ma_snd_pcm_hw_params_set_access_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_access)(pPCM, pHWParams, MA_SND_PCM_ACCESS_MMAP_INTERLEAVED) == 0) {\n                pDevice->alsa.isUsingMMap = MA_TRUE;\n            }\n        }\n    }\n#endif\n\n    if (!isUsingMMap) {\n        resultALSA = ((ma_snd_pcm_hw_params_set_access_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_access)(pPCM, pHWParams, MA_SND_PCM_ACCESS_RW_INTERLEAVED);\n        if (resultALSA < 0) {\n            ma_free(pHWParams, &pDevice->pContext->allocationCallbacks);\n            ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to set access mode to neither SND_PCM_ACCESS_MMAP_INTERLEAVED nor SND_PCM_ACCESS_RW_INTERLEAVED. snd_pcm_hw_params_set_access() failed.\");\n            return ma_result_from_errno(-resultALSA);\n        }\n    }\n\n    /*\n    Most important properties first. The documentation for OSS (yes, I know this is ALSA!) recommends format, channels, then sample rate. I can't\n    find any documentation for ALSA specifically, so I'm going to copy the recommendation for OSS.\n    */\n\n    /* Format. */\n    {\n        /*\n        At this point we should have a list of supported formats, so now we need to find the best one. We first check if the requested format is\n        supported, and if so, use that one. If it's not supported, we just run though a list of formats and try to find the best one.\n        */\n        if (formatALSA == MA_SND_PCM_FORMAT_UNKNOWN || ((ma_snd_pcm_hw_params_test_format_proc)pDevice->pContext->alsa.snd_pcm_hw_params_test_format)(pPCM, pHWParams, formatALSA) != 0) {\n            /* We're either requesting the native format or the specified format is not supported. */\n            size_t iFormat;\n\n            formatALSA = MA_SND_PCM_FORMAT_UNKNOWN;\n            for (iFormat = 0; iFormat < ma_countof(g_maFormatPriorities); ++iFormat) {\n                if (((ma_snd_pcm_hw_params_test_format_proc)pDevice->pContext->alsa.snd_pcm_hw_params_test_format)(pPCM, pHWParams, ma_convert_ma_format_to_alsa_format(g_maFormatPriorities[iFormat])) == 0) {\n                    formatALSA = ma_convert_ma_format_to_alsa_format(g_maFormatPriorities[iFormat]);\n                    break;\n                }\n            }\n\n            if (formatALSA == MA_SND_PCM_FORMAT_UNKNOWN) {\n                ma_free(pHWParams, &pDevice->pContext->allocationCallbacks);\n                ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Format not supported. The device does not support any miniaudio formats.\");\n                return MA_FORMAT_NOT_SUPPORTED;\n            }\n        }\n\n        resultALSA = ((ma_snd_pcm_hw_params_set_format_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_format)(pPCM, pHWParams, formatALSA);\n        if (resultALSA < 0) {\n            ma_free(pHWParams, &pDevice->pContext->allocationCallbacks);\n            ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Format not supported. snd_pcm_hw_params_set_format() failed.\");\n            return ma_result_from_errno(-resultALSA);\n        }\n\n        internalFormat = ma_format_from_alsa(formatALSA);\n        if (internalFormat == ma_format_unknown) {\n            ma_free(pHWParams, &pDevice->pContext->allocationCallbacks);\n            ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] The chosen format is not supported by miniaudio.\");\n            return MA_FORMAT_NOT_SUPPORTED;\n        }\n    }\n\n    /* Channels. */\n    {\n        unsigned int channels = pDescriptor->channels;\n        if (channels == 0) {\n            channels = MA_DEFAULT_CHANNELS;\n        }\n\n        resultALSA = ((ma_snd_pcm_hw_params_set_channels_near_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_channels_near)(pPCM, pHWParams, &channels);\n        if (resultALSA < 0) {\n            ma_free(pHWParams, &pDevice->pContext->allocationCallbacks);\n            ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to set channel count. snd_pcm_hw_params_set_channels_near() failed.\");\n            return ma_result_from_errno(-resultALSA);\n        }\n\n        internalChannels = (ma_uint32)channels;\n    }\n\n    /* Sample Rate */\n    {\n        unsigned int sampleRate;\n\n        /*\n        It appears there's either a bug in ALSA, a bug in some drivers, or I'm doing something silly; but having resampling enabled causes\n        problems with some device configurations when used in conjunction with MMAP access mode. To fix this problem we need to disable\n        resampling.\n\n        To reproduce this problem, open the \"plug:dmix\" device, and set the sample rate to 44100. Internally, it looks like dmix uses a\n        sample rate of 48000. The hardware parameters will get set correctly with no errors, but it looks like the 44100 -> 48000 resampling\n        doesn't work properly - but only with MMAP access mode. You will notice skipping/crackling in the audio, and it'll run at a slightly\n        faster rate.\n\n        miniaudio has built-in support for sample rate conversion (albeit low quality at the moment), so disabling resampling should be fine\n        for us. The only problem is that it won't be taking advantage of any kind of hardware-accelerated resampling and it won't be very\n        good quality until I get a chance to improve the quality of miniaudio's software sample rate conversion.\n\n        I don't currently know if the dmix plugin is the only one with this error. Indeed, this is the only one I've been able to reproduce\n        this error with. In the future, we may want to restrict the disabling of resampling to only known bad plugins.\n        */\n        ((ma_snd_pcm_hw_params_set_rate_resample_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_rate_resample)(pPCM, pHWParams, 0);\n\n        sampleRate = pDescriptor->sampleRate;\n        if (sampleRate == 0) {\n            sampleRate = MA_DEFAULT_SAMPLE_RATE;\n        }\n\n        resultALSA = ((ma_snd_pcm_hw_params_set_rate_near_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_rate_near)(pPCM, pHWParams, &sampleRate, 0);\n        if (resultALSA < 0) {\n            ma_free(pHWParams, &pDevice->pContext->allocationCallbacks);\n            ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Sample rate not supported. snd_pcm_hw_params_set_rate_near() failed.\");\n            return ma_result_from_errno(-resultALSA);\n        }\n\n        internalSampleRate = (ma_uint32)sampleRate;\n    }\n\n    /* Periods. */\n    {\n        ma_uint32 periods = pDescriptor->periodCount;\n\n        resultALSA = ((ma_snd_pcm_hw_params_set_periods_near_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_periods_near)(pPCM, pHWParams, &periods, NULL);\n        if (resultALSA < 0) {\n            ma_free(pHWParams, &pDevice->pContext->allocationCallbacks);\n            ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to set period count. snd_pcm_hw_params_set_periods_near() failed.\");\n            return ma_result_from_errno(-resultALSA);\n        }\n\n        internalPeriods = periods;\n    }\n\n    /* Buffer Size */\n    {\n        ma_snd_pcm_uframes_t actualBufferSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, internalSampleRate, pConfig->performanceProfile) * internalPeriods;\n\n        resultALSA = ((ma_snd_pcm_hw_params_set_buffer_size_near_proc)pDevice->pContext->alsa.snd_pcm_hw_params_set_buffer_size_near)(pPCM, pHWParams, &actualBufferSizeInFrames);\n        if (resultALSA < 0) {\n            ma_free(pHWParams, &pDevice->pContext->allocationCallbacks);\n            ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to set buffer size for device. snd_pcm_hw_params_set_buffer_size() failed.\");\n            return ma_result_from_errno(-resultALSA);\n        }\n\n        internalPeriodSizeInFrames = actualBufferSizeInFrames / internalPeriods;\n    }\n\n    /* Apply hardware parameters. */\n    resultALSA = ((ma_snd_pcm_hw_params_proc)pDevice->pContext->alsa.snd_pcm_hw_params)(pPCM, pHWParams);\n    if (resultALSA < 0) {\n        ma_free(pHWParams, &pDevice->pContext->allocationCallbacks);\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to set hardware parameters. snd_pcm_hw_params() failed.\");\n        return ma_result_from_errno(-resultALSA);\n    }\n\n    ma_free(pHWParams, &pDevice->pContext->allocationCallbacks);\n    pHWParams = NULL;\n\n\n    /* Software parameters. */\n    pSWParams = (ma_snd_pcm_sw_params_t*)ma_calloc(((ma_snd_pcm_sw_params_sizeof_proc)pDevice->pContext->alsa.snd_pcm_sw_params_sizeof)(), &pDevice->pContext->allocationCallbacks);\n    if (pSWParams == NULL) {\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to allocate memory for software parameters.\");\n        return MA_OUT_OF_MEMORY;\n    }\n\n    resultALSA = ((ma_snd_pcm_sw_params_current_proc)pDevice->pContext->alsa.snd_pcm_sw_params_current)(pPCM, pSWParams);\n    if (resultALSA < 0) {\n        ma_free(pSWParams, &pDevice->pContext->allocationCallbacks);\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to initialize software parameters. snd_pcm_sw_params_current() failed.\");\n        return ma_result_from_errno(-resultALSA);\n    }\n\n    resultALSA = ((ma_snd_pcm_sw_params_set_avail_min_proc)pDevice->pContext->alsa.snd_pcm_sw_params_set_avail_min)(pPCM, pSWParams, ma_prev_power_of_2(internalPeriodSizeInFrames));\n    if (resultALSA < 0) {\n        ma_free(pSWParams, &pDevice->pContext->allocationCallbacks);\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] snd_pcm_sw_params_set_avail_min() failed.\");\n        return ma_result_from_errno(-resultALSA);\n    }\n\n    resultALSA = ((ma_snd_pcm_sw_params_get_boundary_proc)pDevice->pContext->alsa.snd_pcm_sw_params_get_boundary)(pSWParams, &bufferBoundary);\n    if (resultALSA < 0) {\n        bufferBoundary = internalPeriodSizeInFrames * internalPeriods;\n    }\n\n    if (deviceType == ma_device_type_playback && !isUsingMMap) {   /* Only playback devices in writei/readi mode need a start threshold. */\n        /*\n        Subtle detail here with the start threshold. When in playback-only mode (no full-duplex) we can set the start threshold to\n        the size of a period. But for full-duplex we need to set it such that it is at least two periods.\n        */\n        resultALSA = ((ma_snd_pcm_sw_params_set_start_threshold_proc)pDevice->pContext->alsa.snd_pcm_sw_params_set_start_threshold)(pPCM, pSWParams, internalPeriodSizeInFrames*2);\n        if (resultALSA < 0) {\n            ma_free(pSWParams, &pDevice->pContext->allocationCallbacks);\n            ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to set start threshold for playback device. snd_pcm_sw_params_set_start_threshold() failed.\");\n            return ma_result_from_errno(-resultALSA);\n        }\n\n        resultALSA = ((ma_snd_pcm_sw_params_set_stop_threshold_proc)pDevice->pContext->alsa.snd_pcm_sw_params_set_stop_threshold)(pPCM, pSWParams, bufferBoundary);\n        if (resultALSA < 0) { /* Set to boundary to loop instead of stop in the event of an xrun. */\n            ma_free(pSWParams, &pDevice->pContext->allocationCallbacks);\n            ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to set stop threshold for playback device. snd_pcm_sw_params_set_stop_threshold() failed.\");\n            return ma_result_from_errno(-resultALSA);\n        }\n    }\n\n    resultALSA = ((ma_snd_pcm_sw_params_proc)pDevice->pContext->alsa.snd_pcm_sw_params)(pPCM, pSWParams);\n    if (resultALSA < 0) {\n        ma_free(pSWParams, &pDevice->pContext->allocationCallbacks);\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to set software parameters. snd_pcm_sw_params() failed.\");\n        return ma_result_from_errno(-resultALSA);\n    }\n\n    ma_free(pSWParams, &pDevice->pContext->allocationCallbacks);\n    pSWParams = NULL;\n\n\n    /* Grab the internal channel map. For now we're not going to bother trying to change the channel map and instead just do it ourselves. */\n    {\n        ma_snd_pcm_chmap_t* pChmap = NULL;\n        if (pDevice->pContext->alsa.snd_pcm_get_chmap != NULL) {\n            pChmap = ((ma_snd_pcm_get_chmap_proc)pDevice->pContext->alsa.snd_pcm_get_chmap)(pPCM);\n        }\n\n        if (pChmap != NULL) {\n            ma_uint32 iChannel;\n\n            /* There are cases where the returned channel map can have a different channel count than was returned by snd_pcm_hw_params_set_channels_near(). */\n            if (pChmap->channels >= internalChannels) {\n                /* Drop excess channels. */\n                for (iChannel = 0; iChannel < internalChannels; ++iChannel) {\n                    internalChannelMap[iChannel] = ma_convert_alsa_channel_position_to_ma_channel(pChmap->pos[iChannel]);\n                }\n            } else {\n                ma_uint32 i;\n\n                /*\n                Excess channels use defaults. Do an initial fill with defaults, overwrite the first pChmap->channels, validate to ensure there are no duplicate\n                channels. If validation fails, fall back to defaults.\n                */\n                ma_bool32 isValid = MA_TRUE;\n\n                /* Fill with defaults. */\n                ma_channel_map_init_standard(ma_standard_channel_map_alsa, internalChannelMap, ma_countof(internalChannelMap), internalChannels);\n\n                /* Overwrite first pChmap->channels channels. */\n                for (iChannel = 0; iChannel < pChmap->channels; ++iChannel) {\n                    internalChannelMap[iChannel] = ma_convert_alsa_channel_position_to_ma_channel(pChmap->pos[iChannel]);\n                }\n\n                /* Validate. */\n                for (i = 0; i < internalChannels && isValid; ++i) {\n                    ma_uint32 j;\n                    for (j = i+1; j < internalChannels; ++j) {\n                        if (internalChannelMap[i] == internalChannelMap[j]) {\n                            isValid = MA_FALSE;\n                            break;\n                        }\n                    }\n                }\n\n                /* If our channel map is invalid, fall back to defaults. */\n                if (!isValid) {\n                    ma_channel_map_init_standard(ma_standard_channel_map_alsa, internalChannelMap, ma_countof(internalChannelMap), internalChannels);\n                }\n            }\n\n            free(pChmap);\n            pChmap = NULL;\n        } else {\n            /* Could not retrieve the channel map. Fall back to a hard-coded assumption. */\n            ma_channel_map_init_standard(ma_standard_channel_map_alsa, internalChannelMap, ma_countof(internalChannelMap), internalChannels);\n        }\n    }\n\n\n    /*\n    We need to retrieve the poll descriptors so we can use poll() to wait for data to become\n    available for reading or writing. There's no well defined maximum for this so we're just going\n    to allocate this on the heap.\n    */\n    pollDescriptorCount = ((ma_snd_pcm_poll_descriptors_count_proc)pDevice->pContext->alsa.snd_pcm_poll_descriptors_count)(pPCM);\n    if (pollDescriptorCount <= 0) {\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to retrieve poll descriptors count.\");\n        return MA_ERROR;\n    }\n\n    pPollDescriptors = (struct pollfd*)ma_malloc(sizeof(*pPollDescriptors) * (pollDescriptorCount + 1), &pDevice->pContext->allocationCallbacks);   /* +1 because we want room for the wakeup descriptor. */\n    if (pPollDescriptors == NULL) {\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to allocate memory for poll descriptors.\");\n        return MA_OUT_OF_MEMORY;\n    }\n\n    /*\n    We need an eventfd to wakeup from poll() and avoid a deadlock in situations where the driver\n    never returns from writei() and readi(). This has been observed with the \"pulse\" device.\n    */\n    wakeupfd = eventfd(0, 0);\n    if (wakeupfd < 0) {\n        ma_free(pPollDescriptors, &pDevice->pContext->allocationCallbacks);\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to create eventfd for poll wakeup.\");\n        return ma_result_from_errno(errno);\n    }\n\n    /* We'll place the wakeup fd at the start of the buffer. */\n    pPollDescriptors[0].fd      = wakeupfd;\n    pPollDescriptors[0].events  = POLLIN;    /* We only care about waiting to read from the wakeup file descriptor. */\n    pPollDescriptors[0].revents = 0;\n\n    /* We can now extract the PCM poll descriptors which we place after the wakeup descriptor. */\n    pollDescriptorCount = ((ma_snd_pcm_poll_descriptors_proc)pDevice->pContext->alsa.snd_pcm_poll_descriptors)(pPCM, pPollDescriptors + 1, pollDescriptorCount);    /* +1 because we want to place these descriptors after the wakeup descriptor. */\n    if (pollDescriptorCount <= 0) {\n        close(wakeupfd);\n        ma_free(pPollDescriptors, &pDevice->pContext->allocationCallbacks);\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to retrieve poll descriptors.\");\n        return MA_ERROR;\n    }\n\n    if (deviceType == ma_device_type_capture) {\n        pDevice->alsa.pollDescriptorCountCapture = pollDescriptorCount;\n        pDevice->alsa.pPollDescriptorsCapture = pPollDescriptors;\n        pDevice->alsa.wakeupfdCapture = wakeupfd;\n    } else {\n        pDevice->alsa.pollDescriptorCountPlayback = pollDescriptorCount;\n        pDevice->alsa.pPollDescriptorsPlayback = pPollDescriptors;\n        pDevice->alsa.wakeupfdPlayback = wakeupfd;\n    }\n\n\n    /* We're done. Prepare the device. */\n    resultALSA = ((ma_snd_pcm_prepare_proc)pDevice->pContext->alsa.snd_pcm_prepare)(pPCM);\n    if (resultALSA < 0) {\n        close(wakeupfd);\n        ma_free(pPollDescriptors, &pDevice->pContext->allocationCallbacks);\n        ((ma_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)(pPCM);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to prepare device.\");\n        return ma_result_from_errno(-resultALSA);\n    }\n\n\n    if (deviceType == ma_device_type_capture) {\n        pDevice->alsa.pPCMCapture         = (ma_ptr)pPCM;\n        pDevice->alsa.isUsingMMapCapture  = isUsingMMap;\n    } else {\n        pDevice->alsa.pPCMPlayback        = (ma_ptr)pPCM;\n        pDevice->alsa.isUsingMMapPlayback = isUsingMMap;\n    }\n\n    pDescriptor->format             = internalFormat;\n    pDescriptor->channels           = internalChannels;\n    pDescriptor->sampleRate         = internalSampleRate;\n    ma_channel_map_copy(pDescriptor->channelMap, internalChannelMap, ma_min(internalChannels, MA_MAX_CHANNELS));\n    pDescriptor->periodSizeInFrames = internalPeriodSizeInFrames;\n    pDescriptor->periodCount        = internalPeriods;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_init__alsa(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    MA_ZERO_OBJECT(&pDevice->alsa);\n\n    if (pConfig->deviceType == ma_device_type_loopback) {\n        return MA_DEVICE_TYPE_NOT_SUPPORTED;\n    }\n\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        ma_result result = ma_device_init_by_type__alsa(pDevice, pConfig, pDescriptorCapture, ma_device_type_capture);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        ma_result result = ma_device_init_by_type__alsa(pDevice, pConfig, pDescriptorPlayback, ma_device_type_playback);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_start__alsa(ma_device* pDevice)\n{\n    int resultALSA;\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        resultALSA = ((ma_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture);\n        if (resultALSA < 0) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to start capture device.\");\n            return ma_result_from_errno(-resultALSA);\n        }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        /* Don't need to do anything for playback because it'll be started automatically when enough data has been written. */\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop__alsa(ma_device* pDevice)\n{\n    /*\n    The stop callback will get called on the worker thread after read/write__alsa() has returned. At this point there is\n    a small chance that our wakeupfd has not been cleared. We'll clear that out now if applicable.\n    */\n    int resultPoll;\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[ALSA] Dropping capture device...\\n\");\n        ((ma_snd_pcm_drop_proc)pDevice->pContext->alsa.snd_pcm_drop)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture);\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[ALSA] Dropping capture device successful.\\n\");\n\n        /* We need to prepare the device again, otherwise we won't be able to restart the device. */\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[ALSA] Preparing capture device...\\n\");\n        if (((ma_snd_pcm_prepare_proc)pDevice->pContext->alsa.snd_pcm_prepare)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture) < 0) {\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[ALSA] Preparing capture device failed.\\n\");\n        } else {\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[ALSA] Preparing capture device successful.\\n\");\n        }\n\n    /* Clear the wakeupfd. */\n    resultPoll = poll((struct pollfd*)pDevice->alsa.pPollDescriptorsCapture, 1, 0);\n    if (resultPoll > 0) {\n        ma_uint64 t;\n        (void)!read(((struct pollfd*)pDevice->alsa.pPollDescriptorsCapture)[0].fd, &t, sizeof(t));\n    }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[ALSA] Dropping playback device...\\n\");\n        ((ma_snd_pcm_drop_proc)pDevice->pContext->alsa.snd_pcm_drop)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback);\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[ALSA] Dropping playback device successful.\\n\");\n\n        /* We need to prepare the device again, otherwise we won't be able to restart the device. */\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[ALSA] Preparing playback device...\\n\");\n        if (((ma_snd_pcm_prepare_proc)pDevice->pContext->alsa.snd_pcm_prepare)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback) < 0) {\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[ALSA] Preparing playback device failed.\\n\");\n        } else {\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[ALSA] Preparing playback device successful.\\n\");\n        }\n\n        /* Clear the wakeupfd. */\n    resultPoll = poll((struct pollfd*)pDevice->alsa.pPollDescriptorsPlayback, 1, 0);\n    if (resultPoll > 0) {\n        ma_uint64 t;\n        (void)!read(((struct pollfd*)pDevice->alsa.pPollDescriptorsPlayback)[0].fd, &t, sizeof(t));\n    }\n\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_wait__alsa(ma_device* pDevice, ma_snd_pcm_t* pPCM, struct pollfd* pPollDescriptors, int pollDescriptorCount, short requiredEvent)\n{\n    for (;;) {\n        unsigned short revents;\n        int resultALSA;\n        int resultPoll = poll(pPollDescriptors, pollDescriptorCount, -1);\n        if (resultPoll < 0) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] poll() failed.\\n\");\n            return ma_result_from_errno(errno);\n        }\n\n        /*\n        Before checking the ALSA poll descriptor flag we need to check if the wakeup descriptor\n        has had it's POLLIN flag set. If so, we need to actually read the data and then exit\n        function. The wakeup descriptor will be the first item in the descriptors buffer.\n        */\n        if ((pPollDescriptors[0].revents & POLLIN) != 0) {\n            ma_uint64 t;\n            int resultRead = read(pPollDescriptors[0].fd, &t, sizeof(t));    /* <-- Important that we read here so that the next write() does not block. */\n            if (resultRead < 0) {\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] read() failed.\\n\");\n                return ma_result_from_errno(errno);\n            }\n\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[ALSA] POLLIN set for wakeupfd\\n\");\n            return MA_DEVICE_NOT_STARTED;\n        }\n\n        /*\n        Getting here means that some data should be able to be read. We need to use ALSA to\n        translate the revents flags for us.\n        */\n        resultALSA = ((ma_snd_pcm_poll_descriptors_revents_proc)pDevice->pContext->alsa.snd_pcm_poll_descriptors_revents)(pPCM, pPollDescriptors + 1, pollDescriptorCount - 1, &revents);   /* +1, -1 to ignore the wakeup descriptor. */\n        if (resultALSA < 0) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] snd_pcm_poll_descriptors_revents() failed.\\n\");\n            return ma_result_from_errno(-resultALSA);\n        }\n\n        if ((revents & POLLERR) != 0) {\n            ma_snd_pcm_state_t state = ((ma_snd_pcm_state_proc)pDevice->pContext->alsa.snd_pcm_state)(pPCM);\n            if (state == MA_SND_PCM_STATE_XRUN) {\n                /* The PCM is in a xrun state. This will be recovered from at a higher level. We can disregard this. */\n        } else {\n                ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, \"[ALSA] POLLERR detected. status = %d\\n\", ((ma_snd_pcm_state_proc)pDevice->pContext->alsa.snd_pcm_state)(pPCM));\n            }\n        }\n\n        if ((revents & requiredEvent) == requiredEvent) {\n            break;  /* We're done. Data available for reading or writing. */\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_wait_read__alsa(ma_device* pDevice)\n{\n    return ma_device_wait__alsa(pDevice, (ma_snd_pcm_t*)pDevice->alsa.pPCMCapture, (struct pollfd*)pDevice->alsa.pPollDescriptorsCapture, pDevice->alsa.pollDescriptorCountCapture + 1, POLLIN); /* +1 to account for the wakeup descriptor. */\n}\n\nstatic ma_result ma_device_wait_write__alsa(ma_device* pDevice)\n{\n    return ma_device_wait__alsa(pDevice, (ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback, (struct pollfd*)pDevice->alsa.pPollDescriptorsPlayback, pDevice->alsa.pollDescriptorCountPlayback + 1, POLLOUT); /* +1 to account for the wakeup descriptor. */\n}\n\nstatic ma_result ma_device_read__alsa(ma_device* pDevice, void* pFramesOut, ma_uint32 frameCount, ma_uint32* pFramesRead)\n{\n    ma_snd_pcm_sframes_t resultALSA = 0;\n\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(pFramesOut != NULL);\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    while (ma_device_get_state(pDevice) == ma_device_state_started) {\n        ma_result result;\n\n        /* The first thing to do is wait for data to become available for reading. This will return an error code if the device has been stopped. */\n        result = ma_device_wait_read__alsa(pDevice);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        /* Getting here means we should have data available. */\n        resultALSA = ((ma_snd_pcm_readi_proc)pDevice->pContext->alsa.snd_pcm_readi)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture, pFramesOut, frameCount);\n        if (resultALSA >= 0) {\n            break;  /* Success. */\n        } else {\n            if (resultALSA == -EAGAIN) {\n                /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"EGAIN (read)\\n\");*/\n                continue;   /* Try again. */\n            } else if (resultALSA == -EPIPE) {\n                ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"EPIPE (read)\\n\");\n\n                /* Overrun. Recover and try again. If this fails we need to return an error. */\n                resultALSA = ((ma_snd_pcm_recover_proc)pDevice->pContext->alsa.snd_pcm_recover)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture, resultALSA, MA_TRUE);\n                if (resultALSA < 0) {\n                    ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to recover device after overrun.\");\n                    return ma_result_from_errno((int)-resultALSA);\n                }\n\n                resultALSA = ((ma_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((ma_snd_pcm_t*)pDevice->alsa.pPCMCapture);\n                if (resultALSA < 0) {\n                    ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to start device after underrun.\");\n                    return ma_result_from_errno((int)-resultALSA);\n                }\n\n                continue;   /* Try reading again. */\n            }\n        }\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = resultALSA;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_write__alsa(ma_device* pDevice, const void* pFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten)\n{\n    ma_snd_pcm_sframes_t resultALSA = 0;\n\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(pFrames != NULL);\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = 0;\n    }\n\n    while (ma_device_get_state(pDevice) == ma_device_state_started) {\n        ma_result result;\n\n        /* The first thing to do is wait for space to become available for writing. This will return an error code if the device has been stopped. */\n        result = ma_device_wait_write__alsa(pDevice);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        resultALSA = ((ma_snd_pcm_writei_proc)pDevice->pContext->alsa.snd_pcm_writei)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback, pFrames, frameCount);\n        if (resultALSA >= 0) {\n            break;  /* Success. */\n        } else {\n            if (resultALSA == -EAGAIN) {\n                /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"EGAIN (write)\\n\");*/\n                continue;   /* Try again. */\n            } else if (resultALSA == -EPIPE) {\n                ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"EPIPE (write)\\n\");\n\n                /* Underrun. Recover and try again. If this fails we need to return an error. */\n                resultALSA = ((ma_snd_pcm_recover_proc)pDevice->pContext->alsa.snd_pcm_recover)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback, resultALSA, MA_TRUE);    /* MA_TRUE=silent (don't print anything on error). */\n                if (resultALSA < 0) {\n                    ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to recover device after underrun.\");\n                    return ma_result_from_errno((int)-resultALSA);\n                }\n\n                /*\n                In my testing I have had a situation where writei() does not automatically restart the device even though I've set it\n                up as such in the software parameters. What will happen is writei() will block indefinitely even though the number of\n                frames is well beyond the auto-start threshold. To work around this I've needed to add an explicit start here. Not sure\n                if this is me just being stupid and not recovering the device properly, but this definitely feels like something isn't\n                quite right here.\n                */\n                resultALSA = ((ma_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((ma_snd_pcm_t*)pDevice->alsa.pPCMPlayback);\n                if (resultALSA < 0) {\n                    ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] Failed to start device after underrun.\");\n                    return ma_result_from_errno((int)-resultALSA);\n                }\n\n                continue;   /* Try writing again. */\n            }\n        }\n    }\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = resultALSA;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_data_loop_wakeup__alsa(ma_device* pDevice)\n{\n    ma_uint64 t = 1;\n    int resultWrite = 0;\n\n    MA_ASSERT(pDevice != NULL);\n\n    ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[ALSA] Waking up...\\n\");\n\n    /* Write to an eventfd to trigger a wakeup from poll() and abort any reading or writing. */\n    if (pDevice->alsa.pPollDescriptorsCapture != NULL) {\n        resultWrite = write(pDevice->alsa.wakeupfdCapture, &t, sizeof(t));\n    }\n    if (pDevice->alsa.pPollDescriptorsPlayback != NULL) {\n        resultWrite = write(pDevice->alsa.wakeupfdPlayback, &t, sizeof(t));\n    }\n\n    if (resultWrite < 0) {\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[ALSA] write() failed.\\n\");\n        return ma_result_from_errno(errno);\n    }\n\n    ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[ALSA] Waking up completed successfully.\\n\");\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_uninit__alsa(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_alsa);\n\n    /* Clean up memory for memory leak checkers. */\n    ((ma_snd_config_update_free_global_proc)pContext->alsa.snd_config_update_free_global)();\n\n#ifndef MA_NO_RUNTIME_LINKING\n    ma_dlclose(ma_context_get_log(pContext), pContext->alsa.asoundSO);\n#endif\n\n    ma_mutex_uninit(&pContext->alsa.internalDeviceEnumLock);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init__alsa(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n    ma_result result;\n#ifndef MA_NO_RUNTIME_LINKING\n    const char* libasoundNames[] = {\n        \"libasound.so.2\",\n        \"libasound.so\"\n    };\n    size_t i;\n\n    for (i = 0; i < ma_countof(libasoundNames); ++i) {\n        pContext->alsa.asoundSO = ma_dlopen(ma_context_get_log(pContext), libasoundNames[i]);\n        if (pContext->alsa.asoundSO != NULL) {\n            break;\n        }\n    }\n\n    if (pContext->alsa.asoundSO == NULL) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"[ALSA] Failed to open shared object.\\n\");\n        return MA_NO_BACKEND;\n    }\n\n    pContext->alsa.snd_pcm_open                           = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_open\");\n    pContext->alsa.snd_pcm_close                          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_close\");\n    pContext->alsa.snd_pcm_hw_params_sizeof               = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_sizeof\");\n    pContext->alsa.snd_pcm_hw_params_any                  = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_any\");\n    pContext->alsa.snd_pcm_hw_params_set_format           = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_set_format\");\n    pContext->alsa.snd_pcm_hw_params_set_format_first     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_set_format_first\");\n    pContext->alsa.snd_pcm_hw_params_get_format_mask      = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_get_format_mask\");\n    pContext->alsa.snd_pcm_hw_params_set_channels         = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_set_channels\");\n    pContext->alsa.snd_pcm_hw_params_set_channels_near    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_set_channels_near\");\n    pContext->alsa.snd_pcm_hw_params_set_channels_minmax  = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_set_channels_minmax\");\n    pContext->alsa.snd_pcm_hw_params_set_rate_resample    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_set_rate_resample\");\n    pContext->alsa.snd_pcm_hw_params_set_rate             = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_set_rate\");\n    pContext->alsa.snd_pcm_hw_params_set_rate_near        = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_set_rate_near\");\n    pContext->alsa.snd_pcm_hw_params_set_buffer_size_near = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_set_buffer_size_near\");\n    pContext->alsa.snd_pcm_hw_params_set_periods_near     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_set_periods_near\");\n    pContext->alsa.snd_pcm_hw_params_set_access           = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_set_access\");\n    pContext->alsa.snd_pcm_hw_params_get_format           = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_get_format\");\n    pContext->alsa.snd_pcm_hw_params_get_channels         = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_get_channels\");\n    pContext->alsa.snd_pcm_hw_params_get_channels_min     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_get_channels_min\");\n    pContext->alsa.snd_pcm_hw_params_get_channels_max     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_get_channels_max\");\n    pContext->alsa.snd_pcm_hw_params_get_rate             = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_get_rate\");\n    pContext->alsa.snd_pcm_hw_params_get_rate_min         = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_get_rate_min\");\n    pContext->alsa.snd_pcm_hw_params_get_rate_max         = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_get_rate_max\");\n    pContext->alsa.snd_pcm_hw_params_get_buffer_size      = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_get_buffer_size\");\n    pContext->alsa.snd_pcm_hw_params_get_periods          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_get_periods\");\n    pContext->alsa.snd_pcm_hw_params_get_access           = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_get_access\");\n    pContext->alsa.snd_pcm_hw_params_test_format          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_test_format\");\n    pContext->alsa.snd_pcm_hw_params_test_channels        = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_test_channels\");\n    pContext->alsa.snd_pcm_hw_params_test_rate            = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params_test_rate\");\n    pContext->alsa.snd_pcm_hw_params                      = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_hw_params\");\n    pContext->alsa.snd_pcm_sw_params_sizeof               = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_sw_params_sizeof\");\n    pContext->alsa.snd_pcm_sw_params_current              = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_sw_params_current\");\n    pContext->alsa.snd_pcm_sw_params_get_boundary         = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_sw_params_get_boundary\");\n    pContext->alsa.snd_pcm_sw_params_set_avail_min        = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_sw_params_set_avail_min\");\n    pContext->alsa.snd_pcm_sw_params_set_start_threshold  = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_sw_params_set_start_threshold\");\n    pContext->alsa.snd_pcm_sw_params_set_stop_threshold   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_sw_params_set_stop_threshold\");\n    pContext->alsa.snd_pcm_sw_params                      = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_sw_params\");\n    pContext->alsa.snd_pcm_format_mask_sizeof             = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_format_mask_sizeof\");\n    pContext->alsa.snd_pcm_format_mask_test               = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_format_mask_test\");\n    pContext->alsa.snd_pcm_get_chmap                      = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_get_chmap\");\n    pContext->alsa.snd_pcm_state                          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_state\");\n    pContext->alsa.snd_pcm_prepare                        = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_prepare\");\n    pContext->alsa.snd_pcm_start                          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_start\");\n    pContext->alsa.snd_pcm_drop                           = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_drop\");\n    pContext->alsa.snd_pcm_drain                          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_drain\");\n    pContext->alsa.snd_pcm_reset                          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_reset\");\n    pContext->alsa.snd_device_name_hint                   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_device_name_hint\");\n    pContext->alsa.snd_device_name_get_hint               = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_device_name_get_hint\");\n    pContext->alsa.snd_card_get_index                     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_card_get_index\");\n    pContext->alsa.snd_device_name_free_hint              = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_device_name_free_hint\");\n    pContext->alsa.snd_pcm_mmap_begin                     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_mmap_begin\");\n    pContext->alsa.snd_pcm_mmap_commit                    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_mmap_commit\");\n    pContext->alsa.snd_pcm_recover                        = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_recover\");\n    pContext->alsa.snd_pcm_readi                          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_readi\");\n    pContext->alsa.snd_pcm_writei                         = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_writei\");\n    pContext->alsa.snd_pcm_avail                          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_avail\");\n    pContext->alsa.snd_pcm_avail_update                   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_avail_update\");\n    pContext->alsa.snd_pcm_wait                           = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_wait\");\n    pContext->alsa.snd_pcm_nonblock                       = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_nonblock\");\n    pContext->alsa.snd_pcm_info                           = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_info\");\n    pContext->alsa.snd_pcm_info_sizeof                    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_info_sizeof\");\n    pContext->alsa.snd_pcm_info_get_name                  = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_info_get_name\");\n    pContext->alsa.snd_pcm_poll_descriptors               = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_poll_descriptors\");\n    pContext->alsa.snd_pcm_poll_descriptors_count         = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_poll_descriptors_count\");\n    pContext->alsa.snd_pcm_poll_descriptors_revents       = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_pcm_poll_descriptors_revents\");\n    pContext->alsa.snd_config_update_free_global          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->alsa.asoundSO, \"snd_config_update_free_global\");\n#else\n    /* The system below is just for type safety. */\n    ma_snd_pcm_open_proc                           _snd_pcm_open                           = snd_pcm_open;\n    ma_snd_pcm_close_proc                          _snd_pcm_close                          = snd_pcm_close;\n    ma_snd_pcm_hw_params_sizeof_proc               _snd_pcm_hw_params_sizeof               = snd_pcm_hw_params_sizeof;\n    ma_snd_pcm_hw_params_any_proc                  _snd_pcm_hw_params_any                  = snd_pcm_hw_params_any;\n    ma_snd_pcm_hw_params_set_format_proc           _snd_pcm_hw_params_set_format           = snd_pcm_hw_params_set_format;\n    ma_snd_pcm_hw_params_set_format_first_proc     _snd_pcm_hw_params_set_format_first     = snd_pcm_hw_params_set_format_first;\n    ma_snd_pcm_hw_params_get_format_mask_proc      _snd_pcm_hw_params_get_format_mask      = snd_pcm_hw_params_get_format_mask;\n    ma_snd_pcm_hw_params_set_channels_proc         _snd_pcm_hw_params_set_channels         = snd_pcm_hw_params_set_channels;\n    ma_snd_pcm_hw_params_set_channels_near_proc    _snd_pcm_hw_params_set_channels_near    = snd_pcm_hw_params_set_channels_near;\n    ma_snd_pcm_hw_params_set_rate_resample_proc    _snd_pcm_hw_params_set_rate_resample    = snd_pcm_hw_params_set_rate_resample;\n    ma_snd_pcm_hw_params_set_rate_near             _snd_pcm_hw_params_set_rate             = snd_pcm_hw_params_set_rate;\n    ma_snd_pcm_hw_params_set_rate_near_proc        _snd_pcm_hw_params_set_rate_near        = snd_pcm_hw_params_set_rate_near;\n    ma_snd_pcm_hw_params_set_rate_minmax_proc      _snd_pcm_hw_params_set_rate_minmax      = snd_pcm_hw_params_set_rate_minmax;\n    ma_snd_pcm_hw_params_set_buffer_size_near_proc _snd_pcm_hw_params_set_buffer_size_near = snd_pcm_hw_params_set_buffer_size_near;\n    ma_snd_pcm_hw_params_set_periods_near_proc     _snd_pcm_hw_params_set_periods_near     = snd_pcm_hw_params_set_periods_near;\n    ma_snd_pcm_hw_params_set_access_proc           _snd_pcm_hw_params_set_access           = snd_pcm_hw_params_set_access;\n    ma_snd_pcm_hw_params_get_format_proc           _snd_pcm_hw_params_get_format           = snd_pcm_hw_params_get_format;\n    ma_snd_pcm_hw_params_get_channels_proc         _snd_pcm_hw_params_get_channels         = snd_pcm_hw_params_get_channels;\n    ma_snd_pcm_hw_params_get_channels_min_proc     _snd_pcm_hw_params_get_channels_min     = snd_pcm_hw_params_get_channels_min;\n    ma_snd_pcm_hw_params_get_channels_max_proc     _snd_pcm_hw_params_get_channels_max     = snd_pcm_hw_params_get_channels_max;\n    ma_snd_pcm_hw_params_get_rate_proc             _snd_pcm_hw_params_get_rate             = snd_pcm_hw_params_get_rate;\n    ma_snd_pcm_hw_params_get_rate_min_proc         _snd_pcm_hw_params_get_rate_min         = snd_pcm_hw_params_get_rate_min;\n    ma_snd_pcm_hw_params_get_rate_max_proc         _snd_pcm_hw_params_get_rate_max         = snd_pcm_hw_params_get_rate_max;\n    ma_snd_pcm_hw_params_get_buffer_size_proc      _snd_pcm_hw_params_get_buffer_size      = snd_pcm_hw_params_get_buffer_size;\n    ma_snd_pcm_hw_params_get_periods_proc          _snd_pcm_hw_params_get_periods          = snd_pcm_hw_params_get_periods;\n    ma_snd_pcm_hw_params_get_access_proc           _snd_pcm_hw_params_get_access           = snd_pcm_hw_params_get_access;\n    ma_snd_pcm_hw_params_test_format_proc          _snd_pcm_hw_params_test_format          = snd_pcm_hw_params_test_format;\n    ma_snd_pcm_hw_params_test_channels_proc        _snd_pcm_hw_params_test_channels        = snd_pcm_hw_params_test_channels;\n    ma_snd_pcm_hw_params_test_rate_proc            _snd_pcm_hw_params_test_rate            = snd_pcm_hw_params_test_rate;\n    ma_snd_pcm_hw_params_proc                      _snd_pcm_hw_params                      = snd_pcm_hw_params;\n    ma_snd_pcm_sw_params_sizeof_proc               _snd_pcm_sw_params_sizeof               = snd_pcm_sw_params_sizeof;\n    ma_snd_pcm_sw_params_current_proc              _snd_pcm_sw_params_current              = snd_pcm_sw_params_current;\n    ma_snd_pcm_sw_params_get_boundary_proc         _snd_pcm_sw_params_get_boundary         = snd_pcm_sw_params_get_boundary;\n    ma_snd_pcm_sw_params_set_avail_min_proc        _snd_pcm_sw_params_set_avail_min        = snd_pcm_sw_params_set_avail_min;\n    ma_snd_pcm_sw_params_set_start_threshold_proc  _snd_pcm_sw_params_set_start_threshold  = snd_pcm_sw_params_set_start_threshold;\n    ma_snd_pcm_sw_params_set_stop_threshold_proc   _snd_pcm_sw_params_set_stop_threshold   = snd_pcm_sw_params_set_stop_threshold;\n    ma_snd_pcm_sw_params_proc                      _snd_pcm_sw_params                      = snd_pcm_sw_params;\n    ma_snd_pcm_format_mask_sizeof_proc             _snd_pcm_format_mask_sizeof             = snd_pcm_format_mask_sizeof;\n    ma_snd_pcm_format_mask_test_proc               _snd_pcm_format_mask_test               = snd_pcm_format_mask_test;\n    ma_snd_pcm_get_chmap_proc                      _snd_pcm_get_chmap                      = snd_pcm_get_chmap;\n    ma_snd_pcm_state_proc                          _snd_pcm_state                          = snd_pcm_state;\n    ma_snd_pcm_prepare_proc                        _snd_pcm_prepare                        = snd_pcm_prepare;\n    ma_snd_pcm_start_proc                          _snd_pcm_start                          = snd_pcm_start;\n    ma_snd_pcm_drop_proc                           _snd_pcm_drop                           = snd_pcm_drop;\n    ma_snd_pcm_drain_proc                          _snd_pcm_drain                          = snd_pcm_drain;\n    ma_snd_pcm_reset_proc                          _snd_pcm_reset                          = snd_pcm_reset;\n    ma_snd_device_name_hint_proc                   _snd_device_name_hint                   = snd_device_name_hint;\n    ma_snd_device_name_get_hint_proc               _snd_device_name_get_hint               = snd_device_name_get_hint;\n    ma_snd_card_get_index_proc                     _snd_card_get_index                     = snd_card_get_index;\n    ma_snd_device_name_free_hint_proc              _snd_device_name_free_hint              = snd_device_name_free_hint;\n    ma_snd_pcm_mmap_begin_proc                     _snd_pcm_mmap_begin                     = snd_pcm_mmap_begin;\n    ma_snd_pcm_mmap_commit_proc                    _snd_pcm_mmap_commit                    = snd_pcm_mmap_commit;\n    ma_snd_pcm_recover_proc                        _snd_pcm_recover                        = snd_pcm_recover;\n    ma_snd_pcm_readi_proc                          _snd_pcm_readi                          = snd_pcm_readi;\n    ma_snd_pcm_writei_proc                         _snd_pcm_writei                         = snd_pcm_writei;\n    ma_snd_pcm_avail_proc                          _snd_pcm_avail                          = snd_pcm_avail;\n    ma_snd_pcm_avail_update_proc                   _snd_pcm_avail_update                   = snd_pcm_avail_update;\n    ma_snd_pcm_wait_proc                           _snd_pcm_wait                           = snd_pcm_wait;\n    ma_snd_pcm_nonblock_proc                       _snd_pcm_nonblock                       = snd_pcm_nonblock;\n    ma_snd_pcm_info_proc                           _snd_pcm_info                           = snd_pcm_info;\n    ma_snd_pcm_info_sizeof_proc                    _snd_pcm_info_sizeof                    = snd_pcm_info_sizeof;\n    ma_snd_pcm_info_get_name_proc                  _snd_pcm_info_get_name                  = snd_pcm_info_get_name;\n    ma_snd_pcm_poll_descriptors                    _snd_pcm_poll_descriptors               = snd_pcm_poll_descriptors;\n    ma_snd_pcm_poll_descriptors_count              _snd_pcm_poll_descriptors_count         = snd_pcm_poll_descriptors_count;\n    ma_snd_pcm_poll_descriptors_revents            _snd_pcm_poll_descriptors_revents       = snd_pcm_poll_descriptors_revents;\n    ma_snd_config_update_free_global_proc          _snd_config_update_free_global          = snd_config_update_free_global;\n\n    pContext->alsa.snd_pcm_open                           = (ma_proc)_snd_pcm_open;\n    pContext->alsa.snd_pcm_close                          = (ma_proc)_snd_pcm_close;\n    pContext->alsa.snd_pcm_hw_params_sizeof               = (ma_proc)_snd_pcm_hw_params_sizeof;\n    pContext->alsa.snd_pcm_hw_params_any                  = (ma_proc)_snd_pcm_hw_params_any;\n    pContext->alsa.snd_pcm_hw_params_set_format           = (ma_proc)_snd_pcm_hw_params_set_format;\n    pContext->alsa.snd_pcm_hw_params_set_format_first     = (ma_proc)_snd_pcm_hw_params_set_format_first;\n    pContext->alsa.snd_pcm_hw_params_get_format_mask      = (ma_proc)_snd_pcm_hw_params_get_format_mask;\n    pContext->alsa.snd_pcm_hw_params_set_channels         = (ma_proc)_snd_pcm_hw_params_set_channels;\n    pContext->alsa.snd_pcm_hw_params_set_channels_near    = (ma_proc)_snd_pcm_hw_params_set_channels_near;\n    pContext->alsa.snd_pcm_hw_params_set_channels_minmax  = (ma_proc)_snd_pcm_hw_params_set_channels_minmax;\n    pContext->alsa.snd_pcm_hw_params_set_rate_resample    = (ma_proc)_snd_pcm_hw_params_set_rate_resample;\n    pContext->alsa.snd_pcm_hw_params_set_rate             = (ma_proc)_snd_pcm_hw_params_set_rate;\n    pContext->alsa.snd_pcm_hw_params_set_rate_near        = (ma_proc)_snd_pcm_hw_params_set_rate_near;\n    pContext->alsa.snd_pcm_hw_params_set_buffer_size_near = (ma_proc)_snd_pcm_hw_params_set_buffer_size_near;\n    pContext->alsa.snd_pcm_hw_params_set_periods_near     = (ma_proc)_snd_pcm_hw_params_set_periods_near;\n    pContext->alsa.snd_pcm_hw_params_set_access           = (ma_proc)_snd_pcm_hw_params_set_access;\n    pContext->alsa.snd_pcm_hw_params_get_format           = (ma_proc)_snd_pcm_hw_params_get_format;\n    pContext->alsa.snd_pcm_hw_params_get_channels         = (ma_proc)_snd_pcm_hw_params_get_channels;\n    pContext->alsa.snd_pcm_hw_params_get_channels_min     = (ma_proc)_snd_pcm_hw_params_get_channels_min;\n    pContext->alsa.snd_pcm_hw_params_get_channels_max     = (ma_proc)_snd_pcm_hw_params_get_channels_max;\n    pContext->alsa.snd_pcm_hw_params_get_rate             = (ma_proc)_snd_pcm_hw_params_get_rate;\n    pContext->alsa.snd_pcm_hw_params_get_rate_min         = (ma_proc)_snd_pcm_hw_params_get_rate_min;\n    pContext->alsa.snd_pcm_hw_params_get_rate_max         = (ma_proc)_snd_pcm_hw_params_get_rate_max;\n    pContext->alsa.snd_pcm_hw_params_get_buffer_size      = (ma_proc)_snd_pcm_hw_params_get_buffer_size;\n    pContext->alsa.snd_pcm_hw_params_get_periods          = (ma_proc)_snd_pcm_hw_params_get_periods;\n    pContext->alsa.snd_pcm_hw_params_get_access           = (ma_proc)_snd_pcm_hw_params_get_access;\n    pContext->alsa.snd_pcm_hw_params_test_format          = (ma_proc)_snd_pcm_hw_params_test_format;\n    pContext->alsa.snd_pcm_hw_params_test_channels        = (ma_proc)_snd_pcm_hw_params_test_channels;\n    pContext->alsa.snd_pcm_hw_params_test_rate            = (ma_proc)_snd_pcm_hw_params_test_rate;\n    pContext->alsa.snd_pcm_hw_params                      = (ma_proc)_snd_pcm_hw_params;\n    pContext->alsa.snd_pcm_sw_params_sizeof               = (ma_proc)_snd_pcm_sw_params_sizeof;\n    pContext->alsa.snd_pcm_sw_params_current              = (ma_proc)_snd_pcm_sw_params_current;\n    pContext->alsa.snd_pcm_sw_params_get_boundary         = (ma_proc)_snd_pcm_sw_params_get_boundary;\n    pContext->alsa.snd_pcm_sw_params_set_avail_min        = (ma_proc)_snd_pcm_sw_params_set_avail_min;\n    pContext->alsa.snd_pcm_sw_params_set_start_threshold  = (ma_proc)_snd_pcm_sw_params_set_start_threshold;\n    pContext->alsa.snd_pcm_sw_params_set_stop_threshold   = (ma_proc)_snd_pcm_sw_params_set_stop_threshold;\n    pContext->alsa.snd_pcm_sw_params                      = (ma_proc)_snd_pcm_sw_params;\n    pContext->alsa.snd_pcm_format_mask_sizeof             = (ma_proc)_snd_pcm_format_mask_sizeof;\n    pContext->alsa.snd_pcm_format_mask_test               = (ma_proc)_snd_pcm_format_mask_test;\n    pContext->alsa.snd_pcm_get_chmap                      = (ma_proc)_snd_pcm_get_chmap;\n    pContext->alsa.snd_pcm_state                          = (ma_proc)_snd_pcm_state;\n    pContext->alsa.snd_pcm_prepare                        = (ma_proc)_snd_pcm_prepare;\n    pContext->alsa.snd_pcm_start                          = (ma_proc)_snd_pcm_start;\n    pContext->alsa.snd_pcm_drop                           = (ma_proc)_snd_pcm_drop;\n    pContext->alsa.snd_pcm_drain                          = (ma_proc)_snd_pcm_drain;\n    pContext->alsa.snd_pcm_reset                          = (ma_proc)_snd_pcm_reset;\n    pContext->alsa.snd_device_name_hint                   = (ma_proc)_snd_device_name_hint;\n    pContext->alsa.snd_device_name_get_hint               = (ma_proc)_snd_device_name_get_hint;\n    pContext->alsa.snd_card_get_index                     = (ma_proc)_snd_card_get_index;\n    pContext->alsa.snd_device_name_free_hint              = (ma_proc)_snd_device_name_free_hint;\n    pContext->alsa.snd_pcm_mmap_begin                     = (ma_proc)_snd_pcm_mmap_begin;\n    pContext->alsa.snd_pcm_mmap_commit                    = (ma_proc)_snd_pcm_mmap_commit;\n    pContext->alsa.snd_pcm_recover                        = (ma_proc)_snd_pcm_recover;\n    pContext->alsa.snd_pcm_readi                          = (ma_proc)_snd_pcm_readi;\n    pContext->alsa.snd_pcm_writei                         = (ma_proc)_snd_pcm_writei;\n    pContext->alsa.snd_pcm_avail                          = (ma_proc)_snd_pcm_avail;\n    pContext->alsa.snd_pcm_avail_update                   = (ma_proc)_snd_pcm_avail_update;\n    pContext->alsa.snd_pcm_wait                           = (ma_proc)_snd_pcm_wait;\n    pContext->alsa.snd_pcm_nonblock                       = (ma_proc)_snd_pcm_nonblock;\n    pContext->alsa.snd_pcm_info                           = (ma_proc)_snd_pcm_info;\n    pContext->alsa.snd_pcm_info_sizeof                    = (ma_proc)_snd_pcm_info_sizeof;\n    pContext->alsa.snd_pcm_info_get_name                  = (ma_proc)_snd_pcm_info_get_name;\n    pContext->alsa.snd_pcm_poll_descriptors               = (ma_proc)_snd_pcm_poll_descriptors;\n    pContext->alsa.snd_pcm_poll_descriptors_count         = (ma_proc)_snd_pcm_poll_descriptors_count;\n    pContext->alsa.snd_pcm_poll_descriptors_revents       = (ma_proc)_snd_pcm_poll_descriptors_revents;\n    pContext->alsa.snd_config_update_free_global          = (ma_proc)_snd_config_update_free_global;\n#endif\n\n    pContext->alsa.useVerboseDeviceEnumeration = pConfig->alsa.useVerboseDeviceEnumeration;\n\n    result = ma_mutex_init(&pContext->alsa.internalDeviceEnumLock);\n    if (result != MA_SUCCESS) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[ALSA] WARNING: Failed to initialize mutex for internal device enumeration.\");\n        return result;\n    }\n\n    pCallbacks->onContextInit             = ma_context_init__alsa;\n    pCallbacks->onContextUninit           = ma_context_uninit__alsa;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__alsa;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__alsa;\n    pCallbacks->onDeviceInit              = ma_device_init__alsa;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__alsa;\n    pCallbacks->onDeviceStart             = ma_device_start__alsa;\n    pCallbacks->onDeviceStop              = ma_device_stop__alsa;\n    pCallbacks->onDeviceRead              = ma_device_read__alsa;\n    pCallbacks->onDeviceWrite             = ma_device_write__alsa;\n    pCallbacks->onDeviceDataLoop          = NULL;\n    pCallbacks->onDeviceDataLoopWakeup    = ma_device_data_loop_wakeup__alsa;\n\n    return MA_SUCCESS;\n}\n#endif  /* ALSA */\n\n\n\n/******************************************************************************\n\nPulseAudio Backend\n\n******************************************************************************/\n#ifdef MA_HAS_PULSEAUDIO\n/*\nThe PulseAudio API, along with Apple's Core Audio, is the worst of the maintream audio APIs. This is a brief description of what's going on\nin the PulseAudio backend. I apologize if this gets a bit ranty for your liking - you might want to skip this discussion.\n\nPulseAudio has something they call the \"Simple API\", which unfortunately isn't suitable for miniaudio. I've not seen anywhere where it\nallows you to enumerate over devices, nor does it seem to support the ability to stop and start streams. Looking at the documentation, it\nappears as though the stream is constantly running and you prevent sound from being emitted or captured by simply not calling the read or\nwrite functions. This is not a professional solution as it would be much better to *actually* stop the underlying stream. Perhaps the\nsimple API has some smarts to do this automatically, but I'm not sure. Another limitation with the simple API is that it seems inefficient\nwhen you want to have multiple streams to a single context. For these reasons, miniaudio is not using the simple API.\n\nSince we're not using the simple API, we're left with the asynchronous API as our only other option. And boy, is this where it starts to\nget fun, and I don't mean that in a good way...\n\nThe problems start with the very name of the API - \"asynchronous\". Yes, this is an asynchronous oriented API which means your commands\ndon't immediately take effect. You instead need to issue your commands, and then wait for them to complete. The waiting mechanism is\nenabled through the use of a \"main loop\". In the asychronous API you cannot get away from the main loop, and the main loop is where almost\nall of PulseAudio's problems stem from.\n\nWhen you first initialize PulseAudio you need an object referred to as \"main loop\". You can implement this yourself by defining your own\nvtable, but it's much easier to just use one of the built-in main loop implementations. There's two generic implementations called\npa_mainloop and pa_threaded_mainloop, and another implementation specific to GLib called pa_glib_mainloop. We're using pa_threaded_mainloop\nbecause it simplifies management of the worker thread. The idea of the main loop object is pretty self explanatory - you're supposed to use\nit to implement a worker thread which runs in a loop. The main loop is where operations are actually executed.\n\nTo initialize the main loop, you just use `pa_threaded_mainloop_new()`. This is the first function you'll call. You can then get a pointer\nto the vtable with `pa_threaded_mainloop_get_api()` (the main loop vtable is called `pa_mainloop_api`). Again, you can bypass the threaded\nmain loop object entirely and just implement `pa_mainloop_api` directly, but there's no need for it unless you're doing something extremely\nspecialized such as if you want to integrate it into your application's existing main loop infrastructure.\n\n(EDIT 2021-01-26: miniaudio is no longer using `pa_threaded_mainloop` due to this issue: https://github.com/mackron/miniaudio/issues/262.\nIt is now using `pa_mainloop` which turns out to be a simpler solution anyway. The rest of this rant still applies, however.)\n\nOnce you have your main loop vtable (the `pa_mainloop_api` object) you can create the PulseAudio context. This is very similar to\nminiaudio's context and they map to each other quite well. You have one context to many streams, which is basically the same as miniaudio's\none `ma_context` to many `ma_device`s. Here's where it starts to get annoying, however. When you first create the PulseAudio context, which\nis done with `pa_context_new()`, it's not actually connected to anything. When you connect, you call `pa_context_connect()`. However, if\nyou remember, PulseAudio is an asynchronous API. That means you cannot just assume the context is connected after `pa_context_context()`\nhas returned. You instead need to wait for it to connect. To do this, you need to either wait for a callback to get fired, which you can\nset with `pa_context_set_state_callback()`, or you can continuously poll the context's state. Either way, you need to run this in a loop.\nAll objects from here out are created from the context, and, I believe, you can't be creating these objects until the context is connected.\nThis waiting loop is therefore unavoidable. In order for the waiting to ever complete, however, the main loop needs to be running. Before\nattempting to connect the context, the main loop needs to be started with `pa_threaded_mainloop_start()`.\n\nThe reason for this asynchronous design is to support cases where you're connecting to a remote server, say through a local network or an\ninternet connection. However, the *VAST* majority of cases don't involve this at all - they just connect to a local \"server\" running on the\nhost machine. The fact that this would be the default rather than making `pa_context_connect()` synchronous tends to boggle the mind.\n\nOnce the context has been created and connected you can start creating a stream. A PulseAudio stream is analogous to miniaudio's device.\nThe initialization of a stream is fairly standard - you configure some attributes (analogous to miniaudio's device config) and then call\n`pa_stream_new()` to actually create it. Here is where we start to get into \"operations\". When configuring the stream, you can get\ninformation about the source (such as sample format, sample rate, etc.), however it's not synchronous. Instead, a `pa_operation` object\nis returned from `pa_context_get_source_info_by_name()` (capture) or `pa_context_get_sink_info_by_name()` (playback). Then, you need to\nrun a loop (again!) to wait for the operation to complete which you can determine via a callback or polling, just like we did with the\ncontext. Then, as an added bonus, you need to decrement the reference counter of the `pa_operation` object to ensure memory is cleaned up.\nAll of that just to retrieve basic information about a device!\n\nOnce the basic information about the device has been retrieved, miniaudio can now create the stream with `ma_stream_new()`. Like the\ncontext, this needs to be connected. But we need to be careful here, because we're now about to introduce one of the most horrific design\nchoices in PulseAudio.\n\nPulseAudio allows you to specify a callback that is fired when data can be written to or read from a stream. The language is important here\nbecause PulseAudio takes it literally, specifically the \"can be\". You would think these callbacks would be appropriate as the place for\nwriting and reading data to and from the stream, and that would be right, except when it's not. When you initialize the stream, you can\nset a flag that tells PulseAudio to not start the stream automatically. This is required because miniaudio does not auto-start devices\nstraight after initialization - you need to call `ma_device_start()` manually. The problem is that even when this flag is specified,\nPulseAudio will immediately fire it's write or read callback. This is *technically* correct (based on the wording in the documentation)\nbecause indeed, data *can* be written at this point. The problem is that it's not *practical*. It makes sense that the write/read callback\nwould be where a program will want to write or read data to or from the stream, but when it's called before the application has even\nrequested that the stream be started, it's just not practical because the program probably isn't ready for any kind of data delivery at\nthat point (it may still need to load files or whatnot). Instead, this callback should only be fired when the application requests the\nstream be started which is how it works with literally *every* other callback-based audio API. Since miniaudio forbids firing of the data\ncallback until the device has been started (as it should be with *all* callback based APIs), logic needs to be added to ensure miniaudio\ndoesn't just blindly fire the application-defined data callback from within the PulseAudio callback before the stream has actually been\nstarted. The device state is used for this - if the state is anything other than `ma_device_state_starting` or `ma_device_state_started`, the main data\ncallback is not fired.\n\nThis, unfortunately, is not the end of the problems with the PulseAudio write callback. Any normal callback based audio API will\ncontinuously fire the callback at regular intervals based on the size of the internal buffer. This will only ever be fired when the device\nis running, and will be fired regardless of whether or not the user actually wrote anything to the device/stream. This not the case in\nPulseAudio. In PulseAudio, the data callback will *only* be called if you wrote something to it previously. That means, if you don't call\n`pa_stream_write()`, the callback will not get fired. On the surface you wouldn't think this would matter because you should be always\nwriting data, and if you don't have anything to write, just write silence. That's fine until you want to drain the stream. You see, if\nyou're continuously writing data to the stream, the stream will never get drained! That means in order to drain the stream, you need to\n*not* write data to it! But remember, when you don't write data to the stream, the callback won't get fired again! Why is draining\nimportant? Because that's how we've defined stopping to work in miniaudio. In miniaudio, stopping the device requires it to be drained\nbefore returning from ma_device_stop(). So we've stopped the device, which requires us to drain, but draining requires us to *not* write\ndata to the stream (or else it won't ever complete draining), but not writing to the stream means the callback won't get fired again!\n\nThis becomes a problem when stopping and then restarting the device. When the device is stopped, it's drained, which requires us to *not*\nwrite anything to the stream. But then, since we didn't write anything to it, the write callback will *never* get called again if we just\nresume the stream naively. This means that starting the stream requires us to write data to the stream from outside the callback. This\ndisconnect is something PulseAudio has got seriously wrong - there should only ever be a single source of data delivery, that being the\ncallback. (I have tried using `pa_stream_flush()` to trigger the write callback to fire, but this just doesn't work for some reason.)\n\nOnce you've created the stream, you need to connect it which involves the whole waiting procedure. This is the same process as the context,\nonly this time you'll poll for the state with `pa_stream_get_status()`. The starting and stopping of a streaming is referred to as\n\"corking\" in PulseAudio. The analogy is corking a barrel. To start the stream, you uncork it, to stop it you cork it. Personally I think\nit's silly - why would you not just call it \"starting\" and \"stopping\" like any other normal audio API? Anyway, the act of corking is, you\nguessed it, asynchronous. This means you'll need our waiting loop as usual. Again, why this asynchronous design is the default is\nabsolutely beyond me. Would it really be that hard to just make it run synchronously?\n\nTeardown is pretty simple (what?!). It's just a matter of calling the relevant `_unref()` function on each object in reverse order that\nthey were initialized in.\n\nThat's about it from the PulseAudio side. A bit ranty, I know, but they really need to fix that main loop and callback system. They're\nembarrassingly unpractical. The main loop thing is an easy fix - have synchronous versions of all APIs. If an application wants these to\nrun asynchronously, they can execute them in a separate thread themselves. The desire to run these asynchronously is such a niche\nrequirement - it makes no sense to make it the default. The stream write callback needs to be change, or an alternative provided, that is\nconstantly fired, regardless of whether or not `pa_stream_write()` has been called, and it needs to take a pointer to a buffer as a\nparameter which the program just writes to directly rather than having to call `pa_stream_writable_size()` and `pa_stream_write()`. These\nchanges alone will change PulseAudio from one of the worst audio APIs to one of the best.\n*/\n\n\n/*\nIt is assumed pulseaudio.h is available when linking at compile time. When linking at compile time, we use the declarations in the header\nto check for type safety. We cannot do this when linking at run time because the header might not be available.\n*/\n#ifdef MA_NO_RUNTIME_LINKING\n\n/* pulseaudio.h marks some functions with \"inline\" which isn't always supported. Need to emulate it. */\n#if !defined(__cplusplus)\n    #if defined(__STRICT_ANSI__)\n        #if !defined(inline)\n            #define inline __inline__ __attribute__((always_inline))\n            #define MA_INLINE_DEFINED\n        #endif\n    #endif\n#endif\n#include <pulse/pulseaudio.h>\n#if defined(MA_INLINE_DEFINED)\n    #undef inline\n    #undef MA_INLINE_DEFINED\n#endif\n\n#define MA_PA_OK                                       PA_OK\n#define MA_PA_ERR_ACCESS                               PA_ERR_ACCESS\n#define MA_PA_ERR_INVALID                              PA_ERR_INVALID\n#define MA_PA_ERR_NOENTITY                             PA_ERR_NOENTITY\n#define MA_PA_ERR_NOTSUPPORTED                         PA_ERR_NOTSUPPORTED\n\n#define MA_PA_CHANNELS_MAX                             PA_CHANNELS_MAX\n#define MA_PA_RATE_MAX                                 PA_RATE_MAX\n\ntypedef pa_context_flags_t ma_pa_context_flags_t;\n#define MA_PA_CONTEXT_NOFLAGS                          PA_CONTEXT_NOFLAGS\n#define MA_PA_CONTEXT_NOAUTOSPAWN                      PA_CONTEXT_NOAUTOSPAWN\n#define MA_PA_CONTEXT_NOFAIL                           PA_CONTEXT_NOFAIL\n\ntypedef pa_stream_flags_t ma_pa_stream_flags_t;\n#define MA_PA_STREAM_NOFLAGS                           PA_STREAM_NOFLAGS\n#define MA_PA_STREAM_START_CORKED                      PA_STREAM_START_CORKED\n#define MA_PA_STREAM_INTERPOLATE_TIMING                PA_STREAM_INTERPOLATE_TIMING\n#define MA_PA_STREAM_NOT_MONOTONIC                     PA_STREAM_NOT_MONOTONIC\n#define MA_PA_STREAM_AUTO_TIMING_UPDATE                PA_STREAM_AUTO_TIMING_UPDATE\n#define MA_PA_STREAM_NO_REMAP_CHANNELS                 PA_STREAM_NO_REMAP_CHANNELS\n#define MA_PA_STREAM_NO_REMIX_CHANNELS                 PA_STREAM_NO_REMIX_CHANNELS\n#define MA_PA_STREAM_FIX_FORMAT                        PA_STREAM_FIX_FORMAT\n#define MA_PA_STREAM_FIX_RATE                          PA_STREAM_FIX_RATE\n#define MA_PA_STREAM_FIX_CHANNELS                      PA_STREAM_FIX_CHANNELS\n#define MA_PA_STREAM_DONT_MOVE                         PA_STREAM_DONT_MOVE\n#define MA_PA_STREAM_VARIABLE_RATE                     PA_STREAM_VARIABLE_RATE\n#define MA_PA_STREAM_PEAK_DETECT                       PA_STREAM_PEAK_DETECT\n#define MA_PA_STREAM_START_MUTED                       PA_STREAM_START_MUTED\n#define MA_PA_STREAM_ADJUST_LATENCY                    PA_STREAM_ADJUST_LATENCY\n#define MA_PA_STREAM_EARLY_REQUESTS                    PA_STREAM_EARLY_REQUESTS\n#define MA_PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND         PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND\n#define MA_PA_STREAM_START_UNMUTED                     PA_STREAM_START_UNMUTED\n#define MA_PA_STREAM_FAIL_ON_SUSPEND                   PA_STREAM_FAIL_ON_SUSPEND\n#define MA_PA_STREAM_RELATIVE_VOLUME                   PA_STREAM_RELATIVE_VOLUME\n#define MA_PA_STREAM_PASSTHROUGH                       PA_STREAM_PASSTHROUGH\n\ntypedef pa_sink_flags_t ma_pa_sink_flags_t;\n#define MA_PA_SINK_NOFLAGS                             PA_SINK_NOFLAGS\n#define MA_PA_SINK_HW_VOLUME_CTRL                      PA_SINK_HW_VOLUME_CTRL\n#define MA_PA_SINK_LATENCY                             PA_SINK_LATENCY\n#define MA_PA_SINK_HARDWARE                            PA_SINK_HARDWARE\n#define MA_PA_SINK_NETWORK                             PA_SINK_NETWORK\n#define MA_PA_SINK_HW_MUTE_CTRL                        PA_SINK_HW_MUTE_CTRL\n#define MA_PA_SINK_DECIBEL_VOLUME                      PA_SINK_DECIBEL_VOLUME\n#define MA_PA_SINK_FLAT_VOLUME                         PA_SINK_FLAT_VOLUME\n#define MA_PA_SINK_DYNAMIC_LATENCY                     PA_SINK_DYNAMIC_LATENCY\n#define MA_PA_SINK_SET_FORMATS                         PA_SINK_SET_FORMATS\n\ntypedef pa_source_flags_t ma_pa_source_flags_t;\n#define MA_PA_SOURCE_NOFLAGS                           PA_SOURCE_NOFLAGS\n#define MA_PA_SOURCE_HW_VOLUME_CTRL                    PA_SOURCE_HW_VOLUME_CTRL\n#define MA_PA_SOURCE_LATENCY                           PA_SOURCE_LATENCY\n#define MA_PA_SOURCE_HARDWARE                          PA_SOURCE_HARDWARE\n#define MA_PA_SOURCE_NETWORK                           PA_SOURCE_NETWORK\n#define MA_PA_SOURCE_HW_MUTE_CTRL                      PA_SOURCE_HW_MUTE_CTRL\n#define MA_PA_SOURCE_DECIBEL_VOLUME                    PA_SOURCE_DECIBEL_VOLUME\n#define MA_PA_SOURCE_DYNAMIC_LATENCY                   PA_SOURCE_DYNAMIC_LATENCY\n#define MA_PA_SOURCE_FLAT_VOLUME                       PA_SOURCE_FLAT_VOLUME\n\ntypedef pa_context_state_t ma_pa_context_state_t;\n#define MA_PA_CONTEXT_UNCONNECTED                      PA_CONTEXT_UNCONNECTED\n#define MA_PA_CONTEXT_CONNECTING                       PA_CONTEXT_CONNECTING\n#define MA_PA_CONTEXT_AUTHORIZING                      PA_CONTEXT_AUTHORIZING\n#define MA_PA_CONTEXT_SETTING_NAME                     PA_CONTEXT_SETTING_NAME\n#define MA_PA_CONTEXT_READY                            PA_CONTEXT_READY\n#define MA_PA_CONTEXT_FAILED                           PA_CONTEXT_FAILED\n#define MA_PA_CONTEXT_TERMINATED                       PA_CONTEXT_TERMINATED\n\ntypedef pa_stream_state_t ma_pa_stream_state_t;\n#define MA_PA_STREAM_UNCONNECTED                       PA_STREAM_UNCONNECTED\n#define MA_PA_STREAM_CREATING                          PA_STREAM_CREATING\n#define MA_PA_STREAM_READY                             PA_STREAM_READY\n#define MA_PA_STREAM_FAILED                            PA_STREAM_FAILED\n#define MA_PA_STREAM_TERMINATED                        PA_STREAM_TERMINATED\n\ntypedef pa_operation_state_t ma_pa_operation_state_t;\n#define MA_PA_OPERATION_RUNNING                        PA_OPERATION_RUNNING\n#define MA_PA_OPERATION_DONE                           PA_OPERATION_DONE\n#define MA_PA_OPERATION_CANCELLED                      PA_OPERATION_CANCELLED\n\ntypedef pa_sink_state_t ma_pa_sink_state_t;\n#define MA_PA_SINK_INVALID_STATE                       PA_SINK_INVALID_STATE\n#define MA_PA_SINK_RUNNING                             PA_SINK_RUNNING\n#define MA_PA_SINK_IDLE                                PA_SINK_IDLE\n#define MA_PA_SINK_SUSPENDED                           PA_SINK_SUSPENDED\n\ntypedef pa_source_state_t ma_pa_source_state_t;\n#define MA_PA_SOURCE_INVALID_STATE                     PA_SOURCE_INVALID_STATE\n#define MA_PA_SOURCE_RUNNING                           PA_SOURCE_RUNNING\n#define MA_PA_SOURCE_IDLE                              PA_SOURCE_IDLE\n#define MA_PA_SOURCE_SUSPENDED                         PA_SOURCE_SUSPENDED\n\ntypedef pa_seek_mode_t ma_pa_seek_mode_t;\n#define MA_PA_SEEK_RELATIVE                            PA_SEEK_RELATIVE\n#define MA_PA_SEEK_ABSOLUTE                            PA_SEEK_ABSOLUTE\n#define MA_PA_SEEK_RELATIVE_ON_READ                    PA_SEEK_RELATIVE_ON_READ\n#define MA_PA_SEEK_RELATIVE_END                        PA_SEEK_RELATIVE_END\n\ntypedef pa_channel_position_t ma_pa_channel_position_t;\n#define MA_PA_CHANNEL_POSITION_INVALID                 PA_CHANNEL_POSITION_INVALID\n#define MA_PA_CHANNEL_POSITION_MONO                    PA_CHANNEL_POSITION_MONO\n#define MA_PA_CHANNEL_POSITION_FRONT_LEFT              PA_CHANNEL_POSITION_FRONT_LEFT\n#define MA_PA_CHANNEL_POSITION_FRONT_RIGHT             PA_CHANNEL_POSITION_FRONT_RIGHT\n#define MA_PA_CHANNEL_POSITION_FRONT_CENTER            PA_CHANNEL_POSITION_FRONT_CENTER\n#define MA_PA_CHANNEL_POSITION_REAR_CENTER             PA_CHANNEL_POSITION_REAR_CENTER\n#define MA_PA_CHANNEL_POSITION_REAR_LEFT               PA_CHANNEL_POSITION_REAR_LEFT\n#define MA_PA_CHANNEL_POSITION_REAR_RIGHT              PA_CHANNEL_POSITION_REAR_RIGHT\n#define MA_PA_CHANNEL_POSITION_LFE                     PA_CHANNEL_POSITION_LFE\n#define MA_PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER    PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER\n#define MA_PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER   PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER\n#define MA_PA_CHANNEL_POSITION_SIDE_LEFT               PA_CHANNEL_POSITION_SIDE_LEFT\n#define MA_PA_CHANNEL_POSITION_SIDE_RIGHT              PA_CHANNEL_POSITION_SIDE_RIGHT\n#define MA_PA_CHANNEL_POSITION_AUX0                    PA_CHANNEL_POSITION_AUX0\n#define MA_PA_CHANNEL_POSITION_AUX1                    PA_CHANNEL_POSITION_AUX1\n#define MA_PA_CHANNEL_POSITION_AUX2                    PA_CHANNEL_POSITION_AUX2\n#define MA_PA_CHANNEL_POSITION_AUX3                    PA_CHANNEL_POSITION_AUX3\n#define MA_PA_CHANNEL_POSITION_AUX4                    PA_CHANNEL_POSITION_AUX4\n#define MA_PA_CHANNEL_POSITION_AUX5                    PA_CHANNEL_POSITION_AUX5\n#define MA_PA_CHANNEL_POSITION_AUX6                    PA_CHANNEL_POSITION_AUX6\n#define MA_PA_CHANNEL_POSITION_AUX7                    PA_CHANNEL_POSITION_AUX7\n#define MA_PA_CHANNEL_POSITION_AUX8                    PA_CHANNEL_POSITION_AUX8\n#define MA_PA_CHANNEL_POSITION_AUX9                    PA_CHANNEL_POSITION_AUX9\n#define MA_PA_CHANNEL_POSITION_AUX10                   PA_CHANNEL_POSITION_AUX10\n#define MA_PA_CHANNEL_POSITION_AUX11                   PA_CHANNEL_POSITION_AUX11\n#define MA_PA_CHANNEL_POSITION_AUX12                   PA_CHANNEL_POSITION_AUX12\n#define MA_PA_CHANNEL_POSITION_AUX13                   PA_CHANNEL_POSITION_AUX13\n#define MA_PA_CHANNEL_POSITION_AUX14                   PA_CHANNEL_POSITION_AUX14\n#define MA_PA_CHANNEL_POSITION_AUX15                   PA_CHANNEL_POSITION_AUX15\n#define MA_PA_CHANNEL_POSITION_AUX16                   PA_CHANNEL_POSITION_AUX16\n#define MA_PA_CHANNEL_POSITION_AUX17                   PA_CHANNEL_POSITION_AUX17\n#define MA_PA_CHANNEL_POSITION_AUX18                   PA_CHANNEL_POSITION_AUX18\n#define MA_PA_CHANNEL_POSITION_AUX19                   PA_CHANNEL_POSITION_AUX19\n#define MA_PA_CHANNEL_POSITION_AUX20                   PA_CHANNEL_POSITION_AUX20\n#define MA_PA_CHANNEL_POSITION_AUX21                   PA_CHANNEL_POSITION_AUX21\n#define MA_PA_CHANNEL_POSITION_AUX22                   PA_CHANNEL_POSITION_AUX22\n#define MA_PA_CHANNEL_POSITION_AUX23                   PA_CHANNEL_POSITION_AUX23\n#define MA_PA_CHANNEL_POSITION_AUX24                   PA_CHANNEL_POSITION_AUX24\n#define MA_PA_CHANNEL_POSITION_AUX25                   PA_CHANNEL_POSITION_AUX25\n#define MA_PA_CHANNEL_POSITION_AUX26                   PA_CHANNEL_POSITION_AUX26\n#define MA_PA_CHANNEL_POSITION_AUX27                   PA_CHANNEL_POSITION_AUX27\n#define MA_PA_CHANNEL_POSITION_AUX28                   PA_CHANNEL_POSITION_AUX28\n#define MA_PA_CHANNEL_POSITION_AUX29                   PA_CHANNEL_POSITION_AUX29\n#define MA_PA_CHANNEL_POSITION_AUX30                   PA_CHANNEL_POSITION_AUX30\n#define MA_PA_CHANNEL_POSITION_AUX31                   PA_CHANNEL_POSITION_AUX31\n#define MA_PA_CHANNEL_POSITION_TOP_CENTER              PA_CHANNEL_POSITION_TOP_CENTER\n#define MA_PA_CHANNEL_POSITION_TOP_FRONT_LEFT          PA_CHANNEL_POSITION_TOP_FRONT_LEFT\n#define MA_PA_CHANNEL_POSITION_TOP_FRONT_RIGHT         PA_CHANNEL_POSITION_TOP_FRONT_RIGHT\n#define MA_PA_CHANNEL_POSITION_TOP_FRONT_CENTER        PA_CHANNEL_POSITION_TOP_FRONT_CENTER\n#define MA_PA_CHANNEL_POSITION_TOP_REAR_LEFT           PA_CHANNEL_POSITION_TOP_REAR_LEFT\n#define MA_PA_CHANNEL_POSITION_TOP_REAR_RIGHT          PA_CHANNEL_POSITION_TOP_REAR_RIGHT\n#define MA_PA_CHANNEL_POSITION_TOP_REAR_CENTER         PA_CHANNEL_POSITION_TOP_REAR_CENTER\n#define MA_PA_CHANNEL_POSITION_LEFT                    PA_CHANNEL_POSITION_LEFT\n#define MA_PA_CHANNEL_POSITION_RIGHT                   PA_CHANNEL_POSITION_RIGHT\n#define MA_PA_CHANNEL_POSITION_CENTER                  PA_CHANNEL_POSITION_CENTER\n#define MA_PA_CHANNEL_POSITION_SUBWOOFER               PA_CHANNEL_POSITION_SUBWOOFER\n\ntypedef pa_channel_map_def_t ma_pa_channel_map_def_t;\n#define MA_PA_CHANNEL_MAP_AIFF                         PA_CHANNEL_MAP_AIFF\n#define MA_PA_CHANNEL_MAP_ALSA                         PA_CHANNEL_MAP_ALSA\n#define MA_PA_CHANNEL_MAP_AUX                          PA_CHANNEL_MAP_AUX\n#define MA_PA_CHANNEL_MAP_WAVEEX                       PA_CHANNEL_MAP_WAVEEX\n#define MA_PA_CHANNEL_MAP_OSS                          PA_CHANNEL_MAP_OSS\n#define MA_PA_CHANNEL_MAP_DEFAULT                      PA_CHANNEL_MAP_DEFAULT\n\ntypedef pa_sample_format_t ma_pa_sample_format_t;\n#define MA_PA_SAMPLE_INVALID                           PA_SAMPLE_INVALID\n#define MA_PA_SAMPLE_U8                                PA_SAMPLE_U8\n#define MA_PA_SAMPLE_ALAW                              PA_SAMPLE_ALAW\n#define MA_PA_SAMPLE_ULAW                              PA_SAMPLE_ULAW\n#define MA_PA_SAMPLE_S16LE                             PA_SAMPLE_S16LE\n#define MA_PA_SAMPLE_S16BE                             PA_SAMPLE_S16BE\n#define MA_PA_SAMPLE_FLOAT32LE                         PA_SAMPLE_FLOAT32LE\n#define MA_PA_SAMPLE_FLOAT32BE                         PA_SAMPLE_FLOAT32BE\n#define MA_PA_SAMPLE_S32LE                             PA_SAMPLE_S32LE\n#define MA_PA_SAMPLE_S32BE                             PA_SAMPLE_S32BE\n#define MA_PA_SAMPLE_S24LE                             PA_SAMPLE_S24LE\n#define MA_PA_SAMPLE_S24BE                             PA_SAMPLE_S24BE\n#define MA_PA_SAMPLE_S24_32LE                          PA_SAMPLE_S24_32LE\n#define MA_PA_SAMPLE_S24_32BE                          PA_SAMPLE_S24_32BE\n\ntypedef pa_mainloop             ma_pa_mainloop;\ntypedef pa_threaded_mainloop    ma_pa_threaded_mainloop;\ntypedef pa_mainloop_api         ma_pa_mainloop_api;\ntypedef pa_context              ma_pa_context;\ntypedef pa_operation            ma_pa_operation;\ntypedef pa_stream               ma_pa_stream;\ntypedef pa_spawn_api            ma_pa_spawn_api;\ntypedef pa_buffer_attr          ma_pa_buffer_attr;\ntypedef pa_channel_map          ma_pa_channel_map;\ntypedef pa_cvolume              ma_pa_cvolume;\ntypedef pa_sample_spec          ma_pa_sample_spec;\ntypedef pa_sink_info            ma_pa_sink_info;\ntypedef pa_source_info          ma_pa_source_info;\n\ntypedef pa_context_notify_cb_t  ma_pa_context_notify_cb_t;\ntypedef pa_sink_info_cb_t       ma_pa_sink_info_cb_t;\ntypedef pa_source_info_cb_t     ma_pa_source_info_cb_t;\ntypedef pa_stream_success_cb_t  ma_pa_stream_success_cb_t;\ntypedef pa_stream_request_cb_t  ma_pa_stream_request_cb_t;\ntypedef pa_stream_notify_cb_t   ma_pa_stream_notify_cb_t;\ntypedef pa_free_cb_t            ma_pa_free_cb_t;\n#else\n#define MA_PA_OK                                       0\n#define MA_PA_ERR_ACCESS                               1\n#define MA_PA_ERR_INVALID                              2\n#define MA_PA_ERR_NOENTITY                             5\n#define MA_PA_ERR_NOTSUPPORTED                         19\n\n#define MA_PA_CHANNELS_MAX                             32\n#define MA_PA_RATE_MAX                                 384000\n\ntypedef int ma_pa_context_flags_t;\n#define MA_PA_CONTEXT_NOFLAGS                          0x00000000\n#define MA_PA_CONTEXT_NOAUTOSPAWN                      0x00000001\n#define MA_PA_CONTEXT_NOFAIL                           0x00000002\n\ntypedef int ma_pa_stream_flags_t;\n#define MA_PA_STREAM_NOFLAGS                           0x00000000\n#define MA_PA_STREAM_START_CORKED                      0x00000001\n#define MA_PA_STREAM_INTERPOLATE_TIMING                0x00000002\n#define MA_PA_STREAM_NOT_MONOTONIC                     0x00000004\n#define MA_PA_STREAM_AUTO_TIMING_UPDATE                0x00000008\n#define MA_PA_STREAM_NO_REMAP_CHANNELS                 0x00000010\n#define MA_PA_STREAM_NO_REMIX_CHANNELS                 0x00000020\n#define MA_PA_STREAM_FIX_FORMAT                        0x00000040\n#define MA_PA_STREAM_FIX_RATE                          0x00000080\n#define MA_PA_STREAM_FIX_CHANNELS                      0x00000100\n#define MA_PA_STREAM_DONT_MOVE                         0x00000200\n#define MA_PA_STREAM_VARIABLE_RATE                     0x00000400\n#define MA_PA_STREAM_PEAK_DETECT                       0x00000800\n#define MA_PA_STREAM_START_MUTED                       0x00001000\n#define MA_PA_STREAM_ADJUST_LATENCY                    0x00002000\n#define MA_PA_STREAM_EARLY_REQUESTS                    0x00004000\n#define MA_PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND         0x00008000\n#define MA_PA_STREAM_START_UNMUTED                     0x00010000\n#define MA_PA_STREAM_FAIL_ON_SUSPEND                   0x00020000\n#define MA_PA_STREAM_RELATIVE_VOLUME                   0x00040000\n#define MA_PA_STREAM_PASSTHROUGH                       0x00080000\n\ntypedef int ma_pa_sink_flags_t;\n#define MA_PA_SINK_NOFLAGS                             0x00000000\n#define MA_PA_SINK_HW_VOLUME_CTRL                      0x00000001\n#define MA_PA_SINK_LATENCY                             0x00000002\n#define MA_PA_SINK_HARDWARE                            0x00000004\n#define MA_PA_SINK_NETWORK                             0x00000008\n#define MA_PA_SINK_HW_MUTE_CTRL                        0x00000010\n#define MA_PA_SINK_DECIBEL_VOLUME                      0x00000020\n#define MA_PA_SINK_FLAT_VOLUME                         0x00000040\n#define MA_PA_SINK_DYNAMIC_LATENCY                     0x00000080\n#define MA_PA_SINK_SET_FORMATS                         0x00000100\n\ntypedef int ma_pa_source_flags_t;\n#define MA_PA_SOURCE_NOFLAGS                           0x00000000\n#define MA_PA_SOURCE_HW_VOLUME_CTRL                    0x00000001\n#define MA_PA_SOURCE_LATENCY                           0x00000002\n#define MA_PA_SOURCE_HARDWARE                          0x00000004\n#define MA_PA_SOURCE_NETWORK                           0x00000008\n#define MA_PA_SOURCE_HW_MUTE_CTRL                      0x00000010\n#define MA_PA_SOURCE_DECIBEL_VOLUME                    0x00000020\n#define MA_PA_SOURCE_DYNAMIC_LATENCY                   0x00000040\n#define MA_PA_SOURCE_FLAT_VOLUME                       0x00000080\n\ntypedef int ma_pa_context_state_t;\n#define MA_PA_CONTEXT_UNCONNECTED                      0\n#define MA_PA_CONTEXT_CONNECTING                       1\n#define MA_PA_CONTEXT_AUTHORIZING                      2\n#define MA_PA_CONTEXT_SETTING_NAME                     3\n#define MA_PA_CONTEXT_READY                            4\n#define MA_PA_CONTEXT_FAILED                           5\n#define MA_PA_CONTEXT_TERMINATED                       6\n\ntypedef int ma_pa_stream_state_t;\n#define MA_PA_STREAM_UNCONNECTED                       0\n#define MA_PA_STREAM_CREATING                          1\n#define MA_PA_STREAM_READY                             2\n#define MA_PA_STREAM_FAILED                            3\n#define MA_PA_STREAM_TERMINATED                        4\n\ntypedef int ma_pa_operation_state_t;\n#define MA_PA_OPERATION_RUNNING                        0\n#define MA_PA_OPERATION_DONE                           1\n#define MA_PA_OPERATION_CANCELLED                      2\n\ntypedef int ma_pa_sink_state_t;\n#define MA_PA_SINK_INVALID_STATE                       -1\n#define MA_PA_SINK_RUNNING                             0\n#define MA_PA_SINK_IDLE                                1\n#define MA_PA_SINK_SUSPENDED                           2\n\ntypedef int ma_pa_source_state_t;\n#define MA_PA_SOURCE_INVALID_STATE                     -1\n#define MA_PA_SOURCE_RUNNING                           0\n#define MA_PA_SOURCE_IDLE                              1\n#define MA_PA_SOURCE_SUSPENDED                         2\n\ntypedef int ma_pa_seek_mode_t;\n#define MA_PA_SEEK_RELATIVE                            0\n#define MA_PA_SEEK_ABSOLUTE                            1\n#define MA_PA_SEEK_RELATIVE_ON_READ                    2\n#define MA_PA_SEEK_RELATIVE_END                        3\n\ntypedef int ma_pa_channel_position_t;\n#define MA_PA_CHANNEL_POSITION_INVALID                 -1\n#define MA_PA_CHANNEL_POSITION_MONO                    0\n#define MA_PA_CHANNEL_POSITION_FRONT_LEFT              1\n#define MA_PA_CHANNEL_POSITION_FRONT_RIGHT             2\n#define MA_PA_CHANNEL_POSITION_FRONT_CENTER            3\n#define MA_PA_CHANNEL_POSITION_REAR_CENTER             4\n#define MA_PA_CHANNEL_POSITION_REAR_LEFT               5\n#define MA_PA_CHANNEL_POSITION_REAR_RIGHT              6\n#define MA_PA_CHANNEL_POSITION_LFE                     7\n#define MA_PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER    8\n#define MA_PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER   9\n#define MA_PA_CHANNEL_POSITION_SIDE_LEFT               10\n#define MA_PA_CHANNEL_POSITION_SIDE_RIGHT              11\n#define MA_PA_CHANNEL_POSITION_AUX0                    12\n#define MA_PA_CHANNEL_POSITION_AUX1                    13\n#define MA_PA_CHANNEL_POSITION_AUX2                    14\n#define MA_PA_CHANNEL_POSITION_AUX3                    15\n#define MA_PA_CHANNEL_POSITION_AUX4                    16\n#define MA_PA_CHANNEL_POSITION_AUX5                    17\n#define MA_PA_CHANNEL_POSITION_AUX6                    18\n#define MA_PA_CHANNEL_POSITION_AUX7                    19\n#define MA_PA_CHANNEL_POSITION_AUX8                    20\n#define MA_PA_CHANNEL_POSITION_AUX9                    21\n#define MA_PA_CHANNEL_POSITION_AUX10                   22\n#define MA_PA_CHANNEL_POSITION_AUX11                   23\n#define MA_PA_CHANNEL_POSITION_AUX12                   24\n#define MA_PA_CHANNEL_POSITION_AUX13                   25\n#define MA_PA_CHANNEL_POSITION_AUX14                   26\n#define MA_PA_CHANNEL_POSITION_AUX15                   27\n#define MA_PA_CHANNEL_POSITION_AUX16                   28\n#define MA_PA_CHANNEL_POSITION_AUX17                   29\n#define MA_PA_CHANNEL_POSITION_AUX18                   30\n#define MA_PA_CHANNEL_POSITION_AUX19                   31\n#define MA_PA_CHANNEL_POSITION_AUX20                   32\n#define MA_PA_CHANNEL_POSITION_AUX21                   33\n#define MA_PA_CHANNEL_POSITION_AUX22                   34\n#define MA_PA_CHANNEL_POSITION_AUX23                   35\n#define MA_PA_CHANNEL_POSITION_AUX24                   36\n#define MA_PA_CHANNEL_POSITION_AUX25                   37\n#define MA_PA_CHANNEL_POSITION_AUX26                   38\n#define MA_PA_CHANNEL_POSITION_AUX27                   39\n#define MA_PA_CHANNEL_POSITION_AUX28                   40\n#define MA_PA_CHANNEL_POSITION_AUX29                   41\n#define MA_PA_CHANNEL_POSITION_AUX30                   42\n#define MA_PA_CHANNEL_POSITION_AUX31                   43\n#define MA_PA_CHANNEL_POSITION_TOP_CENTER              44\n#define MA_PA_CHANNEL_POSITION_TOP_FRONT_LEFT          45\n#define MA_PA_CHANNEL_POSITION_TOP_FRONT_RIGHT         46\n#define MA_PA_CHANNEL_POSITION_TOP_FRONT_CENTER        47\n#define MA_PA_CHANNEL_POSITION_TOP_REAR_LEFT           48\n#define MA_PA_CHANNEL_POSITION_TOP_REAR_RIGHT          49\n#define MA_PA_CHANNEL_POSITION_TOP_REAR_CENTER         50\n#define MA_PA_CHANNEL_POSITION_LEFT                    MA_PA_CHANNEL_POSITION_FRONT_LEFT\n#define MA_PA_CHANNEL_POSITION_RIGHT                   MA_PA_CHANNEL_POSITION_FRONT_RIGHT\n#define MA_PA_CHANNEL_POSITION_CENTER                  MA_PA_CHANNEL_POSITION_FRONT_CENTER\n#define MA_PA_CHANNEL_POSITION_SUBWOOFER               MA_PA_CHANNEL_POSITION_LFE\n\ntypedef int ma_pa_channel_map_def_t;\n#define MA_PA_CHANNEL_MAP_AIFF                         0\n#define MA_PA_CHANNEL_MAP_ALSA                         1\n#define MA_PA_CHANNEL_MAP_AUX                          2\n#define MA_PA_CHANNEL_MAP_WAVEEX                       3\n#define MA_PA_CHANNEL_MAP_OSS                          4\n#define MA_PA_CHANNEL_MAP_DEFAULT                      MA_PA_CHANNEL_MAP_AIFF\n\ntypedef int ma_pa_sample_format_t;\n#define MA_PA_SAMPLE_INVALID                           -1\n#define MA_PA_SAMPLE_U8                                0\n#define MA_PA_SAMPLE_ALAW                              1\n#define MA_PA_SAMPLE_ULAW                              2\n#define MA_PA_SAMPLE_S16LE                             3\n#define MA_PA_SAMPLE_S16BE                             4\n#define MA_PA_SAMPLE_FLOAT32LE                         5\n#define MA_PA_SAMPLE_FLOAT32BE                         6\n#define MA_PA_SAMPLE_S32LE                             7\n#define MA_PA_SAMPLE_S32BE                             8\n#define MA_PA_SAMPLE_S24LE                             9\n#define MA_PA_SAMPLE_S24BE                             10\n#define MA_PA_SAMPLE_S24_32LE                          11\n#define MA_PA_SAMPLE_S24_32BE                          12\n\ntypedef struct ma_pa_mainloop           ma_pa_mainloop;\ntypedef struct ma_pa_threaded_mainloop  ma_pa_threaded_mainloop;\ntypedef struct ma_pa_mainloop_api       ma_pa_mainloop_api;\ntypedef struct ma_pa_context            ma_pa_context;\ntypedef struct ma_pa_operation          ma_pa_operation;\ntypedef struct ma_pa_stream             ma_pa_stream;\ntypedef struct ma_pa_spawn_api          ma_pa_spawn_api;\n\ntypedef struct\n{\n    ma_uint32 maxlength;\n    ma_uint32 tlength;\n    ma_uint32 prebuf;\n    ma_uint32 minreq;\n    ma_uint32 fragsize;\n} ma_pa_buffer_attr;\n\ntypedef struct\n{\n    ma_uint8 channels;\n    ma_pa_channel_position_t map[MA_PA_CHANNELS_MAX];\n} ma_pa_channel_map;\n\ntypedef struct\n{\n    ma_uint8 channels;\n    ma_uint32 values[MA_PA_CHANNELS_MAX];\n} ma_pa_cvolume;\n\ntypedef struct\n{\n    ma_pa_sample_format_t format;\n    ma_uint32 rate;\n    ma_uint8 channels;\n} ma_pa_sample_spec;\n\ntypedef struct\n{\n    const char* name;\n    ma_uint32 index;\n    const char* description;\n    ma_pa_sample_spec sample_spec;\n    ma_pa_channel_map channel_map;\n    ma_uint32 owner_module;\n    ma_pa_cvolume volume;\n    int mute;\n    ma_uint32 monitor_source;\n    const char* monitor_source_name;\n    ma_uint64 latency;\n    const char* driver;\n    ma_pa_sink_flags_t flags;\n    void* proplist;\n    ma_uint64 configured_latency;\n    ma_uint32 base_volume;\n    ma_pa_sink_state_t state;\n    ma_uint32 n_volume_steps;\n    ma_uint32 card;\n    ma_uint32 n_ports;\n    void** ports;\n    void* active_port;\n    ma_uint8 n_formats;\n    void** formats;\n} ma_pa_sink_info;\n\ntypedef struct\n{\n    const char *name;\n    ma_uint32 index;\n    const char *description;\n    ma_pa_sample_spec sample_spec;\n    ma_pa_channel_map channel_map;\n    ma_uint32 owner_module;\n    ma_pa_cvolume volume;\n    int mute;\n    ma_uint32 monitor_of_sink;\n    const char *monitor_of_sink_name;\n    ma_uint64 latency;\n    const char *driver;\n    ma_pa_source_flags_t flags;\n    void* proplist;\n    ma_uint64 configured_latency;\n    ma_uint32 base_volume;\n    ma_pa_source_state_t state;\n    ma_uint32 n_volume_steps;\n    ma_uint32 card;\n    ma_uint32 n_ports;\n    void** ports;\n    void* active_port;\n    ma_uint8 n_formats;\n    void** formats;\n} ma_pa_source_info;\n\ntypedef void (* ma_pa_context_notify_cb_t)(ma_pa_context* c, void* userdata);\ntypedef void (* ma_pa_sink_info_cb_t)     (ma_pa_context* c, const ma_pa_sink_info* i, int eol, void* userdata);\ntypedef void (* ma_pa_source_info_cb_t)   (ma_pa_context* c, const ma_pa_source_info* i, int eol, void* userdata);\ntypedef void (* ma_pa_stream_success_cb_t)(ma_pa_stream* s, int success, void* userdata);\ntypedef void (* ma_pa_stream_request_cb_t)(ma_pa_stream* s, size_t nbytes, void* userdata);\ntypedef void (* ma_pa_stream_notify_cb_t) (ma_pa_stream* s, void* userdata);\ntypedef void (* ma_pa_free_cb_t)          (void* p);\n#endif\n\n\ntypedef ma_pa_mainloop*          (* ma_pa_mainloop_new_proc)                   (void);\ntypedef void                     (* ma_pa_mainloop_free_proc)                  (ma_pa_mainloop* m);\ntypedef void                     (* ma_pa_mainloop_quit_proc)                  (ma_pa_mainloop* m, int retval);\ntypedef ma_pa_mainloop_api*      (* ma_pa_mainloop_get_api_proc)               (ma_pa_mainloop* m);\ntypedef int                      (* ma_pa_mainloop_iterate_proc)               (ma_pa_mainloop* m, int block, int* retval);\ntypedef void                     (* ma_pa_mainloop_wakeup_proc)                (ma_pa_mainloop* m);\ntypedef ma_pa_threaded_mainloop* (* ma_pa_threaded_mainloop_new_proc)          (void);\ntypedef void                     (* ma_pa_threaded_mainloop_free_proc)         (ma_pa_threaded_mainloop* m);\ntypedef int                      (* ma_pa_threaded_mainloop_start_proc)        (ma_pa_threaded_mainloop* m);\ntypedef void                     (* ma_pa_threaded_mainloop_stop_proc)         (ma_pa_threaded_mainloop* m);\ntypedef void                     (* ma_pa_threaded_mainloop_lock_proc)         (ma_pa_threaded_mainloop* m);\ntypedef void                     (* ma_pa_threaded_mainloop_unlock_proc)       (ma_pa_threaded_mainloop* m);\ntypedef void                     (* ma_pa_threaded_mainloop_wait_proc)         (ma_pa_threaded_mainloop* m);\ntypedef void                     (* ma_pa_threaded_mainloop_signal_proc)       (ma_pa_threaded_mainloop* m, int wait_for_accept);\ntypedef void                     (* ma_pa_threaded_mainloop_accept_proc)       (ma_pa_threaded_mainloop* m);\ntypedef int                      (* ma_pa_threaded_mainloop_get_retval_proc)   (ma_pa_threaded_mainloop* m);\ntypedef ma_pa_mainloop_api*      (* ma_pa_threaded_mainloop_get_api_proc)      (ma_pa_threaded_mainloop* m);\ntypedef int                      (* ma_pa_threaded_mainloop_in_thread_proc)    (ma_pa_threaded_mainloop* m);\ntypedef void                     (* ma_pa_threaded_mainloop_set_name_proc)     (ma_pa_threaded_mainloop* m, const char* name);\ntypedef ma_pa_context*           (* ma_pa_context_new_proc)                    (ma_pa_mainloop_api* mainloop, const char* name);\ntypedef void                     (* ma_pa_context_unref_proc)                  (ma_pa_context* c);\ntypedef int                      (* ma_pa_context_connect_proc)                (ma_pa_context* c, const char* server, ma_pa_context_flags_t flags, const ma_pa_spawn_api* api);\ntypedef void                     (* ma_pa_context_disconnect_proc)             (ma_pa_context* c);\ntypedef void                     (* ma_pa_context_set_state_callback_proc)     (ma_pa_context* c, ma_pa_context_notify_cb_t cb, void* userdata);\ntypedef ma_pa_context_state_t    (* ma_pa_context_get_state_proc)              (ma_pa_context* c);\ntypedef ma_pa_operation*         (* ma_pa_context_get_sink_info_list_proc)     (ma_pa_context* c, ma_pa_sink_info_cb_t cb, void* userdata);\ntypedef ma_pa_operation*         (* ma_pa_context_get_source_info_list_proc)   (ma_pa_context* c, ma_pa_source_info_cb_t cb, void* userdata);\ntypedef ma_pa_operation*         (* ma_pa_context_get_sink_info_by_name_proc)  (ma_pa_context* c, const char* name, ma_pa_sink_info_cb_t cb, void* userdata);\ntypedef ma_pa_operation*         (* ma_pa_context_get_source_info_by_name_proc)(ma_pa_context* c, const char* name, ma_pa_source_info_cb_t cb, void* userdata);\ntypedef void                     (* ma_pa_operation_unref_proc)                (ma_pa_operation* o);\ntypedef ma_pa_operation_state_t  (* ma_pa_operation_get_state_proc)            (ma_pa_operation* o);\ntypedef ma_pa_channel_map*       (* ma_pa_channel_map_init_extend_proc)        (ma_pa_channel_map* m, unsigned channels, ma_pa_channel_map_def_t def);\ntypedef int                      (* ma_pa_channel_map_valid_proc)              (const ma_pa_channel_map* m);\ntypedef int                      (* ma_pa_channel_map_compatible_proc)         (const ma_pa_channel_map* m, const ma_pa_sample_spec* ss);\ntypedef ma_pa_stream*            (* ma_pa_stream_new_proc)                     (ma_pa_context* c, const char* name, const ma_pa_sample_spec* ss, const ma_pa_channel_map* map);\ntypedef void                     (* ma_pa_stream_unref_proc)                   (ma_pa_stream* s);\ntypedef int                      (* ma_pa_stream_connect_playback_proc)        (ma_pa_stream* s, const char* dev, const ma_pa_buffer_attr* attr, ma_pa_stream_flags_t flags, const ma_pa_cvolume* volume, ma_pa_stream* sync_stream);\ntypedef int                      (* ma_pa_stream_connect_record_proc)          (ma_pa_stream* s, const char* dev, const ma_pa_buffer_attr* attr, ma_pa_stream_flags_t flags);\ntypedef int                      (* ma_pa_stream_disconnect_proc)              (ma_pa_stream* s);\ntypedef ma_pa_stream_state_t     (* ma_pa_stream_get_state_proc)               (ma_pa_stream* s);\ntypedef const ma_pa_sample_spec* (* ma_pa_stream_get_sample_spec_proc)         (ma_pa_stream* s);\ntypedef const ma_pa_channel_map* (* ma_pa_stream_get_channel_map_proc)         (ma_pa_stream* s);\ntypedef const ma_pa_buffer_attr* (* ma_pa_stream_get_buffer_attr_proc)         (ma_pa_stream* s);\ntypedef ma_pa_operation*         (* ma_pa_stream_set_buffer_attr_proc)         (ma_pa_stream* s, const ma_pa_buffer_attr* attr, ma_pa_stream_success_cb_t cb, void* userdata);\ntypedef const char*              (* ma_pa_stream_get_device_name_proc)         (ma_pa_stream* s);\ntypedef void                     (* ma_pa_stream_set_write_callback_proc)      (ma_pa_stream* s, ma_pa_stream_request_cb_t cb, void* userdata);\ntypedef void                     (* ma_pa_stream_set_read_callback_proc)       (ma_pa_stream* s, ma_pa_stream_request_cb_t cb, void* userdata);\ntypedef void                     (* ma_pa_stream_set_suspended_callback_proc)  (ma_pa_stream* s, ma_pa_stream_notify_cb_t cb, void* userdata);\ntypedef void                     (* ma_pa_stream_set_moved_callback_proc)      (ma_pa_stream* s, ma_pa_stream_notify_cb_t cb, void* userdata);\ntypedef int                      (* ma_pa_stream_is_suspended_proc)            (const ma_pa_stream* s);\ntypedef ma_pa_operation*         (* ma_pa_stream_flush_proc)                   (ma_pa_stream* s, ma_pa_stream_success_cb_t cb, void* userdata);\ntypedef ma_pa_operation*         (* ma_pa_stream_drain_proc)                   (ma_pa_stream* s, ma_pa_stream_success_cb_t cb, void* userdata);\ntypedef int                      (* ma_pa_stream_is_corked_proc)               (ma_pa_stream* s);\ntypedef ma_pa_operation*         (* ma_pa_stream_cork_proc)                    (ma_pa_stream* s, int b, ma_pa_stream_success_cb_t cb, void* userdata);\ntypedef ma_pa_operation*         (* ma_pa_stream_trigger_proc)                 (ma_pa_stream* s, ma_pa_stream_success_cb_t cb, void* userdata);\ntypedef int                      (* ma_pa_stream_begin_write_proc)             (ma_pa_stream* s, void** data, size_t* nbytes);\ntypedef int                      (* ma_pa_stream_write_proc)                   (ma_pa_stream* s, const void* data, size_t nbytes, ma_pa_free_cb_t free_cb, int64_t offset, ma_pa_seek_mode_t seek);\ntypedef int                      (* ma_pa_stream_peek_proc)                    (ma_pa_stream* s, const void** data, size_t* nbytes);\ntypedef int                      (* ma_pa_stream_drop_proc)                    (ma_pa_stream* s);\ntypedef size_t                   (* ma_pa_stream_writable_size_proc)           (ma_pa_stream* s);\ntypedef size_t                   (* ma_pa_stream_readable_size_proc)           (ma_pa_stream* s);\n\ntypedef struct\n{\n    ma_uint32 count;\n    ma_uint32 capacity;\n    ma_device_info* pInfo;\n} ma_pulse_device_enum_data;\n\nstatic ma_result ma_result_from_pulse(int result)\n{\n    if (result < 0) {\n        return MA_ERROR;\n    }\n\n    switch (result) {\n        case MA_PA_OK:           return MA_SUCCESS;\n        case MA_PA_ERR_ACCESS:   return MA_ACCESS_DENIED;\n        case MA_PA_ERR_INVALID:  return MA_INVALID_ARGS;\n        case MA_PA_ERR_NOENTITY: return MA_NO_DEVICE;\n        default:                 return MA_ERROR;\n    }\n}\n\n#if 0\nstatic ma_pa_sample_format_t ma_format_to_pulse(ma_format format)\n{\n    if (ma_is_little_endian()) {\n        switch (format) {\n            case ma_format_s16: return MA_PA_SAMPLE_S16LE;\n            case ma_format_s24: return MA_PA_SAMPLE_S24LE;\n            case ma_format_s32: return MA_PA_SAMPLE_S32LE;\n            case ma_format_f32: return MA_PA_SAMPLE_FLOAT32LE;\n            default: break;\n        }\n    } else {\n        switch (format) {\n            case ma_format_s16: return MA_PA_SAMPLE_S16BE;\n            case ma_format_s24: return MA_PA_SAMPLE_S24BE;\n            case ma_format_s32: return MA_PA_SAMPLE_S32BE;\n            case ma_format_f32: return MA_PA_SAMPLE_FLOAT32BE;\n            default: break;\n        }\n    }\n\n    /* Endian agnostic. */\n    switch (format) {\n        case ma_format_u8: return MA_PA_SAMPLE_U8;\n        default: return MA_PA_SAMPLE_INVALID;\n    }\n}\n#endif\n\nstatic ma_format ma_format_from_pulse(ma_pa_sample_format_t format)\n{\n    if (ma_is_little_endian()) {\n        switch (format) {\n            case MA_PA_SAMPLE_S16LE:     return ma_format_s16;\n            case MA_PA_SAMPLE_S24LE:     return ma_format_s24;\n            case MA_PA_SAMPLE_S32LE:     return ma_format_s32;\n            case MA_PA_SAMPLE_FLOAT32LE: return ma_format_f32;\n            default: break;\n        }\n    } else {\n        switch (format) {\n            case MA_PA_SAMPLE_S16BE:     return ma_format_s16;\n            case MA_PA_SAMPLE_S24BE:     return ma_format_s24;\n            case MA_PA_SAMPLE_S32BE:     return ma_format_s32;\n            case MA_PA_SAMPLE_FLOAT32BE: return ma_format_f32;\n            default: break;\n        }\n    }\n\n    /* Endian agnostic. */\n    switch (format) {\n        case MA_PA_SAMPLE_U8: return ma_format_u8;\n        default: return ma_format_unknown;\n    }\n}\n\nstatic ma_channel ma_channel_position_from_pulse(ma_pa_channel_position_t position)\n{\n    switch (position)\n    {\n        case MA_PA_CHANNEL_POSITION_INVALID:               return MA_CHANNEL_NONE;\n        case MA_PA_CHANNEL_POSITION_MONO:                  return MA_CHANNEL_MONO;\n        case MA_PA_CHANNEL_POSITION_FRONT_LEFT:            return MA_CHANNEL_FRONT_LEFT;\n        case MA_PA_CHANNEL_POSITION_FRONT_RIGHT:           return MA_CHANNEL_FRONT_RIGHT;\n        case MA_PA_CHANNEL_POSITION_FRONT_CENTER:          return MA_CHANNEL_FRONT_CENTER;\n        case MA_PA_CHANNEL_POSITION_REAR_CENTER:           return MA_CHANNEL_BACK_CENTER;\n        case MA_PA_CHANNEL_POSITION_REAR_LEFT:             return MA_CHANNEL_BACK_LEFT;\n        case MA_PA_CHANNEL_POSITION_REAR_RIGHT:            return MA_CHANNEL_BACK_RIGHT;\n        case MA_PA_CHANNEL_POSITION_LFE:                   return MA_CHANNEL_LFE;\n        case MA_PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER:  return MA_CHANNEL_FRONT_LEFT_CENTER;\n        case MA_PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER: return MA_CHANNEL_FRONT_RIGHT_CENTER;\n        case MA_PA_CHANNEL_POSITION_SIDE_LEFT:             return MA_CHANNEL_SIDE_LEFT;\n        case MA_PA_CHANNEL_POSITION_SIDE_RIGHT:            return MA_CHANNEL_SIDE_RIGHT;\n        case MA_PA_CHANNEL_POSITION_AUX0:                  return MA_CHANNEL_AUX_0;\n        case MA_PA_CHANNEL_POSITION_AUX1:                  return MA_CHANNEL_AUX_1;\n        case MA_PA_CHANNEL_POSITION_AUX2:                  return MA_CHANNEL_AUX_2;\n        case MA_PA_CHANNEL_POSITION_AUX3:                  return MA_CHANNEL_AUX_3;\n        case MA_PA_CHANNEL_POSITION_AUX4:                  return MA_CHANNEL_AUX_4;\n        case MA_PA_CHANNEL_POSITION_AUX5:                  return MA_CHANNEL_AUX_5;\n        case MA_PA_CHANNEL_POSITION_AUX6:                  return MA_CHANNEL_AUX_6;\n        case MA_PA_CHANNEL_POSITION_AUX7:                  return MA_CHANNEL_AUX_7;\n        case MA_PA_CHANNEL_POSITION_AUX8:                  return MA_CHANNEL_AUX_8;\n        case MA_PA_CHANNEL_POSITION_AUX9:                  return MA_CHANNEL_AUX_9;\n        case MA_PA_CHANNEL_POSITION_AUX10:                 return MA_CHANNEL_AUX_10;\n        case MA_PA_CHANNEL_POSITION_AUX11:                 return MA_CHANNEL_AUX_11;\n        case MA_PA_CHANNEL_POSITION_AUX12:                 return MA_CHANNEL_AUX_12;\n        case MA_PA_CHANNEL_POSITION_AUX13:                 return MA_CHANNEL_AUX_13;\n        case MA_PA_CHANNEL_POSITION_AUX14:                 return MA_CHANNEL_AUX_14;\n        case MA_PA_CHANNEL_POSITION_AUX15:                 return MA_CHANNEL_AUX_15;\n        case MA_PA_CHANNEL_POSITION_AUX16:                 return MA_CHANNEL_AUX_16;\n        case MA_PA_CHANNEL_POSITION_AUX17:                 return MA_CHANNEL_AUX_17;\n        case MA_PA_CHANNEL_POSITION_AUX18:                 return MA_CHANNEL_AUX_18;\n        case MA_PA_CHANNEL_POSITION_AUX19:                 return MA_CHANNEL_AUX_19;\n        case MA_PA_CHANNEL_POSITION_AUX20:                 return MA_CHANNEL_AUX_20;\n        case MA_PA_CHANNEL_POSITION_AUX21:                 return MA_CHANNEL_AUX_21;\n        case MA_PA_CHANNEL_POSITION_AUX22:                 return MA_CHANNEL_AUX_22;\n        case MA_PA_CHANNEL_POSITION_AUX23:                 return MA_CHANNEL_AUX_23;\n        case MA_PA_CHANNEL_POSITION_AUX24:                 return MA_CHANNEL_AUX_24;\n        case MA_PA_CHANNEL_POSITION_AUX25:                 return MA_CHANNEL_AUX_25;\n        case MA_PA_CHANNEL_POSITION_AUX26:                 return MA_CHANNEL_AUX_26;\n        case MA_PA_CHANNEL_POSITION_AUX27:                 return MA_CHANNEL_AUX_27;\n        case MA_PA_CHANNEL_POSITION_AUX28:                 return MA_CHANNEL_AUX_28;\n        case MA_PA_CHANNEL_POSITION_AUX29:                 return MA_CHANNEL_AUX_29;\n        case MA_PA_CHANNEL_POSITION_AUX30:                 return MA_CHANNEL_AUX_30;\n        case MA_PA_CHANNEL_POSITION_AUX31:                 return MA_CHANNEL_AUX_31;\n        case MA_PA_CHANNEL_POSITION_TOP_CENTER:            return MA_CHANNEL_TOP_CENTER;\n        case MA_PA_CHANNEL_POSITION_TOP_FRONT_LEFT:        return MA_CHANNEL_TOP_FRONT_LEFT;\n        case MA_PA_CHANNEL_POSITION_TOP_FRONT_RIGHT:       return MA_CHANNEL_TOP_FRONT_RIGHT;\n        case MA_PA_CHANNEL_POSITION_TOP_FRONT_CENTER:      return MA_CHANNEL_TOP_FRONT_CENTER;\n        case MA_PA_CHANNEL_POSITION_TOP_REAR_LEFT:         return MA_CHANNEL_TOP_BACK_LEFT;\n        case MA_PA_CHANNEL_POSITION_TOP_REAR_RIGHT:        return MA_CHANNEL_TOP_BACK_RIGHT;\n        case MA_PA_CHANNEL_POSITION_TOP_REAR_CENTER:       return MA_CHANNEL_TOP_BACK_CENTER;\n        default: return MA_CHANNEL_NONE;\n    }\n}\n\n#if 0\nstatic ma_pa_channel_position_t ma_channel_position_to_pulse(ma_channel position)\n{\n    switch (position)\n    {\n        case MA_CHANNEL_NONE:               return MA_PA_CHANNEL_POSITION_INVALID;\n        case MA_CHANNEL_FRONT_LEFT:         return MA_PA_CHANNEL_POSITION_FRONT_LEFT;\n        case MA_CHANNEL_FRONT_RIGHT:        return MA_PA_CHANNEL_POSITION_FRONT_RIGHT;\n        case MA_CHANNEL_FRONT_CENTER:       return MA_PA_CHANNEL_POSITION_FRONT_CENTER;\n        case MA_CHANNEL_LFE:                return MA_PA_CHANNEL_POSITION_LFE;\n        case MA_CHANNEL_BACK_LEFT:          return MA_PA_CHANNEL_POSITION_REAR_LEFT;\n        case MA_CHANNEL_BACK_RIGHT:         return MA_PA_CHANNEL_POSITION_REAR_RIGHT;\n        case MA_CHANNEL_FRONT_LEFT_CENTER:  return MA_PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER;\n        case MA_CHANNEL_FRONT_RIGHT_CENTER: return MA_PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER;\n        case MA_CHANNEL_BACK_CENTER:        return MA_PA_CHANNEL_POSITION_REAR_CENTER;\n        case MA_CHANNEL_SIDE_LEFT:          return MA_PA_CHANNEL_POSITION_SIDE_LEFT;\n        case MA_CHANNEL_SIDE_RIGHT:         return MA_PA_CHANNEL_POSITION_SIDE_RIGHT;\n        case MA_CHANNEL_TOP_CENTER:         return MA_PA_CHANNEL_POSITION_TOP_CENTER;\n        case MA_CHANNEL_TOP_FRONT_LEFT:     return MA_PA_CHANNEL_POSITION_TOP_FRONT_LEFT;\n        case MA_CHANNEL_TOP_FRONT_CENTER:   return MA_PA_CHANNEL_POSITION_TOP_FRONT_CENTER;\n        case MA_CHANNEL_TOP_FRONT_RIGHT:    return MA_PA_CHANNEL_POSITION_TOP_FRONT_RIGHT;\n        case MA_CHANNEL_TOP_BACK_LEFT:      return MA_PA_CHANNEL_POSITION_TOP_REAR_LEFT;\n        case MA_CHANNEL_TOP_BACK_CENTER:    return MA_PA_CHANNEL_POSITION_TOP_REAR_CENTER;\n        case MA_CHANNEL_TOP_BACK_RIGHT:     return MA_PA_CHANNEL_POSITION_TOP_REAR_RIGHT;\n        case MA_CHANNEL_19:                 return MA_PA_CHANNEL_POSITION_AUX18;\n        case MA_CHANNEL_20:                 return MA_PA_CHANNEL_POSITION_AUX19;\n        case MA_CHANNEL_21:                 return MA_PA_CHANNEL_POSITION_AUX20;\n        case MA_CHANNEL_22:                 return MA_PA_CHANNEL_POSITION_AUX21;\n        case MA_CHANNEL_23:                 return MA_PA_CHANNEL_POSITION_AUX22;\n        case MA_CHANNEL_24:                 return MA_PA_CHANNEL_POSITION_AUX23;\n        case MA_CHANNEL_25:                 return MA_PA_CHANNEL_POSITION_AUX24;\n        case MA_CHANNEL_26:                 return MA_PA_CHANNEL_POSITION_AUX25;\n        case MA_CHANNEL_27:                 return MA_PA_CHANNEL_POSITION_AUX26;\n        case MA_CHANNEL_28:                 return MA_PA_CHANNEL_POSITION_AUX27;\n        case MA_CHANNEL_29:                 return MA_PA_CHANNEL_POSITION_AUX28;\n        case MA_CHANNEL_30:                 return MA_PA_CHANNEL_POSITION_AUX29;\n        case MA_CHANNEL_31:                 return MA_PA_CHANNEL_POSITION_AUX30;\n        case MA_CHANNEL_32:                 return MA_PA_CHANNEL_POSITION_AUX31;\n        default: return (ma_pa_channel_position_t)position;\n    }\n}\n#endif\n\nstatic ma_result ma_wait_for_operation__pulse(ma_context* pContext, ma_ptr pMainLoop, ma_pa_operation* pOP)\n{\n    int resultPA;\n    ma_pa_operation_state_t state;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pOP != NULL);\n\n    for (;;) {\n        state = ((ma_pa_operation_get_state_proc)pContext->pulse.pa_operation_get_state)(pOP);\n        if (state != MA_PA_OPERATION_RUNNING) {\n            break;  /* Done. */\n        }\n\n        resultPA = ((ma_pa_mainloop_iterate_proc)pContext->pulse.pa_mainloop_iterate)((ma_pa_mainloop*)pMainLoop, 1, NULL);\n        if (resultPA < 0) {\n            return ma_result_from_pulse(resultPA);\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_wait_for_operation_and_unref__pulse(ma_context* pContext, ma_ptr pMainLoop, ma_pa_operation* pOP)\n{\n    ma_result result;\n\n    if (pOP == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_wait_for_operation__pulse(pContext, pMainLoop, pOP);\n    ((ma_pa_operation_unref_proc)pContext->pulse.pa_operation_unref)(pOP);\n\n    return result;\n}\n\nstatic ma_result ma_wait_for_pa_context_to_connect__pulse(ma_context* pContext, ma_ptr pMainLoop, ma_ptr pPulseContext)\n{\n    int resultPA;\n    ma_pa_context_state_t state;\n\n    for (;;) {\n        state = ((ma_pa_context_get_state_proc)pContext->pulse.pa_context_get_state)((ma_pa_context*)pPulseContext);\n        if (state == MA_PA_CONTEXT_READY) {\n            break;  /* Done. */\n        }\n\n        if (state == MA_PA_CONTEXT_FAILED || state == MA_PA_CONTEXT_TERMINATED) {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[PulseAudio] An error occurred while connecting the PulseAudio context.\");\n            return MA_ERROR;\n        }\n\n        resultPA = ((ma_pa_mainloop_iterate_proc)pContext->pulse.pa_mainloop_iterate)((ma_pa_mainloop*)pMainLoop, 1, NULL);\n        if (resultPA < 0) {\n            return ma_result_from_pulse(resultPA);\n        }\n    }\n\n    /* Should never get here. */\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_wait_for_pa_stream_to_connect__pulse(ma_context* pContext, ma_ptr pMainLoop, ma_ptr pStream)\n{\n    int resultPA;\n    ma_pa_stream_state_t state;\n\n    for (;;) {\n        state = ((ma_pa_stream_get_state_proc)pContext->pulse.pa_stream_get_state)((ma_pa_stream*)pStream);\n        if (state == MA_PA_STREAM_READY) {\n            break;  /* Done. */\n        }\n\n        if (state == MA_PA_STREAM_FAILED || state == MA_PA_STREAM_TERMINATED) {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[PulseAudio] An error occurred while connecting the PulseAudio stream.\");\n            return MA_ERROR;\n        }\n\n        resultPA = ((ma_pa_mainloop_iterate_proc)pContext->pulse.pa_mainloop_iterate)((ma_pa_mainloop*)pMainLoop, 1, NULL);\n        if (resultPA < 0) {\n            return ma_result_from_pulse(resultPA);\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_init_pa_mainloop_and_pa_context__pulse(ma_context* pContext, const char* pApplicationName, const char* pServerName, ma_bool32 tryAutoSpawn, ma_ptr* ppMainLoop, ma_ptr* ppPulseContext)\n{\n    ma_result result;\n    ma_ptr pMainLoop;\n    ma_ptr pPulseContext;\n\n    MA_ASSERT(ppMainLoop     != NULL);\n    MA_ASSERT(ppPulseContext != NULL);\n\n    /* The PulseAudio context maps well to miniaudio's notion of a context. The pa_context object will be initialized as part of the ma_context. */\n    pMainLoop = ((ma_pa_mainloop_new_proc)pContext->pulse.pa_mainloop_new)();\n    if (pMainLoop == NULL) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Failed to create mainloop.\");\n        return MA_FAILED_TO_INIT_BACKEND;\n    }\n\n    pPulseContext = ((ma_pa_context_new_proc)pContext->pulse.pa_context_new)(((ma_pa_mainloop_get_api_proc)pContext->pulse.pa_mainloop_get_api)((ma_pa_mainloop*)pMainLoop), pApplicationName);\n    if (pPulseContext == NULL) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Failed to create PulseAudio context.\");\n        ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)(pMainLoop));\n        return MA_FAILED_TO_INIT_BACKEND;\n    }\n\n    /* Now we need to connect to the context. Everything is asynchronous so we need to wait for it to connect before returning. */\n    result = ma_result_from_pulse(((ma_pa_context_connect_proc)pContext->pulse.pa_context_connect)((ma_pa_context*)pPulseContext, pServerName, (tryAutoSpawn) ? 0 : MA_PA_CONTEXT_NOAUTOSPAWN, NULL));\n    if (result != MA_SUCCESS) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Failed to connect PulseAudio context.\");\n        ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)(pMainLoop));\n        return result;\n    }\n\n    /* Since ma_context_init() runs synchronously we need to wait for the PulseAudio context to connect before we return. */\n    result = ma_wait_for_pa_context_to_connect__pulse(pContext, pMainLoop, pPulseContext);\n    if (result != MA_SUCCESS) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Waiting for connection failed.\");\n        ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)(pMainLoop));\n        return result;\n    }\n\n    *ppMainLoop     = pMainLoop;\n    *ppPulseContext = pPulseContext;\n\n    return MA_SUCCESS;\n}\n\n\nstatic void ma_device_sink_info_callback(ma_pa_context* pPulseContext, const ma_pa_sink_info* pInfo, int endOfList, void* pUserData)\n{\n    ma_pa_sink_info* pInfoOut;\n\n    if (endOfList > 0) {\n        return;\n    }\n\n    /*\n    There has been a report that indicates that pInfo can be null which results\n    in a null pointer dereference below. We'll check for this for safety.\n    */\n    if (pInfo == NULL) {\n        return;\n    }\n\n    pInfoOut = (ma_pa_sink_info*)pUserData;\n    MA_ASSERT(pInfoOut != NULL);\n\n    *pInfoOut = *pInfo;\n\n    (void)pPulseContext; /* Unused. */\n}\n\nstatic void ma_device_source_info_callback(ma_pa_context* pPulseContext, const ma_pa_source_info* pInfo, int endOfList, void* pUserData)\n{\n    ma_pa_source_info* pInfoOut;\n\n    if (endOfList > 0) {\n        return;\n    }\n\n    /*\n    There has been a report that indicates that pInfo can be null which results\n    in a null pointer dereference below. We'll check for this for safety.\n    */\n    if (pInfo == NULL) {\n        return;\n    }\n\n    pInfoOut = (ma_pa_source_info*)pUserData;\n    MA_ASSERT(pInfoOut != NULL);\n\n    *pInfoOut = *pInfo;\n\n    (void)pPulseContext; /* Unused. */\n}\n\n#if 0\nstatic void ma_device_sink_name_callback(ma_pa_context* pPulseContext, const ma_pa_sink_info* pInfo, int endOfList, void* pUserData)\n{\n    ma_device* pDevice;\n\n    if (endOfList > 0) {\n        return;\n    }\n\n    pDevice = (ma_device*)pUserData;\n    MA_ASSERT(pDevice != NULL);\n\n    ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), pInfo->description, (size_t)-1);\n\n    (void)pPulseContext; /* Unused. */\n}\n\nstatic void ma_device_source_name_callback(ma_pa_context* pPulseContext, const ma_pa_source_info* pInfo, int endOfList, void* pUserData)\n{\n    ma_device* pDevice;\n\n    if (endOfList > 0) {\n        return;\n    }\n\n    pDevice = (ma_device*)pUserData;\n    MA_ASSERT(pDevice != NULL);\n\n    ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), pInfo->description, (size_t)-1);\n\n    (void)pPulseContext; /* Unused. */\n}\n#endif\n\nstatic ma_result ma_context_get_sink_info__pulse(ma_context* pContext, const char* pDeviceName, ma_pa_sink_info* pSinkInfo)\n{\n    ma_pa_operation* pOP;\n\n    pOP = ((ma_pa_context_get_sink_info_by_name_proc)pContext->pulse.pa_context_get_sink_info_by_name)((ma_pa_context*)pContext->pulse.pPulseContext, pDeviceName, ma_device_sink_info_callback, pSinkInfo);\n    if (pOP == NULL) {\n        return MA_ERROR;\n    }\n\n    return ma_wait_for_operation_and_unref__pulse(pContext, pContext->pulse.pMainLoop, pOP);\n}\n\nstatic ma_result ma_context_get_source_info__pulse(ma_context* pContext, const char* pDeviceName, ma_pa_source_info* pSourceInfo)\n{\n    ma_pa_operation* pOP;\n\n    pOP = ((ma_pa_context_get_source_info_by_name_proc)pContext->pulse.pa_context_get_source_info_by_name)((ma_pa_context*)pContext->pulse.pPulseContext, pDeviceName, ma_device_source_info_callback, pSourceInfo);\n    if (pOP == NULL) {\n        return MA_ERROR;\n    }\n\n    return ma_wait_for_operation_and_unref__pulse(pContext, pContext->pulse.pMainLoop, pOP);\n}\n\nstatic ma_result ma_context_get_default_device_index__pulse(ma_context* pContext, ma_device_type deviceType, ma_uint32* pIndex)\n{\n    ma_result result;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pIndex   != NULL);\n\n    if (pIndex != NULL) {\n        *pIndex = (ma_uint32)-1;\n    }\n\n    if (deviceType == ma_device_type_playback) {\n        ma_pa_sink_info sinkInfo;\n        result = ma_context_get_sink_info__pulse(pContext, NULL, &sinkInfo);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        if (pIndex != NULL) {\n            *pIndex = sinkInfo.index;\n        }\n    }\n\n    if (deviceType == ma_device_type_capture) {\n        ma_pa_source_info sourceInfo;\n        result = ma_context_get_source_info__pulse(pContext, NULL, &sourceInfo);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        if (pIndex != NULL) {\n            *pIndex = sourceInfo.index;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\n\ntypedef struct\n{\n    ma_context* pContext;\n    ma_enum_devices_callback_proc callback;\n    void* pUserData;\n    ma_bool32 isTerminated;\n    ma_uint32 defaultDeviceIndexPlayback;\n    ma_uint32 defaultDeviceIndexCapture;\n} ma_context_enumerate_devices_callback_data__pulse;\n\nstatic void ma_context_enumerate_devices_sink_callback__pulse(ma_pa_context* pPulseContext, const ma_pa_sink_info* pSinkInfo, int endOfList, void* pUserData)\n{\n    ma_context_enumerate_devices_callback_data__pulse* pData = (ma_context_enumerate_devices_callback_data__pulse*)pUserData;\n    ma_device_info deviceInfo;\n\n    MA_ASSERT(pData != NULL);\n\n    if (endOfList || pData->isTerminated) {\n        return;\n    }\n\n    MA_ZERO_OBJECT(&deviceInfo);\n\n    /* The name from PulseAudio is the ID for miniaudio. */\n    if (pSinkInfo->name != NULL) {\n        ma_strncpy_s(deviceInfo.id.pulse, sizeof(deviceInfo.id.pulse), pSinkInfo->name, (size_t)-1);\n    }\n\n    /* The description from PulseAudio is the name for miniaudio. */\n    if (pSinkInfo->description != NULL) {\n        ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), pSinkInfo->description, (size_t)-1);\n    }\n\n    if (pSinkInfo->index == pData->defaultDeviceIndexPlayback) {\n        deviceInfo.isDefault = MA_TRUE;\n    }\n\n    pData->isTerminated = !pData->callback(pData->pContext, ma_device_type_playback, &deviceInfo, pData->pUserData);\n\n    (void)pPulseContext; /* Unused. */\n}\n\nstatic void ma_context_enumerate_devices_source_callback__pulse(ma_pa_context* pPulseContext, const ma_pa_source_info* pSourceInfo, int endOfList, void* pUserData)\n{\n    ma_context_enumerate_devices_callback_data__pulse* pData = (ma_context_enumerate_devices_callback_data__pulse*)pUserData;\n    ma_device_info deviceInfo;\n\n    MA_ASSERT(pData != NULL);\n\n    if (endOfList || pData->isTerminated) {\n        return;\n    }\n\n    MA_ZERO_OBJECT(&deviceInfo);\n\n    /* The name from PulseAudio is the ID for miniaudio. */\n    if (pSourceInfo->name != NULL) {\n        ma_strncpy_s(deviceInfo.id.pulse, sizeof(deviceInfo.id.pulse), pSourceInfo->name, (size_t)-1);\n    }\n\n    /* The description from PulseAudio is the name for miniaudio. */\n    if (pSourceInfo->description != NULL) {\n        ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), pSourceInfo->description, (size_t)-1);\n    }\n\n    if (pSourceInfo->index == pData->defaultDeviceIndexCapture) {\n        deviceInfo.isDefault = MA_TRUE;\n    }\n\n    pData->isTerminated = !pData->callback(pData->pContext, ma_device_type_capture, &deviceInfo, pData->pUserData);\n\n    (void)pPulseContext; /* Unused. */\n}\n\nstatic ma_result ma_context_enumerate_devices__pulse(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    ma_result result = MA_SUCCESS;\n    ma_context_enumerate_devices_callback_data__pulse callbackData;\n    ma_pa_operation* pOP = NULL;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(callback != NULL);\n\n    callbackData.pContext = pContext;\n    callbackData.callback = callback;\n    callbackData.pUserData = pUserData;\n    callbackData.isTerminated = MA_FALSE;\n    callbackData.defaultDeviceIndexPlayback = (ma_uint32)-1;\n    callbackData.defaultDeviceIndexCapture  = (ma_uint32)-1;\n\n    /* We need to get the index of the default devices. */\n    ma_context_get_default_device_index__pulse(pContext, ma_device_type_playback, &callbackData.defaultDeviceIndexPlayback);\n    ma_context_get_default_device_index__pulse(pContext, ma_device_type_capture,  &callbackData.defaultDeviceIndexCapture);\n\n    /* Playback. */\n    if (!callbackData.isTerminated) {\n        pOP = ((ma_pa_context_get_sink_info_list_proc)pContext->pulse.pa_context_get_sink_info_list)((ma_pa_context*)(pContext->pulse.pPulseContext), ma_context_enumerate_devices_sink_callback__pulse, &callbackData);\n        if (pOP == NULL) {\n            result = MA_ERROR;\n            goto done;\n        }\n\n        result = ma_wait_for_operation__pulse(pContext, pContext->pulse.pMainLoop, pOP);\n        ((ma_pa_operation_unref_proc)pContext->pulse.pa_operation_unref)(pOP);\n\n        if (result != MA_SUCCESS) {\n            goto done;\n        }\n    }\n\n\n    /* Capture. */\n    if (!callbackData.isTerminated) {\n        pOP = ((ma_pa_context_get_source_info_list_proc)pContext->pulse.pa_context_get_source_info_list)((ma_pa_context*)(pContext->pulse.pPulseContext), ma_context_enumerate_devices_source_callback__pulse, &callbackData);\n        if (pOP == NULL) {\n            result = MA_ERROR;\n            goto done;\n        }\n\n        result = ma_wait_for_operation__pulse(pContext, pContext->pulse.pMainLoop, pOP);\n        ((ma_pa_operation_unref_proc)pContext->pulse.pa_operation_unref)(pOP);\n\n        if (result != MA_SUCCESS) {\n            goto done;\n        }\n    }\n\ndone:\n    return result;\n}\n\n\ntypedef struct\n{\n    ma_device_info* pDeviceInfo;\n    ma_uint32 defaultDeviceIndex;\n    ma_bool32 foundDevice;\n} ma_context_get_device_info_callback_data__pulse;\n\nstatic void ma_context_get_device_info_sink_callback__pulse(ma_pa_context* pPulseContext, const ma_pa_sink_info* pInfo, int endOfList, void* pUserData)\n{\n    ma_context_get_device_info_callback_data__pulse* pData = (ma_context_get_device_info_callback_data__pulse*)pUserData;\n\n    if (endOfList > 0) {\n        return;\n    }\n\n    MA_ASSERT(pData != NULL);\n    pData->foundDevice = MA_TRUE;\n\n    if (pInfo->name != NULL) {\n        ma_strncpy_s(pData->pDeviceInfo->id.pulse, sizeof(pData->pDeviceInfo->id.pulse), pInfo->name, (size_t)-1);\n    }\n\n    if (pInfo->description != NULL) {\n        ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), pInfo->description, (size_t)-1);\n    }\n\n    /*\n    We're just reporting a single data format here. I think technically PulseAudio might support\n    all formats, but I don't trust that PulseAudio will do *anything* right, so I'm just going to\n    report the \"native\" device format.\n    */\n    pData->pDeviceInfo->nativeDataFormats[0].format     = ma_format_from_pulse(pInfo->sample_spec.format);\n    pData->pDeviceInfo->nativeDataFormats[0].channels   = pInfo->sample_spec.channels;\n    pData->pDeviceInfo->nativeDataFormats[0].sampleRate = pInfo->sample_spec.rate;\n    pData->pDeviceInfo->nativeDataFormats[0].flags      = 0;\n    pData->pDeviceInfo->nativeDataFormatCount = 1;\n\n    if (pData->defaultDeviceIndex == pInfo->index) {\n        pData->pDeviceInfo->isDefault = MA_TRUE;\n    }\n\n    (void)pPulseContext; /* Unused. */\n}\n\nstatic void ma_context_get_device_info_source_callback__pulse(ma_pa_context* pPulseContext, const ma_pa_source_info* pInfo, int endOfList, void* pUserData)\n{\n    ma_context_get_device_info_callback_data__pulse* pData = (ma_context_get_device_info_callback_data__pulse*)pUserData;\n\n    if (endOfList > 0) {\n        return;\n    }\n\n    MA_ASSERT(pData != NULL);\n    pData->foundDevice = MA_TRUE;\n\n    if (pInfo->name != NULL) {\n        ma_strncpy_s(pData->pDeviceInfo->id.pulse, sizeof(pData->pDeviceInfo->id.pulse), pInfo->name, (size_t)-1);\n    }\n\n    if (pInfo->description != NULL) {\n        ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), pInfo->description, (size_t)-1);\n    }\n\n    /*\n    We're just reporting a single data format here. I think technically PulseAudio might support\n    all formats, but I don't trust that PulseAudio will do *anything* right, so I'm just going to\n    report the \"native\" device format.\n    */\n    pData->pDeviceInfo->nativeDataFormats[0].format     = ma_format_from_pulse(pInfo->sample_spec.format);\n    pData->pDeviceInfo->nativeDataFormats[0].channels   = pInfo->sample_spec.channels;\n    pData->pDeviceInfo->nativeDataFormats[0].sampleRate = pInfo->sample_spec.rate;\n    pData->pDeviceInfo->nativeDataFormats[0].flags      = 0;\n    pData->pDeviceInfo->nativeDataFormatCount = 1;\n\n    if (pData->defaultDeviceIndex == pInfo->index) {\n        pData->pDeviceInfo->isDefault = MA_TRUE;\n    }\n\n    (void)pPulseContext; /* Unused. */\n}\n\nstatic ma_result ma_context_get_device_info__pulse(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    ma_result result = MA_SUCCESS;\n    ma_context_get_device_info_callback_data__pulse callbackData;\n    ma_pa_operation* pOP = NULL;\n    const char* pDeviceName = NULL;\n\n    MA_ASSERT(pContext != NULL);\n\n    callbackData.pDeviceInfo = pDeviceInfo;\n    callbackData.foundDevice = MA_FALSE;\n\n    if (pDeviceID != NULL) {\n        pDeviceName = pDeviceID->pulse;\n    } else {\n        pDeviceName = NULL;\n    }\n\n    result = ma_context_get_default_device_index__pulse(pContext, deviceType, &callbackData.defaultDeviceIndex);\n\n    if (deviceType == ma_device_type_playback) {\n        pOP = ((ma_pa_context_get_sink_info_by_name_proc)pContext->pulse.pa_context_get_sink_info_by_name)((ma_pa_context*)(pContext->pulse.pPulseContext), pDeviceName, ma_context_get_device_info_sink_callback__pulse, &callbackData);\n    } else {\n        pOP = ((ma_pa_context_get_source_info_by_name_proc)pContext->pulse.pa_context_get_source_info_by_name)((ma_pa_context*)(pContext->pulse.pPulseContext), pDeviceName, ma_context_get_device_info_source_callback__pulse, &callbackData);\n    }\n\n    if (pOP != NULL) {\n        ma_wait_for_operation_and_unref__pulse(pContext, pContext->pulse.pMainLoop, pOP);\n    } else {\n        result = MA_ERROR;\n        goto done;\n    }\n\n    if (!callbackData.foundDevice) {\n        result = MA_NO_DEVICE;\n        goto done;\n    }\n\ndone:\n    return result;\n}\n\nstatic ma_result ma_device_uninit__pulse(ma_device* pDevice)\n{\n    ma_context* pContext;\n\n    MA_ASSERT(pDevice != NULL);\n\n    pContext = pDevice->pContext;\n    MA_ASSERT(pContext != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        ((ma_pa_stream_disconnect_proc)pContext->pulse.pa_stream_disconnect)((ma_pa_stream*)pDevice->pulse.pStreamCapture);\n        ((ma_pa_stream_unref_proc)pContext->pulse.pa_stream_unref)((ma_pa_stream*)pDevice->pulse.pStreamCapture);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ((ma_pa_stream_disconnect_proc)pContext->pulse.pa_stream_disconnect)((ma_pa_stream*)pDevice->pulse.pStreamPlayback);\n        ((ma_pa_stream_unref_proc)pContext->pulse.pa_stream_unref)((ma_pa_stream*)pDevice->pulse.pStreamPlayback);\n    }\n\n    if (pDevice->type == ma_device_type_duplex) {\n        ma_duplex_rb_uninit(&pDevice->duplexRB);\n    }\n\n    ((ma_pa_context_disconnect_proc)pContext->pulse.pa_context_disconnect)((ma_pa_context*)pDevice->pulse.pPulseContext);\n    ((ma_pa_context_unref_proc)pContext->pulse.pa_context_unref)((ma_pa_context*)pDevice->pulse.pPulseContext);\n    ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)pDevice->pulse.pMainLoop);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_pa_buffer_attr ma_device__pa_buffer_attr_new(ma_uint32 periodSizeInFrames, ma_uint32 periods, const ma_pa_sample_spec* ss)\n{\n    ma_pa_buffer_attr attr;\n    attr.maxlength = periodSizeInFrames * periods * ma_get_bytes_per_frame(ma_format_from_pulse(ss->format), ss->channels);\n    attr.tlength   = attr.maxlength / periods;\n    attr.prebuf    = (ma_uint32)-1;\n    attr.minreq    = (ma_uint32)-1;\n    attr.fragsize  = attr.maxlength / periods;\n\n    return attr;\n}\n\nstatic ma_pa_stream* ma_device__pa_stream_new__pulse(ma_device* pDevice, const char* pStreamName, const ma_pa_sample_spec* ss, const ma_pa_channel_map* cmap)\n{\n    static int g_StreamCounter = 0;\n    char actualStreamName[256];\n\n    if (pStreamName != NULL) {\n        ma_strncpy_s(actualStreamName, sizeof(actualStreamName), pStreamName, (size_t)-1);\n    } else {\n        ma_strcpy_s(actualStreamName, sizeof(actualStreamName), \"miniaudio:\");\n        ma_itoa_s(g_StreamCounter, actualStreamName + 8, sizeof(actualStreamName)-8, 10);  /* 8 = strlen(\"miniaudio:\") */\n    }\n    g_StreamCounter += 1;\n\n    return ((ma_pa_stream_new_proc)pDevice->pContext->pulse.pa_stream_new)((ma_pa_context*)pDevice->pulse.pPulseContext, actualStreamName, ss, cmap);\n}\n\n\nstatic void ma_device_on_read__pulse(ma_pa_stream* pStream, size_t byteCount, void* pUserData)\n{\n    ma_device* pDevice = (ma_device*)pUserData;\n    ma_uint32 bpf;\n    ma_uint32 deviceState;\n    ma_uint64 frameCount;\n    ma_uint64 framesProcessed;\n\n    MA_ASSERT(pDevice != NULL);\n\n    /*\n    Don't do anything if the device isn't initialized yet. Yes, this can happen because PulseAudio\n    can fire this callback before the stream has even started. Ridiculous.\n    */\n    deviceState = ma_device_get_state(pDevice);\n    if (deviceState != ma_device_state_starting && deviceState != ma_device_state_started) {\n        return;\n    }\n\n    bpf = ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels);\n    MA_ASSERT(bpf > 0);\n\n    frameCount = byteCount / bpf;\n    framesProcessed = 0;\n\n    while (ma_device_get_state(pDevice) == ma_device_state_started && framesProcessed < frameCount) {\n        const void* pMappedPCMFrames;\n        size_t bytesMapped;\n        ma_uint64 framesMapped;\n\n        int pulseResult = ((ma_pa_stream_peek_proc)pDevice->pContext->pulse.pa_stream_peek)(pStream, &pMappedPCMFrames, &bytesMapped);\n        if (pulseResult < 0) {\n            break; /* Failed to map. Abort. */\n        }\n\n        framesMapped = bytesMapped / bpf;\n        if (framesMapped > 0) {\n            if (pMappedPCMFrames != NULL) {\n                ma_device_handle_backend_data_callback(pDevice, NULL, pMappedPCMFrames, framesMapped);\n            } else {\n                /* It's a hole. */\n                ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[PulseAudio] ma_device_on_read__pulse: Hole.\\n\");\n            }\n\n            pulseResult = ((ma_pa_stream_drop_proc)pDevice->pContext->pulse.pa_stream_drop)(pStream);\n            if (pulseResult < 0) {\n                break;  /* Failed to drop the buffer. */\n            }\n\n            framesProcessed += framesMapped;\n\n        } else {\n            /* Nothing was mapped. Just abort. */\n            break;\n        }\n    }\n}\n\nstatic ma_result ma_device_write_to_stream__pulse(ma_device* pDevice, ma_pa_stream* pStream, ma_uint64* pFramesProcessed)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint64 framesProcessed = 0;\n    size_t bytesMapped;\n    ma_uint32 bpf;\n    ma_uint32 deviceState;\n\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(pStream != NULL);\n\n    bpf = ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels);\n    MA_ASSERT(bpf > 0);\n\n    deviceState = ma_device_get_state(pDevice);\n\n    bytesMapped = ((ma_pa_stream_writable_size_proc)pDevice->pContext->pulse.pa_stream_writable_size)(pStream);\n    if (bytesMapped != (size_t)-1) {\n        if (bytesMapped > 0) {\n            ma_uint64 framesMapped;\n            void* pMappedPCMFrames;\n            int pulseResult = ((ma_pa_stream_begin_write_proc)pDevice->pContext->pulse.pa_stream_begin_write)(pStream, &pMappedPCMFrames, &bytesMapped);\n            if (pulseResult < 0) {\n                result = ma_result_from_pulse(pulseResult);\n                goto done;\n            }\n\n            framesMapped = bytesMapped / bpf;\n\n            if (deviceState == ma_device_state_started || deviceState == ma_device_state_starting) {  /* Check for starting state just in case this is being used to do the initial fill. */\n                ma_device_handle_backend_data_callback(pDevice, pMappedPCMFrames, NULL, framesMapped);\n            } else {\n                /* Device is not started. Write silence. */\n                ma_silence_pcm_frames(pMappedPCMFrames, framesMapped, pDevice->playback.format, pDevice->playback.channels);\n            }\n\n            pulseResult = ((ma_pa_stream_write_proc)pDevice->pContext->pulse.pa_stream_write)(pStream, pMappedPCMFrames, bytesMapped, NULL, 0, MA_PA_SEEK_RELATIVE);\n            if (pulseResult < 0) {\n                result = ma_result_from_pulse(pulseResult);\n                goto done;  /* Failed to write data to stream. */\n            }\n\n            framesProcessed += framesMapped;\n        } else {\n            result = MA_SUCCESS;  /* No data available for writing. */\n            goto done;\n        }\n    } else {\n        result = MA_ERROR;  /* Failed to retrieve the writable size. Abort. */\n        goto done;\n    }\n\ndone:\n    if (pFramesProcessed != NULL) {\n        *pFramesProcessed = framesProcessed;\n    }\n\n    return result;\n}\n\nstatic void ma_device_on_write__pulse(ma_pa_stream* pStream, size_t byteCount, void* pUserData)\n{\n    ma_device* pDevice = (ma_device*)pUserData;\n    ma_uint32 bpf;\n    ma_uint64 frameCount;\n    ma_uint64 framesProcessed;\n    ma_uint32 deviceState;\n    ma_result result;\n\n    MA_ASSERT(pDevice != NULL);\n\n    /*\n    Don't do anything if the device isn't initialized yet. Yes, this can happen because PulseAudio\n    can fire this callback before the stream has even started. Ridiculous.\n    */\n    deviceState = ma_device_get_state(pDevice);\n    if (deviceState != ma_device_state_starting && deviceState != ma_device_state_started) {\n        return;\n    }\n\n    bpf = ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels);\n    MA_ASSERT(bpf > 0);\n\n    frameCount = byteCount / bpf;\n    framesProcessed = 0;\n\n    while (framesProcessed < frameCount) {\n        ma_uint64 framesProcessedThisIteration;\n\n        /* Don't keep trying to process frames if the device isn't started. */\n        deviceState = ma_device_get_state(pDevice);\n        if (deviceState != ma_device_state_starting && deviceState != ma_device_state_started) {\n            break;\n        }\n\n        result = ma_device_write_to_stream__pulse(pDevice, pStream, &framesProcessedThisIteration);\n        if (result != MA_SUCCESS) {\n            break;\n        }\n\n        framesProcessed += framesProcessedThisIteration;\n    }\n}\n\nstatic void ma_device_on_suspended__pulse(ma_pa_stream* pStream, void* pUserData)\n{\n    ma_device* pDevice = (ma_device*)pUserData;\n    int suspended;\n\n    (void)pStream;\n\n    suspended = ((ma_pa_stream_is_suspended_proc)pDevice->pContext->pulse.pa_stream_is_suspended)(pStream);\n    ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[Pulse] Device suspended state changed. pa_stream_is_suspended() returned %d.\\n\", suspended);\n\n    if (suspended < 0) {\n        return;\n    }\n\n    if (suspended == 1) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[Pulse] Device suspended state changed. Suspended.\\n\");\n        ma_device__on_notification_stopped(pDevice);\n    } else {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"[Pulse] Device suspended state changed. Resumed.\\n\");\n        ma_device__on_notification_started(pDevice);\n    }\n}\n\nstatic void ma_device_on_rerouted__pulse(ma_pa_stream* pStream, void* pUserData)\n{\n    ma_device* pDevice = (ma_device*)pUserData;\n\n    (void)pStream;\n    (void)pUserData;\n\n    ma_device__on_notification_rerouted(pDevice);\n}\n\nstatic ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__pulse(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile)\n{\n    /*\n    There have been reports from users where buffers of < ~20ms result glitches when running through\n    PipeWire. To work around this we're going to have to use a different default buffer size.\n    */\n    const ma_uint32 defaultPeriodSizeInMilliseconds_LowLatency   = 25;\n    const ma_uint32 defaultPeriodSizeInMilliseconds_Conservative = MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE;\n\n    MA_ASSERT(nativeSampleRate != 0);\n\n    if (pDescriptor->periodSizeInFrames == 0) {\n        if (pDescriptor->periodSizeInMilliseconds == 0) {\n            if (performanceProfile == ma_performance_profile_low_latency) {\n                return ma_calculate_buffer_size_in_frames_from_milliseconds(defaultPeriodSizeInMilliseconds_LowLatency, nativeSampleRate);\n            } else {\n                return ma_calculate_buffer_size_in_frames_from_milliseconds(defaultPeriodSizeInMilliseconds_Conservative, nativeSampleRate);\n            }\n        } else {\n            return ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptor->periodSizeInMilliseconds, nativeSampleRate);\n        }\n    } else {\n        return pDescriptor->periodSizeInFrames;\n    }\n}\n\nstatic ma_result ma_device_init__pulse(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n    /*\n    Notes for PulseAudio:\n\n      - When both the period size in frames and milliseconds are 0, we default to miniaudio's\n        default buffer sizes rather than leaving it up to PulseAudio because I don't trust\n        PulseAudio to give us any kind of reasonable latency by default.\n\n      - Do not ever, *ever* forget to use MA_PA_STREAM_ADJUST_LATENCY. If you don't specify this\n        flag, capture mode will just not work properly until you open another PulseAudio app.\n    */\n\n    ma_result result = MA_SUCCESS;\n    int error = 0;\n    const char* devPlayback = NULL;\n    const char* devCapture  = NULL;\n    ma_format format = ma_format_unknown;\n    ma_uint32 channels = 0;\n    ma_uint32 sampleRate = 0;\n    ma_pa_sink_info sinkInfo;\n    ma_pa_source_info sourceInfo;\n    ma_pa_sample_spec ss;\n    ma_pa_channel_map cmap;\n    ma_pa_buffer_attr attr;\n    const ma_pa_sample_spec* pActualSS   = NULL;\n    const ma_pa_buffer_attr* pActualAttr = NULL;\n    ma_uint32 iChannel;\n    ma_pa_stream_flags_t streamFlags;\n\n    MA_ASSERT(pDevice != NULL);\n    MA_ZERO_OBJECT(&pDevice->pulse);\n\n    if (pConfig->deviceType == ma_device_type_loopback) {\n        return MA_DEVICE_TYPE_NOT_SUPPORTED;\n    }\n\n    /* No exclusive mode with the PulseAudio backend. */\n    if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pConfig->playback.shareMode == ma_share_mode_exclusive) ||\n        ((pConfig->deviceType == ma_device_type_capture  || pConfig->deviceType == ma_device_type_duplex) && pConfig->capture.shareMode  == ma_share_mode_exclusive)) {\n        return MA_SHARE_MODE_NOT_SUPPORTED;\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        if (pDescriptorPlayback->pDeviceID != NULL) {\n            devPlayback = pDescriptorPlayback->pDeviceID->pulse;\n        }\n\n        format     = pDescriptorPlayback->format;\n        channels   = pDescriptorPlayback->channels;\n        sampleRate = pDescriptorPlayback->sampleRate;\n    }\n\n    if (pConfig->deviceType == ma_device_type_capture  || pConfig->deviceType == ma_device_type_duplex) {\n        if (pDescriptorCapture->pDeviceID != NULL) {\n            devCapture = pDescriptorCapture->pDeviceID->pulse;\n        }\n\n        format     = pDescriptorCapture->format;\n        channels   = pDescriptorCapture->channels;\n        sampleRate = pDescriptorCapture->sampleRate;\n    }\n\n\n\n    result = ma_init_pa_mainloop_and_pa_context__pulse(pDevice->pContext, pDevice->pContext->pulse.pApplicationName, pDevice->pContext->pulse.pServerName, MA_FALSE, &pDevice->pulse.pMainLoop, &pDevice->pulse.pPulseContext);\n    if (result != MA_SUCCESS) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Failed to initialize PA mainloop and context for device.\\n\");\n        return result;\n    }\n\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        result = ma_context_get_source_info__pulse(pDevice->pContext, devCapture, &sourceInfo);\n        if (result != MA_SUCCESS) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Failed to retrieve source info for capture device.\");\n            goto on_error0;\n        }\n\n        ss   = sourceInfo.sample_spec;\n        cmap = sourceInfo.channel_map;\n\n        /* Use the requested channel count if we have one. */\n        if (pDescriptorCapture->channels != 0) {\n            ss.channels = pDescriptorCapture->channels;\n        }\n\n        /* Use a default channel map. */\n        ((ma_pa_channel_map_init_extend_proc)pDevice->pContext->pulse.pa_channel_map_init_extend)(&cmap, ss.channels, MA_PA_CHANNEL_MAP_DEFAULT);\n\n        /* Use the requested sample rate if one was specified. */\n        if (pDescriptorCapture->sampleRate != 0) {\n            ss.rate = pDescriptorCapture->sampleRate;\n        }\n        streamFlags = MA_PA_STREAM_START_CORKED | MA_PA_STREAM_ADJUST_LATENCY;\n\n        if (ma_format_from_pulse(ss.format) == ma_format_unknown) {\n            if (ma_is_little_endian()) {\n                ss.format = MA_PA_SAMPLE_FLOAT32LE;\n            } else {\n                ss.format = MA_PA_SAMPLE_FLOAT32BE;\n            }\n            streamFlags |= MA_PA_STREAM_FIX_FORMAT;\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] sample_spec.format not supported by miniaudio. Defaulting to PA_SAMPLE_FLOAT32.\\n\");\n        }\n        if (ss.rate == 0) {\n            ss.rate = MA_DEFAULT_SAMPLE_RATE;\n            streamFlags |= MA_PA_STREAM_FIX_RATE;\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] sample_spec.rate = 0. Defaulting to %d.\\n\", ss.rate);\n        }\n        if (ss.channels == 0) {\n            ss.channels = MA_DEFAULT_CHANNELS;\n            streamFlags |= MA_PA_STREAM_FIX_CHANNELS;\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] sample_spec.channels = 0. Defaulting to %d.\\n\", ss.channels);\n        }\n\n        /* We now have enough information to calculate our actual period size in frames. */\n        pDescriptorCapture->periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__pulse(pDescriptorCapture, ss.rate, pConfig->performanceProfile);\n\n        attr = ma_device__pa_buffer_attr_new(pDescriptorCapture->periodSizeInFrames, pDescriptorCapture->periodCount, &ss);\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] Capture attr: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d, fragsize=%d; periodSizeInFrames=%d\\n\", attr.maxlength, attr.tlength, attr.prebuf, attr.minreq, attr.fragsize, pDescriptorCapture->periodSizeInFrames);\n\n        pDevice->pulse.pStreamCapture = ma_device__pa_stream_new__pulse(pDevice, pConfig->pulse.pStreamNameCapture, &ss, &cmap);\n        if (pDevice->pulse.pStreamCapture == NULL) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Failed to create PulseAudio capture stream.\\n\");\n            result = MA_ERROR;\n            goto on_error0;\n        }\n\n\n        /* The callback needs to be set before connecting the stream. */\n        ((ma_pa_stream_set_read_callback_proc)pDevice->pContext->pulse.pa_stream_set_read_callback)((ma_pa_stream*)pDevice->pulse.pStreamCapture, ma_device_on_read__pulse, pDevice);\n\n        /* State callback for checking when the device has been corked. */\n        ((ma_pa_stream_set_suspended_callback_proc)pDevice->pContext->pulse.pa_stream_set_suspended_callback)((ma_pa_stream*)pDevice->pulse.pStreamCapture, ma_device_on_suspended__pulse, pDevice);\n\n        /* Rerouting notification. */\n        ((ma_pa_stream_set_moved_callback_proc)pDevice->pContext->pulse.pa_stream_set_moved_callback)((ma_pa_stream*)pDevice->pulse.pStreamCapture, ma_device_on_rerouted__pulse, pDevice);\n\n\n        /* Connect after we've got all of our internal state set up. */\n        if (devCapture != NULL) {\n            streamFlags |= MA_PA_STREAM_DONT_MOVE;\n        }\n\n        error = ((ma_pa_stream_connect_record_proc)pDevice->pContext->pulse.pa_stream_connect_record)((ma_pa_stream*)pDevice->pulse.pStreamCapture, devCapture, &attr, streamFlags);\n        if (error != MA_PA_OK) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Failed to connect PulseAudio capture stream.\");\n            result = ma_result_from_pulse(error);\n            goto on_error1;\n        }\n\n        result = ma_wait_for_pa_stream_to_connect__pulse(pDevice->pContext, pDevice->pulse.pMainLoop, (ma_pa_stream*)pDevice->pulse.pStreamCapture);\n        if (result != MA_SUCCESS) {\n            goto on_error2;\n        }\n\n\n        /* Internal format. */\n        pActualSS = ((ma_pa_stream_get_sample_spec_proc)pDevice->pContext->pulse.pa_stream_get_sample_spec)((ma_pa_stream*)pDevice->pulse.pStreamCapture);\n        if (pActualSS != NULL) {\n            ss = *pActualSS;\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] Capture sample spec: format=%s, channels=%d, rate=%d\\n\", ma_get_format_name(ma_format_from_pulse(ss.format)), ss.channels, ss.rate);\n        } else {\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] Failed to retrieve capture sample spec.\\n\");\n        }\n\n        pDescriptorCapture->format     = ma_format_from_pulse(ss.format);\n        pDescriptorCapture->channels   = ss.channels;\n        pDescriptorCapture->sampleRate = ss.rate;\n\n        if (pDescriptorCapture->format == ma_format_unknown || pDescriptorCapture->channels == 0 || pDescriptorCapture->sampleRate == 0) {\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Capture sample spec is invalid. Device unusable by miniaudio. format=%s, channels=%d, sampleRate=%d.\\n\", ma_get_format_name(pDescriptorCapture->format), pDescriptorCapture->channels, pDescriptorCapture->sampleRate);\n            result = MA_ERROR;\n            goto on_error4;\n        }\n\n        /* Internal channel map. */\n\n        /*\n        Bug in PipeWire. There have been reports that PipeWire is returning AUX channels when reporting\n        the channel map. To somewhat workaround this, I'm hacking in a hard coded channel map for mono\n        and stereo. In this case it should be safe to assume mono = MONO and stereo = LEFT/RIGHT. For\n        all other channel counts we need to just put up with whatever PipeWire reports and hope it gets\n        fixed sooner than later. I might remove this hack later.\n        */\n        if (pDescriptorCapture->channels > 2) {\n            for (iChannel = 0; iChannel < pDescriptorCapture->channels; ++iChannel) {\n                pDescriptorCapture->channelMap[iChannel] = ma_channel_position_from_pulse(cmap.map[iChannel]);\n            }\n        } else {\n            /* Hack for mono and stereo. */\n            if (pDescriptorCapture->channels == 1) {\n                pDescriptorCapture->channelMap[0] = MA_CHANNEL_MONO;\n            } else if (pDescriptorCapture->channels == 2) {\n                pDescriptorCapture->channelMap[0] = MA_CHANNEL_FRONT_LEFT;\n                pDescriptorCapture->channelMap[1] = MA_CHANNEL_FRONT_RIGHT;\n            } else {\n                MA_ASSERT(MA_FALSE);    /* Should never hit this. */\n            }\n        }\n\n\n        /* Buffer. */\n        pActualAttr = ((ma_pa_stream_get_buffer_attr_proc)pDevice->pContext->pulse.pa_stream_get_buffer_attr)((ma_pa_stream*)pDevice->pulse.pStreamCapture);\n        if (pActualAttr != NULL) {\n            attr = *pActualAttr;\n        }\n\n        if (attr.fragsize > 0) {\n            pDescriptorCapture->periodCount = ma_max(attr.maxlength / attr.fragsize, 1);\n        } else {\n            pDescriptorCapture->periodCount = 1;\n        }\n\n        pDescriptorCapture->periodSizeInFrames = attr.maxlength / ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels) / pDescriptorCapture->periodCount;\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] Capture actual attr: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d, fragsize=%d; periodSizeInFrames=%d\\n\", attr.maxlength, attr.tlength, attr.prebuf, attr.minreq, attr.fragsize, pDescriptorCapture->periodSizeInFrames);\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        result = ma_context_get_sink_info__pulse(pDevice->pContext, devPlayback, &sinkInfo);\n        if (result != MA_SUCCESS) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Failed to retrieve sink info for playback device.\\n\");\n            goto on_error2;\n        }\n\n        ss   = sinkInfo.sample_spec;\n        cmap = sinkInfo.channel_map;\n\n        /* Use the requested channel count if we have one. */\n        if (pDescriptorPlayback->channels != 0) {\n            ss.channels = pDescriptorPlayback->channels;\n        }\n\n        /* Use a default channel map. */\n        ((ma_pa_channel_map_init_extend_proc)pDevice->pContext->pulse.pa_channel_map_init_extend)(&cmap, ss.channels, MA_PA_CHANNEL_MAP_DEFAULT);\n\n\n        /* Use the requested sample rate if one was specified. */\n        if (pDescriptorPlayback->sampleRate != 0) {\n            ss.rate = pDescriptorPlayback->sampleRate;\n        }\n\n        streamFlags = MA_PA_STREAM_START_CORKED | MA_PA_STREAM_ADJUST_LATENCY;\n        if (ma_format_from_pulse(ss.format) == ma_format_unknown) {\n            if (ma_is_little_endian()) {\n                ss.format = MA_PA_SAMPLE_FLOAT32LE;\n            } else {\n                ss.format = MA_PA_SAMPLE_FLOAT32BE;\n            }\n            streamFlags |= MA_PA_STREAM_FIX_FORMAT;\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] sample_spec.format not supported by miniaudio. Defaulting to PA_SAMPLE_FLOAT32.\\n\");\n        }\n        if (ss.rate == 0) {\n            ss.rate = MA_DEFAULT_SAMPLE_RATE;\n            streamFlags |= MA_PA_STREAM_FIX_RATE;\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] sample_spec.rate = 0. Defaulting to %d.\\n\", ss.rate);\n        }\n        if (ss.channels == 0) {\n            ss.channels = MA_DEFAULT_CHANNELS;\n            streamFlags |= MA_PA_STREAM_FIX_CHANNELS;\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] sample_spec.channels = 0. Defaulting to %d.\\n\", ss.channels);\n        }\n\n        /* We now have enough information to calculate the actual buffer size in frames. */\n        pDescriptorPlayback->periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__pulse(pDescriptorPlayback, ss.rate, pConfig->performanceProfile);\n\n        attr = ma_device__pa_buffer_attr_new(pDescriptorPlayback->periodSizeInFrames, pDescriptorPlayback->periodCount, &ss);\n\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] Playback attr: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d, fragsize=%d; periodSizeInFrames=%d\\n\", attr.maxlength, attr.tlength, attr.prebuf, attr.minreq, attr.fragsize, pDescriptorPlayback->periodSizeInFrames);\n\n        pDevice->pulse.pStreamPlayback = ma_device__pa_stream_new__pulse(pDevice, pConfig->pulse.pStreamNamePlayback, &ss, &cmap);\n        if (pDevice->pulse.pStreamPlayback == NULL) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Failed to create PulseAudio playback stream.\\n\");\n            result = MA_ERROR;\n            goto on_error2;\n        }\n\n\n        /*\n        Note that this callback will be fired as soon as the stream is connected, even though it's started as corked. The callback needs to handle a\n        device state of ma_device_state_uninitialized.\n        */\n        ((ma_pa_stream_set_write_callback_proc)pDevice->pContext->pulse.pa_stream_set_write_callback)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, ma_device_on_write__pulse, pDevice);\n\n        /* State callback for checking when the device has been corked. */\n        ((ma_pa_stream_set_suspended_callback_proc)pDevice->pContext->pulse.pa_stream_set_suspended_callback)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, ma_device_on_suspended__pulse, pDevice);\n\n        /* Rerouting notification. */\n        ((ma_pa_stream_set_moved_callback_proc)pDevice->pContext->pulse.pa_stream_set_moved_callback)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, ma_device_on_rerouted__pulse, pDevice);\n\n\n        /* Connect after we've got all of our internal state set up. */\n        if (devPlayback != NULL) {\n            streamFlags |= MA_PA_STREAM_DONT_MOVE;\n        }\n\n        error = ((ma_pa_stream_connect_playback_proc)pDevice->pContext->pulse.pa_stream_connect_playback)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, devPlayback, &attr, streamFlags, NULL, NULL);\n        if (error != MA_PA_OK) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Failed to connect PulseAudio playback stream.\");\n            result = ma_result_from_pulse(error);\n            goto on_error3;\n        }\n\n        result = ma_wait_for_pa_stream_to_connect__pulse(pDevice->pContext, pDevice->pulse.pMainLoop, (ma_pa_stream*)pDevice->pulse.pStreamPlayback);\n        if (result != MA_SUCCESS) {\n            goto on_error3;\n        }\n\n\n        /* Internal format. */\n        pActualSS = ((ma_pa_stream_get_sample_spec_proc)pDevice->pContext->pulse.pa_stream_get_sample_spec)((ma_pa_stream*)pDevice->pulse.pStreamPlayback);\n        if (pActualSS != NULL) {\n            ss = *pActualSS;\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] Playback sample spec: format=%s, channels=%d, rate=%d\\n\", ma_get_format_name(ma_format_from_pulse(ss.format)), ss.channels, ss.rate);\n        } else {\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] Failed to retrieve playback sample spec.\\n\");\n        }\n\n        pDescriptorPlayback->format     = ma_format_from_pulse(ss.format);\n        pDescriptorPlayback->channels   = ss.channels;\n        pDescriptorPlayback->sampleRate = ss.rate;\n\n        if (pDescriptorPlayback->format == ma_format_unknown || pDescriptorPlayback->channels == 0 || pDescriptorPlayback->sampleRate == 0) {\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Playback sample spec is invalid. Device unusable by miniaudio. format=%s, channels=%d, sampleRate=%d.\\n\", ma_get_format_name(pDescriptorPlayback->format), pDescriptorPlayback->channels, pDescriptorPlayback->sampleRate);\n            result = MA_ERROR;\n            goto on_error4;\n        }\n\n        /* Internal channel map. */\n\n        /*\n        Bug in PipeWire. There have been reports that PipeWire is returning AUX channels when reporting\n        the channel map. To somewhat workaround this, I'm hacking in a hard coded channel map for mono\n        and stereo. In this case it should be safe to assume mono = MONO and stereo = LEFT/RIGHT. For\n        all other channel counts we need to just put up with whatever PipeWire reports and hope it gets\n        fixed sooner than later. I might remove this hack later.\n        */\n        if (pDescriptorPlayback->channels > 2) {\n            for (iChannel = 0; iChannel < pDescriptorPlayback->channels; ++iChannel) {\n                pDescriptorPlayback->channelMap[iChannel] = ma_channel_position_from_pulse(cmap.map[iChannel]);\n            }\n        } else {\n            /* Hack for mono and stereo. */\n            if (pDescriptorPlayback->channels == 1) {\n                pDescriptorPlayback->channelMap[0] = MA_CHANNEL_MONO;\n            } else if (pDescriptorPlayback->channels == 2) {\n                pDescriptorPlayback->channelMap[0] = MA_CHANNEL_FRONT_LEFT;\n                pDescriptorPlayback->channelMap[1] = MA_CHANNEL_FRONT_RIGHT;\n            } else {\n                MA_ASSERT(MA_FALSE);    /* Should never hit this. */\n            }\n        }\n\n\n        /* Buffer. */\n        pActualAttr = ((ma_pa_stream_get_buffer_attr_proc)pDevice->pContext->pulse.pa_stream_get_buffer_attr)((ma_pa_stream*)pDevice->pulse.pStreamPlayback);\n        if (pActualAttr != NULL) {\n            attr = *pActualAttr;\n        }\n\n        if (attr.tlength > 0) {\n            pDescriptorPlayback->periodCount = ma_max(attr.maxlength / attr.tlength, 1);\n        } else {\n            pDescriptorPlayback->periodCount = 1;\n        }\n\n        pDescriptorPlayback->periodSizeInFrames = attr.maxlength / ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels) / pDescriptorPlayback->periodCount;\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[PulseAudio] Playback actual attr: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d, fragsize=%d; internalPeriodSizeInFrames=%d\\n\", attr.maxlength, attr.tlength, attr.prebuf, attr.minreq, attr.fragsize, pDescriptorPlayback->periodSizeInFrames);\n    }\n\n\n    /*\n    We need a ring buffer for handling duplex mode. We can use the main duplex ring buffer in the main\n    part of the ma_device struct. We cannot, however, depend on ma_device_init() initializing this for\n    us later on because that will only do it if it's a fully asynchronous backend - i.e. the\n    onDeviceDataLoop callback is NULL, which is not the case for PulseAudio.\n    */\n    if (pConfig->deviceType == ma_device_type_duplex) {\n        ma_format rbFormat     = (format != ma_format_unknown) ? format     : pDescriptorCapture->format;\n        ma_uint32 rbChannels   = (channels   > 0)              ? channels   : pDescriptorCapture->channels;\n        ma_uint32 rbSampleRate = (sampleRate > 0)              ? sampleRate : pDescriptorCapture->sampleRate;\n\n        result = ma_duplex_rb_init(rbFormat, rbChannels, rbSampleRate, pDescriptorCapture->sampleRate, pDescriptorCapture->periodSizeInFrames, &pDevice->pContext->allocationCallbacks, &pDevice->duplexRB);\n        if (result != MA_SUCCESS) {\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Failed to initialize ring buffer. %s.\\n\", ma_result_description(result));\n            goto on_error4;\n        }\n    }\n\n    return MA_SUCCESS;\n\n\non_error4:\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        ((ma_pa_stream_disconnect_proc)pDevice->pContext->pulse.pa_stream_disconnect)((ma_pa_stream*)pDevice->pulse.pStreamPlayback);\n    }\non_error3:\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        ((ma_pa_stream_unref_proc)pDevice->pContext->pulse.pa_stream_unref)((ma_pa_stream*)pDevice->pulse.pStreamPlayback);\n    }\non_error2:\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        ((ma_pa_stream_disconnect_proc)pDevice->pContext->pulse.pa_stream_disconnect)((ma_pa_stream*)pDevice->pulse.pStreamCapture);\n    }\non_error1:\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        ((ma_pa_stream_unref_proc)pDevice->pContext->pulse.pa_stream_unref)((ma_pa_stream*)pDevice->pulse.pStreamCapture);\n    }\non_error0:\n    return result;\n}\n\n\nstatic void ma_pulse_operation_complete_callback(ma_pa_stream* pStream, int success, void* pUserData)\n{\n    ma_bool32* pIsSuccessful = (ma_bool32*)pUserData;\n    MA_ASSERT(pIsSuccessful != NULL);\n\n    *pIsSuccessful = (ma_bool32)success;\n\n    (void)pStream; /* Unused. */\n}\n\nstatic ma_result ma_device__cork_stream__pulse(ma_device* pDevice, ma_device_type deviceType, int cork)\n{\n    ma_context* pContext = pDevice->pContext;\n    ma_bool32 wasSuccessful;\n    ma_pa_stream* pStream;\n    ma_pa_operation* pOP;\n    ma_result result;\n\n    /* This should not be called with a duplex device type. */\n    if (deviceType == ma_device_type_duplex) {\n        return MA_INVALID_ARGS;\n    }\n\n    wasSuccessful = MA_FALSE;\n\n    pStream = (ma_pa_stream*)((deviceType == ma_device_type_capture) ? pDevice->pulse.pStreamCapture : pDevice->pulse.pStreamPlayback);\n    MA_ASSERT(pStream != NULL);\n\n    pOP = ((ma_pa_stream_cork_proc)pContext->pulse.pa_stream_cork)(pStream, cork, ma_pulse_operation_complete_callback, &wasSuccessful);\n    if (pOP == NULL) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Failed to cork PulseAudio stream.\");\n        return MA_ERROR;\n    }\n\n    result = ma_wait_for_operation_and_unref__pulse(pDevice->pContext, pDevice->pulse.pMainLoop, pOP);\n    if (result != MA_SUCCESS) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[PulseAudio] An error occurred while waiting for the PulseAudio stream to cork.\");\n        return result;\n    }\n\n    if (!wasSuccessful) {\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[PulseAudio] Failed to %s PulseAudio stream.\", (cork) ? \"stop\" : \"start\");\n        return MA_ERROR;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_start__pulse(ma_device* pDevice)\n{\n    ma_result result;\n\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        result = ma_device__cork_stream__pulse(pDevice, ma_device_type_capture, 0);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        /*\n        We need to fill some data before uncorking. Not doing this will result in the write callback\n        never getting fired. We're not going to abort if writing fails because I still want the device\n        to get uncorked.\n        */\n        ma_device_write_to_stream__pulse(pDevice, (ma_pa_stream*)(pDevice->pulse.pStreamPlayback), NULL);   /* No need to check the result here. Always want to fall through an uncork.*/\n\n        result = ma_device__cork_stream__pulse(pDevice, ma_device_type_playback, 0);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop__pulse(ma_device* pDevice)\n{\n    ma_result result;\n\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        result = ma_device__cork_stream__pulse(pDevice, ma_device_type_capture, 1);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        /*\n        Ideally we would drain the device here, but there's been cases where PulseAudio seems to be\n        broken on some systems to the point where no audio processing seems to happen. When this\n        happens, draining never completes and we get stuck here. For now I'm disabling draining of\n        the device so we don't just freeze the application.\n        */\n    #if 0\n        ma_pa_operation* pOP = ((ma_pa_stream_drain_proc)pDevice->pContext->pulse.pa_stream_drain)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, ma_pulse_operation_complete_callback, &wasSuccessful);\n        ma_wait_for_operation_and_unref__pulse(pDevice->pContext, pDevice->pulse.pMainLoop, pOP);\n    #endif\n\n        result = ma_device__cork_stream__pulse(pDevice, ma_device_type_playback, 1);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_data_loop__pulse(ma_device* pDevice)\n{\n    int resultPA;\n\n    MA_ASSERT(pDevice != NULL);\n\n    /* NOTE: Don't start the device here. It'll be done at a higher level. */\n\n    /*\n    All data is handled through callbacks. All we need to do is iterate over the main loop and let\n    the callbacks deal with it.\n    */\n    while (ma_device_get_state(pDevice) == ma_device_state_started) {\n        resultPA = ((ma_pa_mainloop_iterate_proc)pDevice->pContext->pulse.pa_mainloop_iterate)((ma_pa_mainloop*)pDevice->pulse.pMainLoop, 1, NULL);\n        if (resultPA < 0) {\n            break;\n        }\n    }\n\n    /* NOTE: Don't stop the device here. It'll be done at a higher level. */\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_data_loop_wakeup__pulse(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    ((ma_pa_mainloop_wakeup_proc)pDevice->pContext->pulse.pa_mainloop_wakeup)((ma_pa_mainloop*)pDevice->pulse.pMainLoop);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_uninit__pulse(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_pulseaudio);\n\n    ((ma_pa_context_disconnect_proc)pContext->pulse.pa_context_disconnect)((ma_pa_context*)pContext->pulse.pPulseContext);\n    ((ma_pa_context_unref_proc)pContext->pulse.pa_context_unref)((ma_pa_context*)pContext->pulse.pPulseContext);\n    ((ma_pa_mainloop_free_proc)pContext->pulse.pa_mainloop_free)((ma_pa_mainloop*)pContext->pulse.pMainLoop);\n\n    ma_free(pContext->pulse.pServerName, &pContext->allocationCallbacks);\n    ma_free(pContext->pulse.pApplicationName, &pContext->allocationCallbacks);\n\n#ifndef MA_NO_RUNTIME_LINKING\n    ma_dlclose(ma_context_get_log(pContext), pContext->pulse.pulseSO);\n#endif\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init__pulse(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n    ma_result result;\n#ifndef MA_NO_RUNTIME_LINKING\n    const char* libpulseNames[] = {\n        \"libpulse.so\",\n        \"libpulse.so.0\"\n    };\n    size_t i;\n\n    for (i = 0; i < ma_countof(libpulseNames); ++i) {\n        pContext->pulse.pulseSO = ma_dlopen(ma_context_get_log(pContext), libpulseNames[i]);\n        if (pContext->pulse.pulseSO != NULL) {\n            break;\n        }\n    }\n\n    if (pContext->pulse.pulseSO == NULL) {\n        return MA_NO_BACKEND;\n    }\n\n    pContext->pulse.pa_mainloop_new                    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_mainloop_new\");\n    pContext->pulse.pa_mainloop_free                   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_mainloop_free\");\n    pContext->pulse.pa_mainloop_quit                   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_mainloop_quit\");\n    pContext->pulse.pa_mainloop_get_api                = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_mainloop_get_api\");\n    pContext->pulse.pa_mainloop_iterate                = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_mainloop_iterate\");\n    pContext->pulse.pa_mainloop_wakeup                 = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_mainloop_wakeup\");\n    pContext->pulse.pa_threaded_mainloop_new           = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_threaded_mainloop_new\");\n    pContext->pulse.pa_threaded_mainloop_free          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_threaded_mainloop_free\");\n    pContext->pulse.pa_threaded_mainloop_start         = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_threaded_mainloop_start\");\n    pContext->pulse.pa_threaded_mainloop_stop          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_threaded_mainloop_stop\");\n    pContext->pulse.pa_threaded_mainloop_lock          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_threaded_mainloop_lock\");\n    pContext->pulse.pa_threaded_mainloop_unlock        = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_threaded_mainloop_unlock\");\n    pContext->pulse.pa_threaded_mainloop_wait          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_threaded_mainloop_wait\");\n    pContext->pulse.pa_threaded_mainloop_signal        = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_threaded_mainloop_signal\");\n    pContext->pulse.pa_threaded_mainloop_accept        = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_threaded_mainloop_accept\");\n    pContext->pulse.pa_threaded_mainloop_get_retval    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_threaded_mainloop_get_retval\");\n    pContext->pulse.pa_threaded_mainloop_get_api       = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_threaded_mainloop_get_api\");\n    pContext->pulse.pa_threaded_mainloop_in_thread     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_threaded_mainloop_in_thread\");\n    pContext->pulse.pa_threaded_mainloop_set_name      = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_threaded_mainloop_set_name\");\n    pContext->pulse.pa_context_new                     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_context_new\");\n    pContext->pulse.pa_context_unref                   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_context_unref\");\n    pContext->pulse.pa_context_connect                 = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_context_connect\");\n    pContext->pulse.pa_context_disconnect              = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_context_disconnect\");\n    pContext->pulse.pa_context_set_state_callback      = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_context_set_state_callback\");\n    pContext->pulse.pa_context_get_state               = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_context_get_state\");\n    pContext->pulse.pa_context_get_sink_info_list      = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_context_get_sink_info_list\");\n    pContext->pulse.pa_context_get_source_info_list    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_context_get_source_info_list\");\n    pContext->pulse.pa_context_get_sink_info_by_name   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_context_get_sink_info_by_name\");\n    pContext->pulse.pa_context_get_source_info_by_name = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_context_get_source_info_by_name\");\n    pContext->pulse.pa_operation_unref                 = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_operation_unref\");\n    pContext->pulse.pa_operation_get_state             = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_operation_get_state\");\n    pContext->pulse.pa_channel_map_init_extend         = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_channel_map_init_extend\");\n    pContext->pulse.pa_channel_map_valid               = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_channel_map_valid\");\n    pContext->pulse.pa_channel_map_compatible          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_channel_map_compatible\");\n    pContext->pulse.pa_stream_new                      = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_new\");\n    pContext->pulse.pa_stream_unref                    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_unref\");\n    pContext->pulse.pa_stream_connect_playback         = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_connect_playback\");\n    pContext->pulse.pa_stream_connect_record           = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_connect_record\");\n    pContext->pulse.pa_stream_disconnect               = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_disconnect\");\n    pContext->pulse.pa_stream_get_state                = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_get_state\");\n    pContext->pulse.pa_stream_get_sample_spec          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_get_sample_spec\");\n    pContext->pulse.pa_stream_get_channel_map          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_get_channel_map\");\n    pContext->pulse.pa_stream_get_buffer_attr          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_get_buffer_attr\");\n    pContext->pulse.pa_stream_set_buffer_attr          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_set_buffer_attr\");\n    pContext->pulse.pa_stream_get_device_name          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_get_device_name\");\n    pContext->pulse.pa_stream_set_write_callback       = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_set_write_callback\");\n    pContext->pulse.pa_stream_set_read_callback        = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_set_read_callback\");\n    pContext->pulse.pa_stream_set_suspended_callback   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_set_suspended_callback\");\n    pContext->pulse.pa_stream_set_moved_callback       = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_set_moved_callback\");\n    pContext->pulse.pa_stream_is_suspended             = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_is_suspended\");\n    pContext->pulse.pa_stream_flush                    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_flush\");\n    pContext->pulse.pa_stream_drain                    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_drain\");\n    pContext->pulse.pa_stream_is_corked                = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_is_corked\");\n    pContext->pulse.pa_stream_cork                     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_cork\");\n    pContext->pulse.pa_stream_trigger                  = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_trigger\");\n    pContext->pulse.pa_stream_begin_write              = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_begin_write\");\n    pContext->pulse.pa_stream_write                    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_write\");\n    pContext->pulse.pa_stream_peek                     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_peek\");\n    pContext->pulse.pa_stream_drop                     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_drop\");\n    pContext->pulse.pa_stream_writable_size            = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_writable_size\");\n    pContext->pulse.pa_stream_readable_size            = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->pulse.pulseSO, \"pa_stream_readable_size\");\n#else\n    /* This strange assignment system is just for type safety. */\n    ma_pa_mainloop_new_proc                    _pa_mainloop_new                   = pa_mainloop_new;\n    ma_pa_mainloop_free_proc                   _pa_mainloop_free                  = pa_mainloop_free;\n    ma_pa_mainloop_quit_proc                   _pa_mainloop_quit                  = pa_mainloop_quit;\n    ma_pa_mainloop_get_api_proc                _pa_mainloop_get_api               = pa_mainloop_get_api;\n    ma_pa_mainloop_iterate_proc                _pa_mainloop_iterate               = pa_mainloop_iterate;\n    ma_pa_mainloop_wakeup_proc                 _pa_mainloop_wakeup                = pa_mainloop_wakeup;\n    ma_pa_threaded_mainloop_new_proc           _pa_threaded_mainloop_new          = pa_threaded_mainloop_new;\n    ma_pa_threaded_mainloop_free_proc          _pa_threaded_mainloop_free         = pa_threaded_mainloop_free;\n    ma_pa_threaded_mainloop_start_proc         _pa_threaded_mainloop_start        = pa_threaded_mainloop_start;\n    ma_pa_threaded_mainloop_stop_proc          _pa_threaded_mainloop_stop         = pa_threaded_mainloop_stop;\n    ma_pa_threaded_mainloop_lock_proc          _pa_threaded_mainloop_lock         = pa_threaded_mainloop_lock;\n    ma_pa_threaded_mainloop_unlock_proc        _pa_threaded_mainloop_unlock       = pa_threaded_mainloop_unlock;\n    ma_pa_threaded_mainloop_wait_proc          _pa_threaded_mainloop_wait         = pa_threaded_mainloop_wait;\n    ma_pa_threaded_mainloop_signal_proc        _pa_threaded_mainloop_signal       = pa_threaded_mainloop_signal;\n    ma_pa_threaded_mainloop_accept_proc        _pa_threaded_mainloop_accept       = pa_threaded_mainloop_accept;\n    ma_pa_threaded_mainloop_get_retval_proc    _pa_threaded_mainloop_get_retval   = pa_threaded_mainloop_get_retval;\n    ma_pa_threaded_mainloop_get_api_proc       _pa_threaded_mainloop_get_api      = pa_threaded_mainloop_get_api;\n    ma_pa_threaded_mainloop_in_thread_proc     _pa_threaded_mainloop_in_thread    = pa_threaded_mainloop_in_thread;\n    ma_pa_threaded_mainloop_set_name_proc      _pa_threaded_mainloop_set_name     = pa_threaded_mainloop_set_name;\n    ma_pa_context_new_proc                     _pa_context_new                    = pa_context_new;\n    ma_pa_context_unref_proc                   _pa_context_unref                  = pa_context_unref;\n    ma_pa_context_connect_proc                 _pa_context_connect                = pa_context_connect;\n    ma_pa_context_disconnect_proc              _pa_context_disconnect             = pa_context_disconnect;\n    ma_pa_context_set_state_callback_proc      _pa_context_set_state_callback     = pa_context_set_state_callback;\n    ma_pa_context_get_state_proc               _pa_context_get_state              = pa_context_get_state;\n    ma_pa_context_get_sink_info_list_proc      _pa_context_get_sink_info_list     = pa_context_get_sink_info_list;\n    ma_pa_context_get_source_info_list_proc    _pa_context_get_source_info_list   = pa_context_get_source_info_list;\n    ma_pa_context_get_sink_info_by_name_proc   _pa_context_get_sink_info_by_name  = pa_context_get_sink_info_by_name;\n    ma_pa_context_get_source_info_by_name_proc _pa_context_get_source_info_by_name= pa_context_get_source_info_by_name;\n    ma_pa_operation_unref_proc                 _pa_operation_unref                = pa_operation_unref;\n    ma_pa_operation_get_state_proc             _pa_operation_get_state            = pa_operation_get_state;\n    ma_pa_channel_map_init_extend_proc         _pa_channel_map_init_extend        = pa_channel_map_init_extend;\n    ma_pa_channel_map_valid_proc               _pa_channel_map_valid              = pa_channel_map_valid;\n    ma_pa_channel_map_compatible_proc          _pa_channel_map_compatible         = pa_channel_map_compatible;\n    ma_pa_stream_new_proc                      _pa_stream_new                     = pa_stream_new;\n    ma_pa_stream_unref_proc                    _pa_stream_unref                   = pa_stream_unref;\n    ma_pa_stream_connect_playback_proc         _pa_stream_connect_playback        = pa_stream_connect_playback;\n    ma_pa_stream_connect_record_proc           _pa_stream_connect_record          = pa_stream_connect_record;\n    ma_pa_stream_disconnect_proc               _pa_stream_disconnect              = pa_stream_disconnect;\n    ma_pa_stream_get_state_proc                _pa_stream_get_state               = pa_stream_get_state;\n    ma_pa_stream_get_sample_spec_proc          _pa_stream_get_sample_spec         = pa_stream_get_sample_spec;\n    ma_pa_stream_get_channel_map_proc          _pa_stream_get_channel_map         = pa_stream_get_channel_map;\n    ma_pa_stream_get_buffer_attr_proc          _pa_stream_get_buffer_attr         = pa_stream_get_buffer_attr;\n    ma_pa_stream_set_buffer_attr_proc          _pa_stream_set_buffer_attr         = pa_stream_set_buffer_attr;\n    ma_pa_stream_get_device_name_proc          _pa_stream_get_device_name         = pa_stream_get_device_name;\n    ma_pa_stream_set_write_callback_proc       _pa_stream_set_write_callback      = pa_stream_set_write_callback;\n    ma_pa_stream_set_read_callback_proc        _pa_stream_set_read_callback       = pa_stream_set_read_callback;\n    ma_pa_stream_set_suspended_callback_proc   _pa_stream_set_suspended_callback  = pa_stream_set_suspended_callback;\n    ma_pa_stream_set_moved_callback_proc       _pa_stream_set_moved_callback      = pa_stream_set_moved_callback;\n    ma_pa_stream_is_suspended_proc             _pa_stream_is_suspended            = pa_stream_is_suspended;\n    ma_pa_stream_flush_proc                    _pa_stream_flush                   = pa_stream_flush;\n    ma_pa_stream_drain_proc                    _pa_stream_drain                   = pa_stream_drain;\n    ma_pa_stream_is_corked_proc                _pa_stream_is_corked               = pa_stream_is_corked;\n    ma_pa_stream_cork_proc                     _pa_stream_cork                    = pa_stream_cork;\n    ma_pa_stream_trigger_proc                  _pa_stream_trigger                 = pa_stream_trigger;\n    ma_pa_stream_begin_write_proc              _pa_stream_begin_write             = pa_stream_begin_write;\n    ma_pa_stream_write_proc                    _pa_stream_write                   = pa_stream_write;\n    ma_pa_stream_peek_proc                     _pa_stream_peek                    = pa_stream_peek;\n    ma_pa_stream_drop_proc                     _pa_stream_drop                    = pa_stream_drop;\n    ma_pa_stream_writable_size_proc            _pa_stream_writable_size           = pa_stream_writable_size;\n    ma_pa_stream_readable_size_proc            _pa_stream_readable_size           = pa_stream_readable_size;\n\n    pContext->pulse.pa_mainloop_new                    = (ma_proc)_pa_mainloop_new;\n    pContext->pulse.pa_mainloop_free                   = (ma_proc)_pa_mainloop_free;\n    pContext->pulse.pa_mainloop_quit                   = (ma_proc)_pa_mainloop_quit;\n    pContext->pulse.pa_mainloop_get_api                = (ma_proc)_pa_mainloop_get_api;\n    pContext->pulse.pa_mainloop_iterate                = (ma_proc)_pa_mainloop_iterate;\n    pContext->pulse.pa_mainloop_wakeup                 = (ma_proc)_pa_mainloop_wakeup;\n    pContext->pulse.pa_threaded_mainloop_new           = (ma_proc)_pa_threaded_mainloop_new;\n    pContext->pulse.pa_threaded_mainloop_free          = (ma_proc)_pa_threaded_mainloop_free;\n    pContext->pulse.pa_threaded_mainloop_start         = (ma_proc)_pa_threaded_mainloop_start;\n    pContext->pulse.pa_threaded_mainloop_stop          = (ma_proc)_pa_threaded_mainloop_stop;\n    pContext->pulse.pa_threaded_mainloop_lock          = (ma_proc)_pa_threaded_mainloop_lock;\n    pContext->pulse.pa_threaded_mainloop_unlock        = (ma_proc)_pa_threaded_mainloop_unlock;\n    pContext->pulse.pa_threaded_mainloop_wait          = (ma_proc)_pa_threaded_mainloop_wait;\n    pContext->pulse.pa_threaded_mainloop_signal        = (ma_proc)_pa_threaded_mainloop_signal;\n    pContext->pulse.pa_threaded_mainloop_accept        = (ma_proc)_pa_threaded_mainloop_accept;\n    pContext->pulse.pa_threaded_mainloop_get_retval    = (ma_proc)_pa_threaded_mainloop_get_retval;\n    pContext->pulse.pa_threaded_mainloop_get_api       = (ma_proc)_pa_threaded_mainloop_get_api;\n    pContext->pulse.pa_threaded_mainloop_in_thread     = (ma_proc)_pa_threaded_mainloop_in_thread;\n    pContext->pulse.pa_threaded_mainloop_set_name      = (ma_proc)_pa_threaded_mainloop_set_name;\n    pContext->pulse.pa_context_new                     = (ma_proc)_pa_context_new;\n    pContext->pulse.pa_context_unref                   = (ma_proc)_pa_context_unref;\n    pContext->pulse.pa_context_connect                 = (ma_proc)_pa_context_connect;\n    pContext->pulse.pa_context_disconnect              = (ma_proc)_pa_context_disconnect;\n    pContext->pulse.pa_context_set_state_callback      = (ma_proc)_pa_context_set_state_callback;\n    pContext->pulse.pa_context_get_state               = (ma_proc)_pa_context_get_state;\n    pContext->pulse.pa_context_get_sink_info_list      = (ma_proc)_pa_context_get_sink_info_list;\n    pContext->pulse.pa_context_get_source_info_list    = (ma_proc)_pa_context_get_source_info_list;\n    pContext->pulse.pa_context_get_sink_info_by_name   = (ma_proc)_pa_context_get_sink_info_by_name;\n    pContext->pulse.pa_context_get_source_info_by_name = (ma_proc)_pa_context_get_source_info_by_name;\n    pContext->pulse.pa_operation_unref                 = (ma_proc)_pa_operation_unref;\n    pContext->pulse.pa_operation_get_state             = (ma_proc)_pa_operation_get_state;\n    pContext->pulse.pa_channel_map_init_extend         = (ma_proc)_pa_channel_map_init_extend;\n    pContext->pulse.pa_channel_map_valid               = (ma_proc)_pa_channel_map_valid;\n    pContext->pulse.pa_channel_map_compatible          = (ma_proc)_pa_channel_map_compatible;\n    pContext->pulse.pa_stream_new                      = (ma_proc)_pa_stream_new;\n    pContext->pulse.pa_stream_unref                    = (ma_proc)_pa_stream_unref;\n    pContext->pulse.pa_stream_connect_playback         = (ma_proc)_pa_stream_connect_playback;\n    pContext->pulse.pa_stream_connect_record           = (ma_proc)_pa_stream_connect_record;\n    pContext->pulse.pa_stream_disconnect               = (ma_proc)_pa_stream_disconnect;\n    pContext->pulse.pa_stream_get_state                = (ma_proc)_pa_stream_get_state;\n    pContext->pulse.pa_stream_get_sample_spec          = (ma_proc)_pa_stream_get_sample_spec;\n    pContext->pulse.pa_stream_get_channel_map          = (ma_proc)_pa_stream_get_channel_map;\n    pContext->pulse.pa_stream_get_buffer_attr          = (ma_proc)_pa_stream_get_buffer_attr;\n    pContext->pulse.pa_stream_set_buffer_attr          = (ma_proc)_pa_stream_set_buffer_attr;\n    pContext->pulse.pa_stream_get_device_name          = (ma_proc)_pa_stream_get_device_name;\n    pContext->pulse.pa_stream_set_write_callback       = (ma_proc)_pa_stream_set_write_callback;\n    pContext->pulse.pa_stream_set_read_callback        = (ma_proc)_pa_stream_set_read_callback;\n    pContext->pulse.pa_stream_set_suspended_callback   = (ma_proc)_pa_stream_set_suspended_callback;\n    pContext->pulse.pa_stream_set_moved_callback       = (ma_proc)_pa_stream_set_moved_callback;\n    pContext->pulse.pa_stream_is_suspended             = (ma_proc)_pa_stream_is_suspended;\n    pContext->pulse.pa_stream_flush                    = (ma_proc)_pa_stream_flush;\n    pContext->pulse.pa_stream_drain                    = (ma_proc)_pa_stream_drain;\n    pContext->pulse.pa_stream_is_corked                = (ma_proc)_pa_stream_is_corked;\n    pContext->pulse.pa_stream_cork                     = (ma_proc)_pa_stream_cork;\n    pContext->pulse.pa_stream_trigger                  = (ma_proc)_pa_stream_trigger;\n    pContext->pulse.pa_stream_begin_write              = (ma_proc)_pa_stream_begin_write;\n    pContext->pulse.pa_stream_write                    = (ma_proc)_pa_stream_write;\n    pContext->pulse.pa_stream_peek                     = (ma_proc)_pa_stream_peek;\n    pContext->pulse.pa_stream_drop                     = (ma_proc)_pa_stream_drop;\n    pContext->pulse.pa_stream_writable_size            = (ma_proc)_pa_stream_writable_size;\n    pContext->pulse.pa_stream_readable_size            = (ma_proc)_pa_stream_readable_size;\n#endif\n\n    /* We need to make a copy of the application and server names so we can pass them to the pa_context of each device. */\n    pContext->pulse.pApplicationName = ma_copy_string(pConfig->pulse.pApplicationName, &pContext->allocationCallbacks);\n    if (pContext->pulse.pApplicationName == NULL && pConfig->pulse.pApplicationName != NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    pContext->pulse.pServerName = ma_copy_string(pConfig->pulse.pServerName, &pContext->allocationCallbacks);\n    if (pContext->pulse.pServerName == NULL && pConfig->pulse.pServerName != NULL) {\n        ma_free(pContext->pulse.pApplicationName, &pContext->allocationCallbacks);\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_init_pa_mainloop_and_pa_context__pulse(pContext, pConfig->pulse.pApplicationName, pConfig->pulse.pServerName, pConfig->pulse.tryAutoSpawn, &pContext->pulse.pMainLoop, &pContext->pulse.pPulseContext);\n    if (result != MA_SUCCESS) {\n        ma_free(pContext->pulse.pServerName, &pContext->allocationCallbacks);\n        ma_free(pContext->pulse.pApplicationName, &pContext->allocationCallbacks);\n    #ifndef MA_NO_RUNTIME_LINKING\n        ma_dlclose(ma_context_get_log(pContext), pContext->pulse.pulseSO);\n    #endif\n        return result;\n    }\n\n    /* With pa_mainloop we run a synchronous backend, but we implement our own main loop. */\n    pCallbacks->onContextInit             = ma_context_init__pulse;\n    pCallbacks->onContextUninit           = ma_context_uninit__pulse;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__pulse;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__pulse;\n    pCallbacks->onDeviceInit              = ma_device_init__pulse;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__pulse;\n    pCallbacks->onDeviceStart             = ma_device_start__pulse;\n    pCallbacks->onDeviceStop              = ma_device_stop__pulse;\n    pCallbacks->onDeviceRead              = NULL;   /* Not used because we're implementing onDeviceDataLoop. */\n    pCallbacks->onDeviceWrite             = NULL;   /* Not used because we're implementing onDeviceDataLoop. */\n    pCallbacks->onDeviceDataLoop          = ma_device_data_loop__pulse;\n    pCallbacks->onDeviceDataLoopWakeup    = ma_device_data_loop_wakeup__pulse;\n\n    return MA_SUCCESS;\n}\n#endif\n\n\n/******************************************************************************\n\nJACK Backend\n\n******************************************************************************/\n#ifdef MA_HAS_JACK\n\n/* It is assumed jack.h is available when compile-time linking is being used. */\n#ifdef MA_NO_RUNTIME_LINKING\n#include <jack/jack.h>\n\ntypedef jack_nframes_t              ma_jack_nframes_t;\ntypedef jack_options_t              ma_jack_options_t;\ntypedef jack_status_t               ma_jack_status_t;\ntypedef jack_client_t               ma_jack_client_t;\ntypedef jack_port_t                 ma_jack_port_t;\ntypedef JackProcessCallback         ma_JackProcessCallback;\ntypedef JackBufferSizeCallback      ma_JackBufferSizeCallback;\ntypedef JackShutdownCallback        ma_JackShutdownCallback;\n#define MA_JACK_DEFAULT_AUDIO_TYPE  JACK_DEFAULT_AUDIO_TYPE\n#define ma_JackNoStartServer        JackNoStartServer\n#define ma_JackPortIsInput          JackPortIsInput\n#define ma_JackPortIsOutput         JackPortIsOutput\n#define ma_JackPortIsPhysical       JackPortIsPhysical\n#else\ntypedef ma_uint32               ma_jack_nframes_t;\ntypedef int                     ma_jack_options_t;\ntypedef int                     ma_jack_status_t;\ntypedef struct ma_jack_client_t ma_jack_client_t;\ntypedef struct ma_jack_port_t   ma_jack_port_t;\ntypedef int  (* ma_JackProcessCallback)   (ma_jack_nframes_t nframes, void* arg);\ntypedef int  (* ma_JackBufferSizeCallback)(ma_jack_nframes_t nframes, void* arg);\ntypedef void (* ma_JackShutdownCallback)  (void* arg);\n#define MA_JACK_DEFAULT_AUDIO_TYPE \"32 bit float mono audio\"\n#define ma_JackNoStartServer       1\n#define ma_JackPortIsInput         1\n#define ma_JackPortIsOutput        2\n#define ma_JackPortIsPhysical      4\n#endif\n\ntypedef ma_jack_client_t* (* ma_jack_client_open_proc)             (const char* client_name, ma_jack_options_t options, ma_jack_status_t* status, ...);\ntypedef int               (* ma_jack_client_close_proc)            (ma_jack_client_t* client);\ntypedef int               (* ma_jack_client_name_size_proc)        (void);\ntypedef int               (* ma_jack_set_process_callback_proc)    (ma_jack_client_t* client, ma_JackProcessCallback process_callback, void* arg);\ntypedef int               (* ma_jack_set_buffer_size_callback_proc)(ma_jack_client_t* client, ma_JackBufferSizeCallback bufsize_callback, void* arg);\ntypedef void              (* ma_jack_on_shutdown_proc)             (ma_jack_client_t* client, ma_JackShutdownCallback function, void* arg);\ntypedef ma_jack_nframes_t (* ma_jack_get_sample_rate_proc)         (ma_jack_client_t* client);\ntypedef ma_jack_nframes_t (* ma_jack_get_buffer_size_proc)         (ma_jack_client_t* client);\ntypedef const char**      (* ma_jack_get_ports_proc)               (ma_jack_client_t* client, const char* port_name_pattern, const char* type_name_pattern, unsigned long flags);\ntypedef int               (* ma_jack_activate_proc)                (ma_jack_client_t* client);\ntypedef int               (* ma_jack_deactivate_proc)              (ma_jack_client_t* client);\ntypedef int               (* ma_jack_connect_proc)                 (ma_jack_client_t* client, const char* source_port, const char* destination_port);\ntypedef ma_jack_port_t*   (* ma_jack_port_register_proc)           (ma_jack_client_t* client, const char* port_name, const char* port_type, unsigned long flags, unsigned long buffer_size);\ntypedef const char*       (* ma_jack_port_name_proc)               (const ma_jack_port_t* port);\ntypedef void*             (* ma_jack_port_get_buffer_proc)         (ma_jack_port_t* port, ma_jack_nframes_t nframes);\ntypedef void              (* ma_jack_free_proc)                    (void* ptr);\n\nstatic ma_result ma_context_open_client__jack(ma_context* pContext, ma_jack_client_t** ppClient)\n{\n    size_t maxClientNameSize;\n    char clientName[256];\n    ma_jack_status_t status;\n    ma_jack_client_t* pClient;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(ppClient != NULL);\n\n    if (ppClient) {\n        *ppClient = NULL;\n    }\n\n    maxClientNameSize = ((ma_jack_client_name_size_proc)pContext->jack.jack_client_name_size)(); /* Includes null terminator. */\n    ma_strncpy_s(clientName, ma_min(sizeof(clientName), maxClientNameSize), (pContext->jack.pClientName != NULL) ? pContext->jack.pClientName : \"miniaudio\", (size_t)-1);\n\n    pClient = ((ma_jack_client_open_proc)pContext->jack.jack_client_open)(clientName, (pContext->jack.tryStartServer) ? 0 : ma_JackNoStartServer, &status, NULL);\n    if (pClient == NULL) {\n        return MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n    }\n\n    if (ppClient) {\n        *ppClient = pClient;\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_context_enumerate_devices__jack(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    ma_bool32 cbResult = MA_TRUE;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(callback != NULL);\n\n    /* Playback. */\n    if (cbResult) {\n        ma_device_info deviceInfo;\n        MA_ZERO_OBJECT(&deviceInfo);\n        ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n        deviceInfo.isDefault = MA_TRUE;    /* JACK only uses default devices. */\n        cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData);\n    }\n\n    /* Capture. */\n    if (cbResult) {\n        ma_device_info deviceInfo;\n        MA_ZERO_OBJECT(&deviceInfo);\n        ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n        deviceInfo.isDefault = MA_TRUE;    /* JACK only uses default devices. */\n        cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData);\n    }\n\n    (void)cbResult; /* For silencing a static analysis warning. */\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_get_device_info__jack(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    ma_jack_client_t* pClient;\n    ma_result result;\n    const char** ppPorts;\n\n    MA_ASSERT(pContext != NULL);\n\n    if (pDeviceID != NULL && pDeviceID->jack != 0) {\n        return MA_NO_DEVICE;   /* Don't know the device. */\n    }\n\n    /* Name / Description */\n    if (deviceType == ma_device_type_playback) {\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n    } else {\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n    }\n\n    /* Jack only uses default devices. */\n    pDeviceInfo->isDefault = MA_TRUE;\n\n    /* Jack only supports f32 and has a specific channel count and sample rate. */\n    pDeviceInfo->nativeDataFormats[0].format = ma_format_f32;\n\n    /* The channel count and sample rate can only be determined by opening the device. */\n    result = ma_context_open_client__jack(pContext, &pClient);\n    if (result != MA_SUCCESS) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to open client.\");\n        return result;\n    }\n\n    pDeviceInfo->nativeDataFormats[0].sampleRate = ((ma_jack_get_sample_rate_proc)pContext->jack.jack_get_sample_rate)((ma_jack_client_t*)pClient);\n    pDeviceInfo->nativeDataFormats[0].channels   = 0;\n\n    ppPorts = ((ma_jack_get_ports_proc)pContext->jack.jack_get_ports)((ma_jack_client_t*)pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ((deviceType == ma_device_type_playback) ? ma_JackPortIsInput : ma_JackPortIsOutput));\n    if (ppPorts == NULL) {\n        ((ma_jack_client_close_proc)pContext->jack.jack_client_close)((ma_jack_client_t*)pClient);\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to query physical ports.\");\n        return MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n    }\n\n    while (ppPorts[pDeviceInfo->nativeDataFormats[0].channels] != NULL) {\n        pDeviceInfo->nativeDataFormats[0].channels += 1;\n    }\n\n    pDeviceInfo->nativeDataFormats[0].flags = 0;\n    pDeviceInfo->nativeDataFormatCount = 1;\n\n    ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppPorts);\n    ((ma_jack_client_close_proc)pContext->jack.jack_client_close)((ma_jack_client_t*)pClient);\n\n    (void)pContext;\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_device_uninit__jack(ma_device* pDevice)\n{\n    ma_context* pContext;\n\n    MA_ASSERT(pDevice != NULL);\n\n    pContext = pDevice->pContext;\n    MA_ASSERT(pContext != NULL);\n\n    if (pDevice->jack.pClient != NULL) {\n        ((ma_jack_client_close_proc)pContext->jack.jack_client_close)((ma_jack_client_t*)pDevice->jack.pClient);\n    }\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        ma_free(pDevice->jack.pIntermediaryBufferCapture, &pDevice->pContext->allocationCallbacks);\n        ma_free(pDevice->jack.ppPortsCapture, &pDevice->pContext->allocationCallbacks);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ma_free(pDevice->jack.pIntermediaryBufferPlayback, &pDevice->pContext->allocationCallbacks);\n        ma_free(pDevice->jack.ppPortsPlayback, &pDevice->pContext->allocationCallbacks);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_device__jack_shutdown_callback(void* pUserData)\n{\n    /* JACK died. Stop the device. */\n    ma_device* pDevice = (ma_device*)pUserData;\n    MA_ASSERT(pDevice != NULL);\n\n    ma_device_stop(pDevice);\n}\n\nstatic int ma_device__jack_buffer_size_callback(ma_jack_nframes_t frameCount, void* pUserData)\n{\n    ma_device* pDevice = (ma_device*)pUserData;\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        size_t newBufferSize = frameCount * (pDevice->capture.internalChannels * ma_get_bytes_per_sample(pDevice->capture.internalFormat));\n        float* pNewBuffer = (float*)ma_calloc(newBufferSize, &pDevice->pContext->allocationCallbacks);\n        if (pNewBuffer == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n\n        ma_free(pDevice->jack.pIntermediaryBufferCapture, &pDevice->pContext->allocationCallbacks);\n\n        pDevice->jack.pIntermediaryBufferCapture = pNewBuffer;\n        pDevice->playback.internalPeriodSizeInFrames = frameCount;\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        size_t newBufferSize = frameCount * (pDevice->playback.internalChannels * ma_get_bytes_per_sample(pDevice->playback.internalFormat));\n        float* pNewBuffer = (float*)ma_calloc(newBufferSize, &pDevice->pContext->allocationCallbacks);\n        if (pNewBuffer == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n\n        ma_free(pDevice->jack.pIntermediaryBufferPlayback, &pDevice->pContext->allocationCallbacks);\n\n        pDevice->jack.pIntermediaryBufferPlayback = pNewBuffer;\n        pDevice->playback.internalPeriodSizeInFrames = frameCount;\n    }\n\n    return 0;\n}\n\nstatic int ma_device__jack_process_callback(ma_jack_nframes_t frameCount, void* pUserData)\n{\n    ma_device* pDevice;\n    ma_context* pContext;\n    ma_uint32 iChannel;\n\n    pDevice = (ma_device*)pUserData;\n    MA_ASSERT(pDevice != NULL);\n\n    pContext = pDevice->pContext;\n    MA_ASSERT(pContext != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        /* Channels need to be interleaved. */\n        for (iChannel = 0; iChannel < pDevice->capture.internalChannels; ++iChannel) {\n            const float* pSrc = (const float*)((ma_jack_port_get_buffer_proc)pContext->jack.jack_port_get_buffer)((ma_jack_port_t*)pDevice->jack.ppPortsCapture[iChannel], frameCount);\n            if (pSrc != NULL) {\n                float* pDst = pDevice->jack.pIntermediaryBufferCapture + iChannel;\n                ma_jack_nframes_t iFrame;\n                for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                    *pDst = *pSrc;\n\n                    pDst += pDevice->capture.internalChannels;\n                    pSrc += 1;\n                }\n            }\n        }\n\n        ma_device_handle_backend_data_callback(pDevice, NULL, pDevice->jack.pIntermediaryBufferCapture, frameCount);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ma_device_handle_backend_data_callback(pDevice, pDevice->jack.pIntermediaryBufferPlayback, NULL, frameCount);\n\n        /* Channels need to be deinterleaved. */\n        for (iChannel = 0; iChannel < pDevice->playback.internalChannels; ++iChannel) {\n            float* pDst = (float*)((ma_jack_port_get_buffer_proc)pContext->jack.jack_port_get_buffer)((ma_jack_port_t*)pDevice->jack.ppPortsPlayback[iChannel], frameCount);\n            if (pDst != NULL) {\n                const float* pSrc = pDevice->jack.pIntermediaryBufferPlayback + iChannel;\n                ma_jack_nframes_t iFrame;\n                for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                    *pDst = *pSrc;\n\n                    pDst += 1;\n                    pSrc += pDevice->playback.internalChannels;\n                }\n            }\n        }\n    }\n\n    return 0;\n}\n\nstatic ma_result ma_device_init__jack(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n    ma_result result;\n    ma_uint32 periodSizeInFrames;\n\n    MA_ASSERT(pConfig != NULL);\n    MA_ASSERT(pDevice != NULL);\n\n    if (pConfig->deviceType == ma_device_type_loopback) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Loopback mode not supported.\");\n        return MA_DEVICE_TYPE_NOT_SUPPORTED;\n    }\n\n    /* Only supporting default devices with JACK. */\n    if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->pDeviceID != NULL && pDescriptorPlayback->pDeviceID->jack != 0) ||\n        ((pConfig->deviceType == ma_device_type_capture  || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->pDeviceID  != NULL && pDescriptorCapture->pDeviceID->jack  != 0)) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Only default devices are supported.\");\n        return MA_NO_DEVICE;\n    }\n\n    /* No exclusive mode with the JACK backend. */\n    if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) ||\n        ((pConfig->deviceType == ma_device_type_capture  || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode  == ma_share_mode_exclusive)) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Exclusive mode not supported.\");\n        return MA_SHARE_MODE_NOT_SUPPORTED;\n    }\n\n    /* Open the client. */\n    result = ma_context_open_client__jack(pDevice->pContext, (ma_jack_client_t**)&pDevice->jack.pClient);\n    if (result != MA_SUCCESS) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to open client.\");\n        return result;\n    }\n\n    /* Callbacks. */\n    if (((ma_jack_set_process_callback_proc)pDevice->pContext->jack.jack_set_process_callback)((ma_jack_client_t*)pDevice->jack.pClient, ma_device__jack_process_callback, pDevice) != 0) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to set process callback.\");\n        return MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n    }\n    if (((ma_jack_set_buffer_size_callback_proc)pDevice->pContext->jack.jack_set_buffer_size_callback)((ma_jack_client_t*)pDevice->jack.pClient, ma_device__jack_buffer_size_callback, pDevice) != 0) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to set buffer size callback.\");\n        return MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n    }\n\n    ((ma_jack_on_shutdown_proc)pDevice->pContext->jack.jack_on_shutdown)((ma_jack_client_t*)pDevice->jack.pClient, ma_device__jack_shutdown_callback, pDevice);\n\n\n    /* The buffer size in frames can change. */\n    periodSizeInFrames = ((ma_jack_get_buffer_size_proc)pDevice->pContext->jack.jack_get_buffer_size)((ma_jack_client_t*)pDevice->jack.pClient);\n\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        ma_uint32 iPort;\n        const char** ppPorts;\n\n        pDescriptorCapture->format     = ma_format_f32;\n        pDescriptorCapture->channels   = 0;\n        pDescriptorCapture->sampleRate = ((ma_jack_get_sample_rate_proc)pDevice->pContext->jack.jack_get_sample_rate)((ma_jack_client_t*)pDevice->jack.pClient);\n        ma_channel_map_init_standard(ma_standard_channel_map_alsa, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorCapture->channels);\n\n        ppPorts = ((ma_jack_get_ports_proc)pDevice->pContext->jack.jack_get_ports)((ma_jack_client_t*)pDevice->jack.pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ma_JackPortIsOutput);\n        if (ppPorts == NULL) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to query physical ports.\");\n            return MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n        }\n\n        /* Need to count the number of ports first so we can allocate some memory. */\n        while (ppPorts[pDescriptorCapture->channels] != NULL) {\n            pDescriptorCapture->channels += 1;\n        }\n\n        pDevice->jack.ppPortsCapture = (ma_ptr*)ma_malloc(sizeof(*pDevice->jack.ppPortsCapture) * pDescriptorCapture->channels, &pDevice->pContext->allocationCallbacks);\n        if (pDevice->jack.ppPortsCapture == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n\n        for (iPort = 0; iPort < pDescriptorCapture->channels; iPort += 1) {\n            char name[64];\n            ma_strcpy_s(name, sizeof(name), \"capture\");\n            ma_itoa_s((int)iPort, name+7, sizeof(name)-7, 10); /* 7 = length of \"capture\" */\n\n            pDevice->jack.ppPortsCapture[iPort] = ((ma_jack_port_register_proc)pDevice->pContext->jack.jack_port_register)((ma_jack_client_t*)pDevice->jack.pClient, name, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsInput, 0);\n            if (pDevice->jack.ppPortsCapture[iPort] == NULL) {\n                ((ma_jack_free_proc)pDevice->pContext->jack.jack_free)((void*)ppPorts);\n                ma_device_uninit__jack(pDevice);\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to register ports.\");\n                return MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n            }\n        }\n\n        ((ma_jack_free_proc)pDevice->pContext->jack.jack_free)((void*)ppPorts);\n\n        pDescriptorCapture->periodSizeInFrames = periodSizeInFrames;\n        pDescriptorCapture->periodCount        = 1; /* There's no notion of a period in JACK. Just set to 1. */\n\n        pDevice->jack.pIntermediaryBufferCapture = (float*)ma_calloc(pDescriptorCapture->periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels), &pDevice->pContext->allocationCallbacks);\n        if (pDevice->jack.pIntermediaryBufferCapture == NULL) {\n            ma_device_uninit__jack(pDevice);\n            return MA_OUT_OF_MEMORY;\n        }\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        ma_uint32 iPort;\n        const char** ppPorts;\n\n        pDescriptorPlayback->format     = ma_format_f32;\n        pDescriptorPlayback->channels   = 0;\n        pDescriptorPlayback->sampleRate = ((ma_jack_get_sample_rate_proc)pDevice->pContext->jack.jack_get_sample_rate)((ma_jack_client_t*)pDevice->jack.pClient);\n        ma_channel_map_init_standard(ma_standard_channel_map_alsa, pDescriptorPlayback->channelMap, ma_countof(pDescriptorPlayback->channelMap), pDescriptorPlayback->channels);\n\n        ppPorts = ((ma_jack_get_ports_proc)pDevice->pContext->jack.jack_get_ports)((ma_jack_client_t*)pDevice->jack.pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ma_JackPortIsInput);\n        if (ppPorts == NULL) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to query physical ports.\");\n            return MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n        }\n\n        /* Need to count the number of ports first so we can allocate some memory. */\n        while (ppPorts[pDescriptorPlayback->channels] != NULL) {\n            pDescriptorPlayback->channels += 1;\n        }\n\n        pDevice->jack.ppPortsPlayback = (ma_ptr*)ma_malloc(sizeof(*pDevice->jack.ppPortsPlayback) * pDescriptorPlayback->channels, &pDevice->pContext->allocationCallbacks);\n        if (pDevice->jack.ppPortsPlayback == NULL) {\n            ma_free(pDevice->jack.ppPortsCapture, &pDevice->pContext->allocationCallbacks);\n            return MA_OUT_OF_MEMORY;\n        }\n\n        for (iPort = 0; iPort < pDescriptorPlayback->channels; iPort += 1) {\n            char name[64];\n            ma_strcpy_s(name, sizeof(name), \"playback\");\n            ma_itoa_s((int)iPort, name+8, sizeof(name)-8, 10); /* 8 = length of \"playback\" */\n\n            pDevice->jack.ppPortsPlayback[iPort] = ((ma_jack_port_register_proc)pDevice->pContext->jack.jack_port_register)((ma_jack_client_t*)pDevice->jack.pClient, name, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsOutput, 0);\n            if (pDevice->jack.ppPortsPlayback[iPort] == NULL) {\n                ((ma_jack_free_proc)pDevice->pContext->jack.jack_free)((void*)ppPorts);\n                ma_device_uninit__jack(pDevice);\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to register ports.\");\n                return MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n            }\n        }\n\n        ((ma_jack_free_proc)pDevice->pContext->jack.jack_free)((void*)ppPorts);\n\n        pDescriptorPlayback->periodSizeInFrames = periodSizeInFrames;\n        pDescriptorPlayback->periodCount        = 1;   /* There's no notion of a period in JACK. Just set to 1. */\n\n        pDevice->jack.pIntermediaryBufferPlayback = (float*)ma_calloc(pDescriptorPlayback->periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels), &pDevice->pContext->allocationCallbacks);\n        if (pDevice->jack.pIntermediaryBufferPlayback == NULL) {\n            ma_device_uninit__jack(pDevice);\n            return MA_OUT_OF_MEMORY;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_device_start__jack(ma_device* pDevice)\n{\n    ma_context* pContext = pDevice->pContext;\n    int resultJACK;\n    size_t i;\n\n    resultJACK = ((ma_jack_activate_proc)pContext->jack.jack_activate)((ma_jack_client_t*)pDevice->jack.pClient);\n    if (resultJACK != 0) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to activate the JACK client.\");\n        return MA_FAILED_TO_START_BACKEND_DEVICE;\n    }\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        const char** ppServerPorts = ((ma_jack_get_ports_proc)pContext->jack.jack_get_ports)((ma_jack_client_t*)pDevice->jack.pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ma_JackPortIsOutput);\n        if (ppServerPorts == NULL) {\n            ((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to retrieve physical ports.\");\n            return MA_ERROR;\n        }\n\n        for (i = 0; ppServerPorts[i] != NULL; ++i) {\n            const char* pServerPort = ppServerPorts[i];\n            const char* pClientPort = ((ma_jack_port_name_proc)pContext->jack.jack_port_name)((ma_jack_port_t*)pDevice->jack.ppPortsCapture[i]);\n\n            resultJACK = ((ma_jack_connect_proc)pContext->jack.jack_connect)((ma_jack_client_t*)pDevice->jack.pClient, pServerPort, pClientPort);\n            if (resultJACK != 0) {\n                ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppServerPorts);\n                ((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient);\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to connect ports.\");\n                return MA_ERROR;\n            }\n        }\n\n        ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppServerPorts);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        const char** ppServerPorts = ((ma_jack_get_ports_proc)pContext->jack.jack_get_ports)((ma_jack_client_t*)pDevice->jack.pClient, NULL, MA_JACK_DEFAULT_AUDIO_TYPE, ma_JackPortIsPhysical | ma_JackPortIsInput);\n        if (ppServerPorts == NULL) {\n            ((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to retrieve physical ports.\");\n            return MA_ERROR;\n        }\n\n        for (i = 0; ppServerPorts[i] != NULL; ++i) {\n            const char* pServerPort = ppServerPorts[i];\n            const char* pClientPort = ((ma_jack_port_name_proc)pContext->jack.jack_port_name)((ma_jack_port_t*)pDevice->jack.ppPortsPlayback[i]);\n\n            resultJACK = ((ma_jack_connect_proc)pContext->jack.jack_connect)((ma_jack_client_t*)pDevice->jack.pClient, pClientPort, pServerPort);\n            if (resultJACK != 0) {\n                ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppServerPorts);\n                ((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient);\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] Failed to connect ports.\");\n                return MA_ERROR;\n            }\n        }\n\n        ((ma_jack_free_proc)pContext->jack.jack_free)((void*)ppServerPorts);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop__jack(ma_device* pDevice)\n{\n    ma_context* pContext = pDevice->pContext;\n\n    if (((ma_jack_deactivate_proc)pContext->jack.jack_deactivate)((ma_jack_client_t*)pDevice->jack.pClient) != 0) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[JACK] An error occurred when deactivating the JACK client.\");\n        return MA_ERROR;\n    }\n\n    ma_device__on_notification_stopped(pDevice);\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_context_uninit__jack(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_jack);\n\n    ma_free(pContext->jack.pClientName, &pContext->allocationCallbacks);\n    pContext->jack.pClientName = NULL;\n\n#ifndef MA_NO_RUNTIME_LINKING\n    ma_dlclose(ma_context_get_log(pContext), pContext->jack.jackSO);\n#endif\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init__jack(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n#ifndef MA_NO_RUNTIME_LINKING\n    const char* libjackNames[] = {\n#if defined(MA_WIN32)\n        \"libjack.dll\",\n        \"libjack64.dll\"\n#endif\n#if defined(MA_UNIX)\n        \"libjack.so\",\n        \"libjack.so.0\"\n#endif\n    };\n    size_t i;\n\n    for (i = 0; i < ma_countof(libjackNames); ++i) {\n        pContext->jack.jackSO = ma_dlopen(ma_context_get_log(pContext), libjackNames[i]);\n        if (pContext->jack.jackSO != NULL) {\n            break;\n        }\n    }\n\n    if (pContext->jack.jackSO == NULL) {\n        return MA_NO_BACKEND;\n    }\n\n    pContext->jack.jack_client_open              = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_client_open\");\n    pContext->jack.jack_client_close             = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_client_close\");\n    pContext->jack.jack_client_name_size         = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_client_name_size\");\n    pContext->jack.jack_set_process_callback     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_set_process_callback\");\n    pContext->jack.jack_set_buffer_size_callback = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_set_buffer_size_callback\");\n    pContext->jack.jack_on_shutdown              = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_on_shutdown\");\n    pContext->jack.jack_get_sample_rate          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_get_sample_rate\");\n    pContext->jack.jack_get_buffer_size          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_get_buffer_size\");\n    pContext->jack.jack_get_ports                = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_get_ports\");\n    pContext->jack.jack_activate                 = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_activate\");\n    pContext->jack.jack_deactivate               = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_deactivate\");\n    pContext->jack.jack_connect                  = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_connect\");\n    pContext->jack.jack_port_register            = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_port_register\");\n    pContext->jack.jack_port_name                = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_port_name\");\n    pContext->jack.jack_port_get_buffer          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_port_get_buffer\");\n    pContext->jack.jack_free                     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->jack.jackSO, \"jack_free\");\n#else\n    /*\n    This strange assignment system is here just to ensure type safety of miniaudio's function pointer\n    types. If anything differs slightly the compiler should throw a warning.\n    */\n    ma_jack_client_open_proc              _jack_client_open              = jack_client_open;\n    ma_jack_client_close_proc             _jack_client_close             = jack_client_close;\n    ma_jack_client_name_size_proc         _jack_client_name_size         = jack_client_name_size;\n    ma_jack_set_process_callback_proc     _jack_set_process_callback     = jack_set_process_callback;\n    ma_jack_set_buffer_size_callback_proc _jack_set_buffer_size_callback = jack_set_buffer_size_callback;\n    ma_jack_on_shutdown_proc              _jack_on_shutdown              = jack_on_shutdown;\n    ma_jack_get_sample_rate_proc          _jack_get_sample_rate          = jack_get_sample_rate;\n    ma_jack_get_buffer_size_proc          _jack_get_buffer_size          = jack_get_buffer_size;\n    ma_jack_get_ports_proc                _jack_get_ports                = jack_get_ports;\n    ma_jack_activate_proc                 _jack_activate                 = jack_activate;\n    ma_jack_deactivate_proc               _jack_deactivate               = jack_deactivate;\n    ma_jack_connect_proc                  _jack_connect                  = jack_connect;\n    ma_jack_port_register_proc            _jack_port_register            = jack_port_register;\n    ma_jack_port_name_proc                _jack_port_name                = jack_port_name;\n    ma_jack_port_get_buffer_proc          _jack_port_get_buffer          = jack_port_get_buffer;\n    ma_jack_free_proc                     _jack_free                     = jack_free;\n\n    pContext->jack.jack_client_open              = (ma_proc)_jack_client_open;\n    pContext->jack.jack_client_close             = (ma_proc)_jack_client_close;\n    pContext->jack.jack_client_name_size         = (ma_proc)_jack_client_name_size;\n    pContext->jack.jack_set_process_callback     = (ma_proc)_jack_set_process_callback;\n    pContext->jack.jack_set_buffer_size_callback = (ma_proc)_jack_set_buffer_size_callback;\n    pContext->jack.jack_on_shutdown              = (ma_proc)_jack_on_shutdown;\n    pContext->jack.jack_get_sample_rate          = (ma_proc)_jack_get_sample_rate;\n    pContext->jack.jack_get_buffer_size          = (ma_proc)_jack_get_buffer_size;\n    pContext->jack.jack_get_ports                = (ma_proc)_jack_get_ports;\n    pContext->jack.jack_activate                 = (ma_proc)_jack_activate;\n    pContext->jack.jack_deactivate               = (ma_proc)_jack_deactivate;\n    pContext->jack.jack_connect                  = (ma_proc)_jack_connect;\n    pContext->jack.jack_port_register            = (ma_proc)_jack_port_register;\n    pContext->jack.jack_port_name                = (ma_proc)_jack_port_name;\n    pContext->jack.jack_port_get_buffer          = (ma_proc)_jack_port_get_buffer;\n    pContext->jack.jack_free                     = (ma_proc)_jack_free;\n#endif\n\n    if (pConfig->jack.pClientName != NULL) {\n        pContext->jack.pClientName = ma_copy_string(pConfig->jack.pClientName, &pContext->allocationCallbacks);\n    }\n    pContext->jack.tryStartServer = pConfig->jack.tryStartServer;\n\n    /*\n    Getting here means the JACK library is installed, but it doesn't necessarily mean it's usable. We need to quickly test this by connecting\n    a temporary client.\n    */\n    {\n        ma_jack_client_t* pDummyClient;\n        ma_result result = ma_context_open_client__jack(pContext, &pDummyClient);\n        if (result != MA_SUCCESS) {\n            ma_free(pContext->jack.pClientName, &pContext->allocationCallbacks);\n        #ifndef MA_NO_RUNTIME_LINKING\n            ma_dlclose(ma_context_get_log(pContext), pContext->jack.jackSO);\n        #endif\n            return MA_NO_BACKEND;\n        }\n\n        ((ma_jack_client_close_proc)pContext->jack.jack_client_close)((ma_jack_client_t*)pDummyClient);\n    }\n\n\n    pCallbacks->onContextInit             = ma_context_init__jack;\n    pCallbacks->onContextUninit           = ma_context_uninit__jack;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__jack;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__jack;\n    pCallbacks->onDeviceInit              = ma_device_init__jack;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__jack;\n    pCallbacks->onDeviceStart             = ma_device_start__jack;\n    pCallbacks->onDeviceStop              = ma_device_stop__jack;\n    pCallbacks->onDeviceRead              = NULL;   /* Not used because JACK is asynchronous. */\n    pCallbacks->onDeviceWrite             = NULL;   /* Not used because JACK is asynchronous. */\n    pCallbacks->onDeviceDataLoop          = NULL;   /* Not used because JACK is asynchronous. */\n\n    return MA_SUCCESS;\n}\n#endif  /* JACK */\n\n\n\n/******************************************************************************\n\nCore Audio Backend\n\nReferences\n==========\n- Technical Note TN2091: Device input using the HAL Output Audio Unit\n    https://developer.apple.com/library/archive/technotes/tn2091/_index.html\n\n******************************************************************************/\n#ifdef MA_HAS_COREAUDIO\n#include <TargetConditionals.h>\n\n#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1\n    #define MA_APPLE_MOBILE\n    #if defined(TARGET_OS_TV) && TARGET_OS_TV == 1\n        #define MA_APPLE_TV\n    #endif\n    #if defined(TARGET_OS_WATCH) && TARGET_OS_WATCH == 1\n        #define MA_APPLE_WATCH\n    #endif\n    #if __has_feature(objc_arc)\n        #define MA_BRIDGE_TRANSFER  __bridge_transfer\n        #define MA_BRIDGE_RETAINED  __bridge_retained\n    #else\n        #define MA_BRIDGE_TRANSFER\n        #define MA_BRIDGE_RETAINED\n    #endif\n#else\n    #define MA_APPLE_DESKTOP\n#endif\n\n#if defined(MA_APPLE_DESKTOP)\n#include <CoreAudio/CoreAudio.h>\n#else\n#include <AVFoundation/AVFoundation.h>\n#endif\n\n#include <AudioToolbox/AudioToolbox.h>\n\n/* CoreFoundation */\ntypedef Boolean (* ma_CFStringGetCString_proc)(CFStringRef theString, char* buffer, CFIndex bufferSize, CFStringEncoding encoding);\ntypedef void (* ma_CFRelease_proc)(CFTypeRef cf);\n\n/* CoreAudio */\n#if defined(MA_APPLE_DESKTOP)\ntypedef OSStatus (* ma_AudioObjectGetPropertyData_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32* ioDataSize, void* outData);\ntypedef OSStatus (* ma_AudioObjectGetPropertyDataSize_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32* outDataSize);\ntypedef OSStatus (* ma_AudioObjectSetPropertyData_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, const void* inData);\ntypedef OSStatus (* ma_AudioObjectAddPropertyListener_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, AudioObjectPropertyListenerProc inListener, void* inClientData);\ntypedef OSStatus (* ma_AudioObjectRemovePropertyListener_proc)(AudioObjectID inObjectID, const AudioObjectPropertyAddress* inAddress, AudioObjectPropertyListenerProc inListener, void* inClientData);\n#endif\n\n/* AudioToolbox */\ntypedef AudioComponent (* ma_AudioComponentFindNext_proc)(AudioComponent inComponent, const AudioComponentDescription* inDesc);\ntypedef OSStatus (* ma_AudioComponentInstanceDispose_proc)(AudioComponentInstance inInstance);\ntypedef OSStatus (* ma_AudioComponentInstanceNew_proc)(AudioComponent inComponent, AudioComponentInstance* outInstance);\ntypedef OSStatus (* ma_AudioOutputUnitStart_proc)(AudioUnit inUnit);\ntypedef OSStatus (* ma_AudioOutputUnitStop_proc)(AudioUnit inUnit);\ntypedef OSStatus (* ma_AudioUnitAddPropertyListener_proc)(AudioUnit inUnit, AudioUnitPropertyID inID, AudioUnitPropertyListenerProc inProc, void* inProcUserData);\ntypedef OSStatus (* ma_AudioUnitGetPropertyInfo_proc)(AudioUnit inUnit, AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, UInt32* outDataSize, Boolean* outWriteable);\ntypedef OSStatus (* ma_AudioUnitGetProperty_proc)(AudioUnit inUnit, AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, void* outData, UInt32* ioDataSize);\ntypedef OSStatus (* ma_AudioUnitSetProperty_proc)(AudioUnit inUnit, AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, const void* inData, UInt32 inDataSize);\ntypedef OSStatus (* ma_AudioUnitInitialize_proc)(AudioUnit inUnit);\ntypedef OSStatus (* ma_AudioUnitRender_proc)(AudioUnit inUnit, AudioUnitRenderActionFlags* ioActionFlags, const AudioTimeStamp* inTimeStamp, UInt32 inOutputBusNumber, UInt32 inNumberFrames, AudioBufferList* ioData);\n\n\n#define MA_COREAUDIO_OUTPUT_BUS    0\n#define MA_COREAUDIO_INPUT_BUS     1\n\n#if defined(MA_APPLE_DESKTOP)\nstatic ma_result ma_device_reinit_internal__coreaudio(ma_device* pDevice, ma_device_type deviceType, ma_bool32 disposePreviousAudioUnit);\n#endif\n\n/*\nCore Audio\n\nSo far, Core Audio has been the worst backend to work with due to being both unintuitive and having almost no documentation\napart from comments in the headers (which admittedly are quite good). For my own purposes, and for anybody out there whose\nneeding to figure out how this darn thing works, I'm going to outline a few things here.\n\nSince miniaudio is a fairly low-level API, one of the things it needs is control over specific devices, and it needs to be\nable to identify whether or not it can be used as playback and/or capture. The AudioObject API is the only one I've seen\nthat supports this level of detail. There was some public domain sample code I stumbled across that used the AudioComponent\nand AudioUnit APIs, but I couldn't see anything that gave low-level control over device selection and capabilities (the\ndistinction between playback and capture in particular). Therefore, miniaudio is using the AudioObject API.\n\nMost (all?) functions in the AudioObject API take a AudioObjectID as it's input. This is the device identifier. When\nretrieving global information, such as the device list, you use kAudioObjectSystemObject. When retrieving device-specific\ndata, you pass in the ID for that device. In order to retrieve device-specific IDs you need to enumerate over each of the\ndevices. This is done using the AudioObjectGetPropertyDataSize() and AudioObjectGetPropertyData() APIs which seem to be\nthe central APIs for retrieving information about the system and specific devices.\n\nTo use the AudioObjectGetPropertyData() API you need to use the notion of a property address. A property address is a\nstructure with three variables and is used to identify which property you are getting or setting. The first is the \"selector\"\nwhich is basically the specific property that you're wanting to retrieve or set. The second is the \"scope\", which is\ntypically set to kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyScopeInput for input-specific properties and\nkAudioObjectPropertyScopeOutput for output-specific properties. The last is the \"element\" which is always set to\nkAudioObjectPropertyElementMain in miniaudio's case. I don't know of any cases where this would be set to anything different.\n\nBack to the earlier issue of device retrieval, you first use the AudioObjectGetPropertyDataSize() API to retrieve the size\nof the raw data which is just a list of AudioDeviceID's. You use the kAudioObjectSystemObject AudioObjectID, and a property\naddress with the kAudioHardwarePropertyDevices selector and the kAudioObjectPropertyScopeGlobal scope. Once you have the\nsize, allocate a block of memory of that size and then call AudioObjectGetPropertyData(). The data is just a list of\nAudioDeviceID's so just do \"dataSize/sizeof(AudioDeviceID)\" to know the device count.\n*/\n\n#if defined(MA_APPLE_MOBILE)\nstatic void ma_device__on_notification_interruption_began(ma_device* pDevice)\n{\n    ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_began));\n}\n\nstatic void ma_device__on_notification_interruption_ended(ma_device* pDevice)\n{\n    ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_ended));\n}\n#endif\n\nstatic ma_result ma_result_from_OSStatus(OSStatus status)\n{\n    switch (status)\n    {\n        case noErr:                                   return MA_SUCCESS;\n    #if defined(MA_APPLE_DESKTOP)\n        case kAudioHardwareNotRunningError:           return MA_DEVICE_NOT_STARTED;\n        case kAudioHardwareUnspecifiedError:          return MA_ERROR;\n        case kAudioHardwareUnknownPropertyError:      return MA_INVALID_ARGS;\n        case kAudioHardwareBadPropertySizeError:      return MA_INVALID_OPERATION;\n        case kAudioHardwareIllegalOperationError:     return MA_INVALID_OPERATION;\n        case kAudioHardwareBadObjectError:            return MA_INVALID_ARGS;\n        case kAudioHardwareBadDeviceError:            return MA_INVALID_ARGS;\n        case kAudioHardwareBadStreamError:            return MA_INVALID_ARGS;\n        case kAudioHardwareUnsupportedOperationError: return MA_INVALID_OPERATION;\n        case kAudioDeviceUnsupportedFormatError:      return MA_FORMAT_NOT_SUPPORTED;\n        case kAudioDevicePermissionsError:            return MA_ACCESS_DENIED;\n    #endif\n        default:                                      return MA_ERROR;\n    }\n}\n\n#if 0\nstatic ma_channel ma_channel_from_AudioChannelBitmap(AudioChannelBitmap bit)\n{\n    switch (bit)\n    {\n        case kAudioChannelBit_Left:                 return MA_CHANNEL_LEFT;\n        case kAudioChannelBit_Right:                return MA_CHANNEL_RIGHT;\n        case kAudioChannelBit_Center:               return MA_CHANNEL_FRONT_CENTER;\n        case kAudioChannelBit_LFEScreen:            return MA_CHANNEL_LFE;\n        case kAudioChannelBit_LeftSurround:         return MA_CHANNEL_BACK_LEFT;\n        case kAudioChannelBit_RightSurround:        return MA_CHANNEL_BACK_RIGHT;\n        case kAudioChannelBit_LeftCenter:           return MA_CHANNEL_FRONT_LEFT_CENTER;\n        case kAudioChannelBit_RightCenter:          return MA_CHANNEL_FRONT_RIGHT_CENTER;\n        case kAudioChannelBit_CenterSurround:       return MA_CHANNEL_BACK_CENTER;\n        case kAudioChannelBit_LeftSurroundDirect:   return MA_CHANNEL_SIDE_LEFT;\n        case kAudioChannelBit_RightSurroundDirect:  return MA_CHANNEL_SIDE_RIGHT;\n        case kAudioChannelBit_TopCenterSurround:    return MA_CHANNEL_TOP_CENTER;\n        case kAudioChannelBit_VerticalHeightLeft:   return MA_CHANNEL_TOP_FRONT_LEFT;\n        case kAudioChannelBit_VerticalHeightCenter: return MA_CHANNEL_TOP_FRONT_CENTER;\n        case kAudioChannelBit_VerticalHeightRight:  return MA_CHANNEL_TOP_FRONT_RIGHT;\n        case kAudioChannelBit_TopBackLeft:          return MA_CHANNEL_TOP_BACK_LEFT;\n        case kAudioChannelBit_TopBackCenter:        return MA_CHANNEL_TOP_BACK_CENTER;\n        case kAudioChannelBit_TopBackRight:         return MA_CHANNEL_TOP_BACK_RIGHT;\n        default:                                    return MA_CHANNEL_NONE;\n    }\n}\n#endif\n\nstatic ma_result ma_format_from_AudioStreamBasicDescription(const AudioStreamBasicDescription* pDescription, ma_format* pFormatOut)\n{\n    MA_ASSERT(pDescription != NULL);\n    MA_ASSERT(pFormatOut != NULL);\n\n    *pFormatOut = ma_format_unknown;   /* Safety. */\n\n    /* There's a few things miniaudio doesn't support. */\n    if (pDescription->mFormatID != kAudioFormatLinearPCM) {\n        return MA_FORMAT_NOT_SUPPORTED;\n    }\n\n    /* We don't support any non-packed formats that are aligned high. */\n    if ((pDescription->mFormatFlags & kLinearPCMFormatFlagIsAlignedHigh) != 0) {\n        return MA_FORMAT_NOT_SUPPORTED;\n    }\n\n    /* Only supporting native-endian. */\n    if ((ma_is_little_endian() && (pDescription->mFormatFlags & kAudioFormatFlagIsBigEndian) != 0) || (ma_is_big_endian() && (pDescription->mFormatFlags & kAudioFormatFlagIsBigEndian) == 0)) {\n        return MA_FORMAT_NOT_SUPPORTED;\n    }\n\n    /* We are not currently supporting non-interleaved formats (this will be added in a future version of miniaudio). */\n    /*if ((pDescription->mFormatFlags & kAudioFormatFlagIsNonInterleaved) != 0) {\n        return MA_FORMAT_NOT_SUPPORTED;\n    }*/\n\n    if ((pDescription->mFormatFlags & kLinearPCMFormatFlagIsFloat) != 0) {\n        if (pDescription->mBitsPerChannel == 32) {\n            *pFormatOut = ma_format_f32;\n            return MA_SUCCESS;\n        }\n    } else {\n        if ((pDescription->mFormatFlags & kLinearPCMFormatFlagIsSignedInteger) != 0) {\n            if (pDescription->mBitsPerChannel == 16) {\n                *pFormatOut = ma_format_s16;\n                return MA_SUCCESS;\n            } else if (pDescription->mBitsPerChannel == 24) {\n                if (pDescription->mBytesPerFrame == (pDescription->mBitsPerChannel/8 * pDescription->mChannelsPerFrame)) {\n                    *pFormatOut = ma_format_s24;\n                    return MA_SUCCESS;\n                } else {\n                    if (pDescription->mBytesPerFrame/pDescription->mChannelsPerFrame == sizeof(ma_int32)) {\n                        /* TODO: Implement ma_format_s24_32. */\n                        /**pFormatOut = ma_format_s24_32;*/\n                        /*return MA_SUCCESS;*/\n                        return MA_FORMAT_NOT_SUPPORTED;\n                    }\n                }\n            } else if (pDescription->mBitsPerChannel == 32) {\n                *pFormatOut = ma_format_s32;\n                return MA_SUCCESS;\n            }\n        } else {\n            if (pDescription->mBitsPerChannel == 8) {\n                *pFormatOut = ma_format_u8;\n                return MA_SUCCESS;\n            }\n        }\n    }\n\n    /* Getting here means the format is not supported. */\n    return MA_FORMAT_NOT_SUPPORTED;\n}\n\n#if defined(MA_APPLE_DESKTOP)\nstatic ma_channel ma_channel_from_AudioChannelLabel(AudioChannelLabel label)\n{\n    switch (label)\n    {\n        case kAudioChannelLabel_Unknown:              return MA_CHANNEL_NONE;\n        case kAudioChannelLabel_Unused:               return MA_CHANNEL_NONE;\n        case kAudioChannelLabel_UseCoordinates:       return MA_CHANNEL_NONE;\n        case kAudioChannelLabel_Left:                 return MA_CHANNEL_LEFT;\n        case kAudioChannelLabel_Right:                return MA_CHANNEL_RIGHT;\n        case kAudioChannelLabel_Center:               return MA_CHANNEL_FRONT_CENTER;\n        case kAudioChannelLabel_LFEScreen:            return MA_CHANNEL_LFE;\n        case kAudioChannelLabel_LeftSurround:         return MA_CHANNEL_BACK_LEFT;\n        case kAudioChannelLabel_RightSurround:        return MA_CHANNEL_BACK_RIGHT;\n        case kAudioChannelLabel_LeftCenter:           return MA_CHANNEL_FRONT_LEFT_CENTER;\n        case kAudioChannelLabel_RightCenter:          return MA_CHANNEL_FRONT_RIGHT_CENTER;\n        case kAudioChannelLabel_CenterSurround:       return MA_CHANNEL_BACK_CENTER;\n        case kAudioChannelLabel_LeftSurroundDirect:   return MA_CHANNEL_SIDE_LEFT;\n        case kAudioChannelLabel_RightSurroundDirect:  return MA_CHANNEL_SIDE_RIGHT;\n        case kAudioChannelLabel_TopCenterSurround:    return MA_CHANNEL_TOP_CENTER;\n        case kAudioChannelLabel_VerticalHeightLeft:   return MA_CHANNEL_TOP_FRONT_LEFT;\n        case kAudioChannelLabel_VerticalHeightCenter: return MA_CHANNEL_TOP_FRONT_CENTER;\n        case kAudioChannelLabel_VerticalHeightRight:  return MA_CHANNEL_TOP_FRONT_RIGHT;\n        case kAudioChannelLabel_TopBackLeft:          return MA_CHANNEL_TOP_BACK_LEFT;\n        case kAudioChannelLabel_TopBackCenter:        return MA_CHANNEL_TOP_BACK_CENTER;\n        case kAudioChannelLabel_TopBackRight:         return MA_CHANNEL_TOP_BACK_RIGHT;\n        case kAudioChannelLabel_RearSurroundLeft:     return MA_CHANNEL_BACK_LEFT;\n        case kAudioChannelLabel_RearSurroundRight:    return MA_CHANNEL_BACK_RIGHT;\n        case kAudioChannelLabel_LeftWide:             return MA_CHANNEL_SIDE_LEFT;\n        case kAudioChannelLabel_RightWide:            return MA_CHANNEL_SIDE_RIGHT;\n        case kAudioChannelLabel_LFE2:                 return MA_CHANNEL_LFE;\n        case kAudioChannelLabel_LeftTotal:            return MA_CHANNEL_LEFT;\n        case kAudioChannelLabel_RightTotal:           return MA_CHANNEL_RIGHT;\n        case kAudioChannelLabel_HearingImpaired:      return MA_CHANNEL_NONE;\n        case kAudioChannelLabel_Narration:            return MA_CHANNEL_MONO;\n        case kAudioChannelLabel_Mono:                 return MA_CHANNEL_MONO;\n        case kAudioChannelLabel_DialogCentricMix:     return MA_CHANNEL_MONO;\n        case kAudioChannelLabel_CenterSurroundDirect: return MA_CHANNEL_BACK_CENTER;\n        case kAudioChannelLabel_Haptic:               return MA_CHANNEL_NONE;\n        case kAudioChannelLabel_Ambisonic_W:          return MA_CHANNEL_NONE;\n        case kAudioChannelLabel_Ambisonic_X:          return MA_CHANNEL_NONE;\n        case kAudioChannelLabel_Ambisonic_Y:          return MA_CHANNEL_NONE;\n        case kAudioChannelLabel_Ambisonic_Z:          return MA_CHANNEL_NONE;\n        case kAudioChannelLabel_MS_Mid:               return MA_CHANNEL_LEFT;\n        case kAudioChannelLabel_MS_Side:              return MA_CHANNEL_RIGHT;\n        case kAudioChannelLabel_XY_X:                 return MA_CHANNEL_LEFT;\n        case kAudioChannelLabel_XY_Y:                 return MA_CHANNEL_RIGHT;\n        case kAudioChannelLabel_HeadphonesLeft:       return MA_CHANNEL_LEFT;\n        case kAudioChannelLabel_HeadphonesRight:      return MA_CHANNEL_RIGHT;\n        case kAudioChannelLabel_ClickTrack:           return MA_CHANNEL_NONE;\n        case kAudioChannelLabel_ForeignLanguage:      return MA_CHANNEL_NONE;\n        case kAudioChannelLabel_Discrete:             return MA_CHANNEL_NONE;\n        case kAudioChannelLabel_Discrete_0:           return MA_CHANNEL_AUX_0;\n        case kAudioChannelLabel_Discrete_1:           return MA_CHANNEL_AUX_1;\n        case kAudioChannelLabel_Discrete_2:           return MA_CHANNEL_AUX_2;\n        case kAudioChannelLabel_Discrete_3:           return MA_CHANNEL_AUX_3;\n        case kAudioChannelLabel_Discrete_4:           return MA_CHANNEL_AUX_4;\n        case kAudioChannelLabel_Discrete_5:           return MA_CHANNEL_AUX_5;\n        case kAudioChannelLabel_Discrete_6:           return MA_CHANNEL_AUX_6;\n        case kAudioChannelLabel_Discrete_7:           return MA_CHANNEL_AUX_7;\n        case kAudioChannelLabel_Discrete_8:           return MA_CHANNEL_AUX_8;\n        case kAudioChannelLabel_Discrete_9:           return MA_CHANNEL_AUX_9;\n        case kAudioChannelLabel_Discrete_10:          return MA_CHANNEL_AUX_10;\n        case kAudioChannelLabel_Discrete_11:          return MA_CHANNEL_AUX_11;\n        case kAudioChannelLabel_Discrete_12:          return MA_CHANNEL_AUX_12;\n        case kAudioChannelLabel_Discrete_13:          return MA_CHANNEL_AUX_13;\n        case kAudioChannelLabel_Discrete_14:          return MA_CHANNEL_AUX_14;\n        case kAudioChannelLabel_Discrete_15:          return MA_CHANNEL_AUX_15;\n        case kAudioChannelLabel_Discrete_65535:       return MA_CHANNEL_NONE;\n\n    #if 0   /* Introduced in a later version of macOS. */\n        case kAudioChannelLabel_HOA_ACN:              return MA_CHANNEL_NONE;\n        case kAudioChannelLabel_HOA_ACN_0:            return MA_CHANNEL_AUX_0;\n        case kAudioChannelLabel_HOA_ACN_1:            return MA_CHANNEL_AUX_1;\n        case kAudioChannelLabel_HOA_ACN_2:            return MA_CHANNEL_AUX_2;\n        case kAudioChannelLabel_HOA_ACN_3:            return MA_CHANNEL_AUX_3;\n        case kAudioChannelLabel_HOA_ACN_4:            return MA_CHANNEL_AUX_4;\n        case kAudioChannelLabel_HOA_ACN_5:            return MA_CHANNEL_AUX_5;\n        case kAudioChannelLabel_HOA_ACN_6:            return MA_CHANNEL_AUX_6;\n        case kAudioChannelLabel_HOA_ACN_7:            return MA_CHANNEL_AUX_7;\n        case kAudioChannelLabel_HOA_ACN_8:            return MA_CHANNEL_AUX_8;\n        case kAudioChannelLabel_HOA_ACN_9:            return MA_CHANNEL_AUX_9;\n        case kAudioChannelLabel_HOA_ACN_10:           return MA_CHANNEL_AUX_10;\n        case kAudioChannelLabel_HOA_ACN_11:           return MA_CHANNEL_AUX_11;\n        case kAudioChannelLabel_HOA_ACN_12:           return MA_CHANNEL_AUX_12;\n        case kAudioChannelLabel_HOA_ACN_13:           return MA_CHANNEL_AUX_13;\n        case kAudioChannelLabel_HOA_ACN_14:           return MA_CHANNEL_AUX_14;\n        case kAudioChannelLabel_HOA_ACN_15:           return MA_CHANNEL_AUX_15;\n        case kAudioChannelLabel_HOA_ACN_65024:        return MA_CHANNEL_NONE;\n    #endif\n\n        default:                                      return MA_CHANNEL_NONE;\n    }\n}\n\nstatic ma_result ma_get_channel_map_from_AudioChannelLayout(AudioChannelLayout* pChannelLayout, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    MA_ASSERT(pChannelLayout != NULL);\n\n    if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelDescriptions) {\n        UInt32 iChannel;\n        for (iChannel = 0; iChannel < pChannelLayout->mNumberChannelDescriptions && iChannel < channelMapCap; ++iChannel) {\n            pChannelMap[iChannel] = ma_channel_from_AudioChannelLabel(pChannelLayout->mChannelDescriptions[iChannel].mChannelLabel);\n        }\n    } else\n#if 0\n    if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelBitmap) {\n        /* This is the same kind of system that's used by Windows audio APIs. */\n        UInt32 iChannel = 0;\n        UInt32 iBit;\n        AudioChannelBitmap bitmap = pChannelLayout->mChannelBitmap;\n        for (iBit = 0; iBit < 32 && iChannel < channelMapCap; ++iBit) {\n            AudioChannelBitmap bit = bitmap & (1 << iBit);\n            if (bit != 0) {\n                pChannelMap[iChannel++] = ma_channel_from_AudioChannelBit(bit);\n            }\n        }\n    } else\n#endif\n    {\n        /*\n        Need to use the tag to determine the channel map. For now I'm just assuming a default channel map, but later on this should\n        be updated to determine the mapping based on the tag.\n        */\n        UInt32 channelCount;\n\n        /* Our channel map retrieval APIs below take 32-bit integers, so we'll want to clamp the channel map capacity. */\n        if (channelMapCap > 0xFFFFFFFF) {\n            channelMapCap = 0xFFFFFFFF;\n        }\n\n        channelCount = ma_min(AudioChannelLayoutTag_GetNumberOfChannels(pChannelLayout->mChannelLayoutTag), (UInt32)channelMapCap);\n\n        switch (pChannelLayout->mChannelLayoutTag)\n        {\n            case kAudioChannelLayoutTag_Mono:\n            case kAudioChannelLayoutTag_Stereo:\n            case kAudioChannelLayoutTag_StereoHeadphones:\n            case kAudioChannelLayoutTag_MatrixStereo:\n            case kAudioChannelLayoutTag_MidSide:\n            case kAudioChannelLayoutTag_XY:\n            case kAudioChannelLayoutTag_Binaural:\n            case kAudioChannelLayoutTag_Ambisonic_B_Format:\n            {\n                ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, channelCount);\n            } break;\n\n            case kAudioChannelLayoutTag_Octagonal:\n            {\n                pChannelMap[7] = MA_CHANNEL_SIDE_RIGHT;\n                pChannelMap[6] = MA_CHANNEL_SIDE_LEFT;\n            } MA_FALLTHROUGH; /* Intentional fallthrough. */\n            case kAudioChannelLayoutTag_Hexagonal:\n            {\n                pChannelMap[5] = MA_CHANNEL_BACK_CENTER;\n            } MA_FALLTHROUGH; /* Intentional fallthrough. */\n            case kAudioChannelLayoutTag_Pentagonal:\n            {\n                pChannelMap[4] = MA_CHANNEL_FRONT_CENTER;\n            } MA_FALLTHROUGH; /* Intentional fallthrough. */\n            case kAudioChannelLayoutTag_Quadraphonic:\n            {\n                pChannelMap[3] = MA_CHANNEL_BACK_RIGHT;\n                pChannelMap[2] = MA_CHANNEL_BACK_LEFT;\n                pChannelMap[1] = MA_CHANNEL_RIGHT;\n                pChannelMap[0] = MA_CHANNEL_LEFT;\n            } break;\n\n            /* TODO: Add support for more tags here. */\n\n            default:\n            {\n                ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, channelCount);\n            } break;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\n#if (defined(MAC_OS_VERSION_12_0) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_12_0) || \\\n    (defined(__IPHONE_15_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_15_0)\n#define AUDIO_OBJECT_PROPERTY_ELEMENT kAudioObjectPropertyElementMain\n#else\n/* kAudioObjectPropertyElementMaster is deprecated. */\n#define AUDIO_OBJECT_PROPERTY_ELEMENT kAudioObjectPropertyElementMaster\n#endif\n\nstatic ma_result ma_get_device_object_ids__coreaudio(ma_context* pContext, UInt32* pDeviceCount, AudioObjectID** ppDeviceObjectIDs) /* NOTE: Free the returned buffer with ma_free(). */\n{\n    AudioObjectPropertyAddress propAddressDevices;\n    UInt32 deviceObjectsDataSize;\n    OSStatus status;\n    AudioObjectID* pDeviceObjectIDs;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pDeviceCount != NULL);\n    MA_ASSERT(ppDeviceObjectIDs != NULL);\n\n    /* Safety. */\n    *pDeviceCount = 0;\n    *ppDeviceObjectIDs = NULL;\n\n    propAddressDevices.mSelector = kAudioHardwarePropertyDevices;\n    propAddressDevices.mScope    = kAudioObjectPropertyScopeGlobal;\n    propAddressDevices.mElement  = AUDIO_OBJECT_PROPERTY_ELEMENT;\n\n    status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(kAudioObjectSystemObject, &propAddressDevices, 0, NULL, &deviceObjectsDataSize);\n    if (status != noErr) {\n        return ma_result_from_OSStatus(status);\n    }\n\n    pDeviceObjectIDs = (AudioObjectID*)ma_malloc(deviceObjectsDataSize, &pContext->allocationCallbacks);\n    if (pDeviceObjectIDs == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(kAudioObjectSystemObject, &propAddressDevices, 0, NULL, &deviceObjectsDataSize, pDeviceObjectIDs);\n    if (status != noErr) {\n        ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks);\n        return ma_result_from_OSStatus(status);\n    }\n\n    *pDeviceCount = deviceObjectsDataSize / sizeof(AudioObjectID);\n    *ppDeviceObjectIDs = pDeviceObjectIDs;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_get_AudioObject_uid_as_CFStringRef(ma_context* pContext, AudioObjectID objectID, CFStringRef* pUID)\n{\n    AudioObjectPropertyAddress propAddress;\n    UInt32 dataSize;\n    OSStatus status;\n\n    MA_ASSERT(pContext != NULL);\n\n    propAddress.mSelector = kAudioDevicePropertyDeviceUID;\n    propAddress.mScope    = kAudioObjectPropertyScopeGlobal;\n    propAddress.mElement  = AUDIO_OBJECT_PROPERTY_ELEMENT;\n\n    dataSize = sizeof(*pUID);\n    status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(objectID, &propAddress, 0, NULL, &dataSize, pUID);\n    if (status != noErr) {\n        return ma_result_from_OSStatus(status);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_get_AudioObject_uid(ma_context* pContext, AudioObjectID objectID, size_t bufferSize, char* bufferOut)\n{\n    CFStringRef uid;\n    ma_result result;\n\n    MA_ASSERT(pContext != NULL);\n\n    result = ma_get_AudioObject_uid_as_CFStringRef(pContext, objectID, &uid);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (!((ma_CFStringGetCString_proc)pContext->coreaudio.CFStringGetCString)(uid, bufferOut, bufferSize, kCFStringEncodingUTF8)) {\n        return MA_ERROR;\n    }\n\n    ((ma_CFRelease_proc)pContext->coreaudio.CFRelease)(uid);\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_get_AudioObject_name(ma_context* pContext, AudioObjectID objectID, size_t bufferSize, char* bufferOut)\n{\n    AudioObjectPropertyAddress propAddress;\n    CFStringRef deviceName = NULL;\n    UInt32 dataSize;\n    OSStatus status;\n\n    MA_ASSERT(pContext != NULL);\n\n    propAddress.mSelector = kAudioDevicePropertyDeviceNameCFString;\n    propAddress.mScope    = kAudioObjectPropertyScopeGlobal;\n    propAddress.mElement  = AUDIO_OBJECT_PROPERTY_ELEMENT;\n\n    dataSize = sizeof(deviceName);\n    status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(objectID, &propAddress, 0, NULL, &dataSize, &deviceName);\n    if (status != noErr) {\n        return ma_result_from_OSStatus(status);\n    }\n\n    if (!((ma_CFStringGetCString_proc)pContext->coreaudio.CFStringGetCString)(deviceName, bufferOut, bufferSize, kCFStringEncodingUTF8)) {\n        return MA_ERROR;\n    }\n\n    ((ma_CFRelease_proc)pContext->coreaudio.CFRelease)(deviceName);\n    return MA_SUCCESS;\n}\n\nstatic ma_bool32 ma_does_AudioObject_support_scope(ma_context* pContext, AudioObjectID deviceObjectID, AudioObjectPropertyScope scope)\n{\n    AudioObjectPropertyAddress propAddress;\n    UInt32 dataSize;\n    OSStatus status;\n    AudioBufferList* pBufferList;\n    ma_bool32 isSupported;\n\n    MA_ASSERT(pContext != NULL);\n\n    /* To know whether or not a device is an input device we need ot look at the stream configuration. If it has an output channel it's a playback device. */\n    propAddress.mSelector = kAudioDevicePropertyStreamConfiguration;\n    propAddress.mScope    = scope;\n    propAddress.mElement  = AUDIO_OBJECT_PROPERTY_ELEMENT;\n\n    status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(deviceObjectID, &propAddress, 0, NULL, &dataSize);\n    if (status != noErr) {\n        return MA_FALSE;\n    }\n\n    pBufferList = (AudioBufferList*)ma_malloc(dataSize, &pContext->allocationCallbacks);\n    if (pBufferList == NULL) {\n        return MA_FALSE;   /* Out of memory. */\n    }\n\n    status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, pBufferList);\n    if (status != noErr) {\n        ma_free(pBufferList, &pContext->allocationCallbacks);\n        return MA_FALSE;\n    }\n\n    isSupported = MA_FALSE;\n    if (pBufferList->mNumberBuffers > 0) {\n        isSupported = MA_TRUE;\n    }\n\n    ma_free(pBufferList, &pContext->allocationCallbacks);\n    return isSupported;\n}\n\nstatic ma_bool32 ma_does_AudioObject_support_playback(ma_context* pContext, AudioObjectID deviceObjectID)\n{\n    return ma_does_AudioObject_support_scope(pContext, deviceObjectID, kAudioObjectPropertyScopeOutput);\n}\n\nstatic ma_bool32 ma_does_AudioObject_support_capture(ma_context* pContext, AudioObjectID deviceObjectID)\n{\n    return ma_does_AudioObject_support_scope(pContext, deviceObjectID, kAudioObjectPropertyScopeInput);\n}\n\n\nstatic ma_result ma_get_AudioObject_stream_descriptions(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, UInt32* pDescriptionCount, AudioStreamRangedDescription** ppDescriptions) /* NOTE: Free the returned pointer with ma_free(). */\n{\n    AudioObjectPropertyAddress propAddress;\n    UInt32 dataSize;\n    OSStatus status;\n    AudioStreamRangedDescription* pDescriptions;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pDescriptionCount != NULL);\n    MA_ASSERT(ppDescriptions != NULL);\n\n    /*\n    TODO: Experiment with kAudioStreamPropertyAvailablePhysicalFormats instead of (or in addition to) kAudioStreamPropertyAvailableVirtualFormats. My\n          MacBook Pro uses s24/32 format, however, which miniaudio does not currently support.\n    */\n    propAddress.mSelector = kAudioStreamPropertyAvailableVirtualFormats; /*kAudioStreamPropertyAvailablePhysicalFormats;*/\n    propAddress.mScope    = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput;\n    propAddress.mElement  = AUDIO_OBJECT_PROPERTY_ELEMENT;\n\n    status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(deviceObjectID, &propAddress, 0, NULL, &dataSize);\n    if (status != noErr) {\n        return ma_result_from_OSStatus(status);\n    }\n\n    pDescriptions = (AudioStreamRangedDescription*)ma_malloc(dataSize, &pContext->allocationCallbacks);\n    if (pDescriptions == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, pDescriptions);\n    if (status != noErr) {\n        ma_free(pDescriptions, &pContext->allocationCallbacks);\n        return ma_result_from_OSStatus(status);\n    }\n\n    *pDescriptionCount = dataSize / sizeof(*pDescriptions);\n    *ppDescriptions = pDescriptions;\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_get_AudioObject_channel_layout(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, AudioChannelLayout** ppChannelLayout)   /* NOTE: Free the returned pointer with ma_free(). */\n{\n    AudioObjectPropertyAddress propAddress;\n    UInt32 dataSize;\n    OSStatus status;\n    AudioChannelLayout* pChannelLayout;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(ppChannelLayout != NULL);\n\n    *ppChannelLayout = NULL;    /* Safety. */\n\n    propAddress.mSelector = kAudioDevicePropertyPreferredChannelLayout;\n    propAddress.mScope    = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput;\n    propAddress.mElement  = AUDIO_OBJECT_PROPERTY_ELEMENT;\n\n    status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(deviceObjectID, &propAddress, 0, NULL, &dataSize);\n    if (status != noErr) {\n        return ma_result_from_OSStatus(status);\n    }\n\n    pChannelLayout = (AudioChannelLayout*)ma_malloc(dataSize, &pContext->allocationCallbacks);\n    if (pChannelLayout == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, pChannelLayout);\n    if (status != noErr) {\n        ma_free(pChannelLayout, &pContext->allocationCallbacks);\n        return ma_result_from_OSStatus(status);\n    }\n\n    *ppChannelLayout = pChannelLayout;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_get_AudioObject_channel_count(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_uint32* pChannelCount)\n{\n    AudioChannelLayout* pChannelLayout;\n    ma_result result;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pChannelCount != NULL);\n\n    *pChannelCount = 0; /* Safety. */\n\n    result = ma_get_AudioObject_channel_layout(pContext, deviceObjectID, deviceType, &pChannelLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelDescriptions) {\n        *pChannelCount = pChannelLayout->mNumberChannelDescriptions;\n    } else if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelBitmap) {\n        *pChannelCount = ma_count_set_bits(pChannelLayout->mChannelBitmap);\n    } else {\n        *pChannelCount = AudioChannelLayoutTag_GetNumberOfChannels(pChannelLayout->mChannelLayoutTag);\n    }\n\n    ma_free(pChannelLayout, &pContext->allocationCallbacks);\n    return MA_SUCCESS;\n}\n\n#if 0\nstatic ma_result ma_get_AudioObject_channel_map(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    AudioChannelLayout* pChannelLayout;\n    ma_result result;\n\n    MA_ASSERT(pContext != NULL);\n\n    result = ma_get_AudioObject_channel_layout(pContext, deviceObjectID, deviceType, &pChannelLayout);\n    if (result != MA_SUCCESS) {\n        return result;  /* Rather than always failing here, would it be more robust to simply assume a default? */\n    }\n\n    result = ma_get_channel_map_from_AudioChannelLayout(pChannelLayout, pChannelMap, channelMapCap);\n    if (result != MA_SUCCESS) {\n        ma_free(pChannelLayout, &pContext->allocationCallbacks);\n        return result;\n    }\n\n    ma_free(pChannelLayout, &pContext->allocationCallbacks);\n    return result;\n}\n#endif\n\nstatic ma_result ma_get_AudioObject_sample_rates(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, UInt32* pSampleRateRangesCount, AudioValueRange** ppSampleRateRanges)   /* NOTE: Free the returned pointer with ma_free(). */\n{\n    AudioObjectPropertyAddress propAddress;\n    UInt32 dataSize;\n    OSStatus status;\n    AudioValueRange* pSampleRateRanges;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pSampleRateRangesCount != NULL);\n    MA_ASSERT(ppSampleRateRanges != NULL);\n\n    /* Safety. */\n    *pSampleRateRangesCount = 0;\n    *ppSampleRateRanges = NULL;\n\n    propAddress.mSelector = kAudioDevicePropertyAvailableNominalSampleRates;\n    propAddress.mScope    = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput;\n    propAddress.mElement  = AUDIO_OBJECT_PROPERTY_ELEMENT;\n\n    status = ((ma_AudioObjectGetPropertyDataSize_proc)pContext->coreaudio.AudioObjectGetPropertyDataSize)(deviceObjectID, &propAddress, 0, NULL, &dataSize);\n    if (status != noErr) {\n        return ma_result_from_OSStatus(status);\n    }\n\n    pSampleRateRanges = (AudioValueRange*)ma_malloc(dataSize, &pContext->allocationCallbacks);\n    if (pSampleRateRanges == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, pSampleRateRanges);\n    if (status != noErr) {\n        ma_free(pSampleRateRanges, &pContext->allocationCallbacks);\n        return ma_result_from_OSStatus(status);\n    }\n\n    *pSampleRateRangesCount = dataSize / sizeof(*pSampleRateRanges);\n    *ppSampleRateRanges = pSampleRateRanges;\n    return MA_SUCCESS;\n}\n\n#if 0\nstatic ma_result ma_get_AudioObject_get_closest_sample_rate(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_uint32 sampleRateIn, ma_uint32* pSampleRateOut)\n{\n    UInt32 sampleRateRangeCount;\n    AudioValueRange* pSampleRateRanges;\n    ma_result result;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pSampleRateOut != NULL);\n\n    *pSampleRateOut = 0;    /* Safety. */\n\n    result = ma_get_AudioObject_sample_rates(pContext, deviceObjectID, deviceType, &sampleRateRangeCount, &pSampleRateRanges);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (sampleRateRangeCount == 0) {\n        ma_free(pSampleRateRanges, &pContext->allocationCallbacks);\n        return MA_ERROR;   /* Should never hit this case should we? */\n    }\n\n    if (sampleRateIn == 0) {\n        /* Search in order of miniaudio's preferred priority. */\n        UInt32 iMALSampleRate;\n        for (iMALSampleRate = 0; iMALSampleRate < ma_countof(g_maStandardSampleRatePriorities); ++iMALSampleRate) {\n            ma_uint32 malSampleRate = g_maStandardSampleRatePriorities[iMALSampleRate];\n            UInt32 iCASampleRate;\n            for (iCASampleRate = 0; iCASampleRate < sampleRateRangeCount; ++iCASampleRate) {\n                AudioValueRange caSampleRate = pSampleRateRanges[iCASampleRate];\n                if (caSampleRate.mMinimum <= malSampleRate && caSampleRate.mMaximum >= malSampleRate) {\n                    *pSampleRateOut = malSampleRate;\n                    ma_free(pSampleRateRanges, &pContext->allocationCallbacks);\n                    return MA_SUCCESS;\n                }\n            }\n        }\n\n        /*\n        If we get here it means none of miniaudio's standard sample rates matched any of the supported sample rates from the device. In this\n        case we just fall back to the first one reported by Core Audio.\n        */\n        MA_ASSERT(sampleRateRangeCount > 0);\n\n        *pSampleRateOut = pSampleRateRanges[0].mMinimum;\n        ma_free(pSampleRateRanges, &pContext->allocationCallbacks);\n        return MA_SUCCESS;\n    } else {\n        /* Find the closest match to this sample rate. */\n        UInt32 currentAbsoluteDifference = INT32_MAX;\n        UInt32 iCurrentClosestRange = (UInt32)-1;\n        UInt32 iRange;\n        for (iRange = 0; iRange < sampleRateRangeCount; ++iRange) {\n            if (pSampleRateRanges[iRange].mMinimum <= sampleRateIn && pSampleRateRanges[iRange].mMaximum >= sampleRateIn) {\n                *pSampleRateOut = sampleRateIn;\n                ma_free(pSampleRateRanges, &pContext->allocationCallbacks);\n                return MA_SUCCESS;\n            } else {\n                UInt32 absoluteDifference;\n                if (pSampleRateRanges[iRange].mMinimum > sampleRateIn) {\n                    absoluteDifference = pSampleRateRanges[iRange].mMinimum - sampleRateIn;\n                } else {\n                    absoluteDifference = sampleRateIn - pSampleRateRanges[iRange].mMaximum;\n                }\n\n                if (currentAbsoluteDifference > absoluteDifference) {\n                    currentAbsoluteDifference = absoluteDifference;\n                    iCurrentClosestRange = iRange;\n                }\n            }\n        }\n\n        MA_ASSERT(iCurrentClosestRange != (UInt32)-1);\n\n        *pSampleRateOut = pSampleRateRanges[iCurrentClosestRange].mMinimum;\n        ma_free(pSampleRateRanges, &pContext->allocationCallbacks);\n        return MA_SUCCESS;\n    }\n\n    /* Should never get here, but it would mean we weren't able to find any suitable sample rates. */\n    /*ma_free(pSampleRateRanges, &pContext->allocationCallbacks);*/\n    /*return MA_ERROR;*/\n}\n#endif\n\nstatic ma_result ma_get_AudioObject_closest_buffer_size_in_frames(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_uint32 bufferSizeInFramesIn, ma_uint32* pBufferSizeInFramesOut)\n{\n    AudioObjectPropertyAddress propAddress;\n    AudioValueRange bufferSizeRange;\n    UInt32 dataSize;\n    OSStatus status;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pBufferSizeInFramesOut != NULL);\n\n    *pBufferSizeInFramesOut = 0;    /* Safety. */\n\n    propAddress.mSelector = kAudioDevicePropertyBufferFrameSizeRange;\n    propAddress.mScope    = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput;\n    propAddress.mElement  = AUDIO_OBJECT_PROPERTY_ELEMENT;\n\n    dataSize = sizeof(bufferSizeRange);\n    status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, &bufferSizeRange);\n    if (status != noErr) {\n        return ma_result_from_OSStatus(status);\n    }\n\n    /* This is just a clamp. */\n    if (bufferSizeInFramesIn < bufferSizeRange.mMinimum) {\n        *pBufferSizeInFramesOut = (ma_uint32)bufferSizeRange.mMinimum;\n    } else if (bufferSizeInFramesIn > bufferSizeRange.mMaximum) {\n        *pBufferSizeInFramesOut = (ma_uint32)bufferSizeRange.mMaximum;\n    } else {\n        *pBufferSizeInFramesOut = bufferSizeInFramesIn;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_set_AudioObject_buffer_size_in_frames(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_uint32* pPeriodSizeInOut)\n{\n    ma_result result;\n    ma_uint32 chosenBufferSizeInFrames;\n    AudioObjectPropertyAddress propAddress;\n    UInt32 dataSize;\n    OSStatus status;\n\n    MA_ASSERT(pContext != NULL);\n\n    result = ma_get_AudioObject_closest_buffer_size_in_frames(pContext, deviceObjectID, deviceType, *pPeriodSizeInOut, &chosenBufferSizeInFrames);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* Try setting the size of the buffer... If this fails we just use whatever is currently set. */\n    propAddress.mSelector = kAudioDevicePropertyBufferFrameSize;\n    propAddress.mScope    = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput;\n    propAddress.mElement  = AUDIO_OBJECT_PROPERTY_ELEMENT;\n\n    ((ma_AudioObjectSetPropertyData_proc)pContext->coreaudio.AudioObjectSetPropertyData)(deviceObjectID, &propAddress, 0, NULL, sizeof(chosenBufferSizeInFrames), &chosenBufferSizeInFrames);\n\n    /* Get the actual size of the buffer. */\n    dataSize = sizeof(*pPeriodSizeInOut);\n    status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(deviceObjectID, &propAddress, 0, NULL, &dataSize, &chosenBufferSizeInFrames);\n    if (status != noErr) {\n        return ma_result_from_OSStatus(status);\n    }\n\n    *pPeriodSizeInOut = chosenBufferSizeInFrames;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_find_default_AudioObjectID(ma_context* pContext, ma_device_type deviceType, AudioObjectID* pDeviceObjectID)\n{\n    AudioObjectPropertyAddress propAddressDefaultDevice;\n    UInt32 defaultDeviceObjectIDSize = sizeof(AudioObjectID);\n    AudioObjectID defaultDeviceObjectID;\n    OSStatus status;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pDeviceObjectID != NULL);\n\n    /* Safety. */\n    *pDeviceObjectID = 0;\n\n    propAddressDefaultDevice.mScope = kAudioObjectPropertyScopeGlobal;\n    propAddressDefaultDevice.mElement = AUDIO_OBJECT_PROPERTY_ELEMENT;\n    if (deviceType == ma_device_type_playback) {\n        propAddressDefaultDevice.mSelector = kAudioHardwarePropertyDefaultOutputDevice;\n    } else {\n        propAddressDefaultDevice.mSelector = kAudioHardwarePropertyDefaultInputDevice;\n    }\n\n    defaultDeviceObjectIDSize = sizeof(AudioObjectID);\n    status = ((ma_AudioObjectGetPropertyData_proc)pContext->coreaudio.AudioObjectGetPropertyData)(kAudioObjectSystemObject, &propAddressDefaultDevice, 0, NULL, &defaultDeviceObjectIDSize, &defaultDeviceObjectID);\n    if (status == noErr) {\n        *pDeviceObjectID = defaultDeviceObjectID;\n        return MA_SUCCESS;\n    }\n\n    /* If we get here it means we couldn't find the device. */\n    return MA_NO_DEVICE;\n}\n\nstatic ma_result ma_find_AudioObjectID(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, AudioObjectID* pDeviceObjectID)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pDeviceObjectID != NULL);\n\n    /* Safety. */\n    *pDeviceObjectID = 0;\n\n    if (pDeviceID == NULL) {\n        /* Default device. */\n        return ma_find_default_AudioObjectID(pContext, deviceType, pDeviceObjectID);\n    } else {\n        /* Explicit device. */\n        UInt32 deviceCount;\n        AudioObjectID* pDeviceObjectIDs;\n        ma_result result;\n        UInt32 iDevice;\n\n        result = ma_get_device_object_ids__coreaudio(pContext, &deviceCount, &pDeviceObjectIDs);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        for (iDevice = 0; iDevice < deviceCount; ++iDevice) {\n            AudioObjectID deviceObjectID = pDeviceObjectIDs[iDevice];\n\n            char uid[256];\n            if (ma_get_AudioObject_uid(pContext, deviceObjectID, sizeof(uid), uid) != MA_SUCCESS) {\n                continue;\n            }\n\n            if (deviceType == ma_device_type_playback) {\n                if (ma_does_AudioObject_support_playback(pContext, deviceObjectID)) {\n                    if (strcmp(uid, pDeviceID->coreaudio) == 0) {\n                        *pDeviceObjectID = deviceObjectID;\n                        ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks);\n                        return MA_SUCCESS;\n                    }\n                }\n            } else {\n                if (ma_does_AudioObject_support_capture(pContext, deviceObjectID)) {\n                    if (strcmp(uid, pDeviceID->coreaudio) == 0) {\n                        *pDeviceObjectID = deviceObjectID;\n                        ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks);\n                        return MA_SUCCESS;\n                    }\n                }\n            }\n        }\n\n        ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks);\n    }\n\n    /* If we get here it means we couldn't find the device. */\n    return MA_NO_DEVICE;\n}\n\n\nstatic ma_result ma_find_best_format__coreaudio(ma_context* pContext, AudioObjectID deviceObjectID, ma_device_type deviceType, ma_format format, ma_uint32 channels, ma_uint32 sampleRate, const AudioStreamBasicDescription* pOrigFormat, AudioStreamBasicDescription* pFormat)\n{\n    UInt32 deviceFormatDescriptionCount;\n    AudioStreamRangedDescription* pDeviceFormatDescriptions;\n    ma_result result;\n    ma_uint32 desiredSampleRate;\n    ma_uint32 desiredChannelCount;\n    ma_format desiredFormat;\n    AudioStreamBasicDescription bestDeviceFormatSoFar;\n    ma_bool32 hasSupportedFormat;\n    UInt32 iFormat;\n\n    result = ma_get_AudioObject_stream_descriptions(pContext, deviceObjectID, deviceType, &deviceFormatDescriptionCount, &pDeviceFormatDescriptions);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    desiredSampleRate = sampleRate;\n    if (desiredSampleRate == 0) {\n        desiredSampleRate = (ma_uint32)(pOrigFormat->mSampleRate);\n    }\n\n    desiredChannelCount = channels;\n    if (desiredChannelCount == 0) {\n        desiredChannelCount = pOrigFormat->mChannelsPerFrame;\n    }\n\n    desiredFormat = format;\n    if (desiredFormat == ma_format_unknown) {\n        result = ma_format_from_AudioStreamBasicDescription(pOrigFormat, &desiredFormat);\n        if (result != MA_SUCCESS || desiredFormat == ma_format_unknown) {\n            desiredFormat = g_maFormatPriorities[0];\n        }\n    }\n\n    /*\n    If we get here it means we don't have an exact match to what the client is asking for. We'll need to find the closest one. The next\n    loop will check for formats that have the same sample rate to what we're asking for. If there is, we prefer that one in all cases.\n    */\n    MA_ZERO_OBJECT(&bestDeviceFormatSoFar);\n\n    hasSupportedFormat = MA_FALSE;\n    for (iFormat = 0; iFormat < deviceFormatDescriptionCount; ++iFormat) {\n        ma_format formatFromDescription;\n        ma_result formatResult = ma_format_from_AudioStreamBasicDescription(&pDeviceFormatDescriptions[iFormat].mFormat, &formatFromDescription);\n        if (formatResult == MA_SUCCESS && formatFromDescription != ma_format_unknown) {\n            hasSupportedFormat = MA_TRUE;\n            bestDeviceFormatSoFar = pDeviceFormatDescriptions[iFormat].mFormat;\n            break;\n        }\n    }\n\n    if (!hasSupportedFormat) {\n        ma_free(pDeviceFormatDescriptions, &pContext->allocationCallbacks);\n        return MA_FORMAT_NOT_SUPPORTED;\n    }\n\n\n    for (iFormat = 0; iFormat < deviceFormatDescriptionCount; ++iFormat) {\n        AudioStreamBasicDescription thisDeviceFormat = pDeviceFormatDescriptions[iFormat].mFormat;\n        ma_format thisSampleFormat;\n        ma_result formatResult;\n        ma_format bestSampleFormatSoFar;\n\n        /* If the format is not supported by miniaudio we need to skip this one entirely. */\n        formatResult = ma_format_from_AudioStreamBasicDescription(&pDeviceFormatDescriptions[iFormat].mFormat, &thisSampleFormat);\n        if (formatResult != MA_SUCCESS || thisSampleFormat == ma_format_unknown) {\n            continue;   /* The format is not supported by miniaudio. Skip. */\n        }\n\n        ma_format_from_AudioStreamBasicDescription(&bestDeviceFormatSoFar, &bestSampleFormatSoFar);\n\n        /* Getting here means the format is supported by miniaudio which makes this format a candidate. */\n        if (thisDeviceFormat.mSampleRate != desiredSampleRate) {\n            /*\n            The sample rate does not match, but this format could still be usable, although it's a very low priority. If the best format\n            so far has an equal sample rate we can just ignore this one.\n            */\n            if (bestDeviceFormatSoFar.mSampleRate == desiredSampleRate) {\n                continue;   /* The best sample rate so far has the same sample rate as what we requested which means it's still the best so far. Skip this format. */\n            } else {\n                /* In this case, neither the best format so far nor this one have the same sample rate. Check the channel count next. */\n                if (thisDeviceFormat.mChannelsPerFrame != desiredChannelCount) {\n                    /* This format has a different sample rate _and_ a different channel count. */\n                    if (bestDeviceFormatSoFar.mChannelsPerFrame == desiredChannelCount) {\n                        continue;   /* No change to the best format. */\n                    } else {\n                        /*\n                        Both this format and the best so far have different sample rates and different channel counts. Whichever has the\n                        best format is the new best.\n                        */\n                        if (ma_get_format_priority_index(thisSampleFormat) < ma_get_format_priority_index(bestSampleFormatSoFar)) {\n                            bestDeviceFormatSoFar = thisDeviceFormat;\n                            continue;\n                        } else {\n                            continue;   /* No change to the best format. */\n                        }\n                    }\n                } else {\n                    /* This format has a different sample rate but the desired channel count. */\n                    if (bestDeviceFormatSoFar.mChannelsPerFrame == desiredChannelCount) {\n                        /* Both this format and the best so far have the desired channel count. Whichever has the best format is the new best. */\n                        if (ma_get_format_priority_index(thisSampleFormat) < ma_get_format_priority_index(bestSampleFormatSoFar)) {\n                            bestDeviceFormatSoFar = thisDeviceFormat;\n                            continue;\n                        } else {\n                            continue;   /* No change to the best format for now. */\n                        }\n                    } else {\n                        /* This format has the desired channel count, but the best so far does not. We have a new best. */\n                        bestDeviceFormatSoFar = thisDeviceFormat;\n                        continue;\n                    }\n                }\n            }\n        } else {\n            /*\n            The sample rates match which makes this format a very high priority contender. If the best format so far has a different\n            sample rate it needs to be replaced with this one.\n            */\n            if (bestDeviceFormatSoFar.mSampleRate != desiredSampleRate) {\n                bestDeviceFormatSoFar = thisDeviceFormat;\n                continue;\n            } else {\n                /* In this case both this format and the best format so far have the same sample rate. Check the channel count next. */\n                if (thisDeviceFormat.mChannelsPerFrame == desiredChannelCount) {\n                    /*\n                    In this case this format has the same channel count as what the client is requesting. If the best format so far has\n                    a different count, this one becomes the new best.\n                    */\n                    if (bestDeviceFormatSoFar.mChannelsPerFrame != desiredChannelCount) {\n                        bestDeviceFormatSoFar = thisDeviceFormat;\n                        continue;\n                    } else {\n                        /* In this case both this format and the best so far have the ideal sample rate and channel count. Check the format. */\n                        if (thisSampleFormat == desiredFormat) {\n                            bestDeviceFormatSoFar = thisDeviceFormat;\n                            break;  /* Found the exact match. */\n                        } else {\n                            /* The formats are different. The new best format is the one with the highest priority format according to miniaudio. */\n                            if (ma_get_format_priority_index(thisSampleFormat) < ma_get_format_priority_index(bestSampleFormatSoFar)) {\n                                bestDeviceFormatSoFar = thisDeviceFormat;\n                                continue;\n                            } else {\n                                continue;   /* No change to the best format for now. */\n                            }\n                        }\n                    }\n                } else {\n                    /*\n                    In this case the channel count is different to what the client has requested. If the best so far has the same channel\n                    count as the requested count then it remains the best.\n                    */\n                    if (bestDeviceFormatSoFar.mChannelsPerFrame == desiredChannelCount) {\n                        continue;\n                    } else {\n                        /*\n                        This is the case where both have the same sample rate (good) but different channel counts. Right now both have about\n                        the same priority, but we need to compare the format now.\n                        */\n                        if (thisSampleFormat == bestSampleFormatSoFar) {\n                            if (ma_get_format_priority_index(thisSampleFormat) < ma_get_format_priority_index(bestSampleFormatSoFar)) {\n                                bestDeviceFormatSoFar = thisDeviceFormat;\n                                continue;\n                            } else {\n                                continue;   /* No change to the best format for now. */\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    *pFormat = bestDeviceFormatSoFar;\n\n    ma_free(pDeviceFormatDescriptions, &pContext->allocationCallbacks);\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_get_AudioUnit_channel_map(ma_context* pContext, AudioUnit audioUnit, ma_device_type deviceType, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    AudioUnitScope deviceScope;\n    AudioUnitElement deviceBus;\n    UInt32 channelLayoutSize;\n    OSStatus status;\n    AudioChannelLayout* pChannelLayout;\n    ma_result result;\n\n    MA_ASSERT(pContext != NULL);\n\n    if (deviceType == ma_device_type_playback) {\n        deviceScope = kAudioUnitScope_Input;\n        deviceBus = MA_COREAUDIO_OUTPUT_BUS;\n    } else {\n        deviceScope = kAudioUnitScope_Output;\n        deviceBus = MA_COREAUDIO_INPUT_BUS;\n    }\n\n    status = ((ma_AudioUnitGetPropertyInfo_proc)pContext->coreaudio.AudioUnitGetPropertyInfo)(audioUnit, kAudioUnitProperty_AudioChannelLayout, deviceScope, deviceBus, &channelLayoutSize, NULL);\n    if (status != noErr) {\n        return ma_result_from_OSStatus(status);\n    }\n\n    pChannelLayout = (AudioChannelLayout*)ma_malloc(channelLayoutSize, &pContext->allocationCallbacks);\n    if (pChannelLayout == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    status = ((ma_AudioUnitGetProperty_proc)pContext->coreaudio.AudioUnitGetProperty)(audioUnit, kAudioUnitProperty_AudioChannelLayout, deviceScope, deviceBus, pChannelLayout, &channelLayoutSize);\n    if (status != noErr) {\n        ma_free(pChannelLayout, &pContext->allocationCallbacks);\n        return ma_result_from_OSStatus(status);\n    }\n\n    result = ma_get_channel_map_from_AudioChannelLayout(pChannelLayout, pChannelMap, channelMapCap);\n    if (result != MA_SUCCESS) {\n        ma_free(pChannelLayout, &pContext->allocationCallbacks);\n        return result;\n    }\n\n    ma_free(pChannelLayout, &pContext->allocationCallbacks);\n    return MA_SUCCESS;\n}\n#endif /* MA_APPLE_DESKTOP */\n\n\n#if !defined(MA_APPLE_DESKTOP)\nstatic void ma_AVAudioSessionPortDescription_to_device_info(AVAudioSessionPortDescription* pPortDesc, ma_device_info* pInfo)\n{\n    MA_ZERO_OBJECT(pInfo);\n    ma_strncpy_s(pInfo->name,         sizeof(pInfo->name),         [pPortDesc.portName UTF8String], (size_t)-1);\n    ma_strncpy_s(pInfo->id.coreaudio, sizeof(pInfo->id.coreaudio), [pPortDesc.UID      UTF8String], (size_t)-1);\n}\n#endif\n\nstatic ma_result ma_context_enumerate_devices__coreaudio(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n#if defined(MA_APPLE_DESKTOP)\n    UInt32 deviceCount;\n    AudioObjectID* pDeviceObjectIDs;\n    AudioObjectID defaultDeviceObjectIDPlayback;\n    AudioObjectID defaultDeviceObjectIDCapture;\n    ma_result result;\n    UInt32 iDevice;\n\n    ma_find_default_AudioObjectID(pContext, ma_device_type_playback, &defaultDeviceObjectIDPlayback);   /* OK if this fails. */\n    ma_find_default_AudioObjectID(pContext, ma_device_type_capture,  &defaultDeviceObjectIDCapture);    /* OK if this fails. */\n\n    result = ma_get_device_object_ids__coreaudio(pContext, &deviceCount, &pDeviceObjectIDs);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    for (iDevice = 0; iDevice < deviceCount; ++iDevice) {\n        AudioObjectID deviceObjectID = pDeviceObjectIDs[iDevice];\n        ma_device_info info;\n\n        MA_ZERO_OBJECT(&info);\n        if (ma_get_AudioObject_uid(pContext, deviceObjectID, sizeof(info.id.coreaudio), info.id.coreaudio) != MA_SUCCESS) {\n            continue;\n        }\n        if (ma_get_AudioObject_name(pContext, deviceObjectID, sizeof(info.name), info.name) != MA_SUCCESS) {\n            continue;\n        }\n\n        if (ma_does_AudioObject_support_playback(pContext, deviceObjectID)) {\n            if (deviceObjectID == defaultDeviceObjectIDPlayback) {\n                info.isDefault = MA_TRUE;\n            }\n\n            if (!callback(pContext, ma_device_type_playback, &info, pUserData)) {\n                break;\n            }\n        }\n        if (ma_does_AudioObject_support_capture(pContext, deviceObjectID)) {\n            if (deviceObjectID == defaultDeviceObjectIDCapture) {\n                info.isDefault = MA_TRUE;\n            }\n\n            if (!callback(pContext, ma_device_type_capture, &info, pUserData)) {\n                break;\n            }\n        }\n    }\n\n    ma_free(pDeviceObjectIDs, &pContext->allocationCallbacks);\n#else\n    ma_device_info info;\n    NSArray *pInputs  = [[[AVAudioSession sharedInstance] currentRoute] inputs];\n    NSArray *pOutputs = [[[AVAudioSession sharedInstance] currentRoute] outputs];\n\n    for (AVAudioSessionPortDescription* pPortDesc in pOutputs) {\n        ma_AVAudioSessionPortDescription_to_device_info(pPortDesc, &info);\n        if (!callback(pContext, ma_device_type_playback, &info, pUserData)) {\n            return MA_SUCCESS;\n        }\n    }\n\n    for (AVAudioSessionPortDescription* pPortDesc in pInputs) {\n        ma_AVAudioSessionPortDescription_to_device_info(pPortDesc, &info);\n        if (!callback(pContext, ma_device_type_capture, &info, pUserData)) {\n            return MA_SUCCESS;\n        }\n    }\n#endif\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_get_device_info__coreaudio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    ma_result result;\n\n    MA_ASSERT(pContext != NULL);\n\n#if defined(MA_APPLE_DESKTOP)\n    /* Desktop */\n    {\n        AudioObjectID deviceObjectID;\n        AudioObjectID defaultDeviceObjectID;\n        UInt32 streamDescriptionCount;\n        AudioStreamRangedDescription* pStreamDescriptions;\n        UInt32 iStreamDescription;\n        UInt32 sampleRateRangeCount;\n        AudioValueRange* pSampleRateRanges;\n\n        ma_find_default_AudioObjectID(pContext, deviceType, &defaultDeviceObjectID);     /* OK if this fails. */\n\n        result = ma_find_AudioObjectID(pContext, deviceType, pDeviceID, &deviceObjectID);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        result = ma_get_AudioObject_uid(pContext, deviceObjectID, sizeof(pDeviceInfo->id.coreaudio), pDeviceInfo->id.coreaudio);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        result = ma_get_AudioObject_name(pContext, deviceObjectID, sizeof(pDeviceInfo->name), pDeviceInfo->name);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        if (deviceObjectID == defaultDeviceObjectID) {\n            pDeviceInfo->isDefault = MA_TRUE;\n        }\n\n        /*\n        There could be a large number of permutations here. Fortunately there is only a single channel count\n        being reported which reduces this quite a bit. For sample rates we're only reporting those that are\n        one of miniaudio's recognized \"standard\" rates. If there are still more formats than can fit into\n        our fixed sized array we'll just need to truncate them. This is unlikely and will probably only happen\n        if some driver performs software data conversion and therefore reports every possible format and\n        sample rate.\n        */\n        pDeviceInfo->nativeDataFormatCount = 0;\n\n        /* Formats. */\n        {\n            ma_format uniqueFormats[ma_format_count];\n            ma_uint32 uniqueFormatCount = 0;\n            ma_uint32 channels;\n\n            /* Channels. */\n            result = ma_get_AudioObject_channel_count(pContext, deviceObjectID, deviceType, &channels);\n            if (result != MA_SUCCESS) {\n                return result;\n            }\n\n            /* Formats. */\n            result = ma_get_AudioObject_stream_descriptions(pContext, deviceObjectID, deviceType, &streamDescriptionCount, &pStreamDescriptions);\n            if (result != MA_SUCCESS) {\n                return result;\n            }\n\n            for (iStreamDescription = 0; iStreamDescription < streamDescriptionCount; ++iStreamDescription) {\n                ma_format format;\n                ma_bool32 hasFormatBeenHandled = MA_FALSE;\n                ma_uint32 iOutputFormat;\n                ma_uint32 iSampleRate;\n\n                result = ma_format_from_AudioStreamBasicDescription(&pStreamDescriptions[iStreamDescription].mFormat, &format);\n                if (result != MA_SUCCESS) {\n                    continue;\n                }\n\n                MA_ASSERT(format != ma_format_unknown);\n\n                /* Make sure the format isn't already in the output list. */\n                for (iOutputFormat = 0; iOutputFormat < uniqueFormatCount; ++iOutputFormat) {\n                    if (uniqueFormats[iOutputFormat] == format) {\n                        hasFormatBeenHandled = MA_TRUE;\n                        break;\n                    }\n                }\n\n                /* If we've already handled this format just skip it. */\n                if (hasFormatBeenHandled) {\n                    continue;\n                }\n\n                uniqueFormats[uniqueFormatCount] = format;\n                uniqueFormatCount += 1;\n\n                /* Sample Rates */\n                result = ma_get_AudioObject_sample_rates(pContext, deviceObjectID, deviceType, &sampleRateRangeCount, &pSampleRateRanges);\n                if (result != MA_SUCCESS) {\n                    return result;\n                }\n\n                /*\n                Annoyingly Core Audio reports a sample rate range. We just get all the standard rates that are\n                between this range.\n                */\n                for (iSampleRate = 0; iSampleRate < sampleRateRangeCount; ++iSampleRate) {\n                    ma_uint32 iStandardSampleRate;\n                    for (iStandardSampleRate = 0; iStandardSampleRate < ma_countof(g_maStandardSampleRatePriorities); iStandardSampleRate += 1) {\n                        ma_uint32 standardSampleRate = g_maStandardSampleRatePriorities[iStandardSampleRate];\n                        if (standardSampleRate >= pSampleRateRanges[iSampleRate].mMinimum && standardSampleRate <= pSampleRateRanges[iSampleRate].mMaximum) {\n                            /* We have a new data format. Add it to the list. */\n                            pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format     = format;\n                            pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels   = channels;\n                            pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = standardSampleRate;\n                            pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags      = 0;\n                            pDeviceInfo->nativeDataFormatCount += 1;\n\n                            if (pDeviceInfo->nativeDataFormatCount >= ma_countof(pDeviceInfo->nativeDataFormats)) {\n                                break;  /* No more room for any more formats. */\n                            }\n                        }\n                    }\n                }\n\n                ma_free(pSampleRateRanges, &pContext->allocationCallbacks);\n\n                if (pDeviceInfo->nativeDataFormatCount >= ma_countof(pDeviceInfo->nativeDataFormats)) {\n                    break;  /* No more room for any more formats. */\n                }\n            }\n\n            ma_free(pStreamDescriptions, &pContext->allocationCallbacks);\n        }\n    }\n#else\n    /* Mobile */\n    {\n        AudioComponentDescription desc;\n        AudioComponent component;\n        AudioUnit audioUnit;\n        OSStatus status;\n        AudioUnitScope formatScope;\n        AudioUnitElement formatElement;\n        AudioStreamBasicDescription bestFormat;\n        UInt32 propSize;\n\n        /* We want to ensure we use a consistent device name to device enumeration. */\n        if (pDeviceID != NULL && pDeviceID->coreaudio[0] != '\\0') {\n            ma_bool32 found = MA_FALSE;\n            if (deviceType == ma_device_type_playback) {\n                NSArray *pOutputs = [[[AVAudioSession sharedInstance] currentRoute] outputs];\n                for (AVAudioSessionPortDescription* pPortDesc in pOutputs) {\n                    if (strcmp(pDeviceID->coreaudio, [pPortDesc.UID UTF8String]) == 0) {\n                        ma_AVAudioSessionPortDescription_to_device_info(pPortDesc, pDeviceInfo);\n                        found = MA_TRUE;\n                        break;\n                    }\n                }\n            } else {\n                NSArray *pInputs = [[[AVAudioSession sharedInstance] currentRoute] inputs];\n                for (AVAudioSessionPortDescription* pPortDesc in pInputs) {\n                    if (strcmp(pDeviceID->coreaudio, [pPortDesc.UID UTF8String]) == 0) {\n                        ma_AVAudioSessionPortDescription_to_device_info(pPortDesc, pDeviceInfo);\n                        found = MA_TRUE;\n                        break;\n                    }\n                }\n            }\n\n            if (!found) {\n                return MA_DOES_NOT_EXIST;\n            }\n        } else {\n            if (deviceType == ma_device_type_playback) {\n                ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n            } else {\n                ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n            }\n        }\n\n\n        /*\n        Retrieving device information is more annoying on mobile than desktop. For simplicity I'm locking this down to whatever format is\n        reported on a temporary I/O unit. The problem, however, is that this doesn't return a value for the sample rate which we need to\n        retrieve from the AVAudioSession shared instance.\n        */\n        desc.componentType = kAudioUnitType_Output;\n        desc.componentSubType = kAudioUnitSubType_RemoteIO;\n        desc.componentManufacturer = kAudioUnitManufacturer_Apple;\n        desc.componentFlags = 0;\n        desc.componentFlagsMask = 0;\n\n        component = ((ma_AudioComponentFindNext_proc)pContext->coreaudio.AudioComponentFindNext)(NULL, &desc);\n        if (component == NULL) {\n            return MA_FAILED_TO_INIT_BACKEND;\n        }\n\n        status = ((ma_AudioComponentInstanceNew_proc)pContext->coreaudio.AudioComponentInstanceNew)(component, &audioUnit);\n        if (status != noErr) {\n            return ma_result_from_OSStatus(status);\n        }\n\n        formatScope   = (deviceType == ma_device_type_playback) ? kAudioUnitScope_Input : kAudioUnitScope_Output;\n        formatElement = (deviceType == ma_device_type_playback) ? MA_COREAUDIO_OUTPUT_BUS : MA_COREAUDIO_INPUT_BUS;\n\n        propSize = sizeof(bestFormat);\n        status = ((ma_AudioUnitGetProperty_proc)pContext->coreaudio.AudioUnitGetProperty)(audioUnit, kAudioUnitProperty_StreamFormat, formatScope, formatElement, &bestFormat, &propSize);\n        if (status != noErr) {\n            ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(audioUnit);\n            return ma_result_from_OSStatus(status);\n        }\n\n        ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(audioUnit);\n        audioUnit = NULL;\n\n        /* Only a single format is being reported for iOS. */\n        pDeviceInfo->nativeDataFormatCount = 1;\n\n        result = ma_format_from_AudioStreamBasicDescription(&bestFormat, &pDeviceInfo->nativeDataFormats[0].format);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pDeviceInfo->nativeDataFormats[0].channels = bestFormat.mChannelsPerFrame;\n\n        /*\n        It looks like Apple are wanting to push the whole AVAudioSession thing. Thus, we need to use that to determine device settings. To do\n        this we just get the shared instance and inspect.\n        */\n        @autoreleasepool {\n            AVAudioSession* pAudioSession = [AVAudioSession sharedInstance];\n            MA_ASSERT(pAudioSession != NULL);\n\n            pDeviceInfo->nativeDataFormats[0].sampleRate = (ma_uint32)pAudioSession.sampleRate;\n        }\n    }\n#endif\n\n    (void)pDeviceInfo; /* Unused. */\n    return MA_SUCCESS;\n}\n\nstatic AudioBufferList* ma_allocate_AudioBufferList__coreaudio(ma_uint32 sizeInFrames, ma_format format, ma_uint32 channels, ma_stream_layout layout, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    AudioBufferList* pBufferList;\n    UInt32 audioBufferSizeInBytes;\n    size_t allocationSize;\n\n    MA_ASSERT(sizeInFrames > 0);\n    MA_ASSERT(format != ma_format_unknown);\n    MA_ASSERT(channels > 0);\n\n    allocationSize = sizeof(AudioBufferList) - sizeof(AudioBuffer);  /* Subtract sizeof(AudioBuffer) because that part is dynamically sized. */\n    if (layout == ma_stream_layout_interleaved) {\n        /* Interleaved case. This is the simple case because we just have one buffer. */\n        allocationSize += sizeof(AudioBuffer) * 1;\n    } else {\n        /* Non-interleaved case. This is the more complex case because there's more than one buffer. */\n        allocationSize += sizeof(AudioBuffer) * channels;\n    }\n\n    allocationSize += sizeInFrames * ma_get_bytes_per_frame(format, channels);\n\n    pBufferList = (AudioBufferList*)ma_malloc(allocationSize, pAllocationCallbacks);\n    if (pBufferList == NULL) {\n        return NULL;\n    }\n\n    audioBufferSizeInBytes = (UInt32)(sizeInFrames * ma_get_bytes_per_sample(format));\n\n    if (layout == ma_stream_layout_interleaved) {\n        pBufferList->mNumberBuffers = 1;\n        pBufferList->mBuffers[0].mNumberChannels = channels;\n        pBufferList->mBuffers[0].mDataByteSize   = audioBufferSizeInBytes * channels;\n        pBufferList->mBuffers[0].mData           = (ma_uint8*)pBufferList + sizeof(AudioBufferList);\n    } else {\n        ma_uint32 iBuffer;\n        pBufferList->mNumberBuffers = channels;\n        for (iBuffer = 0; iBuffer < pBufferList->mNumberBuffers; ++iBuffer) {\n            pBufferList->mBuffers[iBuffer].mNumberChannels = 1;\n            pBufferList->mBuffers[iBuffer].mDataByteSize   = audioBufferSizeInBytes;\n            pBufferList->mBuffers[iBuffer].mData           = (ma_uint8*)pBufferList + ((sizeof(AudioBufferList) - sizeof(AudioBuffer)) + (sizeof(AudioBuffer) * channels)) + (audioBufferSizeInBytes * iBuffer);\n        }\n    }\n\n    return pBufferList;\n}\n\nstatic ma_result ma_device_realloc_AudioBufferList__coreaudio(ma_device* pDevice, ma_uint32 sizeInFrames, ma_format format, ma_uint32 channels, ma_stream_layout layout)\n{\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(format != ma_format_unknown);\n    MA_ASSERT(channels > 0);\n\n    /* Only resize the buffer if necessary. */\n    if (pDevice->coreaudio.audioBufferCapInFrames < sizeInFrames) {\n        AudioBufferList* pNewAudioBufferList;\n\n        pNewAudioBufferList = ma_allocate_AudioBufferList__coreaudio(sizeInFrames, format, channels, layout, &pDevice->pContext->allocationCallbacks);\n        if (pNewAudioBufferList == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n\n        /* At this point we'll have a new AudioBufferList and we can free the old one. */\n        ma_free(pDevice->coreaudio.pAudioBufferList, &pDevice->pContext->allocationCallbacks);\n        pDevice->coreaudio.pAudioBufferList = pNewAudioBufferList;\n        pDevice->coreaudio.audioBufferCapInFrames = sizeInFrames;\n    }\n\n    /* Getting here means the capacity of the audio is fine. */\n    return MA_SUCCESS;\n}\n\n\nstatic OSStatus ma_on_output__coreaudio(void* pUserData, AudioUnitRenderActionFlags* pActionFlags, const AudioTimeStamp* pTimeStamp, UInt32 busNumber, UInt32 frameCount, AudioBufferList* pBufferList)\n{\n    ma_device* pDevice = (ma_device*)pUserData;\n    ma_stream_layout layout;\n\n    MA_ASSERT(pDevice != NULL);\n\n    /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"INFO: Output Callback: busNumber=%d, frameCount=%d, mNumberBuffers=%d\\n\", (int)busNumber, (int)frameCount, (int)pBufferList->mNumberBuffers);*/\n\n    /* We need to check whether or not we are outputting interleaved or non-interleaved samples. The way we do this is slightly different for each type. */\n    layout = ma_stream_layout_interleaved;\n    if (pBufferList->mBuffers[0].mNumberChannels != pDevice->playback.internalChannels) {\n        layout = ma_stream_layout_deinterleaved;\n    }\n\n    if (layout == ma_stream_layout_interleaved) {\n        /* For now we can assume everything is interleaved. */\n        UInt32 iBuffer;\n        for (iBuffer = 0; iBuffer < pBufferList->mNumberBuffers; ++iBuffer) {\n            if (pBufferList->mBuffers[iBuffer].mNumberChannels == pDevice->playback.internalChannels) {\n                ma_uint32 frameCountForThisBuffer = pBufferList->mBuffers[iBuffer].mDataByteSize / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels);\n                if (frameCountForThisBuffer > 0) {\n                    ma_device_handle_backend_data_callback(pDevice, pBufferList->mBuffers[iBuffer].mData, NULL, frameCountForThisBuffer);\n                }\n\n                /*a_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"  frameCount=%d, mNumberChannels=%d, mDataByteSize=%d\\n\", (int)frameCount, (int)pBufferList->mBuffers[iBuffer].mNumberChannels, (int)pBufferList->mBuffers[iBuffer].mDataByteSize);*/\n            } else {\n                /*\n                This case is where the number of channels in the output buffer do not match our internal channels. It could mean that it's\n                not interleaved, in which case we can't handle right now since miniaudio does not yet support non-interleaved streams. We just\n                output silence here.\n                */\n                MA_ZERO_MEMORY(pBufferList->mBuffers[iBuffer].mData, pBufferList->mBuffers[iBuffer].mDataByteSize);\n                /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"  WARNING: Outputting silence. frameCount=%d, mNumberChannels=%d, mDataByteSize=%d\\n\", (int)frameCount, (int)pBufferList->mBuffers[iBuffer].mNumberChannels, (int)pBufferList->mBuffers[iBuffer].mDataByteSize);*/\n            }\n        }\n    } else {\n        /* This is the deinterleaved case. We need to update each buffer in groups of internalChannels. This assumes each buffer is the same size. */\n        MA_ASSERT(pDevice->playback.internalChannels <= MA_MAX_CHANNELS);   /* This should heve been validated at initialization time. */\n\n        /*\n        For safety we'll check that the internal channels is a multiple of the buffer count. If it's not it means something\n        very strange has happened and we're not going to support it.\n        */\n        if ((pBufferList->mNumberBuffers % pDevice->playback.internalChannels) == 0) {\n            ma_uint8 tempBuffer[4096];\n            UInt32 iBuffer;\n\n            for (iBuffer = 0; iBuffer < pBufferList->mNumberBuffers; iBuffer += pDevice->playback.internalChannels) {\n                ma_uint32 frameCountPerBuffer = pBufferList->mBuffers[iBuffer].mDataByteSize / ma_get_bytes_per_sample(pDevice->playback.internalFormat);\n                ma_uint32 framesRemaining = frameCountPerBuffer;\n\n                while (framesRemaining > 0) {\n                    void* ppDeinterleavedBuffers[MA_MAX_CHANNELS];\n                    ma_uint32 iChannel;\n                    ma_uint32 framesToRead = sizeof(tempBuffer) / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels);\n                    if (framesToRead > framesRemaining) {\n                        framesToRead = framesRemaining;\n                    }\n\n                    ma_device_handle_backend_data_callback(pDevice, tempBuffer, NULL, framesToRead);\n\n                    for (iChannel = 0; iChannel < pDevice->playback.internalChannels; ++iChannel) {\n                        ppDeinterleavedBuffers[iChannel] = (void*)ma_offset_ptr(pBufferList->mBuffers[iBuffer+iChannel].mData, (frameCountPerBuffer - framesRemaining) * ma_get_bytes_per_sample(pDevice->playback.internalFormat));\n                    }\n\n                    ma_deinterleave_pcm_frames(pDevice->playback.internalFormat, pDevice->playback.internalChannels, framesToRead, tempBuffer, ppDeinterleavedBuffers);\n\n                    framesRemaining -= framesToRead;\n                }\n            }\n        }\n    }\n\n    (void)pActionFlags;\n    (void)pTimeStamp;\n    (void)busNumber;\n    (void)frameCount;\n\n    return noErr;\n}\n\nstatic OSStatus ma_on_input__coreaudio(void* pUserData, AudioUnitRenderActionFlags* pActionFlags, const AudioTimeStamp* pTimeStamp, UInt32 busNumber, UInt32 frameCount, AudioBufferList* pUnusedBufferList)\n{\n    ma_device* pDevice = (ma_device*)pUserData;\n    AudioBufferList* pRenderedBufferList;\n    ma_result result;\n    ma_stream_layout layout;\n    ma_uint32 iBuffer;\n    OSStatus status;\n\n    MA_ASSERT(pDevice != NULL);\n\n    pRenderedBufferList = (AudioBufferList*)pDevice->coreaudio.pAudioBufferList;\n    MA_ASSERT(pRenderedBufferList);\n\n    /* We need to check whether or not we are outputting interleaved or non-interleaved samples. The way we do this is slightly different for each type. */\n    layout = ma_stream_layout_interleaved;\n    if (pRenderedBufferList->mBuffers[0].mNumberChannels != pDevice->capture.internalChannels) {\n        layout = ma_stream_layout_deinterleaved;\n    }\n\n    /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"INFO: Input Callback: busNumber=%d, frameCount=%d, mNumberBuffers=%d\\n\", (int)busNumber, (int)frameCount, (int)pRenderedBufferList->mNumberBuffers);*/\n\n    /*\n    There has been a situation reported where frame count passed into this function is greater than the capacity of\n    our capture buffer. There doesn't seem to be a reliable way to determine what the maximum frame count will be,\n    so we need to instead resort to dynamically reallocating our buffer to ensure it's large enough to capture the\n    number of frames requested by this callback.\n    */\n    result = ma_device_realloc_AudioBufferList__coreaudio(pDevice, frameCount, pDevice->capture.internalFormat, pDevice->capture.internalChannels, layout);\n    if (result != MA_SUCCESS) {\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"Failed to allocate AudioBufferList for capture.\\n\");\n        return noErr;\n    }\n\n    pRenderedBufferList = (AudioBufferList*)pDevice->coreaudio.pAudioBufferList;\n    MA_ASSERT(pRenderedBufferList);\n\n    /*\n    When you call AudioUnitRender(), Core Audio tries to be helpful by setting the mDataByteSize to the number of bytes\n    that were actually rendered. The problem with this is that the next call can fail with -50 due to the size no longer\n    being set to the capacity of the buffer, but instead the size in bytes of the previous render. This will cause a\n    problem when a future call to this callback specifies a larger number of frames.\n\n    To work around this we need to explicitly set the size of each buffer to their respective size in bytes.\n    */\n    for (iBuffer = 0; iBuffer < pRenderedBufferList->mNumberBuffers; ++iBuffer) {\n        pRenderedBufferList->mBuffers[iBuffer].mDataByteSize = pDevice->coreaudio.audioBufferCapInFrames * ma_get_bytes_per_sample(pDevice->capture.internalFormat) * pRenderedBufferList->mBuffers[iBuffer].mNumberChannels;\n    }\n\n    status = ((ma_AudioUnitRender_proc)pDevice->pContext->coreaudio.AudioUnitRender)((AudioUnit)pDevice->coreaudio.audioUnitCapture, pActionFlags, pTimeStamp, busNumber, frameCount, pRenderedBufferList);\n    if (status != noErr) {\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"  ERROR: AudioUnitRender() failed with %d.\\n\", (int)status);\n        return status;\n    }\n\n    if (layout == ma_stream_layout_interleaved) {\n        for (iBuffer = 0; iBuffer < pRenderedBufferList->mNumberBuffers; ++iBuffer) {\n            if (pRenderedBufferList->mBuffers[iBuffer].mNumberChannels == pDevice->capture.internalChannels) {\n                ma_device_handle_backend_data_callback(pDevice, NULL, pRenderedBufferList->mBuffers[iBuffer].mData, frameCount);\n                /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"  mDataByteSize=%d.\\n\", (int)pRenderedBufferList->mBuffers[iBuffer].mDataByteSize);*/\n            } else {\n                /*\n                This case is where the number of channels in the output buffer do not match our internal channels. It could mean that it's\n                not interleaved, in which case we can't handle right now since miniaudio does not yet support non-interleaved streams.\n                */\n                ma_uint8 silentBuffer[4096];\n                ma_uint32 framesRemaining;\n\n                MA_ZERO_MEMORY(silentBuffer, sizeof(silentBuffer));\n\n                framesRemaining = frameCount;\n                while (framesRemaining > 0) {\n                    ma_uint32 framesToSend = sizeof(silentBuffer) / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels);\n                    if (framesToSend > framesRemaining) {\n                        framesToSend = framesRemaining;\n                    }\n\n                    ma_device_handle_backend_data_callback(pDevice, NULL, silentBuffer, framesToSend);\n\n                    framesRemaining -= framesToSend;\n                }\n\n                /*ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_DEBUG, \"  WARNING: Outputting silence. frameCount=%d, mNumberChannels=%d, mDataByteSize=%d\\n\", (int)frameCount, (int)pRenderedBufferList->mBuffers[iBuffer].mNumberChannels, (int)pRenderedBufferList->mBuffers[iBuffer].mDataByteSize);*/\n            }\n        }\n    } else {\n        /* This is the deinterleaved case. We need to interleave the audio data before sending it to the client. This assumes each buffer is the same size. */\n        MA_ASSERT(pDevice->capture.internalChannels <= MA_MAX_CHANNELS);    /* This should have been validated at initialization time. */\n\n        /*\n        For safety we'll check that the internal channels is a multiple of the buffer count. If it's not it means something\n        very strange has happened and we're not going to support it.\n        */\n        if ((pRenderedBufferList->mNumberBuffers % pDevice->capture.internalChannels) == 0) {\n            ma_uint8 tempBuffer[4096];\n            for (iBuffer = 0; iBuffer < pRenderedBufferList->mNumberBuffers; iBuffer += pDevice->capture.internalChannels) {\n                ma_uint32 framesRemaining = frameCount;\n                while (framesRemaining > 0) {\n                    void* ppDeinterleavedBuffers[MA_MAX_CHANNELS];\n                    ma_uint32 iChannel;\n                    ma_uint32 framesToSend = sizeof(tempBuffer) / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels);\n                    if (framesToSend > framesRemaining) {\n                        framesToSend = framesRemaining;\n                    }\n\n                    for (iChannel = 0; iChannel < pDevice->capture.internalChannels; ++iChannel) {\n                        ppDeinterleavedBuffers[iChannel] = (void*)ma_offset_ptr(pRenderedBufferList->mBuffers[iBuffer+iChannel].mData, (frameCount - framesRemaining) * ma_get_bytes_per_sample(pDevice->capture.internalFormat));\n                    }\n\n                    ma_interleave_pcm_frames(pDevice->capture.internalFormat, pDevice->capture.internalChannels, framesToSend, (const void**)ppDeinterleavedBuffers, tempBuffer);\n                    ma_device_handle_backend_data_callback(pDevice, NULL, tempBuffer, framesToSend);\n\n                    framesRemaining -= framesToSend;\n                }\n            }\n        }\n    }\n\n    (void)pActionFlags;\n    (void)pTimeStamp;\n    (void)busNumber;\n    (void)frameCount;\n    (void)pUnusedBufferList;\n\n    return noErr;\n}\n\nstatic void on_start_stop__coreaudio(void* pUserData, AudioUnit audioUnit, AudioUnitPropertyID propertyID, AudioUnitScope scope, AudioUnitElement element)\n{\n    ma_device* pDevice = (ma_device*)pUserData;\n    MA_ASSERT(pDevice != NULL);\n\n    /* Don't do anything if it looks like we're just reinitializing due to a device switch. */\n    if (((audioUnit == pDevice->coreaudio.audioUnitPlayback) && pDevice->coreaudio.isSwitchingPlaybackDevice) ||\n        ((audioUnit == pDevice->coreaudio.audioUnitCapture)  && pDevice->coreaudio.isSwitchingCaptureDevice)) {\n        return;\n    }\n\n    /*\n    There's been a report of a deadlock here when triggered by ma_device_uninit(). It looks like\n    AudioUnitGetProprty (called below) and AudioComponentInstanceDispose (called in ma_device_uninit)\n    can try waiting on the same lock. I'm going to try working around this by not calling any Core\n    Audio APIs in the callback when the device has been stopped or uninitialized.\n    */\n    if (ma_device_get_state(pDevice) == ma_device_state_uninitialized || ma_device_get_state(pDevice) == ma_device_state_stopping || ma_device_get_state(pDevice) == ma_device_state_stopped) {\n        ma_device__on_notification_stopped(pDevice);\n    } else {\n        UInt32 isRunning;\n        UInt32 isRunningSize = sizeof(isRunning);\n        OSStatus status = ((ma_AudioUnitGetProperty_proc)pDevice->pContext->coreaudio.AudioUnitGetProperty)(audioUnit, kAudioOutputUnitProperty_IsRunning, scope, element, &isRunning, &isRunningSize);\n        if (status != noErr) {\n            goto done; /* Don't really know what to do in this case... just ignore it, I suppose... */\n        }\n\n        if (!isRunning) {\n            /*\n            The stop event is a bit annoying in Core Audio because it will be called when we automatically switch the default device. Some scenarios to consider:\n\n            1) When the device is unplugged, this will be called _before_ the default device change notification.\n            2) When the device is changed via the default device change notification, this will be called _after_ the switch.\n\n            For case #1, we just check if there's a new default device available. If so, we just ignore the stop event. For case #2 we check a flag.\n            */\n            if (((audioUnit == pDevice->coreaudio.audioUnitPlayback) && pDevice->coreaudio.isDefaultPlaybackDevice) ||\n                ((audioUnit == pDevice->coreaudio.audioUnitCapture)  && pDevice->coreaudio.isDefaultCaptureDevice)) {\n                /*\n                It looks like the device is switching through an external event, such as the user unplugging the device or changing the default device\n                via the operating system's sound settings. If we're re-initializing the device, we just terminate because we want the stopping of the\n                device to be seamless to the client (we don't want them receiving the stopped event and thinking that the device has stopped when it\n                hasn't!).\n                */\n                if (((audioUnit == pDevice->coreaudio.audioUnitPlayback) && pDevice->coreaudio.isSwitchingPlaybackDevice) ||\n                    ((audioUnit == pDevice->coreaudio.audioUnitCapture)  && pDevice->coreaudio.isSwitchingCaptureDevice)) {\n                    goto done;\n                }\n\n                /*\n                Getting here means the device is not reinitializing which means it may have been unplugged. From what I can see, it looks like Core Audio\n                will try switching to the new default device seamlessly. We need to somehow find a way to determine whether or not Core Audio will most\n                likely be successful in switching to the new device.\n\n                TODO: Try to predict if Core Audio will switch devices. If not, the stopped callback needs to be posted.\n                */\n                goto done;\n            }\n\n            /* Getting here means we need to stop the device. */\n            ma_device__on_notification_stopped(pDevice);\n        }\n    }\n\n    (void)propertyID; /* Unused. */\n\ndone:\n    /* Always signal the stop event. It's possible for the \"else\" case to get hit which can happen during an interruption. */\n    ma_event_signal(&pDevice->coreaudio.stopEvent);\n}\n\n#if defined(MA_APPLE_DESKTOP)\nstatic ma_spinlock g_DeviceTrackingInitLock_CoreAudio = 0;  /* A spinlock for mutal exclusion of the init/uninit of the global tracking data. Initialization to 0 is what we need. */\nstatic ma_uint32   g_DeviceTrackingInitCounter_CoreAudio = 0;\nstatic ma_mutex    g_DeviceTrackingMutex_CoreAudio;\nstatic ma_device** g_ppTrackedDevices_CoreAudio = NULL;\nstatic ma_uint32   g_TrackedDeviceCap_CoreAudio = 0;\nstatic ma_uint32   g_TrackedDeviceCount_CoreAudio = 0;\n\nstatic OSStatus ma_default_device_changed__coreaudio(AudioObjectID objectID, UInt32 addressCount, const AudioObjectPropertyAddress* pAddresses, void* pUserData)\n{\n    ma_device_type deviceType;\n\n    /* Not sure if I really need to check this, but it makes me feel better. */\n    if (addressCount == 0) {\n        return noErr;\n    }\n\n    if (pAddresses[0].mSelector == kAudioHardwarePropertyDefaultOutputDevice) {\n        deviceType = ma_device_type_playback;\n    } else if (pAddresses[0].mSelector == kAudioHardwarePropertyDefaultInputDevice) {\n        deviceType = ma_device_type_capture;\n    } else {\n        return noErr;   /* Should never hit this. */\n    }\n\n    ma_mutex_lock(&g_DeviceTrackingMutex_CoreAudio);\n    {\n        ma_uint32 iDevice;\n        for (iDevice = 0; iDevice < g_TrackedDeviceCount_CoreAudio; iDevice += 1) {\n            ma_result reinitResult;\n            ma_device* pDevice;\n\n            pDevice = g_ppTrackedDevices_CoreAudio[iDevice];\n            if (pDevice->type == deviceType || pDevice->type == ma_device_type_duplex) {\n                if (deviceType == ma_device_type_playback) {\n                    pDevice->coreaudio.isSwitchingPlaybackDevice = MA_TRUE;\n                    reinitResult = ma_device_reinit_internal__coreaudio(pDevice, deviceType, MA_TRUE);\n                    pDevice->coreaudio.isSwitchingPlaybackDevice = MA_FALSE;\n                } else {\n                    pDevice->coreaudio.isSwitchingCaptureDevice = MA_TRUE;\n                    reinitResult = ma_device_reinit_internal__coreaudio(pDevice, deviceType, MA_TRUE);\n                    pDevice->coreaudio.isSwitchingCaptureDevice = MA_FALSE;\n                }\n\n                if (reinitResult == MA_SUCCESS) {\n                    ma_device__post_init_setup(pDevice, deviceType);\n\n                    /* Restart the device if required. If this fails we need to stop the device entirely. */\n                    if (ma_device_get_state(pDevice) == ma_device_state_started) {\n                        OSStatus status;\n                        if (deviceType == ma_device_type_playback) {\n                            status = ((ma_AudioOutputUnitStart_proc)pDevice->pContext->coreaudio.AudioOutputUnitStart)((AudioUnit)pDevice->coreaudio.audioUnitPlayback);\n                            if (status != noErr) {\n                                if (pDevice->type == ma_device_type_duplex) {\n                                    ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitCapture);\n                                }\n                                ma_device__set_state(pDevice, ma_device_state_stopped);\n                            }\n                        } else if (deviceType == ma_device_type_capture) {\n                            status = ((ma_AudioOutputUnitStart_proc)pDevice->pContext->coreaudio.AudioOutputUnitStart)((AudioUnit)pDevice->coreaudio.audioUnitCapture);\n                            if (status != noErr) {\n                                if (pDevice->type == ma_device_type_duplex) {\n                                    ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitPlayback);\n                                }\n                                ma_device__set_state(pDevice, ma_device_state_stopped);\n                            }\n                        }\n                    }\n\n                    ma_device__on_notification_rerouted(pDevice);\n                }\n            }\n        }\n    }\n    ma_mutex_unlock(&g_DeviceTrackingMutex_CoreAudio);\n\n    /* Unused parameters. */\n    (void)objectID;\n    (void)pUserData;\n\n    return noErr;\n}\n\nstatic ma_result ma_context__init_device_tracking__coreaudio(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n\n    ma_spinlock_lock(&g_DeviceTrackingInitLock_CoreAudio);\n    {\n        /* Don't do anything if we've already initializd device tracking. */\n        if (g_DeviceTrackingInitCounter_CoreAudio == 0) {\n            AudioObjectPropertyAddress propAddress;\n            propAddress.mScope    = kAudioObjectPropertyScopeGlobal;\n            propAddress.mElement  = AUDIO_OBJECT_PROPERTY_ELEMENT;\n\n            ma_mutex_init(&g_DeviceTrackingMutex_CoreAudio);\n\n            propAddress.mSelector = kAudioHardwarePropertyDefaultInputDevice;\n            ((ma_AudioObjectAddPropertyListener_proc)pContext->coreaudio.AudioObjectAddPropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL);\n\n            propAddress.mSelector = kAudioHardwarePropertyDefaultOutputDevice;\n            ((ma_AudioObjectAddPropertyListener_proc)pContext->coreaudio.AudioObjectAddPropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL);\n\n        }\n        g_DeviceTrackingInitCounter_CoreAudio += 1;\n    }\n    ma_spinlock_unlock(&g_DeviceTrackingInitLock_CoreAudio);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context__uninit_device_tracking__coreaudio(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n\n    ma_spinlock_lock(&g_DeviceTrackingInitLock_CoreAudio);\n    {\n        if (g_DeviceTrackingInitCounter_CoreAudio > 0)\n            g_DeviceTrackingInitCounter_CoreAudio -= 1;\n\n        if (g_DeviceTrackingInitCounter_CoreAudio == 0) {\n            AudioObjectPropertyAddress propAddress;\n            propAddress.mScope    = kAudioObjectPropertyScopeGlobal;\n            propAddress.mElement  = AUDIO_OBJECT_PROPERTY_ELEMENT;\n\n            propAddress.mSelector = kAudioHardwarePropertyDefaultInputDevice;\n            ((ma_AudioObjectRemovePropertyListener_proc)pContext->coreaudio.AudioObjectRemovePropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL);\n\n            propAddress.mSelector = kAudioHardwarePropertyDefaultOutputDevice;\n            ((ma_AudioObjectRemovePropertyListener_proc)pContext->coreaudio.AudioObjectRemovePropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL);\n\n            /* At this point there should be no tracked devices. If not there's an error somewhere. */\n            if (g_ppTrackedDevices_CoreAudio != NULL) {\n                ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, \"You have uninitialized all contexts while an associated device is still active.\");\n                ma_spinlock_unlock(&g_DeviceTrackingInitLock_CoreAudio);\n                return MA_INVALID_OPERATION;\n            }\n\n            ma_mutex_uninit(&g_DeviceTrackingMutex_CoreAudio);\n        }\n    }\n    ma_spinlock_unlock(&g_DeviceTrackingInitLock_CoreAudio);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device__track__coreaudio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    ma_mutex_lock(&g_DeviceTrackingMutex_CoreAudio);\n    {\n        /* Allocate memory if required. */\n        if (g_TrackedDeviceCap_CoreAudio <= g_TrackedDeviceCount_CoreAudio) {\n            ma_uint32 newCap;\n            ma_device** ppNewDevices;\n\n            newCap = g_TrackedDeviceCap_CoreAudio * 2;\n            if (newCap == 0) {\n                newCap = 1;\n            }\n\n            ppNewDevices = (ma_device**)ma_realloc(g_ppTrackedDevices_CoreAudio, sizeof(*g_ppTrackedDevices_CoreAudio)*newCap, &pDevice->pContext->allocationCallbacks);\n            if (ppNewDevices == NULL) {\n                ma_mutex_unlock(&g_DeviceTrackingMutex_CoreAudio);\n                return MA_OUT_OF_MEMORY;\n            }\n\n            g_ppTrackedDevices_CoreAudio = ppNewDevices;\n            g_TrackedDeviceCap_CoreAudio = newCap;\n        }\n\n        g_ppTrackedDevices_CoreAudio[g_TrackedDeviceCount_CoreAudio] = pDevice;\n        g_TrackedDeviceCount_CoreAudio += 1;\n    }\n    ma_mutex_unlock(&g_DeviceTrackingMutex_CoreAudio);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device__untrack__coreaudio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    ma_mutex_lock(&g_DeviceTrackingMutex_CoreAudio);\n    {\n        ma_uint32 iDevice;\n        for (iDevice = 0; iDevice < g_TrackedDeviceCount_CoreAudio; iDevice += 1) {\n            if (g_ppTrackedDevices_CoreAudio[iDevice] == pDevice) {\n                /* We've found the device. We now need to remove it from the list. */\n                ma_uint32 jDevice;\n                for (jDevice = iDevice; jDevice < g_TrackedDeviceCount_CoreAudio-1; jDevice += 1) {\n                    g_ppTrackedDevices_CoreAudio[jDevice] = g_ppTrackedDevices_CoreAudio[jDevice+1];\n                }\n\n                g_TrackedDeviceCount_CoreAudio -= 1;\n\n                /* If there's nothing else in the list we need to free memory. */\n                if (g_TrackedDeviceCount_CoreAudio == 0) {\n                    ma_free(g_ppTrackedDevices_CoreAudio, &pDevice->pContext->allocationCallbacks);\n                    g_ppTrackedDevices_CoreAudio = NULL;\n                    g_TrackedDeviceCap_CoreAudio = 0;\n                }\n\n                break;\n            }\n        }\n    }\n    ma_mutex_unlock(&g_DeviceTrackingMutex_CoreAudio);\n\n    return MA_SUCCESS;\n}\n#endif\n\n#if defined(MA_APPLE_MOBILE)\n@interface ma_ios_notification_handler:NSObject {\n    ma_device* m_pDevice;\n}\n@end\n\n@implementation ma_ios_notification_handler\n-(id)init:(ma_device*)pDevice\n{\n    self = [super init];\n    m_pDevice = pDevice;\n\n    /* For route changes. */\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handle_route_change:) name:AVAudioSessionRouteChangeNotification object:[AVAudioSession sharedInstance]];\n\n    /* For interruptions. */\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handle_interruption:) name:AVAudioSessionInterruptionNotification object:[AVAudioSession sharedInstance]];\n\n    return self;\n}\n\n-(void)dealloc\n{\n    [self remove_handler];\n\n    #if defined(__has_feature)\n        #if !__has_feature(objc_arc)\n            [super dealloc];\n        #endif\n    #endif\n}\n\n-(void)remove_handler\n{\n    [[NSNotificationCenter defaultCenter] removeObserver:self name:AVAudioSessionRouteChangeNotification object:nil];\n    [[NSNotificationCenter defaultCenter] removeObserver:self name:AVAudioSessionInterruptionNotification object:nil];\n}\n\n-(void)handle_interruption:(NSNotification*)pNotification\n{\n    NSInteger type = [[[pNotification userInfo] objectForKey:AVAudioSessionInterruptionTypeKey] integerValue];\n    switch (type)\n    {\n        case AVAudioSessionInterruptionTypeBegan:\n        {\n            ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, \"[Core Audio] Interruption: AVAudioSessionInterruptionTypeBegan\\n\");\n\n            /*\n            Core Audio will have stopped the internal device automatically, but we need explicitly\n            stop it at a higher level to ensure miniaudio-specific state is updated for consistency.\n            */\n            ma_device_stop(m_pDevice);\n\n            /*\n            Fire the notification after the device has been stopped to ensure it's in the correct\n            state when the notification handler is invoked.\n            */\n            ma_device__on_notification_interruption_began(m_pDevice);\n        } break;\n\n        case AVAudioSessionInterruptionTypeEnded:\n        {\n            ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, \"[Core Audio] Interruption: AVAudioSessionInterruptionTypeEnded\\n\");\n            ma_device__on_notification_interruption_ended(m_pDevice);\n        } break;\n    }\n}\n\n-(void)handle_route_change:(NSNotification*)pNotification\n{\n    AVAudioSession* pSession = [AVAudioSession sharedInstance];\n\n    NSInteger reason = [[[pNotification userInfo] objectForKey:AVAudioSessionRouteChangeReasonKey] integerValue];\n    switch (reason)\n    {\n        case AVAudioSessionRouteChangeReasonOldDeviceUnavailable:\n        {\n            ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, \"[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonOldDeviceUnavailable\\n\");\n        } break;\n\n        case AVAudioSessionRouteChangeReasonNewDeviceAvailable:\n        {\n            ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, \"[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonNewDeviceAvailable\\n\");\n        } break;\n\n        case AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory:\n        {\n            ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, \"[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory\\n\");\n        } break;\n\n        case AVAudioSessionRouteChangeReasonWakeFromSleep:\n        {\n            ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, \"[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonWakeFromSleep\\n\");\n        } break;\n\n        case AVAudioSessionRouteChangeReasonOverride:\n        {\n            ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, \"[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonOverride\\n\");\n        } break;\n\n        case AVAudioSessionRouteChangeReasonCategoryChange:\n        {\n            ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, \"[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonCategoryChange\\n\");\n        } break;\n\n        case AVAudioSessionRouteChangeReasonUnknown:\n        default:\n        {\n            ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_INFO, \"[Core Audio] Route Changed: AVAudioSessionRouteChangeReasonUnknown\\n\");\n        } break;\n    }\n\n    ma_log_postf(ma_device_get_log(m_pDevice), MA_LOG_LEVEL_DEBUG, \"[Core Audio] Changing Route. inputNumberChannels=%d; outputNumberOfChannels=%d\\n\", (int)pSession.inputNumberOfChannels, (int)pSession.outputNumberOfChannels);\n\n    /* Let the application know about the route change. */\n    ma_device__on_notification_rerouted(m_pDevice);\n}\n@end\n#endif\n\nstatic ma_result ma_device_uninit__coreaudio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_uninitialized);\n\n#if defined(MA_APPLE_DESKTOP)\n    /*\n    Make sure we're no longer tracking the device. It doesn't matter if we call this for a non-default device because it'll\n    just gracefully ignore it.\n    */\n    ma_device__untrack__coreaudio(pDevice);\n#endif\n#if defined(MA_APPLE_MOBILE)\n    if (pDevice->coreaudio.pNotificationHandler != NULL) {\n        ma_ios_notification_handler* pNotificationHandler = (MA_BRIDGE_TRANSFER ma_ios_notification_handler*)pDevice->coreaudio.pNotificationHandler;\n        [pNotificationHandler remove_handler];\n    }\n#endif\n\n    if (pDevice->coreaudio.audioUnitCapture != NULL) {\n        ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitCapture);\n    }\n    if (pDevice->coreaudio.audioUnitPlayback != NULL) {\n        ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitPlayback);\n    }\n\n    if (pDevice->coreaudio.pAudioBufferList) {\n        ma_free(pDevice->coreaudio.pAudioBufferList, &pDevice->pContext->allocationCallbacks);\n    }\n\n    return MA_SUCCESS;\n}\n\ntypedef struct\n{\n    ma_bool32 allowNominalSampleRateChange;\n\n    /* Input. */\n    ma_format formatIn;\n    ma_uint32 channelsIn;\n    ma_uint32 sampleRateIn;\n    ma_channel channelMapIn[MA_MAX_CHANNELS];\n    ma_uint32 periodSizeInFramesIn;\n    ma_uint32 periodSizeInMillisecondsIn;\n    ma_uint32 periodsIn;\n    ma_share_mode shareMode;\n    ma_performance_profile performanceProfile;\n    ma_bool32 registerStopEvent;\n\n    /* Output. */\n#if defined(MA_APPLE_DESKTOP)\n    AudioObjectID deviceObjectID;\n#endif\n    AudioComponent component;\n    AudioUnit audioUnit;\n    AudioBufferList* pAudioBufferList;  /* Only used for input devices. */\n    ma_format formatOut;\n    ma_uint32 channelsOut;\n    ma_uint32 sampleRateOut;\n    ma_channel channelMapOut[MA_MAX_CHANNELS];\n    ma_uint32 periodSizeInFramesOut;\n    ma_uint32 periodsOut;\n    char deviceName[256];\n} ma_device_init_internal_data__coreaudio;\n\nstatic ma_result ma_device_init_internal__coreaudio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_init_internal_data__coreaudio* pData, void* pDevice_DoNotReference)   /* <-- pDevice is typed as void* intentionally so as to avoid accidentally referencing it. */\n{\n    ma_result result;\n    OSStatus status;\n    UInt32 enableIOFlag;\n    AudioStreamBasicDescription bestFormat;\n    UInt32 actualPeriodSizeInFrames;\n    AURenderCallbackStruct callbackInfo;\n#if defined(MA_APPLE_DESKTOP)\n    AudioObjectID deviceObjectID;\n#endif\n\n    /* This API should only be used for a single device type: playback or capture. No full-duplex mode. */\n    if (deviceType == ma_device_type_duplex) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(deviceType == ma_device_type_playback || deviceType == ma_device_type_capture);\n\n#if defined(MA_APPLE_DESKTOP)\n    pData->deviceObjectID = 0;\n#endif\n    pData->component = NULL;\n    pData->audioUnit = NULL;\n    pData->pAudioBufferList = NULL;\n\n#if defined(MA_APPLE_DESKTOP)\n    result = ma_find_AudioObjectID(pContext, deviceType, pDeviceID, &deviceObjectID);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pData->deviceObjectID = deviceObjectID;\n#endif\n\n    /* Core audio doesn't really use the notion of a period so we can leave this unmodified, but not too over the top. */\n    pData->periodsOut = pData->periodsIn;\n    if (pData->periodsOut == 0) {\n        pData->periodsOut = MA_DEFAULT_PERIODS;\n    }\n    if (pData->periodsOut > 16) {\n        pData->periodsOut = 16;\n    }\n\n\n    /* Audio unit. */\n    status = ((ma_AudioComponentInstanceNew_proc)pContext->coreaudio.AudioComponentInstanceNew)((AudioComponent)pContext->coreaudio.component, (AudioUnit*)&pData->audioUnit);\n    if (status != noErr) {\n        return ma_result_from_OSStatus(status);\n    }\n\n\n    /* The input/output buses need to be explicitly enabled and disabled. We set the flag based on the output unit first, then we just swap it for input. */\n    enableIOFlag = 1;\n    if (deviceType == ma_device_type_capture) {\n        enableIOFlag = 0;\n    }\n\n    status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Output, MA_COREAUDIO_OUTPUT_BUS, &enableIOFlag, sizeof(enableIOFlag));\n    if (status != noErr) {\n        ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n        return ma_result_from_OSStatus(status);\n    }\n\n    enableIOFlag = (enableIOFlag == 0) ? 1 : 0;\n    status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, MA_COREAUDIO_INPUT_BUS, &enableIOFlag, sizeof(enableIOFlag));\n    if (status != noErr) {\n        ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n        return ma_result_from_OSStatus(status);\n    }\n\n\n    /* Set the device to use with this audio unit. This is only used on desktop since we are using defaults on mobile. */\n#if defined(MA_APPLE_DESKTOP)\n    status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, 0, &deviceObjectID, sizeof(deviceObjectID));\n    if (status != noErr) {\n        ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n        return ma_result_from_OSStatus(result);\n    }\n#else\n    /*\n    For some reason it looks like Apple is only allowing selection of the input device. There does not appear to be any way to change\n    the default output route. I have no idea why this is like this, but for now we'll only be able to configure capture devices.\n    */\n    if (pDeviceID != NULL) {\n        if (deviceType == ma_device_type_capture) {\n            ma_bool32 found = MA_FALSE;\n            NSArray *pInputs = [[[AVAudioSession sharedInstance] currentRoute] inputs];\n            for (AVAudioSessionPortDescription* pPortDesc in pInputs) {\n                if (strcmp(pDeviceID->coreaudio, [pPortDesc.UID UTF8String]) == 0) {\n                    [[AVAudioSession sharedInstance] setPreferredInput:pPortDesc error:nil];\n                    found = MA_TRUE;\n                    break;\n                }\n            }\n\n            if (found == MA_FALSE) {\n                return MA_DOES_NOT_EXIST;\n            }\n        }\n    }\n#endif\n\n    /*\n    Format. This is the hardest part of initialization because there's a few variables to take into account.\n      1) The format must be supported by the device.\n      2) The format must be supported miniaudio.\n      3) There's a priority that miniaudio prefers.\n\n    Ideally we would like to use a format that's as close to the hardware as possible so we can get as close to a passthrough as possible. The\n    most important property is the sample rate. miniaudio can do format conversion for any sample rate and channel count, but cannot do the same\n    for the sample data format. If the sample data format is not supported by miniaudio it must be ignored completely.\n\n    On mobile platforms this is a bit different. We just force the use of whatever the audio unit's current format is set to.\n    */\n    {\n        AudioStreamBasicDescription origFormat;\n        UInt32 origFormatSize = sizeof(origFormat);\n        AudioUnitScope   formatScope   = (deviceType == ma_device_type_playback) ? kAudioUnitScope_Input : kAudioUnitScope_Output;\n        AudioUnitElement formatElement = (deviceType == ma_device_type_playback) ? MA_COREAUDIO_OUTPUT_BUS : MA_COREAUDIO_INPUT_BUS;\n\n        if (deviceType == ma_device_type_playback) {\n            status = ((ma_AudioUnitGetProperty_proc)pContext->coreaudio.AudioUnitGetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, MA_COREAUDIO_OUTPUT_BUS, &origFormat, &origFormatSize);\n        } else {\n            status = ((ma_AudioUnitGetProperty_proc)pContext->coreaudio.AudioUnitGetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, MA_COREAUDIO_INPUT_BUS, &origFormat, &origFormatSize);\n        }\n        if (status != noErr) {\n            ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n            return ma_result_from_OSStatus(status);\n        }\n\n    #if defined(MA_APPLE_DESKTOP)\n        result = ma_find_best_format__coreaudio(pContext, deviceObjectID, deviceType, pData->formatIn, pData->channelsIn, pData->sampleRateIn, &origFormat, &bestFormat);\n        if (result != MA_SUCCESS) {\n            ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n            return result;\n        }\n\n        /*\n        Technical Note TN2091: Device input using the HAL Output Audio Unit\n            https://developer.apple.com/library/archive/technotes/tn2091/_index.html\n\n        This documentation says the following:\n\n            The internal AudioConverter can handle any *simple* conversion. Typically, this means that a client can specify ANY\n            variant of the PCM formats. Consequently, the device's sample rate should match the desired sample rate. If sample rate\n            conversion is needed, it can be accomplished by buffering the input and converting the data on a separate thread with\n            another AudioConverter.\n\n        The important part here is the mention that it can handle *simple* conversions, which does *not* include sample rate. We\n        therefore want to ensure the sample rate stays consistent. This document is specifically for input, but I'm going to play it\n        safe and apply the same rule to output as well.\n\n        I have tried going against the documentation by setting the sample rate anyway, but this just results in AudioUnitRender()\n        returning a result code of -10863. I have also tried changing the format directly on the input scope on the input bus, but\n        this just results in `ca_require: IsStreamFormatWritable(inScope, inElement) NotWritable` when trying to set the format.\n\n        Something that does seem to work, however, has been setting the nominal sample rate on the deivce object. The problem with\n        this, however, is that it actually changes the sample rate at the operating system level and not just the application. This\n        could be intrusive to the user, however, so I don't think it's wise to make this the default. Instead I'm making this a\n        configuration option. When the `coreaudio.allowNominalSampleRateChange` config option is set to true, changing the sample\n        rate will be allowed. Otherwise it'll be fixed to the current sample rate. To check the system-defined sample rate, run\n        the Audio MIDI Setup program that comes installed on macOS and observe how the sample rate changes as the sample rate is\n        changed by miniaudio.\n        */\n        if (pData->allowNominalSampleRateChange) {\n            AudioValueRange sampleRateRange;\n            AudioObjectPropertyAddress propAddress;\n\n            sampleRateRange.mMinimum = bestFormat.mSampleRate;\n            sampleRateRange.mMaximum = bestFormat.mSampleRate;\n\n            propAddress.mSelector = kAudioDevicePropertyNominalSampleRate;\n            propAddress.mScope    = (deviceType == ma_device_type_playback) ? kAudioObjectPropertyScopeOutput : kAudioObjectPropertyScopeInput;\n            propAddress.mElement  = AUDIO_OBJECT_PROPERTY_ELEMENT;\n\n            status = ((ma_AudioObjectSetPropertyData_proc)pContext->coreaudio.AudioObjectSetPropertyData)(deviceObjectID, &propAddress, 0, NULL, sizeof(sampleRateRange), &sampleRateRange);\n            if (status != noErr) {\n                bestFormat.mSampleRate = origFormat.mSampleRate;\n            }\n        } else {\n            bestFormat.mSampleRate = origFormat.mSampleRate;\n        }\n\n        status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, formatScope, formatElement, &bestFormat, sizeof(bestFormat));\n        if (status != noErr) {\n            /* We failed to set the format, so fall back to the current format of the audio unit. */\n            bestFormat = origFormat;\n        }\n    #else\n        bestFormat = origFormat;\n\n        /*\n        Sample rate is a little different here because for some reason kAudioUnitProperty_StreamFormat returns 0... Oh well. We need to instead try\n        setting the sample rate to what the user has requested and then just see the results of it. Need to use some Objective-C here for this since\n        it depends on Apple's AVAudioSession API. To do this we just get the shared AVAudioSession instance and then set it. Note that from what I\n        can tell, it looks like the sample rate is shared between playback and capture for everything.\n        */\n        @autoreleasepool {\n            AVAudioSession* pAudioSession = [AVAudioSession sharedInstance];\n            MA_ASSERT(pAudioSession != NULL);\n\n            [pAudioSession setPreferredSampleRate:(double)pData->sampleRateIn error:nil];\n            bestFormat.mSampleRate = pAudioSession.sampleRate;\n\n            /*\n            I've had a report that the channel count returned by AudioUnitGetProperty above is inconsistent with\n            AVAudioSession outputNumberOfChannels. I'm going to try using the AVAudioSession values instead.\n            */\n            if (deviceType == ma_device_type_playback) {\n                bestFormat.mChannelsPerFrame = (UInt32)pAudioSession.outputNumberOfChannels;\n            }\n            if (deviceType == ma_device_type_capture) {\n                bestFormat.mChannelsPerFrame = (UInt32)pAudioSession.inputNumberOfChannels;\n            }\n        }\n\n        status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, formatScope, formatElement, &bestFormat, sizeof(bestFormat));\n        if (status != noErr) {\n            ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n            return ma_result_from_OSStatus(status);\n        }\n    #endif\n\n        result = ma_format_from_AudioStreamBasicDescription(&bestFormat, &pData->formatOut);\n        if (result != MA_SUCCESS) {\n            ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n            return result;\n        }\n\n        if (pData->formatOut == ma_format_unknown) {\n            ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n            return MA_FORMAT_NOT_SUPPORTED;\n        }\n\n        pData->channelsOut   = bestFormat.mChannelsPerFrame;\n        pData->sampleRateOut = (ma_uint32)(bestFormat.mSampleRate);\n    }\n\n    /* Clamp the channel count for safety. */\n    if (pData->channelsOut > MA_MAX_CHANNELS) {\n        pData->channelsOut = MA_MAX_CHANNELS;\n    }\n\n    /*\n    Internal channel map. This is weird in my testing. If I use the AudioObject to get the\n    channel map, the channel descriptions are set to \"Unknown\" for some reason. To work around\n    this it looks like retrieving it from the AudioUnit will work. However, and this is where\n    it gets weird, it doesn't seem to work with capture devices, nor at all on iOS... Therefore\n    I'm going to fall back to a default assumption in these cases.\n    */\n#if defined(MA_APPLE_DESKTOP)\n    result = ma_get_AudioUnit_channel_map(pContext, pData->audioUnit, deviceType, pData->channelMapOut, pData->channelsOut);\n    if (result != MA_SUCCESS) {\n    #if 0\n        /* Try falling back to the channel map from the AudioObject. */\n        result = ma_get_AudioObject_channel_map(pContext, deviceObjectID, deviceType, pData->channelMapOut, pData->channelsOut);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    #else\n        /* Fall back to default assumptions. */\n        ma_channel_map_init_standard(ma_standard_channel_map_default, pData->channelMapOut, ma_countof(pData->channelMapOut), pData->channelsOut);\n    #endif\n    }\n#else\n    /* TODO: Figure out how to get the channel map using AVAudioSession. */\n    ma_channel_map_init_standard(ma_standard_channel_map_default, pData->channelMapOut, ma_countof(pData->channelMapOut), pData->channelsOut);\n#endif\n\n\n    /* Buffer size. Not allowing this to be configurable on iOS. */\n    if (pData->periodSizeInFramesIn == 0) {\n        if (pData->periodSizeInMillisecondsIn == 0) {\n            if (pData->performanceProfile == ma_performance_profile_low_latency) {\n                actualPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY, pData->sampleRateOut);\n            } else {\n                actualPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE, pData->sampleRateOut);\n            }\n        } else {\n            actualPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(pData->periodSizeInMillisecondsIn, pData->sampleRateOut);\n        }\n    } else {\n        actualPeriodSizeInFrames = pData->periodSizeInFramesIn;\n    }\n\n#if defined(MA_APPLE_DESKTOP)\n    result = ma_set_AudioObject_buffer_size_in_frames(pContext, deviceObjectID, deviceType, &actualPeriodSizeInFrames);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n#else\n    /*\n    On iOS, the size of the IO buffer needs to be specified in seconds and is a floating point\n    number. I don't trust any potential truncation errors due to converting from float to integer\n    so I'm going to explicitly set the actual period size to the next power of 2.\n    */\n    @autoreleasepool {\n        AVAudioSession* pAudioSession = [AVAudioSession sharedInstance];\n        MA_ASSERT(pAudioSession != NULL);\n\n        [pAudioSession setPreferredIOBufferDuration:((float)actualPeriodSizeInFrames / pAudioSession.sampleRate) error:nil];\n        actualPeriodSizeInFrames = ma_next_power_of_2((ma_uint32)(pAudioSession.IOBufferDuration * pAudioSession.sampleRate));\n    }\n#endif\n\n\n    /*\n    During testing I discovered that the buffer size can be too big. You'll get an error like this:\n\n      kAudioUnitErr_TooManyFramesToProcess : inFramesToProcess=4096, mMaxFramesPerSlice=512\n\n    Note how inFramesToProcess is smaller than mMaxFramesPerSlice. To fix, we need to set kAudioUnitProperty_MaximumFramesPerSlice to that\n    of the size of our buffer, or do it the other way around and set our buffer size to the kAudioUnitProperty_MaximumFramesPerSlice.\n    */\n    status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, &actualPeriodSizeInFrames, sizeof(actualPeriodSizeInFrames));\n    if (status != noErr) {\n        ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n        return ma_result_from_OSStatus(status);\n    }\n\n    pData->periodSizeInFramesOut = (ma_uint32)actualPeriodSizeInFrames;\n\n    /* We need a buffer list if this is an input device. We render into this in the input callback. */\n    if (deviceType == ma_device_type_capture) {\n        ma_bool32 isInterleaved = (bestFormat.mFormatFlags & kAudioFormatFlagIsNonInterleaved) == 0;\n        AudioBufferList* pBufferList;\n\n        pBufferList = ma_allocate_AudioBufferList__coreaudio(pData->periodSizeInFramesOut, pData->formatOut, pData->channelsOut, (isInterleaved) ? ma_stream_layout_interleaved : ma_stream_layout_deinterleaved, &pContext->allocationCallbacks);\n        if (pBufferList == NULL) {\n            ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n            return MA_OUT_OF_MEMORY;\n        }\n\n        pData->pAudioBufferList = pBufferList;\n    }\n\n    /* Callbacks. */\n    callbackInfo.inputProcRefCon = pDevice_DoNotReference;\n    if (deviceType == ma_device_type_playback) {\n        callbackInfo.inputProc = ma_on_output__coreaudio;\n        status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Global, 0, &callbackInfo, sizeof(callbackInfo));\n        if (status != noErr) {\n            ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n            return ma_result_from_OSStatus(status);\n        }\n    } else {\n        callbackInfo.inputProc = ma_on_input__coreaudio;\n        status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioOutputUnitProperty_SetInputCallback, kAudioUnitScope_Global, 0, &callbackInfo, sizeof(callbackInfo));\n        if (status != noErr) {\n            ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n            return ma_result_from_OSStatus(status);\n        }\n    }\n\n    /* We need to listen for stop events. */\n    if (pData->registerStopEvent) {\n        status = ((ma_AudioUnitAddPropertyListener_proc)pContext->coreaudio.AudioUnitAddPropertyListener)(pData->audioUnit, kAudioOutputUnitProperty_IsRunning, on_start_stop__coreaudio, pDevice_DoNotReference);\n        if (status != noErr) {\n            ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n            return ma_result_from_OSStatus(status);\n        }\n    }\n\n    /* Initialize the audio unit. */\n    status = ((ma_AudioUnitInitialize_proc)pContext->coreaudio.AudioUnitInitialize)(pData->audioUnit);\n    if (status != noErr) {\n        ma_free(pData->pAudioBufferList, &pContext->allocationCallbacks);\n        pData->pAudioBufferList = NULL;\n        ((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);\n        return ma_result_from_OSStatus(status);\n    }\n\n    /* Grab the name. */\n#if defined(MA_APPLE_DESKTOP)\n    ma_get_AudioObject_name(pContext, deviceObjectID, sizeof(pData->deviceName), pData->deviceName);\n#else\n    if (deviceType == ma_device_type_playback) {\n        ma_strcpy_s(pData->deviceName, sizeof(pData->deviceName), MA_DEFAULT_PLAYBACK_DEVICE_NAME);\n    } else {\n        ma_strcpy_s(pData->deviceName, sizeof(pData->deviceName), MA_DEFAULT_CAPTURE_DEVICE_NAME);\n    }\n#endif\n\n    return result;\n}\n\n#if defined(MA_APPLE_DESKTOP)\nstatic ma_result ma_device_reinit_internal__coreaudio(ma_device* pDevice, ma_device_type deviceType, ma_bool32 disposePreviousAudioUnit)\n{\n    ma_device_init_internal_data__coreaudio data;\n    ma_result result;\n\n    /* This should only be called for playback or capture, not duplex. */\n    if (deviceType == ma_device_type_duplex) {\n        return MA_INVALID_ARGS;\n    }\n\n    data.allowNominalSampleRateChange = MA_FALSE;   /* Don't change the nominal sample rate when switching devices. */\n\n    if (deviceType == ma_device_type_capture) {\n        data.formatIn               = pDevice->capture.format;\n        data.channelsIn             = pDevice->capture.channels;\n        data.sampleRateIn           = pDevice->sampleRate;\n        MA_COPY_MEMORY(data.channelMapIn, pDevice->capture.channelMap, sizeof(pDevice->capture.channelMap));\n        data.shareMode              = pDevice->capture.shareMode;\n        data.performanceProfile     = pDevice->coreaudio.originalPerformanceProfile;\n        data.registerStopEvent      = MA_TRUE;\n\n        if (disposePreviousAudioUnit) {\n            ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitCapture);\n            ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitCapture);\n        }\n        if (pDevice->coreaudio.pAudioBufferList) {\n            ma_free(pDevice->coreaudio.pAudioBufferList, &pDevice->pContext->allocationCallbacks);\n        }\n    } else if (deviceType == ma_device_type_playback) {\n        data.formatIn               = pDevice->playback.format;\n        data.channelsIn             = pDevice->playback.channels;\n        data.sampleRateIn           = pDevice->sampleRate;\n        MA_COPY_MEMORY(data.channelMapIn, pDevice->playback.channelMap, sizeof(pDevice->playback.channelMap));\n        data.shareMode              = pDevice->playback.shareMode;\n        data.performanceProfile     = pDevice->coreaudio.originalPerformanceProfile;\n        data.registerStopEvent      = (pDevice->type != ma_device_type_duplex);\n\n        if (disposePreviousAudioUnit) {\n            ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitPlayback);\n            ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitPlayback);\n        }\n    }\n    data.periodSizeInFramesIn       = pDevice->coreaudio.originalPeriodSizeInFrames;\n    data.periodSizeInMillisecondsIn = pDevice->coreaudio.originalPeriodSizeInMilliseconds;\n    data.periodsIn                  = pDevice->coreaudio.originalPeriods;\n\n    /* Need at least 3 periods for duplex. */\n    if (data.periodsIn < 3 && pDevice->type == ma_device_type_duplex) {\n        data.periodsIn = 3;\n    }\n\n    result = ma_device_init_internal__coreaudio(pDevice->pContext, deviceType, NULL, &data, (void*)pDevice);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (deviceType == ma_device_type_capture) {\n    #if defined(MA_APPLE_DESKTOP)\n        pDevice->coreaudio.deviceObjectIDCapture     = (ma_uint32)data.deviceObjectID;\n        ma_get_AudioObject_uid(pDevice->pContext, pDevice->coreaudio.deviceObjectIDCapture, sizeof(pDevice->capture.id.coreaudio), pDevice->capture.id.coreaudio);\n    #endif\n        pDevice->coreaudio.audioUnitCapture          = (ma_ptr)data.audioUnit;\n        pDevice->coreaudio.pAudioBufferList          = (ma_ptr)data.pAudioBufferList;\n        pDevice->coreaudio.audioBufferCapInFrames    = data.periodSizeInFramesOut;\n\n        pDevice->capture.internalFormat              = data.formatOut;\n        pDevice->capture.internalChannels            = data.channelsOut;\n        pDevice->capture.internalSampleRate          = data.sampleRateOut;\n        MA_COPY_MEMORY(pDevice->capture.internalChannelMap, data.channelMapOut, sizeof(data.channelMapOut));\n        pDevice->capture.internalPeriodSizeInFrames  = data.periodSizeInFramesOut;\n        pDevice->capture.internalPeriods             = data.periodsOut;\n    } else if (deviceType == ma_device_type_playback) {\n    #if defined(MA_APPLE_DESKTOP)\n        pDevice->coreaudio.deviceObjectIDPlayback    = (ma_uint32)data.deviceObjectID;\n        ma_get_AudioObject_uid(pDevice->pContext, pDevice->coreaudio.deviceObjectIDPlayback, sizeof(pDevice->playback.id.coreaudio), pDevice->playback.id.coreaudio);\n    #endif\n        pDevice->coreaudio.audioUnitPlayback         = (ma_ptr)data.audioUnit;\n\n        pDevice->playback.internalFormat             = data.formatOut;\n        pDevice->playback.internalChannels           = data.channelsOut;\n        pDevice->playback.internalSampleRate         = data.sampleRateOut;\n        MA_COPY_MEMORY(pDevice->playback.internalChannelMap, data.channelMapOut, sizeof(data.channelMapOut));\n        pDevice->playback.internalPeriodSizeInFrames = data.periodSizeInFramesOut;\n        pDevice->playback.internalPeriods            = data.periodsOut;\n    }\n\n    return MA_SUCCESS;\n}\n#endif /* MA_APPLE_DESKTOP */\n\nstatic ma_result ma_device_init__coreaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n    ma_result result;\n\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(pConfig != NULL);\n\n    if (pConfig->deviceType == ma_device_type_loopback) {\n        return MA_DEVICE_TYPE_NOT_SUPPORTED;\n    }\n\n    /* No exclusive mode with the Core Audio backend for now. */\n    if (((pConfig->deviceType == ma_device_type_capture  || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode  == ma_share_mode_exclusive) ||\n        ((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive)) {\n        return MA_SHARE_MODE_NOT_SUPPORTED;\n    }\n\n    /* Capture needs to be initialized first. */\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        ma_device_init_internal_data__coreaudio data;\n        data.allowNominalSampleRateChange = pConfig->coreaudio.allowNominalSampleRateChange;\n        data.formatIn                     = pDescriptorCapture->format;\n        data.channelsIn                   = pDescriptorCapture->channels;\n        data.sampleRateIn                 = pDescriptorCapture->sampleRate;\n        MA_COPY_MEMORY(data.channelMapIn, pDescriptorCapture->channelMap, sizeof(pDescriptorCapture->channelMap));\n        data.periodSizeInFramesIn         = pDescriptorCapture->periodSizeInFrames;\n        data.periodSizeInMillisecondsIn   = pDescriptorCapture->periodSizeInMilliseconds;\n        data.periodsIn                    = pDescriptorCapture->periodCount;\n        data.shareMode                    = pDescriptorCapture->shareMode;\n        data.performanceProfile           = pConfig->performanceProfile;\n        data.registerStopEvent            = MA_TRUE;\n\n        /* Need at least 3 periods for duplex. */\n        if (data.periodsIn < 3 && pConfig->deviceType == ma_device_type_duplex) {\n            data.periodsIn = 3;\n        }\n\n        result = ma_device_init_internal__coreaudio(pDevice->pContext, ma_device_type_capture, pDescriptorCapture->pDeviceID, &data, (void*)pDevice);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pDevice->coreaudio.isDefaultCaptureDevice           = (pConfig->capture.pDeviceID == NULL);\n    #if defined(MA_APPLE_DESKTOP)\n        pDevice->coreaudio.deviceObjectIDCapture            = (ma_uint32)data.deviceObjectID;\n    #endif\n        pDevice->coreaudio.audioUnitCapture                 = (ma_ptr)data.audioUnit;\n        pDevice->coreaudio.pAudioBufferList                 = (ma_ptr)data.pAudioBufferList;\n        pDevice->coreaudio.audioBufferCapInFrames           = data.periodSizeInFramesOut;\n        pDevice->coreaudio.originalPeriodSizeInFrames       = pDescriptorCapture->periodSizeInFrames;\n        pDevice->coreaudio.originalPeriodSizeInMilliseconds = pDescriptorCapture->periodSizeInMilliseconds;\n        pDevice->coreaudio.originalPeriods                  = pDescriptorCapture->periodCount;\n        pDevice->coreaudio.originalPerformanceProfile       = pConfig->performanceProfile;\n\n        pDescriptorCapture->format                          = data.formatOut;\n        pDescriptorCapture->channels                        = data.channelsOut;\n        pDescriptorCapture->sampleRate                      = data.sampleRateOut;\n        MA_COPY_MEMORY(pDescriptorCapture->channelMap, data.channelMapOut, sizeof(data.channelMapOut));\n        pDescriptorCapture->periodSizeInFrames              = data.periodSizeInFramesOut;\n        pDescriptorCapture->periodCount                     = data.periodsOut;\n\n    #if defined(MA_APPLE_DESKTOP)\n        ma_get_AudioObject_uid(pDevice->pContext, pDevice->coreaudio.deviceObjectIDCapture, sizeof(pDevice->capture.id.coreaudio), pDevice->capture.id.coreaudio);\n\n        /*\n        If we are using the default device we'll need to listen for changes to the system's default device so we can seemlessly\n        switch the device in the background.\n        */\n        if (pConfig->capture.pDeviceID == NULL) {\n            ma_device__track__coreaudio(pDevice);\n        }\n    #endif\n    }\n\n    /* Playback. */\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        ma_device_init_internal_data__coreaudio data;\n        data.allowNominalSampleRateChange   = pConfig->coreaudio.allowNominalSampleRateChange;\n        data.formatIn                       = pDescriptorPlayback->format;\n        data.channelsIn                     = pDescriptorPlayback->channels;\n        data.sampleRateIn                   = pDescriptorPlayback->sampleRate;\n        MA_COPY_MEMORY(data.channelMapIn, pDescriptorPlayback->channelMap, sizeof(pDescriptorPlayback->channelMap));\n        data.shareMode                      = pDescriptorPlayback->shareMode;\n        data.performanceProfile             = pConfig->performanceProfile;\n\n        /* In full-duplex mode we want the playback buffer to be the same size as the capture buffer. */\n        if (pConfig->deviceType == ma_device_type_duplex) {\n            data.periodSizeInFramesIn       = pDescriptorCapture->periodSizeInFrames;\n            data.periodsIn                  = pDescriptorCapture->periodCount;\n            data.registerStopEvent          = MA_FALSE;\n        } else {\n            data.periodSizeInFramesIn       = pDescriptorPlayback->periodSizeInFrames;\n            data.periodSizeInMillisecondsIn = pDescriptorPlayback->periodSizeInMilliseconds;\n            data.periodsIn                  = pDescriptorPlayback->periodCount;\n            data.registerStopEvent          = MA_TRUE;\n        }\n\n        result = ma_device_init_internal__coreaudio(pDevice->pContext, ma_device_type_playback, pDescriptorPlayback->pDeviceID, &data, (void*)pDevice);\n        if (result != MA_SUCCESS) {\n            if (pConfig->deviceType == ma_device_type_duplex) {\n                ((ma_AudioComponentInstanceDispose_proc)pDevice->pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnitCapture);\n                if (pDevice->coreaudio.pAudioBufferList) {\n                    ma_free(pDevice->coreaudio.pAudioBufferList, &pDevice->pContext->allocationCallbacks);\n                }\n            }\n            return result;\n        }\n\n        pDevice->coreaudio.isDefaultPlaybackDevice          = (pConfig->playback.pDeviceID == NULL);\n    #if defined(MA_APPLE_DESKTOP)\n        pDevice->coreaudio.deviceObjectIDPlayback           = (ma_uint32)data.deviceObjectID;\n    #endif\n        pDevice->coreaudio.audioUnitPlayback                = (ma_ptr)data.audioUnit;\n        pDevice->coreaudio.originalPeriodSizeInFrames       = pDescriptorPlayback->periodSizeInFrames;\n        pDevice->coreaudio.originalPeriodSizeInMilliseconds = pDescriptorPlayback->periodSizeInMilliseconds;\n        pDevice->coreaudio.originalPeriods                  = pDescriptorPlayback->periodCount;\n        pDevice->coreaudio.originalPerformanceProfile       = pConfig->performanceProfile;\n\n        pDescriptorPlayback->format                         = data.formatOut;\n        pDescriptorPlayback->channels                       = data.channelsOut;\n        pDescriptorPlayback->sampleRate                     = data.sampleRateOut;\n        MA_COPY_MEMORY(pDescriptorPlayback->channelMap, data.channelMapOut, sizeof(data.channelMapOut));\n        pDescriptorPlayback->periodSizeInFrames             = data.periodSizeInFramesOut;\n        pDescriptorPlayback->periodCount                    = data.periodsOut;\n\n    #if defined(MA_APPLE_DESKTOP)\n        ma_get_AudioObject_uid(pDevice->pContext, pDevice->coreaudio.deviceObjectIDPlayback, sizeof(pDevice->playback.id.coreaudio), pDevice->playback.id.coreaudio);\n\n        /*\n        If we are using the default device we'll need to listen for changes to the system's default device so we can seemlessly\n        switch the device in the background.\n        */\n        if (pDescriptorPlayback->pDeviceID == NULL && (pConfig->deviceType != ma_device_type_duplex || pDescriptorCapture->pDeviceID != NULL)) {\n            ma_device__track__coreaudio(pDevice);\n        }\n    #endif\n    }\n\n\n\n    /*\n    When stopping the device, a callback is called on another thread. We need to wait for this callback\n    before returning from ma_device_stop(). This event is used for this.\n    */\n    ma_event_init(&pDevice->coreaudio.stopEvent);\n\n    /*\n    We need to detect when a route has changed so we can update the data conversion pipeline accordingly. This is done\n    differently on non-Desktop Apple platforms.\n    */\n#if defined(MA_APPLE_MOBILE)\n    pDevice->coreaudio.pNotificationHandler = (MA_BRIDGE_RETAINED void*)[[ma_ios_notification_handler alloc] init:pDevice];\n#endif\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_device_start__coreaudio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        OSStatus status = ((ma_AudioOutputUnitStart_proc)pDevice->pContext->coreaudio.AudioOutputUnitStart)((AudioUnit)pDevice->coreaudio.audioUnitCapture);\n        if (status != noErr) {\n            return ma_result_from_OSStatus(status);\n        }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        OSStatus status = ((ma_AudioOutputUnitStart_proc)pDevice->pContext->coreaudio.AudioOutputUnitStart)((AudioUnit)pDevice->coreaudio.audioUnitPlayback);\n        if (status != noErr) {\n            if (pDevice->type == ma_device_type_duplex) {\n                ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitCapture);\n            }\n            return ma_result_from_OSStatus(status);\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop__coreaudio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    /* It's not clear from the documentation whether or not AudioOutputUnitStop() actually drains the device or not. */\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        OSStatus status = ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitCapture);\n        if (status != noErr) {\n            return ma_result_from_OSStatus(status);\n        }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        OSStatus status = ((ma_AudioOutputUnitStop_proc)pDevice->pContext->coreaudio.AudioOutputUnitStop)((AudioUnit)pDevice->coreaudio.audioUnitPlayback);\n        if (status != noErr) {\n            return ma_result_from_OSStatus(status);\n        }\n    }\n\n    /* We need to wait for the callback to finish before returning. */\n    ma_event_wait(&pDevice->coreaudio.stopEvent);\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_context_uninit__coreaudio(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_coreaudio);\n\n#if defined(MA_APPLE_MOBILE)\n    if (!pContext->coreaudio.noAudioSessionDeactivate) {\n        if (![[AVAudioSession sharedInstance] setActive:false error:nil]) {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"Failed to deactivate audio session.\");\n            return MA_FAILED_TO_INIT_BACKEND;\n        }\n    }\n#endif\n\n#if !defined(MA_NO_RUNTIME_LINKING) && !defined(MA_APPLE_MOBILE)\n    ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit);\n    ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio);\n    ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation);\n#endif\n\n#if !defined(MA_APPLE_MOBILE)\n    ma_context__uninit_device_tracking__coreaudio(pContext);\n#endif\n\n    (void)pContext;\n    return MA_SUCCESS;\n}\n\n#if defined(MA_APPLE_MOBILE) && defined(__IPHONE_12_0)\nstatic AVAudioSessionCategory ma_to_AVAudioSessionCategory(ma_ios_session_category category)\n{\n    /* The \"default\" and \"none\" categories are treated different and should not be used as an input into this function. */\n    MA_ASSERT(category != ma_ios_session_category_default);\n    MA_ASSERT(category != ma_ios_session_category_none);\n\n    switch (category) {\n        case ma_ios_session_category_ambient:         return AVAudioSessionCategoryAmbient;\n        case ma_ios_session_category_solo_ambient:    return AVAudioSessionCategorySoloAmbient;\n        case ma_ios_session_category_playback:        return AVAudioSessionCategoryPlayback;\n        case ma_ios_session_category_record:          return AVAudioSessionCategoryRecord;\n        case ma_ios_session_category_play_and_record: return AVAudioSessionCategoryPlayAndRecord;\n        case ma_ios_session_category_multi_route:     return AVAudioSessionCategoryMultiRoute;\n        case ma_ios_session_category_none:            return AVAudioSessionCategoryAmbient;\n        case ma_ios_session_category_default:         return AVAudioSessionCategoryAmbient;\n        default:                                      return AVAudioSessionCategoryAmbient;\n    }\n}\n#endif\n\nstatic ma_result ma_context_init__coreaudio(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n#if !defined(MA_APPLE_MOBILE)\n    ma_result result;\n#endif\n\n    MA_ASSERT(pConfig != NULL);\n    MA_ASSERT(pContext != NULL);\n\n#if defined(MA_APPLE_MOBILE)\n    @autoreleasepool {\n        AVAudioSession* pAudioSession = [AVAudioSession sharedInstance];\n        AVAudioSessionCategoryOptions options = pConfig->coreaudio.sessionCategoryOptions;\n\n        MA_ASSERT(pAudioSession != NULL);\n\n        if (pConfig->coreaudio.sessionCategory == ma_ios_session_category_default) {\n            /*\n            I'm going to use trial and error to determine our default session category. First we'll try PlayAndRecord. If that fails\n            we'll try Playback and if that fails we'll try record. If all of these fail we'll just not set the category.\n            */\n        #if !defined(MA_APPLE_TV) && !defined(MA_APPLE_WATCH)\n            options |= AVAudioSessionCategoryOptionDefaultToSpeaker;\n        #endif\n\n            if ([pAudioSession setCategory: AVAudioSessionCategoryPlayAndRecord withOptions:options error:nil]) {\n                /* Using PlayAndRecord */\n            } else if ([pAudioSession setCategory: AVAudioSessionCategoryPlayback withOptions:options error:nil]) {\n                /* Using Playback */\n            } else if ([pAudioSession setCategory: AVAudioSessionCategoryRecord withOptions:options error:nil]) {\n                /* Using Record */\n            } else {\n                /* Leave as default? */\n            }\n        } else {\n            if (pConfig->coreaudio.sessionCategory != ma_ios_session_category_none) {\n            #if defined(__IPHONE_12_0)\n                if (![pAudioSession setCategory: ma_to_AVAudioSessionCategory(pConfig->coreaudio.sessionCategory) withOptions:options error:nil]) {\n                    return MA_INVALID_OPERATION;    /* Failed to set session category. */\n                }\n            #else\n                /* Ignore the session category on version 11 and older, but post a warning. */\n                ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, \"Session category only supported in iOS 12 and newer.\");\n            #endif\n            }\n        }\n\n        if (!pConfig->coreaudio.noAudioSessionActivate) {\n            if (![pAudioSession setActive:true error:nil]) {\n                ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"Failed to activate audio session.\");\n                return MA_FAILED_TO_INIT_BACKEND;\n            }\n        }\n    }\n#endif\n\n#if !defined(MA_NO_RUNTIME_LINKING) && !defined(MA_APPLE_MOBILE)\n    pContext->coreaudio.hCoreFoundation = ma_dlopen(ma_context_get_log(pContext), \"/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation\");\n    if (pContext->coreaudio.hCoreFoundation == NULL) {\n        return MA_API_NOT_FOUND;\n    }\n\n    pContext->coreaudio.CFStringGetCString = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation, \"CFStringGetCString\");\n    pContext->coreaudio.CFRelease          = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation, \"CFRelease\");\n\n\n    pContext->coreaudio.hCoreAudio = ma_dlopen(ma_context_get_log(pContext), \"/System/Library/Frameworks/CoreAudio.framework/CoreAudio\");\n    if (pContext->coreaudio.hCoreAudio == NULL) {\n        ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation);\n        return MA_API_NOT_FOUND;\n    }\n\n    pContext->coreaudio.AudioObjectGetPropertyData        = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, \"AudioObjectGetPropertyData\");\n    pContext->coreaudio.AudioObjectGetPropertyDataSize    = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, \"AudioObjectGetPropertyDataSize\");\n    pContext->coreaudio.AudioObjectSetPropertyData        = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, \"AudioObjectSetPropertyData\");\n    pContext->coreaudio.AudioObjectAddPropertyListener    = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, \"AudioObjectAddPropertyListener\");\n    pContext->coreaudio.AudioObjectRemovePropertyListener = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio, \"AudioObjectRemovePropertyListener\");\n\n    /*\n    It looks like Apple has moved some APIs from AudioUnit into AudioToolbox on more recent versions of macOS. They are still\n    defined in AudioUnit, but just in case they decide to remove them from there entirely I'm going to implement a fallback.\n    The way it'll work is that it'll first try AudioUnit, and if the required symbols are not present there we'll fall back to\n    AudioToolbox.\n    */\n    pContext->coreaudio.hAudioUnit = ma_dlopen(ma_context_get_log(pContext), \"/System/Library/Frameworks/AudioUnit.framework/AudioUnit\");\n    if (pContext->coreaudio.hAudioUnit == NULL) {\n        ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio);\n        ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation);\n        return MA_API_NOT_FOUND;\n    }\n\n    if (ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, \"AudioComponentFindNext\") == NULL) {\n        /* Couldn't find the required symbols in AudioUnit, so fall back to AudioToolbox. */\n        ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit);\n        pContext->coreaudio.hAudioUnit = ma_dlopen(ma_context_get_log(pContext), \"/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox\");\n        if (pContext->coreaudio.hAudioUnit == NULL) {\n            ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio);\n            ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation);\n            return MA_API_NOT_FOUND;\n        }\n    }\n\n    pContext->coreaudio.AudioComponentFindNext            = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, \"AudioComponentFindNext\");\n    pContext->coreaudio.AudioComponentInstanceDispose     = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, \"AudioComponentInstanceDispose\");\n    pContext->coreaudio.AudioComponentInstanceNew         = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, \"AudioComponentInstanceNew\");\n    pContext->coreaudio.AudioOutputUnitStart              = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, \"AudioOutputUnitStart\");\n    pContext->coreaudio.AudioOutputUnitStop               = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, \"AudioOutputUnitStop\");\n    pContext->coreaudio.AudioUnitAddPropertyListener      = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, \"AudioUnitAddPropertyListener\");\n    pContext->coreaudio.AudioUnitGetPropertyInfo          = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, \"AudioUnitGetPropertyInfo\");\n    pContext->coreaudio.AudioUnitGetProperty              = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, \"AudioUnitGetProperty\");\n    pContext->coreaudio.AudioUnitSetProperty              = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, \"AudioUnitSetProperty\");\n    pContext->coreaudio.AudioUnitInitialize               = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, \"AudioUnitInitialize\");\n    pContext->coreaudio.AudioUnitRender                   = ma_dlsym(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit, \"AudioUnitRender\");\n#else\n    pContext->coreaudio.CFStringGetCString                = (ma_proc)CFStringGetCString;\n    pContext->coreaudio.CFRelease                         = (ma_proc)CFRelease;\n\n    #if defined(MA_APPLE_DESKTOP)\n    pContext->coreaudio.AudioObjectGetPropertyData        = (ma_proc)AudioObjectGetPropertyData;\n    pContext->coreaudio.AudioObjectGetPropertyDataSize    = (ma_proc)AudioObjectGetPropertyDataSize;\n    pContext->coreaudio.AudioObjectSetPropertyData        = (ma_proc)AudioObjectSetPropertyData;\n    pContext->coreaudio.AudioObjectAddPropertyListener    = (ma_proc)AudioObjectAddPropertyListener;\n    pContext->coreaudio.AudioObjectRemovePropertyListener = (ma_proc)AudioObjectRemovePropertyListener;\n    #endif\n\n    pContext->coreaudio.AudioComponentFindNext            = (ma_proc)AudioComponentFindNext;\n    pContext->coreaudio.AudioComponentInstanceDispose     = (ma_proc)AudioComponentInstanceDispose;\n    pContext->coreaudio.AudioComponentInstanceNew         = (ma_proc)AudioComponentInstanceNew;\n    pContext->coreaudio.AudioOutputUnitStart              = (ma_proc)AudioOutputUnitStart;\n    pContext->coreaudio.AudioOutputUnitStop               = (ma_proc)AudioOutputUnitStop;\n    pContext->coreaudio.AudioUnitAddPropertyListener      = (ma_proc)AudioUnitAddPropertyListener;\n    pContext->coreaudio.AudioUnitGetPropertyInfo          = (ma_proc)AudioUnitGetPropertyInfo;\n    pContext->coreaudio.AudioUnitGetProperty              = (ma_proc)AudioUnitGetProperty;\n    pContext->coreaudio.AudioUnitSetProperty              = (ma_proc)AudioUnitSetProperty;\n    pContext->coreaudio.AudioUnitInitialize               = (ma_proc)AudioUnitInitialize;\n    pContext->coreaudio.AudioUnitRender                   = (ma_proc)AudioUnitRender;\n#endif\n\n    /* Audio component. */\n    {\n        AudioComponentDescription desc;\n        desc.componentType         = kAudioUnitType_Output;\n    #if defined(MA_APPLE_DESKTOP)\n        desc.componentSubType      = kAudioUnitSubType_HALOutput;\n    #else\n        desc.componentSubType      = kAudioUnitSubType_RemoteIO;\n    #endif\n        desc.componentManufacturer = kAudioUnitManufacturer_Apple;\n        desc.componentFlags        = 0;\n        desc.componentFlagsMask    = 0;\n\n        pContext->coreaudio.component = ((ma_AudioComponentFindNext_proc)pContext->coreaudio.AudioComponentFindNext)(NULL, &desc);\n        if (pContext->coreaudio.component == NULL) {\n        #if !defined(MA_NO_RUNTIME_LINKING) && !defined(MA_APPLE_MOBILE)\n            ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit);\n            ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio);\n            ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation);\n        #endif\n            return MA_FAILED_TO_INIT_BACKEND;\n        }\n    }\n\n#if !defined(MA_APPLE_MOBILE)\n    result = ma_context__init_device_tracking__coreaudio(pContext);\n    if (result != MA_SUCCESS) {\n    #if !defined(MA_NO_RUNTIME_LINKING) && !defined(MA_APPLE_MOBILE)\n        ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hAudioUnit);\n        ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreAudio);\n        ma_dlclose(ma_context_get_log(pContext), pContext->coreaudio.hCoreFoundation);\n    #endif\n        return result;\n    }\n#endif\n\n    pContext->coreaudio.noAudioSessionDeactivate = pConfig->coreaudio.noAudioSessionDeactivate;\n\n    pCallbacks->onContextInit             = ma_context_init__coreaudio;\n    pCallbacks->onContextUninit           = ma_context_uninit__coreaudio;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__coreaudio;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__coreaudio;\n    pCallbacks->onDeviceInit              = ma_device_init__coreaudio;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__coreaudio;\n    pCallbacks->onDeviceStart             = ma_device_start__coreaudio;\n    pCallbacks->onDeviceStop              = ma_device_stop__coreaudio;\n    pCallbacks->onDeviceRead              = NULL;\n    pCallbacks->onDeviceWrite             = NULL;\n    pCallbacks->onDeviceDataLoop          = NULL;\n\n    return MA_SUCCESS;\n}\n#endif  /* Core Audio */\n\n\n\n/******************************************************************************\n\nsndio Backend\n\n******************************************************************************/\n#ifdef MA_HAS_SNDIO\n#include <fcntl.h>\n\n/*\nOnly supporting OpenBSD. This did not work very well at all on FreeBSD when I tried it. Not sure if this is due\nto miniaudio's implementation or if it's some kind of system configuration issue, but basically the default device\njust doesn't emit any sound, or at times you'll hear tiny pieces. I will consider enabling this when there's\ndemand for it or if I can get it tested and debugged more thoroughly.\n*/\n#if 0\n#if defined(__NetBSD__) || defined(__OpenBSD__)\n#include <sys/audioio.h>\n#endif\n#if defined(__FreeBSD__) || defined(__DragonFly__)\n#include <sys/soundcard.h>\n#endif\n#endif\n\n#define MA_SIO_DEVANY   \"default\"\n#define MA_SIO_PLAY     1\n#define MA_SIO_REC      2\n#define MA_SIO_NENC     8\n#define MA_SIO_NCHAN    8\n#define MA_SIO_NRATE    16\n#define MA_SIO_NCONF    4\n\nstruct ma_sio_hdl; /* <-- Opaque */\n\nstruct ma_sio_par\n{\n    unsigned int bits;\n    unsigned int bps;\n    unsigned int sig;\n    unsigned int le;\n    unsigned int msb;\n    unsigned int rchan;\n    unsigned int pchan;\n    unsigned int rate;\n    unsigned int bufsz;\n    unsigned int xrun;\n    unsigned int round;\n    unsigned int appbufsz;\n    int __pad[3];\n    unsigned int __magic;\n};\n\nstruct ma_sio_enc\n{\n    unsigned int bits;\n    unsigned int bps;\n    unsigned int sig;\n    unsigned int le;\n    unsigned int msb;\n};\n\nstruct ma_sio_conf\n{\n    unsigned int enc;\n    unsigned int rchan;\n    unsigned int pchan;\n    unsigned int rate;\n};\n\nstruct ma_sio_cap\n{\n    struct ma_sio_enc enc[MA_SIO_NENC];\n    unsigned int rchan[MA_SIO_NCHAN];\n    unsigned int pchan[MA_SIO_NCHAN];\n    unsigned int rate[MA_SIO_NRATE];\n    int __pad[7];\n    unsigned int nconf;\n    struct ma_sio_conf confs[MA_SIO_NCONF];\n};\n\ntypedef struct ma_sio_hdl* (* ma_sio_open_proc)   (const char*, unsigned int, int);\ntypedef void               (* ma_sio_close_proc)  (struct ma_sio_hdl*);\ntypedef int                (* ma_sio_setpar_proc) (struct ma_sio_hdl*, struct ma_sio_par*);\ntypedef int                (* ma_sio_getpar_proc) (struct ma_sio_hdl*, struct ma_sio_par*);\ntypedef int                (* ma_sio_getcap_proc) (struct ma_sio_hdl*, struct ma_sio_cap*);\ntypedef size_t             (* ma_sio_write_proc)  (struct ma_sio_hdl*, const void*, size_t);\ntypedef size_t             (* ma_sio_read_proc)   (struct ma_sio_hdl*, void*, size_t);\ntypedef int                (* ma_sio_start_proc)  (struct ma_sio_hdl*);\ntypedef int                (* ma_sio_stop_proc)   (struct ma_sio_hdl*);\ntypedef int                (* ma_sio_initpar_proc)(struct ma_sio_par*);\n\nstatic ma_uint32 ma_get_standard_sample_rate_priority_index__sndio(ma_uint32 sampleRate)   /* Lower = higher priority */\n{\n    ma_uint32 i;\n    for (i = 0; i < ma_countof(g_maStandardSampleRatePriorities); ++i) {\n        if (g_maStandardSampleRatePriorities[i] == sampleRate) {\n            return i;\n        }\n    }\n\n    return (ma_uint32)-1;\n}\n\nstatic ma_format ma_format_from_sio_enc__sndio(unsigned int bits, unsigned int bps, unsigned int sig, unsigned int le, unsigned int msb)\n{\n    /* We only support native-endian right now. */\n    if ((ma_is_little_endian() && le == 0) || (ma_is_big_endian() && le == 1)) {\n        return ma_format_unknown;\n    }\n\n    if (bits ==  8 && bps == 1 && sig == 0) {\n        return ma_format_u8;\n    }\n    if (bits == 16 && bps == 2 && sig == 1) {\n        return ma_format_s16;\n    }\n    if (bits == 24 && bps == 3 && sig == 1) {\n        return ma_format_s24;\n    }\n    if (bits == 24 && bps == 4 && sig == 1 && msb == 0) {\n        /*return ma_format_s24_32;*/\n    }\n    if (bits == 32 && bps == 4 && sig == 1) {\n        return ma_format_s32;\n    }\n\n    return ma_format_unknown;\n}\n\nstatic ma_format ma_find_best_format_from_sio_cap__sndio(struct ma_sio_cap* caps)\n{\n    ma_format bestFormat;\n    unsigned int iConfig;\n\n    MA_ASSERT(caps != NULL);\n\n    bestFormat = ma_format_unknown;\n    for (iConfig = 0; iConfig < caps->nconf; iConfig += 1) {\n        unsigned int iEncoding;\n        for (iEncoding = 0; iEncoding < MA_SIO_NENC; iEncoding += 1) {\n            unsigned int bits;\n            unsigned int bps;\n            unsigned int sig;\n            unsigned int le;\n            unsigned int msb;\n            ma_format format;\n\n            if ((caps->confs[iConfig].enc & (1UL << iEncoding)) == 0) {\n                continue;\n            }\n\n            bits = caps->enc[iEncoding].bits;\n            bps  = caps->enc[iEncoding].bps;\n            sig  = caps->enc[iEncoding].sig;\n            le   = caps->enc[iEncoding].le;\n            msb  = caps->enc[iEncoding].msb;\n            format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb);\n            if (format == ma_format_unknown) {\n                continue;   /* Format not supported. */\n            }\n\n            if (bestFormat == ma_format_unknown) {\n                bestFormat = format;\n            } else {\n                if (ma_get_format_priority_index(bestFormat) > ma_get_format_priority_index(format)) {    /* <-- Lower = better. */\n                    bestFormat = format;\n                }\n            }\n        }\n    }\n\n    return bestFormat;\n}\n\nstatic ma_uint32 ma_find_best_channels_from_sio_cap__sndio(struct ma_sio_cap* caps, ma_device_type deviceType, ma_format requiredFormat)\n{\n    ma_uint32 maxChannels;\n    unsigned int iConfig;\n\n    MA_ASSERT(caps != NULL);\n    MA_ASSERT(requiredFormat != ma_format_unknown);\n\n    /* Just pick whatever configuration has the most channels. */\n    maxChannels = 0;\n    for (iConfig = 0; iConfig < caps->nconf; iConfig += 1) {\n        /* The encoding should be of requiredFormat. */\n        unsigned int iEncoding;\n        for (iEncoding = 0; iEncoding < MA_SIO_NENC; iEncoding += 1) {\n            unsigned int iChannel;\n            unsigned int bits;\n            unsigned int bps;\n            unsigned int sig;\n            unsigned int le;\n            unsigned int msb;\n            ma_format format;\n\n            if ((caps->confs[iConfig].enc & (1UL << iEncoding)) == 0) {\n                continue;\n            }\n\n            bits = caps->enc[iEncoding].bits;\n            bps  = caps->enc[iEncoding].bps;\n            sig  = caps->enc[iEncoding].sig;\n            le   = caps->enc[iEncoding].le;\n            msb  = caps->enc[iEncoding].msb;\n            format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb);\n            if (format != requiredFormat) {\n                continue;\n            }\n\n            /* Getting here means the format is supported. Iterate over each channel count and grab the biggest one. */\n            for (iChannel = 0; iChannel < MA_SIO_NCHAN; iChannel += 1) {\n                unsigned int chan = 0;\n                unsigned int channels;\n\n                if (deviceType == ma_device_type_playback) {\n                    chan = caps->confs[iConfig].pchan;\n                } else {\n                    chan = caps->confs[iConfig].rchan;\n                }\n\n                if ((chan & (1UL << iChannel)) == 0) {\n                    continue;\n                }\n\n                if (deviceType == ma_device_type_playback) {\n                    channels = caps->pchan[iChannel];\n                } else {\n                    channels = caps->rchan[iChannel];\n                }\n\n                if (maxChannels < channels) {\n                    maxChannels = channels;\n                }\n            }\n        }\n    }\n\n    return maxChannels;\n}\n\nstatic ma_uint32 ma_find_best_sample_rate_from_sio_cap__sndio(struct ma_sio_cap* caps, ma_device_type deviceType, ma_format requiredFormat, ma_uint32 requiredChannels)\n{\n    ma_uint32 firstSampleRate;\n    ma_uint32 bestSampleRate;\n    unsigned int iConfig;\n\n    MA_ASSERT(caps != NULL);\n    MA_ASSERT(requiredFormat != ma_format_unknown);\n    MA_ASSERT(requiredChannels > 0);\n    MA_ASSERT(requiredChannels <= MA_MAX_CHANNELS);\n\n    firstSampleRate = 0; /* <-- If the device does not support a standard rate we'll fall back to the first one that's found. */\n    bestSampleRate  = 0;\n\n    for (iConfig = 0; iConfig < caps->nconf; iConfig += 1) {\n        /* The encoding should be of requiredFormat. */\n        unsigned int iEncoding;\n        for (iEncoding = 0; iEncoding < MA_SIO_NENC; iEncoding += 1) {\n            unsigned int iChannel;\n            unsigned int bits;\n            unsigned int bps;\n            unsigned int sig;\n            unsigned int le;\n            unsigned int msb;\n            ma_format format;\n\n            if ((caps->confs[iConfig].enc & (1UL << iEncoding)) == 0) {\n                continue;\n            }\n\n            bits = caps->enc[iEncoding].bits;\n            bps  = caps->enc[iEncoding].bps;\n            sig  = caps->enc[iEncoding].sig;\n            le   = caps->enc[iEncoding].le;\n            msb  = caps->enc[iEncoding].msb;\n            format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb);\n            if (format != requiredFormat) {\n                continue;\n            }\n\n            /* Getting here means the format is supported. Iterate over each channel count and grab the biggest one. */\n            for (iChannel = 0; iChannel < MA_SIO_NCHAN; iChannel += 1) {\n                unsigned int chan = 0;\n                unsigned int channels;\n                unsigned int iRate;\n\n                if (deviceType == ma_device_type_playback) {\n                    chan = caps->confs[iConfig].pchan;\n                } else {\n                    chan = caps->confs[iConfig].rchan;\n                }\n\n                if ((chan & (1UL << iChannel)) == 0) {\n                    continue;\n                }\n\n                if (deviceType == ma_device_type_playback) {\n                    channels = caps->pchan[iChannel];\n                } else {\n                    channels = caps->rchan[iChannel];\n                }\n\n                if (channels != requiredChannels) {\n                    continue;\n                }\n\n                /* Getting here means we have found a compatible encoding/channel pair. */\n                for (iRate = 0; iRate < MA_SIO_NRATE; iRate += 1) {\n                    ma_uint32 rate = (ma_uint32)caps->rate[iRate];\n                    ma_uint32 ratePriority;\n\n                    if (firstSampleRate == 0) {\n                        firstSampleRate = rate;\n                    }\n\n                    /* Disregard this rate if it's not a standard one. */\n                    ratePriority = ma_get_standard_sample_rate_priority_index__sndio(rate);\n                    if (ratePriority == (ma_uint32)-1) {\n                        continue;\n                    }\n\n                    if (ma_get_standard_sample_rate_priority_index__sndio(bestSampleRate) > ratePriority) {   /* Lower = better. */\n                        bestSampleRate = rate;\n                    }\n                }\n            }\n        }\n    }\n\n    /* If a standard sample rate was not found just fall back to the first one that was iterated. */\n    if (bestSampleRate == 0) {\n        bestSampleRate = firstSampleRate;\n    }\n\n    return bestSampleRate;\n}\n\n\nstatic ma_result ma_context_enumerate_devices__sndio(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    ma_bool32 isTerminating = MA_FALSE;\n    struct ma_sio_hdl* handle;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(callback != NULL);\n\n    /* sndio doesn't seem to have a good device enumeration API, so I'm therefore only enumerating over default devices for now. */\n\n    /* Playback. */\n    if (!isTerminating) {\n        handle = ((ma_sio_open_proc)pContext->sndio.sio_open)(MA_SIO_DEVANY, MA_SIO_PLAY, 0);\n        if (handle != NULL) {\n            /* Supports playback. */\n            ma_device_info deviceInfo;\n            MA_ZERO_OBJECT(&deviceInfo);\n            ma_strcpy_s(deviceInfo.id.sndio, sizeof(deviceInfo.id.sndio), MA_SIO_DEVANY);\n            ma_strcpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME);\n\n            isTerminating = !callback(pContext, ma_device_type_playback, &deviceInfo, pUserData);\n\n            ((ma_sio_close_proc)pContext->sndio.sio_close)(handle);\n        }\n    }\n\n    /* Capture. */\n    if (!isTerminating) {\n        handle = ((ma_sio_open_proc)pContext->sndio.sio_open)(MA_SIO_DEVANY, MA_SIO_REC, 0);\n        if (handle != NULL) {\n            /* Supports capture. */\n            ma_device_info deviceInfo;\n            MA_ZERO_OBJECT(&deviceInfo);\n            ma_strcpy_s(deviceInfo.id.sndio, sizeof(deviceInfo.id.sndio), \"default\");\n            ma_strcpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME);\n\n            isTerminating = !callback(pContext, ma_device_type_capture, &deviceInfo, pUserData);\n\n            ((ma_sio_close_proc)pContext->sndio.sio_close)(handle);\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_get_device_info__sndio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    char devid[256];\n    struct ma_sio_hdl* handle;\n    struct ma_sio_cap caps;\n    unsigned int iConfig;\n\n    MA_ASSERT(pContext != NULL);\n\n    /* We need to open the device before we can get information about it. */\n    if (pDeviceID == NULL) {\n        ma_strcpy_s(devid, sizeof(devid), MA_SIO_DEVANY);\n        ma_strcpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), (deviceType == ma_device_type_playback) ? MA_DEFAULT_PLAYBACK_DEVICE_NAME : MA_DEFAULT_CAPTURE_DEVICE_NAME);\n    } else {\n        ma_strcpy_s(devid, sizeof(devid), pDeviceID->sndio);\n        ma_strcpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), devid);\n    }\n\n    handle = ((ma_sio_open_proc)pContext->sndio.sio_open)(devid, (deviceType == ma_device_type_playback) ? MA_SIO_PLAY : MA_SIO_REC, 0);\n    if (handle == NULL) {\n        return MA_NO_DEVICE;\n    }\n\n    if (((ma_sio_getcap_proc)pContext->sndio.sio_getcap)(handle, &caps) == 0) {\n        return MA_ERROR;\n    }\n\n    pDeviceInfo->nativeDataFormatCount = 0;\n\n    for (iConfig = 0; iConfig < caps.nconf; iConfig += 1) {\n        /*\n        The main thing we care about is that the encoding is supported by miniaudio. If it is, we want to give\n        preference to some formats over others.\n        */\n        unsigned int iEncoding;\n        unsigned int iChannel;\n        unsigned int iRate;\n\n        for (iEncoding = 0; iEncoding < MA_SIO_NENC; iEncoding += 1) {\n            unsigned int bits;\n            unsigned int bps;\n            unsigned int sig;\n            unsigned int le;\n            unsigned int msb;\n            ma_format format;\n\n            if ((caps.confs[iConfig].enc & (1UL << iEncoding)) == 0) {\n                continue;\n            }\n\n            bits = caps.enc[iEncoding].bits;\n            bps  = caps.enc[iEncoding].bps;\n            sig  = caps.enc[iEncoding].sig;\n            le   = caps.enc[iEncoding].le;\n            msb  = caps.enc[iEncoding].msb;\n            format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb);\n            if (format == ma_format_unknown) {\n                continue;   /* Format not supported. */\n            }\n\n\n            /* Channels. */\n            for (iChannel = 0; iChannel < MA_SIO_NCHAN; iChannel += 1) {\n                unsigned int chan = 0;\n                unsigned int channels;\n\n                if (deviceType == ma_device_type_playback) {\n                    chan = caps.confs[iConfig].pchan;\n                } else {\n                    chan = caps.confs[iConfig].rchan;\n                }\n\n                if ((chan & (1UL << iChannel)) == 0) {\n                    continue;\n                }\n\n                if (deviceType == ma_device_type_playback) {\n                    channels = caps.pchan[iChannel];\n                } else {\n                    channels = caps.rchan[iChannel];\n                }\n\n\n                /* Sample Rates. */\n                for (iRate = 0; iRate < MA_SIO_NRATE; iRate += 1) {\n                    if ((caps.confs[iConfig].rate & (1UL << iRate)) != 0) {\n                        ma_device_info_add_native_data_format(pDeviceInfo, format, channels, caps.rate[iRate], 0);\n                    }\n                }\n            }\n        }\n    }\n\n    ((ma_sio_close_proc)pContext->sndio.sio_close)(handle);\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_uninit__sndio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)pDevice->sndio.handleCapture);\n    }\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)pDevice->sndio.handlePlayback);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_init_handle__sndio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptor, ma_device_type deviceType)\n{\n    const char* pDeviceName;\n    ma_ptr handle;\n    int openFlags = 0;\n    struct ma_sio_cap caps;\n    struct ma_sio_par par;\n    const ma_device_id* pDeviceID;\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    ma_format internalFormat;\n    ma_uint32 internalChannels;\n    ma_uint32 internalSampleRate;\n    ma_uint32 internalPeriodSizeInFrames;\n    ma_uint32 internalPeriods;\n\n    MA_ASSERT(pConfig    != NULL);\n    MA_ASSERT(deviceType != ma_device_type_duplex);\n    MA_ASSERT(pDevice    != NULL);\n\n    if (deviceType == ma_device_type_capture) {\n        openFlags = MA_SIO_REC;\n    } else {\n        openFlags = MA_SIO_PLAY;\n    }\n\n    pDeviceID  = pDescriptor->pDeviceID;\n    format     = pDescriptor->format;\n    channels   = pDescriptor->channels;\n    sampleRate = pDescriptor->sampleRate;\n\n    pDeviceName = MA_SIO_DEVANY;\n    if (pDeviceID != NULL) {\n        pDeviceName = pDeviceID->sndio;\n    }\n\n    handle = (ma_ptr)((ma_sio_open_proc)pDevice->pContext->sndio.sio_open)(pDeviceName, openFlags, 0);\n    if (handle == NULL) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[sndio] Failed to open device.\");\n        return MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n    }\n\n    /* We need to retrieve the device caps to determine the most appropriate format to use. */\n    if (((ma_sio_getcap_proc)pDevice->pContext->sndio.sio_getcap)((struct ma_sio_hdl*)handle, &caps) == 0) {\n        ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)handle);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[sndio] Failed to retrieve device caps.\");\n        return MA_ERROR;\n    }\n\n    /*\n    Note: sndio reports a huge range of available channels. This is inconvenient for us because there's no real\n    way, as far as I can tell, to get the _actual_ channel count of the device. I'm therefore restricting this\n    to the requested channels, regardless of whether or not the default channel count is requested.\n\n    For hardware devices, I'm suspecting only a single channel count will be reported and we can safely use the\n    value returned by ma_find_best_channels_from_sio_cap__sndio().\n    */\n    if (deviceType == ma_device_type_capture) {\n        if (format == ma_format_unknown) {\n            format = ma_find_best_format_from_sio_cap__sndio(&caps);\n        }\n\n        if (channels == 0) {\n            if (strlen(pDeviceName) > strlen(\"rsnd/\") && strncmp(pDeviceName, \"rsnd/\", strlen(\"rsnd/\")) == 0) {\n                channels = ma_find_best_channels_from_sio_cap__sndio(&caps, deviceType, format);\n            } else {\n                channels = MA_DEFAULT_CHANNELS;\n            }\n        }\n    } else {\n        if (format == ma_format_unknown) {\n            format = ma_find_best_format_from_sio_cap__sndio(&caps);\n        }\n\n        if (channels == 0) {\n            if (strlen(pDeviceName) > strlen(\"rsnd/\") && strncmp(pDeviceName, \"rsnd/\", strlen(\"rsnd/\")) == 0) {\n                channels = ma_find_best_channels_from_sio_cap__sndio(&caps, deviceType, format);\n            } else {\n                channels = MA_DEFAULT_CHANNELS;\n            }\n        }\n    }\n\n    if (sampleRate == 0) {\n        sampleRate = ma_find_best_sample_rate_from_sio_cap__sndio(&caps, pConfig->deviceType, format, channels);\n    }\n\n\n    ((ma_sio_initpar_proc)pDevice->pContext->sndio.sio_initpar)(&par);\n    par.msb = 0;\n    par.le  = ma_is_little_endian();\n\n    switch (format) {\n        case ma_format_u8:\n        {\n            par.bits = 8;\n            par.bps  = 1;\n            par.sig  = 0;\n        } break;\n\n        case ma_format_s24:\n        {\n            par.bits = 24;\n            par.bps  = 3;\n            par.sig  = 1;\n        } break;\n\n        case ma_format_s32:\n        {\n            par.bits = 32;\n            par.bps  = 4;\n            par.sig  = 1;\n        } break;\n\n        case ma_format_s16:\n        case ma_format_f32:\n        case ma_format_unknown:\n        default:\n        {\n            par.bits = 16;\n            par.bps  = 2;\n            par.sig  = 1;\n        } break;\n    }\n\n    if (deviceType == ma_device_type_capture) {\n        par.rchan = channels;\n    } else {\n        par.pchan = channels;\n    }\n\n    par.rate = sampleRate;\n\n    internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, par.rate, pConfig->performanceProfile);\n\n    par.round    = internalPeriodSizeInFrames;\n    par.appbufsz = par.round * pDescriptor->periodCount;\n\n    if (((ma_sio_setpar_proc)pDevice->pContext->sndio.sio_setpar)((struct ma_sio_hdl*)handle, &par) == 0) {\n        ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)handle);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[sndio] Failed to set buffer size.\");\n        return MA_ERROR;\n    }\n\n    if (((ma_sio_getpar_proc)pDevice->pContext->sndio.sio_getpar)((struct ma_sio_hdl*)handle, &par) == 0) {\n        ((ma_sio_close_proc)pDevice->pContext->sndio.sio_close)((struct ma_sio_hdl*)handle);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[sndio] Failed to retrieve buffer size.\");\n        return MA_ERROR;\n    }\n\n    internalFormat             = ma_format_from_sio_enc__sndio(par.bits, par.bps, par.sig, par.le, par.msb);\n    internalChannels           = (deviceType == ma_device_type_capture) ? par.rchan : par.pchan;\n    internalSampleRate         = par.rate;\n    internalPeriods            = par.appbufsz / par.round;\n    internalPeriodSizeInFrames = par.round;\n\n    if (deviceType == ma_device_type_capture) {\n        pDevice->sndio.handleCapture  = handle;\n    } else {\n        pDevice->sndio.handlePlayback = handle;\n    }\n\n    pDescriptor->format             = internalFormat;\n    pDescriptor->channels           = internalChannels;\n    pDescriptor->sampleRate         = internalSampleRate;\n    ma_channel_map_init_standard(ma_standard_channel_map_sndio, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), internalChannels);\n    pDescriptor->periodSizeInFrames = internalPeriodSizeInFrames;\n    pDescriptor->periodCount        = internalPeriods;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_init__sndio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    MA_ZERO_OBJECT(&pDevice->sndio);\n\n    if (pConfig->deviceType == ma_device_type_loopback) {\n        return MA_DEVICE_TYPE_NOT_SUPPORTED;\n    }\n\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        ma_result result = ma_device_init_handle__sndio(pDevice, pConfig, pDescriptorCapture, ma_device_type_capture);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        ma_result result = ma_device_init_handle__sndio(pDevice, pConfig, pDescriptorPlayback, ma_device_type_playback);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_start__sndio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        ((ma_sio_start_proc)pDevice->pContext->sndio.sio_start)((struct ma_sio_hdl*)pDevice->sndio.handleCapture);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ((ma_sio_start_proc)pDevice->pContext->sndio.sio_start)((struct ma_sio_hdl*)pDevice->sndio.handlePlayback);   /* <-- Doesn't actually playback until data is written. */\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop__sndio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    /*\n    From the documentation:\n\n        The sio_stop() function puts the audio subsystem in the same state as before sio_start() is called. It stops recording, drains the play buffer and then\n        stops playback. If samples to play are queued but playback hasn't started yet then playback is forced immediately; playback will actually stop once the\n        buffer is drained. In no case are samples in the play buffer discarded.\n\n    Therefore, sio_stop() performs all of the necessary draining for us.\n    */\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        ((ma_sio_stop_proc)pDevice->pContext->sndio.sio_stop)((struct ma_sio_hdl*)pDevice->sndio.handleCapture);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ((ma_sio_stop_proc)pDevice->pContext->sndio.sio_stop)((struct ma_sio_hdl*)pDevice->sndio.handlePlayback);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_write__sndio(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten)\n{\n    int result;\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = 0;\n    }\n\n    result = ((ma_sio_write_proc)pDevice->pContext->sndio.sio_write)((struct ma_sio_hdl*)pDevice->sndio.handlePlayback, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels));\n    if (result == 0) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[sndio] Failed to send data from the client to the device.\");\n        return MA_IO_ERROR;\n    }\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = frameCount;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_read__sndio(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead)\n{\n    int result;\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    result = ((ma_sio_read_proc)pDevice->pContext->sndio.sio_read)((struct ma_sio_hdl*)pDevice->sndio.handleCapture, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels));\n    if (result == 0) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[sndio] Failed to read data from the device to be sent to the device.\");\n        return MA_IO_ERROR;\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = frameCount;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_uninit__sndio(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_sndio);\n\n    (void)pContext;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init__sndio(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n#ifndef MA_NO_RUNTIME_LINKING\n    const char* libsndioNames[] = {\n        \"libsndio.so\"\n    };\n    size_t i;\n\n    for (i = 0; i < ma_countof(libsndioNames); ++i) {\n        pContext->sndio.sndioSO = ma_dlopen(ma_context_get_log(pContext), libsndioNames[i]);\n        if (pContext->sndio.sndioSO != NULL) {\n            break;\n        }\n    }\n\n    if (pContext->sndio.sndioSO == NULL) {\n        return MA_NO_BACKEND;\n    }\n\n    pContext->sndio.sio_open    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, \"sio_open\");\n    pContext->sndio.sio_close   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, \"sio_close\");\n    pContext->sndio.sio_setpar  = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, \"sio_setpar\");\n    pContext->sndio.sio_getpar  = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, \"sio_getpar\");\n    pContext->sndio.sio_getcap  = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, \"sio_getcap\");\n    pContext->sndio.sio_write   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, \"sio_write\");\n    pContext->sndio.sio_read    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, \"sio_read\");\n    pContext->sndio.sio_start   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, \"sio_start\");\n    pContext->sndio.sio_stop    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, \"sio_stop\");\n    pContext->sndio.sio_initpar = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->sndio.sndioSO, \"sio_initpar\");\n#else\n    pContext->sndio.sio_open    = sio_open;\n    pContext->sndio.sio_close   = sio_close;\n    pContext->sndio.sio_setpar  = sio_setpar;\n    pContext->sndio.sio_getpar  = sio_getpar;\n    pContext->sndio.sio_getcap  = sio_getcap;\n    pContext->sndio.sio_write   = sio_write;\n    pContext->sndio.sio_read    = sio_read;\n    pContext->sndio.sio_start   = sio_start;\n    pContext->sndio.sio_stop    = sio_stop;\n    pContext->sndio.sio_initpar = sio_initpar;\n#endif\n\n    pCallbacks->onContextInit             = ma_context_init__sndio;\n    pCallbacks->onContextUninit           = ma_context_uninit__sndio;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__sndio;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__sndio;\n    pCallbacks->onDeviceInit              = ma_device_init__sndio;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__sndio;\n    pCallbacks->onDeviceStart             = ma_device_start__sndio;\n    pCallbacks->onDeviceStop              = ma_device_stop__sndio;\n    pCallbacks->onDeviceRead              = ma_device_read__sndio;\n    pCallbacks->onDeviceWrite             = ma_device_write__sndio;\n    pCallbacks->onDeviceDataLoop          = NULL;\n\n    (void)pConfig;\n    return MA_SUCCESS;\n}\n#endif  /* sndio */\n\n\n\n/******************************************************************************\n\naudio(4) Backend\n\n******************************************************************************/\n#ifdef MA_HAS_AUDIO4\n#include <fcntl.h>\n#include <poll.h>\n#include <errno.h>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <sys/ioctl.h>\n#include <sys/audioio.h>\n\n#if defined(__OpenBSD__)\n    #include <sys/param.h>\n    #if defined(OpenBSD) && OpenBSD >= 201709\n        #define MA_AUDIO4_USE_NEW_API\n    #endif\n#endif\n\nstatic void ma_construct_device_id__audio4(char* id, size_t idSize, const char* base, int deviceIndex)\n{\n    size_t baseLen;\n\n    MA_ASSERT(id != NULL);\n    MA_ASSERT(idSize > 0);\n    MA_ASSERT(deviceIndex >= 0);\n\n    baseLen = strlen(base);\n    MA_ASSERT(idSize > baseLen);\n\n    ma_strcpy_s(id, idSize, base);\n    ma_itoa_s(deviceIndex, id+baseLen, idSize-baseLen, 10);\n}\n\nstatic ma_result ma_extract_device_index_from_id__audio4(const char* id, const char* base, int* pIndexOut)\n{\n    size_t idLen;\n    size_t baseLen;\n    const char* deviceIndexStr;\n\n    MA_ASSERT(id != NULL);\n    MA_ASSERT(base != NULL);\n    MA_ASSERT(pIndexOut != NULL);\n\n    idLen = strlen(id);\n    baseLen = strlen(base);\n    if (idLen <= baseLen) {\n        return MA_ERROR;   /* Doesn't look like the id starts with the base. */\n    }\n\n    if (strncmp(id, base, baseLen) != 0) {\n        return MA_ERROR;   /* ID does not begin with base. */\n    }\n\n    deviceIndexStr = id + baseLen;\n    if (deviceIndexStr[0] == '\\0') {\n        return MA_ERROR;   /* No index specified in the ID. */\n    }\n\n    if (pIndexOut) {\n        *pIndexOut = atoi(deviceIndexStr);\n    }\n\n    return MA_SUCCESS;\n}\n\n\n#if !defined(MA_AUDIO4_USE_NEW_API)    /* Old API */\nstatic ma_format ma_format_from_encoding__audio4(unsigned int encoding, unsigned int precision)\n{\n    if (precision == 8 && (encoding == AUDIO_ENCODING_ULINEAR || encoding == AUDIO_ENCODING_ULINEAR || encoding == AUDIO_ENCODING_ULINEAR_LE || encoding == AUDIO_ENCODING_ULINEAR_BE)) {\n        return ma_format_u8;\n    } else {\n        if (ma_is_little_endian() && encoding == AUDIO_ENCODING_SLINEAR_LE) {\n            if (precision == 16) {\n                return ma_format_s16;\n            } else if (precision == 24) {\n                return ma_format_s24;\n            } else if (precision == 32) {\n                return ma_format_s32;\n            }\n        } else if (ma_is_big_endian() && encoding == AUDIO_ENCODING_SLINEAR_BE) {\n            if (precision == 16) {\n                return ma_format_s16;\n            } else if (precision == 24) {\n                return ma_format_s24;\n            } else if (precision == 32) {\n                return ma_format_s32;\n            }\n        }\n    }\n\n    return ma_format_unknown;  /* Encoding not supported. */\n}\n\nstatic void ma_encoding_from_format__audio4(ma_format format, unsigned int* pEncoding, unsigned int* pPrecision)\n{\n    MA_ASSERT(pEncoding  != NULL);\n    MA_ASSERT(pPrecision != NULL);\n\n    switch (format)\n    {\n        case ma_format_u8:\n        {\n            *pEncoding = AUDIO_ENCODING_ULINEAR;\n            *pPrecision = 8;\n        } break;\n\n        case ma_format_s24:\n        {\n            *pEncoding = (ma_is_little_endian()) ? AUDIO_ENCODING_SLINEAR_LE : AUDIO_ENCODING_SLINEAR_BE;\n            *pPrecision = 24;\n        } break;\n\n        case ma_format_s32:\n        {\n            *pEncoding = (ma_is_little_endian()) ? AUDIO_ENCODING_SLINEAR_LE : AUDIO_ENCODING_SLINEAR_BE;\n            *pPrecision = 32;\n        } break;\n\n        case ma_format_s16:\n        case ma_format_f32:\n        case ma_format_unknown:\n        default:\n        {\n            *pEncoding = (ma_is_little_endian()) ? AUDIO_ENCODING_SLINEAR_LE : AUDIO_ENCODING_SLINEAR_BE;\n            *pPrecision = 16;\n        } break;\n    }\n}\n\nstatic ma_format ma_format_from_prinfo__audio4(struct audio_prinfo* prinfo)\n{\n    return ma_format_from_encoding__audio4(prinfo->encoding, prinfo->precision);\n}\n\nstatic ma_format ma_best_format_from_fd__audio4(int fd, ma_format preferredFormat)\n{\n    audio_encoding_t encoding;\n    ma_uint32 iFormat;\n    int counter = 0;\n\n    /* First check to see if the preferred format is supported. */\n    if (preferredFormat != ma_format_unknown) {\n        counter = 0;\n        for (;;) {\n            MA_ZERO_OBJECT(&encoding);\n            encoding.index = counter;\n            if (ioctl(fd, AUDIO_GETENC, &encoding) < 0) {\n                break;\n            }\n\n            if (preferredFormat == ma_format_from_encoding__audio4(encoding.encoding, encoding.precision)) {\n                return preferredFormat;  /* Found the preferred format. */\n            }\n\n            /* Getting here means this encoding does not match our preferred format so we need to more on to the next encoding. */\n            counter += 1;\n        }\n    }\n\n    /* Getting here means our preferred format is not supported, so fall back to our standard priorities. */\n    for (iFormat = 0; iFormat < ma_countof(g_maFormatPriorities); iFormat += 1) {\n        ma_format format = g_maFormatPriorities[iFormat];\n\n        counter = 0;\n        for (;;) {\n            MA_ZERO_OBJECT(&encoding);\n            encoding.index = counter;\n            if (ioctl(fd, AUDIO_GETENC, &encoding) < 0) {\n                break;\n            }\n\n            if (format == ma_format_from_encoding__audio4(encoding.encoding, encoding.precision)) {\n                return format;  /* Found a workable format. */\n            }\n\n            /* Getting here means this encoding does not match our preferred format so we need to more on to the next encoding. */\n            counter += 1;\n        }\n    }\n\n    /* Getting here means not appropriate format was found. */\n    return ma_format_unknown;\n}\n#else\nstatic ma_format ma_format_from_swpar__audio4(struct audio_swpar* par)\n{\n    if (par->bits == 8 && par->bps == 1 && par->sig == 0) {\n        return ma_format_u8;\n    }\n    if (par->bits == 16 && par->bps == 2 && par->sig == 1 && par->le == ma_is_little_endian()) {\n        return ma_format_s16;\n    }\n    if (par->bits == 24 && par->bps == 3 && par->sig == 1 && par->le == ma_is_little_endian()) {\n        return ma_format_s24;\n    }\n    if (par->bits == 32 && par->bps == 4 && par->sig == 1 && par->le == ma_is_little_endian()) {\n        return ma_format_f32;\n    }\n\n    /* Format not supported. */\n    return ma_format_unknown;\n}\n#endif\n\nstatic ma_result ma_context_get_device_info_from_fd__audio4(ma_context* pContext, ma_device_type deviceType, int fd, ma_device_info* pDeviceInfo)\n{\n    audio_device_t fdDevice;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(fd >= 0);\n    MA_ASSERT(pDeviceInfo != NULL);\n\n    (void)pContext;\n    (void)deviceType;\n\n    if (ioctl(fd, AUDIO_GETDEV, &fdDevice) < 0) {\n        return MA_ERROR;   /* Failed to retrieve device info. */\n    }\n\n    /* Name. */\n    ma_strcpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), fdDevice.name);\n\n    #if !defined(MA_AUDIO4_USE_NEW_API)\n    {\n        audio_info_t fdInfo;\n        int counter = 0;\n        ma_uint32 channels;\n        ma_uint32 sampleRate;\n\n        if (ioctl(fd, AUDIO_GETINFO, &fdInfo) < 0) {\n            return MA_ERROR;\n        }\n\n        if (deviceType == ma_device_type_playback) {\n            channels   = fdInfo.play.channels;\n            sampleRate = fdInfo.play.sample_rate;\n        } else {\n            channels   = fdInfo.record.channels;\n            sampleRate = fdInfo.record.sample_rate;\n        }\n\n        /* Supported formats. We get this by looking at the encodings. */\n        pDeviceInfo->nativeDataFormatCount = 0;\n        for (;;) {\n            audio_encoding_t encoding;\n            ma_format format;\n\n            MA_ZERO_OBJECT(&encoding);\n            encoding.index = counter;\n            if (ioctl(fd, AUDIO_GETENC, &encoding) < 0) {\n                break;\n            }\n\n            format = ma_format_from_encoding__audio4(encoding.encoding, encoding.precision);\n            if (format != ma_format_unknown) {\n                ma_device_info_add_native_data_format(pDeviceInfo, format, channels, sampleRate, 0);\n            }\n\n            counter += 1;\n        }\n    }\n    #else\n    {\n        struct audio_swpar fdPar;\n        ma_format format;\n        ma_uint32 channels;\n        ma_uint32 sampleRate;\n\n        if (ioctl(fd, AUDIO_GETPAR, &fdPar) < 0) {\n            return MA_ERROR;\n        }\n\n        format = ma_format_from_swpar__audio4(&fdPar);\n        if (format == ma_format_unknown) {\n            return MA_FORMAT_NOT_SUPPORTED;\n        }\n\n        if (deviceType == ma_device_type_playback) {\n            channels = fdPar.pchan;\n        } else {\n            channels = fdPar.rchan;\n        }\n\n        sampleRate = fdPar.rate;\n\n        pDeviceInfo->nativeDataFormatCount = 0;\n        ma_device_info_add_native_data_format(pDeviceInfo, format, channels, sampleRate, 0);\n    }\n    #endif\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_enumerate_devices__audio4(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    const int maxDevices = 64;\n    char devpath[256];\n    int iDevice;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(callback != NULL);\n\n    /*\n    Every device will be named \"/dev/audioN\", with a \"/dev/audioctlN\" equivalent. We use the \"/dev/audioctlN\"\n    version here since we can open it even when another process has control of the \"/dev/audioN\" device.\n    */\n    for (iDevice = 0; iDevice < maxDevices; ++iDevice) {\n        struct stat st;\n        int fd;\n        ma_bool32 isTerminating = MA_FALSE;\n\n        ma_strcpy_s(devpath, sizeof(devpath), \"/dev/audioctl\");\n        ma_itoa_s(iDevice, devpath+strlen(devpath), sizeof(devpath)-strlen(devpath), 10);\n\n        if (stat(devpath, &st) < 0) {\n            break;\n        }\n\n        /* The device exists, but we need to check if it's usable as playback and/or capture. */\n\n        /* Playback. */\n        if (!isTerminating) {\n            fd = open(devpath, O_RDONLY, 0);\n            if (fd >= 0) {\n                /* Supports playback. */\n                ma_device_info deviceInfo;\n                MA_ZERO_OBJECT(&deviceInfo);\n                ma_construct_device_id__audio4(deviceInfo.id.audio4, sizeof(deviceInfo.id.audio4), \"/dev/audio\", iDevice);\n                if (ma_context_get_device_info_from_fd__audio4(pContext, ma_device_type_playback, fd, &deviceInfo) == MA_SUCCESS) {\n                    isTerminating = !callback(pContext, ma_device_type_playback, &deviceInfo, pUserData);\n                }\n\n                close(fd);\n            }\n        }\n\n        /* Capture. */\n        if (!isTerminating) {\n            fd = open(devpath, O_WRONLY, 0);\n            if (fd >= 0) {\n                /* Supports capture. */\n                ma_device_info deviceInfo;\n                MA_ZERO_OBJECT(&deviceInfo);\n                ma_construct_device_id__audio4(deviceInfo.id.audio4, sizeof(deviceInfo.id.audio4), \"/dev/audio\", iDevice);\n                if (ma_context_get_device_info_from_fd__audio4(pContext, ma_device_type_capture, fd, &deviceInfo) == MA_SUCCESS) {\n                    isTerminating = !callback(pContext, ma_device_type_capture, &deviceInfo, pUserData);\n                }\n\n                close(fd);\n            }\n        }\n\n        if (isTerminating) {\n            break;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_get_device_info__audio4(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    int fd = -1;\n    int deviceIndex = -1;\n    char ctlid[256];\n    ma_result result;\n\n    MA_ASSERT(pContext != NULL);\n\n    /*\n    We need to open the \"/dev/audioctlN\" device to get the info. To do this we need to extract the number\n    from the device ID which will be in \"/dev/audioN\" format.\n    */\n    if (pDeviceID == NULL) {\n        /* Default device. */\n        ma_strcpy_s(ctlid, sizeof(ctlid), \"/dev/audioctl\");\n    } else {\n        /* Specific device. We need to convert from \"/dev/audioN\" to \"/dev/audioctlN\". */\n        result = ma_extract_device_index_from_id__audio4(pDeviceID->audio4, \"/dev/audio\", &deviceIndex);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        ma_construct_device_id__audio4(ctlid, sizeof(ctlid), \"/dev/audioctl\", deviceIndex);\n    }\n\n    fd = open(ctlid, (deviceType == ma_device_type_playback) ? O_WRONLY : O_RDONLY, 0);\n    if (fd == -1) {\n        return MA_NO_DEVICE;\n    }\n\n    if (deviceIndex == -1) {\n        ma_strcpy_s(pDeviceInfo->id.audio4, sizeof(pDeviceInfo->id.audio4), \"/dev/audio\");\n    } else {\n        ma_construct_device_id__audio4(pDeviceInfo->id.audio4, sizeof(pDeviceInfo->id.audio4), \"/dev/audio\", deviceIndex);\n    }\n\n    result = ma_context_get_device_info_from_fd__audio4(pContext, deviceType, fd, pDeviceInfo);\n\n    close(fd);\n    return result;\n}\n\nstatic ma_result ma_device_uninit__audio4(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        close(pDevice->audio4.fdCapture);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        close(pDevice->audio4.fdPlayback);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_init_fd__audio4(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptor, ma_device_type deviceType)\n{\n    const char* pDefaultDeviceNames[] = {\n        \"/dev/audio\",\n        \"/dev/audio0\"\n    };\n    const char* pDefaultDeviceCtlNames[] = {\n        \"/dev/audioctl\",\n        \"/dev/audioctl0\"\n    };\n    int fd;\n    int fdFlags = 0;\n    size_t iDefaultDevice = (size_t)-1;\n    ma_format internalFormat;\n    ma_uint32 internalChannels;\n    ma_uint32 internalSampleRate;\n    ma_uint32 internalPeriodSizeInFrames;\n    ma_uint32 internalPeriods;\n\n    MA_ASSERT(pConfig    != NULL);\n    MA_ASSERT(deviceType != ma_device_type_duplex);\n    MA_ASSERT(pDevice    != NULL);\n\n    /* The first thing to do is open the file. */\n    if (deviceType == ma_device_type_capture) {\n        fdFlags = O_RDONLY;\n    } else {\n        fdFlags = O_WRONLY;\n    }\n    /*fdFlags |= O_NONBLOCK;*/\n\n    /* Find the index of the default device as a start. We'll use this index later. Set it to (size_t)-1 otherwise. */\n    if (pDescriptor->pDeviceID == NULL) {\n        /* Default device. */\n        for (iDefaultDevice = 0; iDefaultDevice < ma_countof(pDefaultDeviceNames); ++iDefaultDevice) {\n            fd = open(pDefaultDeviceNames[iDefaultDevice], fdFlags, 0);\n            if (fd != -1) {\n                break;\n            }\n        }\n    } else {\n        /* Specific device. */\n        fd = open(pDescriptor->pDeviceID->audio4, fdFlags, 0);\n\n        for (iDefaultDevice = 0; iDefaultDevice < ma_countof(pDefaultDeviceNames); iDefaultDevice += 1) {\n            if (ma_strcmp(pDefaultDeviceNames[iDefaultDevice], pDescriptor->pDeviceID->audio4) == 0) {\n                break;\n            }\n        }\n\n        if (iDefaultDevice == ma_countof(pDefaultDeviceNames)) {\n            iDefaultDevice = (size_t)-1;\n        }\n    }\n\n    if (fd == -1) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] Failed to open device.\");\n        return ma_result_from_errno(errno);\n    }\n\n    #if !defined(MA_AUDIO4_USE_NEW_API)    /* Old API */\n    {\n        audio_info_t fdInfo;\n        int fdInfoResult = -1;\n\n        /*\n        The documentation is a little bit unclear to me as to how it handles formats. It says the\n        following:\n\n            Regardless of formats supported by underlying driver, the audio driver accepts the\n            following formats.\n\n        By then the next sentence says this:\n\n            `encoding` and `precision` are one of the values obtained by AUDIO_GETENC.\n\n        It sounds like a direct contradiction to me. I'm going to play this safe any only use the\n        best sample format returned by AUDIO_GETENC. If the requested format is supported we'll\n        use that, but otherwise we'll just use our standard format priorities to pick an\n        appropriate one.\n        */\n        AUDIO_INITINFO(&fdInfo);\n\n        /*\n        Get the default format from the audioctl file if we're asking for a default device. If we\n        retrieve it from /dev/audio it'll default to mono 8000Hz.\n        */\n        if (iDefaultDevice != (size_t)-1) {\n            /* We're using a default device. Get the info from the /dev/audioctl file instead of /dev/audio. */\n            int fdctl = open(pDefaultDeviceCtlNames[iDefaultDevice], fdFlags, 0);\n            if (fdctl != -1) {\n                fdInfoResult = ioctl(fdctl, AUDIO_GETINFO, &fdInfo);\n                close(fdctl);\n            }\n        }\n\n        if (fdInfoResult == -1) {\n            /* We still don't have the default device info so just retrieve it from the main audio device. */\n            if (ioctl(fd, AUDIO_GETINFO, &fdInfo) < 0) {\n                close(fd);\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] AUDIO_GETINFO failed.\");\n                return ma_result_from_errno(errno);\n            }\n        }\n\n        /* We get the driver to do as much of the data conversion as possible. */\n        if (deviceType == ma_device_type_capture) {\n            fdInfo.mode = AUMODE_RECORD;\n            ma_encoding_from_format__audio4(ma_best_format_from_fd__audio4(fd, pDescriptor->format), &fdInfo.record.encoding, &fdInfo.record.precision);\n\n            if (pDescriptor->channels != 0) {\n                fdInfo.record.channels = ma_clamp(pDescriptor->channels, 1, 12);    /* From the documentation: `channels` ranges from 1 to 12. */\n            }\n\n            if (pDescriptor->sampleRate != 0) {\n                fdInfo.record.sample_rate = ma_clamp(pDescriptor->sampleRate, 1000, 192000);    /* From the documentation: `frequency` ranges from 1000Hz to 192000Hz. (They mean `sample_rate` instead of `frequency`.) */\n            }\n        } else {\n            fdInfo.mode = AUMODE_PLAY;\n            ma_encoding_from_format__audio4(ma_best_format_from_fd__audio4(fd, pDescriptor->format), &fdInfo.play.encoding, &fdInfo.play.precision);\n\n            if (pDescriptor->channels != 0) {\n                fdInfo.play.channels = ma_clamp(pDescriptor->channels, 1, 12);    /* From the documentation: `channels` ranges from 1 to 12. */\n            }\n\n            if (pDescriptor->sampleRate != 0) {\n                fdInfo.play.sample_rate = ma_clamp(pDescriptor->sampleRate, 1000, 192000);    /* From the documentation: `frequency` ranges from 1000Hz to 192000Hz. (They mean `sample_rate` instead of `frequency`.) */\n            }\n        }\n\n        if (ioctl(fd, AUDIO_SETINFO, &fdInfo) < 0) {\n            close(fd);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] Failed to set device format. AUDIO_SETINFO failed.\");\n            return ma_result_from_errno(errno);\n        }\n\n        if (ioctl(fd, AUDIO_GETINFO, &fdInfo) < 0) {\n            close(fd);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] AUDIO_GETINFO failed.\");\n            return ma_result_from_errno(errno);\n        }\n\n        if (deviceType == ma_device_type_capture) {\n            internalFormat     = ma_format_from_prinfo__audio4(&fdInfo.record);\n            internalChannels   = fdInfo.record.channels;\n            internalSampleRate = fdInfo.record.sample_rate;\n        } else {\n            internalFormat     = ma_format_from_prinfo__audio4(&fdInfo.play);\n            internalChannels   = fdInfo.play.channels;\n            internalSampleRate = fdInfo.play.sample_rate;\n        }\n\n        if (internalFormat == ma_format_unknown) {\n            close(fd);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] The device's internal device format is not supported by miniaudio. The device is unusable.\");\n            return MA_FORMAT_NOT_SUPPORTED;\n        }\n\n        /* Buffer. */\n        {\n            ma_uint32 internalPeriodSizeInBytes;\n\n            internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, internalSampleRate, pConfig->performanceProfile);\n\n            internalPeriodSizeInBytes = internalPeriodSizeInFrames * ma_get_bytes_per_frame(internalFormat, internalChannels);\n            if (internalPeriodSizeInBytes < 16) {\n                internalPeriodSizeInBytes = 16;\n            }\n\n            internalPeriods = pDescriptor->periodCount;\n            if (internalPeriods < 2) {\n                internalPeriods = 2;\n            }\n\n            /* What miniaudio calls a period, audio4 calls a block. */\n            AUDIO_INITINFO(&fdInfo);\n            fdInfo.hiwat     = internalPeriods;\n            fdInfo.lowat     = internalPeriods-1;\n            fdInfo.blocksize = internalPeriodSizeInBytes;\n            if (ioctl(fd, AUDIO_SETINFO, &fdInfo) < 0) {\n                close(fd);\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] Failed to set internal buffer size. AUDIO_SETINFO failed.\");\n                return ma_result_from_errno(errno);\n            }\n\n            internalPeriods            = fdInfo.hiwat;\n            internalPeriodSizeInFrames = fdInfo.blocksize / ma_get_bytes_per_frame(internalFormat, internalChannels);\n        }\n    }\n    #else\n    {\n        struct audio_swpar fdPar;\n\n        /* We need to retrieve the format of the device so we can know the channel count and sample rate. Then we can calculate the buffer size. */\n        if (ioctl(fd, AUDIO_GETPAR, &fdPar) < 0) {\n            close(fd);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] Failed to retrieve initial device parameters.\");\n            return ma_result_from_errno(errno);\n        }\n\n        internalFormat     = ma_format_from_swpar__audio4(&fdPar);\n        internalChannels   = (deviceType == ma_device_type_capture) ? fdPar.rchan : fdPar.pchan;\n        internalSampleRate = fdPar.rate;\n\n        if (internalFormat == ma_format_unknown) {\n            close(fd);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] The device's internal device format is not supported by miniaudio. The device is unusable.\");\n            return MA_FORMAT_NOT_SUPPORTED;\n        }\n\n        /* Buffer. */\n        {\n            ma_uint32 internalPeriodSizeInBytes;\n\n            internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, internalSampleRate, pConfig->performanceProfile);\n\n            /* What miniaudio calls a period, audio4 calls a block. */\n            internalPeriodSizeInBytes = internalPeriodSizeInFrames * ma_get_bytes_per_frame(internalFormat, internalChannels);\n            if (internalPeriodSizeInBytes < 16) {\n                internalPeriodSizeInBytes = 16;\n            }\n\n            fdPar.nblks = pDescriptor->periodCount;\n            fdPar.round = internalPeriodSizeInBytes;\n\n            if (ioctl(fd, AUDIO_SETPAR, &fdPar) < 0) {\n                close(fd);\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] Failed to set device parameters.\");\n                return ma_result_from_errno(errno);\n            }\n\n            if (ioctl(fd, AUDIO_GETPAR, &fdPar) < 0) {\n                close(fd);\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] Failed to retrieve actual device parameters.\");\n                return ma_result_from_errno(errno);\n            }\n        }\n\n        internalFormat             = ma_format_from_swpar__audio4(&fdPar);\n        internalChannels           = (deviceType == ma_device_type_capture) ? fdPar.rchan : fdPar.pchan;\n        internalSampleRate         = fdPar.rate;\n        internalPeriods            = fdPar.nblks;\n        internalPeriodSizeInFrames = fdPar.round / ma_get_bytes_per_frame(internalFormat, internalChannels);\n    }\n    #endif\n\n    if (internalFormat == ma_format_unknown) {\n        close(fd);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] The device's internal device format is not supported by miniaudio. The device is unusable.\");\n        return MA_FORMAT_NOT_SUPPORTED;\n    }\n\n    if (deviceType == ma_device_type_capture) {\n        pDevice->audio4.fdCapture  = fd;\n    } else {\n        pDevice->audio4.fdPlayback = fd;\n    }\n\n    pDescriptor->format             = internalFormat;\n    pDescriptor->channels           = internalChannels;\n    pDescriptor->sampleRate         = internalSampleRate;\n    ma_channel_map_init_standard(ma_standard_channel_map_sound4, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), internalChannels);\n    pDescriptor->periodSizeInFrames = internalPeriodSizeInFrames;\n    pDescriptor->periodCount        = internalPeriods;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_init__audio4(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    MA_ZERO_OBJECT(&pDevice->audio4);\n\n    if (pConfig->deviceType == ma_device_type_loopback) {\n        return MA_DEVICE_TYPE_NOT_SUPPORTED;\n    }\n\n    pDevice->audio4.fdCapture  = -1;\n    pDevice->audio4.fdPlayback = -1;\n\n    /*\n    The version of the operating system dictates whether or not the device is exclusive or shared. NetBSD\n    introduced in-kernel mixing which means it's shared. All other BSD flavours are exclusive as far as\n    I'm aware.\n    */\n#if defined(__NetBSD_Version__) && __NetBSD_Version__ >= 800000000\n    /* NetBSD 8.0+ */\n    if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) ||\n        ((pConfig->deviceType == ma_device_type_capture  || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode  == ma_share_mode_exclusive)) {\n        return MA_SHARE_MODE_NOT_SUPPORTED;\n    }\n#else\n    /* All other flavors. */\n#endif\n\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        ma_result result = ma_device_init_fd__audio4(pDevice, pConfig, pDescriptorCapture, ma_device_type_capture);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        ma_result result = ma_device_init_fd__audio4(pDevice, pConfig, pDescriptorPlayback, ma_device_type_playback);\n        if (result != MA_SUCCESS) {\n            if (pConfig->deviceType == ma_device_type_duplex) {\n                close(pDevice->audio4.fdCapture);\n            }\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_start__audio4(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        if (pDevice->audio4.fdCapture == -1) {\n            return MA_INVALID_ARGS;\n        }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        if (pDevice->audio4.fdPlayback == -1) {\n            return MA_INVALID_ARGS;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop_fd__audio4(ma_device* pDevice, int fd)\n{\n    if (fd == -1) {\n        return MA_INVALID_ARGS;\n    }\n\n#if !defined(MA_AUDIO4_USE_NEW_API)\n    if (ioctl(fd, AUDIO_FLUSH, 0) < 0) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] Failed to stop device. AUDIO_FLUSH failed.\");\n        return ma_result_from_errno(errno);\n    }\n#else\n    if (ioctl(fd, AUDIO_STOP, 0) < 0) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] Failed to stop device. AUDIO_STOP failed.\");\n        return ma_result_from_errno(errno);\n    }\n#endif\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop__audio4(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        ma_result result;\n\n        result = ma_device_stop_fd__audio4(pDevice, pDevice->audio4.fdCapture);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ma_result result;\n\n        /* Drain the device first. If this fails we'll just need to flush without draining. Unfortunately draining isn't available on newer version of OpenBSD. */\n    #if !defined(MA_AUDIO4_USE_NEW_API)\n        ioctl(pDevice->audio4.fdPlayback, AUDIO_DRAIN, 0);\n    #endif\n\n        /* Here is where the device is stopped immediately. */\n        result = ma_device_stop_fd__audio4(pDevice, pDevice->audio4.fdPlayback);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_write__audio4(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten)\n{\n    int result;\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = 0;\n    }\n\n    result = write(pDevice->audio4.fdPlayback, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels));\n    if (result < 0) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] Failed to write data to the device.\");\n        return ma_result_from_errno(errno);\n    }\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = (ma_uint32)result / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_read__audio4(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead)\n{\n    int result;\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    result = read(pDevice->audio4.fdCapture, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels));\n    if (result < 0) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[audio4] Failed to read data from the device.\");\n        return ma_result_from_errno(errno);\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = (ma_uint32)result / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_uninit__audio4(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_audio4);\n\n    (void)pContext;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init__audio4(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n    MA_ASSERT(pContext != NULL);\n\n    (void)pConfig;\n\n    pCallbacks->onContextInit             = ma_context_init__audio4;\n    pCallbacks->onContextUninit           = ma_context_uninit__audio4;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__audio4;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__audio4;\n    pCallbacks->onDeviceInit              = ma_device_init__audio4;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__audio4;\n    pCallbacks->onDeviceStart             = ma_device_start__audio4;\n    pCallbacks->onDeviceStop              = ma_device_stop__audio4;\n    pCallbacks->onDeviceRead              = ma_device_read__audio4;\n    pCallbacks->onDeviceWrite             = ma_device_write__audio4;\n    pCallbacks->onDeviceDataLoop          = NULL;\n\n    return MA_SUCCESS;\n}\n#endif  /* audio4 */\n\n\n/******************************************************************************\n\nOSS Backend\n\n******************************************************************************/\n#ifdef MA_HAS_OSS\n#include <sys/ioctl.h>\n#include <unistd.h>\n#include <fcntl.h>\n#include <sys/soundcard.h>\n\n#ifndef SNDCTL_DSP_HALT\n#define SNDCTL_DSP_HALT SNDCTL_DSP_RESET\n#endif\n\n#define MA_OSS_DEFAULT_DEVICE_NAME  \"/dev/dsp\"\n\nstatic int ma_open_temp_device__oss()\n{\n    /* The OSS sample code uses \"/dev/mixer\" as the device for getting system properties so I'm going to do the same. */\n    int fd = open(\"/dev/mixer\", O_RDONLY, 0);\n    if (fd >= 0) {\n        return fd;\n    }\n\n    return -1;\n}\n\nstatic ma_result ma_context_open_device__oss(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_share_mode shareMode, int* pfd)\n{\n    const char* deviceName;\n    int flags;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pfd != NULL);\n    (void)pContext;\n\n    *pfd = -1;\n\n    /* This function should only be called for playback or capture, not duplex. */\n    if (deviceType == ma_device_type_duplex) {\n        return MA_INVALID_ARGS;\n    }\n\n    deviceName = MA_OSS_DEFAULT_DEVICE_NAME;\n    if (pDeviceID != NULL) {\n        deviceName = pDeviceID->oss;\n    }\n\n    flags = (deviceType == ma_device_type_playback) ? O_WRONLY : O_RDONLY;\n    if (shareMode == ma_share_mode_exclusive) {\n        flags |= O_EXCL;\n    }\n\n    *pfd = open(deviceName, flags, 0);\n    if (*pfd == -1) {\n        return ma_result_from_errno(errno);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_enumerate_devices__oss(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    int fd;\n    oss_sysinfo si;\n    int result;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(callback != NULL);\n\n    fd = ma_open_temp_device__oss();\n    if (fd == -1) {\n        ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to open a temporary device for retrieving system information used for device enumeration.\");\n        return MA_NO_BACKEND;\n    }\n\n    result = ioctl(fd, SNDCTL_SYSINFO, &si);\n    if (result != -1) {\n        int iAudioDevice;\n        for (iAudioDevice = 0; iAudioDevice < si.numaudios; ++iAudioDevice) {\n            oss_audioinfo ai;\n            ai.dev = iAudioDevice;\n            result = ioctl(fd, SNDCTL_AUDIOINFO, &ai);\n            if (result != -1) {\n                if (ai.devnode[0] != '\\0') {    /* <-- Can be blank, according to documentation. */\n                    ma_device_info deviceInfo;\n                    ma_bool32 isTerminating = MA_FALSE;\n\n                    MA_ZERO_OBJECT(&deviceInfo);\n\n                    /* ID */\n                    ma_strncpy_s(deviceInfo.id.oss, sizeof(deviceInfo.id.oss), ai.devnode, (size_t)-1);\n\n                    /*\n                    The human readable device name should be in the \"ai.handle\" variable, but it can\n                    sometimes be empty in which case we just fall back to \"ai.name\" which is less user\n                    friendly, but usually has a value.\n                    */\n                    if (ai.handle[0] != '\\0') {\n                        ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), ai.handle, (size_t)-1);\n                    } else {\n                        ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), ai.name, (size_t)-1);\n                    }\n\n                    /* The device can be both playback and capture. */\n                    if (!isTerminating && (ai.caps & PCM_CAP_OUTPUT) != 0) {\n                        isTerminating = !callback(pContext, ma_device_type_playback, &deviceInfo, pUserData);\n                    }\n                    if (!isTerminating && (ai.caps & PCM_CAP_INPUT) != 0) {\n                        isTerminating = !callback(pContext, ma_device_type_capture, &deviceInfo, pUserData);\n                    }\n\n                    if (isTerminating) {\n                        break;\n                    }\n                }\n            }\n        }\n    } else {\n        close(fd);\n        ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to retrieve system information for device enumeration.\");\n        return MA_NO_BACKEND;\n    }\n\n    close(fd);\n    return MA_SUCCESS;\n}\n\nstatic void ma_context_add_native_data_format__oss(ma_context* pContext, oss_audioinfo* pAudioInfo, ma_format format, ma_device_info* pDeviceInfo)\n{\n    unsigned int minChannels;\n    unsigned int maxChannels;\n    unsigned int iRate;\n\n    MA_ASSERT(pContext    != NULL);\n    MA_ASSERT(pAudioInfo  != NULL);\n    MA_ASSERT(pDeviceInfo != NULL);\n\n    /* If we support all channels we just report 0. */\n    minChannels = ma_clamp(pAudioInfo->min_channels, MA_MIN_CHANNELS, MA_MAX_CHANNELS);\n    maxChannels = ma_clamp(pAudioInfo->max_channels, MA_MIN_CHANNELS, MA_MAX_CHANNELS);\n\n    /*\n    OSS has this annoying thing where sample rates can be reported in two ways. We prefer explicitness,\n    which OSS has in the form of nrates/rates, however there are times where nrates can be 0, in which\n    case we'll need to use min_rate and max_rate and report only standard rates.\n    */\n    if (pAudioInfo->nrates > 0) {\n        for (iRate = 0; iRate < pAudioInfo->nrates; iRate += 1) {\n            unsigned int rate = pAudioInfo->rates[iRate];\n\n            if (minChannels == MA_MIN_CHANNELS && maxChannels == MA_MAX_CHANNELS) {\n                ma_device_info_add_native_data_format(pDeviceInfo, format, 0, rate, 0);   /* Set the channel count to 0 to indicate that all channel counts are supported. */\n            } else {\n                unsigned int iChannel;\n                for (iChannel = minChannels; iChannel <= maxChannels; iChannel += 1) {\n                     ma_device_info_add_native_data_format(pDeviceInfo, format, iChannel, rate, 0);\n                }\n            }\n        }\n    } else {\n        for (iRate = 0; iRate < ma_countof(g_maStandardSampleRatePriorities); iRate += 1) {\n            ma_uint32 standardRate = g_maStandardSampleRatePriorities[iRate];\n\n            if (standardRate >= (ma_uint32)pAudioInfo->min_rate && standardRate <= (ma_uint32)pAudioInfo->max_rate) {\n                if (minChannels == MA_MIN_CHANNELS && maxChannels == MA_MAX_CHANNELS) {\n                    ma_device_info_add_native_data_format(pDeviceInfo, format, 0, standardRate, 0);   /* Set the channel count to 0 to indicate that all channel counts are supported. */\n                } else {\n                    unsigned int iChannel;\n                    for (iChannel = minChannels; iChannel <= maxChannels; iChannel += 1) {\n                         ma_device_info_add_native_data_format(pDeviceInfo, format, iChannel, standardRate, 0);\n                    }\n                }\n            }\n        }\n    }\n}\n\nstatic ma_result ma_context_get_device_info__oss(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    ma_bool32 foundDevice;\n    int fdTemp;\n    oss_sysinfo si;\n    int result;\n\n    MA_ASSERT(pContext != NULL);\n\n    /* Handle the default device a little differently. */\n    if (pDeviceID == NULL) {\n        if (deviceType == ma_device_type_playback) {\n            ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n        } else {\n            ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n        }\n\n        return MA_SUCCESS;\n    }\n\n\n    /* If we get here it means we are _not_ using the default device. */\n    foundDevice = MA_FALSE;\n\n    fdTemp = ma_open_temp_device__oss();\n    if (fdTemp == -1) {\n        ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to open a temporary device for retrieving system information used for device enumeration.\");\n        return MA_NO_BACKEND;\n    }\n\n    result = ioctl(fdTemp, SNDCTL_SYSINFO, &si);\n    if (result != -1) {\n        int iAudioDevice;\n        for (iAudioDevice = 0; iAudioDevice < si.numaudios; ++iAudioDevice) {\n            oss_audioinfo ai;\n            ai.dev = iAudioDevice;\n            result = ioctl(fdTemp, SNDCTL_AUDIOINFO, &ai);\n            if (result != -1) {\n                if (ma_strcmp(ai.devnode, pDeviceID->oss) == 0) {\n                    /* It has the same name, so now just confirm the type. */\n                    if ((deviceType == ma_device_type_playback && ((ai.caps & PCM_CAP_OUTPUT) != 0)) ||\n                        (deviceType == ma_device_type_capture  && ((ai.caps & PCM_CAP_INPUT)  != 0))) {\n                        unsigned int formatMask;\n\n                        /* ID */\n                        ma_strncpy_s(pDeviceInfo->id.oss, sizeof(pDeviceInfo->id.oss), ai.devnode, (size_t)-1);\n\n                        /*\n                        The human readable device name should be in the \"ai.handle\" variable, but it can\n                        sometimes be empty in which case we just fall back to \"ai.name\" which is less user\n                        friendly, but usually has a value.\n                        */\n                        if (ai.handle[0] != '\\0') {\n                            ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), ai.handle, (size_t)-1);\n                        } else {\n                            ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), ai.name, (size_t)-1);\n                        }\n\n\n                        pDeviceInfo->nativeDataFormatCount = 0;\n\n                        if (deviceType == ma_device_type_playback) {\n                            formatMask = ai.oformats;\n                        } else {\n                            formatMask = ai.iformats;\n                        }\n\n                        if (((formatMask & AFMT_S16_LE) != 0 && ma_is_little_endian()) || (AFMT_S16_BE && ma_is_big_endian())) {\n                            ma_context_add_native_data_format__oss(pContext, &ai, ma_format_s16, pDeviceInfo);\n                        }\n                        if (((formatMask & AFMT_S32_LE) != 0 && ma_is_little_endian()) || (AFMT_S32_BE && ma_is_big_endian())) {\n                            ma_context_add_native_data_format__oss(pContext, &ai, ma_format_s32, pDeviceInfo);\n                        }\n                        if ((formatMask & AFMT_U8) != 0) {\n                            ma_context_add_native_data_format__oss(pContext, &ai, ma_format_u8, pDeviceInfo);\n                        }\n\n                        foundDevice = MA_TRUE;\n                        break;\n                    }\n                }\n            }\n        }\n    } else {\n        close(fdTemp);\n        ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to retrieve system information for device enumeration.\");\n        return MA_NO_BACKEND;\n    }\n\n\n    close(fdTemp);\n\n    if (!foundDevice) {\n        return MA_NO_DEVICE;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_uninit__oss(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        close(pDevice->oss.fdCapture);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        close(pDevice->oss.fdPlayback);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic int ma_format_to_oss(ma_format format)\n{\n    int ossFormat = AFMT_U8;\n    switch (format) {\n        case ma_format_s16: ossFormat = (ma_is_little_endian()) ? AFMT_S16_LE : AFMT_S16_BE; break;\n        case ma_format_s24: ossFormat = (ma_is_little_endian()) ? AFMT_S32_LE : AFMT_S32_BE; break;\n        case ma_format_s32: ossFormat = (ma_is_little_endian()) ? AFMT_S32_LE : AFMT_S32_BE; break;\n        case ma_format_f32: ossFormat = (ma_is_little_endian()) ? AFMT_S16_LE : AFMT_S16_BE; break;\n        case ma_format_u8:\n        default: ossFormat = AFMT_U8; break;\n    }\n\n    return ossFormat;\n}\n\nstatic ma_format ma_format_from_oss(int ossFormat)\n{\n    if (ossFormat == AFMT_U8) {\n        return ma_format_u8;\n    } else {\n        if (ma_is_little_endian()) {\n            switch (ossFormat) {\n                case AFMT_S16_LE: return ma_format_s16;\n                case AFMT_S32_LE: return ma_format_s32;\n                default: return ma_format_unknown;\n            }\n        } else {\n            switch (ossFormat) {\n                case AFMT_S16_BE: return ma_format_s16;\n                case AFMT_S32_BE: return ma_format_s32;\n                default: return ma_format_unknown;\n            }\n        }\n    }\n\n    return ma_format_unknown;\n}\n\nstatic ma_result ma_device_init_fd__oss(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptor, ma_device_type deviceType)\n{\n    ma_result result;\n    int ossResult;\n    int fd;\n    const ma_device_id* pDeviceID = NULL;\n    ma_share_mode shareMode;\n    int ossFormat;\n    int ossChannels;\n    int ossSampleRate;\n    int ossFragment;\n\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(pConfig != NULL);\n    MA_ASSERT(deviceType != ma_device_type_duplex);\n\n    pDeviceID     = pDescriptor->pDeviceID;\n    shareMode     = pDescriptor->shareMode;\n    ossFormat     = ma_format_to_oss((pDescriptor->format != ma_format_unknown) ? pDescriptor->format : ma_format_s16); /* Use s16 by default because OSS doesn't like floating point. */\n    ossChannels   = (int)(pDescriptor->channels   > 0) ? pDescriptor->channels   : MA_DEFAULT_CHANNELS;\n    ossSampleRate = (int)(pDescriptor->sampleRate > 0) ? pDescriptor->sampleRate : MA_DEFAULT_SAMPLE_RATE;\n\n    result = ma_context_open_device__oss(pDevice->pContext, deviceType, pDeviceID, shareMode, &fd);\n    if (result != MA_SUCCESS) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to open device.\");\n        return result;\n    }\n\n    /*\n    The OSS documantation is very clear about the order we should be initializing the device's properties:\n      1) Format\n      2) Channels\n      3) Sample rate.\n    */\n\n    /* Format. */\n    ossResult = ioctl(fd, SNDCTL_DSP_SETFMT, &ossFormat);\n    if (ossResult == -1) {\n        close(fd);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to set format.\");\n        return ma_result_from_errno(errno);\n    }\n\n    /* Channels. */\n    ossResult = ioctl(fd, SNDCTL_DSP_CHANNELS, &ossChannels);\n    if (ossResult == -1) {\n        close(fd);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to set channel count.\");\n        return ma_result_from_errno(errno);\n    }\n\n    /* Sample Rate. */\n    ossResult = ioctl(fd, SNDCTL_DSP_SPEED, &ossSampleRate);\n    if (ossResult == -1) {\n        close(fd);\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to set sample rate.\");\n        return ma_result_from_errno(errno);\n    }\n\n    /*\n    Buffer.\n\n    The documentation says that the fragment settings should be set as soon as possible, but I'm not sure if\n    it should be done before or after format/channels/rate.\n\n    OSS wants the fragment size in bytes and a power of 2. When setting, we specify the power, not the actual\n    value.\n    */\n    {\n        ma_uint32 periodSizeInFrames;\n        ma_uint32 periodSizeInBytes;\n        ma_uint32 ossFragmentSizePower;\n\n        periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, (ma_uint32)ossSampleRate, pConfig->performanceProfile);\n\n        periodSizeInBytes = ma_round_to_power_of_2(periodSizeInFrames * ma_get_bytes_per_frame(ma_format_from_oss(ossFormat), ossChannels));\n        if (periodSizeInBytes < 16) {\n            periodSizeInBytes = 16;\n        }\n\n        ossFragmentSizePower = 4;\n        periodSizeInBytes >>= 4;\n        while (periodSizeInBytes >>= 1) {\n            ossFragmentSizePower += 1;\n        }\n\n        ossFragment = (int)((pConfig->periods << 16) | ossFragmentSizePower);\n        ossResult = ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &ossFragment);\n        if (ossResult == -1) {\n            close(fd);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to set fragment size and period count.\");\n            return ma_result_from_errno(errno);\n        }\n    }\n\n    /* Internal settings. */\n    if (deviceType == ma_device_type_capture) {\n        pDevice->oss.fdCapture  = fd;\n    } else {\n        pDevice->oss.fdPlayback = fd;\n    }\n\n    pDescriptor->format             = ma_format_from_oss(ossFormat);\n    pDescriptor->channels           = ossChannels;\n    pDescriptor->sampleRate         = ossSampleRate;\n    ma_channel_map_init_standard(ma_standard_channel_map_sound4, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), pDescriptor->channels);\n    pDescriptor->periodCount        = (ma_uint32)(ossFragment >> 16);\n    pDescriptor->periodSizeInFrames = (ma_uint32)(1 << (ossFragment & 0xFFFF)) / ma_get_bytes_per_frame(pDescriptor->format, pDescriptor->channels);\n\n    if (pDescriptor->format == ma_format_unknown) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OSS] The device's internal format is not supported by miniaudio.\");\n        return MA_FORMAT_NOT_SUPPORTED;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_init__oss(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n    MA_ASSERT(pDevice  != NULL);\n    MA_ASSERT(pConfig  != NULL);\n\n    MA_ZERO_OBJECT(&pDevice->oss);\n\n    if (pConfig->deviceType == ma_device_type_loopback) {\n        return MA_DEVICE_TYPE_NOT_SUPPORTED;\n    }\n\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        ma_result result = ma_device_init_fd__oss(pDevice, pConfig, pDescriptorCapture, ma_device_type_capture);\n        if (result != MA_SUCCESS) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to open device.\");\n            return result;\n        }\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        ma_result result = ma_device_init_fd__oss(pDevice, pConfig, pDescriptorPlayback, ma_device_type_playback);\n        if (result != MA_SUCCESS) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to open device.\");\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\n/*\nNote on Starting and Stopping\n=============================\nIn the past I was using SNDCTL_DSP_HALT to stop the device, however this results in issues when\ntrying to resume the device again. If we use SNDCTL_DSP_HALT, the next write() or read() will\nfail. Instead what we need to do is just not write or read to and from the device when the\ndevice is not running.\n\nAs a result, both the start and stop functions for OSS are just empty stubs. The starting and\nstopping logic is handled by ma_device_write__oss() and ma_device_read__oss(). These will check\nthe device state, and if the device is stopped they will simply not do any kind of processing.\n\nThe downside to this technique is that I've noticed a fairly lengthy delay in stopping the\ndevice, up to a second. This is on a virtual machine, and as such might just be due to the\nvirtual drivers, but I'm not fully sure. I am not sure how to work around this problem so for\nthe moment that's just how it's going to have to be.\n\nWhen starting the device, OSS will automatically start it when write() or read() is called.\n*/\nstatic ma_result ma_device_start__oss(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    /* The device is automatically started with reading and writing. */\n    (void)pDevice;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop__oss(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    /* See note above on why this is empty. */\n    (void)pDevice;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_write__oss(ma_device* pDevice, const void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesWritten)\n{\n    int resultOSS;\n    ma_uint32 deviceState;\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = 0;\n    }\n\n    /* Don't do any processing if the device is stopped. */\n    deviceState = ma_device_get_state(pDevice);\n    if (deviceState != ma_device_state_started && deviceState != ma_device_state_starting) {\n        return MA_SUCCESS;\n    }\n\n    resultOSS = write(pDevice->oss.fdPlayback, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels));\n    if (resultOSS < 0) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to send data from the client to the device.\");\n        return ma_result_from_errno(errno);\n    }\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = (ma_uint32)resultOSS / ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_read__oss(ma_device* pDevice, void* pPCMFrames, ma_uint32 frameCount, ma_uint32* pFramesRead)\n{\n    int resultOSS;\n    ma_uint32 deviceState;\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    /* Don't do any processing if the device is stopped. */\n    deviceState = ma_device_get_state(pDevice);\n    if (deviceState != ma_device_state_started && deviceState != ma_device_state_starting) {\n        return MA_SUCCESS;\n    }\n\n    resultOSS = read(pDevice->oss.fdCapture, pPCMFrames, frameCount * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels));\n    if (resultOSS < 0) {\n        ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to read data from the device to be sent to the client.\");\n        return ma_result_from_errno(errno);\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = (ma_uint32)resultOSS / ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_uninit__oss(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_oss);\n\n    (void)pContext;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init__oss(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n    int fd;\n    int ossVersion;\n    int result;\n\n    MA_ASSERT(pContext != NULL);\n\n    (void)pConfig;\n\n    /* Try opening a temporary device first so we can get version information. This is closed at the end. */\n    fd = ma_open_temp_device__oss();\n    if (fd == -1) {\n        ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to open temporary device for retrieving system properties.\");   /* Looks liks OSS isn't installed, or there are no available devices. */\n        return MA_NO_BACKEND;\n    }\n\n    /* Grab the OSS version. */\n    ossVersion = 0;\n    result = ioctl(fd, OSS_GETVERSION, &ossVersion);\n    if (result == -1) {\n        close(fd);\n        ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, \"[OSS] Failed to retrieve OSS version.\");\n        return MA_NO_BACKEND;\n    }\n\n    /* The file handle to temp device is no longer needed. Close ASAP. */\n    close(fd);\n\n    pContext->oss.versionMajor = ((ossVersion & 0xFF0000) >> 16);\n    pContext->oss.versionMinor = ((ossVersion & 0x00FF00) >> 8);\n\n    pCallbacks->onContextInit             = ma_context_init__oss;\n    pCallbacks->onContextUninit           = ma_context_uninit__oss;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__oss;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__oss;\n    pCallbacks->onDeviceInit              = ma_device_init__oss;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__oss;\n    pCallbacks->onDeviceStart             = ma_device_start__oss;\n    pCallbacks->onDeviceStop              = ma_device_stop__oss;\n    pCallbacks->onDeviceRead              = ma_device_read__oss;\n    pCallbacks->onDeviceWrite             = ma_device_write__oss;\n    pCallbacks->onDeviceDataLoop          = NULL;\n\n    return MA_SUCCESS;\n}\n#endif  /* OSS */\n\n\n\n\n\n/******************************************************************************\n\nAAudio Backend\n\n******************************************************************************/\n#ifdef MA_HAS_AAUDIO\n\n/*#include <AAudio/AAudio.h>*/\n\ntypedef int32_t                                         ma_aaudio_result_t;\ntypedef int32_t                                         ma_aaudio_direction_t;\ntypedef int32_t                                         ma_aaudio_sharing_mode_t;\ntypedef int32_t                                         ma_aaudio_format_t;\ntypedef int32_t                                         ma_aaudio_stream_state_t;\ntypedef int32_t                                         ma_aaudio_performance_mode_t;\ntypedef int32_t                                         ma_aaudio_usage_t;\ntypedef int32_t                                         ma_aaudio_content_type_t;\ntypedef int32_t                                         ma_aaudio_input_preset_t;\ntypedef int32_t                                         ma_aaudio_allowed_capture_policy_t;\ntypedef int32_t                                         ma_aaudio_data_callback_result_t;\ntypedef struct ma_AAudioStreamBuilder_t*                ma_AAudioStreamBuilder;\ntypedef struct ma_AAudioStream_t*                       ma_AAudioStream;\n\n#define MA_AAUDIO_UNSPECIFIED                           0\n\n/* Result codes. miniaudio only cares about the success code. */\n#define MA_AAUDIO_OK                                    0\n\n/* Directions. */\n#define MA_AAUDIO_DIRECTION_OUTPUT                      0\n#define MA_AAUDIO_DIRECTION_INPUT                       1\n\n/* Sharing modes. */\n#define MA_AAUDIO_SHARING_MODE_EXCLUSIVE                0\n#define MA_AAUDIO_SHARING_MODE_SHARED                   1\n\n/* Formats. */\n#define MA_AAUDIO_FORMAT_PCM_I16                        1\n#define MA_AAUDIO_FORMAT_PCM_FLOAT                      2\n\n/* Stream states. */\n#define MA_AAUDIO_STREAM_STATE_UNINITIALIZED            0\n#define MA_AAUDIO_STREAM_STATE_UNKNOWN                  1\n#define MA_AAUDIO_STREAM_STATE_OPEN                     2\n#define MA_AAUDIO_STREAM_STATE_STARTING                 3\n#define MA_AAUDIO_STREAM_STATE_STARTED                  4\n#define MA_AAUDIO_STREAM_STATE_PAUSING                  5\n#define MA_AAUDIO_STREAM_STATE_PAUSED                   6\n#define MA_AAUDIO_STREAM_STATE_FLUSHING                 7\n#define MA_AAUDIO_STREAM_STATE_FLUSHED                  8\n#define MA_AAUDIO_STREAM_STATE_STOPPING                 9\n#define MA_AAUDIO_STREAM_STATE_STOPPED                  10\n#define MA_AAUDIO_STREAM_STATE_CLOSING                  11\n#define MA_AAUDIO_STREAM_STATE_CLOSED                   12\n#define MA_AAUDIO_STREAM_STATE_DISCONNECTED             13\n\n/* Performance modes. */\n#define MA_AAUDIO_PERFORMANCE_MODE_NONE                 10\n#define MA_AAUDIO_PERFORMANCE_MODE_POWER_SAVING         11\n#define MA_AAUDIO_PERFORMANCE_MODE_LOW_LATENCY          12\n\n/* Usage types. */\n#define MA_AAUDIO_USAGE_MEDIA                           1\n#define MA_AAUDIO_USAGE_VOICE_COMMUNICATION             2\n#define MA_AAUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING  3\n#define MA_AAUDIO_USAGE_ALARM                           4\n#define MA_AAUDIO_USAGE_NOTIFICATION                    5\n#define MA_AAUDIO_USAGE_NOTIFICATION_RINGTONE           6\n#define MA_AAUDIO_USAGE_NOTIFICATION_EVENT              10\n#define MA_AAUDIO_USAGE_ASSISTANCE_ACCESSIBILITY        11\n#define MA_AAUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE  12\n#define MA_AAUDIO_USAGE_ASSISTANCE_SONIFICATION         13\n#define MA_AAUDIO_USAGE_GAME                            14\n#define MA_AAUDIO_USAGE_ASSISTANT                       16\n#define MA_AAUDIO_SYSTEM_USAGE_EMERGENCY                1000\n#define MA_AAUDIO_SYSTEM_USAGE_SAFETY                   1001\n#define MA_AAUDIO_SYSTEM_USAGE_VEHICLE_STATUS           1002\n#define MA_AAUDIO_SYSTEM_USAGE_ANNOUNCEMENT             1003\n\n/* Content types. */\n#define MA_AAUDIO_CONTENT_TYPE_SPEECH                   1\n#define MA_AAUDIO_CONTENT_TYPE_MUSIC                    2\n#define MA_AAUDIO_CONTENT_TYPE_MOVIE                    3\n#define MA_AAUDIO_CONTENT_TYPE_SONIFICATION             4\n\n/* Input presets. */\n#define MA_AAUDIO_INPUT_PRESET_GENERIC                  1\n#define MA_AAUDIO_INPUT_PRESET_CAMCORDER                5\n#define MA_AAUDIO_INPUT_PRESET_VOICE_RECOGNITION        6\n#define MA_AAUDIO_INPUT_PRESET_VOICE_COMMUNICATION      7\n#define MA_AAUDIO_INPUT_PRESET_UNPROCESSED              9\n#define MA_AAUDIO_INPUT_PRESET_VOICE_PERFORMANCE        10\n\n/* Allowed Capture Policies */\n#define MA_AAUDIO_ALLOW_CAPTURE_BY_ALL                  1\n#define MA_AAUDIO_ALLOW_CAPTURE_BY_SYSTEM               2\n#define MA_AAUDIO_ALLOW_CAPTURE_BY_NONE                 3\n\n/* Callback results. */\n#define MA_AAUDIO_CALLBACK_RESULT_CONTINUE              0\n#define MA_AAUDIO_CALLBACK_RESULT_STOP                  1\n\n\ntypedef ma_aaudio_data_callback_result_t (* ma_AAudioStream_dataCallback) (ma_AAudioStream* pStream, void* pUserData, void* pAudioData, int32_t numFrames);\ntypedef void                             (* ma_AAudioStream_errorCallback)(ma_AAudioStream *pStream, void *pUserData, ma_aaudio_result_t error);\n\ntypedef ma_aaudio_result_t       (* MA_PFN_AAudio_createStreamBuilder)                   (ma_AAudioStreamBuilder** ppBuilder);\ntypedef ma_aaudio_result_t       (* MA_PFN_AAudioStreamBuilder_delete)                   (ma_AAudioStreamBuilder* pBuilder);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setDeviceId)              (ma_AAudioStreamBuilder* pBuilder, int32_t deviceId);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setDirection)             (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_direction_t direction);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setSharingMode)           (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_sharing_mode_t sharingMode);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setFormat)                (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_format_t format);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setChannelCount)          (ma_AAudioStreamBuilder* pBuilder, int32_t channelCount);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setSampleRate)            (ma_AAudioStreamBuilder* pBuilder, int32_t sampleRate);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setBufferCapacityInFrames)(ma_AAudioStreamBuilder* pBuilder, int32_t numFrames);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setFramesPerDataCallback) (ma_AAudioStreamBuilder* pBuilder, int32_t numFrames);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setDataCallback)          (ma_AAudioStreamBuilder* pBuilder, ma_AAudioStream_dataCallback callback, void* pUserData);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setErrorCallback)         (ma_AAudioStreamBuilder* pBuilder, ma_AAudioStream_errorCallback callback, void* pUserData);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setPerformanceMode)       (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_performance_mode_t mode);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setUsage)                 (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_usage_t contentType);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setContentType)           (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_content_type_t contentType);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setInputPreset)           (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_input_preset_t inputPreset);\ntypedef void                     (* MA_PFN_AAudioStreamBuilder_setAllowedCapturePolicy)  (ma_AAudioStreamBuilder* pBuilder, ma_aaudio_allowed_capture_policy_t policy);\ntypedef ma_aaudio_result_t       (* MA_PFN_AAudioStreamBuilder_openStream)               (ma_AAudioStreamBuilder* pBuilder, ma_AAudioStream** ppStream);\ntypedef ma_aaudio_result_t       (* MA_PFN_AAudioStream_close)                           (ma_AAudioStream* pStream);\ntypedef ma_aaudio_stream_state_t (* MA_PFN_AAudioStream_getState)                        (ma_AAudioStream* pStream);\ntypedef ma_aaudio_result_t       (* MA_PFN_AAudioStream_waitForStateChange)              (ma_AAudioStream* pStream, ma_aaudio_stream_state_t inputState, ma_aaudio_stream_state_t* pNextState, int64_t timeoutInNanoseconds);\ntypedef ma_aaudio_format_t       (* MA_PFN_AAudioStream_getFormat)                       (ma_AAudioStream* pStream);\ntypedef int32_t                  (* MA_PFN_AAudioStream_getChannelCount)                 (ma_AAudioStream* pStream);\ntypedef int32_t                  (* MA_PFN_AAudioStream_getSampleRate)                   (ma_AAudioStream* pStream);\ntypedef int32_t                  (* MA_PFN_AAudioStream_getBufferCapacityInFrames)       (ma_AAudioStream* pStream);\ntypedef int32_t                  (* MA_PFN_AAudioStream_getFramesPerDataCallback)        (ma_AAudioStream* pStream);\ntypedef int32_t                  (* MA_PFN_AAudioStream_getFramesPerBurst)               (ma_AAudioStream* pStream);\ntypedef ma_aaudio_result_t       (* MA_PFN_AAudioStream_requestStart)                    (ma_AAudioStream* pStream);\ntypedef ma_aaudio_result_t       (* MA_PFN_AAudioStream_requestStop)                     (ma_AAudioStream* pStream);\n\nstatic ma_result ma_result_from_aaudio(ma_aaudio_result_t resultAA)\n{\n    switch (resultAA)\n    {\n        case MA_AAUDIO_OK: return MA_SUCCESS;\n        default: break;\n    }\n\n    return MA_ERROR;\n}\n\nstatic ma_aaudio_usage_t ma_to_usage__aaudio(ma_aaudio_usage usage)\n{\n    switch (usage) {\n        case ma_aaudio_usage_media:                          return MA_AAUDIO_USAGE_MEDIA;\n        case ma_aaudio_usage_voice_communication:            return MA_AAUDIO_USAGE_VOICE_COMMUNICATION;\n        case ma_aaudio_usage_voice_communication_signalling: return MA_AAUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING;\n        case ma_aaudio_usage_alarm:                          return MA_AAUDIO_USAGE_ALARM;\n        case ma_aaudio_usage_notification:                   return MA_AAUDIO_USAGE_NOTIFICATION;\n        case ma_aaudio_usage_notification_ringtone:          return MA_AAUDIO_USAGE_NOTIFICATION_RINGTONE;\n        case ma_aaudio_usage_notification_event:             return MA_AAUDIO_USAGE_NOTIFICATION_EVENT;\n        case ma_aaudio_usage_assistance_accessibility:       return MA_AAUDIO_USAGE_ASSISTANCE_ACCESSIBILITY;\n        case ma_aaudio_usage_assistance_navigation_guidance: return MA_AAUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE;\n        case ma_aaudio_usage_assistance_sonification:        return MA_AAUDIO_USAGE_ASSISTANCE_SONIFICATION;\n        case ma_aaudio_usage_game:                           return MA_AAUDIO_USAGE_GAME;\n        case ma_aaudio_usage_assitant:                       return MA_AAUDIO_USAGE_ASSISTANT;\n        case ma_aaudio_usage_emergency:                      return MA_AAUDIO_SYSTEM_USAGE_EMERGENCY;\n        case ma_aaudio_usage_safety:                         return MA_AAUDIO_SYSTEM_USAGE_SAFETY;\n        case ma_aaudio_usage_vehicle_status:                 return MA_AAUDIO_SYSTEM_USAGE_VEHICLE_STATUS;\n        case ma_aaudio_usage_announcement:                   return MA_AAUDIO_SYSTEM_USAGE_ANNOUNCEMENT;\n        default: break;\n    }\n\n    return MA_AAUDIO_USAGE_MEDIA;\n}\n\nstatic ma_aaudio_content_type_t ma_to_content_type__aaudio(ma_aaudio_content_type contentType)\n{\n    switch (contentType) {\n        case ma_aaudio_content_type_speech:       return MA_AAUDIO_CONTENT_TYPE_SPEECH;\n        case ma_aaudio_content_type_music:        return MA_AAUDIO_CONTENT_TYPE_MUSIC;\n        case ma_aaudio_content_type_movie:        return MA_AAUDIO_CONTENT_TYPE_MOVIE;\n        case ma_aaudio_content_type_sonification: return MA_AAUDIO_CONTENT_TYPE_SONIFICATION;\n        default: break;\n    }\n\n    return MA_AAUDIO_CONTENT_TYPE_SPEECH;\n}\n\nstatic ma_aaudio_input_preset_t ma_to_input_preset__aaudio(ma_aaudio_input_preset inputPreset)\n{\n    switch (inputPreset) {\n        case ma_aaudio_input_preset_generic:             return MA_AAUDIO_INPUT_PRESET_GENERIC;\n        case ma_aaudio_input_preset_camcorder:           return MA_AAUDIO_INPUT_PRESET_CAMCORDER;\n        case ma_aaudio_input_preset_voice_recognition:   return MA_AAUDIO_INPUT_PRESET_VOICE_RECOGNITION;\n        case ma_aaudio_input_preset_voice_communication: return MA_AAUDIO_INPUT_PRESET_VOICE_COMMUNICATION;\n        case ma_aaudio_input_preset_unprocessed:         return MA_AAUDIO_INPUT_PRESET_UNPROCESSED;\n        case ma_aaudio_input_preset_voice_performance:   return MA_AAUDIO_INPUT_PRESET_VOICE_PERFORMANCE;\n        default: break;\n    }\n\n    return MA_AAUDIO_INPUT_PRESET_GENERIC;\n}\n\nstatic ma_aaudio_allowed_capture_policy_t ma_to_allowed_capture_policy__aaudio(ma_aaudio_allowed_capture_policy allowedCapturePolicy)\n{\n    switch (allowedCapturePolicy) {\n        case ma_aaudio_allow_capture_by_all:    return MA_AAUDIO_ALLOW_CAPTURE_BY_ALL;\n        case ma_aaudio_allow_capture_by_system: return MA_AAUDIO_ALLOW_CAPTURE_BY_SYSTEM;\n        case ma_aaudio_allow_capture_by_none:   return MA_AAUDIO_ALLOW_CAPTURE_BY_NONE;\n        default: break;\n    }\n\n    return MA_AAUDIO_ALLOW_CAPTURE_BY_ALL;\n}\n\nstatic void ma_stream_error_callback__aaudio(ma_AAudioStream* pStream, void* pUserData, ma_aaudio_result_t error)\n{\n    ma_result result;\n    ma_job job;\n    ma_device* pDevice = (ma_device*)pUserData;\n    MA_ASSERT(pDevice != NULL);\n\n    (void)error;\n\n    ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[AAudio] ERROR CALLBACK: error=%d, AAudioStream_getState()=%d\\n\", error, ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream));\n\n    /*\n    When we get an error, we'll assume that the stream is in an erroneous state and needs to be restarted. From the documentation,\n    we cannot do this from the error callback. Therefore we are going to use an event thread for the AAudio backend to do this\n    cleanly and safely.\n    */\n    job = ma_job_init(MA_JOB_TYPE_DEVICE_AAUDIO_REROUTE);\n    job.data.device.aaudio.reroute.pDevice = pDevice;\n\n    if (pStream == pDevice->aaudio.pStreamCapture) {\n        job.data.device.aaudio.reroute.deviceType = ma_device_type_capture;\n    }\n    else {\n        job.data.device.aaudio.reroute.deviceType = ma_device_type_playback;\n    }\n\n    result = ma_device_job_thread_post(&pDevice->pContext->aaudio.jobThread, &job);\n    if (result != MA_SUCCESS) {\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[AAudio] Device Disconnected. Failed to post job for rerouting.\\n\");\n        return;\n    }\n}\n\nstatic ma_aaudio_data_callback_result_t ma_stream_data_callback_capture__aaudio(ma_AAudioStream* pStream, void* pUserData, void* pAudioData, int32_t frameCount)\n{\n    ma_device* pDevice = (ma_device*)pUserData;\n    MA_ASSERT(pDevice != NULL);\n\n    ma_device_handle_backend_data_callback(pDevice, NULL, pAudioData, frameCount);\n\n    (void)pStream;\n    return MA_AAUDIO_CALLBACK_RESULT_CONTINUE;\n}\n\nstatic ma_aaudio_data_callback_result_t ma_stream_data_callback_playback__aaudio(ma_AAudioStream* pStream, void* pUserData, void* pAudioData, int32_t frameCount)\n{\n    ma_device* pDevice = (ma_device*)pUserData;\n    MA_ASSERT(pDevice != NULL);\n\n    ma_device_handle_backend_data_callback(pDevice, pAudioData, NULL, frameCount);\n\n    (void)pStream;\n    return MA_AAUDIO_CALLBACK_RESULT_CONTINUE;\n}\n\nstatic ma_result ma_create_and_configure_AAudioStreamBuilder__aaudio(ma_context* pContext, const ma_device_id* pDeviceID, ma_device_type deviceType, ma_share_mode shareMode, const ma_device_descriptor* pDescriptor, const ma_device_config* pConfig, ma_device* pDevice, ma_AAudioStreamBuilder** ppBuilder)\n{\n    ma_AAudioStreamBuilder* pBuilder;\n    ma_aaudio_result_t resultAA;\n\n    /* Safety. */\n    *ppBuilder = NULL;\n\n    resultAA = ((MA_PFN_AAudio_createStreamBuilder)pContext->aaudio.AAudio_createStreamBuilder)(&pBuilder);\n    if (resultAA != MA_AAUDIO_OK) {\n        return ma_result_from_aaudio(resultAA);\n    }\n\n    if (pDeviceID != NULL) {\n        ((MA_PFN_AAudioStreamBuilder_setDeviceId)pContext->aaudio.AAudioStreamBuilder_setDeviceId)(pBuilder, pDeviceID->aaudio);\n    }\n\n    ((MA_PFN_AAudioStreamBuilder_setDirection)pContext->aaudio.AAudioStreamBuilder_setDirection)(pBuilder, (deviceType == ma_device_type_playback) ? MA_AAUDIO_DIRECTION_OUTPUT : MA_AAUDIO_DIRECTION_INPUT);\n    ((MA_PFN_AAudioStreamBuilder_setSharingMode)pContext->aaudio.AAudioStreamBuilder_setSharingMode)(pBuilder, (shareMode == ma_share_mode_shared) ? MA_AAUDIO_SHARING_MODE_SHARED : MA_AAUDIO_SHARING_MODE_EXCLUSIVE);\n\n\n    /* If we have a device descriptor make sure we configure the stream builder to take our requested parameters. */\n    if (pDescriptor != NULL) {\n        MA_ASSERT(pConfig != NULL); /* We must have a device config if we also have a descriptor. The config is required for AAudio specific configuration options. */\n\n        if (pDescriptor->sampleRate != 0) {\n            ((MA_PFN_AAudioStreamBuilder_setSampleRate)pContext->aaudio.AAudioStreamBuilder_setSampleRate)(pBuilder, pDescriptor->sampleRate);\n        }\n\n        if (deviceType == ma_device_type_capture) {\n            if (pDescriptor->channels != 0) {\n                ((MA_PFN_AAudioStreamBuilder_setChannelCount)pContext->aaudio.AAudioStreamBuilder_setChannelCount)(pBuilder, pDescriptor->channels);\n            }\n            if (pDescriptor->format != ma_format_unknown) {\n                ((MA_PFN_AAudioStreamBuilder_setFormat)pContext->aaudio.AAudioStreamBuilder_setFormat)(pBuilder, (pDescriptor->format == ma_format_s16) ? MA_AAUDIO_FORMAT_PCM_I16 : MA_AAUDIO_FORMAT_PCM_FLOAT);\n            }\n        } else {\n            if (pDescriptor->channels != 0) {\n                ((MA_PFN_AAudioStreamBuilder_setChannelCount)pContext->aaudio.AAudioStreamBuilder_setChannelCount)(pBuilder, pDescriptor->channels);\n            }\n            if (pDescriptor->format != ma_format_unknown) {\n                ((MA_PFN_AAudioStreamBuilder_setFormat)pContext->aaudio.AAudioStreamBuilder_setFormat)(pBuilder, (pDescriptor->format == ma_format_s16) ? MA_AAUDIO_FORMAT_PCM_I16 : MA_AAUDIO_FORMAT_PCM_FLOAT);\n            }\n        }\n\n\n        /*\n        There have been reports where setting the frames per data callback results in an error\n        later on from Android. To address this, I'm experimenting with simply not setting it on\n        anything from Android 11 and earlier. Suggestions welcome on how we might be able to make\n        this more targetted.\n        */\n        if (!pConfig->aaudio.enableCompatibilityWorkarounds || ma_android_sdk_version() > 30) {\n            /*\n            AAudio is annoying when it comes to it's buffer calculation stuff because it doesn't let you\n            retrieve the actual sample rate until after you've opened the stream. But you need to configure\n            the buffer capacity before you open the stream... :/\n\n            To solve, we're just going to assume MA_DEFAULT_SAMPLE_RATE (48000) and move on.\n            */\n            ma_uint32 bufferCapacityInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptor, pDescriptor->sampleRate, pConfig->performanceProfile) * pDescriptor->periodCount;\n\n            ((MA_PFN_AAudioStreamBuilder_setBufferCapacityInFrames)pContext->aaudio.AAudioStreamBuilder_setBufferCapacityInFrames)(pBuilder, bufferCapacityInFrames);\n            ((MA_PFN_AAudioStreamBuilder_setFramesPerDataCallback)pContext->aaudio.AAudioStreamBuilder_setFramesPerDataCallback)(pBuilder, bufferCapacityInFrames / pDescriptor->periodCount);\n        }\n\n        if (deviceType == ma_device_type_capture) {\n            if (pConfig->aaudio.inputPreset != ma_aaudio_input_preset_default && pContext->aaudio.AAudioStreamBuilder_setInputPreset != NULL) {\n                ((MA_PFN_AAudioStreamBuilder_setInputPreset)pContext->aaudio.AAudioStreamBuilder_setInputPreset)(pBuilder, ma_to_input_preset__aaudio(pConfig->aaudio.inputPreset));\n            }\n\n            ((MA_PFN_AAudioStreamBuilder_setDataCallback)pContext->aaudio.AAudioStreamBuilder_setDataCallback)(pBuilder, ma_stream_data_callback_capture__aaudio, (void*)pDevice);\n        } else {\n            if (pConfig->aaudio.usage != ma_aaudio_usage_default && pContext->aaudio.AAudioStreamBuilder_setUsage != NULL) {\n                ((MA_PFN_AAudioStreamBuilder_setUsage)pContext->aaudio.AAudioStreamBuilder_setUsage)(pBuilder, ma_to_usage__aaudio(pConfig->aaudio.usage));\n            }\n\n            if (pConfig->aaudio.contentType != ma_aaudio_content_type_default && pContext->aaudio.AAudioStreamBuilder_setContentType != NULL) {\n                ((MA_PFN_AAudioStreamBuilder_setContentType)pContext->aaudio.AAudioStreamBuilder_setContentType)(pBuilder, ma_to_content_type__aaudio(pConfig->aaudio.contentType));\n            }\n\n            if (pConfig->aaudio.allowedCapturePolicy != ma_aaudio_allow_capture_default && pContext->aaudio.AAudioStreamBuilder_setAllowedCapturePolicy != NULL) {\n                ((MA_PFN_AAudioStreamBuilder_setAllowedCapturePolicy)pContext->aaudio.AAudioStreamBuilder_setAllowedCapturePolicy)(pBuilder, ma_to_allowed_capture_policy__aaudio(pConfig->aaudio.allowedCapturePolicy));\n            }\n\n            ((MA_PFN_AAudioStreamBuilder_setDataCallback)pContext->aaudio.AAudioStreamBuilder_setDataCallback)(pBuilder, ma_stream_data_callback_playback__aaudio, (void*)pDevice);\n        }\n\n        /* Not sure how this affects things, but since there's a mapping between miniaudio's performance profiles and AAudio's performance modes, let go ahead and set it. */\n        ((MA_PFN_AAudioStreamBuilder_setPerformanceMode)pContext->aaudio.AAudioStreamBuilder_setPerformanceMode)(pBuilder, (pConfig->performanceProfile == ma_performance_profile_low_latency) ? MA_AAUDIO_PERFORMANCE_MODE_LOW_LATENCY : MA_AAUDIO_PERFORMANCE_MODE_NONE);\n\n        /* We need to set an error callback to detect device changes. */\n        if (pDevice != NULL) {  /* <-- pDevice should never be null if pDescriptor is not null, which is always the case if we hit this branch. Check anyway for safety. */\n            ((MA_PFN_AAudioStreamBuilder_setErrorCallback)pContext->aaudio.AAudioStreamBuilder_setErrorCallback)(pBuilder, ma_stream_error_callback__aaudio, (void*)pDevice);\n        }\n    }\n\n    *ppBuilder = pBuilder;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_open_stream_and_close_builder__aaudio(ma_context* pContext, ma_AAudioStreamBuilder* pBuilder, ma_AAudioStream** ppStream)\n{\n    ma_result result;\n\n    result = ma_result_from_aaudio(((MA_PFN_AAudioStreamBuilder_openStream)pContext->aaudio.AAudioStreamBuilder_openStream)(pBuilder, ppStream));\n    ((MA_PFN_AAudioStreamBuilder_delete)pContext->aaudio.AAudioStreamBuilder_delete)(pBuilder);\n\n    return result;\n}\n\nstatic ma_result ma_open_stream_basic__aaudio(ma_context* pContext, const ma_device_id* pDeviceID, ma_device_type deviceType, ma_share_mode shareMode, ma_AAudioStream** ppStream)\n{\n    ma_result result;\n    ma_AAudioStreamBuilder* pBuilder;\n\n    *ppStream = NULL;\n\n    result = ma_create_and_configure_AAudioStreamBuilder__aaudio(pContext, pDeviceID, deviceType, shareMode, NULL, NULL, NULL, &pBuilder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return ma_open_stream_and_close_builder__aaudio(pContext, pBuilder, ppStream);\n}\n\nstatic ma_result ma_open_stream__aaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_type deviceType, const ma_device_descriptor* pDescriptor, ma_AAudioStream** ppStream)\n{\n    ma_result result;\n    ma_AAudioStreamBuilder* pBuilder;\n\n    MA_ASSERT(pDevice != NULL);\n    MA_ASSERT(pDescriptor != NULL);\n    MA_ASSERT(deviceType != ma_device_type_duplex);   /* This function should not be called for a full-duplex device type. */\n\n    *ppStream = NULL;\n\n    result = ma_create_and_configure_AAudioStreamBuilder__aaudio(pDevice->pContext, pDescriptor->pDeviceID, deviceType, pDescriptor->shareMode, pDescriptor, pConfig, pDevice, &pBuilder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return ma_open_stream_and_close_builder__aaudio(pDevice->pContext, pBuilder, ppStream);\n}\n\nstatic ma_result ma_close_stream__aaudio(ma_context* pContext, ma_AAudioStream* pStream)\n{\n    return ma_result_from_aaudio(((MA_PFN_AAudioStream_close)pContext->aaudio.AAudioStream_close)(pStream));\n}\n\nstatic ma_bool32 ma_has_default_device__aaudio(ma_context* pContext, ma_device_type deviceType)\n{\n    /* The only way to know this is to try creating a stream. */\n    ma_AAudioStream* pStream;\n    ma_result result = ma_open_stream_basic__aaudio(pContext, NULL, deviceType, ma_share_mode_shared, &pStream);\n    if (result != MA_SUCCESS) {\n        return MA_FALSE;\n    }\n\n    ma_close_stream__aaudio(pContext, pStream);\n    return MA_TRUE;\n}\n\nstatic ma_result ma_wait_for_simple_state_transition__aaudio(ma_context* pContext, ma_AAudioStream* pStream, ma_aaudio_stream_state_t oldState, ma_aaudio_stream_state_t newState)\n{\n    ma_aaudio_stream_state_t actualNewState;\n    ma_aaudio_result_t resultAA = ((MA_PFN_AAudioStream_waitForStateChange)pContext->aaudio.AAudioStream_waitForStateChange)(pStream, oldState, &actualNewState, 5000000000); /* 5 second timeout. */\n    if (resultAA != MA_AAUDIO_OK) {\n        return ma_result_from_aaudio(resultAA);\n    }\n\n    if (newState != actualNewState) {\n        return MA_ERROR;   /* Failed to transition into the expected state. */\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_context_enumerate_devices__aaudio(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    ma_bool32 cbResult = MA_TRUE;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(callback != NULL);\n\n    /* Unfortunately AAudio does not have an enumeration API. Therefore I'm only going to report default devices, but only if it can instantiate a stream. */\n\n    /* Playback. */\n    if (cbResult) {\n        ma_device_info deviceInfo;\n        MA_ZERO_OBJECT(&deviceInfo);\n        deviceInfo.id.aaudio = MA_AAUDIO_UNSPECIFIED;\n        ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n\n        if (ma_has_default_device__aaudio(pContext, ma_device_type_playback)) {\n            cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData);\n        }\n    }\n\n    /* Capture. */\n    if (cbResult) {\n        ma_device_info deviceInfo;\n        MA_ZERO_OBJECT(&deviceInfo);\n        deviceInfo.id.aaudio = MA_AAUDIO_UNSPECIFIED;\n        ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n\n        if (ma_has_default_device__aaudio(pContext, ma_device_type_capture)) {\n            cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData);\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_context_add_native_data_format_from_AAudioStream_ex__aaudio(ma_context* pContext, ma_AAudioStream* pStream, ma_format format, ma_uint32 flags, ma_device_info* pDeviceInfo)\n{\n    MA_ASSERT(pContext    != NULL);\n    MA_ASSERT(pStream     != NULL);\n    MA_ASSERT(pDeviceInfo != NULL);\n\n    pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format     = format;\n    pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels   = ((MA_PFN_AAudioStream_getChannelCount)pContext->aaudio.AAudioStream_getChannelCount)(pStream);\n    pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = ((MA_PFN_AAudioStream_getSampleRate)pContext->aaudio.AAudioStream_getSampleRate)(pStream);\n    pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags      = flags;\n    pDeviceInfo->nativeDataFormatCount += 1;\n}\n\nstatic void ma_context_add_native_data_format_from_AAudioStream__aaudio(ma_context* pContext, ma_AAudioStream* pStream, ma_uint32 flags, ma_device_info* pDeviceInfo)\n{\n    /* AAudio supports s16 and f32. */\n    ma_context_add_native_data_format_from_AAudioStream_ex__aaudio(pContext, pStream, ma_format_f32, flags, pDeviceInfo);\n    ma_context_add_native_data_format_from_AAudioStream_ex__aaudio(pContext, pStream, ma_format_s16, flags, pDeviceInfo);\n}\n\nstatic ma_result ma_context_get_device_info__aaudio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    ma_AAudioStream* pStream;\n    ma_result result;\n\n    MA_ASSERT(pContext != NULL);\n\n    /* ID */\n    if (pDeviceID != NULL) {\n        pDeviceInfo->id.aaudio = pDeviceID->aaudio;\n    } else {\n        pDeviceInfo->id.aaudio = MA_AAUDIO_UNSPECIFIED;\n    }\n\n    /* Name */\n    if (deviceType == ma_device_type_playback) {\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n    } else {\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n    }\n\n\n    pDeviceInfo->nativeDataFormatCount = 0;\n\n    /* We'll need to open the device to get accurate sample rate and channel count information. */\n    result = ma_open_stream_basic__aaudio(pContext, pDeviceID, deviceType, ma_share_mode_shared, &pStream);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    ma_context_add_native_data_format_from_AAudioStream__aaudio(pContext, pStream, 0, pDeviceInfo);\n\n    ma_close_stream__aaudio(pContext, pStream);\n    pStream = NULL;\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_device_uninit__aaudio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        ma_close_stream__aaudio(pDevice->pContext, (ma_AAudioStream*)pDevice->aaudio.pStreamCapture);\n        pDevice->aaudio.pStreamCapture = NULL;\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ma_close_stream__aaudio(pDevice->pContext, (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback);\n        pDevice->aaudio.pStreamPlayback = NULL;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_init_by_type__aaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_type deviceType, ma_device_descriptor* pDescriptor, ma_AAudioStream** ppStream)\n{\n    ma_result result;\n    int32_t bufferCapacityInFrames;\n    int32_t framesPerDataCallback;\n    ma_AAudioStream* pStream;\n\n    MA_ASSERT(pDevice     != NULL);\n    MA_ASSERT(pConfig     != NULL);\n    MA_ASSERT(pDescriptor != NULL);\n\n    *ppStream = NULL;   /* Safety. */\n\n    /* First step is to open the stream. From there we'll be able to extract the internal configuration. */\n    result = ma_open_stream__aaudio(pDevice, pConfig, deviceType, pDescriptor, &pStream);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to open the AAudio stream. */\n    }\n\n    /* Now extract the internal configuration. */\n    pDescriptor->format     = (((MA_PFN_AAudioStream_getFormat)pDevice->pContext->aaudio.AAudioStream_getFormat)(pStream) == MA_AAUDIO_FORMAT_PCM_I16) ? ma_format_s16 : ma_format_f32;\n    pDescriptor->channels   = ((MA_PFN_AAudioStream_getChannelCount)pDevice->pContext->aaudio.AAudioStream_getChannelCount)(pStream);\n    pDescriptor->sampleRate = ((MA_PFN_AAudioStream_getSampleRate)pDevice->pContext->aaudio.AAudioStream_getSampleRate)(pStream);\n\n    /* For the channel map we need to be sure we don't overflow any buffers. */\n    if (pDescriptor->channels <= MA_MAX_CHANNELS) {\n        ma_channel_map_init_standard(ma_standard_channel_map_default, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), pDescriptor->channels); /* <-- Cannot find info on channel order, so assuming a default. */\n    } else {\n        ma_channel_map_init_blank(pDescriptor->channelMap, MA_MAX_CHANNELS); /* Too many channels. Use a blank channel map. */\n    }\n\n    bufferCapacityInFrames = ((MA_PFN_AAudioStream_getBufferCapacityInFrames)pDevice->pContext->aaudio.AAudioStream_getBufferCapacityInFrames)(pStream);\n    framesPerDataCallback = ((MA_PFN_AAudioStream_getFramesPerDataCallback)pDevice->pContext->aaudio.AAudioStream_getFramesPerDataCallback)(pStream);\n\n    if (framesPerDataCallback > 0) {\n        pDescriptor->periodSizeInFrames = framesPerDataCallback;\n        pDescriptor->periodCount        = bufferCapacityInFrames / framesPerDataCallback;\n    } else {\n        pDescriptor->periodSizeInFrames = bufferCapacityInFrames;\n        pDescriptor->periodCount        = 1;\n    }\n\n    *ppStream = pStream;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_init__aaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n    ma_result result;\n\n    MA_ASSERT(pDevice != NULL);\n\n    if (pConfig->deviceType == ma_device_type_loopback) {\n        return MA_DEVICE_TYPE_NOT_SUPPORTED;\n    }\n\n    pDevice->aaudio.usage                   = pConfig->aaudio.usage;\n    pDevice->aaudio.contentType             = pConfig->aaudio.contentType;\n    pDevice->aaudio.inputPreset             = pConfig->aaudio.inputPreset;\n    pDevice->aaudio.allowedCapturePolicy    = pConfig->aaudio.allowedCapturePolicy;\n    pDevice->aaudio.noAutoStartAfterReroute = pConfig->aaudio.noAutoStartAfterReroute;\n\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        result = ma_device_init_by_type__aaudio(pDevice, pConfig, ma_device_type_capture, pDescriptorCapture, (ma_AAudioStream**)&pDevice->aaudio.pStreamCapture);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        result = ma_device_init_by_type__aaudio(pDevice, pConfig, ma_device_type_playback, pDescriptorPlayback, (ma_AAudioStream**)&pDevice->aaudio.pStreamPlayback);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_start_stream__aaudio(ma_device* pDevice, ma_AAudioStream* pStream)\n{\n    ma_aaudio_result_t resultAA;\n    ma_aaudio_stream_state_t currentState;\n\n    MA_ASSERT(pDevice != NULL);\n\n    resultAA = ((MA_PFN_AAudioStream_requestStart)pDevice->pContext->aaudio.AAudioStream_requestStart)(pStream);\n    if (resultAA != MA_AAUDIO_OK) {\n        return ma_result_from_aaudio(resultAA);\n    }\n\n    /* Do we actually need to wait for the device to transition into it's started state? */\n\n    /* The device should be in either a starting or started state. If it's not set to started we need to wait for it to transition. It should go from starting to started. */\n    currentState = ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream);\n    if (currentState != MA_AAUDIO_STREAM_STATE_STARTED) {\n        ma_result result;\n\n        if (currentState != MA_AAUDIO_STREAM_STATE_STARTING) {\n            return MA_ERROR;   /* Expecting the stream to be a starting or started state. */\n        }\n\n        result = ma_wait_for_simple_state_transition__aaudio(pDevice->pContext, pStream, currentState, MA_AAUDIO_STREAM_STATE_STARTED);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop_stream__aaudio(ma_device* pDevice, ma_AAudioStream* pStream)\n{\n    ma_aaudio_result_t resultAA;\n    ma_aaudio_stream_state_t currentState;\n\n    MA_ASSERT(pDevice != NULL);\n\n    /*\n    From the AAudio documentation:\n\n        The stream will stop after all of the data currently buffered has been played.\n\n    This maps with miniaudio's requirement that device's be drained which means we don't need to implement any draining logic.\n    */\n    currentState = ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream);\n    if (currentState == MA_AAUDIO_STREAM_STATE_DISCONNECTED) {\n        return MA_SUCCESS;  /* The device is disconnected. Don't try stopping it. */\n    }\n\n    resultAA = ((MA_PFN_AAudioStream_requestStop)pDevice->pContext->aaudio.AAudioStream_requestStop)(pStream);\n    if (resultAA != MA_AAUDIO_OK) {\n        return ma_result_from_aaudio(resultAA);\n    }\n\n    /* The device should be in either a stopping or stopped state. If it's not set to started we need to wait for it to transition. It should go from stopping to stopped. */\n    currentState = ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream);\n    if (currentState != MA_AAUDIO_STREAM_STATE_STOPPED) {\n        ma_result result;\n\n        if (currentState != MA_AAUDIO_STREAM_STATE_STOPPING) {\n            return MA_ERROR;   /* Expecting the stream to be a stopping or stopped state. */\n        }\n\n        result = ma_wait_for_simple_state_transition__aaudio(pDevice->pContext, pStream, currentState, MA_AAUDIO_STREAM_STATE_STOPPED);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_start__aaudio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        ma_result result = ma_device_start_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamCapture);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ma_result result = ma_device_start_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback);\n        if (result != MA_SUCCESS) {\n            if (pDevice->type == ma_device_type_duplex) {\n                ma_device_stop_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamCapture);\n            }\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop__aaudio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        ma_result result = ma_device_stop_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamCapture);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ma_result result = ma_device_stop_stream__aaudio(pDevice, (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    ma_device__on_notification_stopped(pDevice);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_reinit__aaudio(ma_device* pDevice, ma_device_type deviceType)\n{\n    ma_result result;\n\n    MA_ASSERT(pDevice != NULL);\n\n    /* The first thing to do is close the streams. */\n    if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex) {\n        ma_close_stream__aaudio(pDevice->pContext, (ma_AAudioStream*)pDevice->aaudio.pStreamCapture);\n        pDevice->aaudio.pStreamCapture = NULL;\n    }\n\n    if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) {\n        ma_close_stream__aaudio(pDevice->pContext, (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback);\n        pDevice->aaudio.pStreamPlayback = NULL;\n    }\n\n    /* Now we need to reinitialize each streams. The hardest part with this is just filling output the config and descriptors. */\n    {\n        ma_device_config deviceConfig;\n        ma_device_descriptor descriptorPlayback;\n        ma_device_descriptor descriptorCapture;\n\n        deviceConfig = ma_device_config_init(deviceType);\n        deviceConfig.playback.pDeviceID             = NULL; /* Only doing rerouting with default devices. */\n        deviceConfig.playback.shareMode             = pDevice->playback.shareMode;\n        deviceConfig.playback.format                = pDevice->playback.format;\n        deviceConfig.playback.channels              = pDevice->playback.channels;\n        deviceConfig.capture.pDeviceID              = NULL; /* Only doing rerouting with default devices. */\n        deviceConfig.capture.shareMode              = pDevice->capture.shareMode;\n        deviceConfig.capture.format                 = pDevice->capture.format;\n        deviceConfig.capture.channels               = pDevice->capture.channels;\n        deviceConfig.sampleRate                     = pDevice->sampleRate;\n        deviceConfig.aaudio.usage                   = pDevice->aaudio.usage;\n        deviceConfig.aaudio.contentType             = pDevice->aaudio.contentType;\n        deviceConfig.aaudio.inputPreset             = pDevice->aaudio.inputPreset;\n        deviceConfig.aaudio.allowedCapturePolicy    = pDevice->aaudio.allowedCapturePolicy;\n        deviceConfig.aaudio.noAutoStartAfterReroute = pDevice->aaudio.noAutoStartAfterReroute;\n        deviceConfig.periods                        = 1;\n\n        /* Try to get an accurate period size. */\n        if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) {\n            deviceConfig.periodSizeInFrames = pDevice->playback.internalPeriodSizeInFrames;\n        } else {\n            deviceConfig.periodSizeInFrames = pDevice->capture.internalPeriodSizeInFrames;\n        }\n\n        if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) {\n            descriptorCapture.pDeviceID           = deviceConfig.capture.pDeviceID;\n            descriptorCapture.shareMode           = deviceConfig.capture.shareMode;\n            descriptorCapture.format              = deviceConfig.capture.format;\n            descriptorCapture.channels            = deviceConfig.capture.channels;\n            descriptorCapture.sampleRate          = deviceConfig.sampleRate;\n            descriptorCapture.periodSizeInFrames  = deviceConfig.periodSizeInFrames;\n            descriptorCapture.periodCount         = deviceConfig.periods;\n        }\n\n        if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) {\n            descriptorPlayback.pDeviceID          = deviceConfig.playback.pDeviceID;\n            descriptorPlayback.shareMode          = deviceConfig.playback.shareMode;\n            descriptorPlayback.format             = deviceConfig.playback.format;\n            descriptorPlayback.channels           = deviceConfig.playback.channels;\n            descriptorPlayback.sampleRate         = deviceConfig.sampleRate;\n            descriptorPlayback.periodSizeInFrames = deviceConfig.periodSizeInFrames;\n            descriptorPlayback.periodCount        = deviceConfig.periods;\n        }\n\n        result = ma_device_init__aaudio(pDevice, &deviceConfig, &descriptorPlayback, &descriptorCapture);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        result = ma_device_post_init(pDevice, deviceType, &descriptorPlayback, &descriptorCapture);\n        if (result != MA_SUCCESS) {\n            ma_device_uninit__aaudio(pDevice);\n            return result;\n        }\n\n        /* We'll only ever do this in response to a reroute. */\n        ma_device__on_notification_rerouted(pDevice);\n\n        /* If the device is started, start the streams. Maybe make this configurable? */\n        if (ma_device_get_state(pDevice) == ma_device_state_started) {\n            if (pDevice->aaudio.noAutoStartAfterReroute == MA_FALSE) {\n                ma_device_start__aaudio(pDevice);\n            } else {\n                ma_device_stop(pDevice);    /* Do a full device stop so we set internal state correctly. */\n            }\n        }\n\n        return MA_SUCCESS;\n    }\n}\n\nstatic ma_result ma_device_get_info__aaudio(ma_device* pDevice, ma_device_type type, ma_device_info* pDeviceInfo)\n{\n    ma_AAudioStream* pStream = NULL;\n\n    MA_ASSERT(pDevice     != NULL);\n    MA_ASSERT(type        != ma_device_type_duplex);\n    MA_ASSERT(pDeviceInfo != NULL);\n\n    if (type == ma_device_type_playback) {\n        pStream = (ma_AAudioStream*)pDevice->aaudio.pStreamCapture;\n        pDeviceInfo->id.aaudio = pDevice->capture.id.aaudio;\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);     /* Only supporting default devices. */\n    }\n    if (type == ma_device_type_capture) {\n        pStream = (ma_AAudioStream*)pDevice->aaudio.pStreamPlayback;\n        pDeviceInfo->id.aaudio = pDevice->playback.id.aaudio;\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);    /* Only supporting default devices. */\n    }\n\n    /* Safety. Should never happen. */\n    if (pStream == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    pDeviceInfo->nativeDataFormatCount = 0;\n    ma_context_add_native_data_format_from_AAudioStream__aaudio(pDevice->pContext, pStream, 0, pDeviceInfo);\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_context_uninit__aaudio(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_aaudio);\n\n    ma_device_job_thread_uninit(&pContext->aaudio.jobThread, &pContext->allocationCallbacks);\n\n    ma_dlclose(ma_context_get_log(pContext), pContext->aaudio.hAAudio);\n    pContext->aaudio.hAAudio = NULL;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init__aaudio(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n    size_t i;\n    const char* libNames[] = {\n        \"libaaudio.so\"\n    };\n\n    for (i = 0; i < ma_countof(libNames); ++i) {\n        pContext->aaudio.hAAudio = ma_dlopen(ma_context_get_log(pContext), libNames[i]);\n        if (pContext->aaudio.hAAudio != NULL) {\n            break;\n        }\n    }\n\n    if (pContext->aaudio.hAAudio == NULL) {\n        return MA_FAILED_TO_INIT_BACKEND;\n    }\n\n    pContext->aaudio.AAudio_createStreamBuilder                    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudio_createStreamBuilder\");\n    pContext->aaudio.AAudioStreamBuilder_delete                    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_delete\");\n    pContext->aaudio.AAudioStreamBuilder_setDeviceId               = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setDeviceId\");\n    pContext->aaudio.AAudioStreamBuilder_setDirection              = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setDirection\");\n    pContext->aaudio.AAudioStreamBuilder_setSharingMode            = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setSharingMode\");\n    pContext->aaudio.AAudioStreamBuilder_setFormat                 = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setFormat\");\n    pContext->aaudio.AAudioStreamBuilder_setChannelCount           = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setChannelCount\");\n    pContext->aaudio.AAudioStreamBuilder_setSampleRate             = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setSampleRate\");\n    pContext->aaudio.AAudioStreamBuilder_setBufferCapacityInFrames = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setBufferCapacityInFrames\");\n    pContext->aaudio.AAudioStreamBuilder_setFramesPerDataCallback  = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setFramesPerDataCallback\");\n    pContext->aaudio.AAudioStreamBuilder_setDataCallback           = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setDataCallback\");\n    pContext->aaudio.AAudioStreamBuilder_setErrorCallback          = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setErrorCallback\");\n    pContext->aaudio.AAudioStreamBuilder_setPerformanceMode        = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setPerformanceMode\");\n    pContext->aaudio.AAudioStreamBuilder_setUsage                  = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setUsage\");\n    pContext->aaudio.AAudioStreamBuilder_setContentType            = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setContentType\");\n    pContext->aaudio.AAudioStreamBuilder_setInputPreset            = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setInputPreset\");\n    pContext->aaudio.AAudioStreamBuilder_setAllowedCapturePolicy   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_setAllowedCapturePolicy\");\n    pContext->aaudio.AAudioStreamBuilder_openStream                = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStreamBuilder_openStream\");\n    pContext->aaudio.AAudioStream_close                            = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStream_close\");\n    pContext->aaudio.AAudioStream_getState                         = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStream_getState\");\n    pContext->aaudio.AAudioStream_waitForStateChange               = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStream_waitForStateChange\");\n    pContext->aaudio.AAudioStream_getFormat                        = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStream_getFormat\");\n    pContext->aaudio.AAudioStream_getChannelCount                  = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStream_getChannelCount\");\n    pContext->aaudio.AAudioStream_getSampleRate                    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStream_getSampleRate\");\n    pContext->aaudio.AAudioStream_getBufferCapacityInFrames        = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStream_getBufferCapacityInFrames\");\n    pContext->aaudio.AAudioStream_getFramesPerDataCallback         = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStream_getFramesPerDataCallback\");\n    pContext->aaudio.AAudioStream_getFramesPerBurst                = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStream_getFramesPerBurst\");\n    pContext->aaudio.AAudioStream_requestStart                     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStream_requestStart\");\n    pContext->aaudio.AAudioStream_requestStop                      = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->aaudio.hAAudio, \"AAudioStream_requestStop\");\n\n\n    pCallbacks->onContextInit             = ma_context_init__aaudio;\n    pCallbacks->onContextUninit           = ma_context_uninit__aaudio;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__aaudio;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__aaudio;\n    pCallbacks->onDeviceInit              = ma_device_init__aaudio;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__aaudio;\n    pCallbacks->onDeviceStart             = ma_device_start__aaudio;\n    pCallbacks->onDeviceStop              = ma_device_stop__aaudio;\n    pCallbacks->onDeviceRead              = NULL;   /* Not used because AAudio is asynchronous. */\n    pCallbacks->onDeviceWrite             = NULL;   /* Not used because AAudio is asynchronous. */\n    pCallbacks->onDeviceDataLoop          = NULL;   /* Not used because AAudio is asynchronous. */\n    pCallbacks->onDeviceGetInfo           = ma_device_get_info__aaudio;\n\n\n    /* We need a job thread so we can deal with rerouting. */\n    {\n        ma_result result;\n        ma_device_job_thread_config jobThreadConfig;\n\n        jobThreadConfig = ma_device_job_thread_config_init();\n\n        result = ma_device_job_thread_init(&jobThreadConfig, &pContext->allocationCallbacks, &pContext->aaudio.jobThread);\n        if (result != MA_SUCCESS) {\n            ma_dlclose(ma_context_get_log(pContext), pContext->aaudio.hAAudio);\n            pContext->aaudio.hAAudio = NULL;\n            return result;\n        }\n    }\n\n\n    (void)pConfig;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_job_process__device__aaudio_reroute(ma_job* pJob)\n{\n    ma_device* pDevice;\n\n    MA_ASSERT(pJob != NULL);\n\n    pDevice = (ma_device*)pJob->data.device.aaudio.reroute.pDevice;\n    MA_ASSERT(pDevice != NULL);\n\n    /* Here is where we need to reroute the device. To do this we need to uninitialize the stream and reinitialize it. */\n    return ma_device_reinit__aaudio(pDevice, (ma_device_type)pJob->data.device.aaudio.reroute.deviceType);\n}\n#else\n/* Getting here means there is no AAudio backend so we need a no-op job implementation. */\nstatic ma_result ma_job_process__device__aaudio_reroute(ma_job* pJob)\n{\n    return ma_job_process__noop(pJob);\n}\n#endif  /* AAudio */\n\n\n/******************************************************************************\n\nOpenSL|ES Backend\n\n******************************************************************************/\n#ifdef MA_HAS_OPENSL\n#include <SLES/OpenSLES.h>\n#ifdef MA_ANDROID\n#include <SLES/OpenSLES_Android.h>\n#endif\n\ntypedef SLresult (SLAPIENTRY * ma_slCreateEngine_proc)(SLObjectItf* pEngine, SLuint32 numOptions, SLEngineOption* pEngineOptions, SLuint32 numInterfaces, SLInterfaceID* pInterfaceIds, SLboolean* pInterfaceRequired);\n\n/* OpenSL|ES has one-per-application objects :( */\nstatic SLObjectItf g_maEngineObjectSL    = NULL;\nstatic SLEngineItf g_maEngineSL          = NULL;\nstatic ma_uint32   g_maOpenSLInitCounter = 0;\nstatic ma_spinlock g_maOpenSLSpinlock    = 0;   /* For init/uninit. */\n\n#define MA_OPENSL_OBJ(p)         (*((SLObjectItf)(p)))\n#define MA_OPENSL_OUTPUTMIX(p)   (*((SLOutputMixItf)(p)))\n#define MA_OPENSL_PLAY(p)        (*((SLPlayItf)(p)))\n#define MA_OPENSL_RECORD(p)      (*((SLRecordItf)(p)))\n\n#ifdef MA_ANDROID\n#define MA_OPENSL_BUFFERQUEUE(p) (*((SLAndroidSimpleBufferQueueItf)(p)))\n#else\n#define MA_OPENSL_BUFFERQUEUE(p) (*((SLBufferQueueItf)(p)))\n#endif\n\nstatic ma_result ma_result_from_OpenSL(SLuint32 result)\n{\n    switch (result)\n    {\n        case SL_RESULT_SUCCESS:                 return MA_SUCCESS;\n        case SL_RESULT_PRECONDITIONS_VIOLATED:  return MA_ERROR;\n        case SL_RESULT_PARAMETER_INVALID:       return MA_INVALID_ARGS;\n        case SL_RESULT_MEMORY_FAILURE:          return MA_OUT_OF_MEMORY;\n        case SL_RESULT_RESOURCE_ERROR:          return MA_INVALID_DATA;\n        case SL_RESULT_RESOURCE_LOST:           return MA_ERROR;\n        case SL_RESULT_IO_ERROR:                return MA_IO_ERROR;\n        case SL_RESULT_BUFFER_INSUFFICIENT:     return MA_NO_SPACE;\n        case SL_RESULT_CONTENT_CORRUPTED:       return MA_INVALID_DATA;\n        case SL_RESULT_CONTENT_UNSUPPORTED:     return MA_FORMAT_NOT_SUPPORTED;\n        case SL_RESULT_CONTENT_NOT_FOUND:       return MA_ERROR;\n        case SL_RESULT_PERMISSION_DENIED:       return MA_ACCESS_DENIED;\n        case SL_RESULT_FEATURE_UNSUPPORTED:     return MA_NOT_IMPLEMENTED;\n        case SL_RESULT_INTERNAL_ERROR:          return MA_ERROR;\n        case SL_RESULT_UNKNOWN_ERROR:           return MA_ERROR;\n        case SL_RESULT_OPERATION_ABORTED:       return MA_ERROR;\n        case SL_RESULT_CONTROL_LOST:            return MA_ERROR;\n        default:                                return MA_ERROR;\n    }\n}\n\n/* Converts an individual OpenSL-style channel identifier (SL_SPEAKER_FRONT_LEFT, etc.) to miniaudio. */\nstatic ma_uint8 ma_channel_id_to_ma__opensl(SLuint32 id)\n{\n    switch (id)\n    {\n        case SL_SPEAKER_FRONT_LEFT:            return MA_CHANNEL_FRONT_LEFT;\n        case SL_SPEAKER_FRONT_RIGHT:           return MA_CHANNEL_FRONT_RIGHT;\n        case SL_SPEAKER_FRONT_CENTER:          return MA_CHANNEL_FRONT_CENTER;\n        case SL_SPEAKER_LOW_FREQUENCY:         return MA_CHANNEL_LFE;\n        case SL_SPEAKER_BACK_LEFT:             return MA_CHANNEL_BACK_LEFT;\n        case SL_SPEAKER_BACK_RIGHT:            return MA_CHANNEL_BACK_RIGHT;\n        case SL_SPEAKER_FRONT_LEFT_OF_CENTER:  return MA_CHANNEL_FRONT_LEFT_CENTER;\n        case SL_SPEAKER_FRONT_RIGHT_OF_CENTER: return MA_CHANNEL_FRONT_RIGHT_CENTER;\n        case SL_SPEAKER_BACK_CENTER:           return MA_CHANNEL_BACK_CENTER;\n        case SL_SPEAKER_SIDE_LEFT:             return MA_CHANNEL_SIDE_LEFT;\n        case SL_SPEAKER_SIDE_RIGHT:            return MA_CHANNEL_SIDE_RIGHT;\n        case SL_SPEAKER_TOP_CENTER:            return MA_CHANNEL_TOP_CENTER;\n        case SL_SPEAKER_TOP_FRONT_LEFT:        return MA_CHANNEL_TOP_FRONT_LEFT;\n        case SL_SPEAKER_TOP_FRONT_CENTER:      return MA_CHANNEL_TOP_FRONT_CENTER;\n        case SL_SPEAKER_TOP_FRONT_RIGHT:       return MA_CHANNEL_TOP_FRONT_RIGHT;\n        case SL_SPEAKER_TOP_BACK_LEFT:         return MA_CHANNEL_TOP_BACK_LEFT;\n        case SL_SPEAKER_TOP_BACK_CENTER:       return MA_CHANNEL_TOP_BACK_CENTER;\n        case SL_SPEAKER_TOP_BACK_RIGHT:        return MA_CHANNEL_TOP_BACK_RIGHT;\n        default: return 0;\n    }\n}\n\n/* Converts an individual miniaudio channel identifier (MA_CHANNEL_FRONT_LEFT, etc.) to OpenSL-style. */\nstatic SLuint32 ma_channel_id_to_opensl(ma_uint8 id)\n{\n    switch (id)\n    {\n        case MA_CHANNEL_MONO:               return SL_SPEAKER_FRONT_CENTER;\n        case MA_CHANNEL_FRONT_LEFT:         return SL_SPEAKER_FRONT_LEFT;\n        case MA_CHANNEL_FRONT_RIGHT:        return SL_SPEAKER_FRONT_RIGHT;\n        case MA_CHANNEL_FRONT_CENTER:       return SL_SPEAKER_FRONT_CENTER;\n        case MA_CHANNEL_LFE:                return SL_SPEAKER_LOW_FREQUENCY;\n        case MA_CHANNEL_BACK_LEFT:          return SL_SPEAKER_BACK_LEFT;\n        case MA_CHANNEL_BACK_RIGHT:         return SL_SPEAKER_BACK_RIGHT;\n        case MA_CHANNEL_FRONT_LEFT_CENTER:  return SL_SPEAKER_FRONT_LEFT_OF_CENTER;\n        case MA_CHANNEL_FRONT_RIGHT_CENTER: return SL_SPEAKER_FRONT_RIGHT_OF_CENTER;\n        case MA_CHANNEL_BACK_CENTER:        return SL_SPEAKER_BACK_CENTER;\n        case MA_CHANNEL_SIDE_LEFT:          return SL_SPEAKER_SIDE_LEFT;\n        case MA_CHANNEL_SIDE_RIGHT:         return SL_SPEAKER_SIDE_RIGHT;\n        case MA_CHANNEL_TOP_CENTER:         return SL_SPEAKER_TOP_CENTER;\n        case MA_CHANNEL_TOP_FRONT_LEFT:     return SL_SPEAKER_TOP_FRONT_LEFT;\n        case MA_CHANNEL_TOP_FRONT_CENTER:   return SL_SPEAKER_TOP_FRONT_CENTER;\n        case MA_CHANNEL_TOP_FRONT_RIGHT:    return SL_SPEAKER_TOP_FRONT_RIGHT;\n        case MA_CHANNEL_TOP_BACK_LEFT:      return SL_SPEAKER_TOP_BACK_LEFT;\n        case MA_CHANNEL_TOP_BACK_CENTER:    return SL_SPEAKER_TOP_BACK_CENTER;\n        case MA_CHANNEL_TOP_BACK_RIGHT:     return SL_SPEAKER_TOP_BACK_RIGHT;\n        default: return 0;\n    }\n}\n\n/* Converts a channel mapping to an OpenSL-style channel mask. */\nstatic SLuint32 ma_channel_map_to_channel_mask__opensl(const ma_channel* pChannelMap, ma_uint32 channels)\n{\n    SLuint32 channelMask = 0;\n    ma_uint32 iChannel;\n    for (iChannel = 0; iChannel < channels; ++iChannel) {\n        channelMask |= ma_channel_id_to_opensl(pChannelMap[iChannel]);\n    }\n\n    return channelMask;\n}\n\n/* Converts an OpenSL-style channel mask to a miniaudio channel map. */\nstatic void ma_channel_mask_to_channel_map__opensl(SLuint32 channelMask, ma_uint32 channels, ma_channel* pChannelMap)\n{\n    if (channels == 1 && channelMask == 0) {\n        pChannelMap[0] = MA_CHANNEL_MONO;\n    } else if (channels == 2 && channelMask == 0) {\n        pChannelMap[0] = MA_CHANNEL_FRONT_LEFT;\n        pChannelMap[1] = MA_CHANNEL_FRONT_RIGHT;\n    } else {\n        if (channels == 1 && (channelMask & SL_SPEAKER_FRONT_CENTER) != 0) {\n            pChannelMap[0] = MA_CHANNEL_MONO;\n        } else {\n            /* Just iterate over each bit. */\n            ma_uint32 iChannel = 0;\n            ma_uint32 iBit;\n            for (iBit = 0; iBit < 32 && iChannel < channels; ++iBit) {\n                SLuint32 bitValue = (channelMask & (1UL << iBit));\n                if (bitValue != 0) {\n                    /* The bit is set. */\n                    pChannelMap[iChannel] = ma_channel_id_to_ma__opensl(bitValue);\n                    iChannel += 1;\n                }\n            }\n        }\n    }\n}\n\nstatic SLuint32 ma_round_to_standard_sample_rate__opensl(SLuint32 samplesPerSec)\n{\n    if (samplesPerSec <= SL_SAMPLINGRATE_8) {\n        return SL_SAMPLINGRATE_8;\n    }\n    if (samplesPerSec <= SL_SAMPLINGRATE_11_025) {\n        return SL_SAMPLINGRATE_11_025;\n    }\n    if (samplesPerSec <= SL_SAMPLINGRATE_12) {\n        return SL_SAMPLINGRATE_12;\n    }\n    if (samplesPerSec <= SL_SAMPLINGRATE_16) {\n        return SL_SAMPLINGRATE_16;\n    }\n    if (samplesPerSec <= SL_SAMPLINGRATE_22_05) {\n        return SL_SAMPLINGRATE_22_05;\n    }\n    if (samplesPerSec <= SL_SAMPLINGRATE_24) {\n        return SL_SAMPLINGRATE_24;\n    }\n    if (samplesPerSec <= SL_SAMPLINGRATE_32) {\n        return SL_SAMPLINGRATE_32;\n    }\n    if (samplesPerSec <= SL_SAMPLINGRATE_44_1) {\n        return SL_SAMPLINGRATE_44_1;\n    }\n    if (samplesPerSec <= SL_SAMPLINGRATE_48) {\n        return SL_SAMPLINGRATE_48;\n    }\n\n    /* Android doesn't support more than 48000. */\n#ifndef MA_ANDROID\n    if (samplesPerSec <= SL_SAMPLINGRATE_64) {\n        return SL_SAMPLINGRATE_64;\n    }\n    if (samplesPerSec <= SL_SAMPLINGRATE_88_2) {\n        return SL_SAMPLINGRATE_88_2;\n    }\n    if (samplesPerSec <= SL_SAMPLINGRATE_96) {\n        return SL_SAMPLINGRATE_96;\n    }\n    if (samplesPerSec <= SL_SAMPLINGRATE_192) {\n        return SL_SAMPLINGRATE_192;\n    }\n#endif\n\n    return SL_SAMPLINGRATE_16;\n}\n\n\nstatic SLint32 ma_to_stream_type__opensl(ma_opensl_stream_type streamType)\n{\n    switch (streamType) {\n        case ma_opensl_stream_type_voice:        return SL_ANDROID_STREAM_VOICE;\n        case ma_opensl_stream_type_system:       return SL_ANDROID_STREAM_SYSTEM;\n        case ma_opensl_stream_type_ring:         return SL_ANDROID_STREAM_RING;\n        case ma_opensl_stream_type_media:        return SL_ANDROID_STREAM_MEDIA;\n        case ma_opensl_stream_type_alarm:        return SL_ANDROID_STREAM_ALARM;\n        case ma_opensl_stream_type_notification: return SL_ANDROID_STREAM_NOTIFICATION;\n        default: break;\n    }\n\n    return SL_ANDROID_STREAM_VOICE;\n}\n\nstatic SLint32 ma_to_recording_preset__opensl(ma_opensl_recording_preset recordingPreset)\n{\n    switch (recordingPreset) {\n        case ma_opensl_recording_preset_generic:             return SL_ANDROID_RECORDING_PRESET_GENERIC;\n        case ma_opensl_recording_preset_camcorder:           return SL_ANDROID_RECORDING_PRESET_CAMCORDER;\n        case ma_opensl_recording_preset_voice_recognition:   return SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION;\n        case ma_opensl_recording_preset_voice_communication: return SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION;\n        case ma_opensl_recording_preset_voice_unprocessed:   return SL_ANDROID_RECORDING_PRESET_UNPROCESSED;\n        default: break;\n    }\n\n    return SL_ANDROID_RECORDING_PRESET_NONE;\n}\n\n\nstatic ma_result ma_context_enumerate_devices__opensl(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    ma_bool32 cbResult;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(callback != NULL);\n\n    MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it and then attempted to enumerate devices. */\n    if (g_maOpenSLInitCounter == 0) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /*\n    TODO: Test Me.\n\n    This is currently untested, so for now we are just returning default devices.\n    */\n#if 0 && !defined(MA_ANDROID)\n    ma_bool32 isTerminated = MA_FALSE;\n\n    SLuint32 pDeviceIDs[128];\n    SLint32 deviceCount = sizeof(pDeviceIDs) / sizeof(pDeviceIDs[0]);\n\n    SLAudioIODeviceCapabilitiesItf deviceCaps;\n    SLresult resultSL = (*g_maEngineObjectSL)->GetInterface(g_maEngineObjectSL, (SLInterfaceID)pContext->opensl.SL_IID_AUDIOIODEVICECAPABILITIES, &deviceCaps);\n    if (resultSL != SL_RESULT_SUCCESS) {\n        /* The interface may not be supported so just report a default device. */\n        goto return_default_device;\n    }\n\n    /* Playback */\n    if (!isTerminated) {\n        resultSL = (*deviceCaps)->GetAvailableAudioOutputs(deviceCaps, &deviceCount, pDeviceIDs);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        for (SLint32 iDevice = 0; iDevice < deviceCount; ++iDevice) {\n            ma_device_info deviceInfo;\n            MA_ZERO_OBJECT(&deviceInfo);\n            deviceInfo.id.opensl = pDeviceIDs[iDevice];\n\n            SLAudioOutputDescriptor desc;\n            resultSL = (*deviceCaps)->QueryAudioOutputCapabilities(deviceCaps, deviceInfo.id.opensl, &desc);\n            if (resultSL == SL_RESULT_SUCCESS) {\n                ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), (const char*)desc.pDeviceName, (size_t)-1);\n\n                ma_bool32 cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData);\n                if (cbResult == MA_FALSE) {\n                    isTerminated = MA_TRUE;\n                    break;\n                }\n            }\n        }\n    }\n\n    /* Capture */\n    if (!isTerminated) {\n        resultSL = (*deviceCaps)->GetAvailableAudioInputs(deviceCaps, &deviceCount, pDeviceIDs);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        for (SLint32 iDevice = 0; iDevice < deviceCount; ++iDevice) {\n            ma_device_info deviceInfo;\n            MA_ZERO_OBJECT(&deviceInfo);\n            deviceInfo.id.opensl = pDeviceIDs[iDevice];\n\n            SLAudioInputDescriptor desc;\n            resultSL = (*deviceCaps)->QueryAudioInputCapabilities(deviceCaps, deviceInfo.id.opensl, &desc);\n            if (resultSL == SL_RESULT_SUCCESS) {\n                ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), (const char*)desc.deviceName, (size_t)-1);\n\n                ma_bool32 cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData);\n                if (cbResult == MA_FALSE) {\n                    isTerminated = MA_TRUE;\n                    break;\n                }\n            }\n        }\n    }\n\n    return MA_SUCCESS;\n#else\n    goto return_default_device;\n#endif\n\nreturn_default_device:;\n    cbResult = MA_TRUE;\n\n    /* Playback. */\n    if (cbResult) {\n        ma_device_info deviceInfo;\n        MA_ZERO_OBJECT(&deviceInfo);\n        deviceInfo.id.opensl = SL_DEFAULTDEVICEID_AUDIOOUTPUT;\n        ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n        cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData);\n    }\n\n    /* Capture. */\n    if (cbResult) {\n        ma_device_info deviceInfo;\n        MA_ZERO_OBJECT(&deviceInfo);\n        deviceInfo.id.opensl = SL_DEFAULTDEVICEID_AUDIOINPUT;\n        ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n        cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_context_add_data_format_ex__opensl(ma_context* pContext, ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_device_info* pDeviceInfo)\n{\n    MA_ASSERT(pContext    != NULL);\n    MA_ASSERT(pDeviceInfo != NULL);\n\n    pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].format     = format;\n    pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].channels   = channels;\n    pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].sampleRate = sampleRate;\n    pDeviceInfo->nativeDataFormats[pDeviceInfo->nativeDataFormatCount].flags      = 0;\n    pDeviceInfo->nativeDataFormatCount += 1;\n}\n\nstatic void ma_context_add_data_format__opensl(ma_context* pContext, ma_format format, ma_device_info* pDeviceInfo)\n{\n    ma_uint32 minChannels   = 1;\n    ma_uint32 maxChannels   = 2;\n    ma_uint32 minSampleRate = (ma_uint32)ma_standard_sample_rate_8000;\n    ma_uint32 maxSampleRate = (ma_uint32)ma_standard_sample_rate_48000;\n    ma_uint32 iChannel;\n    ma_uint32 iSampleRate;\n\n    MA_ASSERT(pContext    != NULL);\n    MA_ASSERT(pDeviceInfo != NULL);\n\n    /*\n    Each sample format can support mono and stereo, and we'll support a small subset of standard\n    rates (up to 48000). A better solution would be to somehow find a native sample rate.\n    */\n    for (iChannel = minChannels; iChannel < maxChannels; iChannel += 1) {\n        for (iSampleRate = 0; iSampleRate < ma_countof(g_maStandardSampleRatePriorities); iSampleRate += 1) {\n            ma_uint32 standardSampleRate = g_maStandardSampleRatePriorities[iSampleRate];\n            if (standardSampleRate >= minSampleRate && standardSampleRate <= maxSampleRate) {\n                ma_context_add_data_format_ex__opensl(pContext, format, iChannel, standardSampleRate, pDeviceInfo);\n            }\n        }\n    }\n}\n\nstatic ma_result ma_context_get_device_info__opensl(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    MA_ASSERT(pContext != NULL);\n\n    MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it and then attempted to get device info. */\n    if (g_maOpenSLInitCounter == 0) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /*\n    TODO: Test Me.\n\n    This is currently untested, so for now we are just returning default devices.\n    */\n#if 0 && !defined(MA_ANDROID)\n    SLAudioIODeviceCapabilitiesItf deviceCaps;\n    SLresult resultSL = (*g_maEngineObjectSL)->GetInterface(g_maEngineObjectSL, (SLInterfaceID)pContext->opensl.SL_IID_AUDIOIODEVICECAPABILITIES, &deviceCaps);\n    if (resultSL != SL_RESULT_SUCCESS) {\n        /* The interface may not be supported so just report a default device. */\n        goto return_default_device;\n    }\n\n    if (deviceType == ma_device_type_playback) {\n        SLAudioOutputDescriptor desc;\n        resultSL = (*deviceCaps)->QueryAudioOutputCapabilities(deviceCaps, pDeviceID->opensl, &desc);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), (const char*)desc.pDeviceName, (size_t)-1);\n    } else {\n        SLAudioInputDescriptor desc;\n        resultSL = (*deviceCaps)->QueryAudioInputCapabilities(deviceCaps, pDeviceID->opensl, &desc);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), (const char*)desc.deviceName, (size_t)-1);\n    }\n\n    goto return_detailed_info;\n#else\n    goto return_default_device;\n#endif\n\nreturn_default_device:\n    if (pDeviceID != NULL) {\n        if ((deviceType == ma_device_type_playback && pDeviceID->opensl != SL_DEFAULTDEVICEID_AUDIOOUTPUT) ||\n            (deviceType == ma_device_type_capture  && pDeviceID->opensl != SL_DEFAULTDEVICEID_AUDIOINPUT)) {\n            return MA_NO_DEVICE;   /* Don't know the device. */\n        }\n    }\n\n    /* ID and Name / Description */\n    if (deviceType == ma_device_type_playback) {\n        pDeviceInfo->id.opensl = SL_DEFAULTDEVICEID_AUDIOOUTPUT;\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n    } else {\n        pDeviceInfo->id.opensl = SL_DEFAULTDEVICEID_AUDIOINPUT;\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n    }\n\n    pDeviceInfo->isDefault = MA_TRUE;\n\n    goto return_detailed_info;\n\n\nreturn_detailed_info:\n\n    /*\n    For now we're just outputting a set of values that are supported by the API but not necessarily supported\n    by the device natively. Later on we should work on this so that it more closely reflects the device's\n    actual native format.\n    */\n    pDeviceInfo->nativeDataFormatCount = 0;\n#if defined(MA_ANDROID) && __ANDROID_API__ >= 21\n    ma_context_add_data_format__opensl(pContext, ma_format_f32, pDeviceInfo);\n#endif\n    ma_context_add_data_format__opensl(pContext, ma_format_s16, pDeviceInfo);\n    ma_context_add_data_format__opensl(pContext, ma_format_u8,  pDeviceInfo);\n\n    return MA_SUCCESS;\n}\n\n\n#ifdef MA_ANDROID\n/*void ma_buffer_queue_callback_capture__opensl_android(SLAndroidSimpleBufferQueueItf pBufferQueue, SLuint32 eventFlags, const void* pBuffer, SLuint32 bufferSize, SLuint32 dataUsed, void* pContext)*/\nstatic void ma_buffer_queue_callback_capture__opensl_android(SLAndroidSimpleBufferQueueItf pBufferQueue, void* pUserData)\n{\n    ma_device* pDevice = (ma_device*)pUserData;\n    size_t periodSizeInBytes;\n    ma_uint8* pBuffer;\n    SLresult resultSL;\n\n    MA_ASSERT(pDevice != NULL);\n\n    (void)pBufferQueue;\n\n    /*\n    For now, don't do anything unless the buffer was fully processed. From what I can tell, it looks like\n    OpenSL|ES 1.1 improves on buffer queues to the point that we could much more intelligently handle this,\n    but unfortunately it looks like Android is only supporting OpenSL|ES 1.0.1 for now :(\n    */\n\n    /* Don't do anything if the device is not started. */\n    if (ma_device_get_state(pDevice) != ma_device_state_started) {\n        return;\n    }\n\n    /* Don't do anything if the device is being drained. */\n    if (pDevice->opensl.isDrainingCapture) {\n        return;\n    }\n\n    periodSizeInBytes = pDevice->capture.internalPeriodSizeInFrames * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels);\n    pBuffer = pDevice->opensl.pBufferCapture + (pDevice->opensl.currentBufferIndexCapture * periodSizeInBytes);\n\n    ma_device_handle_backend_data_callback(pDevice, NULL, pBuffer, pDevice->capture.internalPeriodSizeInFrames);\n\n    resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture, pBuffer, periodSizeInBytes);\n    if (resultSL != SL_RESULT_SUCCESS) {\n        return;\n    }\n\n    pDevice->opensl.currentBufferIndexCapture = (pDevice->opensl.currentBufferIndexCapture + 1) % pDevice->capture.internalPeriods;\n}\n\nstatic void ma_buffer_queue_callback_playback__opensl_android(SLAndroidSimpleBufferQueueItf pBufferQueue, void* pUserData)\n{\n    ma_device* pDevice = (ma_device*)pUserData;\n    size_t periodSizeInBytes;\n    ma_uint8* pBuffer;\n    SLresult resultSL;\n\n    MA_ASSERT(pDevice != NULL);\n\n    (void)pBufferQueue;\n\n    /* Don't do anything if the device is not started. */\n    if (ma_device_get_state(pDevice) != ma_device_state_started) {\n        return;\n    }\n\n    /* Don't do anything if the device is being drained. */\n    if (pDevice->opensl.isDrainingPlayback) {\n        return;\n    }\n\n    periodSizeInBytes = pDevice->playback.internalPeriodSizeInFrames * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels);\n    pBuffer = pDevice->opensl.pBufferPlayback + (pDevice->opensl.currentBufferIndexPlayback * periodSizeInBytes);\n\n    ma_device_handle_backend_data_callback(pDevice, pBuffer, NULL, pDevice->playback.internalPeriodSizeInFrames);\n\n    resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback, pBuffer, periodSizeInBytes);\n    if (resultSL != SL_RESULT_SUCCESS) {\n        return;\n    }\n\n    pDevice->opensl.currentBufferIndexPlayback = (pDevice->opensl.currentBufferIndexPlayback + 1) % pDevice->playback.internalPeriods;\n}\n#endif\n\nstatic ma_result ma_device_uninit__opensl(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it before uninitializing the device. */\n    if (g_maOpenSLInitCounter == 0) {\n        return MA_INVALID_OPERATION;\n    }\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        if (pDevice->opensl.pAudioRecorderObj) {\n            MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->Destroy((SLObjectItf)pDevice->opensl.pAudioRecorderObj);\n        }\n\n        ma_free(pDevice->opensl.pBufferCapture, &pDevice->pContext->allocationCallbacks);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        if (pDevice->opensl.pAudioPlayerObj) {\n            MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->Destroy((SLObjectItf)pDevice->opensl.pAudioPlayerObj);\n        }\n        if (pDevice->opensl.pOutputMixObj) {\n            MA_OPENSL_OBJ(pDevice->opensl.pOutputMixObj)->Destroy((SLObjectItf)pDevice->opensl.pOutputMixObj);\n        }\n\n        ma_free(pDevice->opensl.pBufferPlayback, &pDevice->pContext->allocationCallbacks);\n    }\n\n    return MA_SUCCESS;\n}\n\n#if defined(MA_ANDROID) && __ANDROID_API__ >= 21\ntypedef SLAndroidDataFormat_PCM_EX  ma_SLDataFormat_PCM;\n#else\ntypedef SLDataFormat_PCM            ma_SLDataFormat_PCM;\n#endif\n\nstatic ma_result ma_SLDataFormat_PCM_init__opensl(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, const ma_channel* channelMap, ma_SLDataFormat_PCM* pDataFormat)\n{\n    /* We need to convert our format/channels/rate so that they aren't set to default. */\n    if (format == ma_format_unknown) {\n        format = MA_DEFAULT_FORMAT;\n    }\n    if (channels == 0) {\n        channels = MA_DEFAULT_CHANNELS;\n    }\n    if (sampleRate == 0) {\n        sampleRate = MA_DEFAULT_SAMPLE_RATE;\n    }\n\n#if defined(MA_ANDROID) && __ANDROID_API__ >= 21\n    if (format == ma_format_f32) {\n        pDataFormat->formatType     = SL_ANDROID_DATAFORMAT_PCM_EX;\n        pDataFormat->representation = SL_ANDROID_PCM_REPRESENTATION_FLOAT;\n    } else {\n        pDataFormat->formatType = SL_DATAFORMAT_PCM;\n    }\n#else\n    pDataFormat->formatType = SL_DATAFORMAT_PCM;\n#endif\n\n    pDataFormat->numChannels   = channels;\n    ((SLDataFormat_PCM*)pDataFormat)->samplesPerSec = ma_round_to_standard_sample_rate__opensl(sampleRate * 1000);  /* In millihertz. Annoyingly, the sample rate variable is named differently between SLAndroidDataFormat_PCM_EX and SLDataFormat_PCM */\n    pDataFormat->bitsPerSample = ma_get_bytes_per_sample(format) * 8;\n    pDataFormat->channelMask   = ma_channel_map_to_channel_mask__opensl(channelMap, channels);\n    pDataFormat->endianness    = (ma_is_little_endian()) ? SL_BYTEORDER_LITTLEENDIAN : SL_BYTEORDER_BIGENDIAN;\n\n    /*\n    Android has a few restrictions on the format as documented here: https://developer.android.com/ndk/guides/audio/opensl-for-android.html\n     - Only mono and stereo is supported.\n     - Only u8 and s16 formats are supported.\n     - Maximum sample rate of 48000.\n    */\n#ifdef MA_ANDROID\n    if (pDataFormat->numChannels > 2) {\n        pDataFormat->numChannels = 2;\n    }\n#if __ANDROID_API__ >= 21\n    if (pDataFormat->formatType == SL_ANDROID_DATAFORMAT_PCM_EX) {\n        /* It's floating point. */\n        MA_ASSERT(pDataFormat->representation == SL_ANDROID_PCM_REPRESENTATION_FLOAT);\n        if (pDataFormat->bitsPerSample > 32) {\n            pDataFormat->bitsPerSample = 32;\n        }\n    } else {\n        if (pDataFormat->bitsPerSample > 16) {\n            pDataFormat->bitsPerSample = 16;\n        }\n    }\n#else\n    if (pDataFormat->bitsPerSample > 16) {\n        pDataFormat->bitsPerSample = 16;\n    }\n#endif\n    if (((SLDataFormat_PCM*)pDataFormat)->samplesPerSec > SL_SAMPLINGRATE_48) {\n        ((SLDataFormat_PCM*)pDataFormat)->samplesPerSec = SL_SAMPLINGRATE_48;\n    }\n#endif\n\n    pDataFormat->containerSize = pDataFormat->bitsPerSample;  /* Always tightly packed for now. */\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_deconstruct_SLDataFormat_PCM__opensl(ma_SLDataFormat_PCM* pDataFormat, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    ma_bool32 isFloatingPoint = MA_FALSE;\n#if defined(MA_ANDROID) && __ANDROID_API__ >= 21\n    if (pDataFormat->formatType == SL_ANDROID_DATAFORMAT_PCM_EX) {\n        MA_ASSERT(pDataFormat->representation == SL_ANDROID_PCM_REPRESENTATION_FLOAT);\n        isFloatingPoint = MA_TRUE;\n    }\n#endif\n    if (isFloatingPoint) {\n        if (pDataFormat->bitsPerSample == 32) {\n            *pFormat = ma_format_f32;\n        }\n    } else {\n        if (pDataFormat->bitsPerSample == 8) {\n            *pFormat = ma_format_u8;\n        } else if (pDataFormat->bitsPerSample == 16) {\n            *pFormat = ma_format_s16;\n        } else if (pDataFormat->bitsPerSample == 24) {\n            *pFormat = ma_format_s24;\n        } else if (pDataFormat->bitsPerSample == 32) {\n            *pFormat = ma_format_s32;\n        }\n    }\n\n    *pChannels   = pDataFormat->numChannels;\n    *pSampleRate = ((SLDataFormat_PCM*)pDataFormat)->samplesPerSec / 1000;\n    ma_channel_mask_to_channel_map__opensl(pDataFormat->channelMask, ma_min(pDataFormat->numChannels, channelMapCap), pChannelMap);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_init__opensl(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n#ifdef MA_ANDROID\n    SLDataLocator_AndroidSimpleBufferQueue queue;\n    SLresult resultSL;\n    size_t bufferSizeInBytes;\n    SLInterfaceID itfIDs[2];\n    const SLboolean itfIDsRequired[] = {\n        SL_BOOLEAN_TRUE,    /* SL_IID_ANDROIDSIMPLEBUFFERQUEUE */\n        SL_BOOLEAN_FALSE    /* SL_IID_ANDROIDCONFIGURATION */\n    };\n#endif\n\n    MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it and then attempted to initialize a new device. */\n    if (g_maOpenSLInitCounter == 0) {\n        return MA_INVALID_OPERATION;\n    }\n\n    if (pConfig->deviceType == ma_device_type_loopback) {\n        return MA_DEVICE_TYPE_NOT_SUPPORTED;\n    }\n\n    /*\n    For now, only supporting Android implementations of OpenSL|ES since that's the only one I've\n    been able to test with and I currently depend on Android-specific extensions (simple buffer\n    queues).\n    */\n#ifdef MA_ANDROID\n    itfIDs[0] = (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE;\n    itfIDs[1] = (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDCONFIGURATION;\n\n    /* No exclusive mode with OpenSL|ES. */\n    if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) ||\n        ((pConfig->deviceType == ma_device_type_capture  || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode  == ma_share_mode_exclusive)) {\n        return MA_SHARE_MODE_NOT_SUPPORTED;\n    }\n\n    /* Now we can start initializing the device properly. */\n    MA_ASSERT(pDevice != NULL);\n    MA_ZERO_OBJECT(&pDevice->opensl);\n\n    queue.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE;\n\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        ma_SLDataFormat_PCM pcm;\n        SLDataLocator_IODevice locatorDevice;\n        SLDataSource source;\n        SLDataSink sink;\n        SLAndroidConfigurationItf pRecorderConfig;\n\n        ma_SLDataFormat_PCM_init__opensl(pDescriptorCapture->format, pDescriptorCapture->channels, pDescriptorCapture->sampleRate, pDescriptorCapture->channelMap, &pcm);\n\n        locatorDevice.locatorType = SL_DATALOCATOR_IODEVICE;\n        locatorDevice.deviceType  = SL_IODEVICE_AUDIOINPUT;\n        locatorDevice.deviceID    = SL_DEFAULTDEVICEID_AUDIOINPUT;  /* Must always use the default device with Android. */\n        locatorDevice.device      = NULL;\n\n        source.pLocator = &locatorDevice;\n        source.pFormat  = NULL;\n\n        queue.numBuffers = pDescriptorCapture->periodCount;\n\n        sink.pLocator = &queue;\n        sink.pFormat  = (SLDataFormat_PCM*)&pcm;\n\n        resultSL = (*g_maEngineSL)->CreateAudioRecorder(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioRecorderObj, &source, &sink, ma_countof(itfIDs), itfIDs, itfIDsRequired);\n        if (resultSL == SL_RESULT_CONTENT_UNSUPPORTED || resultSL == SL_RESULT_PARAMETER_INVALID) {\n            /* Unsupported format. Fall back to something safer and try again. If this fails, just abort. */\n            pcm.formatType    = SL_DATAFORMAT_PCM;\n            pcm.numChannels   = 1;\n            ((SLDataFormat_PCM*)&pcm)->samplesPerSec = SL_SAMPLINGRATE_16;  /* The name of the sample rate variable is different between SLAndroidDataFormat_PCM_EX and SLDataFormat_PCM. */\n            pcm.bitsPerSample = 16;\n            pcm.containerSize = pcm.bitsPerSample;  /* Always tightly packed for now. */\n            pcm.channelMask   = 0;\n            resultSL = (*g_maEngineSL)->CreateAudioRecorder(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioRecorderObj, &source, &sink, ma_countof(itfIDs), itfIDs, itfIDsRequired);\n        }\n\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to create audio recorder.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n\n        /* Set the recording preset before realizing the player. */\n        if (pConfig->opensl.recordingPreset != ma_opensl_recording_preset_default) {\n            resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioRecorderObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDCONFIGURATION, &pRecorderConfig);\n            if (resultSL == SL_RESULT_SUCCESS) {\n                SLint32 recordingPreset = ma_to_recording_preset__opensl(pConfig->opensl.recordingPreset);\n                resultSL = (*pRecorderConfig)->SetConfiguration(pRecorderConfig, SL_ANDROID_KEY_RECORDING_PRESET, &recordingPreset, sizeof(SLint32));\n                if (resultSL != SL_RESULT_SUCCESS) {\n                    /* Failed to set the configuration. Just keep going. */\n                }\n            }\n        }\n\n        resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->Realize((SLObjectItf)pDevice->opensl.pAudioRecorderObj, SL_BOOLEAN_FALSE);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to realize audio recorder.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioRecorderObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_RECORD, &pDevice->opensl.pAudioRecorder);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to retrieve SL_IID_RECORD interface.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioRecorderObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &pDevice->opensl.pBufferQueueCapture);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to retrieve SL_IID_ANDROIDSIMPLEBUFFERQUEUE interface.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->RegisterCallback((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture, ma_buffer_queue_callback_capture__opensl_android, pDevice);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to register buffer queue callback.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        /* The internal format is determined by the \"pcm\" object. */\n        ma_deconstruct_SLDataFormat_PCM__opensl(&pcm, &pDescriptorCapture->format, &pDescriptorCapture->channels, &pDescriptorCapture->sampleRate, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap));\n\n        /* Buffer. */\n        pDescriptorCapture->periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptorCapture, pDescriptorCapture->sampleRate, pConfig->performanceProfile);\n        pDevice->opensl.currentBufferIndexCapture = 0;\n\n        bufferSizeInBytes = pDescriptorCapture->periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorCapture->format, pDescriptorCapture->channels) * pDescriptorCapture->periodCount;\n        pDevice->opensl.pBufferCapture = (ma_uint8*)ma_calloc(bufferSizeInBytes, &pDevice->pContext->allocationCallbacks);\n        if (pDevice->opensl.pBufferCapture == NULL) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to allocate memory for data buffer.\");\n            return MA_OUT_OF_MEMORY;\n        }\n        MA_ZERO_MEMORY(pDevice->opensl.pBufferCapture, bufferSizeInBytes);\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        ma_SLDataFormat_PCM pcm;\n        SLDataSource source;\n        SLDataLocator_OutputMix outmixLocator;\n        SLDataSink sink;\n        SLAndroidConfigurationItf pPlayerConfig;\n\n        ma_SLDataFormat_PCM_init__opensl(pDescriptorPlayback->format, pDescriptorPlayback->channels, pDescriptorPlayback->sampleRate, pDescriptorPlayback->channelMap, &pcm);\n\n        resultSL = (*g_maEngineSL)->CreateOutputMix(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pOutputMixObj, 0, NULL, NULL);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to create output mix.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        resultSL = MA_OPENSL_OBJ(pDevice->opensl.pOutputMixObj)->Realize((SLObjectItf)pDevice->opensl.pOutputMixObj, SL_BOOLEAN_FALSE);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to realize output mix object.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        resultSL = MA_OPENSL_OBJ(pDevice->opensl.pOutputMixObj)->GetInterface((SLObjectItf)pDevice->opensl.pOutputMixObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_OUTPUTMIX, &pDevice->opensl.pOutputMix);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to retrieve SL_IID_OUTPUTMIX interface.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        /* Set the output device. */\n        if (pDescriptorPlayback->pDeviceID != NULL) {\n            SLuint32 deviceID_OpenSL = pDescriptorPlayback->pDeviceID->opensl;\n            MA_OPENSL_OUTPUTMIX(pDevice->opensl.pOutputMix)->ReRoute((SLOutputMixItf)pDevice->opensl.pOutputMix, 1, &deviceID_OpenSL);\n        }\n\n        queue.numBuffers = pDescriptorPlayback->periodCount;\n\n        source.pLocator = &queue;\n        source.pFormat  = (SLDataFormat_PCM*)&pcm;\n\n        outmixLocator.locatorType = SL_DATALOCATOR_OUTPUTMIX;\n        outmixLocator.outputMix   = (SLObjectItf)pDevice->opensl.pOutputMixObj;\n\n        sink.pLocator = &outmixLocator;\n        sink.pFormat  = NULL;\n\n        resultSL = (*g_maEngineSL)->CreateAudioPlayer(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioPlayerObj, &source, &sink, ma_countof(itfIDs), itfIDs, itfIDsRequired);\n        if (resultSL == SL_RESULT_CONTENT_UNSUPPORTED || resultSL == SL_RESULT_PARAMETER_INVALID) {\n            /* Unsupported format. Fall back to something safer and try again. If this fails, just abort. */\n            pcm.formatType = SL_DATAFORMAT_PCM;\n            pcm.numChannels = 2;\n            ((SLDataFormat_PCM*)&pcm)->samplesPerSec = SL_SAMPLINGRATE_16;\n            pcm.bitsPerSample = 16;\n            pcm.containerSize = pcm.bitsPerSample;  /* Always tightly packed for now. */\n            pcm.channelMask = SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT;\n            resultSL = (*g_maEngineSL)->CreateAudioPlayer(g_maEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioPlayerObj, &source, &sink, ma_countof(itfIDs), itfIDs, itfIDsRequired);\n        }\n\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to create audio player.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n\n        /* Set the stream type before realizing the player. */\n        if (pConfig->opensl.streamType != ma_opensl_stream_type_default) {\n            resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioPlayerObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDCONFIGURATION, &pPlayerConfig);\n            if (resultSL == SL_RESULT_SUCCESS) {\n                SLint32 streamType = ma_to_stream_type__opensl(pConfig->opensl.streamType);\n                resultSL = (*pPlayerConfig)->SetConfiguration(pPlayerConfig, SL_ANDROID_KEY_STREAM_TYPE, &streamType, sizeof(SLint32));\n                if (resultSL != SL_RESULT_SUCCESS) {\n                    /* Failed to set the configuration. Just keep going. */\n                }\n            }\n        }\n\n        resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->Realize((SLObjectItf)pDevice->opensl.pAudioPlayerObj, SL_BOOLEAN_FALSE);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to realize audio player.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioPlayerObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_PLAY, &pDevice->opensl.pAudioPlayer);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to retrieve SL_IID_PLAY interface.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        resultSL = MA_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioPlayerObj, (SLInterfaceID)pDevice->pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &pDevice->opensl.pBufferQueuePlayback);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to retrieve SL_IID_ANDROIDSIMPLEBUFFERQUEUE interface.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->RegisterCallback((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback, ma_buffer_queue_callback_playback__opensl_android, pDevice);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to register buffer queue callback.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        /* The internal format is determined by the \"pcm\" object. */\n        ma_deconstruct_SLDataFormat_PCM__opensl(&pcm, &pDescriptorPlayback->format, &pDescriptorPlayback->channels, &pDescriptorPlayback->sampleRate, pDescriptorPlayback->channelMap, ma_countof(pDescriptorPlayback->channelMap));\n\n        /* Buffer. */\n        pDescriptorPlayback->periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_descriptor(pDescriptorPlayback, pDescriptorPlayback->sampleRate, pConfig->performanceProfile);\n        pDevice->opensl.currentBufferIndexPlayback   = 0;\n\n        bufferSizeInBytes = pDescriptorPlayback->periodSizeInFrames * ma_get_bytes_per_frame(pDescriptorPlayback->format, pDescriptorPlayback->channels) * pDescriptorPlayback->periodCount;\n        pDevice->opensl.pBufferPlayback = (ma_uint8*)ma_calloc(bufferSizeInBytes, &pDevice->pContext->allocationCallbacks);\n        if (pDevice->opensl.pBufferPlayback == NULL) {\n            ma_device_uninit__opensl(pDevice);\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to allocate memory for data buffer.\");\n            return MA_OUT_OF_MEMORY;\n        }\n        MA_ZERO_MEMORY(pDevice->opensl.pBufferPlayback, bufferSizeInBytes);\n    }\n\n    return MA_SUCCESS;\n#else\n    return MA_NO_BACKEND;   /* Non-Android implementations are not supported. */\n#endif\n}\n\nstatic ma_result ma_device_start__opensl(ma_device* pDevice)\n{\n    SLresult resultSL;\n    size_t periodSizeInBytes;\n    ma_uint32 iPeriod;\n\n    MA_ASSERT(pDevice != NULL);\n\n    MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it and then attempted to start the device. */\n    if (g_maOpenSLInitCounter == 0) {\n        return MA_INVALID_OPERATION;\n    }\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        resultSL = MA_OPENSL_RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORDSTATE_RECORDING);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to start internal capture device.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        periodSizeInBytes = pDevice->capture.internalPeriodSizeInFrames * ma_get_bytes_per_frame(pDevice->capture.internalFormat, pDevice->capture.internalChannels);\n        for (iPeriod = 0; iPeriod < pDevice->capture.internalPeriods; ++iPeriod) {\n            resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture, pDevice->opensl.pBufferCapture + (periodSizeInBytes * iPeriod), periodSizeInBytes);\n            if (resultSL != SL_RESULT_SUCCESS) {\n                MA_OPENSL_RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORDSTATE_STOPPED);\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to enqueue buffer for capture device.\");\n                return ma_result_from_OpenSL(resultSL);\n            }\n        }\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        resultSL = MA_OPENSL_PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAYSTATE_PLAYING);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to start internal playback device.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        /* In playback mode (no duplex) we need to load some initial buffers. In duplex mode we need to enqueue silent buffers. */\n        if (pDevice->type == ma_device_type_duplex) {\n            MA_ZERO_MEMORY(pDevice->opensl.pBufferPlayback, pDevice->playback.internalPeriodSizeInFrames * pDevice->playback.internalPeriods * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels));\n        } else {\n            ma_device__read_frames_from_client(pDevice, pDevice->playback.internalPeriodSizeInFrames * pDevice->playback.internalPeriods, pDevice->opensl.pBufferPlayback);\n        }\n\n        periodSizeInBytes = pDevice->playback.internalPeriodSizeInFrames * ma_get_bytes_per_frame(pDevice->playback.internalFormat, pDevice->playback.internalChannels);\n        for (iPeriod = 0; iPeriod < pDevice->playback.internalPeriods; ++iPeriod) {\n            resultSL = MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback, pDevice->opensl.pBufferPlayback + (periodSizeInBytes * iPeriod), periodSizeInBytes);\n            if (resultSL != SL_RESULT_SUCCESS) {\n                MA_OPENSL_PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAYSTATE_STOPPED);\n                ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to enqueue buffer for playback device.\");\n                return ma_result_from_OpenSL(resultSL);\n            }\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_drain__opensl(ma_device* pDevice, ma_device_type deviceType)\n{\n    SLAndroidSimpleBufferQueueItf pBufferQueue;\n\n    MA_ASSERT(deviceType == ma_device_type_capture || deviceType == ma_device_type_playback);\n\n    if (pDevice->type == ma_device_type_capture) {\n        pBufferQueue = (SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture;\n        pDevice->opensl.isDrainingCapture  = MA_TRUE;\n    } else {\n        pBufferQueue = (SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback;\n        pDevice->opensl.isDrainingPlayback = MA_TRUE;\n    }\n\n    for (;;) {\n        SLAndroidSimpleBufferQueueState state;\n\n        MA_OPENSL_BUFFERQUEUE(pBufferQueue)->GetState(pBufferQueue, &state);\n        if (state.count == 0) {\n            break;\n        }\n\n        ma_sleep(10);\n    }\n\n    if (pDevice->type == ma_device_type_capture) {\n        pDevice->opensl.isDrainingCapture  = MA_FALSE;\n    } else {\n        pDevice->opensl.isDrainingPlayback = MA_FALSE;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop__opensl(ma_device* pDevice)\n{\n    SLresult resultSL;\n\n    MA_ASSERT(pDevice != NULL);\n\n    MA_ASSERT(g_maOpenSLInitCounter > 0); /* <-- If you trigger this it means you've either not initialized the context, or you've uninitialized it before stopping/uninitializing the device. */\n    if (g_maOpenSLInitCounter == 0) {\n        return MA_INVALID_OPERATION;\n    }\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex) {\n        ma_device_drain__opensl(pDevice, ma_device_type_capture);\n\n        resultSL = MA_OPENSL_RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORDSTATE_STOPPED);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to stop internal capture device.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueueCapture)->Clear((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueueCapture);\n    }\n\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ma_device_drain__opensl(pDevice, ma_device_type_playback);\n\n        resultSL = MA_OPENSL_PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAYSTATE_STOPPED);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, \"[OpenSL] Failed to stop internal playback device.\");\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        MA_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueuePlayback)->Clear((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueuePlayback);\n    }\n\n    /* Make sure the client is aware that the device has stopped. There may be an OpenSL|ES callback for this, but I haven't found it. */\n    ma_device__on_notification_stopped(pDevice);\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_context_uninit__opensl(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_opensl);\n    (void)pContext;\n\n    /* Uninit global data. */\n    ma_spinlock_lock(&g_maOpenSLSpinlock);\n    {\n        MA_ASSERT(g_maOpenSLInitCounter > 0);   /* If you've triggered this, it means you have ma_context_init/uninit mismatch. Each successful call to ma_context_init() must be matched up with a call to ma_context_uninit(). */\n\n        g_maOpenSLInitCounter -= 1;\n        if (g_maOpenSLInitCounter == 0) {\n            (*g_maEngineObjectSL)->Destroy(g_maEngineObjectSL);\n        }\n    }\n    ma_spinlock_unlock(&g_maOpenSLSpinlock);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_dlsym_SLInterfaceID__opensl(ma_context* pContext, const char* pName, ma_handle* pHandle)\n{\n    /* We need to return an error if the symbol cannot be found. This is important because there have been reports that some symbols do not exist. */\n    ma_handle* p = (ma_handle*)ma_dlsym(ma_context_get_log(pContext), pContext->opensl.libOpenSLES, pName);\n    if (p == NULL) {\n        ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_INFO, \"[OpenSL] Cannot find symbol %s\", pName);\n        return MA_NO_BACKEND;\n    }\n\n    *pHandle = *p;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init_engine_nolock__opensl(ma_context* pContext)\n{\n    g_maOpenSLInitCounter += 1;\n    if (g_maOpenSLInitCounter == 1) {\n        SLresult resultSL;\n\n        resultSL = ((ma_slCreateEngine_proc)pContext->opensl.slCreateEngine)(&g_maEngineObjectSL, 0, NULL, 0, NULL, NULL);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            g_maOpenSLInitCounter -= 1;\n            return ma_result_from_OpenSL(resultSL);\n        }\n\n        (*g_maEngineObjectSL)->Realize(g_maEngineObjectSL, SL_BOOLEAN_FALSE);\n\n        resultSL = (*g_maEngineObjectSL)->GetInterface(g_maEngineObjectSL, (SLInterfaceID)pContext->opensl.SL_IID_ENGINE, &g_maEngineSL);\n        if (resultSL != SL_RESULT_SUCCESS) {\n            (*g_maEngineObjectSL)->Destroy(g_maEngineObjectSL);\n            g_maOpenSLInitCounter -= 1;\n            return ma_result_from_OpenSL(resultSL);\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init__opensl(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n    ma_result result;\n\n#if !defined(MA_NO_RUNTIME_LINKING)\n    size_t i;\n    const char* libOpenSLESNames[] = {\n        \"libOpenSLES.so\"\n    };\n#endif\n\n    MA_ASSERT(pContext != NULL);\n\n    (void)pConfig;\n\n#if !defined(MA_NO_RUNTIME_LINKING)\n    /*\n    Dynamically link against libOpenSLES.so. I have now had multiple reports that SL_IID_ANDROIDSIMPLEBUFFERQUEUE cannot be found. One\n    report was happening at compile time and another at runtime. To try working around this, I'm going to link to libOpenSLES at runtime\n    and extract the symbols rather than reference them directly. This should, hopefully, fix these issues as the compiler won't see any\n    references to the symbols and will hopefully skip the checks.\n    */\n    for (i = 0; i < ma_countof(libOpenSLESNames); i += 1) {\n        pContext->opensl.libOpenSLES = ma_dlopen(ma_context_get_log(pContext), libOpenSLESNames[i]);\n        if (pContext->opensl.libOpenSLES != NULL) {\n            break;\n        }\n    }\n\n    if (pContext->opensl.libOpenSLES == NULL) {\n        ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_INFO, \"[OpenSL] Could not find libOpenSLES.so\");\n        return MA_NO_BACKEND;\n    }\n\n    result = ma_dlsym_SLInterfaceID__opensl(pContext, \"SL_IID_ENGINE\", &pContext->opensl.SL_IID_ENGINE);\n    if (result != MA_SUCCESS) {\n        ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES);\n        return result;\n    }\n\n    result = ma_dlsym_SLInterfaceID__opensl(pContext, \"SL_IID_AUDIOIODEVICECAPABILITIES\", &pContext->opensl.SL_IID_AUDIOIODEVICECAPABILITIES);\n    if (result != MA_SUCCESS) {\n        ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES);\n        return result;\n    }\n\n    result = ma_dlsym_SLInterfaceID__opensl(pContext, \"SL_IID_ANDROIDSIMPLEBUFFERQUEUE\", &pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE);\n    if (result != MA_SUCCESS) {\n        ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES);\n        return result;\n    }\n\n    result = ma_dlsym_SLInterfaceID__opensl(pContext, \"SL_IID_RECORD\", &pContext->opensl.SL_IID_RECORD);\n    if (result != MA_SUCCESS) {\n        ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES);\n        return result;\n    }\n\n    result = ma_dlsym_SLInterfaceID__opensl(pContext, \"SL_IID_PLAY\", &pContext->opensl.SL_IID_PLAY);\n    if (result != MA_SUCCESS) {\n        ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES);\n        return result;\n    }\n\n    result = ma_dlsym_SLInterfaceID__opensl(pContext, \"SL_IID_OUTPUTMIX\", &pContext->opensl.SL_IID_OUTPUTMIX);\n    if (result != MA_SUCCESS) {\n        ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES);\n        return result;\n    }\n\n    result = ma_dlsym_SLInterfaceID__opensl(pContext, \"SL_IID_ANDROIDCONFIGURATION\", &pContext->opensl.SL_IID_ANDROIDCONFIGURATION);\n    if (result != MA_SUCCESS) {\n        ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES);\n        return result;\n    }\n\n    pContext->opensl.slCreateEngine = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->opensl.libOpenSLES, \"slCreateEngine\");\n    if (pContext->opensl.slCreateEngine == NULL) {\n        ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES);\n        ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_INFO, \"[OpenSL] Cannot find symbol slCreateEngine.\");\n        return MA_NO_BACKEND;\n    }\n#else\n    pContext->opensl.SL_IID_ENGINE                    = (ma_handle)SL_IID_ENGINE;\n    pContext->opensl.SL_IID_AUDIOIODEVICECAPABILITIES = (ma_handle)SL_IID_AUDIOIODEVICECAPABILITIES;\n    pContext->opensl.SL_IID_ANDROIDSIMPLEBUFFERQUEUE  = (ma_handle)SL_IID_ANDROIDSIMPLEBUFFERQUEUE;\n    pContext->opensl.SL_IID_RECORD                    = (ma_handle)SL_IID_RECORD;\n    pContext->opensl.SL_IID_PLAY                      = (ma_handle)SL_IID_PLAY;\n    pContext->opensl.SL_IID_OUTPUTMIX                 = (ma_handle)SL_IID_OUTPUTMIX;\n    pContext->opensl.SL_IID_ANDROIDCONFIGURATION      = (ma_handle)SL_IID_ANDROIDCONFIGURATION;\n    pContext->opensl.slCreateEngine                   = (ma_proc)slCreateEngine;\n#endif\n\n\n    /* Initialize global data first if applicable. */\n    ma_spinlock_lock(&g_maOpenSLSpinlock);\n    {\n        result = ma_context_init_engine_nolock__opensl(pContext);\n    }\n    ma_spinlock_unlock(&g_maOpenSLSpinlock);\n\n    if (result != MA_SUCCESS) {\n        ma_dlclose(ma_context_get_log(pContext), pContext->opensl.libOpenSLES);\n        ma_log_post(ma_context_get_log(pContext), MA_LOG_LEVEL_INFO, \"[OpenSL] Failed to initialize OpenSL engine.\");\n        return result;\n    }\n\n    pCallbacks->onContextInit             = ma_context_init__opensl;\n    pCallbacks->onContextUninit           = ma_context_uninit__opensl;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__opensl;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__opensl;\n    pCallbacks->onDeviceInit              = ma_device_init__opensl;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__opensl;\n    pCallbacks->onDeviceStart             = ma_device_start__opensl;\n    pCallbacks->onDeviceStop              = ma_device_stop__opensl;\n    pCallbacks->onDeviceRead              = NULL;   /* Not needed because OpenSL|ES is asynchronous. */\n    pCallbacks->onDeviceWrite             = NULL;   /* Not needed because OpenSL|ES is asynchronous. */\n    pCallbacks->onDeviceDataLoop          = NULL;   /* Not needed because OpenSL|ES is asynchronous. */\n\n    return MA_SUCCESS;\n}\n#endif  /* OpenSL|ES */\n\n\n/******************************************************************************\n\nWeb Audio Backend\n\n******************************************************************************/\n#ifdef MA_HAS_WEBAUDIO\n#include <emscripten/emscripten.h>\n\n#if (__EMSCRIPTEN_major__ > 3) || (__EMSCRIPTEN_major__ == 3 && (__EMSCRIPTEN_minor__ > 1 || (__EMSCRIPTEN_minor__ == 1 && __EMSCRIPTEN_tiny__ >= 32)))\n    #include <emscripten/webaudio.h>\n    #define MA_SUPPORT_AUDIO_WORKLETS\n#endif\n\n/*\nTODO: Version 0.12: Swap this logic around so that AudioWorklets are used by default. Add MA_NO_AUDIO_WORKLETS.\n*/\n#if defined(MA_ENABLE_AUDIO_WORKLETS) && defined(MA_SUPPORT_AUDIO_WORKLETS)\n    #define MA_USE_AUDIO_WORKLETS\n#endif\n\n/* The thread stack size must be a multiple of 16. */\n#ifndef MA_AUDIO_WORKLETS_THREAD_STACK_SIZE\n#define MA_AUDIO_WORKLETS_THREAD_STACK_SIZE 16384\n#endif\n\n#if defined(MA_USE_AUDIO_WORKLETS)\n#define MA_WEBAUDIO_LATENCY_HINT_BALANCED       \"balanced\"\n#define MA_WEBAUDIO_LATENCY_HINT_INTERACTIVE    \"interactive\"\n#define MA_WEBAUDIO_LATENCY_HINT_PLAYBACK       \"playback\"\n#endif\n\nstatic ma_bool32 ma_is_capture_supported__webaudio()\n{\n    return EM_ASM_INT({\n        return (navigator.mediaDevices !== undefined && navigator.mediaDevices.getUserMedia !== undefined);\n    }, 0) != 0; /* Must pass in a dummy argument for C99 compatibility. */\n}\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nvoid* EMSCRIPTEN_KEEPALIVE ma_malloc_emscripten(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_malloc(sz, pAllocationCallbacks);\n}\n\nvoid EMSCRIPTEN_KEEPALIVE ma_free_emscripten(void* p, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_free(p, pAllocationCallbacks);\n}\n\nvoid EMSCRIPTEN_KEEPALIVE ma_device_process_pcm_frames_capture__webaudio(ma_device* pDevice, int frameCount, float* pFrames)\n{\n    ma_device_handle_backend_data_callback(pDevice, NULL, pFrames, (ma_uint32)frameCount);\n}\n\nvoid EMSCRIPTEN_KEEPALIVE ma_device_process_pcm_frames_playback__webaudio(ma_device* pDevice, int frameCount, float* pFrames)\n{\n    ma_device_handle_backend_data_callback(pDevice, pFrames, NULL, (ma_uint32)frameCount);\n}\n#ifdef __cplusplus\n}\n#endif\n\nstatic ma_result ma_context_enumerate_devices__webaudio(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    ma_bool32 cbResult = MA_TRUE;\n\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(callback != NULL);\n\n    /* Only supporting default devices for now. */\n\n    /* Playback. */\n    if (cbResult) {\n        ma_device_info deviceInfo;\n        MA_ZERO_OBJECT(&deviceInfo);\n        ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n        deviceInfo.isDefault = MA_TRUE;    /* Only supporting default devices. */\n        cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pUserData);\n    }\n\n    /* Capture. */\n    if (cbResult) {\n        if (ma_is_capture_supported__webaudio()) {\n            ma_device_info deviceInfo;\n            MA_ZERO_OBJECT(&deviceInfo);\n            ma_strncpy_s(deviceInfo.name, sizeof(deviceInfo.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n            deviceInfo.isDefault = MA_TRUE;    /* Only supporting default devices. */\n            cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pUserData);\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_get_device_info__webaudio(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    MA_ASSERT(pContext != NULL);\n\n    if (deviceType == ma_device_type_capture && !ma_is_capture_supported__webaudio()) {\n        return MA_NO_DEVICE;\n    }\n\n    MA_ZERO_MEMORY(pDeviceInfo->id.webaudio, sizeof(pDeviceInfo->id.webaudio));\n\n    /* Only supporting default devices for now. */\n    (void)pDeviceID;\n    if (deviceType == ma_device_type_playback) {\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n    } else {\n        ma_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n    }\n\n    /* Only supporting default devices. */\n    pDeviceInfo->isDefault = MA_TRUE;\n\n    /* Web Audio can support any number of channels and sample rates. It only supports f32 formats, however. */\n    pDeviceInfo->nativeDataFormats[0].flags      = 0;\n    pDeviceInfo->nativeDataFormats[0].format     = ma_format_unknown;\n    pDeviceInfo->nativeDataFormats[0].channels   = 0; /* All channels are supported. */\n    pDeviceInfo->nativeDataFormats[0].sampleRate = EM_ASM_INT({\n        try {\n            var temp = new (window.AudioContext || window.webkitAudioContext)();\n            var sampleRate = temp.sampleRate;\n            temp.close();\n            return sampleRate;\n        } catch(e) {\n            return 0;\n        }\n    }, 0);  /* Must pass in a dummy argument for C99 compatibility. */\n\n    if (pDeviceInfo->nativeDataFormats[0].sampleRate == 0) {\n        return MA_NO_DEVICE;\n    }\n\n    pDeviceInfo->nativeDataFormatCount = 1;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_uninit__webaudio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    #if defined(MA_USE_AUDIO_WORKLETS)\n    {\n        EM_ASM({\n            var device = miniaudio.get_device_by_index($0);\n\n            if (device.streamNode !== undefined) {\n                device.streamNode.disconnect();\n                device.streamNode = undefined;\n            }\n        }, pDevice->webaudio.deviceIndex);\n\n        emscripten_destroy_web_audio_node(pDevice->webaudio.audioWorklet);\n        emscripten_destroy_audio_context(pDevice->webaudio.audioContext);\n        ma_free(pDevice->webaudio.pStackBuffer, &pDevice->pContext->allocationCallbacks);\n    }\n    #else\n    {\n        EM_ASM({\n            var device = miniaudio.get_device_by_index($0);\n\n            /* Make sure all nodes are disconnected and marked for collection. */\n            if (device.scriptNode !== undefined) {\n                device.scriptNode.onaudioprocess = function(e) {};  /* We want to reset the callback to ensure it doesn't get called after AudioContext.close() has returned. Shouldn't happen since we're disconnecting, but just to be safe... */\n                device.scriptNode.disconnect();\n                device.scriptNode = undefined;\n            }\n\n            if (device.streamNode !== undefined) {\n                device.streamNode.disconnect();\n                device.streamNode = undefined;\n            }\n\n            /*\n            Stop the device. I think there is a chance the callback could get fired after calling this, hence why we want\n            to clear the callback before closing.\n            */\n            device.webaudio.close();\n            device.webaudio = undefined;\n            device.pDevice = undefined;\n        }, pDevice->webaudio.deviceIndex);\n    }\n    #endif\n\n    /* Clean up the device on the JS side. */\n    EM_ASM({\n        miniaudio.untrack_device_by_index($0);\n    }, pDevice->webaudio.deviceIndex);\n\n    ma_free(pDevice->webaudio.pIntermediaryBuffer, &pDevice->pContext->allocationCallbacks);\n\n    return MA_SUCCESS;\n}\n\n#if !defined(MA_USE_AUDIO_WORKLETS)\nstatic ma_uint32 ma_calculate_period_size_in_frames_from_descriptor__webaudio(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile)\n{\n    /*\n    There have been reports of the default buffer size being too small on some browsers. If we're using\n    the default buffer size, we'll make sure the period size is bigger than our standard defaults.\n    */\n    ma_uint32 periodSizeInFrames;\n\n    if (nativeSampleRate == 0) {\n        nativeSampleRate = MA_DEFAULT_SAMPLE_RATE;\n    }\n\n    if (pDescriptor->periodSizeInFrames == 0) {\n        if (pDescriptor->periodSizeInMilliseconds == 0) {\n            if (performanceProfile == ma_performance_profile_low_latency) {\n                periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(33, nativeSampleRate);  /* 1 frame @ 30 FPS */\n            } else {\n                periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(333, nativeSampleRate);\n            }\n        } else {\n            periodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptor->periodSizeInMilliseconds, nativeSampleRate);\n        }\n    } else {\n        periodSizeInFrames = pDescriptor->periodSizeInFrames;\n    }\n\n    /* The size of the buffer must be a power of 2 and between 256 and 16384. */\n    if (periodSizeInFrames < 256) {\n        periodSizeInFrames = 256;\n    } else if (periodSizeInFrames > 16384) {\n        periodSizeInFrames = 16384;\n    } else {\n        periodSizeInFrames = ma_next_power_of_2(periodSizeInFrames);\n    }\n\n    return periodSizeInFrames;\n}\n#endif\n\n\n#if defined(MA_USE_AUDIO_WORKLETS)\ntypedef struct\n{\n    ma_device* pDevice;\n    const ma_device_config* pConfig;\n    ma_device_descriptor* pDescriptorPlayback;\n    ma_device_descriptor* pDescriptorCapture;\n} ma_audio_worklet_thread_initialized_data;\n\nstatic EM_BOOL ma_audio_worklet_process_callback__webaudio(int inputCount, const AudioSampleFrame* pInputs, int outputCount, AudioSampleFrame* pOutputs, int paramCount, const AudioParamFrame* pParams, void* pUserData)\n{\n    ma_device* pDevice = (ma_device*)pUserData;\n    ma_uint32 frameCount;\n\n    (void)paramCount;\n    (void)pParams;\n\n    if (ma_device_get_state(pDevice) != ma_device_state_started) {\n        return EM_TRUE;\n    }\n\n    /*\n    The Emscripten documentation says that it'll always be 128 frames being passed in. Hard coding it like that feels\n    like a very bad idea to me. Even if it's hard coded in the backend, the API and documentation should always refer\n    to variables instead of a hard coded number. In any case, will follow along for the time being.\n\n    Unfortunately the audio data is not interleaved so we'll need to convert it before we give the data to miniaudio\n    for further processing.\n    */\n    frameCount = 128;\n\n    if (inputCount > 0) {\n        /* Input data needs to be interleaved before we hand it to the client. */\n        for (ma_uint32 iChannel = 0; iChannel < pDevice->capture.internalChannels; iChannel += 1) {\n            for (ma_uint32 iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                pDevice->webaudio.pIntermediaryBuffer[iFrame*pDevice->capture.internalChannels + iChannel] = pInputs[0].data[frameCount*iChannel + iFrame];\n            }\n        }\n\n        ma_device_process_pcm_frames_capture__webaudio(pDevice, frameCount, pDevice->webaudio.pIntermediaryBuffer);\n    }\n\n    if (outputCount > 0) {\n        /* If it's a capture-only device, we'll need to output silence. */\n        if (pDevice->type == ma_device_type_capture) {\n            MA_ZERO_MEMORY(pOutputs[0].data, frameCount * pDevice->playback.internalChannels * sizeof(float));\n        } else {\n            ma_device_process_pcm_frames_playback__webaudio(pDevice, frameCount, pDevice->webaudio.pIntermediaryBuffer);\n\n            /* We've read the data from the client. Now we need to deinterleave the buffer and output to the output buffer. */\n            for (ma_uint32 iChannel = 0; iChannel < pDevice->playback.internalChannels; iChannel += 1) {\n                for (ma_uint32 iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                    pOutputs[0].data[frameCount*iChannel + iFrame] = pDevice->webaudio.pIntermediaryBuffer[iFrame*pDevice->playback.internalChannels + iChannel];\n                }\n            }\n        }\n    }\n\n    return EM_TRUE;\n}\n\n\nstatic void ma_audio_worklet_processor_created__webaudio(EMSCRIPTEN_WEBAUDIO_T audioContext, EM_BOOL success, void* pUserData)\n{\n    ma_audio_worklet_thread_initialized_data* pParameters = (ma_audio_worklet_thread_initialized_data*)pUserData;\n    EmscriptenAudioWorkletNodeCreateOptions audioWorkletOptions;\n    int channels = 0;\n    size_t intermediaryBufferSizeInFrames;\n    int sampleRate;\n\n    if (success == EM_FALSE) {\n        pParameters->pDevice->webaudio.initResult = MA_ERROR;\n        ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks);\n        return;\n    }\n\n    /* The next step is to initialize the audio worklet node. */\n    MA_ZERO_OBJECT(&audioWorkletOptions);\n\n    /*\n    The way channel counts work with Web Audio is confusing. As far as I can tell, there's no way to know the channel\n    count from MediaStreamAudioSourceNode (what we use for capture)? The only way to have control is to configure an\n    output channel count on the capture side. This is slightly confusing for capture mode because intuitively you\n    wouldn't actually connect an output to an input-only node, but this is what we'll have to do in order to have\n    proper control over the channel count. In the capture case, we'll have to output silence to it's output node.\n    */\n    if (pParameters->pConfig->deviceType == ma_device_type_capture) {\n        channels = (int)((pParameters->pDescriptorCapture->channels > 0) ? pParameters->pDescriptorCapture->channels : MA_DEFAULT_CHANNELS);\n        audioWorkletOptions.numberOfInputs = 1;\n    } else {\n        channels = (int)((pParameters->pDescriptorPlayback->channels > 0) ? pParameters->pDescriptorPlayback->channels : MA_DEFAULT_CHANNELS);\n\n        if (pParameters->pConfig->deviceType == ma_device_type_duplex) {\n            audioWorkletOptions.numberOfInputs = 1;\n        } else {\n            audioWorkletOptions.numberOfInputs = 0;\n        }\n    }\n\n    audioWorkletOptions.numberOfOutputs = 1;\n    audioWorkletOptions.outputChannelCounts = &channels;\n\n\n    /*\n    Now that we know the channel count to use we can allocate the intermediary buffer. The\n    intermediary buffer is used for interleaving and deinterleaving.\n    */\n    intermediaryBufferSizeInFrames = 128;\n\n    pParameters->pDevice->webaudio.pIntermediaryBuffer = (float*)ma_malloc(intermediaryBufferSizeInFrames * (ma_uint32)channels * sizeof(float), &pParameters->pDevice->pContext->allocationCallbacks);\n    if (pParameters->pDevice->webaudio.pIntermediaryBuffer == NULL) {\n        pParameters->pDevice->webaudio.initResult = MA_OUT_OF_MEMORY;\n        ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks);\n        return;\n    }\n\n\n    pParameters->pDevice->webaudio.audioWorklet = emscripten_create_wasm_audio_worklet_node(audioContext, \"miniaudio\", &audioWorkletOptions, &ma_audio_worklet_process_callback__webaudio, pParameters->pDevice);\n\n    /* With the audio worklet initialized we can now attach it to the graph. */\n    if (pParameters->pConfig->deviceType == ma_device_type_capture || pParameters->pConfig->deviceType == ma_device_type_duplex) {\n        ma_result attachmentResult = (ma_result)EM_ASM_INT({\n            var getUserMediaResult = 0;\n            var audioWorklet = emscriptenGetAudioObject($0);\n            var audioContext = emscriptenGetAudioObject($1);\n\n            navigator.mediaDevices.getUserMedia({audio:true, video:false})\n                .then(function(stream) {\n                    audioContext.streamNode = audioContext.createMediaStreamSource(stream);\n                    audioContext.streamNode.connect(audioWorklet);\n                    audioWorklet.connect(audioContext.destination);\n                    getUserMediaResult = 0;   /* 0 = MA_SUCCESS */\n                })\n                .catch(function(error) {\n                    console.log(\"navigator.mediaDevices.getUserMedia Failed: \" + error);\n                    getUserMediaResult = -1;  /* -1 = MA_ERROR */\n                });\n\n            return getUserMediaResult;\n        }, pParameters->pDevice->webaudio.audioWorklet, audioContext);\n\n        if (attachmentResult != MA_SUCCESS) {\n            ma_log_postf(ma_device_get_log(pParameters->pDevice), MA_LOG_LEVEL_ERROR, \"Web Audio: Failed to connect capture node.\");\n            emscripten_destroy_web_audio_node(pParameters->pDevice->webaudio.audioWorklet);\n            pParameters->pDevice->webaudio.initResult = attachmentResult;\n            ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks);\n            return;\n        }\n    }\n\n    /* If it's playback only we can now attach the worklet node to the graph. This has already been done for the duplex case. */\n    if (pParameters->pConfig->deviceType == ma_device_type_playback) {\n        ma_result attachmentResult = (ma_result)EM_ASM_INT({\n            var audioWorklet = emscriptenGetAudioObject($0);\n            var audioContext = emscriptenGetAudioObject($1);\n            audioWorklet.connect(audioContext.destination);\n            return 0;   /* 0 = MA_SUCCESS */\n        }, pParameters->pDevice->webaudio.audioWorklet, audioContext);\n\n        if (attachmentResult != MA_SUCCESS) {\n            ma_log_postf(ma_device_get_log(pParameters->pDevice), MA_LOG_LEVEL_ERROR, \"Web Audio: Failed to connect playback node.\");\n            pParameters->pDevice->webaudio.initResult = attachmentResult;\n            ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks);\n            return;\n        }\n    }\n\n    /* We need to update the descriptors so that they reflect the internal data format. Both capture and playback should be the same. */\n    sampleRate = EM_ASM_INT({ return emscriptenGetAudioObject($0).sampleRate; }, audioContext);\n\n    if (pParameters->pDescriptorCapture != NULL) {\n        pParameters->pDescriptorCapture->format              = ma_format_f32;\n        pParameters->pDescriptorCapture->channels            = (ma_uint32)channels;\n        pParameters->pDescriptorCapture->sampleRate          = (ma_uint32)sampleRate;\n        ma_channel_map_init_standard(ma_standard_channel_map_webaudio, pParameters->pDescriptorCapture->channelMap, ma_countof(pParameters->pDescriptorCapture->channelMap), pParameters->pDescriptorCapture->channels);\n        pParameters->pDescriptorCapture->periodSizeInFrames  = intermediaryBufferSizeInFrames;\n        pParameters->pDescriptorCapture->periodCount         = 1;\n    }\n\n    if (pParameters->pDescriptorPlayback != NULL) {\n        pParameters->pDescriptorPlayback->format             = ma_format_f32;\n        pParameters->pDescriptorPlayback->channels           = (ma_uint32)channels;\n        pParameters->pDescriptorPlayback->sampleRate         = (ma_uint32)sampleRate;\n        ma_channel_map_init_standard(ma_standard_channel_map_webaudio, pParameters->pDescriptorPlayback->channelMap, ma_countof(pParameters->pDescriptorPlayback->channelMap), pParameters->pDescriptorPlayback->channels);\n        pParameters->pDescriptorPlayback->periodSizeInFrames = intermediaryBufferSizeInFrames;\n        pParameters->pDescriptorPlayback->periodCount        = 1;\n    }\n\n    /* At this point we're done and we can return. */\n    ma_log_postf(ma_device_get_log(pParameters->pDevice), MA_LOG_LEVEL_DEBUG, \"AudioWorklets: Created worklet node: %d\\n\", pParameters->pDevice->webaudio.audioWorklet);\n    pParameters->pDevice->webaudio.initResult = MA_SUCCESS;\n    ma_free(pParameters, &pParameters->pDevice->pContext->allocationCallbacks);\n}\n\nstatic void ma_audio_worklet_thread_initialized__webaudio(EMSCRIPTEN_WEBAUDIO_T audioContext, EM_BOOL success, void* pUserData)\n{\n    ma_audio_worklet_thread_initialized_data* pParameters = (ma_audio_worklet_thread_initialized_data*)pUserData;\n    WebAudioWorkletProcessorCreateOptions workletProcessorOptions;\n\n    MA_ASSERT(pParameters != NULL);\n\n    if (success == EM_FALSE) {\n        pParameters->pDevice->webaudio.initResult = MA_ERROR;\n        return;\n    }\n\n    MA_ZERO_OBJECT(&workletProcessorOptions);\n    workletProcessorOptions.name = \"miniaudio\"; /* I'm not entirely sure what to call this. Does this need to be globally unique, or does it need only be unique for a given AudioContext? */\n\n    emscripten_create_wasm_audio_worklet_processor_async(audioContext, &workletProcessorOptions, ma_audio_worklet_processor_created__webaudio, pParameters);\n}\n#endif\n\nstatic ma_result ma_device_init__webaudio(ma_device* pDevice, const ma_device_config* pConfig, ma_device_descriptor* pDescriptorPlayback, ma_device_descriptor* pDescriptorCapture)\n{\n    if (pConfig->deviceType == ma_device_type_loopback) {\n        return MA_DEVICE_TYPE_NOT_SUPPORTED;\n    }\n\n    /* No exclusive mode with Web Audio. */\n    if (((pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) && pDescriptorPlayback->shareMode == ma_share_mode_exclusive) ||\n        ((pConfig->deviceType == ma_device_type_capture  || pConfig->deviceType == ma_device_type_duplex) && pDescriptorCapture->shareMode  == ma_share_mode_exclusive)) {\n        return MA_SHARE_MODE_NOT_SUPPORTED;\n    }\n\n    /*\n    With AudioWorklets we'll have just a single AudioContext. I'm not sure why I'm not doing this for ScriptProcessorNode so\n    it might be worthwhile to look into that as well.\n    */\n    #if defined(MA_USE_AUDIO_WORKLETS)\n    {\n        EmscriptenWebAudioCreateAttributes audioContextAttributes;\n        ma_audio_worklet_thread_initialized_data* pInitParameters;\n        void* pStackBuffer;\n\n        if (pConfig->performanceProfile == ma_performance_profile_conservative) {\n            audioContextAttributes.latencyHint = MA_WEBAUDIO_LATENCY_HINT_PLAYBACK;\n        } else {\n            audioContextAttributes.latencyHint = MA_WEBAUDIO_LATENCY_HINT_INTERACTIVE;\n        }\n\n        /*\n        In my testing, Firefox does not seem to capture audio data properly if the sample rate is set\n        to anything other than 48K. This does not seem to be the case for other browsers. For this reason,\n        if the device type is anything other than playback, we'll leave the sample rate as-is and let the\n        browser pick the appropriate rate for us.\n        */\n        if (pConfig->deviceType == ma_device_type_playback) {\n            audioContextAttributes.sampleRate = pDescriptorPlayback->sampleRate;\n        } else {\n            audioContextAttributes.sampleRate = 0;\n        }\n\n        /* It's not clear if this can return an error. None of the tests in the Emscripten repository check for this, so neither am I for now. */\n        pDevice->webaudio.audioContext = emscripten_create_audio_context(&audioContextAttributes);\n\n\n        /*\n        With the context created we can now create the worklet. We can only have a single worklet per audio\n        context which means we'll need to craft this appropriately to handle duplex devices correctly.\n        */\n\n        /*\n        We now need to create a worker thread. This is a bit weird because we need to allocate our\n        own buffer for the thread's stack. The stack needs to be aligned to 16 bytes. I'm going to\n        allocate this on the heap to keep it simple.\n        */\n        pStackBuffer = ma_aligned_malloc(MA_AUDIO_WORKLETS_THREAD_STACK_SIZE, 16, &pDevice->pContext->allocationCallbacks);\n        if (pStackBuffer == NULL) {\n            emscripten_destroy_audio_context(pDevice->webaudio.audioContext);\n            return MA_OUT_OF_MEMORY;\n        }\n\n        /* Our thread initialization parameters need to be allocated on the heap so they don't go out of scope. */\n        pInitParameters = (ma_audio_worklet_thread_initialized_data*)ma_malloc(sizeof(*pInitParameters), &pDevice->pContext->allocationCallbacks);\n        if (pInitParameters == NULL) {\n            ma_free(pStackBuffer, &pDevice->pContext->allocationCallbacks);\n            emscripten_destroy_audio_context(pDevice->webaudio.audioContext);\n            return MA_OUT_OF_MEMORY;\n        }\n\n        pInitParameters->pDevice = pDevice;\n        pInitParameters->pConfig = pConfig;\n        pInitParameters->pDescriptorPlayback = pDescriptorPlayback;\n        pInitParameters->pDescriptorCapture  = pDescriptorCapture;\n\n        /*\n        We need to flag the device as not yet initialized so we can wait on it later. Unfortunately all of\n        the Emscripten WebAudio stuff is asynchronous.\n        */\n        pDevice->webaudio.initResult = MA_BUSY;\n        {\n            emscripten_start_wasm_audio_worklet_thread_async(pDevice->webaudio.audioContext, pStackBuffer, MA_AUDIO_WORKLETS_THREAD_STACK_SIZE, ma_audio_worklet_thread_initialized__webaudio, pInitParameters);\n        }\n        while (pDevice->webaudio.initResult == MA_BUSY) {  emscripten_sleep(1); }    /* We must wait for initialization to complete. We're just spinning here. The emscripten_sleep() call is why we need to build with `-sASYNCIFY`. */\n\n        /* Initialization is now complete. Descriptors were updated when the worklet was initialized. */\n        if (pDevice->webaudio.initResult != MA_SUCCESS) {\n            ma_free(pStackBuffer, &pDevice->pContext->allocationCallbacks);\n            emscripten_destroy_audio_context(pDevice->webaudio.audioContext);\n            return pDevice->webaudio.initResult;\n        }\n\n        /* We need to add an entry to the miniaudio.devices list on the JS side so we can do some JS/C interop. */\n        pDevice->webaudio.deviceIndex = EM_ASM_INT({\n            return miniaudio.track_device({\n                webaudio: emscriptenGetAudioObject($0),\n                state:    1 /* 1 = ma_device_state_stopped */\n            });\n        }, pDevice->webaudio.audioContext);\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* ScriptProcessorNode. This path requires us to do almost everything in JS, but we'll do as much as we can in C. */\n        ma_uint32 deviceIndex;\n        ma_uint32 channels;\n        ma_uint32 sampleRate;\n        ma_uint32 periodSizeInFrames;\n\n        /* The channel count will depend on the device type. If it's a capture, use it's, otherwise use the playback side. */\n        if (pConfig->deviceType == ma_device_type_capture) {\n            channels = (pDescriptorCapture->channels  > 0) ? pDescriptorCapture->channels  : MA_DEFAULT_CHANNELS;\n        } else {\n            channels = (pDescriptorPlayback->channels > 0) ? pDescriptorPlayback->channels : MA_DEFAULT_CHANNELS;\n        }\n\n        /*\n        When testing in Firefox, I've seen it where capture mode fails if the sample rate is changed to anything other than it's\n        native rate. For this reason we're leaving the sample rate untouched for capture devices.\n        */\n        if (pConfig->deviceType == ma_device_type_playback) {\n            sampleRate = pDescriptorPlayback->sampleRate;\n        } else {\n            sampleRate = 0; /* Let the browser decide when capturing. */\n        }\n\n        /* The period size needs to be a power of 2. */\n        if (pConfig->deviceType == ma_device_type_capture) {\n            periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__webaudio(pDescriptorCapture, sampleRate, pConfig->performanceProfile);\n        } else {\n            periodSizeInFrames = ma_calculate_period_size_in_frames_from_descriptor__webaudio(pDescriptorPlayback, sampleRate, pConfig->performanceProfile);\n        }\n\n        /* We need an intermediary buffer for doing interleaving and deinterleaving. */\n        pDevice->webaudio.pIntermediaryBuffer = (float*)ma_malloc(periodSizeInFrames * channels * sizeof(float), &pDevice->pContext->allocationCallbacks);\n        if (pDevice->webaudio.pIntermediaryBuffer == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n\n        deviceIndex = EM_ASM_INT({\n            var deviceType = $0;\n            var channels   = $1;\n            var sampleRate = $2;\n            var bufferSize = $3;\n            var pIntermediaryBuffer = $4;\n            var pDevice    = $5;\n\n            if (typeof(window.miniaudio) === 'undefined') {\n                return -1;  /* Context not initialized. */\n            }\n\n            var device = {};\n\n            /* First thing we need is an AudioContext. */\n            var audioContextOptions = {};\n            if (deviceType == window.miniaudio.device_type.playback && sampleRate != 0) {\n                audioContextOptions.sampleRate = sampleRate;\n            }\n\n            device.webaudio = new (window.AudioContext || window.webkitAudioContext)(audioContextOptions);\n            device.webaudio.suspend();  /* The AudioContext must be created in a suspended state. */\n            device.state = window.miniaudio.device_state.stopped;\n\n            /*\n            We need to create a ScriptProcessorNode. The channel situation is the same as the AudioWorklet path in that we\n            need to specify an output and configure the channel count there.\n            */\n            var channelCountIn  = 0;\n            var channelCountOut = channels;\n            if (deviceType != window.miniaudio.device_type.playback) {\n                channelCountIn  = channels;\n            }\n\n            device.scriptNode = device.webaudio.createScriptProcessor(bufferSize, channelCountIn, channelCountOut);\n\n            /* The node processing callback. */\n            device.scriptNode.onaudioprocess = function(e) {\n                if (device.intermediaryBufferView == null || device.intermediaryBufferView.length == 0) {\n                    device.intermediaryBufferView = new Float32Array(Module.HEAPF32.buffer, pIntermediaryBuffer, bufferSize * channels);\n                }\n\n                /* Do the capture side first. */\n                if (deviceType == miniaudio.device_type.capture || deviceType == miniaudio.device_type.duplex) {\n                    /* The data must be interleaved before being processed miniaudio. */\n                    for (var iChannel = 0; iChannel < channels; iChannel += 1) {\n                        var inputBuffer = e.inputBuffer.getChannelData(iChannel);\n                        var intermediaryBuffer = device.intermediaryBufferView;\n\n                        for (var iFrame = 0; iFrame < bufferSize; iFrame += 1) {\n                            intermediaryBuffer[iFrame*channels + iChannel] = inputBuffer[iFrame];\n                        }\n                    }\n\n                    _ma_device_process_pcm_frames_capture__webaudio(pDevice, bufferSize, pIntermediaryBuffer);\n                }\n\n                if (deviceType == miniaudio.device_type.playback || deviceType == miniaudio.device_type.duplex) {\n                    _ma_device_process_pcm_frames_playback__webaudio(pDevice, bufferSize, pIntermediaryBuffer);\n\n                    for (var iChannel = 0; iChannel < e.outputBuffer.numberOfChannels; ++iChannel) {\n                        var outputBuffer = e.outputBuffer.getChannelData(iChannel);\n                        var intermediaryBuffer = device.intermediaryBufferView;\n\n                        for (var iFrame = 0; iFrame < bufferSize; iFrame += 1) {\n                            outputBuffer[iFrame] = intermediaryBuffer[iFrame*channels + iChannel];\n                        }\n                    }\n                } else {\n                    /* It's a capture-only device. Make sure the output is silenced. */\n                    for (var iChannel = 0; iChannel < e.outputBuffer.numberOfChannels; ++iChannel) {\n                        e.outputBuffer.getChannelData(iChannel).fill(0.0);\n                    }\n                }\n            };\n\n            /* Now we need to connect our node to the graph. */\n            if (deviceType == miniaudio.device_type.capture || deviceType == miniaudio.device_type.duplex) {\n                navigator.mediaDevices.getUserMedia({audio:true, video:false})\n                    .then(function(stream) {\n                        device.streamNode = device.webaudio.createMediaStreamSource(stream);\n                        device.streamNode.connect(device.scriptNode);\n                        device.scriptNode.connect(device.webaudio.destination);\n                    })\n                    .catch(function(error) {\n                        console.log(\"Failed to get user media: \" + error);\n                    });\n            }\n\n            if (deviceType == miniaudio.device_type.playback) {\n                device.scriptNode.connect(device.webaudio.destination);\n            }\n\n            device.pDevice = pDevice;\n\n            return miniaudio.track_device(device);\n        }, pConfig->deviceType, channels, sampleRate, periodSizeInFrames, pDevice->webaudio.pIntermediaryBuffer, pDevice);\n\n        if (deviceIndex < 0) {\n            return MA_FAILED_TO_OPEN_BACKEND_DEVICE;\n        }\n\n        pDevice->webaudio.deviceIndex = deviceIndex;\n\n        /* Grab the sample rate from the audio context directly. */\n        sampleRate = (ma_uint32)EM_ASM_INT({ return miniaudio.get_device_by_index($0).webaudio.sampleRate; }, deviceIndex);\n\n        if (pDescriptorCapture != NULL) {\n            pDescriptorCapture->format              = ma_format_f32;\n            pDescriptorCapture->channels            = channels;\n            pDescriptorCapture->sampleRate          = sampleRate;\n            ma_channel_map_init_standard(ma_standard_channel_map_webaudio, pDescriptorCapture->channelMap, ma_countof(pDescriptorCapture->channelMap), pDescriptorCapture->channels);\n            pDescriptorCapture->periodSizeInFrames  = periodSizeInFrames;\n            pDescriptorCapture->periodCount         = 1;\n        }\n\n        if (pDescriptorPlayback != NULL) {\n            pDescriptorPlayback->format             = ma_format_f32;\n            pDescriptorPlayback->channels           = channels;\n            pDescriptorPlayback->sampleRate         = sampleRate;\n            ma_channel_map_init_standard(ma_standard_channel_map_webaudio, pDescriptorPlayback->channelMap, ma_countof(pDescriptorPlayback->channelMap), pDescriptorPlayback->channels);\n            pDescriptorPlayback->periodSizeInFrames = periodSizeInFrames;\n            pDescriptorPlayback->periodCount        = 1;\n        }\n\n        return MA_SUCCESS;\n    }\n    #endif\n}\n\nstatic ma_result ma_device_start__webaudio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    EM_ASM({\n        var device = miniaudio.get_device_by_index($0);\n        device.webaudio.resume();\n        device.state = miniaudio.device_state.started;\n    }, pDevice->webaudio.deviceIndex);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_device_stop__webaudio(ma_device* pDevice)\n{\n    MA_ASSERT(pDevice != NULL);\n\n    /*\n    From the WebAudio API documentation for AudioContext.suspend():\n\n        Suspends the progression of AudioContext's currentTime, allows any current context processing blocks that are already processed to be played to the\n        destination, and then allows the system to release its claim on audio hardware.\n\n    I read this to mean that \"any current context processing blocks\" are processed by suspend() - i.e. They they are drained. We therefore shouldn't need to\n    do any kind of explicit draining.\n    */\n    EM_ASM({\n        var device = miniaudio.get_device_by_index($0);\n        device.webaudio.suspend();\n        device.state = miniaudio.device_state.stopped;\n    }, pDevice->webaudio.deviceIndex);\n\n    ma_device__on_notification_stopped(pDevice);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_uninit__webaudio(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n    MA_ASSERT(pContext->backend == ma_backend_webaudio);\n\n    (void)pContext; /* Unused. */\n\n    /* Remove the global miniaudio object from window if there are no more references to it. */\n    EM_ASM({\n        if (typeof(window.miniaudio) !== 'undefined') {\n            window.miniaudio.referenceCount -= 1;\n            if (window.miniaudio.referenceCount === 0) {\n                delete window.miniaudio;\n            }\n        }\n    });\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init__webaudio(ma_context* pContext, const ma_context_config* pConfig, ma_backend_callbacks* pCallbacks)\n{\n    int resultFromJS;\n\n    MA_ASSERT(pContext != NULL);\n\n    (void)pConfig; /* Unused. */\n\n    /* Here is where our global JavaScript object is initialized. */\n    resultFromJS = EM_ASM_INT({\n        if (typeof window === 'undefined' || (window.AudioContext || window.webkitAudioContext) === undefined) {\n            return 0;   /* Web Audio not supported. */\n        }\n\n        if (typeof(window.miniaudio) === 'undefined') {\n            window.miniaudio = {\n                referenceCount: 0\n            };\n\n            /* Device types. */\n            window.miniaudio.device_type = {};\n            window.miniaudio.device_type.playback = $0;\n            window.miniaudio.device_type.capture  = $1;\n            window.miniaudio.device_type.duplex   = $2;\n\n            /* Device states. */\n            window.miniaudio.device_state = {};\n            window.miniaudio.device_state.stopped = $3;\n            window.miniaudio.device_state.started = $4;\n\n            /* Device cache for mapping devices to indexes for JavaScript/C interop. */\n            miniaudio.devices = [];\n\n            miniaudio.track_device = function(device) {\n                /* Try inserting into a free slot first. */\n                for (var iDevice = 0; iDevice < miniaudio.devices.length; ++iDevice) {\n                    if (miniaudio.devices[iDevice] == null) {\n                        miniaudio.devices[iDevice] = device;\n                        return iDevice;\n                    }\n                }\n\n                /* Getting here means there is no empty slots in the array so we just push to the end. */\n                miniaudio.devices.push(device);\n                return miniaudio.devices.length - 1;\n            };\n\n            miniaudio.untrack_device_by_index = function(deviceIndex) {\n                /* We just set the device's slot to null. The slot will get reused in the next call to ma_track_device. */\n                miniaudio.devices[deviceIndex] = null;\n\n                /* Trim the array if possible. */\n                while (miniaudio.devices.length > 0) {\n                    if (miniaudio.devices[miniaudio.devices.length-1] == null) {\n                        miniaudio.devices.pop();\n                    } else {\n                        break;\n                    }\n                }\n            };\n\n            miniaudio.untrack_device = function(device) {\n                for (var iDevice = 0; iDevice < miniaudio.devices.length; ++iDevice) {\n                    if (miniaudio.devices[iDevice] == device) {\n                        return miniaudio.untrack_device_by_index(iDevice);\n                    }\n                }\n            };\n\n            miniaudio.get_device_by_index = function(deviceIndex) {\n                return miniaudio.devices[deviceIndex];\n            };\n\n            miniaudio.unlock_event_types = (function(){\n                return ['touchend', 'click'];\n            })();\n\n            miniaudio.unlock = function() {\n                for(var i = 0; i < miniaudio.devices.length; ++i) {\n                    var device = miniaudio.devices[i];\n                    if (device != null &&\n                        device.webaudio != null &&\n                        device.state === window.miniaudio.device_state.started) {\n\n                        device.webaudio.resume().then(() => {\n                                Module._ma_device__on_notification_unlocked(device.pDevice);\n                            },\n                            (error) => {console.error(\"Failed to resume audiocontext\", error);\n                            });\n                    }\n                }\n                miniaudio.unlock_event_types.map(function(event_type) {\n                    document.removeEventListener(event_type, miniaudio.unlock, true);\n                });\n            };\n\n            miniaudio.unlock_event_types.map(function(event_type) {\n                document.addEventListener(event_type, miniaudio.unlock, true);\n            });\n        }\n\n        window.miniaudio.referenceCount += 1;\n\n        return 1;\n    }, ma_device_type_playback, ma_device_type_capture, ma_device_type_duplex, ma_device_state_stopped, ma_device_state_started);\n\n    if (resultFromJS != 1) {\n        return MA_FAILED_TO_INIT_BACKEND;\n    }\n\n    pCallbacks->onContextInit             = ma_context_init__webaudio;\n    pCallbacks->onContextUninit           = ma_context_uninit__webaudio;\n    pCallbacks->onContextEnumerateDevices = ma_context_enumerate_devices__webaudio;\n    pCallbacks->onContextGetDeviceInfo    = ma_context_get_device_info__webaudio;\n    pCallbacks->onDeviceInit              = ma_device_init__webaudio;\n    pCallbacks->onDeviceUninit            = ma_device_uninit__webaudio;\n    pCallbacks->onDeviceStart             = ma_device_start__webaudio;\n    pCallbacks->onDeviceStop              = ma_device_stop__webaudio;\n    pCallbacks->onDeviceRead              = NULL;   /* Not needed because WebAudio is asynchronous. */\n    pCallbacks->onDeviceWrite             = NULL;   /* Not needed because WebAudio is asynchronous. */\n    pCallbacks->onDeviceDataLoop          = NULL;   /* Not needed because WebAudio is asynchronous. */\n\n    return MA_SUCCESS;\n}\n#endif  /* Web Audio */\n\n\n\nstatic ma_bool32 ma__is_channel_map_valid(const ma_channel* pChannelMap, ma_uint32 channels)\n{\n    /* A blank channel map should be allowed, in which case it should use an appropriate default which will depend on context. */\n    if (pChannelMap != NULL && pChannelMap[0] != MA_CHANNEL_NONE) {\n        ma_uint32 iChannel;\n\n        if (channels == 0 || channels > MA_MAX_CHANNELS) {\n            return MA_FALSE;   /* Channel count out of range. */\n        }\n\n        /* A channel cannot be present in the channel map more than once. */\n        for (iChannel = 0; iChannel < channels; ++iChannel) {\n            ma_uint32 jChannel;\n            for (jChannel = iChannel + 1; jChannel < channels; ++jChannel) {\n                if (pChannelMap[iChannel] == pChannelMap[jChannel]) {\n                    return MA_FALSE;\n                }\n            }\n        }\n    }\n\n    return MA_TRUE;\n}\n\n\nstatic ma_bool32 ma_context_is_backend_asynchronous(ma_context* pContext)\n{\n    MA_ASSERT(pContext != NULL);\n\n    if (pContext->callbacks.onDeviceRead == NULL && pContext->callbacks.onDeviceWrite == NULL) {\n        if (pContext->callbacks.onDeviceDataLoop == NULL) {\n            return MA_TRUE;\n        } else {\n            return MA_FALSE;\n        }\n    } else {\n        return MA_FALSE;\n    }\n}\n\n\nstatic ma_result ma_device__post_init_setup(ma_device* pDevice, ma_device_type deviceType)\n{\n    ma_result result;\n\n    MA_ASSERT(pDevice != NULL);\n\n    if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) {\n        if (pDevice->capture.format == ma_format_unknown) {\n            pDevice->capture.format = pDevice->capture.internalFormat;\n        }\n        if (pDevice->capture.channels == 0) {\n            pDevice->capture.channels = pDevice->capture.internalChannels;\n        }\n        if (pDevice->capture.channelMap[0] == MA_CHANNEL_NONE) {\n            MA_ASSERT(pDevice->capture.channels <= MA_MAX_CHANNELS);\n            if (pDevice->capture.internalChannels == pDevice->capture.channels) {\n                ma_channel_map_copy(pDevice->capture.channelMap, pDevice->capture.internalChannelMap, pDevice->capture.channels);\n            } else {\n                if (pDevice->capture.channelMixMode == ma_channel_mix_mode_simple) {\n                    ma_channel_map_init_blank(pDevice->capture.channelMap, pDevice->capture.channels);\n                } else {\n                    ma_channel_map_init_standard(ma_standard_channel_map_default, pDevice->capture.channelMap, ma_countof(pDevice->capture.channelMap), pDevice->capture.channels);\n                }\n            }\n        }\n    }\n\n    if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) {\n        if (pDevice->playback.format == ma_format_unknown) {\n            pDevice->playback.format = pDevice->playback.internalFormat;\n        }\n        if (pDevice->playback.channels == 0) {\n            pDevice->playback.channels = pDevice->playback.internalChannels;\n        }\n        if (pDevice->playback.channelMap[0] == MA_CHANNEL_NONE) {\n            MA_ASSERT(pDevice->playback.channels <= MA_MAX_CHANNELS);\n            if (pDevice->playback.internalChannels == pDevice->playback.channels) {\n                ma_channel_map_copy(pDevice->playback.channelMap, pDevice->playback.internalChannelMap, pDevice->playback.channels);\n            } else {\n                if (pDevice->playback.channelMixMode == ma_channel_mix_mode_simple) {\n                    ma_channel_map_init_blank(pDevice->playback.channelMap, pDevice->playback.channels);\n                } else {\n                    ma_channel_map_init_standard(ma_standard_channel_map_default, pDevice->playback.channelMap, ma_countof(pDevice->playback.channelMap), pDevice->playback.channels);\n                }\n            }\n        }\n    }\n\n    if (pDevice->sampleRate == 0) {\n        if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) {\n            pDevice->sampleRate = pDevice->capture.internalSampleRate;\n        } else {\n            pDevice->sampleRate = pDevice->playback.internalSampleRate;\n        }\n    }\n\n    /* Data converters. */\n    if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) {\n        /* Converting from internal device format to client format. */\n        ma_data_converter_config converterConfig = ma_data_converter_config_init_default();\n        converterConfig.formatIn                        = pDevice->capture.internalFormat;\n        converterConfig.channelsIn                      = pDevice->capture.internalChannels;\n        converterConfig.sampleRateIn                    = pDevice->capture.internalSampleRate;\n        converterConfig.pChannelMapIn                   = pDevice->capture.internalChannelMap;\n        converterConfig.formatOut                       = pDevice->capture.format;\n        converterConfig.channelsOut                     = pDevice->capture.channels;\n        converterConfig.sampleRateOut                   = pDevice->sampleRate;\n        converterConfig.pChannelMapOut                  = pDevice->capture.channelMap;\n        converterConfig.channelMixMode                  = pDevice->capture.channelMixMode;\n        converterConfig.calculateLFEFromSpatialChannels = pDevice->capture.calculateLFEFromSpatialChannels;\n        converterConfig.allowDynamicSampleRate          = MA_FALSE;\n        converterConfig.resampling.algorithm            = pDevice->resampling.algorithm;\n        converterConfig.resampling.linear.lpfOrder      = pDevice->resampling.linear.lpfOrder;\n        converterConfig.resampling.pBackendVTable       = pDevice->resampling.pBackendVTable;\n        converterConfig.resampling.pBackendUserData     = pDevice->resampling.pBackendUserData;\n\n        /* Make sure the old converter is uninitialized first. */\n        if (ma_device_get_state(pDevice) != ma_device_state_uninitialized) {\n            ma_data_converter_uninit(&pDevice->capture.converter, &pDevice->pContext->allocationCallbacks);\n        }\n\n        result = ma_data_converter_init(&converterConfig, &pDevice->pContext->allocationCallbacks, &pDevice->capture.converter);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) {\n        /* Converting from client format to device format. */\n        ma_data_converter_config converterConfig = ma_data_converter_config_init_default();\n        converterConfig.formatIn                        = pDevice->playback.format;\n        converterConfig.channelsIn                      = pDevice->playback.channels;\n        converterConfig.sampleRateIn                    = pDevice->sampleRate;\n        converterConfig.pChannelMapIn                   = pDevice->playback.channelMap;\n        converterConfig.formatOut                       = pDevice->playback.internalFormat;\n        converterConfig.channelsOut                     = pDevice->playback.internalChannels;\n        converterConfig.sampleRateOut                   = pDevice->playback.internalSampleRate;\n        converterConfig.pChannelMapOut                  = pDevice->playback.internalChannelMap;\n        converterConfig.channelMixMode                  = pDevice->playback.channelMixMode;\n        converterConfig.calculateLFEFromSpatialChannels = pDevice->playback.calculateLFEFromSpatialChannels;\n        converterConfig.allowDynamicSampleRate          = MA_FALSE;\n        converterConfig.resampling.algorithm            = pDevice->resampling.algorithm;\n        converterConfig.resampling.linear.lpfOrder      = pDevice->resampling.linear.lpfOrder;\n        converterConfig.resampling.pBackendVTable       = pDevice->resampling.pBackendVTable;\n        converterConfig.resampling.pBackendUserData     = pDevice->resampling.pBackendUserData;\n\n        /* Make sure the old converter is uninitialized first. */\n        if (ma_device_get_state(pDevice) != ma_device_state_uninitialized) {\n            ma_data_converter_uninit(&pDevice->playback.converter, &pDevice->pContext->allocationCallbacks);\n        }\n\n        result = ma_data_converter_init(&converterConfig, &pDevice->pContext->allocationCallbacks, &pDevice->playback.converter);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n\n    /*\n    If the device is doing playback (ma_device_type_playback or ma_device_type_duplex), there's\n    a couple of situations where we'll need a heap allocated cache.\n\n    The first is a duplex device for backends that use a callback for data delivery. The reason\n    this is needed is that the input stage needs to have a buffer to place the input data while it\n    waits for the playback stage, after which the miniaudio data callback will get fired. This is\n    not needed for backends that use a blocking API because miniaudio manages temporary buffers on\n    the stack to achieve this.\n\n    The other situation is when the data converter does not have the ability to query the number\n    of input frames that are required in order to process a given number of output frames. When\n    performing data conversion, it's useful if miniaudio know exactly how many frames it needs\n    from the client in order to generate a given number of output frames. This way, only exactly\n    the number of frames are needed to be read from the client which means no cache is necessary.\n    On the other hand, if miniaudio doesn't know how many frames to read, it is forced to read\n    in fixed sized chunks and then cache any residual unused input frames, those of which will be\n    processed at a later stage.\n    */\n    if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) {\n        ma_uint64 unused;\n\n        pDevice->playback.inputCacheConsumed  = 0;\n        pDevice->playback.inputCacheRemaining = 0;\n\n        if (pDevice->type == ma_device_type_duplex ||                                                                       /* Duplex. backend may decide to use ma_device_handle_backend_data_callback() which will require this cache. */\n            ma_data_converter_get_required_input_frame_count(&pDevice->playback.converter, 1, &unused) != MA_SUCCESS)       /* Data conversion required input frame calculation not supported. */\n        {\n            /* We need a heap allocated cache. We want to size this based on the period size. */\n            void* pNewInputCache;\n            ma_uint64 newInputCacheCap;\n            ma_uint64 newInputCacheSizeInBytes;\n\n            newInputCacheCap = ma_calculate_frame_count_after_resampling(pDevice->playback.internalSampleRate, pDevice->sampleRate, pDevice->playback.internalPeriodSizeInFrames);\n\n            newInputCacheSizeInBytes = newInputCacheCap * ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels);\n            if (newInputCacheSizeInBytes > MA_SIZE_MAX) {\n                ma_free(pDevice->playback.pInputCache, &pDevice->pContext->allocationCallbacks);\n                pDevice->playback.pInputCache   = NULL;\n                pDevice->playback.inputCacheCap = 0;\n                return MA_OUT_OF_MEMORY;    /* Allocation too big. Should never hit this, but makes the cast below safer for 32-bit builds. */\n            }\n\n            pNewInputCache = ma_realloc(pDevice->playback.pInputCache, (size_t)newInputCacheSizeInBytes, &pDevice->pContext->allocationCallbacks);\n            if (pNewInputCache == NULL) {\n                ma_free(pDevice->playback.pInputCache, &pDevice->pContext->allocationCallbacks);\n                pDevice->playback.pInputCache   = NULL;\n                pDevice->playback.inputCacheCap = 0;\n                return MA_OUT_OF_MEMORY;\n            }\n\n            pDevice->playback.pInputCache   = pNewInputCache;\n            pDevice->playback.inputCacheCap = newInputCacheCap;\n        } else {\n            /* Heap allocation not required. Make sure we clear out the old cache just in case this function was called in response to a route change. */\n            ma_free(pDevice->playback.pInputCache, &pDevice->pContext->allocationCallbacks);\n            pDevice->playback.pInputCache   = NULL;\n            pDevice->playback.inputCacheCap = 0;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_device_post_init(ma_device* pDevice, ma_device_type deviceType, const ma_device_descriptor* pDescriptorPlayback, const ma_device_descriptor* pDescriptorCapture)\n{\n    ma_result result;\n\n    if (pDevice == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Capture. */\n    if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) {\n        if (ma_device_descriptor_is_valid(pDescriptorCapture) == MA_FALSE) {\n            return MA_INVALID_ARGS;\n        }\n\n        pDevice->capture.internalFormat             = pDescriptorCapture->format;\n        pDevice->capture.internalChannels           = pDescriptorCapture->channels;\n        pDevice->capture.internalSampleRate         = pDescriptorCapture->sampleRate;\n        MA_COPY_MEMORY(pDevice->capture.internalChannelMap, pDescriptorCapture->channelMap, sizeof(pDescriptorCapture->channelMap));\n        pDevice->capture.internalPeriodSizeInFrames = pDescriptorCapture->periodSizeInFrames;\n        pDevice->capture.internalPeriods            = pDescriptorCapture->periodCount;\n\n        if (pDevice->capture.internalPeriodSizeInFrames == 0) {\n            pDevice->capture.internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptorCapture->periodSizeInMilliseconds, pDescriptorCapture->sampleRate);\n        }\n    }\n\n    /* Playback. */\n    if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) {\n        if (ma_device_descriptor_is_valid(pDescriptorPlayback) == MA_FALSE) {\n            return MA_INVALID_ARGS;\n        }\n\n        pDevice->playback.internalFormat             = pDescriptorPlayback->format;\n        pDevice->playback.internalChannels           = pDescriptorPlayback->channels;\n        pDevice->playback.internalSampleRate         = pDescriptorPlayback->sampleRate;\n        MA_COPY_MEMORY(pDevice->playback.internalChannelMap, pDescriptorPlayback->channelMap, sizeof(pDescriptorPlayback->channelMap));\n        pDevice->playback.internalPeriodSizeInFrames = pDescriptorPlayback->periodSizeInFrames;\n        pDevice->playback.internalPeriods            = pDescriptorPlayback->periodCount;\n\n        if (pDevice->playback.internalPeriodSizeInFrames == 0) {\n            pDevice->playback.internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptorPlayback->periodSizeInMilliseconds, pDescriptorPlayback->sampleRate);\n        }\n    }\n\n    /*\n    The name of the device can be retrieved from device info. This may be temporary and replaced with a `ma_device_get_info(pDevice, deviceType)` instead.\n    For loopback devices, we need to retrieve the name of the playback device.\n    */\n    {\n        ma_device_info deviceInfo;\n\n        if (deviceType == ma_device_type_capture || deviceType == ma_device_type_duplex || deviceType == ma_device_type_loopback) {\n            result = ma_device_get_info(pDevice, (deviceType == ma_device_type_loopback) ? ma_device_type_playback : ma_device_type_capture, &deviceInfo);\n            if (result == MA_SUCCESS) {\n                ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), deviceInfo.name, (size_t)-1);\n            } else {\n                /* We failed to retrieve the device info. Fall back to a default name. */\n                if (pDescriptorCapture->pDeviceID == NULL) {\n                    ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n                } else {\n                    ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), \"Capture Device\", (size_t)-1);\n                }\n            }\n        }\n\n        if (deviceType == ma_device_type_playback || deviceType == ma_device_type_duplex) {\n            result = ma_device_get_info(pDevice, ma_device_type_playback, &deviceInfo);\n            if (result == MA_SUCCESS) {\n                ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), deviceInfo.name, (size_t)-1);\n            } else {\n                /* We failed to retrieve the device info. Fall back to a default name. */\n                if (pDescriptorPlayback->pDeviceID == NULL) {\n                    ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n                } else {\n                    ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), \"Playback Device\", (size_t)-1);\n                }\n            }\n        }\n    }\n\n    /* Update data conversion. */\n    return ma_device__post_init_setup(pDevice, deviceType); /* TODO: Should probably rename ma_device__post_init_setup() to something better. */\n}\n\n\nstatic ma_thread_result MA_THREADCALL ma_worker_thread(void* pData)\n{\n    ma_device* pDevice = (ma_device*)pData;\n#ifdef MA_WIN32\n    HRESULT CoInitializeResult;\n#endif\n\n    MA_ASSERT(pDevice != NULL);\n\n#ifdef MA_WIN32\n    CoInitializeResult = ma_CoInitializeEx(pDevice->pContext, NULL, MA_COINIT_VALUE);\n#endif\n\n    /*\n    When the device is being initialized it's initial state is set to ma_device_state_uninitialized. Before returning from\n    ma_device_init(), the state needs to be set to something valid. In miniaudio the device's default state immediately\n    after initialization is stopped, so therefore we need to mark the device as such. miniaudio will wait on the worker\n    thread to signal an event to know when the worker thread is ready for action.\n    */\n    ma_device__set_state(pDevice, ma_device_state_stopped);\n    ma_event_signal(&pDevice->stopEvent);\n\n    for (;;) {  /* <-- This loop just keeps the thread alive. The main audio loop is inside. */\n        ma_result startResult;\n        ma_result stopResult;   /* <-- This will store the result from onDeviceStop(). If it returns an error, we don't fire the stopped notification callback. */\n\n        /* We wait on an event to know when something has requested that the device be started and the main loop entered. */\n        ma_event_wait(&pDevice->wakeupEvent);\n\n        /* Default result code. */\n        pDevice->workResult = MA_SUCCESS;\n\n        /* If the reason for the wake up is that we are terminating, just break from the loop. */\n        if (ma_device_get_state(pDevice) == ma_device_state_uninitialized) {\n            break;\n        }\n\n        /*\n        Getting to this point means the device is wanting to get started. The function that has requested that the device\n        be started will be waiting on an event (pDevice->startEvent) which means we need to make sure we signal the event\n        in both the success and error case. It's important that the state of the device is set _before_ signaling the event.\n        */\n        MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_starting);\n\n        /* If the device has a start callback, start it now. */\n        if (pDevice->pContext->callbacks.onDeviceStart != NULL) {\n            startResult = pDevice->pContext->callbacks.onDeviceStart(pDevice);\n        } else {\n            startResult = MA_SUCCESS;\n        }\n\n        /*\n        If starting was not successful we'll need to loop back to the start and wait for something\n        to happen (pDevice->wakeupEvent).\n        */\n        if (startResult != MA_SUCCESS) {\n            pDevice->workResult = startResult;\n            ma_event_signal(&pDevice->startEvent);  /* <-- Always signal the start event so ma_device_start() can return as it'll be waiting on it. */\n            continue;\n        }\n\n        /* Make sure the state is set appropriately. */\n        ma_device__set_state(pDevice, ma_device_state_started); /* <-- Set this before signaling the event so that the state is always guaranteed to be good after ma_device_start() has returned. */\n        ma_event_signal(&pDevice->startEvent);\n\n        ma_device__on_notification_started(pDevice);\n\n        if (pDevice->pContext->callbacks.onDeviceDataLoop != NULL) {\n            pDevice->pContext->callbacks.onDeviceDataLoop(pDevice);\n        } else {\n            /* The backend is not using a custom main loop implementation, so now fall back to the blocking read-write implementation. */\n            ma_device_audio_thread__default_read_write(pDevice);\n        }\n\n        /* Getting here means we have broken from the main loop which happens the application has requested that device be stopped. */\n        if (pDevice->pContext->callbacks.onDeviceStop != NULL) {\n            stopResult = pDevice->pContext->callbacks.onDeviceStop(pDevice);\n        } else {\n            stopResult = MA_SUCCESS;    /* No stop callback with the backend. Just assume successful. */\n        }\n\n        /*\n        After the device has stopped, make sure an event is posted. Don't post a stopped event if\n        stopping failed. This can happen on some backends when the underlying stream has been\n        stopped due to the device being physically unplugged or disabled via an OS setting.\n        */\n        if (stopResult == MA_SUCCESS) {\n            ma_device__on_notification_stopped(pDevice);\n        }\n\n        /* If we stopped because the device has been uninitialized, abort now. */\n        if (ma_device_get_state(pDevice) == ma_device_state_uninitialized) {\n            break;\n        }\n\n        /* A function somewhere is waiting for the device to have stopped for real so we need to signal an event to allow it to continue. */\n        ma_device__set_state(pDevice, ma_device_state_stopped);\n        ma_event_signal(&pDevice->stopEvent);\n    }\n\n#ifdef MA_WIN32\n    if (CoInitializeResult == S_OK) {\n        ma_CoUninitialize(pDevice->pContext);\n    }\n#endif\n\n    return (ma_thread_result)0;\n}\n\n\n/* Helper for determining whether or not the given device is initialized. */\nstatic ma_bool32 ma_device__is_initialized(ma_device* pDevice)\n{\n    if (pDevice == NULL) {\n        return MA_FALSE;\n    }\n\n    return ma_device_get_state(pDevice) != ma_device_state_uninitialized;\n}\n\n\n#ifdef MA_WIN32\nstatic ma_result ma_context_uninit_backend_apis__win32(ma_context* pContext)\n{\n    /* For some reason UWP complains when CoUninitialize() is called. I'm just not going to call it on UWP. */\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    if (pContext->win32.CoInitializeResult == S_OK) {\n        ma_CoUninitialize(pContext);\n    }\n\n    #if defined(MA_WIN32_DESKTOP)\n        ma_dlclose(ma_context_get_log(pContext), pContext->win32.hUser32DLL);\n        ma_dlclose(ma_context_get_log(pContext), pContext->win32.hAdvapi32DLL);\n    #endif\n\n    ma_dlclose(ma_context_get_log(pContext), pContext->win32.hOle32DLL);\n#else\n    (void)pContext;\n#endif\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init_backend_apis__win32(ma_context* pContext)\n{\n#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)\n    #if defined(MA_WIN32_DESKTOP)\n        /* User32.dll */\n        pContext->win32.hUser32DLL = ma_dlopen(ma_context_get_log(pContext), \"user32.dll\");\n        if (pContext->win32.hUser32DLL == NULL) {\n            return MA_FAILED_TO_INIT_BACKEND;\n        }\n\n        pContext->win32.GetForegroundWindow = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hUser32DLL, \"GetForegroundWindow\");\n        pContext->win32.GetDesktopWindow    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hUser32DLL, \"GetDesktopWindow\");\n\n\n        /* Advapi32.dll */\n        pContext->win32.hAdvapi32DLL = ma_dlopen(ma_context_get_log(pContext), \"advapi32.dll\");\n        if (pContext->win32.hAdvapi32DLL == NULL) {\n            return MA_FAILED_TO_INIT_BACKEND;\n        }\n\n        pContext->win32.RegOpenKeyExA    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hAdvapi32DLL, \"RegOpenKeyExA\");\n        pContext->win32.RegCloseKey      = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hAdvapi32DLL, \"RegCloseKey\");\n        pContext->win32.RegQueryValueExA = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hAdvapi32DLL, \"RegQueryValueExA\");\n    #endif\n\n    /* Ole32.dll */\n    pContext->win32.hOle32DLL = ma_dlopen(ma_context_get_log(pContext), \"ole32.dll\");\n    if (pContext->win32.hOle32DLL == NULL) {\n        return MA_FAILED_TO_INIT_BACKEND;\n    }\n\n    pContext->win32.CoInitialize     = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, \"CoInitialize\");\n    pContext->win32.CoInitializeEx   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, \"CoInitializeEx\");\n    pContext->win32.CoUninitialize   = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, \"CoUninitialize\");\n    pContext->win32.CoCreateInstance = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, \"CoCreateInstance\");\n    pContext->win32.CoTaskMemFree    = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, \"CoTaskMemFree\");\n    pContext->win32.PropVariantClear = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, \"PropVariantClear\");\n    pContext->win32.StringFromGUID2  = (ma_proc)ma_dlsym(ma_context_get_log(pContext), pContext->win32.hOle32DLL, \"StringFromGUID2\");\n#else\n    (void)pContext; /* Unused. */\n#endif\n\n    pContext->win32.CoInitializeResult = ma_CoInitializeEx(pContext, NULL, MA_COINIT_VALUE);\n    return MA_SUCCESS;\n}\n#else\nstatic ma_result ma_context_uninit_backend_apis__nix(ma_context* pContext)\n{\n    (void)pContext;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_context_init_backend_apis__nix(ma_context* pContext)\n{\n    (void)pContext;\n\n    return MA_SUCCESS;\n}\n#endif\n\nstatic ma_result ma_context_init_backend_apis(ma_context* pContext)\n{\n    ma_result result;\n#ifdef MA_WIN32\n    result = ma_context_init_backend_apis__win32(pContext);\n#else\n    result = ma_context_init_backend_apis__nix(pContext);\n#endif\n\n    return result;\n}\n\nstatic ma_result ma_context_uninit_backend_apis(ma_context* pContext)\n{\n    ma_result result;\n#ifdef MA_WIN32\n    result = ma_context_uninit_backend_apis__win32(pContext);\n#else\n    result = ma_context_uninit_backend_apis__nix(pContext);\n#endif\n\n    return result;\n}\n\n\n/* The default capacity doesn't need to be too big. */\n#ifndef MA_DEFAULT_DEVICE_JOB_QUEUE_CAPACITY\n#define MA_DEFAULT_DEVICE_JOB_QUEUE_CAPACITY    32\n#endif\n\nMA_API ma_device_job_thread_config ma_device_job_thread_config_init(void)\n{\n    ma_device_job_thread_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.noThread         = MA_FALSE;\n    config.jobQueueCapacity = MA_DEFAULT_DEVICE_JOB_QUEUE_CAPACITY;\n    config.jobQueueFlags    = 0;\n\n    return config;\n}\n\n\nstatic ma_thread_result MA_THREADCALL ma_device_job_thread_entry(void* pUserData)\n{\n    ma_device_job_thread* pJobThread = (ma_device_job_thread*)pUserData;\n    MA_ASSERT(pJobThread != NULL);\n\n    for (;;) {\n        ma_result result;\n        ma_job job;\n\n        result = ma_device_job_thread_next(pJobThread, &job);\n        if (result != MA_SUCCESS) {\n            break;\n        }\n\n        if (job.toc.breakup.code == MA_JOB_TYPE_QUIT) {\n            break;\n        }\n\n        ma_job_process(&job);\n    }\n\n    return (ma_thread_result)0;\n}\n\nMA_API ma_result ma_device_job_thread_init(const ma_device_job_thread_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_device_job_thread* pJobThread)\n{\n    ma_result result;\n    ma_job_queue_config jobQueueConfig;\n\n    if (pJobThread == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pJobThread);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n\n    /* Initialize the job queue before the thread to ensure it's in a valid state. */\n    jobQueueConfig = ma_job_queue_config_init(pConfig->jobQueueFlags, pConfig->jobQueueCapacity);\n\n    result = ma_job_queue_init(&jobQueueConfig, pAllocationCallbacks, &pJobThread->jobQueue);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to initialize job queue. */\n    }\n\n\n    /* The thread needs to be initialized after the job queue to ensure the thread doesn't try to access it prematurely. */\n    if (pConfig->noThread == MA_FALSE) {\n        result = ma_thread_create(&pJobThread->thread, ma_thread_priority_normal, 0, ma_device_job_thread_entry, pJobThread, pAllocationCallbacks);\n        if (result != MA_SUCCESS) {\n            ma_job_queue_uninit(&pJobThread->jobQueue, pAllocationCallbacks);\n            return result;  /* Failed to create the job thread. */\n        }\n\n        pJobThread->_hasThread = MA_TRUE;\n    } else {\n        pJobThread->_hasThread = MA_FALSE;\n    }\n\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_device_job_thread_uninit(ma_device_job_thread* pJobThread, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pJobThread == NULL) {\n        return;\n    }\n\n    /* The first thing to do is post a quit message to the job queue. If we're using a thread we'll need to wait for it. */\n    {\n        ma_job job = ma_job_init(MA_JOB_TYPE_QUIT);\n        ma_device_job_thread_post(pJobThread, &job);\n    }\n\n    /* Wait for the thread to terminate naturally. */\n    if (pJobThread->_hasThread) {\n        ma_thread_wait(&pJobThread->thread);\n    }\n\n    /* At this point the thread should be terminated so we can safely uninitialize the job queue. */\n    ma_job_queue_uninit(&pJobThread->jobQueue, pAllocationCallbacks);\n}\n\nMA_API ma_result ma_device_job_thread_post(ma_device_job_thread* pJobThread, const ma_job* pJob)\n{\n    if (pJobThread == NULL || pJob == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_job_queue_post(&pJobThread->jobQueue, pJob);\n}\n\nMA_API ma_result ma_device_job_thread_next(ma_device_job_thread* pJobThread, ma_job* pJob)\n{\n    if (pJob == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pJob);\n\n    if (pJobThread == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_job_queue_next(&pJobThread->jobQueue, pJob);\n}\n\n\n\nMA_API ma_context_config ma_context_config_init(void)\n{\n    ma_context_config config;\n    MA_ZERO_OBJECT(&config);\n\n    return config;\n}\n\nMA_API ma_result ma_context_init(const ma_backend backends[], ma_uint32 backendCount, const ma_context_config* pConfig, ma_context* pContext)\n{\n    ma_result result;\n    ma_context_config defaultConfig;\n    ma_backend defaultBackends[ma_backend_null+1];\n    ma_uint32 iBackend;\n    ma_backend* pBackendsToIterate;\n    ma_uint32 backendsToIterateCount;\n\n    if (pContext == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pContext);\n\n    /* Always make sure the config is set first to ensure properties are available as soon as possible. */\n    if (pConfig == NULL) {\n        defaultConfig = ma_context_config_init();\n        pConfig = &defaultConfig;\n    }\n\n    /* Allocation callbacks need to come first because they'll be passed around to other areas. */\n    result = ma_allocation_callbacks_init_copy(&pContext->allocationCallbacks, &pConfig->allocationCallbacks);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* Get a lot set up first so we can start logging ASAP. */\n    if (pConfig->pLog != NULL) {\n        pContext->pLog = pConfig->pLog;\n    } else {\n        result = ma_log_init(&pContext->allocationCallbacks, &pContext->log);\n        if (result == MA_SUCCESS) {\n            pContext->pLog = &pContext->log;\n        } else {\n            pContext->pLog = NULL;  /* Logging is not available. */\n        }\n    }\n\n    pContext->threadPriority  = pConfig->threadPriority;\n    pContext->threadStackSize = pConfig->threadStackSize;\n    pContext->pUserData       = pConfig->pUserData;\n\n    /* Backend APIs need to be initialized first. This is where external libraries will be loaded and linked. */\n    result = ma_context_init_backend_apis(pContext);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    for (iBackend = 0; iBackend <= ma_backend_null; ++iBackend) {\n        defaultBackends[iBackend] = (ma_backend)iBackend;\n    }\n\n    pBackendsToIterate = (ma_backend*)backends;\n    backendsToIterateCount = backendCount;\n    if (pBackendsToIterate == NULL) {\n        pBackendsToIterate = (ma_backend*)defaultBackends;\n        backendsToIterateCount = ma_countof(defaultBackends);\n    }\n\n    MA_ASSERT(pBackendsToIterate != NULL);\n\n    for (iBackend = 0; iBackend < backendsToIterateCount; iBackend += 1) {\n        ma_backend backend = pBackendsToIterate[iBackend];\n\n        /* Make sure all callbacks are reset so we don't accidentally drag in any from previously failed initialization attempts. */\n        MA_ZERO_OBJECT(&pContext->callbacks);\n\n        /* These backends are using the new callback system. */\n        switch (backend) {\n        #ifdef MA_HAS_WASAPI\n            case ma_backend_wasapi:\n            {\n                pContext->callbacks.onContextInit = ma_context_init__wasapi;\n            } break;\n        #endif\n        #ifdef MA_HAS_DSOUND\n            case ma_backend_dsound:\n            {\n                pContext->callbacks.onContextInit = ma_context_init__dsound;\n            } break;\n        #endif\n        #ifdef MA_HAS_WINMM\n            case ma_backend_winmm:\n            {\n                pContext->callbacks.onContextInit = ma_context_init__winmm;\n            } break;\n        #endif\n        #ifdef MA_HAS_COREAUDIO\n            case ma_backend_coreaudio:\n            {\n                pContext->callbacks.onContextInit = ma_context_init__coreaudio;\n            } break;\n        #endif\n        #ifdef MA_HAS_SNDIO\n            case ma_backend_sndio:\n            {\n                pContext->callbacks.onContextInit = ma_context_init__sndio;\n            } break;\n        #endif\n        #ifdef MA_HAS_AUDIO4\n            case ma_backend_audio4:\n            {\n                pContext->callbacks.onContextInit = ma_context_init__audio4;\n            } break;\n        #endif\n        #ifdef MA_HAS_OSS\n            case ma_backend_oss:\n            {\n                pContext->callbacks.onContextInit = ma_context_init__oss;\n            } break;\n        #endif\n        #ifdef MA_HAS_PULSEAUDIO\n            case ma_backend_pulseaudio:\n            {\n                pContext->callbacks.onContextInit = ma_context_init__pulse;\n            } break;\n        #endif\n        #ifdef MA_HAS_ALSA\n            case ma_backend_alsa:\n            {\n                pContext->callbacks.onContextInit = ma_context_init__alsa;\n            } break;\n        #endif\n        #ifdef MA_HAS_JACK\n            case ma_backend_jack:\n            {\n                pContext->callbacks.onContextInit = ma_context_init__jack;\n            } break;\n        #endif\n        #ifdef MA_HAS_AAUDIO\n            case ma_backend_aaudio:\n            {\n                if (ma_is_backend_enabled(backend)) {\n                    pContext->callbacks.onContextInit = ma_context_init__aaudio;\n                }\n            } break;\n        #endif\n        #ifdef MA_HAS_OPENSL\n            case ma_backend_opensl:\n            {\n                if (ma_is_backend_enabled(backend)) {\n                    pContext->callbacks.onContextInit = ma_context_init__opensl;\n                }\n            } break;\n        #endif\n        #ifdef MA_HAS_WEBAUDIO\n            case ma_backend_webaudio:\n            {\n                pContext->callbacks.onContextInit = ma_context_init__webaudio;\n            } break;\n        #endif\n        #ifdef MA_HAS_CUSTOM\n            case ma_backend_custom:\n            {\n                /* Slightly different logic for custom backends. Custom backends can optionally set all of their callbacks in the config. */\n                pContext->callbacks = pConfig->custom;\n            } break;\n        #endif\n        #ifdef MA_HAS_NULL\n            case ma_backend_null:\n            {\n                pContext->callbacks.onContextInit = ma_context_init__null;\n            } break;\n        #endif\n\n            default: break;\n        }\n\n        if (pContext->callbacks.onContextInit != NULL) {\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"Attempting to initialize %s backend...\\n\", ma_get_backend_name(backend));\n            result = pContext->callbacks.onContextInit(pContext, pConfig, &pContext->callbacks);\n        } else {\n            /* Getting here means the onContextInit callback is not set which means the backend is not enabled. Special case for the custom backend. */\n            if (backend != ma_backend_custom) {\n                result = MA_BACKEND_NOT_ENABLED;\n            } else {\n            #if !defined(MA_HAS_CUSTOM)\n                result = MA_BACKEND_NOT_ENABLED;\n            #else\n                result = MA_NO_BACKEND;\n            #endif\n            }\n        }\n\n        /* If this iteration was successful, return. */\n        if (result == MA_SUCCESS) {\n            result = ma_mutex_init(&pContext->deviceEnumLock);\n            if (result != MA_SUCCESS) {\n                ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, \"Failed to initialize mutex for device enumeration. ma_context_get_devices() is not thread safe.\\n\");\n            }\n\n            result = ma_mutex_init(&pContext->deviceInfoLock);\n            if (result != MA_SUCCESS) {\n                ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, \"Failed to initialize mutex for device info retrieval. ma_context_get_device_info() is not thread safe.\\n\");\n            }\n\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"System Architecture:\\n\");\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"  Endian: %s\\n\", ma_is_little_endian() ? \"LE\"  : \"BE\");\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"  SSE2:   %s\\n\", ma_has_sse2()         ? \"YES\" : \"NO\");\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"  AVX2:   %s\\n\", ma_has_avx2()         ? \"YES\" : \"NO\");\n            ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"  NEON:   %s\\n\", ma_has_neon()         ? \"YES\" : \"NO\");\n\n            pContext->backend = backend;\n            return result;\n        } else {\n            if (result == MA_BACKEND_NOT_ENABLED) {\n                ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"%s backend is disabled.\\n\", ma_get_backend_name(backend));\n            } else {\n                ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, \"Failed to initialize %s backend.\\n\", ma_get_backend_name(backend));\n            }\n        }\n    }\n\n    /* If we get here it means an error occurred. */\n    MA_ZERO_OBJECT(pContext);  /* Safety. */\n    return MA_NO_BACKEND;\n}\n\nMA_API ma_result ma_context_uninit(ma_context* pContext)\n{\n    if (pContext == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pContext->callbacks.onContextUninit != NULL) {\n        pContext->callbacks.onContextUninit(pContext);\n    }\n\n    ma_mutex_uninit(&pContext->deviceEnumLock);\n    ma_mutex_uninit(&pContext->deviceInfoLock);\n    ma_free(pContext->pDeviceInfos, &pContext->allocationCallbacks);\n    ma_context_uninit_backend_apis(pContext);\n\n    if (pContext->pLog == &pContext->log) {\n        ma_log_uninit(&pContext->log);\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API size_t ma_context_sizeof(void)\n{\n    return sizeof(ma_context);\n}\n\n\nMA_API ma_log* ma_context_get_log(ma_context* pContext)\n{\n    if (pContext == NULL) {\n        return NULL;\n    }\n\n    return pContext->pLog;\n}\n\n\nMA_API ma_result ma_context_enumerate_devices(ma_context* pContext, ma_enum_devices_callback_proc callback, void* pUserData)\n{\n    ma_result result;\n\n    if (pContext == NULL || callback == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pContext->callbacks.onContextEnumerateDevices == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    ma_mutex_lock(&pContext->deviceEnumLock);\n    {\n        result = pContext->callbacks.onContextEnumerateDevices(pContext, callback, pUserData);\n    }\n    ma_mutex_unlock(&pContext->deviceEnumLock);\n\n    return result;\n}\n\n\nstatic ma_bool32 ma_context_get_devices__enum_callback(ma_context* pContext, ma_device_type deviceType, const ma_device_info* pInfo, void* pUserData)\n{\n    /*\n    We need to insert the device info into our main internal buffer. Where it goes depends on the device type. If it's a capture device\n    it's just appended to the end. If it's a playback device it's inserted just before the first capture device.\n    */\n\n    /*\n    First make sure we have room. Since the number of devices we add to the list is usually relatively small I've decided to use a\n    simple fixed size increment for buffer expansion.\n    */\n    const ma_uint32 bufferExpansionCount = 2;\n    const ma_uint32 totalDeviceInfoCount = pContext->playbackDeviceInfoCount + pContext->captureDeviceInfoCount;\n\n    if (totalDeviceInfoCount >= pContext->deviceInfoCapacity) {\n        ma_uint32 newCapacity = pContext->deviceInfoCapacity + bufferExpansionCount;\n        ma_device_info* pNewInfos = (ma_device_info*)ma_realloc(pContext->pDeviceInfos, sizeof(*pContext->pDeviceInfos)*newCapacity, &pContext->allocationCallbacks);\n        if (pNewInfos == NULL) {\n            return MA_FALSE;   /* Out of memory. */\n        }\n\n        pContext->pDeviceInfos = pNewInfos;\n        pContext->deviceInfoCapacity = newCapacity;\n    }\n\n    if (deviceType == ma_device_type_playback) {\n        /* Playback. Insert just before the first capture device. */\n\n        /* The first thing to do is move all of the capture devices down a slot. */\n        ma_uint32 iFirstCaptureDevice = pContext->playbackDeviceInfoCount;\n        size_t iCaptureDevice;\n        for (iCaptureDevice = totalDeviceInfoCount; iCaptureDevice > iFirstCaptureDevice; --iCaptureDevice) {\n            pContext->pDeviceInfos[iCaptureDevice] = pContext->pDeviceInfos[iCaptureDevice-1];\n        }\n\n        /* Now just insert where the first capture device was before moving it down a slot. */\n        pContext->pDeviceInfos[iFirstCaptureDevice] = *pInfo;\n        pContext->playbackDeviceInfoCount += 1;\n    } else {\n        /* Capture. Insert at the end. */\n        pContext->pDeviceInfos[totalDeviceInfoCount] = *pInfo;\n        pContext->captureDeviceInfoCount += 1;\n    }\n\n    (void)pUserData;\n    return MA_TRUE;\n}\n\nMA_API ma_result ma_context_get_devices(ma_context* pContext, ma_device_info** ppPlaybackDeviceInfos, ma_uint32* pPlaybackDeviceCount, ma_device_info** ppCaptureDeviceInfos, ma_uint32* pCaptureDeviceCount)\n{\n    ma_result result;\n\n    /* Safety. */\n    if (ppPlaybackDeviceInfos != NULL) *ppPlaybackDeviceInfos = NULL;\n    if (pPlaybackDeviceCount  != NULL) *pPlaybackDeviceCount  = 0;\n    if (ppCaptureDeviceInfos  != NULL) *ppCaptureDeviceInfos  = NULL;\n    if (pCaptureDeviceCount   != NULL) *pCaptureDeviceCount   = 0;\n\n    if (pContext == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pContext->callbacks.onContextEnumerateDevices == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* Note that we don't use ma_context_enumerate_devices() here because we want to do locking at a higher level. */\n    ma_mutex_lock(&pContext->deviceEnumLock);\n    {\n        /* Reset everything first. */\n        pContext->playbackDeviceInfoCount = 0;\n        pContext->captureDeviceInfoCount = 0;\n\n        /* Now enumerate over available devices. */\n        result = pContext->callbacks.onContextEnumerateDevices(pContext, ma_context_get_devices__enum_callback, NULL);\n        if (result == MA_SUCCESS) {\n            /* Playback devices. */\n            if (ppPlaybackDeviceInfos != NULL) {\n                *ppPlaybackDeviceInfos = pContext->pDeviceInfos;\n            }\n            if (pPlaybackDeviceCount != NULL) {\n                *pPlaybackDeviceCount = pContext->playbackDeviceInfoCount;\n            }\n\n            /* Capture devices. */\n            if (ppCaptureDeviceInfos != NULL) {\n                *ppCaptureDeviceInfos = pContext->pDeviceInfos;\n                /* Capture devices come after playback devices. */\n                if (pContext->playbackDeviceInfoCount > 0) {\n                    /* Conditional, because NULL+0 is undefined behavior. */\n                    *ppCaptureDeviceInfos += pContext->playbackDeviceInfoCount;\n                }\n            }\n            if (pCaptureDeviceCount != NULL) {\n                *pCaptureDeviceCount = pContext->captureDeviceInfoCount;\n            }\n        }\n    }\n    ma_mutex_unlock(&pContext->deviceEnumLock);\n\n    return result;\n}\n\nMA_API ma_result ma_context_get_device_info(ma_context* pContext, ma_device_type deviceType, const ma_device_id* pDeviceID, ma_device_info* pDeviceInfo)\n{\n    ma_result result;\n    ma_device_info deviceInfo;\n\n    /* NOTE: Do not clear pDeviceInfo on entry. The reason is the pDeviceID may actually point to pDeviceInfo->id which will break things. */\n    if (pContext == NULL || pDeviceInfo == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(&deviceInfo);\n\n    /* Help the backend out by copying over the device ID if we have one. */\n    if (pDeviceID != NULL) {\n        MA_COPY_MEMORY(&deviceInfo.id, pDeviceID, sizeof(*pDeviceID));\n    }\n\n    if (pContext->callbacks.onContextGetDeviceInfo == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    ma_mutex_lock(&pContext->deviceInfoLock);\n    {\n        result = pContext->callbacks.onContextGetDeviceInfo(pContext, deviceType, pDeviceID, &deviceInfo);\n    }\n    ma_mutex_unlock(&pContext->deviceInfoLock);\n\n    *pDeviceInfo = deviceInfo;\n    return result;\n}\n\nMA_API ma_bool32 ma_context_is_loopback_supported(ma_context* pContext)\n{\n    if (pContext == NULL) {\n        return MA_FALSE;\n    }\n\n    return ma_is_loopback_supported(pContext->backend);\n}\n\n\nMA_API ma_device_config ma_device_config_init(ma_device_type deviceType)\n{\n    ma_device_config config;\n    MA_ZERO_OBJECT(&config);\n    config.deviceType = deviceType;\n    config.resampling = ma_resampler_config_init(ma_format_unknown, 0, 0, 0, ma_resample_algorithm_linear); /* Format/channels/rate don't matter here. */\n\n    return config;\n}\n\nMA_API ma_result ma_device_init(ma_context* pContext, const ma_device_config* pConfig, ma_device* pDevice)\n{\n    ma_result result;\n    ma_device_descriptor descriptorPlayback;\n    ma_device_descriptor descriptorCapture;\n\n    /* The context can be null, in which case we self-manage it. */\n    if (pContext == NULL) {\n        return ma_device_init_ex(NULL, 0, NULL, pConfig, pDevice);\n    }\n\n    if (pDevice == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pDevice);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Check that we have our callbacks defined. */\n    if (pContext->callbacks.onDeviceInit == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* Basic config validation. */\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex) {\n        if (pConfig->capture.channels > MA_MAX_CHANNELS) {\n            return MA_INVALID_ARGS;\n        }\n\n        if (!ma__is_channel_map_valid(pConfig->capture.pChannelMap, pConfig->capture.channels)) {\n            return MA_INVALID_ARGS;\n        }\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) {\n        if (pConfig->playback.channels > MA_MAX_CHANNELS) {\n            return MA_INVALID_ARGS;\n        }\n\n        if (!ma__is_channel_map_valid(pConfig->playback.pChannelMap, pConfig->playback.channels)) {\n            return MA_INVALID_ARGS;\n        }\n    }\n\n    pDevice->pContext = pContext;\n\n    /* Set the user data and log callback ASAP to ensure it is available for the entire initialization process. */\n    pDevice->pUserData      = pConfig->pUserData;\n    pDevice->onData         = pConfig->dataCallback;\n    pDevice->onNotification = pConfig->notificationCallback;\n    pDevice->onStop         = pConfig->stopCallback;\n\n    if (pConfig->playback.pDeviceID != NULL) {\n        MA_COPY_MEMORY(&pDevice->playback.id, pConfig->playback.pDeviceID, sizeof(pDevice->playback.id));\n        pDevice->playback.pID = &pDevice->playback.id;\n    } else {\n        pDevice->playback.pID = NULL;\n    }\n\n    if (pConfig->capture.pDeviceID != NULL) {\n        MA_COPY_MEMORY(&pDevice->capture.id, pConfig->capture.pDeviceID, sizeof(pDevice->capture.id));\n        pDevice->capture.pID = &pDevice->capture.id;\n    } else {\n        pDevice->capture.pID = NULL;\n    }\n\n    pDevice->noPreSilencedOutputBuffer   = pConfig->noPreSilencedOutputBuffer;\n    pDevice->noClip                      = pConfig->noClip;\n    pDevice->noDisableDenormals          = pConfig->noDisableDenormals;\n    pDevice->noFixedSizedCallback        = pConfig->noFixedSizedCallback;\n    ma_atomic_float_set(&pDevice->masterVolumeFactor, 1);\n\n    pDevice->type                        = pConfig->deviceType;\n    pDevice->sampleRate                  = pConfig->sampleRate;\n    pDevice->resampling.algorithm        = pConfig->resampling.algorithm;\n    pDevice->resampling.linear.lpfOrder  = pConfig->resampling.linear.lpfOrder;\n    pDevice->resampling.pBackendVTable   = pConfig->resampling.pBackendVTable;\n    pDevice->resampling.pBackendUserData = pConfig->resampling.pBackendUserData;\n\n    pDevice->capture.shareMode           = pConfig->capture.shareMode;\n    pDevice->capture.format              = pConfig->capture.format;\n    pDevice->capture.channels            = pConfig->capture.channels;\n    ma_channel_map_copy_or_default(pDevice->capture.channelMap, ma_countof(pDevice->capture.channelMap), pConfig->capture.pChannelMap, pConfig->capture.channels);\n    pDevice->capture.channelMixMode      = pConfig->capture.channelMixMode;\n    pDevice->capture.calculateLFEFromSpatialChannels = pConfig->capture.calculateLFEFromSpatialChannels;\n\n    pDevice->playback.shareMode          = pConfig->playback.shareMode;\n    pDevice->playback.format             = pConfig->playback.format;\n    pDevice->playback.channels           = pConfig->playback.channels;\n    ma_channel_map_copy_or_default(pDevice->playback.channelMap, ma_countof(pDevice->playback.channelMap), pConfig->playback.pChannelMap, pConfig->playback.channels);\n    pDevice->playback.channelMixMode     = pConfig->playback.channelMixMode;\n    pDevice->playback.calculateLFEFromSpatialChannels = pConfig->playback.calculateLFEFromSpatialChannels;\n\n    result = ma_mutex_init(&pDevice->startStopLock);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /*\n    When the device is started, the worker thread is the one that does the actual startup of the backend device. We\n    use a semaphore to wait for the background thread to finish the work. The same applies for stopping the device.\n\n    Each of these semaphores is released internally by the worker thread when the work is completed. The start\n    semaphore is also used to wake up the worker thread.\n    */\n    result = ma_event_init(&pDevice->wakeupEvent);\n    if (result != MA_SUCCESS) {\n        ma_mutex_uninit(&pDevice->startStopLock);\n        return result;\n    }\n\n    result = ma_event_init(&pDevice->startEvent);\n    if (result != MA_SUCCESS) {\n        ma_event_uninit(&pDevice->wakeupEvent);\n        ma_mutex_uninit(&pDevice->startStopLock);\n        return result;\n    }\n\n    result = ma_event_init(&pDevice->stopEvent);\n    if (result != MA_SUCCESS) {\n        ma_event_uninit(&pDevice->startEvent);\n        ma_event_uninit(&pDevice->wakeupEvent);\n        ma_mutex_uninit(&pDevice->startStopLock);\n        return result;\n    }\n\n\n    MA_ZERO_OBJECT(&descriptorPlayback);\n    descriptorPlayback.pDeviceID                = pConfig->playback.pDeviceID;\n    descriptorPlayback.shareMode                = pConfig->playback.shareMode;\n    descriptorPlayback.format                   = pConfig->playback.format;\n    descriptorPlayback.channels                 = pConfig->playback.channels;\n    descriptorPlayback.sampleRate               = pConfig->sampleRate;\n    ma_channel_map_copy_or_default(descriptorPlayback.channelMap, ma_countof(descriptorPlayback.channelMap), pConfig->playback.pChannelMap, pConfig->playback.channels);\n    descriptorPlayback.periodSizeInFrames       = pConfig->periodSizeInFrames;\n    descriptorPlayback.periodSizeInMilliseconds = pConfig->periodSizeInMilliseconds;\n    descriptorPlayback.periodCount              = pConfig->periods;\n\n    if (descriptorPlayback.periodCount == 0) {\n        descriptorPlayback.periodCount = MA_DEFAULT_PERIODS;\n    }\n\n\n    MA_ZERO_OBJECT(&descriptorCapture);\n    descriptorCapture.pDeviceID                 = pConfig->capture.pDeviceID;\n    descriptorCapture.shareMode                 = pConfig->capture.shareMode;\n    descriptorCapture.format                    = pConfig->capture.format;\n    descriptorCapture.channels                  = pConfig->capture.channels;\n    descriptorCapture.sampleRate                = pConfig->sampleRate;\n    ma_channel_map_copy_or_default(descriptorCapture.channelMap, ma_countof(descriptorCapture.channelMap), pConfig->capture.pChannelMap, pConfig->capture.channels);\n    descriptorCapture.periodSizeInFrames        = pConfig->periodSizeInFrames;\n    descriptorCapture.periodSizeInMilliseconds  = pConfig->periodSizeInMilliseconds;\n    descriptorCapture.periodCount               = pConfig->periods;\n\n    if (descriptorCapture.periodCount == 0) {\n        descriptorCapture.periodCount = MA_DEFAULT_PERIODS;\n    }\n\n\n    result = pContext->callbacks.onDeviceInit(pDevice, pConfig, &descriptorPlayback, &descriptorCapture);\n    if (result != MA_SUCCESS) {\n        ma_event_uninit(&pDevice->startEvent);\n        ma_event_uninit(&pDevice->wakeupEvent);\n        ma_mutex_uninit(&pDevice->startStopLock);\n        return result;\n    }\n\n#if 0\n    /*\n    On output the descriptors will contain the *actual* data format of the device. We need this to know how to convert the data between\n    the requested format and the internal format.\n    */\n    if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) {\n        if (!ma_device_descriptor_is_valid(&descriptorCapture)) {\n            ma_device_uninit(pDevice);\n            return MA_INVALID_ARGS;\n        }\n\n        pDevice->capture.internalFormat             = descriptorCapture.format;\n        pDevice->capture.internalChannels           = descriptorCapture.channels;\n        pDevice->capture.internalSampleRate         = descriptorCapture.sampleRate;\n        ma_channel_map_copy(pDevice->capture.internalChannelMap, descriptorCapture.channelMap, descriptorCapture.channels);\n        pDevice->capture.internalPeriodSizeInFrames = descriptorCapture.periodSizeInFrames;\n        pDevice->capture.internalPeriods            = descriptorCapture.periodCount;\n\n        if (pDevice->capture.internalPeriodSizeInFrames == 0) {\n            pDevice->capture.internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(descriptorCapture.periodSizeInMilliseconds, descriptorCapture.sampleRate);\n        }\n    }\n\n    if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n        if (!ma_device_descriptor_is_valid(&descriptorPlayback)) {\n            ma_device_uninit(pDevice);\n            return MA_INVALID_ARGS;\n        }\n\n        pDevice->playback.internalFormat             = descriptorPlayback.format;\n        pDevice->playback.internalChannels           = descriptorPlayback.channels;\n        pDevice->playback.internalSampleRate         = descriptorPlayback.sampleRate;\n        ma_channel_map_copy(pDevice->playback.internalChannelMap, descriptorPlayback.channelMap, descriptorPlayback.channels);\n        pDevice->playback.internalPeriodSizeInFrames = descriptorPlayback.periodSizeInFrames;\n        pDevice->playback.internalPeriods            = descriptorPlayback.periodCount;\n\n        if (pDevice->playback.internalPeriodSizeInFrames == 0) {\n            pDevice->playback.internalPeriodSizeInFrames = ma_calculate_buffer_size_in_frames_from_milliseconds(descriptorPlayback.periodSizeInMilliseconds, descriptorPlayback.sampleRate);\n        }\n    }\n\n\n    /*\n    The name of the device can be retrieved from device info. This may be temporary and replaced with a `ma_device_get_info(pDevice, deviceType)` instead.\n    For loopback devices, we need to retrieve the name of the playback device.\n    */\n    {\n        ma_device_info deviceInfo;\n\n        if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) {\n            result = ma_device_get_info(pDevice, (pConfig->deviceType == ma_device_type_loopback) ? ma_device_type_playback : ma_device_type_capture, &deviceInfo);\n            if (result == MA_SUCCESS) {\n                ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), deviceInfo.name, (size_t)-1);\n            } else {\n                /* We failed to retrieve the device info. Fall back to a default name. */\n                if (descriptorCapture.pDeviceID == NULL) {\n                    ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), MA_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);\n                } else {\n                    ma_strncpy_s(pDevice->capture.name, sizeof(pDevice->capture.name), \"Capture Device\", (size_t)-1);\n                }\n            }\n        }\n\n        if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n            result = ma_device_get_info(pDevice, ma_device_type_playback, &deviceInfo);\n            if (result == MA_SUCCESS) {\n                ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), deviceInfo.name, (size_t)-1);\n            } else {\n                /* We failed to retrieve the device info. Fall back to a default name. */\n                if (descriptorPlayback.pDeviceID == NULL) {\n                    ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), MA_DEFAULT_PLAYBACK_DEVICE_NAME, (size_t)-1);\n                } else {\n                    ma_strncpy_s(pDevice->playback.name, sizeof(pDevice->playback.name), \"Playback Device\", (size_t)-1);\n                }\n            }\n        }\n    }\n\n\n    ma_device__post_init_setup(pDevice, pConfig->deviceType);\n#endif\n\n    result = ma_device_post_init(pDevice, pConfig->deviceType, &descriptorPlayback, &descriptorCapture);\n    if (result != MA_SUCCESS) {\n        ma_device_uninit(pDevice);\n        return result;\n    }\n\n\n    /*\n    If we're using fixed sized callbacks we'll need to make use of an intermediary buffer. Needs to\n    be done after post_init_setup() because we'll need access to the sample rate.\n    */\n    if (pConfig->noFixedSizedCallback == MA_FALSE) {\n        /* We're using a fixed sized data callback so we'll need an intermediary buffer. */\n        ma_uint32 intermediaryBufferCap = pConfig->periodSizeInFrames;\n        if (intermediaryBufferCap == 0) {\n            intermediaryBufferCap = ma_calculate_buffer_size_in_frames_from_milliseconds(pConfig->periodSizeInMilliseconds, pDevice->sampleRate);\n        }\n\n        if (pConfig->deviceType == ma_device_type_capture || pConfig->deviceType == ma_device_type_duplex || pConfig->deviceType == ma_device_type_loopback) {\n            ma_uint32 intermediaryBufferSizeInBytes;\n\n            pDevice->capture.intermediaryBufferLen = 0;\n            pDevice->capture.intermediaryBufferCap = intermediaryBufferCap;\n            if (pDevice->capture.intermediaryBufferCap == 0) {\n                pDevice->capture.intermediaryBufferCap = pDevice->capture.internalPeriodSizeInFrames;\n            }\n\n            intermediaryBufferSizeInBytes = pDevice->capture.intermediaryBufferCap * ma_get_bytes_per_frame(pDevice->capture.format, pDevice->capture.channels);\n\n            pDevice->capture.pIntermediaryBuffer = ma_malloc((size_t)intermediaryBufferSizeInBytes, &pContext->allocationCallbacks);\n            if (pDevice->capture.pIntermediaryBuffer == NULL) {\n                ma_device_uninit(pDevice);\n                return MA_OUT_OF_MEMORY;\n            }\n\n            /* Silence the buffer for safety. */\n            ma_silence_pcm_frames(pDevice->capture.pIntermediaryBuffer, pDevice->capture.intermediaryBufferCap, pDevice->capture.format, pDevice->capture.channels);\n            pDevice->capture.intermediaryBufferLen = pDevice->capture.intermediaryBufferCap;\n        }\n\n        if (pConfig->deviceType == ma_device_type_playback || pConfig->deviceType == ma_device_type_duplex) {\n            ma_uint64 intermediaryBufferSizeInBytes;\n\n            pDevice->playback.intermediaryBufferLen = 0;\n            if (pConfig->deviceType == ma_device_type_duplex) {\n                pDevice->playback.intermediaryBufferCap = pDevice->capture.intermediaryBufferCap;   /* In duplex mode, make sure the intermediary buffer is always the same size as the capture side. */\n            } else {\n                pDevice->playback.intermediaryBufferCap = intermediaryBufferCap;\n                if (pDevice->playback.intermediaryBufferCap == 0) {\n                    pDevice->playback.intermediaryBufferCap = pDevice->playback.internalPeriodSizeInFrames;\n                }\n            }\n\n            intermediaryBufferSizeInBytes = pDevice->playback.intermediaryBufferCap * ma_get_bytes_per_frame(pDevice->playback.format, pDevice->playback.channels);\n\n            pDevice->playback.pIntermediaryBuffer = ma_malloc((size_t)intermediaryBufferSizeInBytes, &pContext->allocationCallbacks);\n            if (pDevice->playback.pIntermediaryBuffer == NULL) {\n                ma_device_uninit(pDevice);\n                return MA_OUT_OF_MEMORY;\n            }\n\n            /* Silence the buffer for safety. */\n            ma_silence_pcm_frames(pDevice->playback.pIntermediaryBuffer, pDevice->playback.intermediaryBufferCap, pDevice->playback.format, pDevice->playback.channels);\n            pDevice->playback.intermediaryBufferLen = 0;\n        }\n    } else {\n        /* Not using a fixed sized data callback so no need for an intermediary buffer. */\n    }\n\n\n    /* Some backends don't require the worker thread. */\n    if (!ma_context_is_backend_asynchronous(pContext)) {\n        /* The worker thread. */\n        result = ma_thread_create(&pDevice->thread, pContext->threadPriority, pContext->threadStackSize, ma_worker_thread, pDevice, &pContext->allocationCallbacks);\n        if (result != MA_SUCCESS) {\n            ma_device_uninit(pDevice);\n            return result;\n        }\n\n        /* Wait for the worker thread to put the device into it's stopped state for real. */\n        ma_event_wait(&pDevice->stopEvent);\n        MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_stopped);\n    } else {\n        /*\n        If the backend is asynchronous and the device is duplex, we'll need an intermediary ring buffer. Note that this needs to be done\n        after ma_device__post_init_setup().\n        */\n        if (ma_context_is_backend_asynchronous(pContext)) {\n            if (pConfig->deviceType == ma_device_type_duplex) {\n                result = ma_duplex_rb_init(pDevice->capture.format, pDevice->capture.channels, pDevice->sampleRate, pDevice->capture.internalSampleRate, pDevice->capture.internalPeriodSizeInFrames, &pDevice->pContext->allocationCallbacks, &pDevice->duplexRB);\n                if (result != MA_SUCCESS) {\n                    ma_device_uninit(pDevice);\n                    return result;\n                }\n            }\n        }\n\n        ma_device__set_state(pDevice, ma_device_state_stopped);\n    }\n\n    /* Log device information. */\n    {\n        ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"[%s]\\n\", ma_get_backend_name(pDevice->pContext->backend));\n        if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) {\n            char name[MA_MAX_DEVICE_NAME_LENGTH + 1];\n            ma_device_get_name(pDevice, (pDevice->type == ma_device_type_loopback) ? ma_device_type_playback : ma_device_type_capture, name, sizeof(name), NULL);\n\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"  %s (%s)\\n\", name, \"Capture\");\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"    Format:      %s -> %s\\n\", ma_get_format_name(pDevice->capture.internalFormat), ma_get_format_name(pDevice->capture.format));\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"    Channels:    %d -> %d\\n\", pDevice->capture.internalChannels, pDevice->capture.channels);\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"    Sample Rate: %d -> %d\\n\", pDevice->capture.internalSampleRate, pDevice->sampleRate);\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"    Buffer Size: %d*%d (%d)\\n\", pDevice->capture.internalPeriodSizeInFrames, pDevice->capture.internalPeriods, (pDevice->capture.internalPeriodSizeInFrames * pDevice->capture.internalPeriods));\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"    Conversion:\\n\");\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Pre Format Conversion:  %s\\n\", pDevice->capture.converter.hasPreFormatConversion  ? \"YES\" : \"NO\");\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Post Format Conversion: %s\\n\", pDevice->capture.converter.hasPostFormatConversion ? \"YES\" : \"NO\");\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Channel Routing:        %s\\n\", pDevice->capture.converter.hasChannelConverter     ? \"YES\" : \"NO\");\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Resampling:             %s\\n\", pDevice->capture.converter.hasResampler            ? \"YES\" : \"NO\");\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Passthrough:            %s\\n\", pDevice->capture.converter.isPassthrough           ? \"YES\" : \"NO\");\n            {\n                char channelMapStr[1024];\n                ma_channel_map_to_string(pDevice->capture.internalChannelMap, pDevice->capture.internalChannels, channelMapStr, sizeof(channelMapStr));\n                ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Channel Map In:         {%s}\\n\", channelMapStr);\n\n                ma_channel_map_to_string(pDevice->capture.channelMap, pDevice->capture.channels, channelMapStr, sizeof(channelMapStr));\n                ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Channel Map Out:        {%s}\\n\", channelMapStr);\n            }\n        }\n        if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n            char name[MA_MAX_DEVICE_NAME_LENGTH + 1];\n            ma_device_get_name(pDevice, ma_device_type_playback, name, sizeof(name), NULL);\n\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"  %s (%s)\\n\", name, \"Playback\");\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"    Format:      %s -> %s\\n\", ma_get_format_name(pDevice->playback.format), ma_get_format_name(pDevice->playback.internalFormat));\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"    Channels:    %d -> %d\\n\", pDevice->playback.channels, pDevice->playback.internalChannels);\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"    Sample Rate: %d -> %d\\n\", pDevice->sampleRate, pDevice->playback.internalSampleRate);\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"    Buffer Size: %d*%d (%d)\\n\", pDevice->playback.internalPeriodSizeInFrames, pDevice->playback.internalPeriods, (pDevice->playback.internalPeriodSizeInFrames * pDevice->playback.internalPeriods));\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"    Conversion:\\n\");\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Pre Format Conversion:  %s\\n\", pDevice->playback.converter.hasPreFormatConversion  ? \"YES\" : \"NO\");\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Post Format Conversion: %s\\n\", pDevice->playback.converter.hasPostFormatConversion ? \"YES\" : \"NO\");\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Channel Routing:        %s\\n\", pDevice->playback.converter.hasChannelConverter     ? \"YES\" : \"NO\");\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Resampling:             %s\\n\", pDevice->playback.converter.hasResampler            ? \"YES\" : \"NO\");\n            ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Passthrough:            %s\\n\", pDevice->playback.converter.isPassthrough           ? \"YES\" : \"NO\");\n            {\n                char channelMapStr[1024];\n                ma_channel_map_to_string(pDevice->playback.channelMap, pDevice->playback.channels, channelMapStr, sizeof(channelMapStr));\n                ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Channel Map In:         {%s}\\n\", channelMapStr);\n\n                ma_channel_map_to_string(pDevice->playback.internalChannelMap, pDevice->playback.internalChannels, channelMapStr, sizeof(channelMapStr));\n                ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, \"      Channel Map Out:        {%s}\\n\", channelMapStr);\n            }\n        }\n    }\n\n    MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_stopped);\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_device_init_ex(const ma_backend backends[], ma_uint32 backendCount, const ma_context_config* pContextConfig, const ma_device_config* pConfig, ma_device* pDevice)\n{\n    ma_result result;\n    ma_context* pContext;\n    ma_backend defaultBackends[ma_backend_null+1];\n    ma_uint32 iBackend;\n    ma_backend* pBackendsToIterate;\n    ma_uint32 backendsToIterateCount;\n    ma_allocation_callbacks allocationCallbacks;\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pContextConfig != NULL) {\n        result = ma_allocation_callbacks_init_copy(&allocationCallbacks, &pContextConfig->allocationCallbacks);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    } else {\n        allocationCallbacks = ma_allocation_callbacks_init_default();\n    }\n\n    pContext = (ma_context*)ma_malloc(sizeof(*pContext), &allocationCallbacks);\n    if (pContext == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    for (iBackend = 0; iBackend <= ma_backend_null; ++iBackend) {\n        defaultBackends[iBackend] = (ma_backend)iBackend;\n    }\n\n    pBackendsToIterate = (ma_backend*)backends;\n    backendsToIterateCount = backendCount;\n    if (pBackendsToIterate == NULL) {\n        pBackendsToIterate = (ma_backend*)defaultBackends;\n        backendsToIterateCount = ma_countof(defaultBackends);\n    }\n\n    result = MA_NO_BACKEND;\n\n    for (iBackend = 0; iBackend < backendsToIterateCount; ++iBackend) {\n        /*\n        This is a hack for iOS. If the context config is null, there's a good chance the\n        `ma_device_init(NULL, &deviceConfig, pDevice);` pattern is being used. In this\n        case, set the session category based on the device type.\n        */\n    #if defined(MA_APPLE_MOBILE)\n        ma_context_config contextConfig;\n\n        if (pContextConfig == NULL) {\n            contextConfig = ma_context_config_init();\n            switch (pConfig->deviceType) {\n                case ma_device_type_duplex: {\n                    contextConfig.coreaudio.sessionCategory = ma_ios_session_category_play_and_record;\n                } break;\n                case ma_device_type_capture: {\n                    contextConfig.coreaudio.sessionCategory = ma_ios_session_category_record;\n                } break;\n                case ma_device_type_playback:\n                default: {\n                    contextConfig.coreaudio.sessionCategory = ma_ios_session_category_playback;\n                } break;\n            }\n\n            pContextConfig = &contextConfig;\n        }\n    #endif\n\n        result = ma_context_init(&pBackendsToIterate[iBackend], 1, pContextConfig, pContext);\n        if (result == MA_SUCCESS) {\n            result = ma_device_init(pContext, pConfig, pDevice);\n            if (result == MA_SUCCESS) {\n                break;  /* Success. */\n            } else {\n                ma_context_uninit(pContext);   /* Failure. */\n            }\n        }\n    }\n\n    if (result != MA_SUCCESS) {\n        ma_free(pContext, &allocationCallbacks);\n        return result;\n    }\n\n    pDevice->isOwnerOfContext = MA_TRUE;\n    return result;\n}\n\nMA_API void ma_device_uninit(ma_device* pDevice)\n{\n    if (!ma_device__is_initialized(pDevice)) {\n        return;\n    }\n\n    /*\n    It's possible for the miniaudio side of the device and the backend to not be in sync due to\n    system-level situations such as the computer being put into sleep mode and the backend not\n    notifying miniaudio of the fact the device has stopped. It's possible for this to result in a\n    deadlock due to miniaudio thinking the device is in a running state, when in fact it's not\n    running at all. For this reason I am no longer explicitly stopping the device. I don't think\n    this should affect anyone in practice since uninitializing the backend will naturally stop the\n    device anyway.\n    */\n    #if 0\n    {\n        /* Make sure the device is stopped first. The backends will probably handle this naturally, but I like to do it explicitly for my own sanity. */\n        if (ma_device_is_started(pDevice)) {\n            ma_device_stop(pDevice);\n        }\n    }\n    #endif\n\n    /* Putting the device into an uninitialized state will make the worker thread return. */\n    ma_device__set_state(pDevice, ma_device_state_uninitialized);\n\n    /* Wake up the worker thread and wait for it to properly terminate. */\n    if (!ma_context_is_backend_asynchronous(pDevice->pContext)) {\n        ma_event_signal(&pDevice->wakeupEvent);\n        ma_thread_wait(&pDevice->thread);\n    }\n\n    if (pDevice->pContext->callbacks.onDeviceUninit != NULL) {\n        pDevice->pContext->callbacks.onDeviceUninit(pDevice);\n    }\n\n\n    ma_event_uninit(&pDevice->stopEvent);\n    ma_event_uninit(&pDevice->startEvent);\n    ma_event_uninit(&pDevice->wakeupEvent);\n    ma_mutex_uninit(&pDevice->startStopLock);\n\n    if (ma_context_is_backend_asynchronous(pDevice->pContext)) {\n        if (pDevice->type == ma_device_type_duplex) {\n            ma_duplex_rb_uninit(&pDevice->duplexRB);\n        }\n    }\n\n    if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_duplex || pDevice->type == ma_device_type_loopback) {\n        ma_data_converter_uninit(&pDevice->capture.converter, &pDevice->pContext->allocationCallbacks);\n    }\n    if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {\n        ma_data_converter_uninit(&pDevice->playback.converter, &pDevice->pContext->allocationCallbacks);\n    }\n\n    if (pDevice->playback.pInputCache != NULL) {\n        ma_free(pDevice->playback.pInputCache, &pDevice->pContext->allocationCallbacks);\n    }\n\n    if (pDevice->capture.pIntermediaryBuffer != NULL) {\n        ma_free(pDevice->capture.pIntermediaryBuffer, &pDevice->pContext->allocationCallbacks);\n    }\n    if (pDevice->playback.pIntermediaryBuffer != NULL) {\n        ma_free(pDevice->playback.pIntermediaryBuffer, &pDevice->pContext->allocationCallbacks);\n    }\n\n    if (pDevice->isOwnerOfContext) {\n        ma_allocation_callbacks allocationCallbacks = pDevice->pContext->allocationCallbacks;\n\n        ma_context_uninit(pDevice->pContext);\n        ma_free(pDevice->pContext, &allocationCallbacks);\n    }\n\n    MA_ZERO_OBJECT(pDevice);\n}\n\nMA_API ma_context* ma_device_get_context(ma_device* pDevice)\n{\n    if (pDevice == NULL) {\n        return NULL;\n    }\n\n    return pDevice->pContext;\n}\n\nMA_API ma_log* ma_device_get_log(ma_device* pDevice)\n{\n    return ma_context_get_log(ma_device_get_context(pDevice));\n}\n\nMA_API ma_result ma_device_get_info(ma_device* pDevice, ma_device_type type, ma_device_info* pDeviceInfo)\n{\n    if (pDeviceInfo == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pDeviceInfo);\n\n    if (pDevice == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* If the onDeviceGetInfo() callback is set, use that. Otherwise we'll fall back to ma_context_get_device_info(). */\n    if (pDevice->pContext->callbacks.onDeviceGetInfo != NULL) {\n        return pDevice->pContext->callbacks.onDeviceGetInfo(pDevice, type, pDeviceInfo);\n    }\n\n    /* Getting here means onDeviceGetInfo is not implemented so we need to fall back to an alternative. */\n    if (type == ma_device_type_playback) {\n        return ma_context_get_device_info(pDevice->pContext, type, pDevice->playback.pID, pDeviceInfo);\n    } else {\n        return ma_context_get_device_info(pDevice->pContext, type, pDevice->capture.pID, pDeviceInfo);\n    }\n}\n\nMA_API ma_result ma_device_get_name(ma_device* pDevice, ma_device_type type, char* pName, size_t nameCap, size_t* pLengthNotIncludingNullTerminator)\n{\n    ma_result result;\n    ma_device_info deviceInfo;\n\n    if (pLengthNotIncludingNullTerminator != NULL) {\n        *pLengthNotIncludingNullTerminator = 0;\n    }\n\n    if (pName != NULL && nameCap > 0) {\n        pName[0] = '\\0';\n    }\n\n    result = ma_device_get_info(pDevice, type, &deviceInfo);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pName != NULL) {\n        ma_strncpy_s(pName, nameCap, deviceInfo.name, (size_t)-1);\n\n        /*\n        For safety, make sure the length is based on the truncated output string rather than the\n        source. Otherwise the caller might assume the output buffer contains more content than it\n        actually does.\n        */\n        if (pLengthNotIncludingNullTerminator != NULL) {\n            *pLengthNotIncludingNullTerminator = strlen(pName);\n        }\n    } else {\n        /* Name not specified. Just report the length of the source string. */\n        if (pLengthNotIncludingNullTerminator != NULL) {\n            *pLengthNotIncludingNullTerminator = strlen(deviceInfo.name);\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_device_start(ma_device* pDevice)\n{\n    ma_result result;\n\n    if (pDevice == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (ma_device_get_state(pDevice) == ma_device_state_uninitialized) {\n        return MA_INVALID_OPERATION;    /* Not initialized. */\n    }\n\n    if (ma_device_get_state(pDevice) == ma_device_state_started) {\n        return MA_SUCCESS;  /* Already started. */\n    }\n\n    ma_mutex_lock(&pDevice->startStopLock);\n    {\n        /* Starting and stopping are wrapped in a mutex which means we can assert that the device is in a stopped or paused state. */\n        MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_stopped);\n\n        ma_device__set_state(pDevice, ma_device_state_starting);\n\n        /* Asynchronous backends need to be handled differently. */\n        if (ma_context_is_backend_asynchronous(pDevice->pContext)) {\n            if (pDevice->pContext->callbacks.onDeviceStart != NULL) {\n                result = pDevice->pContext->callbacks.onDeviceStart(pDevice);\n            } else {\n                result = MA_INVALID_OPERATION;\n            }\n\n            if (result == MA_SUCCESS) {\n                ma_device__set_state(pDevice, ma_device_state_started);\n                ma_device__on_notification_started(pDevice);\n            }\n        } else {\n            /*\n            Synchronous backends are started by signaling an event that's being waited on in the worker thread. We first wake up the\n            thread and then wait for the start event.\n            */\n            ma_event_signal(&pDevice->wakeupEvent);\n\n            /*\n            Wait for the worker thread to finish starting the device. Note that the worker thread will be the one who puts the device\n            into the started state. Don't call ma_device__set_state() here.\n            */\n            ma_event_wait(&pDevice->startEvent);\n            result = pDevice->workResult;\n        }\n\n        /* We changed the state from stopped to started, so if we failed, make sure we put the state back to stopped. */\n        if (result != MA_SUCCESS) {\n            ma_device__set_state(pDevice, ma_device_state_stopped);\n        }\n    }\n    ma_mutex_unlock(&pDevice->startStopLock);\n\n    return result;\n}\n\nMA_API ma_result ma_device_stop(ma_device* pDevice)\n{\n    ma_result result;\n\n    if (pDevice == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (ma_device_get_state(pDevice) == ma_device_state_uninitialized) {\n        return MA_INVALID_OPERATION;    /* Not initialized. */\n    }\n\n    if (ma_device_get_state(pDevice) == ma_device_state_stopped) {\n        return MA_SUCCESS;  /* Already stopped. */\n    }\n\n    ma_mutex_lock(&pDevice->startStopLock);\n    {\n        /* Starting and stopping are wrapped in a mutex which means we can assert that the device is in a started or paused state. */\n        MA_ASSERT(ma_device_get_state(pDevice) == ma_device_state_started);\n\n        ma_device__set_state(pDevice, ma_device_state_stopping);\n\n        /* Asynchronous backends need to be handled differently. */\n        if (ma_context_is_backend_asynchronous(pDevice->pContext)) {\n            /* Asynchronous backends must have a stop operation. */\n            if (pDevice->pContext->callbacks.onDeviceStop != NULL) {\n                result = pDevice->pContext->callbacks.onDeviceStop(pDevice);\n            } else {\n                result = MA_INVALID_OPERATION;\n            }\n\n            ma_device__set_state(pDevice, ma_device_state_stopped);\n        } else {\n            /*\n            Synchronous backends. The stop callback is always called from the worker thread. Do not call the stop callback here. If\n            the backend is implementing it's own audio thread loop we'll need to wake it up if required. Note that we need to make\n            sure the state of the device is *not* playing right now, which it shouldn't be since we set it above. This is super\n            important though, so I'm asserting it here as well for extra safety in case we accidentally change something later.\n            */\n            MA_ASSERT(ma_device_get_state(pDevice) != ma_device_state_started);\n\n            if (pDevice->pContext->callbacks.onDeviceDataLoopWakeup != NULL) {\n                pDevice->pContext->callbacks.onDeviceDataLoopWakeup(pDevice);\n            }\n\n            /*\n            We need to wait for the worker thread to become available for work before returning. Note that the worker thread will be\n            the one who puts the device into the stopped state. Don't call ma_device__set_state() here.\n            */\n            ma_event_wait(&pDevice->stopEvent);\n            result = MA_SUCCESS;\n        }\n\n        /*\n        This is a safety measure to ensure the internal buffer has been cleared so any leftover\n        does not get played the next time the device starts. Ideally this should be drained by\n        the backend first.\n        */\n        pDevice->playback.intermediaryBufferLen = 0;\n        pDevice->playback.inputCacheConsumed    = 0;\n        pDevice->playback.inputCacheRemaining   = 0;\n    }\n    ma_mutex_unlock(&pDevice->startStopLock);\n\n    return result;\n}\n\nMA_API ma_bool32 ma_device_is_started(const ma_device* pDevice)\n{\n    return ma_device_get_state(pDevice) == ma_device_state_started;\n}\n\nMA_API ma_device_state ma_device_get_state(const ma_device* pDevice)\n{\n    if (pDevice == NULL) {\n        return ma_device_state_uninitialized;\n    }\n\n    return ma_atomic_device_state_get((ma_atomic_device_state*)&pDevice->state);   /* Naughty cast to get rid of a const warning. */\n}\n\nMA_API ma_result ma_device_set_master_volume(ma_device* pDevice, float volume)\n{\n    if (pDevice == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (volume < 0.0f) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_atomic_float_set(&pDevice->masterVolumeFactor, volume);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_device_get_master_volume(ma_device* pDevice, float* pVolume)\n{\n    if (pVolume == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pDevice == NULL) {\n        *pVolume = 0;\n        return MA_INVALID_ARGS;\n    }\n\n    *pVolume = ma_atomic_float_get(&pDevice->masterVolumeFactor);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_device_set_master_volume_db(ma_device* pDevice, float gainDB)\n{\n    if (gainDB > 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_device_set_master_volume(pDevice, ma_volume_db_to_linear(gainDB));\n}\n\nMA_API ma_result ma_device_get_master_volume_db(ma_device* pDevice, float* pGainDB)\n{\n    float factor;\n    ma_result result;\n\n    if (pGainDB == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_device_get_master_volume(pDevice, &factor);\n    if (result != MA_SUCCESS) {\n        *pGainDB = 0;\n        return result;\n    }\n\n    *pGainDB = ma_volume_linear_to_db(factor);\n\n    return MA_SUCCESS;\n}\n\n\nMA_API ma_result ma_device_handle_backend_data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount)\n{\n    if (pDevice == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pOutput == NULL && pInput == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pDevice->type == ma_device_type_duplex) {\n        if (pInput != NULL) {\n            ma_device__handle_duplex_callback_capture(pDevice, frameCount, pInput, &pDevice->duplexRB.rb);\n        }\n\n        if (pOutput != NULL) {\n            ma_device__handle_duplex_callback_playback(pDevice, frameCount, pOutput, &pDevice->duplexRB.rb);\n        }\n    } else {\n        if (pDevice->type == ma_device_type_capture || pDevice->type == ma_device_type_loopback) {\n            if (pInput == NULL) {\n                return MA_INVALID_ARGS;\n            }\n\n            ma_device__send_frames_to_client(pDevice, frameCount, pInput);\n        }\n\n        if (pDevice->type == ma_device_type_playback) {\n            if (pOutput == NULL) {\n                return MA_INVALID_ARGS;\n            }\n\n            ma_device__read_frames_from_client(pDevice, frameCount, pOutput);\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_uint32 ma_calculate_buffer_size_in_frames_from_descriptor(const ma_device_descriptor* pDescriptor, ma_uint32 nativeSampleRate, ma_performance_profile performanceProfile)\n{\n    if (pDescriptor == NULL) {\n        return 0;\n    }\n\n    /*\n    We must have a non-0 native sample rate, but some backends don't allow retrieval of this at the\n    time when the size of the buffer needs to be determined. In this case we need to just take a best\n    guess and move on. We'll try using the sample rate in pDescriptor first. If that's not set we'll\n    just fall back to MA_DEFAULT_SAMPLE_RATE.\n    */\n    if (nativeSampleRate == 0) {\n        nativeSampleRate = pDescriptor->sampleRate;\n    }\n    if (nativeSampleRate == 0) {\n        nativeSampleRate = MA_DEFAULT_SAMPLE_RATE;\n    }\n\n    MA_ASSERT(nativeSampleRate != 0);\n\n    if (pDescriptor->periodSizeInFrames == 0) {\n        if (pDescriptor->periodSizeInMilliseconds == 0) {\n            if (performanceProfile == ma_performance_profile_low_latency) {\n                return ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_LOW_LATENCY, nativeSampleRate);\n            } else {\n                return ma_calculate_buffer_size_in_frames_from_milliseconds(MA_DEFAULT_PERIOD_SIZE_IN_MILLISECONDS_CONSERVATIVE, nativeSampleRate);\n            }\n        } else {\n            return ma_calculate_buffer_size_in_frames_from_milliseconds(pDescriptor->periodSizeInMilliseconds, nativeSampleRate);\n        }\n    } else {\n        return pDescriptor->periodSizeInFrames;\n    }\n}\n#endif  /* MA_NO_DEVICE_IO */\n\n\nMA_API ma_uint32 ma_calculate_buffer_size_in_milliseconds_from_frames(ma_uint32 bufferSizeInFrames, ma_uint32 sampleRate)\n{\n    /* Prevent a division by zero. */\n    if (sampleRate == 0) {\n        return 0;\n    }\n\n    return bufferSizeInFrames*1000 / sampleRate;\n}\n\nMA_API ma_uint32 ma_calculate_buffer_size_in_frames_from_milliseconds(ma_uint32 bufferSizeInMilliseconds, ma_uint32 sampleRate)\n{\n    /* Prevent a division by zero. */\n    if (sampleRate == 0) {\n        return 0;\n    }\n\n    return bufferSizeInMilliseconds*sampleRate / 1000;\n}\n\nMA_API void ma_copy_pcm_frames(void* dst, const void* src, ma_uint64 frameCount, ma_format format, ma_uint32 channels)\n{\n    if (dst == src) {\n        return; /* No-op. */\n    }\n\n    ma_copy_memory_64(dst, src, frameCount * ma_get_bytes_per_frame(format, channels));\n}\n\nMA_API void ma_silence_pcm_frames(void* p, ma_uint64 frameCount, ma_format format, ma_uint32 channels)\n{\n    if (format == ma_format_u8) {\n        ma_uint64 sampleCount = frameCount * channels;\n        ma_uint64 iSample;\n        for (iSample = 0; iSample < sampleCount; iSample += 1) {\n            ((ma_uint8*)p)[iSample] = 128;\n        }\n    } else {\n        ma_zero_memory_64(p, frameCount * ma_get_bytes_per_frame(format, channels));\n    }\n}\n\nMA_API void* ma_offset_pcm_frames_ptr(void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels)\n{\n    return ma_offset_ptr(p, offsetInFrames * ma_get_bytes_per_frame(format, channels));\n}\n\nMA_API const void* ma_offset_pcm_frames_const_ptr(const void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels)\n{\n    return ma_offset_ptr(p, offsetInFrames * ma_get_bytes_per_frame(format, channels));\n}\n\n\nMA_API void ma_clip_samples_u8(ma_uint8* pDst, const ma_int16* pSrc, ma_uint64 count)\n{\n    ma_uint64 iSample;\n\n    MA_ASSERT(pDst != NULL);\n    MA_ASSERT(pSrc != NULL);\n\n    for (iSample = 0; iSample < count; iSample += 1) {\n        pDst[iSample] = ma_clip_u8(pSrc[iSample]);\n    }\n}\n\nMA_API void ma_clip_samples_s16(ma_int16* pDst, const ma_int32* pSrc, ma_uint64 count)\n{\n    ma_uint64 iSample;\n\n    MA_ASSERT(pDst != NULL);\n    MA_ASSERT(pSrc != NULL);\n\n    for (iSample = 0; iSample < count; iSample += 1) {\n        pDst[iSample] = ma_clip_s16(pSrc[iSample]);\n    }\n}\n\nMA_API void ma_clip_samples_s24(ma_uint8* pDst, const ma_int64* pSrc, ma_uint64 count)\n{\n    ma_uint64 iSample;\n\n    MA_ASSERT(pDst != NULL);\n    MA_ASSERT(pSrc != NULL);\n\n    for (iSample = 0; iSample < count; iSample += 1) {\n        ma_int64 s = ma_clip_s24(pSrc[iSample]);\n        pDst[iSample*3 + 0] = (ma_uint8)((s & 0x000000FF) >>  0);\n        pDst[iSample*3 + 1] = (ma_uint8)((s & 0x0000FF00) >>  8);\n        pDst[iSample*3 + 2] = (ma_uint8)((s & 0x00FF0000) >> 16);\n    }\n}\n\nMA_API void ma_clip_samples_s32(ma_int32* pDst, const ma_int64* pSrc, ma_uint64 count)\n{\n    ma_uint64 iSample;\n\n    MA_ASSERT(pDst != NULL);\n    MA_ASSERT(pSrc != NULL);\n\n    for (iSample = 0; iSample < count; iSample += 1) {\n        pDst[iSample] = ma_clip_s32(pSrc[iSample]);\n    }\n}\n\nMA_API void ma_clip_samples_f32(float* pDst, const float* pSrc, ma_uint64 count)\n{\n    ma_uint64 iSample;\n\n    MA_ASSERT(pDst != NULL);\n    MA_ASSERT(pSrc != NULL);\n\n    for (iSample = 0; iSample < count; iSample += 1) {\n        pDst[iSample] = ma_clip_f32(pSrc[iSample]);\n    }\n}\n\nMA_API void ma_clip_pcm_frames(void* pDst, const void* pSrc, ma_uint64 frameCount, ma_format format, ma_uint32 channels)\n{\n    ma_uint64 sampleCount;\n\n    MA_ASSERT(pDst != NULL);\n    MA_ASSERT(pSrc != NULL);\n\n    sampleCount = frameCount * channels;\n\n    switch (format) {\n        case ma_format_u8:  ma_clip_samples_u8( (ma_uint8*)pDst, (const ma_int16*)pSrc, sampleCount); break;\n        case ma_format_s16: ma_clip_samples_s16((ma_int16*)pDst, (const ma_int32*)pSrc, sampleCount); break;\n        case ma_format_s24: ma_clip_samples_s24((ma_uint8*)pDst, (const ma_int64*)pSrc, sampleCount); break;\n        case ma_format_s32: ma_clip_samples_s32((ma_int32*)pDst, (const ma_int64*)pSrc, sampleCount); break;\n        case ma_format_f32: ma_clip_samples_f32((   float*)pDst, (const    float*)pSrc, sampleCount); break;\n\n        /* Do nothing if we don't know the format. We're including these here to silence a compiler warning about enums not being handled by the switch. */\n        case ma_format_unknown:\n        case ma_format_count:\n            break;\n    }\n}\n\n\nMA_API void ma_copy_and_apply_volume_factor_u8(ma_uint8* pSamplesOut, const ma_uint8* pSamplesIn, ma_uint64 sampleCount, float factor)\n{\n    ma_uint64 iSample;\n\n    if (pSamplesOut == NULL || pSamplesIn == NULL) {\n        return;\n    }\n\n    for (iSample = 0; iSample < sampleCount; iSample += 1) {\n        pSamplesOut[iSample] = (ma_uint8)(pSamplesIn[iSample] * factor);\n    }\n}\n\nMA_API void ma_copy_and_apply_volume_factor_s16(ma_int16* pSamplesOut, const ma_int16* pSamplesIn, ma_uint64 sampleCount, float factor)\n{\n    ma_uint64 iSample;\n\n    if (pSamplesOut == NULL || pSamplesIn == NULL) {\n        return;\n    }\n\n    for (iSample = 0; iSample < sampleCount; iSample += 1) {\n        pSamplesOut[iSample] = (ma_int16)(pSamplesIn[iSample] * factor);\n    }\n}\n\nMA_API void ma_copy_and_apply_volume_factor_s24(void* pSamplesOut, const void* pSamplesIn, ma_uint64 sampleCount, float factor)\n{\n    ma_uint64 iSample;\n    ma_uint8* pSamplesOut8;\n    ma_uint8* pSamplesIn8;\n\n    if (pSamplesOut == NULL || pSamplesIn == NULL) {\n        return;\n    }\n\n    pSamplesOut8 = (ma_uint8*)pSamplesOut;\n    pSamplesIn8  = (ma_uint8*)pSamplesIn;\n\n    for (iSample = 0; iSample < sampleCount; iSample += 1) {\n        ma_int32 sampleS32;\n\n        sampleS32 = (ma_int32)(((ma_uint32)(pSamplesIn8[iSample*3+0]) << 8) | ((ma_uint32)(pSamplesIn8[iSample*3+1]) << 16) | ((ma_uint32)(pSamplesIn8[iSample*3+2])) << 24);\n        sampleS32 = (ma_int32)(sampleS32 * factor);\n\n        pSamplesOut8[iSample*3+0] = (ma_uint8)(((ma_uint32)sampleS32 & 0x0000FF00) >>  8);\n        pSamplesOut8[iSample*3+1] = (ma_uint8)(((ma_uint32)sampleS32 & 0x00FF0000) >> 16);\n        pSamplesOut8[iSample*3+2] = (ma_uint8)(((ma_uint32)sampleS32 & 0xFF000000) >> 24);\n    }\n}\n\nMA_API void ma_copy_and_apply_volume_factor_s32(ma_int32* pSamplesOut, const ma_int32* pSamplesIn, ma_uint64 sampleCount, float factor)\n{\n    ma_uint64 iSample;\n\n    if (pSamplesOut == NULL || pSamplesIn == NULL) {\n        return;\n    }\n\n    for (iSample = 0; iSample < sampleCount; iSample += 1) {\n        pSamplesOut[iSample] = (ma_int32)(pSamplesIn[iSample] * factor);\n    }\n}\n\nMA_API void ma_copy_and_apply_volume_factor_f32(float* pSamplesOut, const float* pSamplesIn, ma_uint64 sampleCount, float factor)\n{\n    ma_uint64 iSample;\n\n    if (pSamplesOut == NULL || pSamplesIn == NULL) {\n        return;\n    }\n\n    if (factor == 1) {\n        if (pSamplesOut == pSamplesIn) {\n            /* In place. No-op. */\n        } else {\n            /* Just a copy. */\n            for (iSample = 0; iSample < sampleCount; iSample += 1) {\n                pSamplesOut[iSample] = pSamplesIn[iSample];\n            }\n        }\n    } else {\n        for (iSample = 0; iSample < sampleCount; iSample += 1) {\n            pSamplesOut[iSample] = pSamplesIn[iSample] * factor;\n        }\n    }\n}\n\nMA_API void ma_apply_volume_factor_u8(ma_uint8* pSamples, ma_uint64 sampleCount, float factor)\n{\n    ma_copy_and_apply_volume_factor_u8(pSamples, pSamples, sampleCount, factor);\n}\n\nMA_API void ma_apply_volume_factor_s16(ma_int16* pSamples, ma_uint64 sampleCount, float factor)\n{\n    ma_copy_and_apply_volume_factor_s16(pSamples, pSamples, sampleCount, factor);\n}\n\nMA_API void ma_apply_volume_factor_s24(void* pSamples, ma_uint64 sampleCount, float factor)\n{\n    ma_copy_and_apply_volume_factor_s24(pSamples, pSamples, sampleCount, factor);\n}\n\nMA_API void ma_apply_volume_factor_s32(ma_int32* pSamples, ma_uint64 sampleCount, float factor)\n{\n    ma_copy_and_apply_volume_factor_s32(pSamples, pSamples, sampleCount, factor);\n}\n\nMA_API void ma_apply_volume_factor_f32(float* pSamples, ma_uint64 sampleCount, float factor)\n{\n    ma_copy_and_apply_volume_factor_f32(pSamples, pSamples, sampleCount, factor);\n}\n\nMA_API void ma_copy_and_apply_volume_factor_pcm_frames_u8(ma_uint8* pFramesOut, const ma_uint8* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor)\n{\n    ma_copy_and_apply_volume_factor_u8(pFramesOut, pFramesIn, frameCount*channels, factor);\n}\n\nMA_API void ma_copy_and_apply_volume_factor_pcm_frames_s16(ma_int16* pFramesOut, const ma_int16* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor)\n{\n    ma_copy_and_apply_volume_factor_s16(pFramesOut, pFramesIn, frameCount*channels, factor);\n}\n\nMA_API void ma_copy_and_apply_volume_factor_pcm_frames_s24(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor)\n{\n    ma_copy_and_apply_volume_factor_s24(pFramesOut, pFramesIn, frameCount*channels, factor);\n}\n\nMA_API void ma_copy_and_apply_volume_factor_pcm_frames_s32(ma_int32* pFramesOut, const ma_int32* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor)\n{\n    ma_copy_and_apply_volume_factor_s32(pFramesOut, pFramesIn, frameCount*channels, factor);\n}\n\nMA_API void ma_copy_and_apply_volume_factor_pcm_frames_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float factor)\n{\n    ma_copy_and_apply_volume_factor_f32(pFramesOut, pFramesIn, frameCount*channels, factor);\n}\n\nMA_API void ma_copy_and_apply_volume_factor_pcm_frames(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float factor)\n{\n    switch (format)\n    {\n    case ma_format_u8:  ma_copy_and_apply_volume_factor_pcm_frames_u8 ((ma_uint8*)pFramesOut, (const ma_uint8*)pFramesIn, frameCount, channels, factor); return;\n    case ma_format_s16: ma_copy_and_apply_volume_factor_pcm_frames_s16((ma_int16*)pFramesOut, (const ma_int16*)pFramesIn, frameCount, channels, factor); return;\n    case ma_format_s24: ma_copy_and_apply_volume_factor_pcm_frames_s24(           pFramesOut,                  pFramesIn, frameCount, channels, factor); return;\n    case ma_format_s32: ma_copy_and_apply_volume_factor_pcm_frames_s32((ma_int32*)pFramesOut, (const ma_int32*)pFramesIn, frameCount, channels, factor); return;\n    case ma_format_f32: ma_copy_and_apply_volume_factor_pcm_frames_f32(   (float*)pFramesOut,    (const float*)pFramesIn, frameCount, channels, factor); return;\n    default: return;    /* Do nothing. */\n    }\n}\n\nMA_API void ma_apply_volume_factor_pcm_frames_u8(ma_uint8* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor)\n{\n    ma_copy_and_apply_volume_factor_pcm_frames_u8(pFrames, pFrames, frameCount, channels, factor);\n}\n\nMA_API void ma_apply_volume_factor_pcm_frames_s16(ma_int16* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor)\n{\n    ma_copy_and_apply_volume_factor_pcm_frames_s16(pFrames, pFrames, frameCount, channels, factor);\n}\n\nMA_API void ma_apply_volume_factor_pcm_frames_s24(void* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor)\n{\n    ma_copy_and_apply_volume_factor_pcm_frames_s24(pFrames, pFrames, frameCount, channels, factor);\n}\n\nMA_API void ma_apply_volume_factor_pcm_frames_s32(ma_int32* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor)\n{\n    ma_copy_and_apply_volume_factor_pcm_frames_s32(pFrames, pFrames, frameCount, channels, factor);\n}\n\nMA_API void ma_apply_volume_factor_pcm_frames_f32(float* pFrames, ma_uint64 frameCount, ma_uint32 channels, float factor)\n{\n    ma_copy_and_apply_volume_factor_pcm_frames_f32(pFrames, pFrames, frameCount, channels, factor);\n}\n\nMA_API void ma_apply_volume_factor_pcm_frames(void* pFramesOut, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float factor)\n{\n    ma_copy_and_apply_volume_factor_pcm_frames(pFramesOut, pFramesOut, frameCount, format, channels, factor);\n}\n\n\nMA_API void ma_copy_and_apply_volume_factor_per_channel_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, ma_uint32 channels, float* pChannelGains)\n{\n    ma_uint64 iFrame;\n\n    if (channels == 2) {\n        /* TODO: Do an optimized implementation for stereo and mono. Can do a SIMD optimized implementation as well. */\n    }\n\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        ma_uint32 iChannel;\n        for (iChannel = 0; iChannel < channels; iChannel += 1) {\n            pFramesOut[iFrame * channels + iChannel] = pFramesIn[iFrame * channels + iChannel] * pChannelGains[iChannel];\n        }\n    }\n}\n\n\n\nstatic MA_INLINE ma_int16 ma_apply_volume_unclipped_u8(ma_int16 x, ma_int16 volume)\n{\n    return (ma_int16)(((ma_int32)x * (ma_int32)volume) >> 8);\n}\n\nstatic MA_INLINE ma_int32 ma_apply_volume_unclipped_s16(ma_int32 x, ma_int16 volume)\n{\n    return (ma_int32)((x * volume) >> 8);\n}\n\nstatic MA_INLINE ma_int64 ma_apply_volume_unclipped_s24(ma_int64 x, ma_int16 volume)\n{\n    return (ma_int64)((x * volume) >> 8);\n}\n\nstatic MA_INLINE ma_int64 ma_apply_volume_unclipped_s32(ma_int64 x, ma_int16 volume)\n{\n    return (ma_int64)((x * volume) >> 8);\n}\n\nstatic MA_INLINE float ma_apply_volume_unclipped_f32(float x, float volume)\n{\n    return x * volume;\n}\n\n\nMA_API void ma_copy_and_apply_volume_and_clip_samples_u8(ma_uint8* pDst, const ma_int16* pSrc, ma_uint64 count, float volume)\n{\n    ma_uint64 iSample;\n    ma_int16  volumeFixed;\n\n    MA_ASSERT(pDst != NULL);\n    MA_ASSERT(pSrc != NULL);\n\n    volumeFixed = ma_float_to_fixed_16(volume);\n\n    for (iSample = 0; iSample < count; iSample += 1) {\n        pDst[iSample] = ma_clip_u8(ma_apply_volume_unclipped_u8(pSrc[iSample], volumeFixed));\n    }\n}\n\nMA_API void ma_copy_and_apply_volume_and_clip_samples_s16(ma_int16* pDst, const ma_int32* pSrc, ma_uint64 count, float volume)\n{\n    ma_uint64 iSample;\n    ma_int16  volumeFixed;\n\n    MA_ASSERT(pDst != NULL);\n    MA_ASSERT(pSrc != NULL);\n\n    volumeFixed = ma_float_to_fixed_16(volume);\n\n    for (iSample = 0; iSample < count; iSample += 1) {\n        pDst[iSample] = ma_clip_s16(ma_apply_volume_unclipped_s16(pSrc[iSample], volumeFixed));\n    }\n}\n\nMA_API void ma_copy_and_apply_volume_and_clip_samples_s24(ma_uint8* pDst, const ma_int64* pSrc, ma_uint64 count, float volume)\n{\n    ma_uint64 iSample;\n    ma_int16  volumeFixed;\n\n    MA_ASSERT(pDst != NULL);\n    MA_ASSERT(pSrc != NULL);\n\n    volumeFixed = ma_float_to_fixed_16(volume);\n\n    for (iSample = 0; iSample < count; iSample += 1) {\n        ma_int64 s = ma_clip_s24(ma_apply_volume_unclipped_s24(pSrc[iSample], volumeFixed));\n        pDst[iSample*3 + 0] = (ma_uint8)((s & 0x000000FF) >>  0);\n        pDst[iSample*3 + 1] = (ma_uint8)((s & 0x0000FF00) >>  8);\n        pDst[iSample*3 + 2] = (ma_uint8)((s & 0x00FF0000) >> 16);\n    }\n}\n\nMA_API void ma_copy_and_apply_volume_and_clip_samples_s32(ma_int32* pDst, const ma_int64* pSrc, ma_uint64 count, float volume)\n{\n    ma_uint64 iSample;\n    ma_int16  volumeFixed;\n\n    MA_ASSERT(pDst != NULL);\n    MA_ASSERT(pSrc != NULL);\n\n    volumeFixed = ma_float_to_fixed_16(volume);\n\n    for (iSample = 0; iSample < count; iSample += 1) {\n        pDst[iSample] = ma_clip_s32(ma_apply_volume_unclipped_s32(pSrc[iSample], volumeFixed));\n    }\n}\n\nMA_API void ma_copy_and_apply_volume_and_clip_samples_f32(float* pDst, const float* pSrc, ma_uint64 count, float volume)\n{\n    ma_uint64 iSample;\n\n    MA_ASSERT(pDst != NULL);\n    MA_ASSERT(pSrc != NULL);\n\n    /* For the f32 case we need to make sure this supports in-place processing where the input and output buffers are the same. */\n\n    for (iSample = 0; iSample < count; iSample += 1) {\n        pDst[iSample] = ma_clip_f32(ma_apply_volume_unclipped_f32(pSrc[iSample], volume));\n    }\n}\n\nMA_API void ma_copy_and_apply_volume_and_clip_pcm_frames(void* pDst, const void* pSrc, ma_uint64 frameCount, ma_format format, ma_uint32 channels, float volume)\n{\n    MA_ASSERT(pDst != NULL);\n    MA_ASSERT(pSrc != NULL);\n\n    if (volume == 1) {\n        ma_clip_pcm_frames(pDst, pSrc, frameCount, format, channels);   /* Optimized case for volume = 1. */\n    } else if (volume == 0) {\n        ma_silence_pcm_frames(pDst, frameCount, format, channels);      /* Optimized case for volume = 0. */\n    } else {\n        ma_uint64 sampleCount = frameCount * channels;\n\n        switch (format) {\n            case ma_format_u8:  ma_copy_and_apply_volume_and_clip_samples_u8( (ma_uint8*)pDst, (const ma_int16*)pSrc, sampleCount, volume); break;\n            case ma_format_s16: ma_copy_and_apply_volume_and_clip_samples_s16((ma_int16*)pDst, (const ma_int32*)pSrc, sampleCount, volume); break;\n            case ma_format_s24: ma_copy_and_apply_volume_and_clip_samples_s24((ma_uint8*)pDst, (const ma_int64*)pSrc, sampleCount, volume); break;\n            case ma_format_s32: ma_copy_and_apply_volume_and_clip_samples_s32((ma_int32*)pDst, (const ma_int64*)pSrc, sampleCount, volume); break;\n            case ma_format_f32: ma_copy_and_apply_volume_and_clip_samples_f32((   float*)pDst, (const    float*)pSrc, sampleCount, volume); break;\n\n            /* Do nothing if we don't know the format. We're including these here to silence a compiler warning about enums not being handled by the switch. */\n            case ma_format_unknown:\n            case ma_format_count:\n                break;\n        }\n    }\n}\n\n\n\nMA_API float ma_volume_linear_to_db(float factor)\n{\n    return 20*ma_log10f(factor);\n}\n\nMA_API float ma_volume_db_to_linear(float gain)\n{\n    return ma_powf(10, gain/20.0f);\n}\n\n\nMA_API ma_result ma_mix_pcm_frames_f32(float* pDst, const float* pSrc, ma_uint64 frameCount, ma_uint32 channels, float volume)\n{\n    ma_uint64 iSample;\n    ma_uint64 sampleCount;\n\n    if (pDst == NULL || pSrc == NULL || channels == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (volume == 0) {\n        return MA_SUCCESS;  /* No changes if the volume is 0. */\n    }\n\n    sampleCount = frameCount * channels;\n\n    if (volume == 1) {\n        for (iSample = 0; iSample < sampleCount; iSample += 1) {\n            pDst[iSample] += pSrc[iSample];\n        }\n    } else {\n        for (iSample = 0; iSample < sampleCount; iSample += 1) {\n            pDst[iSample] += ma_apply_volume_unclipped_f32(pSrc[iSample], volume);\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\n\n\n/**************************************************************************************************************************************************************\n\nFormat Conversion\n\n**************************************************************************************************************************************************************/\n\nstatic MA_INLINE ma_int16 ma_pcm_sample_f32_to_s16(float x)\n{\n    return (ma_int16)(x * 32767.0f);\n}\n\nstatic MA_INLINE ma_int16 ma_pcm_sample_u8_to_s16_no_scale(ma_uint8 x)\n{\n    return (ma_int16)((ma_int16)x - 128);\n}\n\nstatic MA_INLINE ma_int64 ma_pcm_sample_s24_to_s32_no_scale(const ma_uint8* x)\n{\n    return (ma_int64)(((ma_uint64)x[0] << 40) | ((ma_uint64)x[1] << 48) | ((ma_uint64)x[2] << 56)) >> 40;  /* Make sure the sign bits are maintained. */\n}\n\nstatic MA_INLINE void ma_pcm_sample_s32_to_s24_no_scale(ma_int64 x, ma_uint8* s24)\n{\n    s24[0] = (ma_uint8)((x & 0x000000FF) >>  0);\n    s24[1] = (ma_uint8)((x & 0x0000FF00) >>  8);\n    s24[2] = (ma_uint8)((x & 0x00FF0000) >> 16);\n}\n\n\n/* u8 */\nMA_API void ma_pcm_u8_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    (void)ditherMode;\n    ma_copy_memory_64(dst, src, count * sizeof(ma_uint8));\n}\n\n\nstatic MA_INLINE void ma_pcm_u8_to_s16__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_int16* dst_s16 = (ma_int16*)dst;\n    const ma_uint8* src_u8 = (const ma_uint8*)src;\n\n    ma_uint64 i;\n    for (i = 0; i < count; i += 1) {\n        ma_int16 x = src_u8[i];\n        x = (ma_int16)(x - 128);\n        x = (ma_int16)(x << 8);\n        dst_s16[i] = x;\n    }\n\n    (void)ditherMode;\n}\n\nstatic MA_INLINE void ma_pcm_u8_to_s16__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_u8_to_s16__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_u8_to_s16__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_u8_to_s16__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_u8_to_s16__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_u8_to_s16__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_u8_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_u8_to_s16__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_u8_to_s16__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_u8_to_s16__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_u8_to_s16__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_u8_to_s24__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_uint8* dst_s24 = (ma_uint8*)dst;\n    const ma_uint8* src_u8 = (const ma_uint8*)src;\n\n    ma_uint64 i;\n    for (i = 0; i < count; i += 1) {\n        ma_int16 x = src_u8[i];\n        x = (ma_int16)(x - 128);\n\n        dst_s24[i*3+0] = 0;\n        dst_s24[i*3+1] = 0;\n        dst_s24[i*3+2] = (ma_uint8)((ma_int8)x);\n    }\n\n    (void)ditherMode;\n}\n\nstatic MA_INLINE void ma_pcm_u8_to_s24__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_u8_to_s24__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_u8_to_s24__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_u8_to_s24__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_u8_to_s24__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_u8_to_s24__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_u8_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_u8_to_s24__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_u8_to_s24__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_u8_to_s24__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_u8_to_s24__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_u8_to_s32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_int32* dst_s32 = (ma_int32*)dst;\n    const ma_uint8* src_u8 = (const ma_uint8*)src;\n\n    ma_uint64 i;\n    for (i = 0; i < count; i += 1) {\n        ma_int32 x = src_u8[i];\n        x = x - 128;\n        x = x << 24;\n        dst_s32[i] = x;\n    }\n\n    (void)ditherMode;\n}\n\nstatic MA_INLINE void ma_pcm_u8_to_s32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_u8_to_s32__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_u8_to_s32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_u8_to_s32__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_u8_to_s32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_u8_to_s32__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_u8_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_u8_to_s32__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_u8_to_s32__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_u8_to_s32__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_u8_to_s32__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_u8_to_f32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    float* dst_f32 = (float*)dst;\n    const ma_uint8* src_u8 = (const ma_uint8*)src;\n\n    ma_uint64 i;\n    for (i = 0; i < count; i += 1) {\n        float x = (float)src_u8[i];\n        x = x * 0.00784313725490196078f;    /* 0..255 to 0..2 */\n        x = x - 1;                          /* 0..2 to -1..1 */\n\n        dst_f32[i] = x;\n    }\n\n    (void)ditherMode;\n}\n\nstatic MA_INLINE void ma_pcm_u8_to_f32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_u8_to_f32__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_u8_to_f32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_u8_to_f32__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_u8_to_f32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_u8_to_f32__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_u8_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_u8_to_f32__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_u8_to_f32__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_u8_to_f32__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_u8_to_f32__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\nstatic MA_INLINE void ma_pcm_interleave_u8__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_uint8* dst_u8 = (ma_uint8*)dst;\n    const ma_uint8** src_u8 = (const ma_uint8**)src;\n\n    ma_uint64 iFrame;\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        ma_uint32 iChannel;\n        for (iChannel = 0; iChannel < channels; iChannel += 1) {\n            dst_u8[iFrame*channels + iChannel] = src_u8[iChannel][iFrame];\n        }\n    }\n}\n#else\nstatic MA_INLINE void ma_pcm_interleave_u8__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_uint8* dst_u8 = (ma_uint8*)dst;\n    const ma_uint8** src_u8 = (const ma_uint8**)src;\n\n    if (channels == 1) {\n        ma_copy_memory_64(dst, src[0], frameCount * sizeof(ma_uint8));\n    } else if (channels == 2) {\n        ma_uint64 iFrame;\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            dst_u8[iFrame*2 + 0] = src_u8[0][iFrame];\n            dst_u8[iFrame*2 + 1] = src_u8[1][iFrame];\n        }\n    } else {\n        ma_uint64 iFrame;\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            ma_uint32 iChannel;\n            for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                dst_u8[iFrame*channels + iChannel] = src_u8[iChannel][iFrame];\n            }\n        }\n    }\n}\n#endif\n\nMA_API void ma_pcm_interleave_u8(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_interleave_u8__reference(dst, src, frameCount, channels);\n#else\n    ma_pcm_interleave_u8__optimized(dst, src, frameCount, channels);\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_deinterleave_u8__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_uint8** dst_u8 = (ma_uint8**)dst;\n    const ma_uint8* src_u8 = (const ma_uint8*)src;\n\n    ma_uint64 iFrame;\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        ma_uint32 iChannel;\n        for (iChannel = 0; iChannel < channels; iChannel += 1) {\n            dst_u8[iChannel][iFrame] = src_u8[iFrame*channels + iChannel];\n        }\n    }\n}\n\nstatic MA_INLINE void ma_pcm_deinterleave_u8__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_pcm_deinterleave_u8__reference(dst, src, frameCount, channels);\n}\n\nMA_API void ma_pcm_deinterleave_u8(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_deinterleave_u8__reference(dst, src, frameCount, channels);\n#else\n    ma_pcm_deinterleave_u8__optimized(dst, src, frameCount, channels);\n#endif\n}\n\n\n/* s16 */\nstatic MA_INLINE void ma_pcm_s16_to_u8__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_uint8* dst_u8 = (ma_uint8*)dst;\n    const ma_int16* src_s16 = (const ma_int16*)src;\n\n    if (ditherMode == ma_dither_mode_none) {\n        ma_uint64 i;\n        for (i = 0; i < count; i += 1) {\n            ma_int16 x = src_s16[i];\n            x = (ma_int16)(x >> 8);\n            x = (ma_int16)(x + 128);\n            dst_u8[i] = (ma_uint8)x;\n        }\n    } else {\n        ma_uint64 i;\n        for (i = 0; i < count; i += 1) {\n            ma_int16 x = src_s16[i];\n\n            /* Dither. Don't overflow. */\n            ma_int32 dither = ma_dither_s32(ditherMode, -0x80, 0x7F);\n            if ((x + dither) <= 0x7FFF) {\n                x = (ma_int16)(x + dither);\n            } else {\n                x = 0x7FFF;\n            }\n\n            x = (ma_int16)(x >> 8);\n            x = (ma_int16)(x + 128);\n            dst_u8[i] = (ma_uint8)x;\n        }\n    }\n}\n\nstatic MA_INLINE void ma_pcm_s16_to_u8__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s16_to_u8__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_s16_to_u8__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s16_to_u8__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_s16_to_u8__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s16_to_u8__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_s16_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_s16_to_u8__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_s16_to_u8__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_s16_to_u8__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_s16_to_u8__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nMA_API void ma_pcm_s16_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    (void)ditherMode;\n    ma_copy_memory_64(dst, src, count * sizeof(ma_int16));\n}\n\n\nstatic MA_INLINE void ma_pcm_s16_to_s24__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_uint8* dst_s24 = (ma_uint8*)dst;\n    const ma_int16* src_s16 = (const ma_int16*)src;\n\n    ma_uint64 i;\n    for (i = 0; i < count; i += 1) {\n        dst_s24[i*3+0] = 0;\n        dst_s24[i*3+1] = (ma_uint8)(src_s16[i] & 0xFF);\n        dst_s24[i*3+2] = (ma_uint8)(src_s16[i] >> 8);\n    }\n\n    (void)ditherMode;\n}\n\nstatic MA_INLINE void ma_pcm_s16_to_s24__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s16_to_s24__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_s16_to_s24__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s16_to_s24__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_s16_to_s24__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s16_to_s24__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_s16_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_s16_to_s24__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_s16_to_s24__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_s16_to_s24__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_s16_to_s24__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_s16_to_s32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_int32* dst_s32 = (ma_int32*)dst;\n    const ma_int16* src_s16 = (const ma_int16*)src;\n\n    ma_uint64 i;\n    for (i = 0; i < count; i += 1) {\n        dst_s32[i] = src_s16[i] << 16;\n    }\n\n    (void)ditherMode;\n}\n\nstatic MA_INLINE void ma_pcm_s16_to_s32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s16_to_s32__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_s16_to_s32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s16_to_s32__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_s16_to_s32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s16_to_s32__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_s16_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_s16_to_s32__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_s16_to_s32__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_s16_to_s32__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_s16_to_s32__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_s16_to_f32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    float* dst_f32 = (float*)dst;\n    const ma_int16* src_s16 = (const ma_int16*)src;\n\n    ma_uint64 i;\n    for (i = 0; i < count; i += 1) {\n        float x = (float)src_s16[i];\n\n#if 0\n        /* The accurate way. */\n        x = x + 32768.0f;                   /* -32768..32767 to 0..65535 */\n        x = x * 0.00003051804379339284f;    /* 0..65535 to 0..2 */\n        x = x - 1;                          /* 0..2 to -1..1 */\n#else\n        /* The fast way. */\n        x = x * 0.000030517578125f;         /* -32768..32767 to -1..0.999969482421875 */\n#endif\n\n        dst_f32[i] = x;\n    }\n\n    (void)ditherMode;\n}\n\nstatic MA_INLINE void ma_pcm_s16_to_f32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s16_to_f32__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_s16_to_f32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s16_to_f32__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_s16_to_f32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s16_to_f32__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_s16_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_s16_to_f32__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_s16_to_f32__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_s16_to_f32__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_s16_to_f32__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_interleave_s16__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_int16* dst_s16 = (ma_int16*)dst;\n    const ma_int16** src_s16 = (const ma_int16**)src;\n\n    ma_uint64 iFrame;\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        ma_uint32 iChannel;\n        for (iChannel = 0; iChannel < channels; iChannel += 1) {\n            dst_s16[iFrame*channels + iChannel] = src_s16[iChannel][iFrame];\n        }\n    }\n}\n\nstatic MA_INLINE void ma_pcm_interleave_s16__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_pcm_interleave_s16__reference(dst, src, frameCount, channels);\n}\n\nMA_API void ma_pcm_interleave_s16(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_interleave_s16__reference(dst, src, frameCount, channels);\n#else\n    ma_pcm_interleave_s16__optimized(dst, src, frameCount, channels);\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_deinterleave_s16__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_int16** dst_s16 = (ma_int16**)dst;\n    const ma_int16* src_s16 = (const ma_int16*)src;\n\n    ma_uint64 iFrame;\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        ma_uint32 iChannel;\n        for (iChannel = 0; iChannel < channels; iChannel += 1) {\n            dst_s16[iChannel][iFrame] = src_s16[iFrame*channels + iChannel];\n        }\n    }\n}\n\nstatic MA_INLINE void ma_pcm_deinterleave_s16__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_pcm_deinterleave_s16__reference(dst, src, frameCount, channels);\n}\n\nMA_API void ma_pcm_deinterleave_s16(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_deinterleave_s16__reference(dst, src, frameCount, channels);\n#else\n    ma_pcm_deinterleave_s16__optimized(dst, src, frameCount, channels);\n#endif\n}\n\n\n/* s24 */\nstatic MA_INLINE void ma_pcm_s24_to_u8__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_uint8* dst_u8 = (ma_uint8*)dst;\n    const ma_uint8* src_s24 = (const ma_uint8*)src;\n\n    if (ditherMode == ma_dither_mode_none) {\n        ma_uint64 i;\n        for (i = 0; i < count; i += 1) {\n            dst_u8[i] = (ma_uint8)((ma_int8)src_s24[i*3 + 2] + 128);\n        }\n    } else {\n        ma_uint64 i;\n        for (i = 0; i < count; i += 1) {\n            ma_int32 x = (ma_int32)(((ma_uint32)(src_s24[i*3+0]) << 8) | ((ma_uint32)(src_s24[i*3+1]) << 16) | ((ma_uint32)(src_s24[i*3+2])) << 24);\n\n            /* Dither. Don't overflow. */\n            ma_int32 dither = ma_dither_s32(ditherMode, -0x800000, 0x7FFFFF);\n            if ((ma_int64)x + dither <= 0x7FFFFFFF) {\n                x = x + dither;\n            } else {\n                x = 0x7FFFFFFF;\n            }\n\n            x = x >> 24;\n            x = x + 128;\n            dst_u8[i] = (ma_uint8)x;\n        }\n    }\n}\n\nstatic MA_INLINE void ma_pcm_s24_to_u8__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s24_to_u8__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_s24_to_u8__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s24_to_u8__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_s24_to_u8__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s24_to_u8__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_s24_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_s24_to_u8__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_s24_to_u8__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_s24_to_u8__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_s24_to_u8__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_s24_to_s16__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_int16* dst_s16 = (ma_int16*)dst;\n    const ma_uint8* src_s24 = (const ma_uint8*)src;\n\n    if (ditherMode == ma_dither_mode_none) {\n        ma_uint64 i;\n        for (i = 0; i < count; i += 1) {\n            ma_uint16 dst_lo =            ((ma_uint16)src_s24[i*3 + 1]);\n            ma_uint16 dst_hi = (ma_uint16)((ma_uint16)src_s24[i*3 + 2] << 8);\n            dst_s16[i] = (ma_int16)(dst_lo | dst_hi);\n        }\n    } else {\n        ma_uint64 i;\n        for (i = 0; i < count; i += 1) {\n            ma_int32 x = (ma_int32)(((ma_uint32)(src_s24[i*3+0]) << 8) | ((ma_uint32)(src_s24[i*3+1]) << 16) | ((ma_uint32)(src_s24[i*3+2])) << 24);\n\n            /* Dither. Don't overflow. */\n            ma_int32 dither = ma_dither_s32(ditherMode, -0x8000, 0x7FFF);\n            if ((ma_int64)x + dither <= 0x7FFFFFFF) {\n                x = x + dither;\n            } else {\n                x = 0x7FFFFFFF;\n            }\n\n            x = x >> 16;\n            dst_s16[i] = (ma_int16)x;\n        }\n    }\n}\n\nstatic MA_INLINE void ma_pcm_s24_to_s16__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s24_to_s16__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_s24_to_s16__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s24_to_s16__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_s24_to_s16__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s24_to_s16__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_s24_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_s24_to_s16__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_s24_to_s16__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_s24_to_s16__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_s24_to_s16__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nMA_API void ma_pcm_s24_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    (void)ditherMode;\n\n    ma_copy_memory_64(dst, src, count * 3);\n}\n\n\nstatic MA_INLINE void ma_pcm_s24_to_s32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_int32* dst_s32 = (ma_int32*)dst;\n    const ma_uint8* src_s24 = (const ma_uint8*)src;\n\n    ma_uint64 i;\n    for (i = 0; i < count; i += 1) {\n        dst_s32[i] = (ma_int32)(((ma_uint32)(src_s24[i*3+0]) << 8) | ((ma_uint32)(src_s24[i*3+1]) << 16) | ((ma_uint32)(src_s24[i*3+2])) << 24);\n    }\n\n    (void)ditherMode;\n}\n\nstatic MA_INLINE void ma_pcm_s24_to_s32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s24_to_s32__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_s24_to_s32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s24_to_s32__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_s24_to_s32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s24_to_s32__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_s24_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_s24_to_s32__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_s24_to_s32__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_s24_to_s32__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_s24_to_s32__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_s24_to_f32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    float* dst_f32 = (float*)dst;\n    const ma_uint8* src_s24 = (const ma_uint8*)src;\n\n    ma_uint64 i;\n    for (i = 0; i < count; i += 1) {\n        float x = (float)(((ma_int32)(((ma_uint32)(src_s24[i*3+0]) << 8) | ((ma_uint32)(src_s24[i*3+1]) << 16) | ((ma_uint32)(src_s24[i*3+2])) << 24)) >> 8);\n\n#if 0\n        /* The accurate way. */\n        x = x + 8388608.0f;                 /* -8388608..8388607 to 0..16777215 */\n        x = x * 0.00000011920929665621f;    /* 0..16777215 to 0..2 */\n        x = x - 1;                          /* 0..2 to -1..1 */\n#else\n        /* The fast way. */\n        x = x * 0.00000011920928955078125f; /* -8388608..8388607 to -1..0.999969482421875 */\n#endif\n\n        dst_f32[i] = x;\n    }\n\n    (void)ditherMode;\n}\n\nstatic MA_INLINE void ma_pcm_s24_to_f32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s24_to_f32__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_s24_to_f32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s24_to_f32__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_s24_to_f32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s24_to_f32__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_s24_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_s24_to_f32__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_s24_to_f32__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_s24_to_f32__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_s24_to_f32__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_interleave_s24__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_uint8* dst8 = (ma_uint8*)dst;\n    const ma_uint8** src8 = (const ma_uint8**)src;\n\n    ma_uint64 iFrame;\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        ma_uint32 iChannel;\n        for (iChannel = 0; iChannel < channels; iChannel += 1) {\n            dst8[iFrame*3*channels + iChannel*3 + 0] = src8[iChannel][iFrame*3 + 0];\n            dst8[iFrame*3*channels + iChannel*3 + 1] = src8[iChannel][iFrame*3 + 1];\n            dst8[iFrame*3*channels + iChannel*3 + 2] = src8[iChannel][iFrame*3 + 2];\n        }\n    }\n}\n\nstatic MA_INLINE void ma_pcm_interleave_s24__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_pcm_interleave_s24__reference(dst, src, frameCount, channels);\n}\n\nMA_API void ma_pcm_interleave_s24(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_interleave_s24__reference(dst, src, frameCount, channels);\n#else\n    ma_pcm_interleave_s24__optimized(dst, src, frameCount, channels);\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_deinterleave_s24__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_uint8** dst8 = (ma_uint8**)dst;\n    const ma_uint8* src8 = (const ma_uint8*)src;\n\n    ma_uint32 iFrame;\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        ma_uint32 iChannel;\n        for (iChannel = 0; iChannel < channels; iChannel += 1) {\n            dst8[iChannel][iFrame*3 + 0] = src8[iFrame*3*channels + iChannel*3 + 0];\n            dst8[iChannel][iFrame*3 + 1] = src8[iFrame*3*channels + iChannel*3 + 1];\n            dst8[iChannel][iFrame*3 + 2] = src8[iFrame*3*channels + iChannel*3 + 2];\n        }\n    }\n}\n\nstatic MA_INLINE void ma_pcm_deinterleave_s24__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_pcm_deinterleave_s24__reference(dst, src, frameCount, channels);\n}\n\nMA_API void ma_pcm_deinterleave_s24(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_deinterleave_s24__reference(dst, src, frameCount, channels);\n#else\n    ma_pcm_deinterleave_s24__optimized(dst, src, frameCount, channels);\n#endif\n}\n\n\n\n/* s32 */\nstatic MA_INLINE void ma_pcm_s32_to_u8__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_uint8* dst_u8 = (ma_uint8*)dst;\n    const ma_int32* src_s32 = (const ma_int32*)src;\n\n    if (ditherMode == ma_dither_mode_none) {\n        ma_uint64 i;\n        for (i = 0; i < count; i += 1) {\n            ma_int32 x = src_s32[i];\n            x = x >> 24;\n            x = x + 128;\n            dst_u8[i] = (ma_uint8)x;\n        }\n    } else {\n        ma_uint64 i;\n        for (i = 0; i < count; i += 1) {\n            ma_int32 x = src_s32[i];\n\n            /* Dither. Don't overflow. */\n            ma_int32 dither = ma_dither_s32(ditherMode, -0x800000, 0x7FFFFF);\n            if ((ma_int64)x + dither <= 0x7FFFFFFF) {\n                x = x + dither;\n            } else {\n                x = 0x7FFFFFFF;\n            }\n\n            x = x >> 24;\n            x = x + 128;\n            dst_u8[i] = (ma_uint8)x;\n        }\n    }\n}\n\nstatic MA_INLINE void ma_pcm_s32_to_u8__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s32_to_u8__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_s32_to_u8__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s32_to_u8__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_s32_to_u8__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s32_to_u8__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_s32_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_s32_to_u8__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_s32_to_u8__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_s32_to_u8__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_s32_to_u8__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_s32_to_s16__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_int16* dst_s16 = (ma_int16*)dst;\n    const ma_int32* src_s32 = (const ma_int32*)src;\n\n    if (ditherMode == ma_dither_mode_none) {\n        ma_uint64 i;\n        for (i = 0; i < count; i += 1) {\n            ma_int32 x = src_s32[i];\n            x = x >> 16;\n            dst_s16[i] = (ma_int16)x;\n        }\n    } else {\n        ma_uint64 i;\n        for (i = 0; i < count; i += 1) {\n            ma_int32 x = src_s32[i];\n\n            /* Dither. Don't overflow. */\n            ma_int32 dither = ma_dither_s32(ditherMode, -0x8000, 0x7FFF);\n            if ((ma_int64)x + dither <= 0x7FFFFFFF) {\n                x = x + dither;\n            } else {\n                x = 0x7FFFFFFF;\n            }\n\n            x = x >> 16;\n            dst_s16[i] = (ma_int16)x;\n        }\n    }\n}\n\nstatic MA_INLINE void ma_pcm_s32_to_s16__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s32_to_s16__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_s32_to_s16__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s32_to_s16__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_s32_to_s16__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s32_to_s16__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_s32_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_s32_to_s16__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_s32_to_s16__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_s32_to_s16__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_s32_to_s16__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_s32_to_s24__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_uint8* dst_s24 = (ma_uint8*)dst;\n    const ma_int32* src_s32 = (const ma_int32*)src;\n\n    ma_uint64 i;\n    for (i = 0; i < count; i += 1) {\n        ma_uint32 x = (ma_uint32)src_s32[i];\n        dst_s24[i*3+0] = (ma_uint8)((x & 0x0000FF00) >>  8);\n        dst_s24[i*3+1] = (ma_uint8)((x & 0x00FF0000) >> 16);\n        dst_s24[i*3+2] = (ma_uint8)((x & 0xFF000000) >> 24);\n    }\n\n    (void)ditherMode;   /* No dithering for s32 -> s24. */\n}\n\nstatic MA_INLINE void ma_pcm_s32_to_s24__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s32_to_s24__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_s32_to_s24__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s32_to_s24__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_s32_to_s24__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s32_to_s24__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_s32_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_s32_to_s24__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_s32_to_s24__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_s32_to_s24__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_s32_to_s24__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nMA_API void ma_pcm_s32_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    (void)ditherMode;\n\n    ma_copy_memory_64(dst, src, count * sizeof(ma_int32));\n}\n\n\nstatic MA_INLINE void ma_pcm_s32_to_f32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    float* dst_f32 = (float*)dst;\n    const ma_int32* src_s32 = (const ma_int32*)src;\n\n    ma_uint64 i;\n    for (i = 0; i < count; i += 1) {\n        double x = src_s32[i];\n\n#if 0\n        x = x + 2147483648.0;\n        x = x * 0.0000000004656612873077392578125;\n        x = x - 1;\n#else\n        x = x / 2147483648.0;\n#endif\n\n        dst_f32[i] = (float)x;\n    }\n\n    (void)ditherMode;   /* No dithering for s32 -> f32. */\n}\n\nstatic MA_INLINE void ma_pcm_s32_to_f32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s32_to_f32__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_s32_to_f32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s32_to_f32__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_s32_to_f32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_s32_to_f32__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_s32_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_s32_to_f32__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_s32_to_f32__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_s32_to_f32__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_s32_to_f32__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_interleave_s32__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_int32* dst_s32 = (ma_int32*)dst;\n    const ma_int32** src_s32 = (const ma_int32**)src;\n\n    ma_uint64 iFrame;\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        ma_uint32 iChannel;\n        for (iChannel = 0; iChannel < channels; iChannel += 1) {\n            dst_s32[iFrame*channels + iChannel] = src_s32[iChannel][iFrame];\n        }\n    }\n}\n\nstatic MA_INLINE void ma_pcm_interleave_s32__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_pcm_interleave_s32__reference(dst, src, frameCount, channels);\n}\n\nMA_API void ma_pcm_interleave_s32(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_interleave_s32__reference(dst, src, frameCount, channels);\n#else\n    ma_pcm_interleave_s32__optimized(dst, src, frameCount, channels);\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_deinterleave_s32__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_int32** dst_s32 = (ma_int32**)dst;\n    const ma_int32* src_s32 = (const ma_int32*)src;\n\n    ma_uint64 iFrame;\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        ma_uint32 iChannel;\n        for (iChannel = 0; iChannel < channels; iChannel += 1) {\n            dst_s32[iChannel][iFrame] = src_s32[iFrame*channels + iChannel];\n        }\n    }\n}\n\nstatic MA_INLINE void ma_pcm_deinterleave_s32__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_pcm_deinterleave_s32__reference(dst, src, frameCount, channels);\n}\n\nMA_API void ma_pcm_deinterleave_s32(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_deinterleave_s32__reference(dst, src, frameCount, channels);\n#else\n    ma_pcm_deinterleave_s32__optimized(dst, src, frameCount, channels);\n#endif\n}\n\n\n/* f32 */\nstatic MA_INLINE void ma_pcm_f32_to_u8__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_uint64 i;\n\n    ma_uint8* dst_u8 = (ma_uint8*)dst;\n    const float* src_f32 = (const float*)src;\n\n    float ditherMin = 0;\n    float ditherMax = 0;\n    if (ditherMode != ma_dither_mode_none) {\n        ditherMin = 1.0f / -128;\n        ditherMax = 1.0f /  127;\n    }\n\n    for (i = 0; i < count; i += 1) {\n        float x = src_f32[i];\n        x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax);\n        x = ((x < -1) ? -1 : ((x > 1) ? 1 : x));    /* clip */\n        x = x + 1;                                  /* -1..1 to 0..2 */\n        x = x * 127.5f;                             /* 0..2 to 0..255 */\n\n        dst_u8[i] = (ma_uint8)x;\n    }\n}\n\nstatic MA_INLINE void ma_pcm_f32_to_u8__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_f32_to_u8__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_f32_to_u8__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_f32_to_u8__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_f32_to_u8__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_f32_to_u8__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_f32_to_u8(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_f32_to_u8__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_f32_to_u8__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_f32_to_u8__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_f32_to_u8__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\nstatic MA_INLINE void ma_pcm_f32_to_s16__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_uint64 i;\n\n    ma_int16* dst_s16 = (ma_int16*)dst;\n    const float* src_f32 = (const float*)src;\n\n    float ditherMin = 0;\n    float ditherMax = 0;\n    if (ditherMode != ma_dither_mode_none) {\n        ditherMin = 1.0f / -32768;\n        ditherMax = 1.0f /  32767;\n    }\n\n    for (i = 0; i < count; i += 1) {\n        float x = src_f32[i];\n        x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax);\n        x = ((x < -1) ? -1 : ((x > 1) ? 1 : x));    /* clip */\n\n#if 0\n        /* The accurate way. */\n        x = x + 1;                                  /* -1..1 to 0..2 */\n        x = x * 32767.5f;                           /* 0..2 to 0..65535 */\n        x = x - 32768.0f;                           /* 0...65535 to -32768..32767 */\n#else\n        /* The fast way. */\n        x = x * 32767.0f;                           /* -1..1 to -32767..32767 */\n#endif\n\n        dst_s16[i] = (ma_int16)x;\n    }\n}\n#else\nstatic MA_INLINE void ma_pcm_f32_to_s16__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_uint64 i;\n    ma_uint64 i4;\n    ma_uint64 count4;\n\n    ma_int16* dst_s16 = (ma_int16*)dst;\n    const float* src_f32 = (const float*)src;\n\n    float ditherMin = 0;\n    float ditherMax = 0;\n    if (ditherMode != ma_dither_mode_none) {\n        ditherMin = 1.0f / -32768;\n        ditherMax = 1.0f /  32767;\n    }\n\n    /* Unrolled. */\n    i = 0;\n    count4 = count >> 2;\n    for (i4 = 0; i4 < count4; i4 += 1) {\n        float d0 = ma_dither_f32(ditherMode, ditherMin, ditherMax);\n        float d1 = ma_dither_f32(ditherMode, ditherMin, ditherMax);\n        float d2 = ma_dither_f32(ditherMode, ditherMin, ditherMax);\n        float d3 = ma_dither_f32(ditherMode, ditherMin, ditherMax);\n\n        float x0 = src_f32[i+0];\n        float x1 = src_f32[i+1];\n        float x2 = src_f32[i+2];\n        float x3 = src_f32[i+3];\n\n        x0 = x0 + d0;\n        x1 = x1 + d1;\n        x2 = x2 + d2;\n        x3 = x3 + d3;\n\n        x0 = ((x0 < -1) ? -1 : ((x0 > 1) ? 1 : x0));\n        x1 = ((x1 < -1) ? -1 : ((x1 > 1) ? 1 : x1));\n        x2 = ((x2 < -1) ? -1 : ((x2 > 1) ? 1 : x2));\n        x3 = ((x3 < -1) ? -1 : ((x3 > 1) ? 1 : x3));\n\n        x0 = x0 * 32767.0f;\n        x1 = x1 * 32767.0f;\n        x2 = x2 * 32767.0f;\n        x3 = x3 * 32767.0f;\n\n        dst_s16[i+0] = (ma_int16)x0;\n        dst_s16[i+1] = (ma_int16)x1;\n        dst_s16[i+2] = (ma_int16)x2;\n        dst_s16[i+3] = (ma_int16)x3;\n\n        i += 4;\n    }\n\n    /* Leftover. */\n    for (; i < count; i += 1) {\n        float x = src_f32[i];\n        x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax);\n        x = ((x < -1) ? -1 : ((x > 1) ? 1 : x));    /* clip */\n        x = x * 32767.0f;                           /* -1..1 to -32767..32767 */\n\n        dst_s16[i] = (ma_int16)x;\n    }\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_f32_to_s16__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_uint64 i;\n    ma_uint64 i8;\n    ma_uint64 count8;\n    ma_int16* dst_s16;\n    const float* src_f32;\n    float ditherMin;\n    float ditherMax;\n\n    /* Both the input and output buffers need to be aligned to 16 bytes. */\n    if ((((ma_uintptr)dst & 15) != 0) || (((ma_uintptr)src & 15) != 0)) {\n        ma_pcm_f32_to_s16__optimized(dst, src, count, ditherMode);\n        return;\n    }\n\n    dst_s16 = (ma_int16*)dst;\n    src_f32 = (const float*)src;\n\n    ditherMin = 0;\n    ditherMax = 0;\n    if (ditherMode != ma_dither_mode_none) {\n        ditherMin = 1.0f / -32768;\n        ditherMax = 1.0f /  32767;\n    }\n\n    i = 0;\n\n    /* SSE2. SSE allows us to output 8 s16's at a time which means our loop is unrolled 8 times. */\n    count8 = count >> 3;\n    for (i8 = 0; i8 < count8; i8 += 1) {\n        __m128 d0;\n        __m128 d1;\n        __m128 x0;\n        __m128 x1;\n\n        if (ditherMode == ma_dither_mode_none) {\n            d0 = _mm_set1_ps(0);\n            d1 = _mm_set1_ps(0);\n        } else if (ditherMode == ma_dither_mode_rectangle) {\n            d0 = _mm_set_ps(\n                ma_dither_f32_rectangle(ditherMin, ditherMax),\n                ma_dither_f32_rectangle(ditherMin, ditherMax),\n                ma_dither_f32_rectangle(ditherMin, ditherMax),\n                ma_dither_f32_rectangle(ditherMin, ditherMax)\n            );\n            d1 = _mm_set_ps(\n                ma_dither_f32_rectangle(ditherMin, ditherMax),\n                ma_dither_f32_rectangle(ditherMin, ditherMax),\n                ma_dither_f32_rectangle(ditherMin, ditherMax),\n                ma_dither_f32_rectangle(ditherMin, ditherMax)\n            );\n        } else {\n            d0 = _mm_set_ps(\n                ma_dither_f32_triangle(ditherMin, ditherMax),\n                ma_dither_f32_triangle(ditherMin, ditherMax),\n                ma_dither_f32_triangle(ditherMin, ditherMax),\n                ma_dither_f32_triangle(ditherMin, ditherMax)\n            );\n            d1 = _mm_set_ps(\n                ma_dither_f32_triangle(ditherMin, ditherMax),\n                ma_dither_f32_triangle(ditherMin, ditherMax),\n                ma_dither_f32_triangle(ditherMin, ditherMax),\n                ma_dither_f32_triangle(ditherMin, ditherMax)\n            );\n        }\n\n        x0 = *((__m128*)(src_f32 + i) + 0);\n        x1 = *((__m128*)(src_f32 + i) + 1);\n\n        x0 = _mm_add_ps(x0, d0);\n        x1 = _mm_add_ps(x1, d1);\n\n        x0 = _mm_mul_ps(x0, _mm_set1_ps(32767.0f));\n        x1 = _mm_mul_ps(x1, _mm_set1_ps(32767.0f));\n\n        _mm_stream_si128(((__m128i*)(dst_s16 + i)), _mm_packs_epi32(_mm_cvttps_epi32(x0), _mm_cvttps_epi32(x1)));\n\n        i += 8;\n    }\n\n\n    /* Leftover. */\n    for (; i < count; i += 1) {\n        float x = src_f32[i];\n        x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax);\n        x = ((x < -1) ? -1 : ((x > 1) ? 1 : x));    /* clip */\n        x = x * 32767.0f;                           /* -1..1 to -32767..32767 */\n\n        dst_s16[i] = (ma_int16)x;\n    }\n}\n#endif  /* SSE2 */\n\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_f32_to_s16__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_uint64 i;\n    ma_uint64 i8;\n    ma_uint64 count8;\n    ma_int16* dst_s16;\n    const float* src_f32;\n    float ditherMin;\n    float ditherMax;\n\n    if (!ma_has_neon()) {\n        ma_pcm_f32_to_s16__optimized(dst, src, count, ditherMode);\n        return;\n    }\n\n    /* Both the input and output buffers need to be aligned to 16 bytes. */\n    if ((((ma_uintptr)dst & 15) != 0) || (((ma_uintptr)src & 15) != 0)) {\n        ma_pcm_f32_to_s16__optimized(dst, src, count, ditherMode);\n        return;\n    }\n\n    dst_s16 = (ma_int16*)dst;\n    src_f32 = (const float*)src;\n\n    ditherMin = 0;\n    ditherMax = 0;\n    if (ditherMode != ma_dither_mode_none) {\n        ditherMin = 1.0f / -32768;\n        ditherMax = 1.0f /  32767;\n    }\n\n    i = 0;\n\n    /* NEON. NEON allows us to output 8 s16's at a time which means our loop is unrolled 8 times. */\n    count8 = count >> 3;\n    for (i8 = 0; i8 < count8; i8 += 1) {\n        float32x4_t d0;\n        float32x4_t d1;\n        float32x4_t x0;\n        float32x4_t x1;\n        int32x4_t i0;\n        int32x4_t i1;\n\n        if (ditherMode == ma_dither_mode_none) {\n            d0 = vmovq_n_f32(0);\n            d1 = vmovq_n_f32(0);\n        } else if (ditherMode == ma_dither_mode_rectangle) {\n            float d0v[4];\n            float d1v[4];\n\n            d0v[0] = ma_dither_f32_rectangle(ditherMin, ditherMax);\n            d0v[1] = ma_dither_f32_rectangle(ditherMin, ditherMax);\n            d0v[2] = ma_dither_f32_rectangle(ditherMin, ditherMax);\n            d0v[3] = ma_dither_f32_rectangle(ditherMin, ditherMax);\n            d0 = vld1q_f32(d0v);\n\n            d1v[0] = ma_dither_f32_rectangle(ditherMin, ditherMax);\n            d1v[1] = ma_dither_f32_rectangle(ditherMin, ditherMax);\n            d1v[2] = ma_dither_f32_rectangle(ditherMin, ditherMax);\n            d1v[3] = ma_dither_f32_rectangle(ditherMin, ditherMax);\n            d1 = vld1q_f32(d1v);\n        } else {\n            float d0v[4];\n            float d1v[4];\n\n            d0v[0] = ma_dither_f32_triangle(ditherMin, ditherMax);\n            d0v[1] = ma_dither_f32_triangle(ditherMin, ditherMax);\n            d0v[2] = ma_dither_f32_triangle(ditherMin, ditherMax);\n            d0v[3] = ma_dither_f32_triangle(ditherMin, ditherMax);\n            d0 = vld1q_f32(d0v);\n\n            d1v[0] = ma_dither_f32_triangle(ditherMin, ditherMax);\n            d1v[1] = ma_dither_f32_triangle(ditherMin, ditherMax);\n            d1v[2] = ma_dither_f32_triangle(ditherMin, ditherMax);\n            d1v[3] = ma_dither_f32_triangle(ditherMin, ditherMax);\n            d1 = vld1q_f32(d1v);\n        }\n\n        x0 = *((float32x4_t*)(src_f32 + i) + 0);\n        x1 = *((float32x4_t*)(src_f32 + i) + 1);\n\n        x0 = vaddq_f32(x0, d0);\n        x1 = vaddq_f32(x1, d1);\n\n        x0 = vmulq_n_f32(x0, 32767.0f);\n        x1 = vmulq_n_f32(x1, 32767.0f);\n\n        i0 = vcvtq_s32_f32(x0);\n        i1 = vcvtq_s32_f32(x1);\n        *((int16x8_t*)(dst_s16 + i)) = vcombine_s16(vqmovn_s32(i0), vqmovn_s32(i1));\n\n        i += 8;\n    }\n\n\n    /* Leftover. */\n    for (; i < count; i += 1) {\n        float x = src_f32[i];\n        x = x + ma_dither_f32(ditherMode, ditherMin, ditherMax);\n        x = ((x < -1) ? -1 : ((x > 1) ? 1 : x));    /* clip */\n        x = x * 32767.0f;                           /* -1..1 to -32767..32767 */\n\n        dst_s16[i] = (ma_int16)x;\n    }\n}\n#endif  /* Neon */\n#endif  /* MA_USE_REFERENCE_CONVERSION_APIS */\n\nMA_API void ma_pcm_f32_to_s16(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_f32_to_s16__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_f32_to_s16__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_f32_to_s16__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_f32_to_s16__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_f32_to_s24__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_uint8* dst_s24 = (ma_uint8*)dst;\n    const float* src_f32 = (const float*)src;\n\n    ma_uint64 i;\n    for (i = 0; i < count; i += 1) {\n        ma_int32 r;\n        float x = src_f32[i];\n        x = ((x < -1) ? -1 : ((x > 1) ? 1 : x));    /* clip */\n\n#if 0\n        /* The accurate way. */\n        x = x + 1;                                  /* -1..1 to 0..2 */\n        x = x * 8388607.5f;                         /* 0..2 to 0..16777215 */\n        x = x - 8388608.0f;                         /* 0..16777215 to -8388608..8388607 */\n#else\n        /* The fast way. */\n        x = x * 8388607.0f;                         /* -1..1 to -8388607..8388607 */\n#endif\n\n        r = (ma_int32)x;\n        dst_s24[(i*3)+0] = (ma_uint8)((r & 0x0000FF) >>  0);\n        dst_s24[(i*3)+1] = (ma_uint8)((r & 0x00FF00) >>  8);\n        dst_s24[(i*3)+2] = (ma_uint8)((r & 0xFF0000) >> 16);\n    }\n\n    (void)ditherMode;   /* No dithering for f32 -> s24. */\n}\n\nstatic MA_INLINE void ma_pcm_f32_to_s24__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_f32_to_s24__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_f32_to_s24__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_f32_to_s24__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_f32_to_s24__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_f32_to_s24__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_f32_to_s24(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_f32_to_s24__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_f32_to_s24__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_f32_to_s24__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_f32_to_s24__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nstatic MA_INLINE void ma_pcm_f32_to_s32__reference(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_int32* dst_s32 = (ma_int32*)dst;\n    const float* src_f32 = (const float*)src;\n\n    ma_uint32 i;\n    for (i = 0; i < count; i += 1) {\n        double x = src_f32[i];\n        x = ((x < -1) ? -1 : ((x > 1) ? 1 : x));    /* clip */\n\n#if 0\n        /* The accurate way. */\n        x = x + 1;                                  /* -1..1 to 0..2 */\n        x = x * 2147483647.5;                       /* 0..2 to 0..4294967295 */\n        x = x - 2147483648.0;                       /* 0...4294967295 to -2147483648..2147483647 */\n#else\n        /* The fast way. */\n        x = x * 2147483647.0;                       /* -1..1 to -2147483647..2147483647 */\n#endif\n\n        dst_s32[i] = (ma_int32)x;\n    }\n\n    (void)ditherMode;   /* No dithering for f32 -> s32. */\n}\n\nstatic MA_INLINE void ma_pcm_f32_to_s32__optimized(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_f32_to_s32__reference(dst, src, count, ditherMode);\n}\n\n#if defined(MA_SUPPORT_SSE2)\nstatic MA_INLINE void ma_pcm_f32_to_s32__sse2(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_f32_to_s32__optimized(dst, src, count, ditherMode);\n}\n#endif\n#if defined(MA_SUPPORT_NEON)\nstatic MA_INLINE void ma_pcm_f32_to_s32__neon(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    ma_pcm_f32_to_s32__optimized(dst, src, count, ditherMode);\n}\n#endif\n\nMA_API void ma_pcm_f32_to_s32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_f32_to_s32__reference(dst, src, count, ditherMode);\n#else\n    #  if defined(MA_SUPPORT_SSE2)\n        if (ma_has_sse2()) {\n            ma_pcm_f32_to_s32__sse2(dst, src, count, ditherMode);\n        } else\n    #elif defined(MA_SUPPORT_NEON)\n        if (ma_has_neon()) {\n            ma_pcm_f32_to_s32__neon(dst, src, count, ditherMode);\n        } else\n    #endif\n        {\n            ma_pcm_f32_to_s32__optimized(dst, src, count, ditherMode);\n        }\n#endif\n}\n\n\nMA_API void ma_pcm_f32_to_f32(void* dst, const void* src, ma_uint64 count, ma_dither_mode ditherMode)\n{\n    (void)ditherMode;\n\n    ma_copy_memory_64(dst, src, count * sizeof(float));\n}\n\n\nstatic void ma_pcm_interleave_f32__reference(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    float* dst_f32 = (float*)dst;\n    const float** src_f32 = (const float**)src;\n\n    ma_uint64 iFrame;\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        ma_uint32 iChannel;\n        for (iChannel = 0; iChannel < channels; iChannel += 1) {\n            dst_f32[iFrame*channels + iChannel] = src_f32[iChannel][iFrame];\n        }\n    }\n}\n\nstatic void ma_pcm_interleave_f32__optimized(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_pcm_interleave_f32__reference(dst, src, frameCount, channels);\n}\n\nMA_API void ma_pcm_interleave_f32(void* dst, const void** src, ma_uint64 frameCount, ma_uint32 channels)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_interleave_f32__reference(dst, src, frameCount, channels);\n#else\n    ma_pcm_interleave_f32__optimized(dst, src, frameCount, channels);\n#endif\n}\n\n\nstatic void ma_pcm_deinterleave_f32__reference(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    float** dst_f32 = (float**)dst;\n    const float* src_f32 = (const float*)src;\n\n    ma_uint64 iFrame;\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        ma_uint32 iChannel;\n        for (iChannel = 0; iChannel < channels; iChannel += 1) {\n            dst_f32[iChannel][iFrame] = src_f32[iFrame*channels + iChannel];\n        }\n    }\n}\n\nstatic void ma_pcm_deinterleave_f32__optimized(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n    ma_pcm_deinterleave_f32__reference(dst, src, frameCount, channels);\n}\n\nMA_API void ma_pcm_deinterleave_f32(void** dst, const void* src, ma_uint64 frameCount, ma_uint32 channels)\n{\n#ifdef MA_USE_REFERENCE_CONVERSION_APIS\n    ma_pcm_deinterleave_f32__reference(dst, src, frameCount, channels);\n#else\n    ma_pcm_deinterleave_f32__optimized(dst, src, frameCount, channels);\n#endif\n}\n\n\nMA_API void ma_pcm_convert(void* pOut, ma_format formatOut, const void* pIn, ma_format formatIn, ma_uint64 sampleCount, ma_dither_mode ditherMode)\n{\n    if (formatOut == formatIn) {\n        ma_copy_memory_64(pOut, pIn, sampleCount * ma_get_bytes_per_sample(formatOut));\n        return;\n    }\n\n    switch (formatIn)\n    {\n        case ma_format_u8:\n        {\n            switch (formatOut)\n            {\n                case ma_format_s16: ma_pcm_u8_to_s16(pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_s24: ma_pcm_u8_to_s24(pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_s32: ma_pcm_u8_to_s32(pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_f32: ma_pcm_u8_to_f32(pOut, pIn, sampleCount, ditherMode); return;\n                default: break;\n            }\n        } break;\n\n        case ma_format_s16:\n        {\n            switch (formatOut)\n            {\n                case ma_format_u8:  ma_pcm_s16_to_u8( pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_s24: ma_pcm_s16_to_s24(pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_s32: ma_pcm_s16_to_s32(pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_f32: ma_pcm_s16_to_f32(pOut, pIn, sampleCount, ditherMode); return;\n                default: break;\n            }\n        } break;\n\n        case ma_format_s24:\n        {\n            switch (formatOut)\n            {\n                case ma_format_u8:  ma_pcm_s24_to_u8( pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_s16: ma_pcm_s24_to_s16(pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_s32: ma_pcm_s24_to_s32(pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_f32: ma_pcm_s24_to_f32(pOut, pIn, sampleCount, ditherMode); return;\n                default: break;\n            }\n        } break;\n\n        case ma_format_s32:\n        {\n            switch (formatOut)\n            {\n                case ma_format_u8:  ma_pcm_s32_to_u8( pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_s16: ma_pcm_s32_to_s16(pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_s24: ma_pcm_s32_to_s24(pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_f32: ma_pcm_s32_to_f32(pOut, pIn, sampleCount, ditherMode); return;\n                default: break;\n            }\n        } break;\n\n        case ma_format_f32:\n        {\n            switch (formatOut)\n            {\n                case ma_format_u8:  ma_pcm_f32_to_u8( pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_s16: ma_pcm_f32_to_s16(pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_s24: ma_pcm_f32_to_s24(pOut, pIn, sampleCount, ditherMode); return;\n                case ma_format_s32: ma_pcm_f32_to_s32(pOut, pIn, sampleCount, ditherMode); return;\n                default: break;\n            }\n        } break;\n\n        default: break;\n    }\n}\n\nMA_API void ma_convert_pcm_frames_format(void* pOut, ma_format formatOut, const void* pIn, ma_format formatIn, ma_uint64 frameCount, ma_uint32 channels, ma_dither_mode ditherMode)\n{\n    ma_pcm_convert(pOut, formatOut, pIn, formatIn, frameCount * channels, ditherMode);\n}\n\nMA_API void ma_deinterleave_pcm_frames(ma_format format, ma_uint32 channels, ma_uint64 frameCount, const void* pInterleavedPCMFrames, void** ppDeinterleavedPCMFrames)\n{\n    if (pInterleavedPCMFrames == NULL || ppDeinterleavedPCMFrames == NULL) {\n        return; /* Invalid args. */\n    }\n\n    /* For efficiency we do this per format. */\n    switch (format) {\n        case ma_format_s16:\n        {\n            const ma_int16* pSrcS16 = (const ma_int16*)pInterleavedPCMFrames;\n            ma_uint64 iPCMFrame;\n            for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) {\n                ma_uint32 iChannel;\n                for (iChannel = 0; iChannel < channels; ++iChannel) {\n                    ma_int16* pDstS16 = (ma_int16*)ppDeinterleavedPCMFrames[iChannel];\n                    pDstS16[iPCMFrame] = pSrcS16[iPCMFrame*channels+iChannel];\n                }\n            }\n        } break;\n\n        case ma_format_f32:\n        {\n            const float* pSrcF32 = (const float*)pInterleavedPCMFrames;\n            ma_uint64 iPCMFrame;\n            for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) {\n                ma_uint32 iChannel;\n                for (iChannel = 0; iChannel < channels; ++iChannel) {\n                    float* pDstF32 = (float*)ppDeinterleavedPCMFrames[iChannel];\n                    pDstF32[iPCMFrame] = pSrcF32[iPCMFrame*channels+iChannel];\n                }\n            }\n        } break;\n\n        default:\n        {\n            ma_uint32 sampleSizeInBytes = ma_get_bytes_per_sample(format);\n            ma_uint64 iPCMFrame;\n            for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) {\n                ma_uint32 iChannel;\n                for (iChannel = 0; iChannel < channels; ++iChannel) {\n                          void* pDst = ma_offset_ptr(ppDeinterleavedPCMFrames[iChannel], iPCMFrame*sampleSizeInBytes);\n                    const void* pSrc = ma_offset_ptr(pInterleavedPCMFrames, (iPCMFrame*channels+iChannel)*sampleSizeInBytes);\n                    memcpy(pDst, pSrc, sampleSizeInBytes);\n                }\n            }\n        } break;\n    }\n}\n\nMA_API void ma_interleave_pcm_frames(ma_format format, ma_uint32 channels, ma_uint64 frameCount, const void** ppDeinterleavedPCMFrames, void* pInterleavedPCMFrames)\n{\n    switch (format)\n    {\n        case ma_format_s16:\n        {\n            ma_int16* pDstS16 = (ma_int16*)pInterleavedPCMFrames;\n            ma_uint64 iPCMFrame;\n            for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) {\n                ma_uint32 iChannel;\n                for (iChannel = 0; iChannel < channels; ++iChannel) {\n                    const ma_int16* pSrcS16 = (const ma_int16*)ppDeinterleavedPCMFrames[iChannel];\n                    pDstS16[iPCMFrame*channels+iChannel] = pSrcS16[iPCMFrame];\n                }\n            }\n        } break;\n\n        case ma_format_f32:\n        {\n            float* pDstF32 = (float*)pInterleavedPCMFrames;\n            ma_uint64 iPCMFrame;\n            for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) {\n                ma_uint32 iChannel;\n                for (iChannel = 0; iChannel < channels; ++iChannel) {\n                    const float* pSrcF32 = (const float*)ppDeinterleavedPCMFrames[iChannel];\n                    pDstF32[iPCMFrame*channels+iChannel] = pSrcF32[iPCMFrame];\n                }\n            }\n        } break;\n\n        default:\n        {\n            ma_uint32 sampleSizeInBytes = ma_get_bytes_per_sample(format);\n            ma_uint64 iPCMFrame;\n            for (iPCMFrame = 0; iPCMFrame < frameCount; ++iPCMFrame) {\n                ma_uint32 iChannel;\n                for (iChannel = 0; iChannel < channels; ++iChannel) {\n                          void* pDst = ma_offset_ptr(pInterleavedPCMFrames, (iPCMFrame*channels+iChannel)*sampleSizeInBytes);\n                    const void* pSrc = ma_offset_ptr(ppDeinterleavedPCMFrames[iChannel], iPCMFrame*sampleSizeInBytes);\n                    memcpy(pDst, pSrc, sampleSizeInBytes);\n                }\n            }\n        } break;\n    }\n}\n\n\n/**************************************************************************************************************************************************************\n\nBiquad Filter\n\n**************************************************************************************************************************************************************/\n#ifndef MA_BIQUAD_FIXED_POINT_SHIFT\n#define MA_BIQUAD_FIXED_POINT_SHIFT 14\n#endif\n\nstatic ma_int32 ma_biquad_float_to_fp(double x)\n{\n    return (ma_int32)(x * (1 << MA_BIQUAD_FIXED_POINT_SHIFT));\n}\n\nMA_API ma_biquad_config ma_biquad_config_init(ma_format format, ma_uint32 channels, double b0, double b1, double b2, double a0, double a1, double a2)\n{\n    ma_biquad_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format = format;\n    config.channels = channels;\n    config.b0 = b0;\n    config.b1 = b1;\n    config.b2 = b2;\n    config.a0 = a0;\n    config.a1 = a1;\n    config.a2 = a2;\n\n    return config;\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t r1Offset;\n    size_t r2Offset;\n} ma_biquad_heap_layout;\n\nstatic ma_result ma_biquad_get_heap_layout(const ma_biquad_config* pConfig, ma_biquad_heap_layout* pHeapLayout)\n{\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->channels == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* R0 */\n    pHeapLayout->r1Offset = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels;\n\n    /* R1 */\n    pHeapLayout->r2Offset = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels;\n\n    /* Make sure allocation size is aligned. */\n    pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_biquad_get_heap_size(const ma_biquad_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_biquad_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_biquad_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_biquad_init_preallocated(const ma_biquad_config* pConfig, void* pHeap, ma_biquad* pBQ)\n{\n    ma_result result;\n    ma_biquad_heap_layout heapLayout;\n\n    if (pBQ == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pBQ);\n\n    result = ma_biquad_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pBQ->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n    pBQ->pR1 = (ma_biquad_coefficient*)ma_offset_ptr(pHeap, heapLayout.r1Offset);\n    pBQ->pR2 = (ma_biquad_coefficient*)ma_offset_ptr(pHeap, heapLayout.r2Offset);\n\n    return ma_biquad_reinit(pConfig, pBQ);\n}\n\nMA_API ma_result ma_biquad_init(const ma_biquad_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_biquad* pBQ)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_biquad_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_biquad_init_preallocated(pConfig, pHeap, pBQ);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pBQ->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_biquad_uninit(ma_biquad* pBQ, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pBQ == NULL) {\n        return;\n    }\n\n    if (pBQ->_ownsHeap) {\n        ma_free(pBQ->_pHeap, pAllocationCallbacks);\n    }\n}\n\nMA_API ma_result ma_biquad_reinit(const ma_biquad_config* pConfig, ma_biquad* pBQ)\n{\n    if (pBQ == NULL || pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->a0 == 0) {\n        return MA_INVALID_ARGS; /* Division by zero. */\n    }\n\n    /* Only supporting f32 and s16. */\n    if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The format cannot be changed after initialization. */\n    if (pBQ->format != ma_format_unknown && pBQ->format != pConfig->format) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* The channel count cannot be changed after initialization. */\n    if (pBQ->channels != 0 && pBQ->channels != pConfig->channels) {\n        return MA_INVALID_OPERATION;\n    }\n\n\n    pBQ->format   = pConfig->format;\n    pBQ->channels = pConfig->channels;\n\n    /* Normalize. */\n    if (pConfig->format == ma_format_f32) {\n        pBQ->b0.f32 = (float)(pConfig->b0 / pConfig->a0);\n        pBQ->b1.f32 = (float)(pConfig->b1 / pConfig->a0);\n        pBQ->b2.f32 = (float)(pConfig->b2 / pConfig->a0);\n        pBQ->a1.f32 = (float)(pConfig->a1 / pConfig->a0);\n        pBQ->a2.f32 = (float)(pConfig->a2 / pConfig->a0);\n    } else {\n        pBQ->b0.s32 = ma_biquad_float_to_fp(pConfig->b0 / pConfig->a0);\n        pBQ->b1.s32 = ma_biquad_float_to_fp(pConfig->b1 / pConfig->a0);\n        pBQ->b2.s32 = ma_biquad_float_to_fp(pConfig->b2 / pConfig->a0);\n        pBQ->a1.s32 = ma_biquad_float_to_fp(pConfig->a1 / pConfig->a0);\n        pBQ->a2.s32 = ma_biquad_float_to_fp(pConfig->a2 / pConfig->a0);\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_biquad_clear_cache(ma_biquad* pBQ)\n{\n    if (pBQ == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pBQ->format == ma_format_f32) {\n        pBQ->pR1->f32 = 0;\n        pBQ->pR2->f32 = 0;\n    } else {\n        pBQ->pR1->s32 = 0;\n        pBQ->pR2->s32 = 0;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic MA_INLINE void ma_biquad_process_pcm_frame_f32__direct_form_2_transposed(ma_biquad* pBQ, float* pY, const float* pX)\n{\n    ma_uint32 c;\n    const ma_uint32 channels = pBQ->channels;\n    const float b0 = pBQ->b0.f32;\n    const float b1 = pBQ->b1.f32;\n    const float b2 = pBQ->b2.f32;\n    const float a1 = pBQ->a1.f32;\n    const float a2 = pBQ->a2.f32;\n\n    MA_ASSUME(channels > 0);\n    for (c = 0; c < channels; c += 1) {\n        float r1 = pBQ->pR1[c].f32;\n        float r2 = pBQ->pR2[c].f32;\n        float x  = pX[c];\n        float y;\n\n        y  = b0*x        + r1;\n        r1 = b1*x - a1*y + r2;\n        r2 = b2*x - a2*y;\n\n        pY[c]           = y;\n        pBQ->pR1[c].f32 = r1;\n        pBQ->pR2[c].f32 = r2;\n    }\n}\n\nstatic MA_INLINE void ma_biquad_process_pcm_frame_f32(ma_biquad* pBQ, float* pY, const float* pX)\n{\n    ma_biquad_process_pcm_frame_f32__direct_form_2_transposed(pBQ, pY, pX);\n}\n\nstatic MA_INLINE void ma_biquad_process_pcm_frame_s16__direct_form_2_transposed(ma_biquad* pBQ, ma_int16* pY, const ma_int16* pX)\n{\n    ma_uint32 c;\n    const ma_uint32 channels = pBQ->channels;\n    const ma_int32 b0 = pBQ->b0.s32;\n    const ma_int32 b1 = pBQ->b1.s32;\n    const ma_int32 b2 = pBQ->b2.s32;\n    const ma_int32 a1 = pBQ->a1.s32;\n    const ma_int32 a2 = pBQ->a2.s32;\n\n    MA_ASSUME(channels > 0);\n    for (c = 0; c < channels; c += 1) {\n        ma_int32 r1 = pBQ->pR1[c].s32;\n        ma_int32 r2 = pBQ->pR2[c].s32;\n        ma_int32 x  = pX[c];\n        ma_int32 y;\n\n        y  = (b0*x        + r1) >> MA_BIQUAD_FIXED_POINT_SHIFT;\n        r1 = (b1*x - a1*y + r2);\n        r2 = (b2*x - a2*y);\n\n        pY[c]           = (ma_int16)ma_clamp(y, -32768, 32767);\n        pBQ->pR1[c].s32 = r1;\n        pBQ->pR2[c].s32 = r2;\n    }\n}\n\nstatic MA_INLINE void ma_biquad_process_pcm_frame_s16(ma_biquad* pBQ, ma_int16* pY, const ma_int16* pX)\n{\n    ma_biquad_process_pcm_frame_s16__direct_form_2_transposed(pBQ, pY, pX);\n}\n\nMA_API ma_result ma_biquad_process_pcm_frames(ma_biquad* pBQ, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    ma_uint32 n;\n\n    if (pBQ == NULL || pFramesOut == NULL || pFramesIn == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Note that the logic below needs to support in-place filtering. That is, it must support the case where pFramesOut and pFramesIn are the same. */\n\n    if (pBQ->format == ma_format_f32) {\n        /* */ float* pY = (      float*)pFramesOut;\n        const float* pX = (const float*)pFramesIn;\n\n        for (n = 0; n < frameCount; n += 1) {\n            ma_biquad_process_pcm_frame_f32__direct_form_2_transposed(pBQ, pY, pX);\n            pY += pBQ->channels;\n            pX += pBQ->channels;\n        }\n    } else if (pBQ->format == ma_format_s16) {\n        /* */ ma_int16* pY = (      ma_int16*)pFramesOut;\n        const ma_int16* pX = (const ma_int16*)pFramesIn;\n\n        for (n = 0; n < frameCount; n += 1) {\n            ma_biquad_process_pcm_frame_s16__direct_form_2_transposed(pBQ, pY, pX);\n            pY += pBQ->channels;\n            pX += pBQ->channels;\n        }\n    } else {\n        MA_ASSERT(MA_FALSE);\n        return MA_INVALID_ARGS; /* Format not supported. Should never hit this because it's checked in ma_biquad_init() and ma_biquad_reinit(). */\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_uint32 ma_biquad_get_latency(const ma_biquad* pBQ)\n{\n    if (pBQ == NULL) {\n        return 0;\n    }\n\n    return 2;\n}\n\n\n/**************************************************************************************************************************************************************\n\nLow-Pass Filter\n\n**************************************************************************************************************************************************************/\nMA_API ma_lpf1_config ma_lpf1_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency)\n{\n    ma_lpf1_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format = format;\n    config.channels = channels;\n    config.sampleRate = sampleRate;\n    config.cutoffFrequency = cutoffFrequency;\n    config.q = 0.5;\n\n    return config;\n}\n\nMA_API ma_lpf2_config ma_lpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q)\n{\n    ma_lpf2_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format = format;\n    config.channels = channels;\n    config.sampleRate = sampleRate;\n    config.cutoffFrequency = cutoffFrequency;\n    config.q = q;\n\n    /* Q cannot be 0 or else it'll result in a division by 0. In this case just default to 0.707107. */\n    if (config.q == 0) {\n        config.q = 0.707107;\n    }\n\n    return config;\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t r1Offset;\n} ma_lpf1_heap_layout;\n\nstatic ma_result ma_lpf1_get_heap_layout(const ma_lpf1_config* pConfig, ma_lpf1_heap_layout* pHeapLayout)\n{\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->channels == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* R1 */\n    pHeapLayout->r1Offset = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels;\n\n    /* Make sure allocation size is aligned. */\n    pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_lpf1_get_heap_size(const ma_lpf1_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_lpf1_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_lpf1_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_lpf1_init_preallocated(const ma_lpf1_config* pConfig, void* pHeap, ma_lpf1* pLPF)\n{\n    ma_result result;\n    ma_lpf1_heap_layout heapLayout;\n\n    if (pLPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pLPF);\n\n    result = ma_lpf1_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pLPF->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n    pLPF->pR1 = (ma_biquad_coefficient*)ma_offset_ptr(pHeap, heapLayout.r1Offset);\n\n    return ma_lpf1_reinit(pConfig, pLPF);\n}\n\nMA_API ma_result ma_lpf1_init(const ma_lpf1_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf1* pLPF)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_lpf1_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_lpf1_init_preallocated(pConfig, pHeap, pLPF);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pLPF->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_lpf1_uninit(ma_lpf1* pLPF, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pLPF == NULL) {\n        return;\n    }\n\n    if (pLPF->_ownsHeap) {\n        ma_free(pLPF->_pHeap, pAllocationCallbacks);\n    }\n}\n\nMA_API ma_result ma_lpf1_reinit(const ma_lpf1_config* pConfig, ma_lpf1* pLPF)\n{\n    double a;\n\n    if (pLPF == NULL || pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Only supporting f32 and s16. */\n    if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The format cannot be changed after initialization. */\n    if (pLPF->format != ma_format_unknown && pLPF->format != pConfig->format) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* The channel count cannot be changed after initialization. */\n    if (pLPF->channels != 0 && pLPF->channels != pConfig->channels) {\n        return MA_INVALID_OPERATION;\n    }\n\n    pLPF->format   = pConfig->format;\n    pLPF->channels = pConfig->channels;\n\n    a = ma_expd(-2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate);\n    if (pConfig->format == ma_format_f32) {\n        pLPF->a.f32 = (float)a;\n    } else {\n        pLPF->a.s32 = ma_biquad_float_to_fp(a);\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_lpf1_clear_cache(ma_lpf1* pLPF)\n{\n    if (pLPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pLPF->format == ma_format_f32) {\n        pLPF->a.f32 = 0;\n    } else {\n        pLPF->a.s32 = 0;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic MA_INLINE void ma_lpf1_process_pcm_frame_f32(ma_lpf1* pLPF, float* pY, const float* pX)\n{\n    ma_uint32 c;\n    const ma_uint32 channels = pLPF->channels;\n    const float a = pLPF->a.f32;\n    const float b = 1 - a;\n\n    MA_ASSUME(channels > 0);\n    for (c = 0; c < channels; c += 1) {\n        float r1 = pLPF->pR1[c].f32;\n        float x  = pX[c];\n        float y;\n\n        y = b*x + a*r1;\n\n        pY[c]           = y;\n        pLPF->pR1[c].f32 = y;\n    }\n}\n\nstatic MA_INLINE void ma_lpf1_process_pcm_frame_s16(ma_lpf1* pLPF, ma_int16* pY, const ma_int16* pX)\n{\n    ma_uint32 c;\n    const ma_uint32 channels = pLPF->channels;\n    const ma_int32 a = pLPF->a.s32;\n    const ma_int32 b = ((1 << MA_BIQUAD_FIXED_POINT_SHIFT) - a);\n\n    MA_ASSUME(channels > 0);\n    for (c = 0; c < channels; c += 1) {\n        ma_int32 r1 = pLPF->pR1[c].s32;\n        ma_int32 x  = pX[c];\n        ma_int32 y;\n\n        y = (b*x + a*r1) >> MA_BIQUAD_FIXED_POINT_SHIFT;\n\n        pY[c]            = (ma_int16)y;\n        pLPF->pR1[c].s32 = (ma_int32)y;\n    }\n}\n\nMA_API ma_result ma_lpf1_process_pcm_frames(ma_lpf1* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    ma_uint32 n;\n\n    if (pLPF == NULL || pFramesOut == NULL || pFramesIn == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Note that the logic below needs to support in-place filtering. That is, it must support the case where pFramesOut and pFramesIn are the same. */\n\n    if (pLPF->format == ma_format_f32) {\n        /* */ float* pY = (      float*)pFramesOut;\n        const float* pX = (const float*)pFramesIn;\n\n        for (n = 0; n < frameCount; n += 1) {\n            ma_lpf1_process_pcm_frame_f32(pLPF, pY, pX);\n            pY += pLPF->channels;\n            pX += pLPF->channels;\n        }\n    } else if (pLPF->format == ma_format_s16) {\n        /* */ ma_int16* pY = (      ma_int16*)pFramesOut;\n        const ma_int16* pX = (const ma_int16*)pFramesIn;\n\n        for (n = 0; n < frameCount; n += 1) {\n            ma_lpf1_process_pcm_frame_s16(pLPF, pY, pX);\n            pY += pLPF->channels;\n            pX += pLPF->channels;\n        }\n    } else {\n        MA_ASSERT(MA_FALSE);\n        return MA_INVALID_ARGS; /* Format not supported. Should never hit this because it's checked in ma_biquad_init() and ma_biquad_reinit(). */\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_uint32 ma_lpf1_get_latency(const ma_lpf1* pLPF)\n{\n    if (pLPF == NULL) {\n        return 0;\n    }\n\n    return 1;\n}\n\n\nstatic MA_INLINE ma_biquad_config ma_lpf2__get_biquad_config(const ma_lpf2_config* pConfig)\n{\n    ma_biquad_config bqConfig;\n    double q;\n    double w;\n    double s;\n    double c;\n    double a;\n\n    MA_ASSERT(pConfig != NULL);\n\n    q = pConfig->q;\n    w = 2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate;\n    s = ma_sind(w);\n    c = ma_cosd(w);\n    a = s / (2*q);\n\n    bqConfig.b0 = (1 - c) / 2;\n    bqConfig.b1 =  1 - c;\n    bqConfig.b2 = (1 - c) / 2;\n    bqConfig.a0 =  1 + a;\n    bqConfig.a1 = -2 * c;\n    bqConfig.a2 =  1 - a;\n\n    bqConfig.format   = pConfig->format;\n    bqConfig.channels = pConfig->channels;\n\n    return bqConfig;\n}\n\nMA_API ma_result ma_lpf2_get_heap_size(const ma_lpf2_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_biquad_config bqConfig;\n    bqConfig = ma_lpf2__get_biquad_config(pConfig);\n\n    return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes);\n}\n\nMA_API ma_result ma_lpf2_init_preallocated(const ma_lpf2_config* pConfig, void* pHeap, ma_lpf2* pLPF)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pLPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pLPF);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_lpf2__get_biquad_config(pConfig);\n    result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pLPF->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_lpf2_init(const ma_lpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf2* pLPF)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_lpf2_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_lpf2_init_preallocated(pConfig, pHeap, pLPF);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pLPF->bq._ownsHeap = MA_TRUE;    /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */\n    return MA_SUCCESS;\n}\n\nMA_API void ma_lpf2_uninit(ma_lpf2* pLPF, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pLPF == NULL) {\n        return;\n    }\n\n    ma_biquad_uninit(&pLPF->bq, pAllocationCallbacks);   /* <-- This will free the heap allocation. */\n}\n\nMA_API ma_result ma_lpf2_reinit(const ma_lpf2_config* pConfig, ma_lpf2* pLPF)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pLPF == NULL || pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_lpf2__get_biquad_config(pConfig);\n    result = ma_biquad_reinit(&bqConfig, &pLPF->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_lpf2_clear_cache(ma_lpf2* pLPF)\n{\n    if (pLPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_biquad_clear_cache(&pLPF->bq);\n\n    return MA_SUCCESS;\n}\n\nstatic MA_INLINE void ma_lpf2_process_pcm_frame_s16(ma_lpf2* pLPF, ma_int16* pFrameOut, const ma_int16* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_s16(&pLPF->bq, pFrameOut, pFrameIn);\n}\n\nstatic MA_INLINE void ma_lpf2_process_pcm_frame_f32(ma_lpf2* pLPF, float* pFrameOut, const float* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_f32(&pLPF->bq, pFrameOut, pFrameIn);\n}\n\nMA_API ma_result ma_lpf2_process_pcm_frames(ma_lpf2* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    if (pLPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_biquad_process_pcm_frames(&pLPF->bq, pFramesOut, pFramesIn, frameCount);\n}\n\nMA_API ma_uint32 ma_lpf2_get_latency(const ma_lpf2* pLPF)\n{\n    if (pLPF == NULL) {\n        return 0;\n    }\n\n    return ma_biquad_get_latency(&pLPF->bq);\n}\n\n\nMA_API ma_lpf_config ma_lpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order)\n{\n    ma_lpf_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format          = format;\n    config.channels        = channels;\n    config.sampleRate      = sampleRate;\n    config.cutoffFrequency = cutoffFrequency;\n    config.order           = ma_min(order, MA_MAX_FILTER_ORDER);\n\n    return config;\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t lpf1Offset;\n    size_t lpf2Offset;  /* Offset of the first second order filter. Subsequent filters will come straight after, and will each have the same heap size. */\n} ma_lpf_heap_layout;\n\nstatic void ma_lpf_calculate_sub_lpf_counts(ma_uint32 order, ma_uint32* pLPF1Count, ma_uint32* pLPF2Count)\n{\n    MA_ASSERT(pLPF1Count != NULL);\n    MA_ASSERT(pLPF2Count != NULL);\n\n    *pLPF1Count = order % 2;\n    *pLPF2Count = order / 2;\n}\n\nstatic ma_result ma_lpf_get_heap_layout(const ma_lpf_config* pConfig, ma_lpf_heap_layout* pHeapLayout)\n{\n    ma_result result;\n    ma_uint32 lpf1Count;\n    ma_uint32 lpf2Count;\n    ma_uint32 ilpf1;\n    ma_uint32 ilpf2;\n\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->channels == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->order > MA_MAX_FILTER_ORDER) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_lpf_calculate_sub_lpf_counts(pConfig->order, &lpf1Count, &lpf2Count);\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* LPF 1 */\n    pHeapLayout->lpf1Offset = pHeapLayout->sizeInBytes;\n    for (ilpf1 = 0; ilpf1 < lpf1Count; ilpf1 += 1) {\n        size_t lpf1HeapSizeInBytes;\n        ma_lpf1_config lpf1Config = ma_lpf1_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency);\n\n        result = ma_lpf1_get_heap_size(&lpf1Config, &lpf1HeapSizeInBytes);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pHeapLayout->sizeInBytes += sizeof(ma_lpf1) + lpf1HeapSizeInBytes;\n    }\n\n    /* LPF 2*/\n    pHeapLayout->lpf2Offset = pHeapLayout->sizeInBytes;\n    for (ilpf2 = 0; ilpf2 < lpf2Count; ilpf2 += 1) {\n        size_t lpf2HeapSizeInBytes;\n        ma_lpf2_config lpf2Config = ma_lpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, 0.707107);   /* <-- The \"q\" parameter does not matter for the purpose of calculating the heap size. */\n\n        result = ma_lpf2_get_heap_size(&lpf2Config, &lpf2HeapSizeInBytes);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pHeapLayout->sizeInBytes += sizeof(ma_lpf2) + lpf2HeapSizeInBytes;\n    }\n\n    /* Make sure allocation size is aligned. */\n    pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_lpf_reinit__internal(const ma_lpf_config* pConfig, void* pHeap, ma_lpf* pLPF, ma_bool32 isNew)\n{\n    ma_result result;\n    ma_uint32 lpf1Count;\n    ma_uint32 lpf2Count;\n    ma_uint32 ilpf1;\n    ma_uint32 ilpf2;\n    ma_lpf_heap_layout heapLayout;  /* Only used if isNew is true. */\n\n    if (pLPF == NULL || pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Only supporting f32 and s16. */\n    if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The format cannot be changed after initialization. */\n    if (pLPF->format != ma_format_unknown && pLPF->format != pConfig->format) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* The channel count cannot be changed after initialization. */\n    if (pLPF->channels != 0 && pLPF->channels != pConfig->channels) {\n        return MA_INVALID_OPERATION;\n    }\n\n    if (pConfig->order > MA_MAX_FILTER_ORDER) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_lpf_calculate_sub_lpf_counts(pConfig->order, &lpf1Count, &lpf2Count);\n\n    /* The filter order can't change between reinits. */\n    if (!isNew) {\n        if (pLPF->lpf1Count != lpf1Count || pLPF->lpf2Count != lpf2Count) {\n            return MA_INVALID_OPERATION;\n        }\n    }\n\n    if (isNew) {\n        result = ma_lpf_get_heap_layout(pConfig, &heapLayout);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pLPF->_pHeap = pHeap;\n        MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n        pLPF->pLPF1 = (ma_lpf1*)ma_offset_ptr(pHeap, heapLayout.lpf1Offset);\n        pLPF->pLPF2 = (ma_lpf2*)ma_offset_ptr(pHeap, heapLayout.lpf2Offset);\n    } else {\n        MA_ZERO_OBJECT(&heapLayout);    /* To silence a compiler warning. */\n    }\n\n    for (ilpf1 = 0; ilpf1 < lpf1Count; ilpf1 += 1) {\n        ma_lpf1_config lpf1Config = ma_lpf1_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency);\n\n        if (isNew) {\n            size_t lpf1HeapSizeInBytes;\n\n            result = ma_lpf1_get_heap_size(&lpf1Config, &lpf1HeapSizeInBytes);\n            if (result == MA_SUCCESS) {\n                result = ma_lpf1_init_preallocated(&lpf1Config, ma_offset_ptr(pHeap, heapLayout.lpf1Offset + (sizeof(ma_lpf1) * lpf1Count) + (ilpf1 * lpf1HeapSizeInBytes)), &pLPF->pLPF1[ilpf1]);\n            }\n        } else {\n            result = ma_lpf1_reinit(&lpf1Config, &pLPF->pLPF1[ilpf1]);\n        }\n\n        if (result != MA_SUCCESS) {\n            ma_uint32 jlpf1;\n\n            for (jlpf1 = 0; jlpf1 < ilpf1; jlpf1 += 1) {\n                ma_lpf1_uninit(&pLPF->pLPF1[jlpf1], NULL);  /* No need for allocation callbacks here since we used a preallocated heap allocation. */\n            }\n\n            return result;\n        }\n    }\n\n    for (ilpf2 = 0; ilpf2 < lpf2Count; ilpf2 += 1) {\n        ma_lpf2_config lpf2Config;\n        double q;\n        double a;\n\n        /* Tempting to use 0.707107, but won't result in a Butterworth filter if the order is > 2. */\n        if (lpf1Count == 1) {\n            a = (1 + ilpf2*1) * (MA_PI_D/(pConfig->order*1));   /* Odd order. */\n        } else {\n            a = (1 + ilpf2*2) * (MA_PI_D/(pConfig->order*2));   /* Even order. */\n        }\n        q = 1 / (2*ma_cosd(a));\n\n        lpf2Config = ma_lpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, q);\n\n        if (isNew) {\n            size_t lpf2HeapSizeInBytes;\n\n            result = ma_lpf2_get_heap_size(&lpf2Config, &lpf2HeapSizeInBytes);\n            if (result == MA_SUCCESS) {\n                result = ma_lpf2_init_preallocated(&lpf2Config, ma_offset_ptr(pHeap, heapLayout.lpf2Offset + (sizeof(ma_lpf2) * lpf2Count) + (ilpf2 * lpf2HeapSizeInBytes)), &pLPF->pLPF2[ilpf2]);\n            }\n        } else {\n            result = ma_lpf2_reinit(&lpf2Config, &pLPF->pLPF2[ilpf2]);\n        }\n\n        if (result != MA_SUCCESS) {\n            ma_uint32 jlpf1;\n            ma_uint32 jlpf2;\n\n            for (jlpf1 = 0; jlpf1 < lpf1Count; jlpf1 += 1) {\n                ma_lpf1_uninit(&pLPF->pLPF1[jlpf1], NULL);  /* No need for allocation callbacks here since we used a preallocated heap allocation. */\n            }\n\n            for (jlpf2 = 0; jlpf2 < ilpf2; jlpf2 += 1) {\n                ma_lpf2_uninit(&pLPF->pLPF2[jlpf2], NULL);  /* No need for allocation callbacks here since we used a preallocated heap allocation. */\n            }\n\n            return result;\n        }\n    }\n\n    pLPF->lpf1Count  = lpf1Count;\n    pLPF->lpf2Count  = lpf2Count;\n    pLPF->format     = pConfig->format;\n    pLPF->channels   = pConfig->channels;\n    pLPF->sampleRate = pConfig->sampleRate;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_lpf_get_heap_size(const ma_lpf_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_lpf_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_lpf_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return result;\n}\n\nMA_API ma_result ma_lpf_init_preallocated(const ma_lpf_config* pConfig, void* pHeap, ma_lpf* pLPF)\n{\n    if (pLPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pLPF);\n\n    return ma_lpf_reinit__internal(pConfig, pHeap, pLPF, /*isNew*/MA_TRUE);\n}\n\nMA_API ma_result ma_lpf_init(const ma_lpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf* pLPF)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_lpf_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_lpf_init_preallocated(pConfig, pHeap, pLPF);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pLPF->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_lpf_uninit(ma_lpf* pLPF, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_uint32 ilpf1;\n    ma_uint32 ilpf2;\n\n    if (pLPF == NULL) {\n        return;\n    }\n\n    for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) {\n        ma_lpf1_uninit(&pLPF->pLPF1[ilpf1], pAllocationCallbacks);\n    }\n\n    for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) {\n        ma_lpf2_uninit(&pLPF->pLPF2[ilpf2], pAllocationCallbacks);\n    }\n\n    if (pLPF->_ownsHeap) {\n        ma_free(pLPF->_pHeap, pAllocationCallbacks);\n    }\n}\n\nMA_API ma_result ma_lpf_reinit(const ma_lpf_config* pConfig, ma_lpf* pLPF)\n{\n    return ma_lpf_reinit__internal(pConfig, NULL, pLPF, /*isNew*/MA_FALSE);\n}\n\nMA_API ma_result ma_lpf_clear_cache(ma_lpf* pLPF)\n{\n    ma_uint32 ilpf1;\n    ma_uint32 ilpf2;\n\n    if (pLPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) {\n        ma_lpf1_clear_cache(&pLPF->pLPF1[ilpf1]);\n    }\n\n    for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) {\n        ma_lpf2_clear_cache(&pLPF->pLPF2[ilpf2]);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic MA_INLINE void ma_lpf_process_pcm_frame_f32(ma_lpf* pLPF, float* pY, const void* pX)\n{\n    ma_uint32 ilpf1;\n    ma_uint32 ilpf2;\n\n    MA_ASSERT(pLPF->format == ma_format_f32);\n\n    MA_MOVE_MEMORY(pY, pX, ma_get_bytes_per_frame(pLPF->format, pLPF->channels));\n\n    for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) {\n        ma_lpf1_process_pcm_frame_f32(&pLPF->pLPF1[ilpf1], pY, pY);\n    }\n\n    for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) {\n        ma_lpf2_process_pcm_frame_f32(&pLPF->pLPF2[ilpf2], pY, pY);\n    }\n}\n\nstatic MA_INLINE void ma_lpf_process_pcm_frame_s16(ma_lpf* pLPF, ma_int16* pY, const ma_int16* pX)\n{\n    ma_uint32 ilpf1;\n    ma_uint32 ilpf2;\n\n    MA_ASSERT(pLPF->format == ma_format_s16);\n\n    MA_MOVE_MEMORY(pY, pX, ma_get_bytes_per_frame(pLPF->format, pLPF->channels));\n\n    for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) {\n        ma_lpf1_process_pcm_frame_s16(&pLPF->pLPF1[ilpf1], pY, pY);\n    }\n\n    for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) {\n        ma_lpf2_process_pcm_frame_s16(&pLPF->pLPF2[ilpf2], pY, pY);\n    }\n}\n\nMA_API ma_result ma_lpf_process_pcm_frames(ma_lpf* pLPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    ma_result result;\n    ma_uint32 ilpf1;\n    ma_uint32 ilpf2;\n\n    if (pLPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Faster path for in-place. */\n    if (pFramesOut == pFramesIn) {\n        for (ilpf1 = 0; ilpf1 < pLPF->lpf1Count; ilpf1 += 1) {\n            result = ma_lpf1_process_pcm_frames(&pLPF->pLPF1[ilpf1], pFramesOut, pFramesOut, frameCount);\n            if (result != MA_SUCCESS) {\n                return result;\n            }\n        }\n\n        for (ilpf2 = 0; ilpf2 < pLPF->lpf2Count; ilpf2 += 1) {\n            result = ma_lpf2_process_pcm_frames(&pLPF->pLPF2[ilpf2], pFramesOut, pFramesOut, frameCount);\n            if (result != MA_SUCCESS) {\n                return result;\n            }\n        }\n    }\n\n    /* Slightly slower path for copying. */\n    if (pFramesOut != pFramesIn) {\n        ma_uint32 iFrame;\n\n        /*  */ if (pLPF->format == ma_format_f32) {\n            /* */ float* pFramesOutF32 = (      float*)pFramesOut;\n            const float* pFramesInF32  = (const float*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                ma_lpf_process_pcm_frame_f32(pLPF, pFramesOutF32, pFramesInF32);\n                pFramesOutF32 += pLPF->channels;\n                pFramesInF32  += pLPF->channels;\n            }\n        } else if (pLPF->format == ma_format_s16) {\n            /* */ ma_int16* pFramesOutS16 = (      ma_int16*)pFramesOut;\n            const ma_int16* pFramesInS16  = (const ma_int16*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                ma_lpf_process_pcm_frame_s16(pLPF, pFramesOutS16, pFramesInS16);\n                pFramesOutS16 += pLPF->channels;\n                pFramesInS16  += pLPF->channels;\n            }\n        } else {\n            MA_ASSERT(MA_FALSE);\n            return MA_INVALID_OPERATION;    /* Should never hit this. */\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_uint32 ma_lpf_get_latency(const ma_lpf* pLPF)\n{\n    if (pLPF == NULL) {\n        return 0;\n    }\n\n    return pLPF->lpf2Count*2 + pLPF->lpf1Count;\n}\n\n\n/**************************************************************************************************************************************************************\n\nHigh-Pass Filtering\n\n**************************************************************************************************************************************************************/\nMA_API ma_hpf1_config ma_hpf1_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency)\n{\n    ma_hpf1_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format = format;\n    config.channels = channels;\n    config.sampleRate = sampleRate;\n    config.cutoffFrequency = cutoffFrequency;\n\n    return config;\n}\n\nMA_API ma_hpf2_config ma_hpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q)\n{\n    ma_hpf2_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format = format;\n    config.channels = channels;\n    config.sampleRate = sampleRate;\n    config.cutoffFrequency = cutoffFrequency;\n    config.q = q;\n\n    /* Q cannot be 0 or else it'll result in a division by 0. In this case just default to 0.707107. */\n    if (config.q == 0) {\n        config.q = 0.707107;\n    }\n\n    return config;\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t r1Offset;\n} ma_hpf1_heap_layout;\n\nstatic ma_result ma_hpf1_get_heap_layout(const ma_hpf1_config* pConfig, ma_hpf1_heap_layout* pHeapLayout)\n{\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->channels == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* R1 */\n    pHeapLayout->r1Offset = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += sizeof(ma_biquad_coefficient) * pConfig->channels;\n\n    /* Make sure allocation size is aligned. */\n    pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_hpf1_get_heap_size(const ma_hpf1_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_hpf1_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_hpf1_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_hpf1_init_preallocated(const ma_hpf1_config* pConfig, void* pHeap, ma_hpf1* pLPF)\n{\n    ma_result result;\n    ma_hpf1_heap_layout heapLayout;\n\n    if (pLPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pLPF);\n\n    result = ma_hpf1_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pLPF->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n    pLPF->pR1 = (ma_biquad_coefficient*)ma_offset_ptr(pHeap, heapLayout.r1Offset);\n\n    return ma_hpf1_reinit(pConfig, pLPF);\n}\n\nMA_API ma_result ma_hpf1_init(const ma_hpf1_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf1* pLPF)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_hpf1_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_hpf1_init_preallocated(pConfig, pHeap, pLPF);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pLPF->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_hpf1_uninit(ma_hpf1* pHPF, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pHPF == NULL) {\n        return;\n    }\n\n    if (pHPF->_ownsHeap) {\n        ma_free(pHPF->_pHeap, pAllocationCallbacks);\n    }\n}\n\nMA_API ma_result ma_hpf1_reinit(const ma_hpf1_config* pConfig, ma_hpf1* pHPF)\n{\n    double a;\n\n    if (pHPF == NULL || pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Only supporting f32 and s16. */\n    if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The format cannot be changed after initialization. */\n    if (pHPF->format != ma_format_unknown && pHPF->format != pConfig->format) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* The channel count cannot be changed after initialization. */\n    if (pHPF->channels != 0 && pHPF->channels != pConfig->channels) {\n        return MA_INVALID_OPERATION;\n    }\n\n    pHPF->format   = pConfig->format;\n    pHPF->channels = pConfig->channels;\n\n    a = ma_expd(-2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate);\n    if (pConfig->format == ma_format_f32) {\n        pHPF->a.f32 = (float)a;\n    } else {\n        pHPF->a.s32 = ma_biquad_float_to_fp(a);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic MA_INLINE void ma_hpf1_process_pcm_frame_f32(ma_hpf1* pHPF, float* pY, const float* pX)\n{\n    ma_uint32 c;\n    const ma_uint32 channels = pHPF->channels;\n    const float a = 1 - pHPF->a.f32;\n    const float b = 1 - a;\n\n    MA_ASSUME(channels > 0);\n    for (c = 0; c < channels; c += 1) {\n        float r1 = pHPF->pR1[c].f32;\n        float x  = pX[c];\n        float y;\n\n        y = b*x - a*r1;\n\n        pY[c]            = y;\n        pHPF->pR1[c].f32 = y;\n    }\n}\n\nstatic MA_INLINE void ma_hpf1_process_pcm_frame_s16(ma_hpf1* pHPF, ma_int16* pY, const ma_int16* pX)\n{\n    ma_uint32 c;\n    const ma_uint32 channels = pHPF->channels;\n    const ma_int32 a = ((1 << MA_BIQUAD_FIXED_POINT_SHIFT) - pHPF->a.s32);\n    const ma_int32 b = ((1 << MA_BIQUAD_FIXED_POINT_SHIFT) - a);\n\n    MA_ASSUME(channels > 0);\n    for (c = 0; c < channels; c += 1) {\n        ma_int32 r1 = pHPF->pR1[c].s32;\n        ma_int32 x  = pX[c];\n        ma_int32 y;\n\n        y = (b*x - a*r1) >> MA_BIQUAD_FIXED_POINT_SHIFT;\n\n        pY[c]            = (ma_int16)y;\n        pHPF->pR1[c].s32 = (ma_int32)y;\n    }\n}\n\nMA_API ma_result ma_hpf1_process_pcm_frames(ma_hpf1* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    ma_uint32 n;\n\n    if (pHPF == NULL || pFramesOut == NULL || pFramesIn == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Note that the logic below needs to support in-place filtering. That is, it must support the case where pFramesOut and pFramesIn are the same. */\n\n    if (pHPF->format == ma_format_f32) {\n        /* */ float* pY = (      float*)pFramesOut;\n        const float* pX = (const float*)pFramesIn;\n\n        for (n = 0; n < frameCount; n += 1) {\n            ma_hpf1_process_pcm_frame_f32(pHPF, pY, pX);\n            pY += pHPF->channels;\n            pX += pHPF->channels;\n        }\n    } else if (pHPF->format == ma_format_s16) {\n        /* */ ma_int16* pY = (      ma_int16*)pFramesOut;\n        const ma_int16* pX = (const ma_int16*)pFramesIn;\n\n        for (n = 0; n < frameCount; n += 1) {\n            ma_hpf1_process_pcm_frame_s16(pHPF, pY, pX);\n            pY += pHPF->channels;\n            pX += pHPF->channels;\n        }\n    } else {\n        MA_ASSERT(MA_FALSE);\n        return MA_INVALID_ARGS; /* Format not supported. Should never hit this because it's checked in ma_biquad_init() and ma_biquad_reinit(). */\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_uint32 ma_hpf1_get_latency(const ma_hpf1* pHPF)\n{\n    if (pHPF == NULL) {\n        return 0;\n    }\n\n    return 1;\n}\n\n\nstatic MA_INLINE ma_biquad_config ma_hpf2__get_biquad_config(const ma_hpf2_config* pConfig)\n{\n    ma_biquad_config bqConfig;\n    double q;\n    double w;\n    double s;\n    double c;\n    double a;\n\n    MA_ASSERT(pConfig != NULL);\n\n    q = pConfig->q;\n    w = 2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate;\n    s = ma_sind(w);\n    c = ma_cosd(w);\n    a = s / (2*q);\n\n    bqConfig.b0 =  (1 + c) / 2;\n    bqConfig.b1 = -(1 + c);\n    bqConfig.b2 =  (1 + c) / 2;\n    bqConfig.a0 =   1 + a;\n    bqConfig.a1 =  -2 * c;\n    bqConfig.a2 =   1 - a;\n\n    bqConfig.format   = pConfig->format;\n    bqConfig.channels = pConfig->channels;\n\n    return bqConfig;\n}\n\nMA_API ma_result ma_hpf2_get_heap_size(const ma_hpf2_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_biquad_config bqConfig;\n    bqConfig = ma_hpf2__get_biquad_config(pConfig);\n\n    return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes);\n}\n\nMA_API ma_result ma_hpf2_init_preallocated(const ma_hpf2_config* pConfig, void* pHeap, ma_hpf2* pHPF)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pHPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pHPF);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_hpf2__get_biquad_config(pConfig);\n    result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pHPF->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_hpf2_init(const ma_hpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf2* pHPF)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_hpf2_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_hpf2_init_preallocated(pConfig, pHeap, pHPF);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pHPF->bq._ownsHeap = MA_TRUE;    /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */\n    return MA_SUCCESS;\n}\n\nMA_API void ma_hpf2_uninit(ma_hpf2* pHPF, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pHPF == NULL) {\n        return;\n    }\n\n    ma_biquad_uninit(&pHPF->bq, pAllocationCallbacks);   /* <-- This will free the heap allocation. */\n}\n\nMA_API ma_result ma_hpf2_reinit(const ma_hpf2_config* pConfig, ma_hpf2* pHPF)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pHPF == NULL || pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_hpf2__get_biquad_config(pConfig);\n    result = ma_biquad_reinit(&bqConfig, &pHPF->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic MA_INLINE void ma_hpf2_process_pcm_frame_s16(ma_hpf2* pHPF, ma_int16* pFrameOut, const ma_int16* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_s16(&pHPF->bq, pFrameOut, pFrameIn);\n}\n\nstatic MA_INLINE void ma_hpf2_process_pcm_frame_f32(ma_hpf2* pHPF, float* pFrameOut, const float* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_f32(&pHPF->bq, pFrameOut, pFrameIn);\n}\n\nMA_API ma_result ma_hpf2_process_pcm_frames(ma_hpf2* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    if (pHPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_biquad_process_pcm_frames(&pHPF->bq, pFramesOut, pFramesIn, frameCount);\n}\n\nMA_API ma_uint32 ma_hpf2_get_latency(const ma_hpf2* pHPF)\n{\n    if (pHPF == NULL) {\n        return 0;\n    }\n\n    return ma_biquad_get_latency(&pHPF->bq);\n}\n\n\nMA_API ma_hpf_config ma_hpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order)\n{\n    ma_hpf_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format          = format;\n    config.channels        = channels;\n    config.sampleRate      = sampleRate;\n    config.cutoffFrequency = cutoffFrequency;\n    config.order           = ma_min(order, MA_MAX_FILTER_ORDER);\n\n    return config;\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t hpf1Offset;\n    size_t hpf2Offset;  /* Offset of the first second order filter. Subsequent filters will come straight after, and will each have the same heap size. */\n} ma_hpf_heap_layout;\n\nstatic void ma_hpf_calculate_sub_hpf_counts(ma_uint32 order, ma_uint32* pHPF1Count, ma_uint32* pHPF2Count)\n{\n    MA_ASSERT(pHPF1Count != NULL);\n    MA_ASSERT(pHPF2Count != NULL);\n\n    *pHPF1Count = order % 2;\n    *pHPF2Count = order / 2;\n}\n\nstatic ma_result ma_hpf_get_heap_layout(const ma_hpf_config* pConfig, ma_hpf_heap_layout* pHeapLayout)\n{\n    ma_result result;\n    ma_uint32 hpf1Count;\n    ma_uint32 hpf2Count;\n    ma_uint32 ihpf1;\n    ma_uint32 ihpf2;\n\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->channels == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->order > MA_MAX_FILTER_ORDER) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_hpf_calculate_sub_hpf_counts(pConfig->order, &hpf1Count, &hpf2Count);\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* HPF 1 */\n    pHeapLayout->hpf1Offset = pHeapLayout->sizeInBytes;\n    for (ihpf1 = 0; ihpf1 < hpf1Count; ihpf1 += 1) {\n        size_t hpf1HeapSizeInBytes;\n        ma_hpf1_config hpf1Config = ma_hpf1_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency);\n\n        result = ma_hpf1_get_heap_size(&hpf1Config, &hpf1HeapSizeInBytes);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pHeapLayout->sizeInBytes += sizeof(ma_hpf1) + hpf1HeapSizeInBytes;\n    }\n\n    /* HPF 2*/\n    pHeapLayout->hpf2Offset = pHeapLayout->sizeInBytes;\n    for (ihpf2 = 0; ihpf2 < hpf2Count; ihpf2 += 1) {\n        size_t hpf2HeapSizeInBytes;\n        ma_hpf2_config hpf2Config = ma_hpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, 0.707107);   /* <-- The \"q\" parameter does not matter for the purpose of calculating the heap size. */\n\n        result = ma_hpf2_get_heap_size(&hpf2Config, &hpf2HeapSizeInBytes);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pHeapLayout->sizeInBytes += sizeof(ma_hpf2) + hpf2HeapSizeInBytes;\n    }\n\n    /* Make sure allocation size is aligned. */\n    pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_hpf_reinit__internal(const ma_hpf_config* pConfig, void* pHeap, ma_hpf* pHPF, ma_bool32 isNew)\n{\n    ma_result result;\n    ma_uint32 hpf1Count;\n    ma_uint32 hpf2Count;\n    ma_uint32 ihpf1;\n    ma_uint32 ihpf2;\n    ma_hpf_heap_layout heapLayout;  /* Only used if isNew is true. */\n\n    if (pHPF == NULL || pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Only supporting f32 and s16. */\n    if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The format cannot be changed after initialization. */\n    if (pHPF->format != ma_format_unknown && pHPF->format != pConfig->format) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* The channel count cannot be changed after initialization. */\n    if (pHPF->channels != 0 && pHPF->channels != pConfig->channels) {\n        return MA_INVALID_OPERATION;\n    }\n\n    if (pConfig->order > MA_MAX_FILTER_ORDER) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_hpf_calculate_sub_hpf_counts(pConfig->order, &hpf1Count, &hpf2Count);\n\n    /* The filter order can't change between reinits. */\n    if (!isNew) {\n        if (pHPF->hpf1Count != hpf1Count || pHPF->hpf2Count != hpf2Count) {\n            return MA_INVALID_OPERATION;\n        }\n    }\n\n    if (isNew) {\n        result = ma_hpf_get_heap_layout(pConfig, &heapLayout);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pHPF->_pHeap = pHeap;\n        MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n        pHPF->pHPF1 = (ma_hpf1*)ma_offset_ptr(pHeap, heapLayout.hpf1Offset);\n        pHPF->pHPF2 = (ma_hpf2*)ma_offset_ptr(pHeap, heapLayout.hpf2Offset);\n    } else {\n        MA_ZERO_OBJECT(&heapLayout);    /* To silence a compiler warning. */\n    }\n\n    for (ihpf1 = 0; ihpf1 < hpf1Count; ihpf1 += 1) {\n        ma_hpf1_config hpf1Config = ma_hpf1_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency);\n\n        if (isNew) {\n            size_t hpf1HeapSizeInBytes;\n\n            result = ma_hpf1_get_heap_size(&hpf1Config, &hpf1HeapSizeInBytes);\n            if (result == MA_SUCCESS) {\n                result = ma_hpf1_init_preallocated(&hpf1Config, ma_offset_ptr(pHeap, heapLayout.hpf1Offset + (sizeof(ma_hpf1) * hpf1Count) + (ihpf1 * hpf1HeapSizeInBytes)), &pHPF->pHPF1[ihpf1]);\n            }\n        } else {\n            result = ma_hpf1_reinit(&hpf1Config, &pHPF->pHPF1[ihpf1]);\n        }\n\n        if (result != MA_SUCCESS) {\n            ma_uint32 jhpf1;\n\n            for (jhpf1 = 0; jhpf1 < ihpf1; jhpf1 += 1) {\n                ma_hpf1_uninit(&pHPF->pHPF1[jhpf1], NULL);  /* No need for allocation callbacks here since we used a preallocated heap allocation. */\n            }\n\n            return result;\n        }\n    }\n\n    for (ihpf2 = 0; ihpf2 < hpf2Count; ihpf2 += 1) {\n        ma_hpf2_config hpf2Config;\n        double q;\n        double a;\n\n        /* Tempting to use 0.707107, but won't result in a Butterworth filter if the order is > 2. */\n        if (hpf1Count == 1) {\n            a = (1 + ihpf2*1) * (MA_PI_D/(pConfig->order*1));   /* Odd order. */\n        } else {\n            a = (1 + ihpf2*2) * (MA_PI_D/(pConfig->order*2));   /* Even order. */\n        }\n        q = 1 / (2*ma_cosd(a));\n\n        hpf2Config = ma_hpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, q);\n\n        if (isNew) {\n            size_t hpf2HeapSizeInBytes;\n\n            result = ma_hpf2_get_heap_size(&hpf2Config, &hpf2HeapSizeInBytes);\n            if (result == MA_SUCCESS) {\n                result = ma_hpf2_init_preallocated(&hpf2Config, ma_offset_ptr(pHeap, heapLayout.hpf2Offset + (sizeof(ma_hpf2) * hpf2Count) + (ihpf2 * hpf2HeapSizeInBytes)), &pHPF->pHPF2[ihpf2]);\n            }\n        } else {\n            result = ma_hpf2_reinit(&hpf2Config, &pHPF->pHPF2[ihpf2]);\n        }\n\n        if (result != MA_SUCCESS) {\n            ma_uint32 jhpf1;\n            ma_uint32 jhpf2;\n\n            for (jhpf1 = 0; jhpf1 < hpf1Count; jhpf1 += 1) {\n                ma_hpf1_uninit(&pHPF->pHPF1[jhpf1], NULL);  /* No need for allocation callbacks here since we used a preallocated heap allocation. */\n            }\n\n            for (jhpf2 = 0; jhpf2 < ihpf2; jhpf2 += 1) {\n                ma_hpf2_uninit(&pHPF->pHPF2[jhpf2], NULL);  /* No need for allocation callbacks here since we used a preallocated heap allocation. */\n            }\n\n            return result;\n        }\n    }\n\n    pHPF->hpf1Count  = hpf1Count;\n    pHPF->hpf2Count  = hpf2Count;\n    pHPF->format     = pConfig->format;\n    pHPF->channels   = pConfig->channels;\n    pHPF->sampleRate = pConfig->sampleRate;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_hpf_get_heap_size(const ma_hpf_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_hpf_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_hpf_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return result;\n}\n\nMA_API ma_result ma_hpf_init_preallocated(const ma_hpf_config* pConfig, void* pHeap, ma_hpf* pLPF)\n{\n    if (pLPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pLPF);\n\n    return ma_hpf_reinit__internal(pConfig, pHeap, pLPF, /*isNew*/MA_TRUE);\n}\n\nMA_API ma_result ma_hpf_init(const ma_hpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf* pHPF)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_hpf_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_hpf_init_preallocated(pConfig, pHeap, pHPF);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pHPF->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_hpf_uninit(ma_hpf* pHPF, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_uint32 ihpf1;\n    ma_uint32 ihpf2;\n\n    if (pHPF == NULL) {\n        return;\n    }\n\n    for (ihpf1 = 0; ihpf1 < pHPF->hpf1Count; ihpf1 += 1) {\n        ma_hpf1_uninit(&pHPF->pHPF1[ihpf1], pAllocationCallbacks);\n    }\n\n    for (ihpf2 = 0; ihpf2 < pHPF->hpf2Count; ihpf2 += 1) {\n        ma_hpf2_uninit(&pHPF->pHPF2[ihpf2], pAllocationCallbacks);\n    }\n\n    if (pHPF->_ownsHeap) {\n        ma_free(pHPF->_pHeap, pAllocationCallbacks);\n    }\n}\n\nMA_API ma_result ma_hpf_reinit(const ma_hpf_config* pConfig, ma_hpf* pHPF)\n{\n    return ma_hpf_reinit__internal(pConfig, NULL, pHPF, /*isNew*/MA_FALSE);\n}\n\nMA_API ma_result ma_hpf_process_pcm_frames(ma_hpf* pHPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    ma_result result;\n    ma_uint32 ihpf1;\n    ma_uint32 ihpf2;\n\n    if (pHPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Faster path for in-place. */\n    if (pFramesOut == pFramesIn) {\n        for (ihpf1 = 0; ihpf1 < pHPF->hpf1Count; ihpf1 += 1) {\n            result = ma_hpf1_process_pcm_frames(&pHPF->pHPF1[ihpf1], pFramesOut, pFramesOut, frameCount);\n            if (result != MA_SUCCESS) {\n                return result;\n            }\n        }\n\n        for (ihpf2 = 0; ihpf2 < pHPF->hpf2Count; ihpf2 += 1) {\n            result = ma_hpf2_process_pcm_frames(&pHPF->pHPF2[ihpf2], pFramesOut, pFramesOut, frameCount);\n            if (result != MA_SUCCESS) {\n                return result;\n            }\n        }\n    }\n\n    /* Slightly slower path for copying. */\n    if (pFramesOut != pFramesIn) {\n        ma_uint32 iFrame;\n\n        /*  */ if (pHPF->format == ma_format_f32) {\n            /* */ float* pFramesOutF32 = (      float*)pFramesOut;\n            const float* pFramesInF32  = (const float*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                MA_COPY_MEMORY(pFramesOutF32, pFramesInF32, ma_get_bytes_per_frame(pHPF->format, pHPF->channels));\n\n                for (ihpf1 = 0; ihpf1 < pHPF->hpf1Count; ihpf1 += 1) {\n                    ma_hpf1_process_pcm_frame_f32(&pHPF->pHPF1[ihpf1], pFramesOutF32, pFramesOutF32);\n                }\n\n                for (ihpf2 = 0; ihpf2 < pHPF->hpf2Count; ihpf2 += 1) {\n                    ma_hpf2_process_pcm_frame_f32(&pHPF->pHPF2[ihpf2], pFramesOutF32, pFramesOutF32);\n                }\n\n                pFramesOutF32 += pHPF->channels;\n                pFramesInF32  += pHPF->channels;\n            }\n        } else if (pHPF->format == ma_format_s16) {\n            /* */ ma_int16* pFramesOutS16 = (      ma_int16*)pFramesOut;\n            const ma_int16* pFramesInS16  = (const ma_int16*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                MA_COPY_MEMORY(pFramesOutS16, pFramesInS16, ma_get_bytes_per_frame(pHPF->format, pHPF->channels));\n\n                for (ihpf1 = 0; ihpf1 < pHPF->hpf1Count; ihpf1 += 1) {\n                    ma_hpf1_process_pcm_frame_s16(&pHPF->pHPF1[ihpf1], pFramesOutS16, pFramesOutS16);\n                }\n\n                for (ihpf2 = 0; ihpf2 < pHPF->hpf2Count; ihpf2 += 1) {\n                    ma_hpf2_process_pcm_frame_s16(&pHPF->pHPF2[ihpf2], pFramesOutS16, pFramesOutS16);\n                }\n\n                pFramesOutS16 += pHPF->channels;\n                pFramesInS16  += pHPF->channels;\n            }\n        } else {\n            MA_ASSERT(MA_FALSE);\n            return MA_INVALID_OPERATION;    /* Should never hit this. */\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_uint32 ma_hpf_get_latency(const ma_hpf* pHPF)\n{\n    if (pHPF == NULL) {\n        return 0;\n    }\n\n    return pHPF->hpf2Count*2 + pHPF->hpf1Count;\n}\n\n\n/**************************************************************************************************************************************************************\n\nBand-Pass Filtering\n\n**************************************************************************************************************************************************************/\nMA_API ma_bpf2_config ma_bpf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, double q)\n{\n    ma_bpf2_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format = format;\n    config.channels = channels;\n    config.sampleRate = sampleRate;\n    config.cutoffFrequency = cutoffFrequency;\n    config.q = q;\n\n    /* Q cannot be 0 or else it'll result in a division by 0. In this case just default to 0.707107. */\n    if (config.q == 0) {\n        config.q = 0.707107;\n    }\n\n    return config;\n}\n\n\nstatic MA_INLINE ma_biquad_config ma_bpf2__get_biquad_config(const ma_bpf2_config* pConfig)\n{\n    ma_biquad_config bqConfig;\n    double q;\n    double w;\n    double s;\n    double c;\n    double a;\n\n    MA_ASSERT(pConfig != NULL);\n\n    q = pConfig->q;\n    w = 2 * MA_PI_D * pConfig->cutoffFrequency / pConfig->sampleRate;\n    s = ma_sind(w);\n    c = ma_cosd(w);\n    a = s / (2*q);\n\n    bqConfig.b0 =  q * a;\n    bqConfig.b1 =  0;\n    bqConfig.b2 = -q * a;\n    bqConfig.a0 =  1 + a;\n    bqConfig.a1 = -2 * c;\n    bqConfig.a2 =  1 - a;\n\n    bqConfig.format   = pConfig->format;\n    bqConfig.channels = pConfig->channels;\n\n    return bqConfig;\n}\n\nMA_API ma_result ma_bpf2_get_heap_size(const ma_bpf2_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_biquad_config bqConfig;\n    bqConfig = ma_bpf2__get_biquad_config(pConfig);\n\n    return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes);\n}\n\nMA_API ma_result ma_bpf2_init_preallocated(const ma_bpf2_config* pConfig, void* pHeap, ma_bpf2* pBPF)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pBPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pBPF);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_bpf2__get_biquad_config(pConfig);\n    result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pBPF->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_bpf2_init(const ma_bpf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf2* pBPF)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_bpf2_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_bpf2_init_preallocated(pConfig, pHeap, pBPF);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pBPF->bq._ownsHeap = MA_TRUE;    /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */\n    return MA_SUCCESS;\n}\n\nMA_API void ma_bpf2_uninit(ma_bpf2* pBPF, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pBPF == NULL) {\n        return;\n    }\n\n    ma_biquad_uninit(&pBPF->bq, pAllocationCallbacks);   /* <-- This will free the heap allocation. */\n}\n\nMA_API ma_result ma_bpf2_reinit(const ma_bpf2_config* pConfig, ma_bpf2* pBPF)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pBPF == NULL || pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_bpf2__get_biquad_config(pConfig);\n    result = ma_biquad_reinit(&bqConfig, &pBPF->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic MA_INLINE void ma_bpf2_process_pcm_frame_s16(ma_bpf2* pBPF, ma_int16* pFrameOut, const ma_int16* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_s16(&pBPF->bq, pFrameOut, pFrameIn);\n}\n\nstatic MA_INLINE void ma_bpf2_process_pcm_frame_f32(ma_bpf2* pBPF, float* pFrameOut, const float* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_f32(&pBPF->bq, pFrameOut, pFrameIn);\n}\n\nMA_API ma_result ma_bpf2_process_pcm_frames(ma_bpf2* pBPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    if (pBPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_biquad_process_pcm_frames(&pBPF->bq, pFramesOut, pFramesIn, frameCount);\n}\n\nMA_API ma_uint32 ma_bpf2_get_latency(const ma_bpf2* pBPF)\n{\n    if (pBPF == NULL) {\n        return 0;\n    }\n\n    return ma_biquad_get_latency(&pBPF->bq);\n}\n\n\nMA_API ma_bpf_config ma_bpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order)\n{\n    ma_bpf_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format          = format;\n    config.channels        = channels;\n    config.sampleRate      = sampleRate;\n    config.cutoffFrequency = cutoffFrequency;\n    config.order           = ma_min(order, MA_MAX_FILTER_ORDER);\n\n    return config;\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t bpf2Offset;\n} ma_bpf_heap_layout;\n\nstatic ma_result ma_bpf_get_heap_layout(const ma_bpf_config* pConfig, ma_bpf_heap_layout* pHeapLayout)\n{\n    ma_result result;\n    ma_uint32 bpf2Count;\n    ma_uint32 ibpf2;\n\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->order > MA_MAX_FILTER_ORDER) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* We must have an even number of order. */\n    if ((pConfig->order & 0x1) != 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    bpf2Count = pConfig->channels / 2;\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* BPF 2 */\n    pHeapLayout->bpf2Offset = pHeapLayout->sizeInBytes;\n    for (ibpf2 = 0; ibpf2 < bpf2Count; ibpf2 += 1) {\n        size_t bpf2HeapSizeInBytes;\n        ma_bpf2_config bpf2Config = ma_bpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, 0.707107);   /* <-- The \"q\" parameter does not matter for the purpose of calculating the heap size. */\n\n        result = ma_bpf2_get_heap_size(&bpf2Config, &bpf2HeapSizeInBytes);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pHeapLayout->sizeInBytes += sizeof(ma_bpf2) + bpf2HeapSizeInBytes;\n    }\n\n    /* Make sure allocation size is aligned. */\n    pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_bpf_reinit__internal(const ma_bpf_config* pConfig, void* pHeap, ma_bpf* pBPF, ma_bool32 isNew)\n{\n    ma_result result;\n    ma_uint32 bpf2Count;\n    ma_uint32 ibpf2;\n    ma_bpf_heap_layout heapLayout;  /* Only used if isNew is true. */\n\n    if (pBPF == NULL || pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Only supporting f32 and s16. */\n    if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The format cannot be changed after initialization. */\n    if (pBPF->format != ma_format_unknown && pBPF->format != pConfig->format) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* The channel count cannot be changed after initialization. */\n    if (pBPF->channels != 0 && pBPF->channels != pConfig->channels) {\n        return MA_INVALID_OPERATION;\n    }\n\n    if (pConfig->order > MA_MAX_FILTER_ORDER) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* We must have an even number of order. */\n    if ((pConfig->order & 0x1) != 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    bpf2Count = pConfig->order / 2;\n\n    /* The filter order can't change between reinits. */\n    if (!isNew) {\n        if (pBPF->bpf2Count != bpf2Count) {\n            return MA_INVALID_OPERATION;\n        }\n    }\n\n    if (isNew) {\n        result = ma_bpf_get_heap_layout(pConfig, &heapLayout);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pBPF->_pHeap = pHeap;\n        MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n        pBPF->pBPF2 = (ma_bpf2*)ma_offset_ptr(pHeap, heapLayout.bpf2Offset);\n    } else {\n        MA_ZERO_OBJECT(&heapLayout);\n    }\n\n    for (ibpf2 = 0; ibpf2 < bpf2Count; ibpf2 += 1) {\n        ma_bpf2_config bpf2Config;\n        double q;\n\n        /* TODO: Calculate Q to make this a proper Butterworth filter. */\n        q = 0.707107;\n\n        bpf2Config = ma_bpf2_config_init(pConfig->format, pConfig->channels, pConfig->sampleRate, pConfig->cutoffFrequency, q);\n\n        if (isNew) {\n            size_t bpf2HeapSizeInBytes;\n\n            result = ma_bpf2_get_heap_size(&bpf2Config, &bpf2HeapSizeInBytes);\n            if (result == MA_SUCCESS) {\n                result = ma_bpf2_init_preallocated(&bpf2Config, ma_offset_ptr(pHeap, heapLayout.bpf2Offset + (sizeof(ma_bpf2) * bpf2Count) + (ibpf2 * bpf2HeapSizeInBytes)), &pBPF->pBPF2[ibpf2]);\n            }\n        } else {\n            result = ma_bpf2_reinit(&bpf2Config, &pBPF->pBPF2[ibpf2]);\n        }\n\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    pBPF->bpf2Count = bpf2Count;\n    pBPF->format    = pConfig->format;\n    pBPF->channels  = pConfig->channels;\n\n    return MA_SUCCESS;\n}\n\n\nMA_API ma_result ma_bpf_get_heap_size(const ma_bpf_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_bpf_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_bpf_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_bpf_init_preallocated(const ma_bpf_config* pConfig, void* pHeap, ma_bpf* pBPF)\n{\n    if (pBPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pBPF);\n\n    return ma_bpf_reinit__internal(pConfig, pHeap, pBPF, /*isNew*/MA_TRUE);\n}\n\nMA_API ma_result ma_bpf_init(const ma_bpf_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf* pBPF)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_bpf_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_bpf_init_preallocated(pConfig, pHeap, pBPF);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pBPF->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_bpf_uninit(ma_bpf* pBPF, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_uint32 ibpf2;\n\n    if (pBPF == NULL) {\n        return;\n    }\n\n    for (ibpf2 = 0; ibpf2 < pBPF->bpf2Count; ibpf2 += 1) {\n        ma_bpf2_uninit(&pBPF->pBPF2[ibpf2], pAllocationCallbacks);\n    }\n\n    if (pBPF->_ownsHeap) {\n        ma_free(pBPF->_pHeap, pAllocationCallbacks);\n    }\n}\n\nMA_API ma_result ma_bpf_reinit(const ma_bpf_config* pConfig, ma_bpf* pBPF)\n{\n    return ma_bpf_reinit__internal(pConfig, NULL, pBPF, /*isNew*/MA_FALSE);\n}\n\nMA_API ma_result ma_bpf_process_pcm_frames(ma_bpf* pBPF, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    ma_result result;\n    ma_uint32 ibpf2;\n\n    if (pBPF == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Faster path for in-place. */\n    if (pFramesOut == pFramesIn) {\n        for (ibpf2 = 0; ibpf2 < pBPF->bpf2Count; ibpf2 += 1) {\n            result = ma_bpf2_process_pcm_frames(&pBPF->pBPF2[ibpf2], pFramesOut, pFramesOut, frameCount);\n            if (result != MA_SUCCESS) {\n                return result;\n            }\n        }\n    }\n\n    /* Slightly slower path for copying. */\n    if (pFramesOut != pFramesIn) {\n        ma_uint32 iFrame;\n\n        /*  */ if (pBPF->format == ma_format_f32) {\n            /* */ float* pFramesOutF32 = (      float*)pFramesOut;\n            const float* pFramesInF32  = (const float*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                MA_COPY_MEMORY(pFramesOutF32, pFramesInF32, ma_get_bytes_per_frame(pBPF->format, pBPF->channels));\n\n                for (ibpf2 = 0; ibpf2 < pBPF->bpf2Count; ibpf2 += 1) {\n                    ma_bpf2_process_pcm_frame_f32(&pBPF->pBPF2[ibpf2], pFramesOutF32, pFramesOutF32);\n                }\n\n                pFramesOutF32 += pBPF->channels;\n                pFramesInF32  += pBPF->channels;\n            }\n        } else if (pBPF->format == ma_format_s16) {\n            /* */ ma_int16* pFramesOutS16 = (      ma_int16*)pFramesOut;\n            const ma_int16* pFramesInS16  = (const ma_int16*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                MA_COPY_MEMORY(pFramesOutS16, pFramesInS16, ma_get_bytes_per_frame(pBPF->format, pBPF->channels));\n\n                for (ibpf2 = 0; ibpf2 < pBPF->bpf2Count; ibpf2 += 1) {\n                    ma_bpf2_process_pcm_frame_s16(&pBPF->pBPF2[ibpf2], pFramesOutS16, pFramesOutS16);\n                }\n\n                pFramesOutS16 += pBPF->channels;\n                pFramesInS16  += pBPF->channels;\n            }\n        } else {\n            MA_ASSERT(MA_FALSE);\n            return MA_INVALID_OPERATION;    /* Should never hit this. */\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_uint32 ma_bpf_get_latency(const ma_bpf* pBPF)\n{\n    if (pBPF == NULL) {\n        return 0;\n    }\n\n    return pBPF->bpf2Count*2;\n}\n\n\n/**************************************************************************************************************************************************************\n\nNotching Filter\n\n**************************************************************************************************************************************************************/\nMA_API ma_notch2_config ma_notch2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double q, double frequency)\n{\n    ma_notch2_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format     = format;\n    config.channels   = channels;\n    config.sampleRate = sampleRate;\n    config.q          = q;\n    config.frequency  = frequency;\n\n    if (config.q == 0) {\n        config.q = 0.707107;\n    }\n\n    return config;\n}\n\n\nstatic MA_INLINE ma_biquad_config ma_notch2__get_biquad_config(const ma_notch2_config* pConfig)\n{\n    ma_biquad_config bqConfig;\n    double q;\n    double w;\n    double s;\n    double c;\n    double a;\n\n    MA_ASSERT(pConfig != NULL);\n\n    q = pConfig->q;\n    w = 2 * MA_PI_D * pConfig->frequency / pConfig->sampleRate;\n    s = ma_sind(w);\n    c = ma_cosd(w);\n    a = s / (2*q);\n\n    bqConfig.b0 =  1;\n    bqConfig.b1 = -2 * c;\n    bqConfig.b2 =  1;\n    bqConfig.a0 =  1 + a;\n    bqConfig.a1 = -2 * c;\n    bqConfig.a2 =  1 - a;\n\n    bqConfig.format   = pConfig->format;\n    bqConfig.channels = pConfig->channels;\n\n    return bqConfig;\n}\n\nMA_API ma_result ma_notch2_get_heap_size(const ma_notch2_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_biquad_config bqConfig;\n    bqConfig = ma_notch2__get_biquad_config(pConfig);\n\n    return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes);\n}\n\nMA_API ma_result ma_notch2_init_preallocated(const ma_notch2_config* pConfig, void* pHeap, ma_notch2* pFilter)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pFilter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pFilter);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_notch2__get_biquad_config(pConfig);\n    result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pFilter->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_notch2_init(const ma_notch2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_notch2* pFilter)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_notch2_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_notch2_init_preallocated(pConfig, pHeap, pFilter);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pFilter->bq._ownsHeap = MA_TRUE;    /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */\n    return MA_SUCCESS;\n}\n\nMA_API void ma_notch2_uninit(ma_notch2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pFilter == NULL) {\n        return;\n    }\n\n    ma_biquad_uninit(&pFilter->bq, pAllocationCallbacks);   /* <-- This will free the heap allocation. */\n}\n\nMA_API ma_result ma_notch2_reinit(const ma_notch2_config* pConfig, ma_notch2* pFilter)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pFilter == NULL || pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_notch2__get_biquad_config(pConfig);\n    result = ma_biquad_reinit(&bqConfig, &pFilter->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic MA_INLINE void ma_notch2_process_pcm_frame_s16(ma_notch2* pFilter, ma_int16* pFrameOut, const ma_int16* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_s16(&pFilter->bq, pFrameOut, pFrameIn);\n}\n\nstatic MA_INLINE void ma_notch2_process_pcm_frame_f32(ma_notch2* pFilter, float* pFrameOut, const float* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_f32(&pFilter->bq, pFrameOut, pFrameIn);\n}\n\nMA_API ma_result ma_notch2_process_pcm_frames(ma_notch2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    if (pFilter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_biquad_process_pcm_frames(&pFilter->bq, pFramesOut, pFramesIn, frameCount);\n}\n\nMA_API ma_uint32 ma_notch2_get_latency(const ma_notch2* pFilter)\n{\n    if (pFilter == NULL) {\n        return 0;\n    }\n\n    return ma_biquad_get_latency(&pFilter->bq);\n}\n\n\n\n/**************************************************************************************************************************************************************\n\nPeaking EQ Filter\n\n**************************************************************************************************************************************************************/\nMA_API ma_peak2_config ma_peak2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency)\n{\n    ma_peak2_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format     = format;\n    config.channels   = channels;\n    config.sampleRate = sampleRate;\n    config.gainDB     = gainDB;\n    config.q          = q;\n    config.frequency  = frequency;\n\n    if (config.q == 0) {\n        config.q = 0.707107;\n    }\n\n    return config;\n}\n\n\nstatic MA_INLINE ma_biquad_config ma_peak2__get_biquad_config(const ma_peak2_config* pConfig)\n{\n    ma_biquad_config bqConfig;\n    double q;\n    double w;\n    double s;\n    double c;\n    double a;\n    double A;\n\n    MA_ASSERT(pConfig != NULL);\n\n    q = pConfig->q;\n    w = 2 * MA_PI_D * pConfig->frequency / pConfig->sampleRate;\n    s = ma_sind(w);\n    c = ma_cosd(w);\n    a = s / (2*q);\n    A = ma_powd(10, (pConfig->gainDB / 40));\n\n    bqConfig.b0 =  1 + (a * A);\n    bqConfig.b1 = -2 * c;\n    bqConfig.b2 =  1 - (a * A);\n    bqConfig.a0 =  1 + (a / A);\n    bqConfig.a1 = -2 * c;\n    bqConfig.a2 =  1 - (a / A);\n\n    bqConfig.format   = pConfig->format;\n    bqConfig.channels = pConfig->channels;\n\n    return bqConfig;\n}\n\nMA_API ma_result ma_peak2_get_heap_size(const ma_peak2_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_biquad_config bqConfig;\n    bqConfig = ma_peak2__get_biquad_config(pConfig);\n\n    return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes);\n}\n\nMA_API ma_result ma_peak2_init_preallocated(const ma_peak2_config* pConfig, void* pHeap, ma_peak2* pFilter)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pFilter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pFilter);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_peak2__get_biquad_config(pConfig);\n    result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pFilter->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_peak2_init(const ma_peak2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_peak2* pFilter)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_peak2_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_peak2_init_preallocated(pConfig, pHeap, pFilter);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pFilter->bq._ownsHeap = MA_TRUE;    /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */\n    return MA_SUCCESS;\n}\n\nMA_API void ma_peak2_uninit(ma_peak2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pFilter == NULL) {\n        return;\n    }\n\n    ma_biquad_uninit(&pFilter->bq, pAllocationCallbacks);   /* <-- This will free the heap allocation. */\n}\n\nMA_API ma_result ma_peak2_reinit(const ma_peak2_config* pConfig, ma_peak2* pFilter)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pFilter == NULL || pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_peak2__get_biquad_config(pConfig);\n    result = ma_biquad_reinit(&bqConfig, &pFilter->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic MA_INLINE void ma_peak2_process_pcm_frame_s16(ma_peak2* pFilter, ma_int16* pFrameOut, const ma_int16* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_s16(&pFilter->bq, pFrameOut, pFrameIn);\n}\n\nstatic MA_INLINE void ma_peak2_process_pcm_frame_f32(ma_peak2* pFilter, float* pFrameOut, const float* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_f32(&pFilter->bq, pFrameOut, pFrameIn);\n}\n\nMA_API ma_result ma_peak2_process_pcm_frames(ma_peak2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    if (pFilter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_biquad_process_pcm_frames(&pFilter->bq, pFramesOut, pFramesIn, frameCount);\n}\n\nMA_API ma_uint32 ma_peak2_get_latency(const ma_peak2* pFilter)\n{\n    if (pFilter == NULL) {\n        return 0;\n    }\n\n    return ma_biquad_get_latency(&pFilter->bq);\n}\n\n\n/**************************************************************************************************************************************************************\n\nLow Shelf Filter\n\n**************************************************************************************************************************************************************/\nMA_API ma_loshelf2_config ma_loshelf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double shelfSlope, double frequency)\n{\n    ma_loshelf2_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format     = format;\n    config.channels   = channels;\n    config.sampleRate = sampleRate;\n    config.gainDB     = gainDB;\n    config.shelfSlope = shelfSlope;\n    config.frequency  = frequency;\n\n    return config;\n}\n\n\nstatic MA_INLINE ma_biquad_config ma_loshelf2__get_biquad_config(const ma_loshelf2_config* pConfig)\n{\n    ma_biquad_config bqConfig;\n    double w;\n    double s;\n    double c;\n    double A;\n    double S;\n    double a;\n    double sqrtA;\n\n    MA_ASSERT(pConfig != NULL);\n\n    w = 2 * MA_PI_D * pConfig->frequency / pConfig->sampleRate;\n    s = ma_sind(w);\n    c = ma_cosd(w);\n    A = ma_powd(10, (pConfig->gainDB / 40));\n    S = pConfig->shelfSlope;\n    a = s/2 * ma_sqrtd((A + 1/A) * (1/S - 1) + 2);\n    sqrtA = 2*ma_sqrtd(A)*a;\n\n    bqConfig.b0 =  A * ((A + 1) - (A - 1)*c + sqrtA);\n    bqConfig.b1 =  2 * A * ((A - 1) - (A + 1)*c);\n    bqConfig.b2 =  A * ((A + 1) - (A - 1)*c - sqrtA);\n    bqConfig.a0 =  (A + 1) + (A - 1)*c + sqrtA;\n    bqConfig.a1 = -2 * ((A - 1) + (A + 1)*c);\n    bqConfig.a2 =  (A + 1) + (A - 1)*c - sqrtA;\n\n    bqConfig.format   = pConfig->format;\n    bqConfig.channels = pConfig->channels;\n\n    return bqConfig;\n}\n\nMA_API ma_result ma_loshelf2_get_heap_size(const ma_loshelf2_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_biquad_config bqConfig;\n    bqConfig = ma_loshelf2__get_biquad_config(pConfig);\n\n    return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes);\n}\n\nMA_API ma_result ma_loshelf2_init_preallocated(const ma_loshelf2_config* pConfig, void* pHeap, ma_loshelf2* pFilter)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pFilter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pFilter);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_loshelf2__get_biquad_config(pConfig);\n    result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pFilter->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_loshelf2_init(const ma_loshelf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_loshelf2* pFilter)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_loshelf2_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_loshelf2_init_preallocated(pConfig, pHeap, pFilter);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pFilter->bq._ownsHeap = MA_TRUE;    /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */\n    return MA_SUCCESS;\n}\n\nMA_API void ma_loshelf2_uninit(ma_loshelf2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pFilter == NULL) {\n        return;\n    }\n\n    ma_biquad_uninit(&pFilter->bq, pAllocationCallbacks);   /* <-- This will free the heap allocation. */\n}\n\nMA_API ma_result ma_loshelf2_reinit(const ma_loshelf2_config* pConfig, ma_loshelf2* pFilter)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pFilter == NULL || pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_loshelf2__get_biquad_config(pConfig);\n    result = ma_biquad_reinit(&bqConfig, &pFilter->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic MA_INLINE void ma_loshelf2_process_pcm_frame_s16(ma_loshelf2* pFilter, ma_int16* pFrameOut, const ma_int16* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_s16(&pFilter->bq, pFrameOut, pFrameIn);\n}\n\nstatic MA_INLINE void ma_loshelf2_process_pcm_frame_f32(ma_loshelf2* pFilter, float* pFrameOut, const float* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_f32(&pFilter->bq, pFrameOut, pFrameIn);\n}\n\nMA_API ma_result ma_loshelf2_process_pcm_frames(ma_loshelf2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    if (pFilter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_biquad_process_pcm_frames(&pFilter->bq, pFramesOut, pFramesIn, frameCount);\n}\n\nMA_API ma_uint32 ma_loshelf2_get_latency(const ma_loshelf2* pFilter)\n{\n    if (pFilter == NULL) {\n        return 0;\n    }\n\n    return ma_biquad_get_latency(&pFilter->bq);\n}\n\n\n/**************************************************************************************************************************************************************\n\nHigh Shelf Filter\n\n**************************************************************************************************************************************************************/\nMA_API ma_hishelf2_config ma_hishelf2_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double shelfSlope, double frequency)\n{\n    ma_hishelf2_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format     = format;\n    config.channels   = channels;\n    config.sampleRate = sampleRate;\n    config.gainDB     = gainDB;\n    config.shelfSlope = shelfSlope;\n    config.frequency  = frequency;\n\n    return config;\n}\n\n\nstatic MA_INLINE ma_biquad_config ma_hishelf2__get_biquad_config(const ma_hishelf2_config* pConfig)\n{\n    ma_biquad_config bqConfig;\n    double w;\n    double s;\n    double c;\n    double A;\n    double S;\n    double a;\n    double sqrtA;\n\n    MA_ASSERT(pConfig != NULL);\n\n    w = 2 * MA_PI_D * pConfig->frequency / pConfig->sampleRate;\n    s = ma_sind(w);\n    c = ma_cosd(w);\n    A = ma_powd(10, (pConfig->gainDB / 40));\n    S = pConfig->shelfSlope;\n    a = s/2 * ma_sqrtd((A + 1/A) * (1/S - 1) + 2);\n    sqrtA = 2*ma_sqrtd(A)*a;\n\n    bqConfig.b0 =  A * ((A + 1) + (A - 1)*c + sqrtA);\n    bqConfig.b1 = -2 * A * ((A - 1) + (A + 1)*c);\n    bqConfig.b2 =  A * ((A + 1) + (A - 1)*c - sqrtA);\n    bqConfig.a0 =  (A + 1) - (A - 1)*c + sqrtA;\n    bqConfig.a1 =  2 * ((A - 1) - (A + 1)*c);\n    bqConfig.a2 =  (A + 1) - (A - 1)*c - sqrtA;\n\n    bqConfig.format   = pConfig->format;\n    bqConfig.channels = pConfig->channels;\n\n    return bqConfig;\n}\n\nMA_API ma_result ma_hishelf2_get_heap_size(const ma_hishelf2_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_biquad_config bqConfig;\n    bqConfig = ma_hishelf2__get_biquad_config(pConfig);\n\n    return ma_biquad_get_heap_size(&bqConfig, pHeapSizeInBytes);\n}\n\nMA_API ma_result ma_hishelf2_init_preallocated(const ma_hishelf2_config* pConfig, void* pHeap, ma_hishelf2* pFilter)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pFilter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pFilter);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_hishelf2__get_biquad_config(pConfig);\n    result = ma_biquad_init_preallocated(&bqConfig, pHeap, &pFilter->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_hishelf2_init(const ma_hishelf2_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hishelf2* pFilter)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_hishelf2_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_hishelf2_init_preallocated(pConfig, pHeap, pFilter);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pFilter->bq._ownsHeap = MA_TRUE;    /* <-- This will cause the biquad to take ownership of the heap and free it when it's uninitialized. */\n    return MA_SUCCESS;\n}\n\nMA_API void ma_hishelf2_uninit(ma_hishelf2* pFilter, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pFilter == NULL) {\n        return;\n    }\n\n    ma_biquad_uninit(&pFilter->bq, pAllocationCallbacks);   /* <-- This will free the heap allocation. */\n}\n\nMA_API ma_result ma_hishelf2_reinit(const ma_hishelf2_config* pConfig, ma_hishelf2* pFilter)\n{\n    ma_result result;\n    ma_biquad_config bqConfig;\n\n    if (pFilter == NULL || pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    bqConfig = ma_hishelf2__get_biquad_config(pConfig);\n    result = ma_biquad_reinit(&bqConfig, &pFilter->bq);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic MA_INLINE void ma_hishelf2_process_pcm_frame_s16(ma_hishelf2* pFilter, ma_int16* pFrameOut, const ma_int16* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_s16(&pFilter->bq, pFrameOut, pFrameIn);\n}\n\nstatic MA_INLINE void ma_hishelf2_process_pcm_frame_f32(ma_hishelf2* pFilter, float* pFrameOut, const float* pFrameIn)\n{\n    ma_biquad_process_pcm_frame_f32(&pFilter->bq, pFrameOut, pFrameIn);\n}\n\nMA_API ma_result ma_hishelf2_process_pcm_frames(ma_hishelf2* pFilter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    if (pFilter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_biquad_process_pcm_frames(&pFilter->bq, pFramesOut, pFramesIn, frameCount);\n}\n\nMA_API ma_uint32 ma_hishelf2_get_latency(const ma_hishelf2* pFilter)\n{\n    if (pFilter == NULL) {\n        return 0;\n    }\n\n    return ma_biquad_get_latency(&pFilter->bq);\n}\n\n\n\n/*\nDelay\n*/\nMA_API ma_delay_config ma_delay_config_init(ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 delayInFrames, float decay)\n{\n    ma_delay_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.channels      = channels;\n    config.sampleRate    = sampleRate;\n    config.delayInFrames = delayInFrames;\n    config.delayStart    = (decay == 0) ? MA_TRUE : MA_FALSE;   /* Delay the start if it looks like we're not configuring an echo. */\n    config.wet           = 1;\n    config.dry           = 1;\n    config.decay         = decay;\n\n    return config;\n}\n\n\nMA_API ma_result ma_delay_init(const ma_delay_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_delay* pDelay)\n{\n    if (pDelay == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pDelay);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->decay < 0 || pConfig->decay > 1) {\n        return MA_INVALID_ARGS;\n    }\n\n    pDelay->config             = *pConfig;\n    pDelay->bufferSizeInFrames = pConfig->delayInFrames;\n    pDelay->cursor             = 0;\n\n    pDelay->pBuffer = (float*)ma_malloc((size_t)(pDelay->bufferSizeInFrames * ma_get_bytes_per_frame(ma_format_f32, pConfig->channels)), pAllocationCallbacks);\n    if (pDelay->pBuffer == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    ma_silence_pcm_frames(pDelay->pBuffer, pDelay->bufferSizeInFrames, ma_format_f32, pConfig->channels);\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_delay_uninit(ma_delay* pDelay, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pDelay == NULL) {\n        return;\n    }\n\n    ma_free(pDelay->pBuffer, pAllocationCallbacks);\n}\n\nMA_API ma_result ma_delay_process_pcm_frames(ma_delay* pDelay, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount)\n{\n    ma_uint32 iFrame;\n    ma_uint32 iChannel;\n    float* pFramesOutF32 = (float*)pFramesOut;\n    const float* pFramesInF32 = (const float*)pFramesIn;\n\n    if (pDelay == NULL || pFramesOut == NULL || pFramesIn == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        for (iChannel = 0; iChannel < pDelay->config.channels; iChannel += 1) {\n            ma_uint32 iBuffer = (pDelay->cursor * pDelay->config.channels) + iChannel;\n\n            if (pDelay->config.delayStart) {\n                /* Delayed start. */\n\n                /* Read */\n                pFramesOutF32[iChannel] = pDelay->pBuffer[iBuffer] * pDelay->config.wet;\n\n                /* Feedback */\n                pDelay->pBuffer[iBuffer] = (pDelay->pBuffer[iBuffer] * pDelay->config.decay) + (pFramesInF32[iChannel] * pDelay->config.dry);\n            } else {\n                /* Immediate start */\n\n                /* Feedback */\n                pDelay->pBuffer[iBuffer] = (pDelay->pBuffer[iBuffer] * pDelay->config.decay) + (pFramesInF32[iChannel] * pDelay->config.dry);\n\n                /* Read */\n                pFramesOutF32[iChannel] = pDelay->pBuffer[iBuffer] * pDelay->config.wet;\n            }\n        }\n\n        pDelay->cursor = (pDelay->cursor + 1) % pDelay->bufferSizeInFrames;\n\n        pFramesOutF32 += pDelay->config.channels;\n        pFramesInF32  += pDelay->config.channels;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_delay_set_wet(ma_delay* pDelay, float value)\n{\n    if (pDelay == NULL) {\n        return;\n    }\n\n    pDelay->config.wet = value;\n}\n\nMA_API float ma_delay_get_wet(const ma_delay* pDelay)\n{\n    if (pDelay == NULL) {\n        return 0;\n    }\n\n    return pDelay->config.wet;\n}\n\nMA_API void ma_delay_set_dry(ma_delay* pDelay, float value)\n{\n    if (pDelay == NULL) {\n        return;\n    }\n\n    pDelay->config.dry = value;\n}\n\nMA_API float ma_delay_get_dry(const ma_delay* pDelay)\n{\n    if (pDelay == NULL) {\n        return 0;\n    }\n\n    return pDelay->config.dry;\n}\n\nMA_API void ma_delay_set_decay(ma_delay* pDelay, float value)\n{\n    if (pDelay == NULL) {\n        return;\n    }\n\n    pDelay->config.decay = value;\n}\n\nMA_API float ma_delay_get_decay(const ma_delay* pDelay)\n{\n    if (pDelay == NULL) {\n        return 0;\n    }\n\n    return pDelay->config.decay;\n}\n\n\nMA_API ma_gainer_config ma_gainer_config_init(ma_uint32 channels, ma_uint32 smoothTimeInFrames)\n{\n    ma_gainer_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.channels           = channels;\n    config.smoothTimeInFrames = smoothTimeInFrames;\n\n    return config;\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t oldGainsOffset;\n    size_t newGainsOffset;\n} ma_gainer_heap_layout;\n\nstatic ma_result ma_gainer_get_heap_layout(const ma_gainer_config* pConfig, ma_gainer_heap_layout* pHeapLayout)\n{\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->channels == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* Old gains. */\n    pHeapLayout->oldGainsOffset = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += sizeof(float) * pConfig->channels;\n\n    /* New gains. */\n    pHeapLayout->newGainsOffset = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += sizeof(float) * pConfig->channels;\n\n    /* Alignment. */\n    pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);\n\n    return MA_SUCCESS;\n}\n\n\nMA_API ma_result ma_gainer_get_heap_size(const ma_gainer_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_gainer_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_gainer_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\n\nMA_API ma_result ma_gainer_init_preallocated(const ma_gainer_config* pConfig, void* pHeap, ma_gainer* pGainer)\n{\n    ma_result result;\n    ma_gainer_heap_layout heapLayout;\n    ma_uint32 iChannel;\n\n    if (pGainer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pGainer);\n\n    if (pConfig == NULL || pHeap == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_gainer_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pGainer->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n    pGainer->pOldGains = (float*)ma_offset_ptr(pHeap, heapLayout.oldGainsOffset);\n    pGainer->pNewGains = (float*)ma_offset_ptr(pHeap, heapLayout.newGainsOffset);\n    pGainer->masterVolume = 1;\n\n    pGainer->config = *pConfig;\n    pGainer->t      = (ma_uint32)-1;  /* No interpolation by default. */\n\n    for (iChannel = 0; iChannel < pConfig->channels; iChannel += 1) {\n        pGainer->pOldGains[iChannel] = 1;\n        pGainer->pNewGains[iChannel] = 1;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_gainer_init(const ma_gainer_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_gainer* pGainer)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_gainer_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to retrieve the size of the heap allocation. */\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_gainer_init_preallocated(pConfig, pHeap, pGainer);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pGainer->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_gainer_uninit(ma_gainer* pGainer, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pGainer == NULL) {\n        return;\n    }\n\n    if (pGainer->_ownsHeap) {\n        ma_free(pGainer->_pHeap, pAllocationCallbacks);\n    }\n}\n\nstatic float ma_gainer_calculate_current_gain(const ma_gainer* pGainer, ma_uint32 channel)\n{\n    float a = (float)pGainer->t / pGainer->config.smoothTimeInFrames;\n    return ma_mix_f32_fast(pGainer->pOldGains[channel], pGainer->pNewGains[channel], a);\n}\n\nstatic /*__attribute__((noinline))*/ ma_result ma_gainer_process_pcm_frames_internal(ma_gainer * pGainer, void* MA_RESTRICT pFramesOut, const void* MA_RESTRICT pFramesIn, ma_uint64 frameCount)\n{\n    ma_uint64 iFrame;\n    ma_uint32 iChannel;\n    ma_uint64 interpolatedFrameCount;\n\n    MA_ASSERT(pGainer != NULL);\n\n    /*\n    We don't necessarily need to apply a linear interpolation for the entire frameCount frames. When\n    linear interpolation is not needed we can do a simple volume adjustment which will be more\n    efficient than a lerp with an alpha value of 1.\n\n    To do this, all we need to do is determine how many frames need to have a lerp applied. Then we\n    just process that number of frames with linear interpolation. After that we run on an optimized\n    path which just applies the new gains without a lerp.\n    */\n    if (pGainer->t >= pGainer->config.smoothTimeInFrames) {\n        interpolatedFrameCount = 0;\n    } else {\n        interpolatedFrameCount = pGainer->t - pGainer->config.smoothTimeInFrames;\n        if (interpolatedFrameCount > frameCount) {\n            interpolatedFrameCount = frameCount;\n        }\n    }\n\n    /*\n    Start off with our interpolated frames. When we do this, we'll adjust frameCount and our pointers\n    so that the fast path can work naturally without consideration of the interpolated path.\n    */\n    if (interpolatedFrameCount > 0) {\n        /* We can allow the input and output buffers to be null in which case we'll just update the internal timer. */\n        if (pFramesOut != NULL && pFramesIn != NULL) {\n            /*\n            All we're really doing here is moving the old gains towards the new gains. We don't want to\n            be modifying the gains inside the ma_gainer object because that will break things. Instead\n            we can make a copy here on the stack. For extreme channel counts we can fall back to a slower\n            implementation which just uses a standard lerp.\n            */\n            float* pFramesOutF32 = (float*)pFramesOut;\n            const float* pFramesInF32 = (const float*)pFramesIn;\n            float a = (float)pGainer->t / pGainer->config.smoothTimeInFrames;\n            float d = 1.0f / pGainer->config.smoothTimeInFrames;\n\n            if (pGainer->config.channels <= 32) {\n                float pRunningGain[32];\n                float pRunningGainDelta[32];    /* Could this be heap-allocated as part of the ma_gainer object? */\n\n                /* Initialize the running gain. */\n                for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) {\n                    float t = (pGainer->pNewGains[iChannel] - pGainer->pOldGains[iChannel]) * pGainer->masterVolume;\n                    pRunningGainDelta[iChannel] = t * d;\n                    pRunningGain[iChannel] = (pGainer->pOldGains[iChannel] * pGainer->masterVolume) + (t * a);\n                }\n\n                iFrame = 0;\n\n                /* Optimized paths for common channel counts. This is mostly just experimenting with some SIMD ideas. It's not necessarily final. */\n                if (pGainer->config.channels == 2) {\n                #if defined(MA_SUPPORT_SSE2)\n                    if (ma_has_sse2()) {\n                        ma_uint64 unrolledLoopCount = interpolatedFrameCount >> 1;\n\n                        /* Expand some arrays so we can have a clean SIMD loop below. */\n                        __m128 runningGainDelta0 = _mm_set_ps(pRunningGainDelta[1], pRunningGainDelta[0], pRunningGainDelta[1], pRunningGainDelta[0]);\n                        __m128 runningGain0      = _mm_set_ps(pRunningGain[1] + pRunningGainDelta[1], pRunningGain[0] + pRunningGainDelta[0], pRunningGain[1], pRunningGain[0]);\n\n                        for (; iFrame < unrolledLoopCount; iFrame += 1) {\n                            _mm_storeu_ps(&pFramesOutF32[iFrame*4 + 0], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*4 + 0]), runningGain0));\n                            runningGain0 = _mm_add_ps(runningGain0, runningGainDelta0);\n                        }\n\n                        iFrame = unrolledLoopCount << 1;\n                    } else\n                #endif\n                    {\n                        /*\n                        Two different scalar implementations here. Clang (and I assume GCC) will vectorize\n                        both of these, but the bottom version results in a nicer vectorization with less\n                        instructions emitted. The problem, however, is that the bottom version runs slower\n                        when compiled with MSVC. The top version will be partially vectorized by MSVC.\n                        */\n                    #if defined(_MSC_VER) && !defined(__clang__)\n                        ma_uint64 unrolledLoopCount = interpolatedFrameCount >> 1;\n\n                        /* Expand some arrays so we can have a clean 4x SIMD operation in the loop. */\n                        pRunningGainDelta[2] = pRunningGainDelta[0];\n                        pRunningGainDelta[3] = pRunningGainDelta[1];\n                        pRunningGain[2] = pRunningGain[0] + pRunningGainDelta[0];\n                        pRunningGain[3] = pRunningGain[1] + pRunningGainDelta[1];\n\n                        for (; iFrame < unrolledLoopCount; iFrame += 1) {\n                            pFramesOutF32[iFrame*4 + 0] = pFramesInF32[iFrame*4 + 0] * pRunningGain[0];\n                            pFramesOutF32[iFrame*4 + 1] = pFramesInF32[iFrame*4 + 1] * pRunningGain[1];\n                            pFramesOutF32[iFrame*4 + 2] = pFramesInF32[iFrame*4 + 2] * pRunningGain[2];\n                            pFramesOutF32[iFrame*4 + 3] = pFramesInF32[iFrame*4 + 3] * pRunningGain[3];\n\n                            /* Move the running gain forward towards the new gain. */\n                            pRunningGain[0] += pRunningGainDelta[0];\n                            pRunningGain[1] += pRunningGainDelta[1];\n                            pRunningGain[2] += pRunningGainDelta[2];\n                            pRunningGain[3] += pRunningGainDelta[3];\n                        }\n\n                        iFrame = unrolledLoopCount << 1;\n                    #else\n                        for (; iFrame < interpolatedFrameCount; iFrame += 1) {\n                            for (iChannel = 0; iChannel < 2; iChannel += 1) {\n                                pFramesOutF32[iFrame*2 + iChannel] = pFramesInF32[iFrame*2 + iChannel] * pRunningGain[iChannel];\n                            }\n\n                            for (iChannel = 0; iChannel < 2; iChannel += 1) {\n                                pRunningGain[iChannel] += pRunningGainDelta[iChannel];\n                            }\n                        }\n                    #endif\n                    }\n                } else if (pGainer->config.channels == 6) {\n                #if defined(MA_SUPPORT_SSE2)\n                    if (ma_has_sse2()) {\n                        /*\n                        For 6 channels things are a bit more complicated because 6 isn't cleanly divisible by 4. We need to do 2 frames\n                        at a time, meaning we'll be doing 12 samples in a group. Like the stereo case we'll need to expand some arrays\n                        so we can do clean 4x SIMD operations.\n                        */\n                        ma_uint64 unrolledLoopCount = interpolatedFrameCount >> 1;\n\n                        /* Expand some arrays so we can have a clean SIMD loop below. */\n                        __m128 runningGainDelta0 = _mm_set_ps(pRunningGainDelta[3], pRunningGainDelta[2], pRunningGainDelta[1], pRunningGainDelta[0]);\n                        __m128 runningGainDelta1 = _mm_set_ps(pRunningGainDelta[1], pRunningGainDelta[0], pRunningGainDelta[5], pRunningGainDelta[4]);\n                        __m128 runningGainDelta2 = _mm_set_ps(pRunningGainDelta[5], pRunningGainDelta[4], pRunningGainDelta[3], pRunningGainDelta[2]);\n\n                        __m128 runningGain0      = _mm_set_ps(pRunningGain[3],                        pRunningGain[2],                        pRunningGain[1],                        pRunningGain[0]);\n                        __m128 runningGain1      = _mm_set_ps(pRunningGain[1] + pRunningGainDelta[1], pRunningGain[0] + pRunningGainDelta[0], pRunningGain[5],                        pRunningGain[4]);\n                        __m128 runningGain2      = _mm_set_ps(pRunningGain[5] + pRunningGainDelta[5], pRunningGain[4] + pRunningGainDelta[4], pRunningGain[3] + pRunningGainDelta[3], pRunningGain[2] + pRunningGainDelta[2]);\n\n                        for (; iFrame < unrolledLoopCount; iFrame += 1) {\n                            _mm_storeu_ps(&pFramesOutF32[iFrame*12 + 0], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*12 + 0]), runningGain0));\n                            _mm_storeu_ps(&pFramesOutF32[iFrame*12 + 4], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*12 + 4]), runningGain1));\n                            _mm_storeu_ps(&pFramesOutF32[iFrame*12 + 8], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*12 + 8]), runningGain2));\n\n                            runningGain0 = _mm_add_ps(runningGain0, runningGainDelta0);\n                            runningGain1 = _mm_add_ps(runningGain1, runningGainDelta1);\n                            runningGain2 = _mm_add_ps(runningGain2, runningGainDelta2);\n                        }\n\n                        iFrame = unrolledLoopCount << 1;\n                    } else\n                #endif\n                    {\n                        for (; iFrame < interpolatedFrameCount; iFrame += 1) {\n                            for (iChannel = 0; iChannel < 6; iChannel += 1) {\n                                pFramesOutF32[iFrame*6 + iChannel] = pFramesInF32[iFrame*6 + iChannel] * pRunningGain[iChannel];\n                            }\n\n                            /* Move the running gain forward towards the new gain. */\n                            for (iChannel = 0; iChannel < 6; iChannel += 1) {\n                                pRunningGain[iChannel] += pRunningGainDelta[iChannel];\n                            }\n                        }\n                    }\n                } else if (pGainer->config.channels == 8) {\n                    /* For 8 channels we can just go over frame by frame and do all eight channels as 2 separate 4x SIMD operations. */\n                #if defined(MA_SUPPORT_SSE2)\n                    if (ma_has_sse2()) {\n                        __m128 runningGainDelta0 = _mm_loadu_ps(&pRunningGainDelta[0]);\n                        __m128 runningGainDelta1 = _mm_loadu_ps(&pRunningGainDelta[4]);\n                        __m128 runningGain0      = _mm_loadu_ps(&pRunningGain[0]);\n                        __m128 runningGain1      = _mm_loadu_ps(&pRunningGain[4]);\n\n                        for (; iFrame < interpolatedFrameCount; iFrame += 1) {\n                            _mm_storeu_ps(&pFramesOutF32[iFrame*8 + 0], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*8 + 0]), runningGain0));\n                            _mm_storeu_ps(&pFramesOutF32[iFrame*8 + 4], _mm_mul_ps(_mm_loadu_ps(&pFramesInF32[iFrame*8 + 4]), runningGain1));\n\n                            runningGain0 = _mm_add_ps(runningGain0, runningGainDelta0);\n                            runningGain1 = _mm_add_ps(runningGain1, runningGainDelta1);\n                        }\n                    } else\n                #endif\n                    {\n                        /* This is crafted so that it auto-vectorizes when compiled with Clang. */\n                        for (; iFrame < interpolatedFrameCount; iFrame += 1) {\n                            for (iChannel = 0; iChannel < 8; iChannel += 1) {\n                                pFramesOutF32[iFrame*8 + iChannel] = pFramesInF32[iFrame*8 + iChannel] * pRunningGain[iChannel];\n                            }\n\n                            /* Move the running gain forward towards the new gain. */\n                            for (iChannel = 0; iChannel < 8; iChannel += 1) {\n                                pRunningGain[iChannel] += pRunningGainDelta[iChannel];\n                            }\n                        }\n                    }\n                }\n\n                for (; iFrame < interpolatedFrameCount; iFrame += 1) {\n                    for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) {\n                        pFramesOutF32[iFrame*pGainer->config.channels + iChannel] = pFramesInF32[iFrame*pGainer->config.channels + iChannel] * pRunningGain[iChannel];\n                        pRunningGain[iChannel] += pRunningGainDelta[iChannel];\n                    }\n                }\n            } else {\n                /* Slower path for extreme channel counts where we can't fit enough on the stack. We could also move this to the heap as part of the ma_gainer object which might even be better since it'll only be updated when the gains actually change. */\n                for (iFrame = 0; iFrame < interpolatedFrameCount; iFrame += 1) {\n                    for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) {\n                        pFramesOutF32[iFrame*pGainer->config.channels + iChannel] = pFramesInF32[iFrame*pGainer->config.channels + iChannel] * ma_mix_f32_fast(pGainer->pOldGains[iChannel], pGainer->pNewGains[iChannel], a) * pGainer->masterVolume;\n                    }\n\n                    a += d;\n                }\n            }\n        }\n\n        /* Make sure the timer is updated. */\n        pGainer->t = (ma_uint32)ma_min(pGainer->t + interpolatedFrameCount, pGainer->config.smoothTimeInFrames);\n\n        /* Adjust our arguments so the next part can work normally. */\n        frameCount -= interpolatedFrameCount;\n        pFramesOut  = ma_offset_ptr(pFramesOut, interpolatedFrameCount * sizeof(float));\n        pFramesIn   = ma_offset_ptr(pFramesIn,  interpolatedFrameCount * sizeof(float));\n    }\n\n    /* All we need to do here is apply the new gains using an optimized path. */\n    if (pFramesOut != NULL && pFramesIn != NULL) {\n        if (pGainer->config.channels <= 32) {\n            float gains[32];\n            for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) {\n                gains[iChannel] = pGainer->pNewGains[iChannel] * pGainer->masterVolume;\n            }\n\n            ma_copy_and_apply_volume_factor_per_channel_f32((float*)pFramesOut, (const float*)pFramesIn, frameCount, pGainer->config.channels, gains);\n        } else {\n            /* Slow path. Too many channels to fit on the stack. Need to apply a master volume as a separate path. */\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) {\n                    ((float*)pFramesOut)[iFrame*pGainer->config.channels + iChannel] = ((const float*)pFramesIn)[iFrame*pGainer->config.channels + iChannel] * pGainer->pNewGains[iChannel] * pGainer->masterVolume;\n                }\n            }\n        }\n    }\n\n    /* Now that some frames have been processed we need to make sure future changes to the gain are interpolated. */\n    if (pGainer->t == (ma_uint32)-1) {\n        pGainer->t  = (ma_uint32)ma_min(pGainer->config.smoothTimeInFrames, frameCount);\n    }\n\n#if 0\n    if (pGainer->t >= pGainer->config.smoothTimeInFrames) {\n        /* Fast path. No gain calculation required. */\n        ma_copy_and_apply_volume_factor_per_channel_f32(pFramesOutF32, pFramesInF32, frameCount, pGainer->config.channels, pGainer->pNewGains);\n        ma_apply_volume_factor_f32(pFramesOutF32, frameCount * pGainer->config.channels, pGainer->masterVolume);\n\n        /* Now that some frames have been processed we need to make sure future changes to the gain are interpolated. */\n        if (pGainer->t == (ma_uint32)-1) {\n            pGainer->t = pGainer->config.smoothTimeInFrames;\n        }\n    } else {\n        /* Slow path. Need to interpolate the gain for each channel individually. */\n\n        /* We can allow the input and output buffers to be null in which case we'll just update the internal timer. */\n        if (pFramesOut != NULL && pFramesIn != NULL) {\n            float a = (float)pGainer->t / pGainer->config.smoothTimeInFrames;\n            float d = 1.0f / pGainer->config.smoothTimeInFrames;\n            ma_uint32 channelCount = pGainer->config.channels;\n\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannel = 0; iChannel < channelCount; iChannel += 1) {\n                    pFramesOutF32[iChannel] = pFramesInF32[iChannel] * ma_mix_f32_fast(pGainer->pOldGains[iChannel], pGainer->pNewGains[iChannel], a) * pGainer->masterVolume;\n                }\n\n                pFramesOutF32 += channelCount;\n                pFramesInF32  += channelCount;\n\n                a += d;\n                if (a > 1) {\n                    a = 1;\n                }\n            }\n        }\n\n        pGainer->t = (ma_uint32)ma_min(pGainer->t + frameCount, pGainer->config.smoothTimeInFrames);\n\n    #if 0   /* Reference implementation. */\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            /* We can allow the input and output buffers to be null in which case we'll just update the internal timer. */\n            if (pFramesOut != NULL && pFramesIn != NULL) {\n                for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) {\n                    pFramesOutF32[iFrame * pGainer->config.channels + iChannel] = pFramesInF32[iFrame * pGainer->config.channels + iChannel] * ma_gainer_calculate_current_gain(pGainer, iChannel) * pGainer->masterVolume;\n                }\n            }\n\n            /* Move interpolation time forward, but don't go beyond our smoothing time. */\n            pGainer->t = ma_min(pGainer->t + 1, pGainer->config.smoothTimeInFrames);\n        }\n    #endif\n    }\n#endif\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_gainer_process_pcm_frames(ma_gainer* pGainer, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    if (pGainer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /*\n    ma_gainer_process_pcm_frames_internal() marks pFramesOut and pFramesIn with MA_RESTRICT which\n    helps with auto-vectorization.\n    */\n    return ma_gainer_process_pcm_frames_internal(pGainer, pFramesOut, pFramesIn, frameCount);\n}\n\nstatic void ma_gainer_set_gain_by_index(ma_gainer* pGainer, float newGain, ma_uint32 iChannel)\n{\n    pGainer->pOldGains[iChannel] = ma_gainer_calculate_current_gain(pGainer, iChannel);\n    pGainer->pNewGains[iChannel] = newGain;\n}\n\nstatic void ma_gainer_reset_smoothing_time(ma_gainer* pGainer)\n{\n    if (pGainer->t == (ma_uint32)-1) {\n        pGainer->t = pGainer->config.smoothTimeInFrames;    /* No smoothing required for initial gains setting. */\n    } else {\n        pGainer->t = 0;\n    }\n}\n\nMA_API ma_result ma_gainer_set_gain(ma_gainer* pGainer, float newGain)\n{\n    ma_uint32 iChannel;\n\n    if (pGainer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) {\n        ma_gainer_set_gain_by_index(pGainer, newGain, iChannel);\n    }\n\n    /* The smoothing time needs to be reset to ensure we always interpolate by the configured smoothing time, but only if it's not the first setting. */\n    ma_gainer_reset_smoothing_time(pGainer);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_gainer_set_gains(ma_gainer* pGainer, float* pNewGains)\n{\n    ma_uint32 iChannel;\n\n    if (pGainer == NULL || pNewGains == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    for (iChannel = 0; iChannel < pGainer->config.channels; iChannel += 1) {\n        ma_gainer_set_gain_by_index(pGainer, pNewGains[iChannel], iChannel);\n    }\n\n    /* The smoothing time needs to be reset to ensure we always interpolate by the configured smoothing time, but only if it's not the first setting. */\n    ma_gainer_reset_smoothing_time(pGainer);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_gainer_set_master_volume(ma_gainer* pGainer, float volume)\n{\n    if (pGainer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pGainer->masterVolume = volume;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_gainer_get_master_volume(const ma_gainer* pGainer, float* pVolume)\n{\n    if (pGainer == NULL || pVolume == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pVolume = pGainer->masterVolume;\n\n    return MA_SUCCESS;\n}\n\n\nMA_API ma_panner_config ma_panner_config_init(ma_format format, ma_uint32 channels)\n{\n    ma_panner_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format   = format;\n    config.channels = channels;\n    config.mode     = ma_pan_mode_balance;  /* Set to balancing mode by default because it's consistent with other audio engines and most likely what the caller is expecting. */\n    config.pan      = 0;\n\n    return config;\n}\n\n\nMA_API ma_result ma_panner_init(const ma_panner_config* pConfig, ma_panner* pPanner)\n{\n    if (pPanner == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pPanner);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pPanner->format   = pConfig->format;\n    pPanner->channels = pConfig->channels;\n    pPanner->mode     = pConfig->mode;\n    pPanner->pan      = pConfig->pan;\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_stereo_balance_pcm_frames_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, float pan)\n{\n    ma_uint64 iFrame;\n\n    if (pan > 0) {\n        float factor = 1.0f - pan;\n        if (pFramesOut == pFramesIn) {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                pFramesOut[iFrame*2 + 0] = pFramesIn[iFrame*2 + 0] * factor;\n            }\n        } else {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                pFramesOut[iFrame*2 + 0] = pFramesIn[iFrame*2 + 0] * factor;\n                pFramesOut[iFrame*2 + 1] = pFramesIn[iFrame*2 + 1];\n            }\n        }\n    } else {\n        float factor = 1.0f + pan;\n        if (pFramesOut == pFramesIn) {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                pFramesOut[iFrame*2 + 1] = pFramesIn[iFrame*2 + 1] * factor;\n            }\n        } else {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                pFramesOut[iFrame*2 + 0] = pFramesIn[iFrame*2 + 0];\n                pFramesOut[iFrame*2 + 1] = pFramesIn[iFrame*2 + 1] * factor;\n            }\n        }\n    }\n}\n\nstatic void ma_stereo_balance_pcm_frames(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_format format, float pan)\n{\n    if (pan == 0) {\n        /* Fast path. No panning required. */\n        if (pFramesOut == pFramesIn) {\n            /* No-op */\n        } else {\n            ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, format, 2);\n        }\n\n        return;\n    }\n\n    switch (format) {\n        case ma_format_f32: ma_stereo_balance_pcm_frames_f32((float*)pFramesOut, (float*)pFramesIn, frameCount, pan); break;\n\n        /* Unknown format. Just copy. */\n        default:\n        {\n            ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, format, 2);\n        } break;\n    }\n}\n\n\nstatic void ma_stereo_pan_pcm_frames_f32(float* pFramesOut, const float* pFramesIn, ma_uint64 frameCount, float pan)\n{\n    ma_uint64 iFrame;\n\n    if (pan > 0) {\n        float factorL0 = 1.0f - pan;\n        float factorL1 = 0.0f + pan;\n\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            float sample0 = (pFramesIn[iFrame*2 + 0] * factorL0);\n            float sample1 = (pFramesIn[iFrame*2 + 0] * factorL1) + pFramesIn[iFrame*2 + 1];\n\n            pFramesOut[iFrame*2 + 0] = sample0;\n            pFramesOut[iFrame*2 + 1] = sample1;\n        }\n    } else {\n        float factorR0 = 0.0f - pan;\n        float factorR1 = 1.0f + pan;\n\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            float sample0 = pFramesIn[iFrame*2 + 0] + (pFramesIn[iFrame*2 + 1] * factorR0);\n            float sample1 =                           (pFramesIn[iFrame*2 + 1] * factorR1);\n\n            pFramesOut[iFrame*2 + 0] = sample0;\n            pFramesOut[iFrame*2 + 1] = sample1;\n        }\n    }\n}\n\nstatic void ma_stereo_pan_pcm_frames(void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount, ma_format format, float pan)\n{\n    if (pan == 0) {\n        /* Fast path. No panning required. */\n        if (pFramesOut == pFramesIn) {\n            /* No-op */\n        } else {\n            ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, format, 2);\n        }\n\n        return;\n    }\n\n    switch (format) {\n        case ma_format_f32: ma_stereo_pan_pcm_frames_f32((float*)pFramesOut, (float*)pFramesIn, frameCount, pan); break;\n\n        /* Unknown format. Just copy. */\n        default:\n        {\n            ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, format, 2);\n        } break;\n    }\n}\n\nMA_API ma_result ma_panner_process_pcm_frames(ma_panner* pPanner, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    if (pPanner == NULL || pFramesOut == NULL || pFramesIn == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pPanner->channels == 2) {\n        /* Stereo case. For now assume channel 0 is left and channel right is 1, but should probably add support for a channel map. */\n        if (pPanner->mode == ma_pan_mode_balance) {\n            ma_stereo_balance_pcm_frames(pFramesOut, pFramesIn, frameCount, pPanner->format, pPanner->pan);\n        } else {\n            ma_stereo_pan_pcm_frames(pFramesOut, pFramesIn, frameCount, pPanner->format, pPanner->pan);\n        }\n    } else {\n        if (pPanner->channels == 1) {\n            /* Panning has no effect on mono streams. */\n            ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, pPanner->format, pPanner->channels);\n        } else {\n            /* For now we're not going to support non-stereo set ups. Not sure how I want to handle this case just yet. */\n            ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, pPanner->format, pPanner->channels);\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_panner_set_mode(ma_panner* pPanner, ma_pan_mode mode)\n{\n    if (pPanner == NULL) {\n        return;\n    }\n\n    pPanner->mode = mode;\n}\n\nMA_API ma_pan_mode ma_panner_get_mode(const ma_panner* pPanner)\n{\n    if (pPanner == NULL) {\n        return ma_pan_mode_balance;\n    }\n\n    return pPanner->mode;\n}\n\nMA_API void ma_panner_set_pan(ma_panner* pPanner, float pan)\n{\n    if (pPanner == NULL) {\n        return;\n    }\n\n    pPanner->pan = ma_clamp(pan, -1.0f, 1.0f);\n}\n\nMA_API float ma_panner_get_pan(const ma_panner* pPanner)\n{\n    if (pPanner == NULL) {\n        return 0;\n    }\n\n    return pPanner->pan;\n}\n\n\n\n\nMA_API ma_fader_config ma_fader_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate)\n{\n    ma_fader_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format     = format;\n    config.channels   = channels;\n    config.sampleRate = sampleRate;\n\n    return config;\n}\n\n\nMA_API ma_result ma_fader_init(const ma_fader_config* pConfig, ma_fader* pFader)\n{\n    if (pFader == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pFader);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Only f32 is supported for now. */\n    if (pConfig->format != ma_format_f32) {\n        return MA_INVALID_ARGS;\n    }\n\n    pFader->config         = *pConfig;\n    pFader->volumeBeg      = 1;\n    pFader->volumeEnd      = 1;\n    pFader->lengthInFrames = 0;\n    pFader->cursorInFrames = 0;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_fader_process_pcm_frames(ma_fader* pFader, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    if (pFader == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* If the cursor is still negative we need to just copy the absolute number of those frames, but no more than frameCount. */\n    if (pFader->cursorInFrames < 0) {\n        ma_uint64 absCursorInFrames = (ma_uint64)0 - pFader->cursorInFrames;\n        if (absCursorInFrames > frameCount) {\n            absCursorInFrames = frameCount;\n        }\n\n        ma_copy_pcm_frames(pFramesOut, pFramesIn, absCursorInFrames, pFader->config.format, pFader->config.channels);\n\n        pFader->cursorInFrames += absCursorInFrames;\n        frameCount -= absCursorInFrames;\n        pFramesOut  = ma_offset_ptr(pFramesOut, ma_get_bytes_per_frame(pFader->config.format, pFader->config.channels)*absCursorInFrames);\n        pFramesIn   = ma_offset_ptr(pFramesIn,  ma_get_bytes_per_frame(pFader->config.format, pFader->config.channels)*absCursorInFrames);\n    }\n\n    if (pFader->cursorInFrames >= 0) {\n        /*\n        For now we need to clamp frameCount so that the cursor never overflows 32-bits. This is required for\n        the conversion to a float which we use for the linear interpolation. This might be changed later.\n        */\n        if (frameCount + pFader->cursorInFrames > UINT_MAX) {\n            frameCount = UINT_MAX - pFader->cursorInFrames;\n        }\n\n        /* Optimized path if volumeBeg and volumeEnd are equal. */\n        if (pFader->volumeBeg == pFader->volumeEnd) {\n            if (pFader->volumeBeg == 1) {\n                /* Straight copy. */\n                ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, pFader->config.format, pFader->config.channels);\n            } else {\n                /* Copy with volume. */\n                ma_copy_and_apply_volume_and_clip_pcm_frames(pFramesOut, pFramesIn, frameCount, pFader->config.format, pFader->config.channels, pFader->volumeBeg);\n            }\n        } else {\n            /* Slower path. Volumes are different, so may need to do an interpolation. */\n            if ((ma_uint64)pFader->cursorInFrames >= pFader->lengthInFrames) {\n                /* Fast path. We've gone past the end of the fade period so just apply the end volume to all samples. */\n                ma_copy_and_apply_volume_and_clip_pcm_frames(pFramesOut, pFramesIn, frameCount, pFader->config.format, pFader->config.channels, pFader->volumeEnd);\n            } else {\n                /* Slow path. This is where we do the actual fading. */\n                ma_uint64 iFrame;\n                ma_uint32 iChannel;\n\n                /* For now we only support f32. Support for other formats might be added later. */\n                if (pFader->config.format == ma_format_f32) {\n                    const float* pFramesInF32  = (const float*)pFramesIn;\n                    /* */ float* pFramesOutF32 = (      float*)pFramesOut;\n\n                    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                        float a = (ma_uint32)ma_min(pFader->cursorInFrames + iFrame, pFader->lengthInFrames) / (float)((ma_uint32)pFader->lengthInFrames);   /* Safe cast due to the frameCount clamp at the top of this function. */\n                        float volume = ma_mix_f32_fast(pFader->volumeBeg, pFader->volumeEnd, a);\n\n                        for (iChannel = 0; iChannel < pFader->config.channels; iChannel += 1) {\n                            pFramesOutF32[iFrame*pFader->config.channels + iChannel] = pFramesInF32[iFrame*pFader->config.channels + iChannel] * volume;\n                        }\n                    }\n                } else {\n                    return MA_NOT_IMPLEMENTED;\n                }\n            }\n        }\n    }\n\n    pFader->cursorInFrames += frameCount;\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_fader_get_data_format(const ma_fader* pFader, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate)\n{\n    if (pFader == NULL) {\n        return;\n    }\n\n    if (pFormat != NULL) {\n        *pFormat = pFader->config.format;\n    }\n\n    if (pChannels != NULL) {\n        *pChannels = pFader->config.channels;\n    }\n\n    if (pSampleRate != NULL) {\n        *pSampleRate = pFader->config.sampleRate;\n    }\n}\n\nMA_API void ma_fader_set_fade(ma_fader* pFader, float volumeBeg, float volumeEnd, ma_uint64 lengthInFrames)\n{\n    ma_fader_set_fade_ex(pFader, volumeBeg, volumeEnd, lengthInFrames, 0);\n}\n\nMA_API void ma_fader_set_fade_ex(ma_fader* pFader, float volumeBeg, float volumeEnd, ma_uint64 lengthInFrames, ma_int64 startOffsetInFrames)\n{\n    if (pFader == NULL) {\n        return;\n    }\n\n    /* If the volume is negative, use current volume. */\n    if (volumeBeg < 0) {\n        volumeBeg = ma_fader_get_current_volume(pFader);\n    }\n\n    /*\n    The length needs to be clamped to 32-bits due to how we convert it to a float for linear\n    interpolation reasons. I might change this requirement later, but for now it's not important.\n    */\n    if (lengthInFrames > UINT_MAX) {\n        lengthInFrames = UINT_MAX;\n    }\n\n    /* The start offset needs to be clamped to ensure it doesn't overflow a signed number. */\n    if (startOffsetInFrames > INT_MAX) {\n        startOffsetInFrames = INT_MAX;\n    }\n\n    pFader->volumeBeg      = volumeBeg;\n    pFader->volumeEnd      = volumeEnd;\n    pFader->lengthInFrames = lengthInFrames;\n    pFader->cursorInFrames = -startOffsetInFrames;\n}\n\nMA_API float ma_fader_get_current_volume(const ma_fader* pFader)\n{\n    if (pFader == NULL) {\n        return 0.0f;\n    }\n\n    /* Any frames prior to the start of the fade period will be at unfaded volume. */\n    if (pFader->cursorInFrames < 0) {\n        return 1.0f;\n    }\n\n    /* The current volume depends on the position of the cursor. */\n    if (pFader->cursorInFrames == 0) {\n        return pFader->volumeBeg;\n    } else if ((ma_uint64)pFader->cursorInFrames >= pFader->lengthInFrames) {   /* Safe case because the < 0 case was checked above. */\n        return pFader->volumeEnd;\n    } else {\n        /* The cursor is somewhere inside the fading period. We can figure this out with a simple linear interpoluation between volumeBeg and volumeEnd based on our cursor position. */\n        return ma_mix_f32_fast(pFader->volumeBeg, pFader->volumeEnd, (ma_uint32)pFader->cursorInFrames / (float)((ma_uint32)pFader->lengthInFrames));    /* Safe cast to uint32 because we clamp it in ma_fader_process_pcm_frames(). */\n    }\n}\n\n\n\n\n\nMA_API ma_vec3f ma_vec3f_init_3f(float x, float y, float z)\n{\n    ma_vec3f v;\n\n    v.x = x;\n    v.y = y;\n    v.z = z;\n\n    return v;\n}\n\nMA_API ma_vec3f ma_vec3f_sub(ma_vec3f a, ma_vec3f b)\n{\n    return ma_vec3f_init_3f(\n        a.x - b.x,\n        a.y - b.y,\n        a.z - b.z\n    );\n}\n\nMA_API ma_vec3f ma_vec3f_neg(ma_vec3f a)\n{\n    return ma_vec3f_init_3f(\n        -a.x,\n        -a.y,\n        -a.z\n    );\n}\n\nMA_API float ma_vec3f_dot(ma_vec3f a, ma_vec3f b)\n{\n    return a.x*b.x + a.y*b.y + a.z*b.z;\n}\n\nMA_API float ma_vec3f_len2(ma_vec3f v)\n{\n    return ma_vec3f_dot(v, v);\n}\n\nMA_API float ma_vec3f_len(ma_vec3f v)\n{\n    return (float)ma_sqrtd(ma_vec3f_len2(v));\n}\n\n\n\nMA_API float ma_vec3f_dist(ma_vec3f a, ma_vec3f b)\n{\n    return ma_vec3f_len(ma_vec3f_sub(a, b));\n}\n\nMA_API ma_vec3f ma_vec3f_normalize(ma_vec3f v)\n{\n    float invLen;\n    float len2 = ma_vec3f_len2(v);\n    if (len2 == 0) {\n        return ma_vec3f_init_3f(0, 0, 0);\n    }\n\n    invLen = ma_rsqrtf(len2);\n    v.x *= invLen;\n    v.y *= invLen;\n    v.z *= invLen;\n\n    return v;\n}\n\nMA_API ma_vec3f ma_vec3f_cross(ma_vec3f a, ma_vec3f b)\n{\n    return ma_vec3f_init_3f(\n        a.y*b.z - a.z*b.y,\n        a.z*b.x - a.x*b.z,\n        a.x*b.y - a.y*b.x\n    );\n}\n\n\nMA_API void ma_atomic_vec3f_init(ma_atomic_vec3f* v, ma_vec3f value)\n{\n    v->v = value;\n    v->lock = 0;    /* Important this is initialized to 0. */\n}\n\nMA_API void ma_atomic_vec3f_set(ma_atomic_vec3f* v, ma_vec3f value)\n{\n    ma_spinlock_lock(&v->lock);\n    {\n        v->v = value;\n    }\n    ma_spinlock_unlock(&v->lock);\n}\n\nMA_API ma_vec3f ma_atomic_vec3f_get(ma_atomic_vec3f* v)\n{\n    ma_vec3f r;\n\n    ma_spinlock_lock(&v->lock);\n    {\n        r = v->v;\n    }\n    ma_spinlock_unlock(&v->lock);\n\n    return r;\n}\n\n\n\nstatic void ma_channel_map_apply_f32(float* pFramesOut, const ma_channel* pChannelMapOut, ma_uint32 channelsOut, const float* pFramesIn, const ma_channel* pChannelMapIn, ma_uint32 channelsIn, ma_uint64 frameCount, ma_channel_mix_mode mode, ma_mono_expansion_mode monoExpansionMode);\nstatic ma_bool32 ma_is_spatial_channel_position(ma_channel channelPosition);\n\n\n#ifndef MA_DEFAULT_SPEED_OF_SOUND\n#define MA_DEFAULT_SPEED_OF_SOUND   343.3f\n#endif\n\n/*\nThese vectors represent the direction that speakers are facing from the center point. They're used\nfor panning in the spatializer. Must be normalized.\n*/\nstatic ma_vec3f g_maChannelDirections[MA_CHANNEL_POSITION_COUNT] = {\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_NONE */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_MONO */\n    {-0.7071f,  0.0f,    -0.7071f },  /* MA_CHANNEL_FRONT_LEFT */\n    {+0.7071f,  0.0f,    -0.7071f },  /* MA_CHANNEL_FRONT_RIGHT */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_FRONT_CENTER */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_LFE */\n    {-0.7071f,  0.0f,    +0.7071f },  /* MA_CHANNEL_BACK_LEFT */\n    {+0.7071f,  0.0f,    +0.7071f },  /* MA_CHANNEL_BACK_RIGHT */\n    {-0.3162f,  0.0f,    -0.9487f },  /* MA_CHANNEL_FRONT_LEFT_CENTER */\n    {+0.3162f,  0.0f,    -0.9487f },  /* MA_CHANNEL_FRONT_RIGHT_CENTER */\n    { 0.0f,     0.0f,    +1.0f    },  /* MA_CHANNEL_BACK_CENTER */\n    {-1.0f,     0.0f,     0.0f    },  /* MA_CHANNEL_SIDE_LEFT */\n    {+1.0f,     0.0f,     0.0f    },  /* MA_CHANNEL_SIDE_RIGHT */\n    { 0.0f,    +1.0f,     0.0f    },  /* MA_CHANNEL_TOP_CENTER */\n    {-0.5774f, +0.5774f, -0.5774f },  /* MA_CHANNEL_TOP_FRONT_LEFT */\n    { 0.0f,    +0.7071f, -0.7071f },  /* MA_CHANNEL_TOP_FRONT_CENTER */\n    {+0.5774f, +0.5774f, -0.5774f },  /* MA_CHANNEL_TOP_FRONT_RIGHT */\n    {-0.5774f, +0.5774f, +0.5774f },  /* MA_CHANNEL_TOP_BACK_LEFT */\n    { 0.0f,    +0.7071f, +0.7071f },  /* MA_CHANNEL_TOP_BACK_CENTER */\n    {+0.5774f, +0.5774f, +0.5774f },  /* MA_CHANNEL_TOP_BACK_RIGHT */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_0 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_1 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_2 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_3 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_4 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_5 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_6 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_7 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_8 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_9 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_10 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_11 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_12 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_13 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_14 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_15 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_16 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_17 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_18 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_19 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_20 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_21 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_22 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_23 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_24 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_25 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_26 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_27 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_28 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_29 */\n    { 0.0f,     0.0f,    -1.0f    },  /* MA_CHANNEL_AUX_30 */\n    { 0.0f,     0.0f,    -1.0f    }   /* MA_CHANNEL_AUX_31 */\n};\n\nstatic ma_vec3f ma_get_channel_direction(ma_channel channel)\n{\n    if (channel >= MA_CHANNEL_POSITION_COUNT) {\n        return ma_vec3f_init_3f(0, 0, -1);\n    } else {\n        return g_maChannelDirections[channel];\n    }\n}\n\n\n\nstatic float ma_attenuation_inverse(float distance, float minDistance, float maxDistance, float rolloff)\n{\n    if (minDistance >= maxDistance) {\n        return 1;   /* To avoid division by zero. Do not attenuate. */\n    }\n\n    return minDistance / (minDistance + rolloff * (ma_clamp(distance, minDistance, maxDistance) - minDistance));\n}\n\nstatic float ma_attenuation_linear(float distance, float minDistance, float maxDistance, float rolloff)\n{\n    if (minDistance >= maxDistance) {\n        return 1;   /* To avoid division by zero. Do not attenuate. */\n    }\n\n    return 1 - rolloff * (ma_clamp(distance, minDistance, maxDistance) - minDistance) / (maxDistance - minDistance);\n}\n\nstatic float ma_attenuation_exponential(float distance, float minDistance, float maxDistance, float rolloff)\n{\n    if (minDistance >= maxDistance) {\n        return 1;   /* To avoid division by zero. Do not attenuate. */\n    }\n\n    return (float)ma_powd(ma_clamp(distance, minDistance, maxDistance) / minDistance, -rolloff);\n}\n\n\n/*\nDopper Effect calculation taken from the OpenAL spec, with two main differences:\n\n  1) The source to listener vector will have already been calcualted at an earlier step so we can\n     just use that directly. We need only the position of the source relative to the origin.\n\n  2) We don't scale by a frequency because we actually just want the ratio which we'll plug straight\n     into the resampler directly.\n*/\nstatic float ma_doppler_pitch(ma_vec3f relativePosition, ma_vec3f sourceVelocity, ma_vec3f listenVelocity, float speedOfSound, float dopplerFactor)\n{\n    float len;\n    float vls;\n    float vss;\n\n    len = ma_vec3f_len(relativePosition);\n\n    /*\n    There's a case where the position of the source will be right on top of the listener in which\n    case the length will be 0 and we'll end up with a division by zero. We can just return a ratio\n    of 1.0 in this case. This is not considered in the OpenAL spec, but is necessary.\n    */\n    if (len == 0) {\n        return 1.0;\n    }\n\n    vls = ma_vec3f_dot(relativePosition, listenVelocity) / len;\n    vss = ma_vec3f_dot(relativePosition, sourceVelocity) / len;\n\n    vls = ma_min(vls, speedOfSound / dopplerFactor);\n    vss = ma_min(vss, speedOfSound / dopplerFactor);\n\n    return (speedOfSound - dopplerFactor*vls) / (speedOfSound - dopplerFactor*vss);\n}\n\n\nstatic void ma_get_default_channel_map_for_spatializer(ma_channel* pChannelMap, size_t channelMapCap, ma_uint32 channelCount)\n{\n    /*\n    Special case for stereo. Want to default the left and right speakers to side left and side\n    right so that they're facing directly down the X axis rather than slightly forward. Not\n    doing this will result in sounds being quieter when behind the listener. This might\n    actually be good for some scenerios, but I don't think it's an appropriate default because\n    it can be a bit unexpected.\n    */\n    if (channelCount == 2) {\n        pChannelMap[0] = MA_CHANNEL_SIDE_LEFT;\n        pChannelMap[1] = MA_CHANNEL_SIDE_RIGHT;\n    } else {\n        ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, channelCount);\n    }\n}\n\n\nMA_API ma_spatializer_listener_config ma_spatializer_listener_config_init(ma_uint32 channelsOut)\n{\n    ma_spatializer_listener_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.channelsOut             = channelsOut;\n    config.pChannelMapOut          = NULL;\n    config.handedness              = ma_handedness_right;\n    config.worldUp                 = ma_vec3f_init_3f(0, 1,  0);\n    config.coneInnerAngleInRadians = 6.283185f; /* 360 degrees. */\n    config.coneOuterAngleInRadians = 6.283185f; /* 360 degrees. */\n    config.coneOuterGain           = 0;\n    config.speedOfSound            = 343.3f;    /* Same as OpenAL. Used for doppler effect. */\n\n    return config;\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t channelMapOutOffset;\n} ma_spatializer_listener_heap_layout;\n\nstatic ma_result ma_spatializer_listener_get_heap_layout(const ma_spatializer_listener_config* pConfig, ma_spatializer_listener_heap_layout* pHeapLayout)\n{\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->channelsOut == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* Channel map. We always need this, even for passthroughs. */\n    pHeapLayout->channelMapOutOffset = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += ma_align_64(sizeof(*pConfig->pChannelMapOut) * pConfig->channelsOut);\n\n    return MA_SUCCESS;\n}\n\n\nMA_API ma_result ma_spatializer_listener_get_heap_size(const ma_spatializer_listener_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_spatializer_listener_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_spatializer_listener_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_spatializer_listener_init_preallocated(const ma_spatializer_listener_config* pConfig, void* pHeap, ma_spatializer_listener* pListener)\n{\n    ma_result result;\n    ma_spatializer_listener_heap_layout heapLayout;\n\n    if (pListener == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pListener);\n\n    result = ma_spatializer_listener_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pListener->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n    pListener->config    = *pConfig;\n    ma_atomic_vec3f_init(&pListener->position,  ma_vec3f_init_3f(0, 0, 0));\n    ma_atomic_vec3f_init(&pListener->direction, ma_vec3f_init_3f(0, 0, -1));\n    ma_atomic_vec3f_init(&pListener->velocity,  ma_vec3f_init_3f(0, 0,  0));\n    pListener->isEnabled = MA_TRUE;\n\n    /* Swap the forward direction if we're left handed (it was initialized based on right handed). */\n    if (pListener->config.handedness == ma_handedness_left) {\n        ma_vec3f negDir = ma_vec3f_neg(ma_spatializer_listener_get_direction(pListener));\n        ma_spatializer_listener_set_direction(pListener, negDir.x, negDir.y, negDir.z);\n    }\n\n\n    /* We must always have a valid channel map. */\n    pListener->config.pChannelMapOut = (ma_channel*)ma_offset_ptr(pHeap, heapLayout.channelMapOutOffset);\n\n    /* Use a slightly different default channel map for stereo. */\n    if (pConfig->pChannelMapOut == NULL) {\n        ma_get_default_channel_map_for_spatializer(pListener->config.pChannelMapOut, pConfig->channelsOut, pConfig->channelsOut);\n    } else {\n        ma_channel_map_copy_or_default(pListener->config.pChannelMapOut, pConfig->channelsOut, pConfig->pChannelMapOut, pConfig->channelsOut);\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_spatializer_listener_init(const ma_spatializer_listener_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_spatializer_listener* pListener)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_spatializer_listener_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_spatializer_listener_init_preallocated(pConfig, pHeap, pListener);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pListener->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_spatializer_listener_uninit(ma_spatializer_listener* pListener, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pListener == NULL) {\n        return;\n    }\n\n    if (pListener->_ownsHeap) {\n        ma_free(pListener->_pHeap, pAllocationCallbacks);\n    }\n}\n\nMA_API ma_channel* ma_spatializer_listener_get_channel_map(ma_spatializer_listener* pListener)\n{\n    if (pListener == NULL) {\n        return NULL;\n    }\n\n    return pListener->config.pChannelMapOut;\n}\n\nMA_API void ma_spatializer_listener_set_cone(ma_spatializer_listener* pListener, float innerAngleInRadians, float outerAngleInRadians, float outerGain)\n{\n    if (pListener == NULL) {\n        return;\n    }\n\n    pListener->config.coneInnerAngleInRadians = innerAngleInRadians;\n    pListener->config.coneOuterAngleInRadians = outerAngleInRadians;\n    pListener->config.coneOuterGain           = outerGain;\n}\n\nMA_API void ma_spatializer_listener_get_cone(const ma_spatializer_listener* pListener, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain)\n{\n    if (pListener == NULL) {\n        return;\n    }\n\n    if (pInnerAngleInRadians != NULL) {\n        *pInnerAngleInRadians = pListener->config.coneInnerAngleInRadians;\n    }\n\n    if (pOuterAngleInRadians != NULL) {\n        *pOuterAngleInRadians = pListener->config.coneOuterAngleInRadians;\n    }\n\n    if (pOuterGain != NULL) {\n        *pOuterGain = pListener->config.coneOuterGain;\n    }\n}\n\nMA_API void ma_spatializer_listener_set_position(ma_spatializer_listener* pListener, float x, float y, float z)\n{\n    if (pListener == NULL) {\n        return;\n    }\n\n    ma_atomic_vec3f_set(&pListener->position, ma_vec3f_init_3f(x, y, z));\n}\n\nMA_API ma_vec3f ma_spatializer_listener_get_position(const ma_spatializer_listener* pListener)\n{\n    if (pListener == NULL) {\n        return ma_vec3f_init_3f(0, 0, 0);\n    }\n\n    return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pListener->position); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */\n}\n\nMA_API void ma_spatializer_listener_set_direction(ma_spatializer_listener* pListener, float x, float y, float z)\n{\n    if (pListener == NULL) {\n        return;\n    }\n\n    ma_atomic_vec3f_set(&pListener->direction, ma_vec3f_init_3f(x, y, z));\n}\n\nMA_API ma_vec3f ma_spatializer_listener_get_direction(const ma_spatializer_listener* pListener)\n{\n    if (pListener == NULL) {\n        return ma_vec3f_init_3f(0, 0, -1);\n    }\n\n    return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pListener->direction);    /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */\n}\n\nMA_API void ma_spatializer_listener_set_velocity(ma_spatializer_listener* pListener, float x, float y, float z)\n{\n    if (pListener == NULL) {\n        return;\n    }\n\n    ma_atomic_vec3f_set(&pListener->velocity, ma_vec3f_init_3f(x, y, z));\n}\n\nMA_API ma_vec3f ma_spatializer_listener_get_velocity(const ma_spatializer_listener* pListener)\n{\n    if (pListener == NULL) {\n        return ma_vec3f_init_3f(0, 0, 0);\n    }\n\n    return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pListener->velocity); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */\n}\n\nMA_API void ma_spatializer_listener_set_speed_of_sound(ma_spatializer_listener* pListener, float speedOfSound)\n{\n    if (pListener == NULL) {\n        return;\n    }\n\n    pListener->config.speedOfSound = speedOfSound;\n}\n\nMA_API float ma_spatializer_listener_get_speed_of_sound(const ma_spatializer_listener* pListener)\n{\n    if (pListener == NULL) {\n        return 0;\n    }\n\n    return pListener->config.speedOfSound;\n}\n\nMA_API void ma_spatializer_listener_set_world_up(ma_spatializer_listener* pListener, float x, float y, float z)\n{\n    if (pListener == NULL) {\n        return;\n    }\n\n    pListener->config.worldUp = ma_vec3f_init_3f(x, y, z);\n}\n\nMA_API ma_vec3f ma_spatializer_listener_get_world_up(const ma_spatializer_listener* pListener)\n{\n    if (pListener == NULL) {\n        return ma_vec3f_init_3f(0, 1, 0);\n    }\n\n    return pListener->config.worldUp;\n}\n\nMA_API void ma_spatializer_listener_set_enabled(ma_spatializer_listener* pListener, ma_bool32 isEnabled)\n{\n    if (pListener == NULL) {\n        return;\n    }\n\n    pListener->isEnabled = isEnabled;\n}\n\nMA_API ma_bool32 ma_spatializer_listener_is_enabled(const ma_spatializer_listener* pListener)\n{\n    if (pListener == NULL) {\n        return MA_FALSE;\n    }\n\n    return pListener->isEnabled;\n}\n\n\n\n\nMA_API ma_spatializer_config ma_spatializer_config_init(ma_uint32 channelsIn, ma_uint32 channelsOut)\n{\n    ma_spatializer_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.channelsIn                   = channelsIn;\n    config.channelsOut                  = channelsOut;\n    config.pChannelMapIn                = NULL;\n    config.attenuationModel             = ma_attenuation_model_inverse;\n    config.positioning                  = ma_positioning_absolute;\n    config.handedness                   = ma_handedness_right;\n    config.minGain                      = 0;\n    config.maxGain                      = 1;\n    config.minDistance                  = 1;\n    config.maxDistance                  = MA_FLT_MAX;\n    config.rolloff                      = 1;\n    config.coneInnerAngleInRadians      = 6.283185f; /* 360 degrees. */\n    config.coneOuterAngleInRadians      = 6.283185f; /* 360 degress. */\n    config.coneOuterGain                = 0.0f;\n    config.dopplerFactor                = 1;\n    config.directionalAttenuationFactor = 1;\n    config.minSpatializationChannelGain = 0.2f;\n    config.gainSmoothTimeInFrames       = 360;       /* 7.5ms @ 48K. */\n\n    return config;\n}\n\n\nstatic ma_gainer_config ma_spatializer_gainer_config_init(const ma_spatializer_config* pConfig)\n{\n    MA_ASSERT(pConfig != NULL);\n    return ma_gainer_config_init(pConfig->channelsOut, pConfig->gainSmoothTimeInFrames);\n}\n\nstatic ma_result ma_spatializer_validate_config(const ma_spatializer_config* pConfig)\n{\n    MA_ASSERT(pConfig != NULL);\n\n    if (pConfig->channelsIn == 0 || pConfig->channelsOut == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    return MA_SUCCESS;\n}\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t channelMapInOffset;\n    size_t newChannelGainsOffset;\n    size_t gainerOffset;\n} ma_spatializer_heap_layout;\n\nstatic ma_result ma_spatializer_get_heap_layout(const ma_spatializer_config* pConfig, ma_spatializer_heap_layout* pHeapLayout)\n{\n    ma_result result;\n\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_spatializer_validate_config(pConfig);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* Channel map. */\n    pHeapLayout->channelMapInOffset = MA_SIZE_MAX;  /* <-- MA_SIZE_MAX indicates no allocation necessary. */\n    if (pConfig->pChannelMapIn != NULL) {\n        pHeapLayout->channelMapInOffset = pHeapLayout->sizeInBytes;\n        pHeapLayout->sizeInBytes += ma_align_64(sizeof(*pConfig->pChannelMapIn) * pConfig->channelsIn);\n    }\n\n    /* New channel gains for output. */\n    pHeapLayout->newChannelGainsOffset = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += ma_align_64(sizeof(float) * pConfig->channelsOut);\n\n    /* Gainer. */\n    {\n        size_t gainerHeapSizeInBytes;\n        ma_gainer_config gainerConfig;\n\n        gainerConfig = ma_spatializer_gainer_config_init(pConfig);\n\n        result = ma_gainer_get_heap_size(&gainerConfig, &gainerHeapSizeInBytes);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pHeapLayout->gainerOffset = pHeapLayout->sizeInBytes;\n        pHeapLayout->sizeInBytes += ma_align_64(gainerHeapSizeInBytes);\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_spatializer_get_heap_size(const ma_spatializer_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_spatializer_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;  /* Safety. */\n\n    result = ma_spatializer_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\n\nMA_API ma_result ma_spatializer_init_preallocated(const ma_spatializer_config* pConfig, void* pHeap, ma_spatializer* pSpatializer)\n{\n    ma_result result;\n    ma_spatializer_heap_layout heapLayout;\n    ma_gainer_config gainerConfig;\n\n    if (pSpatializer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pSpatializer);\n\n    if (pConfig == NULL || pHeap == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_spatializer_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pSpatializer->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n    pSpatializer->channelsIn                   = pConfig->channelsIn;\n    pSpatializer->channelsOut                  = pConfig->channelsOut;\n    pSpatializer->attenuationModel             = pConfig->attenuationModel;\n    pSpatializer->positioning                  = pConfig->positioning;\n    pSpatializer->handedness                   = pConfig->handedness;\n    pSpatializer->minGain                      = pConfig->minGain;\n    pSpatializer->maxGain                      = pConfig->maxGain;\n    pSpatializer->minDistance                  = pConfig->minDistance;\n    pSpatializer->maxDistance                  = pConfig->maxDistance;\n    pSpatializer->rolloff                      = pConfig->rolloff;\n    pSpatializer->coneInnerAngleInRadians      = pConfig->coneInnerAngleInRadians;\n    pSpatializer->coneOuterAngleInRadians      = pConfig->coneOuterAngleInRadians;\n    pSpatializer->coneOuterGain                = pConfig->coneOuterGain;\n    pSpatializer->dopplerFactor                = pConfig->dopplerFactor;\n    pSpatializer->minSpatializationChannelGain = pConfig->minSpatializationChannelGain;\n    pSpatializer->directionalAttenuationFactor = pConfig->directionalAttenuationFactor;\n    pSpatializer->gainSmoothTimeInFrames       = pConfig->gainSmoothTimeInFrames;\n    ma_atomic_vec3f_init(&pSpatializer->position,  ma_vec3f_init_3f(0, 0,  0));\n    ma_atomic_vec3f_init(&pSpatializer->direction, ma_vec3f_init_3f(0, 0, -1));\n    ma_atomic_vec3f_init(&pSpatializer->velocity,  ma_vec3f_init_3f(0, 0,  0));\n    pSpatializer->dopplerPitch                 = 1;\n\n    /* Swap the forward direction if we're left handed (it was initialized based on right handed). */\n    if (pSpatializer->handedness == ma_handedness_left) {\n        ma_vec3f negDir = ma_vec3f_neg(ma_spatializer_get_direction(pSpatializer));\n        ma_spatializer_set_direction(pSpatializer, negDir.x, negDir.y, negDir.z);\n    }\n\n    /* Channel map. This will be on the heap. */\n    if (pConfig->pChannelMapIn != NULL) {\n        pSpatializer->pChannelMapIn = (ma_channel*)ma_offset_ptr(pHeap, heapLayout.channelMapInOffset);\n        ma_channel_map_copy_or_default(pSpatializer->pChannelMapIn, pSpatializer->channelsIn, pConfig->pChannelMapIn, pSpatializer->channelsIn);\n    }\n\n    /* New channel gains for output channels. */\n    pSpatializer->pNewChannelGainsOut = (float*)ma_offset_ptr(pHeap, heapLayout.newChannelGainsOffset);\n\n    /* Gainer. */\n    gainerConfig = ma_spatializer_gainer_config_init(pConfig);\n\n    result = ma_gainer_init_preallocated(&gainerConfig, ma_offset_ptr(pHeap, heapLayout.gainerOffset), &pSpatializer->gainer);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to initialize the gainer. */\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_spatializer_init(const ma_spatializer_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_spatializer* pSpatializer)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    /* We'll need a heap allocation to retrieve the size. */\n    result = ma_spatializer_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_spatializer_init_preallocated(pConfig, pHeap, pSpatializer);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pSpatializer->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_spatializer_uninit(ma_spatializer* pSpatializer, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_gainer_uninit(&pSpatializer->gainer, pAllocationCallbacks);\n\n    if (pSpatializer->_ownsHeap) {\n        ma_free(pSpatializer->_pHeap, pAllocationCallbacks);\n    }\n}\n\nstatic float ma_calculate_angular_gain(ma_vec3f dirA, ma_vec3f dirB, float coneInnerAngleInRadians, float coneOuterAngleInRadians, float coneOuterGain)\n{\n    /*\n    Angular attenuation.\n\n    Unlike distance gain, the math for this is not specified by the OpenAL spec so we'll just go ahead and figure\n    this out for ourselves at the expense of possibly being inconsistent with other implementations.\n\n    To do cone attenuation, I'm just using the same math that we'd use to implement a basic spotlight in OpenGL. We\n    just need to get the direction from the source to the listener and then do a dot product against that and the\n    direction of the spotlight. Then we just compare that dot product against the cosine of the inner and outer\n    angles. If the dot product is greater than the the outer angle, we just use coneOuterGain. If it's less than\n    the inner angle, we just use a gain of 1. Otherwise we linearly interpolate between 1 and coneOuterGain.\n    */\n    if (coneInnerAngleInRadians < 6.283185f) {\n        float angularGain = 1;\n        float cutoffInner = (float)ma_cosd(coneInnerAngleInRadians*0.5f);\n        float cutoffOuter = (float)ma_cosd(coneOuterAngleInRadians*0.5f);\n        float d;\n\n        d = ma_vec3f_dot(dirA, dirB);\n\n        if (d > cutoffInner) {\n            /* It's inside the inner angle. */\n            angularGain = 1;\n        } else {\n            /* It's outside the inner angle. */\n            if (d > cutoffOuter) {\n                /* It's between the inner and outer angle. We need to linearly interpolate between 1 and coneOuterGain. */\n                angularGain = ma_mix_f32(coneOuterGain, 1, (d - cutoffOuter) / (cutoffInner - cutoffOuter));\n            } else {\n                /* It's outside the outer angle. */\n                angularGain = coneOuterGain;\n            }\n        }\n\n        /*printf(\"d = %f; cutoffInner = %f; cutoffOuter = %f; angularGain = %f\\n\", d, cutoffInner, cutoffOuter, angularGain);*/\n        return angularGain;\n    } else {\n        /* Inner angle is 360 degrees so no need to do any attenuation. */\n        return 1;\n    }\n}\n\nMA_API ma_result ma_spatializer_process_pcm_frames(ma_spatializer* pSpatializer, ma_spatializer_listener* pListener, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    ma_channel* pChannelMapIn  = pSpatializer->pChannelMapIn;\n    ma_channel* pChannelMapOut = pListener->config.pChannelMapOut;\n\n    if (pSpatializer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* If we're not spatializing we need to run an optimized path. */\n    if (ma_atomic_load_i32(&pSpatializer->attenuationModel) == ma_attenuation_model_none) {\n        if (ma_spatializer_listener_is_enabled(pListener)) {\n            /* No attenuation is required, but we'll need to do some channel conversion. */\n            if (pSpatializer->channelsIn == pSpatializer->channelsOut) {\n                ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, ma_format_f32, pSpatializer->channelsIn);\n            } else {\n                ma_channel_map_apply_f32((float*)pFramesOut, pChannelMapOut, pSpatializer->channelsOut, (const float*)pFramesIn, pChannelMapIn, pSpatializer->channelsIn, frameCount, ma_channel_mix_mode_rectangular, ma_mono_expansion_mode_default);   /* Safe casts to float* because f32 is the only supported format. */\n            }\n        } else {\n            /* The listener is disabled. Output silence. */\n            ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, pSpatializer->channelsOut);\n        }\n\n        /*\n        We're not doing attenuation so don't bother with doppler for now. I'm not sure if this is\n        the correct thinking so might need to review this later.\n        */\n        pSpatializer->dopplerPitch = 1;\n    } else {\n        /*\n        Let's first determine which listener the sound is closest to. Need to keep in mind that we\n        might not have a world or any listeners, in which case we just spatializer based on the\n        listener being positioned at the origin (0, 0, 0).\n        */\n        ma_vec3f relativePosNormalized;\n        ma_vec3f relativePos;   /* The position relative to the listener. */\n        ma_vec3f relativeDir;   /* The direction of the sound, relative to the listener. */\n        ma_vec3f listenerVel;   /* The volocity of the listener. For doppler pitch calculation. */\n        float speedOfSound;\n        float distance = 0;\n        float gain = 1;\n        ma_uint32 iChannel;\n        const ma_uint32 channelsOut = pSpatializer->channelsOut;\n        const ma_uint32 channelsIn  = pSpatializer->channelsIn;\n        float minDistance = ma_spatializer_get_min_distance(pSpatializer);\n        float maxDistance = ma_spatializer_get_max_distance(pSpatializer);\n        float rolloff = ma_spatializer_get_rolloff(pSpatializer);\n        float dopplerFactor = ma_spatializer_get_doppler_factor(pSpatializer);\n\n        /*\n        We'll need the listener velocity for doppler pitch calculations. The speed of sound is\n        defined by the listener, so we'll grab that here too.\n        */\n        if (pListener != NULL) {\n            listenerVel  = ma_spatializer_listener_get_velocity(pListener);\n            speedOfSound = pListener->config.speedOfSound;\n        } else {\n            listenerVel  = ma_vec3f_init_3f(0, 0, 0);\n            speedOfSound = MA_DEFAULT_SPEED_OF_SOUND;\n        }\n\n        if (pListener == NULL || ma_spatializer_get_positioning(pSpatializer) == ma_positioning_relative) {\n            /* There's no listener or we're using relative positioning. */\n            relativePos = ma_spatializer_get_position(pSpatializer);\n            relativeDir = ma_spatializer_get_direction(pSpatializer);\n        } else {\n            /*\n            We've found a listener and we're using absolute positioning. We need to transform the\n            sound's position and direction so that it's relative to listener. Later on we'll use\n            this for determining the factors to apply to each channel to apply the panning effect.\n            */\n            ma_spatializer_get_relative_position_and_direction(pSpatializer, pListener, &relativePos, &relativeDir);\n        }\n\n        distance = ma_vec3f_len(relativePos);\n\n        /* We've gathered the data, so now we can apply some spatialization. */\n        switch (ma_spatializer_get_attenuation_model(pSpatializer)) {\n            case ma_attenuation_model_inverse:\n            {\n                gain = ma_attenuation_inverse(distance, minDistance, maxDistance, rolloff);\n            } break;\n            case ma_attenuation_model_linear:\n            {\n                gain = ma_attenuation_linear(distance, minDistance, maxDistance, rolloff);\n            } break;\n            case ma_attenuation_model_exponential:\n            {\n                gain = ma_attenuation_exponential(distance, minDistance, maxDistance, rolloff);\n            } break;\n            case ma_attenuation_model_none:\n            default:\n            {\n                gain = 1;\n            } break;\n        }\n\n        /* Normalize the position. */\n        if (distance > 0.001f) {\n            float distanceInv = 1/distance;\n            relativePosNormalized    = relativePos;\n            relativePosNormalized.x *= distanceInv;\n            relativePosNormalized.y *= distanceInv;\n            relativePosNormalized.z *= distanceInv;\n        } else {\n            distance = 0;\n            relativePosNormalized = ma_vec3f_init_3f(0, 0, 0);\n        }\n\n        /*\n        Angular attenuation.\n\n        Unlike distance gain, the math for this is not specified by the OpenAL spec so we'll just go ahead and figure\n        this out for ourselves at the expense of possibly being inconsistent with other implementations.\n\n        To do cone attenuation, I'm just using the same math that we'd use to implement a basic spotlight in OpenGL. We\n        just need to get the direction from the source to the listener and then do a dot product against that and the\n        direction of the spotlight. Then we just compare that dot product against the cosine of the inner and outer\n        angles. If the dot product is greater than the the outer angle, we just use coneOuterGain. If it's less than\n        the inner angle, we just use a gain of 1. Otherwise we linearly interpolate between 1 and coneOuterGain.\n        */\n        if (distance > 0) {\n            /* Source anglular gain. */\n            float spatializerConeInnerAngle;\n            float spatializerConeOuterAngle;\n            float spatializerConeOuterGain;\n            ma_spatializer_get_cone(pSpatializer, &spatializerConeInnerAngle, &spatializerConeOuterAngle, &spatializerConeOuterGain);\n\n            gain *= ma_calculate_angular_gain(relativeDir, ma_vec3f_neg(relativePosNormalized), spatializerConeInnerAngle, spatializerConeOuterAngle, spatializerConeOuterGain);\n\n            /*\n            We're supporting angular gain on the listener as well for those who want to reduce the volume of sounds that\n            are positioned behind the listener. On default settings, this will have no effect.\n            */\n            if (pListener != NULL && pListener->config.coneInnerAngleInRadians < 6.283185f) {\n                ma_vec3f listenerDirection;\n                float listenerInnerAngle;\n                float listenerOuterAngle;\n                float listenerOuterGain;\n\n                if (pListener->config.handedness == ma_handedness_right) {\n                    listenerDirection = ma_vec3f_init_3f(0, 0, -1);\n                } else {\n                    listenerDirection = ma_vec3f_init_3f(0, 0, +1);\n                }\n\n                listenerInnerAngle = pListener->config.coneInnerAngleInRadians;\n                listenerOuterAngle = pListener->config.coneOuterAngleInRadians;\n                listenerOuterGain  = pListener->config.coneOuterGain;\n\n                gain *= ma_calculate_angular_gain(listenerDirection, relativePosNormalized, listenerInnerAngle, listenerOuterAngle, listenerOuterGain);\n            }\n        } else {\n            /* The sound is right on top of the listener. Don't do any angular attenuation. */\n        }\n\n\n        /* Clamp the gain. */\n        gain = ma_clamp(gain, ma_spatializer_get_min_gain(pSpatializer), ma_spatializer_get_max_gain(pSpatializer));\n\n        /*\n        The gain needs to be applied per-channel here. The spatialization code below will be changing the per-channel\n        gains which will then eventually be passed into the gainer which will deal with smoothing the gain transitions\n        to avoid harsh changes in gain.\n        */\n        for (iChannel = 0; iChannel < channelsOut; iChannel += 1) {\n            pSpatializer->pNewChannelGainsOut[iChannel] = gain;\n        }\n\n        /*\n        Convert to our output channel count. If the listener is disabled we just output silence here. We cannot ignore\n        the whole section of code here because we need to update some internal spatialization state.\n        */\n        if (ma_spatializer_listener_is_enabled(pListener)) {\n            ma_channel_map_apply_f32((float*)pFramesOut, pChannelMapOut, channelsOut, (const float*)pFramesIn, pChannelMapIn, channelsIn, frameCount, ma_channel_mix_mode_rectangular, ma_mono_expansion_mode_default);\n        } else {\n            ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, pSpatializer->channelsOut);\n        }\n\n\n        /*\n        Panning. This is where we'll apply the gain and convert to the output channel count. We have an optimized path for\n        when we're converting to a mono stream. In that case we don't really need to do any panning - we just apply the\n        gain to the final output.\n        */\n        /*printf(\"distance=%f; gain=%f\\n\", distance, gain);*/\n\n        /* We must have a valid channel map here to ensure we spatialize properly. */\n        MA_ASSERT(pChannelMapOut != NULL);\n\n        /*\n        We're not converting to mono so we'll want to apply some panning. This is where the feeling of something being\n        to the left, right, infront or behind the listener is calculated. I'm just using a basic model here. Note that\n        the code below is not based on any specific algorithm. I'm just implementing this off the top of my head and\n        seeing how it goes. There might be better ways to do this.\n\n        To determine the direction of the sound relative to a speaker I'm using dot products. Each speaker is given a\n        direction. For example, the left channel in a stereo system will be -1 on the X axis and the right channel will\n        be +1 on the X axis. A dot product is performed against the direction vector of the channel and the normalized\n        position of the sound.\n        */\n\n        /*\n        Calculate our per-channel gains. We do this based on the normalized relative position of the sound and it's\n        relation to the direction of the channel.\n        */\n        if (distance > 0) {\n            ma_vec3f unitPos = relativePos;\n            float distanceInv = 1/distance;\n            unitPos.x *= distanceInv;\n            unitPos.y *= distanceInv;\n            unitPos.z *= distanceInv;\n\n            for (iChannel = 0; iChannel < channelsOut; iChannel += 1) {\n                ma_channel channelOut;\n                float d;\n                float dMin;\n\n                channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannel);\n                if (ma_is_spatial_channel_position(channelOut)) {\n                    d = ma_mix_f32_fast(1, ma_vec3f_dot(unitPos, ma_get_channel_direction(channelOut)), ma_spatializer_get_directional_attenuation_factor(pSpatializer));\n                } else {\n                    d = 1;  /* It's not a spatial channel so there's no real notion of direction. */\n                }\n\n                /*\n                In my testing, if the panning effect is too aggressive it makes spatialization feel uncomfortable.\n                The \"dMin\" variable below is used to control the aggressiveness of the panning effect. When set to\n                0, panning will be most extreme and any sounds that are positioned on the opposite side of the\n                speaker will be completely silent from that speaker. Not only does this feel uncomfortable, it\n                doesn't even remotely represent the real world at all because sounds that come from your right side\n                are still clearly audible from your left side. Setting \"dMin\" to 1 will result in no panning at\n                all, which is also not ideal. By setting it to something greater than 0, the spatialization effect\n                becomes much less dramatic and a lot more bearable.\n\n                Summary: 0 = more extreme panning; 1 = no panning.\n                */\n                dMin = pSpatializer->minSpatializationChannelGain;\n\n                /*\n                At this point, \"d\" will be positive if the sound is on the same side as the channel and negative if\n                it's on the opposite side. It will be in the range of -1..1. There's two ways I can think of to\n                calculate a panning value. The first is to simply convert it to 0..1, however this has a problem\n                which I'm not entirely happy with. Considering a stereo system, when a sound is positioned right\n                in front of the listener it'll result in each speaker getting a gain of 0.5. I don't know if I like\n                the idea of having a scaling factor of 0.5 being applied to a sound when it's sitting right in front\n                of the listener. I would intuitively expect that to be played at full volume, or close to it.\n\n                The second idea I think of is to only apply a reduction in gain when the sound is on the opposite\n                side of the speaker. That is, reduce the gain only when the dot product is negative. The problem\n                with this is that there will not be any attenuation as the sound sweeps around the 180 degrees\n                where the dot product is positive. The idea with this option is that you leave the gain at 1 when\n                the sound is being played on the same side as the speaker and then you just reduce the volume when\n                the sound is on the other side.\n\n                The summarize, I think the first option should give a better sense of spatialization, but the second\n                option is better for preserving the sound's power.\n\n                UPDATE: In my testing, I find the first option to sound better. You can feel the sense of space a\n                bit better, but you can also hear the reduction in volume when it's right in front.\n                */\n                #if 1\n                {\n                    /*\n                    Scale the dot product from -1..1 to 0..1. Will result in a sound directly in front losing power\n                    by being played at 0.5 gain.\n                    */\n                    d = (d + 1) * 0.5f;  /* -1..1 to 0..1 */\n                    d = ma_max(d, dMin);\n                    pSpatializer->pNewChannelGainsOut[iChannel] *= d;\n                }\n                #else\n                {\n                    /*\n                    Only reduce the volume of the sound if it's on the opposite side. This path keeps the volume more\n                    consistent, but comes at the expense of a worse sense of space and positioning.\n                    */\n                    if (d < 0) {\n                        d += 1; /* Move into the positive range. */\n                        d = ma_max(d, dMin);\n                        channelGainsOut[iChannel] *= d;\n                    }\n                }\n                #endif\n            }\n        } else {\n            /* Assume the sound is right on top of us. Don't do any panning. */\n        }\n\n        /* Now we need to apply the volume to each channel. This needs to run through the gainer to ensure we get a smooth volume transition. */\n        ma_gainer_set_gains(&pSpatializer->gainer, pSpatializer->pNewChannelGainsOut);\n        ma_gainer_process_pcm_frames(&pSpatializer->gainer, pFramesOut, pFramesOut, frameCount);\n\n        /*\n        Before leaving we'll want to update our doppler pitch so that the caller can apply some\n        pitch shifting if they desire. Note that we need to negate the relative position here\n        because the doppler calculation needs to be source-to-listener, but ours is listener-to-\n        source.\n        */\n        if (dopplerFactor > 0) {\n            pSpatializer->dopplerPitch = ma_doppler_pitch(ma_vec3f_sub(ma_spatializer_listener_get_position(pListener), ma_spatializer_get_position(pSpatializer)), ma_spatializer_get_velocity(pSpatializer), listenerVel, speedOfSound, dopplerFactor);\n        } else {\n            pSpatializer->dopplerPitch = 1;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_spatializer_set_master_volume(ma_spatializer* pSpatializer, float volume)\n{\n    if (pSpatializer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_gainer_set_master_volume(&pSpatializer->gainer, volume);\n}\n\nMA_API ma_result ma_spatializer_get_master_volume(const ma_spatializer* pSpatializer, float* pVolume)\n{\n    if (pSpatializer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_gainer_get_master_volume(&pSpatializer->gainer, pVolume);\n}\n\nMA_API ma_uint32 ma_spatializer_get_input_channels(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return 0;\n    }\n\n    return pSpatializer->channelsIn;\n}\n\nMA_API ma_uint32 ma_spatializer_get_output_channels(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return 0;\n    }\n\n    return pSpatializer->channelsOut;\n}\n\nMA_API void ma_spatializer_set_attenuation_model(ma_spatializer* pSpatializer, ma_attenuation_model attenuationModel)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_atomic_exchange_i32(&pSpatializer->attenuationModel, attenuationModel);\n}\n\nMA_API ma_attenuation_model ma_spatializer_get_attenuation_model(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return ma_attenuation_model_none;\n    }\n\n    return (ma_attenuation_model)ma_atomic_load_i32(&pSpatializer->attenuationModel);\n}\n\nMA_API void ma_spatializer_set_positioning(ma_spatializer* pSpatializer, ma_positioning positioning)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_atomic_exchange_i32(&pSpatializer->positioning, positioning);\n}\n\nMA_API ma_positioning ma_spatializer_get_positioning(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return ma_positioning_absolute;\n    }\n\n    return (ma_positioning)ma_atomic_load_i32(&pSpatializer->positioning);\n}\n\nMA_API void ma_spatializer_set_rolloff(ma_spatializer* pSpatializer, float rolloff)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_atomic_exchange_f32(&pSpatializer->rolloff, rolloff);\n}\n\nMA_API float ma_spatializer_get_rolloff(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return 0;\n    }\n\n    return ma_atomic_load_f32(&pSpatializer->rolloff);\n}\n\nMA_API void ma_spatializer_set_min_gain(ma_spatializer* pSpatializer, float minGain)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_atomic_exchange_f32(&pSpatializer->minGain, minGain);\n}\n\nMA_API float ma_spatializer_get_min_gain(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return 0;\n    }\n\n    return ma_atomic_load_f32(&pSpatializer->minGain);\n}\n\nMA_API void ma_spatializer_set_max_gain(ma_spatializer* pSpatializer, float maxGain)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_atomic_exchange_f32(&pSpatializer->maxGain, maxGain);\n}\n\nMA_API float ma_spatializer_get_max_gain(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return 0;\n    }\n\n    return ma_atomic_load_f32(&pSpatializer->maxGain);\n}\n\nMA_API void ma_spatializer_set_min_distance(ma_spatializer* pSpatializer, float minDistance)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_atomic_exchange_f32(&pSpatializer->minDistance, minDistance);\n}\n\nMA_API float ma_spatializer_get_min_distance(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return 0;\n    }\n\n    return ma_atomic_load_f32(&pSpatializer->minDistance);\n}\n\nMA_API void ma_spatializer_set_max_distance(ma_spatializer* pSpatializer, float maxDistance)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_atomic_exchange_f32(&pSpatializer->maxDistance, maxDistance);\n}\n\nMA_API float ma_spatializer_get_max_distance(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return 0;\n    }\n\n    return ma_atomic_load_f32(&pSpatializer->maxDistance);\n}\n\nMA_API void ma_spatializer_set_cone(ma_spatializer* pSpatializer, float innerAngleInRadians, float outerAngleInRadians, float outerGain)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_atomic_exchange_f32(&pSpatializer->coneInnerAngleInRadians, innerAngleInRadians);\n    ma_atomic_exchange_f32(&pSpatializer->coneOuterAngleInRadians, outerAngleInRadians);\n    ma_atomic_exchange_f32(&pSpatializer->coneOuterGain,           outerGain);\n}\n\nMA_API void ma_spatializer_get_cone(const ma_spatializer* pSpatializer, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    if (pInnerAngleInRadians != NULL) {\n        *pInnerAngleInRadians = ma_atomic_load_f32(&pSpatializer->coneInnerAngleInRadians);\n    }\n\n    if (pOuterAngleInRadians != NULL) {\n        *pOuterAngleInRadians = ma_atomic_load_f32(&pSpatializer->coneOuterAngleInRadians);\n    }\n\n    if (pOuterGain != NULL) {\n        *pOuterGain = ma_atomic_load_f32(&pSpatializer->coneOuterGain);\n    }\n}\n\nMA_API void ma_spatializer_set_doppler_factor(ma_spatializer* pSpatializer, float dopplerFactor)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_atomic_exchange_f32(&pSpatializer->dopplerFactor, dopplerFactor);\n}\n\nMA_API float ma_spatializer_get_doppler_factor(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return 1;\n    }\n\n    return ma_atomic_load_f32(&pSpatializer->dopplerFactor);\n}\n\nMA_API void ma_spatializer_set_directional_attenuation_factor(ma_spatializer* pSpatializer, float directionalAttenuationFactor)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_atomic_exchange_f32(&pSpatializer->directionalAttenuationFactor, directionalAttenuationFactor);\n}\n\nMA_API float ma_spatializer_get_directional_attenuation_factor(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return 1;\n    }\n\n    return ma_atomic_load_f32(&pSpatializer->directionalAttenuationFactor);\n}\n\nMA_API void ma_spatializer_set_position(ma_spatializer* pSpatializer, float x, float y, float z)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_atomic_vec3f_set(&pSpatializer->position, ma_vec3f_init_3f(x, y, z));\n}\n\nMA_API ma_vec3f ma_spatializer_get_position(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return ma_vec3f_init_3f(0, 0, 0);\n    }\n\n    return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pSpatializer->position);  /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */\n}\n\nMA_API void ma_spatializer_set_direction(ma_spatializer* pSpatializer, float x, float y, float z)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_atomic_vec3f_set(&pSpatializer->direction, ma_vec3f_init_3f(x, y, z));\n}\n\nMA_API ma_vec3f ma_spatializer_get_direction(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return ma_vec3f_init_3f(0, 0, -1);\n    }\n\n    return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pSpatializer->direction); /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */\n}\n\nMA_API void ma_spatializer_set_velocity(ma_spatializer* pSpatializer, float x, float y, float z)\n{\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    ma_atomic_vec3f_set(&pSpatializer->velocity, ma_vec3f_init_3f(x, y, z));\n}\n\nMA_API ma_vec3f ma_spatializer_get_velocity(const ma_spatializer* pSpatializer)\n{\n    if (pSpatializer == NULL) {\n        return ma_vec3f_init_3f(0, 0, 0);\n    }\n\n    return ma_atomic_vec3f_get((ma_atomic_vec3f*)&pSpatializer->velocity);  /* Naughty const-cast. It's just for atomically loading the vec3 which should be safe. */\n}\n\nMA_API void ma_spatializer_get_relative_position_and_direction(const ma_spatializer* pSpatializer, const ma_spatializer_listener* pListener, ma_vec3f* pRelativePos, ma_vec3f* pRelativeDir)\n{\n    if (pRelativePos != NULL) {\n        pRelativePos->x = 0;\n        pRelativePos->y = 0;\n        pRelativePos->z = 0;\n    }\n\n    if (pRelativeDir != NULL) {\n        pRelativeDir->x = 0;\n        pRelativeDir->y = 0;\n        pRelativeDir->z = -1;\n    }\n\n    if (pSpatializer == NULL) {\n        return;\n    }\n\n    if (pListener == NULL || ma_spatializer_get_positioning(pSpatializer) == ma_positioning_relative) {\n        /* There's no listener or we're using relative positioning. */\n        if (pRelativePos != NULL) {\n            *pRelativePos = ma_spatializer_get_position(pSpatializer);\n        }\n        if (pRelativeDir != NULL) {\n            *pRelativeDir = ma_spatializer_get_direction(pSpatializer);\n        }\n    } else {\n        ma_vec3f spatializerPosition;\n        ma_vec3f spatializerDirection;\n        ma_vec3f listenerPosition;\n        ma_vec3f listenerDirection;\n        ma_vec3f v;\n        ma_vec3f axisX;\n        ma_vec3f axisY;\n        ma_vec3f axisZ;\n        float m[4][4];\n\n        spatializerPosition  = ma_spatializer_get_position(pSpatializer);\n        spatializerDirection = ma_spatializer_get_direction(pSpatializer);\n        listenerPosition     = ma_spatializer_listener_get_position(pListener);\n        listenerDirection    = ma_spatializer_listener_get_direction(pListener);\n\n        /*\n        We need to calcualte the right vector from our forward and up vectors. This is done with\n        a cross product.\n        */\n        axisZ = ma_vec3f_normalize(listenerDirection);                                  /* Normalization required here because we can't trust the caller. */\n        axisX = ma_vec3f_normalize(ma_vec3f_cross(axisZ, pListener->config.worldUp));   /* Normalization required here because the world up vector may not be perpendicular with the forward vector. */\n\n        /*\n        The calculation of axisX above can result in a zero-length vector if the listener is\n        looking straight up on the Y axis. We'll need to fall back to a +X in this case so that\n        the calculations below don't fall apart. This is where a quaternion based listener and\n        sound orientation would come in handy.\n        */\n        if (ma_vec3f_len2(axisX) == 0) {\n            axisX = ma_vec3f_init_3f(1, 0, 0);\n        }\n\n        axisY = ma_vec3f_cross(axisX, axisZ);                                           /* No normalization is required here because axisX and axisZ are unit length and perpendicular. */\n\n        /*\n        We need to swap the X axis if we're left handed because otherwise the cross product above\n        will have resulted in it pointing in the wrong direction (right handed was assumed in the\n        cross products above).\n        */\n        if (pListener->config.handedness == ma_handedness_left) {\n            axisX = ma_vec3f_neg(axisX);\n        }\n\n        /* Lookat. */\n        m[0][0] =  axisX.x; m[1][0] =  axisX.y; m[2][0] =  axisX.z; m[3][0] = -ma_vec3f_dot(axisX,               listenerPosition);\n        m[0][1] =  axisY.x; m[1][1] =  axisY.y; m[2][1] =  axisY.z; m[3][1] = -ma_vec3f_dot(axisY,               listenerPosition);\n        m[0][2] = -axisZ.x; m[1][2] = -axisZ.y; m[2][2] = -axisZ.z; m[3][2] = -ma_vec3f_dot(ma_vec3f_neg(axisZ), listenerPosition);\n        m[0][3] = 0;        m[1][3] = 0;        m[2][3] = 0;        m[3][3] = 1;\n\n        /*\n        Multiply the lookat matrix by the spatializer position to transform it to listener\n        space. This allows calculations to work based on the sound being relative to the\n        origin which makes things simpler.\n        */\n        if (pRelativePos != NULL) {\n            v = spatializerPosition;\n            pRelativePos->x = m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * 1;\n            pRelativePos->y = m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * 1;\n            pRelativePos->z = m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * 1;\n        }\n\n        /*\n        The direction of the sound needs to also be transformed so that it's relative to the\n        rotation of the listener.\n        */\n        if (pRelativeDir != NULL) {\n            v = spatializerDirection;\n            pRelativeDir->x = m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z;\n            pRelativeDir->y = m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z;\n            pRelativeDir->z = m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z;\n        }\n    }\n}\n\n\n\n\n/**************************************************************************************************************************************************************\n\nResampling\n\n**************************************************************************************************************************************************************/\nMA_API ma_linear_resampler_config ma_linear_resampler_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut)\n{\n    ma_linear_resampler_config config;\n    MA_ZERO_OBJECT(&config);\n    config.format           = format;\n    config.channels         = channels;\n    config.sampleRateIn     = sampleRateIn;\n    config.sampleRateOut    = sampleRateOut;\n    config.lpfOrder         = ma_min(MA_DEFAULT_RESAMPLER_LPF_ORDER, MA_MAX_FILTER_ORDER);\n    config.lpfNyquistFactor = 1;\n\n    return config;\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t x0Offset;\n    size_t x1Offset;\n    size_t lpfOffset;\n} ma_linear_resampler_heap_layout;\n\n\nstatic void ma_linear_resampler_adjust_timer_for_new_rate(ma_linear_resampler* pResampler, ma_uint32 oldSampleRateOut, ma_uint32 newSampleRateOut)\n{\n    /*\n    So what's happening here? Basically we need to adjust the fractional component of the time advance based on the new rate. The old time advance will\n    be based on the old sample rate, but we are needing to adjust it to that it's based on the new sample rate.\n    */\n    ma_uint32 oldRateTimeWhole = pResampler->inTimeFrac / oldSampleRateOut;  /* <-- This should almost never be anything other than 0, but leaving it here to make this more general and robust just in case. */\n    ma_uint32 oldRateTimeFract = pResampler->inTimeFrac % oldSampleRateOut;\n\n    pResampler->inTimeFrac =\n         (oldRateTimeWhole * newSampleRateOut) +\n        ((oldRateTimeFract * newSampleRateOut) / oldSampleRateOut);\n\n    /* Make sure the fractional part is less than the output sample rate. */\n    pResampler->inTimeInt += pResampler->inTimeFrac / pResampler->config.sampleRateOut;\n    pResampler->inTimeFrac = pResampler->inTimeFrac % pResampler->config.sampleRateOut;\n}\n\nstatic ma_result ma_linear_resampler_set_rate_internal(ma_linear_resampler* pResampler, void* pHeap, ma_linear_resampler_heap_layout* pHeapLayout, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut, ma_bool32 isResamplerAlreadyInitialized)\n{\n    ma_result result;\n    ma_uint32 gcf;\n    ma_uint32 lpfSampleRate;\n    double lpfCutoffFrequency;\n    ma_lpf_config lpfConfig;\n    ma_uint32 oldSampleRateOut; /* Required for adjusting time advance down the bottom. */\n\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (sampleRateIn == 0 || sampleRateOut == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    oldSampleRateOut = pResampler->config.sampleRateOut;\n\n    pResampler->config.sampleRateIn  = sampleRateIn;\n    pResampler->config.sampleRateOut = sampleRateOut;\n\n    /* Simplify the sample rate. */\n    gcf = ma_gcf_u32(pResampler->config.sampleRateIn, pResampler->config.sampleRateOut);\n    pResampler->config.sampleRateIn  /= gcf;\n    pResampler->config.sampleRateOut /= gcf;\n\n    /* Always initialize the low-pass filter, even when the order is 0. */\n    if (pResampler->config.lpfOrder > MA_MAX_FILTER_ORDER) {\n        return MA_INVALID_ARGS;\n    }\n\n    lpfSampleRate      = (ma_uint32)(ma_max(pResampler->config.sampleRateIn, pResampler->config.sampleRateOut));\n    lpfCutoffFrequency = (   double)(ma_min(pResampler->config.sampleRateIn, pResampler->config.sampleRateOut) * 0.5 * pResampler->config.lpfNyquistFactor);\n\n    lpfConfig = ma_lpf_config_init(pResampler->config.format, pResampler->config.channels, lpfSampleRate, lpfCutoffFrequency, pResampler->config.lpfOrder);\n\n    /*\n    If the resampler is alreay initialized we don't want to do a fresh initialization of the low-pass filter because it will result in the cached frames\n    getting cleared. Instead we re-initialize the filter which will maintain any cached frames.\n    */\n    if (isResamplerAlreadyInitialized) {\n        result = ma_lpf_reinit(&lpfConfig, &pResampler->lpf);\n    } else {\n        result = ma_lpf_init_preallocated(&lpfConfig, ma_offset_ptr(pHeap, pHeapLayout->lpfOffset), &pResampler->lpf);\n    }\n\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n\n    pResampler->inAdvanceInt  = pResampler->config.sampleRateIn / pResampler->config.sampleRateOut;\n    pResampler->inAdvanceFrac = pResampler->config.sampleRateIn % pResampler->config.sampleRateOut;\n\n    /* Our timer was based on the old rate. We need to adjust it so that it's based on the new rate. */\n    ma_linear_resampler_adjust_timer_for_new_rate(pResampler, oldSampleRateOut, pResampler->config.sampleRateOut);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_linear_resampler_get_heap_layout(const ma_linear_resampler_config* pConfig, ma_linear_resampler_heap_layout* pHeapLayout)\n{\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->format != ma_format_f32 && pConfig->format != ma_format_s16) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->channels == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* x0 */\n    pHeapLayout->x0Offset = pHeapLayout->sizeInBytes;\n    if (pConfig->format == ma_format_f32) {\n        pHeapLayout->sizeInBytes += sizeof(float) * pConfig->channels;\n    } else {\n        pHeapLayout->sizeInBytes += sizeof(ma_int16) * pConfig->channels;\n    }\n\n    /* x1 */\n    pHeapLayout->x1Offset = pHeapLayout->sizeInBytes;\n    if (pConfig->format == ma_format_f32) {\n        pHeapLayout->sizeInBytes += sizeof(float) * pConfig->channels;\n    } else {\n        pHeapLayout->sizeInBytes += sizeof(ma_int16) * pConfig->channels;\n    }\n\n    /* LPF */\n    pHeapLayout->lpfOffset = ma_align_64(pHeapLayout->sizeInBytes);\n    {\n        ma_result result;\n        size_t lpfHeapSizeInBytes;\n        ma_lpf_config lpfConfig = ma_lpf_config_init(pConfig->format, pConfig->channels, 1, 1, pConfig->lpfOrder);  /* Sample rate and cutoff frequency do not matter. */\n\n        result = ma_lpf_get_heap_size(&lpfConfig, &lpfHeapSizeInBytes);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pHeapLayout->sizeInBytes += lpfHeapSizeInBytes;\n    }\n\n    /* Make sure allocation size is aligned. */\n    pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_linear_resampler_get_heap_size(const ma_linear_resampler_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_linear_resampler_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_linear_resampler_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_linear_resampler_init_preallocated(const ma_linear_resampler_config* pConfig, void* pHeap, ma_linear_resampler* pResampler)\n{\n    ma_result result;\n    ma_linear_resampler_heap_layout heapLayout;\n\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pResampler);\n\n    result = ma_linear_resampler_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pResampler->config = *pConfig;\n\n    pResampler->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n    if (pConfig->format == ma_format_f32) {\n        pResampler->x0.f32 = (float*)ma_offset_ptr(pHeap, heapLayout.x0Offset);\n        pResampler->x1.f32 = (float*)ma_offset_ptr(pHeap, heapLayout.x1Offset);\n    } else {\n        pResampler->x0.s16 = (ma_int16*)ma_offset_ptr(pHeap, heapLayout.x0Offset);\n        pResampler->x1.s16 = (ma_int16*)ma_offset_ptr(pHeap, heapLayout.x1Offset);\n    }\n\n    /* Setting the rate will set up the filter and time advances for us. */\n    result = ma_linear_resampler_set_rate_internal(pResampler, pHeap, &heapLayout, pConfig->sampleRateIn, pConfig->sampleRateOut, /* isResamplerAlreadyInitialized = */ MA_FALSE);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pResampler->inTimeInt  = 1;  /* Set this to one to force an input sample to always be loaded for the first output frame. */\n    pResampler->inTimeFrac = 0;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_linear_resampler_init(const ma_linear_resampler_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_linear_resampler* pResampler)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_linear_resampler_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_linear_resampler_init_preallocated(pConfig, pHeap, pResampler);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pResampler->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_linear_resampler_uninit(ma_linear_resampler* pResampler, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pResampler == NULL) {\n        return;\n    }\n\n    ma_lpf_uninit(&pResampler->lpf, pAllocationCallbacks);\n\n    if (pResampler->_ownsHeap) {\n        ma_free(pResampler->_pHeap, pAllocationCallbacks);\n    }\n}\n\nstatic MA_INLINE ma_int16 ma_linear_resampler_mix_s16(ma_int16 x, ma_int16 y, ma_int32 a, const ma_int32 shift)\n{\n    ma_int32 b;\n    ma_int32 c;\n    ma_int32 r;\n\n    MA_ASSERT(a <= (1<<shift));\n\n    b = x * ((1<<shift) - a);\n    c = y * a;\n    r = b + c;\n\n    return (ma_int16)(r >> shift);\n}\n\nstatic void ma_linear_resampler_interpolate_frame_s16(ma_linear_resampler* pResampler, ma_int16* MA_RESTRICT pFrameOut)\n{\n    ma_uint32 c;\n    ma_uint32 a;\n    const ma_uint32 channels = pResampler->config.channels;\n    const ma_uint32 shift = 12;\n\n    MA_ASSERT(pResampler != NULL);\n    MA_ASSERT(pFrameOut  != NULL);\n\n    a = (pResampler->inTimeFrac << shift) / pResampler->config.sampleRateOut;\n\n    MA_ASSUME(channels > 0);\n    for (c = 0; c < channels; c += 1) {\n        ma_int16 s = ma_linear_resampler_mix_s16(pResampler->x0.s16[c], pResampler->x1.s16[c], a, shift);\n        pFrameOut[c] = s;\n    }\n}\n\n\nstatic void ma_linear_resampler_interpolate_frame_f32(ma_linear_resampler* pResampler, float* MA_RESTRICT pFrameOut)\n{\n    ma_uint32 c;\n    float a;\n    const ma_uint32 channels = pResampler->config.channels;\n\n    MA_ASSERT(pResampler != NULL);\n    MA_ASSERT(pFrameOut  != NULL);\n\n    a = (float)pResampler->inTimeFrac / pResampler->config.sampleRateOut;\n\n    MA_ASSUME(channels > 0);\n    for (c = 0; c < channels; c += 1) {\n        float s = ma_mix_f32_fast(pResampler->x0.f32[c], pResampler->x1.f32[c], a);\n        pFrameOut[c] = s;\n    }\n}\n\nstatic ma_result ma_linear_resampler_process_pcm_frames_s16_downsample(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    const ma_int16* pFramesInS16;\n    /* */ ma_int16* pFramesOutS16;\n    ma_uint64 frameCountIn;\n    ma_uint64 frameCountOut;\n    ma_uint64 framesProcessedIn;\n    ma_uint64 framesProcessedOut;\n\n    MA_ASSERT(pResampler     != NULL);\n    MA_ASSERT(pFrameCountIn  != NULL);\n    MA_ASSERT(pFrameCountOut != NULL);\n\n    pFramesInS16       = (const ma_int16*)pFramesIn;\n    pFramesOutS16      = (      ma_int16*)pFramesOut;\n    frameCountIn       = *pFrameCountIn;\n    frameCountOut      = *pFrameCountOut;\n    framesProcessedIn  = 0;\n    framesProcessedOut = 0;\n\n    while (framesProcessedOut < frameCountOut) {\n        /* Before interpolating we need to load the buffers. When doing this we need to ensure we run every input sample through the filter. */\n        while (pResampler->inTimeInt > 0 && frameCountIn > framesProcessedIn) {\n            ma_uint32 iChannel;\n\n            if (pFramesInS16 != NULL) {\n                for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) {\n                    pResampler->x0.s16[iChannel] = pResampler->x1.s16[iChannel];\n                    pResampler->x1.s16[iChannel] = pFramesInS16[iChannel];\n                }\n                pFramesInS16 += pResampler->config.channels;\n            } else {\n                for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) {\n                    pResampler->x0.s16[iChannel] = pResampler->x1.s16[iChannel];\n                    pResampler->x1.s16[iChannel] = 0;\n                }\n            }\n\n            /* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */\n            if (pResampler->config.sampleRateIn != pResampler->config.sampleRateOut) {\n                ma_lpf_process_pcm_frame_s16(&pResampler->lpf, pResampler->x1.s16, pResampler->x1.s16);\n            }\n\n            framesProcessedIn     += 1;\n            pResampler->inTimeInt -= 1;\n        }\n\n        if (pResampler->inTimeInt > 0) {\n            break;  /* Ran out of input data. */\n        }\n\n        /* Getting here means the frames have been loaded and filtered and we can generate the next output frame. */\n        if (pFramesOutS16 != NULL) {\n            MA_ASSERT(pResampler->inTimeInt == 0);\n            ma_linear_resampler_interpolate_frame_s16(pResampler, pFramesOutS16);\n\n            pFramesOutS16 += pResampler->config.channels;\n        }\n\n        framesProcessedOut += 1;\n\n        /* Advance time forward. */\n        pResampler->inTimeInt  += pResampler->inAdvanceInt;\n        pResampler->inTimeFrac += pResampler->inAdvanceFrac;\n        if (pResampler->inTimeFrac >= pResampler->config.sampleRateOut) {\n            pResampler->inTimeFrac -= pResampler->config.sampleRateOut;\n            pResampler->inTimeInt  += 1;\n        }\n    }\n\n    *pFrameCountIn  = framesProcessedIn;\n    *pFrameCountOut = framesProcessedOut;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_linear_resampler_process_pcm_frames_s16_upsample(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    const ma_int16* pFramesInS16;\n    /* */ ma_int16* pFramesOutS16;\n    ma_uint64 frameCountIn;\n    ma_uint64 frameCountOut;\n    ma_uint64 framesProcessedIn;\n    ma_uint64 framesProcessedOut;\n\n    MA_ASSERT(pResampler     != NULL);\n    MA_ASSERT(pFrameCountIn  != NULL);\n    MA_ASSERT(pFrameCountOut != NULL);\n\n    pFramesInS16       = (const ma_int16*)pFramesIn;\n    pFramesOutS16      = (      ma_int16*)pFramesOut;\n    frameCountIn       = *pFrameCountIn;\n    frameCountOut      = *pFrameCountOut;\n    framesProcessedIn  = 0;\n    framesProcessedOut = 0;\n\n    while (framesProcessedOut < frameCountOut) {\n        /* Before interpolating we need to load the buffers. */\n        while (pResampler->inTimeInt > 0 && frameCountIn > framesProcessedIn) {\n            ma_uint32 iChannel;\n\n            if (pFramesInS16 != NULL) {\n                for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) {\n                    pResampler->x0.s16[iChannel] = pResampler->x1.s16[iChannel];\n                    pResampler->x1.s16[iChannel] = pFramesInS16[iChannel];\n                }\n                pFramesInS16 += pResampler->config.channels;\n            } else {\n                for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) {\n                    pResampler->x0.s16[iChannel] = pResampler->x1.s16[iChannel];\n                    pResampler->x1.s16[iChannel] = 0;\n                }\n            }\n\n            framesProcessedIn     += 1;\n            pResampler->inTimeInt -= 1;\n        }\n\n        if (pResampler->inTimeInt > 0) {\n            break;  /* Ran out of input data. */\n        }\n\n        /* Getting here means the frames have been loaded and we can generate the next output frame. */\n        if (pFramesOutS16 != NULL) {\n            MA_ASSERT(pResampler->inTimeInt == 0);\n            ma_linear_resampler_interpolate_frame_s16(pResampler, pFramesOutS16);\n\n            /* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */\n            if (pResampler->config.sampleRateIn != pResampler->config.sampleRateOut) {\n                ma_lpf_process_pcm_frame_s16(&pResampler->lpf, pFramesOutS16, pFramesOutS16);\n            }\n\n            pFramesOutS16 += pResampler->config.channels;\n        }\n\n        framesProcessedOut += 1;\n\n        /* Advance time forward. */\n        pResampler->inTimeInt  += pResampler->inAdvanceInt;\n        pResampler->inTimeFrac += pResampler->inAdvanceFrac;\n        if (pResampler->inTimeFrac >= pResampler->config.sampleRateOut) {\n            pResampler->inTimeFrac -= pResampler->config.sampleRateOut;\n            pResampler->inTimeInt  += 1;\n        }\n    }\n\n    *pFrameCountIn  = framesProcessedIn;\n    *pFrameCountOut = framesProcessedOut;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_linear_resampler_process_pcm_frames_s16(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    MA_ASSERT(pResampler != NULL);\n\n    if (pResampler->config.sampleRateIn > pResampler->config.sampleRateOut) {\n        return ma_linear_resampler_process_pcm_frames_s16_downsample(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n    } else {\n        return ma_linear_resampler_process_pcm_frames_s16_upsample(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n    }\n}\n\n\nstatic ma_result ma_linear_resampler_process_pcm_frames_f32_downsample(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    const float* pFramesInF32;\n    /* */ float* pFramesOutF32;\n    ma_uint64 frameCountIn;\n    ma_uint64 frameCountOut;\n    ma_uint64 framesProcessedIn;\n    ma_uint64 framesProcessedOut;\n\n    MA_ASSERT(pResampler     != NULL);\n    MA_ASSERT(pFrameCountIn  != NULL);\n    MA_ASSERT(pFrameCountOut != NULL);\n\n    pFramesInF32       = (const float*)pFramesIn;\n    pFramesOutF32      = (      float*)pFramesOut;\n    frameCountIn       = *pFrameCountIn;\n    frameCountOut      = *pFrameCountOut;\n    framesProcessedIn  = 0;\n    framesProcessedOut = 0;\n\n    while (framesProcessedOut < frameCountOut) {\n        /* Before interpolating we need to load the buffers. When doing this we need to ensure we run every input sample through the filter. */\n        while (pResampler->inTimeInt > 0 && frameCountIn > framesProcessedIn) {\n            ma_uint32 iChannel;\n\n            if (pFramesInF32 != NULL) {\n                for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) {\n                    pResampler->x0.f32[iChannel] = pResampler->x1.f32[iChannel];\n                    pResampler->x1.f32[iChannel] = pFramesInF32[iChannel];\n                }\n                pFramesInF32 += pResampler->config.channels;\n            } else {\n                for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) {\n                    pResampler->x0.f32[iChannel] = pResampler->x1.f32[iChannel];\n                    pResampler->x1.f32[iChannel] = 0;\n                }\n            }\n\n            /* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */\n            if (pResampler->config.sampleRateIn != pResampler->config.sampleRateOut) {\n                ma_lpf_process_pcm_frame_f32(&pResampler->lpf, pResampler->x1.f32, pResampler->x1.f32);\n            }\n\n            framesProcessedIn     += 1;\n            pResampler->inTimeInt -= 1;\n        }\n\n        if (pResampler->inTimeInt > 0) {\n            break;  /* Ran out of input data. */\n        }\n\n        /* Getting here means the frames have been loaded and filtered and we can generate the next output frame. */\n        if (pFramesOutF32 != NULL) {\n            MA_ASSERT(pResampler->inTimeInt == 0);\n            ma_linear_resampler_interpolate_frame_f32(pResampler, pFramesOutF32);\n\n            pFramesOutF32 += pResampler->config.channels;\n        }\n\n        framesProcessedOut += 1;\n\n        /* Advance time forward. */\n        pResampler->inTimeInt  += pResampler->inAdvanceInt;\n        pResampler->inTimeFrac += pResampler->inAdvanceFrac;\n        if (pResampler->inTimeFrac >= pResampler->config.sampleRateOut) {\n            pResampler->inTimeFrac -= pResampler->config.sampleRateOut;\n            pResampler->inTimeInt  += 1;\n        }\n    }\n\n    *pFrameCountIn  = framesProcessedIn;\n    *pFrameCountOut = framesProcessedOut;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_linear_resampler_process_pcm_frames_f32_upsample(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    const float* pFramesInF32;\n    /* */ float* pFramesOutF32;\n    ma_uint64 frameCountIn;\n    ma_uint64 frameCountOut;\n    ma_uint64 framesProcessedIn;\n    ma_uint64 framesProcessedOut;\n\n    MA_ASSERT(pResampler     != NULL);\n    MA_ASSERT(pFrameCountIn  != NULL);\n    MA_ASSERT(pFrameCountOut != NULL);\n\n    pFramesInF32       = (const float*)pFramesIn;\n    pFramesOutF32      = (      float*)pFramesOut;\n    frameCountIn       = *pFrameCountIn;\n    frameCountOut      = *pFrameCountOut;\n    framesProcessedIn  = 0;\n    framesProcessedOut = 0;\n\n    while (framesProcessedOut < frameCountOut) {\n        /* Before interpolating we need to load the buffers. */\n        while (pResampler->inTimeInt > 0 && frameCountIn > framesProcessedIn) {\n            ma_uint32 iChannel;\n\n            if (pFramesInF32 != NULL) {\n                for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) {\n                    pResampler->x0.f32[iChannel] = pResampler->x1.f32[iChannel];\n                    pResampler->x1.f32[iChannel] = pFramesInF32[iChannel];\n                }\n                pFramesInF32 += pResampler->config.channels;\n            } else {\n                for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) {\n                    pResampler->x0.f32[iChannel] = pResampler->x1.f32[iChannel];\n                    pResampler->x1.f32[iChannel] = 0;\n                }\n            }\n\n            framesProcessedIn     += 1;\n            pResampler->inTimeInt -= 1;\n        }\n\n        if (pResampler->inTimeInt > 0) {\n            break;  /* Ran out of input data. */\n        }\n\n        /* Getting here means the frames have been loaded and we can generate the next output frame. */\n        if (pFramesOutF32 != NULL) {\n            MA_ASSERT(pResampler->inTimeInt == 0);\n            ma_linear_resampler_interpolate_frame_f32(pResampler, pFramesOutF32);\n\n            /* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */\n            if (pResampler->config.sampleRateIn != pResampler->config.sampleRateOut) {\n                ma_lpf_process_pcm_frame_f32(&pResampler->lpf, pFramesOutF32, pFramesOutF32);\n            }\n\n            pFramesOutF32 += pResampler->config.channels;\n        }\n\n        framesProcessedOut += 1;\n\n        /* Advance time forward. */\n        pResampler->inTimeInt  += pResampler->inAdvanceInt;\n        pResampler->inTimeFrac += pResampler->inAdvanceFrac;\n        if (pResampler->inTimeFrac >= pResampler->config.sampleRateOut) {\n            pResampler->inTimeFrac -= pResampler->config.sampleRateOut;\n            pResampler->inTimeInt  += 1;\n        }\n    }\n\n    *pFrameCountIn  = framesProcessedIn;\n    *pFrameCountOut = framesProcessedOut;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_linear_resampler_process_pcm_frames_f32(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    MA_ASSERT(pResampler != NULL);\n\n    if (pResampler->config.sampleRateIn > pResampler->config.sampleRateOut) {\n        return ma_linear_resampler_process_pcm_frames_f32_downsample(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n    } else {\n        return ma_linear_resampler_process_pcm_frames_f32_upsample(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n    }\n}\n\n\nMA_API ma_result ma_linear_resampler_process_pcm_frames(ma_linear_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /*  */ if (pResampler->config.format == ma_format_s16) {\n        return ma_linear_resampler_process_pcm_frames_s16(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n    } else if (pResampler->config.format == ma_format_f32) {\n        return ma_linear_resampler_process_pcm_frames_f32(pResampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n    } else {\n        /* Should never get here. Getting here means the format is not supported and you didn't check the return value of ma_linear_resampler_init(). */\n        MA_ASSERT(MA_FALSE);\n        return MA_INVALID_ARGS;\n    }\n}\n\n\nMA_API ma_result ma_linear_resampler_set_rate(ma_linear_resampler* pResampler, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut)\n{\n    return ma_linear_resampler_set_rate_internal(pResampler, NULL, NULL, sampleRateIn, sampleRateOut, /* isResamplerAlreadyInitialized = */ MA_TRUE);\n}\n\nMA_API ma_result ma_linear_resampler_set_rate_ratio(ma_linear_resampler* pResampler, float ratioInOut)\n{\n    ma_uint32 n;\n    ma_uint32 d;\n\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (ratioInOut <= 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    d = 1000000;\n    n = (ma_uint32)(ratioInOut * d);\n\n    if (n == 0) {\n        return MA_INVALID_ARGS; /* Ratio too small. */\n    }\n\n    MA_ASSERT(n != 0);\n\n    return ma_linear_resampler_set_rate(pResampler, n, d);\n}\n\nMA_API ma_uint64 ma_linear_resampler_get_input_latency(const ma_linear_resampler* pResampler)\n{\n    if (pResampler == NULL) {\n        return 0;\n    }\n\n    return 1 + ma_lpf_get_latency(&pResampler->lpf);\n}\n\nMA_API ma_uint64 ma_linear_resampler_get_output_latency(const ma_linear_resampler* pResampler)\n{\n    if (pResampler == NULL) {\n        return 0;\n    }\n\n    return ma_linear_resampler_get_input_latency(pResampler) * pResampler->config.sampleRateOut / pResampler->config.sampleRateIn;\n}\n\nMA_API ma_result ma_linear_resampler_get_required_input_frame_count(const ma_linear_resampler* pResampler, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount)\n{\n    ma_uint64 inputFrameCount;\n\n    if (pInputFrameCount == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pInputFrameCount = 0;\n\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (outputFrameCount == 0) {\n        return MA_SUCCESS;\n    }\n\n    /* Any whole input frames are consumed before the first output frame is generated. */\n    inputFrameCount = pResampler->inTimeInt;\n    outputFrameCount -= 1;\n\n    /* The rest of the output frames can be calculated in constant time. */\n    inputFrameCount += outputFrameCount * pResampler->inAdvanceInt;\n    inputFrameCount += (pResampler->inTimeFrac + (outputFrameCount * pResampler->inAdvanceFrac)) / pResampler->config.sampleRateOut;\n\n    *pInputFrameCount = inputFrameCount;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_linear_resampler_get_expected_output_frame_count(const ma_linear_resampler* pResampler, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount)\n{\n    ma_uint64 outputFrameCount;\n    ma_uint64 preliminaryInputFrameCountFromFrac;\n    ma_uint64 preliminaryInputFrameCount;\n\n    if (pOutputFrameCount == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pOutputFrameCount = 0;\n\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /*\n    The first step is to get a preliminary output frame count. This will either be exactly equal to what we need, or less by 1. We need to\n    determine how many input frames will be consumed by this value. If it's greater than our original input frame count it means we won't\n    be able to generate an extra frame because we will have run out of input data. Otherwise we will have enough input for the generation\n    of an extra output frame. This add-by-one logic is necessary due to how the data loading logic works when processing frames.\n    */\n    outputFrameCount = (inputFrameCount * pResampler->config.sampleRateOut) / pResampler->config.sampleRateIn;\n\n    /*\n    We need to determine how many *whole* input frames will have been processed to generate our preliminary output frame count. This is\n    used in the logic below to determine whether or not we need to add an extra output frame.\n    */\n    preliminaryInputFrameCountFromFrac = (pResampler->inTimeFrac + outputFrameCount*pResampler->inAdvanceFrac) / pResampler->config.sampleRateOut;\n    preliminaryInputFrameCount         = (pResampler->inTimeInt  + outputFrameCount*pResampler->inAdvanceInt ) + preliminaryInputFrameCountFromFrac;\n\n    /*\n    If the total number of *whole* input frames that would be required to generate our preliminary output frame count is greather than\n    the amount of whole input frames we have available as input we need to *not* add an extra output frame as there won't be enough data\n    to actually process. Otherwise we need to add the extra output frame.\n    */\n    if (preliminaryInputFrameCount <= inputFrameCount) {\n        outputFrameCount += 1;\n    }\n\n    *pOutputFrameCount = outputFrameCount;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_linear_resampler_reset(ma_linear_resampler* pResampler)\n{\n    ma_uint32 iChannel;\n\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Timers need to be cleared back to zero. */\n    pResampler->inTimeInt  = 1;  /* Set this to one to force an input sample to always be loaded for the first output frame. */\n    pResampler->inTimeFrac = 0;\n\n    /* Cached samples need to be cleared. */\n    if (pResampler->config.format == ma_format_f32) {\n        for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) {\n            pResampler->x0.f32[iChannel] = 0;\n            pResampler->x1.f32[iChannel] = 0;\n        }\n    } else {\n        for (iChannel = 0; iChannel < pResampler->config.channels; iChannel += 1) {\n            pResampler->x0.s16[iChannel] = 0;\n            pResampler->x1.s16[iChannel] = 0;\n        }\n    }\n\n    /* The low pass filter needs to have it's cache reset. */\n    ma_lpf_clear_cache(&pResampler->lpf);\n\n    return MA_SUCCESS;\n}\n\n\n\n/* Linear resampler backend vtable. */\nstatic ma_linear_resampler_config ma_resampling_backend_get_config__linear(const ma_resampler_config* pConfig)\n{\n    ma_linear_resampler_config linearConfig;\n\n    linearConfig = ma_linear_resampler_config_init(pConfig->format, pConfig->channels, pConfig->sampleRateIn, pConfig->sampleRateOut);\n    linearConfig.lpfOrder = pConfig->linear.lpfOrder;\n\n    return linearConfig;\n}\n\nstatic ma_result ma_resampling_backend_get_heap_size__linear(void* pUserData, const ma_resampler_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_linear_resampler_config linearConfig;\n\n    (void)pUserData;\n\n    linearConfig = ma_resampling_backend_get_config__linear(pConfig);\n\n    return ma_linear_resampler_get_heap_size(&linearConfig, pHeapSizeInBytes);\n}\n\nstatic ma_result ma_resampling_backend_init__linear(void* pUserData, const ma_resampler_config* pConfig, void* pHeap, ma_resampling_backend** ppBackend)\n{\n    ma_resampler* pResampler = (ma_resampler*)pUserData;\n    ma_result result;\n    ma_linear_resampler_config linearConfig;\n\n    (void)pUserData;\n\n    linearConfig = ma_resampling_backend_get_config__linear(pConfig);\n\n    result = ma_linear_resampler_init_preallocated(&linearConfig, pHeap, &pResampler->state.linear);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *ppBackend = &pResampler->state.linear;\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_resampling_backend_uninit__linear(void* pUserData, ma_resampling_backend* pBackend, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    (void)pUserData;\n\n    ma_linear_resampler_uninit((ma_linear_resampler*)pBackend, pAllocationCallbacks);\n}\n\nstatic ma_result ma_resampling_backend_process__linear(void* pUserData, ma_resampling_backend* pBackend, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    (void)pUserData;\n\n    return ma_linear_resampler_process_pcm_frames((ma_linear_resampler*)pBackend, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n}\n\nstatic ma_result ma_resampling_backend_set_rate__linear(void* pUserData, ma_resampling_backend* pBackend, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut)\n{\n    (void)pUserData;\n\n    return ma_linear_resampler_set_rate((ma_linear_resampler*)pBackend, sampleRateIn, sampleRateOut);\n}\n\nstatic ma_uint64 ma_resampling_backend_get_input_latency__linear(void* pUserData, const ma_resampling_backend* pBackend)\n{\n    (void)pUserData;\n\n    return ma_linear_resampler_get_input_latency((const ma_linear_resampler*)pBackend);\n}\n\nstatic ma_uint64 ma_resampling_backend_get_output_latency__linear(void* pUserData, const ma_resampling_backend* pBackend)\n{\n    (void)pUserData;\n\n    return ma_linear_resampler_get_output_latency((const ma_linear_resampler*)pBackend);\n}\n\nstatic ma_result ma_resampling_backend_get_required_input_frame_count__linear(void* pUserData, const ma_resampling_backend* pBackend, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount)\n{\n    (void)pUserData;\n\n    return ma_linear_resampler_get_required_input_frame_count((const ma_linear_resampler*)pBackend, outputFrameCount, pInputFrameCount);\n}\n\nstatic ma_result ma_resampling_backend_get_expected_output_frame_count__linear(void* pUserData, const ma_resampling_backend* pBackend, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount)\n{\n    (void)pUserData;\n\n    return ma_linear_resampler_get_expected_output_frame_count((const ma_linear_resampler*)pBackend, inputFrameCount, pOutputFrameCount);\n}\n\nstatic ma_result ma_resampling_backend_reset__linear(void* pUserData, ma_resampling_backend* pBackend)\n{\n    (void)pUserData;\n\n    return ma_linear_resampler_reset((ma_linear_resampler*)pBackend);\n}\n\nstatic ma_resampling_backend_vtable g_ma_linear_resampler_vtable =\n{\n    ma_resampling_backend_get_heap_size__linear,\n    ma_resampling_backend_init__linear,\n    ma_resampling_backend_uninit__linear,\n    ma_resampling_backend_process__linear,\n    ma_resampling_backend_set_rate__linear,\n    ma_resampling_backend_get_input_latency__linear,\n    ma_resampling_backend_get_output_latency__linear,\n    ma_resampling_backend_get_required_input_frame_count__linear,\n    ma_resampling_backend_get_expected_output_frame_count__linear,\n    ma_resampling_backend_reset__linear\n};\n\n\n\nMA_API ma_resampler_config ma_resampler_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut, ma_resample_algorithm algorithm)\n{\n    ma_resampler_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format = format;\n    config.channels = channels;\n    config.sampleRateIn = sampleRateIn;\n    config.sampleRateOut = sampleRateOut;\n    config.algorithm = algorithm;\n\n    /* Linear. */\n    config.linear.lpfOrder = ma_min(MA_DEFAULT_RESAMPLER_LPF_ORDER, MA_MAX_FILTER_ORDER);\n\n    return config;\n}\n\nstatic ma_result ma_resampler_get_vtable(const ma_resampler_config* pConfig, ma_resampler* pResampler, ma_resampling_backend_vtable** ppVTable, void** ppUserData)\n{\n    MA_ASSERT(pConfig    != NULL);\n    MA_ASSERT(ppVTable   != NULL);\n    MA_ASSERT(ppUserData != NULL);\n\n    /* Safety. */\n    *ppVTable   = NULL;\n    *ppUserData = NULL;\n\n    switch (pConfig->algorithm)\n    {\n        case ma_resample_algorithm_linear:\n        {\n            *ppVTable   = &g_ma_linear_resampler_vtable;\n            *ppUserData = pResampler;\n        } break;\n\n        case ma_resample_algorithm_custom:\n        {\n            *ppVTable   = pConfig->pBackendVTable;\n            *ppUserData = pConfig->pBackendUserData;\n        } break;\n\n        default: return MA_INVALID_ARGS;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_resampler_get_heap_size(const ma_resampler_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_resampling_backend_vtable* pVTable;\n    void* pVTableUserData;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_resampler_get_vtable(pConfig, NULL, &pVTable, &pVTableUserData);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pVTable == NULL || pVTable->onGetHeapSize == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    result = pVTable->onGetHeapSize(pVTableUserData, pConfig, pHeapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_resampler_init_preallocated(const ma_resampler_config* pConfig, void* pHeap, ma_resampler* pResampler)\n{\n    ma_result result;\n\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pResampler);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pResampler->_pHeap        = pHeap;\n    pResampler->format        = pConfig->format;\n    pResampler->channels      = pConfig->channels;\n    pResampler->sampleRateIn  = pConfig->sampleRateIn;\n    pResampler->sampleRateOut = pConfig->sampleRateOut;\n\n    result = ma_resampler_get_vtable(pConfig, pResampler, &pResampler->pBackendVTable, &pResampler->pBackendUserData);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onInit == NULL) {\n        return MA_NOT_IMPLEMENTED;  /* onInit not implemented. */\n    }\n\n    result = pResampler->pBackendVTable->onInit(pResampler->pBackendUserData, pConfig, pHeap, &pResampler->pBackend);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_resampler_init(const ma_resampler_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_resampler* pResampler)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_resampler_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_resampler_init_preallocated(pConfig, pHeap, pResampler);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pResampler->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_resampler_uninit(ma_resampler* pResampler, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pResampler == NULL) {\n        return;\n    }\n\n    if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onUninit == NULL) {\n        return;\n    }\n\n    pResampler->pBackendVTable->onUninit(pResampler->pBackendUserData, pResampler->pBackend, pAllocationCallbacks);\n\n    if (pResampler->_ownsHeap) {\n        ma_free(pResampler->_pHeap, pAllocationCallbacks);\n    }\n}\n\nMA_API ma_result ma_resampler_process_pcm_frames(ma_resampler* pResampler, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pFrameCountOut == NULL && pFrameCountIn == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onProcess == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    return pResampler->pBackendVTable->onProcess(pResampler->pBackendUserData, pResampler->pBackend, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n}\n\nMA_API ma_result ma_resampler_set_rate(ma_resampler* pResampler, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut)\n{\n    ma_result result;\n\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (sampleRateIn == 0 || sampleRateOut == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onSetRate == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    result = pResampler->pBackendVTable->onSetRate(pResampler->pBackendUserData, pResampler->pBackend, sampleRateIn, sampleRateOut);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pResampler->sampleRateIn  = sampleRateIn;\n    pResampler->sampleRateOut = sampleRateOut;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_resampler_set_rate_ratio(ma_resampler* pResampler, float ratio)\n{\n    ma_uint32 n;\n    ma_uint32 d;\n\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (ratio <= 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    d = 1000;\n    n = (ma_uint32)(ratio * d);\n\n    if (n == 0) {\n        return MA_INVALID_ARGS; /* Ratio too small. */\n    }\n\n    MA_ASSERT(n != 0);\n\n    return ma_resampler_set_rate(pResampler, n, d);\n}\n\nMA_API ma_uint64 ma_resampler_get_input_latency(const ma_resampler* pResampler)\n{\n    if (pResampler == NULL) {\n        return 0;\n    }\n\n    if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onGetInputLatency == NULL) {\n        return 0;\n    }\n\n    return pResampler->pBackendVTable->onGetInputLatency(pResampler->pBackendUserData, pResampler->pBackend);\n}\n\nMA_API ma_uint64 ma_resampler_get_output_latency(const ma_resampler* pResampler)\n{\n    if (pResampler == NULL) {\n        return 0;\n    }\n\n    if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onGetOutputLatency == NULL) {\n        return 0;\n    }\n\n    return pResampler->pBackendVTable->onGetOutputLatency(pResampler->pBackendUserData, pResampler->pBackend);\n}\n\nMA_API ma_result ma_resampler_get_required_input_frame_count(const ma_resampler* pResampler, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount)\n{\n    if (pInputFrameCount == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pInputFrameCount = 0;\n\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onGetRequiredInputFrameCount == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    return pResampler->pBackendVTable->onGetRequiredInputFrameCount(pResampler->pBackendUserData, pResampler->pBackend, outputFrameCount, pInputFrameCount);\n}\n\nMA_API ma_result ma_resampler_get_expected_output_frame_count(const ma_resampler* pResampler, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount)\n{\n    if (pOutputFrameCount == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pOutputFrameCount = 0;\n\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onGetExpectedOutputFrameCount == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    return pResampler->pBackendVTable->onGetExpectedOutputFrameCount(pResampler->pBackendUserData, pResampler->pBackend, inputFrameCount, pOutputFrameCount);\n}\n\nMA_API ma_result ma_resampler_reset(ma_resampler* pResampler)\n{\n    if (pResampler == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pResampler->pBackendVTable == NULL || pResampler->pBackendVTable->onReset == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    return pResampler->pBackendVTable->onReset(pResampler->pBackendUserData, pResampler->pBackend);\n}\n\n/**************************************************************************************************************************************************************\n\nChannel Conversion\n\n**************************************************************************************************************************************************************/\n#ifndef MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT\n#define MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT  12\n#endif\n\n#define MA_PLANE_LEFT      0\n#define MA_PLANE_RIGHT     1\n#define MA_PLANE_FRONT     2\n#define MA_PLANE_BACK      3\n#define MA_PLANE_BOTTOM    4\n#define MA_PLANE_TOP       5\n\nstatic float g_maChannelPlaneRatios[MA_CHANNEL_POSITION_COUNT][6] = {\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_NONE */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_MONO */\n    { 0.5f,  0.0f,  0.5f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_FRONT_LEFT */\n    { 0.0f,  0.5f,  0.5f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_FRONT_RIGHT */\n    { 0.0f,  0.0f,  1.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_FRONT_CENTER */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_LFE */\n    { 0.5f,  0.0f,  0.0f,  0.5f,  0.0f,  0.0f},  /* MA_CHANNEL_BACK_LEFT */\n    { 0.0f,  0.5f,  0.0f,  0.5f,  0.0f,  0.0f},  /* MA_CHANNEL_BACK_RIGHT */\n    { 0.25f, 0.0f,  0.75f, 0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_FRONT_LEFT_CENTER */\n    { 0.0f,  0.25f, 0.75f, 0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_FRONT_RIGHT_CENTER */\n    { 0.0f,  0.0f,  0.0f,  1.0f,  0.0f,  0.0f},  /* MA_CHANNEL_BACK_CENTER */\n    { 1.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_SIDE_LEFT */\n    { 0.0f,  1.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_SIDE_RIGHT */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  1.0f},  /* MA_CHANNEL_TOP_CENTER */\n    { 0.33f, 0.0f,  0.33f, 0.0f,  0.0f,  0.34f}, /* MA_CHANNEL_TOP_FRONT_LEFT */\n    { 0.0f,  0.0f,  0.5f,  0.0f,  0.0f,  0.5f},  /* MA_CHANNEL_TOP_FRONT_CENTER */\n    { 0.0f,  0.33f, 0.33f, 0.0f,  0.0f,  0.34f}, /* MA_CHANNEL_TOP_FRONT_RIGHT */\n    { 0.33f, 0.0f,  0.0f,  0.33f, 0.0f,  0.34f}, /* MA_CHANNEL_TOP_BACK_LEFT */\n    { 0.0f,  0.0f,  0.0f,  0.5f,  0.0f,  0.5f},  /* MA_CHANNEL_TOP_BACK_CENTER */\n    { 0.0f,  0.33f, 0.0f,  0.33f, 0.0f,  0.34f}, /* MA_CHANNEL_TOP_BACK_RIGHT */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_0 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_1 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_2 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_3 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_4 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_5 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_6 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_7 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_8 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_9 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_10 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_11 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_12 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_13 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_14 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_15 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_16 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_17 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_18 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_19 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_20 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_21 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_22 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_23 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_24 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_25 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_26 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_27 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_28 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_29 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_30 */\n    { 0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f},  /* MA_CHANNEL_AUX_31 */\n};\n\nstatic float ma_calculate_channel_position_rectangular_weight(ma_channel channelPositionA, ma_channel channelPositionB)\n{\n    /*\n    Imagine the following simplified example: You have a single input speaker which is the front/left speaker which you want to convert to\n    the following output configuration:\n\n     - front/left\n     - side/left\n     - back/left\n\n    The front/left output is easy - it the same speaker position so it receives the full contribution of the front/left input. The amount\n    of contribution to apply to the side/left and back/left speakers, however, is a bit more complicated.\n\n    Imagine the front/left speaker as emitting audio from two planes - the front plane and the left plane. You can think of the front/left\n    speaker emitting half of it's total volume from the front, and the other half from the left. Since part of it's volume is being emitted\n    from the left side, and the side/left and back/left channels also emit audio from the left plane, one would expect that they would\n    receive some amount of contribution from front/left speaker. The amount of contribution depends on how many planes are shared between\n    the two speakers. Note that in the examples below I've added a top/front/left speaker as an example just to show how the math works\n    across 3 spatial dimensions.\n\n    The first thing to do is figure out how each speaker's volume is spread over each of plane:\n     - front/left:     2 planes (front and left)      = 1/2 = half it's total volume on each plane\n     - side/left:      1 plane (left only)            = 1/1 = entire volume from left plane\n     - back/left:      2 planes (back and left)       = 1/2 = half it's total volume on each plane\n     - top/front/left: 3 planes (top, front and left) = 1/3 = one third it's total volume on each plane\n\n    The amount of volume each channel contributes to each of it's planes is what controls how much it is willing to given and take to other\n    channels on the same plane. The volume that is willing to the given by one channel is multiplied by the volume that is willing to be\n    taken by the other to produce the final contribution.\n    */\n\n    /* Contribution = Sum(Volume to Give * Volume to Take) */\n    float contribution =\n        g_maChannelPlaneRatios[channelPositionA][0] * g_maChannelPlaneRatios[channelPositionB][0] +\n        g_maChannelPlaneRatios[channelPositionA][1] * g_maChannelPlaneRatios[channelPositionB][1] +\n        g_maChannelPlaneRatios[channelPositionA][2] * g_maChannelPlaneRatios[channelPositionB][2] +\n        g_maChannelPlaneRatios[channelPositionA][3] * g_maChannelPlaneRatios[channelPositionB][3] +\n        g_maChannelPlaneRatios[channelPositionA][4] * g_maChannelPlaneRatios[channelPositionB][4] +\n        g_maChannelPlaneRatios[channelPositionA][5] * g_maChannelPlaneRatios[channelPositionB][5];\n\n    return contribution;\n}\n\nMA_API ma_channel_converter_config ma_channel_converter_config_init(ma_format format, ma_uint32 channelsIn, const ma_channel* pChannelMapIn, ma_uint32 channelsOut, const ma_channel* pChannelMapOut, ma_channel_mix_mode mixingMode)\n{\n    ma_channel_converter_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format         = format;\n    config.channelsIn     = channelsIn;\n    config.channelsOut    = channelsOut;\n    config.pChannelMapIn  = pChannelMapIn;\n    config.pChannelMapOut = pChannelMapOut;\n    config.mixingMode     = mixingMode;\n\n    return config;\n}\n\nstatic ma_int32 ma_channel_converter_float_to_fixed(float x)\n{\n    return (ma_int32)(x * (1<<MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT));\n}\n\nstatic ma_uint32 ma_channel_map_get_spatial_channel_count(const ma_channel* pChannelMap, ma_uint32 channels)\n{\n    ma_uint32 spatialChannelCount = 0;\n    ma_uint32 iChannel;\n\n    MA_ASSERT(pChannelMap != NULL);\n    MA_ASSERT(channels > 0);\n\n    for (iChannel = 0; iChannel < channels; ++iChannel) {\n        if (ma_is_spatial_channel_position(ma_channel_map_get_channel(pChannelMap, channels, iChannel))) {\n            spatialChannelCount++;\n        }\n    }\n\n    return spatialChannelCount;\n}\n\nstatic ma_bool32 ma_is_spatial_channel_position(ma_channel channelPosition)\n{\n    int i;\n\n    if (channelPosition == MA_CHANNEL_NONE || channelPosition == MA_CHANNEL_MONO || channelPosition == MA_CHANNEL_LFE) {\n        return MA_FALSE;\n    }\n\n    if (channelPosition >= MA_CHANNEL_AUX_0 && channelPosition <= MA_CHANNEL_AUX_31) {\n        return MA_FALSE;\n    }\n\n    for (i = 0; i < 6; ++i) {   /* Each side of a cube. */\n        if (g_maChannelPlaneRatios[channelPosition][i] != 0) {\n            return MA_TRUE;\n        }\n    }\n\n    return MA_FALSE;\n}\n\n\nstatic ma_bool32 ma_channel_map_is_passthrough(const ma_channel* pChannelMapIn, ma_uint32 channelsIn, const ma_channel* pChannelMapOut, ma_uint32 channelsOut)\n{\n    if (channelsOut == channelsIn) {\n        return ma_channel_map_is_equal(pChannelMapOut, pChannelMapIn, channelsOut);\n    } else {\n        return MA_FALSE;    /* Channel counts differ, so cannot be a passthrough. */\n    }\n}\n\nstatic ma_channel_conversion_path ma_channel_map_get_conversion_path(const ma_channel* pChannelMapIn, ma_uint32 channelsIn, const ma_channel* pChannelMapOut, ma_uint32 channelsOut, ma_channel_mix_mode mode)\n{\n    if (ma_channel_map_is_passthrough(pChannelMapIn, channelsIn, pChannelMapOut, channelsOut)) {\n        return ma_channel_conversion_path_passthrough;\n    }\n\n    if (channelsOut == 1 && (pChannelMapOut == NULL || pChannelMapOut[0] == MA_CHANNEL_MONO)) {\n        return ma_channel_conversion_path_mono_out;\n    }\n\n    if (channelsIn == 1 && (pChannelMapIn == NULL || pChannelMapIn[0] == MA_CHANNEL_MONO)) {\n        return ma_channel_conversion_path_mono_in;\n    }\n\n    if (mode == ma_channel_mix_mode_custom_weights) {\n        return ma_channel_conversion_path_weights;\n    }\n\n    /*\n    We can use a simple shuffle if both channel maps have the same channel count and all channel\n    positions are present in both.\n    */\n    if (channelsIn == channelsOut) {\n        ma_uint32 iChannelIn;\n        ma_bool32 areAllChannelPositionsPresent = MA_TRUE;\n        for (iChannelIn = 0; iChannelIn < channelsIn; ++iChannelIn) {\n            ma_bool32 isInputChannelPositionInOutput = MA_FALSE;\n            if (ma_channel_map_contains_channel_position(channelsOut, pChannelMapOut, ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn))) {\n                isInputChannelPositionInOutput = MA_TRUE;\n                break;\n            }\n\n            if (!isInputChannelPositionInOutput) {\n                areAllChannelPositionsPresent = MA_FALSE;\n                break;\n            }\n        }\n\n        if (areAllChannelPositionsPresent) {\n            return ma_channel_conversion_path_shuffle;\n        }\n    }\n\n    /* Getting here means we'll need to use weights. */\n    return ma_channel_conversion_path_weights;\n}\n\n\nstatic ma_result ma_channel_map_build_shuffle_table(const ma_channel* pChannelMapIn, ma_uint32 channelCountIn, const ma_channel* pChannelMapOut, ma_uint32 channelCountOut, ma_uint8* pShuffleTable)\n{\n    ma_uint32 iChannelIn;\n    ma_uint32 iChannelOut;\n\n    if (pShuffleTable == NULL || channelCountIn == 0 || channelCountOut == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    /*\n    When building the shuffle table we just do a 1:1 mapping based on the first occurance of a channel. If the\n    input channel has more than one occurance of a channel position, the second one will be ignored.\n    */\n    for (iChannelOut = 0; iChannelOut < channelCountOut; iChannelOut += 1) {\n        ma_channel channelOut;\n\n        /* Default to MA_CHANNEL_INDEX_NULL so that if a mapping is not found it'll be set appropriately. */\n        pShuffleTable[iChannelOut] = MA_CHANNEL_INDEX_NULL;\n\n        channelOut = ma_channel_map_get_channel(pChannelMapOut, channelCountOut, iChannelOut);\n        for (iChannelIn = 0; iChannelIn < channelCountIn; iChannelIn += 1) {\n            ma_channel channelIn;\n\n            channelIn = ma_channel_map_get_channel(pChannelMapIn, channelCountIn, iChannelIn);\n            if (channelOut == channelIn) {\n                pShuffleTable[iChannelOut] = (ma_uint8)iChannelIn;\n                break;\n            }\n\n            /*\n            Getting here means the channels don't exactly match, but we are going to support some\n            relaxed matching for practicality. If, for example, there are two stereo channel maps,\n            but one uses front left/right and the other uses side left/right, it makes logical\n            sense to just map these. The way we'll do it is we'll check if there is a logical\n            corresponding mapping, and if so, apply it, but we will *not* break from the loop,\n            thereby giving the loop a chance to find an exact match later which will take priority.\n            */\n            switch (channelOut)\n            {\n                /* Left channels. */\n                case MA_CHANNEL_FRONT_LEFT:\n                case MA_CHANNEL_SIDE_LEFT:\n                {\n                    switch (channelIn) {\n                        case MA_CHANNEL_FRONT_LEFT:\n                        case MA_CHANNEL_SIDE_LEFT:\n                        {\n                            pShuffleTable[iChannelOut] = (ma_uint8)iChannelIn;\n                        } break;\n                    }\n                } break;\n\n                /* Right channels. */\n                case MA_CHANNEL_FRONT_RIGHT:\n                case MA_CHANNEL_SIDE_RIGHT:\n                {\n                    switch (channelIn) {\n                        case MA_CHANNEL_FRONT_RIGHT:\n                        case MA_CHANNEL_SIDE_RIGHT:\n                        {\n                            pShuffleTable[iChannelOut] = (ma_uint8)iChannelIn;\n                        } break;\n                    }\n                } break;\n\n                default: break;\n            }\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic void ma_channel_map_apply_shuffle_table_u8(ma_uint8* pFramesOut, ma_uint32 channelsOut, const ma_uint8* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable)\n{\n    ma_uint64 iFrame;\n    ma_uint32 iChannelOut;\n\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n            ma_uint8 iChannelIn = pShuffleTable[iChannelOut];\n            if (iChannelIn < channelsIn) {  /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */\n                pFramesOut[iChannelOut] = pFramesIn[iChannelIn];\n            } else {\n                pFramesOut[iChannelOut] = 0;\n            }\n        }\n\n        pFramesOut += channelsOut;\n        pFramesIn  += channelsIn;\n    }\n}\n\nstatic void ma_channel_map_apply_shuffle_table_s16(ma_int16* pFramesOut, ma_uint32 channelsOut, const ma_int16* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable)\n{\n    ma_uint64 iFrame;\n    ma_uint32 iChannelOut;\n\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n            ma_uint8 iChannelIn = pShuffleTable[iChannelOut];\n            if (iChannelIn < channelsIn) {  /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */\n                pFramesOut[iChannelOut] = pFramesIn[iChannelIn];\n            } else {\n                pFramesOut[iChannelOut] = 0;\n            }\n        }\n\n        pFramesOut += channelsOut;\n        pFramesIn  += channelsIn;\n    }\n}\n\nstatic void ma_channel_map_apply_shuffle_table_s24(ma_uint8* pFramesOut, ma_uint32 channelsOut, const ma_uint8* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable)\n{\n    ma_uint64 iFrame;\n    ma_uint32 iChannelOut;\n\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n            ma_uint8 iChannelIn = pShuffleTable[iChannelOut];\n            if (iChannelIn < channelsIn) {  /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */\n                pFramesOut[iChannelOut*3 + 0] = pFramesIn[iChannelIn*3 + 0];\n                pFramesOut[iChannelOut*3 + 1] = pFramesIn[iChannelIn*3 + 1];\n                pFramesOut[iChannelOut*3 + 2] = pFramesIn[iChannelIn*3 + 2];\n            } else {\n                pFramesOut[iChannelOut*3 + 0] = 0;\n            }   pFramesOut[iChannelOut*3 + 1] = 0;\n        }       pFramesOut[iChannelOut*3 + 2] = 0;\n\n        pFramesOut += channelsOut*3;\n        pFramesIn  += channelsIn*3;\n    }\n}\n\nstatic void ma_channel_map_apply_shuffle_table_s32(ma_int32* pFramesOut, ma_uint32 channelsOut, const ma_int32* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable)\n{\n    ma_uint64 iFrame;\n    ma_uint32 iChannelOut;\n\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n            ma_uint8 iChannelIn = pShuffleTable[iChannelOut];\n            if (iChannelIn < channelsIn) {  /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */\n                pFramesOut[iChannelOut] = pFramesIn[iChannelIn];\n            } else {\n                pFramesOut[iChannelOut] = 0;\n            }\n        }\n\n        pFramesOut += channelsOut;\n        pFramesIn  += channelsIn;\n    }\n}\n\nstatic void ma_channel_map_apply_shuffle_table_f32(float* pFramesOut, ma_uint32 channelsOut, const float* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable)\n{\n    ma_uint64 iFrame;\n    ma_uint32 iChannelOut;\n\n    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n        for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n            ma_uint8 iChannelIn = pShuffleTable[iChannelOut];\n            if (iChannelIn < channelsIn) {  /* For safety, and to deal with MA_CHANNEL_INDEX_NULL. */\n                pFramesOut[iChannelOut] = pFramesIn[iChannelIn];\n            } else {\n                pFramesOut[iChannelOut] = 0;\n            }\n        }\n\n        pFramesOut += channelsOut;\n        pFramesIn  += channelsIn;\n    }\n}\n\nstatic ma_result ma_channel_map_apply_shuffle_table(void* pFramesOut, ma_uint32 channelsOut, const void* pFramesIn, ma_uint32 channelsIn, ma_uint64 frameCount, const ma_uint8* pShuffleTable, ma_format format)\n{\n    if (pFramesOut == NULL || pFramesIn == NULL || channelsOut == 0 || pShuffleTable == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    switch (format)\n    {\n        case ma_format_u8:\n        {\n            ma_channel_map_apply_shuffle_table_u8((ma_uint8*)pFramesOut, channelsOut, (const ma_uint8*)pFramesIn, channelsIn, frameCount, pShuffleTable);\n        } break;\n\n        case ma_format_s16:\n        {\n            ma_channel_map_apply_shuffle_table_s16((ma_int16*)pFramesOut, channelsOut, (const ma_int16*)pFramesIn, channelsIn, frameCount, pShuffleTable);\n        } break;\n\n        case ma_format_s24:\n        {\n            ma_channel_map_apply_shuffle_table_s24((ma_uint8*)pFramesOut, channelsOut, (const ma_uint8*)pFramesIn, channelsIn, frameCount, pShuffleTable);\n        } break;\n\n        case ma_format_s32:\n        {\n            ma_channel_map_apply_shuffle_table_s32((ma_int32*)pFramesOut, channelsOut, (const ma_int32*)pFramesIn, channelsIn, frameCount, pShuffleTable);\n        } break;\n\n        case ma_format_f32:\n        {\n            ma_channel_map_apply_shuffle_table_f32((float*)pFramesOut, channelsOut, (const float*)pFramesIn, channelsIn, frameCount, pShuffleTable);\n        } break;\n\n        default: return MA_INVALID_ARGS;    /* Unknown format. */\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_channel_map_apply_mono_out_f32(float* pFramesOut, const float* pFramesIn, const ma_channel* pChannelMapIn, ma_uint32 channelsIn, ma_uint64 frameCount)\n{\n    ma_uint64 iFrame;\n    ma_uint32 iChannelIn;\n    ma_uint32 accumulationCount;\n\n    if (pFramesOut == NULL || pFramesIn == NULL || channelsIn == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* In this case the output stream needs to be the average of all channels, ignoring NONE. */\n\n    /* A quick pre-processing step to get the accumulation counter since we're ignoring NONE channels. */\n    accumulationCount = 0;\n    for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) {\n        if (ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn) != MA_CHANNEL_NONE) {\n            accumulationCount += 1;\n        }\n    }\n\n    if (accumulationCount > 0) {    /* <-- Prevent a division by zero. */\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            float accumulation = 0;\n\n            for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) {\n                ma_channel channelIn = ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn);\n                if (channelIn != MA_CHANNEL_NONE) {\n                    accumulation += pFramesIn[iChannelIn];\n                }\n            }\n\n            pFramesOut[0] = accumulation / accumulationCount;\n            pFramesOut += 1;\n            pFramesIn  += channelsIn;\n        }\n    } else {\n        ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, 1);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_channel_map_apply_mono_in_f32(float* MA_RESTRICT pFramesOut, const ma_channel* pChannelMapOut, ma_uint32 channelsOut, const float* MA_RESTRICT pFramesIn, ma_uint64 frameCount, ma_mono_expansion_mode monoExpansionMode)\n{\n    ma_uint64 iFrame;\n    ma_uint32 iChannelOut;\n\n    if (pFramesOut == NULL || channelsOut == 0 || pFramesIn == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Note that the MA_CHANNEL_NONE channel must be ignored in all cases. */\n    switch (monoExpansionMode)\n    {\n        case ma_mono_expansion_mode_average:\n        {\n            float weight;\n            ma_uint32 validChannelCount = 0;\n\n            for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n                ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut);\n                if (channelOut != MA_CHANNEL_NONE) {\n                    validChannelCount += 1;\n                }\n            }\n\n            weight = 1.0f / validChannelCount;\n\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n                    ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut);\n                    if (channelOut != MA_CHANNEL_NONE) {\n                        pFramesOut[iChannelOut] = pFramesIn[0] * weight;\n                    }\n                }\n\n                pFramesOut += channelsOut;\n                pFramesIn  += 1;\n            }\n        } break;\n\n        case ma_mono_expansion_mode_stereo_only:\n        {\n            if (channelsOut >= 2) {\n                ma_uint32 iChannelLeft  = (ma_uint32)-1;\n                ma_uint32 iChannelRight = (ma_uint32)-1;\n\n                /*\n                We first need to find our stereo channels. We prefer front-left and front-right, but\n                if they're not available, we'll also try side-left and side-right. If neither are\n                available we'll fall through to the default case below.\n                */\n                for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n                    ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut);\n                    if (channelOut == MA_CHANNEL_SIDE_LEFT) {\n                        iChannelLeft  = iChannelOut;\n                    }\n                    if (channelOut == MA_CHANNEL_SIDE_RIGHT) {\n                        iChannelRight = iChannelOut;\n                    }\n                }\n\n                for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n                    ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut);\n                    if (channelOut == MA_CHANNEL_FRONT_LEFT) {\n                        iChannelLeft  = iChannelOut;\n                    }\n                    if (channelOut == MA_CHANNEL_FRONT_RIGHT) {\n                        iChannelRight = iChannelOut;\n                    }\n                }\n\n\n                if (iChannelLeft != (ma_uint32)-1 && iChannelRight != (ma_uint32)-1) {\n                    /* We found our stereo channels so we can duplicate the signal across those channels. */\n                    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                        for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n                            ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut);\n                            if (channelOut != MA_CHANNEL_NONE) {\n                                if (iChannelOut == iChannelLeft || iChannelOut == iChannelRight) {\n                                    pFramesOut[iChannelOut] = pFramesIn[0];\n                                } else {\n                                    pFramesOut[iChannelOut] = 0.0f;\n                                }\n                            }\n                        }\n\n                        pFramesOut += channelsOut;\n                        pFramesIn  += 1;\n                    }\n\n                    break;  /* Get out of the switch. */\n                } else {\n                    /* Fallthrough. Does not have left and right channels. */\n                    goto default_handler;\n                }\n            } else {\n                /* Fallthrough. Does not have stereo channels. */\n                goto default_handler;\n            }\n        };  /* Fallthrough. See comments above. */\n\n        case ma_mono_expansion_mode_duplicate:\n        default:\n        {\n            default_handler:\n            {\n                if (channelsOut <= MA_MAX_CHANNELS) {\n                    ma_bool32 hasEmptyChannel = MA_FALSE;\n                    ma_channel channelPositions[MA_MAX_CHANNELS];\n                    for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n                        channelPositions[iChannelOut] = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut);\n                        if (channelPositions[iChannelOut] == MA_CHANNEL_NONE) {\n                            hasEmptyChannel = MA_TRUE;\n                        }\n                    }\n\n                    if (hasEmptyChannel == MA_FALSE) {\n                        /*\n                        Faster path when there's no MA_CHANNEL_NONE channel positions. This should hopefully\n                        help the compiler with auto-vectorization.m\n                        */\n                        if (channelsOut == 2) {\n                        #if defined(MA_SUPPORT_SSE2)\n                            if (ma_has_sse2()) {\n                                /* We want to do two frames in each iteration. */\n                                ma_uint64 unrolledFrameCount = frameCount >> 1;\n\n                                for (iFrame = 0; iFrame < unrolledFrameCount; iFrame += 1) {\n                                    __m128 in0 = _mm_set1_ps(pFramesIn[iFrame*2 + 0]);\n                                    __m128 in1 = _mm_set1_ps(pFramesIn[iFrame*2 + 1]);\n                                    _mm_storeu_ps(&pFramesOut[iFrame*4 + 0], _mm_shuffle_ps(in0, in1, _MM_SHUFFLE(0, 0, 0, 0)));\n                                }\n\n                                /* Tail. */\n                                iFrame = unrolledFrameCount << 1;\n                                goto generic_on_fastpath;\n                            } else\n                        #endif\n                            {\n                                for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                                    for (iChannelOut = 0; iChannelOut < 2; iChannelOut += 1) {\n                                        pFramesOut[iFrame*2 + iChannelOut] = pFramesIn[iFrame];\n                                    }\n                                }\n                            }\n                        } else if (channelsOut == 6) {\n                        #if defined(MA_SUPPORT_SSE2)\n                            if (ma_has_sse2()) {\n                                /* We want to do two frames in each iteration so we can have a multiple of 4 samples. */\n                                ma_uint64 unrolledFrameCount = frameCount >> 1;\n\n                                for (iFrame = 0; iFrame < unrolledFrameCount; iFrame += 1) {\n                                    __m128 in0 = _mm_set1_ps(pFramesIn[iFrame*2 + 0]);\n                                    __m128 in1 = _mm_set1_ps(pFramesIn[iFrame*2 + 1]);\n\n                                    _mm_storeu_ps(&pFramesOut[iFrame*12 + 0], in0);\n                                    _mm_storeu_ps(&pFramesOut[iFrame*12 + 4], _mm_shuffle_ps(in0, in1, _MM_SHUFFLE(0, 0, 0, 0)));\n                                    _mm_storeu_ps(&pFramesOut[iFrame*12 + 8], in1);\n                                }\n\n                                /* Tail. */\n                                iFrame = unrolledFrameCount << 1;\n                                goto generic_on_fastpath;\n                            } else\n                        #endif\n                            {\n                                for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                                    for (iChannelOut = 0; iChannelOut < 6; iChannelOut += 1) {\n                                        pFramesOut[iFrame*6 + iChannelOut] = pFramesIn[iFrame];\n                                    }\n                                }\n                            }\n                        } else if (channelsOut == 8) {\n                        #if defined(MA_SUPPORT_SSE2)\n                            if (ma_has_sse2()) {\n                                for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                                    __m128 in = _mm_set1_ps(pFramesIn[iFrame]);\n                                    _mm_storeu_ps(&pFramesOut[iFrame*8 + 0], in);\n                                    _mm_storeu_ps(&pFramesOut[iFrame*8 + 4], in);\n                                }\n                            } else\n                        #endif\n                            {\n                                for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                                    for (iChannelOut = 0; iChannelOut < 8; iChannelOut += 1) {\n                                        pFramesOut[iFrame*8 + iChannelOut] = pFramesIn[iFrame];\n                                    }\n                                }\n                            }\n                        } else {\n                            iFrame = 0;\n\n                            #if defined(MA_SUPPORT_SSE2)    /* For silencing a warning with non-x86 builds. */\n                            generic_on_fastpath:\n                            #endif\n                            {\n                                for (; iFrame < frameCount; iFrame += 1) {\n                                    for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n                                        pFramesOut[iFrame*channelsOut + iChannelOut] = pFramesIn[iFrame];\n                                    }\n                                }\n                            }\n                        }\n                    } else {\n                        /* Slow path. Need to handle MA_CHANNEL_NONE. */\n                        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                            for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n                                if (channelPositions[iChannelOut] != MA_CHANNEL_NONE) {\n                                    pFramesOut[iFrame*channelsOut + iChannelOut] = pFramesIn[iFrame];\n                                }\n                            }\n                        }\n                    }\n                } else {\n                    /* Slow path. Too many channels to store on the stack. */\n                    for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                        for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n                            ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut);\n                            if (channelOut != MA_CHANNEL_NONE) {\n                                pFramesOut[iFrame*channelsOut + iChannelOut] = pFramesIn[iFrame];\n                            }\n                        }\n                    }\n                }\n            }\n        } break;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_channel_map_apply_f32(float* pFramesOut, const ma_channel* pChannelMapOut, ma_uint32 channelsOut, const float* pFramesIn, const ma_channel* pChannelMapIn, ma_uint32 channelsIn, ma_uint64 frameCount, ma_channel_mix_mode mode, ma_mono_expansion_mode monoExpansionMode)\n{\n    ma_channel_conversion_path conversionPath = ma_channel_map_get_conversion_path(pChannelMapIn, channelsIn, pChannelMapOut, channelsOut, mode);\n\n    /* Optimized Path: Passthrough */\n    if (conversionPath == ma_channel_conversion_path_passthrough) {\n        ma_copy_pcm_frames(pFramesOut, pFramesIn, frameCount, ma_format_f32, channelsOut);\n        return;\n    }\n\n    /* Special Path: Mono Output. */\n    if (conversionPath == ma_channel_conversion_path_mono_out) {\n        ma_channel_map_apply_mono_out_f32(pFramesOut, pFramesIn, pChannelMapIn, channelsIn, frameCount);\n        return;\n    }\n\n    /* Special Path: Mono Input. */\n    if (conversionPath == ma_channel_conversion_path_mono_in) {\n        ma_channel_map_apply_mono_in_f32(pFramesOut, pChannelMapOut, channelsOut, pFramesIn, frameCount, monoExpansionMode);\n        return;\n    }\n\n    /* Getting here means we aren't running on an optimized conversion path. */\n    if (channelsOut <= MA_MAX_CHANNELS) {\n        ma_result result;\n\n        if (mode == ma_channel_mix_mode_simple) {\n            ma_channel shuffleTable[MA_MAX_CHANNELS];\n\n            result = ma_channel_map_build_shuffle_table(pChannelMapIn, channelsIn, pChannelMapOut, channelsOut, shuffleTable);\n            if (result != MA_SUCCESS) {\n                return;\n            }\n\n            result = ma_channel_map_apply_shuffle_table(pFramesOut, channelsOut, pFramesIn, channelsIn, frameCount, shuffleTable, ma_format_f32);\n            if (result != MA_SUCCESS) {\n                return;\n            }\n        } else {\n            ma_uint32 iFrame;\n            ma_uint32 iChannelOut;\n            ma_uint32 iChannelIn;\n            float weights[32][32];  /* Do not use MA_MAX_CHANNELS here! */\n\n            /*\n            If we have a small enough number of channels, pre-compute the weights. Otherwise we'll just need to\n            fall back to a slower path because otherwise we'll run out of stack space.\n            */\n            if (channelsIn <= ma_countof(weights) && channelsOut <= ma_countof(weights)) {\n                /* Pre-compute weights. */\n                for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n                    ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut);\n                    for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) {\n                        ma_channel channelIn = ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn);\n                        weights[iChannelOut][iChannelIn] = ma_calculate_channel_position_rectangular_weight(channelOut, channelIn);\n                    }\n                }\n\n                iFrame = 0;\n\n                /* Experiment: Try an optimized unroll for some specific cases to see how it improves performance. RESULT: Good gains. */\n                if (channelsOut == 8) {\n                    /* Experiment 2: Expand the inner loop to see what kind of different it makes. RESULT: Small, but worthwhile gain. */\n                    if (channelsIn == 2) {\n                        for (; iFrame < frameCount; iFrame += 1) {\n                            float accumulation[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };\n\n                            accumulation[0] += pFramesIn[iFrame*2 + 0] * weights[0][0];\n                            accumulation[1] += pFramesIn[iFrame*2 + 0] * weights[1][0];\n                            accumulation[2] += pFramesIn[iFrame*2 + 0] * weights[2][0];\n                            accumulation[3] += pFramesIn[iFrame*2 + 0] * weights[3][0];\n                            accumulation[4] += pFramesIn[iFrame*2 + 0] * weights[4][0];\n                            accumulation[5] += pFramesIn[iFrame*2 + 0] * weights[5][0];\n                            accumulation[6] += pFramesIn[iFrame*2 + 0] * weights[6][0];\n                            accumulation[7] += pFramesIn[iFrame*2 + 0] * weights[7][0];\n\n                            accumulation[0] += pFramesIn[iFrame*2 + 1] * weights[0][1];\n                            accumulation[1] += pFramesIn[iFrame*2 + 1] * weights[1][1];\n                            accumulation[2] += pFramesIn[iFrame*2 + 1] * weights[2][1];\n                            accumulation[3] += pFramesIn[iFrame*2 + 1] * weights[3][1];\n                            accumulation[4] += pFramesIn[iFrame*2 + 1] * weights[4][1];\n                            accumulation[5] += pFramesIn[iFrame*2 + 1] * weights[5][1];\n                            accumulation[6] += pFramesIn[iFrame*2 + 1] * weights[6][1];\n                            accumulation[7] += pFramesIn[iFrame*2 + 1] * weights[7][1];\n\n                            pFramesOut[iFrame*8 + 0] = accumulation[0];\n                            pFramesOut[iFrame*8 + 1] = accumulation[1];\n                            pFramesOut[iFrame*8 + 2] = accumulation[2];\n                            pFramesOut[iFrame*8 + 3] = accumulation[3];\n                            pFramesOut[iFrame*8 + 4] = accumulation[4];\n                            pFramesOut[iFrame*8 + 5] = accumulation[5];\n                            pFramesOut[iFrame*8 + 6] = accumulation[6];\n                            pFramesOut[iFrame*8 + 7] = accumulation[7];\n                        }\n                    } else {\n                        /* When outputting to 8 channels, we can do everything in groups of two 4x SIMD operations. */\n                        for (; iFrame < frameCount; iFrame += 1) {\n                            float accumulation[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };\n\n                            for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) {\n                                accumulation[0] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[0][iChannelIn];\n                                accumulation[1] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[1][iChannelIn];\n                                accumulation[2] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[2][iChannelIn];\n                                accumulation[3] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[3][iChannelIn];\n                                accumulation[4] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[4][iChannelIn];\n                                accumulation[5] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[5][iChannelIn];\n                                accumulation[6] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[6][iChannelIn];\n                                accumulation[7] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[7][iChannelIn];\n                            }\n\n                            pFramesOut[iFrame*8 + 0] = accumulation[0];\n                            pFramesOut[iFrame*8 + 1] = accumulation[1];\n                            pFramesOut[iFrame*8 + 2] = accumulation[2];\n                            pFramesOut[iFrame*8 + 3] = accumulation[3];\n                            pFramesOut[iFrame*8 + 4] = accumulation[4];\n                            pFramesOut[iFrame*8 + 5] = accumulation[5];\n                            pFramesOut[iFrame*8 + 6] = accumulation[6];\n                            pFramesOut[iFrame*8 + 7] = accumulation[7];\n                        }\n                    }\n                } else if (channelsOut == 6) {\n                    /*\n                    When outputting to 6 channels we unfortunately don't have a nice multiple of 4 to do 4x SIMD operations. Instead we'll\n                    expand our weights and do two frames at a time.\n                    */\n                    for (; iFrame < frameCount; iFrame += 1) {\n                        float accumulation[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };\n\n                        for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) {\n                            accumulation[0] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[0][iChannelIn];\n                            accumulation[1] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[1][iChannelIn];\n                            accumulation[2] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[2][iChannelIn];\n                            accumulation[3] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[3][iChannelIn];\n                            accumulation[4] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[4][iChannelIn];\n                            accumulation[5] += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[5][iChannelIn];\n                        }\n\n                        pFramesOut[iFrame*6 + 0] = accumulation[0];\n                        pFramesOut[iFrame*6 + 1] = accumulation[1];\n                        pFramesOut[iFrame*6 + 2] = accumulation[2];\n                        pFramesOut[iFrame*6 + 3] = accumulation[3];\n                        pFramesOut[iFrame*6 + 4] = accumulation[4];\n                        pFramesOut[iFrame*6 + 5] = accumulation[5];\n                    }\n                }\n\n                /* Leftover frames. */\n                for (; iFrame < frameCount; iFrame += 1) {\n                    for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n                        float accumulation = 0;\n\n                        for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) {\n                            accumulation += pFramesIn[iFrame*channelsIn + iChannelIn] * weights[iChannelOut][iChannelIn];\n                        }\n\n                        pFramesOut[iFrame*channelsOut + iChannelOut] = accumulation;\n                    }\n                }\n            } else {\n                /* Cannot pre-compute weights because not enough room in stack-allocated buffer. */\n                for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                    for (iChannelOut = 0; iChannelOut < channelsOut; iChannelOut += 1) {\n                        float accumulation = 0;\n                        ma_channel channelOut = ma_channel_map_get_channel(pChannelMapOut, channelsOut, iChannelOut);\n\n                        for (iChannelIn = 0; iChannelIn < channelsIn; iChannelIn += 1) {\n                            ma_channel channelIn = ma_channel_map_get_channel(pChannelMapIn, channelsIn, iChannelIn);\n                            accumulation += pFramesIn[iFrame*channelsIn + iChannelIn] * ma_calculate_channel_position_rectangular_weight(channelOut, channelIn);\n                        }\n\n                        pFramesOut[iFrame*channelsOut + iChannelOut] = accumulation;\n                    }\n                }\n            }\n        }\n    } else {\n        /* Fall back to silence. If you hit this, what are you doing with so many channels?! */\n        ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, channelsOut);\n    }\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t channelMapInOffset;\n    size_t channelMapOutOffset;\n    size_t shuffleTableOffset;\n    size_t weightsOffset;\n} ma_channel_converter_heap_layout;\n\nstatic ma_channel_conversion_path ma_channel_converter_config_get_conversion_path(const ma_channel_converter_config* pConfig)\n{\n    return ma_channel_map_get_conversion_path(pConfig->pChannelMapIn, pConfig->channelsIn, pConfig->pChannelMapOut, pConfig->channelsOut, pConfig->mixingMode);\n}\n\nstatic ma_result ma_channel_converter_get_heap_layout(const ma_channel_converter_config* pConfig, ma_channel_converter_heap_layout* pHeapLayout)\n{\n    ma_channel_conversion_path conversionPath;\n\n    MA_ASSERT(pHeapLayout != NULL);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->channelsIn == 0 || pConfig->channelsOut == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (!ma_channel_map_is_valid(pConfig->pChannelMapIn, pConfig->channelsIn)) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (!ma_channel_map_is_valid(pConfig->pChannelMapOut, pConfig->channelsOut)) {\n        return MA_INVALID_ARGS;\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* Input channel map. Only need to allocate this if we have an input channel map (otherwise default channel map is assumed). */\n    pHeapLayout->channelMapInOffset = pHeapLayout->sizeInBytes;\n    if (pConfig->pChannelMapIn != NULL) {\n        pHeapLayout->sizeInBytes += sizeof(ma_channel) * pConfig->channelsIn;\n    }\n\n    /* Output channel map. Only need to allocate this if we have an output channel map (otherwise default channel map is assumed). */\n    pHeapLayout->channelMapOutOffset = pHeapLayout->sizeInBytes;\n    if (pConfig->pChannelMapOut != NULL) {\n        pHeapLayout->sizeInBytes += sizeof(ma_channel) * pConfig->channelsOut;\n    }\n\n    /* Alignment for the next section. */\n    pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);\n\n    /* Whether or not we use weights of a shuffle table depends on the channel map themselves and the algorithm we've chosen. */\n    conversionPath = ma_channel_converter_config_get_conversion_path(pConfig);\n\n    /* Shuffle table */\n    pHeapLayout->shuffleTableOffset = pHeapLayout->sizeInBytes;\n    if (conversionPath == ma_channel_conversion_path_shuffle) {\n        pHeapLayout->sizeInBytes += sizeof(ma_uint8) * pConfig->channelsOut;\n    }\n\n    /* Weights */\n    pHeapLayout->weightsOffset = pHeapLayout->sizeInBytes;\n    if (conversionPath == ma_channel_conversion_path_weights) {\n        pHeapLayout->sizeInBytes += sizeof(float*) * pConfig->channelsIn;\n        pHeapLayout->sizeInBytes += sizeof(float ) * pConfig->channelsIn * pConfig->channelsOut;\n    }\n\n    /* Make sure allocation size is aligned. */\n    pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_channel_converter_get_heap_size(const ma_channel_converter_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_channel_converter_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_channel_converter_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_channel_converter_init_preallocated(const ma_channel_converter_config* pConfig, void* pHeap, ma_channel_converter* pConverter)\n{\n    ma_result result;\n    ma_channel_converter_heap_layout heapLayout;\n\n    if (pConverter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pConverter);\n\n    result = ma_channel_converter_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pConverter->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pConverter->_pHeap, heapLayout.sizeInBytes);\n\n    pConverter->format      = pConfig->format;\n    pConverter->channelsIn  = pConfig->channelsIn;\n    pConverter->channelsOut = pConfig->channelsOut;\n    pConverter->mixingMode  = pConfig->mixingMode;\n\n    if (pConfig->pChannelMapIn != NULL) {\n        pConverter->pChannelMapIn = (ma_channel*)ma_offset_ptr(pHeap, heapLayout.channelMapInOffset);\n        ma_channel_map_copy_or_default(pConverter->pChannelMapIn, pConfig->channelsIn, pConfig->pChannelMapIn, pConfig->channelsIn);\n    } else {\n        pConverter->pChannelMapIn = NULL;   /* Use default channel map. */\n    }\n\n    if (pConfig->pChannelMapOut != NULL) {\n        pConverter->pChannelMapOut = (ma_channel*)ma_offset_ptr(pHeap, heapLayout.channelMapOutOffset);\n        ma_channel_map_copy_or_default(pConverter->pChannelMapOut, pConfig->channelsOut, pConfig->pChannelMapOut, pConfig->channelsOut);\n    } else {\n        pConverter->pChannelMapOut = NULL;  /* Use default channel map. */\n    }\n\n    pConverter->conversionPath = ma_channel_converter_config_get_conversion_path(pConfig);\n\n    if (pConverter->conversionPath == ma_channel_conversion_path_shuffle) {\n        pConverter->pShuffleTable = (ma_uint8*)ma_offset_ptr(pHeap, heapLayout.shuffleTableOffset);\n        ma_channel_map_build_shuffle_table(pConverter->pChannelMapIn, pConverter->channelsIn, pConverter->pChannelMapOut, pConverter->channelsOut, pConverter->pShuffleTable);\n    }\n\n    if (pConverter->conversionPath == ma_channel_conversion_path_weights) {\n        ma_uint32 iChannelIn;\n        ma_uint32 iChannelOut;\n\n        if (pConverter->format == ma_format_f32) {\n            pConverter->weights.f32 = (float**   )ma_offset_ptr(pHeap, heapLayout.weightsOffset);\n            for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; iChannelIn += 1) {\n                pConverter->weights.f32[iChannelIn] = (float*)ma_offset_ptr(pHeap, heapLayout.weightsOffset + ((sizeof(float*) * pConverter->channelsIn) + (sizeof(float) * pConverter->channelsOut * iChannelIn)));\n            }\n        } else {\n            pConverter->weights.s16 = (ma_int32**)ma_offset_ptr(pHeap, heapLayout.weightsOffset);\n            for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; iChannelIn += 1) {\n                pConverter->weights.s16[iChannelIn] = (ma_int32*)ma_offset_ptr(pHeap, heapLayout.weightsOffset + ((sizeof(ma_int32*) * pConverter->channelsIn) + (sizeof(ma_int32) * pConverter->channelsOut * iChannelIn)));\n            }\n        }\n\n        /* Silence our weights by default. */\n        for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; iChannelIn += 1) {\n            for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; iChannelOut += 1) {\n                if (pConverter->format == ma_format_f32) {\n                    pConverter->weights.f32[iChannelIn][iChannelOut] = 0.0f;\n                } else {\n                    pConverter->weights.s16[iChannelIn][iChannelOut] = 0;\n                }\n            }\n        }\n\n        /*\n        We now need to fill out our weights table. This is determined by the mixing mode.\n        */\n\n        /* In all cases we need to make sure all channels that are present in both channel maps have a 1:1 mapping. */\n        for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) {\n            ma_channel channelPosIn = ma_channel_map_get_channel(pConverter->pChannelMapIn, pConverter->channelsIn, iChannelIn);\n\n            for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) {\n                ma_channel channelPosOut = ma_channel_map_get_channel(pConverter->pChannelMapOut, pConverter->channelsOut, iChannelOut);\n\n                if (channelPosIn == channelPosOut) {\n                    float weight = 1;\n\n                    if (pConverter->format == ma_format_f32) {\n                        pConverter->weights.f32[iChannelIn][iChannelOut] = weight;\n                    } else {\n                        pConverter->weights.s16[iChannelIn][iChannelOut] = ma_channel_converter_float_to_fixed(weight);\n                    }\n                }\n            }\n        }\n\n        switch (pConverter->mixingMode)\n        {\n            case ma_channel_mix_mode_custom_weights:\n            {\n                if (pConfig->ppWeights == NULL) {\n                    return MA_INVALID_ARGS; /* Config specified a custom weights mixing mode, but no custom weights have been specified. */\n                }\n\n                for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; iChannelIn += 1) {\n                    for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; iChannelOut += 1) {\n                        float weight = pConfig->ppWeights[iChannelIn][iChannelOut];\n\n                        if (pConverter->format == ma_format_f32) {\n                            pConverter->weights.f32[iChannelIn][iChannelOut] = weight;\n                        } else {\n                            pConverter->weights.s16[iChannelIn][iChannelOut] = ma_channel_converter_float_to_fixed(weight);\n                        }\n                    }\n                }\n            } break;\n\n            case ma_channel_mix_mode_simple:\n            {\n                /*\n                In simple mode, only set weights for channels that have exactly matching types, leave the rest at\n                zero. The 1:1 mappings have already been covered before this switch statement.\n                */\n            } break;\n\n            case ma_channel_mix_mode_rectangular:\n            default:\n            {\n                /* Unmapped input channels. */\n                for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) {\n                    ma_channel channelPosIn = ma_channel_map_get_channel(pConverter->pChannelMapIn, pConverter->channelsIn, iChannelIn);\n\n                    if (ma_is_spatial_channel_position(channelPosIn)) {\n                        if (!ma_channel_map_contains_channel_position(pConverter->channelsOut, pConverter->pChannelMapOut, channelPosIn)) {\n                            for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) {\n                                ma_channel channelPosOut = ma_channel_map_get_channel(pConverter->pChannelMapOut, pConverter->channelsOut, iChannelOut);\n\n                                if (ma_is_spatial_channel_position(channelPosOut)) {\n                                    float weight = 0;\n                                    if (pConverter->mixingMode == ma_channel_mix_mode_rectangular) {\n                                        weight = ma_calculate_channel_position_rectangular_weight(channelPosIn, channelPosOut);\n                                    }\n\n                                    /* Only apply the weight if we haven't already got some contribution from the respective channels. */\n                                    if (pConverter->format == ma_format_f32) {\n                                        if (pConverter->weights.f32[iChannelIn][iChannelOut] == 0) {\n                                            pConverter->weights.f32[iChannelIn][iChannelOut] = weight;\n                                        }\n                                    } else {\n                                        if (pConverter->weights.s16[iChannelIn][iChannelOut] == 0) {\n                                            pConverter->weights.s16[iChannelIn][iChannelOut] = ma_channel_converter_float_to_fixed(weight);\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n\n                /* Unmapped output channels. */\n                for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) {\n                    ma_channel channelPosOut = ma_channel_map_get_channel(pConverter->pChannelMapOut, pConverter->channelsOut, iChannelOut);\n\n                    if (ma_is_spatial_channel_position(channelPosOut)) {\n                        if (!ma_channel_map_contains_channel_position(pConverter->channelsIn, pConverter->pChannelMapIn, channelPosOut)) {\n                            for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) {\n                                ma_channel channelPosIn = ma_channel_map_get_channel(pConverter->pChannelMapIn, pConverter->channelsIn, iChannelIn);\n\n                                if (ma_is_spatial_channel_position(channelPosIn)) {\n                                    float weight = 0;\n                                    if (pConverter->mixingMode == ma_channel_mix_mode_rectangular) {\n                                        weight = ma_calculate_channel_position_rectangular_weight(channelPosIn, channelPosOut);\n                                    }\n\n                                    /* Only apply the weight if we haven't already got some contribution from the respective channels. */\n                                    if (pConverter->format == ma_format_f32) {\n                                        if (pConverter->weights.f32[iChannelIn][iChannelOut] == 0) {\n                                            pConverter->weights.f32[iChannelIn][iChannelOut] = weight;\n                                        }\n                                    } else {\n                                        if (pConverter->weights.s16[iChannelIn][iChannelOut] == 0) {\n                                            pConverter->weights.s16[iChannelIn][iChannelOut] = ma_channel_converter_float_to_fixed(weight);\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n\n                /* If LFE is in the output channel map but was not present in the input channel map, configure its weight now */\n                if (pConfig->calculateLFEFromSpatialChannels) {\n                    if (!ma_channel_map_contains_channel_position(pConverter->channelsIn, pConverter->pChannelMapIn, MA_CHANNEL_LFE)) {\n                        ma_uint32 spatialChannelCount = ma_channel_map_get_spatial_channel_count(pConverter->pChannelMapIn, pConverter->channelsIn);\n                        ma_uint32 iChannelOutLFE;\n\n                        if (spatialChannelCount > 0 && ma_channel_map_find_channel_position(pConverter->channelsOut, pConverter->pChannelMapOut, MA_CHANNEL_LFE, &iChannelOutLFE)) {\n                            const float weightForLFE = 1.0f / spatialChannelCount;\n                            for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) {\n                                const ma_channel channelPosIn = ma_channel_map_get_channel(pConverter->pChannelMapIn, pConverter->channelsIn, iChannelIn);\n                                if (ma_is_spatial_channel_position(channelPosIn)) {\n                                    if (pConverter->format == ma_format_f32) {\n                                        if (pConverter->weights.f32[iChannelIn][iChannelOutLFE] == 0) {\n                                            pConverter->weights.f32[iChannelIn][iChannelOutLFE] = weightForLFE;\n                                        }\n                                    } else {\n                                        if (pConverter->weights.s16[iChannelIn][iChannelOutLFE] == 0) {\n                                            pConverter->weights.s16[iChannelIn][iChannelOutLFE] = ma_channel_converter_float_to_fixed(weightForLFE);\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n            } break;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_channel_converter_init(const ma_channel_converter_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_channel_converter* pConverter)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_channel_converter_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_channel_converter_init_preallocated(pConfig, pHeap, pConverter);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pConverter->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_channel_converter_uninit(ma_channel_converter* pConverter, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pConverter == NULL) {\n        return;\n    }\n\n    if (pConverter->_ownsHeap) {\n        ma_free(pConverter->_pHeap, pAllocationCallbacks);\n    }\n}\n\nstatic ma_result ma_channel_converter_process_pcm_frames__passthrough(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    MA_ASSERT(pConverter != NULL);\n    MA_ASSERT(pFramesOut != NULL);\n    MA_ASSERT(pFramesIn  != NULL);\n\n    ma_copy_memory_64(pFramesOut, pFramesIn, frameCount * ma_get_bytes_per_frame(pConverter->format, pConverter->channelsOut));\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_channel_converter_process_pcm_frames__shuffle(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    MA_ASSERT(pConverter != NULL);\n    MA_ASSERT(pFramesOut != NULL);\n    MA_ASSERT(pFramesIn  != NULL);\n    MA_ASSERT(pConverter->channelsIn == pConverter->channelsOut);\n\n    return ma_channel_map_apply_shuffle_table(pFramesOut, pConverter->channelsOut, pFramesIn, pConverter->channelsIn, frameCount, pConverter->pShuffleTable, pConverter->format);\n}\n\nstatic ma_result ma_channel_converter_process_pcm_frames__mono_in(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    ma_uint64 iFrame;\n\n    MA_ASSERT(pConverter != NULL);\n    MA_ASSERT(pFramesOut != NULL);\n    MA_ASSERT(pFramesIn  != NULL);\n    MA_ASSERT(pConverter->channelsIn == 1);\n\n    switch (pConverter->format)\n    {\n        case ma_format_u8:\n        {\n            /* */ ma_uint8* pFramesOutU8 = (      ma_uint8*)pFramesOut;\n            const ma_uint8* pFramesInU8  = (const ma_uint8*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                ma_uint32 iChannel;\n                for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) {\n                    pFramesOutU8[iFrame*pConverter->channelsOut + iChannel] = pFramesInU8[iFrame];\n                }\n            }\n        } break;\n\n        case ma_format_s16:\n        {\n            /* */ ma_int16* pFramesOutS16 = (      ma_int16*)pFramesOut;\n            const ma_int16* pFramesInS16  = (const ma_int16*)pFramesIn;\n\n            if (pConverter->channelsOut == 2) {\n                for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                    pFramesOutS16[iFrame*2 + 0] = pFramesInS16[iFrame];\n                    pFramesOutS16[iFrame*2 + 1] = pFramesInS16[iFrame];\n                }\n            } else {\n                for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                    ma_uint32 iChannel;\n                    for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) {\n                        pFramesOutS16[iFrame*pConverter->channelsOut + iChannel] = pFramesInS16[iFrame];\n                    }\n                }\n            }\n        } break;\n\n        case ma_format_s24:\n        {\n            /* */ ma_uint8* pFramesOutS24 = (      ma_uint8*)pFramesOut;\n            const ma_uint8* pFramesInS24  = (const ma_uint8*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                ma_uint32 iChannel;\n                for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) {\n                    ma_uint64 iSampleOut = iFrame*pConverter->channelsOut + iChannel;\n                    ma_uint64 iSampleIn  = iFrame;\n                    pFramesOutS24[iSampleOut*3 + 0] = pFramesInS24[iSampleIn*3 + 0];\n                    pFramesOutS24[iSampleOut*3 + 1] = pFramesInS24[iSampleIn*3 + 1];\n                    pFramesOutS24[iSampleOut*3 + 2] = pFramesInS24[iSampleIn*3 + 2];\n                }\n            }\n        } break;\n\n        case ma_format_s32:\n        {\n            /* */ ma_int32* pFramesOutS32 = (      ma_int32*)pFramesOut;\n            const ma_int32* pFramesInS32  = (const ma_int32*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                ma_uint32 iChannel;\n                for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) {\n                    pFramesOutS32[iFrame*pConverter->channelsOut + iChannel] = pFramesInS32[iFrame];\n                }\n            }\n        } break;\n\n        case ma_format_f32:\n        {\n            /* */ float* pFramesOutF32 = (      float*)pFramesOut;\n            const float* pFramesInF32  = (const float*)pFramesIn;\n\n            if (pConverter->channelsOut == 2) {\n                for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                    pFramesOutF32[iFrame*2 + 0] = pFramesInF32[iFrame];\n                    pFramesOutF32[iFrame*2 + 1] = pFramesInF32[iFrame];\n                }\n            } else {\n                for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                    ma_uint32 iChannel;\n                    for (iChannel = 0; iChannel < pConverter->channelsOut; iChannel += 1) {\n                        pFramesOutF32[iFrame*pConverter->channelsOut + iChannel] = pFramesInF32[iFrame];\n                    }\n                }\n            }\n        } break;\n\n        default: return MA_INVALID_OPERATION;   /* Unknown format. */\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_channel_converter_process_pcm_frames__mono_out(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    ma_uint64 iFrame;\n    ma_uint32 iChannel;\n\n    MA_ASSERT(pConverter != NULL);\n    MA_ASSERT(pFramesOut != NULL);\n    MA_ASSERT(pFramesIn  != NULL);\n    MA_ASSERT(pConverter->channelsOut == 1);\n\n    switch (pConverter->format)\n    {\n        case ma_format_u8:\n        {\n            /* */ ma_uint8* pFramesOutU8 = (      ma_uint8*)pFramesOut;\n            const ma_uint8* pFramesInU8  = (const ma_uint8*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                ma_int32 t = 0;\n                for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) {\n                    t += ma_pcm_sample_u8_to_s16_no_scale(pFramesInU8[iFrame*pConverter->channelsIn + iChannel]);\n                }\n\n                pFramesOutU8[iFrame] = ma_clip_u8(t / pConverter->channelsOut);\n            }\n        } break;\n\n        case ma_format_s16:\n        {\n            /* */ ma_int16* pFramesOutS16 = (      ma_int16*)pFramesOut;\n            const ma_int16* pFramesInS16  = (const ma_int16*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                ma_int32 t = 0;\n                for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) {\n                    t += pFramesInS16[iFrame*pConverter->channelsIn + iChannel];\n                }\n\n                pFramesOutS16[iFrame] = (ma_int16)(t / pConverter->channelsIn);\n            }\n        } break;\n\n        case ma_format_s24:\n        {\n            /* */ ma_uint8* pFramesOutS24 = (      ma_uint8*)pFramesOut;\n            const ma_uint8* pFramesInS24  = (const ma_uint8*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                ma_int64 t = 0;\n                for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) {\n                    t += ma_pcm_sample_s24_to_s32_no_scale(&pFramesInS24[(iFrame*pConverter->channelsIn + iChannel)*3]);\n                }\n\n                ma_pcm_sample_s32_to_s24_no_scale(t / pConverter->channelsIn, &pFramesOutS24[iFrame*3]);\n            }\n        } break;\n\n        case ma_format_s32:\n        {\n            /* */ ma_int32* pFramesOutS32 = (      ma_int32*)pFramesOut;\n            const ma_int32* pFramesInS32  = (const ma_int32*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                ma_int64 t = 0;\n                for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) {\n                    t += pFramesInS32[iFrame*pConverter->channelsIn + iChannel];\n                }\n\n                pFramesOutS32[iFrame] = (ma_int32)(t / pConverter->channelsIn);\n            }\n        } break;\n\n        case ma_format_f32:\n        {\n            /* */ float* pFramesOutF32 = (      float*)pFramesOut;\n            const float* pFramesInF32  = (const float*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; ++iFrame) {\n                float t = 0;\n                for (iChannel = 0; iChannel < pConverter->channelsIn; iChannel += 1) {\n                    t += pFramesInF32[iFrame*pConverter->channelsIn + iChannel];\n                }\n\n                pFramesOutF32[iFrame] = t / pConverter->channelsIn;\n            }\n        } break;\n\n        default: return MA_INVALID_OPERATION;   /* Unknown format. */\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_channel_converter_process_pcm_frames__weights(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    ma_uint32 iFrame;\n    ma_uint32 iChannelIn;\n    ma_uint32 iChannelOut;\n\n    MA_ASSERT(pConverter != NULL);\n    MA_ASSERT(pFramesOut != NULL);\n    MA_ASSERT(pFramesIn  != NULL);\n\n    /* This is the more complicated case. Each of the output channels is accumulated with 0 or more input channels. */\n\n    /* Clear. */\n    ma_zero_memory_64(pFramesOut, frameCount * ma_get_bytes_per_frame(pConverter->format, pConverter->channelsOut));\n\n    /* Accumulate. */\n    switch (pConverter->format)\n    {\n        case ma_format_u8:\n        {\n            /* */ ma_uint8* pFramesOutU8 = (      ma_uint8*)pFramesOut;\n            const ma_uint8* pFramesInU8  = (const ma_uint8*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) {\n                    for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) {\n                        ma_int16 u8_O = ma_pcm_sample_u8_to_s16_no_scale(pFramesOutU8[iFrame*pConverter->channelsOut + iChannelOut]);\n                        ma_int16 u8_I = ma_pcm_sample_u8_to_s16_no_scale(pFramesInU8 [iFrame*pConverter->channelsIn  + iChannelIn ]);\n                        ma_int32 s    = (ma_int32)ma_clamp(u8_O + ((u8_I * pConverter->weights.s16[iChannelIn][iChannelOut]) >> MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT), -128, 127);\n                        pFramesOutU8[iFrame*pConverter->channelsOut + iChannelOut] = ma_clip_u8((ma_int16)s);\n                    }\n                }\n            }\n        } break;\n\n        case ma_format_s16:\n        {\n            /* */ ma_int16* pFramesOutS16 = (      ma_int16*)pFramesOut;\n            const ma_int16* pFramesInS16  = (const ma_int16*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) {\n                    for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) {\n                        ma_int32 s = pFramesOutS16[iFrame*pConverter->channelsOut + iChannelOut];\n                        s += (pFramesInS16[iFrame*pConverter->channelsIn + iChannelIn] * pConverter->weights.s16[iChannelIn][iChannelOut]) >> MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT;\n\n                        pFramesOutS16[iFrame*pConverter->channelsOut + iChannelOut] = (ma_int16)ma_clamp(s, -32768, 32767);\n                    }\n                }\n            }\n        } break;\n\n        case ma_format_s24:\n        {\n            /* */ ma_uint8* pFramesOutS24 = (      ma_uint8*)pFramesOut;\n            const ma_uint8* pFramesInS24  = (const ma_uint8*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) {\n                    for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) {\n                        ma_int64 s24_O = ma_pcm_sample_s24_to_s32_no_scale(&pFramesOutS24[(iFrame*pConverter->channelsOut + iChannelOut)*3]);\n                        ma_int64 s24_I = ma_pcm_sample_s24_to_s32_no_scale(&pFramesInS24 [(iFrame*pConverter->channelsIn  + iChannelIn )*3]);\n                        ma_int64 s24   = (ma_int32)ma_clamp(s24_O + ((s24_I * pConverter->weights.s16[iChannelIn][iChannelOut]) >> MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT), -8388608, 8388607);\n                        ma_pcm_sample_s32_to_s24_no_scale(s24, &pFramesOutS24[(iFrame*pConverter->channelsOut + iChannelOut)*3]);\n                    }\n                }\n            }\n        } break;\n\n        case ma_format_s32:\n        {\n            /* */ ma_int32* pFramesOutS32 = (      ma_int32*)pFramesOut;\n            const ma_int32* pFramesInS32  = (const ma_int32*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) {\n                    for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) {\n                        ma_int64 s = pFramesOutS32[iFrame*pConverter->channelsOut + iChannelOut];\n                        s += ((ma_int64)pFramesInS32[iFrame*pConverter->channelsIn + iChannelIn] * pConverter->weights.s16[iChannelIn][iChannelOut]) >> MA_CHANNEL_CONVERTER_FIXED_POINT_SHIFT;\n\n                        pFramesOutS32[iFrame*pConverter->channelsOut + iChannelOut] = ma_clip_s32(s);\n                    }\n                }\n            }\n        } break;\n\n        case ma_format_f32:\n        {\n            /* */ float* pFramesOutF32 = (      float*)pFramesOut;\n            const float* pFramesInF32  = (const float*)pFramesIn;\n\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannelIn = 0; iChannelIn < pConverter->channelsIn; ++iChannelIn) {\n                    for (iChannelOut = 0; iChannelOut < pConverter->channelsOut; ++iChannelOut) {\n                        pFramesOutF32[iFrame*pConverter->channelsOut + iChannelOut] += pFramesInF32[iFrame*pConverter->channelsIn + iChannelIn] * pConverter->weights.f32[iChannelIn][iChannelOut];\n                    }\n                }\n            }\n        } break;\n\n        default: return MA_INVALID_OPERATION;   /* Unknown format. */\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_channel_converter_process_pcm_frames(ma_channel_converter* pConverter, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)\n{\n    if (pConverter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pFramesOut == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pFramesIn == NULL) {\n        ma_zero_memory_64(pFramesOut, frameCount * ma_get_bytes_per_frame(pConverter->format, pConverter->channelsOut));\n        return MA_SUCCESS;\n    }\n\n    switch (pConverter->conversionPath)\n    {\n        case ma_channel_conversion_path_passthrough: return ma_channel_converter_process_pcm_frames__passthrough(pConverter, pFramesOut, pFramesIn, frameCount);\n        case ma_channel_conversion_path_mono_out:    return ma_channel_converter_process_pcm_frames__mono_out(pConverter, pFramesOut, pFramesIn, frameCount);\n        case ma_channel_conversion_path_mono_in:     return ma_channel_converter_process_pcm_frames__mono_in(pConverter, pFramesOut, pFramesIn, frameCount);\n        case ma_channel_conversion_path_shuffle:     return ma_channel_converter_process_pcm_frames__shuffle(pConverter, pFramesOut, pFramesIn, frameCount);\n        case ma_channel_conversion_path_weights:\n        default:\n        {\n            return ma_channel_converter_process_pcm_frames__weights(pConverter, pFramesOut, pFramesIn, frameCount);\n        }\n    }\n}\n\nMA_API ma_result ma_channel_converter_get_input_channel_map(const ma_channel_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    if (pConverter == NULL || pChannelMap == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_channel_map_copy_or_default(pChannelMap, channelMapCap, pConverter->pChannelMapIn, pConverter->channelsIn);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_channel_converter_get_output_channel_map(const ma_channel_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    if (pConverter == NULL || pChannelMap == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_channel_map_copy_or_default(pChannelMap, channelMapCap, pConverter->pChannelMapOut, pConverter->channelsOut);\n\n    return MA_SUCCESS;\n}\n\n\n/**************************************************************************************************************************************************************\n\nData Conversion\n\n**************************************************************************************************************************************************************/\nMA_API ma_data_converter_config ma_data_converter_config_init_default(void)\n{\n    ma_data_converter_config config;\n    MA_ZERO_OBJECT(&config);\n\n    config.ditherMode = ma_dither_mode_none;\n    config.resampling.algorithm = ma_resample_algorithm_linear;\n    config.allowDynamicSampleRate = MA_FALSE; /* Disable dynamic sample rates by default because dynamic rate adjustments should be quite rare and it allows an optimization for cases when the in and out sample rates are the same. */\n\n    /* Linear resampling defaults. */\n    config.resampling.linear.lpfOrder = 1;\n\n    return config;\n}\n\nMA_API ma_data_converter_config ma_data_converter_config_init(ma_format formatIn, ma_format formatOut, ma_uint32 channelsIn, ma_uint32 channelsOut, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut)\n{\n    ma_data_converter_config config = ma_data_converter_config_init_default();\n    config.formatIn      = formatIn;\n    config.formatOut     = formatOut;\n    config.channelsIn    = channelsIn;\n    config.channelsOut   = channelsOut;\n    config.sampleRateIn  = sampleRateIn;\n    config.sampleRateOut = sampleRateOut;\n\n    return config;\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t channelConverterOffset;\n    size_t resamplerOffset;\n} ma_data_converter_heap_layout;\n\nstatic ma_bool32 ma_data_converter_config_is_resampler_required(const ma_data_converter_config* pConfig)\n{\n    MA_ASSERT(pConfig != NULL);\n\n    return pConfig->allowDynamicSampleRate || pConfig->sampleRateIn != pConfig->sampleRateOut;\n}\n\nstatic ma_format ma_data_converter_config_get_mid_format(const ma_data_converter_config* pConfig)\n{\n    MA_ASSERT(pConfig != NULL);\n\n    /*\n    We want to avoid as much data conversion as possible. The channel converter and linear\n    resampler both support s16 and f32 natively. We need to decide on the format to use for this\n    stage. We call this the mid format because it's used in the middle stage of the conversion\n    pipeline. If the output format is either s16 or f32 we use that one. If that is not the case it\n    will do the same thing for the input format. If it's neither we just use f32. If we are using a\n    custom resampling backend, we can only guarantee that f32 will be supported so we'll be forced\n    to use that if resampling is required.\n    */\n    if (ma_data_converter_config_is_resampler_required(pConfig) && pConfig->resampling.algorithm != ma_resample_algorithm_linear) {\n        return ma_format_f32;  /* <-- Force f32 since that is the only one we can guarantee will be supported by the resampler. */\n    } else {\n        /*  */ if (pConfig->formatOut == ma_format_s16 || pConfig->formatOut == ma_format_f32) {\n            return pConfig->formatOut;\n        } else if (pConfig->formatIn  == ma_format_s16 || pConfig->formatIn  == ma_format_f32) {\n            return pConfig->formatIn;\n        } else {\n            return ma_format_f32;\n        }\n    }\n}\n\nstatic ma_channel_converter_config ma_channel_converter_config_init_from_data_converter_config(const ma_data_converter_config* pConfig)\n{\n    ma_channel_converter_config channelConverterConfig;\n\n    MA_ASSERT(pConfig != NULL);\n\n    channelConverterConfig = ma_channel_converter_config_init(ma_data_converter_config_get_mid_format(pConfig), pConfig->channelsIn, pConfig->pChannelMapIn, pConfig->channelsOut, pConfig->pChannelMapOut, pConfig->channelMixMode);\n    channelConverterConfig.ppWeights = pConfig->ppChannelWeights;\n    channelConverterConfig.calculateLFEFromSpatialChannels = pConfig->calculateLFEFromSpatialChannels;\n\n    return channelConverterConfig;\n}\n\nstatic ma_resampler_config ma_resampler_config_init_from_data_converter_config(const ma_data_converter_config* pConfig)\n{\n    ma_resampler_config resamplerConfig;\n    ma_uint32 resamplerChannels;\n\n    MA_ASSERT(pConfig != NULL);\n\n    /* The resampler is the most expensive part of the conversion process, so we need to do it at the stage where the channel count is at it's lowest. */\n    if (pConfig->channelsIn < pConfig->channelsOut) {\n        resamplerChannels = pConfig->channelsIn;\n    } else {\n        resamplerChannels = pConfig->channelsOut;\n    }\n\n    resamplerConfig = ma_resampler_config_init(ma_data_converter_config_get_mid_format(pConfig), resamplerChannels, pConfig->sampleRateIn, pConfig->sampleRateOut, pConfig->resampling.algorithm);\n    resamplerConfig.linear           = pConfig->resampling.linear;\n    resamplerConfig.pBackendVTable   = pConfig->resampling.pBackendVTable;\n    resamplerConfig.pBackendUserData = pConfig->resampling.pBackendUserData;\n\n    return resamplerConfig;\n}\n\nstatic ma_result ma_data_converter_get_heap_layout(const ma_data_converter_config* pConfig, ma_data_converter_heap_layout* pHeapLayout)\n{\n    ma_result result;\n\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->channelsIn == 0 || pConfig->channelsOut == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* Channel converter. */\n    pHeapLayout->channelConverterOffset = pHeapLayout->sizeInBytes;\n    {\n        size_t heapSizeInBytes;\n        ma_channel_converter_config channelConverterConfig = ma_channel_converter_config_init_from_data_converter_config(pConfig);\n\n        result = ma_channel_converter_get_heap_size(&channelConverterConfig, &heapSizeInBytes);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pHeapLayout->sizeInBytes += heapSizeInBytes;\n    }\n\n    /* Resampler. */\n    pHeapLayout->resamplerOffset = pHeapLayout->sizeInBytes;\n    if (ma_data_converter_config_is_resampler_required(pConfig)) {\n        size_t heapSizeInBytes;\n        ma_resampler_config resamplerConfig = ma_resampler_config_init_from_data_converter_config(pConfig);\n\n        result = ma_resampler_get_heap_size(&resamplerConfig, &heapSizeInBytes);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pHeapLayout->sizeInBytes += heapSizeInBytes;\n    }\n\n    /* Make sure allocation size is aligned. */\n    pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_data_converter_get_heap_size(const ma_data_converter_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_data_converter_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_data_converter_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_data_converter_init_preallocated(const ma_data_converter_config* pConfig, void* pHeap, ma_data_converter* pConverter)\n{\n    ma_result result;\n    ma_data_converter_heap_layout heapLayout;\n    ma_format midFormat;\n    ma_bool32 isResamplingRequired;\n\n    if (pConverter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pConverter);\n\n    result = ma_data_converter_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pConverter->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n    pConverter->formatIn      = pConfig->formatIn;\n    pConverter->formatOut     = pConfig->formatOut;\n    pConverter->channelsIn    = pConfig->channelsIn;\n    pConverter->channelsOut   = pConfig->channelsOut;\n    pConverter->sampleRateIn  = pConfig->sampleRateIn;\n    pConverter->sampleRateOut = pConfig->sampleRateOut;\n    pConverter->ditherMode    = pConfig->ditherMode;\n\n    /*\n    Determine if resampling is required. We need to do this so we can determine an appropriate\n    mid format to use. If resampling is required, the mid format must be ma_format_f32 since\n    that is the only one that is guaranteed to supported by custom resampling backends.\n    */\n    isResamplingRequired = ma_data_converter_config_is_resampler_required(pConfig);\n    midFormat = ma_data_converter_config_get_mid_format(pConfig);\n\n\n    /* Channel converter. We always initialize this, but we check if it configures itself as a passthrough to determine whether or not it's needed. */\n    {\n        ma_channel_converter_config channelConverterConfig = ma_channel_converter_config_init_from_data_converter_config(pConfig);\n\n        result = ma_channel_converter_init_preallocated(&channelConverterConfig, ma_offset_ptr(pHeap, heapLayout.channelConverterOffset), &pConverter->channelConverter);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        /* If the channel converter is not a passthrough we need to enable it. Otherwise we can skip it. */\n        if (pConverter->channelConverter.conversionPath != ma_channel_conversion_path_passthrough) {\n            pConverter->hasChannelConverter = MA_TRUE;\n        }\n    }\n\n\n    /* Resampler. */\n    if (isResamplingRequired) {\n        ma_resampler_config resamplerConfig = ma_resampler_config_init_from_data_converter_config(pConfig);\n\n        result = ma_resampler_init_preallocated(&resamplerConfig, ma_offset_ptr(pHeap, heapLayout.resamplerOffset), &pConverter->resampler);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pConverter->hasResampler = MA_TRUE;\n    }\n\n\n    /* We can simplify pre- and post-format conversion if we have neither channel conversion nor resampling. */\n    if (pConverter->hasChannelConverter == MA_FALSE && pConverter->hasResampler == MA_FALSE) {\n        /* We have neither channel conversion nor resampling so we'll only need one of pre- or post-format conversion, or none if the input and output formats are the same. */\n        if (pConverter->formatIn == pConverter->formatOut) {\n            /* The formats are the same so we can just pass through. */\n            pConverter->hasPreFormatConversion  = MA_FALSE;\n            pConverter->hasPostFormatConversion = MA_FALSE;\n        } else {\n            /* The formats are different so we need to do either pre- or post-format conversion. It doesn't matter which. */\n            pConverter->hasPreFormatConversion  = MA_FALSE;\n            pConverter->hasPostFormatConversion = MA_TRUE;\n        }\n    } else {\n        /* We have a channel converter and/or resampler so we'll need channel conversion based on the mid format. */\n        if (pConverter->formatIn != midFormat) {\n            pConverter->hasPreFormatConversion  = MA_TRUE;\n        }\n        if (pConverter->formatOut != midFormat) {\n            pConverter->hasPostFormatConversion = MA_TRUE;\n        }\n    }\n\n    /* We can enable passthrough optimizations if applicable. Note that we'll only be able to do this if the sample rate is static. */\n    if (pConverter->hasPreFormatConversion  == MA_FALSE &&\n        pConverter->hasPostFormatConversion == MA_FALSE &&\n        pConverter->hasChannelConverter     == MA_FALSE &&\n        pConverter->hasResampler            == MA_FALSE) {\n        pConverter->isPassthrough = MA_TRUE;\n    }\n\n\n    /* We now need to determine our execution path. */\n    if (pConverter->isPassthrough) {\n        pConverter->executionPath = ma_data_converter_execution_path_passthrough;\n    } else {\n        if (pConverter->channelsIn < pConverter->channelsOut) {\n            /* Do resampling first, if necessary. */\n            MA_ASSERT(pConverter->hasChannelConverter == MA_TRUE);\n\n            if (pConverter->hasResampler) {\n                pConverter->executionPath = ma_data_converter_execution_path_resample_first;\n            } else {\n                pConverter->executionPath = ma_data_converter_execution_path_channels_only;\n            }\n        } else {\n            /* Do channel conversion first, if necessary. */\n            if (pConverter->hasChannelConverter) {\n                if (pConverter->hasResampler) {\n                    pConverter->executionPath = ma_data_converter_execution_path_channels_first;\n                } else {\n                    pConverter->executionPath = ma_data_converter_execution_path_channels_only;\n                }\n            } else {\n                /* Channel routing not required. */\n                if (pConverter->hasResampler) {\n                    pConverter->executionPath = ma_data_converter_execution_path_resample_only;\n                } else {\n                    pConverter->executionPath = ma_data_converter_execution_path_format_only;\n                }\n            }\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_data_converter_init(const ma_data_converter_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_converter* pConverter)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_data_converter_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_data_converter_init_preallocated(pConfig, pHeap, pConverter);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pConverter->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_data_converter_uninit(ma_data_converter* pConverter, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pConverter == NULL) {\n        return;\n    }\n\n    if (pConverter->hasResampler) {\n        ma_resampler_uninit(&pConverter->resampler, pAllocationCallbacks);\n    }\n\n    ma_channel_converter_uninit(&pConverter->channelConverter, pAllocationCallbacks);\n\n    if (pConverter->_ownsHeap) {\n        ma_free(pConverter->_pHeap, pAllocationCallbacks);\n    }\n}\n\nstatic ma_result ma_data_converter_process_pcm_frames__passthrough(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    ma_uint64 frameCountIn;\n    ma_uint64 frameCountOut;\n    ma_uint64 frameCount;\n\n    MA_ASSERT(pConverter != NULL);\n\n    frameCountIn = 0;\n    if (pFrameCountIn != NULL) {\n        frameCountIn = *pFrameCountIn;\n    }\n\n    frameCountOut = 0;\n    if (pFrameCountOut != NULL) {\n        frameCountOut = *pFrameCountOut;\n    }\n\n    frameCount = ma_min(frameCountIn, frameCountOut);\n\n    if (pFramesOut != NULL) {\n        if (pFramesIn != NULL) {\n            ma_copy_memory_64(pFramesOut, pFramesIn, frameCount * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut));\n        } else {\n            ma_zero_memory_64(pFramesOut,            frameCount * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut));\n        }\n    }\n\n    if (pFrameCountIn != NULL) {\n        *pFrameCountIn = frameCount;\n    }\n    if (pFrameCountOut != NULL) {\n        *pFrameCountOut = frameCount;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_data_converter_process_pcm_frames__format_only(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    ma_uint64 frameCountIn;\n    ma_uint64 frameCountOut;\n    ma_uint64 frameCount;\n\n    MA_ASSERT(pConverter != NULL);\n\n    frameCountIn = 0;\n    if (pFrameCountIn != NULL) {\n        frameCountIn = *pFrameCountIn;\n    }\n\n    frameCountOut = 0;\n    if (pFrameCountOut != NULL) {\n        frameCountOut = *pFrameCountOut;\n    }\n\n    frameCount = ma_min(frameCountIn, frameCountOut);\n\n    if (pFramesOut != NULL) {\n        if (pFramesIn != NULL) {\n            ma_convert_pcm_frames_format(pFramesOut, pConverter->formatOut, pFramesIn, pConverter->formatIn, frameCount, pConverter->channelsIn, pConverter->ditherMode);\n        } else {\n            ma_zero_memory_64(pFramesOut, frameCount * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut));\n        }\n    }\n\n    if (pFrameCountIn != NULL) {\n        *pFrameCountIn = frameCount;\n    }\n    if (pFrameCountOut != NULL) {\n        *pFrameCountOut = frameCount;\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_data_converter_process_pcm_frames__resample_with_format_conversion(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint64 frameCountIn;\n    ma_uint64 frameCountOut;\n    ma_uint64 framesProcessedIn;\n    ma_uint64 framesProcessedOut;\n\n    MA_ASSERT(pConverter != NULL);\n\n    frameCountIn = 0;\n    if (pFrameCountIn != NULL) {\n        frameCountIn = *pFrameCountIn;\n    }\n\n    frameCountOut = 0;\n    if (pFrameCountOut != NULL) {\n        frameCountOut = *pFrameCountOut;\n    }\n\n    framesProcessedIn  = 0;\n    framesProcessedOut = 0;\n\n    while (framesProcessedOut < frameCountOut) {\n        ma_uint8 pTempBufferOut[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n        const ma_uint32 tempBufferOutCap = sizeof(pTempBufferOut) / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels);\n        const void* pFramesInThisIteration;\n        /* */ void* pFramesOutThisIteration;\n        ma_uint64 frameCountInThisIteration;\n        ma_uint64 frameCountOutThisIteration;\n\n        if (pFramesIn != NULL) {\n            pFramesInThisIteration = ma_offset_ptr(pFramesIn, framesProcessedIn * ma_get_bytes_per_frame(pConverter->formatIn, pConverter->channelsIn));\n        } else {\n            pFramesInThisIteration = NULL;\n        }\n\n        if (pFramesOut != NULL) {\n            pFramesOutThisIteration = ma_offset_ptr(pFramesOut, framesProcessedOut * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut));\n        } else {\n            pFramesOutThisIteration = NULL;\n        }\n\n        /* Do a pre format conversion if necessary. */\n        if (pConverter->hasPreFormatConversion) {\n            ma_uint8 pTempBufferIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n            const ma_uint32 tempBufferInCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels);\n\n            frameCountInThisIteration  = (frameCountIn - framesProcessedIn);\n            if (frameCountInThisIteration > tempBufferInCap) {\n                frameCountInThisIteration = tempBufferInCap;\n            }\n\n            if (pConverter->hasPostFormatConversion) {\n               if (frameCountInThisIteration > tempBufferOutCap) {\n                   frameCountInThisIteration = tempBufferOutCap;\n               }\n            }\n\n            if (pFramesInThisIteration != NULL) {\n                ma_convert_pcm_frames_format(pTempBufferIn, pConverter->resampler.format, pFramesInThisIteration, pConverter->formatIn, frameCountInThisIteration, pConverter->channelsIn, pConverter->ditherMode);\n            } else {\n                MA_ZERO_MEMORY(pTempBufferIn, sizeof(pTempBufferIn));\n            }\n\n            frameCountOutThisIteration = (frameCountOut - framesProcessedOut);\n\n            if (pConverter->hasPostFormatConversion) {\n                /* Both input and output conversion required. Output to the temp buffer. */\n                if (frameCountOutThisIteration > tempBufferOutCap) {\n                    frameCountOutThisIteration = tempBufferOutCap;\n                }\n\n                result = ma_resampler_process_pcm_frames(&pConverter->resampler, pTempBufferIn, &frameCountInThisIteration, pTempBufferOut, &frameCountOutThisIteration);\n            } else {\n                /* Only pre-format required. Output straight to the output buffer. */\n                result = ma_resampler_process_pcm_frames(&pConverter->resampler, pTempBufferIn, &frameCountInThisIteration, pFramesOutThisIteration, &frameCountOutThisIteration);\n            }\n\n            if (result != MA_SUCCESS) {\n                break;\n            }\n        } else {\n            /* No pre-format required. Just read straight from the input buffer. */\n            MA_ASSERT(pConverter->hasPostFormatConversion == MA_TRUE);\n\n            frameCountInThisIteration  = (frameCountIn  - framesProcessedIn);\n            frameCountOutThisIteration = (frameCountOut - framesProcessedOut);\n            if (frameCountOutThisIteration > tempBufferOutCap) {\n                frameCountOutThisIteration = tempBufferOutCap;\n            }\n\n            result = ma_resampler_process_pcm_frames(&pConverter->resampler, pFramesInThisIteration, &frameCountInThisIteration, pTempBufferOut, &frameCountOutThisIteration);\n            if (result != MA_SUCCESS) {\n                break;\n            }\n        }\n\n        /* If we are doing a post format conversion we need to do that now. */\n        if (pConverter->hasPostFormatConversion) {\n            if (pFramesOutThisIteration != NULL) {\n                ma_convert_pcm_frames_format(pFramesOutThisIteration, pConverter->formatOut, pTempBufferOut, pConverter->resampler.format, frameCountOutThisIteration, pConverter->resampler.channels, pConverter->ditherMode);\n            }\n        }\n\n        framesProcessedIn  += frameCountInThisIteration;\n        framesProcessedOut += frameCountOutThisIteration;\n\n        MA_ASSERT(framesProcessedIn  <= frameCountIn);\n        MA_ASSERT(framesProcessedOut <= frameCountOut);\n\n        if (frameCountOutThisIteration == 0) {\n            break;  /* Consumed all of our input data. */\n        }\n    }\n\n    if (pFrameCountIn != NULL) {\n        *pFrameCountIn = framesProcessedIn;\n    }\n    if (pFrameCountOut != NULL) {\n        *pFrameCountOut = framesProcessedOut;\n    }\n\n    return result;\n}\n\nstatic ma_result ma_data_converter_process_pcm_frames__resample_only(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    MA_ASSERT(pConverter != NULL);\n\n    if (pConverter->hasPreFormatConversion == MA_FALSE && pConverter->hasPostFormatConversion == MA_FALSE) {\n        /* Neither pre- nor post-format required. This is simple case where only resampling is required. */\n        return ma_resampler_process_pcm_frames(&pConverter->resampler, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n    } else {\n        /* Format conversion required. */\n        return ma_data_converter_process_pcm_frames__resample_with_format_conversion(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n    }\n}\n\nstatic ma_result ma_data_converter_process_pcm_frames__channels_only(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    ma_result result;\n    ma_uint64 frameCountIn;\n    ma_uint64 frameCountOut;\n    ma_uint64 frameCount;\n\n    MA_ASSERT(pConverter != NULL);\n\n    frameCountIn = 0;\n    if (pFrameCountIn != NULL) {\n        frameCountIn = *pFrameCountIn;\n    }\n\n    frameCountOut = 0;\n    if (pFrameCountOut != NULL) {\n        frameCountOut = *pFrameCountOut;\n    }\n\n    frameCount = ma_min(frameCountIn, frameCountOut);\n\n    if (pConverter->hasPreFormatConversion == MA_FALSE && pConverter->hasPostFormatConversion == MA_FALSE) {\n        /* No format conversion required. */\n        result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pFramesOut, pFramesIn, frameCount);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    } else {\n        /* Format conversion required. */\n        ma_uint64 framesProcessed = 0;\n\n        while (framesProcessed < frameCount) {\n            ma_uint8 pTempBufferOut[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n            const ma_uint32 tempBufferOutCap = sizeof(pTempBufferOut) / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsOut);\n            const void* pFramesInThisIteration;\n            /* */ void* pFramesOutThisIteration;\n            ma_uint64 frameCountThisIteration;\n\n            if (pFramesIn != NULL) {\n                pFramesInThisIteration = ma_offset_ptr(pFramesIn, framesProcessed * ma_get_bytes_per_frame(pConverter->formatIn, pConverter->channelsIn));\n            } else {\n                pFramesInThisIteration = NULL;\n            }\n\n            if (pFramesOut != NULL) {\n                pFramesOutThisIteration = ma_offset_ptr(pFramesOut, framesProcessed * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut));\n            } else {\n                pFramesOutThisIteration = NULL;\n            }\n\n            /* Do a pre format conversion if necessary. */\n            if (pConverter->hasPreFormatConversion) {\n                ma_uint8 pTempBufferIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n                const ma_uint32 tempBufferInCap = sizeof(pTempBufferIn) / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsIn);\n\n                frameCountThisIteration = (frameCount - framesProcessed);\n                if (frameCountThisIteration > tempBufferInCap) {\n                    frameCountThisIteration = tempBufferInCap;\n                }\n\n                if (pConverter->hasPostFormatConversion) {\n                    if (frameCountThisIteration > tempBufferOutCap) {\n                        frameCountThisIteration = tempBufferOutCap;\n                    }\n                }\n\n                if (pFramesInThisIteration != NULL) {\n                    ma_convert_pcm_frames_format(pTempBufferIn, pConverter->channelConverter.format, pFramesInThisIteration, pConverter->formatIn, frameCountThisIteration, pConverter->channelsIn, pConverter->ditherMode);\n                } else {\n                    MA_ZERO_MEMORY(pTempBufferIn, sizeof(pTempBufferIn));\n                }\n\n                if (pConverter->hasPostFormatConversion) {\n                    /* Both input and output conversion required. Output to the temp buffer. */\n                    result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pTempBufferOut, pTempBufferIn, frameCountThisIteration);\n                } else {\n                    /* Only pre-format required. Output straight to the output buffer. */\n                    result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pFramesOutThisIteration, pTempBufferIn, frameCountThisIteration);\n                }\n\n                if (result != MA_SUCCESS) {\n                    break;\n                }\n            } else {\n                /* No pre-format required. Just read straight from the input buffer. */\n                MA_ASSERT(pConverter->hasPostFormatConversion == MA_TRUE);\n\n                frameCountThisIteration = (frameCount - framesProcessed);\n                if (frameCountThisIteration > tempBufferOutCap) {\n                    frameCountThisIteration = tempBufferOutCap;\n                }\n\n                result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pTempBufferOut, pFramesInThisIteration, frameCountThisIteration);\n                if (result != MA_SUCCESS) {\n                    break;\n                }\n            }\n\n            /* If we are doing a post format conversion we need to do that now. */\n            if (pConverter->hasPostFormatConversion) {\n                if (pFramesOutThisIteration != NULL) {\n                    ma_convert_pcm_frames_format(pFramesOutThisIteration, pConverter->formatOut, pTempBufferOut, pConverter->channelConverter.format, frameCountThisIteration, pConverter->channelConverter.channelsOut, pConverter->ditherMode);\n                }\n            }\n\n            framesProcessed += frameCountThisIteration;\n        }\n    }\n\n    if (pFrameCountIn != NULL) {\n        *pFrameCountIn = frameCount;\n    }\n    if (pFrameCountOut != NULL) {\n        *pFrameCountOut = frameCount;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_data_converter_process_pcm_frames__resample_first(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    ma_result result;\n    ma_uint64 frameCountIn;\n    ma_uint64 frameCountOut;\n    ma_uint64 framesProcessedIn;\n    ma_uint64 framesProcessedOut;\n    ma_uint8  pTempBufferIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];   /* In resampler format. */\n    ma_uint64 tempBufferInCap;\n    ma_uint8  pTempBufferMid[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];  /* In resampler format, channel converter input format. */\n    ma_uint64 tempBufferMidCap;\n    ma_uint8  pTempBufferOut[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];  /* In channel converter output format. */\n    ma_uint64 tempBufferOutCap;\n\n    MA_ASSERT(pConverter != NULL);\n    MA_ASSERT(pConverter->resampler.format   == pConverter->channelConverter.format);\n    MA_ASSERT(pConverter->resampler.channels == pConverter->channelConverter.channelsIn);\n    MA_ASSERT(pConverter->resampler.channels <  pConverter->channelConverter.channelsOut);\n\n    frameCountIn = 0;\n    if (pFrameCountIn != NULL) {\n        frameCountIn = *pFrameCountIn;\n    }\n\n    frameCountOut = 0;\n    if (pFrameCountOut != NULL) {\n        frameCountOut = *pFrameCountOut;\n    }\n\n    framesProcessedIn  = 0;\n    framesProcessedOut = 0;\n\n    tempBufferInCap  = sizeof(pTempBufferIn)  / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels);\n    tempBufferMidCap = sizeof(pTempBufferIn)  / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels);\n    tempBufferOutCap = sizeof(pTempBufferOut) / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsOut);\n\n    while (framesProcessedOut < frameCountOut) {\n        ma_uint64 frameCountInThisIteration;\n        ma_uint64 frameCountOutThisIteration;\n        const void* pRunningFramesIn = NULL;\n        void* pRunningFramesOut = NULL;\n        const void* pResampleBufferIn;\n        void* pChannelsBufferOut;\n\n        if (pFramesIn != NULL) {\n            pRunningFramesIn  = ma_offset_ptr(pFramesIn,  framesProcessedIn  * ma_get_bytes_per_frame(pConverter->formatIn, pConverter->channelsIn));\n        }\n        if (pFramesOut != NULL) {\n            pRunningFramesOut = ma_offset_ptr(pFramesOut, framesProcessedOut * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut));\n        }\n\n        /* Run input data through the resampler and output it to the temporary buffer. */\n        frameCountInThisIteration = (frameCountIn - framesProcessedIn);\n\n        if (pConverter->hasPreFormatConversion) {\n            if (frameCountInThisIteration > tempBufferInCap) {\n                frameCountInThisIteration = tempBufferInCap;\n            }\n        }\n\n        frameCountOutThisIteration = (frameCountOut - framesProcessedOut);\n        if (frameCountOutThisIteration > tempBufferMidCap) {\n            frameCountOutThisIteration = tempBufferMidCap;\n        }\n\n        /* We can't read more frames than can fit in the output buffer. */\n        if (pConverter->hasPostFormatConversion) {\n            if (frameCountOutThisIteration > tempBufferOutCap) {\n                frameCountOutThisIteration = tempBufferOutCap;\n            }\n        }\n\n        /* We need to ensure we don't try to process too many input frames that we run out of room in the output buffer. If this happens we'll end up glitching. */\n\n        /*\n        We need to try to predict how many input frames will be required for the resampler. If the\n        resampler can tell us, we'll use that. Otherwise we'll need to make a best guess. The further\n        off we are from this, the more wasted format conversions we'll end up doing.\n        */\n        #if 1\n        {\n            ma_uint64 requiredInputFrameCount;\n\n            result = ma_resampler_get_required_input_frame_count(&pConverter->resampler, frameCountOutThisIteration, &requiredInputFrameCount);\n            if (result != MA_SUCCESS) {\n                /* Fall back to a best guess. */\n                requiredInputFrameCount = (frameCountOutThisIteration * pConverter->resampler.sampleRateIn) / pConverter->resampler.sampleRateOut;\n            }\n\n            if (frameCountInThisIteration > requiredInputFrameCount) {\n                frameCountInThisIteration = requiredInputFrameCount;\n            }\n        }\n        #endif\n\n        if (pConverter->hasPreFormatConversion) {\n            if (pFramesIn != NULL) {\n                ma_convert_pcm_frames_format(pTempBufferIn, pConverter->resampler.format, pRunningFramesIn, pConverter->formatIn, frameCountInThisIteration, pConverter->channelsIn, pConverter->ditherMode);\n                pResampleBufferIn = pTempBufferIn;\n            } else {\n                pResampleBufferIn = NULL;\n            }\n        } else {\n            pResampleBufferIn = pRunningFramesIn;\n        }\n\n        result = ma_resampler_process_pcm_frames(&pConverter->resampler, pResampleBufferIn, &frameCountInThisIteration, pTempBufferMid, &frameCountOutThisIteration);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n\n        /*\n        The input data has been resampled so now we need to run it through the channel converter. The input data is always contained in pTempBufferMid. We only need to do\n        this part if we have an output buffer.\n        */\n        if (pFramesOut != NULL) {\n            if (pConverter->hasPostFormatConversion) {\n                pChannelsBufferOut = pTempBufferOut;\n            } else {\n                pChannelsBufferOut = pRunningFramesOut;\n            }\n\n            result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pChannelsBufferOut, pTempBufferMid, frameCountOutThisIteration);\n            if (result != MA_SUCCESS) {\n                return result;\n            }\n\n            /* Finally we do post format conversion. */\n            if (pConverter->hasPostFormatConversion) {\n                ma_convert_pcm_frames_format(pRunningFramesOut, pConverter->formatOut, pChannelsBufferOut, pConverter->channelConverter.format, frameCountOutThisIteration, pConverter->channelConverter.channelsOut, pConverter->ditherMode);\n            }\n        }\n\n\n        framesProcessedIn  += frameCountInThisIteration;\n        framesProcessedOut += frameCountOutThisIteration;\n\n        MA_ASSERT(framesProcessedIn  <= frameCountIn);\n        MA_ASSERT(framesProcessedOut <= frameCountOut);\n\n        if (frameCountOutThisIteration == 0) {\n            break;  /* Consumed all of our input data. */\n        }\n    }\n\n    if (pFrameCountIn != NULL) {\n        *pFrameCountIn = framesProcessedIn;\n    }\n    if (pFrameCountOut != NULL) {\n        *pFrameCountOut = framesProcessedOut;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_data_converter_process_pcm_frames__channels_first(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    ma_result result;\n    ma_uint64 frameCountIn;\n    ma_uint64 frameCountOut;\n    ma_uint64 framesProcessedIn;\n    ma_uint64 framesProcessedOut;\n    ma_uint8  pTempBufferIn[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];   /* In resampler format. */\n    ma_uint64 tempBufferInCap;\n    ma_uint8  pTempBufferMid[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];  /* In resampler format, channel converter input format. */\n    ma_uint64 tempBufferMidCap;\n    ma_uint8  pTempBufferOut[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];  /* In channel converter output format. */\n    ma_uint64 tempBufferOutCap;\n\n    MA_ASSERT(pConverter != NULL);\n    MA_ASSERT(pConverter->resampler.format   == pConverter->channelConverter.format);\n    MA_ASSERT(pConverter->resampler.channels == pConverter->channelConverter.channelsOut);\n    MA_ASSERT(pConverter->resampler.channels <= pConverter->channelConverter.channelsIn);\n\n    frameCountIn = 0;\n    if (pFrameCountIn != NULL) {\n        frameCountIn = *pFrameCountIn;\n    }\n\n    frameCountOut = 0;\n    if (pFrameCountOut != NULL) {\n        frameCountOut = *pFrameCountOut;\n    }\n\n    framesProcessedIn  = 0;\n    framesProcessedOut = 0;\n\n    tempBufferInCap  = sizeof(pTempBufferIn)  / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsIn);\n    tempBufferMidCap = sizeof(pTempBufferIn)  / ma_get_bytes_per_frame(pConverter->channelConverter.format, pConverter->channelConverter.channelsOut);\n    tempBufferOutCap = sizeof(pTempBufferOut) / ma_get_bytes_per_frame(pConverter->resampler.format, pConverter->resampler.channels);\n\n    while (framesProcessedOut < frameCountOut) {\n        ma_uint64 frameCountInThisIteration;\n        ma_uint64 frameCountOutThisIteration;\n        const void* pRunningFramesIn = NULL;\n        void* pRunningFramesOut = NULL;\n        const void* pChannelsBufferIn;\n        void* pResampleBufferOut;\n\n        if (pFramesIn != NULL) {\n            pRunningFramesIn  = ma_offset_ptr(pFramesIn,  framesProcessedIn  * ma_get_bytes_per_frame(pConverter->formatIn, pConverter->channelsIn));\n        }\n        if (pFramesOut != NULL) {\n            pRunningFramesOut = ma_offset_ptr(pFramesOut, framesProcessedOut * ma_get_bytes_per_frame(pConverter->formatOut, pConverter->channelsOut));\n        }\n\n        /*\n        Before doing any processing we need to determine how many frames we should try processing\n        this iteration, for both input and output. The resampler requires us to perform format and\n        channel conversion before passing any data into it. If we get our input count wrong, we'll\n        end up peforming redundant pre-processing. This isn't the end of the world, but it does\n        result in some inefficiencies proportionate to how far our estimates are off.\n\n        If the resampler has a means to calculate exactly how much we'll need, we'll use that.\n        Otherwise we'll make a best guess. In order to do this, we'll need to calculate the output\n        frame count first.\n        */\n        frameCountOutThisIteration = (frameCountOut - framesProcessedOut);\n        if (frameCountOutThisIteration > tempBufferMidCap) {\n            frameCountOutThisIteration = tempBufferMidCap;\n        }\n\n        if (pConverter->hasPostFormatConversion) {\n            if (frameCountOutThisIteration > tempBufferOutCap) {\n                frameCountOutThisIteration = tempBufferOutCap;\n            }\n        }\n\n        /* Now that we have the output frame count we can determine the input frame count. */\n        frameCountInThisIteration = (frameCountIn - framesProcessedIn);\n        if (pConverter->hasPreFormatConversion) {\n            if (frameCountInThisIteration > tempBufferInCap) {\n                frameCountInThisIteration = tempBufferInCap;\n            }\n        }\n\n        if (frameCountInThisIteration > tempBufferMidCap) {\n            frameCountInThisIteration = tempBufferMidCap;\n        }\n\n        #if 1\n        {\n            ma_uint64 requiredInputFrameCount;\n\n            result = ma_resampler_get_required_input_frame_count(&pConverter->resampler, frameCountOutThisIteration, &requiredInputFrameCount);\n            if (result != MA_SUCCESS) {\n                /* Fall back to a best guess. */\n                requiredInputFrameCount = (frameCountOutThisIteration * pConverter->resampler.sampleRateIn) / pConverter->resampler.sampleRateOut;\n            }\n\n            if (frameCountInThisIteration > requiredInputFrameCount) {\n                frameCountInThisIteration = requiredInputFrameCount;\n            }\n        }\n        #endif\n\n\n        /* Pre format conversion. */\n        if (pConverter->hasPreFormatConversion) {\n            if (pRunningFramesIn != NULL) {\n                ma_convert_pcm_frames_format(pTempBufferIn, pConverter->channelConverter.format, pRunningFramesIn, pConverter->formatIn, frameCountInThisIteration, pConverter->channelsIn, pConverter->ditherMode);\n                pChannelsBufferIn = pTempBufferIn;\n            } else {\n                pChannelsBufferIn = NULL;\n            }\n        } else {\n            pChannelsBufferIn = pRunningFramesIn;\n        }\n\n\n        /* Channel conversion. */\n        result = ma_channel_converter_process_pcm_frames(&pConverter->channelConverter, pTempBufferMid, pChannelsBufferIn, frameCountInThisIteration);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n\n        /* Resampling. */\n        if (pConverter->hasPostFormatConversion) {\n            pResampleBufferOut = pTempBufferOut;\n        } else {\n            pResampleBufferOut = pRunningFramesOut;\n        }\n\n        result = ma_resampler_process_pcm_frames(&pConverter->resampler, pTempBufferMid, &frameCountInThisIteration, pResampleBufferOut, &frameCountOutThisIteration);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n\n        /* Post format conversion. */\n        if (pConverter->hasPostFormatConversion) {\n            if (pRunningFramesOut != NULL) {\n                ma_convert_pcm_frames_format(pRunningFramesOut, pConverter->formatOut, pResampleBufferOut, pConverter->resampler.format, frameCountOutThisIteration, pConverter->channelsOut, pConverter->ditherMode);\n            }\n        }\n\n\n        framesProcessedIn  += frameCountInThisIteration;\n        framesProcessedOut += frameCountOutThisIteration;\n\n        MA_ASSERT(framesProcessedIn  <= frameCountIn);\n        MA_ASSERT(framesProcessedOut <= frameCountOut);\n\n        if (frameCountOutThisIteration == 0) {\n            break;  /* Consumed all of our input data. */\n        }\n    }\n\n    if (pFrameCountIn != NULL) {\n        *pFrameCountIn = framesProcessedIn;\n    }\n    if (pFrameCountOut != NULL) {\n        *pFrameCountOut = framesProcessedOut;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_data_converter_process_pcm_frames(ma_data_converter* pConverter, const void* pFramesIn, ma_uint64* pFrameCountIn, void* pFramesOut, ma_uint64* pFrameCountOut)\n{\n    if (pConverter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    switch (pConverter->executionPath)\n    {\n        case ma_data_converter_execution_path_passthrough:    return ma_data_converter_process_pcm_frames__passthrough(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n        case ma_data_converter_execution_path_format_only:    return ma_data_converter_process_pcm_frames__format_only(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n        case ma_data_converter_execution_path_channels_only:  return ma_data_converter_process_pcm_frames__channels_only(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n        case ma_data_converter_execution_path_resample_only:  return ma_data_converter_process_pcm_frames__resample_only(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n        case ma_data_converter_execution_path_resample_first: return ma_data_converter_process_pcm_frames__resample_first(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n        case ma_data_converter_execution_path_channels_first: return ma_data_converter_process_pcm_frames__channels_first(pConverter, pFramesIn, pFrameCountIn, pFramesOut, pFrameCountOut);\n        default: return MA_INVALID_OPERATION;   /* Should never hit this. */\n    }\n}\n\nMA_API ma_result ma_data_converter_set_rate(ma_data_converter* pConverter, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut)\n{\n    if (pConverter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConverter->hasResampler == MA_FALSE) {\n        return MA_INVALID_OPERATION;    /* Dynamic resampling not enabled. */\n    }\n\n    return ma_resampler_set_rate(&pConverter->resampler, sampleRateIn, sampleRateOut);\n}\n\nMA_API ma_result ma_data_converter_set_rate_ratio(ma_data_converter* pConverter, float ratioInOut)\n{\n    if (pConverter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConverter->hasResampler == MA_FALSE) {\n        return MA_INVALID_OPERATION;    /* Dynamic resampling not enabled. */\n    }\n\n    return ma_resampler_set_rate_ratio(&pConverter->resampler, ratioInOut);\n}\n\nMA_API ma_uint64 ma_data_converter_get_input_latency(const ma_data_converter* pConverter)\n{\n    if (pConverter == NULL) {\n        return 0;\n    }\n\n    if (pConverter->hasResampler) {\n        return ma_resampler_get_input_latency(&pConverter->resampler);\n    }\n\n    return 0;   /* No latency without a resampler. */\n}\n\nMA_API ma_uint64 ma_data_converter_get_output_latency(const ma_data_converter* pConverter)\n{\n    if (pConverter == NULL) {\n        return 0;\n    }\n\n    if (pConverter->hasResampler) {\n        return ma_resampler_get_output_latency(&pConverter->resampler);\n    }\n\n    return 0;   /* No latency without a resampler. */\n}\n\nMA_API ma_result ma_data_converter_get_required_input_frame_count(const ma_data_converter* pConverter, ma_uint64 outputFrameCount, ma_uint64* pInputFrameCount)\n{\n    if (pInputFrameCount == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pInputFrameCount = 0;\n\n    if (pConverter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConverter->hasResampler) {\n        return ma_resampler_get_required_input_frame_count(&pConverter->resampler, outputFrameCount, pInputFrameCount);\n    } else {\n        *pInputFrameCount = outputFrameCount;   /* 1:1 */\n        return MA_SUCCESS;\n    }\n}\n\nMA_API ma_result ma_data_converter_get_expected_output_frame_count(const ma_data_converter* pConverter, ma_uint64 inputFrameCount, ma_uint64* pOutputFrameCount)\n{\n    if (pOutputFrameCount == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pOutputFrameCount = 0;\n\n    if (pConverter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConverter->hasResampler) {\n        return ma_resampler_get_expected_output_frame_count(&pConverter->resampler, inputFrameCount, pOutputFrameCount);\n    } else {\n        *pOutputFrameCount = inputFrameCount;   /* 1:1 */\n        return MA_SUCCESS;\n    }\n}\n\nMA_API ma_result ma_data_converter_get_input_channel_map(const ma_data_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    if (pConverter == NULL || pChannelMap == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConverter->hasChannelConverter) {\n        ma_channel_converter_get_output_channel_map(&pConverter->channelConverter, pChannelMap, channelMapCap);\n    } else {\n        ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pConverter->channelsOut);\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_data_converter_get_output_channel_map(const ma_data_converter* pConverter, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    if (pConverter == NULL || pChannelMap == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConverter->hasChannelConverter) {\n        ma_channel_converter_get_input_channel_map(&pConverter->channelConverter, pChannelMap, channelMapCap);\n    } else {\n        ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pConverter->channelsIn);\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_data_converter_reset(ma_data_converter* pConverter)\n{\n    if (pConverter == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* There's nothing to do if we're not resampling. */\n    if (pConverter->hasResampler == MA_FALSE) {\n        return MA_SUCCESS;\n    }\n\n    return ma_resampler_reset(&pConverter->resampler);\n}\n\n\n\n/**************************************************************************************************************************************************************\n\nChannel Maps\n\n**************************************************************************************************************************************************************/\nstatic ma_channel ma_channel_map_init_standard_channel(ma_standard_channel_map standardChannelMap, ma_uint32 channelCount, ma_uint32 channelIndex);\n\nMA_API ma_channel ma_channel_map_get_channel(const ma_channel* pChannelMap, ma_uint32 channelCount, ma_uint32 channelIndex)\n{\n    if (pChannelMap == NULL) {\n        return ma_channel_map_init_standard_channel(ma_standard_channel_map_default, channelCount, channelIndex);\n    } else {\n        if (channelIndex >= channelCount) {\n            return MA_CHANNEL_NONE;\n        }\n\n        return pChannelMap[channelIndex];\n    }\n}\n\nMA_API void ma_channel_map_init_blank(ma_channel* pChannelMap, ma_uint32 channels)\n{\n    if (pChannelMap == NULL) {\n        return;\n    }\n\n    MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channels);\n}\n\n\nstatic ma_channel ma_channel_map_init_standard_channel_microsoft(ma_uint32 channelCount, ma_uint32 channelIndex)\n{\n    if (channelCount == 0 || channelIndex >= channelCount) {\n        return MA_CHANNEL_NONE;\n    }\n\n    /* This is the Microsoft channel map. Based off the speaker configurations mentioned here: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ksmedia/ns-ksmedia-ksaudio_channel_config */\n    switch (channelCount)\n    {\n        case 0: return MA_CHANNEL_NONE;\n\n        case 1:\n        {\n            return MA_CHANNEL_MONO;\n        } break;\n\n        case 2:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n            }\n        } break;\n\n        case 3: /* No defined, but best guess. */\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n            }\n        } break;\n\n        case 4:\n        {\n            switch (channelIndex) {\n            #ifndef MA_USE_QUAD_MICROSOFT_CHANNEL_MAP\n                /* Surround. Using the Surround profile has the advantage of the 3rd channel (MA_CHANNEL_FRONT_CENTER) mapping nicely with higher channel counts. */\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n                case 3: return MA_CHANNEL_BACK_CENTER;\n            #else\n                /* Quad. */\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_BACK_LEFT;\n                case 3: return MA_CHANNEL_BACK_RIGHT;\n            #endif\n            }\n        } break;\n\n        case 5: /* Not defined, but best guess. */\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n                case 3: return MA_CHANNEL_BACK_LEFT;\n                case 4: return MA_CHANNEL_BACK_RIGHT;\n            }\n        } break;\n\n        case 6:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n                case 3: return MA_CHANNEL_LFE;\n                case 4: return MA_CHANNEL_SIDE_LEFT;\n                case 5: return MA_CHANNEL_SIDE_RIGHT;\n            }\n        } break;\n\n        case 7: /* Not defined, but best guess. */\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n                case 3: return MA_CHANNEL_LFE;\n                case 4: return MA_CHANNEL_BACK_CENTER;\n                case 5: return MA_CHANNEL_SIDE_LEFT;\n                case 6: return MA_CHANNEL_SIDE_RIGHT;\n            }\n        } break;\n\n        case 8:\n        default:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n                case 3: return MA_CHANNEL_LFE;\n                case 4: return MA_CHANNEL_BACK_LEFT;\n                case 5: return MA_CHANNEL_BACK_RIGHT;\n                case 6: return MA_CHANNEL_SIDE_LEFT;\n                case 7: return MA_CHANNEL_SIDE_RIGHT;\n            }\n        } break;\n    }\n\n    if (channelCount > 8) {\n        if (channelIndex < 32) {    /* We have 32 AUX channels. */\n            return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8));\n        }\n    }\n\n    /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */\n    return MA_CHANNEL_NONE;\n}\n\nstatic ma_channel ma_channel_map_init_standard_channel_alsa(ma_uint32 channelCount, ma_uint32 channelIndex)\n{\n    switch (channelCount)\n    {\n        case 0: return MA_CHANNEL_NONE;\n\n        case 1:\n        {\n            return MA_CHANNEL_MONO;\n        } break;\n\n        case 2:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n            }\n        } break;\n\n        case 3:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n            }\n        } break;\n\n        case 4:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_BACK_LEFT;\n                case 3: return MA_CHANNEL_BACK_RIGHT;\n            }\n        } break;\n\n        case 5:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_BACK_LEFT;\n                case 3: return MA_CHANNEL_BACK_RIGHT;\n                case 4: return MA_CHANNEL_FRONT_CENTER;\n            }\n        } break;\n\n        case 6:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_BACK_LEFT;\n                case 3: return MA_CHANNEL_BACK_RIGHT;\n                case 4: return MA_CHANNEL_FRONT_CENTER;\n                case 5: return MA_CHANNEL_LFE;\n            }\n        } break;\n\n        case 7:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_BACK_LEFT;\n                case 3: return MA_CHANNEL_BACK_RIGHT;\n                case 4: return MA_CHANNEL_FRONT_CENTER;\n                case 5: return MA_CHANNEL_LFE;\n                case 6: return MA_CHANNEL_BACK_CENTER;\n            }\n        } break;\n\n        case 8:\n        default:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_BACK_LEFT;\n                case 3: return MA_CHANNEL_BACK_RIGHT;\n                case 4: return MA_CHANNEL_FRONT_CENTER;\n                case 5: return MA_CHANNEL_LFE;\n                case 6: return MA_CHANNEL_SIDE_LEFT;\n                case 7: return MA_CHANNEL_SIDE_RIGHT;\n            }\n        } break;\n    }\n\n    if (channelCount > 8) {\n        if (channelIndex < 32) {    /* We have 32 AUX channels. */\n            return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8));\n        }\n    }\n\n    /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */\n    return MA_CHANNEL_NONE;\n}\n\nstatic ma_channel ma_channel_map_init_standard_channel_rfc3551(ma_uint32 channelCount, ma_uint32 channelIndex)\n{\n    switch (channelCount)\n    {\n        case 0: return MA_CHANNEL_NONE;\n\n        case 1:\n        {\n            return MA_CHANNEL_MONO;\n        } break;\n\n        case 2:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n            }\n        } break;\n\n        case 3:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n            }\n        } break;\n\n        case 4:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 3: return MA_CHANNEL_BACK_CENTER;\n            }\n        } break;\n\n        case 5:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n                case 3: return MA_CHANNEL_BACK_LEFT;\n                case 4: return MA_CHANNEL_BACK_RIGHT;\n            }\n        } break;\n\n        case 6:\n        default:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_SIDE_LEFT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n                case 3: return MA_CHANNEL_FRONT_RIGHT;\n                case 4: return MA_CHANNEL_SIDE_RIGHT;\n                case 5: return MA_CHANNEL_BACK_CENTER;\n            }\n        } break;\n    }\n\n    if (channelCount > 6) {\n        if (channelIndex < 32) {    /* We have 32 AUX channels. */\n            return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 6));\n        }\n    }\n\n    /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */\n    return MA_CHANNEL_NONE;\n}\n\nstatic ma_channel ma_channel_map_init_standard_channel_flac(ma_uint32 channelCount, ma_uint32 channelIndex)\n{\n    switch (channelCount)\n    {\n        case 0: return MA_CHANNEL_NONE;\n\n        case 1:\n        {\n            return MA_CHANNEL_MONO;\n        } break;\n\n        case 2:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n            }\n        } break;\n\n        case 3:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n            }\n        } break;\n\n        case 4:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_BACK_LEFT;\n                case 3: return MA_CHANNEL_BACK_RIGHT;\n            }\n        } break;\n\n        case 5:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n                case 3: return MA_CHANNEL_BACK_LEFT;\n                case 4: return MA_CHANNEL_BACK_RIGHT;\n            }\n        } break;\n\n        case 6:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n                case 3: return MA_CHANNEL_LFE;\n                case 4: return MA_CHANNEL_BACK_LEFT;\n                case 5: return MA_CHANNEL_BACK_RIGHT;\n            }\n        } break;\n\n        case 7:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n                case 3: return MA_CHANNEL_LFE;\n                case 4: return MA_CHANNEL_BACK_CENTER;\n                case 5: return MA_CHANNEL_SIDE_LEFT;\n                case 6: return MA_CHANNEL_SIDE_RIGHT;\n            }\n        } break;\n\n        case 8:\n        default:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n                case 3: return MA_CHANNEL_LFE;\n                case 4: return MA_CHANNEL_BACK_LEFT;\n                case 5: return MA_CHANNEL_BACK_RIGHT;\n                case 6: return MA_CHANNEL_SIDE_LEFT;\n                case 7: return MA_CHANNEL_SIDE_RIGHT;\n            }\n        } break;\n    }\n\n    if (channelCount > 8) {\n        if (channelIndex < 32) {    /* We have 32 AUX channels. */\n            return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8));\n        }\n    }\n\n    /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */\n    return MA_CHANNEL_NONE;\n}\n\nstatic ma_channel ma_channel_map_init_standard_channel_vorbis(ma_uint32 channelCount, ma_uint32 channelIndex)\n{\n    switch (channelCount)\n    {\n        case 0: return MA_CHANNEL_NONE;\n\n        case 1:\n        {\n            return MA_CHANNEL_MONO;\n        } break;\n\n        case 2:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n            }\n        } break;\n\n        case 3:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_CENTER;\n                case 2: return MA_CHANNEL_FRONT_RIGHT;\n            }\n        } break;\n\n        case 4:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_BACK_LEFT;\n                case 3: return MA_CHANNEL_BACK_RIGHT;\n            }\n        } break;\n\n        case 5:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_CENTER;\n                case 2: return MA_CHANNEL_FRONT_RIGHT;\n                case 3: return MA_CHANNEL_BACK_LEFT;\n                case 4: return MA_CHANNEL_BACK_RIGHT;\n            }\n        } break;\n\n        case 6:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_CENTER;\n                case 2: return MA_CHANNEL_FRONT_RIGHT;\n                case 3: return MA_CHANNEL_BACK_LEFT;\n                case 4: return MA_CHANNEL_BACK_RIGHT;\n                case 5: return MA_CHANNEL_LFE;\n            }\n        } break;\n\n        case 7:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_CENTER;\n                case 2: return MA_CHANNEL_FRONT_RIGHT;\n                case 3: return MA_CHANNEL_SIDE_LEFT;\n                case 4: return MA_CHANNEL_SIDE_RIGHT;\n                case 5: return MA_CHANNEL_BACK_CENTER;\n                case 6: return MA_CHANNEL_LFE;\n            }\n        } break;\n\n        case 8:\n        default:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_CENTER;\n                case 2: return MA_CHANNEL_FRONT_RIGHT;\n                case 3: return MA_CHANNEL_SIDE_LEFT;\n                case 4: return MA_CHANNEL_SIDE_RIGHT;\n                case 5: return MA_CHANNEL_BACK_LEFT;\n                case 6: return MA_CHANNEL_BACK_RIGHT;\n                case 7: return MA_CHANNEL_LFE;\n            }\n        } break;\n    }\n\n    if (channelCount > 8) {\n        if (channelIndex < 32) {    /* We have 32 AUX channels. */\n            return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8));\n        }\n    }\n\n    /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */\n    return MA_CHANNEL_NONE;\n}\n\nstatic ma_channel ma_channel_map_init_standard_channel_sound4(ma_uint32 channelCount, ma_uint32 channelIndex)\n{\n    switch (channelCount)\n    {\n        case 0: return MA_CHANNEL_NONE;\n\n        case 1:\n        {\n            return MA_CHANNEL_MONO;\n        } break;\n\n        case 2:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n            }\n        } break;\n\n        case 3:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n            }\n        } break;\n\n        case 4:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_BACK_LEFT;\n                case 3: return MA_CHANNEL_BACK_RIGHT;\n            }\n        } break;\n\n        case 5:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n                case 3: return MA_CHANNEL_BACK_LEFT;\n                case 4: return MA_CHANNEL_BACK_RIGHT;\n            }\n        } break;\n\n        case 6:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_CENTER;\n                case 2: return MA_CHANNEL_FRONT_RIGHT;\n                case 3: return MA_CHANNEL_BACK_LEFT;\n                case 4: return MA_CHANNEL_BACK_RIGHT;\n                case 5: return MA_CHANNEL_LFE;\n            }\n        } break;\n\n        case 7:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_CENTER;\n                case 2: return MA_CHANNEL_FRONT_RIGHT;\n                case 3: return MA_CHANNEL_SIDE_LEFT;\n                case 4: return MA_CHANNEL_SIDE_RIGHT;\n                case 5: return MA_CHANNEL_BACK_CENTER;\n                case 6: return MA_CHANNEL_LFE;\n            }\n        } break;\n\n        case 8:\n        default:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_CENTER;\n                case 2: return MA_CHANNEL_FRONT_RIGHT;\n                case 3: return MA_CHANNEL_SIDE_LEFT;\n                case 4: return MA_CHANNEL_SIDE_RIGHT;\n                case 5: return MA_CHANNEL_BACK_LEFT;\n                case 6: return MA_CHANNEL_BACK_RIGHT;\n                case 7: return MA_CHANNEL_LFE;\n            }\n        } break;\n    }\n\n    if (channelCount > 8) {\n        if (channelIndex < 32) {    /* We have 32 AUX channels. */\n            return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 8));\n        }\n    }\n\n    /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */\n    return MA_CHANNEL_NONE;\n}\n\nstatic ma_channel ma_channel_map_init_standard_channel_sndio(ma_uint32 channelCount, ma_uint32 channelIndex)\n{\n    switch (channelCount)\n    {\n        case 0: return MA_CHANNEL_NONE;\n\n        case 1:\n        {\n            return MA_CHANNEL_MONO;\n        } break;\n\n        case 2:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n            }\n        } break;\n\n        case 3: /* No defined, but best guess. */\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_FRONT_CENTER;\n            }\n        } break;\n\n        case 4:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_BACK_LEFT;\n                case 3: return MA_CHANNEL_BACK_RIGHT;\n            }\n        } break;\n\n        case 5: /* Not defined, but best guess. */\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_BACK_LEFT;\n                case 3: return MA_CHANNEL_BACK_RIGHT;\n                case 4: return MA_CHANNEL_FRONT_CENTER;\n            }\n        } break;\n\n        case 6:\n        default:\n        {\n            switch (channelIndex) {\n                case 0: return MA_CHANNEL_FRONT_LEFT;\n                case 1: return MA_CHANNEL_FRONT_RIGHT;\n                case 2: return MA_CHANNEL_BACK_LEFT;\n                case 3: return MA_CHANNEL_BACK_RIGHT;\n                case 4: return MA_CHANNEL_FRONT_CENTER;\n                case 5: return MA_CHANNEL_LFE;\n            }\n        } break;\n    }\n\n    if (channelCount > 6) {\n        if (channelIndex < 32) {    /* We have 32 AUX channels. */\n            return (ma_channel)(MA_CHANNEL_AUX_0 + (channelIndex - 6));\n        }\n    }\n\n    /* Getting here means we don't know how to map the channel position so just return MA_CHANNEL_NONE. */\n    return MA_CHANNEL_NONE;\n}\n\n\nstatic ma_channel ma_channel_map_init_standard_channel(ma_standard_channel_map standardChannelMap, ma_uint32 channelCount, ma_uint32 channelIndex)\n{\n    if (channelCount == 0 || channelIndex >= channelCount) {\n        return MA_CHANNEL_NONE;\n    }\n\n    switch (standardChannelMap)\n    {\n        case ma_standard_channel_map_alsa:\n        {\n            return ma_channel_map_init_standard_channel_alsa(channelCount, channelIndex);\n        } break;\n\n        case ma_standard_channel_map_rfc3551:\n        {\n            return ma_channel_map_init_standard_channel_rfc3551(channelCount, channelIndex);\n        } break;\n\n        case ma_standard_channel_map_flac:\n        {\n            return ma_channel_map_init_standard_channel_flac(channelCount, channelIndex);\n        } break;\n\n        case ma_standard_channel_map_vorbis:\n        {\n            return ma_channel_map_init_standard_channel_vorbis(channelCount, channelIndex);\n        } break;\n\n        case ma_standard_channel_map_sound4:\n        {\n            return ma_channel_map_init_standard_channel_sound4(channelCount, channelIndex);\n        } break;\n\n        case ma_standard_channel_map_sndio:\n        {\n            return ma_channel_map_init_standard_channel_sndio(channelCount, channelIndex);\n        } break;\n\n        case ma_standard_channel_map_microsoft: /* Also default. */\n        /*case ma_standard_channel_map_default;*/\n        default:\n        {\n            return ma_channel_map_init_standard_channel_microsoft(channelCount, channelIndex);\n        } break;\n    }\n}\n\nMA_API void ma_channel_map_init_standard(ma_standard_channel_map standardChannelMap, ma_channel* pChannelMap, size_t channelMapCap, ma_uint32 channels)\n{\n    ma_uint32 iChannel;\n\n    if (pChannelMap == NULL || channelMapCap == 0 || channels == 0) {\n        return;\n    }\n\n    for (iChannel = 0; iChannel < channels; iChannel += 1) {\n        if (channelMapCap == 0) {\n            break;  /* Ran out of room. */\n        }\n\n        pChannelMap[0] = ma_channel_map_init_standard_channel(standardChannelMap, channels, iChannel);\n        pChannelMap   += 1;\n        channelMapCap -= 1;\n    }\n}\n\nMA_API void ma_channel_map_copy(ma_channel* pOut, const ma_channel* pIn, ma_uint32 channels)\n{\n    if (pOut != NULL && pIn != NULL && channels > 0) {\n        MA_COPY_MEMORY(pOut, pIn, sizeof(*pOut) * channels);\n    }\n}\n\nMA_API void ma_channel_map_copy_or_default(ma_channel* pOut, size_t channelMapCapOut, const ma_channel* pIn, ma_uint32 channels)\n{\n    if (pOut == NULL || channels == 0) {\n        return;\n    }\n\n    if (pIn != NULL) {\n        ma_channel_map_copy(pOut, pIn, channels);\n    } else {\n        ma_channel_map_init_standard(ma_standard_channel_map_default, pOut, channelMapCapOut, channels);\n    }\n}\n\nMA_API ma_bool32 ma_channel_map_is_valid(const ma_channel* pChannelMap, ma_uint32 channels)\n{\n    /* A channel count of 0 is invalid. */\n    if (channels == 0) {\n        return MA_FALSE;\n    }\n\n    /* It does not make sense to have a mono channel when there is more than 1 channel. */\n    if (channels > 1) {\n        ma_uint32 iChannel;\n        for (iChannel = 0; iChannel < channels; ++iChannel) {\n            if (ma_channel_map_get_channel(pChannelMap, channels, iChannel) == MA_CHANNEL_MONO) {\n                return MA_FALSE;\n            }\n        }\n    }\n\n    return MA_TRUE;\n}\n\nMA_API ma_bool32 ma_channel_map_is_equal(const ma_channel* pChannelMapA, const ma_channel* pChannelMapB, ma_uint32 channels)\n{\n    ma_uint32 iChannel;\n\n    if (pChannelMapA == pChannelMapB) {\n        return MA_TRUE;\n    }\n\n    for (iChannel = 0; iChannel < channels; ++iChannel) {\n        if (ma_channel_map_get_channel(pChannelMapA, channels, iChannel) != ma_channel_map_get_channel(pChannelMapB, channels, iChannel)) {\n            return MA_FALSE;\n        }\n    }\n\n    return MA_TRUE;\n}\n\nMA_API ma_bool32 ma_channel_map_is_blank(const ma_channel* pChannelMap, ma_uint32 channels)\n{\n    ma_uint32 iChannel;\n\n    /* A null channel map is equivalent to the default channel map. */\n    if (pChannelMap == NULL) {\n        return MA_FALSE;\n    }\n\n    for (iChannel = 0; iChannel < channels; ++iChannel) {\n        if (pChannelMap[iChannel] != MA_CHANNEL_NONE) {\n            return MA_FALSE;\n        }\n    }\n\n    return MA_TRUE;\n}\n\nMA_API ma_bool32 ma_channel_map_contains_channel_position(ma_uint32 channels, const ma_channel* pChannelMap, ma_channel channelPosition)\n{\n    return ma_channel_map_find_channel_position(channels, pChannelMap, channelPosition, NULL);\n}\n\nMA_API ma_bool32 ma_channel_map_find_channel_position(ma_uint32 channels, const ma_channel* pChannelMap, ma_channel channelPosition, ma_uint32* pChannelIndex)\n{\n    ma_uint32 iChannel;\n\n    if (pChannelIndex != NULL) {\n        *pChannelIndex = (ma_uint32)-1;\n    }\n\n    for (iChannel = 0; iChannel < channels; ++iChannel) {\n        if (ma_channel_map_get_channel(pChannelMap, channels, iChannel) == channelPosition) {\n            if (pChannelIndex != NULL) {\n                *pChannelIndex = iChannel;\n            }\n\n            return MA_TRUE;\n        }\n    }\n\n    /* Getting here means the channel position was not found. */\n    return MA_FALSE;\n}\n\nMA_API size_t ma_channel_map_to_string(const ma_channel* pChannelMap, ma_uint32 channels, char* pBufferOut, size_t bufferCap)\n{\n    size_t len;\n    ma_uint32 iChannel;\n\n    len = 0;\n\n    for (iChannel = 0; iChannel < channels; iChannel += 1) {\n        const char* pChannelStr = ma_channel_position_to_string(ma_channel_map_get_channel(pChannelMap, channels, iChannel));\n        size_t channelStrLen = strlen(pChannelStr);\n\n        /* Append the string if necessary. */\n        if (pBufferOut != NULL && bufferCap > len + channelStrLen) {\n            MA_COPY_MEMORY(pBufferOut + len, pChannelStr, channelStrLen);\n        }\n        len += channelStrLen;\n\n        /* Append a space if it's not the last item. */\n        if (iChannel+1 < channels) {\n            if (pBufferOut != NULL && bufferCap > len + 1) {\n                pBufferOut[len] = ' ';\n            }\n            len += 1;\n        }\n    }\n\n    /* Null terminate. Don't increment the length here. */\n    if (pBufferOut != NULL && bufferCap > len + 1) {\n        pBufferOut[len] = '\\0';\n    }\n\n    return len;\n}\n\nMA_API const char* ma_channel_position_to_string(ma_channel channel)\n{\n    switch (channel)\n    {\n        case MA_CHANNEL_NONE              : return \"CHANNEL_NONE\";\n        case MA_CHANNEL_MONO              : return \"CHANNEL_MONO\";\n        case MA_CHANNEL_FRONT_LEFT        : return \"CHANNEL_FRONT_LEFT\";\n        case MA_CHANNEL_FRONT_RIGHT       : return \"CHANNEL_FRONT_RIGHT\";\n        case MA_CHANNEL_FRONT_CENTER      : return \"CHANNEL_FRONT_CENTER\";\n        case MA_CHANNEL_LFE               : return \"CHANNEL_LFE\";\n        case MA_CHANNEL_BACK_LEFT         : return \"CHANNEL_BACK_LEFT\";\n        case MA_CHANNEL_BACK_RIGHT        : return \"CHANNEL_BACK_RIGHT\";\n        case MA_CHANNEL_FRONT_LEFT_CENTER : return \"CHANNEL_FRONT_LEFT_CENTER \";\n        case MA_CHANNEL_FRONT_RIGHT_CENTER: return \"CHANNEL_FRONT_RIGHT_CENTER\";\n        case MA_CHANNEL_BACK_CENTER       : return \"CHANNEL_BACK_CENTER\";\n        case MA_CHANNEL_SIDE_LEFT         : return \"CHANNEL_SIDE_LEFT\";\n        case MA_CHANNEL_SIDE_RIGHT        : return \"CHANNEL_SIDE_RIGHT\";\n        case MA_CHANNEL_TOP_CENTER        : return \"CHANNEL_TOP_CENTER\";\n        case MA_CHANNEL_TOP_FRONT_LEFT    : return \"CHANNEL_TOP_FRONT_LEFT\";\n        case MA_CHANNEL_TOP_FRONT_CENTER  : return \"CHANNEL_TOP_FRONT_CENTER\";\n        case MA_CHANNEL_TOP_FRONT_RIGHT   : return \"CHANNEL_TOP_FRONT_RIGHT\";\n        case MA_CHANNEL_TOP_BACK_LEFT     : return \"CHANNEL_TOP_BACK_LEFT\";\n        case MA_CHANNEL_TOP_BACK_CENTER   : return \"CHANNEL_TOP_BACK_CENTER\";\n        case MA_CHANNEL_TOP_BACK_RIGHT    : return \"CHANNEL_TOP_BACK_RIGHT\";\n        case MA_CHANNEL_AUX_0             : return \"CHANNEL_AUX_0\";\n        case MA_CHANNEL_AUX_1             : return \"CHANNEL_AUX_1\";\n        case MA_CHANNEL_AUX_2             : return \"CHANNEL_AUX_2\";\n        case MA_CHANNEL_AUX_3             : return \"CHANNEL_AUX_3\";\n        case MA_CHANNEL_AUX_4             : return \"CHANNEL_AUX_4\";\n        case MA_CHANNEL_AUX_5             : return \"CHANNEL_AUX_5\";\n        case MA_CHANNEL_AUX_6             : return \"CHANNEL_AUX_6\";\n        case MA_CHANNEL_AUX_7             : return \"CHANNEL_AUX_7\";\n        case MA_CHANNEL_AUX_8             : return \"CHANNEL_AUX_8\";\n        case MA_CHANNEL_AUX_9             : return \"CHANNEL_AUX_9\";\n        case MA_CHANNEL_AUX_10            : return \"CHANNEL_AUX_10\";\n        case MA_CHANNEL_AUX_11            : return \"CHANNEL_AUX_11\";\n        case MA_CHANNEL_AUX_12            : return \"CHANNEL_AUX_12\";\n        case MA_CHANNEL_AUX_13            : return \"CHANNEL_AUX_13\";\n        case MA_CHANNEL_AUX_14            : return \"CHANNEL_AUX_14\";\n        case MA_CHANNEL_AUX_15            : return \"CHANNEL_AUX_15\";\n        case MA_CHANNEL_AUX_16            : return \"CHANNEL_AUX_16\";\n        case MA_CHANNEL_AUX_17            : return \"CHANNEL_AUX_17\";\n        case MA_CHANNEL_AUX_18            : return \"CHANNEL_AUX_18\";\n        case MA_CHANNEL_AUX_19            : return \"CHANNEL_AUX_19\";\n        case MA_CHANNEL_AUX_20            : return \"CHANNEL_AUX_20\";\n        case MA_CHANNEL_AUX_21            : return \"CHANNEL_AUX_21\";\n        case MA_CHANNEL_AUX_22            : return \"CHANNEL_AUX_22\";\n        case MA_CHANNEL_AUX_23            : return \"CHANNEL_AUX_23\";\n        case MA_CHANNEL_AUX_24            : return \"CHANNEL_AUX_24\";\n        case MA_CHANNEL_AUX_25            : return \"CHANNEL_AUX_25\";\n        case MA_CHANNEL_AUX_26            : return \"CHANNEL_AUX_26\";\n        case MA_CHANNEL_AUX_27            : return \"CHANNEL_AUX_27\";\n        case MA_CHANNEL_AUX_28            : return \"CHANNEL_AUX_28\";\n        case MA_CHANNEL_AUX_29            : return \"CHANNEL_AUX_29\";\n        case MA_CHANNEL_AUX_30            : return \"CHANNEL_AUX_30\";\n        case MA_CHANNEL_AUX_31            : return \"CHANNEL_AUX_31\";\n        default: break;\n    }\n\n    return \"UNKNOWN\";\n}\n\n\n\n/**************************************************************************************************************************************************************\n\nConversion Helpers\n\n**************************************************************************************************************************************************************/\nMA_API ma_uint64 ma_convert_frames(void* pOut, ma_uint64 frameCountOut, ma_format formatOut, ma_uint32 channelsOut, ma_uint32 sampleRateOut, const void* pIn, ma_uint64 frameCountIn, ma_format formatIn, ma_uint32 channelsIn, ma_uint32 sampleRateIn)\n{\n    ma_data_converter_config config;\n\n    config = ma_data_converter_config_init(formatIn, formatOut, channelsIn, channelsOut, sampleRateIn, sampleRateOut);\n    config.resampling.linear.lpfOrder = ma_min(MA_DEFAULT_RESAMPLER_LPF_ORDER, MA_MAX_FILTER_ORDER);\n\n    return ma_convert_frames_ex(pOut, frameCountOut, pIn, frameCountIn, &config);\n}\n\nMA_API ma_uint64 ma_convert_frames_ex(void* pOut, ma_uint64 frameCountOut, const void* pIn, ma_uint64 frameCountIn, const ma_data_converter_config* pConfig)\n{\n    ma_result result;\n    ma_data_converter converter;\n\n    if (frameCountIn == 0 || pConfig == NULL) {\n        return 0;\n    }\n\n    result = ma_data_converter_init(pConfig, NULL, &converter);\n    if (result != MA_SUCCESS) {\n        return 0;   /* Failed to initialize the data converter. */\n    }\n\n    if (pOut == NULL) {\n        result = ma_data_converter_get_expected_output_frame_count(&converter, frameCountIn, &frameCountOut);\n        if (result != MA_SUCCESS) {\n            if (result == MA_NOT_IMPLEMENTED) {\n                /* No way to calculate the number of frames, so we'll need to brute force it and loop. */\n                frameCountOut = 0;\n\n                while (frameCountIn > 0) {\n                    ma_uint64 framesProcessedIn  = frameCountIn;\n                    ma_uint64 framesProcessedOut = 0xFFFFFFFF;\n\n                    result = ma_data_converter_process_pcm_frames(&converter, pIn, &framesProcessedIn, NULL, &framesProcessedOut);\n                    if (result != MA_SUCCESS) {\n                        break;\n                    }\n\n                    frameCountIn  -= framesProcessedIn;\n                }\n            }\n        }\n    } else {\n        result = ma_data_converter_process_pcm_frames(&converter, pIn, &frameCountIn, pOut, &frameCountOut);\n        if (result != MA_SUCCESS) {\n            frameCountOut = 0;\n        }\n    }\n\n    ma_data_converter_uninit(&converter, NULL);\n    return frameCountOut;\n}\n\n\n/**************************************************************************************************************************************************************\n\nRing Buffer\n\n**************************************************************************************************************************************************************/\nstatic MA_INLINE ma_uint32 ma_rb__extract_offset_in_bytes(ma_uint32 encodedOffset)\n{\n    return encodedOffset & 0x7FFFFFFF;\n}\n\nstatic MA_INLINE ma_uint32 ma_rb__extract_offset_loop_flag(ma_uint32 encodedOffset)\n{\n    return encodedOffset & 0x80000000;\n}\n\nstatic MA_INLINE void* ma_rb__get_read_ptr(ma_rb* pRB)\n{\n    MA_ASSERT(pRB != NULL);\n    return ma_offset_ptr(pRB->pBuffer, ma_rb__extract_offset_in_bytes(ma_atomic_load_32(&pRB->encodedReadOffset)));\n}\n\nstatic MA_INLINE void* ma_rb__get_write_ptr(ma_rb* pRB)\n{\n    MA_ASSERT(pRB != NULL);\n    return ma_offset_ptr(pRB->pBuffer, ma_rb__extract_offset_in_bytes(ma_atomic_load_32(&pRB->encodedWriteOffset)));\n}\n\nstatic MA_INLINE ma_uint32 ma_rb__construct_offset(ma_uint32 offsetInBytes, ma_uint32 offsetLoopFlag)\n{\n    return offsetLoopFlag | offsetInBytes;\n}\n\nstatic MA_INLINE void ma_rb__deconstruct_offset(ma_uint32 encodedOffset, ma_uint32* pOffsetInBytes, ma_uint32* pOffsetLoopFlag)\n{\n    MA_ASSERT(pOffsetInBytes != NULL);\n    MA_ASSERT(pOffsetLoopFlag != NULL);\n\n    *pOffsetInBytes  = ma_rb__extract_offset_in_bytes(encodedOffset);\n    *pOffsetLoopFlag = ma_rb__extract_offset_loop_flag(encodedOffset);\n}\n\n\nMA_API ma_result ma_rb_init_ex(size_t subbufferSizeInBytes, size_t subbufferCount, size_t subbufferStrideInBytes, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_rb* pRB)\n{\n    ma_result result;\n    const ma_uint32 maxSubBufferSize = 0x7FFFFFFF - (MA_SIMD_ALIGNMENT-1);\n\n    if (pRB == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (subbufferSizeInBytes == 0 || subbufferCount == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (subbufferSizeInBytes > maxSubBufferSize) {\n        return MA_INVALID_ARGS;    /* Maximum buffer size is ~2GB. The most significant bit is a flag for use internally. */\n    }\n\n\n    MA_ZERO_OBJECT(pRB);\n\n    result = ma_allocation_callbacks_init_copy(&pRB->allocationCallbacks, pAllocationCallbacks);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pRB->subbufferSizeInBytes = (ma_uint32)subbufferSizeInBytes;\n    pRB->subbufferCount = (ma_uint32)subbufferCount;\n\n    if (pOptionalPreallocatedBuffer != NULL) {\n        pRB->subbufferStrideInBytes = (ma_uint32)subbufferStrideInBytes;\n        pRB->pBuffer = pOptionalPreallocatedBuffer;\n    } else {\n        size_t bufferSizeInBytes;\n\n        /*\n        Here is where we allocate our own buffer. We always want to align this to MA_SIMD_ALIGNMENT for future SIMD optimization opportunity. To do this\n        we need to make sure the stride is a multiple of MA_SIMD_ALIGNMENT.\n        */\n        pRB->subbufferStrideInBytes = (pRB->subbufferSizeInBytes + (MA_SIMD_ALIGNMENT-1)) & ~MA_SIMD_ALIGNMENT;\n\n        bufferSizeInBytes = (size_t)pRB->subbufferCount*pRB->subbufferStrideInBytes;\n        pRB->pBuffer = ma_aligned_malloc(bufferSizeInBytes, MA_SIMD_ALIGNMENT, &pRB->allocationCallbacks);\n        if (pRB->pBuffer == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n\n        MA_ZERO_MEMORY(pRB->pBuffer, bufferSizeInBytes);\n        pRB->ownsBuffer = MA_TRUE;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_rb_init(size_t bufferSizeInBytes, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_rb* pRB)\n{\n    return ma_rb_init_ex(bufferSizeInBytes, 1, 0, pOptionalPreallocatedBuffer, pAllocationCallbacks, pRB);\n}\n\nMA_API void ma_rb_uninit(ma_rb* pRB)\n{\n    if (pRB == NULL) {\n        return;\n    }\n\n    if (pRB->ownsBuffer) {\n        ma_aligned_free(pRB->pBuffer, &pRB->allocationCallbacks);\n    }\n}\n\nMA_API void ma_rb_reset(ma_rb* pRB)\n{\n    if (pRB == NULL) {\n        return;\n    }\n\n    ma_atomic_exchange_32(&pRB->encodedReadOffset, 0);\n    ma_atomic_exchange_32(&pRB->encodedWriteOffset, 0);\n}\n\nMA_API ma_result ma_rb_acquire_read(ma_rb* pRB, size_t* pSizeInBytes, void** ppBufferOut)\n{\n    ma_uint32 writeOffset;\n    ma_uint32 writeOffsetInBytes;\n    ma_uint32 writeOffsetLoopFlag;\n    ma_uint32 readOffset;\n    ma_uint32 readOffsetInBytes;\n    ma_uint32 readOffsetLoopFlag;\n    size_t bytesAvailable;\n    size_t bytesRequested;\n\n    if (pRB == NULL || pSizeInBytes == NULL || ppBufferOut == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The returned buffer should never move ahead of the write pointer. */\n    writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset);\n    ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag);\n\n    readOffset = ma_atomic_load_32(&pRB->encodedReadOffset);\n    ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag);\n\n    /*\n    The number of bytes available depends on whether or not the read and write pointers are on the same loop iteration. If so, we\n    can only read up to the write pointer. If not, we can only read up to the end of the buffer.\n    */\n    if (readOffsetLoopFlag == writeOffsetLoopFlag) {\n        bytesAvailable = writeOffsetInBytes - readOffsetInBytes;\n    } else {\n        bytesAvailable = pRB->subbufferSizeInBytes - readOffsetInBytes;\n    }\n\n    bytesRequested = *pSizeInBytes;\n    if (bytesRequested > bytesAvailable) {\n        bytesRequested = bytesAvailable;\n    }\n\n    *pSizeInBytes = bytesRequested;\n    (*ppBufferOut) = ma_rb__get_read_ptr(pRB);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_rb_commit_read(ma_rb* pRB, size_t sizeInBytes)\n{\n    ma_uint32 readOffset;\n    ma_uint32 readOffsetInBytes;\n    ma_uint32 readOffsetLoopFlag;\n    ma_uint32 newReadOffsetInBytes;\n    ma_uint32 newReadOffsetLoopFlag;\n\n    if (pRB == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    readOffset = ma_atomic_load_32(&pRB->encodedReadOffset);\n    ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag);\n\n    /* Check that sizeInBytes is correct. It should never go beyond the end of the buffer. */\n    newReadOffsetInBytes = (ma_uint32)(readOffsetInBytes + sizeInBytes);\n    if (newReadOffsetInBytes > pRB->subbufferSizeInBytes) {\n        return MA_INVALID_ARGS;    /* <-- sizeInBytes will cause the read offset to overflow. */\n    }\n\n    /* Move the read pointer back to the start if necessary. */\n    newReadOffsetLoopFlag = readOffsetLoopFlag;\n    if (newReadOffsetInBytes == pRB->subbufferSizeInBytes) {\n        newReadOffsetInBytes = 0;\n        newReadOffsetLoopFlag ^= 0x80000000;\n    }\n\n    ma_atomic_exchange_32(&pRB->encodedReadOffset, ma_rb__construct_offset(newReadOffsetLoopFlag, newReadOffsetInBytes));\n\n    if (ma_rb_pointer_distance(pRB) == 0) {\n        return MA_AT_END;\n    } else {\n        return MA_SUCCESS;\n    }\n}\n\nMA_API ma_result ma_rb_acquire_write(ma_rb* pRB, size_t* pSizeInBytes, void** ppBufferOut)\n{\n    ma_uint32 readOffset;\n    ma_uint32 readOffsetInBytes;\n    ma_uint32 readOffsetLoopFlag;\n    ma_uint32 writeOffset;\n    ma_uint32 writeOffsetInBytes;\n    ma_uint32 writeOffsetLoopFlag;\n    size_t bytesAvailable;\n    size_t bytesRequested;\n\n    if (pRB == NULL || pSizeInBytes == NULL || ppBufferOut == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The returned buffer should never overtake the read buffer. */\n    readOffset = ma_atomic_load_32(&pRB->encodedReadOffset);\n    ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag);\n\n    writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset);\n    ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag);\n\n    /*\n    In the case of writing, if the write pointer and the read pointer are on the same loop iteration we can only\n    write up to the end of the buffer. Otherwise we can only write up to the read pointer. The write pointer should\n    never overtake the read pointer.\n    */\n    if (writeOffsetLoopFlag == readOffsetLoopFlag) {\n        bytesAvailable = pRB->subbufferSizeInBytes - writeOffsetInBytes;\n    } else {\n        bytesAvailable = readOffsetInBytes - writeOffsetInBytes;\n    }\n\n    bytesRequested = *pSizeInBytes;\n    if (bytesRequested > bytesAvailable) {\n        bytesRequested = bytesAvailable;\n    }\n\n    *pSizeInBytes = bytesRequested;\n    *ppBufferOut  = ma_rb__get_write_ptr(pRB);\n\n    /* Clear the buffer if desired. */\n    if (pRB->clearOnWriteAcquire) {\n        MA_ZERO_MEMORY(*ppBufferOut, *pSizeInBytes);\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_rb_commit_write(ma_rb* pRB, size_t sizeInBytes)\n{\n    ma_uint32 writeOffset;\n    ma_uint32 writeOffsetInBytes;\n    ma_uint32 writeOffsetLoopFlag;\n    ma_uint32 newWriteOffsetInBytes;\n    ma_uint32 newWriteOffsetLoopFlag;\n\n    if (pRB == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset);\n    ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag);\n\n    /* Check that sizeInBytes is correct. It should never go beyond the end of the buffer. */\n    newWriteOffsetInBytes = (ma_uint32)(writeOffsetInBytes + sizeInBytes);\n    if (newWriteOffsetInBytes > pRB->subbufferSizeInBytes) {\n        return MA_INVALID_ARGS;    /* <-- sizeInBytes will cause the read offset to overflow. */\n    }\n\n    /* Move the read pointer back to the start if necessary. */\n    newWriteOffsetLoopFlag = writeOffsetLoopFlag;\n    if (newWriteOffsetInBytes == pRB->subbufferSizeInBytes) {\n        newWriteOffsetInBytes = 0;\n        newWriteOffsetLoopFlag ^= 0x80000000;\n    }\n\n    ma_atomic_exchange_32(&pRB->encodedWriteOffset, ma_rb__construct_offset(newWriteOffsetLoopFlag, newWriteOffsetInBytes));\n\n    if (ma_rb_pointer_distance(pRB) == 0) {\n        return MA_AT_END;\n    } else {\n        return MA_SUCCESS;\n    }\n}\n\nMA_API ma_result ma_rb_seek_read(ma_rb* pRB, size_t offsetInBytes)\n{\n    ma_uint32 readOffset;\n    ma_uint32 readOffsetInBytes;\n    ma_uint32 readOffsetLoopFlag;\n    ma_uint32 writeOffset;\n    ma_uint32 writeOffsetInBytes;\n    ma_uint32 writeOffsetLoopFlag;\n    ma_uint32 newReadOffsetInBytes;\n    ma_uint32 newReadOffsetLoopFlag;\n\n    if (pRB == NULL || offsetInBytes > pRB->subbufferSizeInBytes) {\n        return MA_INVALID_ARGS;\n    }\n\n    readOffset = ma_atomic_load_32(&pRB->encodedReadOffset);\n    ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag);\n\n    writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset);\n    ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag);\n\n    newReadOffsetLoopFlag = readOffsetLoopFlag;\n\n    /* We cannot go past the write buffer. */\n    if (readOffsetLoopFlag == writeOffsetLoopFlag) {\n        if ((readOffsetInBytes + offsetInBytes) > writeOffsetInBytes) {\n            newReadOffsetInBytes = writeOffsetInBytes;\n        } else {\n            newReadOffsetInBytes = (ma_uint32)(readOffsetInBytes + offsetInBytes);\n        }\n    } else {\n        /* May end up looping. */\n        if ((readOffsetInBytes + offsetInBytes) >= pRB->subbufferSizeInBytes) {\n            newReadOffsetInBytes = (ma_uint32)(readOffsetInBytes + offsetInBytes) - pRB->subbufferSizeInBytes;\n            newReadOffsetLoopFlag ^= 0x80000000;    /* <-- Looped. */\n        } else {\n            newReadOffsetInBytes = (ma_uint32)(readOffsetInBytes + offsetInBytes);\n        }\n    }\n\n    ma_atomic_exchange_32(&pRB->encodedReadOffset, ma_rb__construct_offset(newReadOffsetInBytes, newReadOffsetLoopFlag));\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_rb_seek_write(ma_rb* pRB, size_t offsetInBytes)\n{\n    ma_uint32 readOffset;\n    ma_uint32 readOffsetInBytes;\n    ma_uint32 readOffsetLoopFlag;\n    ma_uint32 writeOffset;\n    ma_uint32 writeOffsetInBytes;\n    ma_uint32 writeOffsetLoopFlag;\n    ma_uint32 newWriteOffsetInBytes;\n    ma_uint32 newWriteOffsetLoopFlag;\n\n    if (pRB == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    readOffset = ma_atomic_load_32(&pRB->encodedReadOffset);\n    ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag);\n\n    writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset);\n    ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag);\n\n    newWriteOffsetLoopFlag = writeOffsetLoopFlag;\n\n    /* We cannot go past the write buffer. */\n    if (readOffsetLoopFlag == writeOffsetLoopFlag) {\n        /* May end up looping. */\n        if ((writeOffsetInBytes + offsetInBytes) >= pRB->subbufferSizeInBytes) {\n            newWriteOffsetInBytes = (ma_uint32)(writeOffsetInBytes + offsetInBytes) - pRB->subbufferSizeInBytes;\n            newWriteOffsetLoopFlag ^= 0x80000000;    /* <-- Looped. */\n        } else {\n            newWriteOffsetInBytes = (ma_uint32)(writeOffsetInBytes + offsetInBytes);\n        }\n    } else {\n        if ((writeOffsetInBytes + offsetInBytes) > readOffsetInBytes) {\n            newWriteOffsetInBytes = readOffsetInBytes;\n        } else {\n            newWriteOffsetInBytes = (ma_uint32)(writeOffsetInBytes + offsetInBytes);\n        }\n    }\n\n    ma_atomic_exchange_32(&pRB->encodedWriteOffset, ma_rb__construct_offset(newWriteOffsetInBytes, newWriteOffsetLoopFlag));\n    return MA_SUCCESS;\n}\n\nMA_API ma_int32 ma_rb_pointer_distance(ma_rb* pRB)\n{\n    ma_uint32 readOffset;\n    ma_uint32 readOffsetInBytes;\n    ma_uint32 readOffsetLoopFlag;\n    ma_uint32 writeOffset;\n    ma_uint32 writeOffsetInBytes;\n    ma_uint32 writeOffsetLoopFlag;\n\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    readOffset = ma_atomic_load_32(&pRB->encodedReadOffset);\n    ma_rb__deconstruct_offset(readOffset, &readOffsetInBytes, &readOffsetLoopFlag);\n\n    writeOffset = ma_atomic_load_32(&pRB->encodedWriteOffset);\n    ma_rb__deconstruct_offset(writeOffset, &writeOffsetInBytes, &writeOffsetLoopFlag);\n\n    if (readOffsetLoopFlag == writeOffsetLoopFlag) {\n        return writeOffsetInBytes - readOffsetInBytes;\n    } else {\n        return writeOffsetInBytes + (pRB->subbufferSizeInBytes - readOffsetInBytes);\n    }\n}\n\nMA_API ma_uint32 ma_rb_available_read(ma_rb* pRB)\n{\n    ma_int32 dist;\n\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    dist = ma_rb_pointer_distance(pRB);\n    if (dist < 0) {\n        return 0;\n    }\n\n    return dist;\n}\n\nMA_API ma_uint32 ma_rb_available_write(ma_rb* pRB)\n{\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    return (ma_uint32)(ma_rb_get_subbuffer_size(pRB) - ma_rb_pointer_distance(pRB));\n}\n\nMA_API size_t ma_rb_get_subbuffer_size(ma_rb* pRB)\n{\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    return pRB->subbufferSizeInBytes;\n}\n\nMA_API size_t ma_rb_get_subbuffer_stride(ma_rb* pRB)\n{\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    if (pRB->subbufferStrideInBytes == 0) {\n        return (size_t)pRB->subbufferSizeInBytes;\n    }\n\n    return (size_t)pRB->subbufferStrideInBytes;\n}\n\nMA_API size_t ma_rb_get_subbuffer_offset(ma_rb* pRB, size_t subbufferIndex)\n{\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    return subbufferIndex * ma_rb_get_subbuffer_stride(pRB);\n}\n\nMA_API void* ma_rb_get_subbuffer_ptr(ma_rb* pRB, size_t subbufferIndex, void* pBuffer)\n{\n    if (pRB == NULL) {\n        return NULL;\n    }\n\n    return ma_offset_ptr(pBuffer, ma_rb_get_subbuffer_offset(pRB, subbufferIndex));\n}\n\n\n\nstatic ma_result ma_pcm_rb_data_source__on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    /* Since there's no notion of an end, we don't ever want to return MA_AT_END here. But it is possible to return 0. */\n    ma_pcm_rb* pRB = (ma_pcm_rb*)pDataSource;\n    ma_result result;\n    ma_uint64 totalFramesRead;\n\n    MA_ASSERT(pRB != NULL);\n\n    /* We need to run this in a loop since the ring buffer itself may loop. */\n    totalFramesRead = 0;\n    while (totalFramesRead < frameCount) {\n        void* pMappedBuffer;\n        ma_uint32 mappedFrameCount;\n        ma_uint64 framesToRead = frameCount - totalFramesRead;\n        if (framesToRead > 0xFFFFFFFF) {\n            framesToRead = 0xFFFFFFFF;\n        }\n\n        mappedFrameCount = (ma_uint32)framesToRead;\n        result = ma_pcm_rb_acquire_read(pRB, &mappedFrameCount, &pMappedBuffer);\n        if (result != MA_SUCCESS) {\n            break;\n        }\n\n        if (mappedFrameCount == 0) {\n            break;  /* <-- End of ring buffer. */\n        }\n\n        ma_copy_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, pRB->format, pRB->channels), pMappedBuffer, mappedFrameCount, pRB->format, pRB->channels);\n\n        result = ma_pcm_rb_commit_read(pRB, mappedFrameCount);\n        if (result != MA_SUCCESS) {\n            break;\n        }\n\n        totalFramesRead += mappedFrameCount;\n    }\n\n    *pFramesRead = totalFramesRead;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_pcm_rb_data_source__on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    ma_pcm_rb* pRB = (ma_pcm_rb*)pDataSource;\n    MA_ASSERT(pRB != NULL);\n\n    if (pFormat != NULL) {\n        *pFormat = pRB->format;\n    }\n\n    if (pChannels != NULL) {\n        *pChannels = pRB->channels;\n    }\n\n    if (pSampleRate != NULL) {\n        *pSampleRate = pRB->sampleRate;\n    }\n\n    /* Just assume the default channel map. */\n    if (pChannelMap != NULL) {\n        ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pRB->channels);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_data_source_vtable ma_gRBDataSourceVTable =\n{\n    ma_pcm_rb_data_source__on_read,\n    NULL,   /* onSeek */\n    ma_pcm_rb_data_source__on_get_data_format,\n    NULL,   /* onGetCursor */\n    NULL,   /* onGetLength */\n    NULL,   /* onSetLooping */\n    0\n};\n\nstatic MA_INLINE ma_uint32 ma_pcm_rb_get_bpf(ma_pcm_rb* pRB)\n{\n    MA_ASSERT(pRB != NULL);\n\n    return ma_get_bytes_per_frame(pRB->format, pRB->channels);\n}\n\nMA_API ma_result ma_pcm_rb_init_ex(ma_format format, ma_uint32 channels, ma_uint32 subbufferSizeInFrames, ma_uint32 subbufferCount, ma_uint32 subbufferStrideInFrames, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_pcm_rb* pRB)\n{\n    ma_uint32 bpf;\n    ma_result result;\n\n    if (pRB == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pRB);\n\n    bpf = ma_get_bytes_per_frame(format, channels);\n    if (bpf == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_rb_init_ex(subbufferSizeInFrames*bpf, subbufferCount, subbufferStrideInFrames*bpf, pOptionalPreallocatedBuffer, pAllocationCallbacks, &pRB->rb);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pRB->format     = format;\n    pRB->channels   = channels;\n    pRB->sampleRate = 0;    /* The sample rate is not passed in as a parameter. */\n\n    /* The PCM ring buffer is a data source. We need to get that set up as well. */\n    {\n        ma_data_source_config dataSourceConfig = ma_data_source_config_init();\n        dataSourceConfig.vtable = &ma_gRBDataSourceVTable;\n\n        result = ma_data_source_init(&dataSourceConfig, &pRB->ds);\n        if (result != MA_SUCCESS) {\n            ma_rb_uninit(&pRB->rb);\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_pcm_rb_init(ma_format format, ma_uint32 channels, ma_uint32 bufferSizeInFrames, void* pOptionalPreallocatedBuffer, const ma_allocation_callbacks* pAllocationCallbacks, ma_pcm_rb* pRB)\n{\n    return ma_pcm_rb_init_ex(format, channels, bufferSizeInFrames, 1, 0, pOptionalPreallocatedBuffer, pAllocationCallbacks, pRB);\n}\n\nMA_API void ma_pcm_rb_uninit(ma_pcm_rb* pRB)\n{\n    if (pRB == NULL) {\n        return;\n    }\n\n    ma_data_source_uninit(&pRB->ds);\n    ma_rb_uninit(&pRB->rb);\n}\n\nMA_API void ma_pcm_rb_reset(ma_pcm_rb* pRB)\n{\n    if (pRB == NULL) {\n        return;\n    }\n\n    ma_rb_reset(&pRB->rb);\n}\n\nMA_API ma_result ma_pcm_rb_acquire_read(ma_pcm_rb* pRB, ma_uint32* pSizeInFrames, void** ppBufferOut)\n{\n    size_t sizeInBytes;\n    ma_result result;\n\n    if (pRB == NULL || pSizeInFrames == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    sizeInBytes = *pSizeInFrames * ma_pcm_rb_get_bpf(pRB);\n\n    result = ma_rb_acquire_read(&pRB->rb, &sizeInBytes, ppBufferOut);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pSizeInFrames = (ma_uint32)(sizeInBytes / (size_t)ma_pcm_rb_get_bpf(pRB));\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_pcm_rb_commit_read(ma_pcm_rb* pRB, ma_uint32 sizeInFrames)\n{\n    if (pRB == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_rb_commit_read(&pRB->rb, sizeInFrames * ma_pcm_rb_get_bpf(pRB));\n}\n\nMA_API ma_result ma_pcm_rb_acquire_write(ma_pcm_rb* pRB, ma_uint32* pSizeInFrames, void** ppBufferOut)\n{\n    size_t sizeInBytes;\n    ma_result result;\n\n    if (pRB == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    sizeInBytes = *pSizeInFrames * ma_pcm_rb_get_bpf(pRB);\n\n    result = ma_rb_acquire_write(&pRB->rb, &sizeInBytes, ppBufferOut);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pSizeInFrames = (ma_uint32)(sizeInBytes / ma_pcm_rb_get_bpf(pRB));\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_pcm_rb_commit_write(ma_pcm_rb* pRB, ma_uint32 sizeInFrames)\n{\n    if (pRB == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_rb_commit_write(&pRB->rb, sizeInFrames * ma_pcm_rb_get_bpf(pRB));\n}\n\nMA_API ma_result ma_pcm_rb_seek_read(ma_pcm_rb* pRB, ma_uint32 offsetInFrames)\n{\n    if (pRB == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_rb_seek_read(&pRB->rb, offsetInFrames * ma_pcm_rb_get_bpf(pRB));\n}\n\nMA_API ma_result ma_pcm_rb_seek_write(ma_pcm_rb* pRB, ma_uint32 offsetInFrames)\n{\n    if (pRB == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_rb_seek_write(&pRB->rb, offsetInFrames * ma_pcm_rb_get_bpf(pRB));\n}\n\nMA_API ma_int32 ma_pcm_rb_pointer_distance(ma_pcm_rb* pRB)\n{\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    return ma_rb_pointer_distance(&pRB->rb) / ma_pcm_rb_get_bpf(pRB);\n}\n\nMA_API ma_uint32 ma_pcm_rb_available_read(ma_pcm_rb* pRB)\n{\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    return ma_rb_available_read(&pRB->rb) / ma_pcm_rb_get_bpf(pRB);\n}\n\nMA_API ma_uint32 ma_pcm_rb_available_write(ma_pcm_rb* pRB)\n{\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    return ma_rb_available_write(&pRB->rb) / ma_pcm_rb_get_bpf(pRB);\n}\n\nMA_API ma_uint32 ma_pcm_rb_get_subbuffer_size(ma_pcm_rb* pRB)\n{\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    return (ma_uint32)(ma_rb_get_subbuffer_size(&pRB->rb) / ma_pcm_rb_get_bpf(pRB));\n}\n\nMA_API ma_uint32 ma_pcm_rb_get_subbuffer_stride(ma_pcm_rb* pRB)\n{\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    return (ma_uint32)(ma_rb_get_subbuffer_stride(&pRB->rb) / ma_pcm_rb_get_bpf(pRB));\n}\n\nMA_API ma_uint32 ma_pcm_rb_get_subbuffer_offset(ma_pcm_rb* pRB, ma_uint32 subbufferIndex)\n{\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    return (ma_uint32)(ma_rb_get_subbuffer_offset(&pRB->rb, subbufferIndex) / ma_pcm_rb_get_bpf(pRB));\n}\n\nMA_API void* ma_pcm_rb_get_subbuffer_ptr(ma_pcm_rb* pRB, ma_uint32 subbufferIndex, void* pBuffer)\n{\n    if (pRB == NULL) {\n        return NULL;\n    }\n\n    return ma_rb_get_subbuffer_ptr(&pRB->rb, subbufferIndex, pBuffer);\n}\n\nMA_API ma_format ma_pcm_rb_get_format(const ma_pcm_rb* pRB)\n{\n    if (pRB == NULL) {\n        return ma_format_unknown;\n    }\n\n    return pRB->format;\n}\n\nMA_API ma_uint32 ma_pcm_rb_get_channels(const ma_pcm_rb* pRB)\n{\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    return pRB->channels;\n}\n\nMA_API ma_uint32 ma_pcm_rb_get_sample_rate(const ma_pcm_rb* pRB)\n{\n    if (pRB == NULL) {\n        return 0;\n    }\n\n    return pRB->sampleRate;\n}\n\nMA_API void ma_pcm_rb_set_sample_rate(ma_pcm_rb* pRB, ma_uint32 sampleRate)\n{\n    if (pRB == NULL) {\n        return;\n    }\n\n    pRB->sampleRate = sampleRate;\n}\n\n\n\nMA_API ma_result ma_duplex_rb_init(ma_format captureFormat, ma_uint32 captureChannels, ma_uint32 sampleRate, ma_uint32 captureInternalSampleRate, ma_uint32 captureInternalPeriodSizeInFrames, const ma_allocation_callbacks* pAllocationCallbacks, ma_duplex_rb* pRB)\n{\n    ma_result result;\n    ma_uint32 sizeInFrames;\n\n    sizeInFrames = (ma_uint32)ma_calculate_frame_count_after_resampling(sampleRate, captureInternalSampleRate, captureInternalPeriodSizeInFrames * 5);\n    if (sizeInFrames == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_pcm_rb_init(captureFormat, captureChannels, sizeInFrames, NULL, pAllocationCallbacks, &pRB->rb);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* Seek forward a bit so we have a bit of a buffer in case of desyncs. */\n    ma_pcm_rb_seek_write((ma_pcm_rb*)pRB, captureInternalPeriodSizeInFrames * 2);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_duplex_rb_uninit(ma_duplex_rb* pRB)\n{\n    ma_pcm_rb_uninit((ma_pcm_rb*)pRB);\n    return MA_SUCCESS;\n}\n\n\n\n/**************************************************************************************************************************************************************\n\nMiscellaneous Helpers\n\n**************************************************************************************************************************************************************/\nMA_API const char* ma_result_description(ma_result result)\n{\n    switch (result)\n    {\n        case MA_SUCCESS:                       return \"No error\";\n        case MA_ERROR:                         return \"Unknown error\";\n        case MA_INVALID_ARGS:                  return \"Invalid argument\";\n        case MA_INVALID_OPERATION:             return \"Invalid operation\";\n        case MA_OUT_OF_MEMORY:                 return \"Out of memory\";\n        case MA_OUT_OF_RANGE:                  return \"Out of range\";\n        case MA_ACCESS_DENIED:                 return \"Permission denied\";\n        case MA_DOES_NOT_EXIST:                return \"Resource does not exist\";\n        case MA_ALREADY_EXISTS:                return \"Resource already exists\";\n        case MA_TOO_MANY_OPEN_FILES:           return \"Too many open files\";\n        case MA_INVALID_FILE:                  return \"Invalid file\";\n        case MA_TOO_BIG:                       return \"Too large\";\n        case MA_PATH_TOO_LONG:                 return \"Path too long\";\n        case MA_NAME_TOO_LONG:                 return \"Name too long\";\n        case MA_NOT_DIRECTORY:                 return \"Not a directory\";\n        case MA_IS_DIRECTORY:                  return \"Is a directory\";\n        case MA_DIRECTORY_NOT_EMPTY:           return \"Directory not empty\";\n        case MA_AT_END:                        return \"At end\";\n        case MA_NO_SPACE:                      return \"No space available\";\n        case MA_BUSY:                          return \"Device or resource busy\";\n        case MA_IO_ERROR:                      return \"Input/output error\";\n        case MA_INTERRUPT:                     return \"Interrupted\";\n        case MA_UNAVAILABLE:                   return \"Resource unavailable\";\n        case MA_ALREADY_IN_USE:                return \"Resource already in use\";\n        case MA_BAD_ADDRESS:                   return \"Bad address\";\n        case MA_BAD_SEEK:                      return \"Illegal seek\";\n        case MA_BAD_PIPE:                      return \"Broken pipe\";\n        case MA_DEADLOCK:                      return \"Deadlock\";\n        case MA_TOO_MANY_LINKS:                return \"Too many links\";\n        case MA_NOT_IMPLEMENTED:               return \"Not implemented\";\n        case MA_NO_MESSAGE:                    return \"No message of desired type\";\n        case MA_BAD_MESSAGE:                   return \"Invalid message\";\n        case MA_NO_DATA_AVAILABLE:             return \"No data available\";\n        case MA_INVALID_DATA:                  return \"Invalid data\";\n        case MA_TIMEOUT:                       return \"Timeout\";\n        case MA_NO_NETWORK:                    return \"Network unavailable\";\n        case MA_NOT_UNIQUE:                    return \"Not unique\";\n        case MA_NOT_SOCKET:                    return \"Socket operation on non-socket\";\n        case MA_NO_ADDRESS:                    return \"Destination address required\";\n        case MA_BAD_PROTOCOL:                  return \"Protocol wrong type for socket\";\n        case MA_PROTOCOL_UNAVAILABLE:          return \"Protocol not available\";\n        case MA_PROTOCOL_NOT_SUPPORTED:        return \"Protocol not supported\";\n        case MA_PROTOCOL_FAMILY_NOT_SUPPORTED: return \"Protocol family not supported\";\n        case MA_ADDRESS_FAMILY_NOT_SUPPORTED:  return \"Address family not supported\";\n        case MA_SOCKET_NOT_SUPPORTED:          return \"Socket type not supported\";\n        case MA_CONNECTION_RESET:              return \"Connection reset\";\n        case MA_ALREADY_CONNECTED:             return \"Already connected\";\n        case MA_NOT_CONNECTED:                 return \"Not connected\";\n        case MA_CONNECTION_REFUSED:            return \"Connection refused\";\n        case MA_NO_HOST:                       return \"No host\";\n        case MA_IN_PROGRESS:                   return \"Operation in progress\";\n        case MA_CANCELLED:                     return \"Operation cancelled\";\n        case MA_MEMORY_ALREADY_MAPPED:         return \"Memory already mapped\";\n\n        case MA_FORMAT_NOT_SUPPORTED:          return \"Format not supported\";\n        case MA_DEVICE_TYPE_NOT_SUPPORTED:     return \"Device type not supported\";\n        case MA_SHARE_MODE_NOT_SUPPORTED:      return \"Share mode not supported\";\n        case MA_NO_BACKEND:                    return \"No backend\";\n        case MA_NO_DEVICE:                     return \"No device\";\n        case MA_API_NOT_FOUND:                 return \"API not found\";\n        case MA_INVALID_DEVICE_CONFIG:         return \"Invalid device config\";\n\n        case MA_DEVICE_NOT_INITIALIZED:        return \"Device not initialized\";\n        case MA_DEVICE_NOT_STARTED:            return \"Device not started\";\n\n        case MA_FAILED_TO_INIT_BACKEND:        return \"Failed to initialize backend\";\n        case MA_FAILED_TO_OPEN_BACKEND_DEVICE: return \"Failed to open backend device\";\n        case MA_FAILED_TO_START_BACKEND_DEVICE: return \"Failed to start backend device\";\n        case MA_FAILED_TO_STOP_BACKEND_DEVICE: return \"Failed to stop backend device\";\n\n        default:                               return \"Unknown error\";\n    }\n}\n\nMA_API void* ma_malloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks != NULL) {\n        if (pAllocationCallbacks->onMalloc != NULL) {\n            return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData);\n        } else {\n            return NULL;    /* Do not fall back to the default implementation. */\n        }\n    } else {\n        return ma__malloc_default(sz, NULL);\n    }\n}\n\nMA_API void* ma_calloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    void* p = ma_malloc(sz, pAllocationCallbacks);\n    if (p != NULL) {\n        MA_ZERO_MEMORY(p, sz);\n    }\n\n    return p;\n}\n\nMA_API void* ma_realloc(void* p, size_t sz, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks != NULL) {\n        if (pAllocationCallbacks->onRealloc != NULL) {\n            return pAllocationCallbacks->onRealloc(p, sz, pAllocationCallbacks->pUserData);\n        } else {\n            return NULL;    /* Do not fall back to the default implementation. */\n        }\n    } else {\n        return ma__realloc_default(p, sz, NULL);\n    }\n}\n\nMA_API void ma_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (p == NULL) {\n        return;\n    }\n\n    if (pAllocationCallbacks != NULL) {\n        if (pAllocationCallbacks->onFree != NULL) {\n            pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData);\n        } else {\n            return; /* Do no fall back to the default implementation. */\n        }\n    } else {\n        ma__free_default(p, NULL);\n    }\n}\n\nMA_API void* ma_aligned_malloc(size_t sz, size_t alignment, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    size_t extraBytes;\n    void* pUnaligned;\n    void* pAligned;\n\n    if (alignment == 0) {\n        return 0;\n    }\n\n    extraBytes = alignment-1 + sizeof(void*);\n\n    pUnaligned = ma_malloc(sz + extraBytes, pAllocationCallbacks);\n    if (pUnaligned == NULL) {\n        return NULL;\n    }\n\n    pAligned = (void*)(((ma_uintptr)pUnaligned + extraBytes) & ~((ma_uintptr)(alignment-1)));\n    ((void**)pAligned)[-1] = pUnaligned;\n\n    return pAligned;\n}\n\nMA_API void ma_aligned_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_free(((void**)p)[-1], pAllocationCallbacks);\n}\n\nMA_API const char* ma_get_format_name(ma_format format)\n{\n    switch (format)\n    {\n        case ma_format_unknown: return \"Unknown\";\n        case ma_format_u8:      return \"8-bit Unsigned Integer\";\n        case ma_format_s16:     return \"16-bit Signed Integer\";\n        case ma_format_s24:     return \"24-bit Signed Integer (Tightly Packed)\";\n        case ma_format_s32:     return \"32-bit Signed Integer\";\n        case ma_format_f32:     return \"32-bit IEEE Floating Point\";\n        default:                return \"Invalid\";\n    }\n}\n\nMA_API void ma_blend_f32(float* pOut, float* pInA, float* pInB, float factor, ma_uint32 channels)\n{\n    ma_uint32 i;\n    for (i = 0; i < channels; ++i) {\n        pOut[i] = ma_mix_f32(pInA[i], pInB[i], factor);\n    }\n}\n\n\nMA_API ma_uint32 ma_get_bytes_per_sample(ma_format format)\n{\n    ma_uint32 sizes[] = {\n        0,  /* unknown */\n        1,  /* u8 */\n        2,  /* s16 */\n        3,  /* s24 */\n        4,  /* s32 */\n        4,  /* f32 */\n    };\n    return sizes[format];\n}\n\n\n\n#define MA_DATA_SOURCE_DEFAULT_RANGE_BEG        0\n#define MA_DATA_SOURCE_DEFAULT_RANGE_END        ~((ma_uint64)0)\n#define MA_DATA_SOURCE_DEFAULT_LOOP_POINT_BEG   0\n#define MA_DATA_SOURCE_DEFAULT_LOOP_POINT_END   ~((ma_uint64)0)\n\nMA_API ma_data_source_config ma_data_source_config_init(void)\n{\n    ma_data_source_config config;\n\n    MA_ZERO_OBJECT(&config);\n\n    return config;\n}\n\n\nMA_API ma_result ma_data_source_init(const ma_data_source_config* pConfig, ma_data_source* pDataSource)\n{\n    ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource;\n\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pDataSourceBase);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pDataSourceBase->vtable           = pConfig->vtable;\n    pDataSourceBase->rangeBegInFrames = MA_DATA_SOURCE_DEFAULT_RANGE_BEG;\n    pDataSourceBase->rangeEndInFrames = MA_DATA_SOURCE_DEFAULT_RANGE_END;\n    pDataSourceBase->loopBegInFrames  = MA_DATA_SOURCE_DEFAULT_LOOP_POINT_BEG;\n    pDataSourceBase->loopEndInFrames  = MA_DATA_SOURCE_DEFAULT_LOOP_POINT_END;\n    pDataSourceBase->pCurrent         = pDataSource;    /* Always read from ourself by default. */\n    pDataSourceBase->pNext            = NULL;\n    pDataSourceBase->onGetNext        = NULL;\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_data_source_uninit(ma_data_source* pDataSource)\n{\n    if (pDataSource == NULL) {\n        return;\n    }\n\n    /*\n    This is placeholder in case we need this later. Data sources need to call this in their\n    uninitialization routine to ensure things work later on if something is added here.\n    */\n}\n\nstatic ma_result ma_data_source_resolve_current(ma_data_source* pDataSource, ma_data_source** ppCurrentDataSource)\n{\n    ma_data_source_base* pCurrentDataSource = (ma_data_source_base*)pDataSource;\n\n    MA_ASSERT(pDataSource         != NULL);\n    MA_ASSERT(ppCurrentDataSource != NULL);\n\n    if (pCurrentDataSource->pCurrent == NULL) {\n        /*\n        The current data source is NULL. If we're using this in the context of a chain we need to return NULL\n        here so that we don't end up looping. Otherwise we just return the data source itself.\n        */\n        if (pCurrentDataSource->pNext != NULL || pCurrentDataSource->onGetNext != NULL) {\n            pCurrentDataSource = NULL;\n        } else {\n            pCurrentDataSource = (ma_data_source_base*)pDataSource; /* Not being used in a chain. Make sure we just always read from the data source itself at all times. */\n        }\n    } else {\n        pCurrentDataSource = (ma_data_source_base*)pCurrentDataSource->pCurrent;\n    }\n\n    *ppCurrentDataSource = pCurrentDataSource;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_data_source_read_pcm_frames_within_range(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource;\n    ma_result result;\n    ma_uint64 framesRead = 0;\n    ma_bool32 loop = ma_data_source_is_looping(pDataSource);\n\n    if (pDataSourceBase == NULL) {\n        return MA_AT_END;\n    }\n\n    if (frameCount == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if ((pDataSourceBase->vtable->flags & MA_DATA_SOURCE_SELF_MANAGED_RANGE_AND_LOOP_POINT) != 0 || (pDataSourceBase->rangeEndInFrames == ~((ma_uint64)0) && (pDataSourceBase->loopEndInFrames == ~((ma_uint64)0) || loop == MA_FALSE))) {\n        /* Either the data source is self-managing the range, or no range is set - just read like normal. The data source itself will tell us when the end is reached. */\n        result = pDataSourceBase->vtable->onRead(pDataSourceBase, pFramesOut, frameCount, &framesRead);\n    } else {\n        /* Need to clamp to within the range. */\n        ma_uint64 relativeCursor;\n        ma_uint64 absoluteCursor;\n\n        result = ma_data_source_get_cursor_in_pcm_frames(pDataSourceBase, &relativeCursor);\n        if (result != MA_SUCCESS) {\n            /* Failed to retrieve the cursor. Cannot read within a range or loop points. Just read like normal - this may happen for things like noise data sources where it doesn't really matter. */\n            result = pDataSourceBase->vtable->onRead(pDataSourceBase, pFramesOut, frameCount, &framesRead);\n        } else {\n            ma_uint64 rangeBeg;\n            ma_uint64 rangeEnd;\n\n            /* We have the cursor. We need to make sure we don't read beyond our range. */\n            rangeBeg = pDataSourceBase->rangeBegInFrames;\n            rangeEnd = pDataSourceBase->rangeEndInFrames;\n\n            absoluteCursor = rangeBeg + relativeCursor;\n\n            /* If looping, make sure we're within range. */\n            if (loop) {\n                if (pDataSourceBase->loopEndInFrames != ~((ma_uint64)0)) {\n                    rangeEnd = ma_min(rangeEnd, pDataSourceBase->rangeBegInFrames + pDataSourceBase->loopEndInFrames);\n                }\n            }\n\n            if (frameCount > (rangeEnd - absoluteCursor) && rangeEnd != ~((ma_uint64)0)) {\n                frameCount = (rangeEnd - absoluteCursor);\n            }\n\n            /*\n            If the cursor is sitting on the end of the range the frame count will be set to 0 which can\n            result in MA_INVALID_ARGS. In this case, we don't want to try reading, but instead return\n            MA_AT_END so the higher level function can know about it.\n            */\n            if (frameCount > 0) {\n                result = pDataSourceBase->vtable->onRead(pDataSourceBase, pFramesOut, frameCount, &framesRead);\n            } else {\n                result = MA_AT_END; /* The cursor is sitting on the end of the range which means we're at the end. */\n            }\n        }\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = framesRead;\n    }\n\n    /* We need to make sure MA_AT_END is returned if we hit the end of the range. */\n    if (result == MA_SUCCESS && framesRead == 0) {\n        result  = MA_AT_END;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_data_source_read_pcm_frames(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    ma_result result = MA_SUCCESS;\n    ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource;\n    ma_data_source_base* pCurrentDataSource;\n    void* pRunningFramesOut = pFramesOut;\n    ma_uint64 totalFramesProcessed = 0;\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 emptyLoopCounter = 0; /* Keeps track of how many times 0 frames have been read. For infinite loop detection of sounds with no audio data. */\n    ma_bool32 loop;\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    if (frameCount == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pDataSourceBase == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    loop = ma_data_source_is_looping(pDataSource);\n\n    /*\n    We need to know the data format so we can advance the output buffer as we read frames. If this\n    fails, chaining will not work and we'll just read as much as we can from the current source.\n    */\n    if (ma_data_source_get_data_format(pDataSource, &format, &channels, NULL, NULL, 0) != MA_SUCCESS) {\n        result = ma_data_source_resolve_current(pDataSource, (ma_data_source**)&pCurrentDataSource);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        return ma_data_source_read_pcm_frames_within_range(pCurrentDataSource, pFramesOut, frameCount, pFramesRead);\n    }\n\n    /*\n    Looping is a bit of a special case. When the `loop` argument is true, chaining will not work and\n    only the current data source will be read from.\n    */\n\n    /* Keep reading until we've read as many frames as possible. */\n    while (totalFramesProcessed < frameCount) {\n        ma_uint64 framesProcessed = 0;\n        ma_uint64 framesRemaining = frameCount - totalFramesProcessed;\n\n        /* We need to resolve the data source that we'll actually be reading from. */\n        result = ma_data_source_resolve_current(pDataSource, (ma_data_source**)&pCurrentDataSource);\n        if (result != MA_SUCCESS) {\n            break;\n        }\n\n        if (pCurrentDataSource == NULL) {\n            break;\n        }\n\n        result = ma_data_source_read_pcm_frames_within_range(pCurrentDataSource, pRunningFramesOut, framesRemaining, &framesProcessed);\n        totalFramesProcessed += framesProcessed;\n\n        /*\n        If we encounted an error from the read callback, make sure it's propagated to the caller. The caller may need to know whether or not MA_BUSY is returned which is\n        not necessarily considered an error.\n        */\n        if (result != MA_SUCCESS && result != MA_AT_END) {\n            break;\n        }\n\n        /*\n        We can determine if we've reached the end by checking if ma_data_source_read_pcm_frames_within_range() returned\n        MA_AT_END. To loop back to the start, all we need to do is seek back to the first frame.\n        */\n        if (result == MA_AT_END) {\n            /*\n            The result needs to be reset back to MA_SUCCESS (from MA_AT_END) so that we don't\n            accidentally return MA_AT_END when data has been read in prior loop iterations. at the\n            end of this function, the result will be checked for MA_SUCCESS, and if the total\n            number of frames processed is 0, will be explicitly set to MA_AT_END.\n            */\n            result = MA_SUCCESS;\n\n            /*\n            We reached the end. If we're looping, we just loop back to the start of the current\n            data source. If we're not looping we need to check if we have another in the chain, and\n            if so, switch to it.\n            */\n            if (loop) {\n                if (framesProcessed == 0) {\n                    emptyLoopCounter += 1;\n                    if (emptyLoopCounter > 1) {\n                        break;  /* Infinite loop detected. Get out. */\n                    }\n                } else {\n                    emptyLoopCounter = 0;\n                }\n\n                result = ma_data_source_seek_to_pcm_frame(pCurrentDataSource, pCurrentDataSource->loopBegInFrames);\n                if (result != MA_SUCCESS) {\n                    break;  /* Failed to loop. Abort. */\n                }\n\n                /* Don't return MA_AT_END for looping sounds. */\n                result = MA_SUCCESS;\n            } else {\n                if (pCurrentDataSource->pNext != NULL) {\n                    pDataSourceBase->pCurrent = pCurrentDataSource->pNext;\n                } else if (pCurrentDataSource->onGetNext != NULL) {\n                    pDataSourceBase->pCurrent = pCurrentDataSource->onGetNext(pCurrentDataSource);\n                    if (pDataSourceBase->pCurrent == NULL) {\n                        break;  /* Our callback did not return a next data source. We're done. */\n                    }\n                } else {\n                    /* Reached the end of the chain. We're done. */\n                    break;\n                }\n\n                /* The next data source needs to be rewound to ensure data is read in looping scenarios. */\n                result = ma_data_source_seek_to_pcm_frame(pDataSourceBase->pCurrent, 0);\n                if (result != MA_SUCCESS) {\n                    break;\n                }\n            }\n        }\n\n        if (pRunningFramesOut != NULL) {\n            pRunningFramesOut = ma_offset_ptr(pRunningFramesOut, framesProcessed * ma_get_bytes_per_frame(format, channels));\n        }\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = totalFramesProcessed;\n    }\n\n    MA_ASSERT(!(result == MA_AT_END && totalFramesProcessed > 0));  /* We should never be returning MA_AT_END if we read some data. */\n\n    if (result == MA_SUCCESS && totalFramesProcessed == 0) {\n        result  = MA_AT_END;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_data_source_seek_pcm_frames(ma_data_source* pDataSource, ma_uint64 frameCount, ma_uint64* pFramesSeeked)\n{\n    return ma_data_source_read_pcm_frames(pDataSource, NULL, frameCount, pFramesSeeked);\n}\n\nMA_API ma_result ma_data_source_seek_to_pcm_frame(ma_data_source* pDataSource, ma_uint64 frameIndex)\n{\n    ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource;\n\n    if (pDataSourceBase == NULL) {\n        return MA_SUCCESS;\n    }\n\n    if (pDataSourceBase->vtable->onSeek == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    if (frameIndex > pDataSourceBase->rangeEndInFrames) {\n        return MA_INVALID_OPERATION;    /* Trying to seek to far forward. */\n    }\n\n    return pDataSourceBase->vtable->onSeek(pDataSource, pDataSourceBase->rangeBegInFrames + frameIndex);\n}\n\nMA_API ma_result ma_data_source_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource;\n    ma_result result;\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n\n    /* Initialize to defaults for safety just in case the data source does not implement this callback. */\n    if (pFormat != NULL) {\n        *pFormat = ma_format_unknown;\n    }\n    if (pChannels != NULL) {\n        *pChannels = 0;\n    }\n    if (pSampleRate != NULL) {\n        *pSampleRate = 0;\n    }\n    if (pChannelMap != NULL) {\n        MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap);\n    }\n\n    if (pDataSourceBase == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pDataSourceBase->vtable->onGetDataFormat == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    result = pDataSourceBase->vtable->onGetDataFormat(pDataSource, &format, &channels, &sampleRate, pChannelMap, channelMapCap);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pFormat != NULL) {\n        *pFormat = format;\n    }\n    if (pChannels != NULL) {\n        *pChannels = channels;\n    }\n    if (pSampleRate != NULL) {\n        *pSampleRate = sampleRate;\n    }\n\n    /* Channel map was passed in directly to the callback. This is safe due to the channelMapCap parameter. */\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_data_source_get_cursor_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pCursor)\n{\n    ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource;\n    ma_result result;\n    ma_uint64 cursor;\n\n    if (pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = 0;\n\n    if (pDataSourceBase == NULL) {\n        return MA_SUCCESS;\n    }\n\n    if (pDataSourceBase->vtable->onGetCursor == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    result = pDataSourceBase->vtable->onGetCursor(pDataSourceBase, &cursor);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* The cursor needs to be made relative to the start of the range. */\n    if (cursor < pDataSourceBase->rangeBegInFrames) {   /* Safety check so we don't return some huge number. */\n        *pCursor = 0;\n    } else {\n        *pCursor = cursor - pDataSourceBase->rangeBegInFrames;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_data_source_get_length_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pLength)\n{\n    ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource;\n\n    if (pLength == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pLength = 0;\n\n    if (pDataSourceBase == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /*\n    If we have a range defined we'll use that to determine the length. This is one of rare times\n    where we'll actually trust the caller. If they've set the range, I think it's mostly safe to\n    assume they've set it based on some higher level knowledge of the structure of the sound bank.\n    */\n    if (pDataSourceBase->rangeEndInFrames != ~((ma_uint64)0)) {\n        *pLength = pDataSourceBase->rangeEndInFrames - pDataSourceBase->rangeBegInFrames;\n        return MA_SUCCESS;\n    }\n\n    /*\n    Getting here means a range is not defined so we'll need to get the data source itself to tell\n    us the length.\n    */\n    if (pDataSourceBase->vtable->onGetLength == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    return pDataSourceBase->vtable->onGetLength(pDataSource, pLength);\n}\n\nMA_API ma_result ma_data_source_get_cursor_in_seconds(ma_data_source* pDataSource, float* pCursor)\n{\n    ma_result result;\n    ma_uint64 cursorInPCMFrames;\n    ma_uint32 sampleRate;\n\n    if (pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = 0;\n\n    result = ma_data_source_get_cursor_in_pcm_frames(pDataSource, &cursorInPCMFrames);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    result = ma_data_source_get_data_format(pDataSource, NULL, NULL, &sampleRate, NULL, 0);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* VC6 does not support division of unsigned 64-bit integers with floating point numbers. Need to use a signed number. This shouldn't effect anything in practice. */\n    *pCursor = (ma_int64)cursorInPCMFrames / (float)sampleRate;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_data_source_get_length_in_seconds(ma_data_source* pDataSource, float* pLength)\n{\n    ma_result result;\n    ma_uint64 lengthInPCMFrames;\n    ma_uint32 sampleRate;\n\n    if (pLength == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pLength = 0;\n\n    result = ma_data_source_get_length_in_pcm_frames(pDataSource, &lengthInPCMFrames);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    result = ma_data_source_get_data_format(pDataSource, NULL, NULL, &sampleRate, NULL, 0);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* VC6 does not support division of unsigned 64-bit integers with floating point numbers. Need to use a signed number. This shouldn't effect anything in practice. */\n    *pLength = (ma_int64)lengthInPCMFrames / (float)sampleRate;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_data_source_set_looping(ma_data_source* pDataSource, ma_bool32 isLooping)\n{\n    ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource;\n\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_atomic_exchange_32(&pDataSourceBase->isLooping, isLooping);\n\n    /* If there's no callback for this just treat it as a successful no-op. */\n    if (pDataSourceBase->vtable->onSetLooping == NULL) {\n        return MA_SUCCESS;\n    }\n\n    return pDataSourceBase->vtable->onSetLooping(pDataSource, isLooping);\n}\n\nMA_API ma_bool32 ma_data_source_is_looping(const ma_data_source* pDataSource)\n{\n    const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource;\n\n    if (pDataSource == NULL) {\n        return MA_FALSE;\n    }\n\n    return ma_atomic_load_32(&pDataSourceBase->isLooping);\n}\n\nMA_API ma_result ma_data_source_set_range_in_pcm_frames(ma_data_source* pDataSource, ma_uint64 rangeBegInFrames, ma_uint64 rangeEndInFrames)\n{\n    ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource;\n    ma_result result;\n    ma_uint64 relativeCursor;\n    ma_uint64 absoluteCursor;\n    ma_bool32 doSeekAdjustment = MA_FALSE;\n\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (rangeEndInFrames < rangeBegInFrames) {\n        return MA_INVALID_ARGS; /* The end of the range must come after the beginning. */\n    }\n\n    /*\n    We may need to adjust the position of the cursor to ensure it's clamped to the range. Grab it now\n    so we can calculate it's absolute position before we change the range.\n    */\n    result = ma_data_source_get_cursor_in_pcm_frames(pDataSource, &relativeCursor);\n    if (result == MA_SUCCESS) {\n        doSeekAdjustment = MA_TRUE;\n        absoluteCursor = relativeCursor + pDataSourceBase->rangeBegInFrames;\n    } else {\n        /*\n        We couldn't get the position of the cursor. It probably means the data source has no notion\n        of a cursor. We'll just leave it at position 0. Don't treat this as an error.\n        */\n        doSeekAdjustment = MA_FALSE;\n        relativeCursor = 0;\n        absoluteCursor = 0;\n    }\n\n    pDataSourceBase->rangeBegInFrames = rangeBegInFrames;\n    pDataSourceBase->rangeEndInFrames = rangeEndInFrames;\n\n    /*\n    The commented out logic below was intended to maintain loop points in response to a change in the\n    range. However, this is not useful because it results in the sound breaking when you move the range\n    outside of the old loop points. I'm simplifying this by simply resetting the loop points. The\n    caller is expected to update their loop points if they change the range.\n\n    In practice this should be mostly a non-issue because the majority of the time the range will be\n    set once right after initialization.\n    */\n    pDataSourceBase->loopBegInFrames = 0;\n    pDataSourceBase->loopEndInFrames = ~((ma_uint64)0);\n\n\n    /*\n    Seek to within range. Note that our seek positions here are relative to the new range. We don't want\n    do do this if we failed to retrieve the cursor earlier on because it probably means the data source\n    has no notion of a cursor. In practice the seek would probably fail (which we silently ignore), but\n    I'm just not even going to attempt it.\n    */\n    if (doSeekAdjustment) {\n        if (absoluteCursor < rangeBegInFrames) {\n            ma_data_source_seek_to_pcm_frame(pDataSource, 0);\n        } else if (absoluteCursor > rangeEndInFrames) {\n            ma_data_source_seek_to_pcm_frame(pDataSource, rangeEndInFrames - rangeBegInFrames);\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_data_source_get_range_in_pcm_frames(const ma_data_source* pDataSource, ma_uint64* pRangeBegInFrames, ma_uint64* pRangeEndInFrames)\n{\n    const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource;\n\n    if (pDataSource == NULL) {\n        return;\n    }\n\n    if (pRangeBegInFrames != NULL) {\n        *pRangeBegInFrames = pDataSourceBase->rangeBegInFrames;\n    }\n\n    if (pRangeEndInFrames != NULL) {\n        *pRangeEndInFrames = pDataSourceBase->rangeEndInFrames;\n    }\n}\n\nMA_API ma_result ma_data_source_set_loop_point_in_pcm_frames(ma_data_source* pDataSource, ma_uint64 loopBegInFrames, ma_uint64 loopEndInFrames)\n{\n    ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource;\n\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (loopEndInFrames < loopBegInFrames) {\n        return MA_INVALID_ARGS; /* The end of the loop point must come after the beginning. */\n    }\n\n    if (loopEndInFrames > pDataSourceBase->rangeEndInFrames && loopEndInFrames != ~((ma_uint64)0)) {\n        return MA_INVALID_ARGS; /* The end of the loop point must not go beyond the range. */\n    }\n\n    pDataSourceBase->loopBegInFrames = loopBegInFrames;\n    pDataSourceBase->loopEndInFrames = loopEndInFrames;\n\n    /* The end cannot exceed the range. */\n    if (pDataSourceBase->loopEndInFrames > (pDataSourceBase->rangeEndInFrames - pDataSourceBase->rangeBegInFrames) && pDataSourceBase->loopEndInFrames != ~((ma_uint64)0)) {\n        pDataSourceBase->loopEndInFrames = (pDataSourceBase->rangeEndInFrames - pDataSourceBase->rangeBegInFrames);\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_data_source_get_loop_point_in_pcm_frames(const ma_data_source* pDataSource, ma_uint64* pLoopBegInFrames, ma_uint64* pLoopEndInFrames)\n{\n    const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource;\n\n    if (pDataSource == NULL) {\n        return;\n    }\n\n    if (pLoopBegInFrames != NULL) {\n        *pLoopBegInFrames = pDataSourceBase->loopBegInFrames;\n    }\n\n    if (pLoopEndInFrames != NULL) {\n        *pLoopEndInFrames = pDataSourceBase->loopEndInFrames;\n    }\n}\n\nMA_API ma_result ma_data_source_set_current(ma_data_source* pDataSource, ma_data_source* pCurrentDataSource)\n{\n    ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource;\n\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pDataSourceBase->pCurrent = pCurrentDataSource;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_data_source* ma_data_source_get_current(const ma_data_source* pDataSource)\n{\n    const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource;\n\n    if (pDataSource == NULL) {\n        return NULL;\n    }\n\n    return pDataSourceBase->pCurrent;\n}\n\nMA_API ma_result ma_data_source_set_next(ma_data_source* pDataSource, ma_data_source* pNextDataSource)\n{\n    ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource;\n\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pDataSourceBase->pNext = pNextDataSource;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_data_source* ma_data_source_get_next(const ma_data_source* pDataSource)\n{\n    const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource;\n\n    if (pDataSource == NULL) {\n        return NULL;\n    }\n\n    return pDataSourceBase->pNext;\n}\n\nMA_API ma_result ma_data_source_set_next_callback(ma_data_source* pDataSource, ma_data_source_get_next_proc onGetNext)\n{\n    ma_data_source_base* pDataSourceBase = (ma_data_source_base*)pDataSource;\n\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pDataSourceBase->onGetNext = onGetNext;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_data_source_get_next_proc ma_data_source_get_next_callback(const ma_data_source* pDataSource)\n{\n    const ma_data_source_base* pDataSourceBase = (const ma_data_source_base*)pDataSource;\n\n    if (pDataSource == NULL) {\n        return NULL;\n    }\n\n    return pDataSourceBase->onGetNext;\n}\n\n\nstatic ma_result ma_audio_buffer_ref__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    ma_audio_buffer_ref* pAudioBufferRef = (ma_audio_buffer_ref*)pDataSource;\n    ma_uint64 framesRead = ma_audio_buffer_ref_read_pcm_frames(pAudioBufferRef, pFramesOut, frameCount, MA_FALSE);\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = framesRead;\n    }\n\n    if (framesRead < frameCount || framesRead == 0) {\n        return MA_AT_END;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_audio_buffer_ref__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex)\n{\n    return ma_audio_buffer_ref_seek_to_pcm_frame((ma_audio_buffer_ref*)pDataSource, frameIndex);\n}\n\nstatic ma_result ma_audio_buffer_ref__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    ma_audio_buffer_ref* pAudioBufferRef = (ma_audio_buffer_ref*)pDataSource;\n\n    *pFormat     = pAudioBufferRef->format;\n    *pChannels   = pAudioBufferRef->channels;\n    *pSampleRate = pAudioBufferRef->sampleRate;\n    ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pAudioBufferRef->channels);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_audio_buffer_ref__data_source_on_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor)\n{\n    ma_audio_buffer_ref* pAudioBufferRef = (ma_audio_buffer_ref*)pDataSource;\n\n    *pCursor = pAudioBufferRef->cursor;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_audio_buffer_ref__data_source_on_get_length(ma_data_source* pDataSource, ma_uint64* pLength)\n{\n    ma_audio_buffer_ref* pAudioBufferRef = (ma_audio_buffer_ref*)pDataSource;\n\n    *pLength = pAudioBufferRef->sizeInFrames;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_data_source_vtable g_ma_audio_buffer_ref_data_source_vtable =\n{\n    ma_audio_buffer_ref__data_source_on_read,\n    ma_audio_buffer_ref__data_source_on_seek,\n    ma_audio_buffer_ref__data_source_on_get_data_format,\n    ma_audio_buffer_ref__data_source_on_get_cursor,\n    ma_audio_buffer_ref__data_source_on_get_length,\n    NULL,   /* onSetLooping */\n    0\n};\n\nMA_API ma_result ma_audio_buffer_ref_init(ma_format format, ma_uint32 channels, const void* pData, ma_uint64 sizeInFrames, ma_audio_buffer_ref* pAudioBufferRef)\n{\n    ma_result result;\n    ma_data_source_config dataSourceConfig;\n\n    if (pAudioBufferRef == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pAudioBufferRef);\n\n    dataSourceConfig = ma_data_source_config_init();\n    dataSourceConfig.vtable = &g_ma_audio_buffer_ref_data_source_vtable;\n\n    result = ma_data_source_init(&dataSourceConfig, &pAudioBufferRef->ds);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pAudioBufferRef->format       = format;\n    pAudioBufferRef->channels     = channels;\n    pAudioBufferRef->sampleRate   = 0;  /* TODO: Version 0.12. Set this to sampleRate. */\n    pAudioBufferRef->cursor       = 0;\n    pAudioBufferRef->sizeInFrames = sizeInFrames;\n    pAudioBufferRef->pData        = pData;\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_audio_buffer_ref_uninit(ma_audio_buffer_ref* pAudioBufferRef)\n{\n    if (pAudioBufferRef == NULL) {\n        return;\n    }\n\n    ma_data_source_uninit(&pAudioBufferRef->ds);\n}\n\nMA_API ma_result ma_audio_buffer_ref_set_data(ma_audio_buffer_ref* pAudioBufferRef, const void* pData, ma_uint64 sizeInFrames)\n{\n    if (pAudioBufferRef == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pAudioBufferRef->cursor       = 0;\n    pAudioBufferRef->sizeInFrames = sizeInFrames;\n    pAudioBufferRef->pData        = pData;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_uint64 ma_audio_buffer_ref_read_pcm_frames(ma_audio_buffer_ref* pAudioBufferRef, void* pFramesOut, ma_uint64 frameCount, ma_bool32 loop)\n{\n    ma_uint64 totalFramesRead = 0;\n\n    if (pAudioBufferRef == NULL) {\n        return 0;\n    }\n\n    if (frameCount == 0) {\n        return 0;\n    }\n\n    while (totalFramesRead < frameCount) {\n        ma_uint64 framesAvailable = pAudioBufferRef->sizeInFrames - pAudioBufferRef->cursor;\n        ma_uint64 framesRemaining = frameCount - totalFramesRead;\n        ma_uint64 framesToRead;\n\n        framesToRead = framesRemaining;\n        if (framesToRead > framesAvailable) {\n            framesToRead = framesAvailable;\n        }\n\n        if (pFramesOut != NULL) {\n            ma_copy_pcm_frames(ma_offset_ptr(pFramesOut, totalFramesRead * ma_get_bytes_per_frame(pAudioBufferRef->format, pAudioBufferRef->channels)), ma_offset_ptr(pAudioBufferRef->pData, pAudioBufferRef->cursor * ma_get_bytes_per_frame(pAudioBufferRef->format, pAudioBufferRef->channels)), framesToRead, pAudioBufferRef->format, pAudioBufferRef->channels);\n        }\n\n        totalFramesRead += framesToRead;\n\n        pAudioBufferRef->cursor += framesToRead;\n        if (pAudioBufferRef->cursor == pAudioBufferRef->sizeInFrames) {\n            if (loop) {\n                pAudioBufferRef->cursor = 0;\n            } else {\n                break;  /* We've reached the end and we're not looping. Done. */\n            }\n        }\n\n        MA_ASSERT(pAudioBufferRef->cursor < pAudioBufferRef->sizeInFrames);\n    }\n\n    return totalFramesRead;\n}\n\nMA_API ma_result ma_audio_buffer_ref_seek_to_pcm_frame(ma_audio_buffer_ref* pAudioBufferRef, ma_uint64 frameIndex)\n{\n    if (pAudioBufferRef == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (frameIndex > pAudioBufferRef->sizeInFrames) {\n        return MA_INVALID_ARGS;\n    }\n\n    pAudioBufferRef->cursor = (size_t)frameIndex;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_audio_buffer_ref_map(ma_audio_buffer_ref* pAudioBufferRef, void** ppFramesOut, ma_uint64* pFrameCount)\n{\n    ma_uint64 framesAvailable;\n    ma_uint64 frameCount = 0;\n\n    if (ppFramesOut != NULL) {\n        *ppFramesOut = NULL;    /* Safety. */\n    }\n\n    if (pFrameCount != NULL) {\n        frameCount = *pFrameCount;\n        *pFrameCount = 0;       /* Safety. */\n    }\n\n    if (pAudioBufferRef == NULL || ppFramesOut == NULL || pFrameCount == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    framesAvailable = pAudioBufferRef->sizeInFrames - pAudioBufferRef->cursor;\n    if (frameCount > framesAvailable) {\n        frameCount = framesAvailable;\n    }\n\n    *ppFramesOut = ma_offset_ptr(pAudioBufferRef->pData, pAudioBufferRef->cursor * ma_get_bytes_per_frame(pAudioBufferRef->format, pAudioBufferRef->channels));\n    *pFrameCount = frameCount;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_audio_buffer_ref_unmap(ma_audio_buffer_ref* pAudioBufferRef, ma_uint64 frameCount)\n{\n    ma_uint64 framesAvailable;\n\n    if (pAudioBufferRef == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    framesAvailable = pAudioBufferRef->sizeInFrames - pAudioBufferRef->cursor;\n    if (frameCount > framesAvailable) {\n        return MA_INVALID_ARGS;   /* The frame count was too big. This should never happen in an unmapping. Need to make sure the caller is aware of this. */\n    }\n\n    pAudioBufferRef->cursor += frameCount;\n\n    if (pAudioBufferRef->cursor == pAudioBufferRef->sizeInFrames) {\n        return MA_AT_END;   /* Successful. Need to tell the caller that the end has been reached so that it can loop if desired. */\n    } else {\n        return MA_SUCCESS;\n    }\n}\n\nMA_API ma_bool32 ma_audio_buffer_ref_at_end(const ma_audio_buffer_ref* pAudioBufferRef)\n{\n    if (pAudioBufferRef == NULL) {\n        return MA_FALSE;\n    }\n\n    return pAudioBufferRef->cursor == pAudioBufferRef->sizeInFrames;\n}\n\nMA_API ma_result ma_audio_buffer_ref_get_cursor_in_pcm_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pCursor)\n{\n    if (pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = 0;\n\n    if (pAudioBufferRef == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = pAudioBufferRef->cursor;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_audio_buffer_ref_get_length_in_pcm_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pLength)\n{\n    if (pLength == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pLength = 0;\n\n    if (pAudioBufferRef == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pLength = pAudioBufferRef->sizeInFrames;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_audio_buffer_ref_get_available_frames(const ma_audio_buffer_ref* pAudioBufferRef, ma_uint64* pAvailableFrames)\n{\n    if (pAvailableFrames == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pAvailableFrames = 0;\n\n    if (pAudioBufferRef == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pAudioBufferRef->sizeInFrames <= pAudioBufferRef->cursor) {\n        *pAvailableFrames = 0;\n    } else {\n        *pAvailableFrames = pAudioBufferRef->sizeInFrames - pAudioBufferRef->cursor;\n    }\n\n    return MA_SUCCESS;\n}\n\n\n\n\nMA_API ma_audio_buffer_config ma_audio_buffer_config_init(ma_format format, ma_uint32 channels, ma_uint64 sizeInFrames, const void* pData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_audio_buffer_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format       = format;\n    config.channels     = channels;\n    config.sampleRate   = 0;    /* TODO: Version 0.12. Set this to sampleRate. */\n    config.sizeInFrames = sizeInFrames;\n    config.pData        = pData;\n    ma_allocation_callbacks_init_copy(&config.allocationCallbacks, pAllocationCallbacks);\n\n    return config;\n}\n\nstatic ma_result ma_audio_buffer_init_ex(const ma_audio_buffer_config* pConfig, ma_bool32 doCopy, ma_audio_buffer* pAudioBuffer)\n{\n    ma_result result;\n\n    if (pAudioBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_MEMORY(pAudioBuffer, sizeof(*pAudioBuffer) - sizeof(pAudioBuffer->_pExtraData));   /* Safety. Don't overwrite the extra data. */\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->sizeInFrames == 0) {\n        return MA_INVALID_ARGS; /* Not allowing buffer sizes of 0 frames. */\n    }\n\n    result = ma_audio_buffer_ref_init(pConfig->format, pConfig->channels, NULL, 0, &pAudioBuffer->ref);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* TODO: Version 0.12. Set this in ma_audio_buffer_ref_init() instead of here. */\n    pAudioBuffer->ref.sampleRate = pConfig->sampleRate;\n\n    ma_allocation_callbacks_init_copy(&pAudioBuffer->allocationCallbacks, &pConfig->allocationCallbacks);\n\n    if (doCopy) {\n        ma_uint64 allocationSizeInBytes;\n        void* pData;\n\n        allocationSizeInBytes = pConfig->sizeInFrames * ma_get_bytes_per_frame(pConfig->format, pConfig->channels);\n        if (allocationSizeInBytes > MA_SIZE_MAX) {\n            return MA_OUT_OF_MEMORY;    /* Too big. */\n        }\n\n        pData = ma_malloc((size_t)allocationSizeInBytes, &pAudioBuffer->allocationCallbacks);   /* Safe cast to size_t. */\n        if (pData == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n\n        if (pConfig->pData != NULL) {\n            ma_copy_pcm_frames(pData, pConfig->pData, pConfig->sizeInFrames, pConfig->format, pConfig->channels);\n        } else {\n            ma_silence_pcm_frames(pData, pConfig->sizeInFrames, pConfig->format, pConfig->channels);\n        }\n\n        ma_audio_buffer_ref_set_data(&pAudioBuffer->ref, pData, pConfig->sizeInFrames);\n        pAudioBuffer->ownsData = MA_TRUE;\n    } else {\n        ma_audio_buffer_ref_set_data(&pAudioBuffer->ref, pConfig->pData, pConfig->sizeInFrames);\n        pAudioBuffer->ownsData = MA_FALSE;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_audio_buffer_uninit_ex(ma_audio_buffer* pAudioBuffer, ma_bool32 doFree)\n{\n    if (pAudioBuffer == NULL) {\n        return;\n    }\n\n    if (pAudioBuffer->ownsData && pAudioBuffer->ref.pData != &pAudioBuffer->_pExtraData[0]) {\n        ma_free((void*)pAudioBuffer->ref.pData, &pAudioBuffer->allocationCallbacks);    /* Naugty const cast, but OK in this case since we've guarded it with the ownsData check. */\n    }\n\n    if (doFree) {\n        ma_free(pAudioBuffer, &pAudioBuffer->allocationCallbacks);\n    }\n\n    ma_audio_buffer_ref_uninit(&pAudioBuffer->ref);\n}\n\nMA_API ma_result ma_audio_buffer_init(const ma_audio_buffer_config* pConfig, ma_audio_buffer* pAudioBuffer)\n{\n    return ma_audio_buffer_init_ex(pConfig, MA_FALSE, pAudioBuffer);\n}\n\nMA_API ma_result ma_audio_buffer_init_copy(const ma_audio_buffer_config* pConfig, ma_audio_buffer* pAudioBuffer)\n{\n    return ma_audio_buffer_init_ex(pConfig, MA_TRUE, pAudioBuffer);\n}\n\nMA_API ma_result ma_audio_buffer_alloc_and_init(const ma_audio_buffer_config* pConfig, ma_audio_buffer** ppAudioBuffer)\n{\n    ma_result result;\n    ma_audio_buffer* pAudioBuffer;\n    ma_audio_buffer_config innerConfig; /* We'll be making some changes to the config, so need to make a copy. */\n    ma_uint64 allocationSizeInBytes;\n\n    if (ppAudioBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *ppAudioBuffer = NULL;  /* Safety. */\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    innerConfig = *pConfig;\n    ma_allocation_callbacks_init_copy(&innerConfig.allocationCallbacks, &pConfig->allocationCallbacks);\n\n    allocationSizeInBytes = sizeof(*pAudioBuffer) - sizeof(pAudioBuffer->_pExtraData) + (pConfig->sizeInFrames * ma_get_bytes_per_frame(pConfig->format, pConfig->channels));\n    if (allocationSizeInBytes > MA_SIZE_MAX) {\n        return MA_OUT_OF_MEMORY;    /* Too big. */\n    }\n\n    pAudioBuffer = (ma_audio_buffer*)ma_malloc((size_t)allocationSizeInBytes, &innerConfig.allocationCallbacks);  /* Safe cast to size_t. */\n    if (pAudioBuffer == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    if (pConfig->pData != NULL) {\n        ma_copy_pcm_frames(&pAudioBuffer->_pExtraData[0], pConfig->pData, pConfig->sizeInFrames, pConfig->format, pConfig->channels);\n    } else {\n        ma_silence_pcm_frames(&pAudioBuffer->_pExtraData[0], pConfig->sizeInFrames, pConfig->format, pConfig->channels);\n    }\n\n    innerConfig.pData = &pAudioBuffer->_pExtraData[0];\n\n    result = ma_audio_buffer_init_ex(&innerConfig, MA_FALSE, pAudioBuffer);\n    if (result != MA_SUCCESS) {\n        ma_free(pAudioBuffer, &innerConfig.allocationCallbacks);\n        return result;\n    }\n\n    *ppAudioBuffer = pAudioBuffer;\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_audio_buffer_uninit(ma_audio_buffer* pAudioBuffer)\n{\n    ma_audio_buffer_uninit_ex(pAudioBuffer, MA_FALSE);\n}\n\nMA_API void ma_audio_buffer_uninit_and_free(ma_audio_buffer* pAudioBuffer)\n{\n    ma_audio_buffer_uninit_ex(pAudioBuffer, MA_TRUE);\n}\n\nMA_API ma_uint64 ma_audio_buffer_read_pcm_frames(ma_audio_buffer* pAudioBuffer, void* pFramesOut, ma_uint64 frameCount, ma_bool32 loop)\n{\n    if (pAudioBuffer == NULL) {\n        return 0;\n    }\n\n    return ma_audio_buffer_ref_read_pcm_frames(&pAudioBuffer->ref, pFramesOut, frameCount, loop);\n}\n\nMA_API ma_result ma_audio_buffer_seek_to_pcm_frame(ma_audio_buffer* pAudioBuffer, ma_uint64 frameIndex)\n{\n    if (pAudioBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_audio_buffer_ref_seek_to_pcm_frame(&pAudioBuffer->ref, frameIndex);\n}\n\nMA_API ma_result ma_audio_buffer_map(ma_audio_buffer* pAudioBuffer, void** ppFramesOut, ma_uint64* pFrameCount)\n{\n    if (ppFramesOut != NULL) {\n        *ppFramesOut = NULL;    /* Safety. */\n    }\n\n    if (pAudioBuffer == NULL) {\n        if (pFrameCount != NULL) {\n            *pFrameCount = 0;\n        }\n\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_audio_buffer_ref_map(&pAudioBuffer->ref, ppFramesOut, pFrameCount);\n}\n\nMA_API ma_result ma_audio_buffer_unmap(ma_audio_buffer* pAudioBuffer, ma_uint64 frameCount)\n{\n    if (pAudioBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_audio_buffer_ref_unmap(&pAudioBuffer->ref, frameCount);\n}\n\nMA_API ma_bool32 ma_audio_buffer_at_end(const ma_audio_buffer* pAudioBuffer)\n{\n    if (pAudioBuffer == NULL) {\n        return MA_FALSE;\n    }\n\n    return ma_audio_buffer_ref_at_end(&pAudioBuffer->ref);\n}\n\nMA_API ma_result ma_audio_buffer_get_cursor_in_pcm_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pCursor)\n{\n    if (pAudioBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_audio_buffer_ref_get_cursor_in_pcm_frames(&pAudioBuffer->ref, pCursor);\n}\n\nMA_API ma_result ma_audio_buffer_get_length_in_pcm_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pLength)\n{\n    if (pAudioBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_audio_buffer_ref_get_length_in_pcm_frames(&pAudioBuffer->ref, pLength);\n}\n\nMA_API ma_result ma_audio_buffer_get_available_frames(const ma_audio_buffer* pAudioBuffer, ma_uint64* pAvailableFrames)\n{\n    if (pAvailableFrames == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pAvailableFrames = 0;\n\n    if (pAudioBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_audio_buffer_ref_get_available_frames(&pAudioBuffer->ref, pAvailableFrames);\n}\n\n\n\n\n\nMA_API ma_result ma_paged_audio_buffer_data_init(ma_format format, ma_uint32 channels, ma_paged_audio_buffer_data* pData)\n{\n    if (pData == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pData);\n\n    pData->format   = format;\n    pData->channels = channels;\n    pData->pTail    = &pData->head;\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_paged_audio_buffer_data_uninit(ma_paged_audio_buffer_data* pData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_paged_audio_buffer_page* pPage;\n\n    if (pData == NULL) {\n        return;\n    }\n\n    /* All pages need to be freed. */\n    pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pData->head.pNext);\n    while (pPage != NULL) {\n        ma_paged_audio_buffer_page* pNext = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pPage->pNext);\n\n        ma_free(pPage, pAllocationCallbacks);\n        pPage = pNext;\n    }\n}\n\nMA_API ma_paged_audio_buffer_page* ma_paged_audio_buffer_data_get_head(ma_paged_audio_buffer_data* pData)\n{\n    if (pData == NULL) {\n        return NULL;\n    }\n\n    return &pData->head;\n}\n\nMA_API ma_paged_audio_buffer_page* ma_paged_audio_buffer_data_get_tail(ma_paged_audio_buffer_data* pData)\n{\n    if (pData == NULL) {\n        return NULL;\n    }\n\n    return pData->pTail;\n}\n\nMA_API ma_result ma_paged_audio_buffer_data_get_length_in_pcm_frames(ma_paged_audio_buffer_data* pData, ma_uint64* pLength)\n{\n    ma_paged_audio_buffer_page* pPage;\n\n    if (pLength == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pLength = 0;\n\n    if (pData == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Calculate the length from the linked list. */\n    for (pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pData->head.pNext); pPage != NULL; pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pPage->pNext)) {\n        *pLength += pPage->sizeInFrames;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_paged_audio_buffer_data_allocate_page(ma_paged_audio_buffer_data* pData, ma_uint64 pageSizeInFrames, const void* pInitialData, const ma_allocation_callbacks* pAllocationCallbacks, ma_paged_audio_buffer_page** ppPage)\n{\n    ma_paged_audio_buffer_page* pPage;\n    ma_uint64 allocationSize;\n\n    if (ppPage == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *ppPage = NULL;\n\n    if (pData == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    allocationSize = sizeof(*pPage) + (pageSizeInFrames * ma_get_bytes_per_frame(pData->format, pData->channels));\n    if (allocationSize > MA_SIZE_MAX) {\n        return MA_OUT_OF_MEMORY;    /* Too big. */\n    }\n\n    pPage = (ma_paged_audio_buffer_page*)ma_malloc((size_t)allocationSize, pAllocationCallbacks);   /* Safe cast to size_t. */\n    if (pPage == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    pPage->pNext = NULL;\n    pPage->sizeInFrames = pageSizeInFrames;\n\n    if (pInitialData != NULL) {\n        ma_copy_pcm_frames(pPage->pAudioData, pInitialData, pageSizeInFrames, pData->format, pData->channels);\n    }\n\n    *ppPage = pPage;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_paged_audio_buffer_data_free_page(ma_paged_audio_buffer_data* pData, ma_paged_audio_buffer_page* pPage, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pData == NULL || pPage == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* It's assumed the page is not attached to the list. */\n    ma_free(pPage, pAllocationCallbacks);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_paged_audio_buffer_data_append_page(ma_paged_audio_buffer_data* pData, ma_paged_audio_buffer_page* pPage)\n{\n    if (pData == NULL || pPage == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* This function assumes the page has been filled with audio data by this point. As soon as we append, the page will be available for reading. */\n\n    /* First thing to do is update the tail. */\n    for (;;) {\n        ma_paged_audio_buffer_page* pOldTail = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pData->pTail);\n        ma_paged_audio_buffer_page* pNewTail = pPage;\n\n        if (ma_atomic_compare_exchange_weak_ptr((volatile void**)&pData->pTail, (void**)&pOldTail, pNewTail)) {\n            /* Here is where we append the page to the list. After this, the page is attached to the list and ready to be read from. */\n            ma_atomic_exchange_ptr(&pOldTail->pNext, pPage);\n            break;  /* Done. */\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_paged_audio_buffer_data_allocate_and_append_page(ma_paged_audio_buffer_data* pData, ma_uint32 pageSizeInFrames, const void* pInitialData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_result result;\n    ma_paged_audio_buffer_page* pPage;\n\n    result = ma_paged_audio_buffer_data_allocate_page(pData, pageSizeInFrames, pInitialData, pAllocationCallbacks, &pPage);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return ma_paged_audio_buffer_data_append_page(pData, pPage);    /* <-- Should never fail. */\n}\n\n\nMA_API ma_paged_audio_buffer_config ma_paged_audio_buffer_config_init(ma_paged_audio_buffer_data* pData)\n{\n    ma_paged_audio_buffer_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.pData = pData;\n\n    return config;\n}\n\n\nstatic ma_result ma_paged_audio_buffer__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    return ma_paged_audio_buffer_read_pcm_frames((ma_paged_audio_buffer*)pDataSource, pFramesOut, frameCount, pFramesRead);\n}\n\nstatic ma_result ma_paged_audio_buffer__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex)\n{\n    return ma_paged_audio_buffer_seek_to_pcm_frame((ma_paged_audio_buffer*)pDataSource, frameIndex);\n}\n\nstatic ma_result ma_paged_audio_buffer__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    ma_paged_audio_buffer* pPagedAudioBuffer = (ma_paged_audio_buffer*)pDataSource;\n\n    *pFormat     = pPagedAudioBuffer->pData->format;\n    *pChannels   = pPagedAudioBuffer->pData->channels;\n    *pSampleRate = 0;   /* There is no notion of a sample rate with audio buffers. */\n    ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pPagedAudioBuffer->pData->channels);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_paged_audio_buffer__data_source_on_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor)\n{\n    return ma_paged_audio_buffer_get_cursor_in_pcm_frames((ma_paged_audio_buffer*)pDataSource, pCursor);\n}\n\nstatic ma_result ma_paged_audio_buffer__data_source_on_get_length(ma_data_source* pDataSource, ma_uint64* pLength)\n{\n    return ma_paged_audio_buffer_get_length_in_pcm_frames((ma_paged_audio_buffer*)pDataSource, pLength);\n}\n\nstatic ma_data_source_vtable g_ma_paged_audio_buffer_data_source_vtable =\n{\n    ma_paged_audio_buffer__data_source_on_read,\n    ma_paged_audio_buffer__data_source_on_seek,\n    ma_paged_audio_buffer__data_source_on_get_data_format,\n    ma_paged_audio_buffer__data_source_on_get_cursor,\n    ma_paged_audio_buffer__data_source_on_get_length,\n    NULL,   /* onSetLooping */\n    0\n};\n\nMA_API ma_result ma_paged_audio_buffer_init(const ma_paged_audio_buffer_config* pConfig, ma_paged_audio_buffer* pPagedAudioBuffer)\n{\n    ma_result result;\n    ma_data_source_config dataSourceConfig;\n\n    if (pPagedAudioBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pPagedAudioBuffer);\n\n    /* A config is required for the format and channel count. */\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->pData == NULL) {\n        return MA_INVALID_ARGS; /* No underlying data specified. */\n    }\n\n    dataSourceConfig = ma_data_source_config_init();\n    dataSourceConfig.vtable = &g_ma_paged_audio_buffer_data_source_vtable;\n\n    result = ma_data_source_init(&dataSourceConfig, &pPagedAudioBuffer->ds);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pPagedAudioBuffer->pData          = pConfig->pData;\n    pPagedAudioBuffer->pCurrent       = ma_paged_audio_buffer_data_get_head(pConfig->pData);\n    pPagedAudioBuffer->relativeCursor = 0;\n    pPagedAudioBuffer->absoluteCursor = 0;\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_paged_audio_buffer_uninit(ma_paged_audio_buffer* pPagedAudioBuffer)\n{\n    if (pPagedAudioBuffer == NULL) {\n        return;\n    }\n\n    /* Nothing to do. The data needs to be deleted separately. */\n}\n\nMA_API ma_result ma_paged_audio_buffer_read_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint64 totalFramesRead = 0;\n    ma_format format;\n    ma_uint32 channels;\n\n    if (pPagedAudioBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    format   = pPagedAudioBuffer->pData->format;\n    channels = pPagedAudioBuffer->pData->channels;\n\n    while (totalFramesRead < frameCount) {\n        /* Read from the current page. The buffer should never be in a state where this is NULL. */\n        ma_uint64 framesRemainingInCurrentPage;\n        ma_uint64 framesRemainingToRead = frameCount - totalFramesRead;\n        ma_uint64 framesToReadThisIteration;\n\n        MA_ASSERT(pPagedAudioBuffer->pCurrent != NULL);\n\n        framesRemainingInCurrentPage = pPagedAudioBuffer->pCurrent->sizeInFrames - pPagedAudioBuffer->relativeCursor;\n\n        framesToReadThisIteration = ma_min(framesRemainingInCurrentPage, framesRemainingToRead);\n        ma_copy_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), ma_offset_pcm_frames_ptr(pPagedAudioBuffer->pCurrent->pAudioData, pPagedAudioBuffer->relativeCursor, format, channels), framesToReadThisIteration, format, channels);\n        totalFramesRead += framesToReadThisIteration;\n\n        pPagedAudioBuffer->absoluteCursor += framesToReadThisIteration;\n        pPagedAudioBuffer->relativeCursor += framesToReadThisIteration;\n\n        /* Move to the next page if necessary. If there's no more pages, we need to return MA_AT_END. */\n        MA_ASSERT(pPagedAudioBuffer->relativeCursor <= pPagedAudioBuffer->pCurrent->sizeInFrames);\n\n        if (pPagedAudioBuffer->relativeCursor == pPagedAudioBuffer->pCurrent->sizeInFrames) {\n            /* We reached the end of the page. Need to move to the next. If there's no more pages, we're done. */\n            ma_paged_audio_buffer_page* pNext = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pPagedAudioBuffer->pCurrent->pNext);\n            if (pNext == NULL) {\n                result = MA_AT_END;\n                break;  /* We've reached the end. */\n            } else {\n                pPagedAudioBuffer->pCurrent       = pNext;\n                pPagedAudioBuffer->relativeCursor = 0;\n            }\n        }\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = totalFramesRead;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_paged_audio_buffer_seek_to_pcm_frame(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64 frameIndex)\n{\n    if (pPagedAudioBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (frameIndex == pPagedAudioBuffer->absoluteCursor) {\n        return MA_SUCCESS;  /* Nothing to do. */\n    }\n\n    if (frameIndex < pPagedAudioBuffer->absoluteCursor) {\n        /* Moving backwards. Need to move the cursor back to the start, and then move forward. */\n        pPagedAudioBuffer->pCurrent       = ma_paged_audio_buffer_data_get_head(pPagedAudioBuffer->pData);\n        pPagedAudioBuffer->absoluteCursor = 0;\n        pPagedAudioBuffer->relativeCursor = 0;\n\n        /* Fall through to the forward seeking section below. */\n    }\n\n    if (frameIndex > pPagedAudioBuffer->absoluteCursor) {\n        /* Moving forward. */\n        ma_paged_audio_buffer_page* pPage;\n        ma_uint64 runningCursor = 0;\n\n        for (pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&ma_paged_audio_buffer_data_get_head(pPagedAudioBuffer->pData)->pNext); pPage != NULL; pPage = (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(&pPage->pNext)) {\n            ma_uint64 pageRangeBeg = runningCursor;\n            ma_uint64 pageRangeEnd = pageRangeBeg + pPage->sizeInFrames;\n\n            if (frameIndex >= pageRangeBeg) {\n                if (frameIndex < pageRangeEnd || (frameIndex == pageRangeEnd && pPage == (ma_paged_audio_buffer_page*)ma_atomic_load_ptr(ma_paged_audio_buffer_data_get_tail(pPagedAudioBuffer->pData)))) {  /* A small edge case - allow seeking to the very end of the buffer. */\n                    /* We found the page. */\n                    pPagedAudioBuffer->pCurrent       = pPage;\n                    pPagedAudioBuffer->absoluteCursor = frameIndex;\n                    pPagedAudioBuffer->relativeCursor = frameIndex - pageRangeBeg;\n                    return MA_SUCCESS;\n                }\n            }\n\n            runningCursor = pageRangeEnd;\n        }\n\n        /* Getting here means we tried seeking too far forward. Don't change any state. */\n        return MA_BAD_SEEK;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_paged_audio_buffer_get_cursor_in_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64* pCursor)\n{\n    if (pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = 0;   /* Safety. */\n\n    if (pPagedAudioBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = pPagedAudioBuffer->absoluteCursor;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_paged_audio_buffer_get_length_in_pcm_frames(ma_paged_audio_buffer* pPagedAudioBuffer, ma_uint64* pLength)\n{\n    return ma_paged_audio_buffer_data_get_length_in_pcm_frames(pPagedAudioBuffer->pData, pLength);\n}\n\n\n\n/**************************************************************************************************************************************************************\n\nVFS\n\n**************************************************************************************************************************************************************/\nMA_API ma_result ma_vfs_open(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile)\n{\n    ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS;\n\n    if (pFile == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pFile = NULL;\n\n    if (pVFS == NULL || pFilePath == NULL || openMode == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pCallbacks->onOpen == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    return pCallbacks->onOpen(pVFS, pFilePath, openMode, pFile);\n}\n\nMA_API ma_result ma_vfs_open_w(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile)\n{\n    ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS;\n\n    if (pFile == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pFile = NULL;\n\n    if (pVFS == NULL || pFilePath == NULL || openMode == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pCallbacks->onOpenW == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    return pCallbacks->onOpenW(pVFS, pFilePath, openMode, pFile);\n}\n\nMA_API ma_result ma_vfs_close(ma_vfs* pVFS, ma_vfs_file file)\n{\n    ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS;\n\n    if (pVFS == NULL || file == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pCallbacks->onClose == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    return pCallbacks->onClose(pVFS, file);\n}\n\nMA_API ma_result ma_vfs_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead)\n{\n    ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS;\n    ma_result result;\n    size_t bytesRead = 0;\n\n    if (pBytesRead != NULL) {\n        *pBytesRead = 0;\n    }\n\n    if (pVFS == NULL || file == NULL || pDst == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pCallbacks->onRead == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    result = pCallbacks->onRead(pVFS, file, pDst, sizeInBytes, &bytesRead);\n\n    if (pBytesRead != NULL) {\n        *pBytesRead = bytesRead;\n    }\n\n    if (result == MA_SUCCESS && bytesRead == 0 && sizeInBytes > 0) {\n        result  = MA_AT_END;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_vfs_write(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten)\n{\n    ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS;\n\n    if (pBytesWritten != NULL) {\n        *pBytesWritten = 0;\n    }\n\n    if (pVFS == NULL || file == NULL || pSrc == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pCallbacks->onWrite == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    return pCallbacks->onWrite(pVFS, file, pSrc, sizeInBytes, pBytesWritten);\n}\n\nMA_API ma_result ma_vfs_seek(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin)\n{\n    ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS;\n\n    if (pVFS == NULL || file == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pCallbacks->onSeek == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    return pCallbacks->onSeek(pVFS, file, offset, origin);\n}\n\nMA_API ma_result ma_vfs_tell(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor)\n{\n    ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS;\n\n    if (pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = 0;\n\n    if (pVFS == NULL || file == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pCallbacks->onTell == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    return pCallbacks->onTell(pVFS, file, pCursor);\n}\n\nMA_API ma_result ma_vfs_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo)\n{\n    ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS;\n\n    if (pInfo == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pInfo);\n\n    if (pVFS == NULL || file == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pCallbacks->onInfo == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    return pCallbacks->onInfo(pVFS, file, pInfo);\n}\n\n\n#if !defined(MA_USE_WIN32_FILEIO) && (defined(MA_WIN32) && defined(MA_WIN32_DESKTOP) && !defined(MA_NO_WIN32_FILEIO) && !defined(MA_POSIX))\n    #define MA_USE_WIN32_FILEIO\n#endif\n\n#if defined(MA_USE_WIN32_FILEIO)\n/*\nWe need to dynamically load SetFilePointer or SetFilePointerEx because older versions of Windows do\nnot have the Ex version. We therefore need to do some dynamic branching depending on what's available.\n\nWe load these when we load our first file from the default VFS. It's left open for the life of the\nprogram and is left to the OS to uninitialize when the program terminates.\n*/\ntypedef DWORD (__stdcall * ma_SetFilePointer_proc)(HANDLE hFile, LONG lDistanceToMove, LONG* lpDistanceToMoveHigh, DWORD dwMoveMethod);\ntypedef BOOL  (__stdcall * ma_SetFilePointerEx_proc)(HANDLE hFile, LARGE_INTEGER liDistanceToMove, LARGE_INTEGER* lpNewFilePointer, DWORD dwMoveMethod);\n\nstatic ma_handle hKernel32DLL = NULL;\nstatic ma_SetFilePointer_proc   ma_SetFilePointer   = NULL;\nstatic ma_SetFilePointerEx_proc ma_SetFilePointerEx = NULL;\n\nstatic void ma_win32_fileio_init(void)\n{\n    if (hKernel32DLL == NULL) {\n        hKernel32DLL = ma_dlopen(NULL, \"kernel32.dll\");\n        if (hKernel32DLL != NULL) {\n            ma_SetFilePointer   = (ma_SetFilePointer_proc)  ma_dlsym(NULL, hKernel32DLL, \"SetFilePointer\");\n            ma_SetFilePointerEx = (ma_SetFilePointerEx_proc)ma_dlsym(NULL, hKernel32DLL, \"SetFilePointerEx\");\n        }\n    }\n}\n\nstatic void ma_default_vfs__get_open_settings_win32(ma_uint32 openMode, DWORD* pDesiredAccess, DWORD* pShareMode, DWORD* pCreationDisposition)\n{\n    *pDesiredAccess = 0;\n    if ((openMode & MA_OPEN_MODE_READ) != 0) {\n        *pDesiredAccess |= GENERIC_READ;\n    }\n    if ((openMode & MA_OPEN_MODE_WRITE) != 0) {\n        *pDesiredAccess |= GENERIC_WRITE;\n    }\n\n    *pShareMode = 0;\n    if ((openMode & MA_OPEN_MODE_READ) != 0) {\n        *pShareMode |= FILE_SHARE_READ;\n    }\n\n    if ((openMode & MA_OPEN_MODE_WRITE) != 0) {\n        *pCreationDisposition = CREATE_ALWAYS;  /* Opening in write mode. Truncate. */\n    } else {\n        *pCreationDisposition = OPEN_EXISTING;  /* Opening in read mode. File must exist. */\n    }\n}\n\nstatic ma_result ma_default_vfs_open__win32(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile)\n{\n    HANDLE hFile;\n    DWORD dwDesiredAccess;\n    DWORD dwShareMode;\n    DWORD dwCreationDisposition;\n\n    (void)pVFS;\n\n    /* Load some Win32 symbols dynamically so we can dynamically check for the existence of SetFilePointerEx. */\n    ma_win32_fileio_init();\n\n    ma_default_vfs__get_open_settings_win32(openMode, &dwDesiredAccess, &dwShareMode, &dwCreationDisposition);\n\n    hFile = CreateFileA(pFilePath, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, FILE_ATTRIBUTE_NORMAL, NULL);\n    if (hFile == INVALID_HANDLE_VALUE) {\n        return ma_result_from_GetLastError(GetLastError());\n    }\n\n    *pFile = hFile;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_default_vfs_open_w__win32(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile)\n{\n    HANDLE hFile;\n    DWORD dwDesiredAccess;\n    DWORD dwShareMode;\n    DWORD dwCreationDisposition;\n\n    (void)pVFS;\n\n    /* Load some Win32 symbols dynamically so we can dynamically check for the existence of SetFilePointerEx. */\n    ma_win32_fileio_init();\n\n    ma_default_vfs__get_open_settings_win32(openMode, &dwDesiredAccess, &dwShareMode, &dwCreationDisposition);\n\n    hFile = CreateFileW(pFilePath, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, FILE_ATTRIBUTE_NORMAL, NULL);\n    if (hFile == INVALID_HANDLE_VALUE) {\n        return ma_result_from_GetLastError(GetLastError());\n    }\n\n    *pFile = hFile;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_default_vfs_close__win32(ma_vfs* pVFS, ma_vfs_file file)\n{\n    (void)pVFS;\n\n    if (CloseHandle((HANDLE)file) == 0) {\n        return ma_result_from_GetLastError(GetLastError());\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_default_vfs_read__win32(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead)\n{\n    ma_result result = MA_SUCCESS;\n    size_t totalBytesRead;\n\n    (void)pVFS;\n\n    totalBytesRead = 0;\n    while (totalBytesRead < sizeInBytes) {\n        size_t bytesRemaining;\n        DWORD bytesToRead;\n        DWORD bytesRead;\n        BOOL readResult;\n\n        bytesRemaining = sizeInBytes - totalBytesRead;\n        if (bytesRemaining >= 0xFFFFFFFF) {\n            bytesToRead = 0xFFFFFFFF;\n        } else {\n            bytesToRead = (DWORD)bytesRemaining;\n        }\n\n        readResult = ReadFile((HANDLE)file, ma_offset_ptr(pDst, totalBytesRead), bytesToRead, &bytesRead, NULL);\n        if (readResult == 1 && bytesRead == 0) {\n            result = MA_AT_END;\n            break;  /* EOF */\n        }\n\n        totalBytesRead += bytesRead;\n\n        if (bytesRead < bytesToRead) {\n            break;  /* EOF */\n        }\n\n        if (readResult == 0) {\n            result = ma_result_from_GetLastError(GetLastError());\n            break;\n        }\n    }\n\n    if (pBytesRead != NULL) {\n        *pBytesRead = totalBytesRead;\n    }\n\n    return result;\n}\n\nstatic ma_result ma_default_vfs_write__win32(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten)\n{\n    ma_result result = MA_SUCCESS;\n    size_t totalBytesWritten;\n\n    (void)pVFS;\n\n    totalBytesWritten = 0;\n    while (totalBytesWritten < sizeInBytes) {\n        size_t bytesRemaining;\n        DWORD bytesToWrite;\n        DWORD bytesWritten;\n        BOOL writeResult;\n\n        bytesRemaining = sizeInBytes - totalBytesWritten;\n        if (bytesRemaining >= 0xFFFFFFFF) {\n            bytesToWrite = 0xFFFFFFFF;\n        } else {\n            bytesToWrite = (DWORD)bytesRemaining;\n        }\n\n        writeResult = WriteFile((HANDLE)file, ma_offset_ptr(pSrc, totalBytesWritten), bytesToWrite, &bytesWritten, NULL);\n        totalBytesWritten += bytesWritten;\n\n        if (writeResult == 0) {\n            result = ma_result_from_GetLastError(GetLastError());\n            break;\n        }\n    }\n\n    if (pBytesWritten != NULL) {\n        *pBytesWritten = totalBytesWritten;\n    }\n\n    return result;\n}\n\n\nstatic ma_result ma_default_vfs_seek__win32(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin)\n{\n    LARGE_INTEGER liDistanceToMove;\n    DWORD dwMoveMethod;\n    BOOL result;\n\n    (void)pVFS;\n\n    liDistanceToMove.QuadPart = offset;\n\n    /*  */ if (origin == ma_seek_origin_current) {\n        dwMoveMethod = FILE_CURRENT;\n    } else if (origin == ma_seek_origin_end) {\n        dwMoveMethod = FILE_END;\n    } else {\n        dwMoveMethod = FILE_BEGIN;\n    }\n\n    if (ma_SetFilePointerEx != NULL) {\n        result = ma_SetFilePointerEx((HANDLE)file, liDistanceToMove, NULL, dwMoveMethod);\n    } else if (ma_SetFilePointer != NULL) {\n        /* No SetFilePointerEx() so restrict to 31 bits. */\n        if (origin > 0x7FFFFFFF) {\n            return MA_OUT_OF_RANGE;\n        }\n\n        result = ma_SetFilePointer((HANDLE)file, (LONG)liDistanceToMove.QuadPart, NULL, dwMoveMethod);\n    } else {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    if (result == 0) {\n        return ma_result_from_GetLastError(GetLastError());\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_default_vfs_tell__win32(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor)\n{\n    LARGE_INTEGER liZero;\n    LARGE_INTEGER liTell;\n    BOOL result;\n\n    (void)pVFS;\n\n    liZero.QuadPart = 0;\n\n    if (ma_SetFilePointerEx != NULL) {\n        result = ma_SetFilePointerEx((HANDLE)file, liZero, &liTell, FILE_CURRENT);\n    } else if (ma_SetFilePointer != NULL) {\n        LONG tell;\n\n        result = ma_SetFilePointer((HANDLE)file, (LONG)liZero.QuadPart, &tell, FILE_CURRENT);\n        liTell.QuadPart = tell;\n    } else {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    if (result == 0) {\n        return ma_result_from_GetLastError(GetLastError());\n    }\n\n    if (pCursor != NULL) {\n        *pCursor = liTell.QuadPart;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_default_vfs_info__win32(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo)\n{\n    BY_HANDLE_FILE_INFORMATION fi;\n    BOOL result;\n\n    (void)pVFS;\n\n    result = GetFileInformationByHandle((HANDLE)file, &fi);\n    if (result == 0) {\n        return ma_result_from_GetLastError(GetLastError());\n    }\n\n    pInfo->sizeInBytes = ((ma_uint64)fi.nFileSizeHigh << 32) | ((ma_uint64)fi.nFileSizeLow);\n\n    return MA_SUCCESS;\n}\n#else\nstatic ma_result ma_default_vfs_open__stdio(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile)\n{\n    ma_result result;\n    FILE* pFileStd;\n    const char* pOpenModeStr;\n\n    MA_ASSERT(pFilePath != NULL);\n    MA_ASSERT(openMode  != 0);\n    MA_ASSERT(pFile     != NULL);\n\n    (void)pVFS;\n\n    if ((openMode & MA_OPEN_MODE_READ) != 0) {\n        if ((openMode & MA_OPEN_MODE_WRITE) != 0) {\n            pOpenModeStr = \"r+\";\n        } else {\n            pOpenModeStr = \"rb\";\n        }\n    } else {\n        pOpenModeStr = \"wb\";\n    }\n\n    result = ma_fopen(&pFileStd, pFilePath, pOpenModeStr);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pFile = pFileStd;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_default_vfs_open_w__stdio(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile)\n{\n    ma_result result;\n    FILE* pFileStd;\n    const wchar_t* pOpenModeStr;\n\n    MA_ASSERT(pFilePath != NULL);\n    MA_ASSERT(openMode  != 0);\n    MA_ASSERT(pFile     != NULL);\n\n    (void)pVFS;\n\n    if ((openMode & MA_OPEN_MODE_READ) != 0) {\n        if ((openMode & MA_OPEN_MODE_WRITE) != 0) {\n            pOpenModeStr = L\"r+\";\n        } else {\n            pOpenModeStr = L\"rb\";\n        }\n    } else {\n        pOpenModeStr = L\"wb\";\n    }\n\n    result = ma_wfopen(&pFileStd, pFilePath, pOpenModeStr, (pVFS != NULL) ? &((ma_default_vfs*)pVFS)->allocationCallbacks : NULL);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pFile = pFileStd;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_default_vfs_close__stdio(ma_vfs* pVFS, ma_vfs_file file)\n{\n    MA_ASSERT(file != NULL);\n\n    (void)pVFS;\n\n    fclose((FILE*)file);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_default_vfs_read__stdio(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead)\n{\n    size_t result;\n\n    MA_ASSERT(file != NULL);\n    MA_ASSERT(pDst != NULL);\n\n    (void)pVFS;\n\n    result = fread(pDst, 1, sizeInBytes, (FILE*)file);\n\n    if (pBytesRead != NULL) {\n        *pBytesRead = result;\n    }\n\n    if (result != sizeInBytes) {\n        if (result == 0 && feof((FILE*)file)) {\n            return MA_AT_END;\n        } else {\n            return ma_result_from_errno(ferror((FILE*)file));\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_default_vfs_write__stdio(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten)\n{\n    size_t result;\n\n    MA_ASSERT(file != NULL);\n    MA_ASSERT(pSrc != NULL);\n\n    (void)pVFS;\n\n    result = fwrite(pSrc, 1, sizeInBytes, (FILE*)file);\n\n    if (pBytesWritten != NULL) {\n        *pBytesWritten = result;\n    }\n\n    if (result != sizeInBytes) {\n        return ma_result_from_errno(ferror((FILE*)file));\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_default_vfs_seek__stdio(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin)\n{\n    int result;\n    int whence;\n\n    MA_ASSERT(file != NULL);\n\n    (void)pVFS;\n\n    if (origin == ma_seek_origin_start) {\n        whence = SEEK_SET;\n    } else if (origin == ma_seek_origin_end) {\n        whence = SEEK_END;\n    } else {\n        whence = SEEK_CUR;\n    }\n\n#if defined(_WIN32)\n    #if defined(_MSC_VER) && _MSC_VER > 1200\n        result = _fseeki64((FILE*)file, offset, whence);\n    #else\n        /* No _fseeki64() so restrict to 31 bits. */\n        if (origin > 0x7FFFFFFF) {\n            return MA_OUT_OF_RANGE;\n        }\n\n        result = fseek((FILE*)file, (int)offset, whence);\n    #endif\n#else\n    result = fseek((FILE*)file, (long int)offset, whence);\n#endif\n    if (result != 0) {\n        return MA_ERROR;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_default_vfs_tell__stdio(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor)\n{\n    ma_int64 result;\n\n    MA_ASSERT(file    != NULL);\n    MA_ASSERT(pCursor != NULL);\n\n    (void)pVFS;\n\n#if defined(_WIN32)\n    #if defined(_MSC_VER) && _MSC_VER > 1200\n        result = _ftelli64((FILE*)file);\n    #else\n        result = ftell((FILE*)file);\n    #endif\n#else\n    result = ftell((FILE*)file);\n#endif\n\n    *pCursor = result;\n\n    return MA_SUCCESS;\n}\n\n#if !defined(_MSC_VER) && !((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 1) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)) && !defined(MA_BSD)\nint fileno(FILE *stream);\n#endif\n\nstatic ma_result ma_default_vfs_info__stdio(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo)\n{\n    int fd;\n    struct stat info;\n\n    MA_ASSERT(file  != NULL);\n    MA_ASSERT(pInfo != NULL);\n\n    (void)pVFS;\n\n#if defined(_MSC_VER)\n    fd = _fileno((FILE*)file);\n#else\n    fd =  fileno((FILE*)file);\n#endif\n\n    if (fstat(fd, &info) != 0) {\n        return ma_result_from_errno(errno);\n    }\n\n    pInfo->sizeInBytes = info.st_size;\n\n    return MA_SUCCESS;\n}\n#endif\n\n\nstatic ma_result ma_default_vfs_open(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile)\n{\n    if (pFile == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pFile = NULL;\n\n    if (pFilePath == NULL || openMode == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_USE_WIN32_FILEIO)\n    return ma_default_vfs_open__win32(pVFS, pFilePath, openMode, pFile);\n#else\n    return ma_default_vfs_open__stdio(pVFS, pFilePath, openMode, pFile);\n#endif\n}\n\nstatic ma_result ma_default_vfs_open_w(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile)\n{\n    if (pFile == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pFile = NULL;\n\n    if (pFilePath == NULL || openMode == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_USE_WIN32_FILEIO)\n    return ma_default_vfs_open_w__win32(pVFS, pFilePath, openMode, pFile);\n#else\n    return ma_default_vfs_open_w__stdio(pVFS, pFilePath, openMode, pFile);\n#endif\n}\n\nstatic ma_result ma_default_vfs_close(ma_vfs* pVFS, ma_vfs_file file)\n{\n    if (file == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_USE_WIN32_FILEIO)\n    return ma_default_vfs_close__win32(pVFS, file);\n#else\n    return ma_default_vfs_close__stdio(pVFS, file);\n#endif\n}\n\nstatic ma_result ma_default_vfs_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead)\n{\n    if (pBytesRead != NULL) {\n        *pBytesRead = 0;\n    }\n\n    if (file == NULL || pDst == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_USE_WIN32_FILEIO)\n    return ma_default_vfs_read__win32(pVFS, file, pDst, sizeInBytes, pBytesRead);\n#else\n    return ma_default_vfs_read__stdio(pVFS, file, pDst, sizeInBytes, pBytesRead);\n#endif\n}\n\nstatic ma_result ma_default_vfs_write(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten)\n{\n    if (pBytesWritten != NULL) {\n        *pBytesWritten = 0;\n    }\n\n    if (file == NULL || pSrc == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_USE_WIN32_FILEIO)\n    return ma_default_vfs_write__win32(pVFS, file, pSrc, sizeInBytes, pBytesWritten);\n#else\n    return ma_default_vfs_write__stdio(pVFS, file, pSrc, sizeInBytes, pBytesWritten);\n#endif\n}\n\nstatic ma_result ma_default_vfs_seek(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin)\n{\n    if (file == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_USE_WIN32_FILEIO)\n    return ma_default_vfs_seek__win32(pVFS, file, offset, origin);\n#else\n    return ma_default_vfs_seek__stdio(pVFS, file, offset, origin);\n#endif\n}\n\nstatic ma_result ma_default_vfs_tell(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor)\n{\n    if (pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = 0;\n\n    if (file == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_USE_WIN32_FILEIO)\n    return ma_default_vfs_tell__win32(pVFS, file, pCursor);\n#else\n    return ma_default_vfs_tell__stdio(pVFS, file, pCursor);\n#endif\n}\n\nstatic ma_result ma_default_vfs_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo)\n{\n    if (pInfo == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pInfo);\n\n    if (file == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n#if defined(MA_USE_WIN32_FILEIO)\n    return ma_default_vfs_info__win32(pVFS, file, pInfo);\n#else\n    return ma_default_vfs_info__stdio(pVFS, file, pInfo);\n#endif\n}\n\n\nMA_API ma_result ma_default_vfs_init(ma_default_vfs* pVFS, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pVFS == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pVFS->cb.onOpen  = ma_default_vfs_open;\n    pVFS->cb.onOpenW = ma_default_vfs_open_w;\n    pVFS->cb.onClose = ma_default_vfs_close;\n    pVFS->cb.onRead  = ma_default_vfs_read;\n    pVFS->cb.onWrite = ma_default_vfs_write;\n    pVFS->cb.onSeek  = ma_default_vfs_seek;\n    pVFS->cb.onTell  = ma_default_vfs_tell;\n    pVFS->cb.onInfo  = ma_default_vfs_info;\n    ma_allocation_callbacks_init_copy(&pVFS->allocationCallbacks, pAllocationCallbacks);\n\n    return MA_SUCCESS;\n}\n\n\nMA_API ma_result ma_vfs_or_default_open(ma_vfs* pVFS, const char* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile)\n{\n    if (pVFS != NULL) {\n        return ma_vfs_open(pVFS, pFilePath, openMode, pFile);\n    } else {\n        return ma_default_vfs_open(pVFS, pFilePath, openMode, pFile);\n    }\n}\n\nMA_API ma_result ma_vfs_or_default_open_w(ma_vfs* pVFS, const wchar_t* pFilePath, ma_uint32 openMode, ma_vfs_file* pFile)\n{\n    if (pVFS != NULL) {\n        return ma_vfs_open_w(pVFS, pFilePath, openMode, pFile);\n    } else {\n        return ma_default_vfs_open_w(pVFS, pFilePath, openMode, pFile);\n    }\n}\n\nMA_API ma_result ma_vfs_or_default_close(ma_vfs* pVFS, ma_vfs_file file)\n{\n    if (pVFS != NULL) {\n        return ma_vfs_close(pVFS, file);\n    } else {\n        return ma_default_vfs_close(pVFS, file);\n    }\n}\n\nMA_API ma_result ma_vfs_or_default_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t sizeInBytes, size_t* pBytesRead)\n{\n    if (pVFS != NULL) {\n        return ma_vfs_read(pVFS, file, pDst, sizeInBytes, pBytesRead);\n    } else {\n        return ma_default_vfs_read(pVFS, file, pDst, sizeInBytes, pBytesRead);\n    }\n}\n\nMA_API ma_result ma_vfs_or_default_write(ma_vfs* pVFS, ma_vfs_file file, const void* pSrc, size_t sizeInBytes, size_t* pBytesWritten)\n{\n    if (pVFS != NULL) {\n        return ma_vfs_write(pVFS, file, pSrc, sizeInBytes, pBytesWritten);\n    } else {\n        return ma_default_vfs_write(pVFS, file, pSrc, sizeInBytes, pBytesWritten);\n    }\n}\n\nMA_API ma_result ma_vfs_or_default_seek(ma_vfs* pVFS, ma_vfs_file file, ma_int64 offset, ma_seek_origin origin)\n{\n    if (pVFS != NULL) {\n        return ma_vfs_seek(pVFS, file, offset, origin);\n    } else {\n        return ma_default_vfs_seek(pVFS, file, offset, origin);\n    }\n}\n\nMA_API ma_result ma_vfs_or_default_tell(ma_vfs* pVFS, ma_vfs_file file, ma_int64* pCursor)\n{\n    if (pVFS != NULL) {\n        return ma_vfs_tell(pVFS, file, pCursor);\n    } else {\n        return ma_default_vfs_tell(pVFS, file, pCursor);\n    }\n}\n\nMA_API ma_result ma_vfs_or_default_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_info* pInfo)\n{\n    if (pVFS != NULL) {\n        return ma_vfs_info(pVFS, file, pInfo);\n    } else {\n        return ma_default_vfs_info(pVFS, file, pInfo);\n    }\n}\n\n\n\nstatic ma_result ma_vfs_open_and_read_file_ex(ma_vfs* pVFS, const char* pFilePath, const wchar_t* pFilePathW, void** ppData, size_t* pSize, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_result result;\n    ma_vfs_file file;\n    ma_file_info info;\n    void* pData;\n    size_t bytesRead;\n\n    if (ppData != NULL) {\n        *ppData = NULL;\n    }\n    if (pSize != NULL) {\n        *pSize = 0;\n    }\n\n    if (ppData == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pFilePath != NULL) {\n        result = ma_vfs_or_default_open(pVFS, pFilePath, MA_OPEN_MODE_READ, &file);\n    } else {\n        result = ma_vfs_or_default_open_w(pVFS, pFilePathW, MA_OPEN_MODE_READ, &file);\n    }\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    result = ma_vfs_or_default_info(pVFS, file, &info);\n    if (result != MA_SUCCESS) {\n        ma_vfs_or_default_close(pVFS, file);\n        return result;\n    }\n\n    if (info.sizeInBytes > MA_SIZE_MAX) {\n        ma_vfs_or_default_close(pVFS, file);\n        return MA_TOO_BIG;\n    }\n\n    pData = ma_malloc((size_t)info.sizeInBytes, pAllocationCallbacks);  /* Safe cast. */\n    if (pData == NULL) {\n        ma_vfs_or_default_close(pVFS, file);\n        return result;\n    }\n\n    result = ma_vfs_or_default_read(pVFS, file, pData, (size_t)info.sizeInBytes, &bytesRead);  /* Safe cast. */\n    ma_vfs_or_default_close(pVFS, file);\n\n    if (result != MA_SUCCESS) {\n        ma_free(pData, pAllocationCallbacks);\n        return result;\n    }\n\n    if (pSize != NULL) {\n        *pSize = bytesRead;\n    }\n\n    MA_ASSERT(ppData != NULL);\n    *ppData = pData;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_vfs_open_and_read_file(ma_vfs* pVFS, const char* pFilePath, void** ppData, size_t* pSize, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_vfs_open_and_read_file_ex(pVFS, pFilePath, NULL, ppData, pSize, pAllocationCallbacks);\n}\n\nMA_API ma_result ma_vfs_open_and_read_file_w(ma_vfs* pVFS, const wchar_t* pFilePath, void** ppData, size_t* pSize, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_vfs_open_and_read_file_ex(pVFS, NULL, pFilePath, ppData, pSize, pAllocationCallbacks);\n}\n\n\n\n/**************************************************************************************************************************************************************\n\nDecoding and Encoding Headers. These are auto-generated from a tool.\n\n**************************************************************************************************************************************************************/\n#if !defined(MA_NO_WAV) && (!defined(MA_NO_DECODING) || !defined(MA_NO_ENCODING))\n/* dr_wav_h begin */\n#ifndef ma_dr_wav_h\n#define ma_dr_wav_h\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n#define MA_DR_WAV_STRINGIFY(x)      #x\n#define MA_DR_WAV_XSTRINGIFY(x)     MA_DR_WAV_STRINGIFY(x)\n#define MA_DR_WAV_VERSION_MAJOR     0\n#define MA_DR_WAV_VERSION_MINOR     13\n#define MA_DR_WAV_VERSION_REVISION  13\n#define MA_DR_WAV_VERSION_STRING    MA_DR_WAV_XSTRINGIFY(MA_DR_WAV_VERSION_MAJOR) \".\" MA_DR_WAV_XSTRINGIFY(MA_DR_WAV_VERSION_MINOR) \".\" MA_DR_WAV_XSTRINGIFY(MA_DR_WAV_VERSION_REVISION)\n#include <stddef.h>\n#define MA_DR_WAVE_FORMAT_PCM          0x1\n#define MA_DR_WAVE_FORMAT_ADPCM        0x2\n#define MA_DR_WAVE_FORMAT_IEEE_FLOAT   0x3\n#define MA_DR_WAVE_FORMAT_ALAW         0x6\n#define MA_DR_WAVE_FORMAT_MULAW        0x7\n#define MA_DR_WAVE_FORMAT_DVI_ADPCM    0x11\n#define MA_DR_WAVE_FORMAT_EXTENSIBLE   0xFFFE\n#define MA_DR_WAV_SEQUENTIAL            0x00000001\n#define MA_DR_WAV_WITH_METADATA         0x00000002\nMA_API void ma_dr_wav_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision);\nMA_API const char* ma_dr_wav_version_string(void);\ntypedef enum\n{\n    ma_dr_wav_seek_origin_start,\n    ma_dr_wav_seek_origin_current\n} ma_dr_wav_seek_origin;\ntypedef enum\n{\n    ma_dr_wav_container_riff,\n    ma_dr_wav_container_rifx,\n    ma_dr_wav_container_w64,\n    ma_dr_wav_container_rf64,\n    ma_dr_wav_container_aiff\n} ma_dr_wav_container;\ntypedef struct\n{\n    union\n    {\n        ma_uint8 fourcc[4];\n        ma_uint8 guid[16];\n    } id;\n    ma_uint64 sizeInBytes;\n    unsigned int paddingSize;\n} ma_dr_wav_chunk_header;\ntypedef struct\n{\n    ma_uint16 formatTag;\n    ma_uint16 channels;\n    ma_uint32 sampleRate;\n    ma_uint32 avgBytesPerSec;\n    ma_uint16 blockAlign;\n    ma_uint16 bitsPerSample;\n    ma_uint16 extendedSize;\n    ma_uint16 validBitsPerSample;\n    ma_uint32 channelMask;\n    ma_uint8 subFormat[16];\n} ma_dr_wav_fmt;\nMA_API ma_uint16 ma_dr_wav_fmt_get_format(const ma_dr_wav_fmt* pFMT);\ntypedef size_t (* ma_dr_wav_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead);\ntypedef size_t (* ma_dr_wav_write_proc)(void* pUserData, const void* pData, size_t bytesToWrite);\ntypedef ma_bool32 (* ma_dr_wav_seek_proc)(void* pUserData, int offset, ma_dr_wav_seek_origin origin);\ntypedef ma_uint64 (* ma_dr_wav_chunk_proc)(void* pChunkUserData, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pReadSeekUserData, const ma_dr_wav_chunk_header* pChunkHeader, ma_dr_wav_container container, const ma_dr_wav_fmt* pFMT);\ntypedef struct\n{\n    const ma_uint8* data;\n    size_t dataSize;\n    size_t currentReadPos;\n} ma_dr_wav__memory_stream;\ntypedef struct\n{\n    void** ppData;\n    size_t* pDataSize;\n    size_t dataSize;\n    size_t dataCapacity;\n    size_t currentWritePos;\n} ma_dr_wav__memory_stream_write;\ntypedef struct\n{\n    ma_dr_wav_container container;\n    ma_uint32 format;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    ma_uint32 bitsPerSample;\n} ma_dr_wav_data_format;\ntypedef enum\n{\n    ma_dr_wav_metadata_type_none                        = 0,\n    ma_dr_wav_metadata_type_unknown                     = 1 << 0,\n    ma_dr_wav_metadata_type_smpl                        = 1 << 1,\n    ma_dr_wav_metadata_type_inst                        = 1 << 2,\n    ma_dr_wav_metadata_type_cue                         = 1 << 3,\n    ma_dr_wav_metadata_type_acid                        = 1 << 4,\n    ma_dr_wav_metadata_type_bext                        = 1 << 5,\n    ma_dr_wav_metadata_type_list_label                  = 1 << 6,\n    ma_dr_wav_metadata_type_list_note                   = 1 << 7,\n    ma_dr_wav_metadata_type_list_labelled_cue_region    = 1 << 8,\n    ma_dr_wav_metadata_type_list_info_software          = 1 << 9,\n    ma_dr_wav_metadata_type_list_info_copyright         = 1 << 10,\n    ma_dr_wav_metadata_type_list_info_title             = 1 << 11,\n    ma_dr_wav_metadata_type_list_info_artist            = 1 << 12,\n    ma_dr_wav_metadata_type_list_info_comment           = 1 << 13,\n    ma_dr_wav_metadata_type_list_info_date              = 1 << 14,\n    ma_dr_wav_metadata_type_list_info_genre             = 1 << 15,\n    ma_dr_wav_metadata_type_list_info_album             = 1 << 16,\n    ma_dr_wav_metadata_type_list_info_tracknumber       = 1 << 17,\n    ma_dr_wav_metadata_type_list_all_info_strings       = ma_dr_wav_metadata_type_list_info_software\n                                                    | ma_dr_wav_metadata_type_list_info_copyright\n                                                    | ma_dr_wav_metadata_type_list_info_title\n                                                    | ma_dr_wav_metadata_type_list_info_artist\n                                                    | ma_dr_wav_metadata_type_list_info_comment\n                                                    | ma_dr_wav_metadata_type_list_info_date\n                                                    | ma_dr_wav_metadata_type_list_info_genre\n                                                    | ma_dr_wav_metadata_type_list_info_album\n                                                    | ma_dr_wav_metadata_type_list_info_tracknumber,\n    ma_dr_wav_metadata_type_list_all_adtl               = ma_dr_wav_metadata_type_list_label\n                                                    | ma_dr_wav_metadata_type_list_note\n                                                    | ma_dr_wav_metadata_type_list_labelled_cue_region,\n    ma_dr_wav_metadata_type_all                         = -2,\n    ma_dr_wav_metadata_type_all_including_unknown       = -1\n} ma_dr_wav_metadata_type;\ntypedef enum\n{\n    ma_dr_wav_smpl_loop_type_forward  = 0,\n    ma_dr_wav_smpl_loop_type_pingpong = 1,\n    ma_dr_wav_smpl_loop_type_backward = 2\n} ma_dr_wav_smpl_loop_type;\ntypedef struct\n{\n    ma_uint32 cuePointId;\n    ma_uint32 type;\n    ma_uint32 firstSampleByteOffset;\n    ma_uint32 lastSampleByteOffset;\n    ma_uint32 sampleFraction;\n    ma_uint32 playCount;\n} ma_dr_wav_smpl_loop;\ntypedef struct\n{\n    ma_uint32 manufacturerId;\n    ma_uint32 productId;\n    ma_uint32 samplePeriodNanoseconds;\n    ma_uint32 midiUnityNote;\n    ma_uint32 midiPitchFraction;\n    ma_uint32 smpteFormat;\n    ma_uint32 smpteOffset;\n    ma_uint32 sampleLoopCount;\n    ma_uint32 samplerSpecificDataSizeInBytes;\n    ma_dr_wav_smpl_loop* pLoops;\n    ma_uint8* pSamplerSpecificData;\n} ma_dr_wav_smpl;\ntypedef struct\n{\n    ma_int8 midiUnityNote;\n    ma_int8 fineTuneCents;\n    ma_int8 gainDecibels;\n    ma_int8 lowNote;\n    ma_int8 highNote;\n    ma_int8 lowVelocity;\n    ma_int8 highVelocity;\n} ma_dr_wav_inst;\ntypedef struct\n{\n    ma_uint32 id;\n    ma_uint32 playOrderPosition;\n    ma_uint8 dataChunkId[4];\n    ma_uint32 chunkStart;\n    ma_uint32 blockStart;\n    ma_uint32 sampleByteOffset;\n} ma_dr_wav_cue_point;\ntypedef struct\n{\n    ma_uint32 cuePointCount;\n    ma_dr_wav_cue_point *pCuePoints;\n} ma_dr_wav_cue;\ntypedef enum\n{\n    ma_dr_wav_acid_flag_one_shot      = 1,\n    ma_dr_wav_acid_flag_root_note_set = 2,\n    ma_dr_wav_acid_flag_stretch       = 4,\n    ma_dr_wav_acid_flag_disk_based    = 8,\n    ma_dr_wav_acid_flag_acidizer      = 16\n} ma_dr_wav_acid_flag;\ntypedef struct\n{\n    ma_uint32 flags;\n    ma_uint16 midiUnityNote;\n    ma_uint16 reserved1;\n    float reserved2;\n    ma_uint32 numBeats;\n    ma_uint16 meterDenominator;\n    ma_uint16 meterNumerator;\n    float tempo;\n} ma_dr_wav_acid;\ntypedef struct\n{\n    ma_uint32 cuePointId;\n    ma_uint32 stringLength;\n    char* pString;\n} ma_dr_wav_list_label_or_note;\ntypedef struct\n{\n    char* pDescription;\n    char* pOriginatorName;\n    char* pOriginatorReference;\n    char  pOriginationDate[10];\n    char  pOriginationTime[8];\n    ma_uint64 timeReference;\n    ma_uint16 version;\n    char* pCodingHistory;\n    ma_uint32 codingHistorySize;\n    ma_uint8* pUMID;\n    ma_uint16 loudnessValue;\n    ma_uint16 loudnessRange;\n    ma_uint16 maxTruePeakLevel;\n    ma_uint16 maxMomentaryLoudness;\n    ma_uint16 maxShortTermLoudness;\n} ma_dr_wav_bext;\ntypedef struct\n{\n    ma_uint32 stringLength;\n    char* pString;\n} ma_dr_wav_list_info_text;\ntypedef struct\n{\n    ma_uint32 cuePointId;\n    ma_uint32 sampleLength;\n    ma_uint8 purposeId[4];\n    ma_uint16 country;\n    ma_uint16 language;\n    ma_uint16 dialect;\n    ma_uint16 codePage;\n    ma_uint32 stringLength;\n    char* pString;\n} ma_dr_wav_list_labelled_cue_region;\ntypedef enum\n{\n    ma_dr_wav_metadata_location_invalid,\n    ma_dr_wav_metadata_location_top_level,\n    ma_dr_wav_metadata_location_inside_info_list,\n    ma_dr_wav_metadata_location_inside_adtl_list\n} ma_dr_wav_metadata_location;\ntypedef struct\n{\n    ma_uint8 id[4];\n    ma_dr_wav_metadata_location chunkLocation;\n    ma_uint32 dataSizeInBytes;\n    ma_uint8* pData;\n} ma_dr_wav_unknown_metadata;\ntypedef struct\n{\n    ma_dr_wav_metadata_type type;\n    union\n    {\n        ma_dr_wav_cue cue;\n        ma_dr_wav_smpl smpl;\n        ma_dr_wav_acid acid;\n        ma_dr_wav_inst inst;\n        ma_dr_wav_bext bext;\n        ma_dr_wav_list_label_or_note labelOrNote;\n        ma_dr_wav_list_labelled_cue_region labelledCueRegion;\n        ma_dr_wav_list_info_text infoText;\n        ma_dr_wav_unknown_metadata unknown;\n    } data;\n} ma_dr_wav_metadata;\ntypedef struct\n{\n    ma_dr_wav_read_proc onRead;\n    ma_dr_wav_write_proc onWrite;\n    ma_dr_wav_seek_proc onSeek;\n    void* pUserData;\n    ma_allocation_callbacks allocationCallbacks;\n    ma_dr_wav_container container;\n    ma_dr_wav_fmt fmt;\n    ma_uint32 sampleRate;\n    ma_uint16 channels;\n    ma_uint16 bitsPerSample;\n    ma_uint16 translatedFormatTag;\n    ma_uint64 totalPCMFrameCount;\n    ma_uint64 dataChunkDataSize;\n    ma_uint64 dataChunkDataPos;\n    ma_uint64 bytesRemaining;\n    ma_uint64 readCursorInPCMFrames;\n    ma_uint64 dataChunkDataSizeTargetWrite;\n    ma_bool32 isSequentialWrite;\n    ma_dr_wav_metadata* pMetadata;\n    ma_uint32 metadataCount;\n    ma_dr_wav__memory_stream memoryStream;\n    ma_dr_wav__memory_stream_write memoryStreamWrite;\n    struct\n    {\n        ma_uint32 bytesRemainingInBlock;\n        ma_uint16 predictor[2];\n        ma_int32  delta[2];\n        ma_int32  cachedFrames[4];\n        ma_uint32 cachedFrameCount;\n        ma_int32  prevFrames[2][2];\n    } msadpcm;\n    struct\n    {\n        ma_uint32 bytesRemainingInBlock;\n        ma_int32  predictor[2];\n        ma_int32  stepIndex[2];\n        ma_int32  cachedFrames[16];\n        ma_uint32 cachedFrameCount;\n    } ima;\n    struct\n    {\n        ma_bool8 isLE;\n        ma_bool8 isUnsigned;\n    } aiff;\n} ma_dr_wav;\nMA_API ma_bool32 ma_dr_wav_init(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_ex(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, ma_dr_wav_chunk_proc onChunk, void* pReadSeekUserData, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_with_metadata(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_write(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_write_sequential(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_dr_wav_write_proc onWrite, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_write_sequential_pcm_frames(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, ma_dr_wav_write_proc onWrite, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_write_with_metadata(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount);\nMA_API ma_uint64 ma_dr_wav_target_write_size_bytes(const ma_dr_wav_data_format* pFormat, ma_uint64 totalFrameCount, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount);\nMA_API ma_dr_wav_metadata* ma_dr_wav_take_ownership_of_metadata(ma_dr_wav* pWav);\nMA_API ma_result ma_dr_wav_uninit(ma_dr_wav* pWav);\nMA_API size_t ma_dr_wav_read_raw(ma_dr_wav* pWav, size_t bytesToRead, void* pBufferOut);\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut);\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_le(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut);\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_be(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut);\nMA_API ma_bool32 ma_dr_wav_seek_to_pcm_frame(ma_dr_wav* pWav, ma_uint64 targetFrameIndex);\nMA_API ma_result ma_dr_wav_get_cursor_in_pcm_frames(ma_dr_wav* pWav, ma_uint64* pCursor);\nMA_API ma_result ma_dr_wav_get_length_in_pcm_frames(ma_dr_wav* pWav, ma_uint64* pLength);\nMA_API size_t ma_dr_wav_write_raw(ma_dr_wav* pWav, size_t bytesToWrite, const void* pData);\nMA_API ma_uint64 ma_dr_wav_write_pcm_frames(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData);\nMA_API ma_uint64 ma_dr_wav_write_pcm_frames_le(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData);\nMA_API ma_uint64 ma_dr_wav_write_pcm_frames_be(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData);\n#ifndef MA_DR_WAV_NO_CONVERSION_API\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut);\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16le(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut);\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16be(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut);\nMA_API void ma_dr_wav_u8_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_s24_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_s32_to_s16(ma_int16* pOut, const ma_int32* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_f32_to_s16(ma_int16* pOut, const float* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_f64_to_s16(ma_int16* pOut, const double* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_alaw_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_mulaw_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount);\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut);\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32le(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut);\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32be(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut);\nMA_API void ma_dr_wav_u8_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_s16_to_f32(float* pOut, const ma_int16* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_s24_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_s32_to_f32(float* pOut, const ma_int32* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_f64_to_f32(float* pOut, const double* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_alaw_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_mulaw_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount);\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut);\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32le(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut);\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32be(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut);\nMA_API void ma_dr_wav_u8_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_s16_to_s32(ma_int32* pOut, const ma_int16* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_s24_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_f32_to_s32(ma_int32* pOut, const float* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_f64_to_s32(ma_int32* pOut, const double* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_alaw_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount);\nMA_API void ma_dr_wav_mulaw_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount);\n#endif\n#ifndef MA_DR_WAV_NO_STDIO\nMA_API ma_bool32 ma_dr_wav_init_file(ma_dr_wav* pWav, const char* filename, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_file_ex(ma_dr_wav* pWav, const char* filename, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_file_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_file_ex_w(ma_dr_wav* pWav, const wchar_t* filename, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_file_with_metadata(ma_dr_wav* pWav, const char* filename, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_file_with_metadata_w(ma_dr_wav* pWav, const wchar_t* filename, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_file_write(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_file_write_sequential(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_file_write_sequential_pcm_frames(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_file_write_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_file_write_sequential_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_file_write_sequential_pcm_frames_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\n#endif\nMA_API ma_bool32 ma_dr_wav_init_memory(ma_dr_wav* pWav, const void* data, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_memory_ex(ma_dr_wav* pWav, const void* data, size_t dataSize, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_memory_with_metadata(ma_dr_wav* pWav, const void* data, size_t dataSize, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_memory_write(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_memory_write_sequential(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_wav_init_memory_write_sequential_pcm_frames(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\n#ifndef MA_DR_WAV_NO_CONVERSION_API\nMA_API ma_int16* ma_dr_wav_open_and_read_pcm_frames_s16(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API float* ma_dr_wav_open_and_read_pcm_frames_f32(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_int32* ma_dr_wav_open_and_read_pcm_frames_s32(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks);\n#ifndef MA_DR_WAV_NO_STDIO\nMA_API ma_int16* ma_dr_wav_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API float* ma_dr_wav_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_int32* ma_dr_wav_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_int16* ma_dr_wav_open_file_and_read_pcm_frames_s16_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API float* ma_dr_wav_open_file_and_read_pcm_frames_f32_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_int32* ma_dr_wav_open_file_and_read_pcm_frames_s32_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks);\n#endif\nMA_API ma_int16* ma_dr_wav_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API float* ma_dr_wav_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_int32* ma_dr_wav_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks);\n#endif\nMA_API void ma_dr_wav_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_uint16 ma_dr_wav_bytes_to_u16(const ma_uint8* data);\nMA_API ma_int16 ma_dr_wav_bytes_to_s16(const ma_uint8* data);\nMA_API ma_uint32 ma_dr_wav_bytes_to_u32(const ma_uint8* data);\nMA_API ma_int32 ma_dr_wav_bytes_to_s32(const ma_uint8* data);\nMA_API ma_uint64 ma_dr_wav_bytes_to_u64(const ma_uint8* data);\nMA_API ma_int64 ma_dr_wav_bytes_to_s64(const ma_uint8* data);\nMA_API float ma_dr_wav_bytes_to_f32(const ma_uint8* data);\nMA_API ma_bool32 ma_dr_wav_guid_equal(const ma_uint8 a[16], const ma_uint8 b[16]);\nMA_API ma_bool32 ma_dr_wav_fourcc_equal(const ma_uint8* a, const char* b);\n#ifdef __cplusplus\n}\n#endif\n#endif\n/* dr_wav_h end */\n#endif  /* MA_NO_WAV */\n\n#if !defined(MA_NO_FLAC) && !defined(MA_NO_DECODING)\n/* dr_flac_h begin */\n#ifndef ma_dr_flac_h\n#define ma_dr_flac_h\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n#define MA_DR_FLAC_STRINGIFY(x)      #x\n#define MA_DR_FLAC_XSTRINGIFY(x)     MA_DR_FLAC_STRINGIFY(x)\n#define MA_DR_FLAC_VERSION_MAJOR     0\n#define MA_DR_FLAC_VERSION_MINOR     12\n#define MA_DR_FLAC_VERSION_REVISION  42\n#define MA_DR_FLAC_VERSION_STRING    MA_DR_FLAC_XSTRINGIFY(MA_DR_FLAC_VERSION_MAJOR) \".\" MA_DR_FLAC_XSTRINGIFY(MA_DR_FLAC_VERSION_MINOR) \".\" MA_DR_FLAC_XSTRINGIFY(MA_DR_FLAC_VERSION_REVISION)\n#include <stddef.h>\n#if defined(_MSC_VER) && _MSC_VER >= 1700\n    #define MA_DR_FLAC_DEPRECATED       __declspec(deprecated)\n#elif (defined(__GNUC__) && __GNUC__ >= 4)\n    #define MA_DR_FLAC_DEPRECATED       __attribute__((deprecated))\n#elif defined(__has_feature)\n    #if __has_feature(attribute_deprecated)\n        #define MA_DR_FLAC_DEPRECATED   __attribute__((deprecated))\n    #else\n        #define MA_DR_FLAC_DEPRECATED\n    #endif\n#else\n    #define MA_DR_FLAC_DEPRECATED\n#endif\nMA_API void ma_dr_flac_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision);\nMA_API const char* ma_dr_flac_version_string(void);\n#ifndef MA_DR_FLAC_BUFFER_SIZE\n#define MA_DR_FLAC_BUFFER_SIZE   4096\n#endif\n#ifdef MA_64BIT\ntypedef ma_uint64 ma_dr_flac_cache_t;\n#else\ntypedef ma_uint32 ma_dr_flac_cache_t;\n#endif\n#define MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO       0\n#define MA_DR_FLAC_METADATA_BLOCK_TYPE_PADDING          1\n#define MA_DR_FLAC_METADATA_BLOCK_TYPE_APPLICATION      2\n#define MA_DR_FLAC_METADATA_BLOCK_TYPE_SEEKTABLE        3\n#define MA_DR_FLAC_METADATA_BLOCK_TYPE_VORBIS_COMMENT   4\n#define MA_DR_FLAC_METADATA_BLOCK_TYPE_CUESHEET         5\n#define MA_DR_FLAC_METADATA_BLOCK_TYPE_PICTURE          6\n#define MA_DR_FLAC_METADATA_BLOCK_TYPE_INVALID          127\n#define MA_DR_FLAC_PICTURE_TYPE_OTHER                   0\n#define MA_DR_FLAC_PICTURE_TYPE_FILE_ICON               1\n#define MA_DR_FLAC_PICTURE_TYPE_OTHER_FILE_ICON         2\n#define MA_DR_FLAC_PICTURE_TYPE_COVER_FRONT             3\n#define MA_DR_FLAC_PICTURE_TYPE_COVER_BACK              4\n#define MA_DR_FLAC_PICTURE_TYPE_LEAFLET_PAGE            5\n#define MA_DR_FLAC_PICTURE_TYPE_MEDIA                   6\n#define MA_DR_FLAC_PICTURE_TYPE_LEAD_ARTIST             7\n#define MA_DR_FLAC_PICTURE_TYPE_ARTIST                  8\n#define MA_DR_FLAC_PICTURE_TYPE_CONDUCTOR               9\n#define MA_DR_FLAC_PICTURE_TYPE_BAND                    10\n#define MA_DR_FLAC_PICTURE_TYPE_COMPOSER                11\n#define MA_DR_FLAC_PICTURE_TYPE_LYRICIST                12\n#define MA_DR_FLAC_PICTURE_TYPE_RECORDING_LOCATION      13\n#define MA_DR_FLAC_PICTURE_TYPE_DURING_RECORDING        14\n#define MA_DR_FLAC_PICTURE_TYPE_DURING_PERFORMANCE      15\n#define MA_DR_FLAC_PICTURE_TYPE_SCREEN_CAPTURE          16\n#define MA_DR_FLAC_PICTURE_TYPE_BRIGHT_COLORED_FISH     17\n#define MA_DR_FLAC_PICTURE_TYPE_ILLUSTRATION            18\n#define MA_DR_FLAC_PICTURE_TYPE_BAND_LOGOTYPE           19\n#define MA_DR_FLAC_PICTURE_TYPE_PUBLISHER_LOGOTYPE      20\ntypedef enum\n{\n    ma_dr_flac_container_native,\n    ma_dr_flac_container_ogg,\n    ma_dr_flac_container_unknown\n} ma_dr_flac_container;\ntypedef enum\n{\n    ma_dr_flac_seek_origin_start,\n    ma_dr_flac_seek_origin_current\n} ma_dr_flac_seek_origin;\ntypedef struct\n{\n    ma_uint64 firstPCMFrame;\n    ma_uint64 flacFrameOffset;\n    ma_uint16 pcmFrameCount;\n} ma_dr_flac_seekpoint;\ntypedef struct\n{\n    ma_uint16 minBlockSizeInPCMFrames;\n    ma_uint16 maxBlockSizeInPCMFrames;\n    ma_uint32 minFrameSizeInPCMFrames;\n    ma_uint32 maxFrameSizeInPCMFrames;\n    ma_uint32 sampleRate;\n    ma_uint8  channels;\n    ma_uint8  bitsPerSample;\n    ma_uint64 totalPCMFrameCount;\n    ma_uint8  md5[16];\n} ma_dr_flac_streaminfo;\ntypedef struct\n{\n    ma_uint32 type;\n    const void* pRawData;\n    ma_uint32 rawDataSize;\n    union\n    {\n        ma_dr_flac_streaminfo streaminfo;\n        struct\n        {\n            int unused;\n        } padding;\n        struct\n        {\n            ma_uint32 id;\n            const void* pData;\n            ma_uint32 dataSize;\n        } application;\n        struct\n        {\n            ma_uint32 seekpointCount;\n            const ma_dr_flac_seekpoint* pSeekpoints;\n        } seektable;\n        struct\n        {\n            ma_uint32 vendorLength;\n            const char* vendor;\n            ma_uint32 commentCount;\n            const void* pComments;\n        } vorbis_comment;\n        struct\n        {\n            char catalog[128];\n            ma_uint64 leadInSampleCount;\n            ma_bool32 isCD;\n            ma_uint8 trackCount;\n            const void* pTrackData;\n        } cuesheet;\n        struct\n        {\n            ma_uint32 type;\n            ma_uint32 mimeLength;\n            const char* mime;\n            ma_uint32 descriptionLength;\n            const char* description;\n            ma_uint32 width;\n            ma_uint32 height;\n            ma_uint32 colorDepth;\n            ma_uint32 indexColorCount;\n            ma_uint32 pictureDataSize;\n            const ma_uint8* pPictureData;\n        } picture;\n    } data;\n} ma_dr_flac_metadata;\ntypedef size_t (* ma_dr_flac_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead);\ntypedef ma_bool32 (* ma_dr_flac_seek_proc)(void* pUserData, int offset, ma_dr_flac_seek_origin origin);\ntypedef void (* ma_dr_flac_meta_proc)(void* pUserData, ma_dr_flac_metadata* pMetadata);\ntypedef struct\n{\n    const ma_uint8* data;\n    size_t dataSize;\n    size_t currentReadPos;\n} ma_dr_flac__memory_stream;\ntypedef struct\n{\n    ma_dr_flac_read_proc onRead;\n    ma_dr_flac_seek_proc onSeek;\n    void* pUserData;\n    size_t unalignedByteCount;\n    ma_dr_flac_cache_t unalignedCache;\n    ma_uint32 nextL2Line;\n    ma_uint32 consumedBits;\n    ma_dr_flac_cache_t cacheL2[MA_DR_FLAC_BUFFER_SIZE/sizeof(ma_dr_flac_cache_t)];\n    ma_dr_flac_cache_t cache;\n    ma_uint16 crc16;\n    ma_dr_flac_cache_t crc16Cache;\n    ma_uint32 crc16CacheIgnoredBytes;\n} ma_dr_flac_bs;\ntypedef struct\n{\n    ma_uint8 subframeType;\n    ma_uint8 wastedBitsPerSample;\n    ma_uint8 lpcOrder;\n    ma_int32* pSamplesS32;\n} ma_dr_flac_subframe;\ntypedef struct\n{\n    ma_uint64 pcmFrameNumber;\n    ma_uint32 flacFrameNumber;\n    ma_uint32 sampleRate;\n    ma_uint16 blockSizeInPCMFrames;\n    ma_uint8 channelAssignment;\n    ma_uint8 bitsPerSample;\n    ma_uint8 crc8;\n} ma_dr_flac_frame_header;\ntypedef struct\n{\n    ma_dr_flac_frame_header header;\n    ma_uint32 pcmFramesRemaining;\n    ma_dr_flac_subframe subframes[8];\n} ma_dr_flac_frame;\ntypedef struct\n{\n    ma_dr_flac_meta_proc onMeta;\n    void* pUserDataMD;\n    ma_allocation_callbacks allocationCallbacks;\n    ma_uint32 sampleRate;\n    ma_uint8 channels;\n    ma_uint8 bitsPerSample;\n    ma_uint16 maxBlockSizeInPCMFrames;\n    ma_uint64 totalPCMFrameCount;\n    ma_dr_flac_container container;\n    ma_uint32 seekpointCount;\n    ma_dr_flac_frame currentFLACFrame;\n    ma_uint64 currentPCMFrame;\n    ma_uint64 firstFLACFramePosInBytes;\n    ma_dr_flac__memory_stream memoryStream;\n    ma_int32* pDecodedSamples;\n    ma_dr_flac_seekpoint* pSeekpoints;\n    void* _oggbs;\n    ma_bool32 _noSeekTableSeek    : 1;\n    ma_bool32 _noBinarySearchSeek : 1;\n    ma_bool32 _noBruteForceSeek   : 1;\n    ma_dr_flac_bs bs;\n    ma_uint8 pExtraData[1];\n} ma_dr_flac;\nMA_API ma_dr_flac* ma_dr_flac_open(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_dr_flac* ma_dr_flac_open_relaxed(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_container container, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_dr_flac* ma_dr_flac_open_with_metadata(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_dr_flac* ma_dr_flac_open_with_metadata_relaxed(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, ma_dr_flac_container container, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API void ma_dr_flac_close(ma_dr_flac* pFlac);\nMA_API ma_uint64 ma_dr_flac_read_pcm_frames_s32(ma_dr_flac* pFlac, ma_uint64 framesToRead, ma_int32* pBufferOut);\nMA_API ma_uint64 ma_dr_flac_read_pcm_frames_s16(ma_dr_flac* pFlac, ma_uint64 framesToRead, ma_int16* pBufferOut);\nMA_API ma_uint64 ma_dr_flac_read_pcm_frames_f32(ma_dr_flac* pFlac, ma_uint64 framesToRead, float* pBufferOut);\nMA_API ma_bool32 ma_dr_flac_seek_to_pcm_frame(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex);\n#ifndef MA_DR_FLAC_NO_STDIO\nMA_API ma_dr_flac* ma_dr_flac_open_file(const char* pFileName, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_dr_flac* ma_dr_flac_open_file_w(const wchar_t* pFileName, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_dr_flac* ma_dr_flac_open_file_with_metadata(const char* pFileName, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_dr_flac* ma_dr_flac_open_file_with_metadata_w(const wchar_t* pFileName, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks);\n#endif\nMA_API ma_dr_flac* ma_dr_flac_open_memory(const void* pData, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_dr_flac* ma_dr_flac_open_memory_with_metadata(const void* pData, size_t dataSize, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_int32* ma_dr_flac_open_and_read_pcm_frames_s32(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_int16* ma_dr_flac_open_and_read_pcm_frames_s16(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API float* ma_dr_flac_open_and_read_pcm_frames_f32(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\n#ifndef MA_DR_FLAC_NO_STDIO\nMA_API ma_int32* ma_dr_flac_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_int16* ma_dr_flac_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API float* ma_dr_flac_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\n#endif\nMA_API ma_int32* ma_dr_flac_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_int16* ma_dr_flac_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API float* ma_dr_flac_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API void ma_dr_flac_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks);\ntypedef struct\n{\n    ma_uint32 countRemaining;\n    const char* pRunningData;\n} ma_dr_flac_vorbis_comment_iterator;\nMA_API void ma_dr_flac_init_vorbis_comment_iterator(ma_dr_flac_vorbis_comment_iterator* pIter, ma_uint32 commentCount, const void* pComments);\nMA_API const char* ma_dr_flac_next_vorbis_comment(ma_dr_flac_vorbis_comment_iterator* pIter, ma_uint32* pCommentLengthOut);\ntypedef struct\n{\n    ma_uint32 countRemaining;\n    const char* pRunningData;\n} ma_dr_flac_cuesheet_track_iterator;\ntypedef struct\n{\n    ma_uint64 offset;\n    ma_uint8 index;\n    ma_uint8 reserved[3];\n} ma_dr_flac_cuesheet_track_index;\ntypedef struct\n{\n    ma_uint64 offset;\n    ma_uint8 trackNumber;\n    char ISRC[12];\n    ma_bool8 isAudio;\n    ma_bool8 preEmphasis;\n    ma_uint8 indexCount;\n    const ma_dr_flac_cuesheet_track_index* pIndexPoints;\n} ma_dr_flac_cuesheet_track;\nMA_API void ma_dr_flac_init_cuesheet_track_iterator(ma_dr_flac_cuesheet_track_iterator* pIter, ma_uint32 trackCount, const void* pTrackData);\nMA_API ma_bool32 ma_dr_flac_next_cuesheet_track(ma_dr_flac_cuesheet_track_iterator* pIter, ma_dr_flac_cuesheet_track* pCuesheetTrack);\n#ifdef __cplusplus\n}\n#endif\n#endif\n/* dr_flac_h end */\n#endif  /* MA_NO_FLAC */\n\n#if !defined(MA_NO_MP3) && !defined(MA_NO_DECODING)\n/* dr_mp3_h begin */\n#ifndef ma_dr_mp3_h\n#define ma_dr_mp3_h\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n#define MA_DR_MP3_STRINGIFY(x)      #x\n#define MA_DR_MP3_XSTRINGIFY(x)     MA_DR_MP3_STRINGIFY(x)\n#define MA_DR_MP3_VERSION_MAJOR     0\n#define MA_DR_MP3_VERSION_MINOR     6\n#define MA_DR_MP3_VERSION_REVISION  38\n#define MA_DR_MP3_VERSION_STRING    MA_DR_MP3_XSTRINGIFY(MA_DR_MP3_VERSION_MAJOR) \".\" MA_DR_MP3_XSTRINGIFY(MA_DR_MP3_VERSION_MINOR) \".\" MA_DR_MP3_XSTRINGIFY(MA_DR_MP3_VERSION_REVISION)\n#include <stddef.h>\n#define MA_DR_MP3_MAX_PCM_FRAMES_PER_MP3_FRAME  1152\n#define MA_DR_MP3_MAX_SAMPLES_PER_FRAME         (MA_DR_MP3_MAX_PCM_FRAMES_PER_MP3_FRAME*2)\nMA_API void ma_dr_mp3_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision);\nMA_API const char* ma_dr_mp3_version_string(void);\ntypedef struct\n{\n    int frame_bytes, channels, hz, layer, bitrate_kbps;\n} ma_dr_mp3dec_frame_info;\ntypedef struct\n{\n    float mdct_overlap[2][9*32], qmf_state[15*2*32];\n    int reserv, free_format_bytes;\n    ma_uint8 header[4], reserv_buf[511];\n} ma_dr_mp3dec;\nMA_API void ma_dr_mp3dec_init(ma_dr_mp3dec *dec);\nMA_API int ma_dr_mp3dec_decode_frame(ma_dr_mp3dec *dec, const ma_uint8 *mp3, int mp3_bytes, void *pcm, ma_dr_mp3dec_frame_info *info);\nMA_API void ma_dr_mp3dec_f32_to_s16(const float *in, ma_int16 *out, size_t num_samples);\ntypedef enum\n{\n    ma_dr_mp3_seek_origin_start,\n    ma_dr_mp3_seek_origin_current\n} ma_dr_mp3_seek_origin;\ntypedef struct\n{\n    ma_uint64 seekPosInBytes;\n    ma_uint64 pcmFrameIndex;\n    ma_uint16 mp3FramesToDiscard;\n    ma_uint16 pcmFramesToDiscard;\n} ma_dr_mp3_seek_point;\ntypedef size_t (* ma_dr_mp3_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead);\ntypedef ma_bool32 (* ma_dr_mp3_seek_proc)(void* pUserData, int offset, ma_dr_mp3_seek_origin origin);\ntypedef struct\n{\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n} ma_dr_mp3_config;\ntypedef struct\n{\n    ma_dr_mp3dec decoder;\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    ma_dr_mp3_read_proc onRead;\n    ma_dr_mp3_seek_proc onSeek;\n    void* pUserData;\n    ma_allocation_callbacks allocationCallbacks;\n    ma_uint32 mp3FrameChannels;\n    ma_uint32 mp3FrameSampleRate;\n    ma_uint32 pcmFramesConsumedInMP3Frame;\n    ma_uint32 pcmFramesRemainingInMP3Frame;\n    ma_uint8 pcmFrames[sizeof(float)*MA_DR_MP3_MAX_SAMPLES_PER_FRAME];\n    ma_uint64 currentPCMFrame;\n    ma_uint64 streamCursor;\n    ma_dr_mp3_seek_point* pSeekPoints;\n    ma_uint32 seekPointCount;\n    size_t dataSize;\n    size_t dataCapacity;\n    size_t dataConsumed;\n    ma_uint8* pData;\n    ma_bool32 atEnd : 1;\n    struct\n    {\n        const ma_uint8* pData;\n        size_t dataSize;\n        size_t currentReadPos;\n    } memory;\n} ma_dr_mp3;\nMA_API ma_bool32 ma_dr_mp3_init(ma_dr_mp3* pMP3, ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_mp3_init_memory(ma_dr_mp3* pMP3, const void* pData, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks);\n#ifndef MA_DR_MP3_NO_STDIO\nMA_API ma_bool32 ma_dr_mp3_init_file(ma_dr_mp3* pMP3, const char* pFilePath, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_bool32 ma_dr_mp3_init_file_w(ma_dr_mp3* pMP3, const wchar_t* pFilePath, const ma_allocation_callbacks* pAllocationCallbacks);\n#endif\nMA_API void ma_dr_mp3_uninit(ma_dr_mp3* pMP3);\nMA_API ma_uint64 ma_dr_mp3_read_pcm_frames_f32(ma_dr_mp3* pMP3, ma_uint64 framesToRead, float* pBufferOut);\nMA_API ma_uint64 ma_dr_mp3_read_pcm_frames_s16(ma_dr_mp3* pMP3, ma_uint64 framesToRead, ma_int16* pBufferOut);\nMA_API ma_bool32 ma_dr_mp3_seek_to_pcm_frame(ma_dr_mp3* pMP3, ma_uint64 frameIndex);\nMA_API ma_uint64 ma_dr_mp3_get_pcm_frame_count(ma_dr_mp3* pMP3);\nMA_API ma_uint64 ma_dr_mp3_get_mp3_frame_count(ma_dr_mp3* pMP3);\nMA_API ma_bool32 ma_dr_mp3_get_mp3_and_pcm_frame_count(ma_dr_mp3* pMP3, ma_uint64* pMP3FrameCount, ma_uint64* pPCMFrameCount);\nMA_API ma_bool32 ma_dr_mp3_calculate_seek_points(ma_dr_mp3* pMP3, ma_uint32* pSeekPointCount, ma_dr_mp3_seek_point* pSeekPoints);\nMA_API ma_bool32 ma_dr_mp3_bind_seek_table(ma_dr_mp3* pMP3, ma_uint32 seekPointCount, ma_dr_mp3_seek_point* pSeekPoints);\nMA_API float* ma_dr_mp3_open_and_read_pcm_frames_f32(ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_int16* ma_dr_mp3_open_and_read_pcm_frames_s16(ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API float* ma_dr_mp3_open_memory_and_read_pcm_frames_f32(const void* pData, size_t dataSize, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_int16* ma_dr_mp3_open_memory_and_read_pcm_frames_s16(const void* pData, size_t dataSize, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\n#ifndef MA_DR_MP3_NO_STDIO\nMA_API float* ma_dr_mp3_open_file_and_read_pcm_frames_f32(const char* filePath, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_int16* ma_dr_mp3_open_file_and_read_pcm_frames_s16(const char* filePath, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks);\n#endif\nMA_API void* ma_dr_mp3_malloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API void ma_dr_mp3_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks);\n#ifdef __cplusplus\n}\n#endif\n#endif\n/* dr_mp3_h end */\n#endif  /* MA_NO_MP3 */\n\n\n/**************************************************************************************************************************************************************\n\nDecoding\n\n**************************************************************************************************************************************************************/\n#ifndef MA_NO_DECODING\n\nstatic ma_result ma_decoder_read_bytes(ma_decoder* pDecoder, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead)\n{\n    MA_ASSERT(pDecoder != NULL);\n\n    return pDecoder->onRead(pDecoder, pBufferOut, bytesToRead, pBytesRead);\n}\n\nstatic ma_result ma_decoder_seek_bytes(ma_decoder* pDecoder, ma_int64 byteOffset, ma_seek_origin origin)\n{\n    MA_ASSERT(pDecoder != NULL);\n\n    return pDecoder->onSeek(pDecoder, byteOffset, origin);\n}\n\nstatic ma_result ma_decoder_tell_bytes(ma_decoder* pDecoder, ma_int64* pCursor)\n{\n    MA_ASSERT(pDecoder != NULL);\n\n    if (pDecoder->onTell == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    return pDecoder->onTell(pDecoder, pCursor);\n}\n\n\nMA_API ma_decoding_backend_config ma_decoding_backend_config_init(ma_format preferredFormat, ma_uint32 seekPointCount)\n{\n    ma_decoding_backend_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.preferredFormat = preferredFormat;\n    config.seekPointCount  = seekPointCount;\n\n    return config;\n}\n\n\nMA_API ma_decoder_config ma_decoder_config_init(ma_format outputFormat, ma_uint32 outputChannels, ma_uint32 outputSampleRate)\n{\n    ma_decoder_config config;\n    MA_ZERO_OBJECT(&config);\n    config.format         = outputFormat;\n    config.channels       = outputChannels;\n    config.sampleRate     = outputSampleRate;\n    config.resampling     = ma_resampler_config_init(ma_format_unknown, 0, 0, 0, ma_resample_algorithm_linear); /* Format/channels/rate doesn't matter here. */\n    config.encodingFormat = ma_encoding_format_unknown;\n\n    /* Note that we are intentionally leaving the channel map empty here which will cause the default channel map to be used. */\n\n    return config;\n}\n\nMA_API ma_decoder_config ma_decoder_config_init_default()\n{\n    return ma_decoder_config_init(ma_format_unknown, 0, 0);\n}\n\nMA_API ma_decoder_config ma_decoder_config_init_copy(const ma_decoder_config* pConfig)\n{\n    ma_decoder_config config;\n    if (pConfig != NULL) {\n        config = *pConfig;\n    } else {\n        MA_ZERO_OBJECT(&config);\n    }\n\n    return config;\n}\n\nstatic ma_result ma_decoder__init_data_converter(ma_decoder* pDecoder, const ma_decoder_config* pConfig)\n{\n    ma_result result;\n    ma_data_converter_config converterConfig;\n    ma_format internalFormat;\n    ma_uint32 internalChannels;\n    ma_uint32 internalSampleRate;\n    ma_channel internalChannelMap[MA_MAX_CHANNELS];\n\n    MA_ASSERT(pDecoder != NULL);\n    MA_ASSERT(pConfig  != NULL);\n\n    result = ma_data_source_get_data_format(pDecoder->pBackend, &internalFormat, &internalChannels, &internalSampleRate, internalChannelMap, ma_countof(internalChannelMap));\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to retrieve the internal data format. */\n    }\n\n\n    /* Make sure we're not asking for too many channels. */\n    if (pConfig->channels > MA_MAX_CHANNELS) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The internal channels should have already been validated at a higher level, but we'll do it again explicitly here for safety. */\n    if (internalChannels > MA_MAX_CHANNELS) {\n        return MA_INVALID_ARGS;\n    }\n\n\n    /* Output format. */\n    if (pConfig->format == ma_format_unknown) {\n        pDecoder->outputFormat = internalFormat;\n    } else {\n        pDecoder->outputFormat = pConfig->format;\n    }\n\n    if (pConfig->channels == 0) {\n        pDecoder->outputChannels = internalChannels;\n    } else {\n        pDecoder->outputChannels = pConfig->channels;\n    }\n\n    if (pConfig->sampleRate == 0) {\n        pDecoder->outputSampleRate = internalSampleRate;\n    } else {\n        pDecoder->outputSampleRate = pConfig->sampleRate;\n    }\n\n    converterConfig = ma_data_converter_config_init(\n        internalFormat,     pDecoder->outputFormat,\n        internalChannels,   pDecoder->outputChannels,\n        internalSampleRate, pDecoder->outputSampleRate\n    );\n    converterConfig.pChannelMapIn          = internalChannelMap;\n    converterConfig.pChannelMapOut         = pConfig->pChannelMap;\n    converterConfig.channelMixMode         = pConfig->channelMixMode;\n    converterConfig.ditherMode             = pConfig->ditherMode;\n    converterConfig.allowDynamicSampleRate = MA_FALSE;   /* Never allow dynamic sample rate conversion. Setting this to true will disable passthrough optimizations. */\n    converterConfig.resampling             = pConfig->resampling;\n\n    result = ma_data_converter_init(&converterConfig, &pDecoder->allocationCallbacks, &pDecoder->converter);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /*\n    Now that we have the decoder we need to determine whether or not we need a heap-allocated cache. We'll\n    need this if the data converter does not support calculation of the required input frame count. To\n    determine support for this we'll just run a test.\n    */\n    {\n        ma_uint64 unused;\n\n        result = ma_data_converter_get_required_input_frame_count(&pDecoder->converter, 1, &unused);\n        if (result != MA_SUCCESS) {\n            /*\n            We were unable to calculate the required input frame count which means we'll need to use\n            a heap-allocated cache.\n            */\n            ma_uint64 inputCacheCapSizeInBytes;\n\n            pDecoder->inputCacheCap = MA_DATA_CONVERTER_STACK_BUFFER_SIZE / ma_get_bytes_per_frame(internalFormat, internalChannels);\n\n            /* Not strictly necessary, but keeping here for safety in case we change the default value of pDecoder->inputCacheCap. */\n            inputCacheCapSizeInBytes = pDecoder->inputCacheCap * ma_get_bytes_per_frame(internalFormat, internalChannels);\n            if (inputCacheCapSizeInBytes > MA_SIZE_MAX) {\n                ma_data_converter_uninit(&pDecoder->converter, &pDecoder->allocationCallbacks);\n                return MA_OUT_OF_MEMORY;\n            }\n\n            pDecoder->pInputCache = ma_malloc((size_t)inputCacheCapSizeInBytes, &pDecoder->allocationCallbacks);    /* Safe cast to size_t. */\n            if (pDecoder->pInputCache == NULL) {\n                ma_data_converter_uninit(&pDecoder->converter, &pDecoder->allocationCallbacks);\n                return MA_OUT_OF_MEMORY;\n            }\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\n\n\nstatic ma_result ma_decoder_internal_on_read__custom(void* pUserData, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead)\n{\n    ma_decoder* pDecoder = (ma_decoder*)pUserData;\n    MA_ASSERT(pDecoder != NULL);\n\n    return ma_decoder_read_bytes(pDecoder, pBufferOut, bytesToRead, pBytesRead);\n}\n\nstatic ma_result ma_decoder_internal_on_seek__custom(void* pUserData, ma_int64 offset, ma_seek_origin origin)\n{\n    ma_decoder* pDecoder = (ma_decoder*)pUserData;\n    MA_ASSERT(pDecoder != NULL);\n\n    return ma_decoder_seek_bytes(pDecoder, offset, origin);\n}\n\nstatic ma_result ma_decoder_internal_on_tell__custom(void* pUserData, ma_int64* pCursor)\n{\n    ma_decoder* pDecoder = (ma_decoder*)pUserData;\n    MA_ASSERT(pDecoder != NULL);\n\n    return ma_decoder_tell_bytes(pDecoder, pCursor);\n}\n\n\nstatic ma_result ma_decoder_init_from_vtable__internal(const ma_decoding_backend_vtable* pVTable, void* pVTableUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n    ma_decoding_backend_config backendConfig;\n    ma_data_source* pBackend;\n\n    MA_ASSERT(pVTable  != NULL);\n    MA_ASSERT(pConfig  != NULL);\n    MA_ASSERT(pDecoder != NULL);\n\n    if (pVTable->onInit == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    backendConfig = ma_decoding_backend_config_init(pConfig->format, pConfig->seekPointCount);\n\n    result = pVTable->onInit(pVTableUserData, ma_decoder_internal_on_read__custom, ma_decoder_internal_on_seek__custom, ma_decoder_internal_on_tell__custom, pDecoder, &backendConfig, &pDecoder->allocationCallbacks, &pBackend);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to initialize the backend from this vtable. */\n    }\n\n    /* Getting here means we were able to initialize the backend so we can now initialize the decoder. */\n    pDecoder->pBackend         = pBackend;\n    pDecoder->pBackendVTable   = pVTable;\n    pDecoder->pBackendUserData = pConfig->pCustomBackendUserData;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoder_init_from_file__internal(const ma_decoding_backend_vtable* pVTable, void* pVTableUserData, const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n    ma_decoding_backend_config backendConfig;\n    ma_data_source* pBackend;\n\n    MA_ASSERT(pVTable  != NULL);\n    MA_ASSERT(pConfig  != NULL);\n    MA_ASSERT(pDecoder != NULL);\n\n    if (pVTable->onInitFile == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    backendConfig = ma_decoding_backend_config_init(pConfig->format, pConfig->seekPointCount);\n\n    result = pVTable->onInitFile(pVTableUserData, pFilePath, &backendConfig, &pDecoder->allocationCallbacks, &pBackend);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to initialize the backend from this vtable. */\n    }\n\n    /* Getting here means we were able to initialize the backend so we can now initialize the decoder. */\n    pDecoder->pBackend         = pBackend;\n    pDecoder->pBackendVTable   = pVTable;\n    pDecoder->pBackendUserData = pConfig->pCustomBackendUserData;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoder_init_from_file_w__internal(const ma_decoding_backend_vtable* pVTable, void* pVTableUserData, const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n    ma_decoding_backend_config backendConfig;\n    ma_data_source* pBackend;\n\n    MA_ASSERT(pVTable  != NULL);\n    MA_ASSERT(pConfig  != NULL);\n    MA_ASSERT(pDecoder != NULL);\n\n    if (pVTable->onInitFileW == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    backendConfig = ma_decoding_backend_config_init(pConfig->format, pConfig->seekPointCount);\n\n    result = pVTable->onInitFileW(pVTableUserData, pFilePath, &backendConfig, &pDecoder->allocationCallbacks, &pBackend);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to initialize the backend from this vtable. */\n    }\n\n    /* Getting here means we were able to initialize the backend so we can now initialize the decoder. */\n    pDecoder->pBackend         = pBackend;\n    pDecoder->pBackendVTable   = pVTable;\n    pDecoder->pBackendUserData = pConfig->pCustomBackendUserData;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoder_init_from_memory__internal(const ma_decoding_backend_vtable* pVTable, void* pVTableUserData, const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n    ma_decoding_backend_config backendConfig;\n    ma_data_source* pBackend;\n\n    MA_ASSERT(pVTable  != NULL);\n    MA_ASSERT(pConfig  != NULL);\n    MA_ASSERT(pDecoder != NULL);\n\n    if (pVTable->onInitMemory == NULL) {\n        return MA_NOT_IMPLEMENTED;\n    }\n\n    backendConfig = ma_decoding_backend_config_init(pConfig->format, pConfig->seekPointCount);\n\n    result = pVTable->onInitMemory(pVTableUserData, pData, dataSize, &backendConfig, &pDecoder->allocationCallbacks, &pBackend);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to initialize the backend from this vtable. */\n    }\n\n    /* Getting here means we were able to initialize the backend so we can now initialize the decoder. */\n    pDecoder->pBackend         = pBackend;\n    pDecoder->pBackendVTable   = pVTable;\n    pDecoder->pBackendUserData = pConfig->pCustomBackendUserData;\n\n    return MA_SUCCESS;\n}\n\n\n\nstatic ma_result ma_decoder_init_custom__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result = MA_NO_BACKEND;\n    size_t ivtable;\n\n    MA_ASSERT(pConfig != NULL);\n    MA_ASSERT(pDecoder != NULL);\n\n    if (pConfig->ppCustomBackendVTables == NULL) {\n        return MA_NO_BACKEND;\n    }\n\n    /* The order each backend is listed is what defines the priority. */\n    for (ivtable = 0; ivtable < pConfig->customBackendCount; ivtable += 1) {\n        const ma_decoding_backend_vtable* pVTable = pConfig->ppCustomBackendVTables[ivtable];\n        if (pVTable != NULL) {\n            result = ma_decoder_init_from_vtable__internal(pVTable, pConfig->pCustomBackendUserData, pConfig, pDecoder);\n            if (result == MA_SUCCESS) {\n                return MA_SUCCESS;\n            } else {\n                /* Initialization failed. Move on to the next one, but seek back to the start first so the next vtable starts from the first byte of the file. */\n                result = ma_decoder_seek_bytes(pDecoder, 0, ma_seek_origin_start);\n                if (result != MA_SUCCESS) {\n                    return result;  /* Failed to seek back to the start. */\n                }\n            }\n        } else {\n            /* No vtable. */\n        }\n    }\n\n    /* Getting here means we couldn't find a backend. */\n    return MA_NO_BACKEND;\n}\n\nstatic ma_result ma_decoder_init_custom_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result = MA_NO_BACKEND;\n    size_t ivtable;\n\n    MA_ASSERT(pConfig != NULL);\n    MA_ASSERT(pDecoder != NULL);\n\n    if (pConfig->ppCustomBackendVTables == NULL) {\n        return MA_NO_BACKEND;\n    }\n\n    /* The order each backend is listed is what defines the priority. */\n    for (ivtable = 0; ivtable < pConfig->customBackendCount; ivtable += 1) {\n        const ma_decoding_backend_vtable* pVTable = pConfig->ppCustomBackendVTables[ivtable];\n        if (pVTable != NULL) {\n            result = ma_decoder_init_from_file__internal(pVTable, pConfig->pCustomBackendUserData, pFilePath, pConfig, pDecoder);\n            if (result == MA_SUCCESS) {\n                return MA_SUCCESS;\n            }\n        } else {\n            /* No vtable. */\n        }\n    }\n\n    /* Getting here means we couldn't find a backend. */\n    return MA_NO_BACKEND;\n}\n\nstatic ma_result ma_decoder_init_custom_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result = MA_NO_BACKEND;\n    size_t ivtable;\n\n    MA_ASSERT(pConfig != NULL);\n    MA_ASSERT(pDecoder != NULL);\n\n    if (pConfig->ppCustomBackendVTables == NULL) {\n        return MA_NO_BACKEND;\n    }\n\n    /* The order each backend is listed is what defines the priority. */\n    for (ivtable = 0; ivtable < pConfig->customBackendCount; ivtable += 1) {\n        const ma_decoding_backend_vtable* pVTable = pConfig->ppCustomBackendVTables[ivtable];\n        if (pVTable != NULL) {\n            result = ma_decoder_init_from_file_w__internal(pVTable, pConfig->pCustomBackendUserData, pFilePath, pConfig, pDecoder);\n            if (result == MA_SUCCESS) {\n                return MA_SUCCESS;\n            }\n        } else {\n            /* No vtable. */\n        }\n    }\n\n    /* Getting here means we couldn't find a backend. */\n    return MA_NO_BACKEND;\n}\n\nstatic ma_result ma_decoder_init_custom_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result = MA_NO_BACKEND;\n    size_t ivtable;\n\n    MA_ASSERT(pConfig != NULL);\n    MA_ASSERT(pDecoder != NULL);\n\n    if (pConfig->ppCustomBackendVTables == NULL) {\n        return MA_NO_BACKEND;\n    }\n\n    /* The order each backend is listed is what defines the priority. */\n    for (ivtable = 0; ivtable < pConfig->customBackendCount; ivtable += 1) {\n        const ma_decoding_backend_vtable* pVTable = pConfig->ppCustomBackendVTables[ivtable];\n        if (pVTable != NULL) {\n            result = ma_decoder_init_from_memory__internal(pVTable, pConfig->pCustomBackendUserData, pData, dataSize, pConfig, pDecoder);\n            if (result == MA_SUCCESS) {\n                return MA_SUCCESS;\n            }\n        } else {\n            /* No vtable. */\n        }\n    }\n\n    /* Getting here means we couldn't find a backend. */\n    return MA_NO_BACKEND;\n}\n\n\n/* WAV */\n#ifdef ma_dr_wav_h\n#define MA_HAS_WAV\n\ntypedef struct\n{\n    ma_data_source_base ds;\n    ma_read_proc onRead;\n    ma_seek_proc onSeek;\n    ma_tell_proc onTell;\n    void* pReadSeekTellUserData;\n    ma_format format;           /* Can be f32, s16 or s32. */\n#if !defined(MA_NO_WAV)\n    ma_dr_wav dr;\n#endif\n} ma_wav;\n\nMA_API ma_result ma_wav_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav);\nMA_API ma_result ma_wav_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav);\nMA_API ma_result ma_wav_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav);\nMA_API ma_result ma_wav_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav);\nMA_API void ma_wav_uninit(ma_wav* pWav, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_wav_read_pcm_frames(ma_wav* pWav, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\nMA_API ma_result ma_wav_seek_to_pcm_frame(ma_wav* pWav, ma_uint64 frameIndex);\nMA_API ma_result ma_wav_get_data_format(ma_wav* pWav, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);\nMA_API ma_result ma_wav_get_cursor_in_pcm_frames(ma_wav* pWav, ma_uint64* pCursor);\nMA_API ma_result ma_wav_get_length_in_pcm_frames(ma_wav* pWav, ma_uint64* pLength);\n\n\nstatic ma_result ma_wav_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    return ma_wav_read_pcm_frames((ma_wav*)pDataSource, pFramesOut, frameCount, pFramesRead);\n}\n\nstatic ma_result ma_wav_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex)\n{\n    return ma_wav_seek_to_pcm_frame((ma_wav*)pDataSource, frameIndex);\n}\n\nstatic ma_result ma_wav_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    return ma_wav_get_data_format((ma_wav*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap);\n}\n\nstatic ma_result ma_wav_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor)\n{\n    return ma_wav_get_cursor_in_pcm_frames((ma_wav*)pDataSource, pCursor);\n}\n\nstatic ma_result ma_wav_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength)\n{\n    return ma_wav_get_length_in_pcm_frames((ma_wav*)pDataSource, pLength);\n}\n\nstatic ma_data_source_vtable g_ma_wav_ds_vtable =\n{\n    ma_wav_ds_read,\n    ma_wav_ds_seek,\n    ma_wav_ds_get_data_format,\n    ma_wav_ds_get_cursor,\n    ma_wav_ds_get_length,\n    NULL,   /* onSetLooping */\n    0\n};\n\n\n#if !defined(MA_NO_WAV)\nstatic size_t ma_wav_dr_callback__read(void* pUserData, void* pBufferOut, size_t bytesToRead)\n{\n    ma_wav* pWav = (ma_wav*)pUserData;\n    ma_result result;\n    size_t bytesRead;\n\n    MA_ASSERT(pWav != NULL);\n\n    result = pWav->onRead(pWav->pReadSeekTellUserData, pBufferOut, bytesToRead, &bytesRead);\n    (void)result;\n\n    return bytesRead;\n}\n\nstatic ma_bool32 ma_wav_dr_callback__seek(void* pUserData, int offset, ma_dr_wav_seek_origin origin)\n{\n    ma_wav* pWav = (ma_wav*)pUserData;\n    ma_result result;\n    ma_seek_origin maSeekOrigin;\n\n    MA_ASSERT(pWav != NULL);\n\n    maSeekOrigin = ma_seek_origin_start;\n    if (origin == ma_dr_wav_seek_origin_current) {\n        maSeekOrigin =  ma_seek_origin_current;\n    }\n\n    result = pWav->onSeek(pWav->pReadSeekTellUserData, offset, maSeekOrigin);\n    if (result != MA_SUCCESS) {\n        return MA_FALSE;\n    }\n\n    return MA_TRUE;\n}\n#endif\n\nstatic ma_result ma_wav_init_internal(const ma_decoding_backend_config* pConfig, ma_wav* pWav)\n{\n    ma_result result;\n    ma_data_source_config dataSourceConfig;\n\n    if (pWav == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pWav);\n    pWav->format = ma_format_unknown;   /* Use closest match to source file by default. */\n\n    if (pConfig != NULL && (pConfig->preferredFormat == ma_format_f32 || pConfig->preferredFormat == ma_format_s16 || pConfig->preferredFormat == ma_format_s32)) {\n        pWav->format = pConfig->preferredFormat;\n    } else {\n        /* Getting here means something other than f32 and s16 was specified. Just leave this unset to use the default format. */\n    }\n\n    dataSourceConfig = ma_data_source_config_init();\n    dataSourceConfig.vtable = &g_ma_wav_ds_vtable;\n\n    result = ma_data_source_init(&dataSourceConfig, &pWav->ds);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to initialize the base data source. */\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_wav_post_init(ma_wav* pWav)\n{\n    /*\n    If an explicit format was not specified, try picking the closest match based on the internal\n    format. The format needs to be supported by miniaudio.\n    */\n    if (pWav->format == ma_format_unknown) {\n        switch (pWav->dr.translatedFormatTag)\n        {\n            case MA_DR_WAVE_FORMAT_PCM:\n            {\n                if (pWav->dr.bitsPerSample == 8) {\n                    pWav->format = ma_format_u8;\n                } else if (pWav->dr.bitsPerSample == 16) {\n                    pWav->format = ma_format_s16;\n                } else if (pWav->dr.bitsPerSample == 24) {\n                    pWav->format = ma_format_s24;\n                } else if (pWav->dr.bitsPerSample == 32) {\n                    pWav->format = ma_format_s32;\n                }\n            } break;\n\n            case MA_DR_WAVE_FORMAT_IEEE_FLOAT:\n            {\n                if (pWav->dr.bitsPerSample == 32) {\n                    pWav->format = ma_format_f32;\n                }\n            } break;\n\n            default: break;\n        }\n\n        /* Fall back to f32 if we couldn't find anything. */\n        if (pWav->format == ma_format_unknown) {\n            pWav->format =  ma_format_f32;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_wav_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav)\n{\n    ma_result result;\n\n    result = ma_wav_init_internal(pConfig, pWav);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (onRead == NULL || onSeek == NULL) {\n        return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */\n    }\n\n    pWav->onRead = onRead;\n    pWav->onSeek = onSeek;\n    pWav->onTell = onTell;\n    pWav->pReadSeekTellUserData = pReadSeekTellUserData;\n\n    #if !defined(MA_NO_WAV)\n    {\n        ma_bool32 wavResult;\n\n        wavResult = ma_dr_wav_init(&pWav->dr, ma_wav_dr_callback__read, ma_wav_dr_callback__seek, pWav, pAllocationCallbacks);\n        if (wavResult != MA_TRUE) {\n            return MA_INVALID_FILE;\n        }\n\n        ma_wav_post_init(pWav);\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* wav is disabled. */\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_wav_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav)\n{\n    ma_result result;\n\n    result = ma_wav_init_internal(pConfig, pWav);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    #if !defined(MA_NO_WAV)\n    {\n        ma_bool32 wavResult;\n\n        wavResult = ma_dr_wav_init_file(&pWav->dr, pFilePath, pAllocationCallbacks);\n        if (wavResult != MA_TRUE) {\n            return MA_INVALID_FILE;\n        }\n\n        ma_wav_post_init(pWav);\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* wav is disabled. */\n        (void)pFilePath;\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_wav_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav)\n{\n    ma_result result;\n\n    result = ma_wav_init_internal(pConfig, pWav);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    #if !defined(MA_NO_WAV)\n    {\n        ma_bool32 wavResult;\n\n        wavResult = ma_dr_wav_init_file_w(&pWav->dr, pFilePath, pAllocationCallbacks);\n        if (wavResult != MA_TRUE) {\n            return MA_INVALID_FILE;\n        }\n\n        ma_wav_post_init(pWav);\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* wav is disabled. */\n        (void)pFilePath;\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_wav_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_wav* pWav)\n{\n    ma_result result;\n\n    result = ma_wav_init_internal(pConfig, pWav);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    #if !defined(MA_NO_WAV)\n    {\n        ma_bool32 wavResult;\n\n        wavResult = ma_dr_wav_init_memory(&pWav->dr, pData, dataSize, pAllocationCallbacks);\n        if (wavResult != MA_TRUE) {\n            return MA_INVALID_FILE;\n        }\n\n        ma_wav_post_init(pWav);\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* wav is disabled. */\n        (void)pData;\n        (void)dataSize;\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API void ma_wav_uninit(ma_wav* pWav, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pWav == NULL) {\n        return;\n    }\n\n    (void)pAllocationCallbacks;\n\n    #if !defined(MA_NO_WAV)\n    {\n        ma_dr_wav_uninit(&pWav->dr);\n    }\n    #else\n    {\n        /* wav is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n    }\n    #endif\n\n    ma_data_source_uninit(&pWav->ds);\n}\n\nMA_API ma_result ma_wav_read_pcm_frames(ma_wav* pWav, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    if (frameCount == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pWav == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_WAV)\n    {\n        /* We always use floating point format. */\n        ma_result result = MA_SUCCESS;  /* Must be initialized to MA_SUCCESS. */\n        ma_uint64 totalFramesRead = 0;\n        ma_format format;\n\n        ma_wav_get_data_format(pWav, &format, NULL, NULL, NULL, 0);\n\n        switch (format)\n        {\n            case ma_format_f32:\n            {\n                totalFramesRead = ma_dr_wav_read_pcm_frames_f32(&pWav->dr, frameCount, (float*)pFramesOut);\n            } break;\n\n            case ma_format_s16:\n            {\n                totalFramesRead = ma_dr_wav_read_pcm_frames_s16(&pWav->dr, frameCount, (ma_int16*)pFramesOut);\n            } break;\n\n            case ma_format_s32:\n            {\n                totalFramesRead = ma_dr_wav_read_pcm_frames_s32(&pWav->dr, frameCount, (ma_int32*)pFramesOut);\n            } break;\n\n            /* Fallback to a raw read. */\n            case ma_format_unknown: return MA_INVALID_OPERATION; /* <-- this should never be hit because initialization would just fall back to a supported format. */\n            default:\n            {\n                totalFramesRead = ma_dr_wav_read_pcm_frames(&pWav->dr, frameCount, pFramesOut);\n            } break;\n        }\n\n        /* In the future we'll update ma_dr_wav to return MA_AT_END for us. */\n        if (totalFramesRead == 0) {\n            result = MA_AT_END;\n        }\n\n        if (pFramesRead != NULL) {\n            *pFramesRead = totalFramesRead;\n        }\n\n        if (result == MA_SUCCESS && totalFramesRead == 0) {\n            result  = MA_AT_END;\n        }\n\n        return result;\n    }\n    #else\n    {\n        /* wav is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n\n        (void)pFramesOut;\n        (void)frameCount;\n        (void)pFramesRead;\n\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_wav_seek_to_pcm_frame(ma_wav* pWav, ma_uint64 frameIndex)\n{\n    if (pWav == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_WAV)\n    {\n        ma_bool32 wavResult;\n\n        wavResult = ma_dr_wav_seek_to_pcm_frame(&pWav->dr, frameIndex);\n        if (wavResult != MA_TRUE) {\n            return MA_ERROR;\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* wav is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n\n        (void)frameIndex;\n\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_wav_get_data_format(ma_wav* pWav, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    /* Defaults for safety. */\n    if (pFormat != NULL) {\n        *pFormat = ma_format_unknown;\n    }\n    if (pChannels != NULL) {\n        *pChannels = 0;\n    }\n    if (pSampleRate != NULL) {\n        *pSampleRate = 0;\n    }\n    if (pChannelMap != NULL) {\n        MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap);\n    }\n\n    if (pWav == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    if (pFormat != NULL) {\n        *pFormat = pWav->format;\n    }\n\n    #if !defined(MA_NO_WAV)\n    {\n        if (pChannels != NULL) {\n            *pChannels = pWav->dr.channels;\n        }\n\n        if (pSampleRate != NULL) {\n            *pSampleRate = pWav->dr.sampleRate;\n        }\n\n        if (pChannelMap != NULL) {\n            ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pChannelMap, channelMapCap, pWav->dr.channels);\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* wav is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_wav_get_cursor_in_pcm_frames(ma_wav* pWav, ma_uint64* pCursor)\n{\n    if (pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = 0;   /* Safety. */\n\n    if (pWav == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_WAV)\n    {\n        ma_result wavResult = ma_dr_wav_get_cursor_in_pcm_frames(&pWav->dr, pCursor);\n        if (wavResult != MA_SUCCESS) {\n            return (ma_result)wavResult;    /* ma_dr_wav result codes map to miniaudio's. */\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* wav is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_wav_get_length_in_pcm_frames(ma_wav* pWav, ma_uint64* pLength)\n{\n    if (pLength == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pLength = 0;   /* Safety. */\n\n    if (pWav == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_WAV)\n    {\n        ma_result wavResult = ma_dr_wav_get_length_in_pcm_frames(&pWav->dr, pLength);\n        if (wavResult != MA_SUCCESS) {\n            return (ma_result)wavResult;    /* ma_dr_wav result codes map to miniaudio's. */\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* wav is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\n\nstatic ma_result ma_decoding_backend_init__wav(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_wav* pWav;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pWav = (ma_wav*)ma_malloc(sizeof(*pWav), pAllocationCallbacks);\n    if (pWav == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_wav_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pWav);\n    if (result != MA_SUCCESS) {\n        ma_free(pWav, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pWav;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoding_backend_init_file__wav(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_wav* pWav;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pWav = (ma_wav*)ma_malloc(sizeof(*pWav), pAllocationCallbacks);\n    if (pWav == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_wav_init_file(pFilePath, pConfig, pAllocationCallbacks, pWav);\n    if (result != MA_SUCCESS) {\n        ma_free(pWav, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pWav;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoding_backend_init_file_w__wav(void* pUserData, const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_wav* pWav;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pWav = (ma_wav*)ma_malloc(sizeof(*pWav), pAllocationCallbacks);\n    if (pWav == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_wav_init_file_w(pFilePath, pConfig, pAllocationCallbacks, pWav);\n    if (result != MA_SUCCESS) {\n        ma_free(pWav, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pWav;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoding_backend_init_memory__wav(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_wav* pWav;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pWav = (ma_wav*)ma_malloc(sizeof(*pWav), pAllocationCallbacks);\n    if (pWav == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_wav_init_memory(pData, dataSize, pConfig, pAllocationCallbacks, pWav);\n    if (result != MA_SUCCESS) {\n        ma_free(pWav, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pWav;\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_decoding_backend_uninit__wav(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_wav* pWav = (ma_wav*)pBackend;\n\n    (void)pUserData;\n\n    ma_wav_uninit(pWav, pAllocationCallbacks);\n    ma_free(pWav, pAllocationCallbacks);\n}\n\nstatic ma_decoding_backend_vtable g_ma_decoding_backend_vtable_wav =\n{\n    ma_decoding_backend_init__wav,\n    ma_decoding_backend_init_file__wav,\n    ma_decoding_backend_init_file_w__wav,\n    ma_decoding_backend_init_memory__wav,\n    ma_decoding_backend_uninit__wav\n};\n\nstatic ma_result ma_decoder_init_wav__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_vtable__internal(&g_ma_decoding_backend_vtable_wav, NULL, pConfig, pDecoder);\n}\n\nstatic ma_result ma_decoder_init_wav_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_file__internal(&g_ma_decoding_backend_vtable_wav, NULL, pFilePath, pConfig, pDecoder);\n}\n\nstatic ma_result ma_decoder_init_wav_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_file_w__internal(&g_ma_decoding_backend_vtable_wav, NULL, pFilePath, pConfig, pDecoder);\n}\n\nstatic ma_result ma_decoder_init_wav_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_memory__internal(&g_ma_decoding_backend_vtable_wav, NULL, pData, dataSize, pConfig, pDecoder);\n}\n#endif  /* ma_dr_wav_h */\n\n/* FLAC */\n#ifdef ma_dr_flac_h\n#define MA_HAS_FLAC\n\ntypedef struct\n{\n    ma_data_source_base ds;\n    ma_read_proc onRead;\n    ma_seek_proc onSeek;\n    ma_tell_proc onTell;\n    void* pReadSeekTellUserData;\n    ma_format format;           /* Can be f32, s16 or s32. */\n#if !defined(MA_NO_FLAC)\n    ma_dr_flac* dr;\n#endif\n} ma_flac;\n\nMA_API ma_result ma_flac_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac);\nMA_API ma_result ma_flac_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac);\nMA_API ma_result ma_flac_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac);\nMA_API ma_result ma_flac_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac);\nMA_API void ma_flac_uninit(ma_flac* pFlac, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_flac_read_pcm_frames(ma_flac* pFlac, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\nMA_API ma_result ma_flac_seek_to_pcm_frame(ma_flac* pFlac, ma_uint64 frameIndex);\nMA_API ma_result ma_flac_get_data_format(ma_flac* pFlac, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);\nMA_API ma_result ma_flac_get_cursor_in_pcm_frames(ma_flac* pFlac, ma_uint64* pCursor);\nMA_API ma_result ma_flac_get_length_in_pcm_frames(ma_flac* pFlac, ma_uint64* pLength);\n\n\nstatic ma_result ma_flac_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    return ma_flac_read_pcm_frames((ma_flac*)pDataSource, pFramesOut, frameCount, pFramesRead);\n}\n\nstatic ma_result ma_flac_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex)\n{\n    return ma_flac_seek_to_pcm_frame((ma_flac*)pDataSource, frameIndex);\n}\n\nstatic ma_result ma_flac_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    return ma_flac_get_data_format((ma_flac*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap);\n}\n\nstatic ma_result ma_flac_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor)\n{\n    return ma_flac_get_cursor_in_pcm_frames((ma_flac*)pDataSource, pCursor);\n}\n\nstatic ma_result ma_flac_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength)\n{\n    return ma_flac_get_length_in_pcm_frames((ma_flac*)pDataSource, pLength);\n}\n\nstatic ma_data_source_vtable g_ma_flac_ds_vtable =\n{\n    ma_flac_ds_read,\n    ma_flac_ds_seek,\n    ma_flac_ds_get_data_format,\n    ma_flac_ds_get_cursor,\n    ma_flac_ds_get_length,\n    NULL,   /* onSetLooping */\n    0\n};\n\n\n#if !defined(MA_NO_FLAC)\nstatic size_t ma_flac_dr_callback__read(void* pUserData, void* pBufferOut, size_t bytesToRead)\n{\n    ma_flac* pFlac = (ma_flac*)pUserData;\n    ma_result result;\n    size_t bytesRead;\n\n    MA_ASSERT(pFlac != NULL);\n\n    result = pFlac->onRead(pFlac->pReadSeekTellUserData, pBufferOut, bytesToRead, &bytesRead);\n    (void)result;\n\n    return bytesRead;\n}\n\nstatic ma_bool32 ma_flac_dr_callback__seek(void* pUserData, int offset, ma_dr_flac_seek_origin origin)\n{\n    ma_flac* pFlac = (ma_flac*)pUserData;\n    ma_result result;\n    ma_seek_origin maSeekOrigin;\n\n    MA_ASSERT(pFlac != NULL);\n\n    maSeekOrigin = ma_seek_origin_start;\n    if (origin == ma_dr_flac_seek_origin_current) {\n        maSeekOrigin =  ma_seek_origin_current;\n    }\n\n    result = pFlac->onSeek(pFlac->pReadSeekTellUserData, offset, maSeekOrigin);\n    if (result != MA_SUCCESS) {\n        return MA_FALSE;\n    }\n\n    return MA_TRUE;\n}\n#endif\n\nstatic ma_result ma_flac_init_internal(const ma_decoding_backend_config* pConfig, ma_flac* pFlac)\n{\n    ma_result result;\n    ma_data_source_config dataSourceConfig;\n\n    if (pFlac == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pFlac);\n    pFlac->format = ma_format_f32;    /* f32 by default. */\n\n    if (pConfig != NULL && (pConfig->preferredFormat == ma_format_f32 || pConfig->preferredFormat == ma_format_s16 || pConfig->preferredFormat == ma_format_s32)) {\n        pFlac->format = pConfig->preferredFormat;\n    } else {\n        /* Getting here means something other than f32 and s16 was specified. Just leave this unset to use the default format. */\n    }\n\n    dataSourceConfig = ma_data_source_config_init();\n    dataSourceConfig.vtable = &g_ma_flac_ds_vtable;\n\n    result = ma_data_source_init(&dataSourceConfig, &pFlac->ds);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to initialize the base data source. */\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_flac_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac)\n{\n    ma_result result;\n\n    result = ma_flac_init_internal(pConfig, pFlac);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (onRead == NULL || onSeek == NULL) {\n        return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */\n    }\n\n    pFlac->onRead = onRead;\n    pFlac->onSeek = onSeek;\n    pFlac->onTell = onTell;\n    pFlac->pReadSeekTellUserData = pReadSeekTellUserData;\n\n    #if !defined(MA_NO_FLAC)\n    {\n        pFlac->dr = ma_dr_flac_open(ma_flac_dr_callback__read, ma_flac_dr_callback__seek, pFlac, pAllocationCallbacks);\n        if (pFlac->dr == NULL) {\n            return MA_INVALID_FILE;\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* flac is disabled. */\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_flac_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac)\n{\n    ma_result result;\n\n    result = ma_flac_init_internal(pConfig, pFlac);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    #if !defined(MA_NO_FLAC)\n    {\n        pFlac->dr = ma_dr_flac_open_file(pFilePath, pAllocationCallbacks);\n        if (pFlac->dr == NULL) {\n            return MA_INVALID_FILE;\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* flac is disabled. */\n        (void)pFilePath;\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_flac_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac)\n{\n    ma_result result;\n\n    result = ma_flac_init_internal(pConfig, pFlac);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    #if !defined(MA_NO_FLAC)\n    {\n        pFlac->dr = ma_dr_flac_open_file_w(pFilePath, pAllocationCallbacks);\n        if (pFlac->dr == NULL) {\n            return MA_INVALID_FILE;\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* flac is disabled. */\n        (void)pFilePath;\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_flac_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_flac* pFlac)\n{\n    ma_result result;\n\n    result = ma_flac_init_internal(pConfig, pFlac);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    #if !defined(MA_NO_FLAC)\n    {\n        pFlac->dr = ma_dr_flac_open_memory(pData, dataSize, pAllocationCallbacks);\n        if (pFlac->dr == NULL) {\n            return MA_INVALID_FILE;\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* flac is disabled. */\n        (void)pData;\n        (void)dataSize;\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API void ma_flac_uninit(ma_flac* pFlac, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pFlac == NULL) {\n        return;\n    }\n\n    (void)pAllocationCallbacks;\n\n    #if !defined(MA_NO_FLAC)\n    {\n        ma_dr_flac_close(pFlac->dr);\n    }\n    #else\n    {\n        /* flac is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n    }\n    #endif\n\n    ma_data_source_uninit(&pFlac->ds);\n}\n\nMA_API ma_result ma_flac_read_pcm_frames(ma_flac* pFlac, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    if (frameCount == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pFlac == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_FLAC)\n    {\n        /* We always use floating point format. */\n        ma_result result = MA_SUCCESS;  /* Must be initialized to MA_SUCCESS. */\n        ma_uint64 totalFramesRead = 0;\n        ma_format format;\n\n        ma_flac_get_data_format(pFlac, &format, NULL, NULL, NULL, 0);\n\n        switch (format)\n        {\n            case ma_format_f32:\n            {\n                totalFramesRead = ma_dr_flac_read_pcm_frames_f32(pFlac->dr, frameCount, (float*)pFramesOut);\n            } break;\n\n            case ma_format_s16:\n            {\n                totalFramesRead = ma_dr_flac_read_pcm_frames_s16(pFlac->dr, frameCount, (ma_int16*)pFramesOut);\n            } break;\n\n            case ma_format_s32:\n            {\n                totalFramesRead = ma_dr_flac_read_pcm_frames_s32(pFlac->dr, frameCount, (ma_int32*)pFramesOut);\n            } break;\n\n            case ma_format_u8:\n            case ma_format_s24:\n            case ma_format_unknown:\n            default:\n            {\n                return MA_INVALID_OPERATION;\n            };\n        }\n\n        /* In the future we'll update ma_dr_flac to return MA_AT_END for us. */\n        if (totalFramesRead == 0) {\n            result = MA_AT_END;\n        }\n\n        if (pFramesRead != NULL) {\n            *pFramesRead = totalFramesRead;\n        }\n\n        if (result == MA_SUCCESS && totalFramesRead == 0) {\n            result  = MA_AT_END;\n        }\n\n        return result;\n    }\n    #else\n    {\n        /* flac is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n\n        (void)pFramesOut;\n        (void)frameCount;\n        (void)pFramesRead;\n\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_flac_seek_to_pcm_frame(ma_flac* pFlac, ma_uint64 frameIndex)\n{\n    if (pFlac == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_FLAC)\n    {\n        ma_bool32 flacResult;\n\n        flacResult = ma_dr_flac_seek_to_pcm_frame(pFlac->dr, frameIndex);\n        if (flacResult != MA_TRUE) {\n            return MA_ERROR;\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* flac is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n\n        (void)frameIndex;\n\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_flac_get_data_format(ma_flac* pFlac, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    /* Defaults for safety. */\n    if (pFormat != NULL) {\n        *pFormat = ma_format_unknown;\n    }\n    if (pChannels != NULL) {\n        *pChannels = 0;\n    }\n    if (pSampleRate != NULL) {\n        *pSampleRate = 0;\n    }\n    if (pChannelMap != NULL) {\n        MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap);\n    }\n\n    if (pFlac == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    if (pFormat != NULL) {\n        *pFormat = pFlac->format;\n    }\n\n    #if !defined(MA_NO_FLAC)\n    {\n        if (pChannels != NULL) {\n            *pChannels = pFlac->dr->channels;\n        }\n\n        if (pSampleRate != NULL) {\n            *pSampleRate = pFlac->dr->sampleRate;\n        }\n\n        if (pChannelMap != NULL) {\n            ma_channel_map_init_standard(ma_standard_channel_map_microsoft, pChannelMap, channelMapCap, pFlac->dr->channels);\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* flac is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_flac_get_cursor_in_pcm_frames(ma_flac* pFlac, ma_uint64* pCursor)\n{\n    if (pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = 0;   /* Safety. */\n\n    if (pFlac == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_FLAC)\n    {\n        *pCursor = pFlac->dr->currentPCMFrame;\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* flac is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_flac_get_length_in_pcm_frames(ma_flac* pFlac, ma_uint64* pLength)\n{\n    if (pLength == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pLength = 0;   /* Safety. */\n\n    if (pFlac == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_FLAC)\n    {\n        *pLength = pFlac->dr->totalPCMFrameCount;\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* flac is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\n\nstatic ma_result ma_decoding_backend_init__flac(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_flac* pFlac;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pFlac = (ma_flac*)ma_malloc(sizeof(*pFlac), pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_flac_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pFlac);\n    if (result != MA_SUCCESS) {\n        ma_free(pFlac, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pFlac;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoding_backend_init_file__flac(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_flac* pFlac;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pFlac = (ma_flac*)ma_malloc(sizeof(*pFlac), pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_flac_init_file(pFilePath, pConfig, pAllocationCallbacks, pFlac);\n    if (result != MA_SUCCESS) {\n        ma_free(pFlac, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pFlac;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoding_backend_init_file_w__flac(void* pUserData, const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_flac* pFlac;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pFlac = (ma_flac*)ma_malloc(sizeof(*pFlac), pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_flac_init_file_w(pFilePath, pConfig, pAllocationCallbacks, pFlac);\n    if (result != MA_SUCCESS) {\n        ma_free(pFlac, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pFlac;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoding_backend_init_memory__flac(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_flac* pFlac;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pFlac = (ma_flac*)ma_malloc(sizeof(*pFlac), pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_flac_init_memory(pData, dataSize, pConfig, pAllocationCallbacks, pFlac);\n    if (result != MA_SUCCESS) {\n        ma_free(pFlac, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pFlac;\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_decoding_backend_uninit__flac(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_flac* pFlac = (ma_flac*)pBackend;\n\n    (void)pUserData;\n\n    ma_flac_uninit(pFlac, pAllocationCallbacks);\n    ma_free(pFlac, pAllocationCallbacks);\n}\n\nstatic ma_decoding_backend_vtable g_ma_decoding_backend_vtable_flac =\n{\n    ma_decoding_backend_init__flac,\n    ma_decoding_backend_init_file__flac,\n    ma_decoding_backend_init_file_w__flac,\n    ma_decoding_backend_init_memory__flac,\n    ma_decoding_backend_uninit__flac\n};\n\nstatic ma_result ma_decoder_init_flac__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_vtable__internal(&g_ma_decoding_backend_vtable_flac, NULL, pConfig, pDecoder);\n}\n\nstatic ma_result ma_decoder_init_flac_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_file__internal(&g_ma_decoding_backend_vtable_flac, NULL, pFilePath, pConfig, pDecoder);\n}\n\nstatic ma_result ma_decoder_init_flac_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_file_w__internal(&g_ma_decoding_backend_vtable_flac, NULL, pFilePath, pConfig, pDecoder);\n}\n\nstatic ma_result ma_decoder_init_flac_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_memory__internal(&g_ma_decoding_backend_vtable_flac, NULL, pData, dataSize, pConfig, pDecoder);\n}\n#endif  /* ma_dr_flac_h */\n\n/* MP3 */\n#ifdef ma_dr_mp3_h\n#define MA_HAS_MP3\n\ntypedef struct\n{\n    ma_data_source_base ds;\n    ma_read_proc onRead;\n    ma_seek_proc onSeek;\n    ma_tell_proc onTell;\n    void* pReadSeekTellUserData;\n    ma_format format;           /* Can be f32 or s16. */\n#if !defined(MA_NO_MP3)\n    ma_dr_mp3 dr;\n    ma_uint32 seekPointCount;\n    ma_dr_mp3_seek_point* pSeekPoints;  /* Only used if seek table generation is used. */\n#endif\n} ma_mp3;\n\nMA_API ma_result ma_mp3_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3);\nMA_API ma_result ma_mp3_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3);\nMA_API ma_result ma_mp3_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3);\nMA_API ma_result ma_mp3_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3);\nMA_API void ma_mp3_uninit(ma_mp3* pMP3, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_mp3_read_pcm_frames(ma_mp3* pMP3, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\nMA_API ma_result ma_mp3_seek_to_pcm_frame(ma_mp3* pMP3, ma_uint64 frameIndex);\nMA_API ma_result ma_mp3_get_data_format(ma_mp3* pMP3, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);\nMA_API ma_result ma_mp3_get_cursor_in_pcm_frames(ma_mp3* pMP3, ma_uint64* pCursor);\nMA_API ma_result ma_mp3_get_length_in_pcm_frames(ma_mp3* pMP3, ma_uint64* pLength);\n\n\nstatic ma_result ma_mp3_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    return ma_mp3_read_pcm_frames((ma_mp3*)pDataSource, pFramesOut, frameCount, pFramesRead);\n}\n\nstatic ma_result ma_mp3_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex)\n{\n    return ma_mp3_seek_to_pcm_frame((ma_mp3*)pDataSource, frameIndex);\n}\n\nstatic ma_result ma_mp3_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    return ma_mp3_get_data_format((ma_mp3*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap);\n}\n\nstatic ma_result ma_mp3_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor)\n{\n    return ma_mp3_get_cursor_in_pcm_frames((ma_mp3*)pDataSource, pCursor);\n}\n\nstatic ma_result ma_mp3_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength)\n{\n    return ma_mp3_get_length_in_pcm_frames((ma_mp3*)pDataSource, pLength);\n}\n\nstatic ma_data_source_vtable g_ma_mp3_ds_vtable =\n{\n    ma_mp3_ds_read,\n    ma_mp3_ds_seek,\n    ma_mp3_ds_get_data_format,\n    ma_mp3_ds_get_cursor,\n    ma_mp3_ds_get_length,\n    NULL,   /* onSetLooping */\n    0\n};\n\n\n#if !defined(MA_NO_MP3)\nstatic size_t ma_mp3_dr_callback__read(void* pUserData, void* pBufferOut, size_t bytesToRead)\n{\n    ma_mp3* pMP3 = (ma_mp3*)pUserData;\n    ma_result result;\n    size_t bytesRead;\n\n    MA_ASSERT(pMP3 != NULL);\n\n    result = pMP3->onRead(pMP3->pReadSeekTellUserData, pBufferOut, bytesToRead, &bytesRead);\n    (void)result;\n\n    return bytesRead;\n}\n\nstatic ma_bool32 ma_mp3_dr_callback__seek(void* pUserData, int offset, ma_dr_mp3_seek_origin origin)\n{\n    ma_mp3* pMP3 = (ma_mp3*)pUserData;\n    ma_result result;\n    ma_seek_origin maSeekOrigin;\n\n    MA_ASSERT(pMP3 != NULL);\n\n    maSeekOrigin = ma_seek_origin_start;\n    if (origin == ma_dr_mp3_seek_origin_current) {\n        maSeekOrigin =  ma_seek_origin_current;\n    }\n\n    result = pMP3->onSeek(pMP3->pReadSeekTellUserData, offset, maSeekOrigin);\n    if (result != MA_SUCCESS) {\n        return MA_FALSE;\n    }\n\n    return MA_TRUE;\n}\n#endif\n\nstatic ma_result ma_mp3_init_internal(const ma_decoding_backend_config* pConfig, ma_mp3* pMP3)\n{\n    ma_result result;\n    ma_data_source_config dataSourceConfig;\n\n    if (pMP3 == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pMP3);\n    pMP3->format = ma_format_f32;    /* f32 by default. */\n\n    if (pConfig != NULL && (pConfig->preferredFormat == ma_format_f32 || pConfig->preferredFormat == ma_format_s16)) {\n        pMP3->format = pConfig->preferredFormat;\n    } else {\n        /* Getting here means something other than f32 and s16 was specified. Just leave this unset to use the default format. */\n    }\n\n    dataSourceConfig = ma_data_source_config_init();\n    dataSourceConfig.vtable = &g_ma_mp3_ds_vtable;\n\n    result = ma_data_source_init(&dataSourceConfig, &pMP3->ds);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to initialize the base data source. */\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_mp3_generate_seek_table(ma_mp3* pMP3, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_bool32 mp3Result;\n    ma_uint32 seekPointCount = 0;\n    ma_dr_mp3_seek_point* pSeekPoints = NULL;\n\n    MA_ASSERT(pMP3    != NULL);\n    MA_ASSERT(pConfig != NULL);\n\n    seekPointCount = pConfig->seekPointCount;\n    if (seekPointCount > 0) {\n        pSeekPoints = (ma_dr_mp3_seek_point*)ma_malloc(sizeof(*pMP3->pSeekPoints) * seekPointCount, pAllocationCallbacks);\n        if (pSeekPoints == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    }\n\n    mp3Result = ma_dr_mp3_calculate_seek_points(&pMP3->dr, &seekPointCount, pSeekPoints);\n    if (mp3Result != MA_TRUE) {\n        ma_free(pSeekPoints, pAllocationCallbacks);\n        return MA_ERROR;\n    }\n\n    mp3Result = ma_dr_mp3_bind_seek_table(&pMP3->dr, seekPointCount, pSeekPoints);\n    if (mp3Result != MA_TRUE) {\n        ma_free(pSeekPoints, pAllocationCallbacks);\n        return MA_ERROR;\n    }\n\n    pMP3->seekPointCount = seekPointCount;\n    pMP3->pSeekPoints    = pSeekPoints;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_mp3_post_init(ma_mp3* pMP3, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_result result;\n\n    result = ma_mp3_generate_seek_table(pMP3, pConfig, pAllocationCallbacks);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_mp3_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3)\n{\n    ma_result result;\n\n    result = ma_mp3_init_internal(pConfig, pMP3);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (onRead == NULL || onSeek == NULL) {\n        return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */\n    }\n\n    pMP3->onRead = onRead;\n    pMP3->onSeek = onSeek;\n    pMP3->onTell = onTell;\n    pMP3->pReadSeekTellUserData = pReadSeekTellUserData;\n\n    #if !defined(MA_NO_MP3)\n    {\n        ma_bool32 mp3Result;\n\n        mp3Result = ma_dr_mp3_init(&pMP3->dr, ma_mp3_dr_callback__read, ma_mp3_dr_callback__seek, pMP3, pAllocationCallbacks);\n        if (mp3Result != MA_TRUE) {\n            return MA_INVALID_FILE;\n        }\n\n        ma_mp3_post_init(pMP3, pConfig, pAllocationCallbacks);\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* mp3 is disabled. */\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_mp3_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3)\n{\n    ma_result result;\n\n    result = ma_mp3_init_internal(pConfig, pMP3);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    #if !defined(MA_NO_MP3)\n    {\n        ma_bool32 mp3Result;\n\n        mp3Result = ma_dr_mp3_init_file(&pMP3->dr, pFilePath, pAllocationCallbacks);\n        if (mp3Result != MA_TRUE) {\n            return MA_INVALID_FILE;\n        }\n\n        ma_mp3_post_init(pMP3, pConfig, pAllocationCallbacks);\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* mp3 is disabled. */\n        (void)pFilePath;\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_mp3_init_file_w(const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3)\n{\n    ma_result result;\n\n    result = ma_mp3_init_internal(pConfig, pMP3);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    #if !defined(MA_NO_MP3)\n    {\n        ma_bool32 mp3Result;\n\n        mp3Result = ma_dr_mp3_init_file_w(&pMP3->dr, pFilePath, pAllocationCallbacks);\n        if (mp3Result != MA_TRUE) {\n            return MA_INVALID_FILE;\n        }\n\n        ma_mp3_post_init(pMP3, pConfig, pAllocationCallbacks);\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* mp3 is disabled. */\n        (void)pFilePath;\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_mp3_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_mp3* pMP3)\n{\n    ma_result result;\n\n    result = ma_mp3_init_internal(pConfig, pMP3);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    #if !defined(MA_NO_MP3)\n    {\n        ma_bool32 mp3Result;\n\n        mp3Result = ma_dr_mp3_init_memory(&pMP3->dr, pData, dataSize, pAllocationCallbacks);\n        if (mp3Result != MA_TRUE) {\n            return MA_INVALID_FILE;\n        }\n\n        ma_mp3_post_init(pMP3, pConfig, pAllocationCallbacks);\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* mp3 is disabled. */\n        (void)pData;\n        (void)dataSize;\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API void ma_mp3_uninit(ma_mp3* pMP3, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pMP3 == NULL) {\n        return;\n    }\n\n    #if !defined(MA_NO_MP3)\n    {\n        ma_dr_mp3_uninit(&pMP3->dr);\n    }\n    #else\n    {\n        /* mp3 is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n    }\n    #endif\n\n    /* Seek points need to be freed after the MP3 decoder has been uninitialized to ensure they're no longer being referenced. */\n    ma_free(pMP3->pSeekPoints, pAllocationCallbacks);\n\n    ma_data_source_uninit(&pMP3->ds);\n}\n\nMA_API ma_result ma_mp3_read_pcm_frames(ma_mp3* pMP3, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    if (frameCount == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pMP3 == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_MP3)\n    {\n        /* We always use floating point format. */\n        ma_result result = MA_SUCCESS;  /* Must be initialized to MA_SUCCESS. */\n        ma_uint64 totalFramesRead = 0;\n        ma_format format;\n\n        ma_mp3_get_data_format(pMP3, &format, NULL, NULL, NULL, 0);\n\n        switch (format)\n        {\n            case ma_format_f32:\n            {\n                totalFramesRead = ma_dr_mp3_read_pcm_frames_f32(&pMP3->dr, frameCount, (float*)pFramesOut);\n            } break;\n\n            case ma_format_s16:\n            {\n                totalFramesRead = ma_dr_mp3_read_pcm_frames_s16(&pMP3->dr, frameCount, (ma_int16*)pFramesOut);\n            } break;\n\n            case ma_format_u8:\n            case ma_format_s24:\n            case ma_format_s32:\n            case ma_format_unknown:\n            default:\n            {\n                return MA_INVALID_OPERATION;\n            };\n        }\n\n        /* In the future we'll update ma_dr_mp3 to return MA_AT_END for us. */\n        if (totalFramesRead == 0) {\n            result = MA_AT_END;\n        }\n\n        if (pFramesRead != NULL) {\n            *pFramesRead = totalFramesRead;\n        }\n\n        return result;\n    }\n    #else\n    {\n        /* mp3 is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n\n        (void)pFramesOut;\n        (void)frameCount;\n        (void)pFramesRead;\n\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_mp3_seek_to_pcm_frame(ma_mp3* pMP3, ma_uint64 frameIndex)\n{\n    if (pMP3 == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_MP3)\n    {\n        ma_bool32 mp3Result;\n\n        mp3Result = ma_dr_mp3_seek_to_pcm_frame(&pMP3->dr, frameIndex);\n        if (mp3Result != MA_TRUE) {\n            return MA_ERROR;\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* mp3 is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n\n        (void)frameIndex;\n\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_mp3_get_data_format(ma_mp3* pMP3, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    /* Defaults for safety. */\n    if (pFormat != NULL) {\n        *pFormat = ma_format_unknown;\n    }\n    if (pChannels != NULL) {\n        *pChannels = 0;\n    }\n    if (pSampleRate != NULL) {\n        *pSampleRate = 0;\n    }\n    if (pChannelMap != NULL) {\n        MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap);\n    }\n\n    if (pMP3 == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    if (pFormat != NULL) {\n        *pFormat = pMP3->format;\n    }\n\n    #if !defined(MA_NO_MP3)\n    {\n        if (pChannels != NULL) {\n            *pChannels = pMP3->dr.channels;\n        }\n\n        if (pSampleRate != NULL) {\n            *pSampleRate = pMP3->dr.sampleRate;\n        }\n\n        if (pChannelMap != NULL) {\n            ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pMP3->dr.channels);\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* mp3 is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_mp3_get_cursor_in_pcm_frames(ma_mp3* pMP3, ma_uint64* pCursor)\n{\n    if (pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = 0;   /* Safety. */\n\n    if (pMP3 == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_MP3)\n    {\n        *pCursor = pMP3->dr.currentPCMFrame;\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* mp3 is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_mp3_get_length_in_pcm_frames(ma_mp3* pMP3, ma_uint64* pLength)\n{\n    if (pLength == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pLength = 0;   /* Safety. */\n\n    if (pMP3 == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_MP3)\n    {\n        *pLength = ma_dr_mp3_get_pcm_frame_count(&pMP3->dr);\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* mp3 is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\n\nstatic ma_result ma_decoding_backend_init__mp3(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_mp3* pMP3;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pMP3 = (ma_mp3*)ma_malloc(sizeof(*pMP3), pAllocationCallbacks);\n    if (pMP3 == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_mp3_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pMP3);\n    if (result != MA_SUCCESS) {\n        ma_free(pMP3, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pMP3;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoding_backend_init_file__mp3(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_mp3* pMP3;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pMP3 = (ma_mp3*)ma_malloc(sizeof(*pMP3), pAllocationCallbacks);\n    if (pMP3 == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_mp3_init_file(pFilePath, pConfig, pAllocationCallbacks, pMP3);\n    if (result != MA_SUCCESS) {\n        ma_free(pMP3, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pMP3;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoding_backend_init_file_w__mp3(void* pUserData, const wchar_t* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_mp3* pMP3;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pMP3 = (ma_mp3*)ma_malloc(sizeof(*pMP3), pAllocationCallbacks);\n    if (pMP3 == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_mp3_init_file_w(pFilePath, pConfig, pAllocationCallbacks, pMP3);\n    if (result != MA_SUCCESS) {\n        ma_free(pMP3, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pMP3;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoding_backend_init_memory__mp3(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_mp3* pMP3;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pMP3 = (ma_mp3*)ma_malloc(sizeof(*pMP3), pAllocationCallbacks);\n    if (pMP3 == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_mp3_init_memory(pData, dataSize, pConfig, pAllocationCallbacks, pMP3);\n    if (result != MA_SUCCESS) {\n        ma_free(pMP3, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pMP3;\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_decoding_backend_uninit__mp3(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_mp3* pMP3 = (ma_mp3*)pBackend;\n\n    (void)pUserData;\n\n    ma_mp3_uninit(pMP3, pAllocationCallbacks);\n    ma_free(pMP3, pAllocationCallbacks);\n}\n\nstatic ma_decoding_backend_vtable g_ma_decoding_backend_vtable_mp3 =\n{\n    ma_decoding_backend_init__mp3,\n    ma_decoding_backend_init_file__mp3,\n    ma_decoding_backend_init_file_w__mp3,\n    ma_decoding_backend_init_memory__mp3,\n    ma_decoding_backend_uninit__mp3\n};\n\nstatic ma_result ma_decoder_init_mp3__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_vtable__internal(&g_ma_decoding_backend_vtable_mp3, NULL, pConfig, pDecoder);\n}\n\nstatic ma_result ma_decoder_init_mp3_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_file__internal(&g_ma_decoding_backend_vtable_mp3, NULL, pFilePath, pConfig, pDecoder);\n}\n\nstatic ma_result ma_decoder_init_mp3_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_file_w__internal(&g_ma_decoding_backend_vtable_mp3, NULL, pFilePath, pConfig, pDecoder);\n}\n\nstatic ma_result ma_decoder_init_mp3_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_memory__internal(&g_ma_decoding_backend_vtable_mp3, NULL, pData, dataSize, pConfig, pDecoder);\n}\n#endif  /* ma_dr_mp3_h */\n\n/* Vorbis */\n#ifdef STB_VORBIS_INCLUDE_STB_VORBIS_H\n#define MA_HAS_VORBIS\n\n/* The size in bytes of each chunk of data to read from the Vorbis stream. */\n#define MA_VORBIS_DATA_CHUNK_SIZE  4096\n\ntypedef struct\n{\n    ma_data_source_base ds;\n    ma_read_proc onRead;\n    ma_seek_proc onSeek;\n    ma_tell_proc onTell;\n    void* pReadSeekTellUserData;\n    ma_allocation_callbacks allocationCallbacks;    /* Store the allocation callbacks within the structure because we may need to dynamically expand a buffer in ma_stbvorbis_read_pcm_frames() when using push mode. */\n    ma_format format;               /* Only f32 is allowed with stb_vorbis. */\n    ma_uint32 channels;\n    ma_uint32 sampleRate;\n    ma_uint64 cursor;\n#if !defined(MA_NO_VORBIS)\n    stb_vorbis* stb;\n    ma_bool32 usingPushMode;\n    struct\n    {\n        ma_uint8* pData;\n        size_t dataSize;\n        size_t dataCapacity;\n        size_t audioStartOffsetInBytes;\n        ma_uint32 framesConsumed;   /* The number of frames consumed in ppPacketData. */\n        ma_uint32 framesRemaining;  /* The number of frames remaining in ppPacketData. */\n        float** ppPacketData;\n    } push;\n#endif\n} ma_stbvorbis;\n\nMA_API ma_result ma_stbvorbis_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis);\nMA_API ma_result ma_stbvorbis_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis);\nMA_API ma_result ma_stbvorbis_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis);\nMA_API void ma_stbvorbis_uninit(ma_stbvorbis* pVorbis, const ma_allocation_callbacks* pAllocationCallbacks);\nMA_API ma_result ma_stbvorbis_read_pcm_frames(ma_stbvorbis* pVorbis, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead);\nMA_API ma_result ma_stbvorbis_seek_to_pcm_frame(ma_stbvorbis* pVorbis, ma_uint64 frameIndex);\nMA_API ma_result ma_stbvorbis_get_data_format(ma_stbvorbis* pVorbis, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap);\nMA_API ma_result ma_stbvorbis_get_cursor_in_pcm_frames(ma_stbvorbis* pVorbis, ma_uint64* pCursor);\nMA_API ma_result ma_stbvorbis_get_length_in_pcm_frames(ma_stbvorbis* pVorbis, ma_uint64* pLength);\n\n\nstatic ma_result ma_stbvorbis_ds_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    return ma_stbvorbis_read_pcm_frames((ma_stbvorbis*)pDataSource, pFramesOut, frameCount, pFramesRead);\n}\n\nstatic ma_result ma_stbvorbis_ds_seek(ma_data_source* pDataSource, ma_uint64 frameIndex)\n{\n    return ma_stbvorbis_seek_to_pcm_frame((ma_stbvorbis*)pDataSource, frameIndex);\n}\n\nstatic ma_result ma_stbvorbis_ds_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    return ma_stbvorbis_get_data_format((ma_stbvorbis*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap);\n}\n\nstatic ma_result ma_stbvorbis_ds_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor)\n{\n    return ma_stbvorbis_get_cursor_in_pcm_frames((ma_stbvorbis*)pDataSource, pCursor);\n}\n\nstatic ma_result ma_stbvorbis_ds_get_length(ma_data_source* pDataSource, ma_uint64* pLength)\n{\n    return ma_stbvorbis_get_length_in_pcm_frames((ma_stbvorbis*)pDataSource, pLength);\n}\n\nstatic ma_data_source_vtable g_ma_stbvorbis_ds_vtable =\n{\n    ma_stbvorbis_ds_read,\n    ma_stbvorbis_ds_seek,\n    ma_stbvorbis_ds_get_data_format,\n    ma_stbvorbis_ds_get_cursor,\n    ma_stbvorbis_ds_get_length,\n    NULL,   /* onSetLooping */\n    0\n};\n\n\nstatic ma_result ma_stbvorbis_init_internal(const ma_decoding_backend_config* pConfig, ma_stbvorbis* pVorbis)\n{\n    ma_result result;\n    ma_data_source_config dataSourceConfig;\n\n    (void)pConfig;\n\n    if (pVorbis == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pVorbis);\n    pVorbis->format = ma_format_f32;    /* Only supporting f32. */\n\n    dataSourceConfig = ma_data_source_config_init();\n    dataSourceConfig.vtable = &g_ma_stbvorbis_ds_vtable;\n\n    result = ma_data_source_init(&dataSourceConfig, &pVorbis->ds);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to initialize the base data source. */\n    }\n\n    return MA_SUCCESS;\n}\n\n#if !defined(MA_NO_VORBIS)\nstatic ma_result ma_stbvorbis_post_init(ma_stbvorbis* pVorbis)\n{\n    stb_vorbis_info info;\n\n    MA_ASSERT(pVorbis != NULL);\n\n    info = stb_vorbis_get_info(pVorbis->stb);\n\n    pVorbis->channels   = info.channels;\n    pVorbis->sampleRate = info.sample_rate;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_stbvorbis_init_internal_decoder_push(ma_stbvorbis* pVorbis)\n{\n    ma_result result;\n    stb_vorbis* stb;\n    size_t dataSize = 0;\n    size_t dataCapacity = 0;\n    ma_uint8* pData = NULL; /* <-- Must be initialized to NULL. */\n\n    for (;;) {\n        int vorbisError;\n        int consumedDataSize;   /* <-- Fill by stb_vorbis_open_pushdata(). */\n        size_t bytesRead;\n        ma_uint8* pNewData;\n\n        /* Allocate memory for the new chunk. */\n        dataCapacity += MA_VORBIS_DATA_CHUNK_SIZE;\n        pNewData = (ma_uint8*)ma_realloc(pData, dataCapacity, &pVorbis->allocationCallbacks);\n        if (pNewData == NULL) {\n            ma_free(pData, &pVorbis->allocationCallbacks);\n            return MA_OUT_OF_MEMORY;\n        }\n\n        pData = pNewData;\n\n        /* Read in the next chunk. */\n        result = pVorbis->onRead(pVorbis->pReadSeekTellUserData, ma_offset_ptr(pData, dataSize), (dataCapacity - dataSize), &bytesRead);\n        dataSize += bytesRead;\n\n        if (result != MA_SUCCESS) {\n            ma_free(pData, &pVorbis->allocationCallbacks);\n            return result;\n        }\n\n        /* We have a maximum of 31 bits with stb_vorbis. */\n        if (dataSize > INT_MAX) {\n            ma_free(pData, &pVorbis->allocationCallbacks);\n            return MA_TOO_BIG;\n        }\n\n        stb = stb_vorbis_open_pushdata(pData, (int)dataSize, &consumedDataSize, &vorbisError, NULL);\n        if (stb != NULL) {\n            /*\n            Successfully opened the Vorbis decoder. We might have some leftover unprocessed\n            data so we'll need to move that down to the front.\n            */\n            dataSize -= (size_t)consumedDataSize;   /* Consume the data. */\n            MA_MOVE_MEMORY(pData, ma_offset_ptr(pData, consumedDataSize), dataSize);\n\n            /*\n            We need to track the start point so we can seek back to the start of the audio\n            data when seeking.\n            */\n            pVorbis->push.audioStartOffsetInBytes = consumedDataSize;\n\n            break;\n        } else {\n            /* Failed to open the decoder. */\n            if (vorbisError == VORBIS_need_more_data) {\n                continue;\n            } else {\n                ma_free(pData, &pVorbis->allocationCallbacks);\n                return MA_ERROR;   /* Failed to open the stb_vorbis decoder. */\n            }\n        }\n    }\n\n    MA_ASSERT(stb != NULL);\n    pVorbis->stb = stb;\n    pVorbis->push.pData = pData;\n    pVorbis->push.dataSize = dataSize;\n    pVorbis->push.dataCapacity = dataCapacity;\n\n    return MA_SUCCESS;\n}\n#endif\n\nMA_API ma_result ma_stbvorbis_init(ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis)\n{\n    ma_result result;\n\n    result = ma_stbvorbis_init_internal(pConfig, pVorbis);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (onRead == NULL || onSeek == NULL) {\n        return MA_INVALID_ARGS; /* onRead and onSeek are mandatory. */\n    }\n\n    pVorbis->onRead = onRead;\n    pVorbis->onSeek = onSeek;\n    pVorbis->onTell = onTell;\n    pVorbis->pReadSeekTellUserData = pReadSeekTellUserData;\n    ma_allocation_callbacks_init_copy(&pVorbis->allocationCallbacks, pAllocationCallbacks);\n\n    #if !defined(MA_NO_VORBIS)\n    {\n        /*\n        stb_vorbis lacks a callback based API for it's pulling API which means we're stuck with the\n        pushing API. In order for us to be able to successfully initialize the decoder we need to\n        supply it with enough data. We need to keep loading data until we have enough.\n        */\n        result = ma_stbvorbis_init_internal_decoder_push(pVorbis);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pVorbis->usingPushMode = MA_TRUE;\n\n        result = ma_stbvorbis_post_init(pVorbis);\n        if (result != MA_SUCCESS) {\n            stb_vorbis_close(pVorbis->stb);\n            ma_free(pVorbis->push.pData, pAllocationCallbacks);\n            return result;\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* vorbis is disabled. */\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_stbvorbis_init_file(const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis)\n{\n    ma_result result;\n\n    result = ma_stbvorbis_init_internal(pConfig, pVorbis);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    #if !defined(MA_NO_VORBIS)\n    {\n        (void)pAllocationCallbacks; /* Don't know how to make use of this with stb_vorbis. */\n\n        /* We can use stb_vorbis' pull mode for file based streams. */\n        pVorbis->stb = stb_vorbis_open_filename(pFilePath, NULL, NULL);\n        if (pVorbis->stb == NULL) {\n            return MA_INVALID_FILE;\n        }\n\n        pVorbis->usingPushMode = MA_FALSE;\n\n        result = ma_stbvorbis_post_init(pVorbis);\n        if (result != MA_SUCCESS) {\n            stb_vorbis_close(pVorbis->stb);\n            return result;\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* vorbis is disabled. */\n        (void)pFilePath;\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_stbvorbis_init_memory(const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_stbvorbis* pVorbis)\n{\n    ma_result result;\n\n    result = ma_stbvorbis_init_internal(pConfig, pVorbis);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    #if !defined(MA_NO_VORBIS)\n    {\n        (void)pAllocationCallbacks;\n\n        /* stb_vorbis uses an int as it's size specifier, restricting it to 32-bit even on 64-bit systems. *sigh*. */\n        if (dataSize > INT_MAX) {\n            return MA_TOO_BIG;\n        }\n\n        pVorbis->stb = stb_vorbis_open_memory((const unsigned char*)pData, (int)dataSize, NULL, NULL);\n        if (pVorbis->stb == NULL) {\n            return MA_INVALID_FILE;\n        }\n\n        pVorbis->usingPushMode = MA_FALSE;\n\n        result = ma_stbvorbis_post_init(pVorbis);\n        if (result != MA_SUCCESS) {\n            stb_vorbis_close(pVorbis->stb);\n            return result;\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* vorbis is disabled. */\n        (void)pData;\n        (void)dataSize;\n        (void)pAllocationCallbacks;\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API void ma_stbvorbis_uninit(ma_stbvorbis* pVorbis, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pVorbis == NULL) {\n        return;\n    }\n\n    #if !defined(MA_NO_VORBIS)\n    {\n        stb_vorbis_close(pVorbis->stb);\n\n        /* We'll have to clear some memory if we're using push mode. */\n        if (pVorbis->usingPushMode) {\n            ma_free(pVorbis->push.pData, pAllocationCallbacks);\n        }\n    }\n    #else\n    {\n        /* vorbis is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n    }\n    #endif\n\n    ma_data_source_uninit(&pVorbis->ds);\n}\n\nMA_API ma_result ma_stbvorbis_read_pcm_frames(ma_stbvorbis* pVorbis, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    if (frameCount == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pVorbis == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_VORBIS)\n    {\n        /* We always use floating point format. */\n        ma_result result = MA_SUCCESS;  /* Must be initialized to MA_SUCCESS. */\n        ma_uint64 totalFramesRead = 0;\n        ma_format format;\n        ma_uint32 channels;\n\n        ma_stbvorbis_get_data_format(pVorbis, &format, &channels, NULL, NULL, 0);\n\n        if (format == ma_format_f32) {\n            /* We read differently depending on whether or not we're using push mode. */\n            if (pVorbis->usingPushMode) {\n                /* Push mode. This is the complex case. */\n                float* pFramesOutF32 = (float*)pFramesOut;\n\n                while (totalFramesRead < frameCount) {\n                    /* The first thing to do is read from any already-cached frames. */\n                    ma_uint32 framesToReadFromCache = (ma_uint32)ma_min(pVorbis->push.framesRemaining, (frameCount - totalFramesRead));  /* Safe cast because pVorbis->framesRemaining is 32-bit. */\n\n                    /* The output pointer can be null in which case we just treate it as a seek. */\n                    if (pFramesOut != NULL) {\n                        ma_uint64 iFrame;\n                        for (iFrame = 0; iFrame < framesToReadFromCache; iFrame += 1) {\n                            ma_uint32 iChannel;\n                            for (iChannel = 0; iChannel < pVorbis->channels; iChannel += 1) {\n                                pFramesOutF32[iChannel] = pVorbis->push.ppPacketData[iChannel][pVorbis->push.framesConsumed + iFrame];\n                            }\n\n                            pFramesOutF32 += pVorbis->channels;\n                        }\n                    }\n\n                    /* Update pointers and counters. */\n                    pVorbis->push.framesConsumed  += framesToReadFromCache;\n                    pVorbis->push.framesRemaining -= framesToReadFromCache;\n                    totalFramesRead               += framesToReadFromCache;\n\n                    /* Don't bother reading any more frames right now if we've just finished loading. */\n                    if (totalFramesRead == frameCount) {\n                        break;\n                    }\n\n                    MA_ASSERT(pVorbis->push.framesRemaining == 0);\n\n                    /* Getting here means we've run out of cached frames. We'll need to load some more. */\n                    for (;;) {\n                        int samplesRead = 0;\n                        int consumedDataSize;\n\n                        /* We need to case dataSize to an int, so make sure we can do it safely. */\n                        if (pVorbis->push.dataSize > INT_MAX) {\n                            break;  /* Too big. */\n                        }\n\n                        consumedDataSize = stb_vorbis_decode_frame_pushdata(pVorbis->stb, pVorbis->push.pData, (int)pVorbis->push.dataSize, NULL, &pVorbis->push.ppPacketData, &samplesRead);\n                        if (consumedDataSize != 0) {\n                            /* Successfully decoded a Vorbis frame. Consume the data. */\n                            pVorbis->push.dataSize -= (size_t)consumedDataSize;\n                            MA_MOVE_MEMORY(pVorbis->push.pData, ma_offset_ptr(pVorbis->push.pData, consumedDataSize), pVorbis->push.dataSize);\n\n                            pVorbis->push.framesConsumed  = 0;\n                            pVorbis->push.framesRemaining = samplesRead;\n\n                            break;\n                        } else {\n                            /* Not enough data. Read more. */\n                            size_t bytesRead;\n\n                            /* Expand the data buffer if necessary. */\n                            if (pVorbis->push.dataCapacity == pVorbis->push.dataSize) {\n                                size_t newCap = pVorbis->push.dataCapacity + MA_VORBIS_DATA_CHUNK_SIZE;\n                                ma_uint8* pNewData;\n\n                                pNewData = (ma_uint8*)ma_realloc(pVorbis->push.pData, newCap, &pVorbis->allocationCallbacks);\n                                if (pNewData == NULL) {\n                                    result = MA_OUT_OF_MEMORY;\n                                    break;\n                                }\n\n                                pVorbis->push.pData = pNewData;\n                                pVorbis->push.dataCapacity = newCap;\n                            }\n\n                            /* We should have enough room to load some data. */\n                            result = pVorbis->onRead(pVorbis->pReadSeekTellUserData, ma_offset_ptr(pVorbis->push.pData, pVorbis->push.dataSize), (pVorbis->push.dataCapacity - pVorbis->push.dataSize), &bytesRead);\n                            pVorbis->push.dataSize += bytesRead;\n\n                            if (result != MA_SUCCESS) {\n                                break;  /* Failed to read any data. Get out. */\n                            }\n                        }\n                    }\n\n                    /* If we don't have a success code at this point it means we've encounted an error or the end of the file has been reached (probably the latter). */\n                    if (result != MA_SUCCESS) {\n                        break;\n                    }\n                }\n            } else {\n                /* Pull mode. This is the simple case, but we still need to run in a loop because stb_vorbis loves using 32-bit instead of 64-bit. */\n                while (totalFramesRead < frameCount) {\n                    ma_uint64 framesRemaining = (frameCount - totalFramesRead);\n                    int framesRead;\n\n                    if (framesRemaining > INT_MAX) {\n                        framesRemaining = INT_MAX;\n                    }\n\n                    framesRead = stb_vorbis_get_samples_float_interleaved(pVorbis->stb, channels, (float*)ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, format, channels), (int)framesRemaining * channels);   /* Safe cast. */\n                    totalFramesRead += framesRead;\n\n                    if (framesRead < (int)framesRemaining) {\n                        break;  /* Nothing left to read. Get out. */\n                    }\n                }\n            }\n        } else {\n            result = MA_INVALID_ARGS;\n        }\n\n        pVorbis->cursor += totalFramesRead;\n\n        if (totalFramesRead == 0) {\n            result = MA_AT_END;\n        }\n\n        if (pFramesRead != NULL) {\n            *pFramesRead = totalFramesRead;\n        }\n\n        if (result == MA_SUCCESS && totalFramesRead == 0) {\n            result  = MA_AT_END;\n        }\n\n        return result;\n    }\n    #else\n    {\n        /* vorbis is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n\n        (void)pFramesOut;\n        (void)frameCount;\n        (void)pFramesRead;\n\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_stbvorbis_seek_to_pcm_frame(ma_stbvorbis* pVorbis, ma_uint64 frameIndex)\n{\n    if (pVorbis == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_VORBIS)\n    {\n        /* Different seeking methods depending on whether or not we're using push mode. */\n        if (pVorbis->usingPushMode) {\n            /* Push mode. This is the complex case. */\n            ma_result result;\n            float buffer[4096];\n\n            /* If we're seeking backwards, we need to seek back to the start and then brute-force forward. */\n            if (frameIndex < pVorbis->cursor) {\n                if (frameIndex > 0x7FFFFFFF) {\n                    return MA_INVALID_ARGS; /* Trying to seek beyond the 32-bit maximum of stb_vorbis. */\n                }\n\n                /*\n                This is wildly inefficient due to me having trouble getting sample exact seeking working\n                robustly with stb_vorbis_flush_pushdata(). The only way I can think to make this work\n                perfectly is to reinitialize the decoder. Note that we only enter this path when seeking\n                backwards. This will hopefully be removed once we get our own Vorbis decoder implemented.\n                */\n                stb_vorbis_close(pVorbis->stb);\n                ma_free(pVorbis->push.pData, &pVorbis->allocationCallbacks);\n\n                MA_ZERO_OBJECT(&pVorbis->push);\n\n                /* Seek to the start of the file. */\n                result = pVorbis->onSeek(pVorbis->pReadSeekTellUserData, 0, ma_seek_origin_start);\n                if (result != MA_SUCCESS) {\n                    return result;\n                }\n\n                result = ma_stbvorbis_init_internal_decoder_push(pVorbis);\n                if (result != MA_SUCCESS) {\n                    return result;\n                }\n\n                /* At this point we should be sitting on the first frame. */\n                pVorbis->cursor = 0;\n            }\n\n            /* We're just brute-forcing this for now. */\n            while (pVorbis->cursor < frameIndex) {\n                ma_uint64 framesRead;\n                ma_uint64 framesToRead = ma_countof(buffer)/pVorbis->channels;\n                if (framesToRead > (frameIndex - pVorbis->cursor)) {\n                    framesToRead = (frameIndex - pVorbis->cursor);\n                }\n\n                result = ma_stbvorbis_read_pcm_frames(pVorbis, buffer, framesToRead, &framesRead);\n                if (result != MA_SUCCESS) {\n                    return result;\n                }\n            }\n        } else {\n            /* Pull mode. This is the simple case. */\n            int vorbisResult;\n\n            if (frameIndex > UINT_MAX) {\n                return MA_INVALID_ARGS; /* Trying to seek beyond the 32-bit maximum of stb_vorbis. */\n            }\n\n            vorbisResult = stb_vorbis_seek(pVorbis->stb, (unsigned int)frameIndex);  /* Safe cast. */\n            if (vorbisResult == 0) {\n                return MA_ERROR;    /* See failed. */\n            }\n\n            pVorbis->cursor = frameIndex;\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* vorbis is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n\n        (void)frameIndex;\n\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_stbvorbis_get_data_format(ma_stbvorbis* pVorbis, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    /* Defaults for safety. */\n    if (pFormat != NULL) {\n        *pFormat = ma_format_unknown;\n    }\n    if (pChannels != NULL) {\n        *pChannels = 0;\n    }\n    if (pSampleRate != NULL) {\n        *pSampleRate = 0;\n    }\n    if (pChannelMap != NULL) {\n        MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap);\n    }\n\n    if (pVorbis == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    if (pFormat != NULL) {\n        *pFormat = pVorbis->format;\n    }\n\n    #if !defined(MA_NO_VORBIS)\n    {\n        if (pChannels != NULL) {\n            *pChannels = pVorbis->channels;\n        }\n\n        if (pSampleRate != NULL) {\n            *pSampleRate = pVorbis->sampleRate;\n        }\n\n        if (pChannelMap != NULL) {\n            ma_channel_map_init_standard(ma_standard_channel_map_vorbis, pChannelMap, channelMapCap, pVorbis->channels);\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* vorbis is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_stbvorbis_get_cursor_in_pcm_frames(ma_stbvorbis* pVorbis, ma_uint64* pCursor)\n{\n    if (pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = 0;   /* Safety. */\n\n    if (pVorbis == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_VORBIS)\n    {\n        *pCursor = pVorbis->cursor;\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* vorbis is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\nMA_API ma_result ma_stbvorbis_get_length_in_pcm_frames(ma_stbvorbis* pVorbis, ma_uint64* pLength)\n{\n    if (pLength == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pLength = 0;   /* Safety. */\n\n    if (pVorbis == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_VORBIS)\n    {\n        if (pVorbis->usingPushMode) {\n            *pLength = 0;   /* I don't know of a good way to determine this reliably with stb_vorbis and push mode. */\n        } else {\n            *pLength = stb_vorbis_stream_length_in_samples(pVorbis->stb);\n        }\n\n        return MA_SUCCESS;\n    }\n    #else\n    {\n        /* vorbis is disabled. Should never hit this since initialization would have failed. */\n        MA_ASSERT(MA_FALSE);\n        return MA_NOT_IMPLEMENTED;\n    }\n    #endif\n}\n\n\nstatic ma_result ma_decoding_backend_init__stbvorbis(void* pUserData, ma_read_proc onRead, ma_seek_proc onSeek, ma_tell_proc onTell, void* pReadSeekTellUserData, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_stbvorbis* pVorbis;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pVorbis = (ma_stbvorbis*)ma_malloc(sizeof(*pVorbis), pAllocationCallbacks);\n    if (pVorbis == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_stbvorbis_init(onRead, onSeek, onTell, pReadSeekTellUserData, pConfig, pAllocationCallbacks, pVorbis);\n    if (result != MA_SUCCESS) {\n        ma_free(pVorbis, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pVorbis;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoding_backend_init_file__stbvorbis(void* pUserData, const char* pFilePath, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_stbvorbis* pVorbis;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pVorbis = (ma_stbvorbis*)ma_malloc(sizeof(*pVorbis), pAllocationCallbacks);\n    if (pVorbis == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_stbvorbis_init_file(pFilePath, pConfig, pAllocationCallbacks, pVorbis);\n    if (result != MA_SUCCESS) {\n        ma_free(pVorbis, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pVorbis;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoding_backend_init_memory__stbvorbis(void* pUserData, const void* pData, size_t dataSize, const ma_decoding_backend_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source** ppBackend)\n{\n    ma_result result;\n    ma_stbvorbis* pVorbis;\n\n    (void)pUserData;    /* For now not using pUserData, but once we start storing the vorbis decoder state within the ma_decoder structure this will be set to the decoder so we can avoid a malloc. */\n\n    /* For now we're just allocating the decoder backend on the heap. */\n    pVorbis = (ma_stbvorbis*)ma_malloc(sizeof(*pVorbis), pAllocationCallbacks);\n    if (pVorbis == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_stbvorbis_init_memory(pData, dataSize, pConfig, pAllocationCallbacks, pVorbis);\n    if (result != MA_SUCCESS) {\n        ma_free(pVorbis, pAllocationCallbacks);\n        return result;\n    }\n\n    *ppBackend = pVorbis;\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_decoding_backend_uninit__stbvorbis(void* pUserData, ma_data_source* pBackend, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_stbvorbis* pVorbis = (ma_stbvorbis*)pBackend;\n\n    (void)pUserData;\n\n    ma_stbvorbis_uninit(pVorbis, pAllocationCallbacks);\n    ma_free(pVorbis, pAllocationCallbacks);\n}\n\nstatic ma_decoding_backend_vtable g_ma_decoding_backend_vtable_stbvorbis =\n{\n    ma_decoding_backend_init__stbvorbis,\n    ma_decoding_backend_init_file__stbvorbis,\n    NULL, /* onInitFileW() */\n    ma_decoding_backend_init_memory__stbvorbis,\n    ma_decoding_backend_uninit__stbvorbis\n};\n\nstatic ma_result ma_decoder_init_vorbis__internal(const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_vtable__internal(&g_ma_decoding_backend_vtable_stbvorbis, NULL, pConfig, pDecoder);\n}\n\nstatic ma_result ma_decoder_init_vorbis_from_file__internal(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_file__internal(&g_ma_decoding_backend_vtable_stbvorbis, NULL, pFilePath, pConfig, pDecoder);\n}\n\nstatic ma_result ma_decoder_init_vorbis_from_file_w__internal(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_file_w__internal(&g_ma_decoding_backend_vtable_stbvorbis, NULL, pFilePath, pConfig, pDecoder);\n}\n\nstatic ma_result ma_decoder_init_vorbis_from_memory__internal(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    return ma_decoder_init_from_memory__internal(&g_ma_decoding_backend_vtable_stbvorbis, NULL, pData, dataSize, pConfig, pDecoder);\n}\n#endif  /* STB_VORBIS_INCLUDE_STB_VORBIS_H */\n\n\n\nstatic ma_result ma_decoder__init_allocation_callbacks(const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    MA_ASSERT(pDecoder != NULL);\n\n    if (pConfig != NULL) {\n        return ma_allocation_callbacks_init_copy(&pDecoder->allocationCallbacks, &pConfig->allocationCallbacks);\n    } else {\n        pDecoder->allocationCallbacks = ma_allocation_callbacks_init_default();\n        return MA_SUCCESS;\n    }\n}\n\nstatic ma_result ma_decoder__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    return ma_decoder_read_pcm_frames((ma_decoder*)pDataSource, pFramesOut, frameCount, pFramesRead);\n}\n\nstatic ma_result ma_decoder__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex)\n{\n    return ma_decoder_seek_to_pcm_frame((ma_decoder*)pDataSource, frameIndex);\n}\n\nstatic ma_result ma_decoder__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    return ma_decoder_get_data_format((ma_decoder*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap);\n}\n\nstatic ma_result ma_decoder__data_source_on_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor)\n{\n    return ma_decoder_get_cursor_in_pcm_frames((ma_decoder*)pDataSource, pCursor);\n}\n\nstatic ma_result ma_decoder__data_source_on_get_length(ma_data_source* pDataSource, ma_uint64* pLength)\n{\n    return ma_decoder_get_length_in_pcm_frames((ma_decoder*)pDataSource, pLength);\n}\n\nstatic ma_data_source_vtable g_ma_decoder_data_source_vtable =\n{\n    ma_decoder__data_source_on_read,\n    ma_decoder__data_source_on_seek,\n    ma_decoder__data_source_on_get_data_format,\n    ma_decoder__data_source_on_get_cursor,\n    ma_decoder__data_source_on_get_length,\n    NULL,   /* onSetLooping */\n    0\n};\n\nstatic ma_result ma_decoder__preinit(ma_decoder_read_proc onRead, ma_decoder_seek_proc onSeek, ma_decoder_tell_proc onTell, void* pUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n    ma_data_source_config dataSourceConfig;\n\n    MA_ASSERT(pConfig != NULL);\n\n    if (pDecoder == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pDecoder);\n\n    dataSourceConfig = ma_data_source_config_init();\n    dataSourceConfig.vtable = &g_ma_decoder_data_source_vtable;\n\n    result = ma_data_source_init(&dataSourceConfig, &pDecoder->ds);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pDecoder->onRead    = onRead;\n    pDecoder->onSeek    = onSeek;\n    pDecoder->onTell    = onTell;\n    pDecoder->pUserData = pUserData;\n\n    result = ma_decoder__init_allocation_callbacks(pConfig, pDecoder);\n    if (result != MA_SUCCESS) {\n        ma_data_source_uninit(&pDecoder->ds);\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoder__postinit(const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n\n    result = ma_decoder__init_data_converter(pDecoder, pConfig);\n\n    /* If we failed post initialization we need to uninitialize the decoder before returning to prevent a memory leak. */\n    if (result != MA_SUCCESS) {\n        ma_decoder_uninit(pDecoder);\n        return result;\n    }\n\n    return result;\n}\n\n\nstatic ma_result ma_decoder_init__internal(ma_decoder_read_proc onRead, ma_decoder_seek_proc onSeek, void* pUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result = MA_NO_BACKEND;\n\n    MA_ASSERT(pConfig != NULL);\n    MA_ASSERT(pDecoder != NULL);\n\n    /* Silence some warnings in the case that we don't have any decoder backends enabled. */\n    (void)onRead;\n    (void)onSeek;\n    (void)pUserData;\n\n\n    /* If we've specified a specific encoding type, try that first. */\n    if (pConfig->encodingFormat != ma_encoding_format_unknown) {\n    #ifdef MA_HAS_WAV\n        if (pConfig->encodingFormat == ma_encoding_format_wav) {\n            result = ma_decoder_init_wav__internal(pConfig, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_FLAC\n        if (pConfig->encodingFormat == ma_encoding_format_flac) {\n            result = ma_decoder_init_flac__internal(pConfig, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_MP3\n        if (pConfig->encodingFormat == ma_encoding_format_mp3) {\n            result = ma_decoder_init_mp3__internal(pConfig, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_VORBIS\n        if (pConfig->encodingFormat == ma_encoding_format_vorbis) {\n            result = ma_decoder_init_vorbis__internal(pConfig, pDecoder);\n        }\n    #endif\n\n        /* If we weren't able to initialize the decoder, seek back to the start to give the next attempts a clean start. */\n        if (result != MA_SUCCESS) {\n            onSeek(pDecoder, 0, ma_seek_origin_start);\n        }\n    }\n\n    if (result != MA_SUCCESS) {\n        /* Getting here means we couldn't load a specific decoding backend based on the encoding format. */\n\n        /*\n        We use trial and error to open a decoder. We prioritize custom decoders so that if they\n        implement the same encoding format they take priority over the built-in decoders.\n        */\n        if (result != MA_SUCCESS) {\n            result = ma_decoder_init_custom__internal(pConfig, pDecoder);\n            if (result != MA_SUCCESS) {\n                onSeek(pDecoder, 0, ma_seek_origin_start);\n            }\n        }\n\n        /*\n        If we get to this point and we still haven't found a decoder, and the caller has requested a\n        specific encoding format, there's no hope for it. Abort.\n        */\n        if (pConfig->encodingFormat != ma_encoding_format_unknown) {\n            return MA_NO_BACKEND;\n        }\n\n    #ifdef MA_HAS_WAV\n        if (result != MA_SUCCESS) {\n            result = ma_decoder_init_wav__internal(pConfig, pDecoder);\n            if (result != MA_SUCCESS) {\n                onSeek(pDecoder, 0, ma_seek_origin_start);\n            }\n        }\n    #endif\n    #ifdef MA_HAS_FLAC\n        if (result != MA_SUCCESS) {\n            result = ma_decoder_init_flac__internal(pConfig, pDecoder);\n            if (result != MA_SUCCESS) {\n                onSeek(pDecoder, 0, ma_seek_origin_start);\n            }\n        }\n    #endif\n    #ifdef MA_HAS_MP3\n        if (result != MA_SUCCESS) {\n            result = ma_decoder_init_mp3__internal(pConfig, pDecoder);\n            if (result != MA_SUCCESS) {\n                onSeek(pDecoder, 0, ma_seek_origin_start);\n            }\n        }\n    #endif\n    #ifdef MA_HAS_VORBIS\n        if (result != MA_SUCCESS) {\n            result = ma_decoder_init_vorbis__internal(pConfig, pDecoder);\n            if (result != MA_SUCCESS) {\n                onSeek(pDecoder, 0, ma_seek_origin_start);\n            }\n        }\n    #endif\n    }\n\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return ma_decoder__postinit(pConfig, pDecoder);\n}\n\nMA_API ma_result ma_decoder_init(ma_decoder_read_proc onRead, ma_decoder_seek_proc onSeek, void* pUserData, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_decoder_config config;\n    ma_result result;\n\n    config = ma_decoder_config_init_copy(pConfig);\n\n    result = ma_decoder__preinit(onRead, onSeek, NULL, pUserData, &config, pDecoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return ma_decoder_init__internal(onRead, onSeek, pUserData, &config, pDecoder);\n}\n\n\nstatic ma_result ma_decoder__on_read_memory(ma_decoder* pDecoder, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead)\n{\n    size_t bytesRemaining;\n\n    MA_ASSERT(pDecoder->data.memory.dataSize >= pDecoder->data.memory.currentReadPos);\n\n    if (pBytesRead != NULL) {\n        *pBytesRead = 0;\n    }\n\n    bytesRemaining = pDecoder->data.memory.dataSize - pDecoder->data.memory.currentReadPos;\n    if (bytesToRead > bytesRemaining) {\n        bytesToRead = bytesRemaining;\n    }\n\n    if (bytesRemaining == 0) {\n        return MA_AT_END;\n    }\n\n    if (bytesToRead > 0) {\n        MA_COPY_MEMORY(pBufferOut, pDecoder->data.memory.pData + pDecoder->data.memory.currentReadPos, bytesToRead);\n        pDecoder->data.memory.currentReadPos += bytesToRead;\n    }\n\n    if (pBytesRead != NULL) {\n        *pBytesRead = bytesToRead;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoder__on_seek_memory(ma_decoder* pDecoder, ma_int64 byteOffset, ma_seek_origin origin)\n{\n    if (byteOffset > 0 && (ma_uint64)byteOffset > MA_SIZE_MAX) {\n        return MA_BAD_SEEK;\n    }\n\n    if (origin == ma_seek_origin_current) {\n        if (byteOffset > 0) {\n            if (pDecoder->data.memory.currentReadPos + byteOffset > pDecoder->data.memory.dataSize) {\n                byteOffset = (ma_int64)(pDecoder->data.memory.dataSize - pDecoder->data.memory.currentReadPos);  /* Trying to seek too far forward. */\n            }\n\n            pDecoder->data.memory.currentReadPos += (size_t)byteOffset;\n        } else {\n            if (pDecoder->data.memory.currentReadPos < (size_t)-byteOffset) {\n                byteOffset = -(ma_int64)pDecoder->data.memory.currentReadPos;  /* Trying to seek too far backwards. */\n            }\n\n            pDecoder->data.memory.currentReadPos -= (size_t)-byteOffset;\n        }\n    } else {\n        if (origin == ma_seek_origin_end) {\n            if (byteOffset < 0) {\n                byteOffset = -byteOffset;\n            }\n\n            if (byteOffset > (ma_int64)pDecoder->data.memory.dataSize) {\n                pDecoder->data.memory.currentReadPos = 0;   /* Trying to seek too far back. */\n            } else {\n                pDecoder->data.memory.currentReadPos = pDecoder->data.memory.dataSize - (size_t)byteOffset;\n            }\n        } else {\n            if ((size_t)byteOffset <= pDecoder->data.memory.dataSize) {\n                pDecoder->data.memory.currentReadPos = (size_t)byteOffset;\n            } else {\n                pDecoder->data.memory.currentReadPos = pDecoder->data.memory.dataSize;  /* Trying to seek too far forward. */\n            }\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoder__on_tell_memory(ma_decoder* pDecoder, ma_int64* pCursor)\n{\n    MA_ASSERT(pDecoder != NULL);\n    MA_ASSERT(pCursor  != NULL);\n\n    *pCursor = (ma_int64)pDecoder->data.memory.currentReadPos;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoder__preinit_memory_wrapper(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result = ma_decoder__preinit(ma_decoder__on_read_memory, ma_decoder__on_seek_memory, ma_decoder__on_tell_memory, NULL, pConfig, pDecoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pData == NULL || dataSize == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pDecoder->data.memory.pData = (const ma_uint8*)pData;\n    pDecoder->data.memory.dataSize = dataSize;\n    pDecoder->data.memory.currentReadPos = 0;\n\n    (void)pConfig;\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_decoder_init_memory(const void* pData, size_t dataSize, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n    ma_decoder_config config;\n\n    config = ma_decoder_config_init_copy(pConfig);\n\n    result = ma_decoder__preinit(NULL, NULL, NULL, NULL, &config, pDecoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pData == NULL || dataSize == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* If the backend has support for loading from a file path we'll want to use that. If that all fails we'll fall back to the VFS path. */\n    result = MA_NO_BACKEND;\n\n    if (config.encodingFormat != ma_encoding_format_unknown) {\n    #ifdef MA_HAS_WAV\n        if (config.encodingFormat == ma_encoding_format_wav) {\n            result = ma_decoder_init_wav_from_memory__internal(pData, dataSize, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_FLAC\n        if (config.encodingFormat == ma_encoding_format_flac) {\n            result = ma_decoder_init_flac_from_memory__internal(pData, dataSize, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_MP3\n        if (config.encodingFormat == ma_encoding_format_mp3) {\n            result = ma_decoder_init_mp3_from_memory__internal(pData, dataSize, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_VORBIS\n        if (config.encodingFormat == ma_encoding_format_vorbis) {\n            result = ma_decoder_init_vorbis_from_memory__internal(pData, dataSize, &config, pDecoder);\n        }\n    #endif\n    }\n\n    if (result != MA_SUCCESS) {\n        /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */\n\n        /*\n        We use trial and error to open a decoder. We prioritize custom decoders so that if they\n        implement the same encoding format they take priority over the built-in decoders.\n        */\n        result = ma_decoder_init_custom_from_memory__internal(pData, dataSize, &config, pDecoder);\n\n        /*\n        If we get to this point and we still haven't found a decoder, and the caller has requested a\n        specific encoding format, there's no hope for it. Abort.\n        */\n        if (result != MA_SUCCESS && config.encodingFormat != ma_encoding_format_unknown) {\n            return MA_NO_BACKEND;\n        }\n\n        /* Use trial and error for stock decoders. */\n        if (result != MA_SUCCESS) {\n        #ifdef MA_HAS_WAV\n            if (result != MA_SUCCESS) {\n                result = ma_decoder_init_wav_from_memory__internal(pData, dataSize, &config, pDecoder);\n            }\n        #endif\n        #ifdef MA_HAS_FLAC\n            if (result != MA_SUCCESS) {\n                result = ma_decoder_init_flac_from_memory__internal(pData, dataSize, &config, pDecoder);\n            }\n        #endif\n        #ifdef MA_HAS_MP3\n            if (result != MA_SUCCESS) {\n                result = ma_decoder_init_mp3_from_memory__internal(pData, dataSize, &config, pDecoder);\n            }\n        #endif\n        #ifdef MA_HAS_VORBIS\n            if (result != MA_SUCCESS) {\n                result = ma_decoder_init_vorbis_from_memory__internal(pData, dataSize, &config, pDecoder);\n            }\n        #endif\n        }\n    }\n\n    /*\n    If at this point we still haven't successfully initialized the decoder it most likely means\n    the backend doesn't have an implementation for loading from a file path. We'll try using\n    miniaudio's built-in file IO for loading file.\n    */\n    if (result == MA_SUCCESS) {\n        /* Initialization was successful. Finish up. */\n        result = ma_decoder__postinit(&config, pDecoder);\n        if (result != MA_SUCCESS) {\n            /*\n            The backend was initialized successfully, but for some reason post-initialization failed. This is most likely\n            due to an out of memory error. We're going to abort with an error here and not try to recover.\n            */\n            if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) {\n                pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, &pDecoder->pBackend, &pDecoder->allocationCallbacks);\n            }\n\n            return result;\n        }\n    } else {\n        /* Probably no implementation for loading from a block of memory. Use miniaudio's abstraction instead. */\n        result = ma_decoder__preinit_memory_wrapper(pData, dataSize, &config, pDecoder);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        result = ma_decoder_init__internal(ma_decoder__on_read_memory, ma_decoder__on_seek_memory, NULL, &config, pDecoder);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\n\n#if defined(MA_HAS_WAV)    || \\\n    defined(MA_HAS_MP3)    || \\\n    defined(MA_HAS_FLAC)   || \\\n    defined(MA_HAS_VORBIS) || \\\n    defined(MA_HAS_OPUS)\n#define MA_HAS_PATH_API\n#endif\n\n#if defined(MA_HAS_PATH_API)\nstatic const char* ma_path_file_name(const char* path)\n{\n    const char* fileName;\n\n    if (path == NULL) {\n        return NULL;\n    }\n\n    fileName = path;\n\n    /* We just loop through the path until we find the last slash. */\n    while (path[0] != '\\0') {\n        if (path[0] == '/' || path[0] == '\\\\') {\n            fileName = path;\n        }\n\n        path += 1;\n    }\n\n    /* At this point the file name is sitting on a slash, so just move forward. */\n    while (fileName[0] != '\\0' && (fileName[0] == '/' || fileName[0] == '\\\\')) {\n        fileName += 1;\n    }\n\n    return fileName;\n}\n\nstatic const wchar_t* ma_path_file_name_w(const wchar_t* path)\n{\n    const wchar_t* fileName;\n\n    if (path == NULL) {\n        return NULL;\n    }\n\n    fileName = path;\n\n    /* We just loop through the path until we find the last slash. */\n    while (path[0] != '\\0') {\n        if (path[0] == '/' || path[0] == '\\\\') {\n            fileName = path;\n        }\n\n        path += 1;\n    }\n\n    /* At this point the file name is sitting on a slash, so just move forward. */\n    while (fileName[0] != '\\0' && (fileName[0] == '/' || fileName[0] == '\\\\')) {\n        fileName += 1;\n    }\n\n    return fileName;\n}\n\n\nstatic const char* ma_path_extension(const char* path)\n{\n    const char* extension;\n    const char* lastOccurance;\n\n    if (path == NULL) {\n        path = \"\";\n    }\n\n    extension = ma_path_file_name(path);\n    lastOccurance = NULL;\n\n    /* Just find the last '.' and return. */\n    while (extension[0] != '\\0') {\n        if (extension[0] == '.') {\n            extension += 1;\n            lastOccurance = extension;\n        }\n\n        extension += 1;\n    }\n\n    return (lastOccurance != NULL) ? lastOccurance : extension;\n}\n\nstatic const wchar_t* ma_path_extension_w(const wchar_t* path)\n{\n    const wchar_t* extension;\n    const wchar_t* lastOccurance;\n\n    if (path == NULL) {\n        path = L\"\";\n    }\n\n    extension = ma_path_file_name_w(path);\n    lastOccurance = NULL;\n\n    /* Just find the last '.' and return. */\n    while (extension[0] != '\\0') {\n        if (extension[0] == '.') {\n            extension += 1;\n            lastOccurance = extension;\n        }\n\n        extension += 1;\n    }\n\n    return (lastOccurance != NULL) ? lastOccurance : extension;\n}\n\n\nstatic ma_bool32 ma_path_extension_equal(const char* path, const char* extension)\n{\n    const char* ext1;\n    const char* ext2;\n\n    if (path == NULL || extension == NULL) {\n        return MA_FALSE;\n    }\n\n    ext1 = extension;\n    ext2 = ma_path_extension(path);\n\n#if defined(_MSC_VER) || defined(__DMC__)\n    return _stricmp(ext1, ext2) == 0;\n#else\n    return strcasecmp(ext1, ext2) == 0;\n#endif\n}\n\nstatic ma_bool32 ma_path_extension_equal_w(const wchar_t* path, const wchar_t* extension)\n{\n    const wchar_t* ext1;\n    const wchar_t* ext2;\n\n    if (path == NULL || extension == NULL) {\n        return MA_FALSE;\n    }\n\n    ext1 = extension;\n    ext2 = ma_path_extension_w(path);\n\n#if defined(_MSC_VER) || defined(__WATCOMC__) || defined(__DMC__)\n    return _wcsicmp(ext1, ext2) == 0;\n#else\n    /*\n    I'm not aware of a wide character version of strcasecmp(). I'm therefore converting the extensions to multibyte strings and comparing those. This\n    isn't the most efficient way to do it, but it should work OK.\n    */\n    {\n        char ext1MB[4096];\n        char ext2MB[4096];\n        const wchar_t* pext1 = ext1;\n        const wchar_t* pext2 = ext2;\n        mbstate_t mbs1;\n        mbstate_t mbs2;\n\n        MA_ZERO_OBJECT(&mbs1);\n        MA_ZERO_OBJECT(&mbs2);\n\n        if (wcsrtombs(ext1MB, &pext1, sizeof(ext1MB), &mbs1) == (size_t)-1) {\n            return MA_FALSE;\n        }\n        if (wcsrtombs(ext2MB, &pext2, sizeof(ext2MB), &mbs2) == (size_t)-1) {\n            return MA_FALSE;\n        }\n\n        return strcasecmp(ext1MB, ext2MB) == 0;\n    }\n#endif\n}\n#endif  /* MA_HAS_PATH_API */\n\n\n\nstatic ma_result ma_decoder__on_read_vfs(ma_decoder* pDecoder, void* pBufferOut, size_t bytesToRead, size_t* pBytesRead)\n{\n    MA_ASSERT(pDecoder   != NULL);\n    MA_ASSERT(pBufferOut != NULL);\n\n    return ma_vfs_or_default_read(pDecoder->data.vfs.pVFS, pDecoder->data.vfs.file, pBufferOut, bytesToRead, pBytesRead);\n}\n\nstatic ma_result ma_decoder__on_seek_vfs(ma_decoder* pDecoder, ma_int64 offset, ma_seek_origin origin)\n{\n    MA_ASSERT(pDecoder != NULL);\n\n    return ma_vfs_or_default_seek(pDecoder->data.vfs.pVFS, pDecoder->data.vfs.file, offset, origin);\n}\n\nstatic ma_result ma_decoder__on_tell_vfs(ma_decoder* pDecoder, ma_int64* pCursor)\n{\n    MA_ASSERT(pDecoder != NULL);\n\n    return ma_vfs_or_default_tell(pDecoder->data.vfs.pVFS, pDecoder->data.vfs.file, pCursor);\n}\n\nstatic ma_result ma_decoder__preinit_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n    ma_vfs_file file;\n\n    result = ma_decoder__preinit(ma_decoder__on_read_vfs, ma_decoder__on_seek_vfs, ma_decoder__on_tell_vfs, NULL, pConfig, pDecoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pFilePath == NULL || pFilePath[0] == '\\0') {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_vfs_or_default_open(pVFS, pFilePath, MA_OPEN_MODE_READ, &file);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pDecoder->data.vfs.pVFS = pVFS;\n    pDecoder->data.vfs.file = file;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_decoder_init_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n    ma_decoder_config config;\n\n    config = ma_decoder_config_init_copy(pConfig);\n    result = ma_decoder__preinit_vfs(pVFS, pFilePath, &config, pDecoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    result = MA_NO_BACKEND;\n\n    if (config.encodingFormat != ma_encoding_format_unknown) {\n    #ifdef MA_HAS_WAV\n        if (config.encodingFormat == ma_encoding_format_wav) {\n            result = ma_decoder_init_wav__internal(&config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_FLAC\n        if (config.encodingFormat == ma_encoding_format_flac) {\n            result = ma_decoder_init_flac__internal(&config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_MP3\n        if (config.encodingFormat == ma_encoding_format_mp3) {\n            result = ma_decoder_init_mp3__internal(&config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_VORBIS\n        if (config.encodingFormat == ma_encoding_format_vorbis) {\n            result = ma_decoder_init_vorbis__internal(&config, pDecoder);\n        }\n    #endif\n\n        /* Make sure we seek back to the start if we didn't initialize a decoder successfully so the next attempts have a fresh start. */\n        if (result != MA_SUCCESS) {\n            ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start);\n        }\n    }\n\n    if (result != MA_SUCCESS) {\n        /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */\n\n        /*\n        We use trial and error to open a decoder. We prioritize custom decoders so that if they\n        implement the same encoding format they take priority over the built-in decoders.\n        */\n        if (result != MA_SUCCESS) {\n            result = ma_decoder_init_custom__internal(&config, pDecoder);\n            if (result != MA_SUCCESS) {\n                ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start);\n            }\n        }\n\n        /*\n        If we get to this point and we still haven't found a decoder, and the caller has requested a\n        specific encoding format, there's no hope for it. Abort.\n        */\n        if (config.encodingFormat != ma_encoding_format_unknown) {\n            return MA_NO_BACKEND;\n        }\n\n    #ifdef MA_HAS_WAV\n        if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, \"wav\")) {\n            result = ma_decoder_init_wav__internal(&config, pDecoder);\n            if (result != MA_SUCCESS) {\n                ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start);\n            }\n        }\n    #endif\n    #ifdef MA_HAS_FLAC\n        if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, \"flac\")) {\n            result = ma_decoder_init_flac__internal(&config, pDecoder);\n            if (result != MA_SUCCESS) {\n                ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start);\n            }\n        }\n    #endif\n    #ifdef MA_HAS_MP3\n        if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, \"mp3\")) {\n            result = ma_decoder_init_mp3__internal(&config, pDecoder);\n            if (result != MA_SUCCESS) {\n                ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start);\n            }\n        }\n    #endif\n    }\n\n    /* If we still haven't got a result just use trial and error. Otherwise we can finish up. */\n    if (result != MA_SUCCESS) {\n        result = ma_decoder_init__internal(ma_decoder__on_read_vfs, ma_decoder__on_seek_vfs, NULL, &config, pDecoder);\n    } else {\n        result = ma_decoder__postinit(&config, pDecoder);\n    }\n\n    if (result != MA_SUCCESS) {\n        if (pDecoder->data.vfs.file != NULL) {   /* <-- Will be reset to NULL if ma_decoder_uninit() is called in one of the steps above which allows us to avoid a double close of the file. */\n            ma_vfs_or_default_close(pVFS, pDecoder->data.vfs.file);\n        }\n\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_decoder__preinit_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n    ma_vfs_file file;\n\n    result = ma_decoder__preinit(ma_decoder__on_read_vfs, ma_decoder__on_seek_vfs, ma_decoder__on_tell_vfs, NULL, pConfig, pDecoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pFilePath == NULL || pFilePath[0] == '\\0') {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_vfs_or_default_open_w(pVFS, pFilePath, MA_OPEN_MODE_READ, &file);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pDecoder->data.vfs.pVFS = pVFS;\n    pDecoder->data.vfs.file = file;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_decoder_init_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n    ma_decoder_config config;\n\n    config = ma_decoder_config_init_copy(pConfig);\n    result = ma_decoder__preinit_vfs_w(pVFS, pFilePath, &config, pDecoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    result = MA_NO_BACKEND;\n\n    if (config.encodingFormat != ma_encoding_format_unknown) {\n    #ifdef MA_HAS_WAV\n        if (config.encodingFormat == ma_encoding_format_wav) {\n            result = ma_decoder_init_wav__internal(&config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_FLAC\n        if (config.encodingFormat == ma_encoding_format_flac) {\n            result = ma_decoder_init_flac__internal(&config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_MP3\n        if (config.encodingFormat == ma_encoding_format_mp3) {\n            result = ma_decoder_init_mp3__internal(&config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_VORBIS\n        if (config.encodingFormat == ma_encoding_format_vorbis) {\n            result = ma_decoder_init_vorbis__internal(&config, pDecoder);\n        }\n    #endif\n\n        /* Make sure we seek back to the start if we didn't initialize a decoder successfully so the next attempts have a fresh start. */\n        if (result != MA_SUCCESS) {\n            ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start);\n        }\n    }\n\n    if (result != MA_SUCCESS) {\n        /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */\n\n        /*\n        We use trial and error to open a decoder. We prioritize custom decoders so that if they\n        implement the same encoding format they take priority over the built-in decoders.\n        */\n        if (result != MA_SUCCESS) {\n            result = ma_decoder_init_custom__internal(&config, pDecoder);\n            if (result != MA_SUCCESS) {\n                ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start);\n            }\n        }\n\n        /*\n        If we get to this point and we still haven't found a decoder, and the caller has requested a\n        specific encoding format, there's no hope for it. Abort.\n        */\n        if (config.encodingFormat != ma_encoding_format_unknown) {\n            return MA_NO_BACKEND;\n        }\n\n    #ifdef MA_HAS_WAV\n        if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L\"wav\")) {\n            result = ma_decoder_init_wav__internal(&config, pDecoder);\n            if (result != MA_SUCCESS) {\n                ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start);\n            }\n        }\n    #endif\n    #ifdef MA_HAS_FLAC\n        if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L\"flac\")) {\n            result = ma_decoder_init_flac__internal(&config, pDecoder);\n            if (result != MA_SUCCESS) {\n                ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start);\n            }\n        }\n    #endif\n    #ifdef MA_HAS_MP3\n        if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L\"mp3\")) {\n            result = ma_decoder_init_mp3__internal(&config, pDecoder);\n            if (result != MA_SUCCESS) {\n                ma_decoder__on_seek_vfs(pDecoder, 0, ma_seek_origin_start);\n            }\n        }\n    #endif\n    }\n\n    /* If we still haven't got a result just use trial and error. Otherwise we can finish up. */\n    if (result != MA_SUCCESS) {\n        result = ma_decoder_init__internal(ma_decoder__on_read_vfs, ma_decoder__on_seek_vfs, NULL, &config, pDecoder);\n    } else {\n        result = ma_decoder__postinit(&config, pDecoder);\n    }\n\n    if (result != MA_SUCCESS) {\n        ma_vfs_or_default_close(pVFS, pDecoder->data.vfs.file);\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_decoder__preinit_file(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n\n    result = ma_decoder__preinit(NULL, NULL, NULL, NULL, pConfig, pDecoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pFilePath == NULL || pFilePath[0] == '\\0') {\n        return MA_INVALID_ARGS;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_decoder_init_file(const char* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n    ma_decoder_config config;\n\n    config = ma_decoder_config_init_copy(pConfig);\n    result = ma_decoder__preinit_file(pFilePath, &config, pDecoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* If the backend has support for loading from a file path we'll want to use that. If that all fails we'll fall back to the VFS path. */\n    result = MA_NO_BACKEND;\n\n    if (config.encodingFormat != ma_encoding_format_unknown) {\n    #ifdef MA_HAS_WAV\n        if (config.encodingFormat == ma_encoding_format_wav) {\n            result = ma_decoder_init_wav_from_file__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_FLAC\n        if (config.encodingFormat == ma_encoding_format_flac) {\n            result = ma_decoder_init_flac_from_file__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_MP3\n        if (config.encodingFormat == ma_encoding_format_mp3) {\n            result = ma_decoder_init_mp3_from_file__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_VORBIS\n        if (config.encodingFormat == ma_encoding_format_vorbis) {\n            result = ma_decoder_init_vorbis_from_file__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    }\n\n    if (result != MA_SUCCESS) {\n        /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */\n\n        /*\n        We use trial and error to open a decoder. We prioritize custom decoders so that if they\n        implement the same encoding format they take priority over the built-in decoders.\n        */\n        result = ma_decoder_init_custom_from_file__internal(pFilePath, &config, pDecoder);\n\n        /*\n        If we get to this point and we still haven't found a decoder, and the caller has requested a\n        specific encoding format, there's no hope for it. Abort.\n        */\n        if (result != MA_SUCCESS && config.encodingFormat != ma_encoding_format_unknown) {\n            return MA_NO_BACKEND;\n        }\n\n        /* First try loading based on the file extension so we don't waste time opening and closing files. */\n    #ifdef MA_HAS_WAV\n        if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, \"wav\")) {\n            result = ma_decoder_init_wav_from_file__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_FLAC\n        if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, \"flac\")) {\n            result = ma_decoder_init_flac_from_file__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_MP3\n        if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, \"mp3\")) {\n            result = ma_decoder_init_mp3_from_file__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_VORBIS\n        if (result != MA_SUCCESS && ma_path_extension_equal(pFilePath, \"ogg\")) {\n            result = ma_decoder_init_vorbis_from_file__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n\n        /*\n        If we still haven't got a result just use trial and error. Custom decoders have already been attempted, so here we\n        need only iterate over our stock decoders.\n        */\n        if (result != MA_SUCCESS) {\n        #ifdef MA_HAS_WAV\n            if (result != MA_SUCCESS) {\n                result = ma_decoder_init_wav_from_file__internal(pFilePath, &config, pDecoder);\n            }\n        #endif\n        #ifdef MA_HAS_FLAC\n            if (result != MA_SUCCESS) {\n                result = ma_decoder_init_flac_from_file__internal(pFilePath, &config, pDecoder);\n            }\n        #endif\n        #ifdef MA_HAS_MP3\n            if (result != MA_SUCCESS) {\n                result = ma_decoder_init_mp3_from_file__internal(pFilePath, &config, pDecoder);\n            }\n        #endif\n        #ifdef MA_HAS_VORBIS\n            if (result != MA_SUCCESS) {\n                result = ma_decoder_init_vorbis_from_file__internal(pFilePath, &config, pDecoder);\n            }\n        #endif\n        }\n    }\n\n    /*\n    If at this point we still haven't successfully initialized the decoder it most likely means\n    the backend doesn't have an implementation for loading from a file path. We'll try using\n    miniaudio's built-in file IO for loading file.\n    */\n    if (result == MA_SUCCESS) {\n        /* Initialization was successful. Finish up. */\n        result = ma_decoder__postinit(&config, pDecoder);\n        if (result != MA_SUCCESS) {\n            /*\n            The backend was initialized successfully, but for some reason post-initialization failed. This is most likely\n            due to an out of memory error. We're going to abort with an error here and not try to recover.\n            */\n            if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) {\n                pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, &pDecoder->pBackend, &pDecoder->allocationCallbacks);\n            }\n\n            return result;\n        }\n    } else {\n        /* Probably no implementation for loading from a file path. Use miniaudio's file IO instead. */\n        result = ma_decoder_init_vfs(NULL, pFilePath, pConfig, pDecoder);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_decoder__preinit_file_w(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n\n    result = ma_decoder__preinit(NULL, NULL, NULL, NULL, pConfig, pDecoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pFilePath == NULL || pFilePath[0] == '\\0') {\n        return MA_INVALID_ARGS;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_decoder_init_file_w(const wchar_t* pFilePath, const ma_decoder_config* pConfig, ma_decoder* pDecoder)\n{\n    ma_result result;\n    ma_decoder_config config;\n\n    config = ma_decoder_config_init_copy(pConfig);\n    result = ma_decoder__preinit_file_w(pFilePath, &config, pDecoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* If the backend has support for loading from a file path we'll want to use that. If that all fails we'll fall back to the VFS path. */\n    result = MA_NO_BACKEND;\n\n    if (config.encodingFormat != ma_encoding_format_unknown) {\n    #ifdef MA_HAS_WAV\n        if (config.encodingFormat == ma_encoding_format_wav) {\n            result = ma_decoder_init_wav_from_file_w__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_FLAC\n        if (config.encodingFormat == ma_encoding_format_flac) {\n            result = ma_decoder_init_flac_from_file_w__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_MP3\n        if (config.encodingFormat == ma_encoding_format_mp3) {\n            result = ma_decoder_init_mp3_from_file_w__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_VORBIS\n        if (config.encodingFormat == ma_encoding_format_vorbis) {\n            result = ma_decoder_init_vorbis_from_file_w__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    }\n\n    if (result != MA_SUCCESS) {\n        /* Getting here means we weren't able to initialize a decoder of a specific encoding format. */\n\n        /*\n        We use trial and error to open a decoder. We prioritize custom decoders so that if they\n        implement the same encoding format they take priority over the built-in decoders.\n        */\n        result = ma_decoder_init_custom_from_file_w__internal(pFilePath, &config, pDecoder);\n\n        /*\n        If we get to this point and we still haven't found a decoder, and the caller has requested a\n        specific encoding format, there's no hope for it. Abort.\n        */\n        if (result != MA_SUCCESS && config.encodingFormat != ma_encoding_format_unknown) {\n            return MA_NO_BACKEND;\n        }\n\n        /* First try loading based on the file extension so we don't waste time opening and closing files. */\n    #ifdef MA_HAS_WAV\n        if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L\"wav\")) {\n            result = ma_decoder_init_wav_from_file_w__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_FLAC\n        if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L\"flac\")) {\n            result = ma_decoder_init_flac_from_file_w__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_MP3\n        if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L\"mp3\")) {\n            result = ma_decoder_init_mp3_from_file_w__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n    #ifdef MA_HAS_VORBIS\n        if (result != MA_SUCCESS && ma_path_extension_equal_w(pFilePath, L\"ogg\")) {\n            result = ma_decoder_init_vorbis_from_file_w__internal(pFilePath, &config, pDecoder);\n        }\n    #endif\n\n        /*\n        If we still haven't got a result just use trial and error. Custom decoders have already been attempted, so here we\n        need only iterate over our stock decoders.\n        */\n        if (result != MA_SUCCESS) {\n        #ifdef MA_HAS_WAV\n            if (result != MA_SUCCESS) {\n                result = ma_decoder_init_wav_from_file_w__internal(pFilePath, &config, pDecoder);\n            }\n        #endif\n        #ifdef MA_HAS_FLAC\n            if (result != MA_SUCCESS) {\n                result = ma_decoder_init_flac_from_file_w__internal(pFilePath, &config, pDecoder);\n            }\n        #endif\n        #ifdef MA_HAS_MP3\n            if (result != MA_SUCCESS) {\n                result = ma_decoder_init_mp3_from_file_w__internal(pFilePath, &config, pDecoder);\n            }\n        #endif\n        #ifdef MA_HAS_VORBIS\n            if (result != MA_SUCCESS) {\n                result = ma_decoder_init_vorbis_from_file_w__internal(pFilePath, &config, pDecoder);\n            }\n        #endif\n        }\n    }\n\n    /*\n    If at this point we still haven't successfully initialized the decoder it most likely means\n    the backend doesn't have an implementation for loading from a file path. We'll try using\n    miniaudio's built-in file IO for loading file.\n    */\n    if (result == MA_SUCCESS) {\n        /* Initialization was successful. Finish up. */\n        result = ma_decoder__postinit(&config, pDecoder);\n        if (result != MA_SUCCESS) {\n            /*\n            The backend was initialized successfully, but for some reason post-initialization failed. This is most likely\n            due to an out of memory error. We're going to abort with an error here and not try to recover.\n            */\n            if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) {\n                pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, &pDecoder->pBackend, &pDecoder->allocationCallbacks);\n            }\n\n            return result;\n        }\n    } else {\n        /* Probably no implementation for loading from a file path. Use miniaudio's file IO instead. */\n        result = ma_decoder_init_vfs_w(NULL, pFilePath, pConfig, pDecoder);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_decoder_uninit(ma_decoder* pDecoder)\n{\n    if (pDecoder == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pDecoder->pBackend != NULL) {\n        if (pDecoder->pBackendVTable != NULL && pDecoder->pBackendVTable->onUninit != NULL) {\n            pDecoder->pBackendVTable->onUninit(pDecoder->pBackendUserData, pDecoder->pBackend, &pDecoder->allocationCallbacks);\n        }\n    }\n\n    if (pDecoder->onRead == ma_decoder__on_read_vfs) {\n        ma_vfs_or_default_close(pDecoder->data.vfs.pVFS, pDecoder->data.vfs.file);\n        pDecoder->data.vfs.file = NULL;\n    }\n\n    ma_data_converter_uninit(&pDecoder->converter, &pDecoder->allocationCallbacks);\n    ma_data_source_uninit(&pDecoder->ds);\n\n    if (pDecoder->pInputCache != NULL) {\n        ma_free(pDecoder->pInputCache, &pDecoder->allocationCallbacks);\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_decoder_read_pcm_frames(ma_decoder* pDecoder, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint64 totalFramesReadOut;\n    void* pRunningFramesOut;\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;   /* Safety. */\n    }\n\n    if (frameCount == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pDecoder == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pDecoder->pBackend == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* Fast path. */\n    if (pDecoder->converter.isPassthrough) {\n        result = ma_data_source_read_pcm_frames(pDecoder->pBackend, pFramesOut, frameCount, &totalFramesReadOut);\n    } else {\n        /*\n        Getting here means we need to do data conversion. If we're seeking forward and are _not_ doing resampling we can run this in a fast path. If we're doing resampling we\n        need to run through each sample because we need to ensure it's internal cache is updated.\n        */\n        if (pFramesOut == NULL && pDecoder->converter.hasResampler == MA_FALSE) {\n            result = ma_data_source_read_pcm_frames(pDecoder->pBackend, NULL, frameCount, &totalFramesReadOut);\n        } else {\n            /* Slow path. Need to run everything through the data converter. */\n            ma_format internalFormat;\n            ma_uint32 internalChannels;\n\n            totalFramesReadOut = 0;\n            pRunningFramesOut  = pFramesOut;\n\n            result = ma_data_source_get_data_format(pDecoder->pBackend, &internalFormat, &internalChannels, NULL, NULL, 0);\n            if (result != MA_SUCCESS) {\n                return result;   /* Failed to retrieve the internal format and channel count. */\n            }\n\n            /*\n            We run a different path depending on whether or not we are using a heap-allocated\n            intermediary buffer or not. If the data converter does not support the calculation of\n            the required number of input frames, we'll use the heap-allocated path. Otherwise we'll\n            use the stack-allocated path.\n            */\n            if (pDecoder->pInputCache != NULL) {\n                /* We don't have a way of determining the required number of input frames, so need to persistently store input data in a cache. */\n                while (totalFramesReadOut < frameCount) {\n                    ma_uint64 framesToReadThisIterationIn;\n                    ma_uint64 framesToReadThisIterationOut;\n\n                    /* If there's any data available in the cache, that needs to get processed first. */\n                    if (pDecoder->inputCacheRemaining > 0) {\n                        framesToReadThisIterationOut = (frameCount - totalFramesReadOut);\n                        framesToReadThisIterationIn  = framesToReadThisIterationOut;\n                        if (framesToReadThisIterationIn > pDecoder->inputCacheRemaining) {\n                            framesToReadThisIterationIn = pDecoder->inputCacheRemaining;\n                        }\n\n                        result = ma_data_converter_process_pcm_frames(&pDecoder->converter, ma_offset_pcm_frames_ptr(pDecoder->pInputCache, pDecoder->inputCacheConsumed, internalFormat, internalChannels), &framesToReadThisIterationIn, pRunningFramesOut, &framesToReadThisIterationOut);\n                        if (result != MA_SUCCESS) {\n                            break;\n                        }\n\n                        pDecoder->inputCacheConsumed  += framesToReadThisIterationIn;\n                        pDecoder->inputCacheRemaining -= framesToReadThisIterationIn;\n\n                        totalFramesReadOut += framesToReadThisIterationOut;\n\n                        if (pRunningFramesOut != NULL) {\n                            pRunningFramesOut = ma_offset_ptr(pRunningFramesOut, framesToReadThisIterationOut * ma_get_bytes_per_frame(pDecoder->outputFormat, pDecoder->outputChannels));\n                        }\n\n                        if (framesToReadThisIterationIn == 0 && framesToReadThisIterationOut == 0) {\n                            break;  /* We're done. */\n                        }\n                    }\n\n                    /* Getting here means there's no data in the cache and we need to fill it up from the data source. */\n                    if (pDecoder->inputCacheRemaining == 0) {\n                        pDecoder->inputCacheConsumed = 0;\n\n                        result = ma_data_source_read_pcm_frames(pDecoder->pBackend, pDecoder->pInputCache, pDecoder->inputCacheCap, &pDecoder->inputCacheRemaining);\n                        if (result != MA_SUCCESS) {\n                            break;\n                        }\n                    }\n                }\n            } else {\n                /* We have a way of determining the required number of input frames so just use the stack. */\n                while (totalFramesReadOut < frameCount) {\n                    ma_uint8 pIntermediaryBuffer[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];  /* In internal format. */\n                    ma_uint64 intermediaryBufferCap = sizeof(pIntermediaryBuffer) / ma_get_bytes_per_frame(internalFormat, internalChannels);\n                    ma_uint64 framesToReadThisIterationIn;\n                    ma_uint64 framesReadThisIterationIn;\n                    ma_uint64 framesToReadThisIterationOut;\n                    ma_uint64 framesReadThisIterationOut;\n                    ma_uint64 requiredInputFrameCount;\n\n                    framesToReadThisIterationOut = (frameCount - totalFramesReadOut);\n                    framesToReadThisIterationIn = framesToReadThisIterationOut;\n                    if (framesToReadThisIterationIn > intermediaryBufferCap) {\n                        framesToReadThisIterationIn = intermediaryBufferCap;\n                    }\n\n                    ma_data_converter_get_required_input_frame_count(&pDecoder->converter, framesToReadThisIterationOut, &requiredInputFrameCount);\n                    if (framesToReadThisIterationIn > requiredInputFrameCount) {\n                        framesToReadThisIterationIn = requiredInputFrameCount;\n                    }\n\n                    if (requiredInputFrameCount > 0) {\n                        result = ma_data_source_read_pcm_frames(pDecoder->pBackend, pIntermediaryBuffer, framesToReadThisIterationIn, &framesReadThisIterationIn);\n                    } else {\n                        framesReadThisIterationIn = 0;\n                    }\n\n                    /*\n                    At this point we have our decoded data in input format and now we need to convert to output format. Note that even if we didn't read any\n                    input frames, we still want to try processing frames because there may some output frames generated from cached input data.\n                    */\n                    framesReadThisIterationOut = framesToReadThisIterationOut;\n                    result = ma_data_converter_process_pcm_frames(&pDecoder->converter, pIntermediaryBuffer, &framesReadThisIterationIn, pRunningFramesOut, &framesReadThisIterationOut);\n                    if (result != MA_SUCCESS) {\n                        break;\n                    }\n\n                    totalFramesReadOut += framesReadThisIterationOut;\n\n                    if (pRunningFramesOut != NULL) {\n                        pRunningFramesOut = ma_offset_ptr(pRunningFramesOut, framesReadThisIterationOut * ma_get_bytes_per_frame(pDecoder->outputFormat, pDecoder->outputChannels));\n                    }\n\n                    if (framesReadThisIterationIn == 0 && framesReadThisIterationOut == 0) {\n                        break;  /* We're done. */\n                    }\n                }\n            }\n        }\n    }\n\n    pDecoder->readPointerInPCMFrames += totalFramesReadOut;\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = totalFramesReadOut;\n    }\n\n    if (result == MA_SUCCESS && totalFramesReadOut == 0) {\n        result =  MA_AT_END;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_decoder_seek_to_pcm_frame(ma_decoder* pDecoder, ma_uint64 frameIndex)\n{\n    if (pDecoder == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pDecoder->pBackend != NULL) {\n        ma_result result;\n        ma_uint64 internalFrameIndex;\n        ma_uint32 internalSampleRate;\n        ma_uint64 currentFrameIndex;\n\n        result = ma_data_source_get_data_format(pDecoder->pBackend, NULL, NULL, &internalSampleRate, NULL, 0);\n        if (result != MA_SUCCESS) {\n            return result;  /* Failed to retrieve the internal sample rate. */\n        }\n\n        if (internalSampleRate == pDecoder->outputSampleRate) {\n            internalFrameIndex = frameIndex;\n        } else {\n            internalFrameIndex = ma_calculate_frame_count_after_resampling(internalSampleRate, pDecoder->outputSampleRate, frameIndex);\n        }\n\n        /* Only seek if we're requesting a different frame to what we're currently sitting on. */\n        ma_data_source_get_cursor_in_pcm_frames(pDecoder->pBackend, &currentFrameIndex);\n        if (currentFrameIndex != internalFrameIndex) {\n            result = ma_data_source_seek_to_pcm_frame(pDecoder->pBackend, internalFrameIndex);\n            if (result == MA_SUCCESS) {\n                pDecoder->readPointerInPCMFrames = frameIndex;\n            }\n\n            /* Reset the data converter so that any cached data in the resampler is cleared. */\n            ma_data_converter_reset(&pDecoder->converter);\n        }\n\n        return result;\n    }\n\n    /* Should never get here, but if we do it means onSeekToPCMFrame was not set by the backend. */\n    return MA_INVALID_ARGS;\n}\n\nMA_API ma_result ma_decoder_get_data_format(ma_decoder* pDecoder, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    if (pDecoder == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pFormat != NULL) {\n        *pFormat = pDecoder->outputFormat;\n    }\n\n    if (pChannels != NULL) {\n        *pChannels = pDecoder->outputChannels;\n    }\n\n    if (pSampleRate != NULL) {\n        *pSampleRate = pDecoder->outputSampleRate;\n    }\n\n    if (pChannelMap != NULL) {\n        ma_data_converter_get_output_channel_map(&pDecoder->converter, pChannelMap, channelMapCap);\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_decoder_get_cursor_in_pcm_frames(ma_decoder* pDecoder, ma_uint64* pCursor)\n{\n    if (pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = 0;\n\n    if (pDecoder == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = pDecoder->readPointerInPCMFrames;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_decoder_get_length_in_pcm_frames(ma_decoder* pDecoder, ma_uint64* pLength)\n{\n    if (pLength == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pLength = 0;\n\n    if (pDecoder == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pDecoder->pBackend != NULL) {\n        ma_result result;\n        ma_uint64 internalLengthInPCMFrames;\n        ma_uint32 internalSampleRate;\n\n        result = ma_data_source_get_length_in_pcm_frames(pDecoder->pBackend, &internalLengthInPCMFrames);\n        if (result != MA_SUCCESS) {\n            return result;  /* Failed to retrieve the internal length. */\n        }\n\n        result = ma_data_source_get_data_format(pDecoder->pBackend, NULL, NULL, &internalSampleRate, NULL, 0);\n        if (result != MA_SUCCESS) {\n            return result;   /* Failed to retrieve the internal sample rate. */\n        }\n\n        if (internalSampleRate == pDecoder->outputSampleRate) {\n            *pLength = internalLengthInPCMFrames;\n        } else {\n            *pLength = ma_calculate_frame_count_after_resampling(pDecoder->outputSampleRate, internalSampleRate, internalLengthInPCMFrames);\n        }\n\n        return MA_SUCCESS;\n    } else {\n        return MA_NO_BACKEND;\n    }\n}\n\nMA_API ma_result ma_decoder_get_available_frames(ma_decoder* pDecoder, ma_uint64* pAvailableFrames)\n{\n    ma_result result;\n    ma_uint64 totalFrameCount;\n\n    if (pAvailableFrames == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pAvailableFrames = 0;\n\n    if (pDecoder == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_decoder_get_length_in_pcm_frames(pDecoder, &totalFrameCount);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (totalFrameCount <= pDecoder->readPointerInPCMFrames) {\n        *pAvailableFrames = 0;\n    } else {\n        *pAvailableFrames = totalFrameCount - pDecoder->readPointerInPCMFrames;\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_decoder__full_decode_and_uninit(ma_decoder* pDecoder, ma_decoder_config* pConfigOut, ma_uint64* pFrameCountOut, void** ppPCMFramesOut)\n{\n    ma_result result;\n    ma_uint64 totalFrameCount;\n    ma_uint64 bpf;\n    ma_uint64 dataCapInFrames;\n    void* pPCMFramesOut;\n\n    MA_ASSERT(pDecoder != NULL);\n\n    totalFrameCount = 0;\n    bpf = ma_get_bytes_per_frame(pDecoder->outputFormat, pDecoder->outputChannels);\n\n    /* The frame count is unknown until we try reading. Thus, we just run in a loop. */\n    dataCapInFrames = 0;\n    pPCMFramesOut = NULL;\n    for (;;) {\n        ma_uint64 frameCountToTryReading;\n        ma_uint64 framesJustRead;\n\n        /* Make room if there's not enough. */\n        if (totalFrameCount == dataCapInFrames) {\n            void* pNewPCMFramesOut;\n            ma_uint64 newDataCapInFrames = dataCapInFrames*2;\n            if (newDataCapInFrames == 0) {\n                newDataCapInFrames = 4096;\n            }\n\n            if ((newDataCapInFrames * bpf) > MA_SIZE_MAX) {\n                ma_free(pPCMFramesOut, &pDecoder->allocationCallbacks);\n                return MA_TOO_BIG;\n            }\n\n            pNewPCMFramesOut = (void*)ma_realloc(pPCMFramesOut, (size_t)(newDataCapInFrames * bpf), &pDecoder->allocationCallbacks);\n            if (pNewPCMFramesOut == NULL) {\n                ma_free(pPCMFramesOut, &pDecoder->allocationCallbacks);\n                return MA_OUT_OF_MEMORY;\n            }\n\n            dataCapInFrames = newDataCapInFrames;\n            pPCMFramesOut = pNewPCMFramesOut;\n        }\n\n        frameCountToTryReading = dataCapInFrames - totalFrameCount;\n        MA_ASSERT(frameCountToTryReading > 0);\n\n        result = ma_decoder_read_pcm_frames(pDecoder, (ma_uint8*)pPCMFramesOut + (totalFrameCount * bpf), frameCountToTryReading, &framesJustRead);\n        totalFrameCount += framesJustRead;\n\n        if (result != MA_SUCCESS) {\n            break;\n        }\n\n        if (framesJustRead < frameCountToTryReading) {\n            break;\n        }\n    }\n\n\n    if (pConfigOut != NULL) {\n        pConfigOut->format     = pDecoder->outputFormat;\n        pConfigOut->channels   = pDecoder->outputChannels;\n        pConfigOut->sampleRate = pDecoder->outputSampleRate;\n    }\n\n    if (ppPCMFramesOut != NULL) {\n        *ppPCMFramesOut = pPCMFramesOut;\n    } else {\n        ma_free(pPCMFramesOut, &pDecoder->allocationCallbacks);\n    }\n\n    if (pFrameCountOut != NULL) {\n        *pFrameCountOut = totalFrameCount;\n    }\n\n    ma_decoder_uninit(pDecoder);\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_decode_from_vfs(ma_vfs* pVFS, const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut)\n{\n    ma_result result;\n    ma_decoder_config config;\n    ma_decoder decoder;\n\n    if (pFrameCountOut != NULL) {\n        *pFrameCountOut = 0;\n    }\n    if (ppPCMFramesOut != NULL) {\n        *ppPCMFramesOut = NULL;\n    }\n\n    config = ma_decoder_config_init_copy(pConfig);\n\n    result = ma_decoder_init_vfs(pVFS, pFilePath, &config, &decoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    result = ma_decoder__full_decode_and_uninit(&decoder, pConfig, pFrameCountOut, ppPCMFramesOut);\n\n    return result;\n}\n\nMA_API ma_result ma_decode_file(const char* pFilePath, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut)\n{\n    return ma_decode_from_vfs(NULL, pFilePath, pConfig, pFrameCountOut, ppPCMFramesOut);\n}\n\nMA_API ma_result ma_decode_memory(const void* pData, size_t dataSize, ma_decoder_config* pConfig, ma_uint64* pFrameCountOut, void** ppPCMFramesOut)\n{\n    ma_decoder_config config;\n    ma_decoder decoder;\n    ma_result result;\n\n    if (pFrameCountOut != NULL) {\n        *pFrameCountOut = 0;\n    }\n    if (ppPCMFramesOut != NULL) {\n        *ppPCMFramesOut = NULL;\n    }\n\n    if (pData == NULL || dataSize == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    config = ma_decoder_config_init_copy(pConfig);\n\n    result = ma_decoder_init_memory(pData, dataSize, &config, &decoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return ma_decoder__full_decode_and_uninit(&decoder, pConfig, pFrameCountOut, ppPCMFramesOut);\n}\n#endif  /* MA_NO_DECODING */\n\n\n#ifndef MA_NO_ENCODING\n\n#if defined(MA_HAS_WAV)\nstatic size_t ma_encoder__internal_on_write_wav(void* pUserData, const void* pData, size_t bytesToWrite)\n{\n    ma_encoder* pEncoder = (ma_encoder*)pUserData;\n    size_t bytesWritten = 0;\n\n    MA_ASSERT(pEncoder != NULL);\n\n    pEncoder->onWrite(pEncoder, pData, bytesToWrite, &bytesWritten);\n    return bytesWritten;\n}\n\nstatic ma_bool32 ma_encoder__internal_on_seek_wav(void* pUserData, int offset, ma_dr_wav_seek_origin origin)\n{\n    ma_encoder* pEncoder = (ma_encoder*)pUserData;\n    ma_result result;\n\n    MA_ASSERT(pEncoder != NULL);\n\n    result = pEncoder->onSeek(pEncoder, offset, (origin == ma_dr_wav_seek_origin_start) ? ma_seek_origin_start : ma_seek_origin_current);\n    if (result != MA_SUCCESS) {\n        return MA_FALSE;\n    } else {\n        return MA_TRUE;\n    }\n}\n\nstatic ma_result ma_encoder__on_init_wav(ma_encoder* pEncoder)\n{\n    ma_dr_wav_data_format wavFormat;\n    ma_allocation_callbacks allocationCallbacks;\n    ma_dr_wav* pWav;\n\n    MA_ASSERT(pEncoder != NULL);\n\n    pWav = (ma_dr_wav*)ma_malloc(sizeof(*pWav), &pEncoder->config.allocationCallbacks);\n    if (pWav == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    wavFormat.container     = ma_dr_wav_container_riff;\n    wavFormat.channels      = pEncoder->config.channels;\n    wavFormat.sampleRate    = pEncoder->config.sampleRate;\n    wavFormat.bitsPerSample = ma_get_bytes_per_sample(pEncoder->config.format) * 8;\n    if (pEncoder->config.format == ma_format_f32) {\n        wavFormat.format    = MA_DR_WAVE_FORMAT_IEEE_FLOAT;\n    } else {\n        wavFormat.format    = MA_DR_WAVE_FORMAT_PCM;\n    }\n\n    allocationCallbacks.pUserData = pEncoder->config.allocationCallbacks.pUserData;\n    allocationCallbacks.onMalloc  = pEncoder->config.allocationCallbacks.onMalloc;\n    allocationCallbacks.onRealloc = pEncoder->config.allocationCallbacks.onRealloc;\n    allocationCallbacks.onFree    = pEncoder->config.allocationCallbacks.onFree;\n\n    if (!ma_dr_wav_init_write(pWav, &wavFormat, ma_encoder__internal_on_write_wav, ma_encoder__internal_on_seek_wav, pEncoder, &allocationCallbacks)) {\n        return MA_ERROR;\n    }\n\n    pEncoder->pInternalEncoder = pWav;\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_encoder__on_uninit_wav(ma_encoder* pEncoder)\n{\n    ma_dr_wav* pWav;\n\n    MA_ASSERT(pEncoder != NULL);\n\n    pWav = (ma_dr_wav*)pEncoder->pInternalEncoder;\n    MA_ASSERT(pWav != NULL);\n\n    ma_dr_wav_uninit(pWav);\n    ma_free(pWav, &pEncoder->config.allocationCallbacks);\n}\n\nstatic ma_result ma_encoder__on_write_pcm_frames_wav(ma_encoder* pEncoder, const void* pFramesIn, ma_uint64 frameCount, ma_uint64* pFramesWritten)\n{\n    ma_dr_wav* pWav;\n    ma_uint64 framesWritten;\n\n    MA_ASSERT(pEncoder != NULL);\n\n    pWav = (ma_dr_wav*)pEncoder->pInternalEncoder;\n    MA_ASSERT(pWav != NULL);\n\n    framesWritten = ma_dr_wav_write_pcm_frames(pWav, frameCount, pFramesIn);\n\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = framesWritten;\n    }\n\n    return MA_SUCCESS;\n}\n#endif\n\nMA_API ma_encoder_config ma_encoder_config_init(ma_encoding_format encodingFormat, ma_format format, ma_uint32 channels, ma_uint32 sampleRate)\n{\n    ma_encoder_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.encodingFormat = encodingFormat;\n    config.format = format;\n    config.channels = channels;\n    config.sampleRate = sampleRate;\n\n    return config;\n}\n\nMA_API ma_result ma_encoder_preinit(const ma_encoder_config* pConfig, ma_encoder* pEncoder)\n{\n    ma_result result;\n\n    if (pEncoder == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pEncoder);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->format == ma_format_unknown || pConfig->channels == 0 || pConfig->sampleRate == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pEncoder->config = *pConfig;\n\n    result = ma_allocation_callbacks_init_copy(&pEncoder->config.allocationCallbacks, &pConfig->allocationCallbacks);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_encoder_init__internal(ma_encoder_write_proc onWrite, ma_encoder_seek_proc onSeek, void* pUserData, ma_encoder* pEncoder)\n{\n    ma_result result = MA_SUCCESS;\n\n    /* This assumes ma_encoder_preinit() has been called prior. */\n    MA_ASSERT(pEncoder != NULL);\n\n    if (onWrite == NULL || onSeek == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pEncoder->onWrite   = onWrite;\n    pEncoder->onSeek    = onSeek;\n    pEncoder->pUserData = pUserData;\n\n    switch (pEncoder->config.encodingFormat)\n    {\n        case ma_encoding_format_wav:\n        {\n        #if defined(MA_HAS_WAV)\n            pEncoder->onInit           = ma_encoder__on_init_wav;\n            pEncoder->onUninit         = ma_encoder__on_uninit_wav;\n            pEncoder->onWritePCMFrames = ma_encoder__on_write_pcm_frames_wav;\n        #else\n            result = MA_NO_BACKEND;\n        #endif\n        } break;\n\n        default:\n        {\n            result = MA_INVALID_ARGS;\n        } break;\n    }\n\n    /* Getting here means we should have our backend callbacks set up. */\n    if (result == MA_SUCCESS) {\n        result = pEncoder->onInit(pEncoder);\n    }\n\n    return result;\n}\n\nstatic ma_result ma_encoder__on_write_vfs(ma_encoder* pEncoder, const void* pBufferIn, size_t bytesToWrite, size_t* pBytesWritten)\n{\n    return ma_vfs_or_default_write(pEncoder->data.vfs.pVFS, pEncoder->data.vfs.file, pBufferIn, bytesToWrite, pBytesWritten);\n}\n\nstatic ma_result ma_encoder__on_seek_vfs(ma_encoder* pEncoder, ma_int64 offset, ma_seek_origin origin)\n{\n    return ma_vfs_or_default_seek(pEncoder->data.vfs.pVFS, pEncoder->data.vfs.file, offset, origin);\n}\n\nMA_API ma_result ma_encoder_init_vfs(ma_vfs* pVFS, const char* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder)\n{\n    ma_result result;\n    ma_vfs_file file;\n\n    result = ma_encoder_preinit(pConfig, pEncoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* Now open the file. If this fails we don't need to uninitialize the encoder. */\n    result = ma_vfs_or_default_open(pVFS, pFilePath, MA_OPEN_MODE_WRITE, &file);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pEncoder->data.vfs.pVFS = pVFS;\n    pEncoder->data.vfs.file = file;\n\n    result = ma_encoder_init__internal(ma_encoder__on_write_vfs, ma_encoder__on_seek_vfs, NULL, pEncoder);\n    if (result != MA_SUCCESS) {\n        ma_vfs_or_default_close(pVFS, file);\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_encoder_init_vfs_w(ma_vfs* pVFS, const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder)\n{\n    ma_result result;\n    ma_vfs_file file;\n\n    result = ma_encoder_preinit(pConfig, pEncoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* Now open the file. If this fails we don't need to uninitialize the encoder. */\n    result = ma_vfs_or_default_open_w(pVFS, pFilePath, MA_OPEN_MODE_WRITE, &file);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pEncoder->data.vfs.pVFS = pVFS;\n    pEncoder->data.vfs.file = file;\n\n    result = ma_encoder_init__internal(ma_encoder__on_write_vfs, ma_encoder__on_seek_vfs, NULL, pEncoder);\n    if (result != MA_SUCCESS) {\n        ma_vfs_or_default_close(pVFS, file);\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_encoder_init_file(const char* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder)\n{\n    return ma_encoder_init_vfs(NULL, pFilePath, pConfig, pEncoder);\n}\n\nMA_API ma_result ma_encoder_init_file_w(const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder)\n{\n    return ma_encoder_init_vfs_w(NULL, pFilePath, pConfig, pEncoder);\n}\n\nMA_API ma_result ma_encoder_init(ma_encoder_write_proc onWrite, ma_encoder_seek_proc onSeek, void* pUserData, const ma_encoder_config* pConfig, ma_encoder* pEncoder)\n{\n    ma_result result;\n\n    result = ma_encoder_preinit(pConfig, pEncoder);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return ma_encoder_init__internal(onWrite, onSeek, pUserData, pEncoder);\n}\n\n\nMA_API void ma_encoder_uninit(ma_encoder* pEncoder)\n{\n    if (pEncoder == NULL) {\n        return;\n    }\n\n    if (pEncoder->onUninit) {\n        pEncoder->onUninit(pEncoder);\n    }\n\n    /* If we have a file handle, close it. */\n    if (pEncoder->onWrite == ma_encoder__on_write_vfs) {\n        ma_vfs_or_default_close(pEncoder->data.vfs.pVFS, pEncoder->data.vfs.file);\n        pEncoder->data.vfs.file = NULL;\n    }\n}\n\n\nMA_API ma_result ma_encoder_write_pcm_frames(ma_encoder* pEncoder, const void* pFramesIn, ma_uint64 frameCount, ma_uint64* pFramesWritten)\n{\n    if (pFramesWritten != NULL) {\n        *pFramesWritten = 0;\n    }\n\n    if (pEncoder == NULL || pFramesIn == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return pEncoder->onWritePCMFrames(pEncoder, pFramesIn, frameCount, pFramesWritten);\n}\n#endif  /* MA_NO_ENCODING */\n\n\n\n/**************************************************************************************************************************************************************\n\nGeneration\n\n**************************************************************************************************************************************************************/\n#ifndef MA_NO_GENERATION\nMA_API ma_waveform_config ma_waveform_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_waveform_type type, double amplitude, double frequency)\n{\n    ma_waveform_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format     = format;\n    config.channels   = channels;\n    config.sampleRate = sampleRate;\n    config.type       = type;\n    config.amplitude  = amplitude;\n    config.frequency  = frequency;\n\n    return config;\n}\n\nstatic ma_result ma_waveform__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    return ma_waveform_read_pcm_frames((ma_waveform*)pDataSource, pFramesOut, frameCount, pFramesRead);\n}\n\nstatic ma_result ma_waveform__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex)\n{\n    return ma_waveform_seek_to_pcm_frame((ma_waveform*)pDataSource, frameIndex);\n}\n\nstatic ma_result ma_waveform__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    ma_waveform* pWaveform = (ma_waveform*)pDataSource;\n\n    *pFormat     = pWaveform->config.format;\n    *pChannels   = pWaveform->config.channels;\n    *pSampleRate = pWaveform->config.sampleRate;\n    ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pWaveform->config.channels);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_waveform__data_source_on_get_cursor(ma_data_source* pDataSource, ma_uint64* pCursor)\n{\n    ma_waveform* pWaveform = (ma_waveform*)pDataSource;\n\n    *pCursor = (ma_uint64)(pWaveform->time / pWaveform->advance);\n\n    return MA_SUCCESS;\n}\n\nstatic double ma_waveform__calculate_advance(ma_uint32 sampleRate, double frequency)\n{\n    return (1.0 / (sampleRate / frequency));\n}\n\nstatic void ma_waveform__update_advance(ma_waveform* pWaveform)\n{\n    pWaveform->advance = ma_waveform__calculate_advance(pWaveform->config.sampleRate, pWaveform->config.frequency);\n}\n\nstatic ma_data_source_vtable g_ma_waveform_data_source_vtable =\n{\n    ma_waveform__data_source_on_read,\n    ma_waveform__data_source_on_seek,\n    ma_waveform__data_source_on_get_data_format,\n    ma_waveform__data_source_on_get_cursor,\n    NULL,   /* onGetLength. There's no notion of a length in waveforms. */\n    NULL,   /* onSetLooping */\n    0\n};\n\nMA_API ma_result ma_waveform_init(const ma_waveform_config* pConfig, ma_waveform* pWaveform)\n{\n    ma_result result;\n    ma_data_source_config dataSourceConfig;\n\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pWaveform);\n\n    dataSourceConfig = ma_data_source_config_init();\n    dataSourceConfig.vtable = &g_ma_waveform_data_source_vtable;\n\n    result = ma_data_source_init(&dataSourceConfig, &pWaveform->ds);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pWaveform->config  = *pConfig;\n    pWaveform->advance = ma_waveform__calculate_advance(pWaveform->config.sampleRate, pWaveform->config.frequency);\n    pWaveform->time    = 0;\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_waveform_uninit(ma_waveform* pWaveform)\n{\n    if (pWaveform == NULL) {\n        return;\n    }\n\n    ma_data_source_uninit(&pWaveform->ds);\n}\n\nMA_API ma_result ma_waveform_set_amplitude(ma_waveform* pWaveform, double amplitude)\n{\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pWaveform->config.amplitude = amplitude;\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_waveform_set_frequency(ma_waveform* pWaveform, double frequency)\n{\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pWaveform->config.frequency = frequency;\n    ma_waveform__update_advance(pWaveform);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_waveform_set_type(ma_waveform* pWaveform, ma_waveform_type type)\n{\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pWaveform->config.type = type;\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_waveform_set_sample_rate(ma_waveform* pWaveform, ma_uint32 sampleRate)\n{\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pWaveform->config.sampleRate = sampleRate;\n    ma_waveform__update_advance(pWaveform);\n\n    return MA_SUCCESS;\n}\n\nstatic float ma_waveform_sine_f32(double time, double amplitude)\n{\n    return (float)(ma_sind(MA_TAU_D * time) * amplitude);\n}\n\nstatic ma_int16 ma_waveform_sine_s16(double time, double amplitude)\n{\n    return ma_pcm_sample_f32_to_s16(ma_waveform_sine_f32(time, amplitude));\n}\n\nstatic float ma_waveform_square_f32(double time, double dutyCycle, double amplitude)\n{\n    double f = time - (ma_int64)time;\n    double r;\n\n    if (f < dutyCycle) {\n        r =  amplitude;\n    } else {\n        r = -amplitude;\n    }\n\n    return (float)r;\n}\n\nstatic ma_int16 ma_waveform_square_s16(double time, double dutyCycle, double amplitude)\n{\n    return ma_pcm_sample_f32_to_s16(ma_waveform_square_f32(time, dutyCycle, amplitude));\n}\n\nstatic float ma_waveform_triangle_f32(double time, double amplitude)\n{\n    double f = time - (ma_int64)time;\n    double r;\n\n    r = 2 * ma_abs(2 * (f - 0.5)) - 1;\n\n    return (float)(r * amplitude);\n}\n\nstatic ma_int16 ma_waveform_triangle_s16(double time, double amplitude)\n{\n    return ma_pcm_sample_f32_to_s16(ma_waveform_triangle_f32(time, amplitude));\n}\n\nstatic float ma_waveform_sawtooth_f32(double time, double amplitude)\n{\n    double f = time - (ma_int64)time;\n    double r;\n\n    r = 2 * (f - 0.5);\n\n    return (float)(r * amplitude);\n}\n\nstatic ma_int16 ma_waveform_sawtooth_s16(double time, double amplitude)\n{\n    return ma_pcm_sample_f32_to_s16(ma_waveform_sawtooth_f32(time, amplitude));\n}\n\nstatic void ma_waveform_read_pcm_frames__sine(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount)\n{\n    ma_uint64 iFrame;\n    ma_uint64 iChannel;\n    ma_uint32 bps = ma_get_bytes_per_sample(pWaveform->config.format);\n    ma_uint32 bpf = bps * pWaveform->config.channels;\n\n    MA_ASSERT(pWaveform  != NULL);\n    MA_ASSERT(pFramesOut != NULL);\n\n    if (pWaveform->config.format == ma_format_f32) {\n        float* pFramesOutF32 = (float*)pFramesOut;\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            float s = ma_waveform_sine_f32(pWaveform->time, pWaveform->config.amplitude);\n            pWaveform->time += pWaveform->advance;\n\n            for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) {\n                pFramesOutF32[iFrame*pWaveform->config.channels + iChannel] = s;\n            }\n        }\n    } else if (pWaveform->config.format == ma_format_s16) {\n        ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut;\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            ma_int16 s = ma_waveform_sine_s16(pWaveform->time, pWaveform->config.amplitude);\n            pWaveform->time += pWaveform->advance;\n\n            for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) {\n                pFramesOutS16[iFrame*pWaveform->config.channels + iChannel] = s;\n            }\n        }\n    } else {\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            float s = ma_waveform_sine_f32(pWaveform->time, pWaveform->config.amplitude);\n            pWaveform->time += pWaveform->advance;\n\n            for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) {\n                ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pWaveform->config.format, &s, ma_format_f32, 1, ma_dither_mode_none);\n            }\n        }\n    }\n}\n\nstatic void ma_waveform_read_pcm_frames__square(ma_waveform* pWaveform, double dutyCycle, void* pFramesOut, ma_uint64 frameCount)\n{\n    ma_uint64 iFrame;\n    ma_uint64 iChannel;\n    ma_uint32 bps = ma_get_bytes_per_sample(pWaveform->config.format);\n    ma_uint32 bpf = bps * pWaveform->config.channels;\n\n    MA_ASSERT(pWaveform  != NULL);\n    MA_ASSERT(pFramesOut != NULL);\n\n    if (pWaveform->config.format == ma_format_f32) {\n        float* pFramesOutF32 = (float*)pFramesOut;\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            float s = ma_waveform_square_f32(pWaveform->time, dutyCycle, pWaveform->config.amplitude);\n            pWaveform->time += pWaveform->advance;\n\n            for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) {\n                pFramesOutF32[iFrame*pWaveform->config.channels + iChannel] = s;\n            }\n        }\n    } else if (pWaveform->config.format == ma_format_s16) {\n        ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut;\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            ma_int16 s = ma_waveform_square_s16(pWaveform->time, dutyCycle, pWaveform->config.amplitude);\n            pWaveform->time += pWaveform->advance;\n\n            for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) {\n                pFramesOutS16[iFrame*pWaveform->config.channels + iChannel] = s;\n            }\n        }\n    } else {\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            float s = ma_waveform_square_f32(pWaveform->time, dutyCycle, pWaveform->config.amplitude);\n            pWaveform->time += pWaveform->advance;\n\n            for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) {\n                ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pWaveform->config.format, &s, ma_format_f32, 1, ma_dither_mode_none);\n            }\n        }\n    }\n}\n\nstatic void ma_waveform_read_pcm_frames__triangle(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount)\n{\n    ma_uint64 iFrame;\n    ma_uint64 iChannel;\n    ma_uint32 bps = ma_get_bytes_per_sample(pWaveform->config.format);\n    ma_uint32 bpf = bps * pWaveform->config.channels;\n\n    MA_ASSERT(pWaveform  != NULL);\n    MA_ASSERT(pFramesOut != NULL);\n\n    if (pWaveform->config.format == ma_format_f32) {\n        float* pFramesOutF32 = (float*)pFramesOut;\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            float s = ma_waveform_triangle_f32(pWaveform->time, pWaveform->config.amplitude);\n            pWaveform->time += pWaveform->advance;\n\n            for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) {\n                pFramesOutF32[iFrame*pWaveform->config.channels + iChannel] = s;\n            }\n        }\n    } else if (pWaveform->config.format == ma_format_s16) {\n        ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut;\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            ma_int16 s = ma_waveform_triangle_s16(pWaveform->time, pWaveform->config.amplitude);\n            pWaveform->time += pWaveform->advance;\n\n            for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) {\n                pFramesOutS16[iFrame*pWaveform->config.channels + iChannel] = s;\n            }\n        }\n    } else {\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            float s = ma_waveform_triangle_f32(pWaveform->time, pWaveform->config.amplitude);\n            pWaveform->time += pWaveform->advance;\n\n            for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) {\n                ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pWaveform->config.format, &s, ma_format_f32, 1, ma_dither_mode_none);\n            }\n        }\n    }\n}\n\nstatic void ma_waveform_read_pcm_frames__sawtooth(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount)\n{\n    ma_uint64 iFrame;\n    ma_uint64 iChannel;\n    ma_uint32 bps = ma_get_bytes_per_sample(pWaveform->config.format);\n    ma_uint32 bpf = bps * pWaveform->config.channels;\n\n    MA_ASSERT(pWaveform  != NULL);\n    MA_ASSERT(pFramesOut != NULL);\n\n    if (pWaveform->config.format == ma_format_f32) {\n        float* pFramesOutF32 = (float*)pFramesOut;\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            float s = ma_waveform_sawtooth_f32(pWaveform->time, pWaveform->config.amplitude);\n            pWaveform->time += pWaveform->advance;\n\n            for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) {\n                pFramesOutF32[iFrame*pWaveform->config.channels + iChannel] = s;\n            }\n        }\n    } else if (pWaveform->config.format == ma_format_s16) {\n        ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut;\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            ma_int16 s = ma_waveform_sawtooth_s16(pWaveform->time, pWaveform->config.amplitude);\n            pWaveform->time += pWaveform->advance;\n\n            for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) {\n                pFramesOutS16[iFrame*pWaveform->config.channels + iChannel] = s;\n            }\n        }\n    } else {\n        for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n            float s = ma_waveform_sawtooth_f32(pWaveform->time, pWaveform->config.amplitude);\n            pWaveform->time += pWaveform->advance;\n\n            for (iChannel = 0; iChannel < pWaveform->config.channels; iChannel += 1) {\n                ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pWaveform->config.format, &s, ma_format_f32, 1, ma_dither_mode_none);\n            }\n        }\n    }\n}\n\nMA_API ma_result ma_waveform_read_pcm_frames(ma_waveform* pWaveform, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    if (frameCount == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pFramesOut != NULL) {\n        switch (pWaveform->config.type)\n        {\n            case ma_waveform_type_sine:\n            {\n                ma_waveform_read_pcm_frames__sine(pWaveform, pFramesOut, frameCount);\n            } break;\n\n            case ma_waveform_type_square:\n            {\n                ma_waveform_read_pcm_frames__square(pWaveform, 0.5, pFramesOut, frameCount);\n            } break;\n\n            case ma_waveform_type_triangle:\n            {\n                ma_waveform_read_pcm_frames__triangle(pWaveform, pFramesOut, frameCount);\n            } break;\n\n            case ma_waveform_type_sawtooth:\n            {\n                ma_waveform_read_pcm_frames__sawtooth(pWaveform, pFramesOut, frameCount);\n            } break;\n\n            default: return MA_INVALID_OPERATION;   /* Unknown waveform type. */\n        }\n    } else {\n        pWaveform->time += pWaveform->advance * (ma_int64)frameCount; /* Cast to int64 required for VC6. Won't affect anything in practice. */\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = frameCount;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_waveform_seek_to_pcm_frame(ma_waveform* pWaveform, ma_uint64 frameIndex)\n{\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pWaveform->time = pWaveform->advance * (ma_int64)frameIndex;    /* Casting for VC6. Won't be an issue in practice. */\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_pulsewave_config ma_pulsewave_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double dutyCycle, double amplitude, double frequency)\n{\n    ma_pulsewave_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.format     = format;\n    config.channels   = channels;\n    config.sampleRate = sampleRate;\n    config.dutyCycle  = dutyCycle;\n    config.amplitude  = amplitude;\n    config.frequency  = frequency;\n\n    return config;\n}\n\nMA_API ma_result ma_pulsewave_init(const ma_pulsewave_config* pConfig, ma_pulsewave* pWaveform)\n{\n    ma_result result;\n    ma_waveform_config config;\n\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pWaveform);\n\n    config = ma_waveform_config_init(\n        pConfig->format,\n        pConfig->channels,\n        pConfig->sampleRate,\n        ma_waveform_type_square,\n        pConfig->amplitude,\n        pConfig->frequency\n    );\n\n    result = ma_waveform_init(&config, &pWaveform->waveform);\n    ma_pulsewave_set_duty_cycle(pWaveform, pConfig->dutyCycle);\n\n    return result;\n}\n\nMA_API void ma_pulsewave_uninit(ma_pulsewave* pWaveform)\n{\n    if (pWaveform == NULL) {\n        return;\n    }\n\n    ma_waveform_uninit(&pWaveform->waveform);\n}\n\nMA_API ma_result ma_pulsewave_read_pcm_frames(ma_pulsewave* pWaveform, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    if (frameCount == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pFramesOut != NULL) {\n        ma_waveform_read_pcm_frames__square(&pWaveform->waveform, pWaveform->config.dutyCycle, pFramesOut, frameCount);\n    } else {\n        pWaveform->waveform.time += pWaveform->waveform.advance * (ma_int64)frameCount; /* Cast to int64 required for VC6. Won't affect anything in practice. */\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = frameCount;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_pulsewave_seek_to_pcm_frame(ma_pulsewave* pWaveform, ma_uint64 frameIndex)\n{\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_waveform_seek_to_pcm_frame(&pWaveform->waveform, frameIndex);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_pulsewave_set_amplitude(ma_pulsewave* pWaveform, double amplitude)\n{\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pWaveform->config.amplitude = amplitude;\n    ma_waveform_set_amplitude(&pWaveform->waveform, amplitude);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_pulsewave_set_frequency(ma_pulsewave* pWaveform, double frequency)\n{\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pWaveform->config.frequency = frequency;\n    ma_waveform_set_frequency(&pWaveform->waveform, frequency);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_pulsewave_set_sample_rate(ma_pulsewave* pWaveform, ma_uint32 sampleRate)\n{\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pWaveform->config.sampleRate = sampleRate;\n    ma_waveform_set_sample_rate(&pWaveform->waveform, sampleRate);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_pulsewave_set_duty_cycle(ma_pulsewave* pWaveform, double dutyCycle)\n{\n    if (pWaveform == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pWaveform->config.dutyCycle = dutyCycle;\n\n    return MA_SUCCESS;\n}\n\n\n\nMA_API ma_noise_config ma_noise_config_init(ma_format format, ma_uint32 channels, ma_noise_type type, ma_int32 seed, double amplitude)\n{\n    ma_noise_config config;\n    MA_ZERO_OBJECT(&config);\n\n    config.format    = format;\n    config.channels  = channels;\n    config.type      = type;\n    config.seed      = seed;\n    config.amplitude = amplitude;\n\n    if (config.seed == 0) {\n        config.seed = MA_DEFAULT_LCG_SEED;\n    }\n\n    return config;\n}\n\n\nstatic ma_result ma_noise__data_source_on_read(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    return ma_noise_read_pcm_frames((ma_noise*)pDataSource, pFramesOut, frameCount, pFramesRead);\n}\n\nstatic ma_result ma_noise__data_source_on_seek(ma_data_source* pDataSource, ma_uint64 frameIndex)\n{\n    /* No-op. Just pretend to be successful. */\n    (void)pDataSource;\n    (void)frameIndex;\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_noise__data_source_on_get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    ma_noise* pNoise = (ma_noise*)pDataSource;\n\n    *pFormat     = pNoise->config.format;\n    *pChannels   = pNoise->config.channels;\n    *pSampleRate = 0;   /* There is no notion of sample rate with noise generation. */\n    ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pNoise->config.channels);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_data_source_vtable g_ma_noise_data_source_vtable =\n{\n    ma_noise__data_source_on_read,\n    ma_noise__data_source_on_seek,  /* No-op for noise. */\n    ma_noise__data_source_on_get_data_format,\n    NULL,   /* onGetCursor. No notion of a cursor for noise. */\n    NULL,   /* onGetLength. No notion of a length for noise. */\n    NULL,   /* onSetLooping */\n    0\n};\n\n\n#ifndef MA_PINK_NOISE_BIN_SIZE\n#define MA_PINK_NOISE_BIN_SIZE 16\n#endif\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    struct\n    {\n        size_t binOffset;\n        size_t accumulationOffset;\n        size_t counterOffset;\n    } pink;\n    struct\n    {\n        size_t accumulationOffset;\n    } brownian;\n} ma_noise_heap_layout;\n\nstatic ma_result ma_noise_get_heap_layout(const ma_noise_config* pConfig, ma_noise_heap_layout* pHeapLayout)\n{\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->channels == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* Pink. */\n    if (pConfig->type == ma_noise_type_pink) {\n        /* bin */\n        pHeapLayout->pink.binOffset = pHeapLayout->sizeInBytes;\n        pHeapLayout->sizeInBytes += sizeof(double*) * pConfig->channels;\n        pHeapLayout->sizeInBytes += sizeof(double ) * pConfig->channels * MA_PINK_NOISE_BIN_SIZE;\n\n        /* accumulation */\n        pHeapLayout->pink.accumulationOffset = pHeapLayout->sizeInBytes;\n        pHeapLayout->sizeInBytes += sizeof(double) * pConfig->channels;\n\n        /* counter */\n        pHeapLayout->pink.counterOffset = pHeapLayout->sizeInBytes;\n        pHeapLayout->sizeInBytes += sizeof(ma_uint32) * pConfig->channels;\n    }\n\n    /* Brownian. */\n    if (pConfig->type == ma_noise_type_brownian) {\n        /* accumulation */\n        pHeapLayout->brownian.accumulationOffset = pHeapLayout->sizeInBytes;\n        pHeapLayout->sizeInBytes += sizeof(double) * pConfig->channels;\n    }\n\n    /* Make sure allocation size is aligned. */\n    pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_noise_get_heap_size(const ma_noise_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_noise_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_noise_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_noise_init_preallocated(const ma_noise_config* pConfig, void* pHeap, ma_noise* pNoise)\n{\n    ma_result result;\n    ma_noise_heap_layout heapLayout;\n    ma_data_source_config dataSourceConfig;\n    ma_uint32 iChannel;\n\n    if (pNoise == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pNoise);\n\n    result = ma_noise_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pNoise->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pNoise->_pHeap, heapLayout.sizeInBytes);\n\n    dataSourceConfig = ma_data_source_config_init();\n    dataSourceConfig.vtable = &g_ma_noise_data_source_vtable;\n\n    result = ma_data_source_init(&dataSourceConfig, &pNoise->ds);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pNoise->config = *pConfig;\n    ma_lcg_seed(&pNoise->lcg, pConfig->seed);\n\n    if (pNoise->config.type == ma_noise_type_pink) {\n        pNoise->state.pink.bin          = (double**  )ma_offset_ptr(pHeap, heapLayout.pink.binOffset);\n        pNoise->state.pink.accumulation = (double*   )ma_offset_ptr(pHeap, heapLayout.pink.accumulationOffset);\n        pNoise->state.pink.counter      = (ma_uint32*)ma_offset_ptr(pHeap, heapLayout.pink.counterOffset);\n\n        for (iChannel = 0; iChannel < pConfig->channels; iChannel += 1) {\n            pNoise->state.pink.bin[iChannel]          = (double*)ma_offset_ptr(pHeap, heapLayout.pink.binOffset + (sizeof(double*) * pConfig->channels) + (sizeof(double) * MA_PINK_NOISE_BIN_SIZE * iChannel));\n            pNoise->state.pink.accumulation[iChannel] = 0;\n            pNoise->state.pink.counter[iChannel]      = 1;\n        }\n    }\n\n    if (pNoise->config.type == ma_noise_type_brownian) {\n        pNoise->state.brownian.accumulation = (double*)ma_offset_ptr(pHeap, heapLayout.brownian.accumulationOffset);\n\n        for (iChannel = 0; iChannel < pConfig->channels; iChannel += 1) {\n            pNoise->state.brownian.accumulation[iChannel] = 0;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_noise_init(const ma_noise_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_noise* pNoise)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_noise_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_noise_init_preallocated(pConfig, pHeap, pNoise);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pNoise->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_noise_uninit(ma_noise* pNoise, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pNoise == NULL) {\n        return;\n    }\n\n    ma_data_source_uninit(&pNoise->ds);\n\n    if (pNoise->_ownsHeap) {\n        ma_free(pNoise->_pHeap, pAllocationCallbacks);\n    }\n}\n\nMA_API ma_result ma_noise_set_amplitude(ma_noise* pNoise, double amplitude)\n{\n    if (pNoise == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pNoise->config.amplitude = amplitude;\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_noise_set_seed(ma_noise* pNoise, ma_int32 seed)\n{\n    if (pNoise == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pNoise->lcg.state = seed;\n    return MA_SUCCESS;\n}\n\n\nMA_API ma_result ma_noise_set_type(ma_noise* pNoise, ma_noise_type type)\n{\n    if (pNoise == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /*\n    This function should never have been implemented in the first place. Changing the type dynamically is not\n    supported. Instead you need to uninitialize and reinitiailize a fresh `ma_noise` object. This function\n    will be removed in version 0.12.\n    */\n    MA_ASSERT(MA_FALSE);\n    (void)type;\n\n    return MA_INVALID_OPERATION;\n}\n\nstatic MA_INLINE float ma_noise_f32_white(ma_noise* pNoise)\n{\n    return (float)(ma_lcg_rand_f64(&pNoise->lcg) * pNoise->config.amplitude);\n}\n\nstatic MA_INLINE ma_int16 ma_noise_s16_white(ma_noise* pNoise)\n{\n    return ma_pcm_sample_f32_to_s16(ma_noise_f32_white(pNoise));\n}\n\nstatic MA_INLINE ma_uint64 ma_noise_read_pcm_frames__white(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount)\n{\n    ma_uint64 iFrame;\n    ma_uint32 iChannel;\n    const ma_uint32 channels = pNoise->config.channels;\n    MA_ASSUME(channels > 0);\n\n    if (pNoise->config.format == ma_format_f32) {\n        float* pFramesOutF32 = (float*)pFramesOut;\n        if (pNoise->config.duplicateChannels) {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                float s = ma_noise_f32_white(pNoise);\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    pFramesOutF32[iFrame*channels + iChannel] = s;\n                }\n            }\n        } else {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    pFramesOutF32[iFrame*channels + iChannel] = ma_noise_f32_white(pNoise);\n                }\n            }\n        }\n    } else if (pNoise->config.format == ma_format_s16) {\n        ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut;\n        if (pNoise->config.duplicateChannels) {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                ma_int16 s = ma_noise_s16_white(pNoise);\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    pFramesOutS16[iFrame*channels + iChannel] = s;\n                }\n            }\n        } else {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    pFramesOutS16[iFrame*channels + iChannel] = ma_noise_s16_white(pNoise);\n                }\n            }\n        }\n    } else {\n        const ma_uint32 bps = ma_get_bytes_per_sample(pNoise->config.format);\n        const ma_uint32 bpf = bps * channels;\n\n        if (pNoise->config.duplicateChannels) {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                float s = ma_noise_f32_white(pNoise);\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none);\n                }\n            }\n        } else {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    float s = ma_noise_f32_white(pNoise);\n                    ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none);\n                }\n            }\n        }\n    }\n\n    return frameCount;\n}\n\n\nstatic MA_INLINE unsigned int ma_tzcnt32(unsigned int x)\n{\n    unsigned int n;\n\n    /* Special case for odd numbers since they should happen about half the time. */\n    if (x & 0x1)  {\n        return 0;\n    }\n\n    if (x == 0) {\n        return sizeof(x) << 3;\n    }\n\n    n = 1;\n    if ((x & 0x0000FFFF) == 0) { x >>= 16; n += 16; }\n    if ((x & 0x000000FF) == 0) { x >>=  8; n +=  8; }\n    if ((x & 0x0000000F) == 0) { x >>=  4; n +=  4; }\n    if ((x & 0x00000003) == 0) { x >>=  2; n +=  2; }\n    n -= x & 0x00000001;\n\n    return n;\n}\n\n/*\nPink noise generation based on Tonic (public domain) with modifications. https://github.com/TonicAudio/Tonic/blob/master/src/Tonic/Noise.h\n\nThis is basically _the_ reference for pink noise from what I've found: http://www.firstpr.com.au/dsp/pink-noise/\n*/\nstatic MA_INLINE float ma_noise_f32_pink(ma_noise* pNoise, ma_uint32 iChannel)\n{\n    double result;\n    double binPrev;\n    double binNext;\n    unsigned int ibin;\n\n    ibin = ma_tzcnt32(pNoise->state.pink.counter[iChannel]) & (MA_PINK_NOISE_BIN_SIZE - 1);\n\n    binPrev = pNoise->state.pink.bin[iChannel][ibin];\n    binNext = ma_lcg_rand_f64(&pNoise->lcg);\n    pNoise->state.pink.bin[iChannel][ibin] = binNext;\n\n    pNoise->state.pink.accumulation[iChannel] += (binNext - binPrev);\n    pNoise->state.pink.counter[iChannel]      += 1;\n\n    result = (ma_lcg_rand_f64(&pNoise->lcg) + pNoise->state.pink.accumulation[iChannel]);\n    result /= 10;\n\n    return (float)(result * pNoise->config.amplitude);\n}\n\nstatic MA_INLINE ma_int16 ma_noise_s16_pink(ma_noise* pNoise, ma_uint32 iChannel)\n{\n    return ma_pcm_sample_f32_to_s16(ma_noise_f32_pink(pNoise, iChannel));\n}\n\nstatic MA_INLINE ma_uint64 ma_noise_read_pcm_frames__pink(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount)\n{\n    ma_uint64 iFrame;\n    ma_uint32 iChannel;\n    const ma_uint32 channels = pNoise->config.channels;\n    MA_ASSUME(channels > 0);\n\n    if (pNoise->config.format == ma_format_f32) {\n        float* pFramesOutF32 = (float*)pFramesOut;\n        if (pNoise->config.duplicateChannels) {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                float s = ma_noise_f32_pink(pNoise, 0);\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    pFramesOutF32[iFrame*channels + iChannel] = s;\n                }\n            }\n        } else {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    pFramesOutF32[iFrame*channels + iChannel] = ma_noise_f32_pink(pNoise, iChannel);\n                }\n            }\n        }\n    } else if (pNoise->config.format == ma_format_s16) {\n        ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut;\n        if (pNoise->config.duplicateChannels) {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                ma_int16 s = ma_noise_s16_pink(pNoise, 0);\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    pFramesOutS16[iFrame*channels + iChannel] = s;\n                }\n            }\n        } else {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    pFramesOutS16[iFrame*channels + iChannel] = ma_noise_s16_pink(pNoise, iChannel);\n                }\n            }\n        }\n    } else {\n        const ma_uint32 bps = ma_get_bytes_per_sample(pNoise->config.format);\n        const ma_uint32 bpf = bps * channels;\n\n        if (pNoise->config.duplicateChannels) {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                float s = ma_noise_f32_pink(pNoise, 0);\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none);\n                }\n            }\n        } else {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    float s = ma_noise_f32_pink(pNoise, iChannel);\n                    ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none);\n                }\n            }\n        }\n    }\n\n    return frameCount;\n}\n\n\nstatic MA_INLINE float ma_noise_f32_brownian(ma_noise* pNoise, ma_uint32 iChannel)\n{\n    double result;\n\n    result = (ma_lcg_rand_f64(&pNoise->lcg) + pNoise->state.brownian.accumulation[iChannel]);\n    result /= 1.005; /* Don't escape the -1..1 range on average. */\n\n    pNoise->state.brownian.accumulation[iChannel] = result;\n    result /= 20;\n\n    return (float)(result * pNoise->config.amplitude);\n}\n\nstatic MA_INLINE ma_int16 ma_noise_s16_brownian(ma_noise* pNoise, ma_uint32 iChannel)\n{\n    return ma_pcm_sample_f32_to_s16(ma_noise_f32_brownian(pNoise, iChannel));\n}\n\nstatic MA_INLINE ma_uint64 ma_noise_read_pcm_frames__brownian(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount)\n{\n    ma_uint64 iFrame;\n    ma_uint32 iChannel;\n    const ma_uint32 channels = pNoise->config.channels;\n    MA_ASSUME(channels > 0);\n\n    if (pNoise->config.format == ma_format_f32) {\n        float* pFramesOutF32 = (float*)pFramesOut;\n        if (pNoise->config.duplicateChannels) {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                float s = ma_noise_f32_brownian(pNoise, 0);\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    pFramesOutF32[iFrame*channels + iChannel] = s;\n                }\n            }\n        } else {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    pFramesOutF32[iFrame*channels + iChannel] = ma_noise_f32_brownian(pNoise, iChannel);\n                }\n            }\n        }\n    } else if (pNoise->config.format == ma_format_s16) {\n        ma_int16* pFramesOutS16 = (ma_int16*)pFramesOut;\n        if (pNoise->config.duplicateChannels) {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                ma_int16 s = ma_noise_s16_brownian(pNoise, 0);\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    pFramesOutS16[iFrame*channels + iChannel] = s;\n                }\n            }\n        } else {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    pFramesOutS16[iFrame*channels + iChannel] = ma_noise_s16_brownian(pNoise, iChannel);\n                }\n            }\n        }\n    } else {\n        const ma_uint32 bps = ma_get_bytes_per_sample(pNoise->config.format);\n        const ma_uint32 bpf = bps * channels;\n\n        if (pNoise->config.duplicateChannels) {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                float s = ma_noise_f32_brownian(pNoise, 0);\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none);\n                }\n            }\n        } else {\n            for (iFrame = 0; iFrame < frameCount; iFrame += 1) {\n                for (iChannel = 0; iChannel < channels; iChannel += 1) {\n                    float s = ma_noise_f32_brownian(pNoise, iChannel);\n                    ma_pcm_convert(ma_offset_ptr(pFramesOut, iFrame*bpf + iChannel*bps), pNoise->config.format, &s, ma_format_f32, 1, ma_dither_mode_none);\n                }\n            }\n        }\n    }\n\n    return frameCount;\n}\n\nMA_API ma_result ma_noise_read_pcm_frames(ma_noise* pNoise, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    ma_uint64 framesRead = 0;\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    if (frameCount == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pNoise == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The output buffer is allowed to be NULL. Since we aren't tracking cursors or anything we can just do nothing and pretend to be successful. */\n    if (pFramesOut == NULL) {\n        framesRead = frameCount;\n    } else {\n        switch (pNoise->config.type) {\n            case ma_noise_type_white:    framesRead = ma_noise_read_pcm_frames__white   (pNoise, pFramesOut, frameCount); break;\n            case ma_noise_type_pink:     framesRead = ma_noise_read_pcm_frames__pink    (pNoise, pFramesOut, frameCount); break;\n            case ma_noise_type_brownian: framesRead = ma_noise_read_pcm_frames__brownian(pNoise, pFramesOut, frameCount); break;\n            default: return MA_INVALID_OPERATION;   /* Unknown noise type. */\n        }\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = framesRead;\n    }\n\n    return MA_SUCCESS;\n}\n#endif /* MA_NO_GENERATION */\n\n\n\n#ifndef MA_NO_RESOURCE_MANAGER\n#ifndef MA_RESOURCE_MANAGER_PAGE_SIZE_IN_MILLISECONDS\n#define MA_RESOURCE_MANAGER_PAGE_SIZE_IN_MILLISECONDS   1000\n#endif\n\n#ifndef MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_CAPACITY\n#define MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_CAPACITY          1024\n#endif\n\nMA_API ma_resource_manager_pipeline_notifications ma_resource_manager_pipeline_notifications_init(void)\n{\n    ma_resource_manager_pipeline_notifications notifications;\n\n    MA_ZERO_OBJECT(&notifications);\n\n    return notifications;\n}\n\nstatic void ma_resource_manager_pipeline_notifications_signal_all_notifications(const ma_resource_manager_pipeline_notifications* pPipelineNotifications)\n{\n    if (pPipelineNotifications == NULL) {\n        return;\n    }\n\n    if (pPipelineNotifications->init.pNotification) { ma_async_notification_signal(pPipelineNotifications->init.pNotification); }\n    if (pPipelineNotifications->done.pNotification) { ma_async_notification_signal(pPipelineNotifications->done.pNotification); }\n}\n\nstatic void ma_resource_manager_pipeline_notifications_acquire_all_fences(const ma_resource_manager_pipeline_notifications* pPipelineNotifications)\n{\n    if (pPipelineNotifications == NULL) {\n        return;\n    }\n\n    if (pPipelineNotifications->init.pFence != NULL) { ma_fence_acquire(pPipelineNotifications->init.pFence); }\n    if (pPipelineNotifications->done.pFence != NULL) { ma_fence_acquire(pPipelineNotifications->done.pFence); }\n}\n\nstatic void ma_resource_manager_pipeline_notifications_release_all_fences(const ma_resource_manager_pipeline_notifications* pPipelineNotifications)\n{\n    if (pPipelineNotifications == NULL) {\n        return;\n    }\n\n    if (pPipelineNotifications->init.pFence != NULL) { ma_fence_release(pPipelineNotifications->init.pFence); }\n    if (pPipelineNotifications->done.pFence != NULL) { ma_fence_release(pPipelineNotifications->done.pFence); }\n}\n\n\n\n#ifndef MA_DEFAULT_HASH_SEED\n#define MA_DEFAULT_HASH_SEED    42\n#endif\n\n/* MurmurHash3. Based on code from https://github.com/PeterScott/murmur3/blob/master/murmur3.c (public domain). */\n#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))\n    #pragma GCC diagnostic push\n    #if __GNUC__ >= 7\n    #pragma GCC diagnostic ignored \"-Wimplicit-fallthrough\"\n    #endif\n#endif\n\nstatic MA_INLINE ma_uint32 ma_rotl32(ma_uint32 x, ma_int8 r)\n{\n    return (x << r) | (x >> (32 - r));\n}\n\nstatic MA_INLINE ma_uint32 ma_hash_getblock(const ma_uint32* blocks, int i)\n{\n    ma_uint32 block;\n\n    /* Try silencing a sanitization warning about unaligned access by doing a memcpy() instead of assignment. */\n    MA_COPY_MEMORY(&block, ma_offset_ptr(blocks, i * sizeof(block)), sizeof(block));\n\n    if (ma_is_little_endian()) {\n        return block;\n    } else {\n        return ma_swap_endian_uint32(block);\n    }\n}\n\nstatic MA_INLINE ma_uint32 ma_hash_fmix32(ma_uint32 h)\n{\n    h ^= h >> 16;\n    h *= 0x85ebca6b;\n    h ^= h >> 13;\n    h *= 0xc2b2ae35;\n    h ^= h >> 16;\n\n    return h;\n}\n\nstatic ma_uint32 ma_hash_32(const void* key, int len, ma_uint32 seed)\n{\n    const ma_uint8* data = (const ma_uint8*)key;\n    const ma_uint32* blocks;\n    const ma_uint8* tail;\n    const int nblocks = len / 4;\n    ma_uint32 h1 = seed;\n    ma_uint32 c1 = 0xcc9e2d51;\n    ma_uint32 c2 = 0x1b873593;\n    ma_uint32 k1;\n    int i;\n\n    blocks = (const ma_uint32 *)(data + nblocks*4);\n\n    for(i = -nblocks; i; i++) {\n        k1 = ma_hash_getblock(blocks,i);\n\n        k1 *= c1;\n        k1 = ma_rotl32(k1, 15);\n        k1 *= c2;\n\n        h1 ^= k1;\n        h1 = ma_rotl32(h1, 13);\n        h1 = h1*5 + 0xe6546b64;\n    }\n\n\n    tail = (const ma_uint8*)(data + nblocks*4);\n\n    k1 = 0;\n    switch(len & 3) {\n        case 3: k1 ^= tail[2] << 16;\n        case 2: k1 ^= tail[1] << 8;\n        case 1: k1 ^= tail[0];\n                k1 *= c1; k1 = ma_rotl32(k1, 15); k1 *= c2; h1 ^= k1;\n    };\n\n\n    h1 ^= len;\n    h1  = ma_hash_fmix32(h1);\n\n    return h1;\n}\n\n#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))\n    #pragma GCC diagnostic push\n#endif\n/* End MurmurHash3 */\n\nstatic ma_uint32 ma_hash_string_32(const char* str)\n{\n    return ma_hash_32(str, (int)strlen(str), MA_DEFAULT_HASH_SEED);\n}\n\nstatic ma_uint32 ma_hash_string_w_32(const wchar_t* str)\n{\n    return ma_hash_32(str, (int)wcslen(str) * sizeof(*str), MA_DEFAULT_HASH_SEED);\n}\n\n\n\n\n/*\nBasic BST Functions\n*/\nstatic ma_result ma_resource_manager_data_buffer_node_search(ma_resource_manager* pResourceManager, ma_uint32 hashedName32, ma_resource_manager_data_buffer_node** ppDataBufferNode)\n{\n    ma_resource_manager_data_buffer_node* pCurrentNode;\n\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(ppDataBufferNode != NULL);\n\n    pCurrentNode = pResourceManager->pRootDataBufferNode;\n    while (pCurrentNode != NULL) {\n        if (hashedName32 == pCurrentNode->hashedName32) {\n            break;  /* Found. */\n        } else if (hashedName32 < pCurrentNode->hashedName32) {\n            pCurrentNode = pCurrentNode->pChildLo;\n        } else {\n            pCurrentNode = pCurrentNode->pChildHi;\n        }\n    }\n\n    *ppDataBufferNode = pCurrentNode;\n\n    if (pCurrentNode == NULL) {\n        return MA_DOES_NOT_EXIST;\n    } else {\n        return MA_SUCCESS;\n    }\n}\n\nstatic ma_result ma_resource_manager_data_buffer_node_insert_point(ma_resource_manager* pResourceManager, ma_uint32 hashedName32, ma_resource_manager_data_buffer_node** ppInsertPoint)\n{\n    ma_result result = MA_SUCCESS;\n    ma_resource_manager_data_buffer_node* pCurrentNode;\n\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(ppInsertPoint    != NULL);\n\n    *ppInsertPoint = NULL;\n\n    if (pResourceManager->pRootDataBufferNode == NULL) {\n        return MA_SUCCESS;  /* No items. */\n    }\n\n    /* We need to find the node that will become the parent of the new node. If a node is found that already has the same hashed name we need to return MA_ALREADY_EXISTS. */\n    pCurrentNode = pResourceManager->pRootDataBufferNode;\n    while (pCurrentNode != NULL) {\n        if (hashedName32 == pCurrentNode->hashedName32) {\n            result = MA_ALREADY_EXISTS;\n            break;\n        } else {\n            if (hashedName32 < pCurrentNode->hashedName32) {\n                if (pCurrentNode->pChildLo == NULL) {\n                    result = MA_SUCCESS;\n                    break;\n                } else {\n                    pCurrentNode = pCurrentNode->pChildLo;\n                }\n            } else {\n                if (pCurrentNode->pChildHi == NULL) {\n                    result = MA_SUCCESS;\n                    break;\n                } else {\n                    pCurrentNode = pCurrentNode->pChildHi;\n                }\n            }\n        }\n    }\n\n    *ppInsertPoint = pCurrentNode;\n    return result;\n}\n\nstatic ma_result ma_resource_manager_data_buffer_node_insert_at(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, ma_resource_manager_data_buffer_node* pInsertPoint)\n{\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(pDataBufferNode  != NULL);\n\n    /* The key must have been set before calling this function. */\n    MA_ASSERT(pDataBufferNode->hashedName32 != 0);\n\n    if (pInsertPoint == NULL) {\n        /* It's the first node. */\n        pResourceManager->pRootDataBufferNode = pDataBufferNode;\n    } else {\n        /* It's not the first node. It needs to be inserted. */\n        if (pDataBufferNode->hashedName32 < pInsertPoint->hashedName32) {\n            MA_ASSERT(pInsertPoint->pChildLo == NULL);\n            pInsertPoint->pChildLo = pDataBufferNode;\n        } else {\n            MA_ASSERT(pInsertPoint->pChildHi == NULL);\n            pInsertPoint->pChildHi = pDataBufferNode;\n        }\n    }\n\n    pDataBufferNode->pParent = pInsertPoint;\n\n    return MA_SUCCESS;\n}\n\n#if 0   /* Unused for now. */\nstatic ma_result ma_resource_manager_data_buffer_node_insert(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode)\n{\n    ma_result result;\n    ma_resource_manager_data_buffer_node* pInsertPoint;\n\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(pDataBufferNode  != NULL);\n\n    result = ma_resource_manager_data_buffer_node_insert_point(pResourceManager, pDataBufferNode->hashedName32, &pInsertPoint);\n    if (result != MA_SUCCESS) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_resource_manager_data_buffer_node_insert_at(pResourceManager, pDataBufferNode, pInsertPoint);\n}\n#endif\n\nstatic MA_INLINE ma_resource_manager_data_buffer_node* ma_resource_manager_data_buffer_node_find_min(ma_resource_manager_data_buffer_node* pDataBufferNode)\n{\n    ma_resource_manager_data_buffer_node* pCurrentNode;\n\n    MA_ASSERT(pDataBufferNode != NULL);\n\n    pCurrentNode = pDataBufferNode;\n    while (pCurrentNode->pChildLo != NULL) {\n        pCurrentNode = pCurrentNode->pChildLo;\n    }\n\n    return pCurrentNode;\n}\n\nstatic MA_INLINE ma_resource_manager_data_buffer_node* ma_resource_manager_data_buffer_node_find_max(ma_resource_manager_data_buffer_node* pDataBufferNode)\n{\n    ma_resource_manager_data_buffer_node* pCurrentNode;\n\n    MA_ASSERT(pDataBufferNode != NULL);\n\n    pCurrentNode = pDataBufferNode;\n    while (pCurrentNode->pChildHi != NULL) {\n        pCurrentNode = pCurrentNode->pChildHi;\n    }\n\n    return pCurrentNode;\n}\n\nstatic MA_INLINE ma_resource_manager_data_buffer_node* ma_resource_manager_data_buffer_node_find_inorder_successor(ma_resource_manager_data_buffer_node* pDataBufferNode)\n{\n    MA_ASSERT(pDataBufferNode           != NULL);\n    MA_ASSERT(pDataBufferNode->pChildHi != NULL);\n\n    return ma_resource_manager_data_buffer_node_find_min(pDataBufferNode->pChildHi);\n}\n\nstatic MA_INLINE ma_resource_manager_data_buffer_node* ma_resource_manager_data_buffer_node_find_inorder_predecessor(ma_resource_manager_data_buffer_node* pDataBufferNode)\n{\n    MA_ASSERT(pDataBufferNode           != NULL);\n    MA_ASSERT(pDataBufferNode->pChildLo != NULL);\n\n    return ma_resource_manager_data_buffer_node_find_max(pDataBufferNode->pChildLo);\n}\n\nstatic ma_result ma_resource_manager_data_buffer_node_remove(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode)\n{\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(pDataBufferNode  != NULL);\n\n    if (pDataBufferNode->pChildLo == NULL) {\n        if (pDataBufferNode->pChildHi == NULL) {\n            /* Simple case - deleting a buffer with no children. */\n            if (pDataBufferNode->pParent == NULL) {\n                MA_ASSERT(pResourceManager->pRootDataBufferNode == pDataBufferNode);    /* There is only a single buffer in the tree which should be equal to the root node. */\n                pResourceManager->pRootDataBufferNode = NULL;\n            } else {\n                if (pDataBufferNode->pParent->pChildLo == pDataBufferNode) {\n                    pDataBufferNode->pParent->pChildLo = NULL;\n                } else {\n                    pDataBufferNode->pParent->pChildHi = NULL;\n                }\n            }\n        } else {\n            /* Node has one child - pChildHi != NULL. */\n            pDataBufferNode->pChildHi->pParent = pDataBufferNode->pParent;\n\n            if (pDataBufferNode->pParent == NULL) {\n                MA_ASSERT(pResourceManager->pRootDataBufferNode == pDataBufferNode);\n                pResourceManager->pRootDataBufferNode = pDataBufferNode->pChildHi;\n            } else {\n                if (pDataBufferNode->pParent->pChildLo == pDataBufferNode) {\n                    pDataBufferNode->pParent->pChildLo = pDataBufferNode->pChildHi;\n                } else {\n                    pDataBufferNode->pParent->pChildHi = pDataBufferNode->pChildHi;\n                }\n            }\n        }\n    } else {\n        if (pDataBufferNode->pChildHi == NULL) {\n            /* Node has one child - pChildLo != NULL. */\n            pDataBufferNode->pChildLo->pParent = pDataBufferNode->pParent;\n\n            if (pDataBufferNode->pParent == NULL) {\n                MA_ASSERT(pResourceManager->pRootDataBufferNode == pDataBufferNode);\n                pResourceManager->pRootDataBufferNode = pDataBufferNode->pChildLo;\n            } else {\n                if (pDataBufferNode->pParent->pChildLo == pDataBufferNode) {\n                    pDataBufferNode->pParent->pChildLo = pDataBufferNode->pChildLo;\n                } else {\n                    pDataBufferNode->pParent->pChildHi = pDataBufferNode->pChildLo;\n                }\n            }\n        } else {\n            /* Complex case - deleting a node with two children. */\n            ma_resource_manager_data_buffer_node* pReplacementDataBufferNode;\n\n            /* For now we are just going to use the in-order successor as the replacement, but we may want to try to keep this balanced by switching between the two. */\n            pReplacementDataBufferNode = ma_resource_manager_data_buffer_node_find_inorder_successor(pDataBufferNode);\n            MA_ASSERT(pReplacementDataBufferNode != NULL);\n\n            /*\n            Now that we have our replacement node we can make the change. The simple way to do this would be to just exchange the values, and then remove the replacement\n            node, however we track specific nodes via pointers which means we can't just swap out the values. We need to instead just change the pointers around. The\n            replacement node should have at most 1 child. Therefore, we can detach it in terms of our simpler cases above. What we're essentially doing is detaching the\n            replacement node and reinserting it into the same position as the deleted node.\n            */\n            MA_ASSERT(pReplacementDataBufferNode->pParent  != NULL);  /* The replacement node should never be the root which means it should always have a parent. */\n            MA_ASSERT(pReplacementDataBufferNode->pChildLo == NULL);  /* Because we used in-order successor. This would be pChildHi == NULL if we used in-order predecessor. */\n\n            if (pReplacementDataBufferNode->pChildHi == NULL) {\n                if (pReplacementDataBufferNode->pParent->pChildLo == pReplacementDataBufferNode) {\n                    pReplacementDataBufferNode->pParent->pChildLo = NULL;\n                } else {\n                    pReplacementDataBufferNode->pParent->pChildHi = NULL;\n                }\n            } else {\n                pReplacementDataBufferNode->pChildHi->pParent = pReplacementDataBufferNode->pParent;\n                if (pReplacementDataBufferNode->pParent->pChildLo == pReplacementDataBufferNode) {\n                    pReplacementDataBufferNode->pParent->pChildLo = pReplacementDataBufferNode->pChildHi;\n                } else {\n                    pReplacementDataBufferNode->pParent->pChildHi = pReplacementDataBufferNode->pChildHi;\n                }\n            }\n\n\n            /* The replacement node has essentially been detached from the binary tree, so now we need to replace the old data buffer with it. The first thing to update is the parent */\n            if (pDataBufferNode->pParent != NULL) {\n                if (pDataBufferNode->pParent->pChildLo == pDataBufferNode) {\n                    pDataBufferNode->pParent->pChildLo = pReplacementDataBufferNode;\n                } else {\n                    pDataBufferNode->pParent->pChildHi = pReplacementDataBufferNode;\n                }\n            }\n\n            /* Now need to update the replacement node's pointers. */\n            pReplacementDataBufferNode->pParent  = pDataBufferNode->pParent;\n            pReplacementDataBufferNode->pChildLo = pDataBufferNode->pChildLo;\n            pReplacementDataBufferNode->pChildHi = pDataBufferNode->pChildHi;\n\n            /* Now the children of the replacement node need to have their parent pointers updated. */\n            if (pReplacementDataBufferNode->pChildLo != NULL) {\n                pReplacementDataBufferNode->pChildLo->pParent = pReplacementDataBufferNode;\n            }\n            if (pReplacementDataBufferNode->pChildHi != NULL) {\n                pReplacementDataBufferNode->pChildHi->pParent = pReplacementDataBufferNode;\n            }\n\n            /* Now the root node needs to be updated. */\n            if (pResourceManager->pRootDataBufferNode == pDataBufferNode) {\n                pResourceManager->pRootDataBufferNode = pReplacementDataBufferNode;\n            }\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\n#if 0   /* Unused for now. */\nstatic ma_result ma_resource_manager_data_buffer_node_remove_by_key(ma_resource_manager* pResourceManager, ma_uint32 hashedName32)\n{\n    ma_result result;\n    ma_resource_manager_data_buffer_node* pDataBufferNode;\n\n    result = ma_resource_manager_data_buffer_search(pResourceManager, hashedName32, &pDataBufferNode);\n    if (result != MA_SUCCESS) {\n        return result;  /* Could not find the data buffer. */\n    }\n\n    return ma_resource_manager_data_buffer_remove(pResourceManager, pDataBufferNode);\n}\n#endif\n\nstatic ma_resource_manager_data_supply_type ma_resource_manager_data_buffer_node_get_data_supply_type(ma_resource_manager_data_buffer_node* pDataBufferNode)\n{\n    return (ma_resource_manager_data_supply_type)ma_atomic_load_i32(&pDataBufferNode->data.type);\n}\n\nstatic void ma_resource_manager_data_buffer_node_set_data_supply_type(ma_resource_manager_data_buffer_node* pDataBufferNode, ma_resource_manager_data_supply_type supplyType)\n{\n    ma_atomic_exchange_i32(&pDataBufferNode->data.type, supplyType);\n}\n\nstatic ma_result ma_resource_manager_data_buffer_node_increment_ref(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, ma_uint32* pNewRefCount)\n{\n    ma_uint32 refCount;\n\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(pDataBufferNode  != NULL);\n\n    (void)pResourceManager;\n\n    refCount = ma_atomic_fetch_add_32(&pDataBufferNode->refCount, 1) + 1;\n\n    if (pNewRefCount != NULL) {\n        *pNewRefCount = refCount;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_resource_manager_data_buffer_node_decrement_ref(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, ma_uint32* pNewRefCount)\n{\n    ma_uint32 refCount;\n\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(pDataBufferNode  != NULL);\n\n    (void)pResourceManager;\n\n    refCount = ma_atomic_fetch_sub_32(&pDataBufferNode->refCount, 1) - 1;\n\n    if (pNewRefCount != NULL) {\n        *pNewRefCount = refCount;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_resource_manager_data_buffer_node_free(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode)\n{\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(pDataBufferNode  != NULL);\n\n    if (pDataBufferNode->isDataOwnedByResourceManager) {\n        if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode) == ma_resource_manager_data_supply_type_encoded) {\n            ma_free((void*)pDataBufferNode->data.backend.encoded.pData, &pResourceManager->config.allocationCallbacks);\n            pDataBufferNode->data.backend.encoded.pData       = NULL;\n            pDataBufferNode->data.backend.encoded.sizeInBytes = 0;\n        } else if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode) == ma_resource_manager_data_supply_type_decoded) {\n            ma_free((void*)pDataBufferNode->data.backend.decoded.pData, &pResourceManager->config.allocationCallbacks);\n            pDataBufferNode->data.backend.decoded.pData           = NULL;\n            pDataBufferNode->data.backend.decoded.totalFrameCount = 0;\n        } else if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode) == ma_resource_manager_data_supply_type_decoded_paged) {\n            ma_paged_audio_buffer_data_uninit(&pDataBufferNode->data.backend.decodedPaged.data, &pResourceManager->config.allocationCallbacks);\n        } else {\n            /* Should never hit this if the node was successfully initialized. */\n            MA_ASSERT(pDataBufferNode->result != MA_SUCCESS);\n        }\n    }\n\n    /* The data buffer itself needs to be freed. */\n    ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks);\n}\n\nstatic ma_result ma_resource_manager_data_buffer_node_result(const ma_resource_manager_data_buffer_node* pDataBufferNode)\n{\n    MA_ASSERT(pDataBufferNode != NULL);\n\n    return (ma_result)ma_atomic_load_i32((ma_result*)&pDataBufferNode->result);    /* Need a naughty const-cast here. */\n}\n\n\nstatic ma_bool32 ma_resource_manager_is_threading_enabled(const ma_resource_manager* pResourceManager)\n{\n    MA_ASSERT(pResourceManager != NULL);\n\n    return (pResourceManager->config.flags & MA_RESOURCE_MANAGER_FLAG_NO_THREADING) == 0;\n}\n\n\ntypedef struct\n{\n    union\n    {\n        ma_async_notification_event e;\n        ma_async_notification_poll p;\n    } backend;  /* Must be the first member. */\n    ma_resource_manager* pResourceManager;\n} ma_resource_manager_inline_notification;\n\nstatic ma_result ma_resource_manager_inline_notification_init(ma_resource_manager* pResourceManager, ma_resource_manager_inline_notification* pNotification)\n{\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(pNotification    != NULL);\n\n    pNotification->pResourceManager = pResourceManager;\n\n    if (ma_resource_manager_is_threading_enabled(pResourceManager)) {\n        return ma_async_notification_event_init(&pNotification->backend.e);\n    } else {\n        return ma_async_notification_poll_init(&pNotification->backend.p);\n    }\n}\n\nstatic void ma_resource_manager_inline_notification_uninit(ma_resource_manager_inline_notification* pNotification)\n{\n    MA_ASSERT(pNotification != NULL);\n\n    if (ma_resource_manager_is_threading_enabled(pNotification->pResourceManager)) {\n        ma_async_notification_event_uninit(&pNotification->backend.e);\n    } else {\n        /* No need to uninitialize a polling notification. */\n    }\n}\n\nstatic void ma_resource_manager_inline_notification_wait(ma_resource_manager_inline_notification* pNotification)\n{\n    MA_ASSERT(pNotification != NULL);\n\n    if (ma_resource_manager_is_threading_enabled(pNotification->pResourceManager)) {\n        ma_async_notification_event_wait(&pNotification->backend.e);\n    } else {\n        while (ma_async_notification_poll_is_signalled(&pNotification->backend.p) == MA_FALSE) {\n            ma_result result = ma_resource_manager_process_next_job(pNotification->pResourceManager);\n            if (result == MA_NO_DATA_AVAILABLE || result == MA_CANCELLED) {\n                break;\n            }\n        }\n    }\n}\n\nstatic void ma_resource_manager_inline_notification_wait_and_uninit(ma_resource_manager_inline_notification* pNotification)\n{\n    ma_resource_manager_inline_notification_wait(pNotification);\n    ma_resource_manager_inline_notification_uninit(pNotification);\n}\n\n\nstatic void ma_resource_manager_data_buffer_bst_lock(ma_resource_manager* pResourceManager)\n{\n    MA_ASSERT(pResourceManager != NULL);\n\n    if (ma_resource_manager_is_threading_enabled(pResourceManager)) {\n        #ifndef MA_NO_THREADING\n        {\n            ma_mutex_lock(&pResourceManager->dataBufferBSTLock);\n        }\n        #else\n        {\n            MA_ASSERT(MA_FALSE);    /* Should never hit this. */\n        }\n        #endif\n    } else {\n        /* Threading not enabled. Do nothing. */\n    }\n}\n\nstatic void ma_resource_manager_data_buffer_bst_unlock(ma_resource_manager* pResourceManager)\n{\n    MA_ASSERT(pResourceManager != NULL);\n\n    if (ma_resource_manager_is_threading_enabled(pResourceManager)) {\n        #ifndef MA_NO_THREADING\n        {\n            ma_mutex_unlock(&pResourceManager->dataBufferBSTLock);\n        }\n        #else\n        {\n            MA_ASSERT(MA_FALSE);    /* Should never hit this. */\n        }\n        #endif\n    } else {\n        /* Threading not enabled. Do nothing. */\n    }\n}\n\n#ifndef MA_NO_THREADING\nstatic ma_thread_result MA_THREADCALL ma_resource_manager_job_thread(void* pUserData)\n{\n    ma_resource_manager* pResourceManager = (ma_resource_manager*)pUserData;\n    MA_ASSERT(pResourceManager != NULL);\n\n    for (;;) {\n        ma_result result;\n        ma_job job;\n\n        result = ma_resource_manager_next_job(pResourceManager, &job);\n        if (result != MA_SUCCESS) {\n            break;\n        }\n\n        /* Terminate if we got a quit message. */\n        if (job.toc.breakup.code == MA_JOB_TYPE_QUIT) {\n            break;\n        }\n\n        ma_job_process(&job);\n    }\n\n    return (ma_thread_result)0;\n}\n#endif\n\nMA_API ma_resource_manager_config ma_resource_manager_config_init(void)\n{\n    ma_resource_manager_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.decodedFormat     = ma_format_unknown;\n    config.decodedChannels   = 0;\n    config.decodedSampleRate = 0;\n    config.jobThreadCount    = 1;   /* A single miniaudio-managed job thread by default. */\n    config.jobQueueCapacity  = MA_JOB_TYPE_RESOURCE_MANAGER_QUEUE_CAPACITY;\n\n    /* Flags. */\n    config.flags = 0;\n    #ifdef MA_NO_THREADING\n    {\n        /* Threading is disabled at compile time so disable threading at runtime as well by default. */\n        config.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING;\n        config.jobThreadCount = 0;\n    }\n    #endif\n\n    return config;\n}\n\n\nMA_API ma_result ma_resource_manager_init(const ma_resource_manager_config* pConfig, ma_resource_manager* pResourceManager)\n{\n    ma_result result;\n    ma_job_queue_config jobQueueConfig;\n\n    if (pResourceManager == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pResourceManager);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #ifndef MA_NO_THREADING\n    {\n        if (pConfig->jobThreadCount > ma_countof(pResourceManager->jobThreads)) {\n            return MA_INVALID_ARGS; /* Requesting too many job threads. */\n        }\n    }\n    #endif\n\n    pResourceManager->config = *pConfig;\n    ma_allocation_callbacks_init_copy(&pResourceManager->config.allocationCallbacks, &pConfig->allocationCallbacks);\n\n    /* Get the log set up early so we can start using it as soon as possible. */\n    if (pResourceManager->config.pLog == NULL) {\n        result = ma_log_init(&pResourceManager->config.allocationCallbacks, &pResourceManager->log);\n        if (result == MA_SUCCESS) {\n            pResourceManager->config.pLog = &pResourceManager->log;\n        } else {\n            pResourceManager->config.pLog = NULL;   /* Logging is unavailable. */\n        }\n    }\n\n    if (pResourceManager->config.pVFS == NULL) {\n        result = ma_default_vfs_init(&pResourceManager->defaultVFS, &pResourceManager->config.allocationCallbacks);\n        if (result != MA_SUCCESS) {\n            return result;  /* Failed to initialize the default file system. */\n        }\n\n        pResourceManager->config.pVFS = &pResourceManager->defaultVFS;\n    }\n\n    /* If threading has been disabled at compile time, enfore it at run time as well. */\n    #ifdef MA_NO_THREADING\n    {\n        pResourceManager->config.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING;\n    }\n    #endif\n\n    /* We need to force MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING if MA_RESOURCE_MANAGER_FLAG_NO_THREADING is set. */\n    if ((pResourceManager->config.flags & MA_RESOURCE_MANAGER_FLAG_NO_THREADING) != 0) {\n        pResourceManager->config.flags |= MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING;\n\n        /* We cannot allow job threads when MA_RESOURCE_MANAGER_FLAG_NO_THREADING has been set. This is an invalid use case. */\n        if (pResourceManager->config.jobThreadCount > 0) {\n            return MA_INVALID_ARGS;\n        }\n    }\n\n    /* Job queue. */\n    jobQueueConfig.capacity = pResourceManager->config.jobQueueCapacity;\n    jobQueueConfig.flags    = 0;\n    if ((pResourceManager->config.flags & MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING) != 0) {\n        if (pResourceManager->config.jobThreadCount > 0) {\n            return MA_INVALID_ARGS; /* Non-blocking mode is only valid for self-managed job threads. */\n        }\n\n        jobQueueConfig.flags |= MA_JOB_QUEUE_FLAG_NON_BLOCKING;\n    }\n\n    result = ma_job_queue_init(&jobQueueConfig, &pResourceManager->config.allocationCallbacks, &pResourceManager->jobQueue);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n\n    /* Custom decoding backends. */\n    if (pConfig->ppCustomDecodingBackendVTables != NULL && pConfig->customDecodingBackendCount > 0) {\n        size_t sizeInBytes = sizeof(*pResourceManager->config.ppCustomDecodingBackendVTables) * pConfig->customDecodingBackendCount;\n\n        pResourceManager->config.ppCustomDecodingBackendVTables = (ma_decoding_backend_vtable**)ma_malloc(sizeInBytes, &pResourceManager->config.allocationCallbacks);\n        if (pResourceManager->config.ppCustomDecodingBackendVTables == NULL) {\n            ma_job_queue_uninit(&pResourceManager->jobQueue, &pResourceManager->config.allocationCallbacks);\n            return MA_OUT_OF_MEMORY;\n        }\n\n        MA_COPY_MEMORY(pResourceManager->config.ppCustomDecodingBackendVTables, pConfig->ppCustomDecodingBackendVTables, sizeInBytes);\n\n        pResourceManager->config.customDecodingBackendCount     = pConfig->customDecodingBackendCount;\n        pResourceManager->config.pCustomDecodingBackendUserData = pConfig->pCustomDecodingBackendUserData;\n    }\n\n\n\n    /* Here is where we initialize our threading stuff. We don't do this if we don't support threading. */\n    if (ma_resource_manager_is_threading_enabled(pResourceManager)) {\n        #ifndef MA_NO_THREADING\n        {\n            ma_uint32 iJobThread;\n\n            /* Data buffer lock. */\n            result = ma_mutex_init(&pResourceManager->dataBufferBSTLock);\n            if (result != MA_SUCCESS) {\n                ma_job_queue_uninit(&pResourceManager->jobQueue, &pResourceManager->config.allocationCallbacks);\n                return result;\n            }\n\n            /* Create the job threads last to ensure the threads has access to valid data. */\n            for (iJobThread = 0; iJobThread < pResourceManager->config.jobThreadCount; iJobThread += 1) {\n                result = ma_thread_create(&pResourceManager->jobThreads[iJobThread], ma_thread_priority_normal, pResourceManager->config.jobThreadStackSize, ma_resource_manager_job_thread, pResourceManager, &pResourceManager->config.allocationCallbacks);\n                if (result != MA_SUCCESS) {\n                    ma_mutex_uninit(&pResourceManager->dataBufferBSTLock);\n                    ma_job_queue_uninit(&pResourceManager->jobQueue, &pResourceManager->config.allocationCallbacks);\n                    return result;\n                }\n            }\n        }\n        #else\n        {\n            /* Threading is disabled at compile time. We should never get here because validation checks should have already been performed. */\n            MA_ASSERT(MA_FALSE);\n        }\n        #endif\n    }\n\n    return MA_SUCCESS;\n}\n\n\nstatic void ma_resource_manager_delete_all_data_buffer_nodes(ma_resource_manager* pResourceManager)\n{\n    MA_ASSERT(pResourceManager);\n\n    /* If everything was done properly, there shouldn't be any active data buffers. */\n    while (pResourceManager->pRootDataBufferNode != NULL) {\n        ma_resource_manager_data_buffer_node* pDataBufferNode = pResourceManager->pRootDataBufferNode;\n        ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode);\n\n        /* The data buffer has been removed from the BST, so now we need to free it's data. */\n        ma_resource_manager_data_buffer_node_free(pResourceManager, pDataBufferNode);\n    }\n}\n\nMA_API void ma_resource_manager_uninit(ma_resource_manager* pResourceManager)\n{\n    if (pResourceManager == NULL) {\n        return;\n    }\n\n    /*\n    Job threads need to be killed first. To do this we need to post a quit message to the message queue and then wait for the thread. The quit message will never be removed from the\n    queue which means it will never not be returned after being encounted for the first time which means all threads will eventually receive it.\n    */\n    ma_resource_manager_post_job_quit(pResourceManager);\n\n    /* Wait for every job to finish before continuing to ensure nothing is sill trying to access any of our objects below. */\n    if (ma_resource_manager_is_threading_enabled(pResourceManager)) {\n        #ifndef MA_NO_THREADING\n        {\n            ma_uint32 iJobThread;\n\n            for (iJobThread = 0; iJobThread < pResourceManager->config.jobThreadCount; iJobThread += 1) {\n                ma_thread_wait(&pResourceManager->jobThreads[iJobThread]);\n            }\n        }\n        #else\n        {\n            MA_ASSERT(MA_FALSE);    /* Should never hit this. */\n        }\n        #endif\n    }\n\n    /* At this point the thread should have returned and no other thread should be accessing our data. We can now delete all data buffers. */\n    ma_resource_manager_delete_all_data_buffer_nodes(pResourceManager);\n\n    /* The job queue is no longer needed. */\n    ma_job_queue_uninit(&pResourceManager->jobQueue, &pResourceManager->config.allocationCallbacks);\n\n    /* We're no longer doing anything with data buffers so the lock can now be uninitialized. */\n    if (ma_resource_manager_is_threading_enabled(pResourceManager)) {\n        #ifndef MA_NO_THREADING\n        {\n            ma_mutex_uninit(&pResourceManager->dataBufferBSTLock);\n        }\n        #else\n        {\n            MA_ASSERT(MA_FALSE);    /* Should never hit this. */\n        }\n        #endif\n    }\n\n    ma_free(pResourceManager->config.ppCustomDecodingBackendVTables, &pResourceManager->config.allocationCallbacks);\n\n    if (pResourceManager->config.pLog == &pResourceManager->log) {\n        ma_log_uninit(&pResourceManager->log);\n    }\n}\n\nMA_API ma_log* ma_resource_manager_get_log(ma_resource_manager* pResourceManager)\n{\n    if (pResourceManager == NULL) {\n        return NULL;\n    }\n\n    return pResourceManager->config.pLog;\n}\n\n\n\nMA_API ma_resource_manager_data_source_config ma_resource_manager_data_source_config_init(void)\n{\n    ma_resource_manager_data_source_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.rangeBegInPCMFrames     = MA_DATA_SOURCE_DEFAULT_RANGE_BEG;\n    config.rangeEndInPCMFrames     = MA_DATA_SOURCE_DEFAULT_RANGE_END;\n    config.loopPointBegInPCMFrames = MA_DATA_SOURCE_DEFAULT_LOOP_POINT_BEG;\n    config.loopPointEndInPCMFrames = MA_DATA_SOURCE_DEFAULT_LOOP_POINT_END;\n    config.isLooping               = MA_FALSE;\n\n    return config;\n}\n\n\nstatic ma_decoder_config ma_resource_manager__init_decoder_config(ma_resource_manager* pResourceManager)\n{\n    ma_decoder_config config;\n\n    config = ma_decoder_config_init(pResourceManager->config.decodedFormat, pResourceManager->config.decodedChannels, pResourceManager->config.decodedSampleRate);\n    config.allocationCallbacks    = pResourceManager->config.allocationCallbacks;\n    config.ppCustomBackendVTables = pResourceManager->config.ppCustomDecodingBackendVTables;\n    config.customBackendCount     = pResourceManager->config.customDecodingBackendCount;\n    config.pCustomBackendUserData = pResourceManager->config.pCustomDecodingBackendUserData;\n\n    return config;\n}\n\nstatic ma_result ma_resource_manager__init_decoder(ma_resource_manager* pResourceManager, const char* pFilePath, const wchar_t* pFilePathW, ma_decoder* pDecoder)\n{\n    ma_result result;\n    ma_decoder_config config;\n\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(pFilePath        != NULL || pFilePathW != NULL);\n    MA_ASSERT(pDecoder         != NULL);\n\n    config = ma_resource_manager__init_decoder_config(pResourceManager);\n\n    if (pFilePath != NULL) {\n        result = ma_decoder_init_vfs(pResourceManager->config.pVFS, pFilePath, &config, pDecoder);\n        if (result != MA_SUCCESS) {\n            ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, \"Failed to load file \\\"%s\\\". %s.\\n\", pFilePath, ma_result_description(result));\n            return result;\n        }\n    } else {\n        result = ma_decoder_init_vfs_w(pResourceManager->config.pVFS, pFilePathW, &config, pDecoder);\n        if (result != MA_SUCCESS) {\n            #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(_MSC_VER)\n                ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, \"Failed to load file \\\"%ls\\\". %s.\\n\", pFilePathW, ma_result_description(result));\n            #endif\n            return result;\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_bool32 ma_resource_manager_data_buffer_has_connector(ma_resource_manager_data_buffer* pDataBuffer)\n{\n    return ma_atomic_bool32_get(&pDataBuffer->isConnectorInitialized);\n}\n\nstatic ma_data_source* ma_resource_manager_data_buffer_get_connector(ma_resource_manager_data_buffer* pDataBuffer)\n{\n    if (ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE) {\n        return NULL;    /* Connector not yet initialized. */\n    }\n\n    switch (pDataBuffer->pNode->data.type)\n    {\n        case ma_resource_manager_data_supply_type_encoded:       return &pDataBuffer->connector.decoder;\n        case ma_resource_manager_data_supply_type_decoded:       return &pDataBuffer->connector.buffer;\n        case ma_resource_manager_data_supply_type_decoded_paged: return &pDataBuffer->connector.pagedBuffer;\n\n        case ma_resource_manager_data_supply_type_unknown:\n        default:\n        {\n            ma_log_postf(ma_resource_manager_get_log(pDataBuffer->pResourceManager), MA_LOG_LEVEL_ERROR, \"Failed to retrieve data buffer connector. Unknown data supply type.\\n\");\n            return NULL;\n        };\n    };\n}\n\nstatic ma_result ma_resource_manager_data_buffer_init_connector(ma_resource_manager_data_buffer* pDataBuffer, const ma_resource_manager_data_source_config* pConfig, ma_async_notification* pInitNotification, ma_fence* pInitFence)\n{\n    ma_result result;\n\n    MA_ASSERT(pDataBuffer != NULL);\n    MA_ASSERT(pConfig     != NULL);\n    MA_ASSERT(ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE);\n\n    /* The underlying data buffer must be initialized before we'll be able to know how to initialize the backend. */\n    result = ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode);\n    if (result != MA_SUCCESS && result != MA_BUSY) {\n        return result;  /* The data buffer is in an erroneous state. */\n    }\n\n    /*\n    We need to initialize either a ma_decoder or an ma_audio_buffer depending on whether or not the backing data is encoded or decoded. These act as the\n    \"instance\" to the data and are used to form the connection between underlying data buffer and the data source. If the data buffer is decoded, we can use\n    an ma_audio_buffer. This enables us to use memory mapping when mixing which saves us a bit of data movement overhead.\n    */\n    switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode))\n    {\n        case ma_resource_manager_data_supply_type_encoded:          /* Connector is a decoder. */\n        {\n            ma_decoder_config config;\n            config = ma_resource_manager__init_decoder_config(pDataBuffer->pResourceManager);\n            result = ma_decoder_init_memory(pDataBuffer->pNode->data.backend.encoded.pData, pDataBuffer->pNode->data.backend.encoded.sizeInBytes, &config, &pDataBuffer->connector.decoder);\n        } break;\n\n        case ma_resource_manager_data_supply_type_decoded:          /* Connector is an audio buffer. */\n        {\n            ma_audio_buffer_config config;\n            config = ma_audio_buffer_config_init(pDataBuffer->pNode->data.backend.decoded.format, pDataBuffer->pNode->data.backend.decoded.channels, pDataBuffer->pNode->data.backend.decoded.totalFrameCount, pDataBuffer->pNode->data.backend.decoded.pData, NULL);\n            result = ma_audio_buffer_init(&config, &pDataBuffer->connector.buffer);\n        } break;\n\n        case ma_resource_manager_data_supply_type_decoded_paged:    /* Connector is a paged audio buffer. */\n        {\n            ma_paged_audio_buffer_config config;\n            config = ma_paged_audio_buffer_config_init(&pDataBuffer->pNode->data.backend.decodedPaged.data);\n            result = ma_paged_audio_buffer_init(&config, &pDataBuffer->connector.pagedBuffer);\n        } break;\n\n        case ma_resource_manager_data_supply_type_unknown:\n        default:\n        {\n            /* Unknown data supply type. Should never happen. Need to post an error here. */\n            return MA_INVALID_ARGS;\n        };\n    }\n\n    /*\n    Initialization of the connector is when we can fire the init notification. This will give the application access to\n    the format/channels/rate of the data source.\n    */\n    if (result == MA_SUCCESS) {\n        /*\n        The resource manager supports the ability to set the range and loop settings via a config at\n        initialization time. This results in an case where the ranges could be set explicitly via\n        ma_data_source_set_*() before we get to this point here. If this happens, we'll end up\n        hitting a case where we just override those settings which results in what feels like a bug.\n\n        To address this we only change the relevant properties if they're not equal to defaults. If\n        they're equal to defaults there's no need to change them anyway. If they're *not* set to the\n        default values, we can assume the user has set the range and loop settings via the config. If\n        they're doing their own calls to ma_data_source_set_*() in addition to setting them via the\n        config, that's entirely on the caller and any synchronization issue becomes their problem.\n        */\n        if (pConfig->rangeBegInPCMFrames != MA_DATA_SOURCE_DEFAULT_RANGE_BEG || pConfig->rangeEndInPCMFrames != MA_DATA_SOURCE_DEFAULT_RANGE_END) {\n            ma_data_source_set_range_in_pcm_frames(pDataBuffer, pConfig->rangeBegInPCMFrames, pConfig->rangeEndInPCMFrames);\n        }\n\n        if (pConfig->loopPointBegInPCMFrames != MA_DATA_SOURCE_DEFAULT_LOOP_POINT_BEG || pConfig->loopPointEndInPCMFrames != MA_DATA_SOURCE_DEFAULT_LOOP_POINT_END) {\n            ma_data_source_set_loop_point_in_pcm_frames(pDataBuffer, pConfig->loopPointBegInPCMFrames, pConfig->loopPointEndInPCMFrames);\n        }\n\n        if (pConfig->isLooping != MA_FALSE) {\n            ma_data_source_set_looping(pDataBuffer, pConfig->isLooping);\n        }\n\n        ma_atomic_bool32_set(&pDataBuffer->isConnectorInitialized, MA_TRUE);\n\n        if (pInitNotification != NULL) {\n            ma_async_notification_signal(pInitNotification);\n        }\n\n        if (pInitFence != NULL) {\n            ma_fence_release(pInitFence);\n        }\n    }\n\n    /* At this point the backend should be initialized. We do *not* want to set pDataSource->result here - that needs to be done at a higher level to ensure it's done as the last step. */\n    return result;\n}\n\nstatic ma_result ma_resource_manager_data_buffer_uninit_connector(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer* pDataBuffer)\n{\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(pDataBuffer      != NULL);\n\n    (void)pResourceManager;\n\n    switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode))\n    {\n        case ma_resource_manager_data_supply_type_encoded:          /* Connector is a decoder. */\n        {\n            ma_decoder_uninit(&pDataBuffer->connector.decoder);\n        } break;\n\n        case ma_resource_manager_data_supply_type_decoded:          /* Connector is an audio buffer. */\n        {\n            ma_audio_buffer_uninit(&pDataBuffer->connector.buffer);\n        } break;\n\n        case ma_resource_manager_data_supply_type_decoded_paged:    /* Connector is a paged audio buffer. */\n        {\n            ma_paged_audio_buffer_uninit(&pDataBuffer->connector.pagedBuffer);\n        } break;\n\n        case ma_resource_manager_data_supply_type_unknown:\n        default:\n        {\n            /* Unknown data supply type. Should never happen. Need to post an error here. */\n            return MA_INVALID_ARGS;\n        };\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_uint32 ma_resource_manager_data_buffer_node_next_execution_order(ma_resource_manager_data_buffer_node* pDataBufferNode)\n{\n    MA_ASSERT(pDataBufferNode != NULL);\n    return ma_atomic_fetch_add_32(&pDataBufferNode->executionCounter, 1);\n}\n\nstatic ma_result ma_resource_manager_data_buffer_node_init_supply_encoded(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, const char* pFilePath, const wchar_t* pFilePathW)\n{\n    ma_result result;\n    size_t dataSizeInBytes;\n    void* pData;\n\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(pDataBufferNode  != NULL);\n    MA_ASSERT(pFilePath != NULL || pFilePathW != NULL);\n\n    result = ma_vfs_open_and_read_file_ex(pResourceManager->config.pVFS, pFilePath, pFilePathW, &pData, &dataSizeInBytes, &pResourceManager->config.allocationCallbacks);\n    if (result != MA_SUCCESS) {\n        if (pFilePath != NULL) {\n            ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, \"Failed to load file \\\"%s\\\". %s.\\n\", pFilePath, ma_result_description(result));\n        } else {\n            #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(_MSC_VER)\n                ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, \"Failed to load file \\\"%ls\\\". %s.\\n\", pFilePathW, ma_result_description(result));\n            #endif\n        }\n\n        return result;\n    }\n\n    pDataBufferNode->data.backend.encoded.pData       = pData;\n    pDataBufferNode->data.backend.encoded.sizeInBytes = dataSizeInBytes;\n    ma_resource_manager_data_buffer_node_set_data_supply_type(pDataBufferNode, ma_resource_manager_data_supply_type_encoded);  /* <-- Must be set last. */\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_resource_manager_data_buffer_node_init_supply_decoded(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, const char* pFilePath, const wchar_t* pFilePathW, ma_uint32 flags, ma_decoder** ppDecoder)\n{\n    ma_result result = MA_SUCCESS;\n    ma_decoder* pDecoder;\n    ma_uint64 totalFrameCount;\n\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(pDataBufferNode  != NULL);\n    MA_ASSERT(ppDecoder         != NULL);\n    MA_ASSERT(pFilePath != NULL || pFilePathW != NULL);\n\n    *ppDecoder = NULL;  /* For safety. */\n\n    pDecoder = (ma_decoder*)ma_malloc(sizeof(*pDecoder), &pResourceManager->config.allocationCallbacks);\n    if (pDecoder == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_resource_manager__init_decoder(pResourceManager, pFilePath, pFilePathW, pDecoder);\n    if (result != MA_SUCCESS) {\n        ma_free(pDecoder, &pResourceManager->config.allocationCallbacks);\n        return result;\n    }\n\n    /*\n    At this point we have the decoder and we now need to initialize the data supply. This will\n    be either a decoded buffer, or a decoded paged buffer. A regular buffer is just one big heap\n    allocated buffer, whereas a paged buffer is a linked list of paged-sized buffers. The latter\n    is used when the length of a sound is unknown until a full decode has been performed.\n    */\n    if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_UNKNOWN_LENGTH) == 0) {\n        result = ma_decoder_get_length_in_pcm_frames(pDecoder, &totalFrameCount);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    } else {\n        totalFrameCount = 0;\n    }\n\n    if (totalFrameCount > 0) {\n        /* It's a known length. The data supply is a regular decoded buffer. */\n        ma_uint64 dataSizeInBytes;\n        void* pData;\n\n        dataSizeInBytes = totalFrameCount * ma_get_bytes_per_frame(pDecoder->outputFormat, pDecoder->outputChannels);\n        if (dataSizeInBytes > MA_SIZE_MAX) {\n            ma_decoder_uninit(pDecoder);\n            ma_free(pDecoder, &pResourceManager->config.allocationCallbacks);\n            return MA_TOO_BIG;\n        }\n\n        pData = ma_malloc((size_t)dataSizeInBytes, &pResourceManager->config.allocationCallbacks);\n        if (pData == NULL) {\n            ma_decoder_uninit(pDecoder);\n            ma_free(pDecoder, &pResourceManager->config.allocationCallbacks);\n            return MA_OUT_OF_MEMORY;\n        }\n\n        /* The buffer needs to be initialized to silence in case the caller reads from it. */\n        ma_silence_pcm_frames(pData, totalFrameCount, pDecoder->outputFormat, pDecoder->outputChannels);\n\n        /* Data has been allocated and the data supply can now be initialized. */\n        pDataBufferNode->data.backend.decoded.pData             = pData;\n        pDataBufferNode->data.backend.decoded.totalFrameCount   = totalFrameCount;\n        pDataBufferNode->data.backend.decoded.format            = pDecoder->outputFormat;\n        pDataBufferNode->data.backend.decoded.channels          = pDecoder->outputChannels;\n        pDataBufferNode->data.backend.decoded.sampleRate        = pDecoder->outputSampleRate;\n        pDataBufferNode->data.backend.decoded.decodedFrameCount = 0;\n        ma_resource_manager_data_buffer_node_set_data_supply_type(pDataBufferNode, ma_resource_manager_data_supply_type_decoded);  /* <-- Must be set last. */\n    } else {\n        /*\n        It's an unknown length. The data supply is a paged decoded buffer. Setting this up is\n        actually easier than the non-paged decoded buffer because we just need to initialize\n        a ma_paged_audio_buffer object.\n        */\n        result = ma_paged_audio_buffer_data_init(pDecoder->outputFormat, pDecoder->outputChannels, &pDataBufferNode->data.backend.decodedPaged.data);\n        if (result != MA_SUCCESS) {\n            ma_decoder_uninit(pDecoder);\n            ma_free(pDecoder, &pResourceManager->config.allocationCallbacks);\n            return result;\n        }\n\n        pDataBufferNode->data.backend.decodedPaged.sampleRate        = pDecoder->outputSampleRate;\n        pDataBufferNode->data.backend.decodedPaged.decodedFrameCount = 0;\n        ma_resource_manager_data_buffer_node_set_data_supply_type(pDataBufferNode, ma_resource_manager_data_supply_type_decoded_paged);  /* <-- Must be set last. */\n    }\n\n    *ppDecoder = pDecoder;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_resource_manager_data_buffer_node_decode_next_page(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, ma_decoder* pDecoder)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint64 pageSizeInFrames;\n    ma_uint64 framesToTryReading;\n    ma_uint64 framesRead;\n\n    MA_ASSERT(pResourceManager != NULL);\n    MA_ASSERT(pDataBufferNode  != NULL);\n    MA_ASSERT(pDecoder         != NULL);\n\n    /* We need to know the size of a page in frames to know how many frames to decode. */\n    pageSizeInFrames = MA_RESOURCE_MANAGER_PAGE_SIZE_IN_MILLISECONDS * (pDecoder->outputSampleRate/1000);\n    framesToTryReading = pageSizeInFrames;\n\n    /*\n    Here is where we do the decoding of the next page. We'll run a slightly different path depending\n    on whether or not we're using a flat or paged buffer because the allocation of the page differs\n    between the two. For a flat buffer it's an offset to an already-allocated buffer. For a paged\n    buffer, we need to allocate a new page and attach it to the linked list.\n    */\n    switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode))\n    {\n        case ma_resource_manager_data_supply_type_decoded:\n        {\n            /* The destination buffer is an offset to the existing buffer. Don't read more than we originally retrieved when we first initialized the decoder. */\n            void* pDst;\n            ma_uint64 framesRemaining = pDataBufferNode->data.backend.decoded.totalFrameCount - pDataBufferNode->data.backend.decoded.decodedFrameCount;\n            if (framesToTryReading > framesRemaining) {\n                framesToTryReading = framesRemaining;\n            }\n\n            if (framesToTryReading > 0) {\n                pDst = ma_offset_ptr(\n                    pDataBufferNode->data.backend.decoded.pData,\n                    pDataBufferNode->data.backend.decoded.decodedFrameCount * ma_get_bytes_per_frame(pDataBufferNode->data.backend.decoded.format, pDataBufferNode->data.backend.decoded.channels)\n                );\n                MA_ASSERT(pDst != NULL);\n\n                result = ma_decoder_read_pcm_frames(pDecoder, pDst, framesToTryReading, &framesRead);\n                if (framesRead > 0) {\n                    pDataBufferNode->data.backend.decoded.decodedFrameCount += framesRead;\n                }\n            } else {\n                framesRead = 0;\n            }\n        } break;\n\n        case ma_resource_manager_data_supply_type_decoded_paged:\n        {\n            /* The destination buffer is a freshly allocated page. */\n            ma_paged_audio_buffer_page* pPage;\n\n            result = ma_paged_audio_buffer_data_allocate_page(&pDataBufferNode->data.backend.decodedPaged.data, framesToTryReading, NULL, &pResourceManager->config.allocationCallbacks, &pPage);\n            if (result != MA_SUCCESS) {\n                return result;\n            }\n\n            result = ma_decoder_read_pcm_frames(pDecoder, pPage->pAudioData, framesToTryReading, &framesRead);\n            if (framesRead > 0) {\n                pPage->sizeInFrames = framesRead;\n\n                result = ma_paged_audio_buffer_data_append_page(&pDataBufferNode->data.backend.decodedPaged.data, pPage);\n                if (result == MA_SUCCESS) {\n                    pDataBufferNode->data.backend.decodedPaged.decodedFrameCount += framesRead;\n                } else {\n                    /* Failed to append the page. Just abort and set the status to MA_AT_END. */\n                    ma_paged_audio_buffer_data_free_page(&pDataBufferNode->data.backend.decodedPaged.data, pPage, &pResourceManager->config.allocationCallbacks);\n                    result = MA_AT_END;\n                }\n            } else {\n                /* No frames were read. Free the page and just set the status to MA_AT_END. */\n                ma_paged_audio_buffer_data_free_page(&pDataBufferNode->data.backend.decodedPaged.data, pPage, &pResourceManager->config.allocationCallbacks);\n                result = MA_AT_END;\n            }\n        } break;\n\n        case ma_resource_manager_data_supply_type_encoded:\n        case ma_resource_manager_data_supply_type_unknown:\n        default:\n        {\n            /* Unexpected data supply type. */\n            ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, \"Unexpected data supply type (%d) when decoding page.\", ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBufferNode));\n            return MA_ERROR;\n        };\n    }\n\n    if (result == MA_SUCCESS && framesRead == 0) {\n        result = MA_AT_END;\n    }\n\n    return result;\n}\n\nstatic ma_result ma_resource_manager_data_buffer_node_acquire_critical_section(ma_resource_manager* pResourceManager, const char* pFilePath, const wchar_t* pFilePathW, ma_uint32 hashedName32, ma_uint32 flags, const ma_resource_manager_data_supply* pExistingData, ma_fence* pInitFence, ma_fence* pDoneFence, ma_resource_manager_inline_notification* pInitNotification, ma_resource_manager_data_buffer_node** ppDataBufferNode)\n{\n    ma_result result = MA_SUCCESS;\n    ma_resource_manager_data_buffer_node* pDataBufferNode = NULL;\n    ma_resource_manager_data_buffer_node* pInsertPoint;\n\n    if (ppDataBufferNode != NULL) {\n        *ppDataBufferNode = NULL;\n    }\n\n    result = ma_resource_manager_data_buffer_node_insert_point(pResourceManager, hashedName32, &pInsertPoint);\n    if (result == MA_ALREADY_EXISTS) {\n        /* The node already exists. We just need to increment the reference count. */\n        pDataBufferNode = pInsertPoint;\n\n        result = ma_resource_manager_data_buffer_node_increment_ref(pResourceManager, pDataBufferNode, NULL);\n        if (result != MA_SUCCESS) {\n            return result;  /* Should never happen. Failed to increment the reference count. */\n        }\n\n        result = MA_ALREADY_EXISTS;\n        goto done;\n    } else {\n        /*\n        The node does not already exist. We need to post a LOAD_DATA_BUFFER_NODE job here. This\n        needs to be done inside the critical section to ensure an uninitialization of the node\n        does not occur before initialization on another thread.\n        */\n        pDataBufferNode = (ma_resource_manager_data_buffer_node*)ma_malloc(sizeof(*pDataBufferNode), &pResourceManager->config.allocationCallbacks);\n        if (pDataBufferNode == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n\n        MA_ZERO_OBJECT(pDataBufferNode);\n        pDataBufferNode->hashedName32 = hashedName32;\n        pDataBufferNode->refCount     = 1;        /* Always set to 1 by default (this is our first reference). */\n\n        if (pExistingData == NULL) {\n            pDataBufferNode->data.type    = ma_resource_manager_data_supply_type_unknown;    /* <-- We won't know this until we start decoding. */\n            pDataBufferNode->result       = MA_BUSY;  /* Must be set to MA_BUSY before we leave the critical section, so might as well do it now. */\n            pDataBufferNode->isDataOwnedByResourceManager = MA_TRUE;\n        } else {\n            pDataBufferNode->data         = *pExistingData;\n            pDataBufferNode->result       = MA_SUCCESS;   /* Not loading asynchronously, so just set the status */\n            pDataBufferNode->isDataOwnedByResourceManager = MA_FALSE;\n        }\n\n        result = ma_resource_manager_data_buffer_node_insert_at(pResourceManager, pDataBufferNode, pInsertPoint);\n        if (result != MA_SUCCESS) {\n            ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks);\n            return result;  /* Should never happen. Failed to insert the data buffer into the BST. */\n        }\n\n        /*\n        Here is where we'll post the job, but only if we're loading asynchronously. If we're\n        loading synchronously we'll defer loading to a later stage, outside of the critical\n        section.\n        */\n        if (pDataBufferNode->isDataOwnedByResourceManager && (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) != 0) {\n            /* Loading asynchronously. Post the job. */\n            ma_job job;\n            char* pFilePathCopy = NULL;\n            wchar_t* pFilePathWCopy = NULL;\n\n            /* We need a copy of the file path. We should probably make this more efficient, but for now we'll do a transient memory allocation. */\n            if (pFilePath != NULL) {\n                pFilePathCopy = ma_copy_string(pFilePath, &pResourceManager->config.allocationCallbacks);\n            } else {\n                pFilePathWCopy = ma_copy_string_w(pFilePathW, &pResourceManager->config.allocationCallbacks);\n            }\n\n            if (pFilePathCopy == NULL && pFilePathWCopy == NULL) {\n                ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode);\n                ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks);\n                return MA_OUT_OF_MEMORY;\n            }\n\n            if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) {\n                ma_resource_manager_inline_notification_init(pResourceManager, pInitNotification);\n            }\n\n            /* Acquire init and done fences before posting the job. These will be unacquired by the job thread. */\n            if (pInitFence != NULL) { ma_fence_acquire(pInitFence); }\n            if (pDoneFence != NULL) { ma_fence_acquire(pDoneFence); }\n\n            /* We now have everything we need to post the job to the job thread. */\n            job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE);\n            job.order = ma_resource_manager_data_buffer_node_next_execution_order(pDataBufferNode);\n            job.data.resourceManager.loadDataBufferNode.pResourceManager  = pResourceManager;\n            job.data.resourceManager.loadDataBufferNode.pDataBufferNode   = pDataBufferNode;\n            job.data.resourceManager.loadDataBufferNode.pFilePath         = pFilePathCopy;\n            job.data.resourceManager.loadDataBufferNode.pFilePathW        = pFilePathWCopy;\n            job.data.resourceManager.loadDataBufferNode.flags             = flags;\n            job.data.resourceManager.loadDataBufferNode.pInitNotification = ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) ? pInitNotification : NULL;\n            job.data.resourceManager.loadDataBufferNode.pDoneNotification = NULL;\n            job.data.resourceManager.loadDataBufferNode.pInitFence        = pInitFence;\n            job.data.resourceManager.loadDataBufferNode.pDoneFence        = pDoneFence;\n\n            if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) {\n                result = ma_job_process(&job);\n            } else {\n                result = ma_resource_manager_post_job(pResourceManager, &job);\n            }\n\n            if (result != MA_SUCCESS) {\n                /* Failed to post job. Probably ran out of memory. */\n                ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, \"Failed to post MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER_NODE job. %s.\\n\", ma_result_description(result));\n\n                /*\n                Fences were acquired before posting the job, but since the job was not able to\n                be posted, we need to make sure we release them so nothing gets stuck waiting.\n                */\n                if (pInitFence != NULL) { ma_fence_release(pInitFence); }\n                if (pDoneFence != NULL) { ma_fence_release(pDoneFence); }\n\n                if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) {\n                    ma_resource_manager_inline_notification_uninit(pInitNotification);\n                } else {\n                    /* These will have been freed by the job thread, but with WAIT_INIT they will already have happend sinced the job has already been handled. */\n                    ma_free(pFilePathCopy,  &pResourceManager->config.allocationCallbacks);\n                    ma_free(pFilePathWCopy, &pResourceManager->config.allocationCallbacks);\n                }\n\n                ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode);\n                ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks);\n\n                return result;\n            }\n        }\n    }\n\ndone:\n    if (ppDataBufferNode != NULL) {\n        *ppDataBufferNode = pDataBufferNode;\n    }\n\n    return result;\n}\n\nstatic ma_result ma_resource_manager_data_buffer_node_acquire(ma_resource_manager* pResourceManager, const char* pFilePath, const wchar_t* pFilePathW, ma_uint32 hashedName32, ma_uint32 flags, const ma_resource_manager_data_supply* pExistingData, ma_fence* pInitFence, ma_fence* pDoneFence, ma_resource_manager_data_buffer_node** ppDataBufferNode)\n{\n    ma_result result = MA_SUCCESS;\n    ma_bool32 nodeAlreadyExists = MA_FALSE;\n    ma_resource_manager_data_buffer_node* pDataBufferNode = NULL;\n    ma_resource_manager_inline_notification initNotification;   /* Used when the WAIT_INIT flag is set. */\n\n    if (ppDataBufferNode != NULL) {\n        *ppDataBufferNode = NULL;   /* Safety. */\n    }\n\n    if (pResourceManager == NULL || (pFilePath == NULL && pFilePathW == NULL && hashedName32 == 0)) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* If we're specifying existing data, it must be valid. */\n    if (pExistingData != NULL && pExistingData->type == ma_resource_manager_data_supply_type_unknown) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* If we don't support threading, remove the ASYNC flag to make the rest of this a bit simpler. */\n    if (ma_resource_manager_is_threading_enabled(pResourceManager) == MA_FALSE) {\n        flags &= ~MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC;\n    }\n\n    if (hashedName32 == 0) {\n        if (pFilePath != NULL) {\n            hashedName32 = ma_hash_string_32(pFilePath);\n        } else {\n            hashedName32 = ma_hash_string_w_32(pFilePathW);\n        }\n    }\n\n    /*\n    Here is where we either increment the node's reference count or allocate a new one and add it\n    to the BST. When allocating a new node, we need to make sure the LOAD_DATA_BUFFER_NODE job is\n    posted inside the critical section just in case the caller immediately uninitializes the node\n    as this will ensure the FREE_DATA_BUFFER_NODE job is given an execution order such that the\n    node is not uninitialized before initialization.\n    */\n    ma_resource_manager_data_buffer_bst_lock(pResourceManager);\n    {\n        result = ma_resource_manager_data_buffer_node_acquire_critical_section(pResourceManager, pFilePath, pFilePathW, hashedName32, flags, pExistingData, pInitFence, pDoneFence, &initNotification, &pDataBufferNode);\n    }\n    ma_resource_manager_data_buffer_bst_unlock(pResourceManager);\n\n    if (result == MA_ALREADY_EXISTS) {\n        nodeAlreadyExists = MA_TRUE;\n        result = MA_SUCCESS;\n    } else {\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    /*\n    If we're loading synchronously, we'll need to load everything now. When loading asynchronously,\n    a job will have been posted inside the BST critical section so that an uninitialization can be\n    allocated an appropriate execution order thereby preventing it from being uninitialized before\n    the node is initialized by the decoding thread(s).\n    */\n    if (nodeAlreadyExists == MA_FALSE) {    /* Don't need to try loading anything if the node already exists. */\n        if (pFilePath == NULL && pFilePathW == NULL) {\n            /*\n            If this path is hit, it means a buffer is being copied (i.e. initialized from only the\n            hashed name), but that node has been freed in the meantime, probably from some other\n            thread. This is an invalid operation.\n            */\n            ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, \"Cloning data buffer node failed because the source node was released. The source node must remain valid until the cloning has completed.\\n\");\n            result = MA_INVALID_OPERATION;\n            goto done;\n        }\n\n        if (pDataBufferNode->isDataOwnedByResourceManager) {\n            if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) == 0) {\n                /* Loading synchronously. Load the sound in it's entirety here. */\n                if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE) == 0) {\n                    /* No decoding. This is the simple case - just store the file contents in memory. */\n                    result = ma_resource_manager_data_buffer_node_init_supply_encoded(pResourceManager, pDataBufferNode, pFilePath, pFilePathW);\n                    if (result != MA_SUCCESS) {\n                        goto done;\n                    }\n                } else {\n                    /* Decoding. We do this the same way as we do when loading asynchronously. */\n                    ma_decoder* pDecoder;\n                    result = ma_resource_manager_data_buffer_node_init_supply_decoded(pResourceManager, pDataBufferNode, pFilePath, pFilePathW, flags, &pDecoder);\n                    if (result != MA_SUCCESS) {\n                        goto done;\n                    }\n\n                    /* We have the decoder, now decode page by page just like we do when loading asynchronously. */\n                    for (;;) {\n                        /* Decode next page. */\n                        result = ma_resource_manager_data_buffer_node_decode_next_page(pResourceManager, pDataBufferNode, pDecoder);\n                        if (result != MA_SUCCESS) {\n                            break;  /* Will return MA_AT_END when the last page has been decoded. */\n                        }\n                    }\n\n                    /* Reaching the end needs to be considered successful. */\n                    if (result == MA_AT_END) {\n                        result  = MA_SUCCESS;\n                    }\n\n                    /*\n                    At this point the data buffer is either fully decoded or some error occurred. Either\n                    way, the decoder is no longer necessary.\n                    */\n                    ma_decoder_uninit(pDecoder);\n                    ma_free(pDecoder, &pResourceManager->config.allocationCallbacks);\n                }\n\n                /* Getting here means we were successful. Make sure the status of the node is updated accordingly. */\n                ma_atomic_exchange_i32(&pDataBufferNode->result, result);\n            } else {\n                /* Loading asynchronously. We may need to wait for initialization. */\n                if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) {\n                    ma_resource_manager_inline_notification_wait(&initNotification);\n                }\n            }\n        } else {\n            /* The data is not managed by the resource manager so there's nothing else to do. */\n            MA_ASSERT(pExistingData != NULL);\n        }\n    }\n\ndone:\n    /* If we failed to initialize the data buffer we need to free it. */\n    if (result != MA_SUCCESS) {\n        if (nodeAlreadyExists == MA_FALSE) {\n            ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode);\n            ma_free(pDataBufferNode, &pResourceManager->config.allocationCallbacks);\n        }\n    }\n\n    /*\n    The init notification needs to be uninitialized. This will be used if the node does not already\n    exist, and we've specified ASYNC | WAIT_INIT.\n    */\n    if (nodeAlreadyExists == MA_FALSE && pDataBufferNode->isDataOwnedByResourceManager && (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) != 0) {\n        if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) {\n            ma_resource_manager_inline_notification_uninit(&initNotification);\n        }\n    }\n\n    if (ppDataBufferNode != NULL) {\n        *ppDataBufferNode = pDataBufferNode;\n    }\n\n    return result;\n}\n\nstatic ma_result ma_resource_manager_data_buffer_node_unacquire(ma_resource_manager* pResourceManager, ma_resource_manager_data_buffer_node* pDataBufferNode, const char* pName, const wchar_t* pNameW)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint32 refCount = 0xFFFFFFFF; /* The new reference count of the node after decrementing. Initialize to non-0 to be safe we don't fall into the freeing path. */\n    ma_uint32 hashedName32 = 0;\n\n    if (pResourceManager == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pDataBufferNode == NULL) {\n        if (pName == NULL && pNameW == NULL) {\n            return MA_INVALID_ARGS;\n        }\n\n        if (pName != NULL) {\n            hashedName32 = ma_hash_string_32(pName);\n        } else {\n            hashedName32 = ma_hash_string_w_32(pNameW);\n        }\n    }\n\n    /*\n    The first thing to do is decrement the reference counter of the node. Then, if the reference\n    count is zero, we need to free the node. If the node is still in the process of loading, we'll\n    need to post a job to the job queue to free the node. Otherwise we'll just do it here.\n    */\n    ma_resource_manager_data_buffer_bst_lock(pResourceManager);\n    {\n        /* Might need to find the node. Must be done inside the critical section. */\n        if (pDataBufferNode == NULL) {\n            result = ma_resource_manager_data_buffer_node_search(pResourceManager, hashedName32, &pDataBufferNode);\n            if (result != MA_SUCCESS) {\n                goto stage2;    /* Couldn't find the node. */\n            }\n        }\n\n        result = ma_resource_manager_data_buffer_node_decrement_ref(pResourceManager, pDataBufferNode, &refCount);\n        if (result != MA_SUCCESS) {\n            goto stage2;    /* Should never happen. */\n        }\n\n        if (refCount == 0) {\n            result = ma_resource_manager_data_buffer_node_remove(pResourceManager, pDataBufferNode);\n            if (result != MA_SUCCESS) {\n                goto stage2;  /* An error occurred when trying to remove the data buffer. This should never happen. */\n            }\n        }\n    }\n    ma_resource_manager_data_buffer_bst_unlock(pResourceManager);\n\nstage2:\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /*\n    Here is where we need to free the node. We don't want to do this inside the critical section\n    above because we want to keep that as small as possible for multi-threaded efficiency.\n    */\n    if (refCount == 0) {\n        if (ma_resource_manager_data_buffer_node_result(pDataBufferNode) == MA_BUSY) {\n            /* The sound is still loading. We need to delay the freeing of the node to a safe time. */\n            ma_job job;\n\n            /* We need to mark the node as unavailable for the sake of the resource manager worker threads. */\n            ma_atomic_exchange_i32(&pDataBufferNode->result, MA_UNAVAILABLE);\n\n            job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER_NODE);\n            job.order = ma_resource_manager_data_buffer_node_next_execution_order(pDataBufferNode);\n            job.data.resourceManager.freeDataBufferNode.pResourceManager = pResourceManager;\n            job.data.resourceManager.freeDataBufferNode.pDataBufferNode  = pDataBufferNode;\n\n            result = ma_resource_manager_post_job(pResourceManager, &job);\n            if (result != MA_SUCCESS) {\n                ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, \"Failed to post MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER_NODE job. %s.\\n\", ma_result_description(result));\n                return result;\n            }\n\n            /* If we don't support threading, process the job queue here. */\n            if (ma_resource_manager_is_threading_enabled(pResourceManager) == MA_FALSE) {\n                while (ma_resource_manager_data_buffer_node_result(pDataBufferNode) == MA_BUSY) {\n                    result = ma_resource_manager_process_next_job(pResourceManager);\n                    if (result == MA_NO_DATA_AVAILABLE || result == MA_CANCELLED) {\n                        result = MA_SUCCESS;\n                        break;\n                    }\n                }\n            } else {\n                /* Threading is enabled. The job queue will deal with the rest of the cleanup from here. */\n            }\n        } else {\n            /* The sound isn't loading so we can just free the node here. */\n            ma_resource_manager_data_buffer_node_free(pResourceManager, pDataBufferNode);\n        }\n    }\n\n    return result;\n}\n\n\n\nstatic ma_uint32 ma_resource_manager_data_buffer_next_execution_order(ma_resource_manager_data_buffer* pDataBuffer)\n{\n    MA_ASSERT(pDataBuffer != NULL);\n    return ma_atomic_fetch_add_32(&pDataBuffer->executionCounter, 1);\n}\n\nstatic ma_result ma_resource_manager_data_buffer_cb__read_pcm_frames(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    return ma_resource_manager_data_buffer_read_pcm_frames((ma_resource_manager_data_buffer*)pDataSource, pFramesOut, frameCount, pFramesRead);\n}\n\nstatic ma_result ma_resource_manager_data_buffer_cb__seek_to_pcm_frame(ma_data_source* pDataSource, ma_uint64 frameIndex)\n{\n    return ma_resource_manager_data_buffer_seek_to_pcm_frame((ma_resource_manager_data_buffer*)pDataSource, frameIndex);\n}\n\nstatic ma_result ma_resource_manager_data_buffer_cb__get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    return ma_resource_manager_data_buffer_get_data_format((ma_resource_manager_data_buffer*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap);\n}\n\nstatic ma_result ma_resource_manager_data_buffer_cb__get_cursor_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pCursor)\n{\n    return ma_resource_manager_data_buffer_get_cursor_in_pcm_frames((ma_resource_manager_data_buffer*)pDataSource, pCursor);\n}\n\nstatic ma_result ma_resource_manager_data_buffer_cb__get_length_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pLength)\n{\n    return ma_resource_manager_data_buffer_get_length_in_pcm_frames((ma_resource_manager_data_buffer*)pDataSource, pLength);\n}\n\nstatic ma_result ma_resource_manager_data_buffer_cb__set_looping(ma_data_source* pDataSource, ma_bool32 isLooping)\n{\n    ma_resource_manager_data_buffer* pDataBuffer = (ma_resource_manager_data_buffer*)pDataSource;\n    MA_ASSERT(pDataBuffer != NULL);\n\n    ma_atomic_exchange_32(&pDataBuffer->isLooping, isLooping);\n\n    /* The looping state needs to be set on the connector as well or else looping won't work when we read audio data. */\n    ma_data_source_set_looping(ma_resource_manager_data_buffer_get_connector(pDataBuffer), isLooping);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_data_source_vtable g_ma_resource_manager_data_buffer_vtable =\n{\n    ma_resource_manager_data_buffer_cb__read_pcm_frames,\n    ma_resource_manager_data_buffer_cb__seek_to_pcm_frame,\n    ma_resource_manager_data_buffer_cb__get_data_format,\n    ma_resource_manager_data_buffer_cb__get_cursor_in_pcm_frames,\n    ma_resource_manager_data_buffer_cb__get_length_in_pcm_frames,\n    ma_resource_manager_data_buffer_cb__set_looping,\n    0\n};\n\nstatic ma_result ma_resource_manager_data_buffer_init_ex_internal(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_uint32 hashedName32, ma_resource_manager_data_buffer* pDataBuffer)\n{\n    ma_result result = MA_SUCCESS;\n    ma_resource_manager_data_buffer_node* pDataBufferNode;\n    ma_data_source_config dataSourceConfig;\n    ma_bool32 async;\n    ma_uint32 flags;\n    ma_resource_manager_pipeline_notifications notifications;\n\n    if (pDataBuffer == NULL) {\n        if (pConfig != NULL && pConfig->pNotifications != NULL) {\n            ma_resource_manager_pipeline_notifications_signal_all_notifications(pConfig->pNotifications);\n        }\n\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pDataBuffer);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->pNotifications != NULL) {\n        notifications = *pConfig->pNotifications;   /* From here on out we should be referencing `notifications` instead of `pNotifications`. Set this to NULL to catch errors at testing time. */\n    } else {\n        MA_ZERO_OBJECT(&notifications);\n    }\n\n    /* For safety, always remove the ASYNC flag if threading is disabled on the resource manager. */\n    flags = pConfig->flags;\n    if (ma_resource_manager_is_threading_enabled(pResourceManager) == MA_FALSE) {\n        flags &= ~MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC;\n    }\n\n    async = (flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) != 0;\n\n    /*\n    Fences need to be acquired before doing anything. These must be acquired and released outside of\n    the node to ensure there's no holes where ma_fence_wait() could prematurely return before the\n    data buffer has completed initialization.\n\n    When loading asynchronously, the node acquisition routine below will acquire the fences on this\n    thread and then release them on the async thread when the operation is complete.\n\n    These fences are always released at the \"done\" tag at the end of this function. They'll be\n    acquired a second if loading asynchronously. This double acquisition system is just done to\n    simplify code maintanence.\n    */\n    ma_resource_manager_pipeline_notifications_acquire_all_fences(&notifications);\n    {\n        /* We first need to acquire a node. If ASYNC is not set, this will not return until the entire sound has been loaded. */\n        result = ma_resource_manager_data_buffer_node_acquire(pResourceManager, pConfig->pFilePath, pConfig->pFilePathW, hashedName32, flags, NULL, notifications.init.pFence, notifications.done.pFence, &pDataBufferNode);\n        if (result != MA_SUCCESS) {\n            ma_resource_manager_pipeline_notifications_signal_all_notifications(&notifications);\n            goto done;\n        }\n\n        dataSourceConfig = ma_data_source_config_init();\n        dataSourceConfig.vtable = &g_ma_resource_manager_data_buffer_vtable;\n\n        result = ma_data_source_init(&dataSourceConfig, &pDataBuffer->ds);\n        if (result != MA_SUCCESS) {\n            ma_resource_manager_data_buffer_node_unacquire(pResourceManager, pDataBufferNode, NULL, NULL);\n            ma_resource_manager_pipeline_notifications_signal_all_notifications(&notifications);\n            goto done;\n        }\n\n        pDataBuffer->pResourceManager = pResourceManager;\n        pDataBuffer->pNode  = pDataBufferNode;\n        pDataBuffer->flags  = flags;\n        pDataBuffer->result = MA_BUSY;  /* Always default to MA_BUSY for safety. It'll be overwritten when loading completes or an error occurs. */\n\n        /* If we're loading asynchronously we need to post a job to the job queue to initialize the connector. */\n        if (async == MA_FALSE || ma_resource_manager_data_buffer_node_result(pDataBufferNode) == MA_SUCCESS) {\n            /* Loading synchronously or the data has already been fully loaded. We can just initialize the connector from here without a job. */\n            result = ma_resource_manager_data_buffer_init_connector(pDataBuffer, pConfig, NULL, NULL);\n            ma_atomic_exchange_i32(&pDataBuffer->result, result);\n\n            ma_resource_manager_pipeline_notifications_signal_all_notifications(&notifications);\n            goto done;\n        } else {\n            /* The node's data supply isn't initialized yet. The caller has requested that we load asynchronously so we need to post a job to do this. */\n            ma_job job;\n            ma_resource_manager_inline_notification initNotification;   /* Used when the WAIT_INIT flag is set. */\n\n            if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) {\n                ma_resource_manager_inline_notification_init(pResourceManager, &initNotification);\n            }\n\n            /*\n            The status of the data buffer needs to be set to MA_BUSY before posting the job so that the\n            worker thread is aware of it's busy state. If the LOAD_DATA_BUFFER job sees a status other\n            than MA_BUSY, it'll assume an error and fall through to an early exit.\n            */\n            ma_atomic_exchange_i32(&pDataBuffer->result, MA_BUSY);\n\n            /* Acquire fences a second time. These will be released by the async thread. */\n            ma_resource_manager_pipeline_notifications_acquire_all_fences(&notifications);\n\n            job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER);\n            job.order = ma_resource_manager_data_buffer_next_execution_order(pDataBuffer);\n            job.data.resourceManager.loadDataBuffer.pDataBuffer             = pDataBuffer;\n            job.data.resourceManager.loadDataBuffer.pInitNotification       = ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) ? &initNotification : notifications.init.pNotification;\n            job.data.resourceManager.loadDataBuffer.pDoneNotification       = notifications.done.pNotification;\n            job.data.resourceManager.loadDataBuffer.pInitFence              = notifications.init.pFence;\n            job.data.resourceManager.loadDataBuffer.pDoneFence              = notifications.done.pFence;\n            job.data.resourceManager.loadDataBuffer.rangeBegInPCMFrames     = pConfig->rangeBegInPCMFrames;\n            job.data.resourceManager.loadDataBuffer.rangeEndInPCMFrames     = pConfig->rangeEndInPCMFrames;\n            job.data.resourceManager.loadDataBuffer.loopPointBegInPCMFrames = pConfig->loopPointBegInPCMFrames;\n            job.data.resourceManager.loadDataBuffer.loopPointEndInPCMFrames = pConfig->loopPointEndInPCMFrames;\n            job.data.resourceManager.loadDataBuffer.isLooping               = pConfig->isLooping;\n\n            /* If we need to wait for initialization to complete we can just process the job in place. */\n            if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) {\n                result = ma_job_process(&job);\n            } else {\n                result = ma_resource_manager_post_job(pResourceManager, &job);\n            }\n\n            if (result != MA_SUCCESS) {\n                /* We failed to post the job. Most likely there isn't enough room in the queue's buffer. */\n                ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, \"Failed to post MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_BUFFER job. %s.\\n\", ma_result_description(result));\n                ma_atomic_exchange_i32(&pDataBuffer->result, result);\n\n                /* Release the fences after the result has been set on the data buffer. */\n                ma_resource_manager_pipeline_notifications_release_all_fences(&notifications);\n            } else {\n                if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) {\n                    ma_resource_manager_inline_notification_wait(&initNotification);\n\n                    if (notifications.init.pNotification != NULL) {\n                        ma_async_notification_signal(notifications.init.pNotification);\n                    }\n\n                    /* NOTE: Do not release the init fence here. It will have been done by the job. */\n\n                    /* Make sure we return an error if initialization failed on the async thread. */\n                    result = ma_resource_manager_data_buffer_result(pDataBuffer);\n                    if (result == MA_BUSY) {\n                        result  = MA_SUCCESS;\n                    }\n                }\n            }\n\n            if ((flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) {\n                ma_resource_manager_inline_notification_uninit(&initNotification);\n            }\n        }\n\n        if (result != MA_SUCCESS) {\n            ma_resource_manager_data_buffer_node_unacquire(pResourceManager, pDataBufferNode, NULL, NULL);\n            goto done;\n        }\n    }\ndone:\n    if (result == MA_SUCCESS) {\n        if (pConfig->initialSeekPointInPCMFrames > 0) {\n            ma_resource_manager_data_buffer_seek_to_pcm_frame(pDataBuffer, pConfig->initialSeekPointInPCMFrames);\n        }\n    }\n\n    ma_resource_manager_pipeline_notifications_release_all_fences(&notifications);\n\n    return result;\n}\n\nMA_API ma_result ma_resource_manager_data_buffer_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_buffer* pDataBuffer)\n{\n    return ma_resource_manager_data_buffer_init_ex_internal(pResourceManager, pConfig, 0, pDataBuffer);\n}\n\nMA_API ma_result ma_resource_manager_data_buffer_init(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_buffer* pDataBuffer)\n{\n    ma_resource_manager_data_source_config config;\n\n    config = ma_resource_manager_data_source_config_init();\n    config.pFilePath      = pFilePath;\n    config.flags          = flags;\n    config.pNotifications = pNotifications;\n\n    return ma_resource_manager_data_buffer_init_ex(pResourceManager, &config, pDataBuffer);\n}\n\nMA_API ma_result ma_resource_manager_data_buffer_init_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_buffer* pDataBuffer)\n{\n    ma_resource_manager_data_source_config config;\n\n    config = ma_resource_manager_data_source_config_init();\n    config.pFilePathW     = pFilePath;\n    config.flags          = flags;\n    config.pNotifications = pNotifications;\n\n    return ma_resource_manager_data_buffer_init_ex(pResourceManager, &config, pDataBuffer);\n}\n\nMA_API ma_result ma_resource_manager_data_buffer_init_copy(ma_resource_manager* pResourceManager, const ma_resource_manager_data_buffer* pExistingDataBuffer, ma_resource_manager_data_buffer* pDataBuffer)\n{\n    ma_resource_manager_data_source_config config;\n\n    if (pExistingDataBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ASSERT(pExistingDataBuffer->pNode != NULL);  /* <-- If you've triggered this, you've passed in an invalid existing data buffer. */\n\n    config = ma_resource_manager_data_source_config_init();\n    config.flags = pExistingDataBuffer->flags;\n\n    return ma_resource_manager_data_buffer_init_ex_internal(pResourceManager, &config, pExistingDataBuffer->pNode->hashedName32, pDataBuffer);\n}\n\nstatic ma_result ma_resource_manager_data_buffer_uninit_internal(ma_resource_manager_data_buffer* pDataBuffer)\n{\n    MA_ASSERT(pDataBuffer != NULL);\n\n    /* The connector should be uninitialized first. */\n    ma_resource_manager_data_buffer_uninit_connector(pDataBuffer->pResourceManager, pDataBuffer);\n\n    /* With the connector uninitialized we can unacquire the node. */\n    ma_resource_manager_data_buffer_node_unacquire(pDataBuffer->pResourceManager, pDataBuffer->pNode, NULL, NULL);\n\n    /* The base data source needs to be uninitialized as well. */\n    ma_data_source_uninit(&pDataBuffer->ds);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_resource_manager_data_buffer_uninit(ma_resource_manager_data_buffer* pDataBuffer)\n{\n    ma_result result;\n\n    if (pDataBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (ma_resource_manager_data_buffer_result(pDataBuffer) == MA_SUCCESS) {\n        /* The data buffer can be deleted synchronously. */\n        return ma_resource_manager_data_buffer_uninit_internal(pDataBuffer);\n    } else {\n        /*\n        The data buffer needs to be deleted asynchronously because it's still loading. With the status set to MA_UNAVAILABLE, no more pages will\n        be loaded and the uninitialization should happen fairly quickly. Since the caller owns the data buffer, we need to wait for this event\n        to get processed before returning.\n        */\n        ma_resource_manager_inline_notification notification;\n        ma_job job;\n\n        /*\n        We need to mark the node as unavailable so we don't try reading from it anymore, but also to\n        let the loading thread know that it needs to abort it's loading procedure.\n        */\n        ma_atomic_exchange_i32(&pDataBuffer->result, MA_UNAVAILABLE);\n\n        result = ma_resource_manager_inline_notification_init(pDataBuffer->pResourceManager, &notification);\n        if (result != MA_SUCCESS) {\n            return result;  /* Failed to create the notification. This should rarely, if ever, happen. */\n        }\n\n        job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER);\n        job.order = ma_resource_manager_data_buffer_next_execution_order(pDataBuffer);\n        job.data.resourceManager.freeDataBuffer.pDataBuffer       = pDataBuffer;\n        job.data.resourceManager.freeDataBuffer.pDoneNotification = &notification;\n        job.data.resourceManager.freeDataBuffer.pDoneFence        = NULL;\n\n        result = ma_resource_manager_post_job(pDataBuffer->pResourceManager, &job);\n        if (result != MA_SUCCESS) {\n            ma_resource_manager_inline_notification_uninit(&notification);\n            return result;\n        }\n\n        ma_resource_manager_inline_notification_wait_and_uninit(&notification);\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_resource_manager_data_buffer_read_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint64 framesRead = 0;\n    ma_bool32 isDecodedBufferBusy = MA_FALSE;\n\n    /* Safety. */\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    if (frameCount == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    /*\n    We cannot be using the data buffer after it's been uninitialized. If you trigger this assert it means you're trying to read from the data buffer after\n    it's been uninitialized or is in the process of uninitializing.\n    */\n    MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE);\n\n    /* If the node is not initialized we need to abort with a busy code. */\n    if (ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE) {\n        return MA_BUSY; /* Still loading. */\n    }\n\n    /*\n    If we've got a seek scheduled we'll want to do that before reading. However, for paged buffers, there's\n    a chance that the sound hasn't yet been decoded up to the seek point will result in the seek failing. If\n    this happens, we need to keep the seek scheduled and return MA_BUSY.\n    */\n    if (pDataBuffer->seekToCursorOnNextRead) {\n        pDataBuffer->seekToCursorOnNextRead = MA_FALSE;\n\n        result = ma_data_source_seek_to_pcm_frame(ma_resource_manager_data_buffer_get_connector(pDataBuffer), pDataBuffer->seekTargetInPCMFrames);\n        if (result != MA_SUCCESS) {\n            if (result == MA_BAD_SEEK && ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode) == ma_resource_manager_data_supply_type_decoded_paged) {\n                pDataBuffer->seekToCursorOnNextRead = MA_TRUE;  /* Keep the seek scheduled. We just haven't loaded enough data yet to do the seek properly. */\n                return MA_BUSY;\n            }\n\n            return result;\n        }\n    }\n\n    /*\n    For decoded buffers (not paged) we need to check beforehand how many frames we have available. We cannot\n    exceed this amount. We'll read as much as we can, and then return MA_BUSY.\n    */\n    if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode) == ma_resource_manager_data_supply_type_decoded) {\n        ma_uint64 availableFrames;\n\n        isDecodedBufferBusy = (ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) == MA_BUSY);\n\n        if (ma_resource_manager_data_buffer_get_available_frames(pDataBuffer, &availableFrames) == MA_SUCCESS) {\n            /* Don't try reading more than the available frame count. */\n            if (frameCount > availableFrames) {\n                frameCount = availableFrames;\n\n                /*\n                If there's no frames available we want to set the status to MA_AT_END. The logic below\n                will check if the node is busy, and if so, change it to MA_BUSY. The reason we do this\n                is because we don't want to call `ma_data_source_read_pcm_frames()` if the frame count\n                is 0 because that'll result in a situation where it's possible MA_AT_END won't get\n                returned.\n                */\n                if (frameCount == 0) {\n                    result = MA_AT_END;\n                }\n            } else {\n                isDecodedBufferBusy = MA_FALSE; /* We have enough frames available in the buffer to avoid a MA_BUSY status. */\n            }\n        }\n    }\n\n    /* Don't attempt to read anything if we've got no frames available. */\n    if (frameCount > 0) {\n        result = ma_data_source_read_pcm_frames(ma_resource_manager_data_buffer_get_connector(pDataBuffer), pFramesOut, frameCount, &framesRead);\n    }\n\n    /*\n    If we returned MA_AT_END, but the node is still loading, we don't want to return that code or else the caller will interpret the sound\n    as at the end and terminate decoding.\n    */\n    if (result == MA_AT_END) {\n        if (ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) == MA_BUSY) {\n            result = MA_BUSY;\n        }\n    }\n\n    if (isDecodedBufferBusy) {\n        result = MA_BUSY;\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = framesRead;\n    }\n\n    if (result == MA_SUCCESS && framesRead == 0) {\n        result  = MA_AT_END;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_resource_manager_data_buffer_seek_to_pcm_frame(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64 frameIndex)\n{\n    ma_result result;\n\n    /* We cannot be using the data source after it's been uninitialized. */\n    MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE);\n\n    /* If we haven't yet got a connector we need to abort. */\n    if (ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE) {\n        pDataBuffer->seekTargetInPCMFrames = frameIndex;\n        pDataBuffer->seekToCursorOnNextRead = MA_TRUE;\n        return MA_BUSY; /* Still loading. */\n    }\n\n    result = ma_data_source_seek_to_pcm_frame(ma_resource_manager_data_buffer_get_connector(pDataBuffer), frameIndex);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pDataBuffer->seekTargetInPCMFrames = ~(ma_uint64)0; /* <-- For identification purposes. */\n    pDataBuffer->seekToCursorOnNextRead = MA_FALSE;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_resource_manager_data_buffer_get_data_format(ma_resource_manager_data_buffer* pDataBuffer, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    /* We cannot be using the data source after it's been uninitialized. */\n    MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE);\n\n    switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode))\n    {\n        case ma_resource_manager_data_supply_type_encoded:\n        {\n            return ma_data_source_get_data_format(&pDataBuffer->connector.decoder, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap);\n        };\n\n        case ma_resource_manager_data_supply_type_decoded:\n        {\n            *pFormat     = pDataBuffer->pNode->data.backend.decoded.format;\n            *pChannels   = pDataBuffer->pNode->data.backend.decoded.channels;\n            *pSampleRate = pDataBuffer->pNode->data.backend.decoded.sampleRate;\n            ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pDataBuffer->pNode->data.backend.decoded.channels);\n            return MA_SUCCESS;\n        };\n\n        case ma_resource_manager_data_supply_type_decoded_paged:\n        {\n            *pFormat     = pDataBuffer->pNode->data.backend.decodedPaged.data.format;\n            *pChannels   = pDataBuffer->pNode->data.backend.decodedPaged.data.channels;\n            *pSampleRate = pDataBuffer->pNode->data.backend.decodedPaged.sampleRate;\n            ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, pDataBuffer->pNode->data.backend.decoded.channels);\n            return MA_SUCCESS;\n        };\n\n        case ma_resource_manager_data_supply_type_unknown:\n        {\n            return MA_BUSY; /* Still loading. */\n        };\n\n        default:\n        {\n            /* Unknown supply type. Should never hit this. */\n            return MA_INVALID_ARGS;\n        }\n    }\n}\n\nMA_API ma_result ma_resource_manager_data_buffer_get_cursor_in_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pCursor)\n{\n    /* We cannot be using the data source after it's been uninitialized. */\n    MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE);\n\n    if (pDataBuffer == NULL || pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = 0;\n\n    switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode))\n    {\n        case ma_resource_manager_data_supply_type_encoded:\n        {\n            return ma_decoder_get_cursor_in_pcm_frames(&pDataBuffer->connector.decoder, pCursor);\n        };\n\n        case ma_resource_manager_data_supply_type_decoded:\n        {\n            return ma_audio_buffer_get_cursor_in_pcm_frames(&pDataBuffer->connector.buffer, pCursor);\n        };\n\n        case ma_resource_manager_data_supply_type_decoded_paged:\n        {\n            return ma_paged_audio_buffer_get_cursor_in_pcm_frames(&pDataBuffer->connector.pagedBuffer, pCursor);\n        };\n\n        case ma_resource_manager_data_supply_type_unknown:\n        {\n            return MA_BUSY;\n        };\n\n        default:\n        {\n            return MA_INVALID_ARGS;\n        }\n    }\n}\n\nMA_API ma_result ma_resource_manager_data_buffer_get_length_in_pcm_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pLength)\n{\n    /* We cannot be using the data source after it's been uninitialized. */\n    MA_ASSERT(ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) != MA_UNAVAILABLE);\n\n    if (pDataBuffer == NULL || pLength == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode) == ma_resource_manager_data_supply_type_unknown) {\n        return MA_BUSY; /* Still loading. */\n    }\n\n    return ma_data_source_get_length_in_pcm_frames(ma_resource_manager_data_buffer_get_connector(pDataBuffer), pLength);\n}\n\nMA_API ma_result ma_resource_manager_data_buffer_result(const ma_resource_manager_data_buffer* pDataBuffer)\n{\n    if (pDataBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return (ma_result)ma_atomic_load_i32((ma_result*)&pDataBuffer->result);    /* Need a naughty const-cast here. */\n}\n\nMA_API ma_result ma_resource_manager_data_buffer_set_looping(ma_resource_manager_data_buffer* pDataBuffer, ma_bool32 isLooping)\n{\n    return ma_data_source_set_looping(pDataBuffer, isLooping);\n}\n\nMA_API ma_bool32 ma_resource_manager_data_buffer_is_looping(const ma_resource_manager_data_buffer* pDataBuffer)\n{\n    return ma_data_source_is_looping(pDataBuffer);\n}\n\nMA_API ma_result ma_resource_manager_data_buffer_get_available_frames(ma_resource_manager_data_buffer* pDataBuffer, ma_uint64* pAvailableFrames)\n{\n    if (pAvailableFrames == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pAvailableFrames = 0;\n\n    if (pDataBuffer == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode) == ma_resource_manager_data_supply_type_unknown) {\n        if (ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode) == MA_BUSY) {\n            return MA_BUSY;\n        } else {\n            return MA_INVALID_OPERATION;    /* No connector. */\n        }\n    }\n\n    switch (ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode))\n    {\n        case ma_resource_manager_data_supply_type_encoded:\n        {\n            return ma_decoder_get_available_frames(&pDataBuffer->connector.decoder, pAvailableFrames);\n        };\n\n        case ma_resource_manager_data_supply_type_decoded:\n        {\n            return ma_audio_buffer_get_available_frames(&pDataBuffer->connector.buffer, pAvailableFrames);\n        };\n\n        case ma_resource_manager_data_supply_type_decoded_paged:\n        {\n            ma_uint64 cursor;\n            ma_paged_audio_buffer_get_cursor_in_pcm_frames(&pDataBuffer->connector.pagedBuffer, &cursor);\n\n            if (pDataBuffer->pNode->data.backend.decodedPaged.decodedFrameCount > cursor) {\n                *pAvailableFrames = pDataBuffer->pNode->data.backend.decodedPaged.decodedFrameCount - cursor;\n            } else {\n                *pAvailableFrames = 0;\n            }\n\n            return MA_SUCCESS;\n        };\n\n        case ma_resource_manager_data_supply_type_unknown:\n        default:\n        {\n            /* Unknown supply type. Should never hit this. */\n            return MA_INVALID_ARGS;\n        }\n    }\n}\n\nMA_API ma_result ma_resource_manager_register_file(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags)\n{\n    return ma_resource_manager_data_buffer_node_acquire(pResourceManager, pFilePath, NULL, 0, flags, NULL, NULL, NULL, NULL);\n}\n\nMA_API ma_result ma_resource_manager_register_file_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags)\n{\n    return ma_resource_manager_data_buffer_node_acquire(pResourceManager, NULL, pFilePath, 0, flags, NULL, NULL, NULL, NULL);\n}\n\n\nstatic ma_result ma_resource_manager_register_data(ma_resource_manager* pResourceManager, const char* pName, const wchar_t* pNameW, ma_resource_manager_data_supply* pExistingData)\n{\n    return ma_resource_manager_data_buffer_node_acquire(pResourceManager, pName, pNameW, 0, 0, pExistingData, NULL, NULL, NULL);\n}\n\nstatic ma_result ma_resource_manager_register_decoded_data_internal(ma_resource_manager* pResourceManager, const char* pName, const wchar_t* pNameW, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate)\n{\n    ma_resource_manager_data_supply data;\n    data.type                            = ma_resource_manager_data_supply_type_decoded;\n    data.backend.decoded.pData           = pData;\n    data.backend.decoded.totalFrameCount = frameCount;\n    data.backend.decoded.format          = format;\n    data.backend.decoded.channels        = channels;\n    data.backend.decoded.sampleRate      = sampleRate;\n\n    return ma_resource_manager_register_data(pResourceManager, pName, pNameW, &data);\n}\n\nMA_API ma_result ma_resource_manager_register_decoded_data(ma_resource_manager* pResourceManager, const char* pName, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate)\n{\n    return ma_resource_manager_register_decoded_data_internal(pResourceManager, pName, NULL, pData, frameCount, format, channels, sampleRate);\n}\n\nMA_API ma_result ma_resource_manager_register_decoded_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName, const void* pData, ma_uint64 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate)\n{\n    return ma_resource_manager_register_decoded_data_internal(pResourceManager, NULL, pName, pData, frameCount, format, channels, sampleRate);\n}\n\n\nstatic ma_result ma_resource_manager_register_encoded_data_internal(ma_resource_manager* pResourceManager, const char* pName, const wchar_t* pNameW, const void* pData, size_t sizeInBytes)\n{\n    ma_resource_manager_data_supply data;\n    data.type                        = ma_resource_manager_data_supply_type_encoded;\n    data.backend.encoded.pData       = pData;\n    data.backend.encoded.sizeInBytes = sizeInBytes;\n\n    return ma_resource_manager_register_data(pResourceManager, pName, pNameW, &data);\n}\n\nMA_API ma_result ma_resource_manager_register_encoded_data(ma_resource_manager* pResourceManager, const char* pName, const void* pData, size_t sizeInBytes)\n{\n    return ma_resource_manager_register_encoded_data_internal(pResourceManager, pName, NULL, pData, sizeInBytes);\n}\n\nMA_API ma_result ma_resource_manager_register_encoded_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName, const void* pData, size_t sizeInBytes)\n{\n    return ma_resource_manager_register_encoded_data_internal(pResourceManager, NULL, pName, pData, sizeInBytes);\n}\n\n\nMA_API ma_result ma_resource_manager_unregister_file(ma_resource_manager* pResourceManager, const char* pFilePath)\n{\n    return ma_resource_manager_unregister_data(pResourceManager, pFilePath);\n}\n\nMA_API ma_result ma_resource_manager_unregister_file_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath)\n{\n    return ma_resource_manager_unregister_data_w(pResourceManager, pFilePath);\n}\n\nMA_API ma_result ma_resource_manager_unregister_data(ma_resource_manager* pResourceManager, const char* pName)\n{\n    return ma_resource_manager_data_buffer_node_unacquire(pResourceManager, NULL, pName, NULL);\n}\n\nMA_API ma_result ma_resource_manager_unregister_data_w(ma_resource_manager* pResourceManager, const wchar_t* pName)\n{\n    return ma_resource_manager_data_buffer_node_unacquire(pResourceManager, NULL, NULL, pName);\n}\n\n\nstatic ma_uint32 ma_resource_manager_data_stream_next_execution_order(ma_resource_manager_data_stream* pDataStream)\n{\n    MA_ASSERT(pDataStream != NULL);\n    return ma_atomic_fetch_add_32(&pDataStream->executionCounter, 1);\n}\n\nstatic ma_bool32 ma_resource_manager_data_stream_is_decoder_at_end(const ma_resource_manager_data_stream* pDataStream)\n{\n    MA_ASSERT(pDataStream != NULL);\n    return ma_atomic_load_32((ma_bool32*)&pDataStream->isDecoderAtEnd);\n}\n\nstatic ma_uint32 ma_resource_manager_data_stream_seek_counter(const ma_resource_manager_data_stream* pDataStream)\n{\n    MA_ASSERT(pDataStream != NULL);\n    return ma_atomic_load_32((ma_uint32*)&pDataStream->seekCounter);\n}\n\n\nstatic ma_result ma_resource_manager_data_stream_cb__read_pcm_frames(ma_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    return ma_resource_manager_data_stream_read_pcm_frames((ma_resource_manager_data_stream*)pDataSource, pFramesOut, frameCount, pFramesRead);\n}\n\nstatic ma_result ma_resource_manager_data_stream_cb__seek_to_pcm_frame(ma_data_source* pDataSource, ma_uint64 frameIndex)\n{\n    return ma_resource_manager_data_stream_seek_to_pcm_frame((ma_resource_manager_data_stream*)pDataSource, frameIndex);\n}\n\nstatic ma_result ma_resource_manager_data_stream_cb__get_data_format(ma_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    return ma_resource_manager_data_stream_get_data_format((ma_resource_manager_data_stream*)pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap);\n}\n\nstatic ma_result ma_resource_manager_data_stream_cb__get_cursor_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pCursor)\n{\n    return ma_resource_manager_data_stream_get_cursor_in_pcm_frames((ma_resource_manager_data_stream*)pDataSource, pCursor);\n}\n\nstatic ma_result ma_resource_manager_data_stream_cb__get_length_in_pcm_frames(ma_data_source* pDataSource, ma_uint64* pLength)\n{\n    return ma_resource_manager_data_stream_get_length_in_pcm_frames((ma_resource_manager_data_stream*)pDataSource, pLength);\n}\n\nstatic ma_result ma_resource_manager_data_stream_cb__set_looping(ma_data_source* pDataSource, ma_bool32 isLooping)\n{\n    ma_resource_manager_data_stream* pDataStream = (ma_resource_manager_data_stream*)pDataSource;\n    MA_ASSERT(pDataStream != NULL);\n\n    ma_atomic_exchange_32(&pDataStream->isLooping, isLooping);\n\n    return MA_SUCCESS;\n}\n\nstatic ma_data_source_vtable g_ma_resource_manager_data_stream_vtable =\n{\n    ma_resource_manager_data_stream_cb__read_pcm_frames,\n    ma_resource_manager_data_stream_cb__seek_to_pcm_frame,\n    ma_resource_manager_data_stream_cb__get_data_format,\n    ma_resource_manager_data_stream_cb__get_cursor_in_pcm_frames,\n    ma_resource_manager_data_stream_cb__get_length_in_pcm_frames,\n    ma_resource_manager_data_stream_cb__set_looping,\n    0 /*MA_DATA_SOURCE_SELF_MANAGED_RANGE_AND_LOOP_POINT*/\n};\n\nstatic void ma_resource_manager_data_stream_set_absolute_cursor(ma_resource_manager_data_stream* pDataStream, ma_uint64 absoluteCursor)\n{\n    /* Loop if possible. */\n    if (absoluteCursor > pDataStream->totalLengthInPCMFrames && pDataStream->totalLengthInPCMFrames > 0) {\n        absoluteCursor = absoluteCursor % pDataStream->totalLengthInPCMFrames;\n    }\n\n    ma_atomic_exchange_64(&pDataStream->absoluteCursor, absoluteCursor);\n}\n\nMA_API ma_result ma_resource_manager_data_stream_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_stream* pDataStream)\n{\n    ma_result result;\n    ma_data_source_config dataSourceConfig;\n    char* pFilePathCopy = NULL;\n    wchar_t* pFilePathWCopy = NULL;\n    ma_job job;\n    ma_bool32 waitBeforeReturning = MA_FALSE;\n    ma_resource_manager_inline_notification waitNotification;\n    ma_resource_manager_pipeline_notifications notifications;\n\n    if (pDataStream == NULL) {\n        if (pConfig != NULL && pConfig->pNotifications != NULL) {\n            ma_resource_manager_pipeline_notifications_signal_all_notifications(pConfig->pNotifications);\n        }\n\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pDataStream);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->pNotifications != NULL) {\n        notifications = *pConfig->pNotifications;    /* From here on out, `notifications` should be used instead of `pNotifications`. Setting this to NULL to catch any errors at testing time. */\n    } else {\n        MA_ZERO_OBJECT(&notifications);\n    }\n\n    dataSourceConfig = ma_data_source_config_init();\n    dataSourceConfig.vtable = &g_ma_resource_manager_data_stream_vtable;\n\n    result = ma_data_source_init(&dataSourceConfig, &pDataStream->ds);\n    if (result != MA_SUCCESS) {\n        ma_resource_manager_pipeline_notifications_signal_all_notifications(&notifications);\n        return result;\n    }\n\n    pDataStream->pResourceManager = pResourceManager;\n    pDataStream->flags            = pConfig->flags;\n    pDataStream->result           = MA_BUSY;\n\n    ma_data_source_set_range_in_pcm_frames(pDataStream, pConfig->rangeBegInPCMFrames, pConfig->rangeEndInPCMFrames);\n    ma_data_source_set_loop_point_in_pcm_frames(pDataStream, pConfig->loopPointBegInPCMFrames, pConfig->loopPointEndInPCMFrames);\n    ma_data_source_set_looping(pDataStream, pConfig->isLooping);\n\n    if (pResourceManager == NULL || (pConfig->pFilePath == NULL && pConfig->pFilePathW == NULL)) {\n        ma_resource_manager_pipeline_notifications_signal_all_notifications(&notifications);\n        return MA_INVALID_ARGS;\n    }\n\n    /* We want all access to the VFS and the internal decoder to happen on the job thread just to keep things easier to manage for the VFS.  */\n\n    /* We need a copy of the file path. We should probably make this more efficient, but for now we'll do a transient memory allocation. */\n    if (pConfig->pFilePath != NULL) {\n        pFilePathCopy  = ma_copy_string(pConfig->pFilePath, &pResourceManager->config.allocationCallbacks);\n    } else {\n        pFilePathWCopy = ma_copy_string_w(pConfig->pFilePathW, &pResourceManager->config.allocationCallbacks);\n    }\n\n    if (pFilePathCopy == NULL && pFilePathWCopy == NULL) {\n        ma_resource_manager_pipeline_notifications_signal_all_notifications(&notifications);\n        return MA_OUT_OF_MEMORY;\n    }\n\n    /*\n    We need to check for the presence of MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC. If it's not set, we need to wait before returning. Otherwise we\n    can return immediately. Likewise, we'll also check for MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT and do the same.\n    */\n    if ((pConfig->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC) == 0 || (pConfig->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT) != 0) {\n        waitBeforeReturning = MA_TRUE;\n        ma_resource_manager_inline_notification_init(pResourceManager, &waitNotification);\n    }\n\n    ma_resource_manager_pipeline_notifications_acquire_all_fences(&notifications);\n\n    /* Set the absolute cursor to our initial seek position so retrieval of the cursor returns a good value. */\n    ma_resource_manager_data_stream_set_absolute_cursor(pDataStream, pConfig->initialSeekPointInPCMFrames);\n\n    /* We now have everything we need to post the job. This is the last thing we need to do from here. The rest will be done by the job thread. */\n    job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_LOAD_DATA_STREAM);\n    job.order = ma_resource_manager_data_stream_next_execution_order(pDataStream);\n    job.data.resourceManager.loadDataStream.pDataStream       = pDataStream;\n    job.data.resourceManager.loadDataStream.pFilePath         = pFilePathCopy;\n    job.data.resourceManager.loadDataStream.pFilePathW        = pFilePathWCopy;\n    job.data.resourceManager.loadDataStream.initialSeekPoint  = pConfig->initialSeekPointInPCMFrames;\n    job.data.resourceManager.loadDataStream.pInitNotification = (waitBeforeReturning == MA_TRUE) ? &waitNotification : notifications.init.pNotification;\n    job.data.resourceManager.loadDataStream.pInitFence        = notifications.init.pFence;\n    result = ma_resource_manager_post_job(pResourceManager, &job);\n    if (result != MA_SUCCESS) {\n        ma_resource_manager_pipeline_notifications_signal_all_notifications(&notifications);\n        ma_resource_manager_pipeline_notifications_release_all_fences(&notifications);\n\n        if (waitBeforeReturning) {\n            ma_resource_manager_inline_notification_uninit(&waitNotification);\n        }\n\n        ma_free(pFilePathCopy,  &pResourceManager->config.allocationCallbacks);\n        ma_free(pFilePathWCopy, &pResourceManager->config.allocationCallbacks);\n        return result;\n    }\n\n    /* Wait if needed. */\n    if (waitBeforeReturning) {\n        ma_resource_manager_inline_notification_wait_and_uninit(&waitNotification);\n\n        if (notifications.init.pNotification != NULL) {\n            ma_async_notification_signal(notifications.init.pNotification);\n        }\n\n        /*\n        If there was an error during initialization make sure we return that result here. We don't want to do this\n        if we're not waiting because it will most likely be in a busy state.\n        */\n        if (pDataStream->result != MA_SUCCESS) {\n            return pDataStream->result;\n        }\n\n        /* NOTE: Do not release pInitFence here. That will be done by the job. */\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_resource_manager_data_stream_init(ma_resource_manager* pResourceManager, const char* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_stream* pDataStream)\n{\n    ma_resource_manager_data_source_config config;\n\n    config = ma_resource_manager_data_source_config_init();\n    config.pFilePath      = pFilePath;\n    config.flags          = flags;\n    config.pNotifications = pNotifications;\n\n    return ma_resource_manager_data_stream_init_ex(pResourceManager, &config, pDataStream);\n}\n\nMA_API ma_result ma_resource_manager_data_stream_init_w(ma_resource_manager* pResourceManager, const wchar_t* pFilePath, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_stream* pDataStream)\n{\n    ma_resource_manager_data_source_config config;\n\n    config = ma_resource_manager_data_source_config_init();\n    config.pFilePathW     = pFilePath;\n    config.flags          = flags;\n    config.pNotifications = pNotifications;\n\n    return ma_resource_manager_data_stream_init_ex(pResourceManager, &config, pDataStream);\n}\n\nMA_API ma_result ma_resource_manager_data_stream_uninit(ma_resource_manager_data_stream* pDataStream)\n{\n    ma_resource_manager_inline_notification freeEvent;\n    ma_job job;\n\n    if (pDataStream == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The first thing to do is set the result to unavailable. This will prevent future page decoding. */\n    ma_atomic_exchange_i32(&pDataStream->result, MA_UNAVAILABLE);\n\n    /*\n    We need to post a job to ensure we're not in the middle or decoding or anything. Because the object is owned by the caller, we'll need\n    to wait for it to complete before returning which means we need an event.\n    */\n    ma_resource_manager_inline_notification_init(pDataStream->pResourceManager, &freeEvent);\n\n    job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_STREAM);\n    job.order = ma_resource_manager_data_stream_next_execution_order(pDataStream);\n    job.data.resourceManager.freeDataStream.pDataStream       = pDataStream;\n    job.data.resourceManager.freeDataStream.pDoneNotification = &freeEvent;\n    job.data.resourceManager.freeDataStream.pDoneFence        = NULL;\n    ma_resource_manager_post_job(pDataStream->pResourceManager, &job);\n\n    /* We need to wait for the job to finish processing before we return. */\n    ma_resource_manager_inline_notification_wait_and_uninit(&freeEvent);\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_uint32 ma_resource_manager_data_stream_get_page_size_in_frames(ma_resource_manager_data_stream* pDataStream)\n{\n    MA_ASSERT(pDataStream != NULL);\n    MA_ASSERT(pDataStream->isDecoderInitialized == MA_TRUE);\n\n    return MA_RESOURCE_MANAGER_PAGE_SIZE_IN_MILLISECONDS * (pDataStream->decoder.outputSampleRate/1000);\n}\n\nstatic void* ma_resource_manager_data_stream_get_page_data_pointer(ma_resource_manager_data_stream* pDataStream, ma_uint32 pageIndex, ma_uint32 relativeCursor)\n{\n    MA_ASSERT(pDataStream != NULL);\n    MA_ASSERT(pDataStream->isDecoderInitialized == MA_TRUE);\n    MA_ASSERT(pageIndex == 0 || pageIndex == 1);\n\n    return ma_offset_ptr(pDataStream->pPageData, ((ma_resource_manager_data_stream_get_page_size_in_frames(pDataStream) * pageIndex) + relativeCursor) * ma_get_bytes_per_frame(pDataStream->decoder.outputFormat, pDataStream->decoder.outputChannels));\n}\n\nstatic void ma_resource_manager_data_stream_fill_page(ma_resource_manager_data_stream* pDataStream, ma_uint32 pageIndex)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint64 pageSizeInFrames;\n    ma_uint64 totalFramesReadForThisPage = 0;\n    void* pPageData = ma_resource_manager_data_stream_get_page_data_pointer(pDataStream, pageIndex, 0);\n\n    pageSizeInFrames = ma_resource_manager_data_stream_get_page_size_in_frames(pDataStream);\n\n    /* The decoder needs to inherit the stream's looping and range state. */\n    {\n        ma_uint64 rangeBeg;\n        ma_uint64 rangeEnd;\n        ma_uint64 loopPointBeg;\n        ma_uint64 loopPointEnd;\n\n        ma_data_source_set_looping(&pDataStream->decoder, ma_resource_manager_data_stream_is_looping(pDataStream));\n\n        ma_data_source_get_range_in_pcm_frames(pDataStream, &rangeBeg, &rangeEnd);\n        ma_data_source_set_range_in_pcm_frames(&pDataStream->decoder, rangeBeg, rangeEnd);\n\n        ma_data_source_get_loop_point_in_pcm_frames(pDataStream, &loopPointBeg, &loopPointEnd);\n        ma_data_source_set_loop_point_in_pcm_frames(&pDataStream->decoder, loopPointBeg, loopPointEnd);\n    }\n\n    /* Just read straight from the decoder. It will deal with ranges and looping for us. */\n    result = ma_data_source_read_pcm_frames(&pDataStream->decoder, pPageData, pageSizeInFrames, &totalFramesReadForThisPage);\n    if (result == MA_AT_END || totalFramesReadForThisPage < pageSizeInFrames) {\n        ma_atomic_exchange_32(&pDataStream->isDecoderAtEnd, MA_TRUE);\n    }\n\n    ma_atomic_exchange_32(&pDataStream->pageFrameCount[pageIndex], (ma_uint32)totalFramesReadForThisPage);\n    ma_atomic_exchange_32(&pDataStream->isPageValid[pageIndex], MA_TRUE);\n}\n\nstatic void ma_resource_manager_data_stream_fill_pages(ma_resource_manager_data_stream* pDataStream)\n{\n    ma_uint32 iPage;\n\n    MA_ASSERT(pDataStream != NULL);\n\n    for (iPage = 0; iPage < 2; iPage += 1) {\n        ma_resource_manager_data_stream_fill_page(pDataStream, iPage);\n    }\n}\n\n\nstatic ma_result ma_resource_manager_data_stream_map(ma_resource_manager_data_stream* pDataStream, void** ppFramesOut, ma_uint64* pFrameCount)\n{\n    ma_uint64 framesAvailable;\n    ma_uint64 frameCount = 0;\n\n    /* We cannot be using the data source after it's been uninitialized. */\n    MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE);\n\n    if (pFrameCount != NULL) {\n        frameCount = *pFrameCount;\n        *pFrameCount = 0;\n    }\n    if (ppFramesOut != NULL) {\n        *ppFramesOut = NULL;\n    }\n\n    if (pDataStream == NULL || ppFramesOut == NULL || pFrameCount == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* Don't attempt to read while we're in the middle of seeking. Tell the caller that we're busy. */\n    if (ma_resource_manager_data_stream_seek_counter(pDataStream) > 0) {\n        return MA_BUSY;\n    }\n\n    /* If the page we're on is invalid it means we've caught up to the job thread. */\n    if (ma_atomic_load_32(&pDataStream->isPageValid[pDataStream->currentPageIndex]) == MA_FALSE) {\n        framesAvailable = 0;\n    } else {\n        /*\n        The page we're on is valid so we must have some frames available. We need to make sure that we don't overflow into the next page, even if it's valid. The reason is\n        that the unmap process will only post an update for one page at a time. Keeping mapping tied to page boundaries makes this simpler.\n        */\n        ma_uint32 currentPageFrameCount = ma_atomic_load_32(&pDataStream->pageFrameCount[pDataStream->currentPageIndex]);\n        MA_ASSERT(currentPageFrameCount >= pDataStream->relativeCursor);\n\n        framesAvailable = currentPageFrameCount - pDataStream->relativeCursor;\n    }\n\n    /* If there's no frames available and the result is set to MA_AT_END we need to return MA_AT_END. */\n    if (framesAvailable == 0) {\n        if (ma_resource_manager_data_stream_is_decoder_at_end(pDataStream)) {\n            return MA_AT_END;\n        } else {\n            return MA_BUSY; /* There are no frames available, but we're not marked as EOF so we might have caught up to the job thread. Need to return MA_BUSY and wait for more data. */\n        }\n    }\n\n    MA_ASSERT(framesAvailable > 0);\n\n    if (frameCount > framesAvailable) {\n        frameCount = framesAvailable;\n    }\n\n    *ppFramesOut = ma_resource_manager_data_stream_get_page_data_pointer(pDataStream, pDataStream->currentPageIndex, pDataStream->relativeCursor);\n    *pFrameCount = frameCount;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_resource_manager_data_stream_unmap(ma_resource_manager_data_stream* pDataStream, ma_uint64 frameCount)\n{\n    ma_uint32 newRelativeCursor;\n    ma_uint32 pageSizeInFrames;\n    ma_job job;\n\n    /* We cannot be using the data source after it's been uninitialized. */\n    MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE);\n\n    if (pDataStream == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* The frame count should always fit inside a 32-bit integer. */\n    if (frameCount > 0xFFFFFFFF) {\n        return MA_INVALID_ARGS;\n    }\n\n    pageSizeInFrames = ma_resource_manager_data_stream_get_page_size_in_frames(pDataStream);\n\n    /* The absolute cursor needs to be updated for ma_resource_manager_data_stream_get_cursor_in_pcm_frames(). */\n    ma_resource_manager_data_stream_set_absolute_cursor(pDataStream, ma_atomic_load_64(&pDataStream->absoluteCursor) + frameCount);\n\n    /* Here is where we need to check if we need to load a new page, and if so, post a job to load it. */\n    newRelativeCursor = pDataStream->relativeCursor + (ma_uint32)frameCount;\n\n    /* If the new cursor has flowed over to the next page we need to mark the old one as invalid and post an event for it. */\n    if (newRelativeCursor >= pageSizeInFrames) {\n        newRelativeCursor -= pageSizeInFrames;\n\n        /* Here is where we post the job start decoding. */\n        job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_STREAM);\n        job.order = ma_resource_manager_data_stream_next_execution_order(pDataStream);\n        job.data.resourceManager.pageDataStream.pDataStream = pDataStream;\n        job.data.resourceManager.pageDataStream.pageIndex   = pDataStream->currentPageIndex;\n\n        /* The page needs to be marked as invalid so that the public API doesn't try reading from it. */\n        ma_atomic_exchange_32(&pDataStream->isPageValid[pDataStream->currentPageIndex], MA_FALSE);\n\n        /* Before posting the job we need to make sure we set some state. */\n        pDataStream->relativeCursor   = newRelativeCursor;\n        pDataStream->currentPageIndex = (pDataStream->currentPageIndex + 1) & 0x01;\n        return ma_resource_manager_post_job(pDataStream->pResourceManager, &job);\n    } else {\n        /* We haven't moved into a new page so we can just move the cursor forward. */\n        pDataStream->relativeCursor = newRelativeCursor;\n        return MA_SUCCESS;\n    }\n}\n\n\nMA_API ma_result ma_resource_manager_data_stream_read_pcm_frames(ma_resource_manager_data_stream* pDataStream, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint64 totalFramesProcessed;\n    ma_format format;\n    ma_uint32 channels;\n\n    /* Safety. */\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    if (frameCount == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* We cannot be using the data source after it's been uninitialized. */\n    MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE);\n\n    if (pDataStream == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* Don't attempt to read while we're in the middle of seeking. Tell the caller that we're busy. */\n    if (ma_resource_manager_data_stream_seek_counter(pDataStream) > 0) {\n        return MA_BUSY;\n    }\n\n    ma_resource_manager_data_stream_get_data_format(pDataStream, &format, &channels, NULL, NULL, 0);\n\n    /* Reading is implemented in terms of map/unmap. We need to run this in a loop because mapping is clamped against page boundaries. */\n    totalFramesProcessed = 0;\n    while (totalFramesProcessed < frameCount) {\n        void* pMappedFrames;\n        ma_uint64 mappedFrameCount;\n\n        mappedFrameCount = frameCount - totalFramesProcessed;\n        result = ma_resource_manager_data_stream_map(pDataStream, &pMappedFrames, &mappedFrameCount);\n        if (result != MA_SUCCESS) {\n            break;\n        }\n\n        /* Copy the mapped data to the output buffer if we have one. It's allowed for pFramesOut to be NULL in which case a relative forward seek is performed. */\n        if (pFramesOut != NULL) {\n            ma_copy_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesProcessed, format, channels), pMappedFrames, mappedFrameCount, format, channels);\n        }\n\n        totalFramesProcessed += mappedFrameCount;\n\n        result = ma_resource_manager_data_stream_unmap(pDataStream, mappedFrameCount);\n        if (result != MA_SUCCESS) {\n            break;  /* This is really bad - will only get an error here if we failed to post a job to the queue for loading the next page. */\n        }\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = totalFramesProcessed;\n    }\n\n    if (result == MA_SUCCESS && totalFramesProcessed == 0) {\n        result  = MA_AT_END;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_resource_manager_data_stream_seek_to_pcm_frame(ma_resource_manager_data_stream* pDataStream, ma_uint64 frameIndex)\n{\n    ma_job job;\n    ma_result streamResult;\n\n    streamResult = ma_resource_manager_data_stream_result(pDataStream);\n\n    /* We cannot be using the data source after it's been uninitialized. */\n    MA_ASSERT(streamResult != MA_UNAVAILABLE);\n\n    if (pDataStream == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (streamResult != MA_SUCCESS && streamResult != MA_BUSY) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* If we're not already seeking and we're sitting on the same frame, just make this a no-op. */\n    if (ma_atomic_load_32(&pDataStream->seekCounter) == 0) {\n        if (ma_atomic_load_64(&pDataStream->absoluteCursor) == frameIndex) {\n            return MA_SUCCESS;\n        }\n    }\n\n\n    /* Increment the seek counter first to indicate to read_paged_pcm_frames() and map_paged_pcm_frames() that we are in the middle of a seek and MA_BUSY should be returned. */\n    ma_atomic_fetch_add_32(&pDataStream->seekCounter, 1);\n\n    /* Update the absolute cursor so that ma_resource_manager_data_stream_get_cursor_in_pcm_frames() returns the new position. */\n    ma_resource_manager_data_stream_set_absolute_cursor(pDataStream, frameIndex);\n\n    /*\n    We need to clear our currently loaded pages so that the stream starts playback from the new seek point as soon as possible. These are for the purpose of the public\n    API and will be ignored by the seek job. The seek job will operate on the assumption that both pages have been marked as invalid and the cursor is at the start of\n    the first page.\n    */\n    pDataStream->relativeCursor   = 0;\n    pDataStream->currentPageIndex = 0;\n    ma_atomic_exchange_32(&pDataStream->isPageValid[0], MA_FALSE);\n    ma_atomic_exchange_32(&pDataStream->isPageValid[1], MA_FALSE);\n\n    /* Make sure the data stream is not marked as at the end or else if we seek in response to hitting the end, we won't be able to read any more data. */\n    ma_atomic_exchange_32(&pDataStream->isDecoderAtEnd, MA_FALSE);\n\n    /*\n    The public API is not allowed to touch the internal decoder so we need to use a job to perform the seek. When seeking, the job thread will assume both pages\n    are invalid and any content contained within them will be discarded and replaced with newly decoded data.\n    */\n    job = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_SEEK_DATA_STREAM);\n    job.order = ma_resource_manager_data_stream_next_execution_order(pDataStream);\n    job.data.resourceManager.seekDataStream.pDataStream = pDataStream;\n    job.data.resourceManager.seekDataStream.frameIndex  = frameIndex;\n    return ma_resource_manager_post_job(pDataStream->pResourceManager, &job);\n}\n\nMA_API ma_result ma_resource_manager_data_stream_get_data_format(ma_resource_manager_data_stream* pDataStream, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    /* We cannot be using the data source after it's been uninitialized. */\n    MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE);\n\n    if (pFormat != NULL) {\n        *pFormat = ma_format_unknown;\n    }\n\n    if (pChannels != NULL) {\n        *pChannels = 0;\n    }\n\n    if (pSampleRate != NULL) {\n        *pSampleRate = 0;\n    }\n\n    if (pChannelMap != NULL) {\n        MA_ZERO_MEMORY(pChannelMap, sizeof(*pChannelMap) * channelMapCap);\n    }\n\n    if (pDataStream == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /*\n    We're being a little bit naughty here and accessing the internal decoder from the public API. The output data format is constant, and we've defined this function\n    such that the application is responsible for ensuring it's not called while uninitializing so it should be safe.\n    */\n    return ma_data_source_get_data_format(&pDataStream->decoder, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap);\n}\n\nMA_API ma_result ma_resource_manager_data_stream_get_cursor_in_pcm_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pCursor)\n{\n    ma_result result;\n\n    if (pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pCursor = 0;\n\n    /* We cannot be using the data source after it's been uninitialized. */\n    MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) != MA_UNAVAILABLE);\n\n    if (pDataStream == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /*\n    If the stream is in an erroneous state we need to return an invalid operation. We can allow\n    this to be called when the data stream is in a busy state because the caller may have asked\n    for an initial seek position and it's convenient to return that as the cursor position.\n    */\n    result = ma_resource_manager_data_stream_result(pDataStream);\n    if (result != MA_SUCCESS && result != MA_BUSY) {\n        return MA_INVALID_OPERATION;\n    }\n\n    *pCursor = ma_atomic_load_64(&pDataStream->absoluteCursor);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_resource_manager_data_stream_get_length_in_pcm_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pLength)\n{\n    ma_result streamResult;\n\n    if (pLength == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pLength = 0;\n\n    streamResult = ma_resource_manager_data_stream_result(pDataStream);\n\n    /* We cannot be using the data source after it's been uninitialized. */\n    MA_ASSERT(streamResult != MA_UNAVAILABLE);\n\n    if (pDataStream == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (streamResult != MA_SUCCESS) {\n        return streamResult;\n    }\n\n    /*\n    We most definitely do not want to be calling ma_decoder_get_length_in_pcm_frames() directly. Instead we want to use a cached value that we\n    calculated when we initialized it on the job thread.\n    */\n    *pLength = pDataStream->totalLengthInPCMFrames;\n    if (*pLength == 0) {\n        return MA_NOT_IMPLEMENTED;  /* Some decoders may not have a known length. */\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_resource_manager_data_stream_result(const ma_resource_manager_data_stream* pDataStream)\n{\n    if (pDataStream == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return (ma_result)ma_atomic_load_i32(&pDataStream->result);\n}\n\nMA_API ma_result ma_resource_manager_data_stream_set_looping(ma_resource_manager_data_stream* pDataStream, ma_bool32 isLooping)\n{\n    return ma_data_source_set_looping(pDataStream, isLooping);\n}\n\nMA_API ma_bool32 ma_resource_manager_data_stream_is_looping(const ma_resource_manager_data_stream* pDataStream)\n{\n    if (pDataStream == NULL) {\n        return MA_FALSE;\n    }\n\n    return ma_atomic_load_32((ma_bool32*)&pDataStream->isLooping);   /* Naughty const-cast. Value won't change from here in practice (maybe from another thread). */\n}\n\nMA_API ma_result ma_resource_manager_data_stream_get_available_frames(ma_resource_manager_data_stream* pDataStream, ma_uint64* pAvailableFrames)\n{\n    ma_uint32 pageIndex0;\n    ma_uint32 pageIndex1;\n    ma_uint32 relativeCursor;\n    ma_uint64 availableFrames;\n\n    if (pAvailableFrames == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pAvailableFrames = 0;\n\n    if (pDataStream == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pageIndex0     =  pDataStream->currentPageIndex;\n    pageIndex1     = (pDataStream->currentPageIndex + 1) & 0x01;\n    relativeCursor =  pDataStream->relativeCursor;\n\n    availableFrames = 0;\n    if (ma_atomic_load_32(&pDataStream->isPageValid[pageIndex0])) {\n        availableFrames += ma_atomic_load_32(&pDataStream->pageFrameCount[pageIndex0]) - relativeCursor;\n        if (ma_atomic_load_32(&pDataStream->isPageValid[pageIndex1])) {\n            availableFrames += ma_atomic_load_32(&pDataStream->pageFrameCount[pageIndex1]);\n        }\n    }\n\n    *pAvailableFrames = availableFrames;\n    return MA_SUCCESS;\n}\n\n\nstatic ma_result ma_resource_manager_data_source_preinit(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_source* pDataSource)\n{\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pDataSource);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pResourceManager == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pDataSource->flags = pConfig->flags;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_resource_manager_data_source_init_ex(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source_config* pConfig, ma_resource_manager_data_source* pDataSource)\n{\n    ma_result result;\n\n    result = ma_resource_manager_data_source_preinit(pResourceManager, pConfig, pDataSource);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* The data source itself is just a data stream or a data buffer. */\n    if ((pConfig->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return ma_resource_manager_data_stream_init_ex(pResourceManager, pConfig, &pDataSource->backend.stream);\n    } else {\n        return ma_resource_manager_data_buffer_init_ex(pResourceManager, pConfig, &pDataSource->backend.buffer);\n    }\n}\n\nMA_API ma_result ma_resource_manager_data_source_init(ma_resource_manager* pResourceManager, const char* pName, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_source* pDataSource)\n{\n    ma_resource_manager_data_source_config config;\n\n    config = ma_resource_manager_data_source_config_init();\n    config.pFilePath      = pName;\n    config.flags          = flags;\n    config.pNotifications = pNotifications;\n\n    return ma_resource_manager_data_source_init_ex(pResourceManager, &config, pDataSource);\n}\n\nMA_API ma_result ma_resource_manager_data_source_init_w(ma_resource_manager* pResourceManager, const wchar_t* pName, ma_uint32 flags, const ma_resource_manager_pipeline_notifications* pNotifications, ma_resource_manager_data_source* pDataSource)\n{\n    ma_resource_manager_data_source_config config;\n\n    config = ma_resource_manager_data_source_config_init();\n    config.pFilePathW     = pName;\n    config.flags          = flags;\n    config.pNotifications = pNotifications;\n\n    return ma_resource_manager_data_source_init_ex(pResourceManager, &config, pDataSource);\n}\n\nMA_API ma_result ma_resource_manager_data_source_init_copy(ma_resource_manager* pResourceManager, const ma_resource_manager_data_source* pExistingDataSource, ma_resource_manager_data_source* pDataSource)\n{\n    ma_result result;\n    ma_resource_manager_data_source_config config;\n\n    if (pExistingDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    config = ma_resource_manager_data_source_config_init();\n    config.flags = pExistingDataSource->flags;\n\n    result = ma_resource_manager_data_source_preinit(pResourceManager, &config, pDataSource);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* Copying can only be done from data buffers. Streams cannot be copied. */\n    if ((pExistingDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return MA_INVALID_OPERATION;\n    }\n\n    return ma_resource_manager_data_buffer_init_copy(pResourceManager, &pExistingDataSource->backend.buffer, &pDataSource->backend.buffer);\n}\n\nMA_API ma_result ma_resource_manager_data_source_uninit(ma_resource_manager_data_source* pDataSource)\n{\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* All we need to is uninitialize the underlying data buffer or data stream. */\n    if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return ma_resource_manager_data_stream_uninit(&pDataSource->backend.stream);\n    } else {\n        return ma_resource_manager_data_buffer_uninit(&pDataSource->backend.buffer);\n    }\n}\n\nMA_API ma_result ma_resource_manager_data_source_read_pcm_frames(ma_resource_manager_data_source* pDataSource, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    /* Safety. */\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return ma_resource_manager_data_stream_read_pcm_frames(&pDataSource->backend.stream, pFramesOut, frameCount, pFramesRead);\n    } else {\n        return ma_resource_manager_data_buffer_read_pcm_frames(&pDataSource->backend.buffer, pFramesOut, frameCount, pFramesRead);\n    }\n}\n\nMA_API ma_result ma_resource_manager_data_source_seek_to_pcm_frame(ma_resource_manager_data_source* pDataSource, ma_uint64 frameIndex)\n{\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return ma_resource_manager_data_stream_seek_to_pcm_frame(&pDataSource->backend.stream, frameIndex);\n    } else {\n        return ma_resource_manager_data_buffer_seek_to_pcm_frame(&pDataSource->backend.buffer, frameIndex);\n    }\n}\n\nMA_API ma_result ma_resource_manager_data_source_map(ma_resource_manager_data_source* pDataSource, void** ppFramesOut, ma_uint64* pFrameCount)\n{\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return ma_resource_manager_data_stream_map(&pDataSource->backend.stream, ppFramesOut, pFrameCount);\n    } else {\n        return MA_NOT_IMPLEMENTED;  /* Mapping not supported with data buffers. */\n    }\n}\n\nMA_API ma_result ma_resource_manager_data_source_unmap(ma_resource_manager_data_source* pDataSource, ma_uint64 frameCount)\n{\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return ma_resource_manager_data_stream_unmap(&pDataSource->backend.stream, frameCount);\n    } else {\n        return MA_NOT_IMPLEMENTED;  /* Mapping not supported with data buffers. */\n    }\n}\n\nMA_API ma_result ma_resource_manager_data_source_get_data_format(ma_resource_manager_data_source* pDataSource, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return ma_resource_manager_data_stream_get_data_format(&pDataSource->backend.stream, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap);\n    } else {\n        return ma_resource_manager_data_buffer_get_data_format(&pDataSource->backend.buffer, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap);\n    }\n}\n\nMA_API ma_result ma_resource_manager_data_source_get_cursor_in_pcm_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pCursor)\n{\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return ma_resource_manager_data_stream_get_cursor_in_pcm_frames(&pDataSource->backend.stream, pCursor);\n    } else {\n        return ma_resource_manager_data_buffer_get_cursor_in_pcm_frames(&pDataSource->backend.buffer, pCursor);\n    }\n}\n\nMA_API ma_result ma_resource_manager_data_source_get_length_in_pcm_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pLength)\n{\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return ma_resource_manager_data_stream_get_length_in_pcm_frames(&pDataSource->backend.stream, pLength);\n    } else {\n        return ma_resource_manager_data_buffer_get_length_in_pcm_frames(&pDataSource->backend.buffer, pLength);\n    }\n}\n\nMA_API ma_result ma_resource_manager_data_source_result(const ma_resource_manager_data_source* pDataSource)\n{\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return ma_resource_manager_data_stream_result(&pDataSource->backend.stream);\n    } else {\n        return ma_resource_manager_data_buffer_result(&pDataSource->backend.buffer);\n    }\n}\n\nMA_API ma_result ma_resource_manager_data_source_set_looping(ma_resource_manager_data_source* pDataSource, ma_bool32 isLooping)\n{\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return ma_resource_manager_data_stream_set_looping(&pDataSource->backend.stream, isLooping);\n    } else {\n        return ma_resource_manager_data_buffer_set_looping(&pDataSource->backend.buffer, isLooping);\n    }\n}\n\nMA_API ma_bool32 ma_resource_manager_data_source_is_looping(const ma_resource_manager_data_source* pDataSource)\n{\n    if (pDataSource == NULL) {\n        return MA_FALSE;\n    }\n\n    if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return ma_resource_manager_data_stream_is_looping(&pDataSource->backend.stream);\n    } else {\n        return ma_resource_manager_data_buffer_is_looping(&pDataSource->backend.buffer);\n    }\n}\n\nMA_API ma_result ma_resource_manager_data_source_get_available_frames(ma_resource_manager_data_source* pDataSource, ma_uint64* pAvailableFrames)\n{\n    if (pAvailableFrames == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pAvailableFrames = 0;\n\n    if (pDataSource == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if ((pDataSource->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM) != 0) {\n        return ma_resource_manager_data_stream_get_available_frames(&pDataSource->backend.stream, pAvailableFrames);\n    } else {\n        return ma_resource_manager_data_buffer_get_available_frames(&pDataSource->backend.buffer, pAvailableFrames);\n    }\n}\n\n\nMA_API ma_result ma_resource_manager_post_job(ma_resource_manager* pResourceManager, const ma_job* pJob)\n{\n    if (pResourceManager == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_job_queue_post(&pResourceManager->jobQueue, pJob);\n}\n\nMA_API ma_result ma_resource_manager_post_job_quit(ma_resource_manager* pResourceManager)\n{\n    ma_job job = ma_job_init(MA_JOB_TYPE_QUIT);\n    return ma_resource_manager_post_job(pResourceManager, &job);\n}\n\nMA_API ma_result ma_resource_manager_next_job(ma_resource_manager* pResourceManager, ma_job* pJob)\n{\n    if (pResourceManager == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_job_queue_next(&pResourceManager->jobQueue, pJob);\n}\n\n\nstatic ma_result ma_job_process__resource_manager__load_data_buffer_node(ma_job* pJob)\n{\n    ma_result result = MA_SUCCESS;\n    ma_resource_manager* pResourceManager;\n    ma_resource_manager_data_buffer_node* pDataBufferNode;\n\n    MA_ASSERT(pJob != NULL);\n\n    pResourceManager = (ma_resource_manager*)pJob->data.resourceManager.loadDataBufferNode.pResourceManager;\n    MA_ASSERT(pResourceManager != NULL);\n\n    pDataBufferNode = (ma_resource_manager_data_buffer_node*)pJob->data.resourceManager.loadDataBufferNode.pDataBufferNode;\n    MA_ASSERT(pDataBufferNode != NULL);\n    MA_ASSERT(pDataBufferNode->isDataOwnedByResourceManager == MA_TRUE);  /* The data should always be owned by the resource manager. */\n\n    /* The data buffer is not getting deleted, but we may be getting executed out of order. If so, we need to push the job back onto the queue and return. */\n    if (pJob->order != ma_atomic_load_32(&pDataBufferNode->executionPointer)) {\n        return ma_resource_manager_post_job(pResourceManager, pJob);    /* Attempting to execute out of order. Probably interleaved with a MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER job. */\n    }\n\n    /* First thing we need to do is check whether or not the data buffer is getting deleted. If so we just abort. */\n    if (ma_resource_manager_data_buffer_node_result(pDataBufferNode) != MA_BUSY) {\n        result = ma_resource_manager_data_buffer_node_result(pDataBufferNode);    /* The data buffer may be getting deleted before it's even been loaded. */\n        goto done;\n    }\n\n    /*\n    We're ready to start loading. Essentially what we're doing here is initializing the data supply\n    of the node. Once this is complete, data buffers can have their connectors initialized which\n    will allow then to have audio data read from them.\n\n    Note that when the data supply type has been moved away from \"unknown\", that is when other threads\n    will determine that the node is available for data delivery and the data buffer connectors can be\n    initialized. Therefore, it's important that it is set after the data supply has been initialized.\n    */\n    if ((pJob->data.resourceManager.loadDataBufferNode.flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE) != 0) {\n        /*\n        Decoding. This is the complex case because we're not going to be doing the entire decoding\n        process here. Instead it's going to be split of multiple jobs and loaded in pages. The\n        reason for this is to evenly distribute decoding time across multiple sounds, rather than\n        having one huge sound hog all the available processing resources.\n\n        The first thing we do is initialize a decoder. This is allocated on the heap and is passed\n        around to the paging jobs. When the last paging job has completed it's processing, it'll\n        free the decoder for us.\n\n        This job does not do any actual decoding. It instead just posts a PAGE_DATA_BUFFER_NODE job\n        which is where the actual decoding work will be done. However, once this job is complete,\n        the node will be in a state where data buffer connectors can be initialized.\n        */\n        ma_decoder* pDecoder;   /* <-- Free'd on the last page decode. */\n        ma_job pageDataBufferNodeJob;\n\n        /* Allocate the decoder by initializing a decoded data supply. */\n        result = ma_resource_manager_data_buffer_node_init_supply_decoded(pResourceManager, pDataBufferNode, pJob->data.resourceManager.loadDataBufferNode.pFilePath, pJob->data.resourceManager.loadDataBufferNode.pFilePathW, pJob->data.resourceManager.loadDataBufferNode.flags, &pDecoder);\n\n        /*\n        Don't ever propagate an MA_BUSY result code or else the resource manager will think the\n        node is just busy decoding rather than in an error state. This should never happen, but\n        including this logic for safety just in case.\n        */\n        if (result == MA_BUSY) {\n            result  = MA_ERROR;\n        }\n\n        if (result != MA_SUCCESS) {\n            if (pJob->data.resourceManager.loadDataBufferNode.pFilePath != NULL) {\n                ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, \"Failed to initialize data supply for \\\"%s\\\". %s.\\n\", pJob->data.resourceManager.loadDataBufferNode.pFilePath, ma_result_description(result));\n            } else {\n                #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(_MSC_VER)\n                    ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_WARNING, \"Failed to initialize data supply for \\\"%ls\\\", %s.\\n\", pJob->data.resourceManager.loadDataBufferNode.pFilePathW, ma_result_description(result));\n                #endif\n            }\n\n            goto done;\n        }\n\n        /*\n        At this point the node's data supply is initialized and other threads can start initializing\n        their data buffer connectors. However, no data will actually be available until we start to\n        actually decode it. To do this, we need to post a paging job which is where the decoding\n        work is done.\n\n        Note that if an error occurred at an earlier point, this section will have been skipped.\n        */\n        pageDataBufferNodeJob = ma_job_init(MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE);\n        pageDataBufferNodeJob.order = ma_resource_manager_data_buffer_node_next_execution_order(pDataBufferNode);\n        pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pResourceManager  = pResourceManager;\n        pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pDataBufferNode   = pDataBufferNode;\n        pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pDecoder          = pDecoder;\n        pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pDoneNotification = pJob->data.resourceManager.loadDataBufferNode.pDoneNotification;\n        pageDataBufferNodeJob.data.resourceManager.pageDataBufferNode.pDoneFence        = pJob->data.resourceManager.loadDataBufferNode.pDoneFence;\n\n        /* The job has been set up so it can now be posted. */\n        result = ma_resource_manager_post_job(pResourceManager, &pageDataBufferNodeJob);\n\n        /*\n        When we get here, we want to make sure the result code is set to MA_BUSY. The reason for\n        this is that the result will be copied over to the node's internal result variable. In\n        this case, since the decoding is still in-progress, we need to make sure the result code\n        is set to MA_BUSY.\n        */\n        if (result != MA_SUCCESS) {\n            ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, \"Failed to post MA_JOB_TYPE_RESOURCE_MANAGER_PAGE_DATA_BUFFER_NODE job. %s\\n\", ma_result_description(result));\n            ma_decoder_uninit(pDecoder);\n            ma_free(pDecoder, &pResourceManager->config.allocationCallbacks);\n        } else {\n            result = MA_BUSY;\n        }\n    } else {\n        /* No decoding. This is the simple case. We need only read the file content into memory and we're done. */\n        result = ma_resource_manager_data_buffer_node_init_supply_encoded(pResourceManager, pDataBufferNode, pJob->data.resourceManager.loadDataBufferNode.pFilePath, pJob->data.resourceManager.loadDataBufferNode.pFilePathW);\n    }\n\n\ndone:\n    /* File paths are no longer needed. */\n    ma_free(pJob->data.resourceManager.loadDataBufferNode.pFilePath,  &pResourceManager->config.allocationCallbacks);\n    ma_free(pJob->data.resourceManager.loadDataBufferNode.pFilePathW, &pResourceManager->config.allocationCallbacks);\n\n    /*\n    We need to set the result to at the very end to ensure no other threads try reading the data before we've fully initialized the object. Other threads\n    are going to be inspecting this variable to determine whether or not they're ready to read data. We can only change the result if it's set to MA_BUSY\n    because otherwise we may be changing away from an error code which would be bad. An example is if the application creates a data buffer, but then\n    immediately deletes it before we've got to this point. In this case, pDataBuffer->result will be MA_UNAVAILABLE, and setting it to MA_SUCCESS or any\n    other error code would cause the buffer to look like it's in a state that it's not.\n    */\n    ma_atomic_compare_and_swap_i32(&pDataBufferNode->result, MA_BUSY, result);\n\n    /* At this point initialization is complete and we can signal the notification if any. */\n    if (pJob->data.resourceManager.loadDataBufferNode.pInitNotification != NULL) {\n        ma_async_notification_signal(pJob->data.resourceManager.loadDataBufferNode.pInitNotification);\n    }\n    if (pJob->data.resourceManager.loadDataBufferNode.pInitFence != NULL) {\n        ma_fence_release(pJob->data.resourceManager.loadDataBufferNode.pInitFence);\n    }\n\n    /* If we have a success result it means we've fully loaded the buffer. This will happen in the non-decoding case. */\n    if (result != MA_BUSY) {\n        if (pJob->data.resourceManager.loadDataBufferNode.pDoneNotification != NULL) {\n            ma_async_notification_signal(pJob->data.resourceManager.loadDataBufferNode.pDoneNotification);\n        }\n        if (pJob->data.resourceManager.loadDataBufferNode.pDoneFence != NULL) {\n            ma_fence_release(pJob->data.resourceManager.loadDataBufferNode.pDoneFence);\n        }\n    }\n\n    /* Increment the node's execution pointer so that the next jobs can be processed. This is how we keep decoding of pages in-order. */\n    ma_atomic_fetch_add_32(&pDataBufferNode->executionPointer, 1);\n\n    /* A busy result should be considered successful from the point of view of the job system. */\n    if (result == MA_BUSY) {\n        result  = MA_SUCCESS;\n    }\n\n    return result;\n}\n\nstatic ma_result ma_job_process__resource_manager__free_data_buffer_node(ma_job* pJob)\n{\n    ma_resource_manager* pResourceManager;\n    ma_resource_manager_data_buffer_node* pDataBufferNode;\n\n    MA_ASSERT(pJob != NULL);\n\n    pResourceManager = (ma_resource_manager*)pJob->data.resourceManager.freeDataBufferNode.pResourceManager;\n    MA_ASSERT(pResourceManager != NULL);\n\n    pDataBufferNode = (ma_resource_manager_data_buffer_node*)pJob->data.resourceManager.freeDataBufferNode.pDataBufferNode;\n    MA_ASSERT(pDataBufferNode != NULL);\n\n    if (pJob->order != ma_atomic_load_32(&pDataBufferNode->executionPointer)) {\n        return ma_resource_manager_post_job(pResourceManager, pJob);    /* Out of order. */\n    }\n\n    ma_resource_manager_data_buffer_node_free(pResourceManager, pDataBufferNode);\n\n    /* The event needs to be signalled last. */\n    if (pJob->data.resourceManager.freeDataBufferNode.pDoneNotification != NULL) {\n        ma_async_notification_signal(pJob->data.resourceManager.freeDataBufferNode.pDoneNotification);\n    }\n\n    if (pJob->data.resourceManager.freeDataBufferNode.pDoneFence != NULL) {\n        ma_fence_release(pJob->data.resourceManager.freeDataBufferNode.pDoneFence);\n    }\n\n    ma_atomic_fetch_add_32(&pDataBufferNode->executionPointer, 1);\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_job_process__resource_manager__page_data_buffer_node(ma_job* pJob)\n{\n    ma_result result = MA_SUCCESS;\n    ma_resource_manager* pResourceManager;\n    ma_resource_manager_data_buffer_node* pDataBufferNode;\n\n    MA_ASSERT(pJob != NULL);\n\n    pResourceManager = (ma_resource_manager*)pJob->data.resourceManager.pageDataBufferNode.pResourceManager;\n    MA_ASSERT(pResourceManager != NULL);\n\n    pDataBufferNode = (ma_resource_manager_data_buffer_node*)pJob->data.resourceManager.pageDataBufferNode.pDataBufferNode;\n    MA_ASSERT(pDataBufferNode != NULL);\n\n    if (pJob->order != ma_atomic_load_32(&pDataBufferNode->executionPointer)) {\n        return ma_resource_manager_post_job(pResourceManager, pJob);    /* Out of order. */\n    }\n\n    /* Don't do any more decoding if the data buffer has started the uninitialization process. */\n    result = ma_resource_manager_data_buffer_node_result(pDataBufferNode);\n    if (result != MA_BUSY) {\n        goto done;\n    }\n\n    /* We're ready to decode the next page. */\n    result = ma_resource_manager_data_buffer_node_decode_next_page(pResourceManager, pDataBufferNode, (ma_decoder*)pJob->data.resourceManager.pageDataBufferNode.pDecoder);\n\n    /*\n    If we have a success code by this point, we want to post another job. We're going to set the\n    result back to MA_BUSY to make it clear that there's still more to load.\n    */\n    if (result == MA_SUCCESS) {\n        ma_job newJob;\n        newJob = *pJob; /* Everything is the same as the input job, except the execution order. */\n        newJob.order = ma_resource_manager_data_buffer_node_next_execution_order(pDataBufferNode);   /* We need a fresh execution order. */\n\n        result = ma_resource_manager_post_job(pResourceManager, &newJob);\n\n        /* Since the sound isn't yet fully decoded we want the status to be set to busy. */\n        if (result == MA_SUCCESS) {\n            result  = MA_BUSY;\n        }\n    }\n\ndone:\n    /* If there's still more to decode the result will be set to MA_BUSY. Otherwise we can free the decoder. */\n    if (result != MA_BUSY) {\n        ma_decoder_uninit((ma_decoder*)pJob->data.resourceManager.pageDataBufferNode.pDecoder);\n        ma_free(pJob->data.resourceManager.pageDataBufferNode.pDecoder, &pResourceManager->config.allocationCallbacks);\n    }\n\n    /* If we reached the end we need to treat it as successful. */\n    if (result == MA_AT_END) {\n        result  = MA_SUCCESS;\n    }\n\n    /* Make sure we set the result of node in case some error occurred. */\n    ma_atomic_compare_and_swap_i32(&pDataBufferNode->result, MA_BUSY, result);\n\n    /* Signal the notification after setting the result in case the notification callback wants to inspect the result code. */\n    if (result != MA_BUSY) {\n        if (pJob->data.resourceManager.pageDataBufferNode.pDoneNotification != NULL) {\n            ma_async_notification_signal(pJob->data.resourceManager.pageDataBufferNode.pDoneNotification);\n        }\n\n        if (pJob->data.resourceManager.pageDataBufferNode.pDoneFence != NULL) {\n            ma_fence_release(pJob->data.resourceManager.pageDataBufferNode.pDoneFence);\n        }\n    }\n\n    ma_atomic_fetch_add_32(&pDataBufferNode->executionPointer, 1);\n    return result;\n}\n\n\nstatic ma_result ma_job_process__resource_manager__load_data_buffer(ma_job* pJob)\n{\n    ma_result result = MA_SUCCESS;\n    ma_resource_manager* pResourceManager;\n    ma_resource_manager_data_buffer* pDataBuffer;\n    ma_resource_manager_data_supply_type dataSupplyType = ma_resource_manager_data_supply_type_unknown;\n    ma_bool32 isConnectorInitialized = MA_FALSE;\n\n    /*\n    All we're doing here is checking if the node has finished loading. If not, we just re-post the job\n    and keep waiting. Otherwise we increment the execution counter and set the buffer's result code.\n    */\n    MA_ASSERT(pJob != NULL);\n\n    pDataBuffer = (ma_resource_manager_data_buffer*)pJob->data.resourceManager.loadDataBuffer.pDataBuffer;\n    MA_ASSERT(pDataBuffer != NULL);\n\n    pResourceManager = pDataBuffer->pResourceManager;\n\n    if (pJob->order != ma_atomic_load_32(&pDataBuffer->executionPointer)) {\n        return ma_resource_manager_post_job(pResourceManager, pJob);    /* Attempting to execute out of order. Probably interleaved with a MA_JOB_TYPE_RESOURCE_MANAGER_FREE_DATA_BUFFER job. */\n    }\n\n    /*\n    First thing we need to do is check whether or not the data buffer is getting deleted. If so we\n    just abort, but making sure we increment the execution pointer.\n    */\n    result = ma_resource_manager_data_buffer_result(pDataBuffer);\n    if (result != MA_BUSY) {\n        goto done;  /* <-- This will ensure the exucution pointer is incremented. */\n    } else {\n        result = MA_SUCCESS;    /* <-- Make sure this is reset. */\n    }\n\n    /* Try initializing the connector if we haven't already. */\n    isConnectorInitialized = ma_resource_manager_data_buffer_has_connector(pDataBuffer);\n    if (isConnectorInitialized == MA_FALSE) {\n        dataSupplyType = ma_resource_manager_data_buffer_node_get_data_supply_type(pDataBuffer->pNode);\n\n        if (dataSupplyType != ma_resource_manager_data_supply_type_unknown) {\n            /* We can now initialize the connector. If this fails, we need to abort. It's very rare for this to fail. */\n            ma_resource_manager_data_source_config dataSourceConfig;    /* For setting initial looping state and range. */\n            dataSourceConfig = ma_resource_manager_data_source_config_init();\n            dataSourceConfig.rangeBegInPCMFrames     = pJob->data.resourceManager.loadDataBuffer.rangeBegInPCMFrames;\n            dataSourceConfig.rangeEndInPCMFrames     = pJob->data.resourceManager.loadDataBuffer.rangeEndInPCMFrames;\n            dataSourceConfig.loopPointBegInPCMFrames = pJob->data.resourceManager.loadDataBuffer.loopPointBegInPCMFrames;\n            dataSourceConfig.loopPointEndInPCMFrames = pJob->data.resourceManager.loadDataBuffer.loopPointEndInPCMFrames;\n            dataSourceConfig.isLooping               = pJob->data.resourceManager.loadDataBuffer.isLooping;\n\n            result = ma_resource_manager_data_buffer_init_connector(pDataBuffer, &dataSourceConfig, pJob->data.resourceManager.loadDataBuffer.pInitNotification, pJob->data.resourceManager.loadDataBuffer.pInitFence);\n            if (result != MA_SUCCESS) {\n                ma_log_postf(ma_resource_manager_get_log(pResourceManager), MA_LOG_LEVEL_ERROR, \"Failed to initialize connector for data buffer. %s.\\n\", ma_result_description(result));\n                goto done;\n            }\n        } else {\n            /* Don't have a known data supply type. Most likely the data buffer node is still loading, but it could be that an error occurred. */\n        }\n    } else {\n        /* The connector is already initialized. Nothing to do here. */\n    }\n\n    /*\n    If the data node is still loading, we need to repost the job and *not* increment the execution\n    pointer (i.e. we need to not fall through to the \"done\" label).\n\n    There is a hole between here and the where the data connector is initialized where the data\n    buffer node may have finished initializing. We need to check for this by checking the result of\n    the data buffer node and whether or not we had an unknown data supply type at the time of\n    trying to initialize the data connector.\n    */\n    result = ma_resource_manager_data_buffer_node_result(pDataBuffer->pNode);\n    if (result == MA_BUSY || (result == MA_SUCCESS && isConnectorInitialized == MA_FALSE && dataSupplyType == ma_resource_manager_data_supply_type_unknown)) {\n        return ma_resource_manager_post_job(pResourceManager, pJob);\n    }\n\ndone:\n    /* Only move away from a busy code so that we don't trash any existing error codes. */\n    ma_atomic_compare_and_swap_i32(&pDataBuffer->result, MA_BUSY, result);\n\n    /* Only signal the other threads after the result has been set just for cleanliness sake. */\n    if (pJob->data.resourceManager.loadDataBuffer.pDoneNotification != NULL) {\n        ma_async_notification_signal(pJob->data.resourceManager.loadDataBuffer.pDoneNotification);\n    }\n    if (pJob->data.resourceManager.loadDataBuffer.pDoneFence != NULL) {\n        ma_fence_release(pJob->data.resourceManager.loadDataBuffer.pDoneFence);\n    }\n\n    /*\n    If at this point the data buffer has not had it's connector initialized, it means the\n    notification event was never signalled which means we need to signal it here.\n    */\n    if (ma_resource_manager_data_buffer_has_connector(pDataBuffer) == MA_FALSE && result != MA_SUCCESS) {\n        if (pJob->data.resourceManager.loadDataBuffer.pInitNotification != NULL) {\n            ma_async_notification_signal(pJob->data.resourceManager.loadDataBuffer.pInitNotification);\n        }\n        if (pJob->data.resourceManager.loadDataBuffer.pInitFence != NULL) {\n            ma_fence_release(pJob->data.resourceManager.loadDataBuffer.pInitFence);\n        }\n    }\n\n    ma_atomic_fetch_add_32(&pDataBuffer->executionPointer, 1);\n    return result;\n}\n\nstatic ma_result ma_job_process__resource_manager__free_data_buffer(ma_job* pJob)\n{\n    ma_resource_manager* pResourceManager;\n    ma_resource_manager_data_buffer* pDataBuffer;\n\n    MA_ASSERT(pJob != NULL);\n\n    pDataBuffer = (ma_resource_manager_data_buffer*)pJob->data.resourceManager.freeDataBuffer.pDataBuffer;\n    MA_ASSERT(pDataBuffer != NULL);\n\n    pResourceManager = pDataBuffer->pResourceManager;\n\n    if (pJob->order != ma_atomic_load_32(&pDataBuffer->executionPointer)) {\n        return ma_resource_manager_post_job(pResourceManager, pJob);    /* Out of order. */\n    }\n\n    ma_resource_manager_data_buffer_uninit_internal(pDataBuffer);\n\n    /* The event needs to be signalled last. */\n    if (pJob->data.resourceManager.freeDataBuffer.pDoneNotification != NULL) {\n        ma_async_notification_signal(pJob->data.resourceManager.freeDataBuffer.pDoneNotification);\n    }\n\n    if (pJob->data.resourceManager.freeDataBuffer.pDoneFence != NULL) {\n        ma_fence_release(pJob->data.resourceManager.freeDataBuffer.pDoneFence);\n    }\n\n    ma_atomic_fetch_add_32(&pDataBuffer->executionPointer, 1);\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_job_process__resource_manager__load_data_stream(ma_job* pJob)\n{\n    ma_result result = MA_SUCCESS;\n    ma_decoder_config decoderConfig;\n    ma_uint32 pageBufferSizeInBytes;\n    ma_resource_manager* pResourceManager;\n    ma_resource_manager_data_stream* pDataStream;\n\n    MA_ASSERT(pJob != NULL);\n\n    pDataStream = (ma_resource_manager_data_stream*)pJob->data.resourceManager.loadDataStream.pDataStream;\n    MA_ASSERT(pDataStream != NULL);\n\n    pResourceManager = pDataStream->pResourceManager;\n\n    if (pJob->order != ma_atomic_load_32(&pDataStream->executionPointer)) {\n        return ma_resource_manager_post_job(pResourceManager, pJob);    /* Out of order. */\n    }\n\n    if (ma_resource_manager_data_stream_result(pDataStream) != MA_BUSY) {\n        result = MA_INVALID_OPERATION;  /* Most likely the data stream is being uninitialized. */\n        goto done;\n    }\n\n    /* We need to initialize the decoder first so we can determine the size of the pages. */\n    decoderConfig = ma_resource_manager__init_decoder_config(pResourceManager);\n\n    if (pJob->data.resourceManager.loadDataStream.pFilePath != NULL) {\n        result = ma_decoder_init_vfs(pResourceManager->config.pVFS, pJob->data.resourceManager.loadDataStream.pFilePath, &decoderConfig, &pDataStream->decoder);\n    } else {\n        result = ma_decoder_init_vfs_w(pResourceManager->config.pVFS, pJob->data.resourceManager.loadDataStream.pFilePathW, &decoderConfig, &pDataStream->decoder);\n    }\n    if (result != MA_SUCCESS) {\n        goto done;\n    }\n\n    /* Retrieve the total length of the file before marking the decoder as loaded. */\n    if ((pDataStream->flags & MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_UNKNOWN_LENGTH) == 0) {\n        result = ma_decoder_get_length_in_pcm_frames(&pDataStream->decoder, &pDataStream->totalLengthInPCMFrames);\n        if (result != MA_SUCCESS) {\n            goto done;  /* Failed to retrieve the length. */\n        }\n    } else {\n        pDataStream->totalLengthInPCMFrames = 0;\n    }\n\n    /*\n    Only mark the decoder as initialized when the length of the decoder has been retrieved because that can possibly require a scan over the whole file\n    and we don't want to have another thread trying to access the decoder while it's scanning.\n    */\n    pDataStream->isDecoderInitialized = MA_TRUE;\n\n    /* We have the decoder so we can now initialize our page buffer. */\n    pageBufferSizeInBytes = ma_resource_manager_data_stream_get_page_size_in_frames(pDataStream) * 2 * ma_get_bytes_per_frame(pDataStream->decoder.outputFormat, pDataStream->decoder.outputChannels);\n\n    pDataStream->pPageData = ma_malloc(pageBufferSizeInBytes, &pResourceManager->config.allocationCallbacks);\n    if (pDataStream->pPageData == NULL) {\n        ma_decoder_uninit(&pDataStream->decoder);\n        result = MA_OUT_OF_MEMORY;\n        goto done;\n    }\n\n    /* Seek to our initial seek point before filling the initial pages. */\n    ma_decoder_seek_to_pcm_frame(&pDataStream->decoder, pJob->data.resourceManager.loadDataStream.initialSeekPoint);\n\n    /* We have our decoder and our page buffer, so now we need to fill our pages. */\n    ma_resource_manager_data_stream_fill_pages(pDataStream);\n\n    /* And now we're done. We want to make sure the result is MA_SUCCESS. */\n    result = MA_SUCCESS;\n\ndone:\n    ma_free(pJob->data.resourceManager.loadDataStream.pFilePath,  &pResourceManager->config.allocationCallbacks);\n    ma_free(pJob->data.resourceManager.loadDataStream.pFilePathW, &pResourceManager->config.allocationCallbacks);\n\n    /* We can only change the status away from MA_BUSY. If it's set to anything else it means an error has occurred somewhere or the uninitialization process has started (most likely). */\n    ma_atomic_compare_and_swap_i32(&pDataStream->result, MA_BUSY, result);\n\n    /* Only signal the other threads after the result has been set just for cleanliness sake. */\n    if (pJob->data.resourceManager.loadDataStream.pInitNotification != NULL) {\n        ma_async_notification_signal(pJob->data.resourceManager.loadDataStream.pInitNotification);\n    }\n    if (pJob->data.resourceManager.loadDataStream.pInitFence != NULL) {\n        ma_fence_release(pJob->data.resourceManager.loadDataStream.pInitFence);\n    }\n\n    ma_atomic_fetch_add_32(&pDataStream->executionPointer, 1);\n    return result;\n}\n\nstatic ma_result ma_job_process__resource_manager__free_data_stream(ma_job* pJob)\n{\n    ma_resource_manager* pResourceManager;\n    ma_resource_manager_data_stream* pDataStream;\n\n    MA_ASSERT(pJob != NULL);\n\n    pDataStream = (ma_resource_manager_data_stream*)pJob->data.resourceManager.freeDataStream.pDataStream;\n    MA_ASSERT(pDataStream != NULL);\n\n    pResourceManager = pDataStream->pResourceManager;\n\n    if (pJob->order != ma_atomic_load_32(&pDataStream->executionPointer)) {\n        return ma_resource_manager_post_job(pResourceManager, pJob);    /* Out of order. */\n    }\n\n    /* If our status is not MA_UNAVAILABLE we have a bug somewhere. */\n    MA_ASSERT(ma_resource_manager_data_stream_result(pDataStream) == MA_UNAVAILABLE);\n\n    if (pDataStream->isDecoderInitialized) {\n        ma_decoder_uninit(&pDataStream->decoder);\n    }\n\n    if (pDataStream->pPageData != NULL) {\n        ma_free(pDataStream->pPageData, &pResourceManager->config.allocationCallbacks);\n        pDataStream->pPageData = NULL;  /* Just in case... */\n    }\n\n    ma_data_source_uninit(&pDataStream->ds);\n\n    /* The event needs to be signalled last. */\n    if (pJob->data.resourceManager.freeDataStream.pDoneNotification != NULL) {\n        ma_async_notification_signal(pJob->data.resourceManager.freeDataStream.pDoneNotification);\n    }\n    if (pJob->data.resourceManager.freeDataStream.pDoneFence != NULL) {\n        ma_fence_release(pJob->data.resourceManager.freeDataStream.pDoneFence);\n    }\n\n    /*ma_atomic_fetch_add_32(&pDataStream->executionPointer, 1);*/\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_job_process__resource_manager__page_data_stream(ma_job* pJob)\n{\n    ma_result result = MA_SUCCESS;\n    ma_resource_manager* pResourceManager;\n    ma_resource_manager_data_stream* pDataStream;\n\n    MA_ASSERT(pJob != NULL);\n\n    pDataStream = (ma_resource_manager_data_stream*)pJob->data.resourceManager.pageDataStream.pDataStream;\n    MA_ASSERT(pDataStream != NULL);\n\n    pResourceManager = pDataStream->pResourceManager;\n\n    if (pJob->order != ma_atomic_load_32(&pDataStream->executionPointer)) {\n        return ma_resource_manager_post_job(pResourceManager, pJob);    /* Out of order. */\n    }\n\n    /* For streams, the status should be MA_SUCCESS. */\n    if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS) {\n        result = MA_INVALID_OPERATION;\n        goto done;\n    }\n\n    ma_resource_manager_data_stream_fill_page(pDataStream, pJob->data.resourceManager.pageDataStream.pageIndex);\n\ndone:\n    ma_atomic_fetch_add_32(&pDataStream->executionPointer, 1);\n    return result;\n}\n\nstatic ma_result ma_job_process__resource_manager__seek_data_stream(ma_job* pJob)\n{\n    ma_result result = MA_SUCCESS;\n    ma_resource_manager* pResourceManager;\n    ma_resource_manager_data_stream* pDataStream;\n\n    MA_ASSERT(pJob != NULL);\n\n    pDataStream = (ma_resource_manager_data_stream*)pJob->data.resourceManager.seekDataStream.pDataStream;\n    MA_ASSERT(pDataStream != NULL);\n\n    pResourceManager = pDataStream->pResourceManager;\n\n    if (pJob->order != ma_atomic_load_32(&pDataStream->executionPointer)) {\n        return ma_resource_manager_post_job(pResourceManager, pJob);    /* Out of order. */\n    }\n\n    /* For streams the status should be MA_SUCCESS for this to do anything. */\n    if (ma_resource_manager_data_stream_result(pDataStream) != MA_SUCCESS || pDataStream->isDecoderInitialized == MA_FALSE) {\n        result = MA_INVALID_OPERATION;\n        goto done;\n    }\n\n    /*\n    With seeking we just assume both pages are invalid and the relative frame cursor at position 0. This is basically exactly the same as loading, except\n    instead of initializing the decoder, we seek to a frame.\n    */\n    ma_decoder_seek_to_pcm_frame(&pDataStream->decoder, pJob->data.resourceManager.seekDataStream.frameIndex);\n\n    /* After seeking we'll need to reload the pages. */\n    ma_resource_manager_data_stream_fill_pages(pDataStream);\n\n    /* We need to let the public API know that we're done seeking. */\n    ma_atomic_fetch_sub_32(&pDataStream->seekCounter, 1);\n\ndone:\n    ma_atomic_fetch_add_32(&pDataStream->executionPointer, 1);\n    return result;\n}\n\nMA_API ma_result ma_resource_manager_process_job(ma_resource_manager* pResourceManager, ma_job* pJob)\n{\n    if (pResourceManager == NULL || pJob == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_job_process(pJob);\n}\n\nMA_API ma_result ma_resource_manager_process_next_job(ma_resource_manager* pResourceManager)\n{\n    ma_result result;\n    ma_job job;\n\n    if (pResourceManager == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* This will return MA_CANCELLED if the next job is a quit job. */\n    result = ma_resource_manager_next_job(pResourceManager, &job);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return ma_job_process(&job);\n}\n#else\n/* We'll get here if the resource manager is being excluded from the build. We need to define the job processing callbacks as no-ops. */\nstatic ma_result ma_job_process__resource_manager__load_data_buffer_node(ma_job* pJob) { return ma_job_process__noop(pJob); }\nstatic ma_result ma_job_process__resource_manager__free_data_buffer_node(ma_job* pJob) { return ma_job_process__noop(pJob); }\nstatic ma_result ma_job_process__resource_manager__page_data_buffer_node(ma_job* pJob) { return ma_job_process__noop(pJob); }\nstatic ma_result ma_job_process__resource_manager__load_data_buffer(ma_job* pJob)      { return ma_job_process__noop(pJob); }\nstatic ma_result ma_job_process__resource_manager__free_data_buffer(ma_job* pJob)      { return ma_job_process__noop(pJob); }\nstatic ma_result ma_job_process__resource_manager__load_data_stream(ma_job* pJob)      { return ma_job_process__noop(pJob); }\nstatic ma_result ma_job_process__resource_manager__free_data_stream(ma_job* pJob)      { return ma_job_process__noop(pJob); }\nstatic ma_result ma_job_process__resource_manager__page_data_stream(ma_job* pJob)      { return ma_job_process__noop(pJob); }\nstatic ma_result ma_job_process__resource_manager__seek_data_stream(ma_job* pJob)      { return ma_job_process__noop(pJob); }\n#endif  /* MA_NO_RESOURCE_MANAGER */\n\n\n#ifndef MA_NO_NODE_GRAPH\n/* 10ms @ 48K = 480. Must never exceed 65535. */\n#ifndef MA_DEFAULT_NODE_CACHE_CAP_IN_FRAMES_PER_BUS\n#define MA_DEFAULT_NODE_CACHE_CAP_IN_FRAMES_PER_BUS 480\n#endif\n\n\nstatic ma_result ma_node_read_pcm_frames(ma_node* pNode, ma_uint32 outputBusIndex, float* pFramesOut, ma_uint32 frameCount, ma_uint32* pFramesRead, ma_uint64 globalTime);\n\nMA_API void ma_debug_fill_pcm_frames_with_sine_wave(float* pFramesOut, ma_uint32 frameCount, ma_format format, ma_uint32 channels, ma_uint32 sampleRate)\n{\n    #ifndef MA_NO_GENERATION\n    {\n        ma_waveform_config waveformConfig;\n        ma_waveform waveform;\n\n        waveformConfig = ma_waveform_config_init(format, channels, sampleRate, ma_waveform_type_sine, 1.0, 400);\n        ma_waveform_init(&waveformConfig, &waveform);\n        ma_waveform_read_pcm_frames(&waveform, pFramesOut, frameCount, NULL);\n    }\n    #else\n    {\n        (void)pFramesOut;\n        (void)frameCount;\n        (void)format;\n        (void)channels;\n        (void)sampleRate;\n        #if defined(MA_DEBUG_OUTPUT)\n        {\n            #if _MSC_VER\n                #pragma message (\"ma_debug_fill_pcm_frames_with_sine_wave() will do nothing because MA_NO_GENERATION is enabled.\")\n            #endif\n        }\n        #endif\n    }\n    #endif\n}\n\n\n\nMA_API ma_node_graph_config ma_node_graph_config_init(ma_uint32 channels)\n{\n    ma_node_graph_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.channels             = channels;\n    config.nodeCacheCapInFrames = MA_DEFAULT_NODE_CACHE_CAP_IN_FRAMES_PER_BUS;\n\n    return config;\n}\n\n\nstatic void ma_node_graph_set_is_reading(ma_node_graph* pNodeGraph, ma_bool32 isReading)\n{\n    MA_ASSERT(pNodeGraph != NULL);\n    ma_atomic_exchange_32(&pNodeGraph->isReading, isReading);\n}\n\n#if 0\nstatic ma_bool32 ma_node_graph_is_reading(ma_node_graph* pNodeGraph)\n{\n    MA_ASSERT(pNodeGraph != NULL);\n    return ma_atomic_load_32(&pNodeGraph->isReading);\n}\n#endif\n\n\nstatic void ma_node_graph_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_node_graph* pNodeGraph = (ma_node_graph*)pNode;\n    ma_uint64 framesRead;\n\n    ma_node_graph_read_pcm_frames(pNodeGraph, ppFramesOut[0], *pFrameCountOut, &framesRead);\n\n    *pFrameCountOut = (ma_uint32)framesRead;    /* Safe cast. */\n\n    (void)ppFramesIn;\n    (void)pFrameCountIn;\n}\n\nstatic ma_node_vtable g_node_graph_node_vtable =\n{\n    ma_node_graph_node_process_pcm_frames,\n    NULL,   /* onGetRequiredInputFrameCount */\n    0,      /* 0 input buses. */\n    1,      /* 1 output bus. */\n    0       /* Flags. */\n};\n\nstatic void ma_node_graph_endpoint_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    MA_ASSERT(pNode != NULL);\n    MA_ASSERT(ma_node_get_input_bus_count(pNode)  == 1);\n    MA_ASSERT(ma_node_get_output_bus_count(pNode) == 1);\n\n    /* Input channel count needs to be the same as the output channel count. */\n    MA_ASSERT(ma_node_get_input_channels(pNode, 0) == ma_node_get_output_channels(pNode, 0));\n\n    /* We don't need to do anything here because it's a passthrough. */\n    (void)pNode;\n    (void)ppFramesIn;\n    (void)pFrameCountIn;\n    (void)ppFramesOut;\n    (void)pFrameCountOut;\n\n#if 0\n    /* The data has already been mixed. We just need to move it to the output buffer. */\n    if (ppFramesIn != NULL) {\n        ma_copy_pcm_frames(ppFramesOut[0], ppFramesIn[0], *pFrameCountOut, ma_format_f32, ma_node_get_output_channels(pNode, 0));\n    }\n#endif\n}\n\nstatic ma_node_vtable g_node_graph_endpoint_vtable =\n{\n    ma_node_graph_endpoint_process_pcm_frames,\n    NULL,   /* onGetRequiredInputFrameCount */\n    1,      /* 1 input bus. */\n    1,      /* 1 output bus. */\n    MA_NODE_FLAG_PASSTHROUGH    /* Flags. The endpoint is a passthrough. */\n};\n\nMA_API ma_result ma_node_graph_init(const ma_node_graph_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_node_graph* pNodeGraph)\n{\n    ma_result result;\n    ma_node_config baseConfig;\n    ma_node_config endpointConfig;\n\n    if (pNodeGraph == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pNodeGraph);\n    pNodeGraph->nodeCacheCapInFrames = pConfig->nodeCacheCapInFrames;\n    if (pNodeGraph->nodeCacheCapInFrames == 0) {\n        pNodeGraph->nodeCacheCapInFrames = MA_DEFAULT_NODE_CACHE_CAP_IN_FRAMES_PER_BUS;\n    }\n\n\n    /* Base node so we can use the node graph as a node into another graph. */\n    baseConfig = ma_node_config_init();\n    baseConfig.vtable = &g_node_graph_node_vtable;\n    baseConfig.pOutputChannels = &pConfig->channels;\n\n    result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pNodeGraph->base);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n\n    /* Endpoint. */\n    endpointConfig = ma_node_config_init();\n    endpointConfig.vtable          = &g_node_graph_endpoint_vtable;\n    endpointConfig.pInputChannels  = &pConfig->channels;\n    endpointConfig.pOutputChannels = &pConfig->channels;\n\n    result = ma_node_init(pNodeGraph, &endpointConfig, pAllocationCallbacks, &pNodeGraph->endpoint);\n    if (result != MA_SUCCESS) {\n        ma_node_uninit(&pNodeGraph->base, pAllocationCallbacks);\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_node_graph_uninit(ma_node_graph* pNodeGraph, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pNodeGraph == NULL) {\n        return;\n    }\n\n    ma_node_uninit(&pNodeGraph->endpoint, pAllocationCallbacks);\n}\n\nMA_API ma_node* ma_node_graph_get_endpoint(ma_node_graph* pNodeGraph)\n{\n    if (pNodeGraph == NULL) {\n        return NULL;\n    }\n\n    return &pNodeGraph->endpoint;\n}\n\nMA_API ma_result ma_node_graph_read_pcm_frames(ma_node_graph* pNodeGraph, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint64 totalFramesRead;\n    ma_uint32 channels;\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;   /* Safety. */\n    }\n\n    if (pNodeGraph == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    channels = ma_node_get_output_channels(&pNodeGraph->endpoint, 0);\n\n\n    /* We'll be nice and try to do a full read of all frameCount frames. */\n    totalFramesRead = 0;\n    while (totalFramesRead < frameCount) {\n        ma_uint32 framesJustRead;\n        ma_uint64 framesToRead = frameCount - totalFramesRead;\n\n        if (framesToRead > 0xFFFFFFFF) {\n            framesToRead = 0xFFFFFFFF;\n        }\n\n        ma_node_graph_set_is_reading(pNodeGraph, MA_TRUE);\n        {\n            result = ma_node_read_pcm_frames(&pNodeGraph->endpoint, 0, (float*)ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, ma_format_f32, channels), (ma_uint32)framesToRead, &framesJustRead, ma_node_get_time(&pNodeGraph->endpoint));\n        }\n        ma_node_graph_set_is_reading(pNodeGraph, MA_FALSE);\n\n        totalFramesRead += framesJustRead;\n\n        if (result != MA_SUCCESS) {\n            break;\n        }\n\n        /* Abort if we weren't able to read any frames or else we risk getting stuck in a loop. */\n        if (framesJustRead == 0) {\n            break;\n        }\n    }\n\n    /* Let's go ahead and silence any leftover frames just for some added safety to ensure the caller doesn't try emitting garbage out of the speakers. */\n    if (totalFramesRead < frameCount) {\n        ma_silence_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, totalFramesRead, ma_format_f32, channels), (frameCount - totalFramesRead), ma_format_f32, channels);\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = totalFramesRead;\n    }\n\n    return result;\n}\n\nMA_API ma_uint32 ma_node_graph_get_channels(const ma_node_graph* pNodeGraph)\n{\n    if (pNodeGraph == NULL) {\n        return 0;\n    }\n\n    return ma_node_get_output_channels(&pNodeGraph->endpoint, 0);\n}\n\nMA_API ma_uint64 ma_node_graph_get_time(const ma_node_graph* pNodeGraph)\n{\n    if (pNodeGraph == NULL) {\n        return 0;\n    }\n\n    return ma_node_get_time(&pNodeGraph->endpoint); /* Global time is just the local time of the endpoint. */\n}\n\nMA_API ma_result ma_node_graph_set_time(ma_node_graph* pNodeGraph, ma_uint64 globalTime)\n{\n    if (pNodeGraph == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_node_set_time(&pNodeGraph->endpoint, globalTime); /* Global time is just the local time of the endpoint. */\n}\n\n\n#define MA_NODE_OUTPUT_BUS_FLAG_HAS_READ    0x01    /* Whether or not this bus ready to read more data. Only used on nodes with multiple output buses. */\n\nstatic ma_result ma_node_output_bus_init(ma_node* pNode, ma_uint32 outputBusIndex, ma_uint32 channels, ma_node_output_bus* pOutputBus)\n{\n    MA_ASSERT(pOutputBus != NULL);\n    MA_ASSERT(outputBusIndex < MA_MAX_NODE_BUS_COUNT);\n    MA_ASSERT(outputBusIndex < ma_node_get_output_bus_count(pNode));\n    MA_ASSERT(channels < 256);\n\n    MA_ZERO_OBJECT(pOutputBus);\n\n    if (channels == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pOutputBus->pNode          = pNode;\n    pOutputBus->outputBusIndex = (ma_uint8)outputBusIndex;\n    pOutputBus->channels       = (ma_uint8)channels;\n    pOutputBus->flags          = MA_NODE_OUTPUT_BUS_FLAG_HAS_READ; /* <-- Important that this flag is set by default. */\n    pOutputBus->volume         = 1;\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_node_output_bus_lock(ma_node_output_bus* pOutputBus)\n{\n    ma_spinlock_lock(&pOutputBus->lock);\n}\n\nstatic void ma_node_output_bus_unlock(ma_node_output_bus* pOutputBus)\n{\n    ma_spinlock_unlock(&pOutputBus->lock);\n}\n\n\nstatic ma_uint32 ma_node_output_bus_get_channels(const ma_node_output_bus* pOutputBus)\n{\n    return pOutputBus->channels;\n}\n\n\nstatic void ma_node_output_bus_set_has_read(ma_node_output_bus* pOutputBus, ma_bool32 hasRead)\n{\n    if (hasRead) {\n        ma_atomic_fetch_or_32(&pOutputBus->flags, MA_NODE_OUTPUT_BUS_FLAG_HAS_READ);\n    } else {\n        ma_atomic_fetch_and_32(&pOutputBus->flags, (ma_uint32)~MA_NODE_OUTPUT_BUS_FLAG_HAS_READ);\n    }\n}\n\nstatic ma_bool32 ma_node_output_bus_has_read(ma_node_output_bus* pOutputBus)\n{\n    return (ma_atomic_load_32(&pOutputBus->flags) & MA_NODE_OUTPUT_BUS_FLAG_HAS_READ) != 0;\n}\n\n\nstatic void ma_node_output_bus_set_is_attached(ma_node_output_bus* pOutputBus, ma_bool32 isAttached)\n{\n    ma_atomic_exchange_32(&pOutputBus->isAttached, isAttached);\n}\n\nstatic ma_bool32 ma_node_output_bus_is_attached(ma_node_output_bus* pOutputBus)\n{\n    return ma_atomic_load_32(&pOutputBus->isAttached);\n}\n\n\nstatic ma_result ma_node_output_bus_set_volume(ma_node_output_bus* pOutputBus, float volume)\n{\n    MA_ASSERT(pOutputBus != NULL);\n\n    if (volume < 0.0f) {\n        volume = 0.0f;\n    }\n\n    ma_atomic_exchange_f32(&pOutputBus->volume, volume);\n\n    return MA_SUCCESS;\n}\n\nstatic float ma_node_output_bus_get_volume(const ma_node_output_bus* pOutputBus)\n{\n    return ma_atomic_load_f32((float*)&pOutputBus->volume);\n}\n\n\nstatic ma_result ma_node_input_bus_init(ma_uint32 channels, ma_node_input_bus* pInputBus)\n{\n    MA_ASSERT(pInputBus != NULL);\n    MA_ASSERT(channels < 256);\n\n    MA_ZERO_OBJECT(pInputBus);\n\n    if (channels == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pInputBus->channels = (ma_uint8)channels;\n\n    return MA_SUCCESS;\n}\n\nstatic void ma_node_input_bus_lock(ma_node_input_bus* pInputBus)\n{\n    MA_ASSERT(pInputBus != NULL);\n\n    ma_spinlock_lock(&pInputBus->lock);\n}\n\nstatic void ma_node_input_bus_unlock(ma_node_input_bus* pInputBus)\n{\n    MA_ASSERT(pInputBus != NULL);\n\n    ma_spinlock_unlock(&pInputBus->lock);\n}\n\n\nstatic void ma_node_input_bus_next_begin(ma_node_input_bus* pInputBus)\n{\n    ma_atomic_fetch_add_32(&pInputBus->nextCounter, 1);\n}\n\nstatic void ma_node_input_bus_next_end(ma_node_input_bus* pInputBus)\n{\n    ma_atomic_fetch_sub_32(&pInputBus->nextCounter, 1);\n}\n\nstatic ma_uint32 ma_node_input_bus_get_next_counter(ma_node_input_bus* pInputBus)\n{\n    return ma_atomic_load_32(&pInputBus->nextCounter);\n}\n\n\nstatic ma_uint32 ma_node_input_bus_get_channels(const ma_node_input_bus* pInputBus)\n{\n    return pInputBus->channels;\n}\n\n\nstatic void ma_node_input_bus_detach__no_output_bus_lock(ma_node_input_bus* pInputBus, ma_node_output_bus* pOutputBus)\n{\n    MA_ASSERT(pInputBus  != NULL);\n    MA_ASSERT(pOutputBus != NULL);\n\n    /*\n    Mark the output bus as detached first. This will prevent future iterations on the audio thread\n    from iterating this output bus.\n    */\n    ma_node_output_bus_set_is_attached(pOutputBus, MA_FALSE);\n\n    /*\n    We cannot use the output bus lock here since it'll be getting used at a higher level, but we do\n    still need to use the input bus lock since we'll be updating pointers on two different output\n    buses. The same rules apply here as the attaching case. Although we're using a lock here, we're\n    *not* using a lock when iterating over the list in the audio thread. We therefore need to craft\n    this in a way such that the iteration on the audio thread doesn't break.\n\n    The the first thing to do is swap out the \"next\" pointer of the previous output bus with the\n    new \"next\" output bus. This is the operation that matters for iteration on the audio thread.\n    After that, the previous pointer on the new \"next\" pointer needs to be updated, after which\n    point the linked list will be in a good state.\n    */\n    ma_node_input_bus_lock(pInputBus);\n    {\n        ma_node_output_bus* pOldPrev = (ma_node_output_bus*)ma_atomic_load_ptr(&pOutputBus->pPrev);\n        ma_node_output_bus* pOldNext = (ma_node_output_bus*)ma_atomic_load_ptr(&pOutputBus->pNext);\n\n        if (pOldPrev != NULL) {\n            ma_atomic_exchange_ptr(&pOldPrev->pNext, pOldNext); /* <-- This is where the output bus is detached from the list. */\n        }\n        if (pOldNext != NULL) {\n            ma_atomic_exchange_ptr(&pOldNext->pPrev, pOldPrev); /* <-- This is required for detachment. */\n        }\n    }\n    ma_node_input_bus_unlock(pInputBus);\n\n    /* At this point the output bus is detached and the linked list is completely unaware of it. Reset some data for safety. */\n    ma_atomic_exchange_ptr(&pOutputBus->pNext, NULL);   /* Using atomic exchanges here, mainly for the benefit of analysis tools which don't always recognize spinlocks. */\n    ma_atomic_exchange_ptr(&pOutputBus->pPrev, NULL);   /* As above. */\n    pOutputBus->pInputNode             = NULL;\n    pOutputBus->inputNodeInputBusIndex = 0;\n\n\n    /*\n    For thread-safety reasons, we don't want to be returning from this straight away. We need to\n    wait for the audio thread to finish with the output bus. There's two things we need to wait\n    for. The first is the part that selects the next output bus in the list, and the other is the\n    part that reads from the output bus. Basically all we're doing is waiting for the input bus\n    to stop referencing the output bus.\n\n    We're doing this part last because we want the section above to run while the audio thread\n    is finishing up with the output bus, just for efficiency reasons. We marked the output bus as\n    detached right at the top of this function which is going to prevent the audio thread from\n    iterating the output bus again.\n    */\n\n    /* Part 1: Wait for the current iteration to complete. */\n    while (ma_node_input_bus_get_next_counter(pInputBus) > 0) {\n        ma_yield();\n    }\n\n    /* Part 2: Wait for any reads to complete. */\n    while (ma_atomic_load_32(&pOutputBus->refCount) > 0) {\n        ma_yield();\n    }\n\n    /*\n    At this point we're done detaching and we can be guaranteed that the audio thread is not going\n    to attempt to reference this output bus again (until attached again).\n    */\n}\n\n#if 0   /* Not used at the moment, but leaving here in case I need it later. */\nstatic void ma_node_input_bus_detach(ma_node_input_bus* pInputBus, ma_node_output_bus* pOutputBus)\n{\n    MA_ASSERT(pInputBus  != NULL);\n    MA_ASSERT(pOutputBus != NULL);\n\n    ma_node_output_bus_lock(pOutputBus);\n    {\n        ma_node_input_bus_detach__no_output_bus_lock(pInputBus, pOutputBus);\n    }\n    ma_node_output_bus_unlock(pOutputBus);\n}\n#endif\n\nstatic void ma_node_input_bus_attach(ma_node_input_bus* pInputBus, ma_node_output_bus* pOutputBus, ma_node* pNewInputNode, ma_uint32 inputNodeInputBusIndex)\n{\n    MA_ASSERT(pInputBus  != NULL);\n    MA_ASSERT(pOutputBus != NULL);\n\n    ma_node_output_bus_lock(pOutputBus);\n    {\n        ma_node_output_bus* pOldInputNode = (ma_node_output_bus*)ma_atomic_load_ptr(&pOutputBus->pInputNode);\n\n        /* Detach from any existing attachment first if necessary. */\n        if (pOldInputNode != NULL) {\n            ma_node_input_bus_detach__no_output_bus_lock(pInputBus, pOutputBus);\n        }\n\n        /*\n        At this point we can be sure the output bus is not attached to anything. The linked list in the\n        old input bus has been updated so that pOutputBus will not get iterated again.\n        */\n        pOutputBus->pInputNode             = pNewInputNode;                     /* No need for an atomic assignment here because modification of this variable always happens within a lock. */\n        pOutputBus->inputNodeInputBusIndex = (ma_uint8)inputNodeInputBusIndex;\n\n        /*\n        Now we need to attach the output bus to the linked list. This involves updating two pointers on\n        two different output buses so I'm going to go ahead and keep this simple and just use a lock.\n        There are ways to do this without a lock, but it's just too hard to maintain for it's value.\n\n        Although we're locking here, it's important to remember that we're *not* locking when iterating\n        and reading audio data since that'll be running on the audio thread. As a result we need to be\n        careful how we craft this so that we don't break iteration. What we're going to do is always\n        attach the new item so that it becomes the first item in the list. That way, as we're iterating\n        we won't break any links in the list and iteration will continue safely. The detaching case will\n        also be crafted in a way as to not break list iteration. It's important to remember to use\n        atomic exchanges here since no locking is happening on the audio thread during iteration.\n        */\n        ma_node_input_bus_lock(pInputBus);\n        {\n            ma_node_output_bus* pNewPrev = &pInputBus->head;\n            ma_node_output_bus* pNewNext = (ma_node_output_bus*)ma_atomic_load_ptr(&pInputBus->head.pNext);\n\n            /* Update the local output bus. */\n            ma_atomic_exchange_ptr(&pOutputBus->pPrev, pNewPrev);\n            ma_atomic_exchange_ptr(&pOutputBus->pNext, pNewNext);\n\n            /* Update the other output buses to point back to the local output bus. */\n            ma_atomic_exchange_ptr(&pInputBus->head.pNext, pOutputBus); /* <-- This is where the output bus is actually attached to the input bus. */\n\n            /* Do the previous pointer last. This is only used for detachment. */\n            if (pNewNext != NULL) {\n                ma_atomic_exchange_ptr(&pNewNext->pPrev,  pOutputBus);\n            }\n        }\n        ma_node_input_bus_unlock(pInputBus);\n\n        /*\n        Mark the node as attached last. This is used to controlling whether or the output bus will be\n        iterated on the audio thread. Mainly required for detachment purposes.\n        */\n        ma_node_output_bus_set_is_attached(pOutputBus, MA_TRUE);\n    }\n    ma_node_output_bus_unlock(pOutputBus);\n}\n\nstatic ma_node_output_bus* ma_node_input_bus_next(ma_node_input_bus* pInputBus, ma_node_output_bus* pOutputBus)\n{\n    ma_node_output_bus* pNext;\n\n    MA_ASSERT(pInputBus != NULL);\n\n    if (pOutputBus == NULL) {\n        return NULL;\n    }\n\n    ma_node_input_bus_next_begin(pInputBus);\n    {\n        pNext = pOutputBus;\n        for (;;) {\n            pNext = (ma_node_output_bus*)ma_atomic_load_ptr(&pNext->pNext);\n            if (pNext == NULL) {\n                break;      /* Reached the end. */\n            }\n\n            if (ma_node_output_bus_is_attached(pNext) == MA_FALSE) {\n                continue;   /* The node is not attached. Keep checking. */\n            }\n\n            /* The next node has been selected. */\n            break;\n        }\n\n        /* We need to increment the reference count of the selected node. */\n        if (pNext != NULL) {\n            ma_atomic_fetch_add_32(&pNext->refCount, 1);\n        }\n\n        /* The previous node is no longer being referenced. */\n        ma_atomic_fetch_sub_32(&pOutputBus->refCount, 1);\n    }\n    ma_node_input_bus_next_end(pInputBus);\n\n    return pNext;\n}\n\nstatic ma_node_output_bus* ma_node_input_bus_first(ma_node_input_bus* pInputBus)\n{\n    return ma_node_input_bus_next(pInputBus, &pInputBus->head);\n}\n\n\n\nstatic ma_result ma_node_input_bus_read_pcm_frames(ma_node* pInputNode, ma_node_input_bus* pInputBus, float* pFramesOut, ma_uint32 frameCount, ma_uint32* pFramesRead, ma_uint64 globalTime)\n{\n    ma_result result = MA_SUCCESS;\n    ma_node_output_bus* pOutputBus;\n    ma_node_output_bus* pFirst;\n    ma_uint32 inputChannels;\n    ma_bool32 doesOutputBufferHaveContent = MA_FALSE;\n\n    (void)pInputNode;   /* Not currently used. */\n\n    /*\n    This will be called from the audio thread which means we can't be doing any locking. Basically,\n    this function will not perfom any locking, whereas attaching and detaching will, but crafted in\n    such a way that we don't need to perform any locking here. The important thing to remember is\n    to always iterate in a forward direction.\n\n    In order to process any data we need to first read from all input buses. That's where this\n    function comes in. This iterates over each of the attachments and accumulates/mixes them. We\n    also convert the channels to the nodes output channel count before mixing. We want to do this\n    channel conversion so that the caller of this function can invoke the processing callback\n    without having to do it themselves.\n\n    When we iterate over each of the attachments on the input bus, we need to read as much data as\n    we can from each of them so that we don't end up with holes between each of the attachments. To\n    do this, we need to read from each attachment in a loop and read as many frames as we can, up\n    to `frameCount`.\n    */\n    MA_ASSERT(pInputNode  != NULL);\n    MA_ASSERT(pFramesRead != NULL); /* pFramesRead is critical and must always be specified. On input it's undefined and on output it'll be set to the number of frames actually read. */\n\n    *pFramesRead = 0;   /* Safety. */\n\n    inputChannels = ma_node_input_bus_get_channels(pInputBus);\n\n    /*\n    We need to be careful with how we call ma_node_input_bus_first() and ma_node_input_bus_next(). They\n    are both critical to our lock-free thread-safety system. We can only call ma_node_input_bus_first()\n    once per iteration, however we have an optimization to checks whether or not it's the first item in\n    the list. We therefore need to store a pointer to the first item rather than repeatedly calling\n    ma_node_input_bus_first(). It's safe to keep hold of this pointer, so long as we don't dereference it\n    after calling ma_node_input_bus_next(), which we won't be.\n    */\n    pFirst = ma_node_input_bus_first(pInputBus);\n    if (pFirst == NULL) {\n        return MA_SUCCESS;  /* No attachments. Read nothing. */\n    }\n\n    for (pOutputBus = pFirst; pOutputBus != NULL; pOutputBus = ma_node_input_bus_next(pInputBus, pOutputBus)) {\n        ma_uint32 framesProcessed = 0;\n        ma_bool32 isSilentOutput = MA_FALSE;\n\n        MA_ASSERT(pOutputBus->pNode != NULL);\n        MA_ASSERT(((ma_node_base*)pOutputBus->pNode)->vtable != NULL);\n\n        isSilentOutput = (((ma_node_base*)pOutputBus->pNode)->vtable->flags & MA_NODE_FLAG_SILENT_OUTPUT) != 0;\n\n        if (pFramesOut != NULL) {\n            /* Read. */\n            float temp[MA_DATA_CONVERTER_STACK_BUFFER_SIZE / sizeof(float)];\n            ma_uint32 tempCapInFrames = ma_countof(temp) / inputChannels;\n\n            while (framesProcessed < frameCount) {\n                float* pRunningFramesOut;\n                ma_uint32 framesToRead;\n                ma_uint32 framesJustRead;\n\n                framesToRead = frameCount - framesProcessed;\n                if (framesToRead > tempCapInFrames) {\n                    framesToRead = tempCapInFrames;\n                }\n\n                pRunningFramesOut = ma_offset_pcm_frames_ptr_f32(pFramesOut, framesProcessed, inputChannels);\n\n                if (doesOutputBufferHaveContent == MA_FALSE) {\n                    /* Fast path. First attachment. We just read straight into the output buffer (no mixing required). */\n                    result = ma_node_read_pcm_frames(pOutputBus->pNode, pOutputBus->outputBusIndex, pRunningFramesOut, framesToRead, &framesJustRead, globalTime + framesProcessed);\n                } else {\n                    /* Slow path. Not the first attachment. Mixing required. */\n                    result = ma_node_read_pcm_frames(pOutputBus->pNode, pOutputBus->outputBusIndex, temp, framesToRead, &framesJustRead, globalTime + framesProcessed);\n                    if (result == MA_SUCCESS || result == MA_AT_END) {\n                        if (isSilentOutput == MA_FALSE) {   /* Don't mix if the node outputs silence. */\n                            ma_mix_pcm_frames_f32(pRunningFramesOut, temp, framesJustRead, inputChannels, /*volume*/1);\n                        }\n                    }\n                }\n\n                framesProcessed += framesJustRead;\n\n                /* If we reached the end or otherwise failed to read any data we need to finish up with this output node. */\n                if (result != MA_SUCCESS) {\n                    break;\n                }\n\n                /* If we didn't read anything, abort so we don't get stuck in a loop. */\n                if (framesJustRead == 0) {\n                    break;\n                }\n            }\n\n            /* If it's the first attachment we didn't do any mixing. Any leftover samples need to be silenced. */\n            if (pOutputBus == pFirst && framesProcessed < frameCount) {\n                ma_silence_pcm_frames(ma_offset_pcm_frames_ptr(pFramesOut, framesProcessed, ma_format_f32, inputChannels), (frameCount - framesProcessed), ma_format_f32, inputChannels);\n            }\n\n            if (isSilentOutput == MA_FALSE) {\n                doesOutputBufferHaveContent = MA_TRUE;\n            }\n        } else {\n            /* Seek. */\n            ma_node_read_pcm_frames(pOutputBus->pNode, pOutputBus->outputBusIndex, NULL, frameCount, &framesProcessed, globalTime);\n        }\n    }\n\n    /* If we didn't output anything, output silence. */\n    if (doesOutputBufferHaveContent == MA_FALSE && pFramesOut != NULL) {\n        ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, inputChannels);\n    }\n\n    /* In this path we always \"process\" the entire amount. */\n    *pFramesRead = frameCount;\n\n    return result;\n}\n\n\nMA_API ma_node_config ma_node_config_init(void)\n{\n    ma_node_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.initialState   = ma_node_state_started;    /* Nodes are started by default. */\n    config.inputBusCount  = MA_NODE_BUS_COUNT_UNKNOWN;\n    config.outputBusCount = MA_NODE_BUS_COUNT_UNKNOWN;\n\n    return config;\n}\n\n\n\nstatic ma_result ma_node_detach_full(ma_node* pNode);\n\nstatic float* ma_node_get_cached_input_ptr(ma_node* pNode, ma_uint32 inputBusIndex)\n{\n    ma_node_base* pNodeBase = (ma_node_base*)pNode;\n    ma_uint32 iInputBus;\n    float* pBasePtr;\n\n    MA_ASSERT(pNodeBase != NULL);\n\n    /* Input data is stored at the front of the buffer. */\n    pBasePtr = pNodeBase->pCachedData;\n    for (iInputBus = 0; iInputBus < inputBusIndex; iInputBus += 1) {\n        pBasePtr += pNodeBase->cachedDataCapInFramesPerBus * ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[iInputBus]);\n    }\n\n    return pBasePtr;\n}\n\nstatic float* ma_node_get_cached_output_ptr(ma_node* pNode, ma_uint32 outputBusIndex)\n{\n    ma_node_base* pNodeBase = (ma_node_base*)pNode;\n    ma_uint32 iInputBus;\n    ma_uint32 iOutputBus;\n    float* pBasePtr;\n\n    MA_ASSERT(pNodeBase != NULL);\n\n    /* Cached output data starts after the input data. */\n    pBasePtr = pNodeBase->pCachedData;\n    for (iInputBus = 0; iInputBus < ma_node_get_input_bus_count(pNodeBase); iInputBus += 1) {\n        pBasePtr += pNodeBase->cachedDataCapInFramesPerBus * ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[iInputBus]);\n    }\n\n    for (iOutputBus = 0; iOutputBus < outputBusIndex; iOutputBus += 1) {\n        pBasePtr += pNodeBase->cachedDataCapInFramesPerBus * ma_node_output_bus_get_channels(&pNodeBase->pOutputBuses[iOutputBus]);\n    }\n\n    return pBasePtr;\n}\n\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t inputBusOffset;\n    size_t outputBusOffset;\n    size_t cachedDataOffset;\n    ma_uint32 inputBusCount;    /* So it doesn't have to be calculated twice. */\n    ma_uint32 outputBusCount;   /* So it doesn't have to be calculated twice. */\n} ma_node_heap_layout;\n\nstatic ma_result ma_node_translate_bus_counts(const ma_node_config* pConfig, ma_uint32* pInputBusCount, ma_uint32* pOutputBusCount)\n{\n    ma_uint32 inputBusCount;\n    ma_uint32 outputBusCount;\n\n    MA_ASSERT(pConfig != NULL);\n    MA_ASSERT(pInputBusCount  != NULL);\n    MA_ASSERT(pOutputBusCount != NULL);\n\n    /* Bus counts are determined by the vtable, unless they're set to `MA_NODE_BUS_COUNT_UNKNWON`, in which case they're taken from the config. */\n    if (pConfig->vtable->inputBusCount == MA_NODE_BUS_COUNT_UNKNOWN) {\n        inputBusCount = pConfig->inputBusCount;\n    } else {\n        inputBusCount = pConfig->vtable->inputBusCount;\n\n        if (pConfig->inputBusCount != MA_NODE_BUS_COUNT_UNKNOWN && pConfig->inputBusCount != pConfig->vtable->inputBusCount) {\n            return MA_INVALID_ARGS; /* Invalid configuration. You must not specify a conflicting bus count between the node's config and the vtable. */\n        }\n    }\n\n    if (pConfig->vtable->outputBusCount == MA_NODE_BUS_COUNT_UNKNOWN) {\n        outputBusCount = pConfig->outputBusCount;\n    } else {\n        outputBusCount = pConfig->vtable->outputBusCount;\n\n        if (pConfig->outputBusCount != MA_NODE_BUS_COUNT_UNKNOWN && pConfig->outputBusCount != pConfig->vtable->outputBusCount) {\n            return MA_INVALID_ARGS; /* Invalid configuration. You must not specify a conflicting bus count between the node's config and the vtable. */\n        }\n    }\n\n    /* Bus counts must be within limits. */\n    if (inputBusCount > MA_MAX_NODE_BUS_COUNT || outputBusCount > MA_MAX_NODE_BUS_COUNT) {\n        return MA_INVALID_ARGS;\n    }\n\n\n    /* We must have channel counts for each bus. */\n    if ((inputBusCount > 0 && pConfig->pInputChannels == NULL) || (outputBusCount > 0 && pConfig->pOutputChannels == NULL)) {\n        return MA_INVALID_ARGS; /* You must specify channel counts for each input and output bus. */\n    }\n\n\n    /* Some special rules for passthrough nodes. */\n    if ((pConfig->vtable->flags & MA_NODE_FLAG_PASSTHROUGH) != 0) {\n        if ((pConfig->vtable->inputBusCount != 0 && pConfig->vtable->inputBusCount != 1) || pConfig->vtable->outputBusCount != 1) {\n            return MA_INVALID_ARGS; /* Passthrough nodes must have exactly 1 output bus and either 0 or 1 input bus. */\n        }\n\n        if (pConfig->pInputChannels[0] != pConfig->pOutputChannels[0]) {\n            return MA_INVALID_ARGS; /* Passthrough nodes must have the same number of channels between input and output nodes. */\n        }\n    }\n\n\n    *pInputBusCount  = inputBusCount;\n    *pOutputBusCount = outputBusCount;\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_node_get_heap_layout(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, ma_node_heap_layout* pHeapLayout)\n{\n    ma_result result;\n    ma_uint32 inputBusCount;\n    ma_uint32 outputBusCount;\n\n    MA_ASSERT(pHeapLayout != NULL);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL || pConfig->vtable == NULL || pConfig->vtable->onProcess == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_node_translate_bus_counts(pConfig, &inputBusCount, &outputBusCount);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    /* Input buses. */\n    if (inputBusCount > MA_MAX_NODE_LOCAL_BUS_COUNT) {\n        pHeapLayout->inputBusOffset = pHeapLayout->sizeInBytes;\n        pHeapLayout->sizeInBytes += ma_align_64(sizeof(ma_node_input_bus) * inputBusCount);\n    } else {\n        pHeapLayout->inputBusOffset = MA_SIZE_MAX;  /* MA_SIZE_MAX indicates that no heap allocation is required for the input bus. */\n    }\n\n    /* Output buses. */\n    if (outputBusCount > MA_MAX_NODE_LOCAL_BUS_COUNT) {\n        pHeapLayout->outputBusOffset = pHeapLayout->sizeInBytes;\n        pHeapLayout->sizeInBytes += ma_align_64(sizeof(ma_node_output_bus) * outputBusCount);\n    } else {\n        pHeapLayout->outputBusOffset = MA_SIZE_MAX;\n    }\n\n    /*\n    Cached audio data.\n\n    We need to allocate memory for a caching both input and output data. We have an optimization\n    where no caching is necessary for specific conditions:\n\n        - The node has 0 inputs and 1 output.\n\n    When a node meets the above conditions, no cache is allocated.\n\n    The size choice for this buffer is a little bit finicky. We don't want to be too wasteful by\n    allocating too much, but at the same time we want it be large enough so that enough frames can\n    be processed for each call to ma_node_read_pcm_frames() so that it keeps things efficient. For\n    now I'm going with 10ms @ 48K which is 480 frames per bus. This is configurable at compile\n    time. It might also be worth investigating whether or not this can be configured at run time.\n    */\n    if (inputBusCount == 0 && outputBusCount == 1) {\n        /* Fast path. No cache needed. */\n        pHeapLayout->cachedDataOffset = MA_SIZE_MAX;\n    } else {\n        /* Slow path. Cache needed. */\n        size_t cachedDataSizeInBytes = 0;\n        ma_uint32 iBus;\n\n        for (iBus = 0; iBus < inputBusCount; iBus += 1) {\n            cachedDataSizeInBytes += pNodeGraph->nodeCacheCapInFrames * ma_get_bytes_per_frame(ma_format_f32, pConfig->pInputChannels[iBus]);\n        }\n\n        for (iBus = 0; iBus < outputBusCount; iBus += 1) {\n            cachedDataSizeInBytes += pNodeGraph->nodeCacheCapInFrames * ma_get_bytes_per_frame(ma_format_f32, pConfig->pOutputChannels[iBus]);\n        }\n\n        pHeapLayout->cachedDataOffset = pHeapLayout->sizeInBytes;\n        pHeapLayout->sizeInBytes += ma_align_64(cachedDataSizeInBytes);\n    }\n\n\n    /*\n    Not technically part of the heap, but we can output the input and output bus counts so we can\n    avoid a redundant call to ma_node_translate_bus_counts().\n    */\n    pHeapLayout->inputBusCount  = inputBusCount;\n    pHeapLayout->outputBusCount = outputBusCount;\n\n    /* Make sure allocation size is aligned. */\n    pHeapLayout->sizeInBytes = ma_align_64(pHeapLayout->sizeInBytes);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_node_get_heap_size(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_node_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_node_get_heap_layout(pNodeGraph, pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_node_init_preallocated(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, void* pHeap, ma_node* pNode)\n{\n    ma_node_base* pNodeBase = (ma_node_base*)pNode;\n    ma_result result;\n    ma_node_heap_layout heapLayout;\n    ma_uint32 iInputBus;\n    ma_uint32 iOutputBus;\n\n    if (pNodeBase == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pNodeBase);\n\n    result = ma_node_get_heap_layout(pNodeGraph, pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pNodeBase->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n    pNodeBase->pNodeGraph     = pNodeGraph;\n    pNodeBase->vtable         = pConfig->vtable;\n    pNodeBase->state          = pConfig->initialState;\n    pNodeBase->stateTimes[ma_node_state_started] = 0;\n    pNodeBase->stateTimes[ma_node_state_stopped] = (ma_uint64)(ma_int64)-1; /* Weird casting for VC6 compatibility. */\n    pNodeBase->inputBusCount  = heapLayout.inputBusCount;\n    pNodeBase->outputBusCount = heapLayout.outputBusCount;\n\n    if (heapLayout.inputBusOffset != MA_SIZE_MAX) {\n        pNodeBase->pInputBuses = (ma_node_input_bus*)ma_offset_ptr(pHeap, heapLayout.inputBusOffset);\n    } else {\n        pNodeBase->pInputBuses = pNodeBase->_inputBuses;\n    }\n\n    if (heapLayout.outputBusOffset != MA_SIZE_MAX) {\n        pNodeBase->pOutputBuses = (ma_node_output_bus*)ma_offset_ptr(pHeap, heapLayout.outputBusOffset);\n    } else {\n        pNodeBase->pOutputBuses = pNodeBase->_outputBuses;\n    }\n\n    if (heapLayout.cachedDataOffset != MA_SIZE_MAX) {\n        pNodeBase->pCachedData = (float*)ma_offset_ptr(pHeap, heapLayout.cachedDataOffset);\n        pNodeBase->cachedDataCapInFramesPerBus = pNodeGraph->nodeCacheCapInFrames;\n    } else {\n        pNodeBase->pCachedData = NULL;\n    }\n\n\n\n    /* We need to run an initialization step for each input and output bus. */\n    for (iInputBus = 0; iInputBus < ma_node_get_input_bus_count(pNodeBase); iInputBus += 1) {\n        result = ma_node_input_bus_init(pConfig->pInputChannels[iInputBus], &pNodeBase->pInputBuses[iInputBus]);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n    for (iOutputBus = 0; iOutputBus < ma_node_get_output_bus_count(pNodeBase); iOutputBus += 1) {\n        result = ma_node_output_bus_init(pNodeBase, iOutputBus, pConfig->pOutputChannels[iOutputBus], &pNodeBase->pOutputBuses[iOutputBus]);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n    }\n\n\n    /* The cached data needs to be initialized to silence (or a sine wave tone if we're debugging). */\n    if (pNodeBase->pCachedData != NULL) {\n        ma_uint32 iBus;\n\n    #if 1   /* Toggle this between 0 and 1 to turn debugging on or off. 1 = fill with a sine wave for debugging; 0 = fill with silence. */\n        /* For safety we'll go ahead and default the buffer to silence. */\n        for (iBus = 0; iBus < ma_node_get_input_bus_count(pNodeBase); iBus += 1) {\n            ma_silence_pcm_frames(ma_node_get_cached_input_ptr(pNode, iBus), pNodeBase->cachedDataCapInFramesPerBus, ma_format_f32, ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[iBus]));\n        }\n        for (iBus = 0; iBus < ma_node_get_output_bus_count(pNodeBase); iBus += 1) {\n            ma_silence_pcm_frames(ma_node_get_cached_output_ptr(pNode, iBus), pNodeBase->cachedDataCapInFramesPerBus, ma_format_f32, ma_node_output_bus_get_channels(&pNodeBase->pOutputBuses[iBus]));\n        }\n    #else\n        /* For debugging. Default to a sine wave. */\n        for (iBus = 0; iBus < ma_node_get_input_bus_count(pNodeBase); iBus += 1) {\n            ma_debug_fill_pcm_frames_with_sine_wave(ma_node_get_cached_input_ptr(pNode, iBus), pNodeBase->cachedDataCapInFramesPerBus, ma_format_f32, ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[iBus]), 48000);\n        }\n        for (iBus = 0; iBus < ma_node_get_output_bus_count(pNodeBase); iBus += 1) {\n            ma_debug_fill_pcm_frames_with_sine_wave(ma_node_get_cached_output_ptr(pNode, iBus), pNodeBase->cachedDataCapInFramesPerBus, ma_format_f32, ma_node_output_bus_get_channels(&pNodeBase->pOutputBuses[iBus]), 48000);\n        }\n    #endif\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_node_init(ma_node_graph* pNodeGraph, const ma_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_node* pNode)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_node_get_heap_size(pNodeGraph, pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_node_init_preallocated(pNodeGraph, pConfig, pHeap, pNode);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    ((ma_node_base*)pNode)->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_node_uninit(ma_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_node_base* pNodeBase = (ma_node_base*)pNode;\n\n    if (pNodeBase == NULL) {\n        return;\n    }\n\n    /*\n    The first thing we need to do is fully detach the node. This will detach all inputs and\n    outputs. We need to do this first because it will sever the connection with the node graph and\n    allow us to complete uninitialization without needing to worry about thread-safety with the\n    audio thread. The detachment process will wait for any local processing of the node to finish.\n    */\n    ma_node_detach_full(pNode);\n\n    /*\n    At this point the node should be completely unreferenced by the node graph and we can finish up\n    the uninitialization process without needing to worry about thread-safety.\n    */\n    if (pNodeBase->_ownsHeap) {\n        ma_free(pNodeBase->_pHeap, pAllocationCallbacks);\n    }\n}\n\nMA_API ma_node_graph* ma_node_get_node_graph(const ma_node* pNode)\n{\n    if (pNode == NULL) {\n        return NULL;\n    }\n\n    return ((const ma_node_base*)pNode)->pNodeGraph;\n}\n\nMA_API ma_uint32 ma_node_get_input_bus_count(const ma_node* pNode)\n{\n    if (pNode == NULL) {\n        return 0;\n    }\n\n    return ((ma_node_base*)pNode)->inputBusCount;\n}\n\nMA_API ma_uint32 ma_node_get_output_bus_count(const ma_node* pNode)\n{\n    if (pNode == NULL) {\n        return 0;\n    }\n\n    return ((ma_node_base*)pNode)->outputBusCount;\n}\n\n\nMA_API ma_uint32 ma_node_get_input_channels(const ma_node* pNode, ma_uint32 inputBusIndex)\n{\n    const ma_node_base* pNodeBase = (const ma_node_base*)pNode;\n\n    if (pNode == NULL) {\n        return 0;\n    }\n\n    if (inputBusIndex >= ma_node_get_input_bus_count(pNode)) {\n        return 0;   /* Invalid bus index. */\n    }\n\n    return ma_node_input_bus_get_channels(&pNodeBase->pInputBuses[inputBusIndex]);\n}\n\nMA_API ma_uint32 ma_node_get_output_channels(const ma_node* pNode, ma_uint32 outputBusIndex)\n{\n    const ma_node_base* pNodeBase = (const ma_node_base*)pNode;\n\n    if (pNode == NULL) {\n        return 0;\n    }\n\n    if (outputBusIndex >= ma_node_get_output_bus_count(pNode)) {\n        return 0;   /* Invalid bus index. */\n    }\n\n    return ma_node_output_bus_get_channels(&pNodeBase->pOutputBuses[outputBusIndex]);\n}\n\n\nstatic ma_result ma_node_detach_full(ma_node* pNode)\n{\n    ma_node_base* pNodeBase = (ma_node_base*)pNode;\n    ma_uint32 iInputBus;\n\n    if (pNodeBase == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /*\n    Make sure the node is completely detached first. This will not return until the output bus is\n    guaranteed to no longer be referenced by the audio thread.\n    */\n    ma_node_detach_all_output_buses(pNode);\n\n    /*\n    At this point all output buses will have been detached from the graph and we can be guaranteed\n    that none of it's input nodes will be getting processed by the graph. We can detach these\n    without needing to worry about the audio thread touching them.\n    */\n    for (iInputBus = 0; iInputBus < ma_node_get_input_bus_count(pNode); iInputBus += 1) {\n        ma_node_input_bus* pInputBus;\n        ma_node_output_bus* pOutputBus;\n\n        pInputBus = &pNodeBase->pInputBuses[iInputBus];\n\n        /*\n        This is important. We cannot be using ma_node_input_bus_first() or ma_node_input_bus_next(). Those\n        functions are specifically for the audio thread. We'll instead just manually iterate using standard\n        linked list logic. We don't need to worry about the audio thread referencing these because the step\n        above severed the connection to the graph.\n        */\n        for (pOutputBus = (ma_node_output_bus*)ma_atomic_load_ptr(&pInputBus->head.pNext); pOutputBus != NULL; pOutputBus = (ma_node_output_bus*)ma_atomic_load_ptr(&pOutputBus->pNext)) {\n            ma_node_detach_output_bus(pOutputBus->pNode, pOutputBus->outputBusIndex);   /* This won't do any waiting in practice and should be efficient. */\n        }\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_node_detach_output_bus(ma_node* pNode, ma_uint32 outputBusIndex)\n{\n    ma_result result = MA_SUCCESS;\n    ma_node_base* pNodeBase = (ma_node_base*)pNode;\n    ma_node_base* pInputNodeBase;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (outputBusIndex >= ma_node_get_output_bus_count(pNode)) {\n        return MA_INVALID_ARGS; /* Invalid output bus index. */\n    }\n\n    /* We need to lock the output bus because we need to inspect the input node and grab it's input bus. */\n    ma_node_output_bus_lock(&pNodeBase->pOutputBuses[outputBusIndex]);\n    {\n        pInputNodeBase = (ma_node_base*)pNodeBase->pOutputBuses[outputBusIndex].pInputNode;\n        if (pInputNodeBase != NULL) {\n            ma_node_input_bus_detach__no_output_bus_lock(&pInputNodeBase->pInputBuses[pNodeBase->pOutputBuses[outputBusIndex].inputNodeInputBusIndex], &pNodeBase->pOutputBuses[outputBusIndex]);\n        }\n    }\n    ma_node_output_bus_unlock(&pNodeBase->pOutputBuses[outputBusIndex]);\n\n    return result;\n}\n\nMA_API ma_result ma_node_detach_all_output_buses(ma_node* pNode)\n{\n    ma_uint32 iOutputBus;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    for (iOutputBus = 0; iOutputBus < ma_node_get_output_bus_count(pNode); iOutputBus += 1) {\n        ma_node_detach_output_bus(pNode, iOutputBus);\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_node_attach_output_bus(ma_node* pNode, ma_uint32 outputBusIndex, ma_node* pOtherNode, ma_uint32 otherNodeInputBusIndex)\n{\n    ma_node_base* pNodeBase  = (ma_node_base*)pNode;\n    ma_node_base* pOtherNodeBase = (ma_node_base*)pOtherNode;\n\n    if (pNodeBase == NULL || pOtherNodeBase == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pNodeBase == pOtherNodeBase) {\n        return MA_INVALID_OPERATION;    /* Cannot attach a node to itself. */\n    }\n\n    if (outputBusIndex >= ma_node_get_output_bus_count(pNode) || otherNodeInputBusIndex >= ma_node_get_input_bus_count(pOtherNode)) {\n        return MA_INVALID_OPERATION;    /* Invalid bus index. */\n    }\n\n    /* The output channel count of the output node must be the same as the input channel count of the input node. */\n    if (ma_node_get_output_channels(pNode, outputBusIndex) != ma_node_get_input_channels(pOtherNode, otherNodeInputBusIndex)) {\n        return MA_INVALID_OPERATION;    /* Channel count is incompatible. */\n    }\n\n    /* This will deal with detaching if the output bus is already attached to something. */\n    ma_node_input_bus_attach(&pOtherNodeBase->pInputBuses[otherNodeInputBusIndex], &pNodeBase->pOutputBuses[outputBusIndex], pOtherNode, otherNodeInputBusIndex);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_node_set_output_bus_volume(ma_node* pNode, ma_uint32 outputBusIndex, float volume)\n{\n    ma_node_base* pNodeBase = (ma_node_base*)pNode;\n\n    if (pNodeBase == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (outputBusIndex >= ma_node_get_output_bus_count(pNode)) {\n        return MA_INVALID_ARGS; /* Invalid bus index. */\n    }\n\n    return ma_node_output_bus_set_volume(&pNodeBase->pOutputBuses[outputBusIndex], volume);\n}\n\nMA_API float ma_node_get_output_bus_volume(const ma_node* pNode, ma_uint32 outputBusIndex)\n{\n    const ma_node_base* pNodeBase = (const ma_node_base*)pNode;\n\n    if (pNodeBase == NULL) {\n        return 0;\n    }\n\n    if (outputBusIndex >= ma_node_get_output_bus_count(pNode)) {\n        return 0;   /* Invalid bus index. */\n    }\n\n    return ma_node_output_bus_get_volume(&pNodeBase->pOutputBuses[outputBusIndex]);\n}\n\nMA_API ma_result ma_node_set_state(ma_node* pNode, ma_node_state state)\n{\n    ma_node_base* pNodeBase = (ma_node_base*)pNode;\n\n    if (pNodeBase == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_atomic_exchange_i32(&pNodeBase->state, state);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_node_state ma_node_get_state(const ma_node* pNode)\n{\n    const ma_node_base* pNodeBase = (const ma_node_base*)pNode;\n\n    if (pNodeBase == NULL) {\n        return ma_node_state_stopped;\n    }\n\n    return (ma_node_state)ma_atomic_load_i32(&pNodeBase->state);\n}\n\nMA_API ma_result ma_node_set_state_time(ma_node* pNode, ma_node_state state, ma_uint64 globalTime)\n{\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Validation check for safety since we'll be using this as an index into stateTimes[]. */\n    if (state != ma_node_state_started && state != ma_node_state_stopped) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_atomic_exchange_64(&((ma_node_base*)pNode)->stateTimes[state], globalTime);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_uint64 ma_node_get_state_time(const ma_node* pNode, ma_node_state state)\n{\n    if (pNode == NULL) {\n        return 0;\n    }\n\n    /* Validation check for safety since we'll be using this as an index into stateTimes[]. */\n    if (state != ma_node_state_started && state != ma_node_state_stopped) {\n        return 0;\n    }\n\n    return ma_atomic_load_64(&((ma_node_base*)pNode)->stateTimes[state]);\n}\n\nMA_API ma_node_state ma_node_get_state_by_time(const ma_node* pNode, ma_uint64 globalTime)\n{\n    if (pNode == NULL) {\n        return ma_node_state_stopped;\n    }\n\n    return ma_node_get_state_by_time_range(pNode, globalTime, globalTime);\n}\n\nMA_API ma_node_state ma_node_get_state_by_time_range(const ma_node* pNode, ma_uint64 globalTimeBeg, ma_uint64 globalTimeEnd)\n{\n    ma_node_state state;\n\n    if (pNode == NULL) {\n        return ma_node_state_stopped;\n    }\n\n    state = ma_node_get_state(pNode);\n\n    /* An explicitly stopped node is always stopped. */\n    if (state == ma_node_state_stopped) {\n        return ma_node_state_stopped;\n    }\n\n    /*\n    Getting here means the node is marked as started, but it may still not be truly started due to\n    it's start time not having been reached yet. Also, the stop time may have also been reached in\n    which case it'll be considered stopped.\n    */\n    if (ma_node_get_state_time(pNode, ma_node_state_started) > globalTimeBeg) {\n        return ma_node_state_stopped;   /* Start time has not yet been reached. */\n    }\n\n    if (ma_node_get_state_time(pNode, ma_node_state_stopped) <= globalTimeEnd) {\n        return ma_node_state_stopped;   /* Stop time has been reached. */\n    }\n\n    /* Getting here means the node is marked as started and is within it's start/stop times. */\n    return ma_node_state_started;\n}\n\nMA_API ma_uint64 ma_node_get_time(const ma_node* pNode)\n{\n    if (pNode == NULL) {\n        return 0;\n    }\n\n    return ma_atomic_load_64(&((ma_node_base*)pNode)->localTime);\n}\n\nMA_API ma_result ma_node_set_time(ma_node* pNode, ma_uint64 localTime)\n{\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_atomic_exchange_64(&((ma_node_base*)pNode)->localTime, localTime);\n\n    return MA_SUCCESS;\n}\n\n\n\nstatic void ma_node_process_pcm_frames_internal(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_node_base* pNodeBase = (ma_node_base*)pNode;\n\n    MA_ASSERT(pNode != NULL);\n\n    if (pNodeBase->vtable->onProcess) {\n        pNodeBase->vtable->onProcess(pNode, ppFramesIn, pFrameCountIn, ppFramesOut, pFrameCountOut);\n    }\n}\n\nstatic ma_result ma_node_read_pcm_frames(ma_node* pNode, ma_uint32 outputBusIndex, float* pFramesOut, ma_uint32 frameCount, ma_uint32* pFramesRead, ma_uint64 globalTime)\n{\n    ma_node_base* pNodeBase = (ma_node_base*)pNode;\n    ma_result result = MA_SUCCESS;\n    ma_uint32 iInputBus;\n    ma_uint32 iOutputBus;\n    ma_uint32 inputBusCount;\n    ma_uint32 outputBusCount;\n    ma_uint32 totalFramesRead = 0;\n    float* ppFramesIn[MA_MAX_NODE_BUS_COUNT];\n    float* ppFramesOut[MA_MAX_NODE_BUS_COUNT];\n    ma_uint64 globalTimeBeg;\n    ma_uint64 globalTimeEnd;\n    ma_uint64 startTime;\n    ma_uint64 stopTime;\n    ma_uint32 timeOffsetBeg;\n    ma_uint32 timeOffsetEnd;\n    ma_uint32 frameCountIn;\n    ma_uint32 frameCountOut;\n\n    /*\n    pFramesRead is mandatory. It must be used to determine how many frames were read. It's normal and\n    expected that the number of frames read may be different to that requested. Therefore, the caller\n    must look at this value to correctly determine how many frames were read.\n    */\n    MA_ASSERT(pFramesRead != NULL); /* <-- If you've triggered this assert, you're using this function wrong. You *must* use this variable and inspect it after the call returns. */\n    if (pFramesRead == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pFramesRead = 0;   /* Safety. */\n\n    if (pNodeBase == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (outputBusIndex >= ma_node_get_output_bus_count(pNodeBase)) {\n        return MA_INVALID_ARGS; /* Invalid output bus index. */\n    }\n\n    /* Don't do anything if we're in a stopped state. */\n    if (ma_node_get_state_by_time_range(pNode, globalTime, globalTime + frameCount) != ma_node_state_started) {\n        return MA_SUCCESS;  /* We're in a stopped state. This is not an error - we just need to not read anything. */\n    }\n\n\n    globalTimeBeg = globalTime;\n    globalTimeEnd = globalTime + frameCount;\n    startTime = ma_node_get_state_time(pNode, ma_node_state_started);\n    stopTime  = ma_node_get_state_time(pNode, ma_node_state_stopped);\n\n    /*\n    At this point we know that we are inside our start/stop times. However, we may need to adjust\n    our frame count and output pointer to accommodate since we could be straddling the time period\n    that this function is getting called for.\n\n    It's possible (and likely) that the start time does not line up with the output buffer. We\n    therefore need to offset it by a number of frames to accommodate. The same thing applies for\n    the stop time.\n    */\n    timeOffsetBeg = (globalTimeBeg < startTime) ? (ma_uint32)(globalTimeEnd - startTime) : 0;\n    timeOffsetEnd = (globalTimeEnd > stopTime)  ? (ma_uint32)(globalTimeEnd - stopTime)  : 0;\n\n    /* Trim based on the start offset. We need to silence the start of the buffer. */\n    if (timeOffsetBeg > 0) {\n        ma_silence_pcm_frames(pFramesOut, timeOffsetBeg, ma_format_f32, ma_node_get_output_channels(pNode, outputBusIndex));\n        pFramesOut += timeOffsetBeg * ma_node_get_output_channels(pNode, outputBusIndex);\n        frameCount -= timeOffsetBeg;\n    }\n\n    /* Trim based on the end offset. We don't need to silence the tail section because we'll just have a reduced value written to pFramesRead. */\n    if (timeOffsetEnd > 0) {\n        frameCount -= timeOffsetEnd;\n    }\n\n\n    /* We run on different paths depending on the bus counts. */\n    inputBusCount  = ma_node_get_input_bus_count(pNode);\n    outputBusCount = ma_node_get_output_bus_count(pNode);\n\n    /*\n    Run a simplified path when there are no inputs and one output. In this case there's nothing to\n    actually read and we can go straight to output. This is a very common scenario because the vast\n    majority of data source nodes will use this setup so this optimization I think is worthwhile.\n    */\n    if (inputBusCount == 0 && outputBusCount == 1) {\n        /* Fast path. No need to read from input and no need for any caching. */\n        frameCountIn  = 0;\n        frameCountOut = frameCount;    /* Just read as much as we can. The callback will return what was actually read. */\n\n        ppFramesOut[0] = pFramesOut;\n\n        /*\n        If it's a passthrough we won't be expecting the callback to output anything, so we'll\n        need to pre-silence the output buffer.\n        */\n        if ((pNodeBase->vtable->flags & MA_NODE_FLAG_PASSTHROUGH) != 0) {\n            ma_silence_pcm_frames(pFramesOut, frameCount, ma_format_f32, ma_node_get_output_channels(pNode, outputBusIndex));\n        }\n\n        ma_node_process_pcm_frames_internal(pNode, NULL, &frameCountIn, ppFramesOut, &frameCountOut);\n        totalFramesRead = frameCountOut;\n    } else {\n        /* Slow path. Need to read input data. */\n        if ((pNodeBase->vtable->flags & MA_NODE_FLAG_PASSTHROUGH) != 0) {\n            /*\n            Fast path. We're running a passthrough. We need to read directly into the output buffer, but\n            still fire the callback so that event handling and trigger nodes can do their thing. Since\n            it's a passthrough there's no need for any kind of caching logic.\n            */\n            MA_ASSERT(outputBusCount == inputBusCount);\n            MA_ASSERT(outputBusCount == 1);\n            MA_ASSERT(outputBusIndex == 0);\n\n            /* We just read directly from input bus to output buffer, and then afterwards fire the callback. */\n            ppFramesOut[0] = pFramesOut;\n            ppFramesIn[0] = ppFramesOut[0];\n\n            result = ma_node_input_bus_read_pcm_frames(pNodeBase, &pNodeBase->pInputBuses[0], ppFramesIn[0], frameCount, &totalFramesRead, globalTime);\n            if (result == MA_SUCCESS) {\n                /* Even though it's a passthrough, we still need to fire the callback. */\n                frameCountIn  = totalFramesRead;\n                frameCountOut = totalFramesRead;\n\n                if (totalFramesRead > 0) {\n                    ma_node_process_pcm_frames_internal(pNode, (const float**)ppFramesIn, &frameCountIn, ppFramesOut, &frameCountOut);  /* From GCC: expected 'const float **' but argument is of type 'float **'. Shouldn't this be implicit? Excplicit cast to silence the warning. */\n                }\n\n                /*\n                A passthrough should never have modified the input and output frame counts. If you're\n                triggering these assers you need to fix your processing callback.\n                */\n                MA_ASSERT(frameCountIn  == totalFramesRead);\n                MA_ASSERT(frameCountOut == totalFramesRead);\n            }\n        } else {\n            /* Slow path. Need to do caching. */\n            ma_uint32 framesToProcessIn;\n            ma_uint32 framesToProcessOut;\n            ma_bool32 consumeNullInput = MA_FALSE;\n\n            /*\n            We use frameCount as a basis for the number of frames to read since that's what's being\n            requested, however we still need to clamp it to whatever can fit in the cache.\n\n            This will also be used as the basis for determining how many input frames to read. This is\n            not ideal because it can result in too many input frames being read which introduces latency.\n            To solve this, nodes can implement an optional callback called onGetRequiredInputFrameCount\n            which is used as hint to miniaudio as to how many input frames it needs to read at a time. This\n            callback is completely optional, and if it's not set, miniaudio will assume `frameCount`.\n\n            This function will be called multiple times for each period of time, once for each output node.\n            We cannot read from each input node each time this function is called. Instead we need to check\n            whether or not this is first output bus to be read from for this time period, and if so, read\n            from our input data.\n\n            To determine whether or not we're ready to read data, we check a flag. There will be one flag\n            for each output. When the flag is set, it means data has been read previously and that we're\n            ready to advance time forward for our input nodes by reading fresh data.\n            */\n            framesToProcessOut = frameCount;\n            if (framesToProcessOut > pNodeBase->cachedDataCapInFramesPerBus) {\n                framesToProcessOut = pNodeBase->cachedDataCapInFramesPerBus;\n            }\n\n            framesToProcessIn  = frameCount;\n            if (pNodeBase->vtable->onGetRequiredInputFrameCount) {\n                pNodeBase->vtable->onGetRequiredInputFrameCount(pNode, framesToProcessOut, &framesToProcessIn); /* <-- It does not matter if this fails. */\n            }\n            if (framesToProcessIn > pNodeBase->cachedDataCapInFramesPerBus) {\n                framesToProcessIn = pNodeBase->cachedDataCapInFramesPerBus;\n            }\n\n\n            MA_ASSERT(framesToProcessIn  <= 0xFFFF);\n            MA_ASSERT(framesToProcessOut <= 0xFFFF);\n\n            if (ma_node_output_bus_has_read(&pNodeBase->pOutputBuses[outputBusIndex])) {\n                /* Getting here means we need to do another round of processing. */\n                pNodeBase->cachedFrameCountOut = 0;\n\n                for (;;) {\n                    frameCountOut = 0;\n\n                    /*\n                    We need to prepare our output frame pointers for processing. In the same iteration we need\n                    to mark every output bus as unread so that future calls to this function for different buses\n                    for the current time period don't pull in data when they should instead be reading from cache.\n                    */\n                    for (iOutputBus = 0; iOutputBus < outputBusCount; iOutputBus += 1) {\n                        ma_node_output_bus_set_has_read(&pNodeBase->pOutputBuses[iOutputBus], MA_FALSE); /* <-- This is what tells the next calls to this function for other output buses for this time period to read from cache instead of pulling in more data. */\n                        ppFramesOut[iOutputBus] = ma_node_get_cached_output_ptr(pNode, iOutputBus);\n                    }\n\n                    /* We only need to read from input buses if there isn't already some data in the cache. */\n                    if (pNodeBase->cachedFrameCountIn == 0) {\n                        ma_uint32 maxFramesReadIn = 0;\n\n                        /* Here is where we pull in data from the input buses. This is what will trigger an advance in time. */\n                        for (iInputBus = 0; iInputBus < inputBusCount; iInputBus += 1) {\n                            ma_uint32 framesRead;\n\n                            /* The first thing to do is get the offset within our bulk allocation to store this input data. */\n                            ppFramesIn[iInputBus] = ma_node_get_cached_input_ptr(pNode, iInputBus);\n\n                            /* Once we've determined our destination pointer we can read. Note that we must inspect the number of frames read and fill any leftovers with silence for safety. */\n                            result = ma_node_input_bus_read_pcm_frames(pNodeBase, &pNodeBase->pInputBuses[iInputBus], ppFramesIn[iInputBus], framesToProcessIn, &framesRead, globalTime);\n                            if (result != MA_SUCCESS) {\n                                /* It doesn't really matter if we fail because we'll just fill with silence. */\n                                framesRead = 0; /* Just for safety, but I don't think it's really needed. */\n                            }\n\n                            /* TODO: Minor optimization opportunity here. If no frames were read and the buffer is already filled with silence, no need to re-silence it. */\n                            /* Any leftover frames need to silenced for safety. */\n                            if (framesRead < framesToProcessIn) {\n                                ma_silence_pcm_frames(ppFramesIn[iInputBus] + (framesRead * ma_node_get_input_channels(pNodeBase, iInputBus)), (framesToProcessIn - framesRead), ma_format_f32, ma_node_get_input_channels(pNodeBase, iInputBus));\n                            }\n\n                            maxFramesReadIn = ma_max(maxFramesReadIn, framesRead);\n                        }\n\n                        /* This was a fresh load of input data so reset our consumption counter. */\n                        pNodeBase->consumedFrameCountIn = 0;\n\n                        /*\n                        We don't want to keep processing if there's nothing to process, so set the number of cached\n                        input frames to the maximum number we read from each attachment (the lesser will be padded\n                        with silence). If we didn't read anything, this will be set to 0 and the entire buffer will\n                        have been assigned to silence. This being equal to 0 is an important property for us because\n                        it allows us to detect when NULL can be passed into the processing callback for the input\n                        buffer for the purpose of continuous processing.\n                        */\n                        pNodeBase->cachedFrameCountIn = (ma_uint16)maxFramesReadIn;\n                    } else {\n                        /* We don't need to read anything, but we do need to prepare our input frame pointers. */\n                        for (iInputBus = 0; iInputBus < inputBusCount; iInputBus += 1) {\n                            ppFramesIn[iInputBus] = ma_node_get_cached_input_ptr(pNode, iInputBus) + (pNodeBase->consumedFrameCountIn * ma_node_get_input_channels(pNodeBase, iInputBus));\n                        }\n                    }\n\n                    /*\n                    At this point we have our input data so now we need to do some processing. Sneaky little\n                    optimization here - we can set the pointer to the output buffer for this output bus so\n                    that the final copy into the output buffer is done directly by onProcess().\n                    */\n                    if (pFramesOut != NULL) {\n                        ppFramesOut[outputBusIndex] = ma_offset_pcm_frames_ptr_f32(pFramesOut, pNodeBase->cachedFrameCountOut, ma_node_get_output_channels(pNode, outputBusIndex));\n                    }\n\n\n                    /* Give the processing function the entire capacity of the output buffer. */\n                    frameCountOut = (framesToProcessOut - pNodeBase->cachedFrameCountOut);\n\n                    /*\n                    We need to treat nodes with continuous processing a little differently. For these ones,\n                    we always want to fire the callback with the requested number of frames, regardless of\n                    pNodeBase->cachedFrameCountIn, which could be 0. Also, we want to check if we can pass\n                    in NULL for the input buffer to the callback.\n                    */\n                    if ((pNodeBase->vtable->flags & MA_NODE_FLAG_CONTINUOUS_PROCESSING) != 0) {\n                        /* We're using continuous processing. Make sure we specify the whole frame count at all times. */\n                        frameCountIn = framesToProcessIn;    /* Give the processing function as much input data as we've got in the buffer, including any silenced padding from short reads. */\n\n                        if ((pNodeBase->vtable->flags & MA_NODE_FLAG_ALLOW_NULL_INPUT) != 0 && pNodeBase->consumedFrameCountIn == 0 && pNodeBase->cachedFrameCountIn == 0) {\n                            consumeNullInput = MA_TRUE;\n                        } else {\n                            consumeNullInput = MA_FALSE;\n                        }\n\n                        /*\n                        Since we're using continuous processing we're always passing in a full frame count\n                        regardless of how much input data was read. If this is greater than what we read as\n                        input, we'll end up with an underflow. We instead need to make sure our cached frame\n                        count is set to the number of frames we'll be passing to the data callback. Not\n                        doing this will result in an underflow when we \"consume\" the cached data later on.\n\n                        Note that this check needs to be done after the \"consumeNullInput\" check above because\n                        we use the property of cachedFrameCountIn being 0 to determine whether or not we\n                        should be passing in a null pointer to the processing callback for when the node is\n                        configured with MA_NODE_FLAG_ALLOW_NULL_INPUT.\n                        */\n                        if (pNodeBase->cachedFrameCountIn < (ma_uint16)frameCountIn) {\n                            pNodeBase->cachedFrameCountIn = (ma_uint16)frameCountIn;\n                        }\n                    } else {\n                        frameCountIn = pNodeBase->cachedFrameCountIn;  /* Give the processing function as much valid input data as we've got. */\n                        consumeNullInput = MA_FALSE;\n                    }\n\n                    /*\n                    Process data slightly differently depending on whether or not we're consuming NULL\n                    input (checked just above).\n                    */\n                    if (consumeNullInput) {\n                        ma_node_process_pcm_frames_internal(pNode, NULL, &frameCountIn, ppFramesOut, &frameCountOut);\n                    } else {\n                        /*\n                        We want to skip processing if there's no input data, but we can only do that safely if\n                        we know that there is no chance of any output frames being produced. If continuous\n                        processing is being used, this won't be a problem because the input frame count will\n                        always be non-0. However, if continuous processing is *not* enabled and input and output\n                        data is processed at different rates, we still need to process that last input frame\n                        because there could be a few excess output frames needing to be produced from cached\n                        data. The `MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES` flag is used as the indicator for\n                        determining whether or not we need to process the node even when there are no input\n                        frames available right now.\n                        */\n                        if (frameCountIn > 0 || (pNodeBase->vtable->flags & MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES) != 0) {\n                            ma_node_process_pcm_frames_internal(pNode, (const float**)ppFramesIn, &frameCountIn, ppFramesOut, &frameCountOut);    /* From GCC: expected 'const float **' but argument is of type 'float **'. Shouldn't this be implicit? Excplicit cast to silence the warning. */\n                        } else {\n                            frameCountOut = 0;  /* No data was processed. */\n                        }\n                    }\n\n                    /*\n                    Thanks to our sneaky optimization above we don't need to do any data copying directly into\n                    the output buffer - the onProcess() callback just did that for us. We do, however, need to\n                    apply the number of input and output frames that were processed. Note that due to continuous\n                    processing above, we need to do explicit checks here. If we just consumed a NULL input\n                    buffer it means that no actual input data was processed from the internal buffers and we\n                    don't want to be modifying any counters.\n                    */\n                    if (consumeNullInput == MA_FALSE) {\n                        pNodeBase->consumedFrameCountIn += (ma_uint16)frameCountIn;\n                        pNodeBase->cachedFrameCountIn   -= (ma_uint16)frameCountIn;\n                    }\n\n                    /* The cached output frame count is always equal to what we just read. */\n                    pNodeBase->cachedFrameCountOut += (ma_uint16)frameCountOut;\n\n                    /* If we couldn't process any data, we're done. The loop needs to be terminated here or else we'll get stuck in a loop. */\n                    if (pNodeBase->cachedFrameCountOut == framesToProcessOut || (frameCountOut == 0 && frameCountIn == 0)) {\n                        break;\n                    }\n                }\n            } else {\n                /*\n                We're not needing to read anything from the input buffer so just read directly from our\n                already-processed data.\n                */\n                if (pFramesOut != NULL) {\n                    ma_copy_pcm_frames(pFramesOut, ma_node_get_cached_output_ptr(pNodeBase, outputBusIndex), pNodeBase->cachedFrameCountOut, ma_format_f32, ma_node_get_output_channels(pNodeBase, outputBusIndex));\n                }\n            }\n\n            /* The number of frames read is always equal to the number of cached output frames. */\n            totalFramesRead = pNodeBase->cachedFrameCountOut;\n\n            /* Now that we've read the data, make sure our read flag is set. */\n            ma_node_output_bus_set_has_read(&pNodeBase->pOutputBuses[outputBusIndex], MA_TRUE);\n        }\n    }\n\n    /* Apply volume, if necessary. */\n    ma_apply_volume_factor_f32(pFramesOut, totalFramesRead * ma_node_get_output_channels(pNodeBase, outputBusIndex), ma_node_output_bus_get_volume(&pNodeBase->pOutputBuses[outputBusIndex]));\n\n    /* Advance our local time forward. */\n    ma_atomic_fetch_add_64(&pNodeBase->localTime, (ma_uint64)totalFramesRead);\n\n    *pFramesRead = totalFramesRead + timeOffsetBeg; /* Must include the silenced section at the start of the buffer. */\n    return result;\n}\n\n\n\n\n/* Data source node. */\nMA_API ma_data_source_node_config ma_data_source_node_config_init(ma_data_source* pDataSource)\n{\n    ma_data_source_node_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.nodeConfig  = ma_node_config_init();\n    config.pDataSource = pDataSource;\n\n    return config;\n}\n\n\nstatic void ma_data_source_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_data_source_node* pDataSourceNode = (ma_data_source_node*)pNode;\n    ma_format format;\n    ma_uint32 channels;\n    ma_uint32 frameCount;\n    ma_uint64 framesRead = 0;\n\n    MA_ASSERT(pDataSourceNode != NULL);\n    MA_ASSERT(pDataSourceNode->pDataSource != NULL);\n    MA_ASSERT(ma_node_get_input_bus_count(pDataSourceNode)  == 0);\n    MA_ASSERT(ma_node_get_output_bus_count(pDataSourceNode) == 1);\n\n    /* We don't want to read from ppFramesIn at all. Instead we read from the data source. */\n    (void)ppFramesIn;\n    (void)pFrameCountIn;\n\n    frameCount = *pFrameCountOut;\n\n    /* miniaudio should never be calling this with a frame count of zero. */\n    MA_ASSERT(frameCount > 0);\n\n    if (ma_data_source_get_data_format(pDataSourceNode->pDataSource, &format, &channels, NULL, NULL, 0) == MA_SUCCESS) { /* <-- Don't care about sample rate here. */\n        /* The node graph system requires samples be in floating point format. This is checked in ma_data_source_node_init(). */\n        MA_ASSERT(format == ma_format_f32);\n        (void)format;   /* Just to silence some static analysis tools. */\n\n        ma_data_source_read_pcm_frames(pDataSourceNode->pDataSource, ppFramesOut[0], frameCount, &framesRead);\n    }\n\n    *pFrameCountOut = (ma_uint32)framesRead;\n}\n\nstatic ma_node_vtable g_ma_data_source_node_vtable =\n{\n    ma_data_source_node_process_pcm_frames,\n    NULL,   /* onGetRequiredInputFrameCount */\n    0,      /* 0 input buses. */\n    1,      /* 1 output bus. */\n    0\n};\n\nMA_API ma_result ma_data_source_node_init(ma_node_graph* pNodeGraph, const ma_data_source_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_data_source_node* pDataSourceNode)\n{\n    ma_result result;\n    ma_format format;   /* For validating the format, which must be ma_format_f32. */\n    ma_uint32 channels; /* For specifying the channel count of the output bus. */\n    ma_node_config baseConfig;\n\n    if (pDataSourceNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pDataSourceNode);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    result = ma_data_source_get_data_format(pConfig->pDataSource, &format, &channels, NULL, NULL, 0);    /* Don't care about sample rate. This will check pDataSource for NULL. */\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    MA_ASSERT(format == ma_format_f32); /* <-- If you've triggered this it means your data source is not outputting floating-point samples. You must configure your data source to use ma_format_f32. */\n    if (format != ma_format_f32) {\n        return MA_INVALID_ARGS; /* Invalid format. */\n    }\n\n    /* The channel count is defined by the data source. If the caller has manually changed the channels we just ignore it. */\n    baseConfig = pConfig->nodeConfig;\n    baseConfig.vtable = &g_ma_data_source_node_vtable;  /* Explicitly set the vtable here to prevent callers from setting it incorrectly. */\n\n    /*\n    The channel count is defined by the data source. It is invalid for the caller to manually set\n    the channel counts in the config. `ma_data_source_node_config_init()` will have defaulted the\n    channel count pointer to NULL which is how it must remain. If you trigger any of these asserts\n    it means you're explicitly setting the channel count. Instead, configure the output channel\n    count of your data source to be the necessary channel count.\n    */\n    if (baseConfig.pOutputChannels != NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    baseConfig.pOutputChannels = &channels;\n\n    result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pDataSourceNode->base);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    pDataSourceNode->pDataSource = pConfig->pDataSource;\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_data_source_node_uninit(ma_data_source_node* pDataSourceNode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_node_uninit(&pDataSourceNode->base, pAllocationCallbacks);\n}\n\nMA_API ma_result ma_data_source_node_set_looping(ma_data_source_node* pDataSourceNode, ma_bool32 isLooping)\n{\n    if (pDataSourceNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_data_source_set_looping(pDataSourceNode->pDataSource, isLooping);\n}\n\nMA_API ma_bool32 ma_data_source_node_is_looping(ma_data_source_node* pDataSourceNode)\n{\n    if (pDataSourceNode == NULL) {\n        return MA_FALSE;\n    }\n\n    return ma_data_source_is_looping(pDataSourceNode->pDataSource);\n}\n\n\n\n/* Splitter Node. */\nMA_API ma_splitter_node_config ma_splitter_node_config_init(ma_uint32 channels)\n{\n    ma_splitter_node_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.nodeConfig     = ma_node_config_init();\n    config.channels       = channels;\n    config.outputBusCount = 2;\n\n    return config;\n}\n\n\nstatic void ma_splitter_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_node_base* pNodeBase = (ma_node_base*)pNode;\n    ma_uint32 iOutputBus;\n    ma_uint32 channels;\n\n    MA_ASSERT(pNodeBase != NULL);\n    MA_ASSERT(ma_node_get_input_bus_count(pNodeBase) == 1);\n\n    /* We don't need to consider the input frame count - it'll be the same as the output frame count and we process everything. */\n    (void)pFrameCountIn;\n\n    /* NOTE: This assumes the same number of channels for all inputs and outputs. This was checked in ma_splitter_node_init(). */\n    channels = ma_node_get_input_channels(pNodeBase, 0);\n\n    /* Splitting is just copying the first input bus and copying it over to each output bus. */\n    for (iOutputBus = 0; iOutputBus < ma_node_get_output_bus_count(pNodeBase); iOutputBus += 1) {\n        ma_copy_pcm_frames(ppFramesOut[iOutputBus], ppFramesIn[0], *pFrameCountOut, ma_format_f32, channels);\n    }\n}\n\nstatic ma_node_vtable g_ma_splitter_node_vtable =\n{\n    ma_splitter_node_process_pcm_frames,\n    NULL,                       /* onGetRequiredInputFrameCount */\n    1,                          /* 1 input bus. */\n    MA_NODE_BUS_COUNT_UNKNOWN,  /* The output bus count is specified on a per-node basis. */\n    0\n};\n\nMA_API ma_result ma_splitter_node_init(ma_node_graph* pNodeGraph, const ma_splitter_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_splitter_node* pSplitterNode)\n{\n    ma_result result;\n    ma_node_config baseConfig;\n    ma_uint32 pInputChannels[1];\n    ma_uint32 pOutputChannels[MA_MAX_NODE_BUS_COUNT];\n    ma_uint32 iOutputBus;\n\n    if (pSplitterNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pSplitterNode);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->outputBusCount > MA_MAX_NODE_BUS_COUNT) {\n        return MA_INVALID_ARGS; /* Too many output buses. */\n    }\n\n    /* Splitters require the same number of channels between inputs and outputs. */\n    pInputChannels[0]  = pConfig->channels;\n    for (iOutputBus = 0; iOutputBus < pConfig->outputBusCount; iOutputBus += 1) {\n        pOutputChannels[iOutputBus] = pConfig->channels;\n    }\n\n    baseConfig = pConfig->nodeConfig;\n    baseConfig.vtable = &g_ma_splitter_node_vtable;\n    baseConfig.pInputChannels  = pInputChannels;\n    baseConfig.pOutputChannels = pOutputChannels;\n    baseConfig.outputBusCount  = pConfig->outputBusCount;\n\n    result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pSplitterNode->base);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to initialize the base node. */\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API void ma_splitter_node_uninit(ma_splitter_node* pSplitterNode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_node_uninit(pSplitterNode, pAllocationCallbacks);\n}\n\n\n/*\nBiquad Node\n*/\nMA_API ma_biquad_node_config ma_biquad_node_config_init(ma_uint32 channels, float b0, float b1, float b2, float a0, float a1, float a2)\n{\n    ma_biquad_node_config config;\n\n    config.nodeConfig = ma_node_config_init();\n    config.biquad = ma_biquad_config_init(ma_format_f32, channels, b0, b1, b2, a0, a1, a2);\n\n    return config;\n}\n\nstatic void ma_biquad_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_biquad_node* pLPFNode = (ma_biquad_node*)pNode;\n\n    MA_ASSERT(pNode != NULL);\n    (void)pFrameCountIn;\n\n    ma_biquad_process_pcm_frames(&pLPFNode->biquad, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut);\n}\n\nstatic ma_node_vtable g_ma_biquad_node_vtable =\n{\n    ma_biquad_node_process_pcm_frames,\n    NULL,   /* onGetRequiredInputFrameCount */\n    1,      /* One input. */\n    1,      /* One output. */\n    0       /* Default flags. */\n};\n\nMA_API ma_result ma_biquad_node_init(ma_node_graph* pNodeGraph, const ma_biquad_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_biquad_node* pNode)\n{\n    ma_result result;\n    ma_node_config baseNodeConfig;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pNode);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->biquad.format != ma_format_f32) {\n        return MA_INVALID_ARGS; /* The format must be f32. */\n    }\n\n    result = ma_biquad_init(&pConfig->biquad, pAllocationCallbacks, &pNode->biquad);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    baseNodeConfig = ma_node_config_init();\n    baseNodeConfig.vtable          = &g_ma_biquad_node_vtable;\n    baseNodeConfig.pInputChannels  = &pConfig->biquad.channels;\n    baseNodeConfig.pOutputChannels = &pConfig->biquad.channels;\n\n    result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_biquad_node_reinit(const ma_biquad_config* pConfig, ma_biquad_node* pNode)\n{\n    ma_biquad_node* pLPFNode = (ma_biquad_node*)pNode;\n\n    MA_ASSERT(pNode != NULL);\n\n    return ma_biquad_reinit(pConfig, &pLPFNode->biquad);\n}\n\nMA_API void ma_biquad_node_uninit(ma_biquad_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_biquad_node* pLPFNode = (ma_biquad_node*)pNode;\n\n    if (pNode == NULL) {\n        return;\n    }\n\n    ma_node_uninit(pNode, pAllocationCallbacks);\n    ma_biquad_uninit(&pLPFNode->biquad, pAllocationCallbacks);\n}\n\n\n\n/*\nLow Pass Filter Node\n*/\nMA_API ma_lpf_node_config ma_lpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order)\n{\n    ma_lpf_node_config config;\n\n    config.nodeConfig = ma_node_config_init();\n    config.lpf = ma_lpf_config_init(ma_format_f32, channels, sampleRate, cutoffFrequency, order);\n\n    return config;\n}\n\nstatic void ma_lpf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_lpf_node* pLPFNode = (ma_lpf_node*)pNode;\n\n    MA_ASSERT(pNode != NULL);\n    (void)pFrameCountIn;\n\n    ma_lpf_process_pcm_frames(&pLPFNode->lpf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut);\n}\n\nstatic ma_node_vtable g_ma_lpf_node_vtable =\n{\n    ma_lpf_node_process_pcm_frames,\n    NULL,   /* onGetRequiredInputFrameCount */\n    1,      /* One input. */\n    1,      /* One output. */\n    0       /* Default flags. */\n};\n\nMA_API ma_result ma_lpf_node_init(ma_node_graph* pNodeGraph, const ma_lpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_lpf_node* pNode)\n{\n    ma_result result;\n    ma_node_config baseNodeConfig;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pNode);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->lpf.format != ma_format_f32) {\n        return MA_INVALID_ARGS; /* The format must be f32. */\n    }\n\n    result = ma_lpf_init(&pConfig->lpf, pAllocationCallbacks, &pNode->lpf);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    baseNodeConfig = ma_node_config_init();\n    baseNodeConfig.vtable          = &g_ma_lpf_node_vtable;\n    baseNodeConfig.pInputChannels  = &pConfig->lpf.channels;\n    baseNodeConfig.pOutputChannels = &pConfig->lpf.channels;\n\n    result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_lpf_node_reinit(const ma_lpf_config* pConfig, ma_lpf_node* pNode)\n{\n    ma_lpf_node* pLPFNode = (ma_lpf_node*)pNode;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_lpf_reinit(pConfig, &pLPFNode->lpf);\n}\n\nMA_API void ma_lpf_node_uninit(ma_lpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_lpf_node* pLPFNode = (ma_lpf_node*)pNode;\n\n    if (pNode == NULL) {\n        return;\n    }\n\n    ma_node_uninit(pNode, pAllocationCallbacks);\n    ma_lpf_uninit(&pLPFNode->lpf, pAllocationCallbacks);\n}\n\n\n\n/*\nHigh Pass Filter Node\n*/\nMA_API ma_hpf_node_config ma_hpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order)\n{\n    ma_hpf_node_config config;\n\n    config.nodeConfig = ma_node_config_init();\n    config.hpf = ma_hpf_config_init(ma_format_f32, channels, sampleRate, cutoffFrequency, order);\n\n    return config;\n}\n\nstatic void ma_hpf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_hpf_node* pHPFNode = (ma_hpf_node*)pNode;\n\n    MA_ASSERT(pNode != NULL);\n    (void)pFrameCountIn;\n\n    ma_hpf_process_pcm_frames(&pHPFNode->hpf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut);\n}\n\nstatic ma_node_vtable g_ma_hpf_node_vtable =\n{\n    ma_hpf_node_process_pcm_frames,\n    NULL,   /* onGetRequiredInputFrameCount */\n    1,      /* One input. */\n    1,      /* One output. */\n    0       /* Default flags. */\n};\n\nMA_API ma_result ma_hpf_node_init(ma_node_graph* pNodeGraph, const ma_hpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hpf_node* pNode)\n{\n    ma_result result;\n    ma_node_config baseNodeConfig;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pNode);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->hpf.format != ma_format_f32) {\n        return MA_INVALID_ARGS; /* The format must be f32. */\n    }\n\n    result = ma_hpf_init(&pConfig->hpf, pAllocationCallbacks, &pNode->hpf);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    baseNodeConfig = ma_node_config_init();\n    baseNodeConfig.vtable          = &g_ma_hpf_node_vtable;\n    baseNodeConfig.pInputChannels  = &pConfig->hpf.channels;\n    baseNodeConfig.pOutputChannels = &pConfig->hpf.channels;\n\n    result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_hpf_node_reinit(const ma_hpf_config* pConfig, ma_hpf_node* pNode)\n{\n    ma_hpf_node* pHPFNode = (ma_hpf_node*)pNode;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_hpf_reinit(pConfig, &pHPFNode->hpf);\n}\n\nMA_API void ma_hpf_node_uninit(ma_hpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_hpf_node* pHPFNode = (ma_hpf_node*)pNode;\n\n    if (pNode == NULL) {\n        return;\n    }\n\n    ma_node_uninit(pNode, pAllocationCallbacks);\n    ma_hpf_uninit(&pHPFNode->hpf, pAllocationCallbacks);\n}\n\n\n\n\n/*\nBand Pass Filter Node\n*/\nMA_API ma_bpf_node_config ma_bpf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency, ma_uint32 order)\n{\n    ma_bpf_node_config config;\n\n    config.nodeConfig = ma_node_config_init();\n    config.bpf = ma_bpf_config_init(ma_format_f32, channels, sampleRate, cutoffFrequency, order);\n\n    return config;\n}\n\nstatic void ma_bpf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_bpf_node* pBPFNode = (ma_bpf_node*)pNode;\n\n    MA_ASSERT(pNode != NULL);\n    (void)pFrameCountIn;\n\n    ma_bpf_process_pcm_frames(&pBPFNode->bpf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut);\n}\n\nstatic ma_node_vtable g_ma_bpf_node_vtable =\n{\n    ma_bpf_node_process_pcm_frames,\n    NULL,   /* onGetRequiredInputFrameCount */\n    1,      /* One input. */\n    1,      /* One output. */\n    0       /* Default flags. */\n};\n\nMA_API ma_result ma_bpf_node_init(ma_node_graph* pNodeGraph, const ma_bpf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_bpf_node* pNode)\n{\n    ma_result result;\n    ma_node_config baseNodeConfig;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pNode);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->bpf.format != ma_format_f32) {\n        return MA_INVALID_ARGS; /* The format must be f32. */\n    }\n\n    result = ma_bpf_init(&pConfig->bpf, pAllocationCallbacks, &pNode->bpf);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    baseNodeConfig = ma_node_config_init();\n    baseNodeConfig.vtable          = &g_ma_bpf_node_vtable;\n    baseNodeConfig.pInputChannels  = &pConfig->bpf.channels;\n    baseNodeConfig.pOutputChannels = &pConfig->bpf.channels;\n\n    result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_bpf_node_reinit(const ma_bpf_config* pConfig, ma_bpf_node* pNode)\n{\n    ma_bpf_node* pBPFNode = (ma_bpf_node*)pNode;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_bpf_reinit(pConfig, &pBPFNode->bpf);\n}\n\nMA_API void ma_bpf_node_uninit(ma_bpf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_bpf_node* pBPFNode = (ma_bpf_node*)pNode;\n\n    if (pNode == NULL) {\n        return;\n    }\n\n    ma_node_uninit(pNode, pAllocationCallbacks);\n    ma_bpf_uninit(&pBPFNode->bpf, pAllocationCallbacks);\n}\n\n\n\n/*\nNotching Filter Node\n*/\nMA_API ma_notch_node_config ma_notch_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double q, double frequency)\n{\n    ma_notch_node_config config;\n\n    config.nodeConfig = ma_node_config_init();\n    config.notch = ma_notch2_config_init(ma_format_f32, channels, sampleRate, q, frequency);\n\n    return config;\n}\n\nstatic void ma_notch_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_notch_node* pBPFNode = (ma_notch_node*)pNode;\n\n    MA_ASSERT(pNode != NULL);\n    (void)pFrameCountIn;\n\n    ma_notch2_process_pcm_frames(&pBPFNode->notch, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut);\n}\n\nstatic ma_node_vtable g_ma_notch_node_vtable =\n{\n    ma_notch_node_process_pcm_frames,\n    NULL,   /* onGetRequiredInputFrameCount */\n    1,      /* One input. */\n    1,      /* One output. */\n    0       /* Default flags. */\n};\n\nMA_API ma_result ma_notch_node_init(ma_node_graph* pNodeGraph, const ma_notch_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_notch_node* pNode)\n{\n    ma_result result;\n    ma_node_config baseNodeConfig;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pNode);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->notch.format != ma_format_f32) {\n        return MA_INVALID_ARGS; /* The format must be f32. */\n    }\n\n    result = ma_notch2_init(&pConfig->notch, pAllocationCallbacks, &pNode->notch);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    baseNodeConfig = ma_node_config_init();\n    baseNodeConfig.vtable          = &g_ma_notch_node_vtable;\n    baseNodeConfig.pInputChannels  = &pConfig->notch.channels;\n    baseNodeConfig.pOutputChannels = &pConfig->notch.channels;\n\n    result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_notch_node_reinit(const ma_notch_config* pConfig, ma_notch_node* pNode)\n{\n    ma_notch_node* pNotchNode = (ma_notch_node*)pNode;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_notch2_reinit(pConfig, &pNotchNode->notch);\n}\n\nMA_API void ma_notch_node_uninit(ma_notch_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_notch_node* pNotchNode = (ma_notch_node*)pNode;\n\n    if (pNode == NULL) {\n        return;\n    }\n\n    ma_node_uninit(pNode, pAllocationCallbacks);\n    ma_notch2_uninit(&pNotchNode->notch, pAllocationCallbacks);\n}\n\n\n\n/*\nPeaking Filter Node\n*/\nMA_API ma_peak_node_config ma_peak_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency)\n{\n    ma_peak_node_config config;\n\n    config.nodeConfig = ma_node_config_init();\n    config.peak = ma_peak2_config_init(ma_format_f32, channels, sampleRate, gainDB, q, frequency);\n\n    return config;\n}\n\nstatic void ma_peak_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_peak_node* pBPFNode = (ma_peak_node*)pNode;\n\n    MA_ASSERT(pNode != NULL);\n    (void)pFrameCountIn;\n\n    ma_peak2_process_pcm_frames(&pBPFNode->peak, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut);\n}\n\nstatic ma_node_vtable g_ma_peak_node_vtable =\n{\n    ma_peak_node_process_pcm_frames,\n    NULL,   /* onGetRequiredInputFrameCount */\n    1,      /* One input. */\n    1,      /* One output. */\n    0       /* Default flags. */\n};\n\nMA_API ma_result ma_peak_node_init(ma_node_graph* pNodeGraph, const ma_peak_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_peak_node* pNode)\n{\n    ma_result result;\n    ma_node_config baseNodeConfig;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pNode);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->peak.format != ma_format_f32) {\n        return MA_INVALID_ARGS; /* The format must be f32. */\n    }\n\n    result = ma_peak2_init(&pConfig->peak, pAllocationCallbacks, &pNode->peak);\n    if (result != MA_SUCCESS) {\n        ma_node_uninit(pNode, pAllocationCallbacks);\n        return result;\n    }\n\n    baseNodeConfig = ma_node_config_init();\n    baseNodeConfig.vtable          = &g_ma_peak_node_vtable;\n    baseNodeConfig.pInputChannels  = &pConfig->peak.channels;\n    baseNodeConfig.pOutputChannels = &pConfig->peak.channels;\n\n    result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_peak_node_reinit(const ma_peak_config* pConfig, ma_peak_node* pNode)\n{\n    ma_peak_node* pPeakNode = (ma_peak_node*)pNode;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_peak2_reinit(pConfig, &pPeakNode->peak);\n}\n\nMA_API void ma_peak_node_uninit(ma_peak_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_peak_node* pPeakNode = (ma_peak_node*)pNode;\n\n    if (pNode == NULL) {\n        return;\n    }\n\n    ma_node_uninit(pNode, pAllocationCallbacks);\n    ma_peak2_uninit(&pPeakNode->peak, pAllocationCallbacks);\n}\n\n\n\n/*\nLow Shelf Filter Node\n*/\nMA_API ma_loshelf_node_config ma_loshelf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency)\n{\n    ma_loshelf_node_config config;\n\n    config.nodeConfig = ma_node_config_init();\n    config.loshelf = ma_loshelf2_config_init(ma_format_f32, channels, sampleRate, gainDB, q, frequency);\n\n    return config;\n}\n\nstatic void ma_loshelf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_loshelf_node* pBPFNode = (ma_loshelf_node*)pNode;\n\n    MA_ASSERT(pNode != NULL);\n    (void)pFrameCountIn;\n\n    ma_loshelf2_process_pcm_frames(&pBPFNode->loshelf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut);\n}\n\nstatic ma_node_vtable g_ma_loshelf_node_vtable =\n{\n    ma_loshelf_node_process_pcm_frames,\n    NULL,   /* onGetRequiredInputFrameCount */\n    1,      /* One input. */\n    1,      /* One output. */\n    0       /* Default flags. */\n};\n\nMA_API ma_result ma_loshelf_node_init(ma_node_graph* pNodeGraph, const ma_loshelf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_loshelf_node* pNode)\n{\n    ma_result result;\n    ma_node_config baseNodeConfig;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pNode);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->loshelf.format != ma_format_f32) {\n        return MA_INVALID_ARGS; /* The format must be f32. */\n    }\n\n    result = ma_loshelf2_init(&pConfig->loshelf, pAllocationCallbacks, &pNode->loshelf);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    baseNodeConfig = ma_node_config_init();\n    baseNodeConfig.vtable          = &g_ma_loshelf_node_vtable;\n    baseNodeConfig.pInputChannels  = &pConfig->loshelf.channels;\n    baseNodeConfig.pOutputChannels = &pConfig->loshelf.channels;\n\n    result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_loshelf_node_reinit(const ma_loshelf_config* pConfig, ma_loshelf_node* pNode)\n{\n    ma_loshelf_node* pLoshelfNode = (ma_loshelf_node*)pNode;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_loshelf2_reinit(pConfig, &pLoshelfNode->loshelf);\n}\n\nMA_API void ma_loshelf_node_uninit(ma_loshelf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_loshelf_node* pLoshelfNode = (ma_loshelf_node*)pNode;\n\n    if (pNode == NULL) {\n        return;\n    }\n\n    ma_node_uninit(pNode, pAllocationCallbacks);\n    ma_loshelf2_uninit(&pLoshelfNode->loshelf, pAllocationCallbacks);\n}\n\n\n\n/*\nHigh Shelf Filter Node\n*/\nMA_API ma_hishelf_node_config ma_hishelf_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, double gainDB, double q, double frequency)\n{\n    ma_hishelf_node_config config;\n\n    config.nodeConfig = ma_node_config_init();\n    config.hishelf = ma_hishelf2_config_init(ma_format_f32, channels, sampleRate, gainDB, q, frequency);\n\n    return config;\n}\n\nstatic void ma_hishelf_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_hishelf_node* pBPFNode = (ma_hishelf_node*)pNode;\n\n    MA_ASSERT(pNode != NULL);\n    (void)pFrameCountIn;\n\n    ma_hishelf2_process_pcm_frames(&pBPFNode->hishelf, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut);\n}\n\nstatic ma_node_vtable g_ma_hishelf_node_vtable =\n{\n    ma_hishelf_node_process_pcm_frames,\n    NULL,   /* onGetRequiredInputFrameCount */\n    1,      /* One input. */\n    1,      /* One output. */\n    0       /* Default flags. */\n};\n\nMA_API ma_result ma_hishelf_node_init(ma_node_graph* pNodeGraph, const ma_hishelf_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_hishelf_node* pNode)\n{\n    ma_result result;\n    ma_node_config baseNodeConfig;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pNode);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->hishelf.format != ma_format_f32) {\n        return MA_INVALID_ARGS; /* The format must be f32. */\n    }\n\n    result = ma_hishelf2_init(&pConfig->hishelf, pAllocationCallbacks, &pNode->hishelf);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    baseNodeConfig = ma_node_config_init();\n    baseNodeConfig.vtable          = &g_ma_hishelf_node_vtable;\n    baseNodeConfig.pInputChannels  = &pConfig->hishelf.channels;\n    baseNodeConfig.pOutputChannels = &pConfig->hishelf.channels;\n\n    result = ma_node_init(pNodeGraph, &baseNodeConfig, pAllocationCallbacks, pNode);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return result;\n}\n\nMA_API ma_result ma_hishelf_node_reinit(const ma_hishelf_config* pConfig, ma_hishelf_node* pNode)\n{\n    ma_hishelf_node* pHishelfNode = (ma_hishelf_node*)pNode;\n\n    if (pNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_hishelf2_reinit(pConfig, &pHishelfNode->hishelf);\n}\n\nMA_API void ma_hishelf_node_uninit(ma_hishelf_node* pNode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_hishelf_node* pHishelfNode = (ma_hishelf_node*)pNode;\n\n    if (pNode == NULL) {\n        return;\n    }\n\n    ma_node_uninit(pNode, pAllocationCallbacks);\n    ma_hishelf2_uninit(&pHishelfNode->hishelf, pAllocationCallbacks);\n}\n\n\n\n\nMA_API ma_delay_node_config ma_delay_node_config_init(ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 delayInFrames, float decay)\n{\n    ma_delay_node_config config;\n\n    config.nodeConfig = ma_node_config_init();\n    config.delay = ma_delay_config_init(channels, sampleRate, delayInFrames, decay);\n\n    return config;\n}\n\n\nstatic void ma_delay_node_process_pcm_frames(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_delay_node* pDelayNode = (ma_delay_node*)pNode;\n\n    (void)pFrameCountIn;\n\n    ma_delay_process_pcm_frames(&pDelayNode->delay, ppFramesOut[0], ppFramesIn[0], *pFrameCountOut);\n}\n\nstatic ma_node_vtable g_ma_delay_node_vtable =\n{\n    ma_delay_node_process_pcm_frames,\n    NULL,\n    1,  /* 1 input channels. */\n    1,  /* 1 output channel. */\n    MA_NODE_FLAG_CONTINUOUS_PROCESSING  /* Delay requires continuous processing to ensure the tail get's processed. */\n};\n\nMA_API ma_result ma_delay_node_init(ma_node_graph* pNodeGraph, const ma_delay_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_delay_node* pDelayNode)\n{\n    ma_result result;\n    ma_node_config baseConfig;\n\n    if (pDelayNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pDelayNode);\n\n    result = ma_delay_init(&pConfig->delay, pAllocationCallbacks, &pDelayNode->delay);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    baseConfig = pConfig->nodeConfig;\n    baseConfig.vtable          = &g_ma_delay_node_vtable;\n    baseConfig.pInputChannels  = &pConfig->delay.channels;\n    baseConfig.pOutputChannels = &pConfig->delay.channels;\n\n    result = ma_node_init(pNodeGraph, &baseConfig, pAllocationCallbacks, &pDelayNode->baseNode);\n    if (result != MA_SUCCESS) {\n        ma_delay_uninit(&pDelayNode->delay, pAllocationCallbacks);\n        return result;\n    }\n\n    return result;\n}\n\nMA_API void ma_delay_node_uninit(ma_delay_node* pDelayNode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pDelayNode == NULL) {\n        return;\n    }\n\n    /* The base node is always uninitialized first. */\n    ma_node_uninit(pDelayNode, pAllocationCallbacks);\n    ma_delay_uninit(&pDelayNode->delay, pAllocationCallbacks);\n}\n\nMA_API void ma_delay_node_set_wet(ma_delay_node* pDelayNode, float value)\n{\n    if (pDelayNode == NULL) {\n        return;\n    }\n\n    ma_delay_set_wet(&pDelayNode->delay, value);\n}\n\nMA_API float ma_delay_node_get_wet(const ma_delay_node* pDelayNode)\n{\n    if (pDelayNode == NULL) {\n        return 0;\n    }\n\n    return ma_delay_get_wet(&pDelayNode->delay);\n}\n\nMA_API void ma_delay_node_set_dry(ma_delay_node* pDelayNode, float value)\n{\n    if (pDelayNode == NULL) {\n        return;\n    }\n\n    ma_delay_set_dry(&pDelayNode->delay, value);\n}\n\nMA_API float ma_delay_node_get_dry(const ma_delay_node* pDelayNode)\n{\n    if (pDelayNode == NULL) {\n        return 0;\n    }\n\n    return ma_delay_get_dry(&pDelayNode->delay);\n}\n\nMA_API void ma_delay_node_set_decay(ma_delay_node* pDelayNode, float value)\n{\n    if (pDelayNode == NULL) {\n        return;\n    }\n\n    ma_delay_set_decay(&pDelayNode->delay, value);\n}\n\nMA_API float ma_delay_node_get_decay(const ma_delay_node* pDelayNode)\n{\n    if (pDelayNode == NULL) {\n        return 0;\n    }\n\n    return ma_delay_get_decay(&pDelayNode->delay);\n}\n#endif  /* MA_NO_NODE_GRAPH */\n\n\n/* SECTION: miniaudio_engine.c */\n#if !defined(MA_NO_ENGINE) && !defined(MA_NO_NODE_GRAPH)\n/**************************************************************************************************************************************************************\n\nEngine\n\n**************************************************************************************************************************************************************/\n#define MA_SEEK_TARGET_NONE         (~(ma_uint64)0)\n\n\nstatic void ma_sound_set_at_end(ma_sound* pSound, ma_bool32 atEnd)\n{\n    MA_ASSERT(pSound != NULL);\n    ma_atomic_exchange_32(&pSound->atEnd, atEnd);\n\n    /* Fire any callbacks or events. */\n    if (atEnd) {\n        if (pSound->endCallback != NULL) {\n            pSound->endCallback(pSound->pEndCallbackUserData, pSound);\n        }\n    }\n}\n\nstatic ma_bool32 ma_sound_get_at_end(const ma_sound* pSound)\n{\n    MA_ASSERT(pSound != NULL);\n    return ma_atomic_load_32(&pSound->atEnd);\n}\n\n\nMA_API ma_engine_node_config ma_engine_node_config_init(ma_engine* pEngine, ma_engine_node_type type, ma_uint32 flags)\n{\n    ma_engine_node_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.pEngine                  = pEngine;\n    config.type                     = type;\n    config.isPitchDisabled          = (flags & MA_SOUND_FLAG_NO_PITCH) != 0;\n    config.isSpatializationDisabled = (flags & MA_SOUND_FLAG_NO_SPATIALIZATION) != 0;\n    config.monoExpansionMode        = pEngine->monoExpansionMode;\n\n    return config;\n}\n\n\nstatic void ma_engine_node_update_pitch_if_required(ma_engine_node* pEngineNode)\n{\n    ma_bool32 isUpdateRequired = MA_FALSE;\n    float newPitch;\n\n    MA_ASSERT(pEngineNode != NULL);\n\n    newPitch = ma_atomic_load_explicit_f32(&pEngineNode->pitch, ma_atomic_memory_order_acquire);\n\n    if (pEngineNode->oldPitch != newPitch) {\n        pEngineNode->oldPitch  = newPitch;\n        isUpdateRequired = MA_TRUE;\n    }\n\n    if (pEngineNode->oldDopplerPitch != pEngineNode->spatializer.dopplerPitch) {\n        pEngineNode->oldDopplerPitch  = pEngineNode->spatializer.dopplerPitch;\n        isUpdateRequired = MA_TRUE;\n    }\n\n    if (isUpdateRequired) {\n        float basePitch = (float)pEngineNode->sampleRate / ma_engine_get_sample_rate(pEngineNode->pEngine);\n        ma_linear_resampler_set_rate_ratio(&pEngineNode->resampler, basePitch * pEngineNode->oldPitch * pEngineNode->oldDopplerPitch);\n    }\n}\n\nstatic ma_bool32 ma_engine_node_is_pitching_enabled(const ma_engine_node* pEngineNode)\n{\n    MA_ASSERT(pEngineNode != NULL);\n\n    /* Don't try to be clever by skiping resampling in the pitch=1 case or else you'll glitch when moving away from 1. */\n    return !ma_atomic_load_explicit_32(&pEngineNode->isPitchDisabled, ma_atomic_memory_order_acquire);\n}\n\nstatic ma_bool32 ma_engine_node_is_spatialization_enabled(const ma_engine_node* pEngineNode)\n{\n    MA_ASSERT(pEngineNode != NULL);\n\n    return !ma_atomic_load_explicit_32(&pEngineNode->isSpatializationDisabled, ma_atomic_memory_order_acquire);\n}\n\nstatic ma_uint64 ma_engine_node_get_required_input_frame_count(const ma_engine_node* pEngineNode, ma_uint64 outputFrameCount)\n{\n    ma_uint64 inputFrameCount = 0;\n\n    if (ma_engine_node_is_pitching_enabled(pEngineNode)) {\n        ma_result result = ma_linear_resampler_get_required_input_frame_count(&pEngineNode->resampler, outputFrameCount, &inputFrameCount);\n        if (result != MA_SUCCESS) {\n            inputFrameCount = 0;\n        }\n    } else {\n        inputFrameCount = outputFrameCount;    /* No resampling, so 1:1. */\n    }\n\n    return inputFrameCount;\n}\n\nstatic ma_result ma_engine_node_set_volume(ma_engine_node* pEngineNode, float volume)\n{\n    if (pEngineNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    ma_atomic_float_set(&pEngineNode->volume, volume);\n\n    /* If we're not smoothing we should bypass the volume gainer entirely. */\n    if (pEngineNode->volumeSmoothTimeInPCMFrames == 0) {\n        /* We should always have an active spatializer because it can be enabled and disabled dynamically. We can just use that for hodling our volume. */\n        ma_spatializer_set_master_volume(&pEngineNode->spatializer, volume);\n    } else {\n        /* We're using volume smoothing, so apply the master volume to the gainer. */\n        ma_gainer_set_gain(&pEngineNode->volumeGainer, volume);\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_engine_node_get_volume(const ma_engine_node* pEngineNode, float* pVolume)\n{\n    if (pVolume == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pVolume = 0.0f;\n\n    if (pEngineNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pVolume = ma_atomic_float_get((ma_atomic_float*)&pEngineNode->volume);\n\n    return MA_SUCCESS;\n}\n\n\nstatic void ma_engine_node_process_pcm_frames__general(ma_engine_node* pEngineNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    ma_uint32 frameCountIn;\n    ma_uint32 frameCountOut;\n    ma_uint32 totalFramesProcessedIn;\n    ma_uint32 totalFramesProcessedOut;\n    ma_uint32 channelsIn;\n    ma_uint32 channelsOut;\n    ma_bool32 isPitchingEnabled;\n    ma_bool32 isFadingEnabled;\n    ma_bool32 isSpatializationEnabled;\n    ma_bool32 isPanningEnabled;\n    ma_bool32 isVolumeSmoothingEnabled;\n\n    frameCountIn  = *pFrameCountIn;\n    frameCountOut = *pFrameCountOut;\n\n    channelsIn  = ma_spatializer_get_input_channels(&pEngineNode->spatializer);\n    channelsOut = ma_spatializer_get_output_channels(&pEngineNode->spatializer);\n\n    totalFramesProcessedIn  = 0;\n    totalFramesProcessedOut = 0;\n\n    /* Update the fader if applicable. */\n    {\n        ma_uint64 fadeLengthInFrames = ma_atomic_uint64_get(&pEngineNode->fadeSettings.fadeLengthInFrames);\n        if (fadeLengthInFrames != ~(ma_uint64)0) {\n            float fadeVolumeBeg = ma_atomic_float_get(&pEngineNode->fadeSettings.volumeBeg);\n            float fadeVolumeEnd = ma_atomic_float_get(&pEngineNode->fadeSettings.volumeEnd);\n            ma_int64 fadeStartOffsetInFrames = (ma_int64)ma_atomic_uint64_get(&pEngineNode->fadeSettings.absoluteGlobalTimeInFrames);\n            if (fadeStartOffsetInFrames == (ma_int64)(~(ma_uint64)0)) {\n                fadeStartOffsetInFrames = 0;\n            } else {\n                fadeStartOffsetInFrames -= ma_engine_get_time_in_pcm_frames(pEngineNode->pEngine);\n            }\n\n            ma_fader_set_fade_ex(&pEngineNode->fader, fadeVolumeBeg, fadeVolumeEnd, fadeLengthInFrames, fadeStartOffsetInFrames);\n\n            /* Reset the fade length so we don't erroneously apply it again. */\n            ma_atomic_uint64_set(&pEngineNode->fadeSettings.fadeLengthInFrames, ~(ma_uint64)0);\n        }\n    }\n\n    isPitchingEnabled        = ma_engine_node_is_pitching_enabled(pEngineNode);\n    isFadingEnabled          = pEngineNode->fader.volumeBeg != 1 || pEngineNode->fader.volumeEnd != 1;\n    isSpatializationEnabled  = ma_engine_node_is_spatialization_enabled(pEngineNode);\n    isPanningEnabled         = pEngineNode->panner.pan != 0 && channelsOut != 1;\n    isVolumeSmoothingEnabled = pEngineNode->volumeSmoothTimeInPCMFrames > 0;\n\n    /* Keep going while we've still got data available for processing. */\n    while (totalFramesProcessedOut < frameCountOut) {\n        /*\n        We need to process in a specific order. We always do resampling first because it's likely\n        we're going to be increasing the channel count after spatialization. Also, I want to do\n        fading based on the output sample rate.\n\n        We'll first read into a buffer from the resampler. Then we'll do all processing that\n        operates on the on the input channel count. We'll then get the spatializer to output to\n        the output buffer and then do all effects from that point directly in the output buffer\n        in-place.\n\n        Note that we're always running the resampler if pitching is enabled, even when the pitch\n        is 1. If we try to be clever and skip resampling when the pitch is 1, we'll get a glitch\n        when we move away from 1, back to 1, and then away from 1 again. We'll want to implement\n        any pitch=1 optimizations in the resampler itself.\n\n        There's a small optimization here that we'll utilize since it might be a fairly common\n        case. When the input and output channel counts are the same, we'll read straight into the\n        output buffer from the resampler and do everything in-place.\n        */\n        const float* pRunningFramesIn;\n        float* pRunningFramesOut;\n        float* pWorkingBuffer;   /* This is the buffer that we'll be processing frames in. This is in input channels. */\n        float temp[MA_DATA_CONVERTER_STACK_BUFFER_SIZE / sizeof(float)];\n        ma_uint32 tempCapInFrames = ma_countof(temp) / channelsIn;\n        ma_uint32 framesAvailableIn;\n        ma_uint32 framesAvailableOut;\n        ma_uint32 framesJustProcessedIn;\n        ma_uint32 framesJustProcessedOut;\n        ma_bool32 isWorkingBufferValid = MA_FALSE;\n\n        framesAvailableIn  = frameCountIn  - totalFramesProcessedIn;\n        framesAvailableOut = frameCountOut - totalFramesProcessedOut;\n\n        pRunningFramesIn  = ma_offset_pcm_frames_const_ptr_f32(ppFramesIn[0], totalFramesProcessedIn, channelsIn);\n        pRunningFramesOut = ma_offset_pcm_frames_ptr_f32(ppFramesOut[0], totalFramesProcessedOut, channelsOut);\n\n        if (channelsIn == channelsOut) {\n            /* Fast path. Channel counts are the same. No need for an intermediary input buffer. */\n            pWorkingBuffer = pRunningFramesOut;\n        } else {\n            /* Slow path. Channel counts are different. Need to use an intermediary input buffer. */\n            pWorkingBuffer = temp;\n            if (framesAvailableOut > tempCapInFrames) {\n                framesAvailableOut = tempCapInFrames;\n            }\n        }\n\n        /* First is resampler. */\n        if (isPitchingEnabled) {\n            ma_uint64 resampleFrameCountIn  = framesAvailableIn;\n            ma_uint64 resampleFrameCountOut = framesAvailableOut;\n\n            ma_linear_resampler_process_pcm_frames(&pEngineNode->resampler, pRunningFramesIn, &resampleFrameCountIn, pWorkingBuffer, &resampleFrameCountOut);\n            isWorkingBufferValid = MA_TRUE;\n\n            framesJustProcessedIn  = (ma_uint32)resampleFrameCountIn;\n            framesJustProcessedOut = (ma_uint32)resampleFrameCountOut;\n        } else {\n            framesJustProcessedIn  = ma_min(framesAvailableIn, framesAvailableOut);\n            framesJustProcessedOut = framesJustProcessedIn; /* When no resampling is being performed, the number of output frames is the same as input frames. */\n        }\n\n        /* Fading. */\n        if (isFadingEnabled) {\n            if (isWorkingBufferValid) {\n                ma_fader_process_pcm_frames(&pEngineNode->fader, pWorkingBuffer, pWorkingBuffer, framesJustProcessedOut);   /* In-place processing. */\n            } else {\n                ma_fader_process_pcm_frames(&pEngineNode->fader, pWorkingBuffer, pRunningFramesIn, framesJustProcessedOut);\n                isWorkingBufferValid = MA_TRUE;\n            }\n        }\n\n        /*\n        If we're using smoothing, we won't be applying volume via the spatializer, but instead from a ma_gainer. In this case\n        we'll want to apply our volume now.\n        */\n        if (isVolumeSmoothingEnabled) {\n            if (isWorkingBufferValid) {\n                ma_gainer_process_pcm_frames(&pEngineNode->volumeGainer, pWorkingBuffer, pWorkingBuffer, framesJustProcessedOut);\n            } else {\n                ma_gainer_process_pcm_frames(&pEngineNode->volumeGainer, pWorkingBuffer, pRunningFramesIn, framesJustProcessedOut);\n                isWorkingBufferValid = MA_TRUE;\n            }\n        }\n\n        /*\n        If at this point we still haven't actually done anything with the working buffer we need\n        to just read straight from the input buffer.\n        */\n        if (isWorkingBufferValid == MA_FALSE) {\n            pWorkingBuffer = (float*)pRunningFramesIn;  /* Naughty const cast, but it's safe at this point because we won't ever be writing to it from this point out. */\n        }\n\n        /* Spatialization. */\n        if (isSpatializationEnabled) {\n            ma_uint32 iListener;\n\n            /*\n            When determining the listener to use, we first check to see if the sound is pinned to a\n            specific listener. If so, we use that. Otherwise we just use the closest listener.\n            */\n            if (pEngineNode->pinnedListenerIndex != MA_LISTENER_INDEX_CLOSEST && pEngineNode->pinnedListenerIndex < ma_engine_get_listener_count(pEngineNode->pEngine)) {\n                iListener = pEngineNode->pinnedListenerIndex;\n            } else {\n                ma_vec3f spatializerPosition = ma_spatializer_get_position(&pEngineNode->spatializer);\n                iListener = ma_engine_find_closest_listener(pEngineNode->pEngine, spatializerPosition.x, spatializerPosition.y, spatializerPosition.z);\n            }\n\n            ma_spatializer_process_pcm_frames(&pEngineNode->spatializer, &pEngineNode->pEngine->listeners[iListener], pRunningFramesOut, pWorkingBuffer, framesJustProcessedOut);\n        } else {\n            /* No spatialization, but we still need to do channel conversion and master volume. */\n            float volume;\n            ma_engine_node_get_volume(pEngineNode, &volume);    /* Should never fail. */\n\n            if (channelsIn == channelsOut) {\n                /* No channel conversion required. Just copy straight to the output buffer. */\n                if (isVolumeSmoothingEnabled) {\n                    /* Volume has already been applied. Just copy straight to the output buffer. */\n                    ma_copy_pcm_frames(pRunningFramesOut, pWorkingBuffer, framesJustProcessedOut * channelsOut, ma_format_f32, channelsOut);\n                } else {\n                    /* Volume has not been applied yet. Copy and apply volume in the same pass. */\n                    ma_copy_and_apply_volume_factor_f32(pRunningFramesOut, pWorkingBuffer, framesJustProcessedOut * channelsOut, volume);\n                }\n            } else {\n                /* Channel conversion required. TODO: Add support for channel maps here. */\n                ma_channel_map_apply_f32(pRunningFramesOut, NULL, channelsOut, pWorkingBuffer, NULL, channelsIn, framesJustProcessedOut, ma_channel_mix_mode_simple, pEngineNode->monoExpansionMode);\n\n                /* If we're using smoothing, the volume will have already been applied. */\n                if (!isVolumeSmoothingEnabled) {\n                    ma_apply_volume_factor_f32(pRunningFramesOut, framesJustProcessedOut * channelsOut, volume);\n                }\n            }\n        }\n\n        /* At this point we can guarantee that the output buffer contains valid data. We can process everything in place now. */\n\n        /* Panning. */\n        if (isPanningEnabled) {\n            ma_panner_process_pcm_frames(&pEngineNode->panner, pRunningFramesOut, pRunningFramesOut, framesJustProcessedOut);   /* In-place processing. */\n        }\n\n        /* We're done for this chunk. */\n        totalFramesProcessedIn  += framesJustProcessedIn;\n        totalFramesProcessedOut += framesJustProcessedOut;\n\n        /* If we didn't process any output frames this iteration it means we've either run out of input data, or run out of room in the output buffer. */\n        if (framesJustProcessedOut == 0) {\n            break;\n        }\n    }\n\n    /* At this point we're done processing. */\n    *pFrameCountIn  = totalFramesProcessedIn;\n    *pFrameCountOut = totalFramesProcessedOut;\n}\n\nstatic void ma_engine_node_process_pcm_frames__sound(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    /* For sounds, we need to first read from the data source. Then we need to apply the engine effects (pan, pitch, fades, etc.). */\n    ma_result result = MA_SUCCESS;\n    ma_sound* pSound = (ma_sound*)pNode;\n    ma_uint32 frameCount = *pFrameCountOut;\n    ma_uint32 totalFramesRead = 0;\n    ma_format dataSourceFormat;\n    ma_uint32 dataSourceChannels;\n    ma_uint8 temp[MA_DATA_CONVERTER_STACK_BUFFER_SIZE];\n    ma_uint32 tempCapInFrames;\n    ma_uint64 seekTarget;\n\n    /* This is a data source node which means no input buses. */\n    (void)ppFramesIn;\n    (void)pFrameCountIn;\n\n    /* If we're marked at the end we need to stop the sound and do nothing. */\n    if (ma_sound_at_end(pSound)) {\n        ma_sound_stop(pSound);\n        *pFrameCountOut = 0;\n        return;\n    }\n\n    /* If we're seeking, do so now before reading. */\n    seekTarget = ma_atomic_load_64(&pSound->seekTarget);\n    if (seekTarget != MA_SEEK_TARGET_NONE) {\n        ma_data_source_seek_to_pcm_frame(pSound->pDataSource, seekTarget);\n\n        /* Any time-dependant effects need to have their times updated. */\n        ma_node_set_time(pSound, seekTarget);\n\n        ma_atomic_exchange_64(&pSound->seekTarget, MA_SEEK_TARGET_NONE);\n    }\n\n    /*\n    We want to update the pitch once. For sounds, this can be either at the start or at the end. If\n    we don't force this to only ever be updating once, we could end up in a situation where\n    retrieving the required input frame count ends up being different to what we actually retrieve.\n    What could happen is that the required input frame count is calculated, the pitch is update,\n    and then this processing function is called resulting in a different number of input frames\n    being processed. Do not call this in ma_engine_node_process_pcm_frames__general() or else\n    you'll hit the aforementioned bug.\n    */\n    ma_engine_node_update_pitch_if_required(&pSound->engineNode);\n\n    /*\n    For the convenience of the caller, we're doing to allow data sources to use non-floating-point formats and channel counts that differ\n    from the main engine.\n    */\n    result = ma_data_source_get_data_format(pSound->pDataSource, &dataSourceFormat, &dataSourceChannels, NULL, NULL, 0);\n    if (result == MA_SUCCESS) {\n        tempCapInFrames = sizeof(temp) / ma_get_bytes_per_frame(dataSourceFormat, dataSourceChannels);\n\n        /* Keep reading until we've read as much as was requested or we reach the end of the data source. */\n        while (totalFramesRead < frameCount) {\n            ma_uint32 framesRemaining = frameCount - totalFramesRead;\n            ma_uint32 framesToRead;\n            ma_uint64 framesJustRead;\n            ma_uint32 frameCountIn;\n            ma_uint32 frameCountOut;\n            const float* pRunningFramesIn;\n            float* pRunningFramesOut;\n\n            /*\n            The first thing we need to do is read into the temporary buffer. We can calculate exactly\n            how many input frames we'll need after resampling.\n            */\n            framesToRead = (ma_uint32)ma_engine_node_get_required_input_frame_count(&pSound->engineNode, framesRemaining);\n            if (framesToRead > tempCapInFrames) {\n                framesToRead = tempCapInFrames;\n            }\n\n            result = ma_data_source_read_pcm_frames(pSound->pDataSource, temp, framesToRead, &framesJustRead);\n\n            /* If we reached the end of the sound we'll want to mark it as at the end and stop it. This should never be returned for looping sounds. */\n            if (result == MA_AT_END) {\n                ma_sound_set_at_end(pSound, MA_TRUE);   /* This will be set to false in ma_sound_start(). */\n            }\n\n            pRunningFramesOut = ma_offset_pcm_frames_ptr_f32(ppFramesOut[0], totalFramesRead, ma_engine_get_channels(ma_sound_get_engine(pSound)));\n\n            frameCountIn = (ma_uint32)framesJustRead;\n            frameCountOut = framesRemaining;\n\n            /* Convert if necessary. */\n            if (dataSourceFormat == ma_format_f32) {\n                /* Fast path. No data conversion necessary. */\n                pRunningFramesIn = (float*)temp;\n                ma_engine_node_process_pcm_frames__general(&pSound->engineNode, &pRunningFramesIn, &frameCountIn, &pRunningFramesOut, &frameCountOut);\n            } else {\n                /* Slow path. Need to do sample format conversion to f32. If we give the f32 buffer the same count as the first temp buffer, we're guaranteed it'll be large enough. */\n                float tempf32[MA_DATA_CONVERTER_STACK_BUFFER_SIZE]; /* Do not do `MA_DATA_CONVERTER_STACK_BUFFER_SIZE/sizeof(float)` here like we've done in other places. */\n                ma_convert_pcm_frames_format(tempf32, ma_format_f32, temp, dataSourceFormat, framesJustRead, dataSourceChannels, ma_dither_mode_none);\n\n                /* Now that we have our samples in f32 format we can process like normal. */\n                pRunningFramesIn = tempf32;\n                ma_engine_node_process_pcm_frames__general(&pSound->engineNode, &pRunningFramesIn, &frameCountIn, &pRunningFramesOut, &frameCountOut);\n            }\n\n            /* We should have processed all of our input frames since we calculated the required number of input frames at the top. */\n            MA_ASSERT(frameCountIn == framesJustRead);\n            totalFramesRead += (ma_uint32)frameCountOut;   /* Safe cast. */\n\n            if (result != MA_SUCCESS || ma_sound_at_end(pSound)) {\n                break;  /* Might have reached the end. */\n            }\n        }\n    }\n\n    *pFrameCountOut = totalFramesRead;\n}\n\nstatic void ma_engine_node_process_pcm_frames__group(ma_node* pNode, const float** ppFramesIn, ma_uint32* pFrameCountIn, float** ppFramesOut, ma_uint32* pFrameCountOut)\n{\n    /*\n    Make sure the pitch is updated before trying to read anything. It's important that this is done\n    only once and not in ma_engine_node_process_pcm_frames__general(). The reason for this is that\n    ma_engine_node_process_pcm_frames__general() will call ma_engine_node_get_required_input_frame_count(),\n    and if another thread modifies the pitch just after that call it can result in a glitch due to\n    the input rate changing.\n    */\n    ma_engine_node_update_pitch_if_required((ma_engine_node*)pNode);\n\n    /* For groups, the input data has already been read and we just need to apply the effect. */\n    ma_engine_node_process_pcm_frames__general((ma_engine_node*)pNode, ppFramesIn, pFrameCountIn, ppFramesOut, pFrameCountOut);\n}\n\nstatic ma_result ma_engine_node_get_required_input_frame_count__group(ma_node* pNode, ma_uint32 outputFrameCount, ma_uint32* pInputFrameCount)\n{\n    ma_uint64 inputFrameCount;\n\n    MA_ASSERT(pInputFrameCount != NULL);\n\n    /* Our pitch will affect this calculation. We need to update it. */\n    ma_engine_node_update_pitch_if_required((ma_engine_node*)pNode);\n\n    inputFrameCount = ma_engine_node_get_required_input_frame_count((ma_engine_node*)pNode, outputFrameCount);\n    if (inputFrameCount > 0xFFFFFFFF) {\n        inputFrameCount = 0xFFFFFFFF;    /* Will never happen because miniaudio will only ever process in relatively small chunks. */\n    }\n\n    *pInputFrameCount = (ma_uint32)inputFrameCount;\n\n    return MA_SUCCESS;\n}\n\n\nstatic ma_node_vtable g_ma_engine_node_vtable__sound =\n{\n    ma_engine_node_process_pcm_frames__sound,\n    NULL,   /* onGetRequiredInputFrameCount */\n    0,      /* Sounds are data source nodes which means they have zero inputs (their input is drawn from the data source itself). */\n    1,      /* Sounds have one output bus. */\n    0       /* Default flags. */\n};\n\nstatic ma_node_vtable g_ma_engine_node_vtable__group =\n{\n    ma_engine_node_process_pcm_frames__group,\n    ma_engine_node_get_required_input_frame_count__group,\n    1,      /* Groups have one input bus. */\n    1,      /* Groups have one output bus. */\n    MA_NODE_FLAG_DIFFERENT_PROCESSING_RATES /* The engine node does resampling so should let miniaudio know about it. */\n};\n\n\n\nstatic ma_node_config ma_engine_node_base_node_config_init(const ma_engine_node_config* pConfig)\n{\n    ma_node_config baseNodeConfig;\n\n    if (pConfig->type == ma_engine_node_type_sound) {\n        /* Sound. */\n        baseNodeConfig = ma_node_config_init();\n        baseNodeConfig.vtable       = &g_ma_engine_node_vtable__sound;\n        baseNodeConfig.initialState = ma_node_state_stopped;    /* Sounds are stopped by default. */\n    } else {\n        /* Group. */\n        baseNodeConfig = ma_node_config_init();\n        baseNodeConfig.vtable       = &g_ma_engine_node_vtable__group;\n        baseNodeConfig.initialState = ma_node_state_started;    /* Groups are started by default. */\n    }\n\n    return baseNodeConfig;\n}\n\nstatic ma_spatializer_config ma_engine_node_spatializer_config_init(const ma_node_config* pBaseNodeConfig)\n{\n    return ma_spatializer_config_init(pBaseNodeConfig->pInputChannels[0], pBaseNodeConfig->pOutputChannels[0]);\n}\n\ntypedef struct\n{\n    size_t sizeInBytes;\n    size_t baseNodeOffset;\n    size_t resamplerOffset;\n    size_t spatializerOffset;\n    size_t gainerOffset;\n} ma_engine_node_heap_layout;\n\nstatic ma_result ma_engine_node_get_heap_layout(const ma_engine_node_config* pConfig, ma_engine_node_heap_layout* pHeapLayout)\n{\n    ma_result result;\n    size_t tempHeapSize;\n    ma_node_config baseNodeConfig;\n    ma_linear_resampler_config resamplerConfig;\n    ma_spatializer_config spatializerConfig;\n    ma_gainer_config gainerConfig;\n    ma_uint32 channelsIn;\n    ma_uint32 channelsOut;\n    ma_channel defaultStereoChannelMap[2] = {MA_CHANNEL_SIDE_LEFT, MA_CHANNEL_SIDE_RIGHT};  /* <-- Consistent with the default channel map of a stereo listener. Means channel conversion can run on a fast path. */\n\n    MA_ASSERT(pHeapLayout);\n\n    MA_ZERO_OBJECT(pHeapLayout);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    if (pConfig->pEngine == NULL) {\n        return MA_INVALID_ARGS; /* An engine must be specified. */\n    }\n\n    pHeapLayout->sizeInBytes = 0;\n\n    channelsIn  = (pConfig->channelsIn  != 0) ? pConfig->channelsIn  : ma_engine_get_channels(pConfig->pEngine);\n    channelsOut = (pConfig->channelsOut != 0) ? pConfig->channelsOut : ma_engine_get_channels(pConfig->pEngine);\n\n\n    /* Base node. */\n    baseNodeConfig = ma_engine_node_base_node_config_init(pConfig);\n    baseNodeConfig.pInputChannels  = &channelsIn;\n    baseNodeConfig.pOutputChannels = &channelsOut;\n\n    result = ma_node_get_heap_size(ma_engine_get_node_graph(pConfig->pEngine), &baseNodeConfig, &tempHeapSize);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to retrieve the size of the heap for the base node. */\n    }\n\n    pHeapLayout->baseNodeOffset = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += ma_align_64(tempHeapSize);\n\n\n    /* Resmapler. */\n    resamplerConfig = ma_linear_resampler_config_init(ma_format_f32, channelsIn, 1, 1); /* Input and output sample rates don't affect the calculation of the heap size. */\n    resamplerConfig.lpfOrder = 0;\n\n    result = ma_linear_resampler_get_heap_size(&resamplerConfig, &tempHeapSize);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to retrieve the size of the heap for the resampler. */\n    }\n\n    pHeapLayout->resamplerOffset = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += ma_align_64(tempHeapSize);\n\n\n    /* Spatializer. */\n    spatializerConfig = ma_engine_node_spatializer_config_init(&baseNodeConfig);\n\n    if (spatializerConfig.channelsIn == 2) {\n        spatializerConfig.pChannelMapIn = defaultStereoChannelMap;\n    }\n\n    result = ma_spatializer_get_heap_size(&spatializerConfig, &tempHeapSize);\n    if (result != MA_SUCCESS) {\n        return result;  /* Failed to retrieve the size of the heap for the spatializer. */\n    }\n\n    pHeapLayout->spatializerOffset = pHeapLayout->sizeInBytes;\n    pHeapLayout->sizeInBytes += ma_align_64(tempHeapSize);\n\n\n    /* Gainer. Will not be used if we are not using smoothing. */\n    if (pConfig->volumeSmoothTimeInPCMFrames > 0) {\n        gainerConfig = ma_gainer_config_init(channelsIn, pConfig->volumeSmoothTimeInPCMFrames);\n\n        result = ma_gainer_get_heap_size(&gainerConfig, &tempHeapSize);\n        if (result != MA_SUCCESS) {\n            return result;\n        }\n\n        pHeapLayout->gainerOffset = pHeapLayout->sizeInBytes;\n        pHeapLayout->sizeInBytes += ma_align_64(tempHeapSize);\n    }\n\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_engine_node_get_heap_size(const ma_engine_node_config* pConfig, size_t* pHeapSizeInBytes)\n{\n    ma_result result;\n    ma_engine_node_heap_layout heapLayout;\n\n    if (pHeapSizeInBytes == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    *pHeapSizeInBytes = 0;\n\n    result = ma_engine_node_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    *pHeapSizeInBytes = heapLayout.sizeInBytes;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_engine_node_init_preallocated(const ma_engine_node_config* pConfig, void* pHeap, ma_engine_node* pEngineNode)\n{\n    ma_result result;\n    ma_engine_node_heap_layout heapLayout;\n    ma_node_config baseNodeConfig;\n    ma_linear_resampler_config resamplerConfig;\n    ma_fader_config faderConfig;\n    ma_spatializer_config spatializerConfig;\n    ma_panner_config pannerConfig;\n    ma_gainer_config gainerConfig;\n    ma_uint32 channelsIn;\n    ma_uint32 channelsOut;\n    ma_channel defaultStereoChannelMap[2] = {MA_CHANNEL_SIDE_LEFT, MA_CHANNEL_SIDE_RIGHT};  /* <-- Consistent with the default channel map of a stereo listener. Means channel conversion can run on a fast path. */\n\n    if (pEngineNode == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pEngineNode);\n\n    result = ma_engine_node_get_heap_layout(pConfig, &heapLayout);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pConfig->pinnedListenerIndex != MA_LISTENER_INDEX_CLOSEST && pConfig->pinnedListenerIndex >= ma_engine_get_listener_count(pConfig->pEngine)) {\n        return MA_INVALID_ARGS; /* Invalid listener. */\n    }\n\n    pEngineNode->_pHeap = pHeap;\n    MA_ZERO_MEMORY(pHeap, heapLayout.sizeInBytes);\n\n    pEngineNode->pEngine                     = pConfig->pEngine;\n    pEngineNode->sampleRate                  = (pConfig->sampleRate > 0) ? pConfig->sampleRate : ma_engine_get_sample_rate(pEngineNode->pEngine);\n    pEngineNode->volumeSmoothTimeInPCMFrames = pConfig->volumeSmoothTimeInPCMFrames;\n    pEngineNode->monoExpansionMode           = pConfig->monoExpansionMode;\n    ma_atomic_float_set(&pEngineNode->volume, 1);\n    pEngineNode->pitch                       = 1;\n    pEngineNode->oldPitch                    = 1;\n    pEngineNode->oldDopplerPitch             = 1;\n    pEngineNode->isPitchDisabled             = pConfig->isPitchDisabled;\n    pEngineNode->isSpatializationDisabled    = pConfig->isSpatializationDisabled;\n    pEngineNode->pinnedListenerIndex         = pConfig->pinnedListenerIndex;\n    ma_atomic_float_set(&pEngineNode->fadeSettings.volumeBeg, 1);\n    ma_atomic_float_set(&pEngineNode->fadeSettings.volumeEnd, 1);\n    ma_atomic_uint64_set(&pEngineNode->fadeSettings.fadeLengthInFrames, (~(ma_uint64)0));\n    ma_atomic_uint64_set(&pEngineNode->fadeSettings.absoluteGlobalTimeInFrames, (~(ma_uint64)0));   /* <-- Indicates that the fade should start immediately. */\n\n    channelsIn  = (pConfig->channelsIn  != 0) ? pConfig->channelsIn  : ma_engine_get_channels(pConfig->pEngine);\n    channelsOut = (pConfig->channelsOut != 0) ? pConfig->channelsOut : ma_engine_get_channels(pConfig->pEngine);\n\n    /*\n    If the sample rate of the sound is different to the engine, make sure pitching is enabled so that the resampler\n    is activated. Not doing this will result in the sound not being resampled if MA_SOUND_FLAG_NO_PITCH is used.\n    */\n    if (pEngineNode->sampleRate != ma_engine_get_sample_rate(pEngineNode->pEngine)) {\n        pEngineNode->isPitchDisabled = MA_FALSE;\n    }\n\n\n    /* Base node. */\n    baseNodeConfig = ma_engine_node_base_node_config_init(pConfig);\n    baseNodeConfig.pInputChannels  = &channelsIn;\n    baseNodeConfig.pOutputChannels = &channelsOut;\n\n    result = ma_node_init_preallocated(&pConfig->pEngine->nodeGraph, &baseNodeConfig, ma_offset_ptr(pHeap, heapLayout.baseNodeOffset), &pEngineNode->baseNode);\n    if (result != MA_SUCCESS) {\n        goto error0;\n    }\n\n\n    /*\n    We can now initialize the effects we need in order to implement the engine node. There's a\n    defined order of operations here, mainly centered around when we convert our channels from the\n    data source's native channel count to the engine's channel count. As a rule, we want to do as\n    much computation as possible before spatialization because there's a chance that will increase\n    the channel count, thereby increasing the amount of work needing to be done to process.\n    */\n\n    /* We'll always do resampling first. */\n    resamplerConfig = ma_linear_resampler_config_init(ma_format_f32, baseNodeConfig.pInputChannels[0], pEngineNode->sampleRate, ma_engine_get_sample_rate(pEngineNode->pEngine));\n    resamplerConfig.lpfOrder = 0;    /* <-- Need to disable low-pass filtering for pitch shifting for now because there's cases where the biquads are becoming unstable. Need to figure out a better fix for this. */\n\n    result = ma_linear_resampler_init_preallocated(&resamplerConfig, ma_offset_ptr(pHeap, heapLayout.resamplerOffset), &pEngineNode->resampler);\n    if (result != MA_SUCCESS) {\n        goto error1;\n    }\n\n\n    /* After resampling will come the fader. */\n    faderConfig = ma_fader_config_init(ma_format_f32, baseNodeConfig.pInputChannels[0], ma_engine_get_sample_rate(pEngineNode->pEngine));\n\n    result = ma_fader_init(&faderConfig, &pEngineNode->fader);\n    if (result != MA_SUCCESS) {\n        goto error2;\n    }\n\n\n    /*\n    Spatialization comes next. We spatialize based ont he node's output channel count. It's up the caller to\n    ensure channels counts link up correctly in the node graph.\n    */\n    spatializerConfig = ma_engine_node_spatializer_config_init(&baseNodeConfig);\n    spatializerConfig.gainSmoothTimeInFrames = pEngineNode->pEngine->gainSmoothTimeInFrames;\n\n    if (spatializerConfig.channelsIn == 2) {\n        spatializerConfig.pChannelMapIn = defaultStereoChannelMap;\n    }\n\n    result = ma_spatializer_init_preallocated(&spatializerConfig, ma_offset_ptr(pHeap, heapLayout.spatializerOffset), &pEngineNode->spatializer);\n    if (result != MA_SUCCESS) {\n        goto error2;\n    }\n\n\n    /*\n    After spatialization comes panning. We need to do this after spatialization because otherwise we wouldn't\n    be able to pan mono sounds.\n    */\n    pannerConfig = ma_panner_config_init(ma_format_f32, baseNodeConfig.pOutputChannels[0]);\n\n    result = ma_panner_init(&pannerConfig, &pEngineNode->panner);\n    if (result != MA_SUCCESS) {\n        goto error3;\n    }\n\n\n    /* We'll need a gainer for smoothing out volume changes if we have a non-zero smooth time. We apply this before converting to the output channel count. */\n    if (pConfig->volumeSmoothTimeInPCMFrames > 0) {\n        gainerConfig = ma_gainer_config_init(channelsIn, pConfig->volumeSmoothTimeInPCMFrames);\n\n        result = ma_gainer_init_preallocated(&gainerConfig, ma_offset_ptr(pHeap, heapLayout.gainerOffset), &pEngineNode->volumeGainer);\n        if (result != MA_SUCCESS) {\n            goto error3;\n        }\n    }\n\n\n    return MA_SUCCESS;\n\n    /* No need for allocation callbacks here because we use a preallocated heap. */\nerror3: ma_spatializer_uninit(&pEngineNode->spatializer, NULL);\nerror2: ma_linear_resampler_uninit(&pEngineNode->resampler, NULL);\nerror1: ma_node_uninit(&pEngineNode->baseNode, NULL);\nerror0: return result;\n}\n\nMA_API ma_result ma_engine_node_init(const ma_engine_node_config* pConfig, const ma_allocation_callbacks* pAllocationCallbacks, ma_engine_node* pEngineNode)\n{\n    ma_result result;\n    size_t heapSizeInBytes;\n    void* pHeap;\n\n    result = ma_engine_node_get_heap_size(pConfig, &heapSizeInBytes);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (heapSizeInBytes > 0) {\n        pHeap = ma_malloc(heapSizeInBytes, pAllocationCallbacks);\n        if (pHeap == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n    } else {\n        pHeap = NULL;\n    }\n\n    result = ma_engine_node_init_preallocated(pConfig, pHeap, pEngineNode);\n    if (result != MA_SUCCESS) {\n        ma_free(pHeap, pAllocationCallbacks);\n        return result;\n    }\n\n    pEngineNode->_ownsHeap = MA_TRUE;\n    return MA_SUCCESS;\n}\n\nMA_API void ma_engine_node_uninit(ma_engine_node* pEngineNode, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    /*\n    The base node always needs to be uninitialized first to ensure it's detached from the graph completely before we\n    destroy anything that might be in the middle of being used by the processing function.\n    */\n    ma_node_uninit(&pEngineNode->baseNode, pAllocationCallbacks);\n\n    /* Now that the node has been uninitialized we can safely uninitialize the rest. */\n    if (pEngineNode->volumeSmoothTimeInPCMFrames > 0) {\n        ma_gainer_uninit(&pEngineNode->volumeGainer, pAllocationCallbacks);\n    }\n\n    ma_spatializer_uninit(&pEngineNode->spatializer, pAllocationCallbacks);\n    ma_linear_resampler_uninit(&pEngineNode->resampler, pAllocationCallbacks);\n\n    /* Free the heap last. */\n    if (pEngineNode->_ownsHeap) {\n        ma_free(pEngineNode->_pHeap, pAllocationCallbacks);\n    }\n}\n\n\nMA_API ma_sound_config ma_sound_config_init(void)\n{\n    return ma_sound_config_init_2(NULL);\n}\n\nMA_API ma_sound_config ma_sound_config_init_2(ma_engine* pEngine)\n{\n    ma_sound_config config;\n\n    MA_ZERO_OBJECT(&config);\n\n    if (pEngine != NULL) {\n        config.monoExpansionMode = pEngine->monoExpansionMode;\n    } else {\n        config.monoExpansionMode = ma_mono_expansion_mode_default;\n    }\n\n    config.rangeEndInPCMFrames     = ~((ma_uint64)0);\n    config.loopPointEndInPCMFrames = ~((ma_uint64)0);\n\n    return config;\n}\n\nMA_API ma_sound_group_config ma_sound_group_config_init(void)\n{\n    return ma_sound_group_config_init_2(NULL);\n}\n\nMA_API ma_sound_group_config ma_sound_group_config_init_2(ma_engine* pEngine)\n{\n    ma_sound_group_config config;\n\n    MA_ZERO_OBJECT(&config);\n\n    if (pEngine != NULL) {\n        config.monoExpansionMode = pEngine->monoExpansionMode;\n    } else {\n        config.monoExpansionMode = ma_mono_expansion_mode_default;\n    }\n\n    return config;\n}\n\n\nMA_API ma_engine_config ma_engine_config_init(void)\n{\n    ma_engine_config config;\n\n    MA_ZERO_OBJECT(&config);\n    config.listenerCount     = 1;   /* Always want at least one listener. */\n    config.monoExpansionMode = ma_mono_expansion_mode_default;\n\n    return config;\n}\n\n\n#if !defined(MA_NO_DEVICE_IO)\nstatic void ma_engine_data_callback_internal(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount)\n{\n    ma_engine* pEngine = (ma_engine*)pDevice->pUserData;\n\n    (void)pFramesIn;\n\n    /*\n    Experiment: Try processing a resource manager job if we're on the Emscripten build.\n\n    This serves two purposes:\n\n        1) It ensures jobs are actually processed at some point since we cannot guarantee that the\n           caller is doing the right thing and calling ma_resource_manager_process_next_job(); and\n\n        2) It's an attempt at working around an issue where processing jobs on the Emscripten main\n           loop doesn't work as well as it should. When trying to load sounds without the `DECODE`\n           flag or with the `ASYNC` flag, the sound data is just not able to be loaded in time\n           before the callback is processed. I think it's got something to do with the single-\n           threaded nature of Web, but I'm not entirely sure.\n    */\n    #if !defined(MA_NO_RESOURCE_MANAGER) && defined(MA_EMSCRIPTEN)\n    {\n        if (pEngine->pResourceManager != NULL) {\n            if ((pEngine->pResourceManager->config.flags & MA_RESOURCE_MANAGER_FLAG_NO_THREADING) != 0) {\n                ma_resource_manager_process_next_job(pEngine->pResourceManager);\n            }\n        }\n    }\n    #endif\n\n    ma_engine_read_pcm_frames(pEngine, pFramesOut, frameCount, NULL);\n}\n#endif\n\nMA_API ma_result ma_engine_init(const ma_engine_config* pConfig, ma_engine* pEngine)\n{\n    ma_result result;\n    ma_node_graph_config nodeGraphConfig;\n    ma_engine_config engineConfig;\n    ma_spatializer_listener_config listenerConfig;\n    ma_uint32 iListener;\n\n    if (pEngine == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pEngine);\n\n    /* The config is allowed to be NULL in which case we use defaults for everything. */\n    if (pConfig != NULL) {\n        engineConfig = *pConfig;\n    } else {\n        engineConfig = ma_engine_config_init();\n    }\n\n    pEngine->monoExpansionMode = engineConfig.monoExpansionMode;\n    pEngine->defaultVolumeSmoothTimeInPCMFrames = engineConfig.defaultVolumeSmoothTimeInPCMFrames;\n    pEngine->onProcess = engineConfig.onProcess;\n    pEngine->pProcessUserData = engineConfig.pProcessUserData;\n    ma_allocation_callbacks_init_copy(&pEngine->allocationCallbacks, &engineConfig.allocationCallbacks);\n\n    #if !defined(MA_NO_RESOURCE_MANAGER)\n    {\n        pEngine->pResourceManager = engineConfig.pResourceManager;\n    }\n    #endif\n\n    #if !defined(MA_NO_DEVICE_IO)\n    {\n        pEngine->pDevice = engineConfig.pDevice;\n\n        /* If we don't have a device, we need one. */\n        if (pEngine->pDevice == NULL && engineConfig.noDevice == MA_FALSE) {\n            ma_device_config deviceConfig;\n\n            pEngine->pDevice = (ma_device*)ma_malloc(sizeof(*pEngine->pDevice), &pEngine->allocationCallbacks);\n            if (pEngine->pDevice == NULL) {\n                return MA_OUT_OF_MEMORY;\n            }\n\n            deviceConfig = ma_device_config_init(ma_device_type_playback);\n            deviceConfig.playback.pDeviceID        = engineConfig.pPlaybackDeviceID;\n            deviceConfig.playback.format           = ma_format_f32;\n            deviceConfig.playback.channels         = engineConfig.channels;\n            deviceConfig.sampleRate                = engineConfig.sampleRate;\n            deviceConfig.dataCallback              = (engineConfig.dataCallback != NULL) ? engineConfig.dataCallback : ma_engine_data_callback_internal;\n            deviceConfig.pUserData                 = pEngine;\n            deviceConfig.notificationCallback      = engineConfig.notificationCallback;\n            deviceConfig.periodSizeInFrames        = engineConfig.periodSizeInFrames;\n            deviceConfig.periodSizeInMilliseconds  = engineConfig.periodSizeInMilliseconds;\n            deviceConfig.noPreSilencedOutputBuffer = MA_TRUE;    /* We'll always be outputting to every frame in the callback so there's no need for a pre-silenced buffer. */\n            deviceConfig.noClip                    = MA_TRUE;    /* The engine will do clipping itself. */\n\n            if (engineConfig.pContext == NULL) {\n                ma_context_config contextConfig = ma_context_config_init();\n                contextConfig.allocationCallbacks = pEngine->allocationCallbacks;\n                contextConfig.pLog = engineConfig.pLog;\n\n                /* If the engine config does not specify a log, use the resource manager's if we have one. */\n                #ifndef MA_NO_RESOURCE_MANAGER\n                {\n                    if (contextConfig.pLog == NULL && engineConfig.pResourceManager != NULL) {\n                        contextConfig.pLog = ma_resource_manager_get_log(engineConfig.pResourceManager);\n                    }\n                }\n                #endif\n\n                result = ma_device_init_ex(NULL, 0, &contextConfig, &deviceConfig, pEngine->pDevice);\n            } else {\n                result = ma_device_init(engineConfig.pContext, &deviceConfig, pEngine->pDevice);\n            }\n\n            if (result != MA_SUCCESS) {\n                ma_free(pEngine->pDevice, &pEngine->allocationCallbacks);\n                pEngine->pDevice = NULL;\n                return result;\n            }\n\n            pEngine->ownsDevice = MA_TRUE;\n        }\n\n        /* Update the channel count and sample rate of the engine config so we can reference it below. */\n        if (pEngine->pDevice != NULL) {\n            engineConfig.channels   = pEngine->pDevice->playback.channels;\n            engineConfig.sampleRate = pEngine->pDevice->sampleRate;\n        }\n    }\n    #endif\n\n    if (engineConfig.channels == 0 || engineConfig.sampleRate == 0) {\n        return MA_INVALID_ARGS;\n    }\n\n    pEngine->sampleRate = engineConfig.sampleRate;\n\n    /* The engine always uses either the log that was passed into the config, or the context's log is available. */\n    if (engineConfig.pLog != NULL) {\n        pEngine->pLog = engineConfig.pLog;\n    } else {\n        #if !defined(MA_NO_DEVICE_IO)\n        {\n            pEngine->pLog = ma_device_get_log(pEngine->pDevice);\n        }\n        #else\n        {\n            pEngine->pLog = NULL;\n        }\n        #endif\n    }\n\n\n    /* The engine is a node graph. This needs to be initialized after we have the device so we can can determine the channel count. */\n    nodeGraphConfig = ma_node_graph_config_init(engineConfig.channels);\n    nodeGraphConfig.nodeCacheCapInFrames = (engineConfig.periodSizeInFrames > 0xFFFF) ? 0xFFFF : (ma_uint16)engineConfig.periodSizeInFrames;\n\n    result = ma_node_graph_init(&nodeGraphConfig, &pEngine->allocationCallbacks, &pEngine->nodeGraph);\n    if (result != MA_SUCCESS) {\n        goto on_error_1;\n    }\n\n\n    /* We need at least one listener. */\n    if (engineConfig.listenerCount == 0) {\n        engineConfig.listenerCount = 1;\n    }\n\n    if (engineConfig.listenerCount > MA_ENGINE_MAX_LISTENERS) {\n        result = MA_INVALID_ARGS;   /* Too many listeners. */\n        goto on_error_1;\n    }\n\n    for (iListener = 0; iListener < engineConfig.listenerCount; iListener += 1) {\n        listenerConfig = ma_spatializer_listener_config_init(ma_node_graph_get_channels(&pEngine->nodeGraph));\n\n        /*\n        If we're using a device, use the device's channel map for the listener. Otherwise just use\n        miniaudio's default channel map.\n        */\n        #if !defined(MA_NO_DEVICE_IO)\n        {\n            if (pEngine->pDevice != NULL) {\n                /*\n                Temporarily disabled. There is a subtle bug here where front-left and front-right\n                will be used by the device's channel map, but this is not what we want to use for\n                spatialization. Instead we want to use side-left and side-right. I need to figure\n                out a better solution for this. For now, disabling the use of device channel maps.\n                */\n                /*listenerConfig.pChannelMapOut = pEngine->pDevice->playback.channelMap;*/\n            }\n        }\n        #endif\n\n        result = ma_spatializer_listener_init(&listenerConfig, &pEngine->allocationCallbacks, &pEngine->listeners[iListener]);  /* TODO: Change this to a pre-allocated heap. */\n        if (result != MA_SUCCESS) {\n            goto on_error_2;\n        }\n\n        pEngine->listenerCount += 1;\n    }\n\n\n    /* Gain smoothing for spatialized sounds. */\n    pEngine->gainSmoothTimeInFrames = engineConfig.gainSmoothTimeInFrames;\n    if (pEngine->gainSmoothTimeInFrames == 0) {\n        ma_uint32 gainSmoothTimeInMilliseconds = engineConfig.gainSmoothTimeInMilliseconds;\n        if (gainSmoothTimeInMilliseconds == 0) {\n            gainSmoothTimeInMilliseconds = 8;\n        }\n\n        pEngine->gainSmoothTimeInFrames = (gainSmoothTimeInMilliseconds * ma_engine_get_sample_rate(pEngine)) / 1000;  /* 8ms by default. */\n    }\n\n\n    /* We need a resource manager. */\n    #ifndef MA_NO_RESOURCE_MANAGER\n    {\n        if (pEngine->pResourceManager == NULL) {\n            ma_resource_manager_config resourceManagerConfig;\n\n            pEngine->pResourceManager = (ma_resource_manager*)ma_malloc(sizeof(*pEngine->pResourceManager), &pEngine->allocationCallbacks);\n            if (pEngine->pResourceManager == NULL) {\n                result = MA_OUT_OF_MEMORY;\n                goto on_error_2;\n            }\n\n            resourceManagerConfig = ma_resource_manager_config_init();\n            resourceManagerConfig.pLog              = pEngine->pLog;    /* Always use the engine's log for internally-managed resource managers. */\n            resourceManagerConfig.decodedFormat     = ma_format_f32;\n            resourceManagerConfig.decodedChannels   = 0;  /* Leave the decoded channel count as 0 so we can get good spatialization. */\n            resourceManagerConfig.decodedSampleRate = ma_engine_get_sample_rate(pEngine);\n            ma_allocation_callbacks_init_copy(&resourceManagerConfig.allocationCallbacks, &pEngine->allocationCallbacks);\n            resourceManagerConfig.pVFS              = engineConfig.pResourceManagerVFS;\n\n            /* The Emscripten build cannot use threads. */\n            #if defined(MA_EMSCRIPTEN)\n            {\n                resourceManagerConfig.jobThreadCount = 0;\n                resourceManagerConfig.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING;\n            }\n            #endif\n\n            result = ma_resource_manager_init(&resourceManagerConfig, pEngine->pResourceManager);\n            if (result != MA_SUCCESS) {\n                goto on_error_3;\n            }\n\n            pEngine->ownsResourceManager = MA_TRUE;\n        }\n    }\n    #endif\n\n    /* Setup some stuff for inlined sounds. That is sounds played with ma_engine_play_sound(). */\n    pEngine->inlinedSoundLock  = 0;\n    pEngine->pInlinedSoundHead = NULL;\n\n    /* Start the engine if required. This should always be the last step. */\n    #if !defined(MA_NO_DEVICE_IO)\n    {\n        if (engineConfig.noAutoStart == MA_FALSE && pEngine->pDevice != NULL) {\n            result = ma_engine_start(pEngine);\n            if (result != MA_SUCCESS) {\n                goto on_error_4;    /* Failed to start the engine. */\n            }\n        }\n    }\n    #endif\n\n    return MA_SUCCESS;\n\n#if !defined(MA_NO_DEVICE_IO)\non_error_4:\n#endif\n#if !defined(MA_NO_RESOURCE_MANAGER)\non_error_3:\n    if (pEngine->ownsResourceManager) {\n        ma_free(pEngine->pResourceManager, &pEngine->allocationCallbacks);\n    }\n#endif  /* MA_NO_RESOURCE_MANAGER */\non_error_2:\n    for (iListener = 0; iListener < pEngine->listenerCount; iListener += 1) {\n        ma_spatializer_listener_uninit(&pEngine->listeners[iListener], &pEngine->allocationCallbacks);\n    }\n\n    ma_node_graph_uninit(&pEngine->nodeGraph, &pEngine->allocationCallbacks);\non_error_1:\n    #if !defined(MA_NO_DEVICE_IO)\n    {\n        if (pEngine->ownsDevice) {\n            ma_device_uninit(pEngine->pDevice);\n            ma_free(pEngine->pDevice, &pEngine->allocationCallbacks);\n        }\n    }\n    #endif\n\n    return result;\n}\n\nMA_API void ma_engine_uninit(ma_engine* pEngine)\n{\n    ma_uint32 iListener;\n\n    if (pEngine == NULL) {\n        return;\n    }\n\n    /* The device must be uninitialized before the node graph to ensure the audio thread doesn't try accessing it. */\n    #if !defined(MA_NO_DEVICE_IO)\n    {\n        if (pEngine->ownsDevice) {\n            ma_device_uninit(pEngine->pDevice);\n            ma_free(pEngine->pDevice, &pEngine->allocationCallbacks);\n        } else {\n            if (pEngine->pDevice != NULL) {\n                ma_device_stop(pEngine->pDevice);\n            }\n        }\n    }\n    #endif\n\n    /*\n    All inlined sounds need to be deleted. I'm going to use a lock here just to future proof in case\n    I want to do some kind of garbage collection later on.\n    */\n    ma_spinlock_lock(&pEngine->inlinedSoundLock);\n    {\n        for (;;) {\n            ma_sound_inlined* pSoundToDelete = pEngine->pInlinedSoundHead;\n            if (pSoundToDelete == NULL) {\n                break;  /* Done. */\n            }\n\n            pEngine->pInlinedSoundHead = pSoundToDelete->pNext;\n\n            ma_sound_uninit(&pSoundToDelete->sound);\n            ma_free(pSoundToDelete, &pEngine->allocationCallbacks);\n        }\n    }\n    ma_spinlock_unlock(&pEngine->inlinedSoundLock);\n\n    for (iListener = 0; iListener < pEngine->listenerCount; iListener += 1) {\n        ma_spatializer_listener_uninit(&pEngine->listeners[iListener], &pEngine->allocationCallbacks);\n    }\n\n    /* Make sure the node graph is uninitialized after the audio thread has been shutdown to prevent accessing of the node graph after being uninitialized. */\n    ma_node_graph_uninit(&pEngine->nodeGraph, &pEngine->allocationCallbacks);\n\n    /* Uninitialize the resource manager last to ensure we don't have a thread still trying to access it. */\n#ifndef MA_NO_RESOURCE_MANAGER\n    if (pEngine->ownsResourceManager) {\n        ma_resource_manager_uninit(pEngine->pResourceManager);\n        ma_free(pEngine->pResourceManager, &pEngine->allocationCallbacks);\n    }\n#endif\n}\n\nMA_API ma_result ma_engine_read_pcm_frames(ma_engine* pEngine, void* pFramesOut, ma_uint64 frameCount, ma_uint64* pFramesRead)\n{\n    ma_result result;\n    ma_uint64 framesRead = 0;\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = 0;\n    }\n\n    result = ma_node_graph_read_pcm_frames(&pEngine->nodeGraph, pFramesOut, frameCount, &framesRead);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pFramesRead != NULL) {\n        *pFramesRead = framesRead;\n    }\n\n    if (pEngine->onProcess) {\n        pEngine->onProcess(pEngine->pProcessUserData, (float*)pFramesOut, framesRead);  /* Safe cast to float* because the engine always works on floating point samples. */\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_node_graph* ma_engine_get_node_graph(ma_engine* pEngine)\n{\n    if (pEngine == NULL) {\n        return NULL;\n    }\n\n    return &pEngine->nodeGraph;\n}\n\n#if !defined(MA_NO_RESOURCE_MANAGER)\nMA_API ma_resource_manager* ma_engine_get_resource_manager(ma_engine* pEngine)\n{\n    if (pEngine == NULL) {\n        return NULL;\n    }\n\n    #if !defined(MA_NO_RESOURCE_MANAGER)\n    {\n        return pEngine->pResourceManager;\n    }\n    #else\n    {\n        return NULL;\n    }\n    #endif\n}\n#endif\n\nMA_API ma_device* ma_engine_get_device(ma_engine* pEngine)\n{\n    if (pEngine == NULL) {\n        return NULL;\n    }\n\n    #if !defined(MA_NO_DEVICE_IO)\n    {\n        return pEngine->pDevice;\n    }\n    #else\n    {\n        return NULL;\n    }\n    #endif\n}\n\nMA_API ma_log* ma_engine_get_log(ma_engine* pEngine)\n{\n    if (pEngine == NULL) {\n        return NULL;\n    }\n\n    if (pEngine->pLog != NULL) {\n        return pEngine->pLog;\n    } else {\n        #if !defined(MA_NO_DEVICE_IO)\n        {\n            return ma_device_get_log(ma_engine_get_device(pEngine));\n        }\n        #else\n        {\n            return NULL;\n        }\n        #endif\n    }\n}\n\nMA_API ma_node* ma_engine_get_endpoint(ma_engine* pEngine)\n{\n    return ma_node_graph_get_endpoint(&pEngine->nodeGraph);\n}\n\nMA_API ma_uint64 ma_engine_get_time_in_pcm_frames(const ma_engine* pEngine)\n{\n    return ma_node_graph_get_time(&pEngine->nodeGraph);\n}\n\nMA_API ma_uint64 ma_engine_get_time_in_milliseconds(const ma_engine* pEngine)\n{\n    return ma_engine_get_time_in_pcm_frames(pEngine) * 1000 / ma_engine_get_sample_rate(pEngine);\n}\n\nMA_API ma_result ma_engine_set_time_in_pcm_frames(ma_engine* pEngine, ma_uint64 globalTime)\n{\n    return ma_node_graph_set_time(&pEngine->nodeGraph, globalTime);\n}\n\nMA_API ma_result ma_engine_set_time_in_milliseconds(ma_engine* pEngine, ma_uint64 globalTime)\n{\n    return ma_engine_set_time_in_pcm_frames(pEngine, globalTime * ma_engine_get_sample_rate(pEngine) / 1000);\n}\n\nMA_API ma_uint64 ma_engine_get_time(const ma_engine* pEngine)\n{\n    return ma_engine_get_time_in_pcm_frames(pEngine);\n}\n\nMA_API ma_result ma_engine_set_time(ma_engine* pEngine, ma_uint64 globalTime)\n{\n    return ma_engine_set_time_in_pcm_frames(pEngine, globalTime);\n}\n\nMA_API ma_uint32 ma_engine_get_channels(const ma_engine* pEngine)\n{\n    return ma_node_graph_get_channels(&pEngine->nodeGraph);\n}\n\nMA_API ma_uint32 ma_engine_get_sample_rate(const ma_engine* pEngine)\n{\n    if (pEngine == NULL) {\n        return 0;\n    }\n\n    return pEngine->sampleRate;\n}\n\n\nMA_API ma_result ma_engine_start(ma_engine* pEngine)\n{\n    ma_result result;\n\n    if (pEngine == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_DEVICE_IO)\n    {\n        if (pEngine->pDevice != NULL) {\n            result = ma_device_start(pEngine->pDevice);\n        } else {\n            result = MA_INVALID_OPERATION;  /* The engine is running without a device which means there's no real notion of \"starting\" the engine. */\n        }\n    }\n    #else\n    {\n        result = MA_INVALID_OPERATION;  /* Device IO is disabled, so there's no real notion of \"starting\" the engine. */\n    }\n    #endif\n\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_engine_stop(ma_engine* pEngine)\n{\n    ma_result result;\n\n    if (pEngine == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    #if !defined(MA_NO_DEVICE_IO)\n    {\n        if (pEngine->pDevice != NULL) {\n            result = ma_device_stop(pEngine->pDevice);\n        } else {\n            result = MA_INVALID_OPERATION;  /* The engine is running without a device which means there's no real notion of \"stopping\" the engine. */\n        }\n    }\n    #else\n    {\n        result = MA_INVALID_OPERATION;  /* Device IO is disabled, so there's no real notion of \"stopping\" the engine. */\n    }\n    #endif\n\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_engine_set_volume(ma_engine* pEngine, float volume)\n{\n    if (pEngine == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_node_set_output_bus_volume(ma_node_graph_get_endpoint(&pEngine->nodeGraph), 0, volume);\n}\n\nMA_API float ma_engine_get_volume(ma_engine* pEngine)\n{\n    if (pEngine == NULL) {\n        return 0;\n    }\n\n    return ma_node_get_output_bus_volume(ma_node_graph_get_endpoint(&pEngine->nodeGraph), 0);\n}\n\nMA_API ma_result ma_engine_set_gain_db(ma_engine* pEngine, float gainDB)\n{\n    return ma_engine_set_volume(pEngine, ma_volume_db_to_linear(gainDB));\n}\n\nMA_API float ma_engine_get_gain_db(ma_engine* pEngine)\n{\n    return ma_volume_linear_to_db(ma_engine_get_volume(pEngine));\n}\n\n\nMA_API ma_uint32 ma_engine_get_listener_count(const ma_engine* pEngine)\n{\n    if (pEngine == NULL) {\n        return 0;\n    }\n\n    return pEngine->listenerCount;\n}\n\nMA_API ma_uint32 ma_engine_find_closest_listener(const ma_engine* pEngine, float absolutePosX, float absolutePosY, float absolutePosZ)\n{\n    ma_uint32 iListener;\n    ma_uint32 iListenerClosest;\n    float closestLen2 = MA_FLT_MAX;\n\n    if (pEngine == NULL || pEngine->listenerCount == 1) {\n        return 0;\n    }\n\n    iListenerClosest = 0;\n    for (iListener = 0; iListener < pEngine->listenerCount; iListener += 1) {\n        if (ma_engine_listener_is_enabled(pEngine, iListener)) {\n            float len2 = ma_vec3f_len2(ma_vec3f_sub(ma_spatializer_listener_get_position(&pEngine->listeners[iListener]), ma_vec3f_init_3f(absolutePosX, absolutePosY, absolutePosZ)));\n            if (closestLen2 > len2) {\n                closestLen2 = len2;\n                iListenerClosest = iListener;\n            }\n        }\n    }\n\n    MA_ASSERT(iListenerClosest < 255);\n    return iListenerClosest;\n}\n\nMA_API void ma_engine_listener_set_position(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z)\n{\n    if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) {\n        return;\n    }\n\n    ma_spatializer_listener_set_position(&pEngine->listeners[listenerIndex], x, y, z);\n}\n\nMA_API ma_vec3f ma_engine_listener_get_position(const ma_engine* pEngine, ma_uint32 listenerIndex)\n{\n    if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) {\n        return ma_vec3f_init_3f(0, 0, 0);\n    }\n\n    return ma_spatializer_listener_get_position(&pEngine->listeners[listenerIndex]);\n}\n\nMA_API void ma_engine_listener_set_direction(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z)\n{\n    if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) {\n        return;\n    }\n\n    ma_spatializer_listener_set_direction(&pEngine->listeners[listenerIndex], x, y, z);\n}\n\nMA_API ma_vec3f ma_engine_listener_get_direction(const ma_engine* pEngine, ma_uint32 listenerIndex)\n{\n    if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) {\n        return ma_vec3f_init_3f(0, 0, -1);\n    }\n\n    return ma_spatializer_listener_get_direction(&pEngine->listeners[listenerIndex]);\n}\n\nMA_API void ma_engine_listener_set_velocity(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z)\n{\n    if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) {\n        return;\n    }\n\n    ma_spatializer_listener_set_velocity(&pEngine->listeners[listenerIndex], x, y, z);\n}\n\nMA_API ma_vec3f ma_engine_listener_get_velocity(const ma_engine* pEngine, ma_uint32 listenerIndex)\n{\n    if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) {\n        return ma_vec3f_init_3f(0, 0, 0);\n    }\n\n    return ma_spatializer_listener_get_velocity(&pEngine->listeners[listenerIndex]);\n}\n\nMA_API void ma_engine_listener_set_cone(ma_engine* pEngine, ma_uint32 listenerIndex, float innerAngleInRadians, float outerAngleInRadians, float outerGain)\n{\n    if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) {\n        return;\n    }\n\n    ma_spatializer_listener_set_cone(&pEngine->listeners[listenerIndex], innerAngleInRadians, outerAngleInRadians, outerGain);\n}\n\nMA_API void ma_engine_listener_get_cone(const ma_engine* pEngine, ma_uint32 listenerIndex, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain)\n{\n    if (pInnerAngleInRadians != NULL) {\n        *pInnerAngleInRadians = 0;\n    }\n\n    if (pOuterAngleInRadians != NULL) {\n        *pOuterAngleInRadians = 0;\n    }\n\n    if (pOuterGain != NULL) {\n        *pOuterGain = 0;\n    }\n\n    if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) {\n        return;\n    }\n\n    ma_spatializer_listener_get_cone(&pEngine->listeners[listenerIndex], pInnerAngleInRadians, pOuterAngleInRadians, pOuterGain);\n}\n\nMA_API void ma_engine_listener_set_world_up(ma_engine* pEngine, ma_uint32 listenerIndex, float x, float y, float z)\n{\n    if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) {\n        return;\n    }\n\n    ma_spatializer_listener_set_world_up(&pEngine->listeners[listenerIndex], x, y, z);\n}\n\nMA_API ma_vec3f ma_engine_listener_get_world_up(const ma_engine* pEngine, ma_uint32 listenerIndex)\n{\n    if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) {\n        return ma_vec3f_init_3f(0, 1, 0);\n    }\n\n    return ma_spatializer_listener_get_world_up(&pEngine->listeners[listenerIndex]);\n}\n\nMA_API void ma_engine_listener_set_enabled(ma_engine* pEngine, ma_uint32 listenerIndex, ma_bool32 isEnabled)\n{\n    if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) {\n        return;\n    }\n\n    ma_spatializer_listener_set_enabled(&pEngine->listeners[listenerIndex], isEnabled);\n}\n\nMA_API ma_bool32 ma_engine_listener_is_enabled(const ma_engine* pEngine, ma_uint32 listenerIndex)\n{\n    if (pEngine == NULL || listenerIndex >= pEngine->listenerCount) {\n        return MA_FALSE;\n    }\n\n    return ma_spatializer_listener_is_enabled(&pEngine->listeners[listenerIndex]);\n}\n\n\n#ifndef MA_NO_RESOURCE_MANAGER\nMA_API ma_result ma_engine_play_sound_ex(ma_engine* pEngine, const char* pFilePath, ma_node* pNode, ma_uint32 nodeInputBusIndex)\n{\n    ma_result result = MA_SUCCESS;\n    ma_sound_inlined* pSound = NULL;\n    ma_sound_inlined* pNextSound = NULL;\n\n    if (pEngine == NULL || pFilePath == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Attach to the endpoint node if nothing is specicied. */\n    if (pNode == NULL) {\n        pNode = ma_node_graph_get_endpoint(&pEngine->nodeGraph);\n        nodeInputBusIndex = 0;\n    }\n\n    /*\n    We want to check if we can recycle an already-allocated inlined sound. Since this is just a\n    helper I'm not *too* concerned about performance here and I'm happy to use a lock to keep\n    the implementation simple. Maybe this can be optimized later if there's enough demand, but\n    if this function is being used it probably means the caller doesn't really care too much.\n\n    What we do is check the atEnd flag. When this is true, we can recycle the sound. Otherwise\n    we just keep iterating. If we reach the end without finding a sound to recycle we just\n    allocate a new one. This doesn't scale well for a massive number of sounds being played\n    simultaneously as we don't ever actually free the sound objects. Some kind of garbage\n    collection routine might be valuable for this which I'll think about.\n    */\n    ma_spinlock_lock(&pEngine->inlinedSoundLock);\n    {\n        ma_uint32 soundFlags = 0;\n\n        for (pNextSound = pEngine->pInlinedSoundHead; pNextSound != NULL; pNextSound = pNextSound->pNext) {\n            if (ma_sound_at_end(&pNextSound->sound)) {\n                /*\n                The sound is at the end which means it's available for recycling. All we need to do\n                is uninitialize it and reinitialize it. All we're doing is recycling memory.\n                */\n                pSound = pNextSound;\n                ma_atomic_fetch_sub_32(&pEngine->inlinedSoundCount, 1);\n                break;\n            }\n        }\n\n        if (pSound != NULL) {\n            /*\n            We actually want to detach the sound from the list here. The reason is because we want the sound\n            to be in a consistent state at the non-recycled case to simplify the logic below.\n            */\n            if (pEngine->pInlinedSoundHead == pSound) {\n                pEngine->pInlinedSoundHead =  pSound->pNext;\n            }\n\n            if (pSound->pPrev != NULL) {\n                pSound->pPrev->pNext = pSound->pNext;\n            }\n            if (pSound->pNext != NULL) {\n                pSound->pNext->pPrev = pSound->pPrev;\n            }\n\n            /* Now the previous sound needs to be uninitialized. */\n            ma_sound_uninit(&pNextSound->sound);\n        } else {\n            /* No sound available for recycling. Allocate one now. */\n            pSound = (ma_sound_inlined*)ma_malloc(sizeof(*pSound), &pEngine->allocationCallbacks);\n        }\n\n        if (pSound != NULL) {   /* Safety check for the allocation above. */\n            /*\n            At this point we should have memory allocated for the inlined sound. We just need\n            to initialize it like a normal sound now.\n            */\n            soundFlags |= MA_SOUND_FLAG_ASYNC;                 /* For inlined sounds we don't want to be sitting around waiting for stuff to load so force an async load. */\n            soundFlags |= MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT; /* We want specific control over where the sound is attached in the graph. We'll attach it manually just before playing the sound. */\n            soundFlags |= MA_SOUND_FLAG_NO_PITCH;              /* Pitching isn't usable with inlined sounds, so disable it to save on speed. */\n            soundFlags |= MA_SOUND_FLAG_NO_SPATIALIZATION;     /* Not currently doing spatialization with inlined sounds, but this might actually change later. For now disable spatialization. Will be removed if we ever add support for spatialization here. */\n\n            result = ma_sound_init_from_file(pEngine, pFilePath, soundFlags, NULL, NULL, &pSound->sound);\n            if (result == MA_SUCCESS) {\n                /* Now attach the sound to the graph. */\n                result = ma_node_attach_output_bus(pSound, 0, pNode, nodeInputBusIndex);\n                if (result == MA_SUCCESS) {\n                    /* At this point the sound should be loaded and we can go ahead and add it to the list. The new item becomes the new head. */\n                    pSound->pNext = pEngine->pInlinedSoundHead;\n                    pSound->pPrev = NULL;\n\n                    pEngine->pInlinedSoundHead = pSound;    /* <-- This is what attaches the sound to the list. */\n                    if (pSound->pNext != NULL) {\n                        pSound->pNext->pPrev = pSound;\n                    }\n                } else {\n                    ma_free(pSound, &pEngine->allocationCallbacks);\n                }\n            } else {\n                ma_free(pSound, &pEngine->allocationCallbacks);\n            }\n        } else {\n            result = MA_OUT_OF_MEMORY;\n        }\n    }\n    ma_spinlock_unlock(&pEngine->inlinedSoundLock);\n\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* Finally we can start playing the sound. */\n    result = ma_sound_start(&pSound->sound);\n    if (result != MA_SUCCESS) {\n        /* Failed to start the sound. We need to mark it for recycling and return an error. */\n        ma_atomic_exchange_32(&pSound->sound.atEnd, MA_TRUE);\n        return result;\n    }\n\n    ma_atomic_fetch_add_32(&pEngine->inlinedSoundCount, 1);\n    return result;\n}\n\nMA_API ma_result ma_engine_play_sound(ma_engine* pEngine, const char* pFilePath, ma_sound_group* pGroup)\n{\n    return ma_engine_play_sound_ex(pEngine, pFilePath, pGroup, 0);\n}\n#endif\n\n\nstatic ma_result ma_sound_preinit(ma_engine* pEngine, ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pSound);\n    pSound->seekTarget = MA_SEEK_TARGET_NONE;\n\n    if (pEngine == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return MA_SUCCESS;\n}\n\nstatic ma_result ma_sound_init_from_data_source_internal(ma_engine* pEngine, const ma_sound_config* pConfig, ma_sound* pSound)\n{\n    ma_result result;\n    ma_engine_node_config engineNodeConfig;\n    ma_engine_node_type type;   /* Will be set to ma_engine_node_type_group if no data source is specified. */\n\n    /* Do not clear pSound to zero here - that's done at a higher level with ma_sound_preinit(). */\n    MA_ASSERT(pEngine != NULL);\n    MA_ASSERT(pSound  != NULL);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pSound->pDataSource = pConfig->pDataSource;\n\n    if (pConfig->pDataSource != NULL) {\n        type = ma_engine_node_type_sound;\n    } else {\n        type = ma_engine_node_type_group;\n    }\n\n    /*\n    Sounds are engine nodes. Before we can initialize this we need to determine the channel count.\n    If we can't do this we need to abort. It's up to the caller to ensure they're using a data\n    source that provides this information upfront.\n    */\n    engineNodeConfig = ma_engine_node_config_init(pEngine, type, pConfig->flags);\n    engineNodeConfig.channelsIn                  = pConfig->channelsIn;\n    engineNodeConfig.channelsOut                 = pConfig->channelsOut;\n    engineNodeConfig.volumeSmoothTimeInPCMFrames = pConfig->volumeSmoothTimeInPCMFrames;\n    engineNodeConfig.monoExpansionMode           = pConfig->monoExpansionMode;\n\n    if (engineNodeConfig.volumeSmoothTimeInPCMFrames == 0) {\n        engineNodeConfig.volumeSmoothTimeInPCMFrames = pEngine->defaultVolumeSmoothTimeInPCMFrames;\n    }\n\n    /* If we're loading from a data source the input channel count needs to be the data source's native channel count. */\n    if (pConfig->pDataSource != NULL) {\n        result = ma_data_source_get_data_format(pConfig->pDataSource, NULL, &engineNodeConfig.channelsIn, &engineNodeConfig.sampleRate, NULL, 0);\n        if (result != MA_SUCCESS) {\n            return result;  /* Failed to retrieve the channel count. */\n        }\n\n        if (engineNodeConfig.channelsIn == 0) {\n            return MA_INVALID_OPERATION;    /* Invalid channel count. */\n        }\n\n        if (engineNodeConfig.channelsOut == MA_SOUND_SOURCE_CHANNEL_COUNT) {\n            engineNodeConfig.channelsOut = engineNodeConfig.channelsIn;\n        }\n    }\n\n\n    /* Getting here means we should have a valid channel count and we can initialize the engine node. */\n    result = ma_engine_node_init(&engineNodeConfig, &pEngine->allocationCallbacks, &pSound->engineNode);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* If no attachment is specified, attach the sound straight to the endpoint. */\n    if (pConfig->pInitialAttachment == NULL) {\n        /* No group. Attach straight to the endpoint by default, unless the caller has requested that it not. */\n        if ((pConfig->flags & MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT) == 0) {\n            result = ma_node_attach_output_bus(pSound, 0, ma_node_graph_get_endpoint(&pEngine->nodeGraph), 0);\n        }\n    } else {\n        /* An attachment is specified. Attach to it by default. The sound has only a single output bus, and the config will specify which input bus to attach to. */\n        result = ma_node_attach_output_bus(pSound, 0, pConfig->pInitialAttachment, pConfig->initialAttachmentInputBusIndex);\n    }\n\n    if (result != MA_SUCCESS) {\n        ma_engine_node_uninit(&pSound->engineNode, &pEngine->allocationCallbacks);\n        return result;\n    }\n\n\n    /* Apply initial range and looping state to the data source if applicable. */\n    if (pConfig->rangeBegInPCMFrames != 0 || pConfig->rangeEndInPCMFrames != ~((ma_uint64)0)) {\n        ma_data_source_set_range_in_pcm_frames(ma_sound_get_data_source(pSound), pConfig->rangeBegInPCMFrames, pConfig->rangeEndInPCMFrames);\n    }\n\n    if (pConfig->loopPointBegInPCMFrames != 0 || pConfig->loopPointEndInPCMFrames != ~((ma_uint64)0)) {\n        ma_data_source_set_range_in_pcm_frames(ma_sound_get_data_source(pSound), pConfig->loopPointBegInPCMFrames, pConfig->loopPointEndInPCMFrames);\n    }\n\n    ma_sound_set_looping(pSound, pConfig->isLooping);\n\n    return MA_SUCCESS;\n}\n\n#ifndef MA_NO_RESOURCE_MANAGER\nMA_API ma_result ma_sound_init_from_file_internal(ma_engine* pEngine, const ma_sound_config* pConfig, ma_sound* pSound)\n{\n    ma_result result = MA_SUCCESS;\n    ma_uint32 flags;\n    ma_sound_config config;\n    ma_resource_manager_pipeline_notifications notifications;\n\n    /*\n    The engine requires knowledge of the channel count of the underlying data source before it can\n    initialize the sound. Therefore, we need to make the resource manager wait until initialization\n    of the underlying data source to be initialized so we can get access to the channel count. To\n    do this, the MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT is forced.\n\n    Because we're initializing the data source before the sound, there's a chance the notification\n    will get triggered before this function returns. This is OK, so long as the caller is aware of\n    it and can avoid accessing the sound from within the notification.\n    */\n    flags = pConfig->flags | MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT;\n\n    pSound->pResourceManagerDataSource = (ma_resource_manager_data_source*)ma_malloc(sizeof(*pSound->pResourceManagerDataSource), &pEngine->allocationCallbacks);\n    if (pSound->pResourceManagerDataSource == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    /* Removed in 0.12. Set pDoneFence on the notifications. */\n    notifications = pConfig->initNotifications;\n    if (pConfig->pDoneFence != NULL && notifications.done.pFence == NULL) {\n        notifications.done.pFence = pConfig->pDoneFence;\n    }\n\n    /*\n    We must wrap everything around the fence if one was specified. This ensures ma_fence_wait() does\n    not return prematurely before the sound has finished initializing.\n    */\n    if (notifications.done.pFence) { ma_fence_acquire(notifications.done.pFence); }\n    {\n        ma_resource_manager_data_source_config resourceManagerDataSourceConfig = ma_resource_manager_data_source_config_init();\n        resourceManagerDataSourceConfig.pFilePath                   = pConfig->pFilePath;\n        resourceManagerDataSourceConfig.pFilePathW                  = pConfig->pFilePathW;\n        resourceManagerDataSourceConfig.flags                       = flags;\n        resourceManagerDataSourceConfig.pNotifications              = &notifications;\n        resourceManagerDataSourceConfig.initialSeekPointInPCMFrames = pConfig->initialSeekPointInPCMFrames;\n        resourceManagerDataSourceConfig.rangeBegInPCMFrames         = pConfig->rangeBegInPCMFrames;\n        resourceManagerDataSourceConfig.rangeEndInPCMFrames         = pConfig->rangeEndInPCMFrames;\n        resourceManagerDataSourceConfig.loopPointBegInPCMFrames     = pConfig->loopPointBegInPCMFrames;\n        resourceManagerDataSourceConfig.loopPointEndInPCMFrames     = pConfig->loopPointEndInPCMFrames;\n        resourceManagerDataSourceConfig.isLooping                   = pConfig->isLooping;\n\n        result = ma_resource_manager_data_source_init_ex(pEngine->pResourceManager, &resourceManagerDataSourceConfig, pSound->pResourceManagerDataSource);\n        if (result != MA_SUCCESS) {\n            goto done;\n        }\n\n        pSound->ownsDataSource = MA_TRUE;   /* <-- Important. Not setting this will result in the resource manager data source never getting uninitialized. */\n\n        /* We need to use a slightly customized version of the config so we'll need to make a copy. */\n        config = *pConfig;\n        config.pFilePath   = NULL;\n        config.pFilePathW  = NULL;\n        config.pDataSource = pSound->pResourceManagerDataSource;\n\n        result = ma_sound_init_from_data_source_internal(pEngine, &config, pSound);\n        if (result != MA_SUCCESS) {\n            ma_resource_manager_data_source_uninit(pSound->pResourceManagerDataSource);\n            ma_free(pSound->pResourceManagerDataSource, &pEngine->allocationCallbacks);\n            MA_ZERO_OBJECT(pSound);\n            goto done;\n        }\n    }\ndone:\n    if (notifications.done.pFence) { ma_fence_release(notifications.done.pFence); }\n    return result;\n}\n\nMA_API ma_result ma_sound_init_from_file(ma_engine* pEngine, const char* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound)\n{\n    ma_sound_config config;\n\n    if (pFilePath == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    config = ma_sound_config_init_2(pEngine);\n    config.pFilePath          = pFilePath;\n    config.flags              = flags;\n    config.pInitialAttachment = pGroup;\n    config.pDoneFence         = pDoneFence;\n\n    return ma_sound_init_ex(pEngine, &config, pSound);\n}\n\nMA_API ma_result ma_sound_init_from_file_w(ma_engine* pEngine, const wchar_t* pFilePath, ma_uint32 flags, ma_sound_group* pGroup, ma_fence* pDoneFence, ma_sound* pSound)\n{\n    ma_sound_config config;\n\n    if (pFilePath == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    config = ma_sound_config_init_2(pEngine);\n    config.pFilePathW         = pFilePath;\n    config.flags              = flags;\n    config.pInitialAttachment = pGroup;\n    config.pDoneFence         = pDoneFence;\n\n    return ma_sound_init_ex(pEngine, &config, pSound);\n}\n\nMA_API ma_result ma_sound_init_copy(ma_engine* pEngine, const ma_sound* pExistingSound, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound)\n{\n    ma_result result;\n    ma_sound_config config;\n\n    result = ma_sound_preinit(pEngine, pSound);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pExistingSound == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Cloning only works for data buffers (not streams) that are loaded from the resource manager. */\n    if (pExistingSound->pResourceManagerDataSource == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /*\n    We need to make a clone of the data source. If the data source is not a data buffer (i.e. a stream)\n    this will fail.\n    */\n    pSound->pResourceManagerDataSource = (ma_resource_manager_data_source*)ma_malloc(sizeof(*pSound->pResourceManagerDataSource), &pEngine->allocationCallbacks);\n    if (pSound->pResourceManagerDataSource == NULL) {\n        return MA_OUT_OF_MEMORY;\n    }\n\n    result = ma_resource_manager_data_source_init_copy(pEngine->pResourceManager, pExistingSound->pResourceManagerDataSource, pSound->pResourceManagerDataSource);\n    if (result != MA_SUCCESS) {\n        ma_free(pSound->pResourceManagerDataSource, &pEngine->allocationCallbacks);\n        return result;\n    }\n\n    config = ma_sound_config_init_2(pEngine);\n    config.pDataSource                 = pSound->pResourceManagerDataSource;\n    config.flags                       = flags;\n    config.pInitialAttachment          = pGroup;\n    config.monoExpansionMode           = pExistingSound->engineNode.monoExpansionMode;\n    config.volumeSmoothTimeInPCMFrames = pExistingSound->engineNode.volumeSmoothTimeInPCMFrames;\n\n    result = ma_sound_init_from_data_source_internal(pEngine, &config, pSound);\n    if (result != MA_SUCCESS) {\n        ma_resource_manager_data_source_uninit(pSound->pResourceManagerDataSource);\n        ma_free(pSound->pResourceManagerDataSource, &pEngine->allocationCallbacks);\n        MA_ZERO_OBJECT(pSound);\n        return result;\n    }\n\n    /* Make sure the sound is marked as the owner of the data source or else it will never get uninitialized. */\n    pSound->ownsDataSource = MA_TRUE;\n\n    return MA_SUCCESS;\n}\n#endif\n\nMA_API ma_result ma_sound_init_from_data_source(ma_engine* pEngine, ma_data_source* pDataSource, ma_uint32 flags, ma_sound_group* pGroup, ma_sound* pSound)\n{\n    ma_sound_config config = ma_sound_config_init_2(pEngine);\n    config.pDataSource        = pDataSource;\n    config.flags              = flags;\n    config.pInitialAttachment = pGroup;\n    return ma_sound_init_ex(pEngine, &config, pSound);\n}\n\nMA_API ma_result ma_sound_init_ex(ma_engine* pEngine, const ma_sound_config* pConfig, ma_sound* pSound)\n{\n    ma_result result;\n\n    result = ma_sound_preinit(pEngine, pSound);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    pSound->endCallback          = pConfig->endCallback;\n    pSound->pEndCallbackUserData = pConfig->pEndCallbackUserData;\n\n    /* We need to load the sound differently depending on whether or not we're loading from a file. */\n#ifndef MA_NO_RESOURCE_MANAGER\n    if (pConfig->pFilePath != NULL || pConfig->pFilePathW != NULL) {\n        return ma_sound_init_from_file_internal(pEngine, pConfig, pSound);\n    } else\n#endif\n    {\n        /*\n        Getting here means we're not loading from a file. We may be loading from an already-initialized\n        data source, or none at all. If we aren't specifying any data source, we'll be initializing the\n        the equivalent to a group. ma_data_source_init_from_data_source_internal() will deal with this\n        for us, so no special treatment required here.\n        */\n        return ma_sound_init_from_data_source_internal(pEngine, pConfig, pSound);\n    }\n}\n\nMA_API void ma_sound_uninit(ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    /*\n    Always uninitialize the node first. This ensures it's detached from the graph and does not return until it has done\n    so which makes thread safety beyond this point trivial.\n    */\n    ma_engine_node_uninit(&pSound->engineNode, &pSound->engineNode.pEngine->allocationCallbacks);\n\n    /* Once the sound is detached from the group we can guarantee that it won't be referenced by the mixer thread which means it's safe for us to destroy the data source. */\n#ifndef MA_NO_RESOURCE_MANAGER\n    if (pSound->ownsDataSource) {\n        ma_resource_manager_data_source_uninit(pSound->pResourceManagerDataSource);\n        ma_free(pSound->pResourceManagerDataSource, &pSound->engineNode.pEngine->allocationCallbacks);\n        pSound->pDataSource = NULL;\n    }\n#else\n    MA_ASSERT(pSound->ownsDataSource == MA_FALSE);\n#endif\n}\n\nMA_API ma_engine* ma_sound_get_engine(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return NULL;\n    }\n\n    return pSound->engineNode.pEngine;\n}\n\nMA_API ma_data_source* ma_sound_get_data_source(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return NULL;\n    }\n\n    return pSound->pDataSource;\n}\n\nMA_API ma_result ma_sound_start(ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* If the sound is already playing, do nothing. */\n    if (ma_sound_is_playing(pSound)) {\n        return MA_SUCCESS;\n    }\n\n    /* If the sound is at the end it means we want to start from the start again. */\n    if (ma_sound_at_end(pSound)) {\n        ma_result result = ma_data_source_seek_to_pcm_frame(pSound->pDataSource, 0);\n        if (result != MA_SUCCESS && result != MA_NOT_IMPLEMENTED) {\n            return result;  /* Failed to seek back to the start. */\n        }\n\n        /* Make sure we clear the end indicator. */\n        ma_atomic_exchange_32(&pSound->atEnd, MA_FALSE);\n    }\n\n    /* Make sure the sound is started. If there's a start delay, the sound won't actually start until the start time is reached. */\n    ma_node_set_state(pSound, ma_node_state_started);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_sound_stop(ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* This will stop the sound immediately. Use ma_sound_set_stop_time() to stop the sound at a specific time. */\n    ma_node_set_state(pSound, ma_node_state_stopped);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_sound_stop_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 fadeLengthInFrames)\n{\n    if (pSound == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Stopping with a fade out requires us to schedule the stop into the future by the fade length. */\n    ma_sound_set_stop_time_with_fade_in_pcm_frames(pSound, ma_engine_get_time_in_pcm_frames(ma_sound_get_engine(pSound)) + fadeLengthInFrames, fadeLengthInFrames);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_sound_stop_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 fadeLengthInMilliseconds)\n{\n    ma_uint64 sampleRate;\n\n    if (pSound == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    sampleRate = ma_engine_get_sample_rate(ma_sound_get_engine(pSound));\n\n    return ma_sound_stop_with_fade_in_pcm_frames(pSound, (fadeLengthInMilliseconds * sampleRate) / 1000);\n}\n\nMA_API void ma_sound_set_volume(ma_sound* pSound, float volume)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_engine_node_set_volume(&pSound->engineNode, volume);\n}\n\nMA_API float ma_sound_get_volume(const ma_sound* pSound)\n{\n    float volume = 0;\n\n    if (pSound == NULL) {\n        return 0;\n    }\n\n    ma_engine_node_get_volume(&pSound->engineNode, &volume);\n\n    return volume;\n}\n\nMA_API void ma_sound_set_pan(ma_sound* pSound, float pan)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_panner_set_pan(&pSound->engineNode.panner, pan);\n}\n\nMA_API float ma_sound_get_pan(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return 0;\n    }\n\n    return ma_panner_get_pan(&pSound->engineNode.panner);\n}\n\nMA_API void ma_sound_set_pan_mode(ma_sound* pSound, ma_pan_mode panMode)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_panner_set_mode(&pSound->engineNode.panner, panMode);\n}\n\nMA_API ma_pan_mode ma_sound_get_pan_mode(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return ma_pan_mode_balance;\n    }\n\n    return ma_panner_get_mode(&pSound->engineNode.panner);\n}\n\nMA_API void ma_sound_set_pitch(ma_sound* pSound, float pitch)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    if (pitch <= 0) {\n        return;\n    }\n\n    ma_atomic_exchange_explicit_f32(&pSound->engineNode.pitch, pitch, ma_atomic_memory_order_release);\n}\n\nMA_API float ma_sound_get_pitch(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return 0;\n    }\n\n    return ma_atomic_load_f32(&pSound->engineNode.pitch);    /* Naughty const-cast for this. */\n}\n\nMA_API void ma_sound_set_spatialization_enabled(ma_sound* pSound, ma_bool32 enabled)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_atomic_exchange_explicit_32(&pSound->engineNode.isSpatializationDisabled, !enabled, ma_atomic_memory_order_release);\n}\n\nMA_API ma_bool32 ma_sound_is_spatialization_enabled(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return MA_FALSE;\n    }\n\n    return ma_engine_node_is_spatialization_enabled(&pSound->engineNode);\n}\n\nMA_API void ma_sound_set_pinned_listener_index(ma_sound* pSound, ma_uint32 listenerIndex)\n{\n    if (pSound == NULL || listenerIndex >= ma_engine_get_listener_count(ma_sound_get_engine(pSound))) {\n        return;\n    }\n\n    ma_atomic_exchange_explicit_32(&pSound->engineNode.pinnedListenerIndex, listenerIndex, ma_atomic_memory_order_release);\n}\n\nMA_API ma_uint32 ma_sound_get_pinned_listener_index(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return MA_LISTENER_INDEX_CLOSEST;\n    }\n\n    return ma_atomic_load_explicit_32(&pSound->engineNode.pinnedListenerIndex, ma_atomic_memory_order_acquire);\n}\n\nMA_API ma_uint32 ma_sound_get_listener_index(const ma_sound* pSound)\n{\n    ma_uint32 listenerIndex;\n\n    if (pSound == NULL) {\n        return 0;\n    }\n\n    listenerIndex = ma_sound_get_pinned_listener_index(pSound);\n    if (listenerIndex == MA_LISTENER_INDEX_CLOSEST) {\n        ma_vec3f position = ma_sound_get_position(pSound);\n        return ma_engine_find_closest_listener(ma_sound_get_engine(pSound), position.x, position.y, position.z);\n    }\n\n    return listenerIndex;\n}\n\nMA_API ma_vec3f ma_sound_get_direction_to_listener(const ma_sound* pSound)\n{\n    ma_vec3f relativePos;\n    ma_engine* pEngine;\n\n    if (pSound == NULL) {\n        return ma_vec3f_init_3f(0, 0, -1);\n    }\n\n    pEngine = ma_sound_get_engine(pSound);\n    if (pEngine == NULL) {\n        return ma_vec3f_init_3f(0, 0, -1);\n    }\n\n    ma_spatializer_get_relative_position_and_direction(&pSound->engineNode.spatializer, &pEngine->listeners[ma_sound_get_listener_index(pSound)], &relativePos, NULL);\n\n    return ma_vec3f_normalize(ma_vec3f_neg(relativePos));\n}\n\nMA_API void ma_sound_set_position(ma_sound* pSound, float x, float y, float z)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_set_position(&pSound->engineNode.spatializer, x, y, z);\n}\n\nMA_API ma_vec3f ma_sound_get_position(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return ma_vec3f_init_3f(0, 0, 0);\n    }\n\n    return ma_spatializer_get_position(&pSound->engineNode.spatializer);\n}\n\nMA_API void ma_sound_set_direction(ma_sound* pSound, float x, float y, float z)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_set_direction(&pSound->engineNode.spatializer, x, y, z);\n}\n\nMA_API ma_vec3f ma_sound_get_direction(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return ma_vec3f_init_3f(0, 0, 0);\n    }\n\n    return ma_spatializer_get_direction(&pSound->engineNode.spatializer);\n}\n\nMA_API void ma_sound_set_velocity(ma_sound* pSound, float x, float y, float z)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_set_velocity(&pSound->engineNode.spatializer, x, y, z);\n}\n\nMA_API ma_vec3f ma_sound_get_velocity(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return ma_vec3f_init_3f(0, 0, 0);\n    }\n\n    return ma_spatializer_get_velocity(&pSound->engineNode.spatializer);\n}\n\nMA_API void ma_sound_set_attenuation_model(ma_sound* pSound, ma_attenuation_model attenuationModel)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_set_attenuation_model(&pSound->engineNode.spatializer, attenuationModel);\n}\n\nMA_API ma_attenuation_model ma_sound_get_attenuation_model(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return ma_attenuation_model_none;\n    }\n\n    return ma_spatializer_get_attenuation_model(&pSound->engineNode.spatializer);\n}\n\nMA_API void ma_sound_set_positioning(ma_sound* pSound, ma_positioning positioning)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_set_positioning(&pSound->engineNode.spatializer, positioning);\n}\n\nMA_API ma_positioning ma_sound_get_positioning(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return ma_positioning_absolute;\n    }\n\n    return ma_spatializer_get_positioning(&pSound->engineNode.spatializer);\n}\n\nMA_API void ma_sound_set_rolloff(ma_sound* pSound, float rolloff)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_set_rolloff(&pSound->engineNode.spatializer, rolloff);\n}\n\nMA_API float ma_sound_get_rolloff(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return 0;\n    }\n\n    return ma_spatializer_get_rolloff(&pSound->engineNode.spatializer);\n}\n\nMA_API void ma_sound_set_min_gain(ma_sound* pSound, float minGain)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_set_min_gain(&pSound->engineNode.spatializer, minGain);\n}\n\nMA_API float ma_sound_get_min_gain(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return 0;\n    }\n\n    return ma_spatializer_get_min_gain(&pSound->engineNode.spatializer);\n}\n\nMA_API void ma_sound_set_max_gain(ma_sound* pSound, float maxGain)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_set_max_gain(&pSound->engineNode.spatializer, maxGain);\n}\n\nMA_API float ma_sound_get_max_gain(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return 0;\n    }\n\n    return ma_spatializer_get_max_gain(&pSound->engineNode.spatializer);\n}\n\nMA_API void ma_sound_set_min_distance(ma_sound* pSound, float minDistance)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_set_min_distance(&pSound->engineNode.spatializer, minDistance);\n}\n\nMA_API float ma_sound_get_min_distance(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return 0;\n    }\n\n    return ma_spatializer_get_min_distance(&pSound->engineNode.spatializer);\n}\n\nMA_API void ma_sound_set_max_distance(ma_sound* pSound, float maxDistance)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_set_max_distance(&pSound->engineNode.spatializer, maxDistance);\n}\n\nMA_API float ma_sound_get_max_distance(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return 0;\n    }\n\n    return ma_spatializer_get_max_distance(&pSound->engineNode.spatializer);\n}\n\nMA_API void ma_sound_set_cone(ma_sound* pSound, float innerAngleInRadians, float outerAngleInRadians, float outerGain)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_set_cone(&pSound->engineNode.spatializer, innerAngleInRadians, outerAngleInRadians, outerGain);\n}\n\nMA_API void ma_sound_get_cone(const ma_sound* pSound, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain)\n{\n    if (pInnerAngleInRadians != NULL) {\n        *pInnerAngleInRadians = 0;\n    }\n\n    if (pOuterAngleInRadians != NULL) {\n        *pOuterAngleInRadians = 0;\n    }\n\n    if (pOuterGain != NULL) {\n        *pOuterGain = 0;\n    }\n\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_get_cone(&pSound->engineNode.spatializer, pInnerAngleInRadians, pOuterAngleInRadians, pOuterGain);\n}\n\nMA_API void ma_sound_set_doppler_factor(ma_sound* pSound, float dopplerFactor)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_set_doppler_factor(&pSound->engineNode.spatializer, dopplerFactor);\n}\n\nMA_API float ma_sound_get_doppler_factor(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return 0;\n    }\n\n    return ma_spatializer_get_doppler_factor(&pSound->engineNode.spatializer);\n}\n\nMA_API void ma_sound_set_directional_attenuation_factor(ma_sound* pSound, float directionalAttenuationFactor)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_spatializer_set_directional_attenuation_factor(&pSound->engineNode.spatializer, directionalAttenuationFactor);\n}\n\nMA_API float ma_sound_get_directional_attenuation_factor(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return 1;\n    }\n\n    return ma_spatializer_get_directional_attenuation_factor(&pSound->engineNode.spatializer);\n}\n\n\nMA_API void ma_sound_set_fade_in_pcm_frames(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_sound_set_fade_start_in_pcm_frames(pSound, volumeBeg, volumeEnd, fadeLengthInFrames, (~(ma_uint64)0));\n}\n\nMA_API void ma_sound_set_fade_in_milliseconds(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_sound_set_fade_in_pcm_frames(pSound, volumeBeg, volumeEnd, (fadeLengthInMilliseconds * pSound->engineNode.fader.config.sampleRate) / 1000);\n}\n\nMA_API void ma_sound_set_fade_start_in_pcm_frames(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames, ma_uint64 absoluteGlobalTimeInFrames)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    /*\n    We don't want to update the fader at this point because we need to use the engine's current time\n    to derive the fader's start offset. The timer is being updated on the audio thread so in order to\n    do this as accurately as possible we'll need to defer this to the audio thread.\n    */\n    ma_atomic_float_set(&pSound->engineNode.fadeSettings.volumeBeg, volumeBeg);\n    ma_atomic_float_set(&pSound->engineNode.fadeSettings.volumeEnd, volumeEnd);\n    ma_atomic_uint64_set(&pSound->engineNode.fadeSettings.fadeLengthInFrames, fadeLengthInFrames);\n    ma_atomic_uint64_set(&pSound->engineNode.fadeSettings.absoluteGlobalTimeInFrames, absoluteGlobalTimeInFrames);\n}\n\nMA_API void ma_sound_set_fade_start_in_milliseconds(ma_sound* pSound, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds, ma_uint64 absoluteGlobalTimeInMilliseconds)\n{\n    ma_uint32 sampleRate;\n\n    if (pSound == NULL) {\n        return;\n    }\n\n    sampleRate = ma_engine_get_sample_rate(ma_sound_get_engine(pSound));\n\n    ma_sound_set_fade_start_in_pcm_frames(pSound, volumeBeg, volumeEnd, (fadeLengthInMilliseconds * sampleRate) / 1000, (absoluteGlobalTimeInMilliseconds * sampleRate) / 1000);\n}\n\nMA_API float ma_sound_get_current_fade_volume(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    return ma_fader_get_current_volume(&pSound->engineNode.fader);\n}\n\nMA_API void ma_sound_set_start_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_node_set_state_time(pSound, ma_node_state_started, absoluteGlobalTimeInFrames);\n}\n\nMA_API void ma_sound_set_start_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_sound_set_start_time_in_pcm_frames(pSound, absoluteGlobalTimeInMilliseconds * ma_engine_get_sample_rate(ma_sound_get_engine(pSound)) / 1000);\n}\n\nMA_API void ma_sound_set_stop_time_in_pcm_frames(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInFrames)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_sound_set_stop_time_with_fade_in_pcm_frames(pSound, absoluteGlobalTimeInFrames, 0);\n}\n\nMA_API void ma_sound_set_stop_time_in_milliseconds(ma_sound* pSound, ma_uint64 absoluteGlobalTimeInMilliseconds)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    ma_sound_set_stop_time_in_pcm_frames(pSound, absoluteGlobalTimeInMilliseconds * ma_engine_get_sample_rate(ma_sound_get_engine(pSound)) / 1000);\n}\n\nMA_API void ma_sound_set_stop_time_with_fade_in_pcm_frames(ma_sound* pSound, ma_uint64 stopAbsoluteGlobalTimeInFrames, ma_uint64 fadeLengthInFrames)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    if (fadeLengthInFrames > 0) {\n        if (fadeLengthInFrames > stopAbsoluteGlobalTimeInFrames) {\n            fadeLengthInFrames = stopAbsoluteGlobalTimeInFrames;\n        }\n\n        ma_sound_set_fade_start_in_pcm_frames(pSound, -1, 0, fadeLengthInFrames, stopAbsoluteGlobalTimeInFrames - fadeLengthInFrames);\n    }\n\n    ma_node_set_state_time(pSound, ma_node_state_stopped, stopAbsoluteGlobalTimeInFrames);\n}\n\nMA_API void ma_sound_set_stop_time_with_fade_in_milliseconds(ma_sound* pSound, ma_uint64 stopAbsoluteGlobalTimeInMilliseconds, ma_uint64 fadeLengthInMilliseconds)\n{\n    ma_uint32 sampleRate;\n\n    if (pSound == NULL) {\n        return;\n    }\n\n    sampleRate = ma_engine_get_sample_rate(ma_sound_get_engine(pSound));\n\n    ma_sound_set_stop_time_with_fade_in_pcm_frames(pSound, (stopAbsoluteGlobalTimeInMilliseconds * sampleRate) / 1000, (fadeLengthInMilliseconds * sampleRate) / 1000);\n}\n\nMA_API ma_bool32 ma_sound_is_playing(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return MA_FALSE;\n    }\n\n    return ma_node_get_state_by_time(pSound, ma_engine_get_time_in_pcm_frames(ma_sound_get_engine(pSound))) == ma_node_state_started;\n}\n\nMA_API ma_uint64 ma_sound_get_time_in_pcm_frames(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return 0;\n    }\n\n    return ma_node_get_time(pSound);\n}\n\nMA_API ma_uint64 ma_sound_get_time_in_milliseconds(const ma_sound* pSound)\n{\n    return ma_sound_get_time_in_pcm_frames(pSound) * 1000 / ma_engine_get_sample_rate(ma_sound_get_engine(pSound));\n}\n\nMA_API void ma_sound_set_looping(ma_sound* pSound, ma_bool32 isLooping)\n{\n    if (pSound == NULL) {\n        return;\n    }\n\n    /* Looping is only a valid concept if the sound is backed by a data source. */\n    if (pSound->pDataSource == NULL) {\n        return;\n    }\n\n    /* The looping state needs to be applied to the data source in order for any looping to actually happen. */\n    ma_data_source_set_looping(pSound->pDataSource, isLooping);\n}\n\nMA_API ma_bool32 ma_sound_is_looping(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return MA_FALSE;\n    }\n\n    /* There is no notion of looping for sounds that are not backed by a data source. */\n    if (pSound->pDataSource == NULL) {\n        return MA_FALSE;\n    }\n\n    return ma_data_source_is_looping(pSound->pDataSource);\n}\n\nMA_API ma_bool32 ma_sound_at_end(const ma_sound* pSound)\n{\n    if (pSound == NULL) {\n        return MA_FALSE;\n    }\n\n    /* There is no notion of an end of a sound if it's not backed by a data source. */\n    if (pSound->pDataSource == NULL) {\n        return MA_FALSE;\n    }\n\n    return ma_sound_get_at_end(pSound);\n}\n\nMA_API ma_result ma_sound_seek_to_pcm_frame(ma_sound* pSound, ma_uint64 frameIndex)\n{\n    if (pSound == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* Seeking is only valid for sounds that are backed by a data source. */\n    if (pSound->pDataSource == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    /* We can't be seeking while reading at the same time. We just set the seek target and get the mixing thread to do the actual seek. */\n    ma_atomic_exchange_64(&pSound->seekTarget, frameIndex);\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_sound_get_data_format(ma_sound* pSound, ma_format* pFormat, ma_uint32* pChannels, ma_uint32* pSampleRate, ma_channel* pChannelMap, size_t channelMapCap)\n{\n    if (pSound == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The data format is retrieved directly from the data source if the sound is backed by one. Otherwise we pull it from the node. */\n    if (pSound->pDataSource == NULL) {\n        ma_uint32 channels;\n\n        if (pFormat != NULL) {\n            *pFormat = ma_format_f32;\n        }\n\n        channels = ma_node_get_input_channels(&pSound->engineNode, 0);\n        if (pChannels != NULL) {\n            *pChannels = channels;\n        }\n\n        if (pSampleRate != NULL) {\n            *pSampleRate = pSound->engineNode.resampler.config.sampleRateIn;\n        }\n\n        if (pChannelMap != NULL) {\n            ma_channel_map_init_standard(ma_standard_channel_map_default, pChannelMap, channelMapCap, channels);\n        }\n\n        return MA_SUCCESS;\n    } else {\n        return ma_data_source_get_data_format(pSound->pDataSource, pFormat, pChannels, pSampleRate, pChannelMap, channelMapCap);\n    }\n}\n\nMA_API ma_result ma_sound_get_cursor_in_pcm_frames(ma_sound* pSound, ma_uint64* pCursor)\n{\n    ma_uint64 seekTarget;\n\n    if (pSound == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The notion of a cursor is only valid for sounds that are backed by a data source. */\n    if (pSound->pDataSource == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    seekTarget = ma_atomic_load_64(&pSound->seekTarget);\n    if (seekTarget != MA_SEEK_TARGET_NONE) {\n        *pCursor = seekTarget;\n        return MA_SUCCESS;\n    } else {\n        return ma_data_source_get_cursor_in_pcm_frames(pSound->pDataSource, pCursor);\n    }\n}\n\nMA_API ma_result ma_sound_get_length_in_pcm_frames(ma_sound* pSound, ma_uint64* pLength)\n{\n    if (pSound == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The notion of a sound length is only valid for sounds that are backed by a data source. */\n    if (pSound->pDataSource == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    return ma_data_source_get_length_in_pcm_frames(pSound->pDataSource, pLength);\n}\n\nMA_API ma_result ma_sound_get_cursor_in_seconds(ma_sound* pSound, float* pCursor)\n{\n    ma_result result;\n    ma_uint64 cursorInPCMFrames;\n    ma_uint32 sampleRate;\n\n    if (pCursor != NULL) {\n        *pCursor = 0;\n    }\n\n    result = ma_sound_get_cursor_in_pcm_frames(pSound, &cursorInPCMFrames);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    result = ma_sound_get_data_format(pSound, NULL, NULL, &sampleRate, NULL, 0);\n    if (result != MA_SUCCESS) {\n        return result;\n    }\n\n    /* VC6 does not support division of unsigned 64-bit integers with floating point numbers. Need to use a signed number. This shouldn't effect anything in practice. */\n    *pCursor = (ma_int64)cursorInPCMFrames / (float)sampleRate;\n\n    return MA_SUCCESS;\n}\n\nMA_API ma_result ma_sound_get_length_in_seconds(ma_sound* pSound, float* pLength)\n{\n    if (pSound == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The notion of a sound length is only valid for sounds that are backed by a data source. */\n    if (pSound->pDataSource == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    return ma_data_source_get_length_in_seconds(pSound->pDataSource, pLength);\n}\n\nMA_API ma_result ma_sound_set_end_callback(ma_sound* pSound, ma_sound_end_proc callback, void* pUserData)\n{\n    if (pSound == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* The notion of an end is only valid for sounds that are backed by a data source. */\n    if (pSound->pDataSource == NULL) {\n        return MA_INVALID_OPERATION;\n    }\n\n    pSound->endCallback          = callback;\n    pSound->pEndCallbackUserData = pUserData;\n\n    return MA_SUCCESS;\n}\n\n\nMA_API ma_result ma_sound_group_init(ma_engine* pEngine, ma_uint32 flags, ma_sound_group* pParentGroup, ma_sound_group* pGroup)\n{\n    ma_sound_group_config config = ma_sound_group_config_init_2(pEngine);\n    config.flags              = flags;\n    config.pInitialAttachment = pParentGroup;\n    return ma_sound_group_init_ex(pEngine, &config, pGroup);\n}\n\nMA_API ma_result ma_sound_group_init_ex(ma_engine* pEngine, const ma_sound_group_config* pConfig, ma_sound_group* pGroup)\n{\n    ma_sound_config soundConfig;\n\n    if (pGroup == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    MA_ZERO_OBJECT(pGroup);\n\n    if (pConfig == NULL) {\n        return MA_INVALID_ARGS;\n    }\n\n    /* A sound group is just a sound without a data source. */\n    soundConfig = *pConfig;\n    soundConfig.pFilePath   = NULL;\n    soundConfig.pFilePathW  = NULL;\n    soundConfig.pDataSource = NULL;\n\n    /*\n    Groups need to have spatialization disabled by default because I think it'll be pretty rare\n    that programs will want to spatialize groups (but not unheard of). Certainly it feels like\n    disabling this by default feels like the right option. Spatialization can be enabled with a\n    call to ma_sound_group_set_spatialization_enabled().\n    */\n    soundConfig.flags |= MA_SOUND_FLAG_NO_SPATIALIZATION;\n\n    return ma_sound_init_ex(pEngine, &soundConfig, pGroup);\n}\n\nMA_API void ma_sound_group_uninit(ma_sound_group* pGroup)\n{\n    ma_sound_uninit(pGroup);\n}\n\nMA_API ma_engine* ma_sound_group_get_engine(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_engine(pGroup);\n}\n\nMA_API ma_result ma_sound_group_start(ma_sound_group* pGroup)\n{\n    return ma_sound_start(pGroup);\n}\n\nMA_API ma_result ma_sound_group_stop(ma_sound_group* pGroup)\n{\n    return ma_sound_stop(pGroup);\n}\n\nMA_API void ma_sound_group_set_volume(ma_sound_group* pGroup, float volume)\n{\n    ma_sound_set_volume(pGroup, volume);\n}\n\nMA_API float ma_sound_group_get_volume(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_volume(pGroup);\n}\n\nMA_API void ma_sound_group_set_pan(ma_sound_group* pGroup, float pan)\n{\n    ma_sound_set_pan(pGroup, pan);\n}\n\nMA_API float ma_sound_group_get_pan(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_pan(pGroup);\n}\n\nMA_API void ma_sound_group_set_pan_mode(ma_sound_group* pGroup, ma_pan_mode panMode)\n{\n    ma_sound_set_pan_mode(pGroup, panMode);\n}\n\nMA_API ma_pan_mode ma_sound_group_get_pan_mode(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_pan_mode(pGroup);\n}\n\nMA_API void ma_sound_group_set_pitch(ma_sound_group* pGroup, float pitch)\n{\n    ma_sound_set_pitch(pGroup, pitch);\n}\n\nMA_API float ma_sound_group_get_pitch(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_pitch(pGroup);\n}\n\nMA_API void ma_sound_group_set_spatialization_enabled(ma_sound_group* pGroup, ma_bool32 enabled)\n{\n    ma_sound_set_spatialization_enabled(pGroup, enabled);\n}\n\nMA_API ma_bool32 ma_sound_group_is_spatialization_enabled(const ma_sound_group* pGroup)\n{\n    return ma_sound_is_spatialization_enabled(pGroup);\n}\n\nMA_API void ma_sound_group_set_pinned_listener_index(ma_sound_group* pGroup, ma_uint32 listenerIndex)\n{\n    ma_sound_set_pinned_listener_index(pGroup, listenerIndex);\n}\n\nMA_API ma_uint32 ma_sound_group_get_pinned_listener_index(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_pinned_listener_index(pGroup);\n}\n\nMA_API ma_uint32 ma_sound_group_get_listener_index(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_listener_index(pGroup);\n}\n\nMA_API ma_vec3f ma_sound_group_get_direction_to_listener(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_direction_to_listener(pGroup);\n}\n\nMA_API void ma_sound_group_set_position(ma_sound_group* pGroup, float x, float y, float z)\n{\n    ma_sound_set_position(pGroup, x, y, z);\n}\n\nMA_API ma_vec3f ma_sound_group_get_position(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_position(pGroup);\n}\n\nMA_API void ma_sound_group_set_direction(ma_sound_group* pGroup, float x, float y, float z)\n{\n    ma_sound_set_direction(pGroup, x, y, z);\n}\n\nMA_API ma_vec3f ma_sound_group_get_direction(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_direction(pGroup);\n}\n\nMA_API void ma_sound_group_set_velocity(ma_sound_group* pGroup, float x, float y, float z)\n{\n    ma_sound_set_velocity(pGroup, x, y, z);\n}\n\nMA_API ma_vec3f ma_sound_group_get_velocity(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_velocity(pGroup);\n}\n\nMA_API void ma_sound_group_set_attenuation_model(ma_sound_group* pGroup, ma_attenuation_model attenuationModel)\n{\n    ma_sound_set_attenuation_model(pGroup, attenuationModel);\n}\n\nMA_API ma_attenuation_model ma_sound_group_get_attenuation_model(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_attenuation_model(pGroup);\n}\n\nMA_API void ma_sound_group_set_positioning(ma_sound_group* pGroup, ma_positioning positioning)\n{\n    ma_sound_set_positioning(pGroup, positioning);\n}\n\nMA_API ma_positioning ma_sound_group_get_positioning(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_positioning(pGroup);\n}\n\nMA_API void ma_sound_group_set_rolloff(ma_sound_group* pGroup, float rolloff)\n{\n    ma_sound_set_rolloff(pGroup, rolloff);\n}\n\nMA_API float ma_sound_group_get_rolloff(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_rolloff(pGroup);\n}\n\nMA_API void ma_sound_group_set_min_gain(ma_sound_group* pGroup, float minGain)\n{\n    ma_sound_set_min_gain(pGroup, minGain);\n}\n\nMA_API float ma_sound_group_get_min_gain(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_min_gain(pGroup);\n}\n\nMA_API void ma_sound_group_set_max_gain(ma_sound_group* pGroup, float maxGain)\n{\n    ma_sound_set_max_gain(pGroup, maxGain);\n}\n\nMA_API float ma_sound_group_get_max_gain(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_max_gain(pGroup);\n}\n\nMA_API void ma_sound_group_set_min_distance(ma_sound_group* pGroup, float minDistance)\n{\n    ma_sound_set_min_distance(pGroup, minDistance);\n}\n\nMA_API float ma_sound_group_get_min_distance(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_min_distance(pGroup);\n}\n\nMA_API void ma_sound_group_set_max_distance(ma_sound_group* pGroup, float maxDistance)\n{\n    ma_sound_set_max_distance(pGroup, maxDistance);\n}\n\nMA_API float ma_sound_group_get_max_distance(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_max_distance(pGroup);\n}\n\nMA_API void ma_sound_group_set_cone(ma_sound_group* pGroup, float innerAngleInRadians, float outerAngleInRadians, float outerGain)\n{\n    ma_sound_set_cone(pGroup, innerAngleInRadians, outerAngleInRadians, outerGain);\n}\n\nMA_API void ma_sound_group_get_cone(const ma_sound_group* pGroup, float* pInnerAngleInRadians, float* pOuterAngleInRadians, float* pOuterGain)\n{\n    ma_sound_get_cone(pGroup, pInnerAngleInRadians, pOuterAngleInRadians, pOuterGain);\n}\n\nMA_API void ma_sound_group_set_doppler_factor(ma_sound_group* pGroup, float dopplerFactor)\n{\n    ma_sound_set_doppler_factor(pGroup, dopplerFactor);\n}\n\nMA_API float ma_sound_group_get_doppler_factor(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_doppler_factor(pGroup);\n}\n\nMA_API void ma_sound_group_set_directional_attenuation_factor(ma_sound_group* pGroup, float directionalAttenuationFactor)\n{\n    ma_sound_set_directional_attenuation_factor(pGroup, directionalAttenuationFactor);\n}\n\nMA_API float ma_sound_group_get_directional_attenuation_factor(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_directional_attenuation_factor(pGroup);\n}\n\nMA_API void ma_sound_group_set_fade_in_pcm_frames(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInFrames)\n{\n    ma_sound_set_fade_in_pcm_frames(pGroup, volumeBeg, volumeEnd, fadeLengthInFrames);\n}\n\nMA_API void ma_sound_group_set_fade_in_milliseconds(ma_sound_group* pGroup, float volumeBeg, float volumeEnd, ma_uint64 fadeLengthInMilliseconds)\n{\n    ma_sound_set_fade_in_milliseconds(pGroup, volumeBeg, volumeEnd, fadeLengthInMilliseconds);\n}\n\nMA_API float ma_sound_group_get_current_fade_volume(ma_sound_group* pGroup)\n{\n    return ma_sound_get_current_fade_volume(pGroup);\n}\n\nMA_API void ma_sound_group_set_start_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames)\n{\n    ma_sound_set_start_time_in_pcm_frames(pGroup, absoluteGlobalTimeInFrames);\n}\n\nMA_API void ma_sound_group_set_start_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds)\n{\n    ma_sound_set_start_time_in_milliseconds(pGroup, absoluteGlobalTimeInMilliseconds);\n}\n\nMA_API void ma_sound_group_set_stop_time_in_pcm_frames(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInFrames)\n{\n    ma_sound_set_stop_time_in_pcm_frames(pGroup, absoluteGlobalTimeInFrames);\n}\n\nMA_API void ma_sound_group_set_stop_time_in_milliseconds(ma_sound_group* pGroup, ma_uint64 absoluteGlobalTimeInMilliseconds)\n{\n    ma_sound_set_stop_time_in_milliseconds(pGroup, absoluteGlobalTimeInMilliseconds);\n}\n\nMA_API ma_bool32 ma_sound_group_is_playing(const ma_sound_group* pGroup)\n{\n    return ma_sound_is_playing(pGroup);\n}\n\nMA_API ma_uint64 ma_sound_group_get_time_in_pcm_frames(const ma_sound_group* pGroup)\n{\n    return ma_sound_get_time_in_pcm_frames(pGroup);\n}\n#endif  /* MA_NO_ENGINE */\n/* END SECTION: miniaudio_engine.c */\n\n\n\n/**************************************************************************************************************************************************************\n***************************************************************************************************************************************************************\n\nAuto Generated\n==============\nAll code below is auto-generated from a tool. This mostly consists of decoding backend implementations such as ma_dr_wav, ma_dr_flac, etc. If you find a bug in the\ncode below please report the bug to the respective repository for the relevant project (probably dr_libs).\n\n***************************************************************************************************************************************************************\n**************************************************************************************************************************************************************/\n#if !defined(MA_NO_WAV) && (!defined(MA_NO_DECODING) || !defined(MA_NO_ENCODING))\n#if !defined(MA_DR_WAV_IMPLEMENTATION) && !defined(MA_DR_WAV_IMPLEMENTATION) /* For backwards compatibility. Will be removed in version 0.11 for cleanliness. */\n/* dr_wav_c begin */\n#ifndef ma_dr_wav_c\n#define ma_dr_wav_c\n#ifdef __MRC__\n#pragma options opt off\n#endif\n#include <stdlib.h>\n#include <string.h>\n#include <limits.h>\n#ifndef MA_DR_WAV_NO_STDIO\n#include <stdio.h>\n#ifndef MA_DR_WAV_NO_WCHAR\n#include <wchar.h>\n#endif\n#endif\n#ifndef MA_DR_WAV_ASSERT\n#include <assert.h>\n#define MA_DR_WAV_ASSERT(expression)           assert(expression)\n#endif\n#ifndef MA_DR_WAV_MALLOC\n#define MA_DR_WAV_MALLOC(sz)                   malloc((sz))\n#endif\n#ifndef MA_DR_WAV_REALLOC\n#define MA_DR_WAV_REALLOC(p, sz)               realloc((p), (sz))\n#endif\n#ifndef MA_DR_WAV_FREE\n#define MA_DR_WAV_FREE(p)                      free((p))\n#endif\n#ifndef MA_DR_WAV_COPY_MEMORY\n#define MA_DR_WAV_COPY_MEMORY(dst, src, sz)    memcpy((dst), (src), (sz))\n#endif\n#ifndef MA_DR_WAV_ZERO_MEMORY\n#define MA_DR_WAV_ZERO_MEMORY(p, sz)           memset((p), 0, (sz))\n#endif\n#ifndef MA_DR_WAV_ZERO_OBJECT\n#define MA_DR_WAV_ZERO_OBJECT(p)               MA_DR_WAV_ZERO_MEMORY((p), sizeof(*p))\n#endif\n#define ma_dr_wav_countof(x)                   (sizeof(x) / sizeof(x[0]))\n#define ma_dr_wav_align(x, a)                  ((((x) + (a) - 1) / (a)) * (a))\n#define ma_dr_wav_min(a, b)                    (((a) < (b)) ? (a) : (b))\n#define ma_dr_wav_max(a, b)                    (((a) > (b)) ? (a) : (b))\n#define ma_dr_wav_clamp(x, lo, hi)             (ma_dr_wav_max((lo), ma_dr_wav_min((hi), (x))))\n#define ma_dr_wav_offset_ptr(p, offset)        (((ma_uint8*)(p)) + (offset))\n#define MA_DR_WAV_MAX_SIMD_VECTOR_SIZE         32\n#define MA_DR_WAV_INT64_MIN ((ma_int64) ((ma_uint64)0x80000000 << 32))\n#define MA_DR_WAV_INT64_MAX ((ma_int64)(((ma_uint64)0x7FFFFFFF << 32) | 0xFFFFFFFF))\n#if defined(_MSC_VER) && _MSC_VER >= 1400\n    #define MA_DR_WAV_HAS_BYTESWAP16_INTRINSIC\n    #define MA_DR_WAV_HAS_BYTESWAP32_INTRINSIC\n    #define MA_DR_WAV_HAS_BYTESWAP64_INTRINSIC\n#elif defined(__clang__)\n    #if defined(__has_builtin)\n        #if __has_builtin(__builtin_bswap16)\n            #define MA_DR_WAV_HAS_BYTESWAP16_INTRINSIC\n        #endif\n        #if __has_builtin(__builtin_bswap32)\n            #define MA_DR_WAV_HAS_BYTESWAP32_INTRINSIC\n        #endif\n        #if __has_builtin(__builtin_bswap64)\n            #define MA_DR_WAV_HAS_BYTESWAP64_INTRINSIC\n        #endif\n    #endif\n#elif defined(__GNUC__)\n    #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))\n        #define MA_DR_WAV_HAS_BYTESWAP32_INTRINSIC\n        #define MA_DR_WAV_HAS_BYTESWAP64_INTRINSIC\n    #endif\n    #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))\n        #define MA_DR_WAV_HAS_BYTESWAP16_INTRINSIC\n    #endif\n#endif\nMA_API void ma_dr_wav_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision)\n{\n    if (pMajor) {\n        *pMajor = MA_DR_WAV_VERSION_MAJOR;\n    }\n    if (pMinor) {\n        *pMinor = MA_DR_WAV_VERSION_MINOR;\n    }\n    if (pRevision) {\n        *pRevision = MA_DR_WAV_VERSION_REVISION;\n    }\n}\nMA_API const char* ma_dr_wav_version_string(void)\n{\n    return MA_DR_WAV_VERSION_STRING;\n}\n#ifndef MA_DR_WAV_MAX_SAMPLE_RATE\n#define MA_DR_WAV_MAX_SAMPLE_RATE       384000\n#endif\n#ifndef MA_DR_WAV_MAX_CHANNELS\n#define MA_DR_WAV_MAX_CHANNELS          256\n#endif\n#ifndef MA_DR_WAV_MAX_BITS_PER_SAMPLE\n#define MA_DR_WAV_MAX_BITS_PER_SAMPLE   64\n#endif\nstatic const ma_uint8 ma_dr_wavGUID_W64_RIFF[16] = {0x72,0x69,0x66,0x66, 0x2E,0x91, 0xCF,0x11, 0xA5,0xD6, 0x28,0xDB,0x04,0xC1,0x00,0x00};\nstatic const ma_uint8 ma_dr_wavGUID_W64_WAVE[16] = {0x77,0x61,0x76,0x65, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A};\nstatic const ma_uint8 ma_dr_wavGUID_W64_FMT [16] = {0x66,0x6D,0x74,0x20, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A};\nstatic const ma_uint8 ma_dr_wavGUID_W64_FACT[16] = {0x66,0x61,0x63,0x74, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A};\nstatic const ma_uint8 ma_dr_wavGUID_W64_DATA[16] = {0x64,0x61,0x74,0x61, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A};\nstatic MA_INLINE int ma_dr_wav__is_little_endian(void)\n{\n#if defined(MA_X86) || defined(MA_X64)\n    return MA_TRUE;\n#elif defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN\n    return MA_TRUE;\n#else\n    int n = 1;\n    return (*(char*)&n) == 1;\n#endif\n}\nstatic MA_INLINE void ma_dr_wav_bytes_to_guid(const ma_uint8* data, ma_uint8* guid)\n{\n    int i;\n    for (i = 0; i < 16; ++i) {\n        guid[i] = data[i];\n    }\n}\nstatic MA_INLINE ma_uint16 ma_dr_wav__bswap16(ma_uint16 n)\n{\n#ifdef MA_DR_WAV_HAS_BYTESWAP16_INTRINSIC\n    #if defined(_MSC_VER)\n        return _byteswap_ushort(n);\n    #elif defined(__GNUC__) || defined(__clang__)\n        return __builtin_bswap16(n);\n    #else\n        #error \"This compiler does not support the byte swap intrinsic.\"\n    #endif\n#else\n    return ((n & 0xFF00) >> 8) |\n           ((n & 0x00FF) << 8);\n#endif\n}\nstatic MA_INLINE ma_uint32 ma_dr_wav__bswap32(ma_uint32 n)\n{\n#ifdef MA_DR_WAV_HAS_BYTESWAP32_INTRINSIC\n    #if defined(_MSC_VER)\n        return _byteswap_ulong(n);\n    #elif defined(__GNUC__) || defined(__clang__)\n        #if defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 6) && !defined(MA_64BIT)\n            ma_uint32 r;\n            __asm__ __volatile__ (\n            #if defined(MA_64BIT)\n                \"rev %w[out], %w[in]\" : [out]\"=r\"(r) : [in]\"r\"(n)\n            #else\n                \"rev %[out], %[in]\" : [out]\"=r\"(r) : [in]\"r\"(n)\n            #endif\n            );\n            return r;\n        #else\n            return __builtin_bswap32(n);\n        #endif\n    #else\n        #error \"This compiler does not support the byte swap intrinsic.\"\n    #endif\n#else\n    return ((n & 0xFF000000) >> 24) |\n           ((n & 0x00FF0000) >>  8) |\n           ((n & 0x0000FF00) <<  8) |\n           ((n & 0x000000FF) << 24);\n#endif\n}\nstatic MA_INLINE ma_uint64 ma_dr_wav__bswap64(ma_uint64 n)\n{\n#ifdef MA_DR_WAV_HAS_BYTESWAP64_INTRINSIC\n    #if defined(_MSC_VER)\n        return _byteswap_uint64(n);\n    #elif defined(__GNUC__) || defined(__clang__)\n        return __builtin_bswap64(n);\n    #else\n        #error \"This compiler does not support the byte swap intrinsic.\"\n    #endif\n#else\n    return ((n & ((ma_uint64)0xFF000000 << 32)) >> 56) |\n           ((n & ((ma_uint64)0x00FF0000 << 32)) >> 40) |\n           ((n & ((ma_uint64)0x0000FF00 << 32)) >> 24) |\n           ((n & ((ma_uint64)0x000000FF << 32)) >>  8) |\n           ((n & ((ma_uint64)0xFF000000      )) <<  8) |\n           ((n & ((ma_uint64)0x00FF0000      )) << 24) |\n           ((n & ((ma_uint64)0x0000FF00      )) << 40) |\n           ((n & ((ma_uint64)0x000000FF      )) << 56);\n#endif\n}\nstatic MA_INLINE ma_int16 ma_dr_wav__bswap_s16(ma_int16 n)\n{\n    return (ma_int16)ma_dr_wav__bswap16((ma_uint16)n);\n}\nstatic MA_INLINE void ma_dr_wav__bswap_samples_s16(ma_int16* pSamples, ma_uint64 sampleCount)\n{\n    ma_uint64 iSample;\n    for (iSample = 0; iSample < sampleCount; iSample += 1) {\n        pSamples[iSample] = ma_dr_wav__bswap_s16(pSamples[iSample]);\n    }\n}\nstatic MA_INLINE void ma_dr_wav__bswap_s24(ma_uint8* p)\n{\n    ma_uint8 t;\n    t = p[0];\n    p[0] = p[2];\n    p[2] = t;\n}\nstatic MA_INLINE void ma_dr_wav__bswap_samples_s24(ma_uint8* pSamples, ma_uint64 sampleCount)\n{\n    ma_uint64 iSample;\n    for (iSample = 0; iSample < sampleCount; iSample += 1) {\n        ma_uint8* pSample = pSamples + (iSample*3);\n        ma_dr_wav__bswap_s24(pSample);\n    }\n}\nstatic MA_INLINE ma_int32 ma_dr_wav__bswap_s32(ma_int32 n)\n{\n    return (ma_int32)ma_dr_wav__bswap32((ma_uint32)n);\n}\nstatic MA_INLINE void ma_dr_wav__bswap_samples_s32(ma_int32* pSamples, ma_uint64 sampleCount)\n{\n    ma_uint64 iSample;\n    for (iSample = 0; iSample < sampleCount; iSample += 1) {\n        pSamples[iSample] = ma_dr_wav__bswap_s32(pSamples[iSample]);\n    }\n}\nstatic MA_INLINE ma_int64 ma_dr_wav__bswap_s64(ma_int64 n)\n{\n    return (ma_int64)ma_dr_wav__bswap64((ma_uint64)n);\n}\nstatic MA_INLINE void ma_dr_wav__bswap_samples_s64(ma_int64* pSamples, ma_uint64 sampleCount)\n{\n    ma_uint64 iSample;\n    for (iSample = 0; iSample < sampleCount; iSample += 1) {\n        pSamples[iSample] = ma_dr_wav__bswap_s64(pSamples[iSample]);\n    }\n}\nstatic MA_INLINE float ma_dr_wav__bswap_f32(float n)\n{\n    union {\n        ma_uint32 i;\n        float f;\n    } x;\n    x.f = n;\n    x.i = ma_dr_wav__bswap32(x.i);\n    return x.f;\n}\nstatic MA_INLINE void ma_dr_wav__bswap_samples_f32(float* pSamples, ma_uint64 sampleCount)\n{\n    ma_uint64 iSample;\n    for (iSample = 0; iSample < sampleCount; iSample += 1) {\n        pSamples[iSample] = ma_dr_wav__bswap_f32(pSamples[iSample]);\n    }\n}\nstatic MA_INLINE void ma_dr_wav__bswap_samples(void* pSamples, ma_uint64 sampleCount, ma_uint32 bytesPerSample)\n{\n    switch (bytesPerSample)\n    {\n        case 1:\n        {\n        } break;\n        case 2:\n        {\n            ma_dr_wav__bswap_samples_s16((ma_int16*)pSamples, sampleCount);\n        } break;\n        case 3:\n        {\n            ma_dr_wav__bswap_samples_s24((ma_uint8*)pSamples, sampleCount);\n        } break;\n        case 4:\n        {\n            ma_dr_wav__bswap_samples_s32((ma_int32*)pSamples, sampleCount);\n        } break;\n        case 8:\n        {\n            ma_dr_wav__bswap_samples_s64((ma_int64*)pSamples, sampleCount);\n        } break;\n        default:\n        {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n        } break;\n    }\n}\nMA_PRIVATE MA_INLINE ma_bool32 ma_dr_wav_is_container_be(ma_dr_wav_container container)\n{\n    if (container == ma_dr_wav_container_rifx || container == ma_dr_wav_container_aiff) {\n        return MA_TRUE;\n    } else {\n        return MA_FALSE;\n    }\n}\nMA_PRIVATE MA_INLINE ma_uint16 ma_dr_wav_bytes_to_u16_le(const ma_uint8* data)\n{\n    return ((ma_uint16)data[0] << 0) | ((ma_uint16)data[1] << 8);\n}\nMA_PRIVATE MA_INLINE ma_uint16 ma_dr_wav_bytes_to_u16_be(const ma_uint8* data)\n{\n    return ((ma_uint16)data[1] << 0) | ((ma_uint16)data[0] << 8);\n}\nMA_PRIVATE MA_INLINE ma_uint16 ma_dr_wav_bytes_to_u16_ex(const ma_uint8* data, ma_dr_wav_container container)\n{\n    if (ma_dr_wav_is_container_be(container)) {\n        return ma_dr_wav_bytes_to_u16_be(data);\n    } else {\n        return ma_dr_wav_bytes_to_u16_le(data);\n    }\n}\nMA_PRIVATE MA_INLINE ma_uint32 ma_dr_wav_bytes_to_u32_le(const ma_uint8* data)\n{\n    return ((ma_uint32)data[0] << 0) | ((ma_uint32)data[1] << 8) | ((ma_uint32)data[2] << 16) | ((ma_uint32)data[3] << 24);\n}\nMA_PRIVATE MA_INLINE ma_uint32 ma_dr_wav_bytes_to_u32_be(const ma_uint8* data)\n{\n    return ((ma_uint32)data[3] << 0) | ((ma_uint32)data[2] << 8) | ((ma_uint32)data[1] << 16) | ((ma_uint32)data[0] << 24);\n}\nMA_PRIVATE MA_INLINE ma_uint32 ma_dr_wav_bytes_to_u32_ex(const ma_uint8* data, ma_dr_wav_container container)\n{\n    if (ma_dr_wav_is_container_be(container)) {\n        return ma_dr_wav_bytes_to_u32_be(data);\n    } else {\n        return ma_dr_wav_bytes_to_u32_le(data);\n    }\n}\nMA_PRIVATE ma_int64 ma_dr_wav_aiff_extented_to_s64(const ma_uint8* data)\n{\n    ma_uint32 exponent = ((ma_uint32)data[0] << 8) | data[1];\n    ma_uint64 hi = ((ma_uint64)data[2] << 24) | ((ma_uint64)data[3] << 16) | ((ma_uint64)data[4] <<  8) | ((ma_uint64)data[5] <<  0);\n    ma_uint64 lo = ((ma_uint64)data[6] << 24) | ((ma_uint64)data[7] << 16) | ((ma_uint64)data[8] <<  8) | ((ma_uint64)data[9] <<  0);\n    ma_uint64 significand = (hi << 32) | lo;\n    int sign = exponent >> 15;\n    exponent &= 0x7FFF;\n    if (exponent == 0 && significand == 0) {\n        return 0;\n    } else if (exponent == 0x7FFF) {\n        return sign ? MA_DR_WAV_INT64_MIN : MA_DR_WAV_INT64_MAX;\n    }\n    exponent -= 16383;\n    if (exponent > 63) {\n        return sign ? MA_DR_WAV_INT64_MIN : MA_DR_WAV_INT64_MAX;\n    } else if (exponent < 1) {\n        return 0;\n    }\n    significand >>= (63 - exponent);\n    if (sign) {\n        return -(ma_int64)significand;\n    } else {\n        return  (ma_int64)significand;\n    }\n}\nMA_PRIVATE void* ma_dr_wav__malloc_default(size_t sz, void* pUserData)\n{\n    (void)pUserData;\n    return MA_DR_WAV_MALLOC(sz);\n}\nMA_PRIVATE void* ma_dr_wav__realloc_default(void* p, size_t sz, void* pUserData)\n{\n    (void)pUserData;\n    return MA_DR_WAV_REALLOC(p, sz);\n}\nMA_PRIVATE void ma_dr_wav__free_default(void* p, void* pUserData)\n{\n    (void)pUserData;\n    MA_DR_WAV_FREE(p);\n}\nMA_PRIVATE void* ma_dr_wav__malloc_from_callbacks(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks == NULL) {\n        return NULL;\n    }\n    if (pAllocationCallbacks->onMalloc != NULL) {\n        return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData);\n    }\n    if (pAllocationCallbacks->onRealloc != NULL) {\n        return pAllocationCallbacks->onRealloc(NULL, sz, pAllocationCallbacks->pUserData);\n    }\n    return NULL;\n}\nMA_PRIVATE void* ma_dr_wav__realloc_from_callbacks(void* p, size_t szNew, size_t szOld, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks == NULL) {\n        return NULL;\n    }\n    if (pAllocationCallbacks->onRealloc != NULL) {\n        return pAllocationCallbacks->onRealloc(p, szNew, pAllocationCallbacks->pUserData);\n    }\n    if (pAllocationCallbacks->onMalloc != NULL && pAllocationCallbacks->onFree != NULL) {\n        void* p2;\n        p2 = pAllocationCallbacks->onMalloc(szNew, pAllocationCallbacks->pUserData);\n        if (p2 == NULL) {\n            return NULL;\n        }\n        if (p != NULL) {\n            MA_DR_WAV_COPY_MEMORY(p2, p, szOld);\n            pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData);\n        }\n        return p2;\n    }\n    return NULL;\n}\nMA_PRIVATE void ma_dr_wav__free_from_callbacks(void* p, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (p == NULL || pAllocationCallbacks == NULL) {\n        return;\n    }\n    if (pAllocationCallbacks->onFree != NULL) {\n        pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData);\n    }\n}\nMA_PRIVATE ma_allocation_callbacks ma_dr_wav_copy_allocation_callbacks_or_defaults(const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks != NULL) {\n        return *pAllocationCallbacks;\n    } else {\n        ma_allocation_callbacks allocationCallbacks;\n        allocationCallbacks.pUserData = NULL;\n        allocationCallbacks.onMalloc  = ma_dr_wav__malloc_default;\n        allocationCallbacks.onRealloc = ma_dr_wav__realloc_default;\n        allocationCallbacks.onFree    = ma_dr_wav__free_default;\n        return allocationCallbacks;\n    }\n}\nstatic MA_INLINE ma_bool32 ma_dr_wav__is_compressed_format_tag(ma_uint16 formatTag)\n{\n    return\n        formatTag == MA_DR_WAVE_FORMAT_ADPCM ||\n        formatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM;\n}\nMA_PRIVATE unsigned int ma_dr_wav__chunk_padding_size_riff(ma_uint64 chunkSize)\n{\n    return (unsigned int)(chunkSize % 2);\n}\nMA_PRIVATE unsigned int ma_dr_wav__chunk_padding_size_w64(ma_uint64 chunkSize)\n{\n    return (unsigned int)(chunkSize % 8);\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__msadpcm(ma_dr_wav* pWav, ma_uint64 samplesToRead, ma_int16* pBufferOut);\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__ima(ma_dr_wav* pWav, ma_uint64 samplesToRead, ma_int16* pBufferOut);\nMA_PRIVATE ma_bool32 ma_dr_wav_init_write__internal(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount);\nMA_PRIVATE ma_result ma_dr_wav__read_chunk_header(ma_dr_wav_read_proc onRead, void* pUserData, ma_dr_wav_container container, ma_uint64* pRunningBytesReadOut, ma_dr_wav_chunk_header* pHeaderOut)\n{\n    if (container == ma_dr_wav_container_riff || container == ma_dr_wav_container_rifx || container == ma_dr_wav_container_rf64 || container == ma_dr_wav_container_aiff) {\n        ma_uint8 sizeInBytes[4];\n        if (onRead(pUserData, pHeaderOut->id.fourcc, 4) != 4) {\n            return MA_AT_END;\n        }\n        if (onRead(pUserData, sizeInBytes, 4) != 4) {\n            return MA_INVALID_FILE;\n        }\n        pHeaderOut->sizeInBytes = ma_dr_wav_bytes_to_u32_ex(sizeInBytes, container);\n        pHeaderOut->paddingSize = ma_dr_wav__chunk_padding_size_riff(pHeaderOut->sizeInBytes);\n        *pRunningBytesReadOut += 8;\n    } else if (container == ma_dr_wav_container_w64) {\n        ma_uint8 sizeInBytes[8];\n        if (onRead(pUserData, pHeaderOut->id.guid, 16) != 16) {\n            return MA_AT_END;\n        }\n        if (onRead(pUserData, sizeInBytes, 8) != 8) {\n            return MA_INVALID_FILE;\n        }\n        pHeaderOut->sizeInBytes = ma_dr_wav_bytes_to_u64(sizeInBytes) - 24;\n        pHeaderOut->paddingSize = ma_dr_wav__chunk_padding_size_w64(pHeaderOut->sizeInBytes);\n        *pRunningBytesReadOut += 24;\n    } else {\n        return MA_INVALID_FILE;\n    }\n    return MA_SUCCESS;\n}\nMA_PRIVATE ma_bool32 ma_dr_wav__seek_forward(ma_dr_wav_seek_proc onSeek, ma_uint64 offset, void* pUserData)\n{\n    ma_uint64 bytesRemainingToSeek = offset;\n    while (bytesRemainingToSeek > 0) {\n        if (bytesRemainingToSeek > 0x7FFFFFFF) {\n            if (!onSeek(pUserData, 0x7FFFFFFF, ma_dr_wav_seek_origin_current)) {\n                return MA_FALSE;\n            }\n            bytesRemainingToSeek -= 0x7FFFFFFF;\n        } else {\n            if (!onSeek(pUserData, (int)bytesRemainingToSeek, ma_dr_wav_seek_origin_current)) {\n                return MA_FALSE;\n            }\n            bytesRemainingToSeek = 0;\n        }\n    }\n    return MA_TRUE;\n}\nMA_PRIVATE ma_bool32 ma_dr_wav__seek_from_start(ma_dr_wav_seek_proc onSeek, ma_uint64 offset, void* pUserData)\n{\n    if (offset <= 0x7FFFFFFF) {\n        return onSeek(pUserData, (int)offset, ma_dr_wav_seek_origin_start);\n    }\n    if (!onSeek(pUserData, 0x7FFFFFFF, ma_dr_wav_seek_origin_start)) {\n        return MA_FALSE;\n    }\n    offset -= 0x7FFFFFFF;\n    for (;;) {\n        if (offset <= 0x7FFFFFFF) {\n            return onSeek(pUserData, (int)offset, ma_dr_wav_seek_origin_current);\n        }\n        if (!onSeek(pUserData, 0x7FFFFFFF, ma_dr_wav_seek_origin_current)) {\n            return MA_FALSE;\n        }\n        offset -= 0x7FFFFFFF;\n    }\n}\nMA_PRIVATE size_t ma_dr_wav__on_read(ma_dr_wav_read_proc onRead, void* pUserData, void* pBufferOut, size_t bytesToRead, ma_uint64* pCursor)\n{\n    size_t bytesRead;\n    MA_DR_WAV_ASSERT(onRead != NULL);\n    MA_DR_WAV_ASSERT(pCursor != NULL);\n    bytesRead = onRead(pUserData, pBufferOut, bytesToRead);\n    *pCursor += bytesRead;\n    return bytesRead;\n}\n#if 0\nMA_PRIVATE ma_bool32 ma_dr_wav__on_seek(ma_dr_wav_seek_proc onSeek, void* pUserData, int offset, ma_dr_wav_seek_origin origin, ma_uint64* pCursor)\n{\n    MA_DR_WAV_ASSERT(onSeek != NULL);\n    MA_DR_WAV_ASSERT(pCursor != NULL);\n    if (!onSeek(pUserData, offset, origin)) {\n        return MA_FALSE;\n    }\n    if (origin == ma_dr_wav_seek_origin_start) {\n        *pCursor = offset;\n    } else {\n        *pCursor += offset;\n    }\n    return MA_TRUE;\n}\n#endif\n#define MA_DR_WAV_SMPL_BYTES                    36\n#define MA_DR_WAV_SMPL_LOOP_BYTES               24\n#define MA_DR_WAV_INST_BYTES                    7\n#define MA_DR_WAV_ACID_BYTES                    24\n#define MA_DR_WAV_CUE_BYTES                     4\n#define MA_DR_WAV_BEXT_BYTES                    602\n#define MA_DR_WAV_BEXT_DESCRIPTION_BYTES        256\n#define MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES    32\n#define MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES     32\n#define MA_DR_WAV_BEXT_RESERVED_BYTES           180\n#define MA_DR_WAV_BEXT_UMID_BYTES               64\n#define MA_DR_WAV_CUE_POINT_BYTES               24\n#define MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES      4\n#define MA_DR_WAV_LIST_LABELLED_TEXT_BYTES      20\n#define MA_DR_WAV_METADATA_ALIGNMENT            8\ntypedef enum\n{\n    ma_dr_wav__metadata_parser_stage_count,\n    ma_dr_wav__metadata_parser_stage_read\n} ma_dr_wav__metadata_parser_stage;\ntypedef struct\n{\n    ma_dr_wav_read_proc onRead;\n    ma_dr_wav_seek_proc onSeek;\n    void *pReadSeekUserData;\n    ma_dr_wav__metadata_parser_stage stage;\n    ma_dr_wav_metadata *pMetadata;\n    ma_uint32 metadataCount;\n    ma_uint8 *pData;\n    ma_uint8 *pDataCursor;\n    ma_uint64 metadataCursor;\n    ma_uint64 extraCapacity;\n} ma_dr_wav__metadata_parser;\nMA_PRIVATE size_t ma_dr_wav__metadata_memory_capacity(ma_dr_wav__metadata_parser* pParser)\n{\n    ma_uint64 cap = sizeof(ma_dr_wav_metadata) * (ma_uint64)pParser->metadataCount + pParser->extraCapacity;\n    if (cap > MA_SIZE_MAX) {\n        return 0;\n    }\n    return (size_t)cap;\n}\nMA_PRIVATE ma_uint8* ma_dr_wav__metadata_get_memory(ma_dr_wav__metadata_parser* pParser, size_t size, size_t align)\n{\n    ma_uint8* pResult;\n    if (align) {\n        ma_uintptr modulo = (ma_uintptr)pParser->pDataCursor % align;\n        if (modulo != 0) {\n            pParser->pDataCursor += align - modulo;\n        }\n    }\n    pResult = pParser->pDataCursor;\n    MA_DR_WAV_ASSERT((pResult + size) <= (pParser->pData + ma_dr_wav__metadata_memory_capacity(pParser)));\n    pParser->pDataCursor += size;\n    return pResult;\n}\nMA_PRIVATE void ma_dr_wav__metadata_request_extra_memory_for_stage_2(ma_dr_wav__metadata_parser* pParser, size_t bytes, size_t align)\n{\n    size_t extra = bytes + (align ? (align - 1) : 0);\n    pParser->extraCapacity += extra;\n}\nMA_PRIVATE ma_result ma_dr_wav__metadata_alloc(ma_dr_wav__metadata_parser* pParser, ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pParser->extraCapacity != 0 || pParser->metadataCount != 0) {\n        pAllocationCallbacks->onFree(pParser->pData, pAllocationCallbacks->pUserData);\n        pParser->pData = (ma_uint8*)pAllocationCallbacks->onMalloc(ma_dr_wav__metadata_memory_capacity(pParser), pAllocationCallbacks->pUserData);\n        pParser->pDataCursor = pParser->pData;\n        if (pParser->pData == NULL) {\n            return MA_OUT_OF_MEMORY;\n        }\n        pParser->pMetadata = (ma_dr_wav_metadata*)ma_dr_wav__metadata_get_memory(pParser, sizeof(ma_dr_wav_metadata) * pParser->metadataCount, 1);\n        pParser->metadataCursor = 0;\n    }\n    return MA_SUCCESS;\n}\nMA_PRIVATE size_t ma_dr_wav__metadata_parser_read(ma_dr_wav__metadata_parser* pParser, void* pBufferOut, size_t bytesToRead, ma_uint64* pCursor)\n{\n    if (pCursor != NULL) {\n        return ma_dr_wav__on_read(pParser->onRead, pParser->pReadSeekUserData, pBufferOut, bytesToRead, pCursor);\n    } else {\n        return pParser->onRead(pParser->pReadSeekUserData, pBufferOut, bytesToRead);\n    }\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__read_smpl_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, const ma_dr_wav_chunk_header* pChunkHeader, ma_dr_wav_metadata* pMetadata)\n{\n    ma_uint8 smplHeaderData[MA_DR_WAV_SMPL_BYTES];\n    ma_uint64 totalBytesRead = 0;\n    size_t bytesJustRead;\n    if (pMetadata == NULL) {\n        return 0;\n    }\n    bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, smplHeaderData, sizeof(smplHeaderData), &totalBytesRead);\n    MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read);\n    MA_DR_WAV_ASSERT(pChunkHeader != NULL);\n    if (pMetadata != NULL && bytesJustRead == sizeof(smplHeaderData)) {\n        ma_uint32 iSampleLoop;\n        pMetadata->type                                     = ma_dr_wav_metadata_type_smpl;\n        pMetadata->data.smpl.manufacturerId                 = ma_dr_wav_bytes_to_u32(smplHeaderData + 0);\n        pMetadata->data.smpl.productId                      = ma_dr_wav_bytes_to_u32(smplHeaderData + 4);\n        pMetadata->data.smpl.samplePeriodNanoseconds        = ma_dr_wav_bytes_to_u32(smplHeaderData + 8);\n        pMetadata->data.smpl.midiUnityNote                  = ma_dr_wav_bytes_to_u32(smplHeaderData + 12);\n        pMetadata->data.smpl.midiPitchFraction              = ma_dr_wav_bytes_to_u32(smplHeaderData + 16);\n        pMetadata->data.smpl.smpteFormat                    = ma_dr_wav_bytes_to_u32(smplHeaderData + 20);\n        pMetadata->data.smpl.smpteOffset                    = ma_dr_wav_bytes_to_u32(smplHeaderData + 24);\n        pMetadata->data.smpl.sampleLoopCount                = ma_dr_wav_bytes_to_u32(smplHeaderData + 28);\n        pMetadata->data.smpl.samplerSpecificDataSizeInBytes = ma_dr_wav_bytes_to_u32(smplHeaderData + 32);\n        if (pMetadata->data.smpl.sampleLoopCount == (pChunkHeader->sizeInBytes - MA_DR_WAV_SMPL_BYTES) / MA_DR_WAV_SMPL_LOOP_BYTES) {\n            pMetadata->data.smpl.pLoops = (ma_dr_wav_smpl_loop*)ma_dr_wav__metadata_get_memory(pParser, sizeof(ma_dr_wav_smpl_loop) * pMetadata->data.smpl.sampleLoopCount, MA_DR_WAV_METADATA_ALIGNMENT);\n            for (iSampleLoop = 0; iSampleLoop < pMetadata->data.smpl.sampleLoopCount; ++iSampleLoop) {\n                ma_uint8 smplLoopData[MA_DR_WAV_SMPL_LOOP_BYTES];\n                bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, smplLoopData, sizeof(smplLoopData), &totalBytesRead);\n                if (bytesJustRead == sizeof(smplLoopData)) {\n                    pMetadata->data.smpl.pLoops[iSampleLoop].cuePointId            = ma_dr_wav_bytes_to_u32(smplLoopData + 0);\n                    pMetadata->data.smpl.pLoops[iSampleLoop].type                  = ma_dr_wav_bytes_to_u32(smplLoopData + 4);\n                    pMetadata->data.smpl.pLoops[iSampleLoop].firstSampleByteOffset = ma_dr_wav_bytes_to_u32(smplLoopData + 8);\n                    pMetadata->data.smpl.pLoops[iSampleLoop].lastSampleByteOffset  = ma_dr_wav_bytes_to_u32(smplLoopData + 12);\n                    pMetadata->data.smpl.pLoops[iSampleLoop].sampleFraction        = ma_dr_wav_bytes_to_u32(smplLoopData + 16);\n                    pMetadata->data.smpl.pLoops[iSampleLoop].playCount             = ma_dr_wav_bytes_to_u32(smplLoopData + 20);\n                } else {\n                    break;\n                }\n            }\n            if (pMetadata->data.smpl.samplerSpecificDataSizeInBytes > 0) {\n                pMetadata->data.smpl.pSamplerSpecificData = ma_dr_wav__metadata_get_memory(pParser, pMetadata->data.smpl.samplerSpecificDataSizeInBytes, 1);\n                MA_DR_WAV_ASSERT(pMetadata->data.smpl.pSamplerSpecificData != NULL);\n                ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.smpl.pSamplerSpecificData, pMetadata->data.smpl.samplerSpecificDataSizeInBytes, &totalBytesRead);\n            }\n        }\n    }\n    return totalBytesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__read_cue_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, const ma_dr_wav_chunk_header* pChunkHeader, ma_dr_wav_metadata* pMetadata)\n{\n    ma_uint8 cueHeaderSectionData[MA_DR_WAV_CUE_BYTES];\n    ma_uint64 totalBytesRead = 0;\n    size_t bytesJustRead;\n    if (pMetadata == NULL) {\n        return 0;\n    }\n    bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, cueHeaderSectionData, sizeof(cueHeaderSectionData), &totalBytesRead);\n    MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read);\n    if (bytesJustRead == sizeof(cueHeaderSectionData)) {\n        pMetadata->type                   = ma_dr_wav_metadata_type_cue;\n        pMetadata->data.cue.cuePointCount = ma_dr_wav_bytes_to_u32(cueHeaderSectionData);\n        if (pMetadata->data.cue.cuePointCount == (pChunkHeader->sizeInBytes - MA_DR_WAV_CUE_BYTES) / MA_DR_WAV_CUE_POINT_BYTES) {\n            pMetadata->data.cue.pCuePoints    = (ma_dr_wav_cue_point*)ma_dr_wav__metadata_get_memory(pParser, sizeof(ma_dr_wav_cue_point) * pMetadata->data.cue.cuePointCount, MA_DR_WAV_METADATA_ALIGNMENT);\n            MA_DR_WAV_ASSERT(pMetadata->data.cue.pCuePoints != NULL);\n            if (pMetadata->data.cue.cuePointCount > 0) {\n                ma_uint32 iCuePoint;\n                for (iCuePoint = 0; iCuePoint < pMetadata->data.cue.cuePointCount; ++iCuePoint) {\n                    ma_uint8 cuePointData[MA_DR_WAV_CUE_POINT_BYTES];\n                    bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, cuePointData, sizeof(cuePointData), &totalBytesRead);\n                    if (bytesJustRead == sizeof(cuePointData)) {\n                        pMetadata->data.cue.pCuePoints[iCuePoint].id                = ma_dr_wav_bytes_to_u32(cuePointData + 0);\n                        pMetadata->data.cue.pCuePoints[iCuePoint].playOrderPosition = ma_dr_wav_bytes_to_u32(cuePointData + 4);\n                        pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId[0]    = cuePointData[8];\n                        pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId[1]    = cuePointData[9];\n                        pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId[2]    = cuePointData[10];\n                        pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId[3]    = cuePointData[11];\n                        pMetadata->data.cue.pCuePoints[iCuePoint].chunkStart        = ma_dr_wav_bytes_to_u32(cuePointData + 12);\n                        pMetadata->data.cue.pCuePoints[iCuePoint].blockStart        = ma_dr_wav_bytes_to_u32(cuePointData + 16);\n                        pMetadata->data.cue.pCuePoints[iCuePoint].sampleByteOffset  = ma_dr_wav_bytes_to_u32(cuePointData + 20);\n                    } else {\n                        break;\n                    }\n                }\n            }\n        }\n    }\n    return totalBytesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__read_inst_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata)\n{\n    ma_uint8 instData[MA_DR_WAV_INST_BYTES];\n    ma_uint64 bytesRead;\n    if (pMetadata == NULL) {\n        return 0;\n    }\n    bytesRead = ma_dr_wav__metadata_parser_read(pParser, instData, sizeof(instData), NULL);\n    MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read);\n    if (bytesRead == sizeof(instData)) {\n        pMetadata->type                    = ma_dr_wav_metadata_type_inst;\n        pMetadata->data.inst.midiUnityNote = (ma_int8)instData[0];\n        pMetadata->data.inst.fineTuneCents = (ma_int8)instData[1];\n        pMetadata->data.inst.gainDecibels  = (ma_int8)instData[2];\n        pMetadata->data.inst.lowNote       = (ma_int8)instData[3];\n        pMetadata->data.inst.highNote      = (ma_int8)instData[4];\n        pMetadata->data.inst.lowVelocity   = (ma_int8)instData[5];\n        pMetadata->data.inst.highVelocity  = (ma_int8)instData[6];\n    }\n    return bytesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__read_acid_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata)\n{\n    ma_uint8 acidData[MA_DR_WAV_ACID_BYTES];\n    ma_uint64 bytesRead;\n    if (pMetadata == NULL) {\n        return 0;\n    }\n    bytesRead = ma_dr_wav__metadata_parser_read(pParser, acidData, sizeof(acidData), NULL);\n    MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read);\n    if (bytesRead == sizeof(acidData)) {\n        pMetadata->type                       = ma_dr_wav_metadata_type_acid;\n        pMetadata->data.acid.flags            = ma_dr_wav_bytes_to_u32(acidData + 0);\n        pMetadata->data.acid.midiUnityNote    = ma_dr_wav_bytes_to_u16(acidData + 4);\n        pMetadata->data.acid.reserved1        = ma_dr_wav_bytes_to_u16(acidData + 6);\n        pMetadata->data.acid.reserved2        = ma_dr_wav_bytes_to_f32(acidData + 8);\n        pMetadata->data.acid.numBeats         = ma_dr_wav_bytes_to_u32(acidData + 12);\n        pMetadata->data.acid.meterDenominator = ma_dr_wav_bytes_to_u16(acidData + 16);\n        pMetadata->data.acid.meterNumerator   = ma_dr_wav_bytes_to_u16(acidData + 18);\n        pMetadata->data.acid.tempo            = ma_dr_wav_bytes_to_f32(acidData + 20);\n    }\n    return bytesRead;\n}\nMA_PRIVATE size_t ma_dr_wav__strlen(const char* str)\n{\n    size_t result = 0;\n    while (*str++) {\n        result += 1;\n    }\n    return result;\n}\nMA_PRIVATE size_t ma_dr_wav__strlen_clamped(const char* str, size_t maxToRead)\n{\n    size_t result = 0;\n    while (*str++ && result < maxToRead) {\n        result += 1;\n    }\n    return result;\n}\nMA_PRIVATE char* ma_dr_wav__metadata_copy_string(ma_dr_wav__metadata_parser* pParser, const char* str, size_t maxToRead)\n{\n    size_t len = ma_dr_wav__strlen_clamped(str, maxToRead);\n    if (len) {\n        char* result = (char*)ma_dr_wav__metadata_get_memory(pParser, len + 1, 1);\n        MA_DR_WAV_ASSERT(result != NULL);\n        MA_DR_WAV_COPY_MEMORY(result, str, len);\n        result[len] = '\\0';\n        return result;\n    } else {\n        return NULL;\n    }\n}\ntypedef struct\n{\n    const void* pBuffer;\n    size_t sizeInBytes;\n    size_t cursor;\n} ma_dr_wav_buffer_reader;\nMA_PRIVATE ma_result ma_dr_wav_buffer_reader_init(const void* pBuffer, size_t sizeInBytes, ma_dr_wav_buffer_reader* pReader)\n{\n    MA_DR_WAV_ASSERT(pBuffer != NULL);\n    MA_DR_WAV_ASSERT(pReader != NULL);\n    MA_DR_WAV_ZERO_OBJECT(pReader);\n    pReader->pBuffer     = pBuffer;\n    pReader->sizeInBytes = sizeInBytes;\n    pReader->cursor      = 0;\n    return MA_SUCCESS;\n}\nMA_PRIVATE const void* ma_dr_wav_buffer_reader_ptr(const ma_dr_wav_buffer_reader* pReader)\n{\n    MA_DR_WAV_ASSERT(pReader != NULL);\n    return ma_dr_wav_offset_ptr(pReader->pBuffer, pReader->cursor);\n}\nMA_PRIVATE ma_result ma_dr_wav_buffer_reader_seek(ma_dr_wav_buffer_reader* pReader, size_t bytesToSeek)\n{\n    MA_DR_WAV_ASSERT(pReader != NULL);\n    if (pReader->cursor + bytesToSeek > pReader->sizeInBytes) {\n        return MA_BAD_SEEK;\n    }\n    pReader->cursor += bytesToSeek;\n    return MA_SUCCESS;\n}\nMA_PRIVATE ma_result ma_dr_wav_buffer_reader_read(ma_dr_wav_buffer_reader* pReader, void* pDst, size_t bytesToRead, size_t* pBytesRead)\n{\n    ma_result result = MA_SUCCESS;\n    size_t bytesRemaining;\n    MA_DR_WAV_ASSERT(pReader != NULL);\n    if (pBytesRead != NULL) {\n        *pBytesRead = 0;\n    }\n    bytesRemaining = (pReader->sizeInBytes - pReader->cursor);\n    if (bytesToRead > bytesRemaining) {\n        bytesToRead = bytesRemaining;\n    }\n    if (pDst == NULL) {\n        result = ma_dr_wav_buffer_reader_seek(pReader, bytesToRead);\n    } else {\n        MA_DR_WAV_COPY_MEMORY(pDst, ma_dr_wav_buffer_reader_ptr(pReader), bytesToRead);\n        pReader->cursor += bytesToRead;\n    }\n    MA_DR_WAV_ASSERT(pReader->cursor <= pReader->sizeInBytes);\n    if (result == MA_SUCCESS) {\n        if (pBytesRead != NULL) {\n            *pBytesRead = bytesToRead;\n        }\n    }\n    return MA_SUCCESS;\n}\nMA_PRIVATE ma_result ma_dr_wav_buffer_reader_read_u16(ma_dr_wav_buffer_reader* pReader, ma_uint16* pDst)\n{\n    ma_result result;\n    size_t bytesRead;\n    ma_uint8 data[2];\n    MA_DR_WAV_ASSERT(pReader != NULL);\n    MA_DR_WAV_ASSERT(pDst != NULL);\n    *pDst = 0;\n    result = ma_dr_wav_buffer_reader_read(pReader, data, sizeof(*pDst), &bytesRead);\n    if (result != MA_SUCCESS || bytesRead != sizeof(*pDst)) {\n        return result;\n    }\n    *pDst = ma_dr_wav_bytes_to_u16(data);\n    return MA_SUCCESS;\n}\nMA_PRIVATE ma_result ma_dr_wav_buffer_reader_read_u32(ma_dr_wav_buffer_reader* pReader, ma_uint32* pDst)\n{\n    ma_result result;\n    size_t bytesRead;\n    ma_uint8 data[4];\n    MA_DR_WAV_ASSERT(pReader != NULL);\n    MA_DR_WAV_ASSERT(pDst != NULL);\n    *pDst = 0;\n    result = ma_dr_wav_buffer_reader_read(pReader, data, sizeof(*pDst), &bytesRead);\n    if (result != MA_SUCCESS || bytesRead != sizeof(*pDst)) {\n        return result;\n    }\n    *pDst = ma_dr_wav_bytes_to_u32(data);\n    return MA_SUCCESS;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__read_bext_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata, ma_uint64 chunkSize)\n{\n    ma_uint8 bextData[MA_DR_WAV_BEXT_BYTES];\n    size_t bytesRead = ma_dr_wav__metadata_parser_read(pParser, bextData, sizeof(bextData), NULL);\n    MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read);\n    if (bytesRead == sizeof(bextData)) {\n        ma_dr_wav_buffer_reader reader;\n        ma_uint32 timeReferenceLow;\n        ma_uint32 timeReferenceHigh;\n        size_t extraBytes;\n        pMetadata->type = ma_dr_wav_metadata_type_bext;\n        if (ma_dr_wav_buffer_reader_init(bextData, bytesRead, &reader) == MA_SUCCESS) {\n            pMetadata->data.bext.pDescription = ma_dr_wav__metadata_copy_string(pParser, (const char*)ma_dr_wav_buffer_reader_ptr(&reader), MA_DR_WAV_BEXT_DESCRIPTION_BYTES);\n            ma_dr_wav_buffer_reader_seek(&reader, MA_DR_WAV_BEXT_DESCRIPTION_BYTES);\n            pMetadata->data.bext.pOriginatorName = ma_dr_wav__metadata_copy_string(pParser, (const char*)ma_dr_wav_buffer_reader_ptr(&reader), MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES);\n            ma_dr_wav_buffer_reader_seek(&reader, MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES);\n            pMetadata->data.bext.pOriginatorReference = ma_dr_wav__metadata_copy_string(pParser, (const char*)ma_dr_wav_buffer_reader_ptr(&reader), MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES);\n            ma_dr_wav_buffer_reader_seek(&reader, MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES);\n            ma_dr_wav_buffer_reader_read(&reader, pMetadata->data.bext.pOriginationDate, sizeof(pMetadata->data.bext.pOriginationDate), NULL);\n            ma_dr_wav_buffer_reader_read(&reader, pMetadata->data.bext.pOriginationTime, sizeof(pMetadata->data.bext.pOriginationTime), NULL);\n            ma_dr_wav_buffer_reader_read_u32(&reader, &timeReferenceLow);\n            ma_dr_wav_buffer_reader_read_u32(&reader, &timeReferenceHigh);\n            pMetadata->data.bext.timeReference = ((ma_uint64)timeReferenceHigh << 32) + timeReferenceLow;\n            ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.version);\n            pMetadata->data.bext.pUMID = ma_dr_wav__metadata_get_memory(pParser, MA_DR_WAV_BEXT_UMID_BYTES, 1);\n            ma_dr_wav_buffer_reader_read(&reader, pMetadata->data.bext.pUMID, MA_DR_WAV_BEXT_UMID_BYTES, NULL);\n            ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.loudnessValue);\n            ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.loudnessRange);\n            ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.maxTruePeakLevel);\n            ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.maxMomentaryLoudness);\n            ma_dr_wav_buffer_reader_read_u16(&reader, &pMetadata->data.bext.maxShortTermLoudness);\n            MA_DR_WAV_ASSERT((ma_dr_wav_offset_ptr(ma_dr_wav_buffer_reader_ptr(&reader), MA_DR_WAV_BEXT_RESERVED_BYTES)) == (bextData + MA_DR_WAV_BEXT_BYTES));\n            extraBytes = (size_t)(chunkSize - MA_DR_WAV_BEXT_BYTES);\n            if (extraBytes > 0) {\n                pMetadata->data.bext.pCodingHistory = (char*)ma_dr_wav__metadata_get_memory(pParser, extraBytes + 1, 1);\n                MA_DR_WAV_ASSERT(pMetadata->data.bext.pCodingHistory != NULL);\n                bytesRead += ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.bext.pCodingHistory, extraBytes, NULL);\n                pMetadata->data.bext.codingHistorySize = (ma_uint32)ma_dr_wav__strlen(pMetadata->data.bext.pCodingHistory);\n            } else {\n                pMetadata->data.bext.pCodingHistory    = NULL;\n                pMetadata->data.bext.codingHistorySize = 0;\n            }\n        }\n    }\n    return bytesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__read_list_label_or_note_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata, ma_uint64 chunkSize, ma_dr_wav_metadata_type type)\n{\n    ma_uint8 cueIDBuffer[MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES];\n    ma_uint64 totalBytesRead = 0;\n    size_t bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, cueIDBuffer, sizeof(cueIDBuffer), &totalBytesRead);\n    MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read);\n    if (bytesJustRead == sizeof(cueIDBuffer)) {\n        ma_uint32 sizeIncludingNullTerminator;\n        pMetadata->type = type;\n        pMetadata->data.labelOrNote.cuePointId = ma_dr_wav_bytes_to_u32(cueIDBuffer);\n        sizeIncludingNullTerminator = (ma_uint32)chunkSize - MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES;\n        if (sizeIncludingNullTerminator > 0) {\n            pMetadata->data.labelOrNote.stringLength = sizeIncludingNullTerminator - 1;\n            pMetadata->data.labelOrNote.pString      = (char*)ma_dr_wav__metadata_get_memory(pParser, sizeIncludingNullTerminator, 1);\n            MA_DR_WAV_ASSERT(pMetadata->data.labelOrNote.pString != NULL);\n            ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.labelOrNote.pString, sizeIncludingNullTerminator, &totalBytesRead);\n        } else {\n            pMetadata->data.labelOrNote.stringLength = 0;\n            pMetadata->data.labelOrNote.pString      = NULL;\n        }\n    }\n    return totalBytesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__read_list_labelled_cue_region_to_metadata_obj(ma_dr_wav__metadata_parser* pParser, ma_dr_wav_metadata* pMetadata, ma_uint64 chunkSize)\n{\n    ma_uint8 buffer[MA_DR_WAV_LIST_LABELLED_TEXT_BYTES];\n    ma_uint64 totalBytesRead = 0;\n    size_t bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, sizeof(buffer), &totalBytesRead);\n    MA_DR_WAV_ASSERT(pParser->stage == ma_dr_wav__metadata_parser_stage_read);\n    if (bytesJustRead == sizeof(buffer)) {\n        ma_uint32 sizeIncludingNullTerminator;\n        pMetadata->type                                = ma_dr_wav_metadata_type_list_labelled_cue_region;\n        pMetadata->data.labelledCueRegion.cuePointId   = ma_dr_wav_bytes_to_u32(buffer + 0);\n        pMetadata->data.labelledCueRegion.sampleLength = ma_dr_wav_bytes_to_u32(buffer + 4);\n        pMetadata->data.labelledCueRegion.purposeId[0] = buffer[8];\n        pMetadata->data.labelledCueRegion.purposeId[1] = buffer[9];\n        pMetadata->data.labelledCueRegion.purposeId[2] = buffer[10];\n        pMetadata->data.labelledCueRegion.purposeId[3] = buffer[11];\n        pMetadata->data.labelledCueRegion.country      = ma_dr_wav_bytes_to_u16(buffer + 12);\n        pMetadata->data.labelledCueRegion.language     = ma_dr_wav_bytes_to_u16(buffer + 14);\n        pMetadata->data.labelledCueRegion.dialect      = ma_dr_wav_bytes_to_u16(buffer + 16);\n        pMetadata->data.labelledCueRegion.codePage     = ma_dr_wav_bytes_to_u16(buffer + 18);\n        sizeIncludingNullTerminator = (ma_uint32)chunkSize - MA_DR_WAV_LIST_LABELLED_TEXT_BYTES;\n        if (sizeIncludingNullTerminator > 0) {\n            pMetadata->data.labelledCueRegion.stringLength = sizeIncludingNullTerminator - 1;\n            pMetadata->data.labelledCueRegion.pString      = (char*)ma_dr_wav__metadata_get_memory(pParser, sizeIncludingNullTerminator, 1);\n            MA_DR_WAV_ASSERT(pMetadata->data.labelledCueRegion.pString != NULL);\n            ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.labelledCueRegion.pString, sizeIncludingNullTerminator, &totalBytesRead);\n        } else {\n            pMetadata->data.labelledCueRegion.stringLength = 0;\n            pMetadata->data.labelledCueRegion.pString      = NULL;\n        }\n    }\n    return totalBytesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__metadata_process_info_text_chunk(ma_dr_wav__metadata_parser* pParser, ma_uint64 chunkSize, ma_dr_wav_metadata_type type)\n{\n    ma_uint64 bytesRead = 0;\n    ma_uint32 stringSizeWithNullTerminator = (ma_uint32)chunkSize;\n    if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) {\n        pParser->metadataCount += 1;\n        ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, stringSizeWithNullTerminator, 1);\n    } else {\n        ma_dr_wav_metadata* pMetadata = &pParser->pMetadata[pParser->metadataCursor];\n        pMetadata->type = type;\n        if (stringSizeWithNullTerminator > 0) {\n            pMetadata->data.infoText.stringLength = stringSizeWithNullTerminator - 1;\n            pMetadata->data.infoText.pString = (char*)ma_dr_wav__metadata_get_memory(pParser, stringSizeWithNullTerminator, 1);\n            MA_DR_WAV_ASSERT(pMetadata->data.infoText.pString != NULL);\n            bytesRead = ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.infoText.pString, (size_t)stringSizeWithNullTerminator, NULL);\n            if (bytesRead == chunkSize) {\n                pParser->metadataCursor += 1;\n            } else {\n            }\n        } else {\n            pMetadata->data.infoText.stringLength = 0;\n            pMetadata->data.infoText.pString      = NULL;\n            pParser->metadataCursor += 1;\n        }\n    }\n    return bytesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__metadata_process_unknown_chunk(ma_dr_wav__metadata_parser* pParser, const ma_uint8* pChunkId, ma_uint64 chunkSize, ma_dr_wav_metadata_location location)\n{\n    ma_uint64 bytesRead = 0;\n    if (location == ma_dr_wav_metadata_location_invalid) {\n        return 0;\n    }\n    if (ma_dr_wav_fourcc_equal(pChunkId, \"data\") || ma_dr_wav_fourcc_equal(pChunkId, \"fmt \") || ma_dr_wav_fourcc_equal(pChunkId, \"fact\")) {\n        return 0;\n    }\n    if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) {\n        pParser->metadataCount += 1;\n        ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, (size_t)chunkSize, 1);\n    } else {\n        ma_dr_wav_metadata* pMetadata = &pParser->pMetadata[pParser->metadataCursor];\n        pMetadata->type                         = ma_dr_wav_metadata_type_unknown;\n        pMetadata->data.unknown.chunkLocation   = location;\n        pMetadata->data.unknown.id[0]           = pChunkId[0];\n        pMetadata->data.unknown.id[1]           = pChunkId[1];\n        pMetadata->data.unknown.id[2]           = pChunkId[2];\n        pMetadata->data.unknown.id[3]           = pChunkId[3];\n        pMetadata->data.unknown.dataSizeInBytes = (ma_uint32)chunkSize;\n        pMetadata->data.unknown.pData           = (ma_uint8 *)ma_dr_wav__metadata_get_memory(pParser, (size_t)chunkSize, 1);\n        MA_DR_WAV_ASSERT(pMetadata->data.unknown.pData != NULL);\n        bytesRead = ma_dr_wav__metadata_parser_read(pParser, pMetadata->data.unknown.pData, pMetadata->data.unknown.dataSizeInBytes, NULL);\n        if (bytesRead == pMetadata->data.unknown.dataSizeInBytes) {\n            pParser->metadataCursor += 1;\n        } else {\n        }\n    }\n    return bytesRead;\n}\nMA_PRIVATE ma_bool32 ma_dr_wav__chunk_matches(ma_dr_wav_metadata_type allowedMetadataTypes, const ma_uint8* pChunkID, ma_dr_wav_metadata_type type, const char* pID)\n{\n    return (allowedMetadataTypes & type) && ma_dr_wav_fourcc_equal(pChunkID, pID);\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__metadata_process_chunk(ma_dr_wav__metadata_parser* pParser, const ma_dr_wav_chunk_header* pChunkHeader, ma_dr_wav_metadata_type allowedMetadataTypes)\n{\n    const ma_uint8 *pChunkID = pChunkHeader->id.fourcc;\n    ma_uint64 bytesRead = 0;\n    if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_smpl, \"smpl\")) {\n        if (pChunkHeader->sizeInBytes >= MA_DR_WAV_SMPL_BYTES) {\n            if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) {\n                ma_uint8 buffer[4];\n                size_t bytesJustRead;\n                if (!pParser->onSeek(pParser->pReadSeekUserData, 28, ma_dr_wav_seek_origin_current)) {\n                    return bytesRead;\n                }\n                bytesRead += 28;\n                bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, sizeof(buffer), &bytesRead);\n                if (bytesJustRead == sizeof(buffer)) {\n                    ma_uint32 loopCount = ma_dr_wav_bytes_to_u32(buffer);\n                    ma_uint64 calculatedLoopCount;\n                    calculatedLoopCount = (pChunkHeader->sizeInBytes - MA_DR_WAV_SMPL_BYTES) / MA_DR_WAV_SMPL_LOOP_BYTES;\n                    if (calculatedLoopCount == loopCount) {\n                        bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, sizeof(buffer), &bytesRead);\n                        if (bytesJustRead == sizeof(buffer)) {\n                            ma_uint32 samplerSpecificDataSizeInBytes = ma_dr_wav_bytes_to_u32(buffer);\n                            pParser->metadataCount += 1;\n                            ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, sizeof(ma_dr_wav_smpl_loop) * loopCount, MA_DR_WAV_METADATA_ALIGNMENT);\n                            ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, samplerSpecificDataSizeInBytes, 1);\n                        }\n                    } else {\n                    }\n                }\n            } else {\n                bytesRead = ma_dr_wav__read_smpl_to_metadata_obj(pParser, pChunkHeader, &pParser->pMetadata[pParser->metadataCursor]);\n                if (bytesRead == pChunkHeader->sizeInBytes) {\n                    pParser->metadataCursor += 1;\n                } else {\n                }\n            }\n        } else {\n        }\n    } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_inst, \"inst\")) {\n        if (pChunkHeader->sizeInBytes == MA_DR_WAV_INST_BYTES) {\n            if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) {\n                pParser->metadataCount += 1;\n            } else {\n                bytesRead = ma_dr_wav__read_inst_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor]);\n                if (bytesRead == pChunkHeader->sizeInBytes) {\n                    pParser->metadataCursor += 1;\n                } else {\n                }\n            }\n        } else {\n        }\n    } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_acid, \"acid\")) {\n        if (pChunkHeader->sizeInBytes == MA_DR_WAV_ACID_BYTES) {\n            if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) {\n                pParser->metadataCount += 1;\n            } else {\n                bytesRead = ma_dr_wav__read_acid_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor]);\n                if (bytesRead == pChunkHeader->sizeInBytes) {\n                    pParser->metadataCursor += 1;\n                } else {\n                }\n            }\n        } else {\n        }\n    } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_cue, \"cue \")) {\n        if (pChunkHeader->sizeInBytes >= MA_DR_WAV_CUE_BYTES) {\n            if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) {\n                size_t cueCount;\n                pParser->metadataCount += 1;\n                cueCount = (size_t)(pChunkHeader->sizeInBytes - MA_DR_WAV_CUE_BYTES) / MA_DR_WAV_CUE_POINT_BYTES;\n                ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, sizeof(ma_dr_wav_cue_point) * cueCount, MA_DR_WAV_METADATA_ALIGNMENT);\n            } else {\n                bytesRead = ma_dr_wav__read_cue_to_metadata_obj(pParser, pChunkHeader, &pParser->pMetadata[pParser->metadataCursor]);\n                if (bytesRead == pChunkHeader->sizeInBytes) {\n                    pParser->metadataCursor += 1;\n                } else {\n                }\n            }\n        } else {\n        }\n    } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, pChunkID, ma_dr_wav_metadata_type_bext, \"bext\")) {\n        if (pChunkHeader->sizeInBytes >= MA_DR_WAV_BEXT_BYTES) {\n            if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) {\n                char buffer[MA_DR_WAV_BEXT_DESCRIPTION_BYTES + 1];\n                size_t allocSizeNeeded = MA_DR_WAV_BEXT_UMID_BYTES;\n                size_t bytesJustRead;\n                buffer[MA_DR_WAV_BEXT_DESCRIPTION_BYTES] = '\\0';\n                bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, MA_DR_WAV_BEXT_DESCRIPTION_BYTES, &bytesRead);\n                if (bytesJustRead != MA_DR_WAV_BEXT_DESCRIPTION_BYTES) {\n                    return bytesRead;\n                }\n                allocSizeNeeded += ma_dr_wav__strlen(buffer) + 1;\n                buffer[MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES] = '\\0';\n                bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES, &bytesRead);\n                if (bytesJustRead != MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES) {\n                    return bytesRead;\n                }\n                allocSizeNeeded += ma_dr_wav__strlen(buffer) + 1;\n                buffer[MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES] = '\\0';\n                bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, buffer, MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES, &bytesRead);\n                if (bytesJustRead != MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES) {\n                    return bytesRead;\n                }\n                allocSizeNeeded += ma_dr_wav__strlen(buffer) + 1;\n                allocSizeNeeded += (size_t)pChunkHeader->sizeInBytes - MA_DR_WAV_BEXT_BYTES;\n                ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, allocSizeNeeded, 1);\n                pParser->metadataCount += 1;\n            } else {\n                bytesRead = ma_dr_wav__read_bext_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor], pChunkHeader->sizeInBytes);\n                if (bytesRead == pChunkHeader->sizeInBytes) {\n                    pParser->metadataCursor += 1;\n                } else {\n                }\n            }\n        } else {\n        }\n    } else if (ma_dr_wav_fourcc_equal(pChunkID, \"LIST\") || ma_dr_wav_fourcc_equal(pChunkID, \"list\")) {\n        ma_dr_wav_metadata_location listType = ma_dr_wav_metadata_location_invalid;\n        while (bytesRead < pChunkHeader->sizeInBytes) {\n            ma_uint8 subchunkId[4];\n            ma_uint8 subchunkSizeBuffer[4];\n            ma_uint64 subchunkDataSize;\n            ma_uint64 subchunkBytesRead = 0;\n            ma_uint64 bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, subchunkId, sizeof(subchunkId), &bytesRead);\n            if (bytesJustRead != sizeof(subchunkId)) {\n                break;\n            }\n            if (ma_dr_wav_fourcc_equal(subchunkId, \"adtl\")) {\n                listType = ma_dr_wav_metadata_location_inside_adtl_list;\n                continue;\n            } else if (ma_dr_wav_fourcc_equal(subchunkId, \"INFO\")) {\n                listType = ma_dr_wav_metadata_location_inside_info_list;\n                continue;\n            }\n            bytesJustRead = ma_dr_wav__metadata_parser_read(pParser, subchunkSizeBuffer, sizeof(subchunkSizeBuffer), &bytesRead);\n            if (bytesJustRead != sizeof(subchunkSizeBuffer)) {\n                break;\n            }\n            subchunkDataSize = ma_dr_wav_bytes_to_u32(subchunkSizeBuffer);\n            if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_label, \"labl\") || ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_note, \"note\")) {\n                if (subchunkDataSize >= MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES) {\n                    ma_uint64 stringSizeWithNullTerm = subchunkDataSize - MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES;\n                    if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) {\n                        pParser->metadataCount += 1;\n                        ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, (size_t)stringSizeWithNullTerm, 1);\n                    } else {\n                        subchunkBytesRead = ma_dr_wav__read_list_label_or_note_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor], subchunkDataSize, ma_dr_wav_fourcc_equal(subchunkId, \"labl\") ? ma_dr_wav_metadata_type_list_label : ma_dr_wav_metadata_type_list_note);\n                        if (subchunkBytesRead == subchunkDataSize) {\n                            pParser->metadataCursor += 1;\n                        } else {\n                        }\n                    }\n                } else {\n                }\n            } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_labelled_cue_region, \"ltxt\")) {\n                if (subchunkDataSize >= MA_DR_WAV_LIST_LABELLED_TEXT_BYTES) {\n                    ma_uint64 stringSizeWithNullTerminator = subchunkDataSize - MA_DR_WAV_LIST_LABELLED_TEXT_BYTES;\n                    if (pParser->stage == ma_dr_wav__metadata_parser_stage_count) {\n                        pParser->metadataCount += 1;\n                        ma_dr_wav__metadata_request_extra_memory_for_stage_2(pParser, (size_t)stringSizeWithNullTerminator, 1);\n                    } else {\n                        subchunkBytesRead = ma_dr_wav__read_list_labelled_cue_region_to_metadata_obj(pParser, &pParser->pMetadata[pParser->metadataCursor], subchunkDataSize);\n                        if (subchunkBytesRead == subchunkDataSize) {\n                            pParser->metadataCursor += 1;\n                        } else {\n                        }\n                    }\n                } else {\n                }\n            } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_software, \"ISFT\")) {\n                subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize,  ma_dr_wav_metadata_type_list_info_software);\n            } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_copyright, \"ICOP\")) {\n                subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize,  ma_dr_wav_metadata_type_list_info_copyright);\n            } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_title, \"INAM\")) {\n                subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize,  ma_dr_wav_metadata_type_list_info_title);\n            } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_artist, \"IART\")) {\n                subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize,  ma_dr_wav_metadata_type_list_info_artist);\n            } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_comment, \"ICMT\")) {\n                subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize,  ma_dr_wav_metadata_type_list_info_comment);\n            } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_date, \"ICRD\")) {\n                subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize,  ma_dr_wav_metadata_type_list_info_date);\n            } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_genre, \"IGNR\")) {\n                subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize,  ma_dr_wav_metadata_type_list_info_genre);\n            } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_album, \"IPRD\")) {\n                subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize,  ma_dr_wav_metadata_type_list_info_album);\n            } else if (ma_dr_wav__chunk_matches(allowedMetadataTypes, subchunkId, ma_dr_wav_metadata_type_list_info_tracknumber, \"ITRK\")) {\n                subchunkBytesRead = ma_dr_wav__metadata_process_info_text_chunk(pParser, subchunkDataSize,  ma_dr_wav_metadata_type_list_info_tracknumber);\n            } else if ((allowedMetadataTypes & ma_dr_wav_metadata_type_unknown) != 0) {\n                subchunkBytesRead = ma_dr_wav__metadata_process_unknown_chunk(pParser, subchunkId, subchunkDataSize, listType);\n            }\n            bytesRead += subchunkBytesRead;\n            MA_DR_WAV_ASSERT(subchunkBytesRead <= subchunkDataSize);\n            if (subchunkBytesRead < subchunkDataSize) {\n                ma_uint64 bytesToSeek = subchunkDataSize - subchunkBytesRead;\n                if (!pParser->onSeek(pParser->pReadSeekUserData, (int)bytesToSeek, ma_dr_wav_seek_origin_current)) {\n                    break;\n                }\n                bytesRead += bytesToSeek;\n            }\n            if ((subchunkDataSize % 2) == 1) {\n                if (!pParser->onSeek(pParser->pReadSeekUserData, 1, ma_dr_wav_seek_origin_current)) {\n                    break;\n                }\n                bytesRead += 1;\n            }\n        }\n    } else if ((allowedMetadataTypes & ma_dr_wav_metadata_type_unknown) != 0) {\n        bytesRead = ma_dr_wav__metadata_process_unknown_chunk(pParser, pChunkID, pChunkHeader->sizeInBytes, ma_dr_wav_metadata_location_top_level);\n    }\n    return bytesRead;\n}\nMA_PRIVATE ma_uint32 ma_dr_wav_get_bytes_per_pcm_frame(ma_dr_wav* pWav)\n{\n    ma_uint32 bytesPerFrame;\n    if ((pWav->bitsPerSample & 0x7) == 0) {\n        bytesPerFrame = (pWav->bitsPerSample * pWav->fmt.channels) >> 3;\n    } else {\n        bytesPerFrame = pWav->fmt.blockAlign;\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ALAW || pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_MULAW) {\n        if (bytesPerFrame != pWav->fmt.channels) {\n            return 0;\n        }\n    }\n    return bytesPerFrame;\n}\nMA_API ma_uint16 ma_dr_wav_fmt_get_format(const ma_dr_wav_fmt* pFMT)\n{\n    if (pFMT == NULL) {\n        return 0;\n    }\n    if (pFMT->formatTag != MA_DR_WAVE_FORMAT_EXTENSIBLE) {\n        return pFMT->formatTag;\n    } else {\n        return ma_dr_wav_bytes_to_u16(pFMT->subFormat);\n    }\n}\nMA_PRIVATE ma_bool32 ma_dr_wav_preinit(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pReadSeekUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pWav == NULL || onRead == NULL || onSeek == NULL) {\n        return MA_FALSE;\n    }\n    MA_DR_WAV_ZERO_MEMORY(pWav, sizeof(*pWav));\n    pWav->onRead    = onRead;\n    pWav->onSeek    = onSeek;\n    pWav->pUserData = pReadSeekUserData;\n    pWav->allocationCallbacks = ma_dr_wav_copy_allocation_callbacks_or_defaults(pAllocationCallbacks);\n    if (pWav->allocationCallbacks.onFree == NULL || (pWav->allocationCallbacks.onMalloc == NULL && pWav->allocationCallbacks.onRealloc == NULL)) {\n        return MA_FALSE;\n    }\n    return MA_TRUE;\n}\nMA_PRIVATE ma_bool32 ma_dr_wav_init__internal(ma_dr_wav* pWav, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags)\n{\n    ma_result result;\n    ma_uint64 cursor;\n    ma_bool32 sequential;\n    ma_uint8 riff[4];\n    ma_dr_wav_fmt fmt;\n    unsigned short translatedFormatTag;\n    ma_uint64 dataChunkSize = 0;\n    ma_uint64 sampleCountFromFactChunk = 0;\n    ma_uint64 metadataStartPos;\n    ma_dr_wav__metadata_parser metadataParser;\n    ma_bool8 isProcessingMetadata = MA_FALSE;\n    ma_bool8 foundChunk_fmt  = MA_FALSE;\n    ma_bool8 foundChunk_data = MA_FALSE;\n    ma_bool8 isAIFCFormType = MA_FALSE;\n    ma_uint64 aiffFrameCount = 0;\n    cursor = 0;\n    sequential = (flags & MA_DR_WAV_SEQUENTIAL) != 0;\n    MA_DR_WAV_ZERO_OBJECT(&fmt);\n    if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, riff, sizeof(riff), &cursor) != sizeof(riff)) {\n        return MA_FALSE;\n    }\n    if (ma_dr_wav_fourcc_equal(riff, \"RIFF\")) {\n        pWav->container = ma_dr_wav_container_riff;\n    } else if (ma_dr_wav_fourcc_equal(riff, \"RIFX\")) {\n        pWav->container = ma_dr_wav_container_rifx;\n    } else if (ma_dr_wav_fourcc_equal(riff, \"riff\")) {\n        int i;\n        ma_uint8 riff2[12];\n        pWav->container = ma_dr_wav_container_w64;\n        if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, riff2, sizeof(riff2), &cursor) != sizeof(riff2)) {\n            return MA_FALSE;\n        }\n        for (i = 0; i < 12; ++i) {\n            if (riff2[i] != ma_dr_wavGUID_W64_RIFF[i+4]) {\n                return MA_FALSE;\n            }\n        }\n    } else if (ma_dr_wav_fourcc_equal(riff, \"RF64\")) {\n        pWav->container = ma_dr_wav_container_rf64;\n    } else if (ma_dr_wav_fourcc_equal(riff, \"FORM\")) {\n        pWav->container = ma_dr_wav_container_aiff;\n    } else {\n        return MA_FALSE;\n    }\n    if (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx || pWav->container == ma_dr_wav_container_rf64) {\n        ma_uint8 chunkSizeBytes[4];\n        ma_uint8 wave[4];\n        if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, chunkSizeBytes, sizeof(chunkSizeBytes), &cursor) != sizeof(chunkSizeBytes)) {\n            return MA_FALSE;\n        }\n        if (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx) {\n            if (ma_dr_wav_bytes_to_u32_ex(chunkSizeBytes, pWav->container) < 36) {\n                return MA_FALSE;\n            }\n        } else if (pWav->container == ma_dr_wav_container_rf64) {\n            if (ma_dr_wav_bytes_to_u32_le(chunkSizeBytes) != 0xFFFFFFFF) {\n                return MA_FALSE;\n            }\n        } else {\n            return MA_FALSE;\n        }\n        if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, wave, sizeof(wave), &cursor) != sizeof(wave)) {\n            return MA_FALSE;\n        }\n        if (!ma_dr_wav_fourcc_equal(wave, \"WAVE\")) {\n            return MA_FALSE;\n        }\n    } else if (pWav->container == ma_dr_wav_container_w64) {\n        ma_uint8 chunkSizeBytes[8];\n        ma_uint8 wave[16];\n        if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, chunkSizeBytes, sizeof(chunkSizeBytes), &cursor) != sizeof(chunkSizeBytes)) {\n            return MA_FALSE;\n        }\n        if (ma_dr_wav_bytes_to_u64(chunkSizeBytes) < 80) {\n            return MA_FALSE;\n        }\n        if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, wave, sizeof(wave), &cursor) != sizeof(wave)) {\n            return MA_FALSE;\n        }\n        if (!ma_dr_wav_guid_equal(wave, ma_dr_wavGUID_W64_WAVE)) {\n            return MA_FALSE;\n        }\n    } else if (pWav->container == ma_dr_wav_container_aiff) {\n        ma_uint8 chunkSizeBytes[4];\n        ma_uint8 aiff[4];\n        if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, chunkSizeBytes, sizeof(chunkSizeBytes), &cursor) != sizeof(chunkSizeBytes)) {\n            return MA_FALSE;\n        }\n        if (ma_dr_wav_bytes_to_u32_be(chunkSizeBytes) < 18) {\n            return MA_FALSE;\n        }\n        if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, aiff, sizeof(aiff), &cursor) != sizeof(aiff)) {\n            return MA_FALSE;\n        }\n        if (ma_dr_wav_fourcc_equal(aiff, \"AIFF\")) {\n            isAIFCFormType = MA_FALSE;\n        } else if (ma_dr_wav_fourcc_equal(aiff, \"AIFC\")) {\n            isAIFCFormType = MA_TRUE;\n        } else {\n            return MA_FALSE;\n        }\n    } else {\n        return MA_FALSE;\n    }\n    if (pWav->container == ma_dr_wav_container_rf64) {\n        ma_uint8 sizeBytes[8];\n        ma_uint64 bytesRemainingInChunk;\n        ma_dr_wav_chunk_header header;\n        result = ma_dr_wav__read_chunk_header(pWav->onRead, pWav->pUserData, pWav->container, &cursor, &header);\n        if (result != MA_SUCCESS) {\n            return MA_FALSE;\n        }\n        if (!ma_dr_wav_fourcc_equal(header.id.fourcc, \"ds64\")) {\n            return MA_FALSE;\n        }\n        bytesRemainingInChunk = header.sizeInBytes + header.paddingSize;\n        if (!ma_dr_wav__seek_forward(pWav->onSeek, 8, pWav->pUserData)) {\n            return MA_FALSE;\n        }\n        bytesRemainingInChunk -= 8;\n        cursor += 8;\n        if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, sizeBytes, sizeof(sizeBytes), &cursor) != sizeof(sizeBytes)) {\n            return MA_FALSE;\n        }\n        bytesRemainingInChunk -= 8;\n        dataChunkSize = ma_dr_wav_bytes_to_u64(sizeBytes);\n        if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, sizeBytes, sizeof(sizeBytes), &cursor) != sizeof(sizeBytes)) {\n            return MA_FALSE;\n        }\n        bytesRemainingInChunk -= 8;\n        sampleCountFromFactChunk = ma_dr_wav_bytes_to_u64(sizeBytes);\n        if (!ma_dr_wav__seek_forward(pWav->onSeek, bytesRemainingInChunk, pWav->pUserData)) {\n            return MA_FALSE;\n        }\n        cursor += bytesRemainingInChunk;\n    }\n    metadataStartPos = cursor;\n    isProcessingMetadata = !sequential && ((flags & MA_DR_WAV_WITH_METADATA) != 0);\n    if (pWav->container != ma_dr_wav_container_riff && pWav->container != ma_dr_wav_container_rf64) {\n        isProcessingMetadata = MA_FALSE;\n    }\n    MA_DR_WAV_ZERO_MEMORY(&metadataParser, sizeof(metadataParser));\n    if (isProcessingMetadata) {\n        metadataParser.onRead = pWav->onRead;\n        metadataParser.onSeek = pWav->onSeek;\n        metadataParser.pReadSeekUserData = pWav->pUserData;\n        metadataParser.stage  = ma_dr_wav__metadata_parser_stage_count;\n    }\n    for (;;) {\n        ma_dr_wav_chunk_header header;\n        ma_uint64 chunkSize;\n        result = ma_dr_wav__read_chunk_header(pWav->onRead, pWav->pUserData, pWav->container, &cursor, &header);\n        if (result != MA_SUCCESS) {\n            break;\n        }\n        chunkSize = header.sizeInBytes;\n        if (!sequential && onChunk != NULL) {\n            ma_uint64 callbackBytesRead = onChunk(pChunkUserData, pWav->onRead, pWav->onSeek, pWav->pUserData, &header, pWav->container, &fmt);\n            if (callbackBytesRead > 0) {\n                if (ma_dr_wav__seek_from_start(pWav->onSeek, cursor, pWav->pUserData) == MA_FALSE) {\n                    return MA_FALSE;\n                }\n            }\n        }\n        if (((pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx || pWav->container == ma_dr_wav_container_rf64) && ma_dr_wav_fourcc_equal(header.id.fourcc, \"fmt \")) ||\n            ((pWav->container == ma_dr_wav_container_w64) && ma_dr_wav_guid_equal(header.id.guid, ma_dr_wavGUID_W64_FMT))) {\n            ma_uint8 fmtData[16];\n            foundChunk_fmt = MA_TRUE;\n            if (pWav->onRead(pWav->pUserData, fmtData, sizeof(fmtData)) != sizeof(fmtData)) {\n                return MA_FALSE;\n            }\n            cursor += sizeof(fmtData);\n            fmt.formatTag      = ma_dr_wav_bytes_to_u16_ex(fmtData + 0,  pWav->container);\n            fmt.channels       = ma_dr_wav_bytes_to_u16_ex(fmtData + 2,  pWav->container);\n            fmt.sampleRate     = ma_dr_wav_bytes_to_u32_ex(fmtData + 4,  pWav->container);\n            fmt.avgBytesPerSec = ma_dr_wav_bytes_to_u32_ex(fmtData + 8,  pWav->container);\n            fmt.blockAlign     = ma_dr_wav_bytes_to_u16_ex(fmtData + 12, pWav->container);\n            fmt.bitsPerSample  = ma_dr_wav_bytes_to_u16_ex(fmtData + 14, pWav->container);\n            fmt.extendedSize       = 0;\n            fmt.validBitsPerSample = 0;\n            fmt.channelMask        = 0;\n            MA_DR_WAV_ZERO_MEMORY(fmt.subFormat, sizeof(fmt.subFormat));\n            if (header.sizeInBytes > 16) {\n                ma_uint8 fmt_cbSize[2];\n                int bytesReadSoFar = 0;\n                if (pWav->onRead(pWav->pUserData, fmt_cbSize, sizeof(fmt_cbSize)) != sizeof(fmt_cbSize)) {\n                    return MA_FALSE;\n                }\n                cursor += sizeof(fmt_cbSize);\n                bytesReadSoFar = 18;\n                fmt.extendedSize = ma_dr_wav_bytes_to_u16_ex(fmt_cbSize, pWav->container);\n                if (fmt.extendedSize > 0) {\n                    if (fmt.formatTag == MA_DR_WAVE_FORMAT_EXTENSIBLE) {\n                        if (fmt.extendedSize != 22) {\n                            return MA_FALSE;\n                        }\n                    }\n                    if (fmt.formatTag == MA_DR_WAVE_FORMAT_EXTENSIBLE) {\n                        ma_uint8 fmtext[22];\n                        if (pWav->onRead(pWav->pUserData, fmtext, fmt.extendedSize) != fmt.extendedSize) {\n                            return MA_FALSE;\n                        }\n                        fmt.validBitsPerSample = ma_dr_wav_bytes_to_u16_ex(fmtext + 0, pWav->container);\n                        fmt.channelMask        = ma_dr_wav_bytes_to_u32_ex(fmtext + 2, pWav->container);\n                        ma_dr_wav_bytes_to_guid(fmtext + 6, fmt.subFormat);\n                    } else {\n                        if (pWav->onSeek(pWav->pUserData, fmt.extendedSize, ma_dr_wav_seek_origin_current) == MA_FALSE) {\n                            return MA_FALSE;\n                        }\n                    }\n                    cursor += fmt.extendedSize;\n                    bytesReadSoFar += fmt.extendedSize;\n                }\n                if (pWav->onSeek(pWav->pUserData, (int)(header.sizeInBytes - bytesReadSoFar), ma_dr_wav_seek_origin_current) == MA_FALSE) {\n                    return MA_FALSE;\n                }\n                cursor += (header.sizeInBytes - bytesReadSoFar);\n            }\n            if (header.paddingSize > 0) {\n                if (ma_dr_wav__seek_forward(pWav->onSeek, header.paddingSize, pWav->pUserData) == MA_FALSE) {\n                    break;\n                }\n                cursor += header.paddingSize;\n            }\n            continue;\n        }\n        if (((pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx || pWav->container == ma_dr_wav_container_rf64) && ma_dr_wav_fourcc_equal(header.id.fourcc, \"data\")) ||\n            ((pWav->container == ma_dr_wav_container_w64) && ma_dr_wav_guid_equal(header.id.guid, ma_dr_wavGUID_W64_DATA))) {\n            foundChunk_data = MA_TRUE;\n            pWav->dataChunkDataPos  = cursor;\n            if (pWav->container != ma_dr_wav_container_rf64) {\n                dataChunkSize = chunkSize;\n            }\n            if (sequential || !isProcessingMetadata) {\n                break;\n            } else {\n                chunkSize += header.paddingSize;\n                if (ma_dr_wav__seek_forward(pWav->onSeek, chunkSize, pWav->pUserData) == MA_FALSE) {\n                    break;\n                }\n                cursor += chunkSize;\n                continue;\n            }\n        }\n        if (((pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx || pWav->container == ma_dr_wav_container_rf64) && ma_dr_wav_fourcc_equal(header.id.fourcc, \"fact\")) ||\n            ((pWav->container == ma_dr_wav_container_w64) && ma_dr_wav_guid_equal(header.id.guid, ma_dr_wavGUID_W64_FACT))) {\n            if (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx) {\n                ma_uint8 sampleCount[4];\n                if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, &sampleCount, 4, &cursor) != 4) {\n                    return MA_FALSE;\n                }\n                chunkSize -= 4;\n                if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) {\n                    sampleCountFromFactChunk = ma_dr_wav_bytes_to_u32_ex(sampleCount, pWav->container);\n                } else {\n                    sampleCountFromFactChunk = 0;\n                }\n            } else if (pWav->container == ma_dr_wav_container_w64) {\n                if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, &sampleCountFromFactChunk, 8, &cursor) != 8) {\n                    return MA_FALSE;\n                }\n                chunkSize -= 8;\n            } else if (pWav->container == ma_dr_wav_container_rf64) {\n            }\n            chunkSize += header.paddingSize;\n            if (ma_dr_wav__seek_forward(pWav->onSeek, chunkSize, pWav->pUserData) == MA_FALSE) {\n                break;\n            }\n            cursor += chunkSize;\n            continue;\n        }\n        if (pWav->container == ma_dr_wav_container_aiff && ma_dr_wav_fourcc_equal(header.id.fourcc, \"COMM\")) {\n            ma_uint8 commData[24];\n            ma_uint32 commDataBytesToRead;\n            ma_uint16 channels;\n            ma_uint32 frameCount;\n            ma_uint16 sampleSizeInBits;\n            ma_int64  sampleRate;\n            ma_uint16 compressionFormat;\n            foundChunk_fmt = MA_TRUE;\n            if (isAIFCFormType) {\n                commDataBytesToRead = 24;\n                if (header.sizeInBytes < commDataBytesToRead) {\n                    return MA_FALSE;\n                }\n            } else {\n                commDataBytesToRead = 18;\n                if (header.sizeInBytes != commDataBytesToRead) {\n                    return MA_FALSE;\n                }\n            }\n            if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, commData, commDataBytesToRead, &cursor) != commDataBytesToRead) {\n                return MA_FALSE;\n            }\n            channels         = ma_dr_wav_bytes_to_u16_ex     (commData + 0, pWav->container);\n            frameCount       = ma_dr_wav_bytes_to_u32_ex     (commData + 2, pWav->container);\n            sampleSizeInBits = ma_dr_wav_bytes_to_u16_ex     (commData + 6, pWav->container);\n            sampleRate       = ma_dr_wav_aiff_extented_to_s64(commData + 8);\n            if (sampleRate < 0 || sampleRate > 0xFFFFFFFF) {\n                return MA_FALSE;\n            }\n            if (isAIFCFormType) {\n                const ma_uint8* type = commData + 18;\n                if (ma_dr_wav_fourcc_equal(type, \"NONE\")) {\n                    compressionFormat = MA_DR_WAVE_FORMAT_PCM;\n                } else if (ma_dr_wav_fourcc_equal(type, \"raw \")) {\n                    compressionFormat = MA_DR_WAVE_FORMAT_PCM;\n                    if (sampleSizeInBits == 8) {\n                        pWav->aiff.isUnsigned = MA_TRUE;\n                    }\n                } else if (ma_dr_wav_fourcc_equal(type, \"sowt\")) {\n                    compressionFormat = MA_DR_WAVE_FORMAT_PCM;\n                    pWav->aiff.isLE = MA_TRUE;\n                } else if (ma_dr_wav_fourcc_equal(type, \"fl32\") || ma_dr_wav_fourcc_equal(type, \"fl64\") || ma_dr_wav_fourcc_equal(type, \"FL32\") || ma_dr_wav_fourcc_equal(type, \"FL64\")) {\n                    compressionFormat = MA_DR_WAVE_FORMAT_IEEE_FLOAT;\n                } else if (ma_dr_wav_fourcc_equal(type, \"alaw\") || ma_dr_wav_fourcc_equal(type, \"ALAW\")) {\n                    compressionFormat = MA_DR_WAVE_FORMAT_ALAW;\n                } else if (ma_dr_wav_fourcc_equal(type, \"ulaw\") || ma_dr_wav_fourcc_equal(type, \"ULAW\")) {\n                    compressionFormat = MA_DR_WAVE_FORMAT_MULAW;\n                } else if (ma_dr_wav_fourcc_equal(type, \"ima4\")) {\n                    compressionFormat = MA_DR_WAVE_FORMAT_DVI_ADPCM;\n                    sampleSizeInBits = 4;\n                    return MA_FALSE;\n                } else {\n                    return MA_FALSE;\n                }\n            } else {\n                compressionFormat = MA_DR_WAVE_FORMAT_PCM;\n            }\n            aiffFrameCount = frameCount;\n            fmt.formatTag      = compressionFormat;\n            fmt.channels       = channels;\n            fmt.sampleRate     = (ma_uint32)sampleRate;\n            fmt.bitsPerSample  = sampleSizeInBits;\n            fmt.blockAlign     = (ma_uint16)(fmt.channels * fmt.bitsPerSample / 8);\n            fmt.avgBytesPerSec = fmt.blockAlign * fmt.sampleRate;\n            if (fmt.blockAlign == 0 && compressionFormat == MA_DR_WAVE_FORMAT_DVI_ADPCM) {\n                fmt.blockAlign = 34 * fmt.channels;\n            }\n            if (compressionFormat == MA_DR_WAVE_FORMAT_ALAW || compressionFormat == MA_DR_WAVE_FORMAT_MULAW) {\n                if (fmt.bitsPerSample > 8) {\n                    fmt.bitsPerSample = 8;\n                    fmt.blockAlign = fmt.channels;\n                }\n            }\n            fmt.bitsPerSample += (fmt.bitsPerSample & 7);\n            if (isAIFCFormType) {\n                if (ma_dr_wav__seek_forward(pWav->onSeek, (chunkSize - commDataBytesToRead), pWav->pUserData) == MA_FALSE) {\n                    return MA_FALSE;\n                }\n                cursor += (chunkSize - commDataBytesToRead);\n            }\n            continue;\n        }\n        if (pWav->container == ma_dr_wav_container_aiff && ma_dr_wav_fourcc_equal(header.id.fourcc, \"SSND\")) {\n            ma_uint8 offsetAndBlockSizeData[8];\n            ma_uint32 offset;\n            foundChunk_data = MA_TRUE;\n            if (ma_dr_wav__on_read(pWav->onRead, pWav->pUserData, offsetAndBlockSizeData, sizeof(offsetAndBlockSizeData), &cursor) != sizeof(offsetAndBlockSizeData)) {\n                return MA_FALSE;\n            }\n            offset = ma_dr_wav_bytes_to_u32_ex(offsetAndBlockSizeData + 0, pWav->container);\n            if (ma_dr_wav__seek_forward(pWav->onSeek, offset, pWav->pUserData) == MA_FALSE) {\n                return MA_FALSE;\n            }\n            cursor += offset;\n            pWav->dataChunkDataPos = cursor;\n            dataChunkSize = chunkSize;\n            if (sequential || !isProcessingMetadata) {\n                break;\n            } else {\n                if (ma_dr_wav__seek_forward(pWav->onSeek, chunkSize, pWav->pUserData) == MA_FALSE) {\n                    break;\n                }\n                cursor += chunkSize;\n                continue;\n            }\n        }\n        if (isProcessingMetadata) {\n            ma_uint64 metadataBytesRead;\n            metadataBytesRead = ma_dr_wav__metadata_process_chunk(&metadataParser, &header, ma_dr_wav_metadata_type_all_including_unknown);\n            MA_DR_WAV_ASSERT(metadataBytesRead <= header.sizeInBytes);\n            if (ma_dr_wav__seek_from_start(pWav->onSeek, cursor, pWav->pUserData) == MA_FALSE) {\n                break;\n            }\n        }\n        chunkSize += header.paddingSize;\n        if (ma_dr_wav__seek_forward(pWav->onSeek, chunkSize, pWav->pUserData) == MA_FALSE) {\n            break;\n        }\n        cursor += chunkSize;\n    }\n    if (!foundChunk_fmt || !foundChunk_data) {\n        return MA_FALSE;\n    }\n    if ((fmt.sampleRate    == 0 || fmt.sampleRate    > MA_DR_WAV_MAX_SAMPLE_RATE    ) ||\n        (fmt.channels      == 0 || fmt.channels      > MA_DR_WAV_MAX_CHANNELS       ) ||\n        (fmt.bitsPerSample == 0 || fmt.bitsPerSample > MA_DR_WAV_MAX_BITS_PER_SAMPLE) ||\n        fmt.blockAlign == 0) {\n        return MA_FALSE;\n    }\n    translatedFormatTag = fmt.formatTag;\n    if (translatedFormatTag == MA_DR_WAVE_FORMAT_EXTENSIBLE) {\n        translatedFormatTag = ma_dr_wav_bytes_to_u16_ex(fmt.subFormat + 0, pWav->container);\n    }\n    if (!sequential) {\n        if (!ma_dr_wav__seek_from_start(pWav->onSeek, pWav->dataChunkDataPos, pWav->pUserData)) {\n            return MA_FALSE;\n        }\n        cursor = pWav->dataChunkDataPos;\n    }\n    if (isProcessingMetadata && metadataParser.metadataCount > 0) {\n        if (ma_dr_wav__seek_from_start(pWav->onSeek, metadataStartPos, pWav->pUserData) == MA_FALSE) {\n            return MA_FALSE;\n        }\n        result = ma_dr_wav__metadata_alloc(&metadataParser, &pWav->allocationCallbacks);\n        if (result != MA_SUCCESS) {\n            return MA_FALSE;\n        }\n        metadataParser.stage = ma_dr_wav__metadata_parser_stage_read;\n        for (;;) {\n            ma_dr_wav_chunk_header header;\n            ma_uint64 metadataBytesRead;\n            result = ma_dr_wav__read_chunk_header(pWav->onRead, pWav->pUserData, pWav->container, &cursor, &header);\n            if (result != MA_SUCCESS) {\n                break;\n            }\n            metadataBytesRead = ma_dr_wav__metadata_process_chunk(&metadataParser, &header, ma_dr_wav_metadata_type_all_including_unknown);\n            if (ma_dr_wav__seek_forward(pWav->onSeek, (header.sizeInBytes + header.paddingSize) - metadataBytesRead, pWav->pUserData) == MA_FALSE) {\n                ma_dr_wav_free(metadataParser.pMetadata, &pWav->allocationCallbacks);\n                return MA_FALSE;\n            }\n        }\n        pWav->pMetadata     = metadataParser.pMetadata;\n        pWav->metadataCount = metadataParser.metadataCount;\n    }\n    if (dataChunkSize == 0xFFFFFFFF && (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rifx) && pWav->isSequentialWrite == MA_FALSE) {\n        dataChunkSize = 0;\n        for (;;) {\n            ma_uint8 temp[4096];\n            size_t bytesRead = pWav->onRead(pWav->pUserData, temp, sizeof(temp));\n            dataChunkSize += bytesRead;\n            if (bytesRead < sizeof(temp)) {\n                break;\n            }\n        }\n    }\n    if (ma_dr_wav__seek_from_start(pWav->onSeek, pWav->dataChunkDataPos, pWav->pUserData) == MA_FALSE) {\n        ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks);\n        return MA_FALSE;\n    }\n    pWav->fmt                 = fmt;\n    pWav->sampleRate          = fmt.sampleRate;\n    pWav->channels            = fmt.channels;\n    pWav->bitsPerSample       = fmt.bitsPerSample;\n    pWav->bytesRemaining      = dataChunkSize;\n    pWav->translatedFormatTag = translatedFormatTag;\n    pWav->dataChunkDataSize   = dataChunkSize;\n    if (sampleCountFromFactChunk != 0) {\n        pWav->totalPCMFrameCount = sampleCountFromFactChunk;\n    } else if (aiffFrameCount != 0) {\n        pWav->totalPCMFrameCount = aiffFrameCount;\n    } else {\n        ma_uint32 bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n        if (bytesPerFrame == 0) {\n            ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks);\n            return MA_FALSE;\n        }\n        pWav->totalPCMFrameCount = dataChunkSize / bytesPerFrame;\n        if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) {\n            ma_uint64 totalBlockHeaderSizeInBytes;\n            ma_uint64 blockCount = dataChunkSize / fmt.blockAlign;\n            if ((blockCount * fmt.blockAlign) < dataChunkSize) {\n                blockCount += 1;\n            }\n            totalBlockHeaderSizeInBytes = blockCount * (6*fmt.channels);\n            pWav->totalPCMFrameCount = ((dataChunkSize - totalBlockHeaderSizeInBytes) * 2) / fmt.channels;\n        }\n        if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) {\n            ma_uint64 totalBlockHeaderSizeInBytes;\n            ma_uint64 blockCount = dataChunkSize / fmt.blockAlign;\n            if ((blockCount * fmt.blockAlign) < dataChunkSize) {\n                blockCount += 1;\n            }\n            totalBlockHeaderSizeInBytes = blockCount * (4*fmt.channels);\n            pWav->totalPCMFrameCount = ((dataChunkSize - totalBlockHeaderSizeInBytes) * 2) / fmt.channels;\n            pWav->totalPCMFrameCount += blockCount;\n        }\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM || pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) {\n        if (pWav->channels > 2) {\n            ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks);\n            return MA_FALSE;\n        }\n    }\n    if (ma_dr_wav_get_bytes_per_pcm_frame(pWav) == 0) {\n        ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks);\n        return MA_FALSE;\n    }\n#ifdef MA_DR_WAV_LIBSNDFILE_COMPAT\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) {\n        ma_uint64 blockCount = dataChunkSize / fmt.blockAlign;\n        pWav->totalPCMFrameCount = (((blockCount * (fmt.blockAlign - (6*pWav->channels))) * 2)) / fmt.channels;\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) {\n        ma_uint64 blockCount = dataChunkSize / fmt.blockAlign;\n        pWav->totalPCMFrameCount = (((blockCount * (fmt.blockAlign - (4*pWav->channels))) * 2) + (blockCount * pWav->channels)) / fmt.channels;\n    }\n#endif\n    return MA_TRUE;\n}\nMA_API ma_bool32 ma_dr_wav_init(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_wav_init_ex(pWav, onRead, onSeek, NULL, pUserData, NULL, 0, pAllocationCallbacks);\n}\nMA_API ma_bool32 ma_dr_wav_init_ex(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, ma_dr_wav_chunk_proc onChunk, void* pReadSeekUserData, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (!ma_dr_wav_preinit(pWav, onRead, onSeek, pReadSeekUserData, pAllocationCallbacks)) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init__internal(pWav, onChunk, pChunkUserData, flags);\n}\nMA_API ma_bool32 ma_dr_wav_init_with_metadata(ma_dr_wav* pWav, ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (!ma_dr_wav_preinit(pWav, onRead, onSeek, pUserData, pAllocationCallbacks)) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init__internal(pWav, NULL, NULL, flags | MA_DR_WAV_WITH_METADATA);\n}\nMA_API ma_dr_wav_metadata* ma_dr_wav_take_ownership_of_metadata(ma_dr_wav* pWav)\n{\n    ma_dr_wav_metadata *result = pWav->pMetadata;\n    pWav->pMetadata     = NULL;\n    pWav->metadataCount = 0;\n    return result;\n}\nMA_PRIVATE size_t ma_dr_wav__write(ma_dr_wav* pWav, const void* pData, size_t dataSize)\n{\n    MA_DR_WAV_ASSERT(pWav          != NULL);\n    MA_DR_WAV_ASSERT(pWav->onWrite != NULL);\n    return pWav->onWrite(pWav->pUserData, pData, dataSize);\n}\nMA_PRIVATE size_t ma_dr_wav__write_byte(ma_dr_wav* pWav, ma_uint8 byte)\n{\n    MA_DR_WAV_ASSERT(pWav          != NULL);\n    MA_DR_WAV_ASSERT(pWav->onWrite != NULL);\n    return pWav->onWrite(pWav->pUserData, &byte, 1);\n}\nMA_PRIVATE size_t ma_dr_wav__write_u16ne_to_le(ma_dr_wav* pWav, ma_uint16 value)\n{\n    MA_DR_WAV_ASSERT(pWav          != NULL);\n    MA_DR_WAV_ASSERT(pWav->onWrite != NULL);\n    if (!ma_dr_wav__is_little_endian()) {\n        value = ma_dr_wav__bswap16(value);\n    }\n    return ma_dr_wav__write(pWav, &value, 2);\n}\nMA_PRIVATE size_t ma_dr_wav__write_u32ne_to_le(ma_dr_wav* pWav, ma_uint32 value)\n{\n    MA_DR_WAV_ASSERT(pWav          != NULL);\n    MA_DR_WAV_ASSERT(pWav->onWrite != NULL);\n    if (!ma_dr_wav__is_little_endian()) {\n        value = ma_dr_wav__bswap32(value);\n    }\n    return ma_dr_wav__write(pWav, &value, 4);\n}\nMA_PRIVATE size_t ma_dr_wav__write_u64ne_to_le(ma_dr_wav* pWav, ma_uint64 value)\n{\n    MA_DR_WAV_ASSERT(pWav          != NULL);\n    MA_DR_WAV_ASSERT(pWav->onWrite != NULL);\n    if (!ma_dr_wav__is_little_endian()) {\n        value = ma_dr_wav__bswap64(value);\n    }\n    return ma_dr_wav__write(pWav, &value, 8);\n}\nMA_PRIVATE size_t ma_dr_wav__write_f32ne_to_le(ma_dr_wav* pWav, float value)\n{\n    union {\n       ma_uint32 u32;\n       float f32;\n    } u;\n    MA_DR_WAV_ASSERT(pWav          != NULL);\n    MA_DR_WAV_ASSERT(pWav->onWrite != NULL);\n    u.f32 = value;\n    if (!ma_dr_wav__is_little_endian()) {\n        u.u32 = ma_dr_wav__bswap32(u.u32);\n    }\n    return ma_dr_wav__write(pWav, &u.u32, 4);\n}\nMA_PRIVATE size_t ma_dr_wav__write_or_count(ma_dr_wav* pWav, const void* pData, size_t dataSize)\n{\n    if (pWav == NULL) {\n        return dataSize;\n    }\n    return ma_dr_wav__write(pWav, pData, dataSize);\n}\nMA_PRIVATE size_t ma_dr_wav__write_or_count_byte(ma_dr_wav* pWav, ma_uint8 byte)\n{\n    if (pWav == NULL) {\n        return 1;\n    }\n    return ma_dr_wav__write_byte(pWav, byte);\n}\nMA_PRIVATE size_t ma_dr_wav__write_or_count_u16ne_to_le(ma_dr_wav* pWav, ma_uint16 value)\n{\n    if (pWav == NULL) {\n        return 2;\n    }\n    return ma_dr_wav__write_u16ne_to_le(pWav, value);\n}\nMA_PRIVATE size_t ma_dr_wav__write_or_count_u32ne_to_le(ma_dr_wav* pWav, ma_uint32 value)\n{\n    if (pWav == NULL) {\n        return 4;\n    }\n    return ma_dr_wav__write_u32ne_to_le(pWav, value);\n}\n#if 0\nMA_PRIVATE size_t ma_dr_wav__write_or_count_u64ne_to_le(ma_dr_wav* pWav, ma_uint64 value)\n{\n    if (pWav == NULL) {\n        return 8;\n    }\n    return ma_dr_wav__write_u64ne_to_le(pWav, value);\n}\n#endif\nMA_PRIVATE size_t ma_dr_wav__write_or_count_f32ne_to_le(ma_dr_wav* pWav, float value)\n{\n    if (pWav == NULL) {\n        return 4;\n    }\n    return ma_dr_wav__write_f32ne_to_le(pWav, value);\n}\nMA_PRIVATE size_t ma_dr_wav__write_or_count_string_to_fixed_size_buf(ma_dr_wav* pWav, char* str, size_t bufFixedSize)\n{\n    size_t len;\n    if (pWav == NULL) {\n        return bufFixedSize;\n    }\n    len = ma_dr_wav__strlen_clamped(str, bufFixedSize);\n    ma_dr_wav__write_or_count(pWav, str, len);\n    if (len < bufFixedSize) {\n        size_t i;\n        for (i = 0; i < bufFixedSize - len; ++i) {\n            ma_dr_wav__write_byte(pWav, 0);\n        }\n    }\n    return bufFixedSize;\n}\nMA_PRIVATE size_t ma_dr_wav__write_or_count_metadata(ma_dr_wav* pWav, ma_dr_wav_metadata* pMetadatas, ma_uint32 metadataCount)\n{\n    size_t bytesWritten = 0;\n    ma_bool32 hasListAdtl = MA_FALSE;\n    ma_bool32 hasListInfo = MA_FALSE;\n    ma_uint32 iMetadata;\n    if (pMetadatas == NULL || metadataCount == 0) {\n        return 0;\n    }\n    for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) {\n        ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata];\n        ma_uint32 chunkSize = 0;\n        if ((pMetadata->type & ma_dr_wav_metadata_type_list_all_info_strings) || (pMetadata->type == ma_dr_wav_metadata_type_unknown && pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_info_list)) {\n            hasListInfo = MA_TRUE;\n        }\n        if ((pMetadata->type & ma_dr_wav_metadata_type_list_all_adtl) || (pMetadata->type == ma_dr_wav_metadata_type_unknown && pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_adtl_list)) {\n            hasListAdtl = MA_TRUE;\n        }\n        switch (pMetadata->type) {\n            case ma_dr_wav_metadata_type_smpl:\n            {\n                ma_uint32 iLoop;\n                chunkSize = MA_DR_WAV_SMPL_BYTES + MA_DR_WAV_SMPL_LOOP_BYTES * pMetadata->data.smpl.sampleLoopCount + pMetadata->data.smpl.samplerSpecificDataSizeInBytes;\n                bytesWritten += ma_dr_wav__write_or_count(pWav, \"smpl\", 4);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.manufacturerId);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.productId);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.samplePeriodNanoseconds);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.midiUnityNote);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.midiPitchFraction);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.smpteFormat);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.smpteOffset);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.sampleLoopCount);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.samplerSpecificDataSizeInBytes);\n                for (iLoop = 0; iLoop < pMetadata->data.smpl.sampleLoopCount; ++iLoop) {\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].cuePointId);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].type);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].firstSampleByteOffset);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].lastSampleByteOffset);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].sampleFraction);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.smpl.pLoops[iLoop].playCount);\n                }\n                if (pMetadata->data.smpl.samplerSpecificDataSizeInBytes > 0) {\n                    bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.smpl.pSamplerSpecificData, pMetadata->data.smpl.samplerSpecificDataSizeInBytes);\n                }\n            } break;\n            case ma_dr_wav_metadata_type_inst:\n            {\n                chunkSize = MA_DR_WAV_INST_BYTES;\n                bytesWritten += ma_dr_wav__write_or_count(pWav, \"inst\", 4);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize);\n                bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.midiUnityNote, 1);\n                bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.fineTuneCents, 1);\n                bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.gainDecibels, 1);\n                bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.lowNote, 1);\n                bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.highNote, 1);\n                bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.lowVelocity, 1);\n                bytesWritten += ma_dr_wav__write_or_count(pWav, &pMetadata->data.inst.highVelocity, 1);\n            } break;\n            case ma_dr_wav_metadata_type_cue:\n            {\n                ma_uint32 iCuePoint;\n                chunkSize = MA_DR_WAV_CUE_BYTES + MA_DR_WAV_CUE_POINT_BYTES * pMetadata->data.cue.cuePointCount;\n                bytesWritten += ma_dr_wav__write_or_count(pWav, \"cue \", 4);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.cuePointCount);\n                for (iCuePoint = 0; iCuePoint < pMetadata->data.cue.cuePointCount; ++iCuePoint) {\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].id);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].playOrderPosition);\n                    bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].dataChunkId, 4);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].chunkStart);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].blockStart);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.cue.pCuePoints[iCuePoint].sampleByteOffset);\n                }\n            } break;\n            case ma_dr_wav_metadata_type_acid:\n            {\n                chunkSize = MA_DR_WAV_ACID_BYTES;\n                bytesWritten += ma_dr_wav__write_or_count(pWav, \"acid\", 4);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.acid.flags);\n                bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.acid.midiUnityNote);\n                bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.acid.reserved1);\n                bytesWritten += ma_dr_wav__write_or_count_f32ne_to_le(pWav, pMetadata->data.acid.reserved2);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.acid.numBeats);\n                bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.acid.meterDenominator);\n                bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.acid.meterNumerator);\n                bytesWritten += ma_dr_wav__write_or_count_f32ne_to_le(pWav, pMetadata->data.acid.tempo);\n            } break;\n            case ma_dr_wav_metadata_type_bext:\n            {\n                char reservedBuf[MA_DR_WAV_BEXT_RESERVED_BYTES];\n                ma_uint32 timeReferenceLow;\n                ma_uint32 timeReferenceHigh;\n                chunkSize = MA_DR_WAV_BEXT_BYTES + pMetadata->data.bext.codingHistorySize;\n                bytesWritten += ma_dr_wav__write_or_count(pWav, \"bext\", 4);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize);\n                bytesWritten += ma_dr_wav__write_or_count_string_to_fixed_size_buf(pWav, pMetadata->data.bext.pDescription, MA_DR_WAV_BEXT_DESCRIPTION_BYTES);\n                bytesWritten += ma_dr_wav__write_or_count_string_to_fixed_size_buf(pWav, pMetadata->data.bext.pOriginatorName, MA_DR_WAV_BEXT_ORIGINATOR_NAME_BYTES);\n                bytesWritten += ma_dr_wav__write_or_count_string_to_fixed_size_buf(pWav, pMetadata->data.bext.pOriginatorReference, MA_DR_WAV_BEXT_ORIGINATOR_REF_BYTES);\n                bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.bext.pOriginationDate, sizeof(pMetadata->data.bext.pOriginationDate));\n                bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.bext.pOriginationTime, sizeof(pMetadata->data.bext.pOriginationTime));\n                timeReferenceLow  = (ma_uint32)(pMetadata->data.bext.timeReference & 0xFFFFFFFF);\n                timeReferenceHigh = (ma_uint32)(pMetadata->data.bext.timeReference >> 32);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, timeReferenceLow);\n                bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, timeReferenceHigh);\n                bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.version);\n                bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.bext.pUMID, MA_DR_WAV_BEXT_UMID_BYTES);\n                bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.loudnessValue);\n                bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.loudnessRange);\n                bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.maxTruePeakLevel);\n                bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.maxMomentaryLoudness);\n                bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.bext.maxShortTermLoudness);\n                MA_DR_WAV_ZERO_MEMORY(reservedBuf, sizeof(reservedBuf));\n                bytesWritten += ma_dr_wav__write_or_count(pWav, reservedBuf, sizeof(reservedBuf));\n                if (pMetadata->data.bext.codingHistorySize > 0) {\n                    bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.bext.pCodingHistory, pMetadata->data.bext.codingHistorySize);\n                }\n            } break;\n            case ma_dr_wav_metadata_type_unknown:\n            {\n                if (pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_top_level) {\n                    chunkSize = pMetadata->data.unknown.dataSizeInBytes;\n                    bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.id, 4);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize);\n                    bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.pData, pMetadata->data.unknown.dataSizeInBytes);\n                }\n            } break;\n            default: break;\n        }\n        if ((chunkSize % 2) != 0) {\n            bytesWritten += ma_dr_wav__write_or_count_byte(pWav, 0);\n        }\n    }\n    if (hasListInfo) {\n        ma_uint32 chunkSize = 4;\n        for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) {\n            ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata];\n            if ((pMetadata->type & ma_dr_wav_metadata_type_list_all_info_strings)) {\n                chunkSize += 8;\n                chunkSize += pMetadata->data.infoText.stringLength + 1;\n            } else if (pMetadata->type == ma_dr_wav_metadata_type_unknown && pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_info_list) {\n                chunkSize += 8;\n                chunkSize += pMetadata->data.unknown.dataSizeInBytes;\n            }\n            if ((chunkSize % 2) != 0) {\n                chunkSize += 1;\n            }\n        }\n        bytesWritten += ma_dr_wav__write_or_count(pWav, \"LIST\", 4);\n        bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize);\n        bytesWritten += ma_dr_wav__write_or_count(pWav, \"INFO\", 4);\n        for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) {\n            ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata];\n            ma_uint32 subchunkSize = 0;\n            if (pMetadata->type & ma_dr_wav_metadata_type_list_all_info_strings) {\n                const char* pID = NULL;\n                switch (pMetadata->type) {\n                    case ma_dr_wav_metadata_type_list_info_software:    pID = \"ISFT\"; break;\n                    case ma_dr_wav_metadata_type_list_info_copyright:   pID = \"ICOP\"; break;\n                    case ma_dr_wav_metadata_type_list_info_title:       pID = \"INAM\"; break;\n                    case ma_dr_wav_metadata_type_list_info_artist:      pID = \"IART\"; break;\n                    case ma_dr_wav_metadata_type_list_info_comment:     pID = \"ICMT\"; break;\n                    case ma_dr_wav_metadata_type_list_info_date:        pID = \"ICRD\"; break;\n                    case ma_dr_wav_metadata_type_list_info_genre:       pID = \"IGNR\"; break;\n                    case ma_dr_wav_metadata_type_list_info_album:       pID = \"IPRD\"; break;\n                    case ma_dr_wav_metadata_type_list_info_tracknumber: pID = \"ITRK\"; break;\n                    default: break;\n                }\n                MA_DR_WAV_ASSERT(pID != NULL);\n                if (pMetadata->data.infoText.stringLength) {\n                    subchunkSize = pMetadata->data.infoText.stringLength + 1;\n                    bytesWritten += ma_dr_wav__write_or_count(pWav, pID, 4);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, subchunkSize);\n                    bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.infoText.pString, pMetadata->data.infoText.stringLength);\n                    bytesWritten += ma_dr_wav__write_or_count_byte(pWav, '\\0');\n                }\n            } else if (pMetadata->type == ma_dr_wav_metadata_type_unknown && pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_info_list) {\n                if (pMetadata->data.unknown.dataSizeInBytes) {\n                    subchunkSize = pMetadata->data.unknown.dataSizeInBytes;\n                    bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.id, 4);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.unknown.dataSizeInBytes);\n                    bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.pData, subchunkSize);\n                }\n            }\n            if ((subchunkSize % 2) != 0) {\n                bytesWritten += ma_dr_wav__write_or_count_byte(pWav, 0);\n            }\n        }\n    }\n    if (hasListAdtl) {\n        ma_uint32 chunkSize = 4;\n        for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) {\n            ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata];\n            switch (pMetadata->type)\n            {\n                case ma_dr_wav_metadata_type_list_label:\n                case ma_dr_wav_metadata_type_list_note:\n                {\n                    chunkSize += 8;\n                    chunkSize += MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES;\n                    if (pMetadata->data.labelOrNote.stringLength > 0) {\n                        chunkSize += pMetadata->data.labelOrNote.stringLength + 1;\n                    }\n                } break;\n                case ma_dr_wav_metadata_type_list_labelled_cue_region:\n                {\n                    chunkSize += 8;\n                    chunkSize += MA_DR_WAV_LIST_LABELLED_TEXT_BYTES;\n                    if (pMetadata->data.labelledCueRegion.stringLength > 0) {\n                        chunkSize += pMetadata->data.labelledCueRegion.stringLength + 1;\n                    }\n                } break;\n                case ma_dr_wav_metadata_type_unknown:\n                {\n                    if (pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_adtl_list) {\n                        chunkSize += 8;\n                        chunkSize += pMetadata->data.unknown.dataSizeInBytes;\n                    }\n                } break;\n                default: break;\n            }\n            if ((chunkSize % 2) != 0) {\n                chunkSize += 1;\n            }\n        }\n        bytesWritten += ma_dr_wav__write_or_count(pWav, \"LIST\", 4);\n        bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, chunkSize);\n        bytesWritten += ma_dr_wav__write_or_count(pWav, \"adtl\", 4);\n        for (iMetadata = 0; iMetadata < metadataCount; ++iMetadata) {\n            ma_dr_wav_metadata* pMetadata = &pMetadatas[iMetadata];\n            ma_uint32 subchunkSize = 0;\n            switch (pMetadata->type)\n            {\n                case ma_dr_wav_metadata_type_list_label:\n                case ma_dr_wav_metadata_type_list_note:\n                {\n                    if (pMetadata->data.labelOrNote.stringLength > 0) {\n                        const char *pID = NULL;\n                        if (pMetadata->type == ma_dr_wav_metadata_type_list_label) {\n                            pID = \"labl\";\n                        }\n                        else if (pMetadata->type == ma_dr_wav_metadata_type_list_note) {\n                            pID = \"note\";\n                        }\n                        MA_DR_WAV_ASSERT(pID != NULL);\n                        MA_DR_WAV_ASSERT(pMetadata->data.labelOrNote.pString != NULL);\n                        subchunkSize = MA_DR_WAV_LIST_LABEL_OR_NOTE_BYTES;\n                        bytesWritten += ma_dr_wav__write_or_count(pWav, pID, 4);\n                        subchunkSize += pMetadata->data.labelOrNote.stringLength + 1;\n                        bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, subchunkSize);\n                        bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.labelOrNote.cuePointId);\n                        bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.labelOrNote.pString, pMetadata->data.labelOrNote.stringLength);\n                        bytesWritten += ma_dr_wav__write_or_count_byte(pWav, '\\0');\n                    }\n                } break;\n                case ma_dr_wav_metadata_type_list_labelled_cue_region:\n                {\n                    subchunkSize = MA_DR_WAV_LIST_LABELLED_TEXT_BYTES;\n                    bytesWritten += ma_dr_wav__write_or_count(pWav, \"ltxt\", 4);\n                    if (pMetadata->data.labelledCueRegion.stringLength > 0) {\n                        subchunkSize += pMetadata->data.labelledCueRegion.stringLength + 1;\n                    }\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, subchunkSize);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.labelledCueRegion.cuePointId);\n                    bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, pMetadata->data.labelledCueRegion.sampleLength);\n                    bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.labelledCueRegion.purposeId, 4);\n                    bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.labelledCueRegion.country);\n                    bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.labelledCueRegion.language);\n                    bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.labelledCueRegion.dialect);\n                    bytesWritten += ma_dr_wav__write_or_count_u16ne_to_le(pWav, pMetadata->data.labelledCueRegion.codePage);\n                    if (pMetadata->data.labelledCueRegion.stringLength > 0) {\n                        MA_DR_WAV_ASSERT(pMetadata->data.labelledCueRegion.pString != NULL);\n                        bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.labelledCueRegion.pString, pMetadata->data.labelledCueRegion.stringLength);\n                        bytesWritten += ma_dr_wav__write_or_count_byte(pWav, '\\0');\n                    }\n                } break;\n                case ma_dr_wav_metadata_type_unknown:\n                {\n                    if (pMetadata->data.unknown.chunkLocation == ma_dr_wav_metadata_location_inside_adtl_list) {\n                        subchunkSize = pMetadata->data.unknown.dataSizeInBytes;\n                        MA_DR_WAV_ASSERT(pMetadata->data.unknown.pData != NULL);\n                        bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.id, 4);\n                        bytesWritten += ma_dr_wav__write_or_count_u32ne_to_le(pWav, subchunkSize);\n                        bytesWritten += ma_dr_wav__write_or_count(pWav, pMetadata->data.unknown.pData, subchunkSize);\n                    }\n                } break;\n                default: break;\n            }\n            if ((subchunkSize % 2) != 0) {\n                bytesWritten += ma_dr_wav__write_or_count_byte(pWav, 0);\n            }\n        }\n    }\n    MA_DR_WAV_ASSERT((bytesWritten % 2) == 0);\n    return bytesWritten;\n}\nMA_PRIVATE ma_uint32 ma_dr_wav__riff_chunk_size_riff(ma_uint64 dataChunkSize, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount)\n{\n    ma_uint64 chunkSize = 4 + 24 + (ma_uint64)ma_dr_wav__write_or_count_metadata(NULL, pMetadata, metadataCount) + 8 + dataChunkSize + ma_dr_wav__chunk_padding_size_riff(dataChunkSize);\n    if (chunkSize > 0xFFFFFFFFUL) {\n        chunkSize = 0xFFFFFFFFUL;\n    }\n    return (ma_uint32)chunkSize;\n}\nMA_PRIVATE ma_uint32 ma_dr_wav__data_chunk_size_riff(ma_uint64 dataChunkSize)\n{\n    if (dataChunkSize <= 0xFFFFFFFFUL) {\n        return (ma_uint32)dataChunkSize;\n    } else {\n        return 0xFFFFFFFFUL;\n    }\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__riff_chunk_size_w64(ma_uint64 dataChunkSize)\n{\n    ma_uint64 dataSubchunkPaddingSize = ma_dr_wav__chunk_padding_size_w64(dataChunkSize);\n    return 80 + 24 + dataChunkSize + dataSubchunkPaddingSize;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__data_chunk_size_w64(ma_uint64 dataChunkSize)\n{\n    return 24 + dataChunkSize;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__riff_chunk_size_rf64(ma_uint64 dataChunkSize, ma_dr_wav_metadata *metadata, ma_uint32 numMetadata)\n{\n    ma_uint64 chunkSize = 4 + 36 + 24 + (ma_uint64)ma_dr_wav__write_or_count_metadata(NULL, metadata, numMetadata) + 8 + dataChunkSize + ma_dr_wav__chunk_padding_size_riff(dataChunkSize);\n    if (chunkSize > 0xFFFFFFFFUL) {\n        chunkSize = 0xFFFFFFFFUL;\n    }\n    return chunkSize;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav__data_chunk_size_rf64(ma_uint64 dataChunkSize)\n{\n    return dataChunkSize;\n}\nMA_PRIVATE ma_bool32 ma_dr_wav_preinit_write(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_bool32 isSequential, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pWav == NULL || onWrite == NULL) {\n        return MA_FALSE;\n    }\n    if (!isSequential && onSeek == NULL) {\n        return MA_FALSE;\n    }\n    if (pFormat->format == MA_DR_WAVE_FORMAT_EXTENSIBLE) {\n        return MA_FALSE;\n    }\n    if (pFormat->format == MA_DR_WAVE_FORMAT_ADPCM || pFormat->format == MA_DR_WAVE_FORMAT_DVI_ADPCM) {\n        return MA_FALSE;\n    }\n    MA_DR_WAV_ZERO_MEMORY(pWav, sizeof(*pWav));\n    pWav->onWrite   = onWrite;\n    pWav->onSeek    = onSeek;\n    pWav->pUserData = pUserData;\n    pWav->allocationCallbacks = ma_dr_wav_copy_allocation_callbacks_or_defaults(pAllocationCallbacks);\n    if (pWav->allocationCallbacks.onFree == NULL || (pWav->allocationCallbacks.onMalloc == NULL && pWav->allocationCallbacks.onRealloc == NULL)) {\n        return MA_FALSE;\n    }\n    pWav->fmt.formatTag = (ma_uint16)pFormat->format;\n    pWav->fmt.channels = (ma_uint16)pFormat->channels;\n    pWav->fmt.sampleRate = pFormat->sampleRate;\n    pWav->fmt.avgBytesPerSec = (ma_uint32)((pFormat->bitsPerSample * pFormat->sampleRate * pFormat->channels) / 8);\n    pWav->fmt.blockAlign = (ma_uint16)((pFormat->channels * pFormat->bitsPerSample) / 8);\n    pWav->fmt.bitsPerSample = (ma_uint16)pFormat->bitsPerSample;\n    pWav->fmt.extendedSize = 0;\n    pWav->isSequentialWrite = isSequential;\n    return MA_TRUE;\n}\nMA_PRIVATE ma_bool32 ma_dr_wav_init_write__internal(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount)\n{\n    size_t runningPos = 0;\n    ma_uint64 initialDataChunkSize = 0;\n    ma_uint64 chunkSizeFMT;\n    if (pWav->isSequentialWrite) {\n        initialDataChunkSize = (totalSampleCount * pWav->fmt.bitsPerSample) / 8;\n        if (pFormat->container == ma_dr_wav_container_riff) {\n            if (initialDataChunkSize > (0xFFFFFFFFUL - 36)) {\n                return MA_FALSE;\n            }\n        }\n    }\n    pWav->dataChunkDataSizeTargetWrite = initialDataChunkSize;\n    if (pFormat->container == ma_dr_wav_container_riff) {\n        ma_uint32 chunkSizeRIFF = 28 + (ma_uint32)initialDataChunkSize;\n        runningPos += ma_dr_wav__write(pWav, \"RIFF\", 4);\n        runningPos += ma_dr_wav__write_u32ne_to_le(pWav, chunkSizeRIFF);\n        runningPos += ma_dr_wav__write(pWav, \"WAVE\", 4);\n    } else if (pFormat->container == ma_dr_wav_container_w64) {\n        ma_uint64 chunkSizeRIFF = 80 + 24 + initialDataChunkSize;\n        runningPos += ma_dr_wav__write(pWav, ma_dr_wavGUID_W64_RIFF, 16);\n        runningPos += ma_dr_wav__write_u64ne_to_le(pWav, chunkSizeRIFF);\n        runningPos += ma_dr_wav__write(pWav, ma_dr_wavGUID_W64_WAVE, 16);\n    } else if (pFormat->container == ma_dr_wav_container_rf64) {\n        runningPos += ma_dr_wav__write(pWav, \"RF64\", 4);\n        runningPos += ma_dr_wav__write_u32ne_to_le(pWav, 0xFFFFFFFF);\n        runningPos += ma_dr_wav__write(pWav, \"WAVE\", 4);\n    } else {\n        return MA_FALSE;\n    }\n    if (pFormat->container == ma_dr_wav_container_rf64) {\n        ma_uint32 initialds64ChunkSize = 28;\n        ma_uint64 initialRiffChunkSize = 8 + initialds64ChunkSize + initialDataChunkSize;\n        runningPos += ma_dr_wav__write(pWav, \"ds64\", 4);\n        runningPos += ma_dr_wav__write_u32ne_to_le(pWav, initialds64ChunkSize);\n        runningPos += ma_dr_wav__write_u64ne_to_le(pWav, initialRiffChunkSize);\n        runningPos += ma_dr_wav__write_u64ne_to_le(pWav, initialDataChunkSize);\n        runningPos += ma_dr_wav__write_u64ne_to_le(pWav, totalSampleCount);\n        runningPos += ma_dr_wav__write_u32ne_to_le(pWav, 0);\n    }\n    if (pFormat->container == ma_dr_wav_container_riff || pFormat->container == ma_dr_wav_container_rf64) {\n        chunkSizeFMT = 16;\n        runningPos += ma_dr_wav__write(pWav, \"fmt \", 4);\n        runningPos += ma_dr_wav__write_u32ne_to_le(pWav, (ma_uint32)chunkSizeFMT);\n    } else if (pFormat->container == ma_dr_wav_container_w64) {\n        chunkSizeFMT = 40;\n        runningPos += ma_dr_wav__write(pWav, ma_dr_wavGUID_W64_FMT, 16);\n        runningPos += ma_dr_wav__write_u64ne_to_le(pWav, chunkSizeFMT);\n    }\n    runningPos += ma_dr_wav__write_u16ne_to_le(pWav, pWav->fmt.formatTag);\n    runningPos += ma_dr_wav__write_u16ne_to_le(pWav, pWav->fmt.channels);\n    runningPos += ma_dr_wav__write_u32ne_to_le(pWav, pWav->fmt.sampleRate);\n    runningPos += ma_dr_wav__write_u32ne_to_le(pWav, pWav->fmt.avgBytesPerSec);\n    runningPos += ma_dr_wav__write_u16ne_to_le(pWav, pWav->fmt.blockAlign);\n    runningPos += ma_dr_wav__write_u16ne_to_le(pWav, pWav->fmt.bitsPerSample);\n    if (!pWav->isSequentialWrite && pWav->pMetadata != NULL && pWav->metadataCount > 0 && (pFormat->container == ma_dr_wav_container_riff || pFormat->container == ma_dr_wav_container_rf64)) {\n        runningPos += ma_dr_wav__write_or_count_metadata(pWav, pWav->pMetadata, pWav->metadataCount);\n    }\n    pWav->dataChunkDataPos = runningPos;\n    if (pFormat->container == ma_dr_wav_container_riff) {\n        ma_uint32 chunkSizeDATA = (ma_uint32)initialDataChunkSize;\n        runningPos += ma_dr_wav__write(pWav, \"data\", 4);\n        runningPos += ma_dr_wav__write_u32ne_to_le(pWav, chunkSizeDATA);\n    } else if (pFormat->container == ma_dr_wav_container_w64) {\n        ma_uint64 chunkSizeDATA = 24 + initialDataChunkSize;\n        runningPos += ma_dr_wav__write(pWav, ma_dr_wavGUID_W64_DATA, 16);\n        runningPos += ma_dr_wav__write_u64ne_to_le(pWav, chunkSizeDATA);\n    } else if (pFormat->container == ma_dr_wav_container_rf64) {\n        runningPos += ma_dr_wav__write(pWav, \"data\", 4);\n        runningPos += ma_dr_wav__write_u32ne_to_le(pWav, 0xFFFFFFFF);\n    }\n    pWav->container = pFormat->container;\n    pWav->channels = (ma_uint16)pFormat->channels;\n    pWav->sampleRate = pFormat->sampleRate;\n    pWav->bitsPerSample = (ma_uint16)pFormat->bitsPerSample;\n    pWav->translatedFormatTag = (ma_uint16)pFormat->format;\n    pWav->dataChunkDataPos = runningPos;\n    return MA_TRUE;\n}\nMA_API ma_bool32 ma_dr_wav_init_write(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (!ma_dr_wav_preinit_write(pWav, pFormat, MA_FALSE, onWrite, onSeek, pUserData, pAllocationCallbacks)) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init_write__internal(pWav, pFormat, 0);\n}\nMA_API ma_bool32 ma_dr_wav_init_write_sequential(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_dr_wav_write_proc onWrite, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (!ma_dr_wav_preinit_write(pWav, pFormat, MA_TRUE, onWrite, NULL, pUserData, pAllocationCallbacks)) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init_write__internal(pWav, pFormat, totalSampleCount);\n}\nMA_API ma_bool32 ma_dr_wav_init_write_sequential_pcm_frames(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, ma_dr_wav_write_proc onWrite, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pFormat == NULL) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init_write_sequential(pWav, pFormat, totalPCMFrameCount*pFormat->channels, onWrite, pUserData, pAllocationCallbacks);\n}\nMA_API ma_bool32 ma_dr_wav_init_write_with_metadata(ma_dr_wav* pWav, const ma_dr_wav_data_format* pFormat, ma_dr_wav_write_proc onWrite, ma_dr_wav_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount)\n{\n    if (!ma_dr_wav_preinit_write(pWav, pFormat, MA_FALSE, onWrite, onSeek, pUserData, pAllocationCallbacks)) {\n        return MA_FALSE;\n    }\n    pWav->pMetadata     = pMetadata;\n    pWav->metadataCount = metadataCount;\n    return ma_dr_wav_init_write__internal(pWav, pFormat, 0);\n}\nMA_API ma_uint64 ma_dr_wav_target_write_size_bytes(const ma_dr_wav_data_format* pFormat, ma_uint64 totalFrameCount, ma_dr_wav_metadata* pMetadata, ma_uint32 metadataCount)\n{\n    ma_uint64 targetDataSizeBytes = (ma_uint64)((ma_int64)totalFrameCount * pFormat->channels * pFormat->bitsPerSample/8.0);\n    ma_uint64 riffChunkSizeBytes;\n    ma_uint64 fileSizeBytes = 0;\n    if (pFormat->container == ma_dr_wav_container_riff) {\n        riffChunkSizeBytes = ma_dr_wav__riff_chunk_size_riff(targetDataSizeBytes, pMetadata, metadataCount);\n        fileSizeBytes = (8 + riffChunkSizeBytes);\n    } else if (pFormat->container == ma_dr_wav_container_w64) {\n        riffChunkSizeBytes = ma_dr_wav__riff_chunk_size_w64(targetDataSizeBytes);\n        fileSizeBytes = riffChunkSizeBytes;\n    } else if (pFormat->container == ma_dr_wav_container_rf64) {\n        riffChunkSizeBytes = ma_dr_wav__riff_chunk_size_rf64(targetDataSizeBytes, pMetadata, metadataCount);\n        fileSizeBytes = (8 + riffChunkSizeBytes);\n    }\n    return fileSizeBytes;\n}\n#ifndef MA_DR_WAV_NO_STDIO\nMA_PRIVATE size_t ma_dr_wav__on_read_stdio(void* pUserData, void* pBufferOut, size_t bytesToRead)\n{\n    return fread(pBufferOut, 1, bytesToRead, (FILE*)pUserData);\n}\nMA_PRIVATE size_t ma_dr_wav__on_write_stdio(void* pUserData, const void* pData, size_t bytesToWrite)\n{\n    return fwrite(pData, 1, bytesToWrite, (FILE*)pUserData);\n}\nMA_PRIVATE ma_bool32 ma_dr_wav__on_seek_stdio(void* pUserData, int offset, ma_dr_wav_seek_origin origin)\n{\n    return fseek((FILE*)pUserData, offset, (origin == ma_dr_wav_seek_origin_current) ? SEEK_CUR : SEEK_SET) == 0;\n}\nMA_API ma_bool32 ma_dr_wav_init_file(ma_dr_wav* pWav, const char* filename, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_wav_init_file_ex(pWav, filename, NULL, NULL, 0, pAllocationCallbacks);\n}\nMA_PRIVATE ma_bool32 ma_dr_wav_init_file__internal_FILE(ma_dr_wav* pWav, FILE* pFile, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_bool32 result;\n    result = ma_dr_wav_preinit(pWav, ma_dr_wav__on_read_stdio, ma_dr_wav__on_seek_stdio, (void*)pFile, pAllocationCallbacks);\n    if (result != MA_TRUE) {\n        fclose(pFile);\n        return result;\n    }\n    result = ma_dr_wav_init__internal(pWav, onChunk, pChunkUserData, flags);\n    if (result != MA_TRUE) {\n        fclose(pFile);\n        return result;\n    }\n    return MA_TRUE;\n}\nMA_API ma_bool32 ma_dr_wav_init_file_ex(ma_dr_wav* pWav, const char* filename, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    FILE* pFile;\n    if (ma_fopen(&pFile, filename, \"rb\") != MA_SUCCESS) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init_file__internal_FILE(pWav, pFile, onChunk, pChunkUserData, flags, pAllocationCallbacks);\n}\n#ifndef MA_DR_WAV_NO_WCHAR\nMA_API ma_bool32 ma_dr_wav_init_file_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_wav_init_file_ex_w(pWav, filename, NULL, NULL, 0, pAllocationCallbacks);\n}\nMA_API ma_bool32 ma_dr_wav_init_file_ex_w(ma_dr_wav* pWav, const wchar_t* filename, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    FILE* pFile;\n    if (ma_wfopen(&pFile, filename, L\"rb\", pAllocationCallbacks) != MA_SUCCESS) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init_file__internal_FILE(pWav, pFile, onChunk, pChunkUserData, flags, pAllocationCallbacks);\n}\n#endif\nMA_API ma_bool32 ma_dr_wav_init_file_with_metadata(ma_dr_wav* pWav, const char* filename, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    FILE* pFile;\n    if (ma_fopen(&pFile, filename, \"rb\") != MA_SUCCESS) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init_file__internal_FILE(pWav, pFile, NULL, NULL, flags | MA_DR_WAV_WITH_METADATA, pAllocationCallbacks);\n}\n#ifndef MA_DR_WAV_NO_WCHAR\nMA_API ma_bool32 ma_dr_wav_init_file_with_metadata_w(ma_dr_wav* pWav, const wchar_t* filename, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    FILE* pFile;\n    if (ma_wfopen(&pFile, filename, L\"rb\", pAllocationCallbacks) != MA_SUCCESS) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init_file__internal_FILE(pWav, pFile, NULL, NULL, flags | MA_DR_WAV_WITH_METADATA, pAllocationCallbacks);\n}\n#endif\nMA_PRIVATE ma_bool32 ma_dr_wav_init_file_write__internal_FILE(ma_dr_wav* pWav, FILE* pFile, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_bool32 isSequential, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_bool32 result;\n    result = ma_dr_wav_preinit_write(pWav, pFormat, isSequential, ma_dr_wav__on_write_stdio, ma_dr_wav__on_seek_stdio, (void*)pFile, pAllocationCallbacks);\n    if (result != MA_TRUE) {\n        fclose(pFile);\n        return result;\n    }\n    result = ma_dr_wav_init_write__internal(pWav, pFormat, totalSampleCount);\n    if (result != MA_TRUE) {\n        fclose(pFile);\n        return result;\n    }\n    return MA_TRUE;\n}\nMA_PRIVATE ma_bool32 ma_dr_wav_init_file_write__internal(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_bool32 isSequential, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    FILE* pFile;\n    if (ma_fopen(&pFile, filename, \"wb\") != MA_SUCCESS) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init_file_write__internal_FILE(pWav, pFile, pFormat, totalSampleCount, isSequential, pAllocationCallbacks);\n}\n#ifndef MA_DR_WAV_NO_WCHAR\nMA_PRIVATE ma_bool32 ma_dr_wav_init_file_write_w__internal(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_bool32 isSequential, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    FILE* pFile;\n    if (ma_wfopen(&pFile, filename, L\"wb\", pAllocationCallbacks) != MA_SUCCESS) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init_file_write__internal_FILE(pWav, pFile, pFormat, totalSampleCount, isSequential, pAllocationCallbacks);\n}\n#endif\nMA_API ma_bool32 ma_dr_wav_init_file_write(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_wav_init_file_write__internal(pWav, filename, pFormat, 0, MA_FALSE, pAllocationCallbacks);\n}\nMA_API ma_bool32 ma_dr_wav_init_file_write_sequential(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_wav_init_file_write__internal(pWav, filename, pFormat, totalSampleCount, MA_TRUE, pAllocationCallbacks);\n}\nMA_API ma_bool32 ma_dr_wav_init_file_write_sequential_pcm_frames(ma_dr_wav* pWav, const char* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pFormat == NULL) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init_file_write_sequential(pWav, filename, pFormat, totalPCMFrameCount*pFormat->channels, pAllocationCallbacks);\n}\n#ifndef MA_DR_WAV_NO_WCHAR\nMA_API ma_bool32 ma_dr_wav_init_file_write_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_wav_init_file_write_w__internal(pWav, filename, pFormat, 0, MA_FALSE, pAllocationCallbacks);\n}\nMA_API ma_bool32 ma_dr_wav_init_file_write_sequential_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_wav_init_file_write_w__internal(pWav, filename, pFormat, totalSampleCount, MA_TRUE, pAllocationCallbacks);\n}\nMA_API ma_bool32 ma_dr_wav_init_file_write_sequential_pcm_frames_w(ma_dr_wav* pWav, const wchar_t* filename, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pFormat == NULL) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init_file_write_sequential_w(pWav, filename, pFormat, totalPCMFrameCount*pFormat->channels, pAllocationCallbacks);\n}\n#endif\n#endif\nMA_PRIVATE size_t ma_dr_wav__on_read_memory(void* pUserData, void* pBufferOut, size_t bytesToRead)\n{\n    ma_dr_wav* pWav = (ma_dr_wav*)pUserData;\n    size_t bytesRemaining;\n    MA_DR_WAV_ASSERT(pWav != NULL);\n    MA_DR_WAV_ASSERT(pWav->memoryStream.dataSize >= pWav->memoryStream.currentReadPos);\n    bytesRemaining = pWav->memoryStream.dataSize - pWav->memoryStream.currentReadPos;\n    if (bytesToRead > bytesRemaining) {\n        bytesToRead = bytesRemaining;\n    }\n    if (bytesToRead > 0) {\n        MA_DR_WAV_COPY_MEMORY(pBufferOut, pWav->memoryStream.data + pWav->memoryStream.currentReadPos, bytesToRead);\n        pWav->memoryStream.currentReadPos += bytesToRead;\n    }\n    return bytesToRead;\n}\nMA_PRIVATE ma_bool32 ma_dr_wav__on_seek_memory(void* pUserData, int offset, ma_dr_wav_seek_origin origin)\n{\n    ma_dr_wav* pWav = (ma_dr_wav*)pUserData;\n    MA_DR_WAV_ASSERT(pWav != NULL);\n    if (origin == ma_dr_wav_seek_origin_current) {\n        if (offset > 0) {\n            if (pWav->memoryStream.currentReadPos + offset > pWav->memoryStream.dataSize) {\n                return MA_FALSE;\n            }\n        } else {\n            if (pWav->memoryStream.currentReadPos < (size_t)-offset) {\n                return MA_FALSE;\n            }\n        }\n        pWav->memoryStream.currentReadPos += offset;\n    } else {\n        if ((ma_uint32)offset <= pWav->memoryStream.dataSize) {\n            pWav->memoryStream.currentReadPos = offset;\n        } else {\n            return MA_FALSE;\n        }\n    }\n    return MA_TRUE;\n}\nMA_PRIVATE size_t ma_dr_wav__on_write_memory(void* pUserData, const void* pDataIn, size_t bytesToWrite)\n{\n    ma_dr_wav* pWav = (ma_dr_wav*)pUserData;\n    size_t bytesRemaining;\n    MA_DR_WAV_ASSERT(pWav != NULL);\n    MA_DR_WAV_ASSERT(pWav->memoryStreamWrite.dataCapacity >= pWav->memoryStreamWrite.currentWritePos);\n    bytesRemaining = pWav->memoryStreamWrite.dataCapacity - pWav->memoryStreamWrite.currentWritePos;\n    if (bytesRemaining < bytesToWrite) {\n        void* pNewData;\n        size_t newDataCapacity = (pWav->memoryStreamWrite.dataCapacity == 0) ? 256 : pWav->memoryStreamWrite.dataCapacity * 2;\n        if ((newDataCapacity - pWav->memoryStreamWrite.currentWritePos) < bytesToWrite) {\n            newDataCapacity = pWav->memoryStreamWrite.currentWritePos + bytesToWrite;\n        }\n        pNewData = ma_dr_wav__realloc_from_callbacks(*pWav->memoryStreamWrite.ppData, newDataCapacity, pWav->memoryStreamWrite.dataCapacity, &pWav->allocationCallbacks);\n        if (pNewData == NULL) {\n            return 0;\n        }\n        *pWav->memoryStreamWrite.ppData = pNewData;\n        pWav->memoryStreamWrite.dataCapacity = newDataCapacity;\n    }\n    MA_DR_WAV_COPY_MEMORY(((ma_uint8*)(*pWav->memoryStreamWrite.ppData)) + pWav->memoryStreamWrite.currentWritePos, pDataIn, bytesToWrite);\n    pWav->memoryStreamWrite.currentWritePos += bytesToWrite;\n    if (pWav->memoryStreamWrite.dataSize < pWav->memoryStreamWrite.currentWritePos) {\n        pWav->memoryStreamWrite.dataSize = pWav->memoryStreamWrite.currentWritePos;\n    }\n    *pWav->memoryStreamWrite.pDataSize = pWav->memoryStreamWrite.dataSize;\n    return bytesToWrite;\n}\nMA_PRIVATE ma_bool32 ma_dr_wav__on_seek_memory_write(void* pUserData, int offset, ma_dr_wav_seek_origin origin)\n{\n    ma_dr_wav* pWav = (ma_dr_wav*)pUserData;\n    MA_DR_WAV_ASSERT(pWav != NULL);\n    if (origin == ma_dr_wav_seek_origin_current) {\n        if (offset > 0) {\n            if (pWav->memoryStreamWrite.currentWritePos + offset > pWav->memoryStreamWrite.dataSize) {\n                offset = (int)(pWav->memoryStreamWrite.dataSize - pWav->memoryStreamWrite.currentWritePos);\n            }\n        } else {\n            if (pWav->memoryStreamWrite.currentWritePos < (size_t)-offset) {\n                offset = -(int)pWav->memoryStreamWrite.currentWritePos;\n            }\n        }\n        pWav->memoryStreamWrite.currentWritePos += offset;\n    } else {\n        if ((ma_uint32)offset <= pWav->memoryStreamWrite.dataSize) {\n            pWav->memoryStreamWrite.currentWritePos = offset;\n        } else {\n            pWav->memoryStreamWrite.currentWritePos = pWav->memoryStreamWrite.dataSize;\n        }\n    }\n    return MA_TRUE;\n}\nMA_API ma_bool32 ma_dr_wav_init_memory(ma_dr_wav* pWav, const void* data, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_wav_init_memory_ex(pWav, data, dataSize, NULL, NULL, 0, pAllocationCallbacks);\n}\nMA_API ma_bool32 ma_dr_wav_init_memory_ex(ma_dr_wav* pWav, const void* data, size_t dataSize, ma_dr_wav_chunk_proc onChunk, void* pChunkUserData, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (data == NULL || dataSize == 0) {\n        return MA_FALSE;\n    }\n    if (!ma_dr_wav_preinit(pWav, ma_dr_wav__on_read_memory, ma_dr_wav__on_seek_memory, pWav, pAllocationCallbacks)) {\n        return MA_FALSE;\n    }\n    pWav->memoryStream.data = (const ma_uint8*)data;\n    pWav->memoryStream.dataSize = dataSize;\n    pWav->memoryStream.currentReadPos = 0;\n    return ma_dr_wav_init__internal(pWav, onChunk, pChunkUserData, flags);\n}\nMA_API ma_bool32 ma_dr_wav_init_memory_with_metadata(ma_dr_wav* pWav, const void* data, size_t dataSize, ma_uint32 flags, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (data == NULL || dataSize == 0) {\n        return MA_FALSE;\n    }\n    if (!ma_dr_wav_preinit(pWav, ma_dr_wav__on_read_memory, ma_dr_wav__on_seek_memory, pWav, pAllocationCallbacks)) {\n        return MA_FALSE;\n    }\n    pWav->memoryStream.data = (const ma_uint8*)data;\n    pWav->memoryStream.dataSize = dataSize;\n    pWav->memoryStream.currentReadPos = 0;\n    return ma_dr_wav_init__internal(pWav, NULL, NULL, flags | MA_DR_WAV_WITH_METADATA);\n}\nMA_PRIVATE ma_bool32 ma_dr_wav_init_memory_write__internal(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, ma_bool32 isSequential, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (ppData == NULL || pDataSize == NULL) {\n        return MA_FALSE;\n    }\n    *ppData = NULL;\n    *pDataSize = 0;\n    if (!ma_dr_wav_preinit_write(pWav, pFormat, isSequential, ma_dr_wav__on_write_memory, ma_dr_wav__on_seek_memory_write, pWav, pAllocationCallbacks)) {\n        return MA_FALSE;\n    }\n    pWav->memoryStreamWrite.ppData = ppData;\n    pWav->memoryStreamWrite.pDataSize = pDataSize;\n    pWav->memoryStreamWrite.dataSize = 0;\n    pWav->memoryStreamWrite.dataCapacity = 0;\n    pWav->memoryStreamWrite.currentWritePos = 0;\n    return ma_dr_wav_init_write__internal(pWav, pFormat, totalSampleCount);\n}\nMA_API ma_bool32 ma_dr_wav_init_memory_write(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_wav_init_memory_write__internal(pWav, ppData, pDataSize, pFormat, 0, MA_FALSE, pAllocationCallbacks);\n}\nMA_API ma_bool32 ma_dr_wav_init_memory_write_sequential(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalSampleCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_wav_init_memory_write__internal(pWav, ppData, pDataSize, pFormat, totalSampleCount, MA_TRUE, pAllocationCallbacks);\n}\nMA_API ma_bool32 ma_dr_wav_init_memory_write_sequential_pcm_frames(ma_dr_wav* pWav, void** ppData, size_t* pDataSize, const ma_dr_wav_data_format* pFormat, ma_uint64 totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pFormat == NULL) {\n        return MA_FALSE;\n    }\n    return ma_dr_wav_init_memory_write_sequential(pWav, ppData, pDataSize, pFormat, totalPCMFrameCount*pFormat->channels, pAllocationCallbacks);\n}\nMA_API ma_result ma_dr_wav_uninit(ma_dr_wav* pWav)\n{\n    ma_result result = MA_SUCCESS;\n    if (pWav == NULL) {\n        return MA_INVALID_ARGS;\n    }\n    if (pWav->onWrite != NULL) {\n        ma_uint32 paddingSize = 0;\n        if (pWav->container == ma_dr_wav_container_riff || pWav->container == ma_dr_wav_container_rf64) {\n            paddingSize = ma_dr_wav__chunk_padding_size_riff(pWav->dataChunkDataSize);\n        } else {\n            paddingSize = ma_dr_wav__chunk_padding_size_w64(pWav->dataChunkDataSize);\n        }\n        if (paddingSize > 0) {\n            ma_uint64 paddingData = 0;\n            ma_dr_wav__write(pWav, &paddingData, paddingSize);\n        }\n        if (pWav->onSeek && !pWav->isSequentialWrite) {\n            if (pWav->container == ma_dr_wav_container_riff) {\n                if (pWav->onSeek(pWav->pUserData, 4, ma_dr_wav_seek_origin_start)) {\n                    ma_uint32 riffChunkSize = ma_dr_wav__riff_chunk_size_riff(pWav->dataChunkDataSize, pWav->pMetadata, pWav->metadataCount);\n                    ma_dr_wav__write_u32ne_to_le(pWav, riffChunkSize);\n                }\n                if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos - 4, ma_dr_wav_seek_origin_start)) {\n                    ma_uint32 dataChunkSize = ma_dr_wav__data_chunk_size_riff(pWav->dataChunkDataSize);\n                    ma_dr_wav__write_u32ne_to_le(pWav, dataChunkSize);\n                }\n            } else if (pWav->container == ma_dr_wav_container_w64) {\n                if (pWav->onSeek(pWav->pUserData, 16, ma_dr_wav_seek_origin_start)) {\n                    ma_uint64 riffChunkSize = ma_dr_wav__riff_chunk_size_w64(pWav->dataChunkDataSize);\n                    ma_dr_wav__write_u64ne_to_le(pWav, riffChunkSize);\n                }\n                if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos - 8, ma_dr_wav_seek_origin_start)) {\n                    ma_uint64 dataChunkSize = ma_dr_wav__data_chunk_size_w64(pWav->dataChunkDataSize);\n                    ma_dr_wav__write_u64ne_to_le(pWav, dataChunkSize);\n                }\n            } else if (pWav->container == ma_dr_wav_container_rf64) {\n                int ds64BodyPos = 12 + 8;\n                if (pWav->onSeek(pWav->pUserData, ds64BodyPos + 0, ma_dr_wav_seek_origin_start)) {\n                    ma_uint64 riffChunkSize = ma_dr_wav__riff_chunk_size_rf64(pWav->dataChunkDataSize, pWav->pMetadata, pWav->metadataCount);\n                    ma_dr_wav__write_u64ne_to_le(pWav, riffChunkSize);\n                }\n                if (pWav->onSeek(pWav->pUserData, ds64BodyPos + 8, ma_dr_wav_seek_origin_start)) {\n                    ma_uint64 dataChunkSize = ma_dr_wav__data_chunk_size_rf64(pWav->dataChunkDataSize);\n                    ma_dr_wav__write_u64ne_to_le(pWav, dataChunkSize);\n                }\n            }\n        }\n        if (pWav->isSequentialWrite) {\n            if (pWav->dataChunkDataSize != pWav->dataChunkDataSizeTargetWrite) {\n                result = MA_INVALID_FILE;\n            }\n        }\n    } else {\n        ma_dr_wav_free(pWav->pMetadata, &pWav->allocationCallbacks);\n    }\n#ifndef MA_DR_WAV_NO_STDIO\n    if (pWav->onRead == ma_dr_wav__on_read_stdio || pWav->onWrite == ma_dr_wav__on_write_stdio) {\n        fclose((FILE*)pWav->pUserData);\n    }\n#endif\n    return result;\n}\nMA_API size_t ma_dr_wav_read_raw(ma_dr_wav* pWav, size_t bytesToRead, void* pBufferOut)\n{\n    size_t bytesRead;\n    ma_uint32 bytesPerFrame;\n    if (pWav == NULL || bytesToRead == 0) {\n        return 0;\n    }\n    if (bytesToRead > pWav->bytesRemaining) {\n        bytesToRead = (size_t)pWav->bytesRemaining;\n    }\n    if (bytesToRead == 0) {\n        return 0;\n    }\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    if (pBufferOut != NULL) {\n        bytesRead = pWav->onRead(pWav->pUserData, pBufferOut, bytesToRead);\n    } else {\n        bytesRead = 0;\n        while (bytesRead < bytesToRead) {\n            size_t bytesToSeek = (bytesToRead - bytesRead);\n            if (bytesToSeek > 0x7FFFFFFF) {\n                bytesToSeek = 0x7FFFFFFF;\n            }\n            if (pWav->onSeek(pWav->pUserData, (int)bytesToSeek, ma_dr_wav_seek_origin_current) == MA_FALSE) {\n                break;\n            }\n            bytesRead += bytesToSeek;\n        }\n        while (bytesRead < bytesToRead) {\n            ma_uint8 buffer[4096];\n            size_t bytesSeeked;\n            size_t bytesToSeek = (bytesToRead - bytesRead);\n            if (bytesToSeek > sizeof(buffer)) {\n                bytesToSeek = sizeof(buffer);\n            }\n            bytesSeeked = pWav->onRead(pWav->pUserData, buffer, bytesToSeek);\n            bytesRead += bytesSeeked;\n            if (bytesSeeked < bytesToSeek) {\n                break;\n            }\n        }\n    }\n    pWav->readCursorInPCMFrames += bytesRead / bytesPerFrame;\n    pWav->bytesRemaining -= bytesRead;\n    return bytesRead;\n}\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_le(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut)\n{\n    ma_uint32 bytesPerFrame;\n    ma_uint64 bytesToRead;\n    ma_uint64 framesRemainingInFile;\n    if (pWav == NULL || framesToRead == 0) {\n        return 0;\n    }\n    if (ma_dr_wav__is_compressed_format_tag(pWav->translatedFormatTag)) {\n        return 0;\n    }\n    framesRemainingInFile = pWav->totalPCMFrameCount - pWav->readCursorInPCMFrames;\n    if (framesToRead > framesRemainingInFile) {\n        framesToRead = framesRemainingInFile;\n    }\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    bytesToRead = framesToRead * bytesPerFrame;\n    if (bytesToRead > MA_SIZE_MAX) {\n        bytesToRead = (MA_SIZE_MAX / bytesPerFrame) * bytesPerFrame;\n    }\n    if (bytesToRead == 0) {\n        return 0;\n    }\n    return ma_dr_wav_read_raw(pWav, (size_t)bytesToRead, pBufferOut) / bytesPerFrame;\n}\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_be(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut)\n{\n    ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_le(pWav, framesToRead, pBufferOut);\n    if (pBufferOut != NULL) {\n        ma_uint32 bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n        if (bytesPerFrame == 0) {\n            return 0;\n        }\n        ma_dr_wav__bswap_samples(pBufferOut, framesRead*pWav->channels, bytesPerFrame/pWav->channels);\n    }\n    return framesRead;\n}\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames(ma_dr_wav* pWav, ma_uint64 framesToRead, void* pBufferOut)\n{\n    ma_uint64 framesRead = 0;\n    if (ma_dr_wav_is_container_be(pWav->container)) {\n        if (pWav->container != ma_dr_wav_container_aiff || pWav->aiff.isLE == MA_FALSE) {\n            if (ma_dr_wav__is_little_endian()) {\n                framesRead = ma_dr_wav_read_pcm_frames_be(pWav, framesToRead, pBufferOut);\n            } else {\n                framesRead = ma_dr_wav_read_pcm_frames_le(pWav, framesToRead, pBufferOut);\n            }\n            goto post_process;\n        }\n    }\n    if (ma_dr_wav__is_little_endian()) {\n        framesRead = ma_dr_wav_read_pcm_frames_le(pWav, framesToRead, pBufferOut);\n    } else {\n        framesRead = ma_dr_wav_read_pcm_frames_be(pWav, framesToRead, pBufferOut);\n    }\n    post_process:\n    {\n        if (pWav->container == ma_dr_wav_container_aiff && pWav->bitsPerSample == 8 && pWav->aiff.isUnsigned == MA_FALSE) {\n            if (pBufferOut != NULL) {\n                ma_uint64 iSample;\n                for (iSample = 0; iSample < framesRead * pWav->channels; iSample += 1) {\n                    ((ma_uint8*)pBufferOut)[iSample] += 128;\n                }\n            }\n        }\n    }\n    return framesRead;\n}\nMA_PRIVATE ma_bool32 ma_dr_wav_seek_to_first_pcm_frame(ma_dr_wav* pWav)\n{\n    if (pWav->onWrite != NULL) {\n        return MA_FALSE;\n    }\n    if (!pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos, ma_dr_wav_seek_origin_start)) {\n        return MA_FALSE;\n    }\n    if (ma_dr_wav__is_compressed_format_tag(pWav->translatedFormatTag)) {\n        if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) {\n            MA_DR_WAV_ZERO_OBJECT(&pWav->msadpcm);\n        } else if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) {\n            MA_DR_WAV_ZERO_OBJECT(&pWav->ima);\n        } else {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n        }\n    }\n    pWav->readCursorInPCMFrames = 0;\n    pWav->bytesRemaining = pWav->dataChunkDataSize;\n    return MA_TRUE;\n}\nMA_API ma_bool32 ma_dr_wav_seek_to_pcm_frame(ma_dr_wav* pWav, ma_uint64 targetFrameIndex)\n{\n    if (pWav == NULL || pWav->onSeek == NULL) {\n        return MA_FALSE;\n    }\n    if (pWav->onWrite != NULL) {\n        return MA_FALSE;\n    }\n    if (pWav->totalPCMFrameCount == 0) {\n        return MA_TRUE;\n    }\n    if (targetFrameIndex > pWav->totalPCMFrameCount) {\n        targetFrameIndex = pWav->totalPCMFrameCount;\n    }\n    if (ma_dr_wav__is_compressed_format_tag(pWav->translatedFormatTag)) {\n        if (targetFrameIndex < pWav->readCursorInPCMFrames) {\n            if (!ma_dr_wav_seek_to_first_pcm_frame(pWav)) {\n                return MA_FALSE;\n            }\n        }\n        if (targetFrameIndex > pWav->readCursorInPCMFrames) {\n            ma_uint64 offsetInFrames = targetFrameIndex - pWav->readCursorInPCMFrames;\n            ma_int16 devnull[2048];\n            while (offsetInFrames > 0) {\n                ma_uint64 framesRead = 0;\n                ma_uint64 framesToRead = offsetInFrames;\n                if (framesToRead > ma_dr_wav_countof(devnull)/pWav->channels) {\n                    framesToRead = ma_dr_wav_countof(devnull)/pWav->channels;\n                }\n                if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) {\n                    framesRead = ma_dr_wav_read_pcm_frames_s16__msadpcm(pWav, framesToRead, devnull);\n                } else if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) {\n                    framesRead = ma_dr_wav_read_pcm_frames_s16__ima(pWav, framesToRead, devnull);\n                } else {\n                    MA_DR_WAV_ASSERT(MA_FALSE);\n                }\n                if (framesRead != framesToRead) {\n                    return MA_FALSE;\n                }\n                offsetInFrames -= framesRead;\n            }\n        }\n    } else {\n        ma_uint64 totalSizeInBytes;\n        ma_uint64 currentBytePos;\n        ma_uint64 targetBytePos;\n        ma_uint64 offset;\n        ma_uint32 bytesPerFrame;\n        bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n        if (bytesPerFrame == 0) {\n            return MA_FALSE;\n        }\n        totalSizeInBytes = pWav->totalPCMFrameCount * bytesPerFrame;\n        currentBytePos = totalSizeInBytes - pWav->bytesRemaining;\n        targetBytePos  = targetFrameIndex * bytesPerFrame;\n        if (currentBytePos < targetBytePos) {\n            offset = (targetBytePos - currentBytePos);\n        } else {\n            if (!ma_dr_wav_seek_to_first_pcm_frame(pWav)) {\n                return MA_FALSE;\n            }\n            offset = targetBytePos;\n        }\n        while (offset > 0) {\n            int offset32 = ((offset > INT_MAX) ? INT_MAX : (int)offset);\n            if (!pWav->onSeek(pWav->pUserData, offset32, ma_dr_wav_seek_origin_current)) {\n                return MA_FALSE;\n            }\n            pWav->readCursorInPCMFrames += offset32 / bytesPerFrame;\n            pWav->bytesRemaining        -= offset32;\n            offset                      -= offset32;\n        }\n    }\n    return MA_TRUE;\n}\nMA_API ma_result ma_dr_wav_get_cursor_in_pcm_frames(ma_dr_wav* pWav, ma_uint64* pCursor)\n{\n    if (pCursor == NULL) {\n        return MA_INVALID_ARGS;\n    }\n    *pCursor = 0;\n    if (pWav == NULL) {\n        return MA_INVALID_ARGS;\n    }\n    *pCursor = pWav->readCursorInPCMFrames;\n    return MA_SUCCESS;\n}\nMA_API ma_result ma_dr_wav_get_length_in_pcm_frames(ma_dr_wav* pWav, ma_uint64* pLength)\n{\n    if (pLength == NULL) {\n        return MA_INVALID_ARGS;\n    }\n    *pLength = 0;\n    if (pWav == NULL) {\n        return MA_INVALID_ARGS;\n    }\n    *pLength = pWav->totalPCMFrameCount;\n    return MA_SUCCESS;\n}\nMA_API size_t ma_dr_wav_write_raw(ma_dr_wav* pWav, size_t bytesToWrite, const void* pData)\n{\n    size_t bytesWritten;\n    if (pWav == NULL || bytesToWrite == 0 || pData == NULL) {\n        return 0;\n    }\n    bytesWritten = pWav->onWrite(pWav->pUserData, pData, bytesToWrite);\n    pWav->dataChunkDataSize += bytesWritten;\n    return bytesWritten;\n}\nMA_API ma_uint64 ma_dr_wav_write_pcm_frames_le(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData)\n{\n    ma_uint64 bytesToWrite;\n    ma_uint64 bytesWritten;\n    const ma_uint8* pRunningData;\n    if (pWav == NULL || framesToWrite == 0 || pData == NULL) {\n        return 0;\n    }\n    bytesToWrite = ((framesToWrite * pWav->channels * pWav->bitsPerSample) / 8);\n    if (bytesToWrite > MA_SIZE_MAX) {\n        return 0;\n    }\n    bytesWritten = 0;\n    pRunningData = (const ma_uint8*)pData;\n    while (bytesToWrite > 0) {\n        size_t bytesJustWritten;\n        ma_uint64 bytesToWriteThisIteration;\n        bytesToWriteThisIteration = bytesToWrite;\n        MA_DR_WAV_ASSERT(bytesToWriteThisIteration <= MA_SIZE_MAX);\n        bytesJustWritten = ma_dr_wav_write_raw(pWav, (size_t)bytesToWriteThisIteration, pRunningData);\n        if (bytesJustWritten == 0) {\n            break;\n        }\n        bytesToWrite -= bytesJustWritten;\n        bytesWritten += bytesJustWritten;\n        pRunningData += bytesJustWritten;\n    }\n    return (bytesWritten * 8) / pWav->bitsPerSample / pWav->channels;\n}\nMA_API ma_uint64 ma_dr_wav_write_pcm_frames_be(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData)\n{\n    ma_uint64 bytesToWrite;\n    ma_uint64 bytesWritten;\n    ma_uint32 bytesPerSample;\n    const ma_uint8* pRunningData;\n    if (pWav == NULL || framesToWrite == 0 || pData == NULL) {\n        return 0;\n    }\n    bytesToWrite = ((framesToWrite * pWav->channels * pWav->bitsPerSample) / 8);\n    if (bytesToWrite > MA_SIZE_MAX) {\n        return 0;\n    }\n    bytesWritten = 0;\n    pRunningData = (const ma_uint8*)pData;\n    bytesPerSample = ma_dr_wav_get_bytes_per_pcm_frame(pWav) / pWav->channels;\n    if (bytesPerSample == 0) {\n        return 0;\n    }\n    while (bytesToWrite > 0) {\n        ma_uint8 temp[4096];\n        ma_uint32 sampleCount;\n        size_t bytesJustWritten;\n        ma_uint64 bytesToWriteThisIteration;\n        bytesToWriteThisIteration = bytesToWrite;\n        MA_DR_WAV_ASSERT(bytesToWriteThisIteration <= MA_SIZE_MAX);\n        sampleCount = sizeof(temp)/bytesPerSample;\n        if (bytesToWriteThisIteration > ((ma_uint64)sampleCount)*bytesPerSample) {\n            bytesToWriteThisIteration = ((ma_uint64)sampleCount)*bytesPerSample;\n        }\n        MA_DR_WAV_COPY_MEMORY(temp, pRunningData, (size_t)bytesToWriteThisIteration);\n        ma_dr_wav__bswap_samples(temp, sampleCount, bytesPerSample);\n        bytesJustWritten = ma_dr_wav_write_raw(pWav, (size_t)bytesToWriteThisIteration, temp);\n        if (bytesJustWritten == 0) {\n            break;\n        }\n        bytesToWrite -= bytesJustWritten;\n        bytesWritten += bytesJustWritten;\n        pRunningData += bytesJustWritten;\n    }\n    return (bytesWritten * 8) / pWav->bitsPerSample / pWav->channels;\n}\nMA_API ma_uint64 ma_dr_wav_write_pcm_frames(ma_dr_wav* pWav, ma_uint64 framesToWrite, const void* pData)\n{\n    if (ma_dr_wav__is_little_endian()) {\n        return ma_dr_wav_write_pcm_frames_le(pWav, framesToWrite, pData);\n    } else {\n        return ma_dr_wav_write_pcm_frames_be(pWav, framesToWrite, pData);\n    }\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__msadpcm(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut)\n{\n    ma_uint64 totalFramesRead = 0;\n    MA_DR_WAV_ASSERT(pWav != NULL);\n    MA_DR_WAV_ASSERT(framesToRead > 0);\n    while (pWav->readCursorInPCMFrames < pWav->totalPCMFrameCount) {\n        MA_DR_WAV_ASSERT(framesToRead > 0);\n        if (pWav->msadpcm.cachedFrameCount == 0 && pWav->msadpcm.bytesRemainingInBlock == 0) {\n            if (pWav->channels == 1) {\n                ma_uint8 header[7];\n                if (pWav->onRead(pWav->pUserData, header, sizeof(header)) != sizeof(header)) {\n                    return totalFramesRead;\n                }\n                pWav->msadpcm.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header);\n                pWav->msadpcm.predictor[0]     = header[0];\n                pWav->msadpcm.delta[0]         = ma_dr_wav_bytes_to_s16(header + 1);\n                pWav->msadpcm.prevFrames[0][1] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 3);\n                pWav->msadpcm.prevFrames[0][0] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 5);\n                pWav->msadpcm.cachedFrames[2]  = pWav->msadpcm.prevFrames[0][0];\n                pWav->msadpcm.cachedFrames[3]  = pWav->msadpcm.prevFrames[0][1];\n                pWav->msadpcm.cachedFrameCount = 2;\n            } else {\n                ma_uint8 header[14];\n                if (pWav->onRead(pWav->pUserData, header, sizeof(header)) != sizeof(header)) {\n                    return totalFramesRead;\n                }\n                pWav->msadpcm.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header);\n                pWav->msadpcm.predictor[0] = header[0];\n                pWav->msadpcm.predictor[1] = header[1];\n                pWav->msadpcm.delta[0] = ma_dr_wav_bytes_to_s16(header + 2);\n                pWav->msadpcm.delta[1] = ma_dr_wav_bytes_to_s16(header + 4);\n                pWav->msadpcm.prevFrames[0][1] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 6);\n                pWav->msadpcm.prevFrames[1][1] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 8);\n                pWav->msadpcm.prevFrames[0][0] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 10);\n                pWav->msadpcm.prevFrames[1][0] = (ma_int32)ma_dr_wav_bytes_to_s16(header + 12);\n                pWav->msadpcm.cachedFrames[0] = pWav->msadpcm.prevFrames[0][0];\n                pWav->msadpcm.cachedFrames[1] = pWav->msadpcm.prevFrames[1][0];\n                pWav->msadpcm.cachedFrames[2] = pWav->msadpcm.prevFrames[0][1];\n                pWav->msadpcm.cachedFrames[3] = pWav->msadpcm.prevFrames[1][1];\n                pWav->msadpcm.cachedFrameCount = 2;\n            }\n        }\n        while (framesToRead > 0 && pWav->msadpcm.cachedFrameCount > 0 && pWav->readCursorInPCMFrames < pWav->totalPCMFrameCount) {\n            if (pBufferOut != NULL) {\n                ma_uint32 iSample = 0;\n                for (iSample = 0; iSample < pWav->channels; iSample += 1) {\n                    pBufferOut[iSample] = (ma_int16)pWav->msadpcm.cachedFrames[(ma_dr_wav_countof(pWav->msadpcm.cachedFrames) - (pWav->msadpcm.cachedFrameCount*pWav->channels)) + iSample];\n                }\n                pBufferOut += pWav->channels;\n            }\n            framesToRead    -= 1;\n            totalFramesRead += 1;\n            pWav->readCursorInPCMFrames += 1;\n            pWav->msadpcm.cachedFrameCount -= 1;\n        }\n        if (framesToRead == 0) {\n            break;\n        }\n        if (pWav->msadpcm.cachedFrameCount == 0) {\n            if (pWav->msadpcm.bytesRemainingInBlock == 0) {\n                continue;\n            } else {\n                static ma_int32 adaptationTable[] = {\n                    230, 230, 230, 230, 307, 409, 512, 614,\n                    768, 614, 512, 409, 307, 230, 230, 230\n                };\n                static ma_int32 coeff1Table[] = { 256, 512, 0, 192, 240, 460,  392 };\n                static ma_int32 coeff2Table[] = { 0,  -256, 0, 64,  0,  -208, -232 };\n                ma_uint8 nibbles;\n                ma_int32 nibble0;\n                ma_int32 nibble1;\n                if (pWav->onRead(pWav->pUserData, &nibbles, 1) != 1) {\n                    return totalFramesRead;\n                }\n                pWav->msadpcm.bytesRemainingInBlock -= 1;\n                nibble0 = ((nibbles & 0xF0) >> 4); if ((nibbles & 0x80)) { nibble0 |= 0xFFFFFFF0UL; }\n                nibble1 = ((nibbles & 0x0F) >> 0); if ((nibbles & 0x08)) { nibble1 |= 0xFFFFFFF0UL; }\n                if (pWav->channels == 1) {\n                    ma_int32 newSample0;\n                    ma_int32 newSample1;\n                    newSample0  = ((pWav->msadpcm.prevFrames[0][1] * coeff1Table[pWav->msadpcm.predictor[0]]) + (pWav->msadpcm.prevFrames[0][0] * coeff2Table[pWav->msadpcm.predictor[0]])) >> 8;\n                    newSample0 += nibble0 * pWav->msadpcm.delta[0];\n                    newSample0  = ma_dr_wav_clamp(newSample0, -32768, 32767);\n                    pWav->msadpcm.delta[0] = (adaptationTable[((nibbles & 0xF0) >> 4)] * pWav->msadpcm.delta[0]) >> 8;\n                    if (pWav->msadpcm.delta[0] < 16) {\n                        pWav->msadpcm.delta[0] = 16;\n                    }\n                    pWav->msadpcm.prevFrames[0][0] = pWav->msadpcm.prevFrames[0][1];\n                    pWav->msadpcm.prevFrames[0][1] = newSample0;\n                    newSample1  = ((pWav->msadpcm.prevFrames[0][1] * coeff1Table[pWav->msadpcm.predictor[0]]) + (pWav->msadpcm.prevFrames[0][0] * coeff2Table[pWav->msadpcm.predictor[0]])) >> 8;\n                    newSample1 += nibble1 * pWav->msadpcm.delta[0];\n                    newSample1  = ma_dr_wav_clamp(newSample1, -32768, 32767);\n                    pWav->msadpcm.delta[0] = (adaptationTable[((nibbles & 0x0F) >> 0)] * pWav->msadpcm.delta[0]) >> 8;\n                    if (pWav->msadpcm.delta[0] < 16) {\n                        pWav->msadpcm.delta[0] = 16;\n                    }\n                    pWav->msadpcm.prevFrames[0][0] = pWav->msadpcm.prevFrames[0][1];\n                    pWav->msadpcm.prevFrames[0][1] = newSample1;\n                    pWav->msadpcm.cachedFrames[2] = newSample0;\n                    pWav->msadpcm.cachedFrames[3] = newSample1;\n                    pWav->msadpcm.cachedFrameCount = 2;\n                } else {\n                    ma_int32 newSample0;\n                    ma_int32 newSample1;\n                    newSample0  = ((pWav->msadpcm.prevFrames[0][1] * coeff1Table[pWav->msadpcm.predictor[0]]) + (pWav->msadpcm.prevFrames[0][0] * coeff2Table[pWav->msadpcm.predictor[0]])) >> 8;\n                    newSample0 += nibble0 * pWav->msadpcm.delta[0];\n                    newSample0  = ma_dr_wav_clamp(newSample0, -32768, 32767);\n                    pWav->msadpcm.delta[0] = (adaptationTable[((nibbles & 0xF0) >> 4)] * pWav->msadpcm.delta[0]) >> 8;\n                    if (pWav->msadpcm.delta[0] < 16) {\n                        pWav->msadpcm.delta[0] = 16;\n                    }\n                    pWav->msadpcm.prevFrames[0][0] = pWav->msadpcm.prevFrames[0][1];\n                    pWav->msadpcm.prevFrames[0][1] = newSample0;\n                    newSample1  = ((pWav->msadpcm.prevFrames[1][1] * coeff1Table[pWav->msadpcm.predictor[1]]) + (pWav->msadpcm.prevFrames[1][0] * coeff2Table[pWav->msadpcm.predictor[1]])) >> 8;\n                    newSample1 += nibble1 * pWav->msadpcm.delta[1];\n                    newSample1  = ma_dr_wav_clamp(newSample1, -32768, 32767);\n                    pWav->msadpcm.delta[1] = (adaptationTable[((nibbles & 0x0F) >> 0)] * pWav->msadpcm.delta[1]) >> 8;\n                    if (pWav->msadpcm.delta[1] < 16) {\n                        pWav->msadpcm.delta[1] = 16;\n                    }\n                    pWav->msadpcm.prevFrames[1][0] = pWav->msadpcm.prevFrames[1][1];\n                    pWav->msadpcm.prevFrames[1][1] = newSample1;\n                    pWav->msadpcm.cachedFrames[2] = newSample0;\n                    pWav->msadpcm.cachedFrames[3] = newSample1;\n                    pWav->msadpcm.cachedFrameCount = 1;\n                }\n            }\n        }\n    }\n    return totalFramesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__ima(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut)\n{\n    ma_uint64 totalFramesRead = 0;\n    ma_uint32 iChannel;\n    static ma_int32 indexTable[16] = {\n        -1, -1, -1, -1, 2, 4, 6, 8,\n        -1, -1, -1, -1, 2, 4, 6, 8\n    };\n    static ma_int32 stepTable[89] = {\n        7,     8,     9,     10,    11,    12,    13,    14,    16,    17,\n        19,    21,    23,    25,    28,    31,    34,    37,    41,    45,\n        50,    55,    60,    66,    73,    80,    88,    97,    107,   118,\n        130,   143,   157,   173,   190,   209,   230,   253,   279,   307,\n        337,   371,   408,   449,   494,   544,   598,   658,   724,   796,\n        876,   963,   1060,  1166,  1282,  1411,  1552,  1707,  1878,  2066,\n        2272,  2499,  2749,  3024,  3327,  3660,  4026,  4428,  4871,  5358,\n        5894,  6484,  7132,  7845,  8630,  9493,  10442, 11487, 12635, 13899,\n        15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767\n    };\n    MA_DR_WAV_ASSERT(pWav != NULL);\n    MA_DR_WAV_ASSERT(framesToRead > 0);\n    while (pWav->readCursorInPCMFrames < pWav->totalPCMFrameCount) {\n        MA_DR_WAV_ASSERT(framesToRead > 0);\n        if (pWav->ima.cachedFrameCount == 0 && pWav->ima.bytesRemainingInBlock == 0) {\n            if (pWav->channels == 1) {\n                ma_uint8 header[4];\n                if (pWav->onRead(pWav->pUserData, header, sizeof(header)) != sizeof(header)) {\n                    return totalFramesRead;\n                }\n                pWav->ima.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header);\n                if (header[2] >= ma_dr_wav_countof(stepTable)) {\n                    pWav->onSeek(pWav->pUserData, pWav->ima.bytesRemainingInBlock, ma_dr_wav_seek_origin_current);\n                    pWav->ima.bytesRemainingInBlock = 0;\n                    return totalFramesRead;\n                }\n                pWav->ima.predictor[0] = (ma_int16)ma_dr_wav_bytes_to_u16(header + 0);\n                pWav->ima.stepIndex[0] = ma_dr_wav_clamp(header[2], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1);\n                pWav->ima.cachedFrames[ma_dr_wav_countof(pWav->ima.cachedFrames) - 1] = pWav->ima.predictor[0];\n                pWav->ima.cachedFrameCount = 1;\n            } else {\n                ma_uint8 header[8];\n                if (pWav->onRead(pWav->pUserData, header, sizeof(header)) != sizeof(header)) {\n                    return totalFramesRead;\n                }\n                pWav->ima.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header);\n                if (header[2] >= ma_dr_wav_countof(stepTable) || header[6] >= ma_dr_wav_countof(stepTable)) {\n                    pWav->onSeek(pWav->pUserData, pWav->ima.bytesRemainingInBlock, ma_dr_wav_seek_origin_current);\n                    pWav->ima.bytesRemainingInBlock = 0;\n                    return totalFramesRead;\n                }\n                pWav->ima.predictor[0] = ma_dr_wav_bytes_to_s16(header + 0);\n                pWav->ima.stepIndex[0] = ma_dr_wav_clamp(header[2], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1);\n                pWav->ima.predictor[1] = ma_dr_wav_bytes_to_s16(header + 4);\n                pWav->ima.stepIndex[1] = ma_dr_wav_clamp(header[6], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1);\n                pWav->ima.cachedFrames[ma_dr_wav_countof(pWav->ima.cachedFrames) - 2] = pWav->ima.predictor[0];\n                pWav->ima.cachedFrames[ma_dr_wav_countof(pWav->ima.cachedFrames) - 1] = pWav->ima.predictor[1];\n                pWav->ima.cachedFrameCount = 1;\n            }\n        }\n        while (framesToRead > 0 && pWav->ima.cachedFrameCount > 0 && pWav->readCursorInPCMFrames < pWav->totalPCMFrameCount) {\n            if (pBufferOut != NULL) {\n                ma_uint32 iSample;\n                for (iSample = 0; iSample < pWav->channels; iSample += 1) {\n                    pBufferOut[iSample] = (ma_int16)pWav->ima.cachedFrames[(ma_dr_wav_countof(pWav->ima.cachedFrames) - (pWav->ima.cachedFrameCount*pWav->channels)) + iSample];\n                }\n                pBufferOut += pWav->channels;\n            }\n            framesToRead    -= 1;\n            totalFramesRead += 1;\n            pWav->readCursorInPCMFrames += 1;\n            pWav->ima.cachedFrameCount -= 1;\n        }\n        if (framesToRead == 0) {\n            break;\n        }\n        if (pWav->ima.cachedFrameCount == 0) {\n            if (pWav->ima.bytesRemainingInBlock == 0) {\n                continue;\n            } else {\n                pWav->ima.cachedFrameCount = 8;\n                for (iChannel = 0; iChannel < pWav->channels; ++iChannel) {\n                    ma_uint32 iByte;\n                    ma_uint8 nibbles[4];\n                    if (pWav->onRead(pWav->pUserData, &nibbles, 4) != 4) {\n                        pWav->ima.cachedFrameCount = 0;\n                        return totalFramesRead;\n                    }\n                    pWav->ima.bytesRemainingInBlock -= 4;\n                    for (iByte = 0; iByte < 4; ++iByte) {\n                        ma_uint8 nibble0 = ((nibbles[iByte] & 0x0F) >> 0);\n                        ma_uint8 nibble1 = ((nibbles[iByte] & 0xF0) >> 4);\n                        ma_int32 step      = stepTable[pWav->ima.stepIndex[iChannel]];\n                        ma_int32 predictor = pWav->ima.predictor[iChannel];\n                        ma_int32      diff  = step >> 3;\n                        if (nibble0 & 1) diff += step >> 2;\n                        if (nibble0 & 2) diff += step >> 1;\n                        if (nibble0 & 4) diff += step;\n                        if (nibble0 & 8) diff  = -diff;\n                        predictor = ma_dr_wav_clamp(predictor + diff, -32768, 32767);\n                        pWav->ima.predictor[iChannel] = predictor;\n                        pWav->ima.stepIndex[iChannel] = ma_dr_wav_clamp(pWav->ima.stepIndex[iChannel] + indexTable[nibble0], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1);\n                        pWav->ima.cachedFrames[(ma_dr_wav_countof(pWav->ima.cachedFrames) - (pWav->ima.cachedFrameCount*pWav->channels)) + (iByte*2+0)*pWav->channels + iChannel] = predictor;\n                        step      = stepTable[pWav->ima.stepIndex[iChannel]];\n                        predictor = pWav->ima.predictor[iChannel];\n                                         diff  = step >> 3;\n                        if (nibble1 & 1) diff += step >> 2;\n                        if (nibble1 & 2) diff += step >> 1;\n                        if (nibble1 & 4) diff += step;\n                        if (nibble1 & 8) diff  = -diff;\n                        predictor = ma_dr_wav_clamp(predictor + diff, -32768, 32767);\n                        pWav->ima.predictor[iChannel] = predictor;\n                        pWav->ima.stepIndex[iChannel] = ma_dr_wav_clamp(pWav->ima.stepIndex[iChannel] + indexTable[nibble1], 0, (ma_int32)ma_dr_wav_countof(stepTable)-1);\n                        pWav->ima.cachedFrames[(ma_dr_wav_countof(pWav->ima.cachedFrames) - (pWav->ima.cachedFrameCount*pWav->channels)) + (iByte*2+1)*pWav->channels + iChannel] = predictor;\n                    }\n                }\n            }\n        }\n    }\n    return totalFramesRead;\n}\n#ifndef MA_DR_WAV_NO_CONVERSION_API\nstatic unsigned short g_ma_dr_wavAlawTable[256] = {\n    0xEA80, 0xEB80, 0xE880, 0xE980, 0xEE80, 0xEF80, 0xEC80, 0xED80, 0xE280, 0xE380, 0xE080, 0xE180, 0xE680, 0xE780, 0xE480, 0xE580,\n    0xF540, 0xF5C0, 0xF440, 0xF4C0, 0xF740, 0xF7C0, 0xF640, 0xF6C0, 0xF140, 0xF1C0, 0xF040, 0xF0C0, 0xF340, 0xF3C0, 0xF240, 0xF2C0,\n    0xAA00, 0xAE00, 0xA200, 0xA600, 0xBA00, 0xBE00, 0xB200, 0xB600, 0x8A00, 0x8E00, 0x8200, 0x8600, 0x9A00, 0x9E00, 0x9200, 0x9600,\n    0xD500, 0xD700, 0xD100, 0xD300, 0xDD00, 0xDF00, 0xD900, 0xDB00, 0xC500, 0xC700, 0xC100, 0xC300, 0xCD00, 0xCF00, 0xC900, 0xCB00,\n    0xFEA8, 0xFEB8, 0xFE88, 0xFE98, 0xFEE8, 0xFEF8, 0xFEC8, 0xFED8, 0xFE28, 0xFE38, 0xFE08, 0xFE18, 0xFE68, 0xFE78, 0xFE48, 0xFE58,\n    0xFFA8, 0xFFB8, 0xFF88, 0xFF98, 0xFFE8, 0xFFF8, 0xFFC8, 0xFFD8, 0xFF28, 0xFF38, 0xFF08, 0xFF18, 0xFF68, 0xFF78, 0xFF48, 0xFF58,\n    0xFAA0, 0xFAE0, 0xFA20, 0xFA60, 0xFBA0, 0xFBE0, 0xFB20, 0xFB60, 0xF8A0, 0xF8E0, 0xF820, 0xF860, 0xF9A0, 0xF9E0, 0xF920, 0xF960,\n    0xFD50, 0xFD70, 0xFD10, 0xFD30, 0xFDD0, 0xFDF0, 0xFD90, 0xFDB0, 0xFC50, 0xFC70, 0xFC10, 0xFC30, 0xFCD0, 0xFCF0, 0xFC90, 0xFCB0,\n    0x1580, 0x1480, 0x1780, 0x1680, 0x1180, 0x1080, 0x1380, 0x1280, 0x1D80, 0x1C80, 0x1F80, 0x1E80, 0x1980, 0x1880, 0x1B80, 0x1A80,\n    0x0AC0, 0x0A40, 0x0BC0, 0x0B40, 0x08C0, 0x0840, 0x09C0, 0x0940, 0x0EC0, 0x0E40, 0x0FC0, 0x0F40, 0x0CC0, 0x0C40, 0x0DC0, 0x0D40,\n    0x5600, 0x5200, 0x5E00, 0x5A00, 0x4600, 0x4200, 0x4E00, 0x4A00, 0x7600, 0x7200, 0x7E00, 0x7A00, 0x6600, 0x6200, 0x6E00, 0x6A00,\n    0x2B00, 0x2900, 0x2F00, 0x2D00, 0x2300, 0x2100, 0x2700, 0x2500, 0x3B00, 0x3900, 0x3F00, 0x3D00, 0x3300, 0x3100, 0x3700, 0x3500,\n    0x0158, 0x0148, 0x0178, 0x0168, 0x0118, 0x0108, 0x0138, 0x0128, 0x01D8, 0x01C8, 0x01F8, 0x01E8, 0x0198, 0x0188, 0x01B8, 0x01A8,\n    0x0058, 0x0048, 0x0078, 0x0068, 0x0018, 0x0008, 0x0038, 0x0028, 0x00D8, 0x00C8, 0x00F8, 0x00E8, 0x0098, 0x0088, 0x00B8, 0x00A8,\n    0x0560, 0x0520, 0x05E0, 0x05A0, 0x0460, 0x0420, 0x04E0, 0x04A0, 0x0760, 0x0720, 0x07E0, 0x07A0, 0x0660, 0x0620, 0x06E0, 0x06A0,\n    0x02B0, 0x0290, 0x02F0, 0x02D0, 0x0230, 0x0210, 0x0270, 0x0250, 0x03B0, 0x0390, 0x03F0, 0x03D0, 0x0330, 0x0310, 0x0370, 0x0350\n};\nstatic unsigned short g_ma_dr_wavMulawTable[256] = {\n    0x8284, 0x8684, 0x8A84, 0x8E84, 0x9284, 0x9684, 0x9A84, 0x9E84, 0xA284, 0xA684, 0xAA84, 0xAE84, 0xB284, 0xB684, 0xBA84, 0xBE84,\n    0xC184, 0xC384, 0xC584, 0xC784, 0xC984, 0xCB84, 0xCD84, 0xCF84, 0xD184, 0xD384, 0xD584, 0xD784, 0xD984, 0xDB84, 0xDD84, 0xDF84,\n    0xE104, 0xE204, 0xE304, 0xE404, 0xE504, 0xE604, 0xE704, 0xE804, 0xE904, 0xEA04, 0xEB04, 0xEC04, 0xED04, 0xEE04, 0xEF04, 0xF004,\n    0xF0C4, 0xF144, 0xF1C4, 0xF244, 0xF2C4, 0xF344, 0xF3C4, 0xF444, 0xF4C4, 0xF544, 0xF5C4, 0xF644, 0xF6C4, 0xF744, 0xF7C4, 0xF844,\n    0xF8A4, 0xF8E4, 0xF924, 0xF964, 0xF9A4, 0xF9E4, 0xFA24, 0xFA64, 0xFAA4, 0xFAE4, 0xFB24, 0xFB64, 0xFBA4, 0xFBE4, 0xFC24, 0xFC64,\n    0xFC94, 0xFCB4, 0xFCD4, 0xFCF4, 0xFD14, 0xFD34, 0xFD54, 0xFD74, 0xFD94, 0xFDB4, 0xFDD4, 0xFDF4, 0xFE14, 0xFE34, 0xFE54, 0xFE74,\n    0xFE8C, 0xFE9C, 0xFEAC, 0xFEBC, 0xFECC, 0xFEDC, 0xFEEC, 0xFEFC, 0xFF0C, 0xFF1C, 0xFF2C, 0xFF3C, 0xFF4C, 0xFF5C, 0xFF6C, 0xFF7C,\n    0xFF88, 0xFF90, 0xFF98, 0xFFA0, 0xFFA8, 0xFFB0, 0xFFB8, 0xFFC0, 0xFFC8, 0xFFD0, 0xFFD8, 0xFFE0, 0xFFE8, 0xFFF0, 0xFFF8, 0x0000,\n    0x7D7C, 0x797C, 0x757C, 0x717C, 0x6D7C, 0x697C, 0x657C, 0x617C, 0x5D7C, 0x597C, 0x557C, 0x517C, 0x4D7C, 0x497C, 0x457C, 0x417C,\n    0x3E7C, 0x3C7C, 0x3A7C, 0x387C, 0x367C, 0x347C, 0x327C, 0x307C, 0x2E7C, 0x2C7C, 0x2A7C, 0x287C, 0x267C, 0x247C, 0x227C, 0x207C,\n    0x1EFC, 0x1DFC, 0x1CFC, 0x1BFC, 0x1AFC, 0x19FC, 0x18FC, 0x17FC, 0x16FC, 0x15FC, 0x14FC, 0x13FC, 0x12FC, 0x11FC, 0x10FC, 0x0FFC,\n    0x0F3C, 0x0EBC, 0x0E3C, 0x0DBC, 0x0D3C, 0x0CBC, 0x0C3C, 0x0BBC, 0x0B3C, 0x0ABC, 0x0A3C, 0x09BC, 0x093C, 0x08BC, 0x083C, 0x07BC,\n    0x075C, 0x071C, 0x06DC, 0x069C, 0x065C, 0x061C, 0x05DC, 0x059C, 0x055C, 0x051C, 0x04DC, 0x049C, 0x045C, 0x041C, 0x03DC, 0x039C,\n    0x036C, 0x034C, 0x032C, 0x030C, 0x02EC, 0x02CC, 0x02AC, 0x028C, 0x026C, 0x024C, 0x022C, 0x020C, 0x01EC, 0x01CC, 0x01AC, 0x018C,\n    0x0174, 0x0164, 0x0154, 0x0144, 0x0134, 0x0124, 0x0114, 0x0104, 0x00F4, 0x00E4, 0x00D4, 0x00C4, 0x00B4, 0x00A4, 0x0094, 0x0084,\n    0x0078, 0x0070, 0x0068, 0x0060, 0x0058, 0x0050, 0x0048, 0x0040, 0x0038, 0x0030, 0x0028, 0x0020, 0x0018, 0x0010, 0x0008, 0x0000\n};\nstatic MA_INLINE ma_int16 ma_dr_wav__alaw_to_s16(ma_uint8 sampleIn)\n{\n    return (short)g_ma_dr_wavAlawTable[sampleIn];\n}\nstatic MA_INLINE ma_int16 ma_dr_wav__mulaw_to_s16(ma_uint8 sampleIn)\n{\n    return (short)g_ma_dr_wavMulawTable[sampleIn];\n}\nMA_PRIVATE void ma_dr_wav__pcm_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample)\n{\n    size_t i;\n    if (bytesPerSample == 1) {\n        ma_dr_wav_u8_to_s16(pOut, pIn, totalSampleCount);\n        return;\n    }\n    if (bytesPerSample == 2) {\n        for (i = 0; i < totalSampleCount; ++i) {\n           *pOut++ = ((const ma_int16*)pIn)[i];\n        }\n        return;\n    }\n    if (bytesPerSample == 3) {\n        ma_dr_wav_s24_to_s16(pOut, pIn, totalSampleCount);\n        return;\n    }\n    if (bytesPerSample == 4) {\n        ma_dr_wav_s32_to_s16(pOut, (const ma_int32*)pIn, totalSampleCount);\n        return;\n    }\n    if (bytesPerSample > 8) {\n        MA_DR_WAV_ZERO_MEMORY(pOut, totalSampleCount * sizeof(*pOut));\n        return;\n    }\n    for (i = 0; i < totalSampleCount; ++i) {\n        ma_uint64 sample = 0;\n        unsigned int shift  = (8 - bytesPerSample) * 8;\n        unsigned int j;\n        for (j = 0; j < bytesPerSample; j += 1) {\n            MA_DR_WAV_ASSERT(j < 8);\n            sample |= (ma_uint64)(pIn[j]) << shift;\n            shift  += 8;\n        }\n        pIn += j;\n        *pOut++ = (ma_int16)((ma_int64)sample >> 48);\n    }\n}\nMA_PRIVATE void ma_dr_wav__ieee_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample)\n{\n    if (bytesPerSample == 4) {\n        ma_dr_wav_f32_to_s16(pOut, (const float*)pIn, totalSampleCount);\n        return;\n    } else if (bytesPerSample == 8) {\n        ma_dr_wav_f64_to_s16(pOut, (const double*)pIn, totalSampleCount);\n        return;\n    } else {\n        MA_DR_WAV_ZERO_MEMORY(pOut, totalSampleCount * sizeof(*pOut));\n        return;\n    }\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__pcm(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut)\n{\n    ma_uint64 totalFramesRead;\n    ma_uint8 sampleData[4096] = {0};\n    ma_uint32 bytesPerFrame;\n    ma_uint32 bytesPerSample;\n    ma_uint64 samplesRead;\n    if ((pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM && pWav->bitsPerSample == 16) || pBufferOut == NULL) {\n        return ma_dr_wav_read_pcm_frames(pWav, framesToRead, pBufferOut);\n    }\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    bytesPerSample = bytesPerFrame / pWav->channels;\n    if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) {\n        return 0;\n    }\n    totalFramesRead = 0;\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        samplesRead = framesRead * pWav->channels;\n        if ((samplesRead * bytesPerSample) > sizeof(sampleData)) {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n            break;\n        }\n        ma_dr_wav__pcm_to_s16(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample);\n        pBufferOut      += samplesRead;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__ieee(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut)\n{\n    ma_uint64 totalFramesRead;\n    ma_uint8 sampleData[4096] = {0};\n    ma_uint32 bytesPerFrame;\n    ma_uint32 bytesPerSample;\n    ma_uint64 samplesRead;\n    if (pBufferOut == NULL) {\n        return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL);\n    }\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    bytesPerSample = bytesPerFrame / pWav->channels;\n    if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) {\n        return 0;\n    }\n    totalFramesRead = 0;\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        samplesRead = framesRead * pWav->channels;\n        if ((samplesRead * bytesPerSample) > sizeof(sampleData)) {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n            break;\n        }\n        ma_dr_wav__ieee_to_s16(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample);\n        pBufferOut      += samplesRead;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__alaw(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut)\n{\n    ma_uint64 totalFramesRead;\n    ma_uint8 sampleData[4096] = {0};\n    ma_uint32 bytesPerFrame;\n    ma_uint32 bytesPerSample;\n    ma_uint64 samplesRead;\n    if (pBufferOut == NULL) {\n        return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL);\n    }\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    bytesPerSample = bytesPerFrame / pWav->channels;\n    if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) {\n        return 0;\n    }\n    totalFramesRead = 0;\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        samplesRead = framesRead * pWav->channels;\n        if ((samplesRead * bytesPerSample) > sizeof(sampleData)) {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n            break;\n        }\n        ma_dr_wav_alaw_to_s16(pBufferOut, sampleData, (size_t)samplesRead);\n        #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT\n        {\n            if (pWav->container == ma_dr_wav_container_aiff) {\n                ma_uint64 iSample;\n                for (iSample = 0; iSample < samplesRead; iSample += 1) {\n                    pBufferOut[iSample] = -pBufferOut[iSample];\n                }\n            }\n        }\n        #endif\n        pBufferOut      += samplesRead;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s16__mulaw(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut)\n{\n    ma_uint64 totalFramesRead;\n    ma_uint8 sampleData[4096] = {0};\n    ma_uint32 bytesPerFrame;\n    ma_uint32 bytesPerSample;\n    ma_uint64 samplesRead;\n    if (pBufferOut == NULL) {\n        return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL);\n    }\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    bytesPerSample = bytesPerFrame / pWav->channels;\n    if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) {\n        return 0;\n    }\n    totalFramesRead = 0;\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        samplesRead = framesRead * pWav->channels;\n        if ((samplesRead * bytesPerSample) > sizeof(sampleData)) {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n            break;\n        }\n        ma_dr_wav_mulaw_to_s16(pBufferOut, sampleData, (size_t)samplesRead);\n        #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT\n        {\n            if (pWav->container == ma_dr_wav_container_aiff) {\n                ma_uint64 iSample;\n                for (iSample = 0; iSample < samplesRead; iSample += 1) {\n                    pBufferOut[iSample] = -pBufferOut[iSample];\n                }\n            }\n        }\n        #endif\n        pBufferOut      += samplesRead;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut)\n{\n    if (pWav == NULL || framesToRead == 0) {\n        return 0;\n    }\n    if (pBufferOut == NULL) {\n        return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL);\n    }\n    if (framesToRead * pWav->channels * sizeof(ma_int16) > MA_SIZE_MAX) {\n        framesToRead = MA_SIZE_MAX / sizeof(ma_int16) / pWav->channels;\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM) {\n        return ma_dr_wav_read_pcm_frames_s16__pcm(pWav, framesToRead, pBufferOut);\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_IEEE_FLOAT) {\n        return ma_dr_wav_read_pcm_frames_s16__ieee(pWav, framesToRead, pBufferOut);\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ALAW) {\n        return ma_dr_wav_read_pcm_frames_s16__alaw(pWav, framesToRead, pBufferOut);\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_MULAW) {\n        return ma_dr_wav_read_pcm_frames_s16__mulaw(pWav, framesToRead, pBufferOut);\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM) {\n        return ma_dr_wav_read_pcm_frames_s16__msadpcm(pWav, framesToRead, pBufferOut);\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) {\n        return ma_dr_wav_read_pcm_frames_s16__ima(pWav, framesToRead, pBufferOut);\n    }\n    return 0;\n}\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16le(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut)\n{\n    ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, framesToRead, pBufferOut);\n    if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_FALSE) {\n        ma_dr_wav__bswap_samples_s16(pBufferOut, framesRead*pWav->channels);\n    }\n    return framesRead;\n}\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_s16be(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int16* pBufferOut)\n{\n    ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, framesToRead, pBufferOut);\n    if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_TRUE) {\n        ma_dr_wav__bswap_samples_s16(pBufferOut, framesRead*pWav->channels);\n    }\n    return framesRead;\n}\nMA_API void ma_dr_wav_u8_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount)\n{\n    int r;\n    size_t i;\n    for (i = 0; i < sampleCount; ++i) {\n        int x = pIn[i];\n        r = x << 8;\n        r = r - 32768;\n        pOut[i] = (short)r;\n    }\n}\nMA_API void ma_dr_wav_s24_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount)\n{\n    int r;\n    size_t i;\n    for (i = 0; i < sampleCount; ++i) {\n        int x = ((int)(((unsigned int)(((const ma_uint8*)pIn)[i*3+0]) << 8) | ((unsigned int)(((const ma_uint8*)pIn)[i*3+1]) << 16) | ((unsigned int)(((const ma_uint8*)pIn)[i*3+2])) << 24)) >> 8;\n        r = x >> 8;\n        pOut[i] = (short)r;\n    }\n}\nMA_API void ma_dr_wav_s32_to_s16(ma_int16* pOut, const ma_int32* pIn, size_t sampleCount)\n{\n    int r;\n    size_t i;\n    for (i = 0; i < sampleCount; ++i) {\n        int x = pIn[i];\n        r = x >> 16;\n        pOut[i] = (short)r;\n    }\n}\nMA_API void ma_dr_wav_f32_to_s16(ma_int16* pOut, const float* pIn, size_t sampleCount)\n{\n    int r;\n    size_t i;\n    for (i = 0; i < sampleCount; ++i) {\n        float x = pIn[i];\n        float c;\n        c = ((x < -1) ? -1 : ((x > 1) ? 1 : x));\n        c = c + 1;\n        r = (int)(c * 32767.5f);\n        r = r - 32768;\n        pOut[i] = (short)r;\n    }\n}\nMA_API void ma_dr_wav_f64_to_s16(ma_int16* pOut, const double* pIn, size_t sampleCount)\n{\n    int r;\n    size_t i;\n    for (i = 0; i < sampleCount; ++i) {\n        double x = pIn[i];\n        double c;\n        c = ((x < -1) ? -1 : ((x > 1) ? 1 : x));\n        c = c + 1;\n        r = (int)(c * 32767.5);\n        r = r - 32768;\n        pOut[i] = (short)r;\n    }\n}\nMA_API void ma_dr_wav_alaw_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount)\n{\n    size_t i;\n    for (i = 0; i < sampleCount; ++i) {\n        pOut[i] = ma_dr_wav__alaw_to_s16(pIn[i]);\n    }\n}\nMA_API void ma_dr_wav_mulaw_to_s16(ma_int16* pOut, const ma_uint8* pIn, size_t sampleCount)\n{\n    size_t i;\n    for (i = 0; i < sampleCount; ++i) {\n        pOut[i] = ma_dr_wav__mulaw_to_s16(pIn[i]);\n    }\n}\nMA_PRIVATE void ma_dr_wav__pcm_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount, unsigned int bytesPerSample)\n{\n    unsigned int i;\n    if (bytesPerSample == 1) {\n        ma_dr_wav_u8_to_f32(pOut, pIn, sampleCount);\n        return;\n    }\n    if (bytesPerSample == 2) {\n        ma_dr_wav_s16_to_f32(pOut, (const ma_int16*)pIn, sampleCount);\n        return;\n    }\n    if (bytesPerSample == 3) {\n        ma_dr_wav_s24_to_f32(pOut, pIn, sampleCount);\n        return;\n    }\n    if (bytesPerSample == 4) {\n        ma_dr_wav_s32_to_f32(pOut, (const ma_int32*)pIn, sampleCount);\n        return;\n    }\n    if (bytesPerSample > 8) {\n        MA_DR_WAV_ZERO_MEMORY(pOut, sampleCount * sizeof(*pOut));\n        return;\n    }\n    for (i = 0; i < sampleCount; ++i) {\n        ma_uint64 sample = 0;\n        unsigned int shift  = (8 - bytesPerSample) * 8;\n        unsigned int j;\n        for (j = 0; j < bytesPerSample; j += 1) {\n            MA_DR_WAV_ASSERT(j < 8);\n            sample |= (ma_uint64)(pIn[j]) << shift;\n            shift  += 8;\n        }\n        pIn += j;\n        *pOut++ = (float)((ma_int64)sample / 9223372036854775807.0);\n    }\n}\nMA_PRIVATE void ma_dr_wav__ieee_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount, unsigned int bytesPerSample)\n{\n    if (bytesPerSample == 4) {\n        unsigned int i;\n        for (i = 0; i < sampleCount; ++i) {\n            *pOut++ = ((const float*)pIn)[i];\n        }\n        return;\n    } else if (bytesPerSample == 8) {\n        ma_dr_wav_f64_to_f32(pOut, (const double*)pIn, sampleCount);\n        return;\n    } else {\n        MA_DR_WAV_ZERO_MEMORY(pOut, sampleCount * sizeof(*pOut));\n        return;\n    }\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__pcm(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut)\n{\n    ma_uint64 totalFramesRead;\n    ma_uint8 sampleData[4096] = {0};\n    ma_uint32 bytesPerFrame;\n    ma_uint32 bytesPerSample;\n    ma_uint64 samplesRead;\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    bytesPerSample = bytesPerFrame / pWav->channels;\n    if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) {\n        return 0;\n    }\n    totalFramesRead = 0;\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        samplesRead = framesRead * pWav->channels;\n        if ((samplesRead * bytesPerSample) > sizeof(sampleData)) {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n            break;\n        }\n        ma_dr_wav__pcm_to_f32(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample);\n        pBufferOut      += samplesRead;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__msadpcm_ima(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut)\n{\n    ma_uint64 totalFramesRead;\n    ma_int16 samples16[2048];\n    totalFramesRead = 0;\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, ma_dr_wav_countof(samples16)/pWav->channels);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, framesToReadThisIteration, samples16);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        ma_dr_wav_s16_to_f32(pBufferOut, samples16, (size_t)(framesRead*pWav->channels));\n        pBufferOut      += framesRead*pWav->channels;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__ieee(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut)\n{\n    ma_uint64 totalFramesRead;\n    ma_uint8 sampleData[4096] = {0};\n    ma_uint32 bytesPerFrame;\n    ma_uint32 bytesPerSample;\n    ma_uint64 samplesRead;\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_IEEE_FLOAT && pWav->bitsPerSample == 32) {\n        return ma_dr_wav_read_pcm_frames(pWav, framesToRead, pBufferOut);\n    }\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    bytesPerSample = bytesPerFrame / pWav->channels;\n    if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) {\n        return 0;\n    }\n    totalFramesRead = 0;\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        samplesRead = framesRead * pWav->channels;\n        if ((samplesRead * bytesPerSample) > sizeof(sampleData)) {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n            break;\n        }\n        ma_dr_wav__ieee_to_f32(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample);\n        pBufferOut      += samplesRead;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__alaw(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut)\n{\n    ma_uint64 totalFramesRead;\n    ma_uint8 sampleData[4096] = {0};\n    ma_uint32 bytesPerFrame;\n    ma_uint32 bytesPerSample;\n    ma_uint64 samplesRead;\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    bytesPerSample = bytesPerFrame / pWav->channels;\n    if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) {\n        return 0;\n    }\n    totalFramesRead = 0;\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        samplesRead = framesRead * pWav->channels;\n        if ((samplesRead * bytesPerSample) > sizeof(sampleData)) {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n            break;\n        }\n        ma_dr_wav_alaw_to_f32(pBufferOut, sampleData, (size_t)samplesRead);\n        #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT\n        {\n            if (pWav->container == ma_dr_wav_container_aiff) {\n                ma_uint64 iSample;\n                for (iSample = 0; iSample < samplesRead; iSample += 1) {\n                    pBufferOut[iSample] = -pBufferOut[iSample];\n                }\n            }\n        }\n        #endif\n        pBufferOut      += samplesRead;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_f32__mulaw(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut)\n{\n    ma_uint64 totalFramesRead;\n    ma_uint8 sampleData[4096] = {0};\n    ma_uint32 bytesPerFrame;\n    ma_uint32 bytesPerSample;\n    ma_uint64 samplesRead;\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    bytesPerSample = bytesPerFrame / pWav->channels;\n    if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) {\n        return 0;\n    }\n    totalFramesRead = 0;\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        samplesRead = framesRead * pWav->channels;\n        if ((samplesRead * bytesPerSample) > sizeof(sampleData)) {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n            break;\n        }\n        ma_dr_wav_mulaw_to_f32(pBufferOut, sampleData, (size_t)samplesRead);\n        #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT\n        {\n            if (pWav->container == ma_dr_wav_container_aiff) {\n                ma_uint64 iSample;\n                for (iSample = 0; iSample < samplesRead; iSample += 1) {\n                    pBufferOut[iSample] = -pBufferOut[iSample];\n                }\n            }\n        }\n        #endif\n        pBufferOut      += samplesRead;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut)\n{\n    if (pWav == NULL || framesToRead == 0) {\n        return 0;\n    }\n    if (pBufferOut == NULL) {\n        return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL);\n    }\n    if (framesToRead * pWav->channels * sizeof(float) > MA_SIZE_MAX) {\n        framesToRead = MA_SIZE_MAX / sizeof(float) / pWav->channels;\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM) {\n        return ma_dr_wav_read_pcm_frames_f32__pcm(pWav, framesToRead, pBufferOut);\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM || pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) {\n        return ma_dr_wav_read_pcm_frames_f32__msadpcm_ima(pWav, framesToRead, pBufferOut);\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_IEEE_FLOAT) {\n        return ma_dr_wav_read_pcm_frames_f32__ieee(pWav, framesToRead, pBufferOut);\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ALAW) {\n        return ma_dr_wav_read_pcm_frames_f32__alaw(pWav, framesToRead, pBufferOut);\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_MULAW) {\n        return ma_dr_wav_read_pcm_frames_f32__mulaw(pWav, framesToRead, pBufferOut);\n    }\n    return 0;\n}\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32le(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut)\n{\n    ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_f32(pWav, framesToRead, pBufferOut);\n    if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_FALSE) {\n        ma_dr_wav__bswap_samples_f32(pBufferOut, framesRead*pWav->channels);\n    }\n    return framesRead;\n}\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_f32be(ma_dr_wav* pWav, ma_uint64 framesToRead, float* pBufferOut)\n{\n    ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_f32(pWav, framesToRead, pBufferOut);\n    if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_TRUE) {\n        ma_dr_wav__bswap_samples_f32(pBufferOut, framesRead*pWav->channels);\n    }\n    return framesRead;\n}\nMA_API void ma_dr_wav_u8_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n#ifdef MA_DR_WAV_LIBSNDFILE_COMPAT\n    for (i = 0; i < sampleCount; ++i) {\n        *pOut++ = (pIn[i] / 256.0f) * 2 - 1;\n    }\n#else\n    for (i = 0; i < sampleCount; ++i) {\n        float x = pIn[i];\n        x = x * 0.00784313725490196078f;\n        x = x - 1;\n        *pOut++ = x;\n    }\n#endif\n}\nMA_API void ma_dr_wav_s16_to_f32(float* pOut, const ma_int16* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n    for (i = 0; i < sampleCount; ++i) {\n        *pOut++ = pIn[i] * 0.000030517578125f;\n    }\n}\nMA_API void ma_dr_wav_s24_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n    for (i = 0; i < sampleCount; ++i) {\n        double x;\n        ma_uint32 a = ((ma_uint32)(pIn[i*3+0]) <<  8);\n        ma_uint32 b = ((ma_uint32)(pIn[i*3+1]) << 16);\n        ma_uint32 c = ((ma_uint32)(pIn[i*3+2]) << 24);\n        x = (double)((ma_int32)(a | b | c) >> 8);\n        *pOut++ = (float)(x * 0.00000011920928955078125);\n    }\n}\nMA_API void ma_dr_wav_s32_to_f32(float* pOut, const ma_int32* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n    for (i = 0; i < sampleCount; ++i) {\n        *pOut++ = (float)(pIn[i] / 2147483648.0);\n    }\n}\nMA_API void ma_dr_wav_f64_to_f32(float* pOut, const double* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n    for (i = 0; i < sampleCount; ++i) {\n        *pOut++ = (float)pIn[i];\n    }\n}\nMA_API void ma_dr_wav_alaw_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n    for (i = 0; i < sampleCount; ++i) {\n        *pOut++ = ma_dr_wav__alaw_to_s16(pIn[i]) / 32768.0f;\n    }\n}\nMA_API void ma_dr_wav_mulaw_to_f32(float* pOut, const ma_uint8* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n    for (i = 0; i < sampleCount; ++i) {\n        *pOut++ = ma_dr_wav__mulaw_to_s16(pIn[i]) / 32768.0f;\n    }\n}\nMA_PRIVATE void ma_dr_wav__pcm_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample)\n{\n    unsigned int i;\n    if (bytesPerSample == 1) {\n        ma_dr_wav_u8_to_s32(pOut, pIn, totalSampleCount);\n        return;\n    }\n    if (bytesPerSample == 2) {\n        ma_dr_wav_s16_to_s32(pOut, (const ma_int16*)pIn, totalSampleCount);\n        return;\n    }\n    if (bytesPerSample == 3) {\n        ma_dr_wav_s24_to_s32(pOut, pIn, totalSampleCount);\n        return;\n    }\n    if (bytesPerSample == 4) {\n        for (i = 0; i < totalSampleCount; ++i) {\n           *pOut++ = ((const ma_int32*)pIn)[i];\n        }\n        return;\n    }\n    if (bytesPerSample > 8) {\n        MA_DR_WAV_ZERO_MEMORY(pOut, totalSampleCount * sizeof(*pOut));\n        return;\n    }\n    for (i = 0; i < totalSampleCount; ++i) {\n        ma_uint64 sample = 0;\n        unsigned int shift  = (8 - bytesPerSample) * 8;\n        unsigned int j;\n        for (j = 0; j < bytesPerSample; j += 1) {\n            MA_DR_WAV_ASSERT(j < 8);\n            sample |= (ma_uint64)(pIn[j]) << shift;\n            shift  += 8;\n        }\n        pIn += j;\n        *pOut++ = (ma_int32)((ma_int64)sample >> 32);\n    }\n}\nMA_PRIVATE void ma_dr_wav__ieee_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample)\n{\n    if (bytesPerSample == 4) {\n        ma_dr_wav_f32_to_s32(pOut, (const float*)pIn, totalSampleCount);\n        return;\n    } else if (bytesPerSample == 8) {\n        ma_dr_wav_f64_to_s32(pOut, (const double*)pIn, totalSampleCount);\n        return;\n    } else {\n        MA_DR_WAV_ZERO_MEMORY(pOut, totalSampleCount * sizeof(*pOut));\n        return;\n    }\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__pcm(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut)\n{\n    ma_uint64 totalFramesRead;\n    ma_uint8 sampleData[4096] = {0};\n    ma_uint32 bytesPerFrame;\n    ma_uint32 bytesPerSample;\n    ma_uint64 samplesRead;\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM && pWav->bitsPerSample == 32) {\n        return ma_dr_wav_read_pcm_frames(pWav, framesToRead, pBufferOut);\n    }\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    bytesPerSample = bytesPerFrame / pWav->channels;\n    if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) {\n        return 0;\n    }\n    totalFramesRead = 0;\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        samplesRead = framesRead * pWav->channels;\n        if ((samplesRead * bytesPerSample) > sizeof(sampleData)) {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n            break;\n        }\n        ma_dr_wav__pcm_to_s32(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample);\n        pBufferOut      += samplesRead;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__msadpcm_ima(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut)\n{\n    ma_uint64 totalFramesRead = 0;\n    ma_int16 samples16[2048];\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, ma_dr_wav_countof(samples16)/pWav->channels);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, framesToReadThisIteration, samples16);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        ma_dr_wav_s16_to_s32(pBufferOut, samples16, (size_t)(framesRead*pWav->channels));\n        pBufferOut      += framesRead*pWav->channels;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__ieee(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut)\n{\n    ma_uint64 totalFramesRead;\n    ma_uint8 sampleData[4096] = {0};\n    ma_uint32 bytesPerFrame;\n    ma_uint32 bytesPerSample;\n    ma_uint64 samplesRead;\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    bytesPerSample = bytesPerFrame / pWav->channels;\n    if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) {\n        return 0;\n    }\n    totalFramesRead = 0;\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        samplesRead = framesRead * pWav->channels;\n        if ((samplesRead * bytesPerSample) > sizeof(sampleData)) {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n            break;\n        }\n        ma_dr_wav__ieee_to_s32(pBufferOut, sampleData, (size_t)samplesRead, bytesPerSample);\n        pBufferOut      += samplesRead;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__alaw(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut)\n{\n    ma_uint64 totalFramesRead;\n    ma_uint8 sampleData[4096] = {0};\n    ma_uint32 bytesPerFrame;\n    ma_uint32 bytesPerSample;\n    ma_uint64 samplesRead;\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    bytesPerSample = bytesPerFrame / pWav->channels;\n    if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) {\n        return 0;\n    }\n    totalFramesRead = 0;\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        samplesRead = framesRead * pWav->channels;\n        if ((samplesRead * bytesPerSample) > sizeof(sampleData)) {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n            break;\n        }\n        ma_dr_wav_alaw_to_s32(pBufferOut, sampleData, (size_t)samplesRead);\n        #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT\n        {\n            if (pWav->container == ma_dr_wav_container_aiff) {\n                ma_uint64 iSample;\n                for (iSample = 0; iSample < samplesRead; iSample += 1) {\n                    pBufferOut[iSample] = -pBufferOut[iSample];\n                }\n            }\n        }\n        #endif\n        pBufferOut      += samplesRead;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_PRIVATE ma_uint64 ma_dr_wav_read_pcm_frames_s32__mulaw(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut)\n{\n    ma_uint64 totalFramesRead;\n    ma_uint8 sampleData[4096] = {0};\n    ma_uint32 bytesPerFrame;\n    ma_uint32 bytesPerSample;\n    ma_uint64 samplesRead;\n    bytesPerFrame = ma_dr_wav_get_bytes_per_pcm_frame(pWav);\n    if (bytesPerFrame == 0) {\n        return 0;\n    }\n    bytesPerSample = bytesPerFrame / pWav->channels;\n    if (bytesPerSample == 0 || (bytesPerFrame % pWav->channels) != 0) {\n        return 0;\n    }\n    totalFramesRead = 0;\n    while (framesToRead > 0) {\n        ma_uint64 framesToReadThisIteration = ma_dr_wav_min(framesToRead, sizeof(sampleData)/bytesPerFrame);\n        ma_uint64 framesRead = ma_dr_wav_read_pcm_frames(pWav, framesToReadThisIteration, sampleData);\n        if (framesRead == 0) {\n            break;\n        }\n        MA_DR_WAV_ASSERT(framesRead <= framesToReadThisIteration);\n        samplesRead = framesRead * pWav->channels;\n        if ((samplesRead * bytesPerSample) > sizeof(sampleData)) {\n            MA_DR_WAV_ASSERT(MA_FALSE);\n            break;\n        }\n        ma_dr_wav_mulaw_to_s32(pBufferOut, sampleData, (size_t)samplesRead);\n        #ifdef MA_DR_WAV_LIBSNDFILE_COMPAT\n        {\n            if (pWav->container == ma_dr_wav_container_aiff) {\n                ma_uint64 iSample;\n                for (iSample = 0; iSample < samplesRead; iSample += 1) {\n                    pBufferOut[iSample] = -pBufferOut[iSample];\n                }\n            }\n        }\n        #endif\n        pBufferOut      += samplesRead;\n        framesToRead    -= framesRead;\n        totalFramesRead += framesRead;\n    }\n    return totalFramesRead;\n}\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut)\n{\n    if (pWav == NULL || framesToRead == 0) {\n        return 0;\n    }\n    if (pBufferOut == NULL) {\n        return ma_dr_wav_read_pcm_frames(pWav, framesToRead, NULL);\n    }\n    if (framesToRead * pWav->channels * sizeof(ma_int32) > MA_SIZE_MAX) {\n        framesToRead = MA_SIZE_MAX / sizeof(ma_int32) / pWav->channels;\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_PCM) {\n        return ma_dr_wav_read_pcm_frames_s32__pcm(pWav, framesToRead, pBufferOut);\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ADPCM || pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_DVI_ADPCM) {\n        return ma_dr_wav_read_pcm_frames_s32__msadpcm_ima(pWav, framesToRead, pBufferOut);\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_IEEE_FLOAT) {\n        return ma_dr_wav_read_pcm_frames_s32__ieee(pWav, framesToRead, pBufferOut);\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_ALAW) {\n        return ma_dr_wav_read_pcm_frames_s32__alaw(pWav, framesToRead, pBufferOut);\n    }\n    if (pWav->translatedFormatTag == MA_DR_WAVE_FORMAT_MULAW) {\n        return ma_dr_wav_read_pcm_frames_s32__mulaw(pWav, framesToRead, pBufferOut);\n    }\n    return 0;\n}\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32le(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut)\n{\n    ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s32(pWav, framesToRead, pBufferOut);\n    if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_FALSE) {\n        ma_dr_wav__bswap_samples_s32(pBufferOut, framesRead*pWav->channels);\n    }\n    return framesRead;\n}\nMA_API ma_uint64 ma_dr_wav_read_pcm_frames_s32be(ma_dr_wav* pWav, ma_uint64 framesToRead, ma_int32* pBufferOut)\n{\n    ma_uint64 framesRead = ma_dr_wav_read_pcm_frames_s32(pWav, framesToRead, pBufferOut);\n    if (pBufferOut != NULL && ma_dr_wav__is_little_endian() == MA_TRUE) {\n        ma_dr_wav__bswap_samples_s32(pBufferOut, framesRead*pWav->channels);\n    }\n    return framesRead;\n}\nMA_API void ma_dr_wav_u8_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n    for (i = 0; i < sampleCount; ++i) {\n        *pOut++ = ((int)pIn[i] - 128) << 24;\n    }\n}\nMA_API void ma_dr_wav_s16_to_s32(ma_int32* pOut, const ma_int16* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n    for (i = 0; i < sampleCount; ++i) {\n        *pOut++ = pIn[i] << 16;\n    }\n}\nMA_API void ma_dr_wav_s24_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n    for (i = 0; i < sampleCount; ++i) {\n        unsigned int s0 = pIn[i*3 + 0];\n        unsigned int s1 = pIn[i*3 + 1];\n        unsigned int s2 = pIn[i*3 + 2];\n        ma_int32 sample32 = (ma_int32)((s0 << 8) | (s1 << 16) | (s2 << 24));\n        *pOut++ = sample32;\n    }\n}\nMA_API void ma_dr_wav_f32_to_s32(ma_int32* pOut, const float* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n    for (i = 0; i < sampleCount; ++i) {\n        *pOut++ = (ma_int32)(2147483648.0 * pIn[i]);\n    }\n}\nMA_API void ma_dr_wav_f64_to_s32(ma_int32* pOut, const double* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n    for (i = 0; i < sampleCount; ++i) {\n        *pOut++ = (ma_int32)(2147483648.0 * pIn[i]);\n    }\n}\nMA_API void ma_dr_wav_alaw_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n    for (i = 0; i < sampleCount; ++i) {\n        *pOut++ = ((ma_int32)ma_dr_wav__alaw_to_s16(pIn[i])) << 16;\n    }\n}\nMA_API void ma_dr_wav_mulaw_to_s32(ma_int32* pOut, const ma_uint8* pIn, size_t sampleCount)\n{\n    size_t i;\n    if (pOut == NULL || pIn == NULL) {\n        return;\n    }\n    for (i= 0; i < sampleCount; ++i) {\n        *pOut++ = ((ma_int32)ma_dr_wav__mulaw_to_s16(pIn[i])) << 16;\n    }\n}\nMA_PRIVATE ma_int16* ma_dr_wav__read_pcm_frames_and_close_s16(ma_dr_wav* pWav, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalFrameCount)\n{\n    ma_uint64 sampleDataSize;\n    ma_int16* pSampleData;\n    ma_uint64 framesRead;\n    MA_DR_WAV_ASSERT(pWav != NULL);\n    sampleDataSize = pWav->totalPCMFrameCount * pWav->channels * sizeof(ma_int16);\n    if (sampleDataSize > MA_SIZE_MAX) {\n        ma_dr_wav_uninit(pWav);\n        return NULL;\n    }\n    pSampleData = (ma_int16*)ma_dr_wav__malloc_from_callbacks((size_t)sampleDataSize, &pWav->allocationCallbacks);\n    if (pSampleData == NULL) {\n        ma_dr_wav_uninit(pWav);\n        return NULL;\n    }\n    framesRead = ma_dr_wav_read_pcm_frames_s16(pWav, (size_t)pWav->totalPCMFrameCount, pSampleData);\n    if (framesRead != pWav->totalPCMFrameCount) {\n        ma_dr_wav__free_from_callbacks(pSampleData, &pWav->allocationCallbacks);\n        ma_dr_wav_uninit(pWav);\n        return NULL;\n    }\n    ma_dr_wav_uninit(pWav);\n    if (sampleRate) {\n        *sampleRate = pWav->sampleRate;\n    }\n    if (channels) {\n        *channels = pWav->channels;\n    }\n    if (totalFrameCount) {\n        *totalFrameCount = pWav->totalPCMFrameCount;\n    }\n    return pSampleData;\n}\nMA_PRIVATE float* ma_dr_wav__read_pcm_frames_and_close_f32(ma_dr_wav* pWav, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalFrameCount)\n{\n    ma_uint64 sampleDataSize;\n    float* pSampleData;\n    ma_uint64 framesRead;\n    MA_DR_WAV_ASSERT(pWav != NULL);\n    sampleDataSize = pWav->totalPCMFrameCount * pWav->channels * sizeof(float);\n    if (sampleDataSize > MA_SIZE_MAX) {\n        ma_dr_wav_uninit(pWav);\n        return NULL;\n    }\n    pSampleData = (float*)ma_dr_wav__malloc_from_callbacks((size_t)sampleDataSize, &pWav->allocationCallbacks);\n    if (pSampleData == NULL) {\n        ma_dr_wav_uninit(pWav);\n        return NULL;\n    }\n    framesRead = ma_dr_wav_read_pcm_frames_f32(pWav, (size_t)pWav->totalPCMFrameCount, pSampleData);\n    if (framesRead != pWav->totalPCMFrameCount) {\n        ma_dr_wav__free_from_callbacks(pSampleData, &pWav->allocationCallbacks);\n        ma_dr_wav_uninit(pWav);\n        return NULL;\n    }\n    ma_dr_wav_uninit(pWav);\n    if (sampleRate) {\n        *sampleRate = pWav->sampleRate;\n    }\n    if (channels) {\n        *channels = pWav->channels;\n    }\n    if (totalFrameCount) {\n        *totalFrameCount = pWav->totalPCMFrameCount;\n    }\n    return pSampleData;\n}\nMA_PRIVATE ma_int32* ma_dr_wav__read_pcm_frames_and_close_s32(ma_dr_wav* pWav, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalFrameCount)\n{\n    ma_uint64 sampleDataSize;\n    ma_int32* pSampleData;\n    ma_uint64 framesRead;\n    MA_DR_WAV_ASSERT(pWav != NULL);\n    sampleDataSize = pWav->totalPCMFrameCount * pWav->channels * sizeof(ma_int32);\n    if (sampleDataSize > MA_SIZE_MAX) {\n        ma_dr_wav_uninit(pWav);\n        return NULL;\n    }\n    pSampleData = (ma_int32*)ma_dr_wav__malloc_from_callbacks((size_t)sampleDataSize, &pWav->allocationCallbacks);\n    if (pSampleData == NULL) {\n        ma_dr_wav_uninit(pWav);\n        return NULL;\n    }\n    framesRead = ma_dr_wav_read_pcm_frames_s32(pWav, (size_t)pWav->totalPCMFrameCount, pSampleData);\n    if (framesRead != pWav->totalPCMFrameCount) {\n        ma_dr_wav__free_from_callbacks(pSampleData, &pWav->allocationCallbacks);\n        ma_dr_wav_uninit(pWav);\n        return NULL;\n    }\n    ma_dr_wav_uninit(pWav);\n    if (sampleRate) {\n        *sampleRate = pWav->sampleRate;\n    }\n    if (channels) {\n        *channels = pWav->channels;\n    }\n    if (totalFrameCount) {\n        *totalFrameCount = pWav->totalPCMFrameCount;\n    }\n    return pSampleData;\n}\nMA_API ma_int16* ma_dr_wav_open_and_read_pcm_frames_s16(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_wav wav;\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (totalFrameCountOut) {\n        *totalFrameCountOut = 0;\n    }\n    if (!ma_dr_wav_init(&wav, onRead, onSeek, pUserData, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_wav__read_pcm_frames_and_close_s16(&wav, channelsOut, sampleRateOut, totalFrameCountOut);\n}\nMA_API float* ma_dr_wav_open_and_read_pcm_frames_f32(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_wav wav;\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (totalFrameCountOut) {\n        *totalFrameCountOut = 0;\n    }\n    if (!ma_dr_wav_init(&wav, onRead, onSeek, pUserData, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_wav__read_pcm_frames_and_close_f32(&wav, channelsOut, sampleRateOut, totalFrameCountOut);\n}\nMA_API ma_int32* ma_dr_wav_open_and_read_pcm_frames_s32(ma_dr_wav_read_proc onRead, ma_dr_wav_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_wav wav;\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (totalFrameCountOut) {\n        *totalFrameCountOut = 0;\n    }\n    if (!ma_dr_wav_init(&wav, onRead, onSeek, pUserData, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_wav__read_pcm_frames_and_close_s32(&wav, channelsOut, sampleRateOut, totalFrameCountOut);\n}\n#ifndef MA_DR_WAV_NO_STDIO\nMA_API ma_int16* ma_dr_wav_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_wav wav;\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (totalFrameCountOut) {\n        *totalFrameCountOut = 0;\n    }\n    if (!ma_dr_wav_init_file(&wav, filename, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_wav__read_pcm_frames_and_close_s16(&wav, channelsOut, sampleRateOut, totalFrameCountOut);\n}\nMA_API float* ma_dr_wav_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_wav wav;\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (totalFrameCountOut) {\n        *totalFrameCountOut = 0;\n    }\n    if (!ma_dr_wav_init_file(&wav, filename, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_wav__read_pcm_frames_and_close_f32(&wav, channelsOut, sampleRateOut, totalFrameCountOut);\n}\nMA_API ma_int32* ma_dr_wav_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_wav wav;\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (totalFrameCountOut) {\n        *totalFrameCountOut = 0;\n    }\n    if (!ma_dr_wav_init_file(&wav, filename, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_wav__read_pcm_frames_and_close_s32(&wav, channelsOut, sampleRateOut, totalFrameCountOut);\n}\n#ifndef MA_DR_WAV_NO_WCHAR\nMA_API ma_int16* ma_dr_wav_open_file_and_read_pcm_frames_s16_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_wav wav;\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (totalFrameCountOut) {\n        *totalFrameCountOut = 0;\n    }\n    if (!ma_dr_wav_init_file_w(&wav, filename, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_wav__read_pcm_frames_and_close_s16(&wav, channelsOut, sampleRateOut, totalFrameCountOut);\n}\nMA_API float* ma_dr_wav_open_file_and_read_pcm_frames_f32_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_wav wav;\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (totalFrameCountOut) {\n        *totalFrameCountOut = 0;\n    }\n    if (!ma_dr_wav_init_file_w(&wav, filename, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_wav__read_pcm_frames_and_close_f32(&wav, channelsOut, sampleRateOut, totalFrameCountOut);\n}\nMA_API ma_int32* ma_dr_wav_open_file_and_read_pcm_frames_s32_w(const wchar_t* filename, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_wav wav;\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (totalFrameCountOut) {\n        *totalFrameCountOut = 0;\n    }\n    if (!ma_dr_wav_init_file_w(&wav, filename, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_wav__read_pcm_frames_and_close_s32(&wav, channelsOut, sampleRateOut, totalFrameCountOut);\n}\n#endif\n#endif\nMA_API ma_int16* ma_dr_wav_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_wav wav;\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (totalFrameCountOut) {\n        *totalFrameCountOut = 0;\n    }\n    if (!ma_dr_wav_init_memory(&wav, data, dataSize, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_wav__read_pcm_frames_and_close_s16(&wav, channelsOut, sampleRateOut, totalFrameCountOut);\n}\nMA_API float* ma_dr_wav_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_wav wav;\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (totalFrameCountOut) {\n        *totalFrameCountOut = 0;\n    }\n    if (!ma_dr_wav_init_memory(&wav, data, dataSize, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_wav__read_pcm_frames_and_close_f32(&wav, channelsOut, sampleRateOut, totalFrameCountOut);\n}\nMA_API ma_int32* ma_dr_wav_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_wav wav;\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (totalFrameCountOut) {\n        *totalFrameCountOut = 0;\n    }\n    if (!ma_dr_wav_init_memory(&wav, data, dataSize, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_wav__read_pcm_frames_and_close_s32(&wav, channelsOut, sampleRateOut, totalFrameCountOut);\n}\n#endif\nMA_API void ma_dr_wav_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks != NULL) {\n        ma_dr_wav__free_from_callbacks(p, pAllocationCallbacks);\n    } else {\n        ma_dr_wav__free_default(p, NULL);\n    }\n}\nMA_API ma_uint16 ma_dr_wav_bytes_to_u16(const ma_uint8* data)\n{\n    return ((ma_uint16)data[0] << 0) | ((ma_uint16)data[1] << 8);\n}\nMA_API ma_int16 ma_dr_wav_bytes_to_s16(const ma_uint8* data)\n{\n    return (ma_int16)ma_dr_wav_bytes_to_u16(data);\n}\nMA_API ma_uint32 ma_dr_wav_bytes_to_u32(const ma_uint8* data)\n{\n    return ma_dr_wav_bytes_to_u32_le(data);\n}\nMA_API float ma_dr_wav_bytes_to_f32(const ma_uint8* data)\n{\n    union {\n        ma_uint32 u32;\n        float f32;\n    } value;\n    value.u32 = ma_dr_wav_bytes_to_u32(data);\n    return value.f32;\n}\nMA_API ma_int32 ma_dr_wav_bytes_to_s32(const ma_uint8* data)\n{\n    return (ma_int32)ma_dr_wav_bytes_to_u32(data);\n}\nMA_API ma_uint64 ma_dr_wav_bytes_to_u64(const ma_uint8* data)\n{\n    return\n        ((ma_uint64)data[0] <<  0) | ((ma_uint64)data[1] <<  8) | ((ma_uint64)data[2] << 16) | ((ma_uint64)data[3] << 24) |\n        ((ma_uint64)data[4] << 32) | ((ma_uint64)data[5] << 40) | ((ma_uint64)data[6] << 48) | ((ma_uint64)data[7] << 56);\n}\nMA_API ma_int64 ma_dr_wav_bytes_to_s64(const ma_uint8* data)\n{\n    return (ma_int64)ma_dr_wav_bytes_to_u64(data);\n}\nMA_API ma_bool32 ma_dr_wav_guid_equal(const ma_uint8 a[16], const ma_uint8 b[16])\n{\n    int i;\n    for (i = 0; i < 16; i += 1) {\n        if (a[i] != b[i]) {\n            return MA_FALSE;\n        }\n    }\n    return MA_TRUE;\n}\nMA_API ma_bool32 ma_dr_wav_fourcc_equal(const ma_uint8* a, const char* b)\n{\n    return\n        a[0] == b[0] &&\n        a[1] == b[1] &&\n        a[2] == b[2] &&\n        a[3] == b[3];\n}\n#ifdef __MRC__\n#pragma options opt reset\n#endif\n#endif\n/* dr_wav_c end */\n#endif  /* MA_DR_WAV_IMPLEMENTATION */\n#endif  /* MA_NO_WAV */\n\n#if !defined(MA_NO_FLAC) && !defined(MA_NO_DECODING)\n#if !defined(MA_DR_FLAC_IMPLEMENTATION) && !defined(MA_DR_FLAC_IMPLEMENTATION) /* For backwards compatibility. Will be removed in version 0.11 for cleanliness. */\n/* dr_flac_c begin */\n#ifndef ma_dr_flac_c\n#define ma_dr_flac_c\n#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))\n    #pragma GCC diagnostic push\n    #if __GNUC__ >= 7\n    #pragma GCC diagnostic ignored \"-Wimplicit-fallthrough\"\n    #endif\n#endif\n#ifdef __linux__\n    #ifndef _BSD_SOURCE\n        #define _BSD_SOURCE\n    #endif\n    #ifndef _DEFAULT_SOURCE\n        #define _DEFAULT_SOURCE\n    #endif\n    #ifndef __USE_BSD\n        #define __USE_BSD\n    #endif\n    #include <endian.h>\n#endif\n#include <stdlib.h>\n#include <string.h>\n#if !defined(MA_DR_FLAC_NO_SIMD)\n    #if defined(MA_X64) || defined(MA_X86)\n        #if defined(_MSC_VER) && !defined(__clang__)\n            #if _MSC_VER >= 1400 && !defined(MA_DR_FLAC_NO_SSE2)\n                #define MA_DR_FLAC_SUPPORT_SSE2\n            #endif\n            #if _MSC_VER >= 1600 && !defined(MA_DR_FLAC_NO_SSE41)\n                #define MA_DR_FLAC_SUPPORT_SSE41\n            #endif\n        #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))\n            #if defined(__SSE2__) && !defined(MA_DR_FLAC_NO_SSE2)\n                #define MA_DR_FLAC_SUPPORT_SSE2\n            #endif\n            #if defined(__SSE4_1__) && !defined(MA_DR_FLAC_NO_SSE41)\n                #define MA_DR_FLAC_SUPPORT_SSE41\n            #endif\n        #endif\n        #if !defined(__GNUC__) && !defined(__clang__) && defined(__has_include)\n            #if !defined(MA_DR_FLAC_SUPPORT_SSE2) && !defined(MA_DR_FLAC_NO_SSE2) && __has_include(<emmintrin.h>)\n                #define MA_DR_FLAC_SUPPORT_SSE2\n            #endif\n            #if !defined(MA_DR_FLAC_SUPPORT_SSE41) && !defined(MA_DR_FLAC_NO_SSE41) && __has_include(<smmintrin.h>)\n                #define MA_DR_FLAC_SUPPORT_SSE41\n            #endif\n        #endif\n        #if defined(MA_DR_FLAC_SUPPORT_SSE41)\n            #include <smmintrin.h>\n        #elif defined(MA_DR_FLAC_SUPPORT_SSE2)\n            #include <emmintrin.h>\n        #endif\n    #endif\n    #if defined(MA_ARM)\n        #if !defined(MA_DR_FLAC_NO_NEON) && (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64))\n            #define MA_DR_FLAC_SUPPORT_NEON\n            #include <arm_neon.h>\n        #endif\n    #endif\n#endif\n#if !defined(MA_DR_FLAC_NO_SIMD) && (defined(MA_X86) || defined(MA_X64))\n    #if defined(_MSC_VER) && !defined(__clang__)\n        #if _MSC_VER >= 1400\n            #include <intrin.h>\n            static void ma_dr_flac__cpuid(int info[4], int fid)\n            {\n                __cpuid(info, fid);\n            }\n        #else\n            #define MA_DR_FLAC_NO_CPUID\n        #endif\n    #else\n        #if defined(__GNUC__) || defined(__clang__)\n            static void ma_dr_flac__cpuid(int info[4], int fid)\n            {\n                #if defined(MA_X86) && defined(__PIC__)\n                    __asm__ __volatile__ (\n                        \"xchg{l} {%%}ebx, %k1;\"\n                        \"cpuid;\"\n                        \"xchg{l} {%%}ebx, %k1;\"\n                        : \"=a\"(info[0]), \"=&r\"(info[1]), \"=c\"(info[2]), \"=d\"(info[3]) : \"a\"(fid), \"c\"(0)\n                    );\n                #else\n                    __asm__ __volatile__ (\n                        \"cpuid\" : \"=a\"(info[0]), \"=b\"(info[1]), \"=c\"(info[2]), \"=d\"(info[3]) : \"a\"(fid), \"c\"(0)\n                    );\n                #endif\n            }\n        #else\n            #define MA_DR_FLAC_NO_CPUID\n        #endif\n    #endif\n#else\n    #define MA_DR_FLAC_NO_CPUID\n#endif\nstatic MA_INLINE ma_bool32 ma_dr_flac_has_sse2(void)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\n    #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_DR_FLAC_NO_SSE2)\n        #if defined(MA_X64)\n            return MA_TRUE;\n        #elif (defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__)\n            return MA_TRUE;\n        #else\n            #if defined(MA_DR_FLAC_NO_CPUID)\n                return MA_FALSE;\n            #else\n                int info[4];\n                ma_dr_flac__cpuid(info, 1);\n                return (info[3] & (1 << 26)) != 0;\n            #endif\n        #endif\n    #else\n        return MA_FALSE;\n    #endif\n#else\n    return MA_FALSE;\n#endif\n}\nstatic MA_INLINE ma_bool32 ma_dr_flac_has_sse41(void)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE41)\n    #if (defined(MA_X64) || defined(MA_X86)) && !defined(MA_DR_FLAC_NO_SSE41)\n        #if defined(__SSE4_1__) || defined(__AVX__)\n            return MA_TRUE;\n        #else\n            #if defined(MA_DR_FLAC_NO_CPUID)\n                return MA_FALSE;\n            #else\n                int info[4];\n                ma_dr_flac__cpuid(info, 1);\n                return (info[2] & (1 << 19)) != 0;\n            #endif\n        #endif\n    #else\n        return MA_FALSE;\n    #endif\n#else\n    return MA_FALSE;\n#endif\n}\n#if defined(_MSC_VER) && _MSC_VER >= 1500 && (defined(MA_X86) || defined(MA_X64)) && !defined(__clang__)\n    #define MA_DR_FLAC_HAS_LZCNT_INTRINSIC\n#elif (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)))\n    #define MA_DR_FLAC_HAS_LZCNT_INTRINSIC\n#elif defined(__clang__)\n    #if defined(__has_builtin)\n        #if __has_builtin(__builtin_clzll) || __has_builtin(__builtin_clzl)\n            #define MA_DR_FLAC_HAS_LZCNT_INTRINSIC\n        #endif\n    #endif\n#endif\n#if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(__clang__)\n    #define MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC\n    #define MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC\n    #define MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC\n#elif defined(__clang__)\n    #if defined(__has_builtin)\n        #if __has_builtin(__builtin_bswap16)\n            #define MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC\n        #endif\n        #if __has_builtin(__builtin_bswap32)\n            #define MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC\n        #endif\n        #if __has_builtin(__builtin_bswap64)\n            #define MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC\n        #endif\n    #endif\n#elif defined(__GNUC__)\n    #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))\n        #define MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC\n        #define MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC\n    #endif\n    #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))\n        #define MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC\n    #endif\n#elif defined(__WATCOMC__) && defined(__386__)\n    #define MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC\n    #define MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC\n    #define MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC\n    extern __inline ma_uint16 _watcom_bswap16(ma_uint16);\n    extern __inline ma_uint32 _watcom_bswap32(ma_uint32);\n    extern __inline ma_uint64 _watcom_bswap64(ma_uint64);\n#pragma aux _watcom_bswap16 = \\\n    \"xchg al, ah\" \\\n    parm  [ax]    \\\n    value [ax]    \\\n    modify nomemory;\n#pragma aux _watcom_bswap32 = \\\n    \"bswap eax\" \\\n    parm  [eax] \\\n    value [eax] \\\n    modify nomemory;\n#pragma aux _watcom_bswap64 = \\\n    \"bswap eax\"     \\\n    \"bswap edx\"     \\\n    \"xchg eax,edx\"  \\\n    parm [eax edx]  \\\n    value [eax edx] \\\n    modify nomemory;\n#endif\n#ifndef MA_DR_FLAC_ASSERT\n#include <assert.h>\n#define MA_DR_FLAC_ASSERT(expression)           assert(expression)\n#endif\n#ifndef MA_DR_FLAC_MALLOC\n#define MA_DR_FLAC_MALLOC(sz)                   malloc((sz))\n#endif\n#ifndef MA_DR_FLAC_REALLOC\n#define MA_DR_FLAC_REALLOC(p, sz)               realloc((p), (sz))\n#endif\n#ifndef MA_DR_FLAC_FREE\n#define MA_DR_FLAC_FREE(p)                      free((p))\n#endif\n#ifndef MA_DR_FLAC_COPY_MEMORY\n#define MA_DR_FLAC_COPY_MEMORY(dst, src, sz)    memcpy((dst), (src), (sz))\n#endif\n#ifndef MA_DR_FLAC_ZERO_MEMORY\n#define MA_DR_FLAC_ZERO_MEMORY(p, sz)           memset((p), 0, (sz))\n#endif\n#ifndef MA_DR_FLAC_ZERO_OBJECT\n#define MA_DR_FLAC_ZERO_OBJECT(p)               MA_DR_FLAC_ZERO_MEMORY((p), sizeof(*(p)))\n#endif\n#define MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE                     64\n#define MA_DR_FLAC_SUBFRAME_CONSTANT                        0\n#define MA_DR_FLAC_SUBFRAME_VERBATIM                        1\n#define MA_DR_FLAC_SUBFRAME_FIXED                           8\n#define MA_DR_FLAC_SUBFRAME_LPC                             32\n#define MA_DR_FLAC_SUBFRAME_RESERVED                        255\n#define MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE  0\n#define MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2 1\n#define MA_DR_FLAC_CHANNEL_ASSIGNMENT_INDEPENDENT           0\n#define MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE             8\n#define MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE            9\n#define MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE              10\n#define MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES                  18\n#define MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES             36\n#define MA_DR_FLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES       12\n#define ma_dr_flac_align(x, a)                              ((((x) + (a) - 1) / (a)) * (a))\nMA_API void ma_dr_flac_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision)\n{\n    if (pMajor) {\n        *pMajor = MA_DR_FLAC_VERSION_MAJOR;\n    }\n    if (pMinor) {\n        *pMinor = MA_DR_FLAC_VERSION_MINOR;\n    }\n    if (pRevision) {\n        *pRevision = MA_DR_FLAC_VERSION_REVISION;\n    }\n}\nMA_API const char* ma_dr_flac_version_string(void)\n{\n    return MA_DR_FLAC_VERSION_STRING;\n}\n#if defined(__has_feature)\n    #if __has_feature(thread_sanitizer)\n        #define MA_DR_FLAC_NO_THREAD_SANITIZE __attribute__((no_sanitize(\"thread\")))\n    #else\n        #define MA_DR_FLAC_NO_THREAD_SANITIZE\n    #endif\n#else\n    #define MA_DR_FLAC_NO_THREAD_SANITIZE\n#endif\n#if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC)\nstatic ma_bool32 ma_dr_flac__gIsLZCNTSupported = MA_FALSE;\n#endif\n#ifndef MA_DR_FLAC_NO_CPUID\nstatic ma_bool32 ma_dr_flac__gIsSSE2Supported  = MA_FALSE;\nstatic ma_bool32 ma_dr_flac__gIsSSE41Supported = MA_FALSE;\nMA_DR_FLAC_NO_THREAD_SANITIZE static void ma_dr_flac__init_cpu_caps(void)\n{\n    static ma_bool32 isCPUCapsInitialized = MA_FALSE;\n    if (!isCPUCapsInitialized) {\n#if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC)\n        int info[4] = {0};\n        ma_dr_flac__cpuid(info, 0x80000001);\n        ma_dr_flac__gIsLZCNTSupported = (info[2] & (1 << 5)) != 0;\n#endif\n        ma_dr_flac__gIsSSE2Supported = ma_dr_flac_has_sse2();\n        ma_dr_flac__gIsSSE41Supported = ma_dr_flac_has_sse41();\n        isCPUCapsInitialized = MA_TRUE;\n    }\n}\n#else\nstatic ma_bool32 ma_dr_flac__gIsNEONSupported  = MA_FALSE;\nstatic MA_INLINE ma_bool32 ma_dr_flac__has_neon(void)\n{\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\n    #if defined(MA_ARM) && !defined(MA_DR_FLAC_NO_NEON)\n        #if (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64))\n            return MA_TRUE;\n        #else\n            return MA_FALSE;\n        #endif\n    #else\n        return MA_FALSE;\n    #endif\n#else\n    return MA_FALSE;\n#endif\n}\nMA_DR_FLAC_NO_THREAD_SANITIZE static void ma_dr_flac__init_cpu_caps(void)\n{\n    ma_dr_flac__gIsNEONSupported = ma_dr_flac__has_neon();\n#if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC) && defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5)\n    ma_dr_flac__gIsLZCNTSupported = MA_TRUE;\n#endif\n}\n#endif\nstatic MA_INLINE ma_bool32 ma_dr_flac__is_little_endian(void)\n{\n#if defined(MA_X86) || defined(MA_X64)\n    return MA_TRUE;\n#elif defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN\n    return MA_TRUE;\n#else\n    int n = 1;\n    return (*(char*)&n) == 1;\n#endif\n}\nstatic MA_INLINE ma_uint16 ma_dr_flac__swap_endian_uint16(ma_uint16 n)\n{\n#ifdef MA_DR_FLAC_HAS_BYTESWAP16_INTRINSIC\n    #if defined(_MSC_VER) && !defined(__clang__)\n        return _byteswap_ushort(n);\n    #elif defined(__GNUC__) || defined(__clang__)\n        return __builtin_bswap16(n);\n    #elif defined(__WATCOMC__) && defined(__386__)\n        return _watcom_bswap16(n);\n    #else\n        #error \"This compiler does not support the byte swap intrinsic.\"\n    #endif\n#else\n    return ((n & 0xFF00) >> 8) |\n           ((n & 0x00FF) << 8);\n#endif\n}\nstatic MA_INLINE ma_uint32 ma_dr_flac__swap_endian_uint32(ma_uint32 n)\n{\n#ifdef MA_DR_FLAC_HAS_BYTESWAP32_INTRINSIC\n    #if defined(_MSC_VER) && !defined(__clang__)\n        return _byteswap_ulong(n);\n    #elif defined(__GNUC__) || defined(__clang__)\n        #if defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 6) && !defined(__ARM_ARCH_6M__) && !defined(MA_64BIT)\n            ma_uint32 r;\n            __asm__ __volatile__ (\n            #if defined(MA_64BIT)\n                \"rev %w[out], %w[in]\" : [out]\"=r\"(r) : [in]\"r\"(n)\n            #else\n                \"rev %[out], %[in]\" : [out]\"=r\"(r) : [in]\"r\"(n)\n            #endif\n            );\n            return r;\n        #else\n            return __builtin_bswap32(n);\n        #endif\n    #elif defined(__WATCOMC__) && defined(__386__)\n        return _watcom_bswap32(n);\n    #else\n        #error \"This compiler does not support the byte swap intrinsic.\"\n    #endif\n#else\n    return ((n & 0xFF000000) >> 24) |\n           ((n & 0x00FF0000) >>  8) |\n           ((n & 0x0000FF00) <<  8) |\n           ((n & 0x000000FF) << 24);\n#endif\n}\nstatic MA_INLINE ma_uint64 ma_dr_flac__swap_endian_uint64(ma_uint64 n)\n{\n#ifdef MA_DR_FLAC_HAS_BYTESWAP64_INTRINSIC\n    #if defined(_MSC_VER) && !defined(__clang__)\n        return _byteswap_uint64(n);\n    #elif defined(__GNUC__) || defined(__clang__)\n        return __builtin_bswap64(n);\n    #elif defined(__WATCOMC__) && defined(__386__)\n        return _watcom_bswap64(n);\n    #else\n        #error \"This compiler does not support the byte swap intrinsic.\"\n    #endif\n#else\n    return ((n & ((ma_uint64)0xFF000000 << 32)) >> 56) |\n           ((n & ((ma_uint64)0x00FF0000 << 32)) >> 40) |\n           ((n & ((ma_uint64)0x0000FF00 << 32)) >> 24) |\n           ((n & ((ma_uint64)0x000000FF << 32)) >>  8) |\n           ((n & ((ma_uint64)0xFF000000      )) <<  8) |\n           ((n & ((ma_uint64)0x00FF0000      )) << 24) |\n           ((n & ((ma_uint64)0x0000FF00      )) << 40) |\n           ((n & ((ma_uint64)0x000000FF      )) << 56);\n#endif\n}\nstatic MA_INLINE ma_uint16 ma_dr_flac__be2host_16(ma_uint16 n)\n{\n    if (ma_dr_flac__is_little_endian()) {\n        return ma_dr_flac__swap_endian_uint16(n);\n    }\n    return n;\n}\nstatic MA_INLINE ma_uint32 ma_dr_flac__be2host_32(ma_uint32 n)\n{\n    if (ma_dr_flac__is_little_endian()) {\n        return ma_dr_flac__swap_endian_uint32(n);\n    }\n    return n;\n}\nstatic MA_INLINE ma_uint32 ma_dr_flac__be2host_32_ptr_unaligned(const void* pData)\n{\n    const ma_uint8* pNum = (ma_uint8*)pData;\n    return *(pNum) << 24 | *(pNum+1) << 16 | *(pNum+2) << 8 | *(pNum+3);\n}\nstatic MA_INLINE ma_uint64 ma_dr_flac__be2host_64(ma_uint64 n)\n{\n    if (ma_dr_flac__is_little_endian()) {\n        return ma_dr_flac__swap_endian_uint64(n);\n    }\n    return n;\n}\nstatic MA_INLINE ma_uint32 ma_dr_flac__le2host_32(ma_uint32 n)\n{\n    if (!ma_dr_flac__is_little_endian()) {\n        return ma_dr_flac__swap_endian_uint32(n);\n    }\n    return n;\n}\nstatic MA_INLINE ma_uint32 ma_dr_flac__le2host_32_ptr_unaligned(const void* pData)\n{\n    const ma_uint8* pNum = (ma_uint8*)pData;\n    return *pNum | *(pNum+1) << 8 |  *(pNum+2) << 16 | *(pNum+3) << 24;\n}\nstatic MA_INLINE ma_uint32 ma_dr_flac__unsynchsafe_32(ma_uint32 n)\n{\n    ma_uint32 result = 0;\n    result |= (n & 0x7F000000) >> 3;\n    result |= (n & 0x007F0000) >> 2;\n    result |= (n & 0x00007F00) >> 1;\n    result |= (n & 0x0000007F) >> 0;\n    return result;\n}\nstatic ma_uint8 ma_dr_flac__crc8_table[] = {\n    0x00, 0x07, 0x0E, 0x09, 0x1C, 0x1B, 0x12, 0x15, 0x38, 0x3F, 0x36, 0x31, 0x24, 0x23, 0x2A, 0x2D,\n    0x70, 0x77, 0x7E, 0x79, 0x6C, 0x6B, 0x62, 0x65, 0x48, 0x4F, 0x46, 0x41, 0x54, 0x53, 0x5A, 0x5D,\n    0xE0, 0xE7, 0xEE, 0xE9, 0xFC, 0xFB, 0xF2, 0xF5, 0xD8, 0xDF, 0xD6, 0xD1, 0xC4, 0xC3, 0xCA, 0xCD,\n    0x90, 0x97, 0x9E, 0x99, 0x8C, 0x8B, 0x82, 0x85, 0xA8, 0xAF, 0xA6, 0xA1, 0xB4, 0xB3, 0xBA, 0xBD,\n    0xC7, 0xC0, 0xC9, 0xCE, 0xDB, 0xDC, 0xD5, 0xD2, 0xFF, 0xF8, 0xF1, 0xF6, 0xE3, 0xE4, 0xED, 0xEA,\n    0xB7, 0xB0, 0xB9, 0xBE, 0xAB, 0xAC, 0xA5, 0xA2, 0x8F, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9D, 0x9A,\n    0x27, 0x20, 0x29, 0x2E, 0x3B, 0x3C, 0x35, 0x32, 0x1F, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0D, 0x0A,\n    0x57, 0x50, 0x59, 0x5E, 0x4B, 0x4C, 0x45, 0x42, 0x6F, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7D, 0x7A,\n    0x89, 0x8E, 0x87, 0x80, 0x95, 0x92, 0x9B, 0x9C, 0xB1, 0xB6, 0xBF, 0xB8, 0xAD, 0xAA, 0xA3, 0xA4,\n    0xF9, 0xFE, 0xF7, 0xF0, 0xE5, 0xE2, 0xEB, 0xEC, 0xC1, 0xC6, 0xCF, 0xC8, 0xDD, 0xDA, 0xD3, 0xD4,\n    0x69, 0x6E, 0x67, 0x60, 0x75, 0x72, 0x7B, 0x7C, 0x51, 0x56, 0x5F, 0x58, 0x4D, 0x4A, 0x43, 0x44,\n    0x19, 0x1E, 0x17, 0x10, 0x05, 0x02, 0x0B, 0x0C, 0x21, 0x26, 0x2F, 0x28, 0x3D, 0x3A, 0x33, 0x34,\n    0x4E, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5C, 0x5B, 0x76, 0x71, 0x78, 0x7F, 0x6A, 0x6D, 0x64, 0x63,\n    0x3E, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2C, 0x2B, 0x06, 0x01, 0x08, 0x0F, 0x1A, 0x1D, 0x14, 0x13,\n    0xAE, 0xA9, 0xA0, 0xA7, 0xB2, 0xB5, 0xBC, 0xBB, 0x96, 0x91, 0x98, 0x9F, 0x8A, 0x8D, 0x84, 0x83,\n    0xDE, 0xD9, 0xD0, 0xD7, 0xC2, 0xC5, 0xCC, 0xCB, 0xE6, 0xE1, 0xE8, 0xEF, 0xFA, 0xFD, 0xF4, 0xF3\n};\nstatic ma_uint16 ma_dr_flac__crc16_table[] = {\n    0x0000, 0x8005, 0x800F, 0x000A, 0x801B, 0x001E, 0x0014, 0x8011,\n    0x8033, 0x0036, 0x003C, 0x8039, 0x0028, 0x802D, 0x8027, 0x0022,\n    0x8063, 0x0066, 0x006C, 0x8069, 0x0078, 0x807D, 0x8077, 0x0072,\n    0x0050, 0x8055, 0x805F, 0x005A, 0x804B, 0x004E, 0x0044, 0x8041,\n    0x80C3, 0x00C6, 0x00CC, 0x80C9, 0x00D8, 0x80DD, 0x80D7, 0x00D2,\n    0x00F0, 0x80F5, 0x80FF, 0x00FA, 0x80EB, 0x00EE, 0x00E4, 0x80E1,\n    0x00A0, 0x80A5, 0x80AF, 0x00AA, 0x80BB, 0x00BE, 0x00B4, 0x80B1,\n    0x8093, 0x0096, 0x009C, 0x8099, 0x0088, 0x808D, 0x8087, 0x0082,\n    0x8183, 0x0186, 0x018C, 0x8189, 0x0198, 0x819D, 0x8197, 0x0192,\n    0x01B0, 0x81B5, 0x81BF, 0x01BA, 0x81AB, 0x01AE, 0x01A4, 0x81A1,\n    0x01E0, 0x81E5, 0x81EF, 0x01EA, 0x81FB, 0x01FE, 0x01F4, 0x81F1,\n    0x81D3, 0x01D6, 0x01DC, 0x81D9, 0x01C8, 0x81CD, 0x81C7, 0x01C2,\n    0x0140, 0x8145, 0x814F, 0x014A, 0x815B, 0x015E, 0x0154, 0x8151,\n    0x8173, 0x0176, 0x017C, 0x8179, 0x0168, 0x816D, 0x8167, 0x0162,\n    0x8123, 0x0126, 0x012C, 0x8129, 0x0138, 0x813D, 0x8137, 0x0132,\n    0x0110, 0x8115, 0x811F, 0x011A, 0x810B, 0x010E, 0x0104, 0x8101,\n    0x8303, 0x0306, 0x030C, 0x8309, 0x0318, 0x831D, 0x8317, 0x0312,\n    0x0330, 0x8335, 0x833F, 0x033A, 0x832B, 0x032E, 0x0324, 0x8321,\n    0x0360, 0x8365, 0x836F, 0x036A, 0x837B, 0x037E, 0x0374, 0x8371,\n    0x8353, 0x0356, 0x035C, 0x8359, 0x0348, 0x834D, 0x8347, 0x0342,\n    0x03C0, 0x83C5, 0x83CF, 0x03CA, 0x83DB, 0x03DE, 0x03D4, 0x83D1,\n    0x83F3, 0x03F6, 0x03FC, 0x83F9, 0x03E8, 0x83ED, 0x83E7, 0x03E2,\n    0x83A3, 0x03A6, 0x03AC, 0x83A9, 0x03B8, 0x83BD, 0x83B7, 0x03B2,\n    0x0390, 0x8395, 0x839F, 0x039A, 0x838B, 0x038E, 0x0384, 0x8381,\n    0x0280, 0x8285, 0x828F, 0x028A, 0x829B, 0x029E, 0x0294, 0x8291,\n    0x82B3, 0x02B6, 0x02BC, 0x82B9, 0x02A8, 0x82AD, 0x82A7, 0x02A2,\n    0x82E3, 0x02E6, 0x02EC, 0x82E9, 0x02F8, 0x82FD, 0x82F7, 0x02F2,\n    0x02D0, 0x82D5, 0x82DF, 0x02DA, 0x82CB, 0x02CE, 0x02C4, 0x82C1,\n    0x8243, 0x0246, 0x024C, 0x8249, 0x0258, 0x825D, 0x8257, 0x0252,\n    0x0270, 0x8275, 0x827F, 0x027A, 0x826B, 0x026E, 0x0264, 0x8261,\n    0x0220, 0x8225, 0x822F, 0x022A, 0x823B, 0x023E, 0x0234, 0x8231,\n    0x8213, 0x0216, 0x021C, 0x8219, 0x0208, 0x820D, 0x8207, 0x0202\n};\nstatic MA_INLINE ma_uint8 ma_dr_flac_crc8_byte(ma_uint8 crc, ma_uint8 data)\n{\n    return ma_dr_flac__crc8_table[crc ^ data];\n}\nstatic MA_INLINE ma_uint8 ma_dr_flac_crc8(ma_uint8 crc, ma_uint32 data, ma_uint32 count)\n{\n#ifdef MA_DR_FLAC_NO_CRC\n    (void)crc;\n    (void)data;\n    (void)count;\n    return 0;\n#else\n#if 0\n    ma_uint8 p = 0x07;\n    for (int i = count-1; i >= 0; --i) {\n        ma_uint8 bit = (data & (1 << i)) >> i;\n        if (crc & 0x80) {\n            crc = ((crc << 1) | bit) ^ p;\n        } else {\n            crc = ((crc << 1) | bit);\n        }\n    }\n    return crc;\n#else\n    ma_uint32 wholeBytes;\n    ma_uint32 leftoverBits;\n    ma_uint64 leftoverDataMask;\n    static ma_uint64 leftoverDataMaskTable[8] = {\n        0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F\n    };\n    MA_DR_FLAC_ASSERT(count <= 32);\n    wholeBytes = count >> 3;\n    leftoverBits = count - (wholeBytes*8);\n    leftoverDataMask = leftoverDataMaskTable[leftoverBits];\n    switch (wholeBytes) {\n        case 4: crc = ma_dr_flac_crc8_byte(crc, (ma_uint8)((data & (0xFF000000UL << leftoverBits)) >> (24 + leftoverBits)));\n        case 3: crc = ma_dr_flac_crc8_byte(crc, (ma_uint8)((data & (0x00FF0000UL << leftoverBits)) >> (16 + leftoverBits)));\n        case 2: crc = ma_dr_flac_crc8_byte(crc, (ma_uint8)((data & (0x0000FF00UL << leftoverBits)) >> ( 8 + leftoverBits)));\n        case 1: crc = ma_dr_flac_crc8_byte(crc, (ma_uint8)((data & (0x000000FFUL << leftoverBits)) >> ( 0 + leftoverBits)));\n        case 0: if (leftoverBits > 0) crc = (ma_uint8)((crc << leftoverBits) ^ ma_dr_flac__crc8_table[(crc >> (8 - leftoverBits)) ^ (data & leftoverDataMask)]);\n    }\n    return crc;\n#endif\n#endif\n}\nstatic MA_INLINE ma_uint16 ma_dr_flac_crc16_byte(ma_uint16 crc, ma_uint8 data)\n{\n    return (crc << 8) ^ ma_dr_flac__crc16_table[(ma_uint8)(crc >> 8) ^ data];\n}\nstatic MA_INLINE ma_uint16 ma_dr_flac_crc16_cache(ma_uint16 crc, ma_dr_flac_cache_t data)\n{\n#ifdef MA_64BIT\n    crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 56) & 0xFF));\n    crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 48) & 0xFF));\n    crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 40) & 0xFF));\n    crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 32) & 0xFF));\n#endif\n    crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 24) & 0xFF));\n    crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 16) & 0xFF));\n    crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >>  8) & 0xFF));\n    crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >>  0) & 0xFF));\n    return crc;\n}\nstatic MA_INLINE ma_uint16 ma_dr_flac_crc16_bytes(ma_uint16 crc, ma_dr_flac_cache_t data, ma_uint32 byteCount)\n{\n    switch (byteCount)\n    {\n#ifdef MA_64BIT\n    case 8: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 56) & 0xFF));\n    case 7: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 48) & 0xFF));\n    case 6: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 40) & 0xFF));\n    case 5: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 32) & 0xFF));\n#endif\n    case 4: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 24) & 0xFF));\n    case 3: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >> 16) & 0xFF));\n    case 2: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >>  8) & 0xFF));\n    case 1: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data >>  0) & 0xFF));\n    }\n    return crc;\n}\n#if 0\nstatic MA_INLINE ma_uint16 ma_dr_flac_crc16__32bit(ma_uint16 crc, ma_uint32 data, ma_uint32 count)\n{\n#ifdef MA_DR_FLAC_NO_CRC\n    (void)crc;\n    (void)data;\n    (void)count;\n    return 0;\n#else\n#if 0\n    ma_uint16 p = 0x8005;\n    for (int i = count-1; i >= 0; --i) {\n        ma_uint16 bit = (data & (1ULL << i)) >> i;\n        if (r & 0x8000) {\n            r = ((r << 1) | bit) ^ p;\n        } else {\n            r = ((r << 1) | bit);\n        }\n    }\n    return crc;\n#else\n    ma_uint32 wholeBytes;\n    ma_uint32 leftoverBits;\n    ma_uint64 leftoverDataMask;\n    static ma_uint64 leftoverDataMaskTable[8] = {\n        0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F\n    };\n    MA_DR_FLAC_ASSERT(count <= 64);\n    wholeBytes = count >> 3;\n    leftoverBits = count & 7;\n    leftoverDataMask = leftoverDataMaskTable[leftoverBits];\n    switch (wholeBytes) {\n        default:\n        case 4: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (0xFF000000UL << leftoverBits)) >> (24 + leftoverBits)));\n        case 3: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (0x00FF0000UL << leftoverBits)) >> (16 + leftoverBits)));\n        case 2: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (0x0000FF00UL << leftoverBits)) >> ( 8 + leftoverBits)));\n        case 1: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (0x000000FFUL << leftoverBits)) >> ( 0 + leftoverBits)));\n        case 0: if (leftoverBits > 0) crc = (crc << leftoverBits) ^ ma_dr_flac__crc16_table[(crc >> (16 - leftoverBits)) ^ (data & leftoverDataMask)];\n    }\n    return crc;\n#endif\n#endif\n}\nstatic MA_INLINE ma_uint16 ma_dr_flac_crc16__64bit(ma_uint16 crc, ma_uint64 data, ma_uint32 count)\n{\n#ifdef MA_DR_FLAC_NO_CRC\n    (void)crc;\n    (void)data;\n    (void)count;\n    return 0;\n#else\n    ma_uint32 wholeBytes;\n    ma_uint32 leftoverBits;\n    ma_uint64 leftoverDataMask;\n    static ma_uint64 leftoverDataMaskTable[8] = {\n        0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F\n    };\n    MA_DR_FLAC_ASSERT(count <= 64);\n    wholeBytes = count >> 3;\n    leftoverBits = count & 7;\n    leftoverDataMask = leftoverDataMaskTable[leftoverBits];\n    switch (wholeBytes) {\n        default:\n        case 8: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0xFF000000 << 32) << leftoverBits)) >> (56 + leftoverBits)));\n        case 7: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x00FF0000 << 32) << leftoverBits)) >> (48 + leftoverBits)));\n        case 6: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x0000FF00 << 32) << leftoverBits)) >> (40 + leftoverBits)));\n        case 5: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x000000FF << 32) << leftoverBits)) >> (32 + leftoverBits)));\n        case 4: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0xFF000000      ) << leftoverBits)) >> (24 + leftoverBits)));\n        case 3: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x00FF0000      ) << leftoverBits)) >> (16 + leftoverBits)));\n        case 2: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x0000FF00      ) << leftoverBits)) >> ( 8 + leftoverBits)));\n        case 1: crc = ma_dr_flac_crc16_byte(crc, (ma_uint8)((data & (((ma_uint64)0x000000FF      ) << leftoverBits)) >> ( 0 + leftoverBits)));\n        case 0: if (leftoverBits > 0) crc = (crc << leftoverBits) ^ ma_dr_flac__crc16_table[(crc >> (16 - leftoverBits)) ^ (data & leftoverDataMask)];\n    }\n    return crc;\n#endif\n}\nstatic MA_INLINE ma_uint16 ma_dr_flac_crc16(ma_uint16 crc, ma_dr_flac_cache_t data, ma_uint32 count)\n{\n#ifdef MA_64BIT\n    return ma_dr_flac_crc16__64bit(crc, data, count);\n#else\n    return ma_dr_flac_crc16__32bit(crc, data, count);\n#endif\n}\n#endif\n#ifdef MA_64BIT\n#define ma_dr_flac__be2host__cache_line ma_dr_flac__be2host_64\n#else\n#define ma_dr_flac__be2host__cache_line ma_dr_flac__be2host_32\n#endif\n#define MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs)                      (sizeof((bs)->cache))\n#define MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)                       (sizeof((bs)->cache)*8)\n#define MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)                  (MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - (bs)->consumedBits)\n#define MA_DR_FLAC_CACHE_L1_SELECTION_MASK(_bitCount)           (~((~(ma_dr_flac_cache_t)0) >> (_bitCount)))\n#define MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT(bs, _bitCount)      (MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - (_bitCount))\n#define MA_DR_FLAC_CACHE_L1_SELECT(bs, _bitCount)               (((bs)->cache) & MA_DR_FLAC_CACHE_L1_SELECTION_MASK(_bitCount))\n#define MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, _bitCount)     (MA_DR_FLAC_CACHE_L1_SELECT((bs), (_bitCount)) >>  MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT((bs), (_bitCount)))\n#define MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT_SAFE(bs, _bitCount)(MA_DR_FLAC_CACHE_L1_SELECT((bs), (_bitCount)) >> (MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT((bs), (_bitCount)) & (MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)-1)))\n#define MA_DR_FLAC_CACHE_L2_SIZE_BYTES(bs)                      (sizeof((bs)->cacheL2))\n#define MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)                      (MA_DR_FLAC_CACHE_L2_SIZE_BYTES(bs) / sizeof((bs)->cacheL2[0]))\n#define MA_DR_FLAC_CACHE_L2_LINES_REMAINING(bs)                 (MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs) - (bs)->nextL2Line)\n#ifndef MA_DR_FLAC_NO_CRC\nstatic MA_INLINE void ma_dr_flac__reset_crc16(ma_dr_flac_bs* bs)\n{\n    bs->crc16 = 0;\n    bs->crc16CacheIgnoredBytes = bs->consumedBits >> 3;\n}\nstatic MA_INLINE void ma_dr_flac__update_crc16(ma_dr_flac_bs* bs)\n{\n    if (bs->crc16CacheIgnoredBytes == 0) {\n        bs->crc16 = ma_dr_flac_crc16_cache(bs->crc16, bs->crc16Cache);\n    } else {\n        bs->crc16 = ma_dr_flac_crc16_bytes(bs->crc16, bs->crc16Cache, MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs) - bs->crc16CacheIgnoredBytes);\n        bs->crc16CacheIgnoredBytes = 0;\n    }\n}\nstatic MA_INLINE ma_uint16 ma_dr_flac__flush_crc16(ma_dr_flac_bs* bs)\n{\n    MA_DR_FLAC_ASSERT((MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) & 7) == 0);\n    if (MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) == 0) {\n        ma_dr_flac__update_crc16(bs);\n    } else {\n        bs->crc16 = ma_dr_flac_crc16_bytes(bs->crc16, bs->crc16Cache >> MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs), (bs->consumedBits >> 3) - bs->crc16CacheIgnoredBytes);\n        bs->crc16CacheIgnoredBytes = bs->consumedBits >> 3;\n    }\n    return bs->crc16;\n}\n#endif\nstatic MA_INLINE ma_bool32 ma_dr_flac__reload_l1_cache_from_l2(ma_dr_flac_bs* bs)\n{\n    size_t bytesRead;\n    size_t alignedL1LineCount;\n    if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) {\n        bs->cache = bs->cacheL2[bs->nextL2Line++];\n        return MA_TRUE;\n    }\n    if (bs->unalignedByteCount > 0) {\n        return MA_FALSE;\n    }\n    bytesRead = bs->onRead(bs->pUserData, bs->cacheL2, MA_DR_FLAC_CACHE_L2_SIZE_BYTES(bs));\n    bs->nextL2Line = 0;\n    if (bytesRead == MA_DR_FLAC_CACHE_L2_SIZE_BYTES(bs)) {\n        bs->cache = bs->cacheL2[bs->nextL2Line++];\n        return MA_TRUE;\n    }\n    alignedL1LineCount = bytesRead / MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs);\n    bs->unalignedByteCount = bytesRead - (alignedL1LineCount * MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs));\n    if (bs->unalignedByteCount > 0) {\n        bs->unalignedCache = bs->cacheL2[alignedL1LineCount];\n    }\n    if (alignedL1LineCount > 0) {\n        size_t offset = MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs) - alignedL1LineCount;\n        size_t i;\n        for (i = alignedL1LineCount; i > 0; --i) {\n            bs->cacheL2[i-1 + offset] = bs->cacheL2[i-1];\n        }\n        bs->nextL2Line = (ma_uint32)offset;\n        bs->cache = bs->cacheL2[bs->nextL2Line++];\n        return MA_TRUE;\n    } else {\n        bs->nextL2Line = MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs);\n        return MA_FALSE;\n    }\n}\nstatic ma_bool32 ma_dr_flac__reload_cache(ma_dr_flac_bs* bs)\n{\n    size_t bytesRead;\n#ifndef MA_DR_FLAC_NO_CRC\n    ma_dr_flac__update_crc16(bs);\n#endif\n    if (ma_dr_flac__reload_l1_cache_from_l2(bs)) {\n        bs->cache = ma_dr_flac__be2host__cache_line(bs->cache);\n        bs->consumedBits = 0;\n#ifndef MA_DR_FLAC_NO_CRC\n        bs->crc16Cache = bs->cache;\n#endif\n        return MA_TRUE;\n    }\n    bytesRead = bs->unalignedByteCount;\n    if (bytesRead == 0) {\n        bs->consumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs);\n        return MA_FALSE;\n    }\n    MA_DR_FLAC_ASSERT(bytesRead < MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs));\n    bs->consumedBits = (ma_uint32)(MA_DR_FLAC_CACHE_L1_SIZE_BYTES(bs) - bytesRead) * 8;\n    bs->cache = ma_dr_flac__be2host__cache_line(bs->unalignedCache);\n    bs->cache &= MA_DR_FLAC_CACHE_L1_SELECTION_MASK(MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs));\n    bs->unalignedByteCount = 0;\n#ifndef MA_DR_FLAC_NO_CRC\n    bs->crc16Cache = bs->cache >> bs->consumedBits;\n    bs->crc16CacheIgnoredBytes = bs->consumedBits >> 3;\n#endif\n    return MA_TRUE;\n}\nstatic void ma_dr_flac__reset_cache(ma_dr_flac_bs* bs)\n{\n    bs->nextL2Line   = MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs);\n    bs->consumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs);\n    bs->cache = 0;\n    bs->unalignedByteCount = 0;\n    bs->unalignedCache = 0;\n#ifndef MA_DR_FLAC_NO_CRC\n    bs->crc16Cache = 0;\n    bs->crc16CacheIgnoredBytes = 0;\n#endif\n}\nstatic MA_INLINE ma_bool32 ma_dr_flac__read_uint32(ma_dr_flac_bs* bs, unsigned int bitCount, ma_uint32* pResultOut)\n{\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(pResultOut != NULL);\n    MA_DR_FLAC_ASSERT(bitCount > 0);\n    MA_DR_FLAC_ASSERT(bitCount <= 32);\n    if (bs->consumedBits == MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)) {\n        if (!ma_dr_flac__reload_cache(bs)) {\n            return MA_FALSE;\n        }\n    }\n    if (bitCount <= MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) {\n#ifdef MA_64BIT\n        *pResultOut = (ma_uint32)MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCount);\n        bs->consumedBits += bitCount;\n        bs->cache <<= bitCount;\n#else\n        if (bitCount < MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)) {\n            *pResultOut = (ma_uint32)MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCount);\n            bs->consumedBits += bitCount;\n            bs->cache <<= bitCount;\n        } else {\n            *pResultOut = (ma_uint32)bs->cache;\n            bs->consumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs);\n            bs->cache = 0;\n        }\n#endif\n        return MA_TRUE;\n    } else {\n        ma_uint32 bitCountHi = MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs);\n        ma_uint32 bitCountLo = bitCount - bitCountHi;\n        ma_uint32 resultHi;\n        MA_DR_FLAC_ASSERT(bitCountHi > 0);\n        MA_DR_FLAC_ASSERT(bitCountHi < 32);\n        resultHi = (ma_uint32)MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountHi);\n        if (!ma_dr_flac__reload_cache(bs)) {\n            return MA_FALSE;\n        }\n        if (bitCountLo > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) {\n            return MA_FALSE;\n        }\n        *pResultOut = (resultHi << bitCountLo) | (ma_uint32)MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountLo);\n        bs->consumedBits += bitCountLo;\n        bs->cache <<= bitCountLo;\n        return MA_TRUE;\n    }\n}\nstatic ma_bool32 ma_dr_flac__read_int32(ma_dr_flac_bs* bs, unsigned int bitCount, ma_int32* pResult)\n{\n    ma_uint32 result;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(pResult != NULL);\n    MA_DR_FLAC_ASSERT(bitCount > 0);\n    MA_DR_FLAC_ASSERT(bitCount <= 32);\n    if (!ma_dr_flac__read_uint32(bs, bitCount, &result)) {\n        return MA_FALSE;\n    }\n    if (bitCount < 32) {\n        ma_uint32 signbit;\n        signbit = ((result >> (bitCount-1)) & 0x01);\n        result |= (~signbit + 1) << bitCount;\n    }\n    *pResult = (ma_int32)result;\n    return MA_TRUE;\n}\n#ifdef MA_64BIT\nstatic ma_bool32 ma_dr_flac__read_uint64(ma_dr_flac_bs* bs, unsigned int bitCount, ma_uint64* pResultOut)\n{\n    ma_uint32 resultHi;\n    ma_uint32 resultLo;\n    MA_DR_FLAC_ASSERT(bitCount <= 64);\n    MA_DR_FLAC_ASSERT(bitCount >  32);\n    if (!ma_dr_flac__read_uint32(bs, bitCount - 32, &resultHi)) {\n        return MA_FALSE;\n    }\n    if (!ma_dr_flac__read_uint32(bs, 32, &resultLo)) {\n        return MA_FALSE;\n    }\n    *pResultOut = (((ma_uint64)resultHi) << 32) | ((ma_uint64)resultLo);\n    return MA_TRUE;\n}\n#endif\n#if 0\nstatic ma_bool32 ma_dr_flac__read_int64(ma_dr_flac_bs* bs, unsigned int bitCount, ma_int64* pResultOut)\n{\n    ma_uint64 result;\n    ma_uint64 signbit;\n    MA_DR_FLAC_ASSERT(bitCount <= 64);\n    if (!ma_dr_flac__read_uint64(bs, bitCount, &result)) {\n        return MA_FALSE;\n    }\n    signbit = ((result >> (bitCount-1)) & 0x01);\n    result |= (~signbit + 1) << bitCount;\n    *pResultOut = (ma_int64)result;\n    return MA_TRUE;\n}\n#endif\nstatic ma_bool32 ma_dr_flac__read_uint16(ma_dr_flac_bs* bs, unsigned int bitCount, ma_uint16* pResult)\n{\n    ma_uint32 result;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(pResult != NULL);\n    MA_DR_FLAC_ASSERT(bitCount > 0);\n    MA_DR_FLAC_ASSERT(bitCount <= 16);\n    if (!ma_dr_flac__read_uint32(bs, bitCount, &result)) {\n        return MA_FALSE;\n    }\n    *pResult = (ma_uint16)result;\n    return MA_TRUE;\n}\n#if 0\nstatic ma_bool32 ma_dr_flac__read_int16(ma_dr_flac_bs* bs, unsigned int bitCount, ma_int16* pResult)\n{\n    ma_int32 result;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(pResult != NULL);\n    MA_DR_FLAC_ASSERT(bitCount > 0);\n    MA_DR_FLAC_ASSERT(bitCount <= 16);\n    if (!ma_dr_flac__read_int32(bs, bitCount, &result)) {\n        return MA_FALSE;\n    }\n    *pResult = (ma_int16)result;\n    return MA_TRUE;\n}\n#endif\nstatic ma_bool32 ma_dr_flac__read_uint8(ma_dr_flac_bs* bs, unsigned int bitCount, ma_uint8* pResult)\n{\n    ma_uint32 result;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(pResult != NULL);\n    MA_DR_FLAC_ASSERT(bitCount > 0);\n    MA_DR_FLAC_ASSERT(bitCount <= 8);\n    if (!ma_dr_flac__read_uint32(bs, bitCount, &result)) {\n        return MA_FALSE;\n    }\n    *pResult = (ma_uint8)result;\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__read_int8(ma_dr_flac_bs* bs, unsigned int bitCount, ma_int8* pResult)\n{\n    ma_int32 result;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(pResult != NULL);\n    MA_DR_FLAC_ASSERT(bitCount > 0);\n    MA_DR_FLAC_ASSERT(bitCount <= 8);\n    if (!ma_dr_flac__read_int32(bs, bitCount, &result)) {\n        return MA_FALSE;\n    }\n    *pResult = (ma_int8)result;\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__seek_bits(ma_dr_flac_bs* bs, size_t bitsToSeek)\n{\n    if (bitsToSeek <= MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) {\n        bs->consumedBits += (ma_uint32)bitsToSeek;\n        bs->cache <<= bitsToSeek;\n        return MA_TRUE;\n    } else {\n        bitsToSeek       -= MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs);\n        bs->consumedBits += MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs);\n        bs->cache         = 0;\n#ifdef MA_64BIT\n        while (bitsToSeek >= MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)) {\n            ma_uint64 bin;\n            if (!ma_dr_flac__read_uint64(bs, MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs), &bin)) {\n                return MA_FALSE;\n            }\n            bitsToSeek -= MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs);\n        }\n#else\n        while (bitsToSeek >= MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)) {\n            ma_uint32 bin;\n            if (!ma_dr_flac__read_uint32(bs, MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs), &bin)) {\n                return MA_FALSE;\n            }\n            bitsToSeek -= MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs);\n        }\n#endif\n        while (bitsToSeek >= 8) {\n            ma_uint8 bin;\n            if (!ma_dr_flac__read_uint8(bs, 8, &bin)) {\n                return MA_FALSE;\n            }\n            bitsToSeek -= 8;\n        }\n        if (bitsToSeek > 0) {\n            ma_uint8 bin;\n            if (!ma_dr_flac__read_uint8(bs, (ma_uint32)bitsToSeek, &bin)) {\n                return MA_FALSE;\n            }\n            bitsToSeek = 0;\n        }\n        MA_DR_FLAC_ASSERT(bitsToSeek == 0);\n        return MA_TRUE;\n    }\n}\nstatic ma_bool32 ma_dr_flac__find_and_seek_to_next_sync_code(ma_dr_flac_bs* bs)\n{\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    if (!ma_dr_flac__seek_bits(bs, MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) & 7)) {\n        return MA_FALSE;\n    }\n    for (;;) {\n        ma_uint8 hi;\n#ifndef MA_DR_FLAC_NO_CRC\n        ma_dr_flac__reset_crc16(bs);\n#endif\n        if (!ma_dr_flac__read_uint8(bs, 8, &hi)) {\n            return MA_FALSE;\n        }\n        if (hi == 0xFF) {\n            ma_uint8 lo;\n            if (!ma_dr_flac__read_uint8(bs, 6, &lo)) {\n                return MA_FALSE;\n            }\n            if (lo == 0x3E) {\n                return MA_TRUE;\n            } else {\n                if (!ma_dr_flac__seek_bits(bs, MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) & 7)) {\n                    return MA_FALSE;\n                }\n            }\n        }\n    }\n}\n#if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC)\n#define MA_DR_FLAC_IMPLEMENT_CLZ_LZCNT\n#endif\n#if  defined(_MSC_VER) && _MSC_VER >= 1400 && (defined(MA_X64) || defined(MA_X86)) && !defined(__clang__)\n#define MA_DR_FLAC_IMPLEMENT_CLZ_MSVC\n#endif\n#if  defined(__WATCOMC__) && defined(__386__)\n#define MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM\n#endif\n#ifdef __MRC__\n#include <intrinsics.h>\n#define MA_DR_FLAC_IMPLEMENT_CLZ_MRC\n#endif\nstatic MA_INLINE ma_uint32 ma_dr_flac__clz_software(ma_dr_flac_cache_t x)\n{\n    ma_uint32 n;\n    static ma_uint32 clz_table_4[] = {\n        0,\n        4,\n        3, 3,\n        2, 2, 2, 2,\n        1, 1, 1, 1, 1, 1, 1, 1\n    };\n    if (x == 0) {\n        return sizeof(x)*8;\n    }\n    n = clz_table_4[x >> (sizeof(x)*8 - 4)];\n    if (n == 0) {\n#ifdef MA_64BIT\n        if ((x & ((ma_uint64)0xFFFFFFFF << 32)) == 0) { n  = 32; x <<= 32; }\n        if ((x & ((ma_uint64)0xFFFF0000 << 32)) == 0) { n += 16; x <<= 16; }\n        if ((x & ((ma_uint64)0xFF000000 << 32)) == 0) { n += 8;  x <<= 8;  }\n        if ((x & ((ma_uint64)0xF0000000 << 32)) == 0) { n += 4;  x <<= 4;  }\n#else\n        if ((x & 0xFFFF0000) == 0) { n  = 16; x <<= 16; }\n        if ((x & 0xFF000000) == 0) { n += 8;  x <<= 8;  }\n        if ((x & 0xF0000000) == 0) { n += 4;  x <<= 4;  }\n#endif\n        n += clz_table_4[x >> (sizeof(x)*8 - 4)];\n    }\n    return n - 1;\n}\n#ifdef MA_DR_FLAC_IMPLEMENT_CLZ_LZCNT\nstatic MA_INLINE ma_bool32 ma_dr_flac__is_lzcnt_supported(void)\n{\n#if defined(MA_DR_FLAC_HAS_LZCNT_INTRINSIC) && defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5)\n    return MA_TRUE;\n#elif defined(__MRC__)\n    return MA_TRUE;\n#else\n    #ifdef MA_DR_FLAC_HAS_LZCNT_INTRINSIC\n        return ma_dr_flac__gIsLZCNTSupported;\n    #else\n        return MA_FALSE;\n    #endif\n#endif\n}\nstatic MA_INLINE ma_uint32 ma_dr_flac__clz_lzcnt(ma_dr_flac_cache_t x)\n{\n#if defined(_MSC_VER)\n    #ifdef MA_64BIT\n        return (ma_uint32)__lzcnt64(x);\n    #else\n        return (ma_uint32)__lzcnt(x);\n    #endif\n#else\n    #if defined(__GNUC__) || defined(__clang__)\n        #if defined(MA_X64)\n            {\n                ma_uint64 r;\n                __asm__ __volatile__ (\n                    \"lzcnt{ %1, %0| %0, %1}\" : \"=r\"(r) : \"r\"(x) : \"cc\"\n                );\n                return (ma_uint32)r;\n            }\n        #elif defined(MA_X86)\n            {\n                ma_uint32 r;\n                __asm__ __volatile__ (\n                    \"lzcnt{l %1, %0| %0, %1}\" : \"=r\"(r) : \"r\"(x) : \"cc\"\n                );\n                return r;\n            }\n        #elif defined(MA_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) && !defined(__ARM_ARCH_6M__) && !defined(MA_64BIT)\n            {\n                unsigned int r;\n                __asm__ __volatile__ (\n                #if defined(MA_64BIT)\n                    \"clz %w[out], %w[in]\" : [out]\"=r\"(r) : [in]\"r\"(x)\n                #else\n                    \"clz %[out], %[in]\" : [out]\"=r\"(r) : [in]\"r\"(x)\n                #endif\n                );\n                return r;\n            }\n        #else\n            if (x == 0) {\n                return sizeof(x)*8;\n            }\n            #ifdef MA_64BIT\n                return (ma_uint32)__builtin_clzll((ma_uint64)x);\n            #else\n                return (ma_uint32)__builtin_clzl((ma_uint32)x);\n            #endif\n        #endif\n    #else\n        #error \"This compiler does not support the lzcnt intrinsic.\"\n    #endif\n#endif\n}\n#endif\n#ifdef MA_DR_FLAC_IMPLEMENT_CLZ_MSVC\n#include <intrin.h>\nstatic MA_INLINE ma_uint32 ma_dr_flac__clz_msvc(ma_dr_flac_cache_t x)\n{\n    ma_uint32 n;\n    if (x == 0) {\n        return sizeof(x)*8;\n    }\n#ifdef MA_64BIT\n    _BitScanReverse64((unsigned long*)&n, x);\n#else\n    _BitScanReverse((unsigned long*)&n, x);\n#endif\n    return sizeof(x)*8 - n - 1;\n}\n#endif\n#ifdef MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM\nstatic __inline ma_uint32 ma_dr_flac__clz_watcom (ma_uint32);\n#ifdef MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM_LZCNT\n#pragma aux ma_dr_flac__clz_watcom_lzcnt = \\\n    \"db 0F3h, 0Fh, 0BDh, 0C0h\"  \\\n    parm [eax] \\\n    value [eax] \\\n    modify nomemory;\n#else\n#pragma aux ma_dr_flac__clz_watcom = \\\n    \"bsr eax, eax\" \\\n    \"xor eax, 31\" \\\n    parm [eax] nomemory \\\n    value [eax] \\\n    modify exact [eax] nomemory;\n#endif\n#endif\nstatic MA_INLINE ma_uint32 ma_dr_flac__clz(ma_dr_flac_cache_t x)\n{\n#ifdef MA_DR_FLAC_IMPLEMENT_CLZ_LZCNT\n    if (ma_dr_flac__is_lzcnt_supported()) {\n        return ma_dr_flac__clz_lzcnt(x);\n    } else\n#endif\n    {\n#ifdef MA_DR_FLAC_IMPLEMENT_CLZ_MSVC\n        return ma_dr_flac__clz_msvc(x);\n#elif defined(MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM_LZCNT)\n        return ma_dr_flac__clz_watcom_lzcnt(x);\n#elif defined(MA_DR_FLAC_IMPLEMENT_CLZ_WATCOM)\n        return (x == 0) ? sizeof(x)*8 : ma_dr_flac__clz_watcom(x);\n#elif defined(__MRC__)\n        return __cntlzw(x);\n#else\n        return ma_dr_flac__clz_software(x);\n#endif\n    }\n}\nstatic MA_INLINE ma_bool32 ma_dr_flac__seek_past_next_set_bit(ma_dr_flac_bs* bs, unsigned int* pOffsetOut)\n{\n    ma_uint32 zeroCounter = 0;\n    ma_uint32 setBitOffsetPlus1;\n    while (bs->cache == 0) {\n        zeroCounter += (ma_uint32)MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs);\n        if (!ma_dr_flac__reload_cache(bs)) {\n            return MA_FALSE;\n        }\n    }\n    if (bs->cache == 1) {\n        *pOffsetOut = zeroCounter + (ma_uint32)MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs) - 1;\n        if (!ma_dr_flac__reload_cache(bs)) {\n            return MA_FALSE;\n        }\n        return MA_TRUE;\n    }\n    setBitOffsetPlus1 = ma_dr_flac__clz(bs->cache);\n    setBitOffsetPlus1 += 1;\n    if (setBitOffsetPlus1 > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) {\n        return MA_FALSE;\n    }\n    bs->consumedBits += setBitOffsetPlus1;\n    bs->cache <<= setBitOffsetPlus1;\n    *pOffsetOut = zeroCounter + setBitOffsetPlus1 - 1;\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__seek_to_byte(ma_dr_flac_bs* bs, ma_uint64 offsetFromStart)\n{\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(offsetFromStart > 0);\n    if (offsetFromStart > 0x7FFFFFFF) {\n        ma_uint64 bytesRemaining = offsetFromStart;\n        if (!bs->onSeek(bs->pUserData, 0x7FFFFFFF, ma_dr_flac_seek_origin_start)) {\n            return MA_FALSE;\n        }\n        bytesRemaining -= 0x7FFFFFFF;\n        while (bytesRemaining > 0x7FFFFFFF) {\n            if (!bs->onSeek(bs->pUserData, 0x7FFFFFFF, ma_dr_flac_seek_origin_current)) {\n                return MA_FALSE;\n            }\n            bytesRemaining -= 0x7FFFFFFF;\n        }\n        if (bytesRemaining > 0) {\n            if (!bs->onSeek(bs->pUserData, (int)bytesRemaining, ma_dr_flac_seek_origin_current)) {\n                return MA_FALSE;\n            }\n        }\n    } else {\n        if (!bs->onSeek(bs->pUserData, (int)offsetFromStart, ma_dr_flac_seek_origin_start)) {\n            return MA_FALSE;\n        }\n    }\n    ma_dr_flac__reset_cache(bs);\n    return MA_TRUE;\n}\nstatic ma_result ma_dr_flac__read_utf8_coded_number(ma_dr_flac_bs* bs, ma_uint64* pNumberOut, ma_uint8* pCRCOut)\n{\n    ma_uint8 crc;\n    ma_uint64 result;\n    ma_uint8 utf8[7] = {0};\n    int byteCount;\n    int i;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(pNumberOut != NULL);\n    MA_DR_FLAC_ASSERT(pCRCOut != NULL);\n    crc = *pCRCOut;\n    if (!ma_dr_flac__read_uint8(bs, 8, utf8)) {\n        *pNumberOut = 0;\n        return MA_AT_END;\n    }\n    crc = ma_dr_flac_crc8(crc, utf8[0], 8);\n    if ((utf8[0] & 0x80) == 0) {\n        *pNumberOut = utf8[0];\n        *pCRCOut = crc;\n        return MA_SUCCESS;\n    }\n    if ((utf8[0] & 0xE0) == 0xC0) {\n        byteCount = 2;\n    } else if ((utf8[0] & 0xF0) == 0xE0) {\n        byteCount = 3;\n    } else if ((utf8[0] & 0xF8) == 0xF0) {\n        byteCount = 4;\n    } else if ((utf8[0] & 0xFC) == 0xF8) {\n        byteCount = 5;\n    } else if ((utf8[0] & 0xFE) == 0xFC) {\n        byteCount = 6;\n    } else if ((utf8[0] & 0xFF) == 0xFE) {\n        byteCount = 7;\n    } else {\n        *pNumberOut = 0;\n        return MA_CRC_MISMATCH;\n    }\n    MA_DR_FLAC_ASSERT(byteCount > 1);\n    result = (ma_uint64)(utf8[0] & (0xFF >> (byteCount + 1)));\n    for (i = 1; i < byteCount; ++i) {\n        if (!ma_dr_flac__read_uint8(bs, 8, utf8 + i)) {\n            *pNumberOut = 0;\n            return MA_AT_END;\n        }\n        crc = ma_dr_flac_crc8(crc, utf8[i], 8);\n        result = (result << 6) | (utf8[i] & 0x3F);\n    }\n    *pNumberOut = result;\n    *pCRCOut = crc;\n    return MA_SUCCESS;\n}\nstatic MA_INLINE ma_uint32 ma_dr_flac__ilog2_u32(ma_uint32 x)\n{\n#if 1\n    ma_uint32 result = 0;\n    while (x > 0) {\n        result += 1;\n        x >>= 1;\n    }\n    return result;\n#endif\n}\nstatic MA_INLINE ma_bool32 ma_dr_flac__use_64_bit_prediction(ma_uint32 bitsPerSample, ma_uint32 order, ma_uint32 precision)\n{\n    return bitsPerSample + precision + ma_dr_flac__ilog2_u32(order) > 32;\n}\n#if defined(__clang__)\n__attribute__((no_sanitize(\"signed-integer-overflow\")))\n#endif\nstatic MA_INLINE ma_int32 ma_dr_flac__calculate_prediction_32(ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pDecodedSamples)\n{\n    ma_int32 prediction = 0;\n    MA_DR_FLAC_ASSERT(order <= 32);\n    switch (order)\n    {\n    case 32: prediction += coefficients[31] * pDecodedSamples[-32];\n    case 31: prediction += coefficients[30] * pDecodedSamples[-31];\n    case 30: prediction += coefficients[29] * pDecodedSamples[-30];\n    case 29: prediction += coefficients[28] * pDecodedSamples[-29];\n    case 28: prediction += coefficients[27] * pDecodedSamples[-28];\n    case 27: prediction += coefficients[26] * pDecodedSamples[-27];\n    case 26: prediction += coefficients[25] * pDecodedSamples[-26];\n    case 25: prediction += coefficients[24] * pDecodedSamples[-25];\n    case 24: prediction += coefficients[23] * pDecodedSamples[-24];\n    case 23: prediction += coefficients[22] * pDecodedSamples[-23];\n    case 22: prediction += coefficients[21] * pDecodedSamples[-22];\n    case 21: prediction += coefficients[20] * pDecodedSamples[-21];\n    case 20: prediction += coefficients[19] * pDecodedSamples[-20];\n    case 19: prediction += coefficients[18] * pDecodedSamples[-19];\n    case 18: prediction += coefficients[17] * pDecodedSamples[-18];\n    case 17: prediction += coefficients[16] * pDecodedSamples[-17];\n    case 16: prediction += coefficients[15] * pDecodedSamples[-16];\n    case 15: prediction += coefficients[14] * pDecodedSamples[-15];\n    case 14: prediction += coefficients[13] * pDecodedSamples[-14];\n    case 13: prediction += coefficients[12] * pDecodedSamples[-13];\n    case 12: prediction += coefficients[11] * pDecodedSamples[-12];\n    case 11: prediction += coefficients[10] * pDecodedSamples[-11];\n    case 10: prediction += coefficients[ 9] * pDecodedSamples[-10];\n    case  9: prediction += coefficients[ 8] * pDecodedSamples[- 9];\n    case  8: prediction += coefficients[ 7] * pDecodedSamples[- 8];\n    case  7: prediction += coefficients[ 6] * pDecodedSamples[- 7];\n    case  6: prediction += coefficients[ 5] * pDecodedSamples[- 6];\n    case  5: prediction += coefficients[ 4] * pDecodedSamples[- 5];\n    case  4: prediction += coefficients[ 3] * pDecodedSamples[- 4];\n    case  3: prediction += coefficients[ 2] * pDecodedSamples[- 3];\n    case  2: prediction += coefficients[ 1] * pDecodedSamples[- 2];\n    case  1: prediction += coefficients[ 0] * pDecodedSamples[- 1];\n    }\n    return (ma_int32)(prediction >> shift);\n}\nstatic MA_INLINE ma_int32 ma_dr_flac__calculate_prediction_64(ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pDecodedSamples)\n{\n    ma_int64 prediction;\n    MA_DR_FLAC_ASSERT(order <= 32);\n#ifndef MA_64BIT\n    if (order == 8)\n    {\n        prediction  = coefficients[0] * (ma_int64)pDecodedSamples[-1];\n        prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2];\n        prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3];\n        prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4];\n        prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5];\n        prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6];\n        prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7];\n        prediction += coefficients[7] * (ma_int64)pDecodedSamples[-8];\n    }\n    else if (order == 7)\n    {\n        prediction  = coefficients[0] * (ma_int64)pDecodedSamples[-1];\n        prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2];\n        prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3];\n        prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4];\n        prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5];\n        prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6];\n        prediction += coefficients[6] * (ma_int64)pDecodedSamples[-7];\n    }\n    else if (order == 3)\n    {\n        prediction  = coefficients[0] * (ma_int64)pDecodedSamples[-1];\n        prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2];\n        prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3];\n    }\n    else if (order == 6)\n    {\n        prediction  = coefficients[0] * (ma_int64)pDecodedSamples[-1];\n        prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2];\n        prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3];\n        prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4];\n        prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5];\n        prediction += coefficients[5] * (ma_int64)pDecodedSamples[-6];\n    }\n    else if (order == 5)\n    {\n        prediction  = coefficients[0] * (ma_int64)pDecodedSamples[-1];\n        prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2];\n        prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3];\n        prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4];\n        prediction += coefficients[4] * (ma_int64)pDecodedSamples[-5];\n    }\n    else if (order == 4)\n    {\n        prediction  = coefficients[0] * (ma_int64)pDecodedSamples[-1];\n        prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2];\n        prediction += coefficients[2] * (ma_int64)pDecodedSamples[-3];\n        prediction += coefficients[3] * (ma_int64)pDecodedSamples[-4];\n    }\n    else if (order == 12)\n    {\n        prediction  = coefficients[0]  * (ma_int64)pDecodedSamples[-1];\n        prediction += coefficients[1]  * (ma_int64)pDecodedSamples[-2];\n        prediction += coefficients[2]  * (ma_int64)pDecodedSamples[-3];\n        prediction += coefficients[3]  * (ma_int64)pDecodedSamples[-4];\n        prediction += coefficients[4]  * (ma_int64)pDecodedSamples[-5];\n        prediction += coefficients[5]  * (ma_int64)pDecodedSamples[-6];\n        prediction += coefficients[6]  * (ma_int64)pDecodedSamples[-7];\n        prediction += coefficients[7]  * (ma_int64)pDecodedSamples[-8];\n        prediction += coefficients[8]  * (ma_int64)pDecodedSamples[-9];\n        prediction += coefficients[9]  * (ma_int64)pDecodedSamples[-10];\n        prediction += coefficients[10] * (ma_int64)pDecodedSamples[-11];\n        prediction += coefficients[11] * (ma_int64)pDecodedSamples[-12];\n    }\n    else if (order == 2)\n    {\n        prediction  = coefficients[0] * (ma_int64)pDecodedSamples[-1];\n        prediction += coefficients[1] * (ma_int64)pDecodedSamples[-2];\n    }\n    else if (order == 1)\n    {\n        prediction = coefficients[0] * (ma_int64)pDecodedSamples[-1];\n    }\n    else if (order == 10)\n    {\n        prediction  = coefficients[0]  * (ma_int64)pDecodedSamples[-1];\n        prediction += coefficients[1]  * (ma_int64)pDecodedSamples[-2];\n        prediction += coefficients[2]  * (ma_int64)pDecodedSamples[-3];\n        prediction += coefficients[3]  * (ma_int64)pDecodedSamples[-4];\n        prediction += coefficients[4]  * (ma_int64)pDecodedSamples[-5];\n        prediction += coefficients[5]  * (ma_int64)pDecodedSamples[-6];\n        prediction += coefficients[6]  * (ma_int64)pDecodedSamples[-7];\n        prediction += coefficients[7]  * (ma_int64)pDecodedSamples[-8];\n        prediction += coefficients[8]  * (ma_int64)pDecodedSamples[-9];\n        prediction += coefficients[9]  * (ma_int64)pDecodedSamples[-10];\n    }\n    else if (order == 9)\n    {\n        prediction  = coefficients[0]  * (ma_int64)pDecodedSamples[-1];\n        prediction += coefficients[1]  * (ma_int64)pDecodedSamples[-2];\n        prediction += coefficients[2]  * (ma_int64)pDecodedSamples[-3];\n        prediction += coefficients[3]  * (ma_int64)pDecodedSamples[-4];\n        prediction += coefficients[4]  * (ma_int64)pDecodedSamples[-5];\n        prediction += coefficients[5]  * (ma_int64)pDecodedSamples[-6];\n        prediction += coefficients[6]  * (ma_int64)pDecodedSamples[-7];\n        prediction += coefficients[7]  * (ma_int64)pDecodedSamples[-8];\n        prediction += coefficients[8]  * (ma_int64)pDecodedSamples[-9];\n    }\n    else if (order == 11)\n    {\n        prediction  = coefficients[0]  * (ma_int64)pDecodedSamples[-1];\n        prediction += coefficients[1]  * (ma_int64)pDecodedSamples[-2];\n        prediction += coefficients[2]  * (ma_int64)pDecodedSamples[-3];\n        prediction += coefficients[3]  * (ma_int64)pDecodedSamples[-4];\n        prediction += coefficients[4]  * (ma_int64)pDecodedSamples[-5];\n        prediction += coefficients[5]  * (ma_int64)pDecodedSamples[-6];\n        prediction += coefficients[6]  * (ma_int64)pDecodedSamples[-7];\n        prediction += coefficients[7]  * (ma_int64)pDecodedSamples[-8];\n        prediction += coefficients[8]  * (ma_int64)pDecodedSamples[-9];\n        prediction += coefficients[9]  * (ma_int64)pDecodedSamples[-10];\n        prediction += coefficients[10] * (ma_int64)pDecodedSamples[-11];\n    }\n    else\n    {\n        int j;\n        prediction = 0;\n        for (j = 0; j < (int)order; ++j) {\n            prediction += coefficients[j] * (ma_int64)pDecodedSamples[-j-1];\n        }\n    }\n#endif\n#ifdef MA_64BIT\n    prediction = 0;\n    switch (order)\n    {\n    case 32: prediction += coefficients[31] * (ma_int64)pDecodedSamples[-32];\n    case 31: prediction += coefficients[30] * (ma_int64)pDecodedSamples[-31];\n    case 30: prediction += coefficients[29] * (ma_int64)pDecodedSamples[-30];\n    case 29: prediction += coefficients[28] * (ma_int64)pDecodedSamples[-29];\n    case 28: prediction += coefficients[27] * (ma_int64)pDecodedSamples[-28];\n    case 27: prediction += coefficients[26] * (ma_int64)pDecodedSamples[-27];\n    case 26: prediction += coefficients[25] * (ma_int64)pDecodedSamples[-26];\n    case 25: prediction += coefficients[24] * (ma_int64)pDecodedSamples[-25];\n    case 24: prediction += coefficients[23] * (ma_int64)pDecodedSamples[-24];\n    case 23: prediction += coefficients[22] * (ma_int64)pDecodedSamples[-23];\n    case 22: prediction += coefficients[21] * (ma_int64)pDecodedSamples[-22];\n    case 21: prediction += coefficients[20] * (ma_int64)pDecodedSamples[-21];\n    case 20: prediction += coefficients[19] * (ma_int64)pDecodedSamples[-20];\n    case 19: prediction += coefficients[18] * (ma_int64)pDecodedSamples[-19];\n    case 18: prediction += coefficients[17] * (ma_int64)pDecodedSamples[-18];\n    case 17: prediction += coefficients[16] * (ma_int64)pDecodedSamples[-17];\n    case 16: prediction += coefficients[15] * (ma_int64)pDecodedSamples[-16];\n    case 15: prediction += coefficients[14] * (ma_int64)pDecodedSamples[-15];\n    case 14: prediction += coefficients[13] * (ma_int64)pDecodedSamples[-14];\n    case 13: prediction += coefficients[12] * (ma_int64)pDecodedSamples[-13];\n    case 12: prediction += coefficients[11] * (ma_int64)pDecodedSamples[-12];\n    case 11: prediction += coefficients[10] * (ma_int64)pDecodedSamples[-11];\n    case 10: prediction += coefficients[ 9] * (ma_int64)pDecodedSamples[-10];\n    case  9: prediction += coefficients[ 8] * (ma_int64)pDecodedSamples[- 9];\n    case  8: prediction += coefficients[ 7] * (ma_int64)pDecodedSamples[- 8];\n    case  7: prediction += coefficients[ 6] * (ma_int64)pDecodedSamples[- 7];\n    case  6: prediction += coefficients[ 5] * (ma_int64)pDecodedSamples[- 6];\n    case  5: prediction += coefficients[ 4] * (ma_int64)pDecodedSamples[- 5];\n    case  4: prediction += coefficients[ 3] * (ma_int64)pDecodedSamples[- 4];\n    case  3: prediction += coefficients[ 2] * (ma_int64)pDecodedSamples[- 3];\n    case  2: prediction += coefficients[ 1] * (ma_int64)pDecodedSamples[- 2];\n    case  1: prediction += coefficients[ 0] * (ma_int64)pDecodedSamples[- 1];\n    }\n#endif\n    return (ma_int32)(prediction >> shift);\n}\n#if 0\nstatic ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__reference(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut)\n{\n    ma_uint32 i;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(pSamplesOut != NULL);\n    for (i = 0; i < count; ++i) {\n        ma_uint32 zeroCounter = 0;\n        for (;;) {\n            ma_uint8 bit;\n            if (!ma_dr_flac__read_uint8(bs, 1, &bit)) {\n                return MA_FALSE;\n            }\n            if (bit == 0) {\n                zeroCounter += 1;\n            } else {\n                break;\n            }\n        }\n        ma_uint32 decodedRice;\n        if (riceParam > 0) {\n            if (!ma_dr_flac__read_uint32(bs, riceParam, &decodedRice)) {\n                return MA_FALSE;\n            }\n        } else {\n            decodedRice = 0;\n        }\n        decodedRice |= (zeroCounter << riceParam);\n        if ((decodedRice & 0x01)) {\n            decodedRice = ~(decodedRice >> 1);\n        } else {\n            decodedRice =  (decodedRice >> 1);\n        }\n        if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {\n            pSamplesOut[i] = decodedRice + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + i);\n        } else {\n            pSamplesOut[i] = decodedRice + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + i);\n        }\n    }\n    return MA_TRUE;\n}\n#endif\n#if 0\nstatic ma_bool32 ma_dr_flac__read_rice_parts__reference(ma_dr_flac_bs* bs, ma_uint8 riceParam, ma_uint32* pZeroCounterOut, ma_uint32* pRiceParamPartOut)\n{\n    ma_uint32 zeroCounter = 0;\n    ma_uint32 decodedRice;\n    for (;;) {\n        ma_uint8 bit;\n        if (!ma_dr_flac__read_uint8(bs, 1, &bit)) {\n            return MA_FALSE;\n        }\n        if (bit == 0) {\n            zeroCounter += 1;\n        } else {\n            break;\n        }\n    }\n    if (riceParam > 0) {\n        if (!ma_dr_flac__read_uint32(bs, riceParam, &decodedRice)) {\n            return MA_FALSE;\n        }\n    } else {\n        decodedRice = 0;\n    }\n    *pZeroCounterOut = zeroCounter;\n    *pRiceParamPartOut = decodedRice;\n    return MA_TRUE;\n}\n#endif\n#if 0\nstatic MA_INLINE ma_bool32 ma_dr_flac__read_rice_parts(ma_dr_flac_bs* bs, ma_uint8 riceParam, ma_uint32* pZeroCounterOut, ma_uint32* pRiceParamPartOut)\n{\n    ma_dr_flac_cache_t riceParamMask;\n    ma_uint32 zeroCounter;\n    ma_uint32 setBitOffsetPlus1;\n    ma_uint32 riceParamPart;\n    ma_uint32 riceLength;\n    MA_DR_FLAC_ASSERT(riceParam > 0);\n    riceParamMask = MA_DR_FLAC_CACHE_L1_SELECTION_MASK(riceParam);\n    zeroCounter = 0;\n    while (bs->cache == 0) {\n        zeroCounter += (ma_uint32)MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs);\n        if (!ma_dr_flac__reload_cache(bs)) {\n            return MA_FALSE;\n        }\n    }\n    setBitOffsetPlus1 = ma_dr_flac__clz(bs->cache);\n    zeroCounter += setBitOffsetPlus1;\n    setBitOffsetPlus1 += 1;\n    riceLength = setBitOffsetPlus1 + riceParam;\n    if (riceLength < MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) {\n        riceParamPart = (ma_uint32)((bs->cache & (riceParamMask >> setBitOffsetPlus1)) >> MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT(bs, riceLength));\n        bs->consumedBits += riceLength;\n        bs->cache <<= riceLength;\n    } else {\n        ma_uint32 bitCountLo;\n        ma_dr_flac_cache_t resultHi;\n        bs->consumedBits += riceLength;\n        bs->cache <<= setBitOffsetPlus1 & (MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs)-1);\n        bitCountLo = bs->consumedBits - MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs);\n        resultHi = MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT(bs, riceParam);\n        if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) {\n#ifndef MA_DR_FLAC_NO_CRC\n            ma_dr_flac__update_crc16(bs);\n#endif\n            bs->cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]);\n            bs->consumedBits = 0;\n#ifndef MA_DR_FLAC_NO_CRC\n            bs->crc16Cache = bs->cache;\n#endif\n        } else {\n            if (!ma_dr_flac__reload_cache(bs)) {\n                return MA_FALSE;\n            }\n            if (bitCountLo > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) {\n                return MA_FALSE;\n            }\n        }\n        riceParamPart = (ma_uint32)(resultHi | MA_DR_FLAC_CACHE_L1_SELECT_AND_SHIFT_SAFE(bs, bitCountLo));\n        bs->consumedBits += bitCountLo;\n        bs->cache <<= bitCountLo;\n    }\n    pZeroCounterOut[0] = zeroCounter;\n    pRiceParamPartOut[0] = riceParamPart;\n    return MA_TRUE;\n}\n#endif\nstatic MA_INLINE ma_bool32 ma_dr_flac__read_rice_parts_x1(ma_dr_flac_bs* bs, ma_uint8 riceParam, ma_uint32* pZeroCounterOut, ma_uint32* pRiceParamPartOut)\n{\n    ma_uint32  riceParamPlus1 = riceParam + 1;\n    ma_uint32  riceParamPlus1Shift = MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT(bs, riceParamPlus1);\n    ma_uint32  riceParamPlus1MaxConsumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - riceParamPlus1;\n    ma_dr_flac_cache_t bs_cache = bs->cache;\n    ma_uint32  bs_consumedBits = bs->consumedBits;\n    ma_uint32  lzcount = ma_dr_flac__clz(bs_cache);\n    if (lzcount < sizeof(bs_cache)*8) {\n        pZeroCounterOut[0] = lzcount;\n    extract_rice_param_part:\n        bs_cache       <<= lzcount;\n        bs_consumedBits += lzcount;\n        if (bs_consumedBits <= riceParamPlus1MaxConsumedBits) {\n            pRiceParamPartOut[0] = (ma_uint32)(bs_cache >> riceParamPlus1Shift);\n            bs_cache       <<= riceParamPlus1;\n            bs_consumedBits += riceParamPlus1;\n        } else {\n            ma_uint32 riceParamPartHi;\n            ma_uint32 riceParamPartLo;\n            ma_uint32 riceParamPartLoBitCount;\n            riceParamPartHi = (ma_uint32)(bs_cache >> riceParamPlus1Shift);\n            riceParamPartLoBitCount = bs_consumedBits - riceParamPlus1MaxConsumedBits;\n            MA_DR_FLAC_ASSERT(riceParamPartLoBitCount > 0 && riceParamPartLoBitCount < 32);\n            if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) {\n            #ifndef MA_DR_FLAC_NO_CRC\n                ma_dr_flac__update_crc16(bs);\n            #endif\n                bs_cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]);\n                bs_consumedBits = riceParamPartLoBitCount;\n            #ifndef MA_DR_FLAC_NO_CRC\n                bs->crc16Cache = bs_cache;\n            #endif\n            } else {\n                if (!ma_dr_flac__reload_cache(bs)) {\n                    return MA_FALSE;\n                }\n                if (riceParamPartLoBitCount > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) {\n                    return MA_FALSE;\n                }\n                bs_cache = bs->cache;\n                bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount;\n            }\n            riceParamPartLo = (ma_uint32)(bs_cache >> (MA_DR_FLAC_CACHE_L1_SELECTION_SHIFT(bs, riceParamPartLoBitCount)));\n            pRiceParamPartOut[0] = riceParamPartHi | riceParamPartLo;\n            bs_cache <<= riceParamPartLoBitCount;\n        }\n    } else {\n        ma_uint32 zeroCounter = (ma_uint32)(MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - bs_consumedBits);\n        for (;;) {\n            if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) {\n            #ifndef MA_DR_FLAC_NO_CRC\n                ma_dr_flac__update_crc16(bs);\n            #endif\n                bs_cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]);\n                bs_consumedBits = 0;\n            #ifndef MA_DR_FLAC_NO_CRC\n                bs->crc16Cache = bs_cache;\n            #endif\n            } else {\n                if (!ma_dr_flac__reload_cache(bs)) {\n                    return MA_FALSE;\n                }\n                bs_cache = bs->cache;\n                bs_consumedBits = bs->consumedBits;\n            }\n            lzcount = ma_dr_flac__clz(bs_cache);\n            zeroCounter += lzcount;\n            if (lzcount < sizeof(bs_cache)*8) {\n                break;\n            }\n        }\n        pZeroCounterOut[0] = zeroCounter;\n        goto extract_rice_param_part;\n    }\n    bs->cache = bs_cache;\n    bs->consumedBits = bs_consumedBits;\n    return MA_TRUE;\n}\nstatic MA_INLINE ma_bool32 ma_dr_flac__seek_rice_parts(ma_dr_flac_bs* bs, ma_uint8 riceParam)\n{\n    ma_uint32  riceParamPlus1 = riceParam + 1;\n    ma_uint32  riceParamPlus1MaxConsumedBits = MA_DR_FLAC_CACHE_L1_SIZE_BITS(bs) - riceParamPlus1;\n    ma_dr_flac_cache_t bs_cache = bs->cache;\n    ma_uint32  bs_consumedBits = bs->consumedBits;\n    ma_uint32  lzcount = ma_dr_flac__clz(bs_cache);\n    if (lzcount < sizeof(bs_cache)*8) {\n    extract_rice_param_part:\n        bs_cache       <<= lzcount;\n        bs_consumedBits += lzcount;\n        if (bs_consumedBits <= riceParamPlus1MaxConsumedBits) {\n            bs_cache       <<= riceParamPlus1;\n            bs_consumedBits += riceParamPlus1;\n        } else {\n            ma_uint32 riceParamPartLoBitCount = bs_consumedBits - riceParamPlus1MaxConsumedBits;\n            MA_DR_FLAC_ASSERT(riceParamPartLoBitCount > 0 && riceParamPartLoBitCount < 32);\n            if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) {\n            #ifndef MA_DR_FLAC_NO_CRC\n                ma_dr_flac__update_crc16(bs);\n            #endif\n                bs_cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]);\n                bs_consumedBits = riceParamPartLoBitCount;\n            #ifndef MA_DR_FLAC_NO_CRC\n                bs->crc16Cache = bs_cache;\n            #endif\n            } else {\n                if (!ma_dr_flac__reload_cache(bs)) {\n                    return MA_FALSE;\n                }\n                if (riceParamPartLoBitCount > MA_DR_FLAC_CACHE_L1_BITS_REMAINING(bs)) {\n                    return MA_FALSE;\n                }\n                bs_cache = bs->cache;\n                bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount;\n            }\n            bs_cache <<= riceParamPartLoBitCount;\n        }\n    } else {\n        for (;;) {\n            if (bs->nextL2Line < MA_DR_FLAC_CACHE_L2_LINE_COUNT(bs)) {\n            #ifndef MA_DR_FLAC_NO_CRC\n                ma_dr_flac__update_crc16(bs);\n            #endif\n                bs_cache = ma_dr_flac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]);\n                bs_consumedBits = 0;\n            #ifndef MA_DR_FLAC_NO_CRC\n                bs->crc16Cache = bs_cache;\n            #endif\n            } else {\n                if (!ma_dr_flac__reload_cache(bs)) {\n                    return MA_FALSE;\n                }\n                bs_cache = bs->cache;\n                bs_consumedBits = bs->consumedBits;\n            }\n            lzcount = ma_dr_flac__clz(bs_cache);\n            if (lzcount < sizeof(bs_cache)*8) {\n                break;\n            }\n        }\n        goto extract_rice_param_part;\n    }\n    bs->cache = bs_cache;\n    bs->consumedBits = bs_consumedBits;\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__scalar_zeroorder(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut)\n{\n    ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF};\n    ma_uint32 zeroCountPart0;\n    ma_uint32 riceParamPart0;\n    ma_uint32 riceParamMask;\n    ma_uint32 i;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(pSamplesOut != NULL);\n    (void)bitsPerSample;\n    (void)order;\n    (void)shift;\n    (void)coefficients;\n    riceParamMask  = (ma_uint32)~((~0UL) << riceParam);\n    i = 0;\n    while (i < count) {\n        if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0)) {\n            return MA_FALSE;\n        }\n        riceParamPart0 &= riceParamMask;\n        riceParamPart0 |= (zeroCountPart0 << riceParam);\n        riceParamPart0  = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01];\n        pSamplesOut[i] = riceParamPart0;\n        i += 1;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__scalar(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut)\n{\n    ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF};\n    ma_uint32 zeroCountPart0 = 0;\n    ma_uint32 zeroCountPart1 = 0;\n    ma_uint32 zeroCountPart2 = 0;\n    ma_uint32 zeroCountPart3 = 0;\n    ma_uint32 riceParamPart0 = 0;\n    ma_uint32 riceParamPart1 = 0;\n    ma_uint32 riceParamPart2 = 0;\n    ma_uint32 riceParamPart3 = 0;\n    ma_uint32 riceParamMask;\n    const ma_int32* pSamplesOutEnd;\n    ma_uint32 i;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(pSamplesOut != NULL);\n    if (lpcOrder == 0) {\n        return ma_dr_flac__decode_samples_with_residual__rice__scalar_zeroorder(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);\n    }\n    riceParamMask  = (ma_uint32)~((~0UL) << riceParam);\n    pSamplesOutEnd = pSamplesOut + (count & ~3);\n    if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {\n        while (pSamplesOut < pSamplesOutEnd) {\n            if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0) ||\n                !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart1, &riceParamPart1) ||\n                !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart2, &riceParamPart2) ||\n                !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart3, &riceParamPart3)) {\n                return MA_FALSE;\n            }\n            riceParamPart0 &= riceParamMask;\n            riceParamPart1 &= riceParamMask;\n            riceParamPart2 &= riceParamMask;\n            riceParamPart3 &= riceParamMask;\n            riceParamPart0 |= (zeroCountPart0 << riceParam);\n            riceParamPart1 |= (zeroCountPart1 << riceParam);\n            riceParamPart2 |= (zeroCountPart2 << riceParam);\n            riceParamPart3 |= (zeroCountPart3 << riceParam);\n            riceParamPart0  = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01];\n            riceParamPart1  = (riceParamPart1 >> 1) ^ t[riceParamPart1 & 0x01];\n            riceParamPart2  = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01];\n            riceParamPart3  = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01];\n            pSamplesOut[0] = riceParamPart0 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 0);\n            pSamplesOut[1] = riceParamPart1 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 1);\n            pSamplesOut[2] = riceParamPart2 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 2);\n            pSamplesOut[3] = riceParamPart3 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 3);\n            pSamplesOut += 4;\n        }\n    } else {\n        while (pSamplesOut < pSamplesOutEnd) {\n            if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0) ||\n                !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart1, &riceParamPart1) ||\n                !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart2, &riceParamPart2) ||\n                !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart3, &riceParamPart3)) {\n                return MA_FALSE;\n            }\n            riceParamPart0 &= riceParamMask;\n            riceParamPart1 &= riceParamMask;\n            riceParamPart2 &= riceParamMask;\n            riceParamPart3 &= riceParamMask;\n            riceParamPart0 |= (zeroCountPart0 << riceParam);\n            riceParamPart1 |= (zeroCountPart1 << riceParam);\n            riceParamPart2 |= (zeroCountPart2 << riceParam);\n            riceParamPart3 |= (zeroCountPart3 << riceParam);\n            riceParamPart0  = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01];\n            riceParamPart1  = (riceParamPart1 >> 1) ^ t[riceParamPart1 & 0x01];\n            riceParamPart2  = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01];\n            riceParamPart3  = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01];\n            pSamplesOut[0] = riceParamPart0 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 0);\n            pSamplesOut[1] = riceParamPart1 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 1);\n            pSamplesOut[2] = riceParamPart2 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 2);\n            pSamplesOut[3] = riceParamPart3 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 3);\n            pSamplesOut += 4;\n        }\n    }\n    i = (count & ~3);\n    while (i < count) {\n        if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0)) {\n            return MA_FALSE;\n        }\n        riceParamPart0 &= riceParamMask;\n        riceParamPart0 |= (zeroCountPart0 << riceParam);\n        riceParamPart0  = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01];\n        if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {\n            pSamplesOut[0] = riceParamPart0 + ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 0);\n        } else {\n            pSamplesOut[0] = riceParamPart0 + ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 0);\n        }\n        i += 1;\n        pSamplesOut += 1;\n    }\n    return MA_TRUE;\n}\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\nstatic MA_INLINE __m128i ma_dr_flac__mm_packs_interleaved_epi32(__m128i a, __m128i b)\n{\n    __m128i r;\n    r = _mm_packs_epi32(a, b);\n    r = _mm_shuffle_epi32(r, _MM_SHUFFLE(3, 1, 2, 0));\n    r = _mm_shufflehi_epi16(r, _MM_SHUFFLE(3, 1, 2, 0));\n    r = _mm_shufflelo_epi16(r, _MM_SHUFFLE(3, 1, 2, 0));\n    return r;\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_SSE41)\nstatic MA_INLINE __m128i ma_dr_flac__mm_not_si128(__m128i a)\n{\n    return _mm_xor_si128(a, _mm_cmpeq_epi32(_mm_setzero_si128(), _mm_setzero_si128()));\n}\nstatic MA_INLINE __m128i ma_dr_flac__mm_hadd_epi32(__m128i x)\n{\n    __m128i x64 = _mm_add_epi32(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2)));\n    __m128i x32 = _mm_shufflelo_epi16(x64, _MM_SHUFFLE(1, 0, 3, 2));\n    return _mm_add_epi32(x64, x32);\n}\nstatic MA_INLINE __m128i ma_dr_flac__mm_hadd_epi64(__m128i x)\n{\n    return _mm_add_epi64(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2)));\n}\nstatic MA_INLINE __m128i ma_dr_flac__mm_srai_epi64(__m128i x, int count)\n{\n    __m128i lo = _mm_srli_epi64(x, count);\n    __m128i hi = _mm_srai_epi32(x, count);\n    hi = _mm_and_si128(hi, _mm_set_epi32(0xFFFFFFFF, 0, 0xFFFFFFFF, 0));\n    return _mm_or_si128(lo, hi);\n}\nstatic ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__sse41_32(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut)\n{\n    int i;\n    ma_uint32 riceParamMask;\n    ma_int32* pDecodedSamples    = pSamplesOut;\n    ma_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3);\n    ma_uint32 zeroCountParts0 = 0;\n    ma_uint32 zeroCountParts1 = 0;\n    ma_uint32 zeroCountParts2 = 0;\n    ma_uint32 zeroCountParts3 = 0;\n    ma_uint32 riceParamParts0 = 0;\n    ma_uint32 riceParamParts1 = 0;\n    ma_uint32 riceParamParts2 = 0;\n    ma_uint32 riceParamParts3 = 0;\n    __m128i coefficients128_0;\n    __m128i coefficients128_4;\n    __m128i coefficients128_8;\n    __m128i samples128_0;\n    __m128i samples128_4;\n    __m128i samples128_8;\n    __m128i riceParamMask128;\n    const ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF};\n    riceParamMask    = (ma_uint32)~((~0UL) << riceParam);\n    riceParamMask128 = _mm_set1_epi32(riceParamMask);\n    coefficients128_0 = _mm_setzero_si128();\n    coefficients128_4 = _mm_setzero_si128();\n    coefficients128_8 = _mm_setzero_si128();\n    samples128_0 = _mm_setzero_si128();\n    samples128_4 = _mm_setzero_si128();\n    samples128_8 = _mm_setzero_si128();\n#if 1\n    {\n        int runningOrder = order;\n        if (runningOrder >= 4) {\n            coefficients128_0 = _mm_loadu_si128((const __m128i*)(coefficients + 0));\n            samples128_0      = _mm_loadu_si128((const __m128i*)(pSamplesOut  - 4));\n            runningOrder -= 4;\n        } else {\n            switch (runningOrder) {\n                case 3: coefficients128_0 = _mm_set_epi32(0, coefficients[2], coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], pSamplesOut[-3], 0); break;\n                case 2: coefficients128_0 = _mm_set_epi32(0, 0,               coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], 0,               0); break;\n                case 1: coefficients128_0 = _mm_set_epi32(0, 0,               0,               coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], 0,               0,               0); break;\n            }\n            runningOrder = 0;\n        }\n        if (runningOrder >= 4) {\n            coefficients128_4 = _mm_loadu_si128((const __m128i*)(coefficients + 4));\n            samples128_4      = _mm_loadu_si128((const __m128i*)(pSamplesOut  - 8));\n            runningOrder -= 4;\n        } else {\n            switch (runningOrder) {\n                case 3: coefficients128_4 = _mm_set_epi32(0, coefficients[6], coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], pSamplesOut[-7], 0); break;\n                case 2: coefficients128_4 = _mm_set_epi32(0, 0,               coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], 0,               0); break;\n                case 1: coefficients128_4 = _mm_set_epi32(0, 0,               0,               coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], 0,               0,               0); break;\n            }\n            runningOrder = 0;\n        }\n        if (runningOrder == 4) {\n            coefficients128_8 = _mm_loadu_si128((const __m128i*)(coefficients + 8));\n            samples128_8      = _mm_loadu_si128((const __m128i*)(pSamplesOut  - 12));\n            runningOrder -= 4;\n        } else {\n            switch (runningOrder) {\n                case 3: coefficients128_8 = _mm_set_epi32(0, coefficients[10], coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], pSamplesOut[-11], 0); break;\n                case 2: coefficients128_8 = _mm_set_epi32(0, 0,                coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], 0,                0); break;\n                case 1: coefficients128_8 = _mm_set_epi32(0, 0,                0,               coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], 0,                0,                0); break;\n            }\n            runningOrder = 0;\n        }\n        coefficients128_0 = _mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(0, 1, 2, 3));\n        coefficients128_4 = _mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(0, 1, 2, 3));\n        coefficients128_8 = _mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(0, 1, 2, 3));\n    }\n#else\n    switch (order)\n    {\n    case 12: ((ma_int32*)&coefficients128_8)[0] = coefficients[11]; ((ma_int32*)&samples128_8)[0] = pDecodedSamples[-12];\n    case 11: ((ma_int32*)&coefficients128_8)[1] = coefficients[10]; ((ma_int32*)&samples128_8)[1] = pDecodedSamples[-11];\n    case 10: ((ma_int32*)&coefficients128_8)[2] = coefficients[ 9]; ((ma_int32*)&samples128_8)[2] = pDecodedSamples[-10];\n    case 9:  ((ma_int32*)&coefficients128_8)[3] = coefficients[ 8]; ((ma_int32*)&samples128_8)[3] = pDecodedSamples[- 9];\n    case 8:  ((ma_int32*)&coefficients128_4)[0] = coefficients[ 7]; ((ma_int32*)&samples128_4)[0] = pDecodedSamples[- 8];\n    case 7:  ((ma_int32*)&coefficients128_4)[1] = coefficients[ 6]; ((ma_int32*)&samples128_4)[1] = pDecodedSamples[- 7];\n    case 6:  ((ma_int32*)&coefficients128_4)[2] = coefficients[ 5]; ((ma_int32*)&samples128_4)[2] = pDecodedSamples[- 6];\n    case 5:  ((ma_int32*)&coefficients128_4)[3] = coefficients[ 4]; ((ma_int32*)&samples128_4)[3] = pDecodedSamples[- 5];\n    case 4:  ((ma_int32*)&coefficients128_0)[0] = coefficients[ 3]; ((ma_int32*)&samples128_0)[0] = pDecodedSamples[- 4];\n    case 3:  ((ma_int32*)&coefficients128_0)[1] = coefficients[ 2]; ((ma_int32*)&samples128_0)[1] = pDecodedSamples[- 3];\n    case 2:  ((ma_int32*)&coefficients128_0)[2] = coefficients[ 1]; ((ma_int32*)&samples128_0)[2] = pDecodedSamples[- 2];\n    case 1:  ((ma_int32*)&coefficients128_0)[3] = coefficients[ 0]; ((ma_int32*)&samples128_0)[3] = pDecodedSamples[- 1];\n    }\n#endif\n    while (pDecodedSamples < pDecodedSamplesEnd) {\n        __m128i prediction128;\n        __m128i zeroCountPart128;\n        __m128i riceParamPart128;\n        if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0) ||\n            !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts1, &riceParamParts1) ||\n            !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts2, &riceParamParts2) ||\n            !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts3, &riceParamParts3)) {\n            return MA_FALSE;\n        }\n        zeroCountPart128 = _mm_set_epi32(zeroCountParts3, zeroCountParts2, zeroCountParts1, zeroCountParts0);\n        riceParamPart128 = _mm_set_epi32(riceParamParts3, riceParamParts2, riceParamParts1, riceParamParts0);\n        riceParamPart128 = _mm_and_si128(riceParamPart128, riceParamMask128);\n        riceParamPart128 = _mm_or_si128(riceParamPart128, _mm_slli_epi32(zeroCountPart128, riceParam));\n        riceParamPart128 = _mm_xor_si128(_mm_srli_epi32(riceParamPart128, 1), _mm_add_epi32(ma_dr_flac__mm_not_si128(_mm_and_si128(riceParamPart128, _mm_set1_epi32(0x01))), _mm_set1_epi32(0x01)));\n        if (order <= 4) {\n            for (i = 0; i < 4; i += 1) {\n                prediction128 = _mm_mullo_epi32(coefficients128_0, samples128_0);\n                prediction128 = ma_dr_flac__mm_hadd_epi32(prediction128);\n                prediction128 = _mm_srai_epi32(prediction128, shift);\n                prediction128 = _mm_add_epi32(riceParamPart128, prediction128);\n                samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4);\n                riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4);\n            }\n        } else if (order <= 8) {\n            for (i = 0; i < 4; i += 1) {\n                prediction128 =                              _mm_mullo_epi32(coefficients128_4, samples128_4);\n                prediction128 = _mm_add_epi32(prediction128, _mm_mullo_epi32(coefficients128_0, samples128_0));\n                prediction128 = ma_dr_flac__mm_hadd_epi32(prediction128);\n                prediction128 = _mm_srai_epi32(prediction128, shift);\n                prediction128 = _mm_add_epi32(riceParamPart128, prediction128);\n                samples128_4 = _mm_alignr_epi8(samples128_0,  samples128_4, 4);\n                samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4);\n                riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4);\n            }\n        } else {\n            for (i = 0; i < 4; i += 1) {\n                prediction128 =                              _mm_mullo_epi32(coefficients128_8, samples128_8);\n                prediction128 = _mm_add_epi32(prediction128, _mm_mullo_epi32(coefficients128_4, samples128_4));\n                prediction128 = _mm_add_epi32(prediction128, _mm_mullo_epi32(coefficients128_0, samples128_0));\n                prediction128 = ma_dr_flac__mm_hadd_epi32(prediction128);\n                prediction128 = _mm_srai_epi32(prediction128, shift);\n                prediction128 = _mm_add_epi32(riceParamPart128, prediction128);\n                samples128_8 = _mm_alignr_epi8(samples128_4,  samples128_8, 4);\n                samples128_4 = _mm_alignr_epi8(samples128_0,  samples128_4, 4);\n                samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4);\n                riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4);\n            }\n        }\n        _mm_storeu_si128((__m128i*)pDecodedSamples, samples128_0);\n        pDecodedSamples += 4;\n    }\n    i = (count & ~3);\n    while (i < (int)count) {\n        if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0)) {\n            return MA_FALSE;\n        }\n        riceParamParts0 &= riceParamMask;\n        riceParamParts0 |= (zeroCountParts0 << riceParam);\n        riceParamParts0  = (riceParamParts0 >> 1) ^ t[riceParamParts0 & 0x01];\n        pDecodedSamples[0] = riceParamParts0 + ma_dr_flac__calculate_prediction_32(order, shift, coefficients, pDecodedSamples);\n        i += 1;\n        pDecodedSamples += 1;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__sse41_64(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut)\n{\n    int i;\n    ma_uint32 riceParamMask;\n    ma_int32* pDecodedSamples    = pSamplesOut;\n    ma_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3);\n    ma_uint32 zeroCountParts0 = 0;\n    ma_uint32 zeroCountParts1 = 0;\n    ma_uint32 zeroCountParts2 = 0;\n    ma_uint32 zeroCountParts3 = 0;\n    ma_uint32 riceParamParts0 = 0;\n    ma_uint32 riceParamParts1 = 0;\n    ma_uint32 riceParamParts2 = 0;\n    ma_uint32 riceParamParts3 = 0;\n    __m128i coefficients128_0;\n    __m128i coefficients128_4;\n    __m128i coefficients128_8;\n    __m128i samples128_0;\n    __m128i samples128_4;\n    __m128i samples128_8;\n    __m128i prediction128;\n    __m128i riceParamMask128;\n    const ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF};\n    MA_DR_FLAC_ASSERT(order <= 12);\n    riceParamMask    = (ma_uint32)~((~0UL) << riceParam);\n    riceParamMask128 = _mm_set1_epi32(riceParamMask);\n    prediction128 = _mm_setzero_si128();\n    coefficients128_0  = _mm_setzero_si128();\n    coefficients128_4  = _mm_setzero_si128();\n    coefficients128_8  = _mm_setzero_si128();\n    samples128_0  = _mm_setzero_si128();\n    samples128_4  = _mm_setzero_si128();\n    samples128_8  = _mm_setzero_si128();\n#if 1\n    {\n        int runningOrder = order;\n        if (runningOrder >= 4) {\n            coefficients128_0 = _mm_loadu_si128((const __m128i*)(coefficients + 0));\n            samples128_0      = _mm_loadu_si128((const __m128i*)(pSamplesOut  - 4));\n            runningOrder -= 4;\n        } else {\n            switch (runningOrder) {\n                case 3: coefficients128_0 = _mm_set_epi32(0, coefficients[2], coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], pSamplesOut[-3], 0); break;\n                case 2: coefficients128_0 = _mm_set_epi32(0, 0,               coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], 0,               0); break;\n                case 1: coefficients128_0 = _mm_set_epi32(0, 0,               0,               coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], 0,               0,               0); break;\n            }\n            runningOrder = 0;\n        }\n        if (runningOrder >= 4) {\n            coefficients128_4 = _mm_loadu_si128((const __m128i*)(coefficients + 4));\n            samples128_4      = _mm_loadu_si128((const __m128i*)(pSamplesOut  - 8));\n            runningOrder -= 4;\n        } else {\n            switch (runningOrder) {\n                case 3: coefficients128_4 = _mm_set_epi32(0, coefficients[6], coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], pSamplesOut[-7], 0); break;\n                case 2: coefficients128_4 = _mm_set_epi32(0, 0,               coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], 0,               0); break;\n                case 1: coefficients128_4 = _mm_set_epi32(0, 0,               0,               coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], 0,               0,               0); break;\n            }\n            runningOrder = 0;\n        }\n        if (runningOrder == 4) {\n            coefficients128_8 = _mm_loadu_si128((const __m128i*)(coefficients + 8));\n            samples128_8      = _mm_loadu_si128((const __m128i*)(pSamplesOut  - 12));\n            runningOrder -= 4;\n        } else {\n            switch (runningOrder) {\n                case 3: coefficients128_8 = _mm_set_epi32(0, coefficients[10], coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], pSamplesOut[-11], 0); break;\n                case 2: coefficients128_8 = _mm_set_epi32(0, 0,                coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], 0,                0); break;\n                case 1: coefficients128_8 = _mm_set_epi32(0, 0,                0,               coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], 0,                0,                0); break;\n            }\n            runningOrder = 0;\n        }\n        coefficients128_0 = _mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(0, 1, 2, 3));\n        coefficients128_4 = _mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(0, 1, 2, 3));\n        coefficients128_8 = _mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(0, 1, 2, 3));\n    }\n#else\n    switch (order)\n    {\n    case 12: ((ma_int32*)&coefficients128_8)[0] = coefficients[11]; ((ma_int32*)&samples128_8)[0] = pDecodedSamples[-12];\n    case 11: ((ma_int32*)&coefficients128_8)[1] = coefficients[10]; ((ma_int32*)&samples128_8)[1] = pDecodedSamples[-11];\n    case 10: ((ma_int32*)&coefficients128_8)[2] = coefficients[ 9]; ((ma_int32*)&samples128_8)[2] = pDecodedSamples[-10];\n    case 9:  ((ma_int32*)&coefficients128_8)[3] = coefficients[ 8]; ((ma_int32*)&samples128_8)[3] = pDecodedSamples[- 9];\n    case 8:  ((ma_int32*)&coefficients128_4)[0] = coefficients[ 7]; ((ma_int32*)&samples128_4)[0] = pDecodedSamples[- 8];\n    case 7:  ((ma_int32*)&coefficients128_4)[1] = coefficients[ 6]; ((ma_int32*)&samples128_4)[1] = pDecodedSamples[- 7];\n    case 6:  ((ma_int32*)&coefficients128_4)[2] = coefficients[ 5]; ((ma_int32*)&samples128_4)[2] = pDecodedSamples[- 6];\n    case 5:  ((ma_int32*)&coefficients128_4)[3] = coefficients[ 4]; ((ma_int32*)&samples128_4)[3] = pDecodedSamples[- 5];\n    case 4:  ((ma_int32*)&coefficients128_0)[0] = coefficients[ 3]; ((ma_int32*)&samples128_0)[0] = pDecodedSamples[- 4];\n    case 3:  ((ma_int32*)&coefficients128_0)[1] = coefficients[ 2]; ((ma_int32*)&samples128_0)[1] = pDecodedSamples[- 3];\n    case 2:  ((ma_int32*)&coefficients128_0)[2] = coefficients[ 1]; ((ma_int32*)&samples128_0)[2] = pDecodedSamples[- 2];\n    case 1:  ((ma_int32*)&coefficients128_0)[3] = coefficients[ 0]; ((ma_int32*)&samples128_0)[3] = pDecodedSamples[- 1];\n    }\n#endif\n    while (pDecodedSamples < pDecodedSamplesEnd) {\n        __m128i zeroCountPart128;\n        __m128i riceParamPart128;\n        if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0) ||\n            !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts1, &riceParamParts1) ||\n            !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts2, &riceParamParts2) ||\n            !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts3, &riceParamParts3)) {\n            return MA_FALSE;\n        }\n        zeroCountPart128 = _mm_set_epi32(zeroCountParts3, zeroCountParts2, zeroCountParts1, zeroCountParts0);\n        riceParamPart128 = _mm_set_epi32(riceParamParts3, riceParamParts2, riceParamParts1, riceParamParts0);\n        riceParamPart128 = _mm_and_si128(riceParamPart128, riceParamMask128);\n        riceParamPart128 = _mm_or_si128(riceParamPart128, _mm_slli_epi32(zeroCountPart128, riceParam));\n        riceParamPart128 = _mm_xor_si128(_mm_srli_epi32(riceParamPart128, 1), _mm_add_epi32(ma_dr_flac__mm_not_si128(_mm_and_si128(riceParamPart128, _mm_set1_epi32(1))), _mm_set1_epi32(1)));\n        for (i = 0; i < 4; i += 1) {\n            prediction128 = _mm_xor_si128(prediction128, prediction128);\n            switch (order)\n            {\n            case 12:\n            case 11: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(1, 1, 0, 0)), _mm_shuffle_epi32(samples128_8, _MM_SHUFFLE(1, 1, 0, 0))));\n            case 10:\n            case  9: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(3, 3, 2, 2)), _mm_shuffle_epi32(samples128_8, _MM_SHUFFLE(3, 3, 2, 2))));\n            case  8:\n            case  7: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(1, 1, 0, 0)), _mm_shuffle_epi32(samples128_4, _MM_SHUFFLE(1, 1, 0, 0))));\n            case  6:\n            case  5: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(3, 3, 2, 2)), _mm_shuffle_epi32(samples128_4, _MM_SHUFFLE(3, 3, 2, 2))));\n            case  4:\n            case  3: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(1, 1, 0, 0)), _mm_shuffle_epi32(samples128_0, _MM_SHUFFLE(1, 1, 0, 0))));\n            case  2:\n            case  1: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(3, 3, 2, 2)), _mm_shuffle_epi32(samples128_0, _MM_SHUFFLE(3, 3, 2, 2))));\n            }\n            prediction128 = ma_dr_flac__mm_hadd_epi64(prediction128);\n            prediction128 = ma_dr_flac__mm_srai_epi64(prediction128, shift);\n            prediction128 = _mm_add_epi32(riceParamPart128, prediction128);\n            samples128_8 = _mm_alignr_epi8(samples128_4,  samples128_8, 4);\n            samples128_4 = _mm_alignr_epi8(samples128_0,  samples128_4, 4);\n            samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4);\n            riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4);\n        }\n        _mm_storeu_si128((__m128i*)pDecodedSamples, samples128_0);\n        pDecodedSamples += 4;\n    }\n    i = (count & ~3);\n    while (i < (int)count) {\n        if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0)) {\n            return MA_FALSE;\n        }\n        riceParamParts0 &= riceParamMask;\n        riceParamParts0 |= (zeroCountParts0 << riceParam);\n        riceParamParts0  = (riceParamParts0 >> 1) ^ t[riceParamParts0 & 0x01];\n        pDecodedSamples[0] = riceParamParts0 + ma_dr_flac__calculate_prediction_64(order, shift, coefficients, pDecodedSamples);\n        i += 1;\n        pDecodedSamples += 1;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__sse41(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut)\n{\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(pSamplesOut != NULL);\n    if (lpcOrder > 0 && lpcOrder <= 12) {\n        if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {\n            return ma_dr_flac__decode_samples_with_residual__rice__sse41_64(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);\n        } else {\n            return ma_dr_flac__decode_samples_with_residual__rice__sse41_32(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);\n        }\n    } else {\n        return ma_dr_flac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);\n    }\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\nstatic MA_INLINE void ma_dr_flac__vst2q_s32(ma_int32* p, int32x4x2_t x)\n{\n    vst1q_s32(p+0, x.val[0]);\n    vst1q_s32(p+4, x.val[1]);\n}\nstatic MA_INLINE void ma_dr_flac__vst2q_u32(ma_uint32* p, uint32x4x2_t x)\n{\n    vst1q_u32(p+0, x.val[0]);\n    vst1q_u32(p+4, x.val[1]);\n}\nstatic MA_INLINE void ma_dr_flac__vst2q_f32(float* p, float32x4x2_t x)\n{\n    vst1q_f32(p+0, x.val[0]);\n    vst1q_f32(p+4, x.val[1]);\n}\nstatic MA_INLINE void ma_dr_flac__vst2q_s16(ma_int16* p, int16x4x2_t x)\n{\n    vst1q_s16(p, vcombine_s16(x.val[0], x.val[1]));\n}\nstatic MA_INLINE void ma_dr_flac__vst2q_u16(ma_uint16* p, uint16x4x2_t x)\n{\n    vst1q_u16(p, vcombine_u16(x.val[0], x.val[1]));\n}\nstatic MA_INLINE int32x4_t ma_dr_flac__vdupq_n_s32x4(ma_int32 x3, ma_int32 x2, ma_int32 x1, ma_int32 x0)\n{\n    ma_int32 x[4];\n    x[3] = x3;\n    x[2] = x2;\n    x[1] = x1;\n    x[0] = x0;\n    return vld1q_s32(x);\n}\nstatic MA_INLINE int32x4_t ma_dr_flac__valignrq_s32_1(int32x4_t a, int32x4_t b)\n{\n    return vextq_s32(b, a, 1);\n}\nstatic MA_INLINE uint32x4_t ma_dr_flac__valignrq_u32_1(uint32x4_t a, uint32x4_t b)\n{\n    return vextq_u32(b, a, 1);\n}\nstatic MA_INLINE int32x2_t ma_dr_flac__vhaddq_s32(int32x4_t x)\n{\n    int32x2_t r = vadd_s32(vget_high_s32(x), vget_low_s32(x));\n    return vpadd_s32(r, r);\n}\nstatic MA_INLINE int64x1_t ma_dr_flac__vhaddq_s64(int64x2_t x)\n{\n    return vadd_s64(vget_high_s64(x), vget_low_s64(x));\n}\nstatic MA_INLINE int32x4_t ma_dr_flac__vrevq_s32(int32x4_t x)\n{\n    return vrev64q_s32(vcombine_s32(vget_high_s32(x), vget_low_s32(x)));\n}\nstatic MA_INLINE int32x4_t ma_dr_flac__vnotq_s32(int32x4_t x)\n{\n    return veorq_s32(x, vdupq_n_s32(0xFFFFFFFF));\n}\nstatic MA_INLINE uint32x4_t ma_dr_flac__vnotq_u32(uint32x4_t x)\n{\n    return veorq_u32(x, vdupq_n_u32(0xFFFFFFFF));\n}\nstatic ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__neon_32(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut)\n{\n    int i;\n    ma_uint32 riceParamMask;\n    ma_int32* pDecodedSamples    = pSamplesOut;\n    ma_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3);\n    ma_uint32 zeroCountParts[4];\n    ma_uint32 riceParamParts[4];\n    int32x4_t coefficients128_0;\n    int32x4_t coefficients128_4;\n    int32x4_t coefficients128_8;\n    int32x4_t samples128_0;\n    int32x4_t samples128_4;\n    int32x4_t samples128_8;\n    uint32x4_t riceParamMask128;\n    int32x4_t riceParam128;\n    int32x2_t shift64;\n    uint32x4_t one128;\n    const ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF};\n    riceParamMask    = (ma_uint32)~((~0UL) << riceParam);\n    riceParamMask128 = vdupq_n_u32(riceParamMask);\n    riceParam128 = vdupq_n_s32(riceParam);\n    shift64 = vdup_n_s32(-shift);\n    one128 = vdupq_n_u32(1);\n    {\n        int runningOrder = order;\n        ma_int32 tempC[4] = {0, 0, 0, 0};\n        ma_int32 tempS[4] = {0, 0, 0, 0};\n        if (runningOrder >= 4) {\n            coefficients128_0 = vld1q_s32(coefficients + 0);\n            samples128_0      = vld1q_s32(pSamplesOut  - 4);\n            runningOrder -= 4;\n        } else {\n            switch (runningOrder) {\n                case 3: tempC[2] = coefficients[2]; tempS[1] = pSamplesOut[-3];\n                case 2: tempC[1] = coefficients[1]; tempS[2] = pSamplesOut[-2];\n                case 1: tempC[0] = coefficients[0]; tempS[3] = pSamplesOut[-1];\n            }\n            coefficients128_0 = vld1q_s32(tempC);\n            samples128_0      = vld1q_s32(tempS);\n            runningOrder = 0;\n        }\n        if (runningOrder >= 4) {\n            coefficients128_4 = vld1q_s32(coefficients + 4);\n            samples128_4      = vld1q_s32(pSamplesOut  - 8);\n            runningOrder -= 4;\n        } else {\n            switch (runningOrder) {\n                case 3: tempC[2] = coefficients[6]; tempS[1] = pSamplesOut[-7];\n                case 2: tempC[1] = coefficients[5]; tempS[2] = pSamplesOut[-6];\n                case 1: tempC[0] = coefficients[4]; tempS[3] = pSamplesOut[-5];\n            }\n            coefficients128_4 = vld1q_s32(tempC);\n            samples128_4      = vld1q_s32(tempS);\n            runningOrder = 0;\n        }\n        if (runningOrder == 4) {\n            coefficients128_8 = vld1q_s32(coefficients + 8);\n            samples128_8      = vld1q_s32(pSamplesOut  - 12);\n            runningOrder -= 4;\n        } else {\n            switch (runningOrder) {\n                case 3: tempC[2] = coefficients[10]; tempS[1] = pSamplesOut[-11];\n                case 2: tempC[1] = coefficients[ 9]; tempS[2] = pSamplesOut[-10];\n                case 1: tempC[0] = coefficients[ 8]; tempS[3] = pSamplesOut[- 9];\n            }\n            coefficients128_8 = vld1q_s32(tempC);\n            samples128_8      = vld1q_s32(tempS);\n            runningOrder = 0;\n        }\n        coefficients128_0 = ma_dr_flac__vrevq_s32(coefficients128_0);\n        coefficients128_4 = ma_dr_flac__vrevq_s32(coefficients128_4);\n        coefficients128_8 = ma_dr_flac__vrevq_s32(coefficients128_8);\n    }\n    while (pDecodedSamples < pDecodedSamplesEnd) {\n        int32x4_t prediction128;\n        int32x2_t prediction64;\n        uint32x4_t zeroCountPart128;\n        uint32x4_t riceParamPart128;\n        if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0]) ||\n            !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[1], &riceParamParts[1]) ||\n            !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[2], &riceParamParts[2]) ||\n            !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[3], &riceParamParts[3])) {\n            return MA_FALSE;\n        }\n        zeroCountPart128 = vld1q_u32(zeroCountParts);\n        riceParamPart128 = vld1q_u32(riceParamParts);\n        riceParamPart128 = vandq_u32(riceParamPart128, riceParamMask128);\n        riceParamPart128 = vorrq_u32(riceParamPart128, vshlq_u32(zeroCountPart128, riceParam128));\n        riceParamPart128 = veorq_u32(vshrq_n_u32(riceParamPart128, 1), vaddq_u32(ma_dr_flac__vnotq_u32(vandq_u32(riceParamPart128, one128)), one128));\n        if (order <= 4) {\n            for (i = 0; i < 4; i += 1) {\n                prediction128 = vmulq_s32(coefficients128_0, samples128_0);\n                prediction64 = ma_dr_flac__vhaddq_s32(prediction128);\n                prediction64 = vshl_s32(prediction64, shift64);\n                prediction64 = vadd_s32(prediction64, vget_low_s32(vreinterpretq_s32_u32(riceParamPart128)));\n                samples128_0 = ma_dr_flac__valignrq_s32_1(vcombine_s32(prediction64, vdup_n_s32(0)), samples128_0);\n                riceParamPart128 = ma_dr_flac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128);\n            }\n        } else if (order <= 8) {\n            for (i = 0; i < 4; i += 1) {\n                prediction128 =                vmulq_s32(coefficients128_4, samples128_4);\n                prediction128 = vmlaq_s32(prediction128, coefficients128_0, samples128_0);\n                prediction64 = ma_dr_flac__vhaddq_s32(prediction128);\n                prediction64 = vshl_s32(prediction64, shift64);\n                prediction64 = vadd_s32(prediction64, vget_low_s32(vreinterpretq_s32_u32(riceParamPart128)));\n                samples128_4 = ma_dr_flac__valignrq_s32_1(samples128_0, samples128_4);\n                samples128_0 = ma_dr_flac__valignrq_s32_1(vcombine_s32(prediction64, vdup_n_s32(0)), samples128_0);\n                riceParamPart128 = ma_dr_flac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128);\n            }\n        } else {\n            for (i = 0; i < 4; i += 1) {\n                prediction128 =                vmulq_s32(coefficients128_8, samples128_8);\n                prediction128 = vmlaq_s32(prediction128, coefficients128_4, samples128_4);\n                prediction128 = vmlaq_s32(prediction128, coefficients128_0, samples128_0);\n                prediction64 = ma_dr_flac__vhaddq_s32(prediction128);\n                prediction64 = vshl_s32(prediction64, shift64);\n                prediction64 = vadd_s32(prediction64, vget_low_s32(vreinterpretq_s32_u32(riceParamPart128)));\n                samples128_8 = ma_dr_flac__valignrq_s32_1(samples128_4, samples128_8);\n                samples128_4 = ma_dr_flac__valignrq_s32_1(samples128_0, samples128_4);\n                samples128_0 = ma_dr_flac__valignrq_s32_1(vcombine_s32(prediction64, vdup_n_s32(0)), samples128_0);\n                riceParamPart128 = ma_dr_flac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128);\n            }\n        }\n        vst1q_s32(pDecodedSamples, samples128_0);\n        pDecodedSamples += 4;\n    }\n    i = (count & ~3);\n    while (i < (int)count) {\n        if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0])) {\n            return MA_FALSE;\n        }\n        riceParamParts[0] &= riceParamMask;\n        riceParamParts[0] |= (zeroCountParts[0] << riceParam);\n        riceParamParts[0]  = (riceParamParts[0] >> 1) ^ t[riceParamParts[0] & 0x01];\n        pDecodedSamples[0] = riceParamParts[0] + ma_dr_flac__calculate_prediction_32(order, shift, coefficients, pDecodedSamples);\n        i += 1;\n        pDecodedSamples += 1;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__neon_64(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam, ma_uint32 order, ma_int32 shift, const ma_int32* coefficients, ma_int32* pSamplesOut)\n{\n    int i;\n    ma_uint32 riceParamMask;\n    ma_int32* pDecodedSamples    = pSamplesOut;\n    ma_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3);\n    ma_uint32 zeroCountParts[4];\n    ma_uint32 riceParamParts[4];\n    int32x4_t coefficients128_0;\n    int32x4_t coefficients128_4;\n    int32x4_t coefficients128_8;\n    int32x4_t samples128_0;\n    int32x4_t samples128_4;\n    int32x4_t samples128_8;\n    uint32x4_t riceParamMask128;\n    int32x4_t riceParam128;\n    int64x1_t shift64;\n    uint32x4_t one128;\n    int64x2_t prediction128 = { 0 };\n    uint32x4_t zeroCountPart128;\n    uint32x4_t riceParamPart128;\n    const ma_uint32 t[2] = {0x00000000, 0xFFFFFFFF};\n    riceParamMask    = (ma_uint32)~((~0UL) << riceParam);\n    riceParamMask128 = vdupq_n_u32(riceParamMask);\n    riceParam128 = vdupq_n_s32(riceParam);\n    shift64 = vdup_n_s64(-shift);\n    one128 = vdupq_n_u32(1);\n    {\n        int runningOrder = order;\n        ma_int32 tempC[4] = {0, 0, 0, 0};\n        ma_int32 tempS[4] = {0, 0, 0, 0};\n        if (runningOrder >= 4) {\n            coefficients128_0 = vld1q_s32(coefficients + 0);\n            samples128_0      = vld1q_s32(pSamplesOut  - 4);\n            runningOrder -= 4;\n        } else {\n            switch (runningOrder) {\n                case 3: tempC[2] = coefficients[2]; tempS[1] = pSamplesOut[-3];\n                case 2: tempC[1] = coefficients[1]; tempS[2] = pSamplesOut[-2];\n                case 1: tempC[0] = coefficients[0]; tempS[3] = pSamplesOut[-1];\n            }\n            coefficients128_0 = vld1q_s32(tempC);\n            samples128_0      = vld1q_s32(tempS);\n            runningOrder = 0;\n        }\n        if (runningOrder >= 4) {\n            coefficients128_4 = vld1q_s32(coefficients + 4);\n            samples128_4      = vld1q_s32(pSamplesOut  - 8);\n            runningOrder -= 4;\n        } else {\n            switch (runningOrder) {\n                case 3: tempC[2] = coefficients[6]; tempS[1] = pSamplesOut[-7];\n                case 2: tempC[1] = coefficients[5]; tempS[2] = pSamplesOut[-6];\n                case 1: tempC[0] = coefficients[4]; tempS[3] = pSamplesOut[-5];\n            }\n            coefficients128_4 = vld1q_s32(tempC);\n            samples128_4      = vld1q_s32(tempS);\n            runningOrder = 0;\n        }\n        if (runningOrder == 4) {\n            coefficients128_8 = vld1q_s32(coefficients + 8);\n            samples128_8      = vld1q_s32(pSamplesOut  - 12);\n            runningOrder -= 4;\n        } else {\n            switch (runningOrder) {\n                case 3: tempC[2] = coefficients[10]; tempS[1] = pSamplesOut[-11];\n                case 2: tempC[1] = coefficients[ 9]; tempS[2] = pSamplesOut[-10];\n                case 1: tempC[0] = coefficients[ 8]; tempS[3] = pSamplesOut[- 9];\n            }\n            coefficients128_8 = vld1q_s32(tempC);\n            samples128_8      = vld1q_s32(tempS);\n            runningOrder = 0;\n        }\n        coefficients128_0 = ma_dr_flac__vrevq_s32(coefficients128_0);\n        coefficients128_4 = ma_dr_flac__vrevq_s32(coefficients128_4);\n        coefficients128_8 = ma_dr_flac__vrevq_s32(coefficients128_8);\n    }\n    while (pDecodedSamples < pDecodedSamplesEnd) {\n        if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0]) ||\n            !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[1], &riceParamParts[1]) ||\n            !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[2], &riceParamParts[2]) ||\n            !ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[3], &riceParamParts[3])) {\n            return MA_FALSE;\n        }\n        zeroCountPart128 = vld1q_u32(zeroCountParts);\n        riceParamPart128 = vld1q_u32(riceParamParts);\n        riceParamPart128 = vandq_u32(riceParamPart128, riceParamMask128);\n        riceParamPart128 = vorrq_u32(riceParamPart128, vshlq_u32(zeroCountPart128, riceParam128));\n        riceParamPart128 = veorq_u32(vshrq_n_u32(riceParamPart128, 1), vaddq_u32(ma_dr_flac__vnotq_u32(vandq_u32(riceParamPart128, one128)), one128));\n        for (i = 0; i < 4; i += 1) {\n            int64x1_t prediction64;\n            prediction128 = veorq_s64(prediction128, prediction128);\n            switch (order)\n            {\n            case 12:\n            case 11: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_low_s32(coefficients128_8), vget_low_s32(samples128_8)));\n            case 10:\n            case  9: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_high_s32(coefficients128_8), vget_high_s32(samples128_8)));\n            case  8:\n            case  7: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_low_s32(coefficients128_4), vget_low_s32(samples128_4)));\n            case  6:\n            case  5: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_high_s32(coefficients128_4), vget_high_s32(samples128_4)));\n            case  4:\n            case  3: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_low_s32(coefficients128_0), vget_low_s32(samples128_0)));\n            case  2:\n            case  1: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_high_s32(coefficients128_0), vget_high_s32(samples128_0)));\n            }\n            prediction64 = ma_dr_flac__vhaddq_s64(prediction128);\n            prediction64 = vshl_s64(prediction64, shift64);\n            prediction64 = vadd_s64(prediction64, vdup_n_s64(vgetq_lane_u32(riceParamPart128, 0)));\n            samples128_8 = ma_dr_flac__valignrq_s32_1(samples128_4, samples128_8);\n            samples128_4 = ma_dr_flac__valignrq_s32_1(samples128_0, samples128_4);\n            samples128_0 = ma_dr_flac__valignrq_s32_1(vcombine_s32(vreinterpret_s32_s64(prediction64), vdup_n_s32(0)), samples128_0);\n            riceParamPart128 = ma_dr_flac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128);\n        }\n        vst1q_s32(pDecodedSamples, samples128_0);\n        pDecodedSamples += 4;\n    }\n    i = (count & ~3);\n    while (i < (int)count) {\n        if (!ma_dr_flac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0])) {\n            return MA_FALSE;\n        }\n        riceParamParts[0] &= riceParamMask;\n        riceParamParts[0] |= (zeroCountParts[0] << riceParam);\n        riceParamParts[0]  = (riceParamParts[0] >> 1) ^ t[riceParamParts[0] & 0x01];\n        pDecodedSamples[0] = riceParamParts[0] + ma_dr_flac__calculate_prediction_64(order, shift, coefficients, pDecodedSamples);\n        i += 1;\n        pDecodedSamples += 1;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__decode_samples_with_residual__rice__neon(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut)\n{\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(pSamplesOut != NULL);\n    if (lpcOrder > 0 && lpcOrder <= 12) {\n        if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {\n            return ma_dr_flac__decode_samples_with_residual__rice__neon_64(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);\n        } else {\n            return ma_dr_flac__decode_samples_with_residual__rice__neon_32(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);\n        }\n    } else {\n        return ma_dr_flac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);\n    }\n}\n#endif\nstatic ma_bool32 ma_dr_flac__decode_samples_with_residual__rice(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 riceParam, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE41)\n    if (ma_dr_flac__gIsSSE41Supported) {\n        return ma_dr_flac__decode_samples_with_residual__rice__sse41(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);\n    } else\n#elif defined(MA_DR_FLAC_SUPPORT_NEON)\n    if (ma_dr_flac__gIsNEONSupported) {\n        return ma_dr_flac__decode_samples_with_residual__rice__neon(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);\n    } else\n#endif\n    {\n    #if 0\n        return ma_dr_flac__decode_samples_with_residual__rice__reference(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);\n    #else\n        return ma_dr_flac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);\n    #endif\n    }\n}\nstatic ma_bool32 ma_dr_flac__read_and_seek_residual__rice(ma_dr_flac_bs* bs, ma_uint32 count, ma_uint8 riceParam)\n{\n    ma_uint32 i;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    for (i = 0; i < count; ++i) {\n        if (!ma_dr_flac__seek_rice_parts(bs, riceParam)) {\n            return MA_FALSE;\n        }\n    }\n    return MA_TRUE;\n}\n#if defined(__clang__)\n__attribute__((no_sanitize(\"signed-integer-overflow\")))\n#endif\nstatic ma_bool32 ma_dr_flac__decode_samples_with_residual__unencoded(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 count, ma_uint8 unencodedBitsPerSample, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pSamplesOut)\n{\n    ma_uint32 i;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(unencodedBitsPerSample <= 31);\n    MA_DR_FLAC_ASSERT(pSamplesOut != NULL);\n    for (i = 0; i < count; ++i) {\n        if (unencodedBitsPerSample > 0) {\n            if (!ma_dr_flac__read_int32(bs, unencodedBitsPerSample, pSamplesOut + i)) {\n                return MA_FALSE;\n            }\n        } else {\n            pSamplesOut[i] = 0;\n        }\n        if (ma_dr_flac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {\n            pSamplesOut[i] += ma_dr_flac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + i);\n        } else {\n            pSamplesOut[i] += ma_dr_flac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + i);\n        }\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__decode_samples_with_residual(ma_dr_flac_bs* bs, ma_uint32 bitsPerSample, ma_uint32 blockSize, ma_uint32 lpcOrder, ma_int32 lpcShift, ma_uint32 lpcPrecision, const ma_int32* coefficients, ma_int32* pDecodedSamples)\n{\n    ma_uint8 residualMethod;\n    ma_uint8 partitionOrder;\n    ma_uint32 samplesInPartition;\n    ma_uint32 partitionsRemaining;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(blockSize != 0);\n    MA_DR_FLAC_ASSERT(pDecodedSamples != NULL);\n    if (!ma_dr_flac__read_uint8(bs, 2, &residualMethod)) {\n        return MA_FALSE;\n    }\n    if (residualMethod != MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE && residualMethod != MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) {\n        return MA_FALSE;\n    }\n    pDecodedSamples += lpcOrder;\n    if (!ma_dr_flac__read_uint8(bs, 4, &partitionOrder)) {\n        return MA_FALSE;\n    }\n    if (partitionOrder > 8) {\n        return MA_FALSE;\n    }\n    if ((blockSize / (1 << partitionOrder)) < lpcOrder) {\n        return MA_FALSE;\n    }\n    samplesInPartition = (blockSize / (1 << partitionOrder)) - lpcOrder;\n    partitionsRemaining = (1 << partitionOrder);\n    for (;;) {\n        ma_uint8 riceParam = 0;\n        if (residualMethod == MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE) {\n            if (!ma_dr_flac__read_uint8(bs, 4, &riceParam)) {\n                return MA_FALSE;\n            }\n            if (riceParam == 15) {\n                riceParam = 0xFF;\n            }\n        } else if (residualMethod == MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) {\n            if (!ma_dr_flac__read_uint8(bs, 5, &riceParam)) {\n                return MA_FALSE;\n            }\n            if (riceParam == 31) {\n                riceParam = 0xFF;\n            }\n        }\n        if (riceParam != 0xFF) {\n            if (!ma_dr_flac__decode_samples_with_residual__rice(bs, bitsPerSample, samplesInPartition, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) {\n                return MA_FALSE;\n            }\n        } else {\n            ma_uint8 unencodedBitsPerSample = 0;\n            if (!ma_dr_flac__read_uint8(bs, 5, &unencodedBitsPerSample)) {\n                return MA_FALSE;\n            }\n            if (!ma_dr_flac__decode_samples_with_residual__unencoded(bs, bitsPerSample, samplesInPartition, unencodedBitsPerSample, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) {\n                return MA_FALSE;\n            }\n        }\n        pDecodedSamples += samplesInPartition;\n        if (partitionsRemaining == 1) {\n            break;\n        }\n        partitionsRemaining -= 1;\n        if (partitionOrder != 0) {\n            samplesInPartition = blockSize / (1 << partitionOrder);\n        }\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__read_and_seek_residual(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 order)\n{\n    ma_uint8 residualMethod;\n    ma_uint8 partitionOrder;\n    ma_uint32 samplesInPartition;\n    ma_uint32 partitionsRemaining;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(blockSize != 0);\n    if (!ma_dr_flac__read_uint8(bs, 2, &residualMethod)) {\n        return MA_FALSE;\n    }\n    if (residualMethod != MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE && residualMethod != MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) {\n        return MA_FALSE;\n    }\n    if (!ma_dr_flac__read_uint8(bs, 4, &partitionOrder)) {\n        return MA_FALSE;\n    }\n    if (partitionOrder > 8) {\n        return MA_FALSE;\n    }\n    if ((blockSize / (1 << partitionOrder)) <= order) {\n        return MA_FALSE;\n    }\n    samplesInPartition = (blockSize / (1 << partitionOrder)) - order;\n    partitionsRemaining = (1 << partitionOrder);\n    for (;;)\n    {\n        ma_uint8 riceParam = 0;\n        if (residualMethod == MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE) {\n            if (!ma_dr_flac__read_uint8(bs, 4, &riceParam)) {\n                return MA_FALSE;\n            }\n            if (riceParam == 15) {\n                riceParam = 0xFF;\n            }\n        } else if (residualMethod == MA_DR_FLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) {\n            if (!ma_dr_flac__read_uint8(bs, 5, &riceParam)) {\n                return MA_FALSE;\n            }\n            if (riceParam == 31) {\n                riceParam = 0xFF;\n            }\n        }\n        if (riceParam != 0xFF) {\n            if (!ma_dr_flac__read_and_seek_residual__rice(bs, samplesInPartition, riceParam)) {\n                return MA_FALSE;\n            }\n        } else {\n            ma_uint8 unencodedBitsPerSample = 0;\n            if (!ma_dr_flac__read_uint8(bs, 5, &unencodedBitsPerSample)) {\n                return MA_FALSE;\n            }\n            if (!ma_dr_flac__seek_bits(bs, unencodedBitsPerSample * samplesInPartition)) {\n                return MA_FALSE;\n            }\n        }\n        if (partitionsRemaining == 1) {\n            break;\n        }\n        partitionsRemaining -= 1;\n        samplesInPartition = blockSize / (1 << partitionOrder);\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__decode_samples__constant(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 subframeBitsPerSample, ma_int32* pDecodedSamples)\n{\n    ma_uint32 i;\n    ma_int32 sample;\n    if (!ma_dr_flac__read_int32(bs, subframeBitsPerSample, &sample)) {\n        return MA_FALSE;\n    }\n    for (i = 0; i < blockSize; ++i) {\n        pDecodedSamples[i] = sample;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__decode_samples__verbatim(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 subframeBitsPerSample, ma_int32* pDecodedSamples)\n{\n    ma_uint32 i;\n    for (i = 0; i < blockSize; ++i) {\n        ma_int32 sample;\n        if (!ma_dr_flac__read_int32(bs, subframeBitsPerSample, &sample)) {\n            return MA_FALSE;\n        }\n        pDecodedSamples[i] = sample;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__decode_samples__fixed(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 subframeBitsPerSample, ma_uint8 lpcOrder, ma_int32* pDecodedSamples)\n{\n    ma_uint32 i;\n    static ma_int32 lpcCoefficientsTable[5][4] = {\n        {0,  0, 0,  0},\n        {1,  0, 0,  0},\n        {2, -1, 0,  0},\n        {3, -3, 1,  0},\n        {4, -6, 4, -1}\n    };\n    for (i = 0; i < lpcOrder; ++i) {\n        ma_int32 sample;\n        if (!ma_dr_flac__read_int32(bs, subframeBitsPerSample, &sample)) {\n            return MA_FALSE;\n        }\n        pDecodedSamples[i] = sample;\n    }\n    if (!ma_dr_flac__decode_samples_with_residual(bs, subframeBitsPerSample, blockSize, lpcOrder, 0, 4, lpcCoefficientsTable[lpcOrder], pDecodedSamples)) {\n        return MA_FALSE;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__decode_samples__lpc(ma_dr_flac_bs* bs, ma_uint32 blockSize, ma_uint32 bitsPerSample, ma_uint8 lpcOrder, ma_int32* pDecodedSamples)\n{\n    ma_uint8 i;\n    ma_uint8 lpcPrecision;\n    ma_int8 lpcShift;\n    ma_int32 coefficients[32];\n    for (i = 0; i < lpcOrder; ++i) {\n        ma_int32 sample;\n        if (!ma_dr_flac__read_int32(bs, bitsPerSample, &sample)) {\n            return MA_FALSE;\n        }\n        pDecodedSamples[i] = sample;\n    }\n    if (!ma_dr_flac__read_uint8(bs, 4, &lpcPrecision)) {\n        return MA_FALSE;\n    }\n    if (lpcPrecision == 15) {\n        return MA_FALSE;\n    }\n    lpcPrecision += 1;\n    if (!ma_dr_flac__read_int8(bs, 5, &lpcShift)) {\n        return MA_FALSE;\n    }\n    if (lpcShift < 0) {\n        return MA_FALSE;\n    }\n    MA_DR_FLAC_ZERO_MEMORY(coefficients, sizeof(coefficients));\n    for (i = 0; i < lpcOrder; ++i) {\n        if (!ma_dr_flac__read_int32(bs, lpcPrecision, coefficients + i)) {\n            return MA_FALSE;\n        }\n    }\n    if (!ma_dr_flac__decode_samples_with_residual(bs, bitsPerSample, blockSize, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) {\n        return MA_FALSE;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__read_next_flac_frame_header(ma_dr_flac_bs* bs, ma_uint8 streaminfoBitsPerSample, ma_dr_flac_frame_header* header)\n{\n    const ma_uint32 sampleRateTable[12]  = {0, 88200, 176400, 192000, 8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000};\n    const ma_uint8 bitsPerSampleTable[8] = {0, 8, 12, (ma_uint8)-1, 16, 20, 24, (ma_uint8)-1};\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(header != NULL);\n    for (;;) {\n        ma_uint8 crc8 = 0xCE;\n        ma_uint8 reserved = 0;\n        ma_uint8 blockingStrategy = 0;\n        ma_uint8 blockSize = 0;\n        ma_uint8 sampleRate = 0;\n        ma_uint8 channelAssignment = 0;\n        ma_uint8 bitsPerSample = 0;\n        ma_bool32 isVariableBlockSize;\n        if (!ma_dr_flac__find_and_seek_to_next_sync_code(bs)) {\n            return MA_FALSE;\n        }\n        if (!ma_dr_flac__read_uint8(bs, 1, &reserved)) {\n            return MA_FALSE;\n        }\n        if (reserved == 1) {\n            continue;\n        }\n        crc8 = ma_dr_flac_crc8(crc8, reserved, 1);\n        if (!ma_dr_flac__read_uint8(bs, 1, &blockingStrategy)) {\n            return MA_FALSE;\n        }\n        crc8 = ma_dr_flac_crc8(crc8, blockingStrategy, 1);\n        if (!ma_dr_flac__read_uint8(bs, 4, &blockSize)) {\n            return MA_FALSE;\n        }\n        if (blockSize == 0) {\n            continue;\n        }\n        crc8 = ma_dr_flac_crc8(crc8, blockSize, 4);\n        if (!ma_dr_flac__read_uint8(bs, 4, &sampleRate)) {\n            return MA_FALSE;\n        }\n        crc8 = ma_dr_flac_crc8(crc8, sampleRate, 4);\n        if (!ma_dr_flac__read_uint8(bs, 4, &channelAssignment)) {\n            return MA_FALSE;\n        }\n        if (channelAssignment > 10) {\n            continue;\n        }\n        crc8 = ma_dr_flac_crc8(crc8, channelAssignment, 4);\n        if (!ma_dr_flac__read_uint8(bs, 3, &bitsPerSample)) {\n            return MA_FALSE;\n        }\n        if (bitsPerSample == 3 || bitsPerSample == 7) {\n            continue;\n        }\n        crc8 = ma_dr_flac_crc8(crc8, bitsPerSample, 3);\n        if (!ma_dr_flac__read_uint8(bs, 1, &reserved)) {\n            return MA_FALSE;\n        }\n        if (reserved == 1) {\n            continue;\n        }\n        crc8 = ma_dr_flac_crc8(crc8, reserved, 1);\n        isVariableBlockSize = blockingStrategy == 1;\n        if (isVariableBlockSize) {\n            ma_uint64 pcmFrameNumber;\n            ma_result result = ma_dr_flac__read_utf8_coded_number(bs, &pcmFrameNumber, &crc8);\n            if (result != MA_SUCCESS) {\n                if (result == MA_AT_END) {\n                    return MA_FALSE;\n                } else {\n                    continue;\n                }\n            }\n            header->flacFrameNumber  = 0;\n            header->pcmFrameNumber = pcmFrameNumber;\n        } else {\n            ma_uint64 flacFrameNumber = 0;\n            ma_result result = ma_dr_flac__read_utf8_coded_number(bs, &flacFrameNumber, &crc8);\n            if (result != MA_SUCCESS) {\n                if (result == MA_AT_END) {\n                    return MA_FALSE;\n                } else {\n                    continue;\n                }\n            }\n            header->flacFrameNumber  = (ma_uint32)flacFrameNumber;\n            header->pcmFrameNumber = 0;\n        }\n        MA_DR_FLAC_ASSERT(blockSize > 0);\n        if (blockSize == 1) {\n            header->blockSizeInPCMFrames = 192;\n        } else if (blockSize <= 5) {\n            MA_DR_FLAC_ASSERT(blockSize >= 2);\n            header->blockSizeInPCMFrames = 576 * (1 << (blockSize - 2));\n        } else if (blockSize == 6) {\n            if (!ma_dr_flac__read_uint16(bs, 8, &header->blockSizeInPCMFrames)) {\n                return MA_FALSE;\n            }\n            crc8 = ma_dr_flac_crc8(crc8, header->blockSizeInPCMFrames, 8);\n            header->blockSizeInPCMFrames += 1;\n        } else if (blockSize == 7) {\n            if (!ma_dr_flac__read_uint16(bs, 16, &header->blockSizeInPCMFrames)) {\n                return MA_FALSE;\n            }\n            crc8 = ma_dr_flac_crc8(crc8, header->blockSizeInPCMFrames, 16);\n            if (header->blockSizeInPCMFrames == 0xFFFF) {\n                return MA_FALSE;\n            }\n            header->blockSizeInPCMFrames += 1;\n        } else {\n            MA_DR_FLAC_ASSERT(blockSize >= 8);\n            header->blockSizeInPCMFrames = 256 * (1 << (blockSize - 8));\n        }\n        if (sampleRate <= 11) {\n            header->sampleRate = sampleRateTable[sampleRate];\n        } else if (sampleRate == 12) {\n            if (!ma_dr_flac__read_uint32(bs, 8, &header->sampleRate)) {\n                return MA_FALSE;\n            }\n            crc8 = ma_dr_flac_crc8(crc8, header->sampleRate, 8);\n            header->sampleRate *= 1000;\n        } else if (sampleRate == 13) {\n            if (!ma_dr_flac__read_uint32(bs, 16, &header->sampleRate)) {\n                return MA_FALSE;\n            }\n            crc8 = ma_dr_flac_crc8(crc8, header->sampleRate, 16);\n        } else if (sampleRate == 14) {\n            if (!ma_dr_flac__read_uint32(bs, 16, &header->sampleRate)) {\n                return MA_FALSE;\n            }\n            crc8 = ma_dr_flac_crc8(crc8, header->sampleRate, 16);\n            header->sampleRate *= 10;\n        } else {\n            continue;\n        }\n        header->channelAssignment = channelAssignment;\n        header->bitsPerSample = bitsPerSampleTable[bitsPerSample];\n        if (header->bitsPerSample == 0) {\n            header->bitsPerSample = streaminfoBitsPerSample;\n        }\n        if (header->bitsPerSample != streaminfoBitsPerSample) {\n            return MA_FALSE;\n        }\n        if (!ma_dr_flac__read_uint8(bs, 8, &header->crc8)) {\n            return MA_FALSE;\n        }\n#ifndef MA_DR_FLAC_NO_CRC\n        if (header->crc8 != crc8) {\n            continue;\n        }\n#endif\n        return MA_TRUE;\n    }\n}\nstatic ma_bool32 ma_dr_flac__read_subframe_header(ma_dr_flac_bs* bs, ma_dr_flac_subframe* pSubframe)\n{\n    ma_uint8 header;\n    int type;\n    if (!ma_dr_flac__read_uint8(bs, 8, &header)) {\n        return MA_FALSE;\n    }\n    if ((header & 0x80) != 0) {\n        return MA_FALSE;\n    }\n    type = (header & 0x7E) >> 1;\n    if (type == 0) {\n        pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_CONSTANT;\n    } else if (type == 1) {\n        pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_VERBATIM;\n    } else {\n        if ((type & 0x20) != 0) {\n            pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_LPC;\n            pSubframe->lpcOrder = (ma_uint8)(type & 0x1F) + 1;\n        } else if ((type & 0x08) != 0) {\n            pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_FIXED;\n            pSubframe->lpcOrder = (ma_uint8)(type & 0x07);\n            if (pSubframe->lpcOrder > 4) {\n                pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_RESERVED;\n                pSubframe->lpcOrder = 0;\n            }\n        } else {\n            pSubframe->subframeType = MA_DR_FLAC_SUBFRAME_RESERVED;\n        }\n    }\n    if (pSubframe->subframeType == MA_DR_FLAC_SUBFRAME_RESERVED) {\n        return MA_FALSE;\n    }\n    pSubframe->wastedBitsPerSample = 0;\n    if ((header & 0x01) == 1) {\n        unsigned int wastedBitsPerSample;\n        if (!ma_dr_flac__seek_past_next_set_bit(bs, &wastedBitsPerSample)) {\n            return MA_FALSE;\n        }\n        pSubframe->wastedBitsPerSample = (ma_uint8)wastedBitsPerSample + 1;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__decode_subframe(ma_dr_flac_bs* bs, ma_dr_flac_frame* frame, int subframeIndex, ma_int32* pDecodedSamplesOut)\n{\n    ma_dr_flac_subframe* pSubframe;\n    ma_uint32 subframeBitsPerSample;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(frame != NULL);\n    pSubframe = frame->subframes + subframeIndex;\n    if (!ma_dr_flac__read_subframe_header(bs, pSubframe)) {\n        return MA_FALSE;\n    }\n    subframeBitsPerSample = frame->header.bitsPerSample;\n    if ((frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE || frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE) && subframeIndex == 1) {\n        subframeBitsPerSample += 1;\n    } else if (frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE && subframeIndex == 0) {\n        subframeBitsPerSample += 1;\n    }\n    if (subframeBitsPerSample > 32) {\n        return MA_FALSE;\n    }\n    if (pSubframe->wastedBitsPerSample >= subframeBitsPerSample) {\n        return MA_FALSE;\n    }\n    subframeBitsPerSample -= pSubframe->wastedBitsPerSample;\n    pSubframe->pSamplesS32 = pDecodedSamplesOut;\n    switch (pSubframe->subframeType)\n    {\n        case MA_DR_FLAC_SUBFRAME_CONSTANT:\n        {\n            ma_dr_flac__decode_samples__constant(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->pSamplesS32);\n        } break;\n        case MA_DR_FLAC_SUBFRAME_VERBATIM:\n        {\n            ma_dr_flac__decode_samples__verbatim(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->pSamplesS32);\n        } break;\n        case MA_DR_FLAC_SUBFRAME_FIXED:\n        {\n            ma_dr_flac__decode_samples__fixed(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->lpcOrder, pSubframe->pSamplesS32);\n        } break;\n        case MA_DR_FLAC_SUBFRAME_LPC:\n        {\n            ma_dr_flac__decode_samples__lpc(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->lpcOrder, pSubframe->pSamplesS32);\n        } break;\n        default: return MA_FALSE;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__seek_subframe(ma_dr_flac_bs* bs, ma_dr_flac_frame* frame, int subframeIndex)\n{\n    ma_dr_flac_subframe* pSubframe;\n    ma_uint32 subframeBitsPerSample;\n    MA_DR_FLAC_ASSERT(bs != NULL);\n    MA_DR_FLAC_ASSERT(frame != NULL);\n    pSubframe = frame->subframes + subframeIndex;\n    if (!ma_dr_flac__read_subframe_header(bs, pSubframe)) {\n        return MA_FALSE;\n    }\n    subframeBitsPerSample = frame->header.bitsPerSample;\n    if ((frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE || frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE) && subframeIndex == 1) {\n        subframeBitsPerSample += 1;\n    } else if (frame->header.channelAssignment == MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE && subframeIndex == 0) {\n        subframeBitsPerSample += 1;\n    }\n    if (pSubframe->wastedBitsPerSample >= subframeBitsPerSample) {\n        return MA_FALSE;\n    }\n    subframeBitsPerSample -= pSubframe->wastedBitsPerSample;\n    pSubframe->pSamplesS32 = NULL;\n    switch (pSubframe->subframeType)\n    {\n        case MA_DR_FLAC_SUBFRAME_CONSTANT:\n        {\n            if (!ma_dr_flac__seek_bits(bs, subframeBitsPerSample)) {\n                return MA_FALSE;\n            }\n        } break;\n        case MA_DR_FLAC_SUBFRAME_VERBATIM:\n        {\n            unsigned int bitsToSeek = frame->header.blockSizeInPCMFrames * subframeBitsPerSample;\n            if (!ma_dr_flac__seek_bits(bs, bitsToSeek)) {\n                return MA_FALSE;\n            }\n        } break;\n        case MA_DR_FLAC_SUBFRAME_FIXED:\n        {\n            unsigned int bitsToSeek = pSubframe->lpcOrder * subframeBitsPerSample;\n            if (!ma_dr_flac__seek_bits(bs, bitsToSeek)) {\n                return MA_FALSE;\n            }\n            if (!ma_dr_flac__read_and_seek_residual(bs, frame->header.blockSizeInPCMFrames, pSubframe->lpcOrder)) {\n                return MA_FALSE;\n            }\n        } break;\n        case MA_DR_FLAC_SUBFRAME_LPC:\n        {\n            ma_uint8 lpcPrecision;\n            unsigned int bitsToSeek = pSubframe->lpcOrder * subframeBitsPerSample;\n            if (!ma_dr_flac__seek_bits(bs, bitsToSeek)) {\n                return MA_FALSE;\n            }\n            if (!ma_dr_flac__read_uint8(bs, 4, &lpcPrecision)) {\n                return MA_FALSE;\n            }\n            if (lpcPrecision == 15) {\n                return MA_FALSE;\n            }\n            lpcPrecision += 1;\n            bitsToSeek = (pSubframe->lpcOrder * lpcPrecision) + 5;\n            if (!ma_dr_flac__seek_bits(bs, bitsToSeek)) {\n                return MA_FALSE;\n            }\n            if (!ma_dr_flac__read_and_seek_residual(bs, frame->header.blockSizeInPCMFrames, pSubframe->lpcOrder)) {\n                return MA_FALSE;\n            }\n        } break;\n        default: return MA_FALSE;\n    }\n    return MA_TRUE;\n}\nstatic MA_INLINE ma_uint8 ma_dr_flac__get_channel_count_from_channel_assignment(ma_int8 channelAssignment)\n{\n    ma_uint8 lookup[] = {1, 2, 3, 4, 5, 6, 7, 8, 2, 2, 2};\n    MA_DR_FLAC_ASSERT(channelAssignment <= 10);\n    return lookup[channelAssignment];\n}\nstatic ma_result ma_dr_flac__decode_flac_frame(ma_dr_flac* pFlac)\n{\n    int channelCount;\n    int i;\n    ma_uint8 paddingSizeInBits;\n    ma_uint16 desiredCRC16;\n#ifndef MA_DR_FLAC_NO_CRC\n    ma_uint16 actualCRC16;\n#endif\n    MA_DR_FLAC_ZERO_MEMORY(pFlac->currentFLACFrame.subframes, sizeof(pFlac->currentFLACFrame.subframes));\n    if (pFlac->currentFLACFrame.header.blockSizeInPCMFrames > pFlac->maxBlockSizeInPCMFrames) {\n        return MA_ERROR;\n    }\n    channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment);\n    if (channelCount != (int)pFlac->channels) {\n        return MA_ERROR;\n    }\n    for (i = 0; i < channelCount; ++i) {\n        if (!ma_dr_flac__decode_subframe(&pFlac->bs, &pFlac->currentFLACFrame, i, pFlac->pDecodedSamples + (pFlac->currentFLACFrame.header.blockSizeInPCMFrames * i))) {\n            return MA_ERROR;\n        }\n    }\n    paddingSizeInBits = (ma_uint8)(MA_DR_FLAC_CACHE_L1_BITS_REMAINING(&pFlac->bs) & 7);\n    if (paddingSizeInBits > 0) {\n        ma_uint8 padding = 0;\n        if (!ma_dr_flac__read_uint8(&pFlac->bs, paddingSizeInBits, &padding)) {\n            return MA_AT_END;\n        }\n    }\n#ifndef MA_DR_FLAC_NO_CRC\n    actualCRC16 = ma_dr_flac__flush_crc16(&pFlac->bs);\n#endif\n    if (!ma_dr_flac__read_uint16(&pFlac->bs, 16, &desiredCRC16)) {\n        return MA_AT_END;\n    }\n#ifndef MA_DR_FLAC_NO_CRC\n    if (actualCRC16 != desiredCRC16) {\n        return MA_CRC_MISMATCH;\n    }\n#endif\n    pFlac->currentFLACFrame.pcmFramesRemaining = pFlac->currentFLACFrame.header.blockSizeInPCMFrames;\n    return MA_SUCCESS;\n}\nstatic ma_result ma_dr_flac__seek_flac_frame(ma_dr_flac* pFlac)\n{\n    int channelCount;\n    int i;\n    ma_uint16 desiredCRC16;\n#ifndef MA_DR_FLAC_NO_CRC\n    ma_uint16 actualCRC16;\n#endif\n    channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment);\n    for (i = 0; i < channelCount; ++i) {\n        if (!ma_dr_flac__seek_subframe(&pFlac->bs, &pFlac->currentFLACFrame, i)) {\n            return MA_ERROR;\n        }\n    }\n    if (!ma_dr_flac__seek_bits(&pFlac->bs, MA_DR_FLAC_CACHE_L1_BITS_REMAINING(&pFlac->bs) & 7)) {\n        return MA_ERROR;\n    }\n#ifndef MA_DR_FLAC_NO_CRC\n    actualCRC16 = ma_dr_flac__flush_crc16(&pFlac->bs);\n#endif\n    if (!ma_dr_flac__read_uint16(&pFlac->bs, 16, &desiredCRC16)) {\n        return MA_AT_END;\n    }\n#ifndef MA_DR_FLAC_NO_CRC\n    if (actualCRC16 != desiredCRC16) {\n        return MA_CRC_MISMATCH;\n    }\n#endif\n    return MA_SUCCESS;\n}\nstatic ma_bool32 ma_dr_flac__read_and_decode_next_flac_frame(ma_dr_flac* pFlac)\n{\n    MA_DR_FLAC_ASSERT(pFlac != NULL);\n    for (;;) {\n        ma_result result;\n        if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) {\n            return MA_FALSE;\n        }\n        result = ma_dr_flac__decode_flac_frame(pFlac);\n        if (result != MA_SUCCESS) {\n            if (result == MA_CRC_MISMATCH) {\n                continue;\n            } else {\n                return MA_FALSE;\n            }\n        }\n        return MA_TRUE;\n    }\n}\nstatic void ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(ma_dr_flac* pFlac, ma_uint64* pFirstPCMFrame, ma_uint64* pLastPCMFrame)\n{\n    ma_uint64 firstPCMFrame;\n    ma_uint64 lastPCMFrame;\n    MA_DR_FLAC_ASSERT(pFlac != NULL);\n    firstPCMFrame = pFlac->currentFLACFrame.header.pcmFrameNumber;\n    if (firstPCMFrame == 0) {\n        firstPCMFrame = ((ma_uint64)pFlac->currentFLACFrame.header.flacFrameNumber) * pFlac->maxBlockSizeInPCMFrames;\n    }\n    lastPCMFrame = firstPCMFrame + pFlac->currentFLACFrame.header.blockSizeInPCMFrames;\n    if (lastPCMFrame > 0) {\n        lastPCMFrame -= 1;\n    }\n    if (pFirstPCMFrame) {\n        *pFirstPCMFrame = firstPCMFrame;\n    }\n    if (pLastPCMFrame) {\n        *pLastPCMFrame = lastPCMFrame;\n    }\n}\nstatic ma_bool32 ma_dr_flac__seek_to_first_frame(ma_dr_flac* pFlac)\n{\n    ma_bool32 result;\n    MA_DR_FLAC_ASSERT(pFlac != NULL);\n    result = ma_dr_flac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes);\n    MA_DR_FLAC_ZERO_MEMORY(&pFlac->currentFLACFrame, sizeof(pFlac->currentFLACFrame));\n    pFlac->currentPCMFrame = 0;\n    return result;\n}\nstatic MA_INLINE ma_result ma_dr_flac__seek_to_next_flac_frame(ma_dr_flac* pFlac)\n{\n    MA_DR_FLAC_ASSERT(pFlac != NULL);\n    return ma_dr_flac__seek_flac_frame(pFlac);\n}\nstatic ma_uint64 ma_dr_flac__seek_forward_by_pcm_frames(ma_dr_flac* pFlac, ma_uint64 pcmFramesToSeek)\n{\n    ma_uint64 pcmFramesRead = 0;\n    while (pcmFramesToSeek > 0) {\n        if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) {\n            if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) {\n                break;\n            }\n        } else {\n            if (pFlac->currentFLACFrame.pcmFramesRemaining > pcmFramesToSeek) {\n                pcmFramesRead   += pcmFramesToSeek;\n                pFlac->currentFLACFrame.pcmFramesRemaining -= (ma_uint32)pcmFramesToSeek;\n                pcmFramesToSeek  = 0;\n            } else {\n                pcmFramesRead   += pFlac->currentFLACFrame.pcmFramesRemaining;\n                pcmFramesToSeek -= pFlac->currentFLACFrame.pcmFramesRemaining;\n                pFlac->currentFLACFrame.pcmFramesRemaining = 0;\n            }\n        }\n    }\n    pFlac->currentPCMFrame += pcmFramesRead;\n    return pcmFramesRead;\n}\nstatic ma_bool32 ma_dr_flac__seek_to_pcm_frame__brute_force(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex)\n{\n    ma_bool32 isMidFrame = MA_FALSE;\n    ma_uint64 runningPCMFrameCount;\n    MA_DR_FLAC_ASSERT(pFlac != NULL);\n    if (pcmFrameIndex >= pFlac->currentPCMFrame) {\n        runningPCMFrameCount = pFlac->currentPCMFrame;\n        if (pFlac->currentPCMFrame == 0 && pFlac->currentFLACFrame.pcmFramesRemaining == 0) {\n            if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) {\n                return MA_FALSE;\n            }\n        } else {\n            isMidFrame = MA_TRUE;\n        }\n    } else {\n        runningPCMFrameCount = 0;\n        if (!ma_dr_flac__seek_to_first_frame(pFlac)) {\n            return MA_FALSE;\n        }\n        if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) {\n            return MA_FALSE;\n        }\n    }\n    for (;;) {\n        ma_uint64 pcmFrameCountInThisFLACFrame;\n        ma_uint64 firstPCMFrameInFLACFrame = 0;\n        ma_uint64 lastPCMFrameInFLACFrame = 0;\n        ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &firstPCMFrameInFLACFrame, &lastPCMFrameInFLACFrame);\n        pcmFrameCountInThisFLACFrame = (lastPCMFrameInFLACFrame - firstPCMFrameInFLACFrame) + 1;\n        if (pcmFrameIndex < (runningPCMFrameCount + pcmFrameCountInThisFLACFrame)) {\n            ma_uint64 pcmFramesToDecode = pcmFrameIndex - runningPCMFrameCount;\n            if (!isMidFrame) {\n                ma_result result = ma_dr_flac__decode_flac_frame(pFlac);\n                if (result == MA_SUCCESS) {\n                    return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode;\n                } else {\n                    if (result == MA_CRC_MISMATCH) {\n                        goto next_iteration;\n                    } else {\n                        return MA_FALSE;\n                    }\n                }\n            } else {\n                return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode;\n            }\n        } else {\n            if (!isMidFrame) {\n                ma_result result = ma_dr_flac__seek_to_next_flac_frame(pFlac);\n                if (result == MA_SUCCESS) {\n                    runningPCMFrameCount += pcmFrameCountInThisFLACFrame;\n                } else {\n                    if (result == MA_CRC_MISMATCH) {\n                        goto next_iteration;\n                    } else {\n                        return MA_FALSE;\n                    }\n                }\n            } else {\n                runningPCMFrameCount += pFlac->currentFLACFrame.pcmFramesRemaining;\n                pFlac->currentFLACFrame.pcmFramesRemaining = 0;\n                isMidFrame = MA_FALSE;\n            }\n            if (pcmFrameIndex == pFlac->totalPCMFrameCount && runningPCMFrameCount == pFlac->totalPCMFrameCount) {\n                return MA_TRUE;\n            }\n        }\n    next_iteration:\n        if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) {\n            return MA_FALSE;\n        }\n    }\n}\n#if !defined(MA_DR_FLAC_NO_CRC)\n#define MA_DR_FLAC_BINARY_SEARCH_APPROX_COMPRESSION_RATIO 0.6f\nstatic ma_bool32 ma_dr_flac__seek_to_approximate_flac_frame_to_byte(ma_dr_flac* pFlac, ma_uint64 targetByte, ma_uint64 rangeLo, ma_uint64 rangeHi, ma_uint64* pLastSuccessfulSeekOffset)\n{\n    MA_DR_FLAC_ASSERT(pFlac != NULL);\n    MA_DR_FLAC_ASSERT(pLastSuccessfulSeekOffset != NULL);\n    MA_DR_FLAC_ASSERT(targetByte >= rangeLo);\n    MA_DR_FLAC_ASSERT(targetByte <= rangeHi);\n    *pLastSuccessfulSeekOffset = pFlac->firstFLACFramePosInBytes;\n    for (;;) {\n        ma_uint64 lastTargetByte = targetByte;\n        if (!ma_dr_flac__seek_to_byte(&pFlac->bs, targetByte)) {\n            if (targetByte == 0) {\n                ma_dr_flac__seek_to_first_frame(pFlac);\n                return MA_FALSE;\n            }\n            targetByte = rangeLo + ((rangeHi - rangeLo)/2);\n            rangeHi = targetByte;\n        } else {\n            MA_DR_FLAC_ZERO_MEMORY(&pFlac->currentFLACFrame, sizeof(pFlac->currentFLACFrame));\n#if 1\n            if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) {\n                targetByte = rangeLo + ((rangeHi - rangeLo)/2);\n                rangeHi = targetByte;\n            } else {\n                break;\n            }\n#else\n            if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) {\n                targetByte = rangeLo + ((rangeHi - rangeLo)/2);\n                rangeHi = targetByte;\n            } else {\n                break;\n            }\n#endif\n        }\n        if(targetByte == lastTargetByte) {\n            return MA_FALSE;\n        }\n    }\n    ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &pFlac->currentPCMFrame, NULL);\n    MA_DR_FLAC_ASSERT(targetByte <= rangeHi);\n    *pLastSuccessfulSeekOffset = targetByte;\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__decode_flac_frame_and_seek_forward_by_pcm_frames(ma_dr_flac* pFlac, ma_uint64 offset)\n{\n#if 0\n    if (ma_dr_flac__decode_flac_frame(pFlac) != MA_SUCCESS) {\n        if (ma_dr_flac__read_and_decode_next_flac_frame(pFlac) == MA_FALSE) {\n            return MA_FALSE;\n        }\n    }\n#endif\n    return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, offset) == offset;\n}\nstatic ma_bool32 ma_dr_flac__seek_to_pcm_frame__binary_search_internal(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex, ma_uint64 byteRangeLo, ma_uint64 byteRangeHi)\n{\n    ma_uint64 targetByte;\n    ma_uint64 pcmRangeLo = pFlac->totalPCMFrameCount;\n    ma_uint64 pcmRangeHi = 0;\n    ma_uint64 lastSuccessfulSeekOffset = (ma_uint64)-1;\n    ma_uint64 closestSeekOffsetBeforeTargetPCMFrame = byteRangeLo;\n    ma_uint32 seekForwardThreshold = (pFlac->maxBlockSizeInPCMFrames != 0) ? pFlac->maxBlockSizeInPCMFrames*2 : 4096;\n    targetByte = byteRangeLo + (ma_uint64)(((ma_int64)((pcmFrameIndex - pFlac->currentPCMFrame) * pFlac->channels * pFlac->bitsPerSample)/8.0f) * MA_DR_FLAC_BINARY_SEARCH_APPROX_COMPRESSION_RATIO);\n    if (targetByte > byteRangeHi) {\n        targetByte = byteRangeHi;\n    }\n    for (;;) {\n        if (ma_dr_flac__seek_to_approximate_flac_frame_to_byte(pFlac, targetByte, byteRangeLo, byteRangeHi, &lastSuccessfulSeekOffset)) {\n            ma_uint64 newPCMRangeLo;\n            ma_uint64 newPCMRangeHi;\n            ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &newPCMRangeLo, &newPCMRangeHi);\n            if (pcmRangeLo == newPCMRangeLo) {\n                if (!ma_dr_flac__seek_to_approximate_flac_frame_to_byte(pFlac, closestSeekOffsetBeforeTargetPCMFrame, closestSeekOffsetBeforeTargetPCMFrame, byteRangeHi, &lastSuccessfulSeekOffset)) {\n                    break;\n                }\n                if (ma_dr_flac__decode_flac_frame_and_seek_forward_by_pcm_frames(pFlac, pcmFrameIndex - pFlac->currentPCMFrame)) {\n                    return MA_TRUE;\n                } else {\n                    break;\n                }\n            }\n            pcmRangeLo = newPCMRangeLo;\n            pcmRangeHi = newPCMRangeHi;\n            if (pcmRangeLo <= pcmFrameIndex && pcmRangeHi >= pcmFrameIndex) {\n                if (ma_dr_flac__decode_flac_frame_and_seek_forward_by_pcm_frames(pFlac, pcmFrameIndex - pFlac->currentPCMFrame) ) {\n                    return MA_TRUE;\n                } else {\n                    break;\n                }\n            } else {\n                const float approxCompressionRatio = (ma_int64)(lastSuccessfulSeekOffset - pFlac->firstFLACFramePosInBytes) / ((ma_int64)(pcmRangeLo * pFlac->channels * pFlac->bitsPerSample)/8.0f);\n                if (pcmRangeLo > pcmFrameIndex) {\n                    byteRangeHi = lastSuccessfulSeekOffset;\n                    if (byteRangeLo > byteRangeHi) {\n                        byteRangeLo = byteRangeHi;\n                    }\n                    targetByte = byteRangeLo + ((byteRangeHi - byteRangeLo) / 2);\n                    if (targetByte < byteRangeLo) {\n                        targetByte = byteRangeLo;\n                    }\n                } else  {\n                    if ((pcmFrameIndex - pcmRangeLo) < seekForwardThreshold) {\n                        if (ma_dr_flac__decode_flac_frame_and_seek_forward_by_pcm_frames(pFlac, pcmFrameIndex - pFlac->currentPCMFrame)) {\n                            return MA_TRUE;\n                        } else {\n                            break;\n                        }\n                    } else {\n                        byteRangeLo = lastSuccessfulSeekOffset;\n                        if (byteRangeHi < byteRangeLo) {\n                            byteRangeHi = byteRangeLo;\n                        }\n                        targetByte = lastSuccessfulSeekOffset + (ma_uint64)(((ma_int64)((pcmFrameIndex-pcmRangeLo) * pFlac->channels * pFlac->bitsPerSample)/8.0f) * approxCompressionRatio);\n                        if (targetByte > byteRangeHi) {\n                            targetByte = byteRangeHi;\n                        }\n                        if (closestSeekOffsetBeforeTargetPCMFrame < lastSuccessfulSeekOffset) {\n                            closestSeekOffsetBeforeTargetPCMFrame = lastSuccessfulSeekOffset;\n                        }\n                    }\n                }\n            }\n        } else {\n            break;\n        }\n    }\n    ma_dr_flac__seek_to_first_frame(pFlac);\n    return MA_FALSE;\n}\nstatic ma_bool32 ma_dr_flac__seek_to_pcm_frame__binary_search(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex)\n{\n    ma_uint64 byteRangeLo;\n    ma_uint64 byteRangeHi;\n    ma_uint32 seekForwardThreshold = (pFlac->maxBlockSizeInPCMFrames != 0) ? pFlac->maxBlockSizeInPCMFrames*2 : 4096;\n    if (ma_dr_flac__seek_to_first_frame(pFlac) == MA_FALSE) {\n        return MA_FALSE;\n    }\n    if (pcmFrameIndex < seekForwardThreshold) {\n        return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFrameIndex) == pcmFrameIndex;\n    }\n    byteRangeLo = pFlac->firstFLACFramePosInBytes;\n    byteRangeHi = pFlac->firstFLACFramePosInBytes + (ma_uint64)((ma_int64)(pFlac->totalPCMFrameCount * pFlac->channels * pFlac->bitsPerSample)/8.0f);\n    return ma_dr_flac__seek_to_pcm_frame__binary_search_internal(pFlac, pcmFrameIndex, byteRangeLo, byteRangeHi);\n}\n#endif\nstatic ma_bool32 ma_dr_flac__seek_to_pcm_frame__seek_table(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex)\n{\n    ma_uint32 iClosestSeekpoint = 0;\n    ma_bool32 isMidFrame = MA_FALSE;\n    ma_uint64 runningPCMFrameCount;\n    ma_uint32 iSeekpoint;\n    MA_DR_FLAC_ASSERT(pFlac != NULL);\n    if (pFlac->pSeekpoints == NULL || pFlac->seekpointCount == 0) {\n        return MA_FALSE;\n    }\n    if (pFlac->pSeekpoints[0].firstPCMFrame > pcmFrameIndex) {\n        return MA_FALSE;\n    }\n    for (iSeekpoint = 0; iSeekpoint < pFlac->seekpointCount; ++iSeekpoint) {\n        if (pFlac->pSeekpoints[iSeekpoint].firstPCMFrame >= pcmFrameIndex) {\n            break;\n        }\n        iClosestSeekpoint = iSeekpoint;\n    }\n    if (pFlac->pSeekpoints[iClosestSeekpoint].pcmFrameCount == 0 || pFlac->pSeekpoints[iClosestSeekpoint].pcmFrameCount > pFlac->maxBlockSizeInPCMFrames) {\n        return MA_FALSE;\n    }\n    if (pFlac->pSeekpoints[iClosestSeekpoint].firstPCMFrame > pFlac->totalPCMFrameCount && pFlac->totalPCMFrameCount > 0) {\n        return MA_FALSE;\n    }\n#if !defined(MA_DR_FLAC_NO_CRC)\n    if (pFlac->totalPCMFrameCount > 0) {\n        ma_uint64 byteRangeLo;\n        ma_uint64 byteRangeHi;\n        byteRangeHi = pFlac->firstFLACFramePosInBytes + (ma_uint64)((ma_int64)(pFlac->totalPCMFrameCount * pFlac->channels * pFlac->bitsPerSample)/8.0f);\n        byteRangeLo = pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset;\n        if (iClosestSeekpoint < pFlac->seekpointCount-1) {\n            ma_uint32 iNextSeekpoint = iClosestSeekpoint + 1;\n            if (pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset >= pFlac->pSeekpoints[iNextSeekpoint].flacFrameOffset || pFlac->pSeekpoints[iNextSeekpoint].pcmFrameCount == 0) {\n                return MA_FALSE;\n            }\n            if (pFlac->pSeekpoints[iNextSeekpoint].firstPCMFrame != (((ma_uint64)0xFFFFFFFF << 32) | 0xFFFFFFFF)) {\n                byteRangeHi = pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iNextSeekpoint].flacFrameOffset - 1;\n            }\n        }\n        if (ma_dr_flac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset)) {\n            if (ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) {\n                ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &pFlac->currentPCMFrame, NULL);\n                if (ma_dr_flac__seek_to_pcm_frame__binary_search_internal(pFlac, pcmFrameIndex, byteRangeLo, byteRangeHi)) {\n                    return MA_TRUE;\n                }\n            }\n        }\n    }\n#endif\n    if (pcmFrameIndex >= pFlac->currentPCMFrame && pFlac->pSeekpoints[iClosestSeekpoint].firstPCMFrame <= pFlac->currentPCMFrame) {\n        runningPCMFrameCount = pFlac->currentPCMFrame;\n        if (pFlac->currentPCMFrame == 0 && pFlac->currentFLACFrame.pcmFramesRemaining == 0) {\n            if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) {\n                return MA_FALSE;\n            }\n        } else {\n            isMidFrame = MA_TRUE;\n        }\n    } else {\n        runningPCMFrameCount = pFlac->pSeekpoints[iClosestSeekpoint].firstPCMFrame;\n        if (!ma_dr_flac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset)) {\n            return MA_FALSE;\n        }\n        if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) {\n            return MA_FALSE;\n        }\n    }\n    for (;;) {\n        ma_uint64 pcmFrameCountInThisFLACFrame;\n        ma_uint64 firstPCMFrameInFLACFrame = 0;\n        ma_uint64 lastPCMFrameInFLACFrame = 0;\n        ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &firstPCMFrameInFLACFrame, &lastPCMFrameInFLACFrame);\n        pcmFrameCountInThisFLACFrame = (lastPCMFrameInFLACFrame - firstPCMFrameInFLACFrame) + 1;\n        if (pcmFrameIndex < (runningPCMFrameCount + pcmFrameCountInThisFLACFrame)) {\n            ma_uint64 pcmFramesToDecode = pcmFrameIndex - runningPCMFrameCount;\n            if (!isMidFrame) {\n                ma_result result = ma_dr_flac__decode_flac_frame(pFlac);\n                if (result == MA_SUCCESS) {\n                    return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode;\n                } else {\n                    if (result == MA_CRC_MISMATCH) {\n                        goto next_iteration;\n                    } else {\n                        return MA_FALSE;\n                    }\n                }\n            } else {\n                return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode;\n            }\n        } else {\n            if (!isMidFrame) {\n                ma_result result = ma_dr_flac__seek_to_next_flac_frame(pFlac);\n                if (result == MA_SUCCESS) {\n                    runningPCMFrameCount += pcmFrameCountInThisFLACFrame;\n                } else {\n                    if (result == MA_CRC_MISMATCH) {\n                        goto next_iteration;\n                    } else {\n                        return MA_FALSE;\n                    }\n                }\n            } else {\n                runningPCMFrameCount += pFlac->currentFLACFrame.pcmFramesRemaining;\n                pFlac->currentFLACFrame.pcmFramesRemaining = 0;\n                isMidFrame = MA_FALSE;\n            }\n            if (pcmFrameIndex == pFlac->totalPCMFrameCount && runningPCMFrameCount == pFlac->totalPCMFrameCount) {\n                return MA_TRUE;\n            }\n        }\n    next_iteration:\n        if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) {\n            return MA_FALSE;\n        }\n    }\n}\n#ifndef MA_DR_FLAC_NO_OGG\ntypedef struct\n{\n    ma_uint8 capturePattern[4];\n    ma_uint8 structureVersion;\n    ma_uint8 headerType;\n    ma_uint64 granulePosition;\n    ma_uint32 serialNumber;\n    ma_uint32 sequenceNumber;\n    ma_uint32 checksum;\n    ma_uint8 segmentCount;\n    ma_uint8 segmentTable[255];\n} ma_dr_flac_ogg_page_header;\n#endif\ntypedef struct\n{\n    ma_dr_flac_read_proc onRead;\n    ma_dr_flac_seek_proc onSeek;\n    ma_dr_flac_meta_proc onMeta;\n    ma_dr_flac_container container;\n    void* pUserData;\n    void* pUserDataMD;\n    ma_uint32 sampleRate;\n    ma_uint8  channels;\n    ma_uint8  bitsPerSample;\n    ma_uint64 totalPCMFrameCount;\n    ma_uint16 maxBlockSizeInPCMFrames;\n    ma_uint64 runningFilePos;\n    ma_bool32 hasStreamInfoBlock;\n    ma_bool32 hasMetadataBlocks;\n    ma_dr_flac_bs bs;\n    ma_dr_flac_frame_header firstFrameHeader;\n#ifndef MA_DR_FLAC_NO_OGG\n    ma_uint32 oggSerial;\n    ma_uint64 oggFirstBytePos;\n    ma_dr_flac_ogg_page_header oggBosHeader;\n#endif\n} ma_dr_flac_init_info;\nstatic MA_INLINE void ma_dr_flac__decode_block_header(ma_uint32 blockHeader, ma_uint8* isLastBlock, ma_uint8* blockType, ma_uint32* blockSize)\n{\n    blockHeader = ma_dr_flac__be2host_32(blockHeader);\n    *isLastBlock = (ma_uint8)((blockHeader & 0x80000000UL) >> 31);\n    *blockType   = (ma_uint8)((blockHeader & 0x7F000000UL) >> 24);\n    *blockSize   =                (blockHeader & 0x00FFFFFFUL);\n}\nstatic MA_INLINE ma_bool32 ma_dr_flac__read_and_decode_block_header(ma_dr_flac_read_proc onRead, void* pUserData, ma_uint8* isLastBlock, ma_uint8* blockType, ma_uint32* blockSize)\n{\n    ma_uint32 blockHeader;\n    *blockSize = 0;\n    if (onRead(pUserData, &blockHeader, 4) != 4) {\n        return MA_FALSE;\n    }\n    ma_dr_flac__decode_block_header(blockHeader, isLastBlock, blockType, blockSize);\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__read_streaminfo(ma_dr_flac_read_proc onRead, void* pUserData, ma_dr_flac_streaminfo* pStreamInfo)\n{\n    ma_uint32 blockSizes;\n    ma_uint64 frameSizes = 0;\n    ma_uint64 importantProps;\n    ma_uint8 md5[16];\n    if (onRead(pUserData, &blockSizes, 4) != 4) {\n        return MA_FALSE;\n    }\n    if (onRead(pUserData, &frameSizes, 6) != 6) {\n        return MA_FALSE;\n    }\n    if (onRead(pUserData, &importantProps, 8) != 8) {\n        return MA_FALSE;\n    }\n    if (onRead(pUserData, md5, sizeof(md5)) != sizeof(md5)) {\n        return MA_FALSE;\n    }\n    blockSizes     = ma_dr_flac__be2host_32(blockSizes);\n    frameSizes     = ma_dr_flac__be2host_64(frameSizes);\n    importantProps = ma_dr_flac__be2host_64(importantProps);\n    pStreamInfo->minBlockSizeInPCMFrames = (ma_uint16)((blockSizes & 0xFFFF0000) >> 16);\n    pStreamInfo->maxBlockSizeInPCMFrames = (ma_uint16) (blockSizes & 0x0000FFFF);\n    pStreamInfo->minFrameSizeInPCMFrames = (ma_uint32)((frameSizes     &  (((ma_uint64)0x00FFFFFF << 16) << 24)) >> 40);\n    pStreamInfo->maxFrameSizeInPCMFrames = (ma_uint32)((frameSizes     &  (((ma_uint64)0x00FFFFFF << 16) <<  0)) >> 16);\n    pStreamInfo->sampleRate              = (ma_uint32)((importantProps &  (((ma_uint64)0x000FFFFF << 16) << 28)) >> 44);\n    pStreamInfo->channels                = (ma_uint8 )((importantProps &  (((ma_uint64)0x0000000E << 16) << 24)) >> 41) + 1;\n    pStreamInfo->bitsPerSample           = (ma_uint8 )((importantProps &  (((ma_uint64)0x0000001F << 16) << 20)) >> 36) + 1;\n    pStreamInfo->totalPCMFrameCount      =                ((importantProps & ((((ma_uint64)0x0000000F << 16) << 16) | 0xFFFFFFFF)));\n    MA_DR_FLAC_COPY_MEMORY(pStreamInfo->md5, md5, sizeof(md5));\n    return MA_TRUE;\n}\nstatic void* ma_dr_flac__malloc_default(size_t sz, void* pUserData)\n{\n    (void)pUserData;\n    return MA_DR_FLAC_MALLOC(sz);\n}\nstatic void* ma_dr_flac__realloc_default(void* p, size_t sz, void* pUserData)\n{\n    (void)pUserData;\n    return MA_DR_FLAC_REALLOC(p, sz);\n}\nstatic void ma_dr_flac__free_default(void* p, void* pUserData)\n{\n    (void)pUserData;\n    MA_DR_FLAC_FREE(p);\n}\nstatic void* ma_dr_flac__malloc_from_callbacks(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks == NULL) {\n        return NULL;\n    }\n    if (pAllocationCallbacks->onMalloc != NULL) {\n        return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData);\n    }\n    if (pAllocationCallbacks->onRealloc != NULL) {\n        return pAllocationCallbacks->onRealloc(NULL, sz, pAllocationCallbacks->pUserData);\n    }\n    return NULL;\n}\nstatic void* ma_dr_flac__realloc_from_callbacks(void* p, size_t szNew, size_t szOld, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks == NULL) {\n        return NULL;\n    }\n    if (pAllocationCallbacks->onRealloc != NULL) {\n        return pAllocationCallbacks->onRealloc(p, szNew, pAllocationCallbacks->pUserData);\n    }\n    if (pAllocationCallbacks->onMalloc != NULL && pAllocationCallbacks->onFree != NULL) {\n        void* p2;\n        p2 = pAllocationCallbacks->onMalloc(szNew, pAllocationCallbacks->pUserData);\n        if (p2 == NULL) {\n            return NULL;\n        }\n        if (p != NULL) {\n            MA_DR_FLAC_COPY_MEMORY(p2, p, szOld);\n            pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData);\n        }\n        return p2;\n    }\n    return NULL;\n}\nstatic void ma_dr_flac__free_from_callbacks(void* p, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (p == NULL || pAllocationCallbacks == NULL) {\n        return;\n    }\n    if (pAllocationCallbacks->onFree != NULL) {\n        pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData);\n    }\n}\nstatic ma_bool32 ma_dr_flac__read_and_decode_metadata(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, void* pUserDataMD, ma_uint64* pFirstFramePos, ma_uint64* pSeektablePos, ma_uint32* pSeekpointCount, ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_uint64 runningFilePos = 42;\n    ma_uint64 seektablePos   = 0;\n    ma_uint32 seektableSize  = 0;\n    for (;;) {\n        ma_dr_flac_metadata metadata;\n        ma_uint8 isLastBlock = 0;\n        ma_uint8 blockType = 0;\n        ma_uint32 blockSize;\n        if (ma_dr_flac__read_and_decode_block_header(onRead, pUserData, &isLastBlock, &blockType, &blockSize) == MA_FALSE) {\n            return MA_FALSE;\n        }\n        runningFilePos += 4;\n        metadata.type = blockType;\n        metadata.pRawData = NULL;\n        metadata.rawDataSize = 0;\n        switch (blockType)\n        {\n            case MA_DR_FLAC_METADATA_BLOCK_TYPE_APPLICATION:\n            {\n                if (blockSize < 4) {\n                    return MA_FALSE;\n                }\n                if (onMeta) {\n                    void* pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks);\n                    if (pRawData == NULL) {\n                        return MA_FALSE;\n                    }\n                    if (onRead(pUserData, pRawData, blockSize) != blockSize) {\n                        ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                        return MA_FALSE;\n                    }\n                    metadata.pRawData = pRawData;\n                    metadata.rawDataSize = blockSize;\n                    metadata.data.application.id       = ma_dr_flac__be2host_32(*(ma_uint32*)pRawData);\n                    metadata.data.application.pData    = (const void*)((ma_uint8*)pRawData + sizeof(ma_uint32));\n                    metadata.data.application.dataSize = blockSize - sizeof(ma_uint32);\n                    onMeta(pUserDataMD, &metadata);\n                    ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                }\n            } break;\n            case MA_DR_FLAC_METADATA_BLOCK_TYPE_SEEKTABLE:\n            {\n                seektablePos  = runningFilePos;\n                seektableSize = blockSize;\n                if (onMeta) {\n                    ma_uint32 seekpointCount;\n                    ma_uint32 iSeekpoint;\n                    void* pRawData;\n                    seekpointCount = blockSize/MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES;\n                    pRawData = ma_dr_flac__malloc_from_callbacks(seekpointCount * sizeof(ma_dr_flac_seekpoint), pAllocationCallbacks);\n                    if (pRawData == NULL) {\n                        return MA_FALSE;\n                    }\n                    for (iSeekpoint = 0; iSeekpoint < seekpointCount; ++iSeekpoint) {\n                        ma_dr_flac_seekpoint* pSeekpoint = (ma_dr_flac_seekpoint*)pRawData + iSeekpoint;\n                        if (onRead(pUserData, pSeekpoint, MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES) != MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES) {\n                            ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                            return MA_FALSE;\n                        }\n                        pSeekpoint->firstPCMFrame   = ma_dr_flac__be2host_64(pSeekpoint->firstPCMFrame);\n                        pSeekpoint->flacFrameOffset = ma_dr_flac__be2host_64(pSeekpoint->flacFrameOffset);\n                        pSeekpoint->pcmFrameCount   = ma_dr_flac__be2host_16(pSeekpoint->pcmFrameCount);\n                    }\n                    metadata.pRawData = pRawData;\n                    metadata.rawDataSize = blockSize;\n                    metadata.data.seektable.seekpointCount = seekpointCount;\n                    metadata.data.seektable.pSeekpoints = (const ma_dr_flac_seekpoint*)pRawData;\n                    onMeta(pUserDataMD, &metadata);\n                    ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                }\n            } break;\n            case MA_DR_FLAC_METADATA_BLOCK_TYPE_VORBIS_COMMENT:\n            {\n                if (blockSize < 8) {\n                    return MA_FALSE;\n                }\n                if (onMeta) {\n                    void* pRawData;\n                    const char* pRunningData;\n                    const char* pRunningDataEnd;\n                    ma_uint32 i;\n                    pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks);\n                    if (pRawData == NULL) {\n                        return MA_FALSE;\n                    }\n                    if (onRead(pUserData, pRawData, blockSize) != blockSize) {\n                        ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                        return MA_FALSE;\n                    }\n                    metadata.pRawData = pRawData;\n                    metadata.rawDataSize = blockSize;\n                    pRunningData    = (const char*)pRawData;\n                    pRunningDataEnd = (const char*)pRawData + blockSize;\n                    metadata.data.vorbis_comment.vendorLength = ma_dr_flac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n                    if ((pRunningDataEnd - pRunningData) - 4 < (ma_int64)metadata.data.vorbis_comment.vendorLength) {\n                        ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                        return MA_FALSE;\n                    }\n                    metadata.data.vorbis_comment.vendor       = pRunningData;                                            pRunningData += metadata.data.vorbis_comment.vendorLength;\n                    metadata.data.vorbis_comment.commentCount = ma_dr_flac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n                    if ((pRunningDataEnd - pRunningData) / sizeof(ma_uint32) < metadata.data.vorbis_comment.commentCount) {\n                        ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                        return MA_FALSE;\n                    }\n                    metadata.data.vorbis_comment.pComments    = pRunningData;\n                    for (i = 0; i < metadata.data.vorbis_comment.commentCount; ++i) {\n                        ma_uint32 commentLength;\n                        if (pRunningDataEnd - pRunningData < 4) {\n                            ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                            return MA_FALSE;\n                        }\n                        commentLength = ma_dr_flac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n                        if (pRunningDataEnd - pRunningData < (ma_int64)commentLength) {\n                            ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                            return MA_FALSE;\n                        }\n                        pRunningData += commentLength;\n                    }\n                    onMeta(pUserDataMD, &metadata);\n                    ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                }\n            } break;\n            case MA_DR_FLAC_METADATA_BLOCK_TYPE_CUESHEET:\n            {\n                if (blockSize < 396) {\n                    return MA_FALSE;\n                }\n                if (onMeta) {\n                    void* pRawData;\n                    const char* pRunningData;\n                    const char* pRunningDataEnd;\n                    size_t bufferSize;\n                    ma_uint8 iTrack;\n                    ma_uint8 iIndex;\n                    void* pTrackData;\n                    pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks);\n                    if (pRawData == NULL) {\n                        return MA_FALSE;\n                    }\n                    if (onRead(pUserData, pRawData, blockSize) != blockSize) {\n                        ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                        return MA_FALSE;\n                    }\n                    metadata.pRawData = pRawData;\n                    metadata.rawDataSize = blockSize;\n                    pRunningData    = (const char*)pRawData;\n                    pRunningDataEnd = (const char*)pRawData + blockSize;\n                    MA_DR_FLAC_COPY_MEMORY(metadata.data.cuesheet.catalog, pRunningData, 128);                              pRunningData += 128;\n                    metadata.data.cuesheet.leadInSampleCount = ma_dr_flac__be2host_64(*(const ma_uint64*)pRunningData); pRunningData += 8;\n                    metadata.data.cuesheet.isCD              = (pRunningData[0] & 0x80) != 0;                           pRunningData += 259;\n                    metadata.data.cuesheet.trackCount        = pRunningData[0];                                         pRunningData += 1;\n                    metadata.data.cuesheet.pTrackData        = NULL;\n                    {\n                        const char* pRunningDataSaved = pRunningData;\n                        bufferSize = metadata.data.cuesheet.trackCount * MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES;\n                        for (iTrack = 0; iTrack < metadata.data.cuesheet.trackCount; ++iTrack) {\n                            ma_uint8 indexCount;\n                            ma_uint32 indexPointSize;\n                            if (pRunningDataEnd - pRunningData < MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES) {\n                                ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                                return MA_FALSE;\n                            }\n                            pRunningData += 35;\n                            indexCount = pRunningData[0];\n                            pRunningData += 1;\n                            bufferSize += indexCount * sizeof(ma_dr_flac_cuesheet_track_index);\n                            indexPointSize = indexCount * MA_DR_FLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES;\n                            if (pRunningDataEnd - pRunningData < (ma_int64)indexPointSize) {\n                                ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                                return MA_FALSE;\n                            }\n                            pRunningData += indexPointSize;\n                        }\n                        pRunningData = pRunningDataSaved;\n                    }\n                    {\n                        char* pRunningTrackData;\n                        pTrackData = ma_dr_flac__malloc_from_callbacks(bufferSize, pAllocationCallbacks);\n                        if (pTrackData == NULL) {\n                            ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                            return MA_FALSE;\n                        }\n                        pRunningTrackData = (char*)pTrackData;\n                        for (iTrack = 0; iTrack < metadata.data.cuesheet.trackCount; ++iTrack) {\n                            ma_uint8 indexCount;\n                            MA_DR_FLAC_COPY_MEMORY(pRunningTrackData, pRunningData, MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES);\n                            pRunningData      += MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES-1;\n                            pRunningTrackData += MA_DR_FLAC_CUESHEET_TRACK_SIZE_IN_BYTES-1;\n                            indexCount = pRunningData[0];\n                            pRunningData      += 1;\n                            pRunningTrackData += 1;\n                            for (iIndex = 0; iIndex < indexCount; ++iIndex) {\n                                ma_dr_flac_cuesheet_track_index* pTrackIndex = (ma_dr_flac_cuesheet_track_index*)pRunningTrackData;\n                                MA_DR_FLAC_COPY_MEMORY(pRunningTrackData, pRunningData, MA_DR_FLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES);\n                                pRunningData      += MA_DR_FLAC_CUESHEET_TRACK_INDEX_SIZE_IN_BYTES;\n                                pRunningTrackData += sizeof(ma_dr_flac_cuesheet_track_index);\n                                pTrackIndex->offset = ma_dr_flac__be2host_64(pTrackIndex->offset);\n                            }\n                        }\n                        metadata.data.cuesheet.pTrackData = pTrackData;\n                    }\n                    ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                    pRawData = NULL;\n                    onMeta(pUserDataMD, &metadata);\n                    ma_dr_flac__free_from_callbacks(pTrackData, pAllocationCallbacks);\n                    pTrackData = NULL;\n                }\n            } break;\n            case MA_DR_FLAC_METADATA_BLOCK_TYPE_PICTURE:\n            {\n                if (blockSize < 32) {\n                    return MA_FALSE;\n                }\n                if (onMeta) {\n                    void* pRawData;\n                    const char* pRunningData;\n                    const char* pRunningDataEnd;\n                    pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks);\n                    if (pRawData == NULL) {\n                        return MA_FALSE;\n                    }\n                    if (onRead(pUserData, pRawData, blockSize) != blockSize) {\n                        ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                        return MA_FALSE;\n                    }\n                    metadata.pRawData = pRawData;\n                    metadata.rawDataSize = blockSize;\n                    pRunningData    = (const char*)pRawData;\n                    pRunningDataEnd = (const char*)pRawData + blockSize;\n                    metadata.data.picture.type       = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n                    metadata.data.picture.mimeLength = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n                    if ((pRunningDataEnd - pRunningData) - 24 < (ma_int64)metadata.data.picture.mimeLength) {\n                        ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                        return MA_FALSE;\n                    }\n                    metadata.data.picture.mime              = pRunningData;                                   pRunningData += metadata.data.picture.mimeLength;\n                    metadata.data.picture.descriptionLength = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n                    if ((pRunningDataEnd - pRunningData) - 20 < (ma_int64)metadata.data.picture.descriptionLength) {\n                        ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                        return MA_FALSE;\n                    }\n                    metadata.data.picture.description     = pRunningData;                                   pRunningData += metadata.data.picture.descriptionLength;\n                    metadata.data.picture.width           = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n                    metadata.data.picture.height          = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n                    metadata.data.picture.colorDepth      = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n                    metadata.data.picture.indexColorCount = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n                    metadata.data.picture.pictureDataSize = ma_dr_flac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;\n                    metadata.data.picture.pPictureData    = (const ma_uint8*)pRunningData;\n                    if (pRunningDataEnd - pRunningData < (ma_int64)metadata.data.picture.pictureDataSize) {\n                        ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                        return MA_FALSE;\n                    }\n                    onMeta(pUserDataMD, &metadata);\n                    ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                }\n            } break;\n            case MA_DR_FLAC_METADATA_BLOCK_TYPE_PADDING:\n            {\n                if (onMeta) {\n                    metadata.data.padding.unused = 0;\n                    if (!onSeek(pUserData, blockSize, ma_dr_flac_seek_origin_current)) {\n                        isLastBlock = MA_TRUE;\n                    } else {\n                        onMeta(pUserDataMD, &metadata);\n                    }\n                }\n            } break;\n            case MA_DR_FLAC_METADATA_BLOCK_TYPE_INVALID:\n            {\n                if (onMeta) {\n                    if (!onSeek(pUserData, blockSize, ma_dr_flac_seek_origin_current)) {\n                        isLastBlock = MA_TRUE;\n                    }\n                }\n            } break;\n            default:\n            {\n                if (onMeta) {\n                    void* pRawData = ma_dr_flac__malloc_from_callbacks(blockSize, pAllocationCallbacks);\n                    if (pRawData == NULL) {\n                        return MA_FALSE;\n                    }\n                    if (onRead(pUserData, pRawData, blockSize) != blockSize) {\n                        ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                        return MA_FALSE;\n                    }\n                    metadata.pRawData = pRawData;\n                    metadata.rawDataSize = blockSize;\n                    onMeta(pUserDataMD, &metadata);\n                    ma_dr_flac__free_from_callbacks(pRawData, pAllocationCallbacks);\n                }\n            } break;\n        }\n        if (onMeta == NULL && blockSize > 0) {\n            if (!onSeek(pUserData, blockSize, ma_dr_flac_seek_origin_current)) {\n                isLastBlock = MA_TRUE;\n            }\n        }\n        runningFilePos += blockSize;\n        if (isLastBlock) {\n            break;\n        }\n    }\n    *pSeektablePos   = seektablePos;\n    *pSeekpointCount = seektableSize / MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES;\n    *pFirstFramePos  = runningFilePos;\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac__init_private__native(ma_dr_flac_init_info* pInit, ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, void* pUserDataMD, ma_bool32 relaxed)\n{\n    ma_uint8 isLastBlock;\n    ma_uint8 blockType;\n    ma_uint32 blockSize;\n    (void)onSeek;\n    pInit->container = ma_dr_flac_container_native;\n    if (!ma_dr_flac__read_and_decode_block_header(onRead, pUserData, &isLastBlock, &blockType, &blockSize)) {\n        return MA_FALSE;\n    }\n    if (blockType != MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO || blockSize != 34) {\n        if (!relaxed) {\n            return MA_FALSE;\n        } else {\n            pInit->hasStreamInfoBlock = MA_FALSE;\n            pInit->hasMetadataBlocks  = MA_FALSE;\n            if (!ma_dr_flac__read_next_flac_frame_header(&pInit->bs, 0, &pInit->firstFrameHeader)) {\n                return MA_FALSE;\n            }\n            if (pInit->firstFrameHeader.bitsPerSample == 0) {\n                return MA_FALSE;\n            }\n            pInit->sampleRate              = pInit->firstFrameHeader.sampleRate;\n            pInit->channels                = ma_dr_flac__get_channel_count_from_channel_assignment(pInit->firstFrameHeader.channelAssignment);\n            pInit->bitsPerSample           = pInit->firstFrameHeader.bitsPerSample;\n            pInit->maxBlockSizeInPCMFrames = 65535;\n            return MA_TRUE;\n        }\n    } else {\n        ma_dr_flac_streaminfo streaminfo;\n        if (!ma_dr_flac__read_streaminfo(onRead, pUserData, &streaminfo)) {\n            return MA_FALSE;\n        }\n        pInit->hasStreamInfoBlock      = MA_TRUE;\n        pInit->sampleRate              = streaminfo.sampleRate;\n        pInit->channels                = streaminfo.channels;\n        pInit->bitsPerSample           = streaminfo.bitsPerSample;\n        pInit->totalPCMFrameCount      = streaminfo.totalPCMFrameCount;\n        pInit->maxBlockSizeInPCMFrames = streaminfo.maxBlockSizeInPCMFrames;\n        pInit->hasMetadataBlocks       = !isLastBlock;\n        if (onMeta) {\n            ma_dr_flac_metadata metadata;\n            metadata.type = MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO;\n            metadata.pRawData = NULL;\n            metadata.rawDataSize = 0;\n            metadata.data.streaminfo = streaminfo;\n            onMeta(pUserDataMD, &metadata);\n        }\n        return MA_TRUE;\n    }\n}\n#ifndef MA_DR_FLAC_NO_OGG\n#define MA_DR_FLAC_OGG_MAX_PAGE_SIZE            65307\n#define MA_DR_FLAC_OGG_CAPTURE_PATTERN_CRC32    1605413199\ntypedef enum\n{\n    ma_dr_flac_ogg_recover_on_crc_mismatch,\n    ma_dr_flac_ogg_fail_on_crc_mismatch\n} ma_dr_flac_ogg_crc_mismatch_recovery;\n#ifndef MA_DR_FLAC_NO_CRC\nstatic ma_uint32 ma_dr_flac__crc32_table[] = {\n    0x00000000L, 0x04C11DB7L, 0x09823B6EL, 0x0D4326D9L,\n    0x130476DCL, 0x17C56B6BL, 0x1A864DB2L, 0x1E475005L,\n    0x2608EDB8L, 0x22C9F00FL, 0x2F8AD6D6L, 0x2B4BCB61L,\n    0x350C9B64L, 0x31CD86D3L, 0x3C8EA00AL, 0x384FBDBDL,\n    0x4C11DB70L, 0x48D0C6C7L, 0x4593E01EL, 0x4152FDA9L,\n    0x5F15ADACL, 0x5BD4B01BL, 0x569796C2L, 0x52568B75L,\n    0x6A1936C8L, 0x6ED82B7FL, 0x639B0DA6L, 0x675A1011L,\n    0x791D4014L, 0x7DDC5DA3L, 0x709F7B7AL, 0x745E66CDL,\n    0x9823B6E0L, 0x9CE2AB57L, 0x91A18D8EL, 0x95609039L,\n    0x8B27C03CL, 0x8FE6DD8BL, 0x82A5FB52L, 0x8664E6E5L,\n    0xBE2B5B58L, 0xBAEA46EFL, 0xB7A96036L, 0xB3687D81L,\n    0xAD2F2D84L, 0xA9EE3033L, 0xA4AD16EAL, 0xA06C0B5DL,\n    0xD4326D90L, 0xD0F37027L, 0xDDB056FEL, 0xD9714B49L,\n    0xC7361B4CL, 0xC3F706FBL, 0xCEB42022L, 0xCA753D95L,\n    0xF23A8028L, 0xF6FB9D9FL, 0xFBB8BB46L, 0xFF79A6F1L,\n    0xE13EF6F4L, 0xE5FFEB43L, 0xE8BCCD9AL, 0xEC7DD02DL,\n    0x34867077L, 0x30476DC0L, 0x3D044B19L, 0x39C556AEL,\n    0x278206ABL, 0x23431B1CL, 0x2E003DC5L, 0x2AC12072L,\n    0x128E9DCFL, 0x164F8078L, 0x1B0CA6A1L, 0x1FCDBB16L,\n    0x018AEB13L, 0x054BF6A4L, 0x0808D07DL, 0x0CC9CDCAL,\n    0x7897AB07L, 0x7C56B6B0L, 0x71159069L, 0x75D48DDEL,\n    0x6B93DDDBL, 0x6F52C06CL, 0x6211E6B5L, 0x66D0FB02L,\n    0x5E9F46BFL, 0x5A5E5B08L, 0x571D7DD1L, 0x53DC6066L,\n    0x4D9B3063L, 0x495A2DD4L, 0x44190B0DL, 0x40D816BAL,\n    0xACA5C697L, 0xA864DB20L, 0xA527FDF9L, 0xA1E6E04EL,\n    0xBFA1B04BL, 0xBB60ADFCL, 0xB6238B25L, 0xB2E29692L,\n    0x8AAD2B2FL, 0x8E6C3698L, 0x832F1041L, 0x87EE0DF6L,\n    0x99A95DF3L, 0x9D684044L, 0x902B669DL, 0x94EA7B2AL,\n    0xE0B41DE7L, 0xE4750050L, 0xE9362689L, 0xEDF73B3EL,\n    0xF3B06B3BL, 0xF771768CL, 0xFA325055L, 0xFEF34DE2L,\n    0xC6BCF05FL, 0xC27DEDE8L, 0xCF3ECB31L, 0xCBFFD686L,\n    0xD5B88683L, 0xD1799B34L, 0xDC3ABDEDL, 0xD8FBA05AL,\n    0x690CE0EEL, 0x6DCDFD59L, 0x608EDB80L, 0x644FC637L,\n    0x7A089632L, 0x7EC98B85L, 0x738AAD5CL, 0x774BB0EBL,\n    0x4F040D56L, 0x4BC510E1L, 0x46863638L, 0x42472B8FL,\n    0x5C007B8AL, 0x58C1663DL, 0x558240E4L, 0x51435D53L,\n    0x251D3B9EL, 0x21DC2629L, 0x2C9F00F0L, 0x285E1D47L,\n    0x36194D42L, 0x32D850F5L, 0x3F9B762CL, 0x3B5A6B9BL,\n    0x0315D626L, 0x07D4CB91L, 0x0A97ED48L, 0x0E56F0FFL,\n    0x1011A0FAL, 0x14D0BD4DL, 0x19939B94L, 0x1D528623L,\n    0xF12F560EL, 0xF5EE4BB9L, 0xF8AD6D60L, 0xFC6C70D7L,\n    0xE22B20D2L, 0xE6EA3D65L, 0xEBA91BBCL, 0xEF68060BL,\n    0xD727BBB6L, 0xD3E6A601L, 0xDEA580D8L, 0xDA649D6FL,\n    0xC423CD6AL, 0xC0E2D0DDL, 0xCDA1F604L, 0xC960EBB3L,\n    0xBD3E8D7EL, 0xB9FF90C9L, 0xB4BCB610L, 0xB07DABA7L,\n    0xAE3AFBA2L, 0xAAFBE615L, 0xA7B8C0CCL, 0xA379DD7BL,\n    0x9B3660C6L, 0x9FF77D71L, 0x92B45BA8L, 0x9675461FL,\n    0x8832161AL, 0x8CF30BADL, 0x81B02D74L, 0x857130C3L,\n    0x5D8A9099L, 0x594B8D2EL, 0x5408ABF7L, 0x50C9B640L,\n    0x4E8EE645L, 0x4A4FFBF2L, 0x470CDD2BL, 0x43CDC09CL,\n    0x7B827D21L, 0x7F436096L, 0x7200464FL, 0x76C15BF8L,\n    0x68860BFDL, 0x6C47164AL, 0x61043093L, 0x65C52D24L,\n    0x119B4BE9L, 0x155A565EL, 0x18197087L, 0x1CD86D30L,\n    0x029F3D35L, 0x065E2082L, 0x0B1D065BL, 0x0FDC1BECL,\n    0x3793A651L, 0x3352BBE6L, 0x3E119D3FL, 0x3AD08088L,\n    0x2497D08DL, 0x2056CD3AL, 0x2D15EBE3L, 0x29D4F654L,\n    0xC5A92679L, 0xC1683BCEL, 0xCC2B1D17L, 0xC8EA00A0L,\n    0xD6AD50A5L, 0xD26C4D12L, 0xDF2F6BCBL, 0xDBEE767CL,\n    0xE3A1CBC1L, 0xE760D676L, 0xEA23F0AFL, 0xEEE2ED18L,\n    0xF0A5BD1DL, 0xF464A0AAL, 0xF9278673L, 0xFDE69BC4L,\n    0x89B8FD09L, 0x8D79E0BEL, 0x803AC667L, 0x84FBDBD0L,\n    0x9ABC8BD5L, 0x9E7D9662L, 0x933EB0BBL, 0x97FFAD0CL,\n    0xAFB010B1L, 0xAB710D06L, 0xA6322BDFL, 0xA2F33668L,\n    0xBCB4666DL, 0xB8757BDAL, 0xB5365D03L, 0xB1F740B4L\n};\n#endif\nstatic MA_INLINE ma_uint32 ma_dr_flac_crc32_byte(ma_uint32 crc32, ma_uint8 data)\n{\n#ifndef MA_DR_FLAC_NO_CRC\n    return (crc32 << 8) ^ ma_dr_flac__crc32_table[(ma_uint8)((crc32 >> 24) & 0xFF) ^ data];\n#else\n    (void)data;\n    return crc32;\n#endif\n}\n#if 0\nstatic MA_INLINE ma_uint32 ma_dr_flac_crc32_uint32(ma_uint32 crc32, ma_uint32 data)\n{\n    crc32 = ma_dr_flac_crc32_byte(crc32, (ma_uint8)((data >> 24) & 0xFF));\n    crc32 = ma_dr_flac_crc32_byte(crc32, (ma_uint8)((data >> 16) & 0xFF));\n    crc32 = ma_dr_flac_crc32_byte(crc32, (ma_uint8)((data >>  8) & 0xFF));\n    crc32 = ma_dr_flac_crc32_byte(crc32, (ma_uint8)((data >>  0) & 0xFF));\n    return crc32;\n}\nstatic MA_INLINE ma_uint32 ma_dr_flac_crc32_uint64(ma_uint32 crc32, ma_uint64 data)\n{\n    crc32 = ma_dr_flac_crc32_uint32(crc32, (ma_uint32)((data >> 32) & 0xFFFFFFFF));\n    crc32 = ma_dr_flac_crc32_uint32(crc32, (ma_uint32)((data >>  0) & 0xFFFFFFFF));\n    return crc32;\n}\n#endif\nstatic MA_INLINE ma_uint32 ma_dr_flac_crc32_buffer(ma_uint32 crc32, ma_uint8* pData, ma_uint32 dataSize)\n{\n    ma_uint32 i;\n    for (i = 0; i < dataSize; ++i) {\n        crc32 = ma_dr_flac_crc32_byte(crc32, pData[i]);\n    }\n    return crc32;\n}\nstatic MA_INLINE ma_bool32 ma_dr_flac_ogg__is_capture_pattern(ma_uint8 pattern[4])\n{\n    return pattern[0] == 'O' && pattern[1] == 'g' && pattern[2] == 'g' && pattern[3] == 'S';\n}\nstatic MA_INLINE ma_uint32 ma_dr_flac_ogg__get_page_header_size(ma_dr_flac_ogg_page_header* pHeader)\n{\n    return 27 + pHeader->segmentCount;\n}\nstatic MA_INLINE ma_uint32 ma_dr_flac_ogg__get_page_body_size(ma_dr_flac_ogg_page_header* pHeader)\n{\n    ma_uint32 pageBodySize = 0;\n    int i;\n    for (i = 0; i < pHeader->segmentCount; ++i) {\n        pageBodySize += pHeader->segmentTable[i];\n    }\n    return pageBodySize;\n}\nstatic ma_result ma_dr_flac_ogg__read_page_header_after_capture_pattern(ma_dr_flac_read_proc onRead, void* pUserData, ma_dr_flac_ogg_page_header* pHeader, ma_uint32* pBytesRead, ma_uint32* pCRC32)\n{\n    ma_uint8 data[23];\n    ma_uint32 i;\n    MA_DR_FLAC_ASSERT(*pCRC32 == MA_DR_FLAC_OGG_CAPTURE_PATTERN_CRC32);\n    if (onRead(pUserData, data, 23) != 23) {\n        return MA_AT_END;\n    }\n    *pBytesRead += 23;\n    pHeader->capturePattern[0] = 'O';\n    pHeader->capturePattern[1] = 'g';\n    pHeader->capturePattern[2] = 'g';\n    pHeader->capturePattern[3] = 'S';\n    pHeader->structureVersion = data[0];\n    pHeader->headerType       = data[1];\n    MA_DR_FLAC_COPY_MEMORY(&pHeader->granulePosition, &data[ 2], 8);\n    MA_DR_FLAC_COPY_MEMORY(&pHeader->serialNumber,    &data[10], 4);\n    MA_DR_FLAC_COPY_MEMORY(&pHeader->sequenceNumber,  &data[14], 4);\n    MA_DR_FLAC_COPY_MEMORY(&pHeader->checksum,        &data[18], 4);\n    pHeader->segmentCount     = data[22];\n    data[18] = 0;\n    data[19] = 0;\n    data[20] = 0;\n    data[21] = 0;\n    for (i = 0; i < 23; ++i) {\n        *pCRC32 = ma_dr_flac_crc32_byte(*pCRC32, data[i]);\n    }\n    if (onRead(pUserData, pHeader->segmentTable, pHeader->segmentCount) != pHeader->segmentCount) {\n        return MA_AT_END;\n    }\n    *pBytesRead += pHeader->segmentCount;\n    for (i = 0; i < pHeader->segmentCount; ++i) {\n        *pCRC32 = ma_dr_flac_crc32_byte(*pCRC32, pHeader->segmentTable[i]);\n    }\n    return MA_SUCCESS;\n}\nstatic ma_result ma_dr_flac_ogg__read_page_header(ma_dr_flac_read_proc onRead, void* pUserData, ma_dr_flac_ogg_page_header* pHeader, ma_uint32* pBytesRead, ma_uint32* pCRC32)\n{\n    ma_uint8 id[4];\n    *pBytesRead = 0;\n    if (onRead(pUserData, id, 4) != 4) {\n        return MA_AT_END;\n    }\n    *pBytesRead += 4;\n    for (;;) {\n        if (ma_dr_flac_ogg__is_capture_pattern(id)) {\n            ma_result result;\n            *pCRC32 = MA_DR_FLAC_OGG_CAPTURE_PATTERN_CRC32;\n            result = ma_dr_flac_ogg__read_page_header_after_capture_pattern(onRead, pUserData, pHeader, pBytesRead, pCRC32);\n            if (result == MA_SUCCESS) {\n                return MA_SUCCESS;\n            } else {\n                if (result == MA_CRC_MISMATCH) {\n                    continue;\n                } else {\n                    return result;\n                }\n            }\n        } else {\n            id[0] = id[1];\n            id[1] = id[2];\n            id[2] = id[3];\n            if (onRead(pUserData, &id[3], 1) != 1) {\n                return MA_AT_END;\n            }\n            *pBytesRead += 1;\n        }\n    }\n}\ntypedef struct\n{\n    ma_dr_flac_read_proc onRead;\n    ma_dr_flac_seek_proc onSeek;\n    void* pUserData;\n    ma_uint64 currentBytePos;\n    ma_uint64 firstBytePos;\n    ma_uint32 serialNumber;\n    ma_dr_flac_ogg_page_header bosPageHeader;\n    ma_dr_flac_ogg_page_header currentPageHeader;\n    ma_uint32 bytesRemainingInPage;\n    ma_uint32 pageDataSize;\n    ma_uint8 pageData[MA_DR_FLAC_OGG_MAX_PAGE_SIZE];\n} ma_dr_flac_oggbs;\nstatic size_t ma_dr_flac_oggbs__read_physical(ma_dr_flac_oggbs* oggbs, void* bufferOut, size_t bytesToRead)\n{\n    size_t bytesActuallyRead = oggbs->onRead(oggbs->pUserData, bufferOut, bytesToRead);\n    oggbs->currentBytePos += bytesActuallyRead;\n    return bytesActuallyRead;\n}\nstatic ma_bool32 ma_dr_flac_oggbs__seek_physical(ma_dr_flac_oggbs* oggbs, ma_uint64 offset, ma_dr_flac_seek_origin origin)\n{\n    if (origin == ma_dr_flac_seek_origin_start) {\n        if (offset <= 0x7FFFFFFF) {\n            if (!oggbs->onSeek(oggbs->pUserData, (int)offset, ma_dr_flac_seek_origin_start)) {\n                return MA_FALSE;\n            }\n            oggbs->currentBytePos = offset;\n            return MA_TRUE;\n        } else {\n            if (!oggbs->onSeek(oggbs->pUserData, 0x7FFFFFFF, ma_dr_flac_seek_origin_start)) {\n                return MA_FALSE;\n            }\n            oggbs->currentBytePos = offset;\n            return ma_dr_flac_oggbs__seek_physical(oggbs, offset - 0x7FFFFFFF, ma_dr_flac_seek_origin_current);\n        }\n    } else {\n        while (offset > 0x7FFFFFFF) {\n            if (!oggbs->onSeek(oggbs->pUserData, 0x7FFFFFFF, ma_dr_flac_seek_origin_current)) {\n                return MA_FALSE;\n            }\n            oggbs->currentBytePos += 0x7FFFFFFF;\n            offset -= 0x7FFFFFFF;\n        }\n        if (!oggbs->onSeek(oggbs->pUserData, (int)offset, ma_dr_flac_seek_origin_current)) {\n            return MA_FALSE;\n        }\n        oggbs->currentBytePos += offset;\n        return MA_TRUE;\n    }\n}\nstatic ma_bool32 ma_dr_flac_oggbs__goto_next_page(ma_dr_flac_oggbs* oggbs, ma_dr_flac_ogg_crc_mismatch_recovery recoveryMethod)\n{\n    ma_dr_flac_ogg_page_header header;\n    for (;;) {\n        ma_uint32 crc32 = 0;\n        ma_uint32 bytesRead;\n        ma_uint32 pageBodySize;\n#ifndef MA_DR_FLAC_NO_CRC\n        ma_uint32 actualCRC32;\n#endif\n        if (ma_dr_flac_ogg__read_page_header(oggbs->onRead, oggbs->pUserData, &header, &bytesRead, &crc32) != MA_SUCCESS) {\n            return MA_FALSE;\n        }\n        oggbs->currentBytePos += bytesRead;\n        pageBodySize = ma_dr_flac_ogg__get_page_body_size(&header);\n        if (pageBodySize > MA_DR_FLAC_OGG_MAX_PAGE_SIZE) {\n            continue;\n        }\n        if (header.serialNumber != oggbs->serialNumber) {\n            if (pageBodySize > 0 && !ma_dr_flac_oggbs__seek_physical(oggbs, pageBodySize, ma_dr_flac_seek_origin_current)) {\n                return MA_FALSE;\n            }\n            continue;\n        }\n        if (ma_dr_flac_oggbs__read_physical(oggbs, oggbs->pageData, pageBodySize) != pageBodySize) {\n            return MA_FALSE;\n        }\n        oggbs->pageDataSize = pageBodySize;\n#ifndef MA_DR_FLAC_NO_CRC\n        actualCRC32 = ma_dr_flac_crc32_buffer(crc32, oggbs->pageData, oggbs->pageDataSize);\n        if (actualCRC32 != header.checksum) {\n            if (recoveryMethod == ma_dr_flac_ogg_recover_on_crc_mismatch) {\n                continue;\n            } else {\n                ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_recover_on_crc_mismatch);\n                return MA_FALSE;\n            }\n        }\n#else\n        (void)recoveryMethod;\n#endif\n        oggbs->currentPageHeader = header;\n        oggbs->bytesRemainingInPage = pageBodySize;\n        return MA_TRUE;\n    }\n}\n#if 0\nstatic ma_uint8 ma_dr_flac_oggbs__get_current_segment_index(ma_dr_flac_oggbs* oggbs, ma_uint8* pBytesRemainingInSeg)\n{\n    ma_uint32 bytesConsumedInPage = ma_dr_flac_ogg__get_page_body_size(&oggbs->currentPageHeader) - oggbs->bytesRemainingInPage;\n    ma_uint8 iSeg = 0;\n    ma_uint32 iByte = 0;\n    while (iByte < bytesConsumedInPage) {\n        ma_uint8 segmentSize = oggbs->currentPageHeader.segmentTable[iSeg];\n        if (iByte + segmentSize > bytesConsumedInPage) {\n            break;\n        } else {\n            iSeg += 1;\n            iByte += segmentSize;\n        }\n    }\n    *pBytesRemainingInSeg = oggbs->currentPageHeader.segmentTable[iSeg] - (ma_uint8)(bytesConsumedInPage - iByte);\n    return iSeg;\n}\nstatic ma_bool32 ma_dr_flac_oggbs__seek_to_next_packet(ma_dr_flac_oggbs* oggbs)\n{\n    for (;;) {\n        ma_bool32 atEndOfPage = MA_FALSE;\n        ma_uint8 bytesRemainingInSeg;\n        ma_uint8 iFirstSeg = ma_dr_flac_oggbs__get_current_segment_index(oggbs, &bytesRemainingInSeg);\n        ma_uint32 bytesToEndOfPacketOrPage = bytesRemainingInSeg;\n        for (ma_uint8 iSeg = iFirstSeg; iSeg < oggbs->currentPageHeader.segmentCount; ++iSeg) {\n            ma_uint8 segmentSize = oggbs->currentPageHeader.segmentTable[iSeg];\n            if (segmentSize < 255) {\n                if (iSeg == oggbs->currentPageHeader.segmentCount-1) {\n                    atEndOfPage = MA_TRUE;\n                }\n                break;\n            }\n            bytesToEndOfPacketOrPage += segmentSize;\n        }\n        ma_dr_flac_oggbs__seek_physical(oggbs, bytesToEndOfPacketOrPage, ma_dr_flac_seek_origin_current);\n        oggbs->bytesRemainingInPage -= bytesToEndOfPacketOrPage;\n        if (atEndOfPage) {\n            if (!ma_dr_flac_oggbs__goto_next_page(oggbs)) {\n                return MA_FALSE;\n            }\n            if ((oggbs->currentPageHeader.headerType & 0x01) == 0) {\n                return MA_TRUE;\n            }\n        } else {\n            return MA_TRUE;\n        }\n    }\n}\nstatic ma_bool32 ma_dr_flac_oggbs__seek_to_next_frame(ma_dr_flac_oggbs* oggbs)\n{\n    return ma_dr_flac_oggbs__seek_to_next_packet(oggbs);\n}\n#endif\nstatic size_t ma_dr_flac__on_read_ogg(void* pUserData, void* bufferOut, size_t bytesToRead)\n{\n    ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pUserData;\n    ma_uint8* pRunningBufferOut = (ma_uint8*)bufferOut;\n    size_t bytesRead = 0;\n    MA_DR_FLAC_ASSERT(oggbs != NULL);\n    MA_DR_FLAC_ASSERT(pRunningBufferOut != NULL);\n    while (bytesRead < bytesToRead) {\n        size_t bytesRemainingToRead = bytesToRead - bytesRead;\n        if (oggbs->bytesRemainingInPage >= bytesRemainingToRead) {\n            MA_DR_FLAC_COPY_MEMORY(pRunningBufferOut, oggbs->pageData + (oggbs->pageDataSize - oggbs->bytesRemainingInPage), bytesRemainingToRead);\n            bytesRead += bytesRemainingToRead;\n            oggbs->bytesRemainingInPage -= (ma_uint32)bytesRemainingToRead;\n            break;\n        }\n        if (oggbs->bytesRemainingInPage > 0) {\n            MA_DR_FLAC_COPY_MEMORY(pRunningBufferOut, oggbs->pageData + (oggbs->pageDataSize - oggbs->bytesRemainingInPage), oggbs->bytesRemainingInPage);\n            bytesRead += oggbs->bytesRemainingInPage;\n            pRunningBufferOut += oggbs->bytesRemainingInPage;\n            oggbs->bytesRemainingInPage = 0;\n        }\n        MA_DR_FLAC_ASSERT(bytesRemainingToRead > 0);\n        if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_recover_on_crc_mismatch)) {\n            break;\n        }\n    }\n    return bytesRead;\n}\nstatic ma_bool32 ma_dr_flac__on_seek_ogg(void* pUserData, int offset, ma_dr_flac_seek_origin origin)\n{\n    ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pUserData;\n    int bytesSeeked = 0;\n    MA_DR_FLAC_ASSERT(oggbs != NULL);\n    MA_DR_FLAC_ASSERT(offset >= 0);\n    if (origin == ma_dr_flac_seek_origin_start) {\n        if (!ma_dr_flac_oggbs__seek_physical(oggbs, (int)oggbs->firstBytePos, ma_dr_flac_seek_origin_start)) {\n            return MA_FALSE;\n        }\n        if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_fail_on_crc_mismatch)) {\n            return MA_FALSE;\n        }\n        return ma_dr_flac__on_seek_ogg(pUserData, offset, ma_dr_flac_seek_origin_current);\n    }\n    MA_DR_FLAC_ASSERT(origin == ma_dr_flac_seek_origin_current);\n    while (bytesSeeked < offset) {\n        int bytesRemainingToSeek = offset - bytesSeeked;\n        MA_DR_FLAC_ASSERT(bytesRemainingToSeek >= 0);\n        if (oggbs->bytesRemainingInPage >= (size_t)bytesRemainingToSeek) {\n            bytesSeeked += bytesRemainingToSeek;\n            (void)bytesSeeked;\n            oggbs->bytesRemainingInPage -= bytesRemainingToSeek;\n            break;\n        }\n        if (oggbs->bytesRemainingInPage > 0) {\n            bytesSeeked += (int)oggbs->bytesRemainingInPage;\n            oggbs->bytesRemainingInPage = 0;\n        }\n        MA_DR_FLAC_ASSERT(bytesRemainingToSeek > 0);\n        if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_fail_on_crc_mismatch)) {\n            return MA_FALSE;\n        }\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_flac_ogg__seek_to_pcm_frame(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex)\n{\n    ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pFlac->_oggbs;\n    ma_uint64 originalBytePos;\n    ma_uint64 runningGranulePosition;\n    ma_uint64 runningFrameBytePos;\n    ma_uint64 runningPCMFrameCount;\n    MA_DR_FLAC_ASSERT(oggbs != NULL);\n    originalBytePos = oggbs->currentBytePos;\n    if (!ma_dr_flac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes)) {\n        return MA_FALSE;\n    }\n    oggbs->bytesRemainingInPage = 0;\n    runningGranulePosition = 0;\n    for (;;) {\n        if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_recover_on_crc_mismatch)) {\n            ma_dr_flac_oggbs__seek_physical(oggbs, originalBytePos, ma_dr_flac_seek_origin_start);\n            return MA_FALSE;\n        }\n        runningFrameBytePos = oggbs->currentBytePos - ma_dr_flac_ogg__get_page_header_size(&oggbs->currentPageHeader) - oggbs->pageDataSize;\n        if (oggbs->currentPageHeader.granulePosition >= pcmFrameIndex) {\n            break;\n        }\n        if ((oggbs->currentPageHeader.headerType & 0x01) == 0) {\n            if (oggbs->currentPageHeader.segmentTable[0] >= 2) {\n                ma_uint8 firstBytesInPage[2];\n                firstBytesInPage[0] = oggbs->pageData[0];\n                firstBytesInPage[1] = oggbs->pageData[1];\n                if ((firstBytesInPage[0] == 0xFF) && (firstBytesInPage[1] & 0xFC) == 0xF8) {\n                    runningGranulePosition = oggbs->currentPageHeader.granulePosition;\n                }\n                continue;\n            }\n        }\n    }\n    if (!ma_dr_flac_oggbs__seek_physical(oggbs, runningFrameBytePos, ma_dr_flac_seek_origin_start)) {\n        return MA_FALSE;\n    }\n    if (!ma_dr_flac_oggbs__goto_next_page(oggbs, ma_dr_flac_ogg_recover_on_crc_mismatch)) {\n        return MA_FALSE;\n    }\n    runningPCMFrameCount = runningGranulePosition;\n    for (;;) {\n        ma_uint64 firstPCMFrameInFLACFrame = 0;\n        ma_uint64 lastPCMFrameInFLACFrame = 0;\n        ma_uint64 pcmFrameCountInThisFrame;\n        if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) {\n            return MA_FALSE;\n        }\n        ma_dr_flac__get_pcm_frame_range_of_current_flac_frame(pFlac, &firstPCMFrameInFLACFrame, &lastPCMFrameInFLACFrame);\n        pcmFrameCountInThisFrame = (lastPCMFrameInFLACFrame - firstPCMFrameInFLACFrame) + 1;\n        if (pcmFrameIndex == pFlac->totalPCMFrameCount && (runningPCMFrameCount + pcmFrameCountInThisFrame) == pFlac->totalPCMFrameCount) {\n            ma_result result = ma_dr_flac__decode_flac_frame(pFlac);\n            if (result == MA_SUCCESS) {\n                pFlac->currentPCMFrame = pcmFrameIndex;\n                pFlac->currentFLACFrame.pcmFramesRemaining = 0;\n                return MA_TRUE;\n            } else {\n                return MA_FALSE;\n            }\n        }\n        if (pcmFrameIndex < (runningPCMFrameCount + pcmFrameCountInThisFrame)) {\n            ma_result result = ma_dr_flac__decode_flac_frame(pFlac);\n            if (result == MA_SUCCESS) {\n                ma_uint64 pcmFramesToDecode = (size_t)(pcmFrameIndex - runningPCMFrameCount);\n                if (pcmFramesToDecode == 0) {\n                    return MA_TRUE;\n                }\n                pFlac->currentPCMFrame = runningPCMFrameCount;\n                return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode;\n            } else {\n                if (result == MA_CRC_MISMATCH) {\n                    continue;\n                } else {\n                    return MA_FALSE;\n                }\n            }\n        } else {\n            ma_result result = ma_dr_flac__seek_to_next_flac_frame(pFlac);\n            if (result == MA_SUCCESS) {\n                runningPCMFrameCount += pcmFrameCountInThisFrame;\n            } else {\n                if (result == MA_CRC_MISMATCH) {\n                    continue;\n                } else {\n                    return MA_FALSE;\n                }\n            }\n        }\n    }\n}\nstatic ma_bool32 ma_dr_flac__init_private__ogg(ma_dr_flac_init_info* pInit, ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, void* pUserDataMD, ma_bool32 relaxed)\n{\n    ma_dr_flac_ogg_page_header header;\n    ma_uint32 crc32 = MA_DR_FLAC_OGG_CAPTURE_PATTERN_CRC32;\n    ma_uint32 bytesRead = 0;\n    (void)relaxed;\n    pInit->container = ma_dr_flac_container_ogg;\n    pInit->oggFirstBytePos = 0;\n    if (ma_dr_flac_ogg__read_page_header_after_capture_pattern(onRead, pUserData, &header, &bytesRead, &crc32) != MA_SUCCESS) {\n        return MA_FALSE;\n    }\n    pInit->runningFilePos += bytesRead;\n    for (;;) {\n        int pageBodySize;\n        if ((header.headerType & 0x02) == 0) {\n            return MA_FALSE;\n        }\n        pageBodySize = ma_dr_flac_ogg__get_page_body_size(&header);\n        if (pageBodySize == 51) {\n            ma_uint32 bytesRemainingInPage = pageBodySize;\n            ma_uint8 packetType;\n            if (onRead(pUserData, &packetType, 1) != 1) {\n                return MA_FALSE;\n            }\n            bytesRemainingInPage -= 1;\n            if (packetType == 0x7F) {\n                ma_uint8 sig[4];\n                if (onRead(pUserData, sig, 4) != 4) {\n                    return MA_FALSE;\n                }\n                bytesRemainingInPage -= 4;\n                if (sig[0] == 'F' && sig[1] == 'L' && sig[2] == 'A' && sig[3] == 'C') {\n                    ma_uint8 mappingVersion[2];\n                    if (onRead(pUserData, mappingVersion, 2) != 2) {\n                        return MA_FALSE;\n                    }\n                    if (mappingVersion[0] != 1) {\n                        return MA_FALSE;\n                    }\n                    if (!onSeek(pUserData, 2, ma_dr_flac_seek_origin_current)) {\n                        return MA_FALSE;\n                    }\n                    if (onRead(pUserData, sig, 4) != 4) {\n                        return MA_FALSE;\n                    }\n                    if (sig[0] == 'f' && sig[1] == 'L' && sig[2] == 'a' && sig[3] == 'C') {\n                        ma_dr_flac_streaminfo streaminfo;\n                        ma_uint8 isLastBlock;\n                        ma_uint8 blockType;\n                        ma_uint32 blockSize;\n                        if (!ma_dr_flac__read_and_decode_block_header(onRead, pUserData, &isLastBlock, &blockType, &blockSize)) {\n                            return MA_FALSE;\n                        }\n                        if (blockType != MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO || blockSize != 34) {\n                            return MA_FALSE;\n                        }\n                        if (ma_dr_flac__read_streaminfo(onRead, pUserData, &streaminfo)) {\n                            pInit->hasStreamInfoBlock      = MA_TRUE;\n                            pInit->sampleRate              = streaminfo.sampleRate;\n                            pInit->channels                = streaminfo.channels;\n                            pInit->bitsPerSample           = streaminfo.bitsPerSample;\n                            pInit->totalPCMFrameCount      = streaminfo.totalPCMFrameCount;\n                            pInit->maxBlockSizeInPCMFrames = streaminfo.maxBlockSizeInPCMFrames;\n                            pInit->hasMetadataBlocks       = !isLastBlock;\n                            if (onMeta) {\n                                ma_dr_flac_metadata metadata;\n                                metadata.type = MA_DR_FLAC_METADATA_BLOCK_TYPE_STREAMINFO;\n                                metadata.pRawData = NULL;\n                                metadata.rawDataSize = 0;\n                                metadata.data.streaminfo = streaminfo;\n                                onMeta(pUserDataMD, &metadata);\n                            }\n                            pInit->runningFilePos  += pageBodySize;\n                            pInit->oggFirstBytePos  = pInit->runningFilePos - 79;\n                            pInit->oggSerial        = header.serialNumber;\n                            pInit->oggBosHeader     = header;\n                            break;\n                        } else {\n                            return MA_FALSE;\n                        }\n                    } else {\n                        return MA_FALSE;\n                    }\n                } else {\n                    if (!onSeek(pUserData, bytesRemainingInPage, ma_dr_flac_seek_origin_current)) {\n                        return MA_FALSE;\n                    }\n                }\n            } else {\n                if (!onSeek(pUserData, bytesRemainingInPage, ma_dr_flac_seek_origin_current)) {\n                    return MA_FALSE;\n                }\n            }\n        } else {\n            if (!onSeek(pUserData, pageBodySize, ma_dr_flac_seek_origin_current)) {\n                return MA_FALSE;\n            }\n        }\n        pInit->runningFilePos += pageBodySize;\n        if (ma_dr_flac_ogg__read_page_header(onRead, pUserData, &header, &bytesRead, &crc32) != MA_SUCCESS) {\n            return MA_FALSE;\n        }\n        pInit->runningFilePos += bytesRead;\n    }\n    pInit->hasMetadataBlocks = MA_TRUE;\n    return MA_TRUE;\n}\n#endif\nstatic ma_bool32 ma_dr_flac__init_private(ma_dr_flac_init_info* pInit, ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, ma_dr_flac_container container, void* pUserData, void* pUserDataMD)\n{\n    ma_bool32 relaxed;\n    ma_uint8 id[4];\n    if (pInit == NULL || onRead == NULL || onSeek == NULL) {\n        return MA_FALSE;\n    }\n    MA_DR_FLAC_ZERO_MEMORY(pInit, sizeof(*pInit));\n    pInit->onRead       = onRead;\n    pInit->onSeek       = onSeek;\n    pInit->onMeta       = onMeta;\n    pInit->container    = container;\n    pInit->pUserData    = pUserData;\n    pInit->pUserDataMD  = pUserDataMD;\n    pInit->bs.onRead    = onRead;\n    pInit->bs.onSeek    = onSeek;\n    pInit->bs.pUserData = pUserData;\n    ma_dr_flac__reset_cache(&pInit->bs);\n    relaxed = container != ma_dr_flac_container_unknown;\n    for (;;) {\n        if (onRead(pUserData, id, 4) != 4) {\n            return MA_FALSE;\n        }\n        pInit->runningFilePos += 4;\n        if (id[0] == 'I' && id[1] == 'D' && id[2] == '3') {\n            ma_uint8 header[6];\n            ma_uint8 flags;\n            ma_uint32 headerSize;\n            if (onRead(pUserData, header, 6) != 6) {\n                return MA_FALSE;\n            }\n            pInit->runningFilePos += 6;\n            flags = header[1];\n            MA_DR_FLAC_COPY_MEMORY(&headerSize, header+2, 4);\n            headerSize = ma_dr_flac__unsynchsafe_32(ma_dr_flac__be2host_32(headerSize));\n            if (flags & 0x10) {\n                headerSize += 10;\n            }\n            if (!onSeek(pUserData, headerSize, ma_dr_flac_seek_origin_current)) {\n                return MA_FALSE;\n            }\n            pInit->runningFilePos += headerSize;\n        } else {\n            break;\n        }\n    }\n    if (id[0] == 'f' && id[1] == 'L' && id[2] == 'a' && id[3] == 'C') {\n        return ma_dr_flac__init_private__native(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed);\n    }\n#ifndef MA_DR_FLAC_NO_OGG\n    if (id[0] == 'O' && id[1] == 'g' && id[2] == 'g' && id[3] == 'S') {\n        return ma_dr_flac__init_private__ogg(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed);\n    }\n#endif\n    if (relaxed) {\n        if (container == ma_dr_flac_container_native) {\n            return ma_dr_flac__init_private__native(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed);\n        }\n#ifndef MA_DR_FLAC_NO_OGG\n        if (container == ma_dr_flac_container_ogg) {\n            return ma_dr_flac__init_private__ogg(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed);\n        }\n#endif\n    }\n    return MA_FALSE;\n}\nstatic void ma_dr_flac__init_from_info(ma_dr_flac* pFlac, const ma_dr_flac_init_info* pInit)\n{\n    MA_DR_FLAC_ASSERT(pFlac != NULL);\n    MA_DR_FLAC_ASSERT(pInit != NULL);\n    MA_DR_FLAC_ZERO_MEMORY(pFlac, sizeof(*pFlac));\n    pFlac->bs                      = pInit->bs;\n    pFlac->onMeta                  = pInit->onMeta;\n    pFlac->pUserDataMD             = pInit->pUserDataMD;\n    pFlac->maxBlockSizeInPCMFrames = pInit->maxBlockSizeInPCMFrames;\n    pFlac->sampleRate              = pInit->sampleRate;\n    pFlac->channels                = (ma_uint8)pInit->channels;\n    pFlac->bitsPerSample           = (ma_uint8)pInit->bitsPerSample;\n    pFlac->totalPCMFrameCount      = pInit->totalPCMFrameCount;\n    pFlac->container               = pInit->container;\n}\nstatic ma_dr_flac* ma_dr_flac_open_with_metadata_private(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, ma_dr_flac_container container, void* pUserData, void* pUserDataMD, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac_init_info init;\n    ma_uint32 allocationSize;\n    ma_uint32 wholeSIMDVectorCountPerChannel;\n    ma_uint32 decodedSamplesAllocationSize;\n#ifndef MA_DR_FLAC_NO_OGG\n    ma_dr_flac_oggbs* pOggbs = NULL;\n#endif\n    ma_uint64 firstFramePos;\n    ma_uint64 seektablePos;\n    ma_uint32 seekpointCount;\n    ma_allocation_callbacks allocationCallbacks;\n    ma_dr_flac* pFlac;\n    ma_dr_flac__init_cpu_caps();\n    if (!ma_dr_flac__init_private(&init, onRead, onSeek, onMeta, container, pUserData, pUserDataMD)) {\n        return NULL;\n    }\n    if (pAllocationCallbacks != NULL) {\n        allocationCallbacks = *pAllocationCallbacks;\n        if (allocationCallbacks.onFree == NULL || (allocationCallbacks.onMalloc == NULL && allocationCallbacks.onRealloc == NULL)) {\n            return NULL;\n        }\n    } else {\n        allocationCallbacks.pUserData = NULL;\n        allocationCallbacks.onMalloc  = ma_dr_flac__malloc_default;\n        allocationCallbacks.onRealloc = ma_dr_flac__realloc_default;\n        allocationCallbacks.onFree    = ma_dr_flac__free_default;\n    }\n    allocationSize = sizeof(ma_dr_flac);\n    if ((init.maxBlockSizeInPCMFrames % (MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE / sizeof(ma_int32))) == 0) {\n        wholeSIMDVectorCountPerChannel = (init.maxBlockSizeInPCMFrames / (MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE / sizeof(ma_int32)));\n    } else {\n        wholeSIMDVectorCountPerChannel = (init.maxBlockSizeInPCMFrames / (MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE / sizeof(ma_int32))) + 1;\n    }\n    decodedSamplesAllocationSize = wholeSIMDVectorCountPerChannel * MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE * init.channels;\n    allocationSize += decodedSamplesAllocationSize;\n    allocationSize += MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE;\n#ifndef MA_DR_FLAC_NO_OGG\n    if (init.container == ma_dr_flac_container_ogg) {\n        allocationSize += sizeof(ma_dr_flac_oggbs);\n        pOggbs = (ma_dr_flac_oggbs*)ma_dr_flac__malloc_from_callbacks(sizeof(*pOggbs), &allocationCallbacks);\n        if (pOggbs == NULL) {\n            return NULL;\n        }\n        MA_DR_FLAC_ZERO_MEMORY(pOggbs, sizeof(*pOggbs));\n        pOggbs->onRead = onRead;\n        pOggbs->onSeek = onSeek;\n        pOggbs->pUserData = pUserData;\n        pOggbs->currentBytePos = init.oggFirstBytePos;\n        pOggbs->firstBytePos = init.oggFirstBytePos;\n        pOggbs->serialNumber = init.oggSerial;\n        pOggbs->bosPageHeader = init.oggBosHeader;\n        pOggbs->bytesRemainingInPage = 0;\n    }\n#endif\n    firstFramePos  = 42;\n    seektablePos   = 0;\n    seekpointCount = 0;\n    if (init.hasMetadataBlocks) {\n        ma_dr_flac_read_proc onReadOverride = onRead;\n        ma_dr_flac_seek_proc onSeekOverride = onSeek;\n        void* pUserDataOverride = pUserData;\n#ifndef MA_DR_FLAC_NO_OGG\n        if (init.container == ma_dr_flac_container_ogg) {\n            onReadOverride = ma_dr_flac__on_read_ogg;\n            onSeekOverride = ma_dr_flac__on_seek_ogg;\n            pUserDataOverride = (void*)pOggbs;\n        }\n#endif\n        if (!ma_dr_flac__read_and_decode_metadata(onReadOverride, onSeekOverride, onMeta, pUserDataOverride, pUserDataMD, &firstFramePos, &seektablePos, &seekpointCount, &allocationCallbacks)) {\n        #ifndef MA_DR_FLAC_NO_OGG\n            ma_dr_flac__free_from_callbacks(pOggbs, &allocationCallbacks);\n        #endif\n            return NULL;\n        }\n        allocationSize += seekpointCount * sizeof(ma_dr_flac_seekpoint);\n    }\n    pFlac = (ma_dr_flac*)ma_dr_flac__malloc_from_callbacks(allocationSize, &allocationCallbacks);\n    if (pFlac == NULL) {\n    #ifndef MA_DR_FLAC_NO_OGG\n        ma_dr_flac__free_from_callbacks(pOggbs, &allocationCallbacks);\n    #endif\n        return NULL;\n    }\n    ma_dr_flac__init_from_info(pFlac, &init);\n    pFlac->allocationCallbacks = allocationCallbacks;\n    pFlac->pDecodedSamples = (ma_int32*)ma_dr_flac_align((size_t)pFlac->pExtraData, MA_DR_FLAC_MAX_SIMD_VECTOR_SIZE);\n#ifndef MA_DR_FLAC_NO_OGG\n    if (init.container == ma_dr_flac_container_ogg) {\n        ma_dr_flac_oggbs* pInternalOggbs = (ma_dr_flac_oggbs*)((ma_uint8*)pFlac->pDecodedSamples + decodedSamplesAllocationSize + (seekpointCount * sizeof(ma_dr_flac_seekpoint)));\n        MA_DR_FLAC_COPY_MEMORY(pInternalOggbs, pOggbs, sizeof(*pOggbs));\n        ma_dr_flac__free_from_callbacks(pOggbs, &allocationCallbacks);\n        pOggbs = NULL;\n        pFlac->bs.onRead = ma_dr_flac__on_read_ogg;\n        pFlac->bs.onSeek = ma_dr_flac__on_seek_ogg;\n        pFlac->bs.pUserData = (void*)pInternalOggbs;\n        pFlac->_oggbs = (void*)pInternalOggbs;\n    }\n#endif\n    pFlac->firstFLACFramePosInBytes = firstFramePos;\n#ifndef MA_DR_FLAC_NO_OGG\n    if (init.container == ma_dr_flac_container_ogg)\n    {\n        pFlac->pSeekpoints = NULL;\n        pFlac->seekpointCount = 0;\n    }\n    else\n#endif\n    {\n        if (seektablePos != 0) {\n            pFlac->seekpointCount = seekpointCount;\n            pFlac->pSeekpoints = (ma_dr_flac_seekpoint*)((ma_uint8*)pFlac->pDecodedSamples + decodedSamplesAllocationSize);\n            MA_DR_FLAC_ASSERT(pFlac->bs.onSeek != NULL);\n            MA_DR_FLAC_ASSERT(pFlac->bs.onRead != NULL);\n            if (pFlac->bs.onSeek(pFlac->bs.pUserData, (int)seektablePos, ma_dr_flac_seek_origin_start)) {\n                ma_uint32 iSeekpoint;\n                for (iSeekpoint = 0; iSeekpoint < seekpointCount; iSeekpoint += 1) {\n                    if (pFlac->bs.onRead(pFlac->bs.pUserData, pFlac->pSeekpoints + iSeekpoint, MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES) == MA_DR_FLAC_SEEKPOINT_SIZE_IN_BYTES) {\n                        pFlac->pSeekpoints[iSeekpoint].firstPCMFrame   = ma_dr_flac__be2host_64(pFlac->pSeekpoints[iSeekpoint].firstPCMFrame);\n                        pFlac->pSeekpoints[iSeekpoint].flacFrameOffset = ma_dr_flac__be2host_64(pFlac->pSeekpoints[iSeekpoint].flacFrameOffset);\n                        pFlac->pSeekpoints[iSeekpoint].pcmFrameCount   = ma_dr_flac__be2host_16(pFlac->pSeekpoints[iSeekpoint].pcmFrameCount);\n                    } else {\n                        pFlac->pSeekpoints = NULL;\n                        pFlac->seekpointCount = 0;\n                        break;\n                    }\n                }\n                if (!pFlac->bs.onSeek(pFlac->bs.pUserData, (int)pFlac->firstFLACFramePosInBytes, ma_dr_flac_seek_origin_start)) {\n                    ma_dr_flac__free_from_callbacks(pFlac, &allocationCallbacks);\n                    return NULL;\n                }\n            } else {\n                pFlac->pSeekpoints = NULL;\n                pFlac->seekpointCount = 0;\n            }\n        }\n    }\n    if (!init.hasStreamInfoBlock) {\n        pFlac->currentFLACFrame.header = init.firstFrameHeader;\n        for (;;) {\n            ma_result result = ma_dr_flac__decode_flac_frame(pFlac);\n            if (result == MA_SUCCESS) {\n                break;\n            } else {\n                if (result == MA_CRC_MISMATCH) {\n                    if (!ma_dr_flac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) {\n                        ma_dr_flac__free_from_callbacks(pFlac, &allocationCallbacks);\n                        return NULL;\n                    }\n                    continue;\n                } else {\n                    ma_dr_flac__free_from_callbacks(pFlac, &allocationCallbacks);\n                    return NULL;\n                }\n            }\n        }\n    }\n    return pFlac;\n}\n#ifndef MA_DR_FLAC_NO_STDIO\n#include <stdio.h>\n#ifndef MA_DR_FLAC_NO_WCHAR\n#include <wchar.h>\n#endif\nstatic size_t ma_dr_flac__on_read_stdio(void* pUserData, void* bufferOut, size_t bytesToRead)\n{\n    return fread(bufferOut, 1, bytesToRead, (FILE*)pUserData);\n}\nstatic ma_bool32 ma_dr_flac__on_seek_stdio(void* pUserData, int offset, ma_dr_flac_seek_origin origin)\n{\n    MA_DR_FLAC_ASSERT(offset >= 0);\n    return fseek((FILE*)pUserData, offset, (origin == ma_dr_flac_seek_origin_current) ? SEEK_CUR : SEEK_SET) == 0;\n}\nMA_API ma_dr_flac* ma_dr_flac_open_file(const char* pFileName, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac* pFlac;\n    FILE* pFile;\n    if (ma_fopen(&pFile, pFileName, \"rb\") != MA_SUCCESS) {\n        return NULL;\n    }\n    pFlac = ma_dr_flac_open(ma_dr_flac__on_read_stdio, ma_dr_flac__on_seek_stdio, (void*)pFile, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        fclose(pFile);\n        return NULL;\n    }\n    return pFlac;\n}\n#ifndef MA_DR_FLAC_NO_WCHAR\nMA_API ma_dr_flac* ma_dr_flac_open_file_w(const wchar_t* pFileName, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac* pFlac;\n    FILE* pFile;\n    if (ma_wfopen(&pFile, pFileName, L\"rb\", pAllocationCallbacks) != MA_SUCCESS) {\n        return NULL;\n    }\n    pFlac = ma_dr_flac_open(ma_dr_flac__on_read_stdio, ma_dr_flac__on_seek_stdio, (void*)pFile, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        fclose(pFile);\n        return NULL;\n    }\n    return pFlac;\n}\n#endif\nMA_API ma_dr_flac* ma_dr_flac_open_file_with_metadata(const char* pFileName, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac* pFlac;\n    FILE* pFile;\n    if (ma_fopen(&pFile, pFileName, \"rb\") != MA_SUCCESS) {\n        return NULL;\n    }\n    pFlac = ma_dr_flac_open_with_metadata_private(ma_dr_flac__on_read_stdio, ma_dr_flac__on_seek_stdio, onMeta, ma_dr_flac_container_unknown, (void*)pFile, pUserData, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        fclose(pFile);\n        return pFlac;\n    }\n    return pFlac;\n}\n#ifndef MA_DR_FLAC_NO_WCHAR\nMA_API ma_dr_flac* ma_dr_flac_open_file_with_metadata_w(const wchar_t* pFileName, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac* pFlac;\n    FILE* pFile;\n    if (ma_wfopen(&pFile, pFileName, L\"rb\", pAllocationCallbacks) != MA_SUCCESS) {\n        return NULL;\n    }\n    pFlac = ma_dr_flac_open_with_metadata_private(ma_dr_flac__on_read_stdio, ma_dr_flac__on_seek_stdio, onMeta, ma_dr_flac_container_unknown, (void*)pFile, pUserData, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        fclose(pFile);\n        return pFlac;\n    }\n    return pFlac;\n}\n#endif\n#endif\nstatic size_t ma_dr_flac__on_read_memory(void* pUserData, void* bufferOut, size_t bytesToRead)\n{\n    ma_dr_flac__memory_stream* memoryStream = (ma_dr_flac__memory_stream*)pUserData;\n    size_t bytesRemaining;\n    MA_DR_FLAC_ASSERT(memoryStream != NULL);\n    MA_DR_FLAC_ASSERT(memoryStream->dataSize >= memoryStream->currentReadPos);\n    bytesRemaining = memoryStream->dataSize - memoryStream->currentReadPos;\n    if (bytesToRead > bytesRemaining) {\n        bytesToRead = bytesRemaining;\n    }\n    if (bytesToRead > 0) {\n        MA_DR_FLAC_COPY_MEMORY(bufferOut, memoryStream->data + memoryStream->currentReadPos, bytesToRead);\n        memoryStream->currentReadPos += bytesToRead;\n    }\n    return bytesToRead;\n}\nstatic ma_bool32 ma_dr_flac__on_seek_memory(void* pUserData, int offset, ma_dr_flac_seek_origin origin)\n{\n    ma_dr_flac__memory_stream* memoryStream = (ma_dr_flac__memory_stream*)pUserData;\n    MA_DR_FLAC_ASSERT(memoryStream != NULL);\n    MA_DR_FLAC_ASSERT(offset >= 0);\n    if (offset > (ma_int64)memoryStream->dataSize) {\n        return MA_FALSE;\n    }\n    if (origin == ma_dr_flac_seek_origin_current) {\n        if (memoryStream->currentReadPos + offset <= memoryStream->dataSize) {\n            memoryStream->currentReadPos += offset;\n        } else {\n            return MA_FALSE;\n        }\n    } else {\n        if ((ma_uint32)offset <= memoryStream->dataSize) {\n            memoryStream->currentReadPos = offset;\n        } else {\n            return MA_FALSE;\n        }\n    }\n    return MA_TRUE;\n}\nMA_API ma_dr_flac* ma_dr_flac_open_memory(const void* pData, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac__memory_stream memoryStream;\n    ma_dr_flac* pFlac;\n    memoryStream.data = (const ma_uint8*)pData;\n    memoryStream.dataSize = dataSize;\n    memoryStream.currentReadPos = 0;\n    pFlac = ma_dr_flac_open(ma_dr_flac__on_read_memory, ma_dr_flac__on_seek_memory, &memoryStream, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return NULL;\n    }\n    pFlac->memoryStream = memoryStream;\n#ifndef MA_DR_FLAC_NO_OGG\n    if (pFlac->container == ma_dr_flac_container_ogg)\n    {\n        ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pFlac->_oggbs;\n        oggbs->pUserData = &pFlac->memoryStream;\n    }\n    else\n#endif\n    {\n        pFlac->bs.pUserData = &pFlac->memoryStream;\n    }\n    return pFlac;\n}\nMA_API ma_dr_flac* ma_dr_flac_open_memory_with_metadata(const void* pData, size_t dataSize, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac__memory_stream memoryStream;\n    ma_dr_flac* pFlac;\n    memoryStream.data = (const ma_uint8*)pData;\n    memoryStream.dataSize = dataSize;\n    memoryStream.currentReadPos = 0;\n    pFlac = ma_dr_flac_open_with_metadata_private(ma_dr_flac__on_read_memory, ma_dr_flac__on_seek_memory, onMeta, ma_dr_flac_container_unknown, &memoryStream, pUserData, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return NULL;\n    }\n    pFlac->memoryStream = memoryStream;\n#ifndef MA_DR_FLAC_NO_OGG\n    if (pFlac->container == ma_dr_flac_container_ogg)\n    {\n        ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pFlac->_oggbs;\n        oggbs->pUserData = &pFlac->memoryStream;\n    }\n    else\n#endif\n    {\n        pFlac->bs.pUserData = &pFlac->memoryStream;\n    }\n    return pFlac;\n}\nMA_API ma_dr_flac* ma_dr_flac_open(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_flac_open_with_metadata_private(onRead, onSeek, NULL, ma_dr_flac_container_unknown, pUserData, pUserData, pAllocationCallbacks);\n}\nMA_API ma_dr_flac* ma_dr_flac_open_relaxed(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_container container, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_flac_open_with_metadata_private(onRead, onSeek, NULL, container, pUserData, pUserData, pAllocationCallbacks);\n}\nMA_API ma_dr_flac* ma_dr_flac_open_with_metadata(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_flac_open_with_metadata_private(onRead, onSeek, onMeta, ma_dr_flac_container_unknown, pUserData, pUserData, pAllocationCallbacks);\n}\nMA_API ma_dr_flac* ma_dr_flac_open_with_metadata_relaxed(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, ma_dr_flac_meta_proc onMeta, ma_dr_flac_container container, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    return ma_dr_flac_open_with_metadata_private(onRead, onSeek, onMeta, container, pUserData, pUserData, pAllocationCallbacks);\n}\nMA_API void ma_dr_flac_close(ma_dr_flac* pFlac)\n{\n    if (pFlac == NULL) {\n        return;\n    }\n#ifndef MA_DR_FLAC_NO_STDIO\n    if (pFlac->bs.onRead == ma_dr_flac__on_read_stdio) {\n        fclose((FILE*)pFlac->bs.pUserData);\n    }\n#ifndef MA_DR_FLAC_NO_OGG\n    if (pFlac->container == ma_dr_flac_container_ogg) {\n        ma_dr_flac_oggbs* oggbs = (ma_dr_flac_oggbs*)pFlac->_oggbs;\n        MA_DR_FLAC_ASSERT(pFlac->bs.onRead == ma_dr_flac__on_read_ogg);\n        if (oggbs->onRead == ma_dr_flac__on_read_stdio) {\n            fclose((FILE*)oggbs->pUserData);\n        }\n    }\n#endif\n#endif\n    ma_dr_flac__free_from_callbacks(pFlac, &pFlac->allocationCallbacks);\n}\n#if 0\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    for (i = 0; i < frameCount; ++i) {\n        ma_uint32 left  = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n        ma_uint32 side  = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n        ma_uint32 right = left - side;\n        pOutputSamples[i*2+0] = (ma_int32)left;\n        pOutputSamples[i*2+1] = (ma_int32)right;\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    for (i = 0; i < frameCount4; ++i) {\n        ma_uint32 left0 = pInputSamples0U32[i*4+0] << shift0;\n        ma_uint32 left1 = pInputSamples0U32[i*4+1] << shift0;\n        ma_uint32 left2 = pInputSamples0U32[i*4+2] << shift0;\n        ma_uint32 left3 = pInputSamples0U32[i*4+3] << shift0;\n        ma_uint32 side0 = pInputSamples1U32[i*4+0] << shift1;\n        ma_uint32 side1 = pInputSamples1U32[i*4+1] << shift1;\n        ma_uint32 side2 = pInputSamples1U32[i*4+2] << shift1;\n        ma_uint32 side3 = pInputSamples1U32[i*4+3] << shift1;\n        ma_uint32 right0 = left0 - side0;\n        ma_uint32 right1 = left1 - side1;\n        ma_uint32 right2 = left2 - side2;\n        ma_uint32 right3 = left3 - side3;\n        pOutputSamples[i*8+0] = (ma_int32)left0;\n        pOutputSamples[i*8+1] = (ma_int32)right0;\n        pOutputSamples[i*8+2] = (ma_int32)left1;\n        pOutputSamples[i*8+3] = (ma_int32)right1;\n        pOutputSamples[i*8+4] = (ma_int32)left2;\n        pOutputSamples[i*8+5] = (ma_int32)right2;\n        pOutputSamples[i*8+6] = (ma_int32)left3;\n        pOutputSamples[i*8+7] = (ma_int32)right3;\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 left  = pInputSamples0U32[i] << shift0;\n        ma_uint32 side  = pInputSamples1U32[i] << shift1;\n        ma_uint32 right = left - side;\n        pOutputSamples[i*2+0] = (ma_int32)left;\n        pOutputSamples[i*2+1] = (ma_int32)right;\n    }\n}\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    for (i = 0; i < frameCount4; ++i) {\n        __m128i left  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0);\n        __m128i side  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1);\n        __m128i right = _mm_sub_epi32(left, side);\n        _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right));\n        _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 left  = pInputSamples0U32[i] << shift0;\n        ma_uint32 side  = pInputSamples1U32[i] << shift1;\n        ma_uint32 right = left - side;\n        pOutputSamples[i*2+0] = (ma_int32)left;\n        pOutputSamples[i*2+1] = (ma_int32)right;\n    }\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    int32x4_t shift0_4;\n    int32x4_t shift1_4;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    shift0_4 = vdupq_n_s32(shift0);\n    shift1_4 = vdupq_n_s32(shift1);\n    for (i = 0; i < frameCount4; ++i) {\n        uint32x4_t left;\n        uint32x4_t side;\n        uint32x4_t right;\n        left  = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4);\n        side  = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4);\n        right = vsubq_u32(left, side);\n        ma_dr_flac__vst2q_u32((ma_uint32*)pOutputSamples + i*8, vzipq_u32(left, right));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 left  = pInputSamples0U32[i] << shift0;\n        ma_uint32 side  = pInputSamples1U32[i] << shift1;\n        ma_uint32 right = left - side;\n        pOutputSamples[i*2+0] = (ma_int32)left;\n        pOutputSamples[i*2+1] = (ma_int32)right;\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_left_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\n    if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s32__decode_left_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#elif defined(MA_DR_FLAC_SUPPORT_NEON)\n    if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s32__decode_left_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#endif\n    {\n#if 0\n        ma_dr_flac_read_pcm_frames_s32__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#else\n        ma_dr_flac_read_pcm_frames_s32__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#endif\n    }\n}\n#if 0\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    for (i = 0; i < frameCount; ++i) {\n        ma_uint32 side  = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n        ma_uint32 right = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n        ma_uint32 left  = right + side;\n        pOutputSamples[i*2+0] = (ma_int32)left;\n        pOutputSamples[i*2+1] = (ma_int32)right;\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    for (i = 0; i < frameCount4; ++i) {\n        ma_uint32 side0  = pInputSamples0U32[i*4+0] << shift0;\n        ma_uint32 side1  = pInputSamples0U32[i*4+1] << shift0;\n        ma_uint32 side2  = pInputSamples0U32[i*4+2] << shift0;\n        ma_uint32 side3  = pInputSamples0U32[i*4+3] << shift0;\n        ma_uint32 right0 = pInputSamples1U32[i*4+0] << shift1;\n        ma_uint32 right1 = pInputSamples1U32[i*4+1] << shift1;\n        ma_uint32 right2 = pInputSamples1U32[i*4+2] << shift1;\n        ma_uint32 right3 = pInputSamples1U32[i*4+3] << shift1;\n        ma_uint32 left0 = right0 + side0;\n        ma_uint32 left1 = right1 + side1;\n        ma_uint32 left2 = right2 + side2;\n        ma_uint32 left3 = right3 + side3;\n        pOutputSamples[i*8+0] = (ma_int32)left0;\n        pOutputSamples[i*8+1] = (ma_int32)right0;\n        pOutputSamples[i*8+2] = (ma_int32)left1;\n        pOutputSamples[i*8+3] = (ma_int32)right1;\n        pOutputSamples[i*8+4] = (ma_int32)left2;\n        pOutputSamples[i*8+5] = (ma_int32)right2;\n        pOutputSamples[i*8+6] = (ma_int32)left3;\n        pOutputSamples[i*8+7] = (ma_int32)right3;\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 side  = pInputSamples0U32[i] << shift0;\n        ma_uint32 right = pInputSamples1U32[i] << shift1;\n        ma_uint32 left  = right + side;\n        pOutputSamples[i*2+0] = (ma_int32)left;\n        pOutputSamples[i*2+1] = (ma_int32)right;\n    }\n}\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    for (i = 0; i < frameCount4; ++i) {\n        __m128i side  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0);\n        __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1);\n        __m128i left  = _mm_add_epi32(right, side);\n        _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right));\n        _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 side  = pInputSamples0U32[i] << shift0;\n        ma_uint32 right = pInputSamples1U32[i] << shift1;\n        ma_uint32 left  = right + side;\n        pOutputSamples[i*2+0] = (ma_int32)left;\n        pOutputSamples[i*2+1] = (ma_int32)right;\n    }\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    int32x4_t shift0_4;\n    int32x4_t shift1_4;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    shift0_4 = vdupq_n_s32(shift0);\n    shift1_4 = vdupq_n_s32(shift1);\n    for (i = 0; i < frameCount4; ++i) {\n        uint32x4_t side;\n        uint32x4_t right;\n        uint32x4_t left;\n        side  = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4);\n        right = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4);\n        left  = vaddq_u32(right, side);\n        ma_dr_flac__vst2q_u32((ma_uint32*)pOutputSamples + i*8, vzipq_u32(left, right));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 side  = pInputSamples0U32[i] << shift0;\n        ma_uint32 right = pInputSamples1U32[i] << shift1;\n        ma_uint32 left  = right + side;\n        pOutputSamples[i*2+0] = (ma_int32)left;\n        pOutputSamples[i*2+1] = (ma_int32)right;\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_right_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\n    if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s32__decode_right_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#elif defined(MA_DR_FLAC_SUPPORT_NEON)\n    if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s32__decode_right_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#endif\n    {\n#if 0\n        ma_dr_flac_read_pcm_frames_s32__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#else\n        ma_dr_flac_read_pcm_frames_s32__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#endif\n    }\n}\n#if 0\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    for (ma_uint64 i = 0; i < frameCount; ++i) {\n        ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n        ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n        mid = (mid << 1) | (side & 0x01);\n        pOutputSamples[i*2+0] = (ma_int32)((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample);\n        pOutputSamples[i*2+1] = (ma_int32)((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample);\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_int32 shift = unusedBitsPerSample;\n    if (shift > 0) {\n        shift -= 1;\n        for (i = 0; i < frameCount4; ++i) {\n            ma_uint32 temp0L;\n            ma_uint32 temp1L;\n            ma_uint32 temp2L;\n            ma_uint32 temp3L;\n            ma_uint32 temp0R;\n            ma_uint32 temp1R;\n            ma_uint32 temp2R;\n            ma_uint32 temp3R;\n            ma_uint32 mid0  = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid1  = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid2  = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid3  = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid0 = (mid0 << 1) | (side0 & 0x01);\n            mid1 = (mid1 << 1) | (side1 & 0x01);\n            mid2 = (mid2 << 1) | (side2 & 0x01);\n            mid3 = (mid3 << 1) | (side3 & 0x01);\n            temp0L = (mid0 + side0) << shift;\n            temp1L = (mid1 + side1) << shift;\n            temp2L = (mid2 + side2) << shift;\n            temp3L = (mid3 + side3) << shift;\n            temp0R = (mid0 - side0) << shift;\n            temp1R = (mid1 - side1) << shift;\n            temp2R = (mid2 - side2) << shift;\n            temp3R = (mid3 - side3) << shift;\n            pOutputSamples[i*8+0] = (ma_int32)temp0L;\n            pOutputSamples[i*8+1] = (ma_int32)temp0R;\n            pOutputSamples[i*8+2] = (ma_int32)temp1L;\n            pOutputSamples[i*8+3] = (ma_int32)temp1R;\n            pOutputSamples[i*8+4] = (ma_int32)temp2L;\n            pOutputSamples[i*8+5] = (ma_int32)temp2R;\n            pOutputSamples[i*8+6] = (ma_int32)temp3L;\n            pOutputSamples[i*8+7] = (ma_int32)temp3R;\n        }\n    } else {\n        for (i = 0; i < frameCount4; ++i) {\n            ma_uint32 temp0L;\n            ma_uint32 temp1L;\n            ma_uint32 temp2L;\n            ma_uint32 temp3L;\n            ma_uint32 temp0R;\n            ma_uint32 temp1R;\n            ma_uint32 temp2R;\n            ma_uint32 temp3R;\n            ma_uint32 mid0  = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid1  = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid2  = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid3  = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid0 = (mid0 << 1) | (side0 & 0x01);\n            mid1 = (mid1 << 1) | (side1 & 0x01);\n            mid2 = (mid2 << 1) | (side2 & 0x01);\n            mid3 = (mid3 << 1) | (side3 & 0x01);\n            temp0L = (ma_uint32)((ma_int32)(mid0 + side0) >> 1);\n            temp1L = (ma_uint32)((ma_int32)(mid1 + side1) >> 1);\n            temp2L = (ma_uint32)((ma_int32)(mid2 + side2) >> 1);\n            temp3L = (ma_uint32)((ma_int32)(mid3 + side3) >> 1);\n            temp0R = (ma_uint32)((ma_int32)(mid0 - side0) >> 1);\n            temp1R = (ma_uint32)((ma_int32)(mid1 - side1) >> 1);\n            temp2R = (ma_uint32)((ma_int32)(mid2 - side2) >> 1);\n            temp3R = (ma_uint32)((ma_int32)(mid3 - side3) >> 1);\n            pOutputSamples[i*8+0] = (ma_int32)temp0L;\n            pOutputSamples[i*8+1] = (ma_int32)temp0R;\n            pOutputSamples[i*8+2] = (ma_int32)temp1L;\n            pOutputSamples[i*8+3] = (ma_int32)temp1R;\n            pOutputSamples[i*8+4] = (ma_int32)temp2L;\n            pOutputSamples[i*8+5] = (ma_int32)temp2R;\n            pOutputSamples[i*8+6] = (ma_int32)temp3L;\n            pOutputSamples[i*8+7] = (ma_int32)temp3R;\n        }\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n        ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n        mid = (mid << 1) | (side & 0x01);\n        pOutputSamples[i*2+0] = (ma_int32)((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample);\n        pOutputSamples[i*2+1] = (ma_int32)((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample);\n    }\n}\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_int32 shift = unusedBitsPerSample;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    if (shift == 0) {\n        for (i = 0; i < frameCount4; ++i) {\n            __m128i mid;\n            __m128i side;\n            __m128i left;\n            __m128i right;\n            mid   = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n            side  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n            mid   = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01)));\n            left  = _mm_srai_epi32(_mm_add_epi32(mid, side), 1);\n            right = _mm_srai_epi32(_mm_sub_epi32(mid, side), 1);\n            _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right));\n            _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right));\n        }\n        for (i = (frameCount4 << 2); i < frameCount; ++i) {\n            ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid = (mid << 1) | (side & 0x01);\n            pOutputSamples[i*2+0] = (ma_int32)(mid + side) >> 1;\n            pOutputSamples[i*2+1] = (ma_int32)(mid - side) >> 1;\n        }\n    } else {\n        shift -= 1;\n        for (i = 0; i < frameCount4; ++i) {\n            __m128i mid;\n            __m128i side;\n            __m128i left;\n            __m128i right;\n            mid   = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n            side  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n            mid   = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01)));\n            left  = _mm_slli_epi32(_mm_add_epi32(mid, side), shift);\n            right = _mm_slli_epi32(_mm_sub_epi32(mid, side), shift);\n            _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right));\n            _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right));\n        }\n        for (i = (frameCount4 << 2); i < frameCount; ++i) {\n            ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid = (mid << 1) | (side & 0x01);\n            pOutputSamples[i*2+0] = (ma_int32)((mid + side) << shift);\n            pOutputSamples[i*2+1] = (ma_int32)((mid - side) << shift);\n        }\n    }\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_int32 shift = unusedBitsPerSample;\n    int32x4_t  wbpsShift0_4;\n    int32x4_t  wbpsShift1_4;\n    uint32x4_t one4;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    wbpsShift0_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n    wbpsShift1_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n    one4         = vdupq_n_u32(1);\n    if (shift == 0) {\n        for (i = 0; i < frameCount4; ++i) {\n            uint32x4_t mid;\n            uint32x4_t side;\n            int32x4_t left;\n            int32x4_t right;\n            mid   = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4);\n            side  = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4);\n            mid   = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, one4));\n            left  = vshrq_n_s32(vreinterpretq_s32_u32(vaddq_u32(mid, side)), 1);\n            right = vshrq_n_s32(vreinterpretq_s32_u32(vsubq_u32(mid, side)), 1);\n            ma_dr_flac__vst2q_s32(pOutputSamples + i*8, vzipq_s32(left, right));\n        }\n        for (i = (frameCount4 << 2); i < frameCount; ++i) {\n            ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid = (mid << 1) | (side & 0x01);\n            pOutputSamples[i*2+0] = (ma_int32)(mid + side) >> 1;\n            pOutputSamples[i*2+1] = (ma_int32)(mid - side) >> 1;\n        }\n    } else {\n        int32x4_t shift4;\n        shift -= 1;\n        shift4 = vdupq_n_s32(shift);\n        for (i = 0; i < frameCount4; ++i) {\n            uint32x4_t mid;\n            uint32x4_t side;\n            int32x4_t left;\n            int32x4_t right;\n            mid   = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4);\n            side  = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4);\n            mid   = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, one4));\n            left  = vreinterpretq_s32_u32(vshlq_u32(vaddq_u32(mid, side), shift4));\n            right = vreinterpretq_s32_u32(vshlq_u32(vsubq_u32(mid, side), shift4));\n            ma_dr_flac__vst2q_s32(pOutputSamples + i*8, vzipq_s32(left, right));\n        }\n        for (i = (frameCount4 << 2); i < frameCount; ++i) {\n            ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid = (mid << 1) | (side & 0x01);\n            pOutputSamples[i*2+0] = (ma_int32)((mid + side) << shift);\n            pOutputSamples[i*2+1] = (ma_int32)((mid - side) << shift);\n        }\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_mid_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\n    if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s32__decode_mid_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#elif defined(MA_DR_FLAC_SUPPORT_NEON)\n    if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s32__decode_mid_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#endif\n    {\n#if 0\n        ma_dr_flac_read_pcm_frames_s32__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#else\n        ma_dr_flac_read_pcm_frames_s32__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#endif\n    }\n}\n#if 0\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    for (ma_uint64 i = 0; i < frameCount; ++i) {\n        pOutputSamples[i*2+0] = (ma_int32)((ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample));\n        pOutputSamples[i*2+1] = (ma_int32)((ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample));\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    for (i = 0; i < frameCount4; ++i) {\n        ma_uint32 tempL0 = pInputSamples0U32[i*4+0] << shift0;\n        ma_uint32 tempL1 = pInputSamples0U32[i*4+1] << shift0;\n        ma_uint32 tempL2 = pInputSamples0U32[i*4+2] << shift0;\n        ma_uint32 tempL3 = pInputSamples0U32[i*4+3] << shift0;\n        ma_uint32 tempR0 = pInputSamples1U32[i*4+0] << shift1;\n        ma_uint32 tempR1 = pInputSamples1U32[i*4+1] << shift1;\n        ma_uint32 tempR2 = pInputSamples1U32[i*4+2] << shift1;\n        ma_uint32 tempR3 = pInputSamples1U32[i*4+3] << shift1;\n        pOutputSamples[i*8+0] = (ma_int32)tempL0;\n        pOutputSamples[i*8+1] = (ma_int32)tempR0;\n        pOutputSamples[i*8+2] = (ma_int32)tempL1;\n        pOutputSamples[i*8+3] = (ma_int32)tempR1;\n        pOutputSamples[i*8+4] = (ma_int32)tempL2;\n        pOutputSamples[i*8+5] = (ma_int32)tempR2;\n        pOutputSamples[i*8+6] = (ma_int32)tempL3;\n        pOutputSamples[i*8+7] = (ma_int32)tempR3;\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0);\n        pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1);\n    }\n}\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    for (i = 0; i < frameCount4; ++i) {\n        __m128i left  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0);\n        __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1);\n        _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right));\n        _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0);\n        pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1);\n    }\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    int32x4_t shift4_0 = vdupq_n_s32(shift0);\n    int32x4_t shift4_1 = vdupq_n_s32(shift1);\n    for (i = 0; i < frameCount4; ++i) {\n        int32x4_t left;\n        int32x4_t right;\n        left  = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift4_0));\n        right = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift4_1));\n        ma_dr_flac__vst2q_s32(pOutputSamples + i*8, vzipq_s32(left, right));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0);\n        pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1);\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int32* pOutputSamples)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\n    if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#elif defined(MA_DR_FLAC_SUPPORT_NEON)\n    if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#endif\n    {\n#if 0\n        ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#else\n        ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#endif\n    }\n}\nMA_API ma_uint64 ma_dr_flac_read_pcm_frames_s32(ma_dr_flac* pFlac, ma_uint64 framesToRead, ma_int32* pBufferOut)\n{\n    ma_uint64 framesRead;\n    ma_uint32 unusedBitsPerSample;\n    if (pFlac == NULL || framesToRead == 0) {\n        return 0;\n    }\n    if (pBufferOut == NULL) {\n        return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, framesToRead);\n    }\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 32);\n    unusedBitsPerSample = 32 - pFlac->bitsPerSample;\n    framesRead = 0;\n    while (framesToRead > 0) {\n        if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) {\n            if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) {\n                break;\n            }\n        } else {\n            unsigned int channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment);\n            ma_uint64 iFirstPCMFrame = pFlac->currentFLACFrame.header.blockSizeInPCMFrames - pFlac->currentFLACFrame.pcmFramesRemaining;\n            ma_uint64 frameCountThisIteration = framesToRead;\n            if (frameCountThisIteration > pFlac->currentFLACFrame.pcmFramesRemaining) {\n                frameCountThisIteration = pFlac->currentFLACFrame.pcmFramesRemaining;\n            }\n            if (channelCount == 2) {\n                const ma_int32* pDecodedSamples0 = pFlac->currentFLACFrame.subframes[0].pSamplesS32 + iFirstPCMFrame;\n                const ma_int32* pDecodedSamples1 = pFlac->currentFLACFrame.subframes[1].pSamplesS32 + iFirstPCMFrame;\n                switch (pFlac->currentFLACFrame.header.channelAssignment)\n                {\n                    case MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE:\n                    {\n                        ma_dr_flac_read_pcm_frames_s32__decode_left_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut);\n                    } break;\n                    case MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE:\n                    {\n                        ma_dr_flac_read_pcm_frames_s32__decode_right_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut);\n                    } break;\n                    case MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE:\n                    {\n                        ma_dr_flac_read_pcm_frames_s32__decode_mid_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut);\n                    } break;\n                    case MA_DR_FLAC_CHANNEL_ASSIGNMENT_INDEPENDENT:\n                    default:\n                    {\n                        ma_dr_flac_read_pcm_frames_s32__decode_independent_stereo(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut);\n                    } break;\n                }\n            } else {\n                ma_uint64 i;\n                for (i = 0; i < frameCountThisIteration; ++i) {\n                    unsigned int j;\n                    for (j = 0; j < channelCount; ++j) {\n                        pBufferOut[(i*channelCount)+j] = (ma_int32)((ma_uint32)(pFlac->currentFLACFrame.subframes[j].pSamplesS32[iFirstPCMFrame + i]) << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[j].wastedBitsPerSample));\n                    }\n                }\n            }\n            framesRead                += frameCountThisIteration;\n            pBufferOut                += frameCountThisIteration * channelCount;\n            framesToRead              -= frameCountThisIteration;\n            pFlac->currentPCMFrame    += frameCountThisIteration;\n            pFlac->currentFLACFrame.pcmFramesRemaining -= (ma_uint32)frameCountThisIteration;\n        }\n    }\n    return framesRead;\n}\n#if 0\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    for (i = 0; i < frameCount; ++i) {\n        ma_uint32 left  = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n        ma_uint32 side  = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n        ma_uint32 right = left - side;\n        left  >>= 16;\n        right >>= 16;\n        pOutputSamples[i*2+0] = (ma_int16)left;\n        pOutputSamples[i*2+1] = (ma_int16)right;\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    for (i = 0; i < frameCount4; ++i) {\n        ma_uint32 left0 = pInputSamples0U32[i*4+0] << shift0;\n        ma_uint32 left1 = pInputSamples0U32[i*4+1] << shift0;\n        ma_uint32 left2 = pInputSamples0U32[i*4+2] << shift0;\n        ma_uint32 left3 = pInputSamples0U32[i*4+3] << shift0;\n        ma_uint32 side0 = pInputSamples1U32[i*4+0] << shift1;\n        ma_uint32 side1 = pInputSamples1U32[i*4+1] << shift1;\n        ma_uint32 side2 = pInputSamples1U32[i*4+2] << shift1;\n        ma_uint32 side3 = pInputSamples1U32[i*4+3] << shift1;\n        ma_uint32 right0 = left0 - side0;\n        ma_uint32 right1 = left1 - side1;\n        ma_uint32 right2 = left2 - side2;\n        ma_uint32 right3 = left3 - side3;\n        left0  >>= 16;\n        left1  >>= 16;\n        left2  >>= 16;\n        left3  >>= 16;\n        right0 >>= 16;\n        right1 >>= 16;\n        right2 >>= 16;\n        right3 >>= 16;\n        pOutputSamples[i*8+0] = (ma_int16)left0;\n        pOutputSamples[i*8+1] = (ma_int16)right0;\n        pOutputSamples[i*8+2] = (ma_int16)left1;\n        pOutputSamples[i*8+3] = (ma_int16)right1;\n        pOutputSamples[i*8+4] = (ma_int16)left2;\n        pOutputSamples[i*8+5] = (ma_int16)right2;\n        pOutputSamples[i*8+6] = (ma_int16)left3;\n        pOutputSamples[i*8+7] = (ma_int16)right3;\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 left  = pInputSamples0U32[i] << shift0;\n        ma_uint32 side  = pInputSamples1U32[i] << shift1;\n        ma_uint32 right = left - side;\n        left  >>= 16;\n        right >>= 16;\n        pOutputSamples[i*2+0] = (ma_int16)left;\n        pOutputSamples[i*2+1] = (ma_int16)right;\n    }\n}\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    for (i = 0; i < frameCount4; ++i) {\n        __m128i left  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0);\n        __m128i side  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1);\n        __m128i right = _mm_sub_epi32(left, side);\n        left  = _mm_srai_epi32(left,  16);\n        right = _mm_srai_epi32(right, 16);\n        _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 left  = pInputSamples0U32[i] << shift0;\n        ma_uint32 side  = pInputSamples1U32[i] << shift1;\n        ma_uint32 right = left - side;\n        left  >>= 16;\n        right >>= 16;\n        pOutputSamples[i*2+0] = (ma_int16)left;\n        pOutputSamples[i*2+1] = (ma_int16)right;\n    }\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    int32x4_t shift0_4;\n    int32x4_t shift1_4;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    shift0_4 = vdupq_n_s32(shift0);\n    shift1_4 = vdupq_n_s32(shift1);\n    for (i = 0; i < frameCount4; ++i) {\n        uint32x4_t left;\n        uint32x4_t side;\n        uint32x4_t right;\n        left  = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4);\n        side  = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4);\n        right = vsubq_u32(left, side);\n        left  = vshrq_n_u32(left,  16);\n        right = vshrq_n_u32(right, 16);\n        ma_dr_flac__vst2q_u16((ma_uint16*)pOutputSamples + i*8, vzip_u16(vmovn_u32(left), vmovn_u32(right)));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 left  = pInputSamples0U32[i] << shift0;\n        ma_uint32 side  = pInputSamples1U32[i] << shift1;\n        ma_uint32 right = left - side;\n        left  >>= 16;\n        right >>= 16;\n        pOutputSamples[i*2+0] = (ma_int16)left;\n        pOutputSamples[i*2+1] = (ma_int16)right;\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_left_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\n    if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s16__decode_left_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#elif defined(MA_DR_FLAC_SUPPORT_NEON)\n    if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s16__decode_left_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#endif\n    {\n#if 0\n        ma_dr_flac_read_pcm_frames_s16__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#else\n        ma_dr_flac_read_pcm_frames_s16__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#endif\n    }\n}\n#if 0\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    for (i = 0; i < frameCount; ++i) {\n        ma_uint32 side  = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n        ma_uint32 right = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n        ma_uint32 left  = right + side;\n        left  >>= 16;\n        right >>= 16;\n        pOutputSamples[i*2+0] = (ma_int16)left;\n        pOutputSamples[i*2+1] = (ma_int16)right;\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    for (i = 0; i < frameCount4; ++i) {\n        ma_uint32 side0  = pInputSamples0U32[i*4+0] << shift0;\n        ma_uint32 side1  = pInputSamples0U32[i*4+1] << shift0;\n        ma_uint32 side2  = pInputSamples0U32[i*4+2] << shift0;\n        ma_uint32 side3  = pInputSamples0U32[i*4+3] << shift0;\n        ma_uint32 right0 = pInputSamples1U32[i*4+0] << shift1;\n        ma_uint32 right1 = pInputSamples1U32[i*4+1] << shift1;\n        ma_uint32 right2 = pInputSamples1U32[i*4+2] << shift1;\n        ma_uint32 right3 = pInputSamples1U32[i*4+3] << shift1;\n        ma_uint32 left0 = right0 + side0;\n        ma_uint32 left1 = right1 + side1;\n        ma_uint32 left2 = right2 + side2;\n        ma_uint32 left3 = right3 + side3;\n        left0  >>= 16;\n        left1  >>= 16;\n        left2  >>= 16;\n        left3  >>= 16;\n        right0 >>= 16;\n        right1 >>= 16;\n        right2 >>= 16;\n        right3 >>= 16;\n        pOutputSamples[i*8+0] = (ma_int16)left0;\n        pOutputSamples[i*8+1] = (ma_int16)right0;\n        pOutputSamples[i*8+2] = (ma_int16)left1;\n        pOutputSamples[i*8+3] = (ma_int16)right1;\n        pOutputSamples[i*8+4] = (ma_int16)left2;\n        pOutputSamples[i*8+5] = (ma_int16)right2;\n        pOutputSamples[i*8+6] = (ma_int16)left3;\n        pOutputSamples[i*8+7] = (ma_int16)right3;\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 side  = pInputSamples0U32[i] << shift0;\n        ma_uint32 right = pInputSamples1U32[i] << shift1;\n        ma_uint32 left  = right + side;\n        left  >>= 16;\n        right >>= 16;\n        pOutputSamples[i*2+0] = (ma_int16)left;\n        pOutputSamples[i*2+1] = (ma_int16)right;\n    }\n}\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    for (i = 0; i < frameCount4; ++i) {\n        __m128i side  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0);\n        __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1);\n        __m128i left  = _mm_add_epi32(right, side);\n        left  = _mm_srai_epi32(left,  16);\n        right = _mm_srai_epi32(right, 16);\n        _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 side  = pInputSamples0U32[i] << shift0;\n        ma_uint32 right = pInputSamples1U32[i] << shift1;\n        ma_uint32 left  = right + side;\n        left  >>= 16;\n        right >>= 16;\n        pOutputSamples[i*2+0] = (ma_int16)left;\n        pOutputSamples[i*2+1] = (ma_int16)right;\n    }\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    int32x4_t shift0_4;\n    int32x4_t shift1_4;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    shift0_4 = vdupq_n_s32(shift0);\n    shift1_4 = vdupq_n_s32(shift1);\n    for (i = 0; i < frameCount4; ++i) {\n        uint32x4_t side;\n        uint32x4_t right;\n        uint32x4_t left;\n        side  = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4);\n        right = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4);\n        left  = vaddq_u32(right, side);\n        left  = vshrq_n_u32(left,  16);\n        right = vshrq_n_u32(right, 16);\n        ma_dr_flac__vst2q_u16((ma_uint16*)pOutputSamples + i*8, vzip_u16(vmovn_u32(left), vmovn_u32(right)));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 side  = pInputSamples0U32[i] << shift0;\n        ma_uint32 right = pInputSamples1U32[i] << shift1;\n        ma_uint32 left  = right + side;\n        left  >>= 16;\n        right >>= 16;\n        pOutputSamples[i*2+0] = (ma_int16)left;\n        pOutputSamples[i*2+1] = (ma_int16)right;\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_right_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\n    if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s16__decode_right_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#elif defined(MA_DR_FLAC_SUPPORT_NEON)\n    if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s16__decode_right_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#endif\n    {\n#if 0\n        ma_dr_flac_read_pcm_frames_s16__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#else\n        ma_dr_flac_read_pcm_frames_s16__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#endif\n    }\n}\n#if 0\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    for (ma_uint64 i = 0; i < frameCount; ++i) {\n        ma_uint32 mid  = (ma_uint32)pInputSamples0[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n        ma_uint32 side = (ma_uint32)pInputSamples1[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n        mid = (mid << 1) | (side & 0x01);\n        pOutputSamples[i*2+0] = (ma_int16)(((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample) >> 16);\n        pOutputSamples[i*2+1] = (ma_int16)(((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample) >> 16);\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift = unusedBitsPerSample;\n    if (shift > 0) {\n        shift -= 1;\n        for (i = 0; i < frameCount4; ++i) {\n            ma_uint32 temp0L;\n            ma_uint32 temp1L;\n            ma_uint32 temp2L;\n            ma_uint32 temp3L;\n            ma_uint32 temp0R;\n            ma_uint32 temp1R;\n            ma_uint32 temp2R;\n            ma_uint32 temp3R;\n            ma_uint32 mid0  = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid1  = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid2  = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid3  = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid0 = (mid0 << 1) | (side0 & 0x01);\n            mid1 = (mid1 << 1) | (side1 & 0x01);\n            mid2 = (mid2 << 1) | (side2 & 0x01);\n            mid3 = (mid3 << 1) | (side3 & 0x01);\n            temp0L = (mid0 + side0) << shift;\n            temp1L = (mid1 + side1) << shift;\n            temp2L = (mid2 + side2) << shift;\n            temp3L = (mid3 + side3) << shift;\n            temp0R = (mid0 - side0) << shift;\n            temp1R = (mid1 - side1) << shift;\n            temp2R = (mid2 - side2) << shift;\n            temp3R = (mid3 - side3) << shift;\n            temp0L >>= 16;\n            temp1L >>= 16;\n            temp2L >>= 16;\n            temp3L >>= 16;\n            temp0R >>= 16;\n            temp1R >>= 16;\n            temp2R >>= 16;\n            temp3R >>= 16;\n            pOutputSamples[i*8+0] = (ma_int16)temp0L;\n            pOutputSamples[i*8+1] = (ma_int16)temp0R;\n            pOutputSamples[i*8+2] = (ma_int16)temp1L;\n            pOutputSamples[i*8+3] = (ma_int16)temp1R;\n            pOutputSamples[i*8+4] = (ma_int16)temp2L;\n            pOutputSamples[i*8+5] = (ma_int16)temp2R;\n            pOutputSamples[i*8+6] = (ma_int16)temp3L;\n            pOutputSamples[i*8+7] = (ma_int16)temp3R;\n        }\n    } else {\n        for (i = 0; i < frameCount4; ++i) {\n            ma_uint32 temp0L;\n            ma_uint32 temp1L;\n            ma_uint32 temp2L;\n            ma_uint32 temp3L;\n            ma_uint32 temp0R;\n            ma_uint32 temp1R;\n            ma_uint32 temp2R;\n            ma_uint32 temp3R;\n            ma_uint32 mid0  = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid1  = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid2  = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid3  = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid0 = (mid0 << 1) | (side0 & 0x01);\n            mid1 = (mid1 << 1) | (side1 & 0x01);\n            mid2 = (mid2 << 1) | (side2 & 0x01);\n            mid3 = (mid3 << 1) | (side3 & 0x01);\n            temp0L = ((ma_int32)(mid0 + side0) >> 1);\n            temp1L = ((ma_int32)(mid1 + side1) >> 1);\n            temp2L = ((ma_int32)(mid2 + side2) >> 1);\n            temp3L = ((ma_int32)(mid3 + side3) >> 1);\n            temp0R = ((ma_int32)(mid0 - side0) >> 1);\n            temp1R = ((ma_int32)(mid1 - side1) >> 1);\n            temp2R = ((ma_int32)(mid2 - side2) >> 1);\n            temp3R = ((ma_int32)(mid3 - side3) >> 1);\n            temp0L >>= 16;\n            temp1L >>= 16;\n            temp2L >>= 16;\n            temp3L >>= 16;\n            temp0R >>= 16;\n            temp1R >>= 16;\n            temp2R >>= 16;\n            temp3R >>= 16;\n            pOutputSamples[i*8+0] = (ma_int16)temp0L;\n            pOutputSamples[i*8+1] = (ma_int16)temp0R;\n            pOutputSamples[i*8+2] = (ma_int16)temp1L;\n            pOutputSamples[i*8+3] = (ma_int16)temp1R;\n            pOutputSamples[i*8+4] = (ma_int16)temp2L;\n            pOutputSamples[i*8+5] = (ma_int16)temp2R;\n            pOutputSamples[i*8+6] = (ma_int16)temp3L;\n            pOutputSamples[i*8+7] = (ma_int16)temp3R;\n        }\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n        ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n        mid = (mid << 1) | (side & 0x01);\n        pOutputSamples[i*2+0] = (ma_int16)(((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample) >> 16);\n        pOutputSamples[i*2+1] = (ma_int16)(((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample) >> 16);\n    }\n}\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift = unusedBitsPerSample;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    if (shift == 0) {\n        for (i = 0; i < frameCount4; ++i) {\n            __m128i mid;\n            __m128i side;\n            __m128i left;\n            __m128i right;\n            mid   = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n            side  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n            mid   = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01)));\n            left  = _mm_srai_epi32(_mm_add_epi32(mid, side), 1);\n            right = _mm_srai_epi32(_mm_sub_epi32(mid, side), 1);\n            left  = _mm_srai_epi32(left,  16);\n            right = _mm_srai_epi32(right, 16);\n            _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right));\n        }\n        for (i = (frameCount4 << 2); i < frameCount; ++i) {\n            ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid = (mid << 1) | (side & 0x01);\n            pOutputSamples[i*2+0] = (ma_int16)(((ma_int32)(mid + side) >> 1) >> 16);\n            pOutputSamples[i*2+1] = (ma_int16)(((ma_int32)(mid - side) >> 1) >> 16);\n        }\n    } else {\n        shift -= 1;\n        for (i = 0; i < frameCount4; ++i) {\n            __m128i mid;\n            __m128i side;\n            __m128i left;\n            __m128i right;\n            mid   = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n            side  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n            mid   = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01)));\n            left  = _mm_slli_epi32(_mm_add_epi32(mid, side), shift);\n            right = _mm_slli_epi32(_mm_sub_epi32(mid, side), shift);\n            left  = _mm_srai_epi32(left,  16);\n            right = _mm_srai_epi32(right, 16);\n            _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right));\n        }\n        for (i = (frameCount4 << 2); i < frameCount; ++i) {\n            ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid = (mid << 1) | (side & 0x01);\n            pOutputSamples[i*2+0] = (ma_int16)(((mid + side) << shift) >> 16);\n            pOutputSamples[i*2+1] = (ma_int16)(((mid - side) << shift) >> 16);\n        }\n    }\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift = unusedBitsPerSample;\n    int32x4_t wbpsShift0_4;\n    int32x4_t wbpsShift1_4;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    wbpsShift0_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n    wbpsShift1_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n    if (shift == 0) {\n        for (i = 0; i < frameCount4; ++i) {\n            uint32x4_t mid;\n            uint32x4_t side;\n            int32x4_t left;\n            int32x4_t right;\n            mid   = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4);\n            side  = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4);\n            mid   = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1)));\n            left  = vshrq_n_s32(vreinterpretq_s32_u32(vaddq_u32(mid, side)), 1);\n            right = vshrq_n_s32(vreinterpretq_s32_u32(vsubq_u32(mid, side)), 1);\n            left  = vshrq_n_s32(left,  16);\n            right = vshrq_n_s32(right, 16);\n            ma_dr_flac__vst2q_s16(pOutputSamples + i*8, vzip_s16(vmovn_s32(left), vmovn_s32(right)));\n        }\n        for (i = (frameCount4 << 2); i < frameCount; ++i) {\n            ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid = (mid << 1) | (side & 0x01);\n            pOutputSamples[i*2+0] = (ma_int16)(((ma_int32)(mid + side) >> 1) >> 16);\n            pOutputSamples[i*2+1] = (ma_int16)(((ma_int32)(mid - side) >> 1) >> 16);\n        }\n    } else {\n        int32x4_t shift4;\n        shift -= 1;\n        shift4 = vdupq_n_s32(shift);\n        for (i = 0; i < frameCount4; ++i) {\n            uint32x4_t mid;\n            uint32x4_t side;\n            int32x4_t left;\n            int32x4_t right;\n            mid   = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4);\n            side  = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4);\n            mid   = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1)));\n            left  = vreinterpretq_s32_u32(vshlq_u32(vaddq_u32(mid, side), shift4));\n            right = vreinterpretq_s32_u32(vshlq_u32(vsubq_u32(mid, side), shift4));\n            left  = vshrq_n_s32(left,  16);\n            right = vshrq_n_s32(right, 16);\n            ma_dr_flac__vst2q_s16(pOutputSamples + i*8, vzip_s16(vmovn_s32(left), vmovn_s32(right)));\n        }\n        for (i = (frameCount4 << 2); i < frameCount; ++i) {\n            ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid = (mid << 1) | (side & 0x01);\n            pOutputSamples[i*2+0] = (ma_int16)(((mid + side) << shift) >> 16);\n            pOutputSamples[i*2+1] = (ma_int16)(((mid - side) << shift) >> 16);\n        }\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_mid_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\n    if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s16__decode_mid_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#elif defined(MA_DR_FLAC_SUPPORT_NEON)\n    if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s16__decode_mid_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#endif\n    {\n#if 0\n        ma_dr_flac_read_pcm_frames_s16__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#else\n        ma_dr_flac_read_pcm_frames_s16__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#endif\n    }\n}\n#if 0\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    for (ma_uint64 i = 0; i < frameCount; ++i) {\n        pOutputSamples[i*2+0] = (ma_int16)((ma_int32)((ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample)) >> 16);\n        pOutputSamples[i*2+1] = (ma_int16)((ma_int32)((ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample)) >> 16);\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    for (i = 0; i < frameCount4; ++i) {\n        ma_uint32 tempL0 = pInputSamples0U32[i*4+0] << shift0;\n        ma_uint32 tempL1 = pInputSamples0U32[i*4+1] << shift0;\n        ma_uint32 tempL2 = pInputSamples0U32[i*4+2] << shift0;\n        ma_uint32 tempL3 = pInputSamples0U32[i*4+3] << shift0;\n        ma_uint32 tempR0 = pInputSamples1U32[i*4+0] << shift1;\n        ma_uint32 tempR1 = pInputSamples1U32[i*4+1] << shift1;\n        ma_uint32 tempR2 = pInputSamples1U32[i*4+2] << shift1;\n        ma_uint32 tempR3 = pInputSamples1U32[i*4+3] << shift1;\n        tempL0 >>= 16;\n        tempL1 >>= 16;\n        tempL2 >>= 16;\n        tempL3 >>= 16;\n        tempR0 >>= 16;\n        tempR1 >>= 16;\n        tempR2 >>= 16;\n        tempR3 >>= 16;\n        pOutputSamples[i*8+0] = (ma_int16)tempL0;\n        pOutputSamples[i*8+1] = (ma_int16)tempR0;\n        pOutputSamples[i*8+2] = (ma_int16)tempL1;\n        pOutputSamples[i*8+3] = (ma_int16)tempR1;\n        pOutputSamples[i*8+4] = (ma_int16)tempL2;\n        pOutputSamples[i*8+5] = (ma_int16)tempR2;\n        pOutputSamples[i*8+6] = (ma_int16)tempL3;\n        pOutputSamples[i*8+7] = (ma_int16)tempR3;\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        pOutputSamples[i*2+0] = (ma_int16)((pInputSamples0U32[i] << shift0) >> 16);\n        pOutputSamples[i*2+1] = (ma_int16)((pInputSamples1U32[i] << shift1) >> 16);\n    }\n}\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    for (i = 0; i < frameCount4; ++i) {\n        __m128i left  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0);\n        __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1);\n        left  = _mm_srai_epi32(left,  16);\n        right = _mm_srai_epi32(right, 16);\n        _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), ma_dr_flac__mm_packs_interleaved_epi32(left, right));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        pOutputSamples[i*2+0] = (ma_int16)((pInputSamples0U32[i] << shift0) >> 16);\n        pOutputSamples[i*2+1] = (ma_int16)((pInputSamples1U32[i] << shift1) >> 16);\n    }\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    int32x4_t shift0_4 = vdupq_n_s32(shift0);\n    int32x4_t shift1_4 = vdupq_n_s32(shift1);\n    for (i = 0; i < frameCount4; ++i) {\n        int32x4_t left;\n        int32x4_t right;\n        left  = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4));\n        right = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4));\n        left  = vshrq_n_s32(left,  16);\n        right = vshrq_n_s32(right, 16);\n        ma_dr_flac__vst2q_s16(pOutputSamples + i*8, vzip_s16(vmovn_s32(left), vmovn_s32(right)));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        pOutputSamples[i*2+0] = (ma_int16)((pInputSamples0U32[i] << shift0) >> 16);\n        pOutputSamples[i*2+1] = (ma_int16)((pInputSamples1U32[i] << shift1) >> 16);\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, ma_int16* pOutputSamples)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\n    if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#elif defined(MA_DR_FLAC_SUPPORT_NEON)\n    if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#endif\n    {\n#if 0\n        ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#else\n        ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#endif\n    }\n}\nMA_API ma_uint64 ma_dr_flac_read_pcm_frames_s16(ma_dr_flac* pFlac, ma_uint64 framesToRead, ma_int16* pBufferOut)\n{\n    ma_uint64 framesRead;\n    ma_uint32 unusedBitsPerSample;\n    if (pFlac == NULL || framesToRead == 0) {\n        return 0;\n    }\n    if (pBufferOut == NULL) {\n        return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, framesToRead);\n    }\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 32);\n    unusedBitsPerSample = 32 - pFlac->bitsPerSample;\n    framesRead = 0;\n    while (framesToRead > 0) {\n        if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) {\n            if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) {\n                break;\n            }\n        } else {\n            unsigned int channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment);\n            ma_uint64 iFirstPCMFrame = pFlac->currentFLACFrame.header.blockSizeInPCMFrames - pFlac->currentFLACFrame.pcmFramesRemaining;\n            ma_uint64 frameCountThisIteration = framesToRead;\n            if (frameCountThisIteration > pFlac->currentFLACFrame.pcmFramesRemaining) {\n                frameCountThisIteration = pFlac->currentFLACFrame.pcmFramesRemaining;\n            }\n            if (channelCount == 2) {\n                const ma_int32* pDecodedSamples0 = pFlac->currentFLACFrame.subframes[0].pSamplesS32 + iFirstPCMFrame;\n                const ma_int32* pDecodedSamples1 = pFlac->currentFLACFrame.subframes[1].pSamplesS32 + iFirstPCMFrame;\n                switch (pFlac->currentFLACFrame.header.channelAssignment)\n                {\n                    case MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE:\n                    {\n                        ma_dr_flac_read_pcm_frames_s16__decode_left_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut);\n                    } break;\n                    case MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE:\n                    {\n                        ma_dr_flac_read_pcm_frames_s16__decode_right_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut);\n                    } break;\n                    case MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE:\n                    {\n                        ma_dr_flac_read_pcm_frames_s16__decode_mid_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut);\n                    } break;\n                    case MA_DR_FLAC_CHANNEL_ASSIGNMENT_INDEPENDENT:\n                    default:\n                    {\n                        ma_dr_flac_read_pcm_frames_s16__decode_independent_stereo(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut);\n                    } break;\n                }\n            } else {\n                ma_uint64 i;\n                for (i = 0; i < frameCountThisIteration; ++i) {\n                    unsigned int j;\n                    for (j = 0; j < channelCount; ++j) {\n                        ma_int32 sampleS32 = (ma_int32)((ma_uint32)(pFlac->currentFLACFrame.subframes[j].pSamplesS32[iFirstPCMFrame + i]) << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[j].wastedBitsPerSample));\n                        pBufferOut[(i*channelCount)+j] = (ma_int16)(sampleS32 >> 16);\n                    }\n                }\n            }\n            framesRead                += frameCountThisIteration;\n            pBufferOut                += frameCountThisIteration * channelCount;\n            framesToRead              -= frameCountThisIteration;\n            pFlac->currentPCMFrame    += frameCountThisIteration;\n            pFlac->currentFLACFrame.pcmFramesRemaining -= (ma_uint32)frameCountThisIteration;\n        }\n    }\n    return framesRead;\n}\n#if 0\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    for (i = 0; i < frameCount; ++i) {\n        ma_uint32 left  = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n        ma_uint32 side  = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n        ma_uint32 right = left - side;\n        pOutputSamples[i*2+0] = (float)((ma_int32)left  / 2147483648.0);\n        pOutputSamples[i*2+1] = (float)((ma_int32)right / 2147483648.0);\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    float factor = 1 / 2147483648.0;\n    for (i = 0; i < frameCount4; ++i) {\n        ma_uint32 left0 = pInputSamples0U32[i*4+0] << shift0;\n        ma_uint32 left1 = pInputSamples0U32[i*4+1] << shift0;\n        ma_uint32 left2 = pInputSamples0U32[i*4+2] << shift0;\n        ma_uint32 left3 = pInputSamples0U32[i*4+3] << shift0;\n        ma_uint32 side0 = pInputSamples1U32[i*4+0] << shift1;\n        ma_uint32 side1 = pInputSamples1U32[i*4+1] << shift1;\n        ma_uint32 side2 = pInputSamples1U32[i*4+2] << shift1;\n        ma_uint32 side3 = pInputSamples1U32[i*4+3] << shift1;\n        ma_uint32 right0 = left0 - side0;\n        ma_uint32 right1 = left1 - side1;\n        ma_uint32 right2 = left2 - side2;\n        ma_uint32 right3 = left3 - side3;\n        pOutputSamples[i*8+0] = (ma_int32)left0  * factor;\n        pOutputSamples[i*8+1] = (ma_int32)right0 * factor;\n        pOutputSamples[i*8+2] = (ma_int32)left1  * factor;\n        pOutputSamples[i*8+3] = (ma_int32)right1 * factor;\n        pOutputSamples[i*8+4] = (ma_int32)left2  * factor;\n        pOutputSamples[i*8+5] = (ma_int32)right2 * factor;\n        pOutputSamples[i*8+6] = (ma_int32)left3  * factor;\n        pOutputSamples[i*8+7] = (ma_int32)right3 * factor;\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 left  = pInputSamples0U32[i] << shift0;\n        ma_uint32 side  = pInputSamples1U32[i] << shift1;\n        ma_uint32 right = left - side;\n        pOutputSamples[i*2+0] = (ma_int32)left  * factor;\n        pOutputSamples[i*2+1] = (ma_int32)right * factor;\n    }\n}\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8;\n    ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8;\n    __m128 factor;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    factor = _mm_set1_ps(1.0f / 8388608.0f);\n    for (i = 0; i < frameCount4; ++i) {\n        __m128i left  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0);\n        __m128i side  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1);\n        __m128i right = _mm_sub_epi32(left, side);\n        __m128 leftf  = _mm_mul_ps(_mm_cvtepi32_ps(left),  factor);\n        __m128 rightf = _mm_mul_ps(_mm_cvtepi32_ps(right), factor);\n        _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf));\n        _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 left  = pInputSamples0U32[i] << shift0;\n        ma_uint32 side  = pInputSamples1U32[i] << shift1;\n        ma_uint32 right = left - side;\n        pOutputSamples[i*2+0] = (ma_int32)left  / 8388608.0f;\n        pOutputSamples[i*2+1] = (ma_int32)right / 8388608.0f;\n    }\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8;\n    ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8;\n    float32x4_t factor4;\n    int32x4_t shift0_4;\n    int32x4_t shift1_4;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    factor4  = vdupq_n_f32(1.0f / 8388608.0f);\n    shift0_4 = vdupq_n_s32(shift0);\n    shift1_4 = vdupq_n_s32(shift1);\n    for (i = 0; i < frameCount4; ++i) {\n        uint32x4_t left;\n        uint32x4_t side;\n        uint32x4_t right;\n        float32x4_t leftf;\n        float32x4_t rightf;\n        left   = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4);\n        side   = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4);\n        right  = vsubq_u32(left, side);\n        leftf  = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(left)),  factor4);\n        rightf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(right)), factor4);\n        ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 left  = pInputSamples0U32[i] << shift0;\n        ma_uint32 side  = pInputSamples1U32[i] << shift1;\n        ma_uint32 right = left - side;\n        pOutputSamples[i*2+0] = (ma_int32)left  / 8388608.0f;\n        pOutputSamples[i*2+1] = (ma_int32)right / 8388608.0f;\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_left_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\n    if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_f32__decode_left_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#elif defined(MA_DR_FLAC_SUPPORT_NEON)\n    if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_f32__decode_left_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#endif\n    {\n#if 0\n        ma_dr_flac_read_pcm_frames_f32__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#else\n        ma_dr_flac_read_pcm_frames_f32__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#endif\n    }\n}\n#if 0\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    for (i = 0; i < frameCount; ++i) {\n        ma_uint32 side  = (ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n        ma_uint32 right = (ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n        ma_uint32 left  = right + side;\n        pOutputSamples[i*2+0] = (float)((ma_int32)left  / 2147483648.0);\n        pOutputSamples[i*2+1] = (float)((ma_int32)right / 2147483648.0);\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    float factor = 1 / 2147483648.0;\n    for (i = 0; i < frameCount4; ++i) {\n        ma_uint32 side0  = pInputSamples0U32[i*4+0] << shift0;\n        ma_uint32 side1  = pInputSamples0U32[i*4+1] << shift0;\n        ma_uint32 side2  = pInputSamples0U32[i*4+2] << shift0;\n        ma_uint32 side3  = pInputSamples0U32[i*4+3] << shift0;\n        ma_uint32 right0 = pInputSamples1U32[i*4+0] << shift1;\n        ma_uint32 right1 = pInputSamples1U32[i*4+1] << shift1;\n        ma_uint32 right2 = pInputSamples1U32[i*4+2] << shift1;\n        ma_uint32 right3 = pInputSamples1U32[i*4+3] << shift1;\n        ma_uint32 left0 = right0 + side0;\n        ma_uint32 left1 = right1 + side1;\n        ma_uint32 left2 = right2 + side2;\n        ma_uint32 left3 = right3 + side3;\n        pOutputSamples[i*8+0] = (ma_int32)left0  * factor;\n        pOutputSamples[i*8+1] = (ma_int32)right0 * factor;\n        pOutputSamples[i*8+2] = (ma_int32)left1  * factor;\n        pOutputSamples[i*8+3] = (ma_int32)right1 * factor;\n        pOutputSamples[i*8+4] = (ma_int32)left2  * factor;\n        pOutputSamples[i*8+5] = (ma_int32)right2 * factor;\n        pOutputSamples[i*8+6] = (ma_int32)left3  * factor;\n        pOutputSamples[i*8+7] = (ma_int32)right3 * factor;\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 side  = pInputSamples0U32[i] << shift0;\n        ma_uint32 right = pInputSamples1U32[i] << shift1;\n        ma_uint32 left  = right + side;\n        pOutputSamples[i*2+0] = (ma_int32)left  * factor;\n        pOutputSamples[i*2+1] = (ma_int32)right * factor;\n    }\n}\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8;\n    ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8;\n    __m128 factor;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    factor = _mm_set1_ps(1.0f / 8388608.0f);\n    for (i = 0; i < frameCount4; ++i) {\n        __m128i side  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0);\n        __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1);\n        __m128i left  = _mm_add_epi32(right, side);\n        __m128 leftf  = _mm_mul_ps(_mm_cvtepi32_ps(left),  factor);\n        __m128 rightf = _mm_mul_ps(_mm_cvtepi32_ps(right), factor);\n        _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf));\n        _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 side  = pInputSamples0U32[i] << shift0;\n        ma_uint32 right = pInputSamples1U32[i] << shift1;\n        ma_uint32 left  = right + side;\n        pOutputSamples[i*2+0] = (ma_int32)left  / 8388608.0f;\n        pOutputSamples[i*2+1] = (ma_int32)right / 8388608.0f;\n    }\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8;\n    ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8;\n    float32x4_t factor4;\n    int32x4_t shift0_4;\n    int32x4_t shift1_4;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    factor4  = vdupq_n_f32(1.0f / 8388608.0f);\n    shift0_4 = vdupq_n_s32(shift0);\n    shift1_4 = vdupq_n_s32(shift1);\n    for (i = 0; i < frameCount4; ++i) {\n        uint32x4_t side;\n        uint32x4_t right;\n        uint32x4_t left;\n        float32x4_t leftf;\n        float32x4_t rightf;\n        side   = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4);\n        right  = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4);\n        left   = vaddq_u32(right, side);\n        leftf  = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(left)),  factor4);\n        rightf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(right)), factor4);\n        ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 side  = pInputSamples0U32[i] << shift0;\n        ma_uint32 right = pInputSamples1U32[i] << shift1;\n        ma_uint32 left  = right + side;\n        pOutputSamples[i*2+0] = (ma_int32)left  / 8388608.0f;\n        pOutputSamples[i*2+1] = (ma_int32)right / 8388608.0f;\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_right_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\n    if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_f32__decode_right_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#elif defined(MA_DR_FLAC_SUPPORT_NEON)\n    if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_f32__decode_right_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#endif\n    {\n#if 0\n        ma_dr_flac_read_pcm_frames_f32__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#else\n        ma_dr_flac_read_pcm_frames_f32__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#endif\n    }\n}\n#if 0\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    for (ma_uint64 i = 0; i < frameCount; ++i) {\n        ma_uint32 mid  = (ma_uint32)pInputSamples0[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n        ma_uint32 side = (ma_uint32)pInputSamples1[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n        mid = (mid << 1) | (side & 0x01);\n        pOutputSamples[i*2+0] = (float)((((ma_int32)(mid + side) >> 1) << (unusedBitsPerSample)) / 2147483648.0);\n        pOutputSamples[i*2+1] = (float)((((ma_int32)(mid - side) >> 1) << (unusedBitsPerSample)) / 2147483648.0);\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift = unusedBitsPerSample;\n    float factor = 1 / 2147483648.0;\n    if (shift > 0) {\n        shift -= 1;\n        for (i = 0; i < frameCount4; ++i) {\n            ma_uint32 temp0L;\n            ma_uint32 temp1L;\n            ma_uint32 temp2L;\n            ma_uint32 temp3L;\n            ma_uint32 temp0R;\n            ma_uint32 temp1R;\n            ma_uint32 temp2R;\n            ma_uint32 temp3R;\n            ma_uint32 mid0  = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid1  = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid2  = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid3  = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid0 = (mid0 << 1) | (side0 & 0x01);\n            mid1 = (mid1 << 1) | (side1 & 0x01);\n            mid2 = (mid2 << 1) | (side2 & 0x01);\n            mid3 = (mid3 << 1) | (side3 & 0x01);\n            temp0L = (mid0 + side0) << shift;\n            temp1L = (mid1 + side1) << shift;\n            temp2L = (mid2 + side2) << shift;\n            temp3L = (mid3 + side3) << shift;\n            temp0R = (mid0 - side0) << shift;\n            temp1R = (mid1 - side1) << shift;\n            temp2R = (mid2 - side2) << shift;\n            temp3R = (mid3 - side3) << shift;\n            pOutputSamples[i*8+0] = (ma_int32)temp0L * factor;\n            pOutputSamples[i*8+1] = (ma_int32)temp0R * factor;\n            pOutputSamples[i*8+2] = (ma_int32)temp1L * factor;\n            pOutputSamples[i*8+3] = (ma_int32)temp1R * factor;\n            pOutputSamples[i*8+4] = (ma_int32)temp2L * factor;\n            pOutputSamples[i*8+5] = (ma_int32)temp2R * factor;\n            pOutputSamples[i*8+6] = (ma_int32)temp3L * factor;\n            pOutputSamples[i*8+7] = (ma_int32)temp3R * factor;\n        }\n    } else {\n        for (i = 0; i < frameCount4; ++i) {\n            ma_uint32 temp0L;\n            ma_uint32 temp1L;\n            ma_uint32 temp2L;\n            ma_uint32 temp3L;\n            ma_uint32 temp0R;\n            ma_uint32 temp1R;\n            ma_uint32 temp2R;\n            ma_uint32 temp3R;\n            ma_uint32 mid0  = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid1  = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid2  = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 mid3  = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            ma_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid0 = (mid0 << 1) | (side0 & 0x01);\n            mid1 = (mid1 << 1) | (side1 & 0x01);\n            mid2 = (mid2 << 1) | (side2 & 0x01);\n            mid3 = (mid3 << 1) | (side3 & 0x01);\n            temp0L = (ma_uint32)((ma_int32)(mid0 + side0) >> 1);\n            temp1L = (ma_uint32)((ma_int32)(mid1 + side1) >> 1);\n            temp2L = (ma_uint32)((ma_int32)(mid2 + side2) >> 1);\n            temp3L = (ma_uint32)((ma_int32)(mid3 + side3) >> 1);\n            temp0R = (ma_uint32)((ma_int32)(mid0 - side0) >> 1);\n            temp1R = (ma_uint32)((ma_int32)(mid1 - side1) >> 1);\n            temp2R = (ma_uint32)((ma_int32)(mid2 - side2) >> 1);\n            temp3R = (ma_uint32)((ma_int32)(mid3 - side3) >> 1);\n            pOutputSamples[i*8+0] = (ma_int32)temp0L * factor;\n            pOutputSamples[i*8+1] = (ma_int32)temp0R * factor;\n            pOutputSamples[i*8+2] = (ma_int32)temp1L * factor;\n            pOutputSamples[i*8+3] = (ma_int32)temp1R * factor;\n            pOutputSamples[i*8+4] = (ma_int32)temp2L * factor;\n            pOutputSamples[i*8+5] = (ma_int32)temp2R * factor;\n            pOutputSamples[i*8+6] = (ma_int32)temp3L * factor;\n            pOutputSamples[i*8+7] = (ma_int32)temp3R * factor;\n        }\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n        ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n        mid = (mid << 1) | (side & 0x01);\n        pOutputSamples[i*2+0] = (ma_int32)((ma_uint32)((ma_int32)(mid + side) >> 1) << unusedBitsPerSample) * factor;\n        pOutputSamples[i*2+1] = (ma_int32)((ma_uint32)((ma_int32)(mid - side) >> 1) << unusedBitsPerSample) * factor;\n    }\n}\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift = unusedBitsPerSample - 8;\n    float factor;\n    __m128 factor128;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    factor = 1.0f / 8388608.0f;\n    factor128 = _mm_set1_ps(factor);\n    if (shift == 0) {\n        for (i = 0; i < frameCount4; ++i) {\n            __m128i mid;\n            __m128i side;\n            __m128i tempL;\n            __m128i tempR;\n            __m128  leftf;\n            __m128  rightf;\n            mid    = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n            side   = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n            mid    = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01)));\n            tempL  = _mm_srai_epi32(_mm_add_epi32(mid, side), 1);\n            tempR  = _mm_srai_epi32(_mm_sub_epi32(mid, side), 1);\n            leftf  = _mm_mul_ps(_mm_cvtepi32_ps(tempL), factor128);\n            rightf = _mm_mul_ps(_mm_cvtepi32_ps(tempR), factor128);\n            _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf));\n            _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf));\n        }\n        for (i = (frameCount4 << 2); i < frameCount; ++i) {\n            ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid = (mid << 1) | (side & 0x01);\n            pOutputSamples[i*2+0] = ((ma_int32)(mid + side) >> 1) * factor;\n            pOutputSamples[i*2+1] = ((ma_int32)(mid - side) >> 1) * factor;\n        }\n    } else {\n        shift -= 1;\n        for (i = 0; i < frameCount4; ++i) {\n            __m128i mid;\n            __m128i side;\n            __m128i tempL;\n            __m128i tempR;\n            __m128 leftf;\n            __m128 rightf;\n            mid    = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n            side   = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n            mid    = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01)));\n            tempL  = _mm_slli_epi32(_mm_add_epi32(mid, side), shift);\n            tempR  = _mm_slli_epi32(_mm_sub_epi32(mid, side), shift);\n            leftf  = _mm_mul_ps(_mm_cvtepi32_ps(tempL), factor128);\n            rightf = _mm_mul_ps(_mm_cvtepi32_ps(tempR), factor128);\n            _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf));\n            _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf));\n        }\n        for (i = (frameCount4 << 2); i < frameCount; ++i) {\n            ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid = (mid << 1) | (side & 0x01);\n            pOutputSamples[i*2+0] = (ma_int32)((mid + side) << shift) * factor;\n            pOutputSamples[i*2+1] = (ma_int32)((mid - side) << shift) * factor;\n        }\n    }\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift = unusedBitsPerSample - 8;\n    float factor;\n    float32x4_t factor4;\n    int32x4_t shift4;\n    int32x4_t wbps0_4;\n    int32x4_t wbps1_4;\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 24);\n    factor  = 1.0f / 8388608.0f;\n    factor4 = vdupq_n_f32(factor);\n    wbps0_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample);\n    wbps1_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample);\n    if (shift == 0) {\n        for (i = 0; i < frameCount4; ++i) {\n            int32x4_t lefti;\n            int32x4_t righti;\n            float32x4_t leftf;\n            float32x4_t rightf;\n            uint32x4_t mid  = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbps0_4);\n            uint32x4_t side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbps1_4);\n            mid    = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1)));\n            lefti  = vshrq_n_s32(vreinterpretq_s32_u32(vaddq_u32(mid, side)), 1);\n            righti = vshrq_n_s32(vreinterpretq_s32_u32(vsubq_u32(mid, side)), 1);\n            leftf  = vmulq_f32(vcvtq_f32_s32(lefti),  factor4);\n            rightf = vmulq_f32(vcvtq_f32_s32(righti), factor4);\n            ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf));\n        }\n        for (i = (frameCount4 << 2); i < frameCount; ++i) {\n            ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid = (mid << 1) | (side & 0x01);\n            pOutputSamples[i*2+0] = ((ma_int32)(mid + side) >> 1) * factor;\n            pOutputSamples[i*2+1] = ((ma_int32)(mid - side) >> 1) * factor;\n        }\n    } else {\n        shift -= 1;\n        shift4 = vdupq_n_s32(shift);\n        for (i = 0; i < frameCount4; ++i) {\n            uint32x4_t mid;\n            uint32x4_t side;\n            int32x4_t lefti;\n            int32x4_t righti;\n            float32x4_t leftf;\n            float32x4_t rightf;\n            mid    = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbps0_4);\n            side   = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbps1_4);\n            mid    = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1)));\n            lefti  = vreinterpretq_s32_u32(vshlq_u32(vaddq_u32(mid, side), shift4));\n            righti = vreinterpretq_s32_u32(vshlq_u32(vsubq_u32(mid, side), shift4));\n            leftf  = vmulq_f32(vcvtq_f32_s32(lefti),  factor4);\n            rightf = vmulq_f32(vcvtq_f32_s32(righti), factor4);\n            ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf));\n        }\n        for (i = (frameCount4 << 2); i < frameCount; ++i) {\n            ma_uint32 mid  = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n            ma_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n            mid = (mid << 1) | (side & 0x01);\n            pOutputSamples[i*2+0] = (ma_int32)((mid + side) << shift) * factor;\n            pOutputSamples[i*2+1] = (ma_int32)((mid - side) << shift) * factor;\n        }\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_mid_side(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\n    if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_f32__decode_mid_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#elif defined(MA_DR_FLAC_SUPPORT_NEON)\n    if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_f32__decode_mid_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#endif\n    {\n#if 0\n        ma_dr_flac_read_pcm_frames_f32__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#else\n        ma_dr_flac_read_pcm_frames_f32__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#endif\n    }\n}\n#if 0\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__reference(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    for (ma_uint64 i = 0; i < frameCount; ++i) {\n        pOutputSamples[i*2+0] = (float)((ma_int32)((ma_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample)) / 2147483648.0);\n        pOutputSamples[i*2+1] = (float)((ma_int32)((ma_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample)) / 2147483648.0);\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__scalar(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample;\n    ma_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample;\n    float factor = 1 / 2147483648.0;\n    for (i = 0; i < frameCount4; ++i) {\n        ma_uint32 tempL0 = pInputSamples0U32[i*4+0] << shift0;\n        ma_uint32 tempL1 = pInputSamples0U32[i*4+1] << shift0;\n        ma_uint32 tempL2 = pInputSamples0U32[i*4+2] << shift0;\n        ma_uint32 tempL3 = pInputSamples0U32[i*4+3] << shift0;\n        ma_uint32 tempR0 = pInputSamples1U32[i*4+0] << shift1;\n        ma_uint32 tempR1 = pInputSamples1U32[i*4+1] << shift1;\n        ma_uint32 tempR2 = pInputSamples1U32[i*4+2] << shift1;\n        ma_uint32 tempR3 = pInputSamples1U32[i*4+3] << shift1;\n        pOutputSamples[i*8+0] = (ma_int32)tempL0 * factor;\n        pOutputSamples[i*8+1] = (ma_int32)tempR0 * factor;\n        pOutputSamples[i*8+2] = (ma_int32)tempL1 * factor;\n        pOutputSamples[i*8+3] = (ma_int32)tempR1 * factor;\n        pOutputSamples[i*8+4] = (ma_int32)tempL2 * factor;\n        pOutputSamples[i*8+5] = (ma_int32)tempR2 * factor;\n        pOutputSamples[i*8+6] = (ma_int32)tempL3 * factor;\n        pOutputSamples[i*8+7] = (ma_int32)tempR3 * factor;\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0) * factor;\n        pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1) * factor;\n    }\n}\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__sse2(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8;\n    ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8;\n    float factor = 1.0f / 8388608.0f;\n    __m128 factor128 = _mm_set1_ps(factor);\n    for (i = 0; i < frameCount4; ++i) {\n        __m128i lefti;\n        __m128i righti;\n        __m128 leftf;\n        __m128 rightf;\n        lefti  = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0);\n        righti = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1);\n        leftf  = _mm_mul_ps(_mm_cvtepi32_ps(lefti),  factor128);\n        rightf = _mm_mul_ps(_mm_cvtepi32_ps(righti), factor128);\n        _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf));\n        _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0) * factor;\n        pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1) * factor;\n    }\n}\n#endif\n#if defined(MA_DR_FLAC_SUPPORT_NEON)\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__neon(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n    ma_uint64 i;\n    ma_uint64 frameCount4 = frameCount >> 2;\n    const ma_uint32* pInputSamples0U32 = (const ma_uint32*)pInputSamples0;\n    const ma_uint32* pInputSamples1U32 = (const ma_uint32*)pInputSamples1;\n    ma_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8;\n    ma_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8;\n    float factor = 1.0f / 8388608.0f;\n    float32x4_t factor4 = vdupq_n_f32(factor);\n    int32x4_t shift0_4  = vdupq_n_s32(shift0);\n    int32x4_t shift1_4  = vdupq_n_s32(shift1);\n    for (i = 0; i < frameCount4; ++i) {\n        int32x4_t lefti;\n        int32x4_t righti;\n        float32x4_t leftf;\n        float32x4_t rightf;\n        lefti  = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4));\n        righti = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4));\n        leftf  = vmulq_f32(vcvtq_f32_s32(lefti),  factor4);\n        rightf = vmulq_f32(vcvtq_f32_s32(righti), factor4);\n        ma_dr_flac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf));\n    }\n    for (i = (frameCount4 << 2); i < frameCount; ++i) {\n        pOutputSamples[i*2+0] = (ma_int32)(pInputSamples0U32[i] << shift0) * factor;\n        pOutputSamples[i*2+1] = (ma_int32)(pInputSamples1U32[i] << shift1) * factor;\n    }\n}\n#endif\nstatic MA_INLINE void ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo(ma_dr_flac* pFlac, ma_uint64 frameCount, ma_uint32 unusedBitsPerSample, const ma_int32* pInputSamples0, const ma_int32* pInputSamples1, float* pOutputSamples)\n{\n#if defined(MA_DR_FLAC_SUPPORT_SSE2)\n    if (ma_dr_flac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#elif defined(MA_DR_FLAC_SUPPORT_NEON)\n    if (ma_dr_flac__gIsNEONSupported && pFlac->bitsPerSample <= 24) {\n        ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n    } else\n#endif\n    {\n#if 0\n        ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#else\n        ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples);\n#endif\n    }\n}\nMA_API ma_uint64 ma_dr_flac_read_pcm_frames_f32(ma_dr_flac* pFlac, ma_uint64 framesToRead, float* pBufferOut)\n{\n    ma_uint64 framesRead;\n    ma_uint32 unusedBitsPerSample;\n    if (pFlac == NULL || framesToRead == 0) {\n        return 0;\n    }\n    if (pBufferOut == NULL) {\n        return ma_dr_flac__seek_forward_by_pcm_frames(pFlac, framesToRead);\n    }\n    MA_DR_FLAC_ASSERT(pFlac->bitsPerSample <= 32);\n    unusedBitsPerSample = 32 - pFlac->bitsPerSample;\n    framesRead = 0;\n    while (framesToRead > 0) {\n        if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) {\n            if (!ma_dr_flac__read_and_decode_next_flac_frame(pFlac)) {\n                break;\n            }\n        } else {\n            unsigned int channelCount = ma_dr_flac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment);\n            ma_uint64 iFirstPCMFrame = pFlac->currentFLACFrame.header.blockSizeInPCMFrames - pFlac->currentFLACFrame.pcmFramesRemaining;\n            ma_uint64 frameCountThisIteration = framesToRead;\n            if (frameCountThisIteration > pFlac->currentFLACFrame.pcmFramesRemaining) {\n                frameCountThisIteration = pFlac->currentFLACFrame.pcmFramesRemaining;\n            }\n            if (channelCount == 2) {\n                const ma_int32* pDecodedSamples0 = pFlac->currentFLACFrame.subframes[0].pSamplesS32 + iFirstPCMFrame;\n                const ma_int32* pDecodedSamples1 = pFlac->currentFLACFrame.subframes[1].pSamplesS32 + iFirstPCMFrame;\n                switch (pFlac->currentFLACFrame.header.channelAssignment)\n                {\n                    case MA_DR_FLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE:\n                    {\n                        ma_dr_flac_read_pcm_frames_f32__decode_left_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut);\n                    } break;\n                    case MA_DR_FLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE:\n                    {\n                        ma_dr_flac_read_pcm_frames_f32__decode_right_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut);\n                    } break;\n                    case MA_DR_FLAC_CHANNEL_ASSIGNMENT_MID_SIDE:\n                    {\n                        ma_dr_flac_read_pcm_frames_f32__decode_mid_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut);\n                    } break;\n                    case MA_DR_FLAC_CHANNEL_ASSIGNMENT_INDEPENDENT:\n                    default:\n                    {\n                        ma_dr_flac_read_pcm_frames_f32__decode_independent_stereo(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut);\n                    } break;\n                }\n            } else {\n                ma_uint64 i;\n                for (i = 0; i < frameCountThisIteration; ++i) {\n                    unsigned int j;\n                    for (j = 0; j < channelCount; ++j) {\n                        ma_int32 sampleS32 = (ma_int32)((ma_uint32)(pFlac->currentFLACFrame.subframes[j].pSamplesS32[iFirstPCMFrame + i]) << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[j].wastedBitsPerSample));\n                        pBufferOut[(i*channelCount)+j] = (float)(sampleS32 / 2147483648.0);\n                    }\n                }\n            }\n            framesRead                += frameCountThisIteration;\n            pBufferOut                += frameCountThisIteration * channelCount;\n            framesToRead              -= frameCountThisIteration;\n            pFlac->currentPCMFrame    += frameCountThisIteration;\n            pFlac->currentFLACFrame.pcmFramesRemaining -= (unsigned int)frameCountThisIteration;\n        }\n    }\n    return framesRead;\n}\nMA_API ma_bool32 ma_dr_flac_seek_to_pcm_frame(ma_dr_flac* pFlac, ma_uint64 pcmFrameIndex)\n{\n    if (pFlac == NULL) {\n        return MA_FALSE;\n    }\n    if (pFlac->currentPCMFrame == pcmFrameIndex) {\n        return MA_TRUE;\n    }\n    if (pFlac->firstFLACFramePosInBytes == 0) {\n        return MA_FALSE;\n    }\n    if (pcmFrameIndex == 0) {\n        pFlac->currentPCMFrame = 0;\n        return ma_dr_flac__seek_to_first_frame(pFlac);\n    } else {\n        ma_bool32 wasSuccessful = MA_FALSE;\n        ma_uint64 originalPCMFrame = pFlac->currentPCMFrame;\n        if (pcmFrameIndex > pFlac->totalPCMFrameCount) {\n            pcmFrameIndex = pFlac->totalPCMFrameCount;\n        }\n        if (pcmFrameIndex > pFlac->currentPCMFrame) {\n            ma_uint32 offset = (ma_uint32)(pcmFrameIndex - pFlac->currentPCMFrame);\n            if (pFlac->currentFLACFrame.pcmFramesRemaining >  offset) {\n                pFlac->currentFLACFrame.pcmFramesRemaining -= offset;\n                pFlac->currentPCMFrame = pcmFrameIndex;\n                return MA_TRUE;\n            }\n        } else {\n            ma_uint32 offsetAbs = (ma_uint32)(pFlac->currentPCMFrame - pcmFrameIndex);\n            ma_uint32 currentFLACFramePCMFrameCount = pFlac->currentFLACFrame.header.blockSizeInPCMFrames;\n            ma_uint32 currentFLACFramePCMFramesConsumed = currentFLACFramePCMFrameCount - pFlac->currentFLACFrame.pcmFramesRemaining;\n            if (currentFLACFramePCMFramesConsumed > offsetAbs) {\n                pFlac->currentFLACFrame.pcmFramesRemaining += offsetAbs;\n                pFlac->currentPCMFrame = pcmFrameIndex;\n                return MA_TRUE;\n            }\n        }\n#ifndef MA_DR_FLAC_NO_OGG\n        if (pFlac->container == ma_dr_flac_container_ogg)\n        {\n            wasSuccessful = ma_dr_flac_ogg__seek_to_pcm_frame(pFlac, pcmFrameIndex);\n        }\n        else\n#endif\n        {\n            if (!pFlac->_noSeekTableSeek) {\n                wasSuccessful = ma_dr_flac__seek_to_pcm_frame__seek_table(pFlac, pcmFrameIndex);\n            }\n#if !defined(MA_DR_FLAC_NO_CRC)\n            if (!wasSuccessful && !pFlac->_noBinarySearchSeek && pFlac->totalPCMFrameCount > 0) {\n                wasSuccessful = ma_dr_flac__seek_to_pcm_frame__binary_search(pFlac, pcmFrameIndex);\n            }\n#endif\n            if (!wasSuccessful && !pFlac->_noBruteForceSeek) {\n                wasSuccessful = ma_dr_flac__seek_to_pcm_frame__brute_force(pFlac, pcmFrameIndex);\n            }\n        }\n        if (wasSuccessful) {\n            pFlac->currentPCMFrame = pcmFrameIndex;\n        } else {\n            if (ma_dr_flac_seek_to_pcm_frame(pFlac, originalPCMFrame) == MA_FALSE) {\n                ma_dr_flac_seek_to_pcm_frame(pFlac, 0);\n            }\n        }\n        return wasSuccessful;\n    }\n}\n#define MA_DR_FLAC_DEFINE_FULL_READ_AND_CLOSE(extension, type) \\\nstatic type* ma_dr_flac__full_read_and_close_ ## extension (ma_dr_flac* pFlac, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalPCMFrameCountOut)\\\n{                                                                                                                                                                   \\\n    type* pSampleData = NULL;                                                                                                                                       \\\n    ma_uint64 totalPCMFrameCount;                                                                                                                               \\\n                                                                                                                                                                    \\\n    MA_DR_FLAC_ASSERT(pFlac != NULL);                                                                                                                                   \\\n                                                                                                                                                                    \\\n    totalPCMFrameCount = pFlac->totalPCMFrameCount;                                                                                                                 \\\n                                                                                                                                                                    \\\n    if (totalPCMFrameCount == 0) {                                                                                                                                  \\\n        type buffer[4096];                                                                                                                                          \\\n        ma_uint64 pcmFramesRead;                                                                                                                                \\\n        size_t sampleDataBufferSize = sizeof(buffer);                                                                                                               \\\n                                                                                                                                                                    \\\n        pSampleData = (type*)ma_dr_flac__malloc_from_callbacks(sampleDataBufferSize, &pFlac->allocationCallbacks);                                                      \\\n        if (pSampleData == NULL) {                                                                                                                                  \\\n            goto on_error;                                                                                                                                          \\\n        }                                                                                                                                                           \\\n                                                                                                                                                                    \\\n        while ((pcmFramesRead = (ma_uint64)ma_dr_flac_read_pcm_frames_##extension(pFlac, sizeof(buffer)/sizeof(buffer[0])/pFlac->channels, buffer)) > 0) {          \\\n            if (((totalPCMFrameCount + pcmFramesRead) * pFlac->channels * sizeof(type)) > sampleDataBufferSize) {                                                   \\\n                type* pNewSampleData;                                                                                                                               \\\n                size_t newSampleDataBufferSize;                                                                                                                     \\\n                                                                                                                                                                    \\\n                newSampleDataBufferSize = sampleDataBufferSize * 2;                                                                                                 \\\n                pNewSampleData = (type*)ma_dr_flac__realloc_from_callbacks(pSampleData, newSampleDataBufferSize, sampleDataBufferSize, &pFlac->allocationCallbacks);    \\\n                if (pNewSampleData == NULL) {                                                                                                                       \\\n                    ma_dr_flac__free_from_callbacks(pSampleData, &pFlac->allocationCallbacks);                                                                          \\\n                    goto on_error;                                                                                                                                  \\\n                }                                                                                                                                                   \\\n                                                                                                                                                                    \\\n                sampleDataBufferSize = newSampleDataBufferSize;                                                                                                     \\\n                pSampleData = pNewSampleData;                                                                                                                       \\\n            }                                                                                                                                                       \\\n                                                                                                                                                                    \\\n            MA_DR_FLAC_COPY_MEMORY(pSampleData + (totalPCMFrameCount*pFlac->channels), buffer, (size_t)(pcmFramesRead*pFlac->channels*sizeof(type)));                   \\\n            totalPCMFrameCount += pcmFramesRead;                                                                                                                    \\\n        }                                                                                                                                                           \\\n                                                                                                                                                                    \\\n                                                                                                                         \\\n        MA_DR_FLAC_ZERO_MEMORY(pSampleData + (totalPCMFrameCount*pFlac->channels), (size_t)(sampleDataBufferSize - totalPCMFrameCount*pFlac->channels*sizeof(type)));   \\\n    } else {                                                                                                                                                        \\\n        ma_uint64 dataSize = totalPCMFrameCount*pFlac->channels*sizeof(type);                                                                                   \\\n        if (dataSize > (ma_uint64)MA_SIZE_MAX) {                                                                                                            \\\n            goto on_error;                                                                                                        \\\n        }                                                                                                                                                           \\\n                                                                                                                                                                    \\\n        pSampleData = (type*)ma_dr_flac__malloc_from_callbacks((size_t)dataSize, &pFlac->allocationCallbacks);               \\\n        if (pSampleData == NULL) {                                                                                                                                  \\\n            goto on_error;                                                                                                                                          \\\n        }                                                                                                                                                           \\\n                                                                                                                                                                    \\\n        totalPCMFrameCount = ma_dr_flac_read_pcm_frames_##extension(pFlac, pFlac->totalPCMFrameCount, pSampleData);                                                     \\\n    }                                                                                                                                                               \\\n                                                                                                                                                                    \\\n    if (sampleRateOut) *sampleRateOut = pFlac->sampleRate;                                                                                                          \\\n    if (channelsOut) *channelsOut = pFlac->channels;                                                                                                                \\\n    if (totalPCMFrameCountOut) *totalPCMFrameCountOut = totalPCMFrameCount;                                                                                         \\\n                                                                                                                                                                    \\\n    ma_dr_flac_close(pFlac);                                                                                                                                            \\\n    return pSampleData;                                                                                                                                             \\\n                                                                                                                                                                    \\\non_error:                                                                                                                                                           \\\n    ma_dr_flac_close(pFlac);                                                                                                                                            \\\n    return NULL;                                                                                                                                                    \\\n}\nMA_DR_FLAC_DEFINE_FULL_READ_AND_CLOSE(s32, ma_int32)\nMA_DR_FLAC_DEFINE_FULL_READ_AND_CLOSE(s16, ma_int16)\nMA_DR_FLAC_DEFINE_FULL_READ_AND_CLOSE(f32, float)\nMA_API ma_int32* ma_dr_flac_open_and_read_pcm_frames_s32(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalPCMFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac* pFlac;\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (totalPCMFrameCountOut) {\n        *totalPCMFrameCountOut = 0;\n    }\n    pFlac = ma_dr_flac_open(onRead, onSeek, pUserData, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return NULL;\n    }\n    return ma_dr_flac__full_read_and_close_s32(pFlac, channelsOut, sampleRateOut, totalPCMFrameCountOut);\n}\nMA_API ma_int16* ma_dr_flac_open_and_read_pcm_frames_s16(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalPCMFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac* pFlac;\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (totalPCMFrameCountOut) {\n        *totalPCMFrameCountOut = 0;\n    }\n    pFlac = ma_dr_flac_open(onRead, onSeek, pUserData, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return NULL;\n    }\n    return ma_dr_flac__full_read_and_close_s16(pFlac, channelsOut, sampleRateOut, totalPCMFrameCountOut);\n}\nMA_API float* ma_dr_flac_open_and_read_pcm_frames_f32(ma_dr_flac_read_proc onRead, ma_dr_flac_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, ma_uint64* totalPCMFrameCountOut, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac* pFlac;\n    if (channelsOut) {\n        *channelsOut = 0;\n    }\n    if (sampleRateOut) {\n        *sampleRateOut = 0;\n    }\n    if (totalPCMFrameCountOut) {\n        *totalPCMFrameCountOut = 0;\n    }\n    pFlac = ma_dr_flac_open(onRead, onSeek, pUserData, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return NULL;\n    }\n    return ma_dr_flac__full_read_and_close_f32(pFlac, channelsOut, sampleRateOut, totalPCMFrameCountOut);\n}\n#ifndef MA_DR_FLAC_NO_STDIO\nMA_API ma_int32* ma_dr_flac_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac* pFlac;\n    if (sampleRate) {\n        *sampleRate = 0;\n    }\n    if (channels) {\n        *channels = 0;\n    }\n    if (totalPCMFrameCount) {\n        *totalPCMFrameCount = 0;\n    }\n    pFlac = ma_dr_flac_open_file(filename, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return NULL;\n    }\n    return ma_dr_flac__full_read_and_close_s32(pFlac, channels, sampleRate, totalPCMFrameCount);\n}\nMA_API ma_int16* ma_dr_flac_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac* pFlac;\n    if (sampleRate) {\n        *sampleRate = 0;\n    }\n    if (channels) {\n        *channels = 0;\n    }\n    if (totalPCMFrameCount) {\n        *totalPCMFrameCount = 0;\n    }\n    pFlac = ma_dr_flac_open_file(filename, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return NULL;\n    }\n    return ma_dr_flac__full_read_and_close_s16(pFlac, channels, sampleRate, totalPCMFrameCount);\n}\nMA_API float* ma_dr_flac_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac* pFlac;\n    if (sampleRate) {\n        *sampleRate = 0;\n    }\n    if (channels) {\n        *channels = 0;\n    }\n    if (totalPCMFrameCount) {\n        *totalPCMFrameCount = 0;\n    }\n    pFlac = ma_dr_flac_open_file(filename, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return NULL;\n    }\n    return ma_dr_flac__full_read_and_close_f32(pFlac, channels, sampleRate, totalPCMFrameCount);\n}\n#endif\nMA_API ma_int32* ma_dr_flac_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac* pFlac;\n    if (sampleRate) {\n        *sampleRate = 0;\n    }\n    if (channels) {\n        *channels = 0;\n    }\n    if (totalPCMFrameCount) {\n        *totalPCMFrameCount = 0;\n    }\n    pFlac = ma_dr_flac_open_memory(data, dataSize, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return NULL;\n    }\n    return ma_dr_flac__full_read_and_close_s32(pFlac, channels, sampleRate, totalPCMFrameCount);\n}\nMA_API ma_int16* ma_dr_flac_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac* pFlac;\n    if (sampleRate) {\n        *sampleRate = 0;\n    }\n    if (channels) {\n        *channels = 0;\n    }\n    if (totalPCMFrameCount) {\n        *totalPCMFrameCount = 0;\n    }\n    pFlac = ma_dr_flac_open_memory(data, dataSize, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return NULL;\n    }\n    return ma_dr_flac__full_read_and_close_s16(pFlac, channels, sampleRate, totalPCMFrameCount);\n}\nMA_API float* ma_dr_flac_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, ma_uint64* totalPCMFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_flac* pFlac;\n    if (sampleRate) {\n        *sampleRate = 0;\n    }\n    if (channels) {\n        *channels = 0;\n    }\n    if (totalPCMFrameCount) {\n        *totalPCMFrameCount = 0;\n    }\n    pFlac = ma_dr_flac_open_memory(data, dataSize, pAllocationCallbacks);\n    if (pFlac == NULL) {\n        return NULL;\n    }\n    return ma_dr_flac__full_read_and_close_f32(pFlac, channels, sampleRate, totalPCMFrameCount);\n}\nMA_API void ma_dr_flac_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks != NULL) {\n        ma_dr_flac__free_from_callbacks(p, pAllocationCallbacks);\n    } else {\n        ma_dr_flac__free_default(p, NULL);\n    }\n}\nMA_API void ma_dr_flac_init_vorbis_comment_iterator(ma_dr_flac_vorbis_comment_iterator* pIter, ma_uint32 commentCount, const void* pComments)\n{\n    if (pIter == NULL) {\n        return;\n    }\n    pIter->countRemaining = commentCount;\n    pIter->pRunningData   = (const char*)pComments;\n}\nMA_API const char* ma_dr_flac_next_vorbis_comment(ma_dr_flac_vorbis_comment_iterator* pIter, ma_uint32* pCommentLengthOut)\n{\n    ma_int32 length;\n    const char* pComment;\n    if (pCommentLengthOut) {\n        *pCommentLengthOut = 0;\n    }\n    if (pIter == NULL || pIter->countRemaining == 0 || pIter->pRunningData == NULL) {\n        return NULL;\n    }\n    length = ma_dr_flac__le2host_32_ptr_unaligned(pIter->pRunningData);\n    pIter->pRunningData += 4;\n    pComment = pIter->pRunningData;\n    pIter->pRunningData += length;\n    pIter->countRemaining -= 1;\n    if (pCommentLengthOut) {\n        *pCommentLengthOut = length;\n    }\n    return pComment;\n}\nMA_API void ma_dr_flac_init_cuesheet_track_iterator(ma_dr_flac_cuesheet_track_iterator* pIter, ma_uint32 trackCount, const void* pTrackData)\n{\n    if (pIter == NULL) {\n        return;\n    }\n    pIter->countRemaining = trackCount;\n    pIter->pRunningData   = (const char*)pTrackData;\n}\nMA_API ma_bool32 ma_dr_flac_next_cuesheet_track(ma_dr_flac_cuesheet_track_iterator* pIter, ma_dr_flac_cuesheet_track* pCuesheetTrack)\n{\n    ma_dr_flac_cuesheet_track cuesheetTrack;\n    const char* pRunningData;\n    ma_uint64 offsetHi;\n    ma_uint64 offsetLo;\n    if (pIter == NULL || pIter->countRemaining == 0 || pIter->pRunningData == NULL) {\n        return MA_FALSE;\n    }\n    pRunningData = pIter->pRunningData;\n    offsetHi                   = ma_dr_flac__be2host_32(*(const ma_uint32*)pRunningData); pRunningData += 4;\n    offsetLo                   = ma_dr_flac__be2host_32(*(const ma_uint32*)pRunningData); pRunningData += 4;\n    cuesheetTrack.offset       = offsetLo | (offsetHi << 32);\n    cuesheetTrack.trackNumber  = pRunningData[0];                                         pRunningData += 1;\n    MA_DR_FLAC_COPY_MEMORY(cuesheetTrack.ISRC, pRunningData, sizeof(cuesheetTrack.ISRC));     pRunningData += 12;\n    cuesheetTrack.isAudio      = (pRunningData[0] & 0x80) != 0;\n    cuesheetTrack.preEmphasis  = (pRunningData[0] & 0x40) != 0;                           pRunningData += 14;\n    cuesheetTrack.indexCount   = pRunningData[0];                                         pRunningData += 1;\n    cuesheetTrack.pIndexPoints = (const ma_dr_flac_cuesheet_track_index*)pRunningData;        pRunningData += cuesheetTrack.indexCount * sizeof(ma_dr_flac_cuesheet_track_index);\n    pIter->pRunningData = pRunningData;\n    pIter->countRemaining -= 1;\n    if (pCuesheetTrack) {\n        *pCuesheetTrack = cuesheetTrack;\n    }\n    return MA_TRUE;\n}\n#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))\n    #pragma GCC diagnostic pop\n#endif\n#endif\n/* dr_flac_c end */\n#endif  /* MA_DR_FLAC_IMPLEMENTATION */\n#endif  /* MA_NO_FLAC */\n\n#if !defined(MA_NO_MP3) && !defined(MA_NO_DECODING)\n#if !defined(MA_DR_MP3_IMPLEMENTATION) && !defined(MA_DR_MP3_IMPLEMENTATION) /* For backwards compatibility. Will be removed in version 0.11 for cleanliness. */\n/* dr_mp3_c begin */\n#ifndef ma_dr_mp3_c\n#define ma_dr_mp3_c\n#include <stdlib.h>\n#include <string.h>\n#include <limits.h>\nMA_API void ma_dr_mp3_version(ma_uint32* pMajor, ma_uint32* pMinor, ma_uint32* pRevision)\n{\n    if (pMajor) {\n        *pMajor = MA_DR_MP3_VERSION_MAJOR;\n    }\n    if (pMinor) {\n        *pMinor = MA_DR_MP3_VERSION_MINOR;\n    }\n    if (pRevision) {\n        *pRevision = MA_DR_MP3_VERSION_REVISION;\n    }\n}\nMA_API const char* ma_dr_mp3_version_string(void)\n{\n    return MA_DR_MP3_VERSION_STRING;\n}\n#if defined(__TINYC__)\n#define MA_DR_MP3_NO_SIMD\n#endif\n#define MA_DR_MP3_OFFSET_PTR(p, offset) ((void*)((ma_uint8*)(p) + (offset)))\n#define MA_DR_MP3_MAX_FREE_FORMAT_FRAME_SIZE  2304\n#ifndef MA_DR_MP3_MAX_FRAME_SYNC_MATCHES\n#define MA_DR_MP3_MAX_FRAME_SYNC_MATCHES      10\n#endif\n#define MA_DR_MP3_MAX_L3_FRAME_PAYLOAD_BYTES  MA_DR_MP3_MAX_FREE_FORMAT_FRAME_SIZE\n#define MA_DR_MP3_MAX_BITRESERVOIR_BYTES      511\n#define MA_DR_MP3_SHORT_BLOCK_TYPE            2\n#define MA_DR_MP3_STOP_BLOCK_TYPE             3\n#define MA_DR_MP3_MODE_MONO                   3\n#define MA_DR_MP3_MODE_JOINT_STEREO           1\n#define MA_DR_MP3_HDR_SIZE                    4\n#define MA_DR_MP3_HDR_IS_MONO(h)              (((h[3]) & 0xC0) == 0xC0)\n#define MA_DR_MP3_HDR_IS_MS_STEREO(h)         (((h[3]) & 0xE0) == 0x60)\n#define MA_DR_MP3_HDR_IS_FREE_FORMAT(h)       (((h[2]) & 0xF0) == 0)\n#define MA_DR_MP3_HDR_IS_CRC(h)               (!((h[1]) & 1))\n#define MA_DR_MP3_HDR_TEST_PADDING(h)         ((h[2]) & 0x2)\n#define MA_DR_MP3_HDR_TEST_MPEG1(h)           ((h[1]) & 0x8)\n#define MA_DR_MP3_HDR_TEST_NOT_MPEG25(h)      ((h[1]) & 0x10)\n#define MA_DR_MP3_HDR_TEST_I_STEREO(h)        ((h[3]) & 0x10)\n#define MA_DR_MP3_HDR_TEST_MS_STEREO(h)       ((h[3]) & 0x20)\n#define MA_DR_MP3_HDR_GET_STEREO_MODE(h)      (((h[3]) >> 6) & 3)\n#define MA_DR_MP3_HDR_GET_STEREO_MODE_EXT(h)  (((h[3]) >> 4) & 3)\n#define MA_DR_MP3_HDR_GET_LAYER(h)            (((h[1]) >> 1) & 3)\n#define MA_DR_MP3_HDR_GET_BITRATE(h)          ((h[2]) >> 4)\n#define MA_DR_MP3_HDR_GET_SAMPLE_RATE(h)      (((h[2]) >> 2) & 3)\n#define MA_DR_MP3_HDR_GET_MY_SAMPLE_RATE(h)   (MA_DR_MP3_HDR_GET_SAMPLE_RATE(h) + (((h[1] >> 3) & 1) + ((h[1] >> 4) & 1))*3)\n#define MA_DR_MP3_HDR_IS_FRAME_576(h)         ((h[1] & 14) == 2)\n#define MA_DR_MP3_HDR_IS_LAYER_1(h)           ((h[1] & 6) == 6)\n#define MA_DR_MP3_BITS_DEQUANTIZER_OUT        -1\n#define MA_DR_MP3_MAX_SCF                     (255 + MA_DR_MP3_BITS_DEQUANTIZER_OUT*4 - 210)\n#define MA_DR_MP3_MAX_SCFI                    ((MA_DR_MP3_MAX_SCF + 3) & ~3)\n#define MA_DR_MP3_MIN(a, b)           ((a) > (b) ? (b) : (a))\n#define MA_DR_MP3_MAX(a, b)           ((a) < (b) ? (b) : (a))\n#if !defined(MA_DR_MP3_NO_SIMD)\n#if !defined(MA_DR_MP3_ONLY_SIMD) && (defined(_M_X64) || defined(__x86_64__) || defined(__aarch64__) || defined(_M_ARM64))\n#define MA_DR_MP3_ONLY_SIMD\n#endif\n#if ((defined(_MSC_VER) && _MSC_VER >= 1400) && defined(_M_X64)) || ((defined(__i386) || defined(_M_IX86) || defined(__i386__) || defined(__x86_64__)) && ((defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__)))\n#if defined(_MSC_VER)\n#include <intrin.h>\n#endif\n#include <emmintrin.h>\n#define MA_DR_MP3_HAVE_SSE 1\n#define MA_DR_MP3_HAVE_SIMD 1\n#define MA_DR_MP3_VSTORE _mm_storeu_ps\n#define MA_DR_MP3_VLD _mm_loadu_ps\n#define MA_DR_MP3_VSET _mm_set1_ps\n#define MA_DR_MP3_VADD _mm_add_ps\n#define MA_DR_MP3_VSUB _mm_sub_ps\n#define MA_DR_MP3_VMUL _mm_mul_ps\n#define MA_DR_MP3_VMAC(a, x, y) _mm_add_ps(a, _mm_mul_ps(x, y))\n#define MA_DR_MP3_VMSB(a, x, y) _mm_sub_ps(a, _mm_mul_ps(x, y))\n#define MA_DR_MP3_VMUL_S(x, s)  _mm_mul_ps(x, _mm_set1_ps(s))\n#define MA_DR_MP3_VREV(x) _mm_shuffle_ps(x, x, _MM_SHUFFLE(0, 1, 2, 3))\ntypedef __m128 ma_dr_mp3_f4;\n#if defined(_MSC_VER) || defined(MA_DR_MP3_ONLY_SIMD)\n#define ma_dr_mp3_cpuid __cpuid\n#else\nstatic __inline__ __attribute__((always_inline)) void ma_dr_mp3_cpuid(int CPUInfo[], const int InfoType)\n{\n#if defined(__PIC__)\n    __asm__ __volatile__(\n#if defined(__x86_64__)\n        \"push %%rbx\\n\"\n        \"cpuid\\n\"\n        \"xchgl %%ebx, %1\\n\"\n        \"pop  %%rbx\\n\"\n#else\n        \"xchgl %%ebx, %1\\n\"\n        \"cpuid\\n\"\n        \"xchgl %%ebx, %1\\n\"\n#endif\n        : \"=a\" (CPUInfo[0]), \"=r\" (CPUInfo[1]), \"=c\" (CPUInfo[2]), \"=d\" (CPUInfo[3])\n        : \"a\" (InfoType));\n#else\n    __asm__ __volatile__(\n        \"cpuid\"\n        : \"=a\" (CPUInfo[0]), \"=b\" (CPUInfo[1]), \"=c\" (CPUInfo[2]), \"=d\" (CPUInfo[3])\n        : \"a\" (InfoType));\n#endif\n}\n#endif\nstatic int ma_dr_mp3_have_simd(void)\n{\n#ifdef MA_DR_MP3_ONLY_SIMD\n    return 1;\n#else\n    static int g_have_simd;\n    int CPUInfo[4];\n#ifdef MINIMP3_TEST\n    static int g_counter;\n    if (g_counter++ > 100)\n        return 0;\n#endif\n    if (g_have_simd)\n        goto end;\n    ma_dr_mp3_cpuid(CPUInfo, 0);\n    if (CPUInfo[0] > 0)\n    {\n        ma_dr_mp3_cpuid(CPUInfo, 1);\n        g_have_simd = (CPUInfo[3] & (1 << 26)) + 1;\n        return g_have_simd - 1;\n    }\nend:\n    return g_have_simd - 1;\n#endif\n}\n#elif defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)\n#include <arm_neon.h>\n#define MA_DR_MP3_HAVE_SSE 0\n#define MA_DR_MP3_HAVE_SIMD 1\n#define MA_DR_MP3_VSTORE vst1q_f32\n#define MA_DR_MP3_VLD vld1q_f32\n#define MA_DR_MP3_VSET vmovq_n_f32\n#define MA_DR_MP3_VADD vaddq_f32\n#define MA_DR_MP3_VSUB vsubq_f32\n#define MA_DR_MP3_VMUL vmulq_f32\n#define MA_DR_MP3_VMAC(a, x, y) vmlaq_f32(a, x, y)\n#define MA_DR_MP3_VMSB(a, x, y) vmlsq_f32(a, x, y)\n#define MA_DR_MP3_VMUL_S(x, s)  vmulq_f32(x, vmovq_n_f32(s))\n#define MA_DR_MP3_VREV(x) vcombine_f32(vget_high_f32(vrev64q_f32(x)), vget_low_f32(vrev64q_f32(x)))\ntypedef float32x4_t ma_dr_mp3_f4;\nstatic int ma_dr_mp3_have_simd(void)\n{\n    return 1;\n}\n#else\n#define MA_DR_MP3_HAVE_SSE 0\n#define MA_DR_MP3_HAVE_SIMD 0\n#ifdef MA_DR_MP3_ONLY_SIMD\n#error MA_DR_MP3_ONLY_SIMD used, but SSE/NEON not enabled\n#endif\n#endif\n#else\n#define MA_DR_MP3_HAVE_SIMD 0\n#endif\n#if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64) && !defined(__ARM_ARCH_6M__)\n#define MA_DR_MP3_HAVE_ARMV6 1\nstatic __inline__ __attribute__((always_inline)) ma_int32 ma_dr_mp3_clip_int16_arm(ma_int32 a)\n{\n    ma_int32 x = 0;\n    __asm__ (\"ssat %0, #16, %1\" : \"=r\"(x) : \"r\"(a));\n    return x;\n}\n#else\n#define MA_DR_MP3_HAVE_ARMV6 0\n#endif\n#ifndef MA_DR_MP3_ASSERT\n#include <assert.h>\n#define MA_DR_MP3_ASSERT(expression) assert(expression)\n#endif\n#ifndef MA_DR_MP3_COPY_MEMORY\n#define MA_DR_MP3_COPY_MEMORY(dst, src, sz) memcpy((dst), (src), (sz))\n#endif\n#ifndef MA_DR_MP3_MOVE_MEMORY\n#define MA_DR_MP3_MOVE_MEMORY(dst, src, sz) memmove((dst), (src), (sz))\n#endif\n#ifndef MA_DR_MP3_ZERO_MEMORY\n#define MA_DR_MP3_ZERO_MEMORY(p, sz) memset((p), 0, (sz))\n#endif\n#define MA_DR_MP3_ZERO_OBJECT(p) MA_DR_MP3_ZERO_MEMORY((p), sizeof(*(p)))\n#ifndef MA_DR_MP3_MALLOC\n#define MA_DR_MP3_MALLOC(sz) malloc((sz))\n#endif\n#ifndef MA_DR_MP3_REALLOC\n#define MA_DR_MP3_REALLOC(p, sz) realloc((p), (sz))\n#endif\n#ifndef MA_DR_MP3_FREE\n#define MA_DR_MP3_FREE(p) free((p))\n#endif\ntypedef struct\n{\n    const ma_uint8 *buf;\n    int pos, limit;\n} ma_dr_mp3_bs;\ntypedef struct\n{\n    float scf[3*64];\n    ma_uint8 total_bands, stereo_bands, bitalloc[64], scfcod[64];\n} ma_dr_mp3_L12_scale_info;\ntypedef struct\n{\n    ma_uint8 tab_offset, code_tab_width, band_count;\n} ma_dr_mp3_L12_subband_alloc;\ntypedef struct\n{\n    const ma_uint8 *sfbtab;\n    ma_uint16 part_23_length, big_values, scalefac_compress;\n    ma_uint8 global_gain, block_type, mixed_block_flag, n_long_sfb, n_short_sfb;\n    ma_uint8 table_select[3], region_count[3], subblock_gain[3];\n    ma_uint8 preflag, scalefac_scale, count1_table, scfsi;\n} ma_dr_mp3_L3_gr_info;\ntypedef struct\n{\n    ma_dr_mp3_bs bs;\n    ma_uint8 maindata[MA_DR_MP3_MAX_BITRESERVOIR_BYTES + MA_DR_MP3_MAX_L3_FRAME_PAYLOAD_BYTES];\n    ma_dr_mp3_L3_gr_info gr_info[4];\n    float grbuf[2][576], scf[40], syn[18 + 15][2*32];\n    ma_uint8 ist_pos[2][39];\n} ma_dr_mp3dec_scratch;\nstatic void ma_dr_mp3_bs_init(ma_dr_mp3_bs *bs, const ma_uint8 *data, int bytes)\n{\n    bs->buf   = data;\n    bs->pos   = 0;\n    bs->limit = bytes*8;\n}\nstatic ma_uint32 ma_dr_mp3_bs_get_bits(ma_dr_mp3_bs *bs, int n)\n{\n    ma_uint32 next, cache = 0, s = bs->pos & 7;\n    int shl = n + s;\n    const ma_uint8 *p = bs->buf + (bs->pos >> 3);\n    if ((bs->pos += n) > bs->limit)\n        return 0;\n    next = *p++ & (255 >> s);\n    while ((shl -= 8) > 0)\n    {\n        cache |= next << shl;\n        next = *p++;\n    }\n    return cache | (next >> -shl);\n}\nstatic int ma_dr_mp3_hdr_valid(const ma_uint8 *h)\n{\n    return h[0] == 0xff &&\n        ((h[1] & 0xF0) == 0xf0 || (h[1] & 0xFE) == 0xe2) &&\n        (MA_DR_MP3_HDR_GET_LAYER(h) != 0) &&\n        (MA_DR_MP3_HDR_GET_BITRATE(h) != 15) &&\n        (MA_DR_MP3_HDR_GET_SAMPLE_RATE(h) != 3);\n}\nstatic int ma_dr_mp3_hdr_compare(const ma_uint8 *h1, const ma_uint8 *h2)\n{\n    return ma_dr_mp3_hdr_valid(h2) &&\n        ((h1[1] ^ h2[1]) & 0xFE) == 0 &&\n        ((h1[2] ^ h2[2]) & 0x0C) == 0 &&\n        !(MA_DR_MP3_HDR_IS_FREE_FORMAT(h1) ^ MA_DR_MP3_HDR_IS_FREE_FORMAT(h2));\n}\nstatic unsigned ma_dr_mp3_hdr_bitrate_kbps(const ma_uint8 *h)\n{\n    static const ma_uint8 halfrate[2][3][15] = {\n        { { 0,4,8,12,16,20,24,28,32,40,48,56,64,72,80 }, { 0,4,8,12,16,20,24,28,32,40,48,56,64,72,80 }, { 0,16,24,28,32,40,48,56,64,72,80,88,96,112,128 } },\n        { { 0,16,20,24,28,32,40,48,56,64,80,96,112,128,160 }, { 0,16,24,28,32,40,48,56,64,80,96,112,128,160,192 }, { 0,16,32,48,64,80,96,112,128,144,160,176,192,208,224 } },\n    };\n    return 2*halfrate[!!MA_DR_MP3_HDR_TEST_MPEG1(h)][MA_DR_MP3_HDR_GET_LAYER(h) - 1][MA_DR_MP3_HDR_GET_BITRATE(h)];\n}\nstatic unsigned ma_dr_mp3_hdr_sample_rate_hz(const ma_uint8 *h)\n{\n    static const unsigned g_hz[3] = { 44100, 48000, 32000 };\n    return g_hz[MA_DR_MP3_HDR_GET_SAMPLE_RATE(h)] >> (int)!MA_DR_MP3_HDR_TEST_MPEG1(h) >> (int)!MA_DR_MP3_HDR_TEST_NOT_MPEG25(h);\n}\nstatic unsigned ma_dr_mp3_hdr_frame_samples(const ma_uint8 *h)\n{\n    return MA_DR_MP3_HDR_IS_LAYER_1(h) ? 384 : (1152 >> (int)MA_DR_MP3_HDR_IS_FRAME_576(h));\n}\nstatic int ma_dr_mp3_hdr_frame_bytes(const ma_uint8 *h, int free_format_size)\n{\n    int frame_bytes = ma_dr_mp3_hdr_frame_samples(h)*ma_dr_mp3_hdr_bitrate_kbps(h)*125/ma_dr_mp3_hdr_sample_rate_hz(h);\n    if (MA_DR_MP3_HDR_IS_LAYER_1(h))\n    {\n        frame_bytes &= ~3;\n    }\n    return frame_bytes ? frame_bytes : free_format_size;\n}\nstatic int ma_dr_mp3_hdr_padding(const ma_uint8 *h)\n{\n    return MA_DR_MP3_HDR_TEST_PADDING(h) ? (MA_DR_MP3_HDR_IS_LAYER_1(h) ? 4 : 1) : 0;\n}\n#ifndef MA_DR_MP3_ONLY_MP3\nstatic const ma_dr_mp3_L12_subband_alloc *ma_dr_mp3_L12_subband_alloc_table(const ma_uint8 *hdr, ma_dr_mp3_L12_scale_info *sci)\n{\n    const ma_dr_mp3_L12_subband_alloc *alloc;\n    int mode = MA_DR_MP3_HDR_GET_STEREO_MODE(hdr);\n    int nbands, stereo_bands = (mode == MA_DR_MP3_MODE_MONO) ? 0 : (mode == MA_DR_MP3_MODE_JOINT_STEREO) ? (MA_DR_MP3_HDR_GET_STEREO_MODE_EXT(hdr) << 2) + 4 : 32;\n    if (MA_DR_MP3_HDR_IS_LAYER_1(hdr))\n    {\n        static const ma_dr_mp3_L12_subband_alloc g_alloc_L1[] = { { 76, 4, 32 } };\n        alloc = g_alloc_L1;\n        nbands = 32;\n    } else if (!MA_DR_MP3_HDR_TEST_MPEG1(hdr))\n    {\n        static const ma_dr_mp3_L12_subband_alloc g_alloc_L2M2[] = { { 60, 4, 4 }, { 44, 3, 7 }, { 44, 2, 19 } };\n        alloc = g_alloc_L2M2;\n        nbands = 30;\n    } else\n    {\n        static const ma_dr_mp3_L12_subband_alloc g_alloc_L2M1[] = { { 0, 4, 3 }, { 16, 4, 8 }, { 32, 3, 12 }, { 40, 2, 7 } };\n        int sample_rate_idx = MA_DR_MP3_HDR_GET_SAMPLE_RATE(hdr);\n        unsigned kbps = ma_dr_mp3_hdr_bitrate_kbps(hdr) >> (int)(mode != MA_DR_MP3_MODE_MONO);\n        if (!kbps)\n        {\n            kbps = 192;\n        }\n        alloc = g_alloc_L2M1;\n        nbands = 27;\n        if (kbps < 56)\n        {\n            static const ma_dr_mp3_L12_subband_alloc g_alloc_L2M1_lowrate[] = { { 44, 4, 2 }, { 44, 3, 10 } };\n            alloc = g_alloc_L2M1_lowrate;\n            nbands = sample_rate_idx == 2 ? 12 : 8;\n        } else if (kbps >= 96 && sample_rate_idx != 1)\n        {\n            nbands = 30;\n        }\n    }\n    sci->total_bands = (ma_uint8)nbands;\n    sci->stereo_bands = (ma_uint8)MA_DR_MP3_MIN(stereo_bands, nbands);\n    return alloc;\n}\nstatic void ma_dr_mp3_L12_read_scalefactors(ma_dr_mp3_bs *bs, ma_uint8 *pba, ma_uint8 *scfcod, int bands, float *scf)\n{\n    static const float g_deq_L12[18*3] = {\n#define MA_DR_MP3_DQ(x) 9.53674316e-07f/x, 7.56931807e-07f/x, 6.00777173e-07f/x\n        MA_DR_MP3_DQ(3),MA_DR_MP3_DQ(7),MA_DR_MP3_DQ(15),MA_DR_MP3_DQ(31),MA_DR_MP3_DQ(63),MA_DR_MP3_DQ(127),MA_DR_MP3_DQ(255),MA_DR_MP3_DQ(511),MA_DR_MP3_DQ(1023),MA_DR_MP3_DQ(2047),MA_DR_MP3_DQ(4095),MA_DR_MP3_DQ(8191),MA_DR_MP3_DQ(16383),MA_DR_MP3_DQ(32767),MA_DR_MP3_DQ(65535),MA_DR_MP3_DQ(3),MA_DR_MP3_DQ(5),MA_DR_MP3_DQ(9)\n    };\n    int i, m;\n    for (i = 0; i < bands; i++)\n    {\n        float s = 0;\n        int ba = *pba++;\n        int mask = ba ? 4 + ((19 >> scfcod[i]) & 3) : 0;\n        for (m = 4; m; m >>= 1)\n        {\n            if (mask & m)\n            {\n                int b = ma_dr_mp3_bs_get_bits(bs, 6);\n                s = g_deq_L12[ba*3 - 6 + b % 3]*(int)(1 << 21 >> b/3);\n            }\n            *scf++ = s;\n        }\n    }\n}\nstatic void ma_dr_mp3_L12_read_scale_info(const ma_uint8 *hdr, ma_dr_mp3_bs *bs, ma_dr_mp3_L12_scale_info *sci)\n{\n    static const ma_uint8 g_bitalloc_code_tab[] = {\n        0,17, 3, 4, 5,6,7, 8,9,10,11,12,13,14,15,16,\n        0,17,18, 3,19,4,5, 6,7, 8, 9,10,11,12,13,16,\n        0,17,18, 3,19,4,5,16,\n        0,17,18,16,\n        0,17,18,19, 4,5,6, 7,8, 9,10,11,12,13,14,15,\n        0,17,18, 3,19,4,5, 6,7, 8, 9,10,11,12,13,14,\n        0, 2, 3, 4, 5,6,7, 8,9,10,11,12,13,14,15,16\n    };\n    const ma_dr_mp3_L12_subband_alloc *subband_alloc = ma_dr_mp3_L12_subband_alloc_table(hdr, sci);\n    int i, k = 0, ba_bits = 0;\n    const ma_uint8 *ba_code_tab = g_bitalloc_code_tab;\n    for (i = 0; i < sci->total_bands; i++)\n    {\n        ma_uint8 ba;\n        if (i == k)\n        {\n            k += subband_alloc->band_count;\n            ba_bits = subband_alloc->code_tab_width;\n            ba_code_tab = g_bitalloc_code_tab + subband_alloc->tab_offset;\n            subband_alloc++;\n        }\n        ba = ba_code_tab[ma_dr_mp3_bs_get_bits(bs, ba_bits)];\n        sci->bitalloc[2*i] = ba;\n        if (i < sci->stereo_bands)\n        {\n            ba = ba_code_tab[ma_dr_mp3_bs_get_bits(bs, ba_bits)];\n        }\n        sci->bitalloc[2*i + 1] = sci->stereo_bands ? ba : 0;\n    }\n    for (i = 0; i < 2*sci->total_bands; i++)\n    {\n        sci->scfcod[i] = (ma_uint8)(sci->bitalloc[i] ? MA_DR_MP3_HDR_IS_LAYER_1(hdr) ? 2 : ma_dr_mp3_bs_get_bits(bs, 2) : 6);\n    }\n    ma_dr_mp3_L12_read_scalefactors(bs, sci->bitalloc, sci->scfcod, sci->total_bands*2, sci->scf);\n    for (i = sci->stereo_bands; i < sci->total_bands; i++)\n    {\n        sci->bitalloc[2*i + 1] = 0;\n    }\n}\nstatic int ma_dr_mp3_L12_dequantize_granule(float *grbuf, ma_dr_mp3_bs *bs, ma_dr_mp3_L12_scale_info *sci, int group_size)\n{\n    int i, j, k, choff = 576;\n    for (j = 0; j < 4; j++)\n    {\n        float *dst = grbuf + group_size*j;\n        for (i = 0; i < 2*sci->total_bands; i++)\n        {\n            int ba = sci->bitalloc[i];\n            if (ba != 0)\n            {\n                if (ba < 17)\n                {\n                    int half = (1 << (ba - 1)) - 1;\n                    for (k = 0; k < group_size; k++)\n                    {\n                        dst[k] = (float)((int)ma_dr_mp3_bs_get_bits(bs, ba) - half);\n                    }\n                } else\n                {\n                    unsigned mod = (2 << (ba - 17)) + 1;\n                    unsigned code = ma_dr_mp3_bs_get_bits(bs, mod + 2 - (mod >> 3));\n                    for (k = 0; k < group_size; k++, code /= mod)\n                    {\n                        dst[k] = (float)((int)(code % mod - mod/2));\n                    }\n                }\n            }\n            dst += choff;\n            choff = 18 - choff;\n        }\n    }\n    return group_size*4;\n}\nstatic void ma_dr_mp3_L12_apply_scf_384(ma_dr_mp3_L12_scale_info *sci, const float *scf, float *dst)\n{\n    int i, k;\n    MA_DR_MP3_COPY_MEMORY(dst + 576 + sci->stereo_bands*18, dst + sci->stereo_bands*18, (sci->total_bands - sci->stereo_bands)*18*sizeof(float));\n    for (i = 0; i < sci->total_bands; i++, dst += 18, scf += 6)\n    {\n        for (k = 0; k < 12; k++)\n        {\n            dst[k + 0]   *= scf[0];\n            dst[k + 576] *= scf[3];\n        }\n    }\n}\n#endif\nstatic int ma_dr_mp3_L3_read_side_info(ma_dr_mp3_bs *bs, ma_dr_mp3_L3_gr_info *gr, const ma_uint8 *hdr)\n{\n    static const ma_uint8 g_scf_long[8][23] = {\n        { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 },\n        { 12,12,12,12,12,12,16,20,24,28,32,40,48,56,64,76,90,2,2,2,2,2,0 },\n        { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 },\n        { 6,6,6,6,6,6,8,10,12,14,16,18,22,26,32,38,46,54,62,70,76,36,0 },\n        { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 },\n        { 4,4,4,4,4,4,6,6,8,8,10,12,16,20,24,28,34,42,50,54,76,158,0 },\n        { 4,4,4,4,4,4,6,6,6,8,10,12,16,18,22,28,34,40,46,54,54,192,0 },\n        { 4,4,4,4,4,4,6,6,8,10,12,16,20,24,30,38,46,56,68,84,102,26,0 }\n    };\n    static const ma_uint8 g_scf_short[8][40] = {\n        { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 },\n        { 8,8,8,8,8,8,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26,0 },\n        { 4,4,4,4,4,4,4,4,4,6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18,0 },\n        { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12,0 },\n        { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 },\n        { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56,0 },\n        { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66,0 },\n        { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12,0 }\n    };\n    static const ma_uint8 g_scf_mixed[8][40] = {\n        { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 },\n        { 12,12,12,4,4,4,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26,0 },\n        { 6,6,6,6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18,0 },\n        { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12,0 },\n        { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 },\n        { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56,0 },\n        { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66,0 },\n        { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12,0 }\n    };\n    unsigned tables, scfsi = 0;\n    int main_data_begin, part_23_sum = 0;\n    int gr_count = MA_DR_MP3_HDR_IS_MONO(hdr) ? 1 : 2;\n    int sr_idx = MA_DR_MP3_HDR_GET_MY_SAMPLE_RATE(hdr); sr_idx -= (sr_idx != 0);\n    if (MA_DR_MP3_HDR_TEST_MPEG1(hdr))\n    {\n        gr_count *= 2;\n        main_data_begin = ma_dr_mp3_bs_get_bits(bs, 9);\n        scfsi = ma_dr_mp3_bs_get_bits(bs, 7 + gr_count);\n    } else\n    {\n        main_data_begin = ma_dr_mp3_bs_get_bits(bs, 8 + gr_count) >> gr_count;\n    }\n    do\n    {\n        if (MA_DR_MP3_HDR_IS_MONO(hdr))\n        {\n            scfsi <<= 4;\n        }\n        gr->part_23_length = (ma_uint16)ma_dr_mp3_bs_get_bits(bs, 12);\n        part_23_sum += gr->part_23_length;\n        gr->big_values = (ma_uint16)ma_dr_mp3_bs_get_bits(bs,  9);\n        if (gr->big_values > 288)\n        {\n            return -1;\n        }\n        gr->global_gain = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 8);\n        gr->scalefac_compress = (ma_uint16)ma_dr_mp3_bs_get_bits(bs, MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 4 : 9);\n        gr->sfbtab = g_scf_long[sr_idx];\n        gr->n_long_sfb  = 22;\n        gr->n_short_sfb = 0;\n        if (ma_dr_mp3_bs_get_bits(bs, 1))\n        {\n            gr->block_type = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 2);\n            if (!gr->block_type)\n            {\n                return -1;\n            }\n            gr->mixed_block_flag = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 1);\n            gr->region_count[0] = 7;\n            gr->region_count[1] = 255;\n            if (gr->block_type == MA_DR_MP3_SHORT_BLOCK_TYPE)\n            {\n                scfsi &= 0x0F0F;\n                if (!gr->mixed_block_flag)\n                {\n                    gr->region_count[0] = 8;\n                    gr->sfbtab = g_scf_short[sr_idx];\n                    gr->n_long_sfb = 0;\n                    gr->n_short_sfb = 39;\n                } else\n                {\n                    gr->sfbtab = g_scf_mixed[sr_idx];\n                    gr->n_long_sfb = MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 8 : 6;\n                    gr->n_short_sfb = 30;\n                }\n            }\n            tables = ma_dr_mp3_bs_get_bits(bs, 10);\n            tables <<= 5;\n            gr->subblock_gain[0] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 3);\n            gr->subblock_gain[1] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 3);\n            gr->subblock_gain[2] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 3);\n        } else\n        {\n            gr->block_type = 0;\n            gr->mixed_block_flag = 0;\n            tables = ma_dr_mp3_bs_get_bits(bs, 15);\n            gr->region_count[0] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 4);\n            gr->region_count[1] = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 3);\n            gr->region_count[2] = 255;\n        }\n        gr->table_select[0] = (ma_uint8)(tables >> 10);\n        gr->table_select[1] = (ma_uint8)((tables >> 5) & 31);\n        gr->table_select[2] = (ma_uint8)((tables) & 31);\n        gr->preflag = (ma_uint8)(MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? ma_dr_mp3_bs_get_bits(bs, 1) : (gr->scalefac_compress >= 500));\n        gr->scalefac_scale = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 1);\n        gr->count1_table = (ma_uint8)ma_dr_mp3_bs_get_bits(bs, 1);\n        gr->scfsi = (ma_uint8)((scfsi >> 12) & 15);\n        scfsi <<= 4;\n        gr++;\n    } while(--gr_count);\n    if (part_23_sum + bs->pos > bs->limit + main_data_begin*8)\n    {\n        return -1;\n    }\n    return main_data_begin;\n}\nstatic void ma_dr_mp3_L3_read_scalefactors(ma_uint8 *scf, ma_uint8 *ist_pos, const ma_uint8 *scf_size, const ma_uint8 *scf_count, ma_dr_mp3_bs *bitbuf, int scfsi)\n{\n    int i, k;\n    for (i = 0; i < 4 && scf_count[i]; i++, scfsi *= 2)\n    {\n        int cnt = scf_count[i];\n        if (scfsi & 8)\n        {\n            MA_DR_MP3_COPY_MEMORY(scf, ist_pos, cnt);\n        } else\n        {\n            int bits = scf_size[i];\n            if (!bits)\n            {\n                MA_DR_MP3_ZERO_MEMORY(scf, cnt);\n                MA_DR_MP3_ZERO_MEMORY(ist_pos, cnt);\n            } else\n            {\n                int max_scf = (scfsi < 0) ? (1 << bits) - 1 : -1;\n                for (k = 0; k < cnt; k++)\n                {\n                    int s = ma_dr_mp3_bs_get_bits(bitbuf, bits);\n                    ist_pos[k] = (ma_uint8)(s == max_scf ? -1 : s);\n                    scf[k] = (ma_uint8)s;\n                }\n            }\n        }\n        ist_pos += cnt;\n        scf += cnt;\n    }\n    scf[0] = scf[1] = scf[2] = 0;\n}\nstatic float ma_dr_mp3_L3_ldexp_q2(float y, int exp_q2)\n{\n    static const float g_expfrac[4] = { 9.31322575e-10f,7.83145814e-10f,6.58544508e-10f,5.53767716e-10f };\n    int e;\n    do\n    {\n        e = MA_DR_MP3_MIN(30*4, exp_q2);\n        y *= g_expfrac[e & 3]*(1 << 30 >> (e >> 2));\n    } while ((exp_q2 -= e) > 0);\n    return y;\n}\nstatic void ma_dr_mp3_L3_decode_scalefactors(const ma_uint8 *hdr, ma_uint8 *ist_pos, ma_dr_mp3_bs *bs, const ma_dr_mp3_L3_gr_info *gr, float *scf, int ch)\n{\n    static const ma_uint8 g_scf_partitions[3][28] = {\n        { 6,5,5, 5,6,5,5,5,6,5, 7,3,11,10,0,0, 7, 7, 7,0, 6, 6,6,3, 8, 8,5,0 },\n        { 8,9,6,12,6,9,9,9,6,9,12,6,15,18,0,0, 6,15,12,0, 6,12,9,6, 6,18,9,0 },\n        { 9,9,6,12,9,9,9,9,9,9,12,6,18,18,0,0,12,12,12,0,12, 9,9,6,15,12,9,0 }\n    };\n    const ma_uint8 *scf_partition = g_scf_partitions[!!gr->n_short_sfb + !gr->n_long_sfb];\n    ma_uint8 scf_size[4], iscf[40];\n    int i, scf_shift = gr->scalefac_scale + 1, gain_exp, scfsi = gr->scfsi;\n    float gain;\n    if (MA_DR_MP3_HDR_TEST_MPEG1(hdr))\n    {\n        static const ma_uint8 g_scfc_decode[16] = { 0,1,2,3, 12,5,6,7, 9,10,11,13, 14,15,18,19 };\n        int part = g_scfc_decode[gr->scalefac_compress];\n        scf_size[1] = scf_size[0] = (ma_uint8)(part >> 2);\n        scf_size[3] = scf_size[2] = (ma_uint8)(part & 3);\n    } else\n    {\n        static const ma_uint8 g_mod[6*4] = { 5,5,4,4,5,5,4,1,4,3,1,1,5,6,6,1,4,4,4,1,4,3,1,1 };\n        int k, modprod, sfc, ist = MA_DR_MP3_HDR_TEST_I_STEREO(hdr) && ch;\n        sfc = gr->scalefac_compress >> ist;\n        for (k = ist*3*4; sfc >= 0; sfc -= modprod, k += 4)\n        {\n            for (modprod = 1, i = 3; i >= 0; i--)\n            {\n                scf_size[i] = (ma_uint8)(sfc / modprod % g_mod[k + i]);\n                modprod *= g_mod[k + i];\n            }\n        }\n        scf_partition += k;\n        scfsi = -16;\n    }\n    ma_dr_mp3_L3_read_scalefactors(iscf, ist_pos, scf_size, scf_partition, bs, scfsi);\n    if (gr->n_short_sfb)\n    {\n        int sh = 3 - scf_shift;\n        for (i = 0; i < gr->n_short_sfb; i += 3)\n        {\n            iscf[gr->n_long_sfb + i + 0] = (ma_uint8)(iscf[gr->n_long_sfb + i + 0] + (gr->subblock_gain[0] << sh));\n            iscf[gr->n_long_sfb + i + 1] = (ma_uint8)(iscf[gr->n_long_sfb + i + 1] + (gr->subblock_gain[1] << sh));\n            iscf[gr->n_long_sfb + i + 2] = (ma_uint8)(iscf[gr->n_long_sfb + i + 2] + (gr->subblock_gain[2] << sh));\n        }\n    } else if (gr->preflag)\n    {\n        static const ma_uint8 g_preamp[10] = { 1,1,1,1,2,2,3,3,3,2 };\n        for (i = 0; i < 10; i++)\n        {\n            iscf[11 + i] = (ma_uint8)(iscf[11 + i] + g_preamp[i]);\n        }\n    }\n    gain_exp = gr->global_gain + MA_DR_MP3_BITS_DEQUANTIZER_OUT*4 - 210 - (MA_DR_MP3_HDR_IS_MS_STEREO(hdr) ? 2 : 0);\n    gain = ma_dr_mp3_L3_ldexp_q2(1 << (MA_DR_MP3_MAX_SCFI/4),  MA_DR_MP3_MAX_SCFI - gain_exp);\n    for (i = 0; i < (int)(gr->n_long_sfb + gr->n_short_sfb); i++)\n    {\n        scf[i] = ma_dr_mp3_L3_ldexp_q2(gain, iscf[i] << scf_shift);\n    }\n}\nstatic const float g_ma_dr_mp3_pow43[129 + 16] = {\n    0,-1,-2.519842f,-4.326749f,-6.349604f,-8.549880f,-10.902724f,-13.390518f,-16.000000f,-18.720754f,-21.544347f,-24.463781f,-27.473142f,-30.567351f,-33.741992f,-36.993181f,\n    0,1,2.519842f,4.326749f,6.349604f,8.549880f,10.902724f,13.390518f,16.000000f,18.720754f,21.544347f,24.463781f,27.473142f,30.567351f,33.741992f,36.993181f,40.317474f,43.711787f,47.173345f,50.699631f,54.288352f,57.937408f,61.644865f,65.408941f,69.227979f,73.100443f,77.024898f,81.000000f,85.024491f,89.097188f,93.216975f,97.382800f,101.593667f,105.848633f,110.146801f,114.487321f,118.869381f,123.292209f,127.755065f,132.257246f,136.798076f,141.376907f,145.993119f,150.646117f,155.335327f,160.060199f,164.820202f,169.614826f,174.443577f,179.305980f,184.201575f,189.129918f,194.090580f,199.083145f,204.107210f,209.162385f,214.248292f,219.364564f,224.510845f,229.686789f,234.892058f,240.126328f,245.389280f,250.680604f,256.000000f,261.347174f,266.721841f,272.123723f,277.552547f,283.008049f,288.489971f,293.998060f,299.532071f,305.091761f,310.676898f,316.287249f,321.922592f,327.582707f,333.267377f,338.976394f,344.709550f,350.466646f,356.247482f,362.051866f,367.879608f,373.730522f,379.604427f,385.501143f,391.420496f,397.362314f,403.326427f,409.312672f,415.320884f,421.350905f,427.402579f,433.475750f,439.570269f,445.685987f,451.822757f,457.980436f,464.158883f,470.357960f,476.577530f,482.817459f,489.077615f,495.357868f,501.658090f,507.978156f,514.317941f,520.677324f,527.056184f,533.454404f,539.871867f,546.308458f,552.764065f,559.238575f,565.731879f,572.243870f,578.774440f,585.323483f,591.890898f,598.476581f,605.080431f,611.702349f,618.342238f,625.000000f,631.675540f,638.368763f,645.079578f\n};\nstatic float ma_dr_mp3_L3_pow_43(int x)\n{\n    float frac;\n    int sign, mult = 256;\n    if (x < 129)\n    {\n        return g_ma_dr_mp3_pow43[16 + x];\n    }\n    if (x < 1024)\n    {\n        mult = 16;\n        x <<= 3;\n    }\n    sign = 2*x & 64;\n    frac = (float)((x & 63) - sign) / ((x & ~63) + sign);\n    return g_ma_dr_mp3_pow43[16 + ((x + sign) >> 6)]*(1.f + frac*((4.f/3) + frac*(2.f/9)))*mult;\n}\nstatic void ma_dr_mp3_L3_huffman(float *dst, ma_dr_mp3_bs *bs, const ma_dr_mp3_L3_gr_info *gr_info, const float *scf, int layer3gr_limit)\n{\n    static const ma_int16 tabs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n        785,785,785,785,784,784,784,784,513,513,513,513,513,513,513,513,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,\n        -255,1313,1298,1282,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,290,288,\n        -255,1313,1298,1282,769,769,769,769,529,529,529,529,529,529,529,529,528,528,528,528,528,528,528,528,512,512,512,512,512,512,512,512,290,288,\n        -253,-318,-351,-367,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,819,818,547,547,275,275,275,275,561,560,515,546,289,274,288,258,\n        -254,-287,1329,1299,1314,1312,1057,1057,1042,1042,1026,1026,784,784,784,784,529,529,529,529,529,529,529,529,769,769,769,769,768,768,768,768,563,560,306,306,291,259,\n        -252,-413,-477,-542,1298,-575,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-383,-399,1107,1092,1106,1061,849,849,789,789,1104,1091,773,773,1076,1075,341,340,325,309,834,804,577,577,532,532,516,516,832,818,803,816,561,561,531,531,515,546,289,289,288,258,\n        -252,-429,-493,-559,1057,1057,1042,1042,529,529,529,529,529,529,529,529,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,-382,1077,-415,1106,1061,1104,849,849,789,789,1091,1076,1029,1075,834,834,597,581,340,340,339,324,804,833,532,532,832,772,818,803,817,787,816,771,290,290,290,290,288,258,\n        -253,-349,-414,-447,-463,1329,1299,-479,1314,1312,1057,1057,1042,1042,1026,1026,785,785,785,785,784,784,784,784,769,769,769,769,768,768,768,768,-319,851,821,-335,836,850,805,849,341,340,325,336,533,533,579,579,564,564,773,832,578,548,563,516,321,276,306,291,304,259,\n        -251,-572,-733,-830,-863,-879,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,1396,1351,1381,1366,1395,1335,1380,-559,1334,1138,1138,1063,1063,1350,1392,1031,1031,1062,1062,1364,1363,1120,1120,1333,1348,881,881,881,881,375,374,359,373,343,358,341,325,791,791,1123,1122,-703,1105,1045,-719,865,865,790,790,774,774,1104,1029,338,293,323,308,-799,-815,833,788,772,818,803,816,322,292,307,320,561,531,515,546,289,274,288,258,\n        -251,-525,-605,-685,-765,-831,-846,1298,1057,1057,1312,1282,785,785,785,785,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,1399,1398,1383,1367,1382,1396,1351,-511,1381,1366,1139,1139,1079,1079,1124,1124,1364,1349,1363,1333,882,882,882,882,807,807,807,807,1094,1094,1136,1136,373,341,535,535,881,775,867,822,774,-591,324,338,-671,849,550,550,866,864,609,609,293,336,534,534,789,835,773,-751,834,804,308,307,833,788,832,772,562,562,547,547,305,275,560,515,290,290,\n        -252,-397,-477,-557,-622,-653,-719,-735,-750,1329,1299,1314,1057,1057,1042,1042,1312,1282,1024,1024,785,785,785,785,784,784,784,784,769,769,769,769,-383,1127,1141,1111,1126,1140,1095,1110,869,869,883,883,1079,1109,882,882,375,374,807,868,838,881,791,-463,867,822,368,263,852,837,836,-543,610,610,550,550,352,336,534,534,865,774,851,821,850,805,593,533,579,564,773,832,578,578,548,548,577,577,307,276,306,291,516,560,259,259,\n        -250,-2107,-2507,-2764,-2909,-2974,-3007,-3023,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-767,-1052,-1213,-1277,-1358,-1405,-1469,-1535,-1550,-1582,-1614,-1647,-1662,-1694,-1726,-1759,-1774,-1807,-1822,-1854,-1886,1565,-1919,-1935,-1951,-1967,1731,1730,1580,1717,-1983,1729,1564,-1999,1548,-2015,-2031,1715,1595,-2047,1714,-2063,1610,-2079,1609,-2095,1323,1323,1457,1457,1307,1307,1712,1547,1641,1700,1699,1594,1685,1625,1442,1442,1322,1322,-780,-973,-910,1279,1278,1277,1262,1276,1261,1275,1215,1260,1229,-959,974,974,989,989,-943,735,478,478,495,463,506,414,-1039,1003,958,1017,927,942,987,957,431,476,1272,1167,1228,-1183,1256,-1199,895,895,941,941,1242,1227,1212,1135,1014,1014,490,489,503,487,910,1013,985,925,863,894,970,955,1012,847,-1343,831,755,755,984,909,428,366,754,559,-1391,752,486,457,924,997,698,698,983,893,740,740,908,877,739,739,667,667,953,938,497,287,271,271,683,606,590,712,726,574,302,302,738,736,481,286,526,725,605,711,636,724,696,651,589,681,666,710,364,467,573,695,466,466,301,465,379,379,709,604,665,679,316,316,634,633,436,436,464,269,424,394,452,332,438,363,347,408,393,448,331,422,362,407,392,421,346,406,391,376,375,359,1441,1306,-2367,1290,-2383,1337,-2399,-2415,1426,1321,-2431,1411,1336,-2447,-2463,-2479,1169,1169,1049,1049,1424,1289,1412,1352,1319,-2495,1154,1154,1064,1064,1153,1153,416,390,360,404,403,389,344,374,373,343,358,372,327,357,342,311,356,326,1395,1394,1137,1137,1047,1047,1365,1392,1287,1379,1334,1364,1349,1378,1318,1363,792,792,792,792,1152,1152,1032,1032,1121,1121,1046,1046,1120,1120,1030,1030,-2895,1106,1061,1104,849,849,789,789,1091,1076,1029,1090,1060,1075,833,833,309,324,532,532,832,772,818,803,561,561,531,560,515,546,289,274,288,258,\n        -250,-1179,-1579,-1836,-1996,-2124,-2253,-2333,-2413,-2477,-2542,-2574,-2607,-2622,-2655,1314,1313,1298,1312,1282,785,785,785,785,1040,1040,1025,1025,768,768,768,768,-766,-798,-830,-862,-895,-911,-927,-943,-959,-975,-991,-1007,-1023,-1039,-1055,-1070,1724,1647,-1103,-1119,1631,1767,1662,1738,1708,1723,-1135,1780,1615,1779,1599,1677,1646,1778,1583,-1151,1777,1567,1737,1692,1765,1722,1707,1630,1751,1661,1764,1614,1736,1676,1763,1750,1645,1598,1721,1691,1762,1706,1582,1761,1566,-1167,1749,1629,767,766,751,765,494,494,735,764,719,749,734,763,447,447,748,718,477,506,431,491,446,476,461,505,415,430,475,445,504,399,460,489,414,503,383,474,429,459,502,502,746,752,488,398,501,473,413,472,486,271,480,270,-1439,-1455,1357,-1471,-1487,-1503,1341,1325,-1519,1489,1463,1403,1309,-1535,1372,1448,1418,1476,1356,1462,1387,-1551,1475,1340,1447,1402,1386,-1567,1068,1068,1474,1461,455,380,468,440,395,425,410,454,364,467,466,464,453,269,409,448,268,432,1371,1473,1432,1417,1308,1460,1355,1446,1459,1431,1083,1083,1401,1416,1458,1445,1067,1067,1370,1457,1051,1051,1291,1430,1385,1444,1354,1415,1400,1443,1082,1082,1173,1113,1186,1066,1185,1050,-1967,1158,1128,1172,1097,1171,1081,-1983,1157,1112,416,266,375,400,1170,1142,1127,1065,793,793,1169,1033,1156,1096,1141,1111,1155,1080,1126,1140,898,898,808,808,897,897,792,792,1095,1152,1032,1125,1110,1139,1079,1124,882,807,838,881,853,791,-2319,867,368,263,822,852,837,866,806,865,-2399,851,352,262,534,534,821,836,594,594,549,549,593,593,533,533,848,773,579,579,564,578,548,563,276,276,577,576,306,291,516,560,305,305,275,259,\n        -251,-892,-2058,-2620,-2828,-2957,-3023,-3039,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,-559,1530,-575,-591,1528,1527,1407,1526,1391,1023,1023,1023,1023,1525,1375,1268,1268,1103,1103,1087,1087,1039,1039,1523,-604,815,815,815,815,510,495,509,479,508,463,507,447,431,505,415,399,-734,-782,1262,-815,1259,1244,-831,1258,1228,-847,-863,1196,-879,1253,987,987,748,-767,493,493,462,477,414,414,686,669,478,446,461,445,474,429,487,458,412,471,1266,1264,1009,1009,799,799,-1019,-1276,-1452,-1581,-1677,-1757,-1821,-1886,-1933,-1997,1257,1257,1483,1468,1512,1422,1497,1406,1467,1496,1421,1510,1134,1134,1225,1225,1466,1451,1374,1405,1252,1252,1358,1480,1164,1164,1251,1251,1238,1238,1389,1465,-1407,1054,1101,-1423,1207,-1439,830,830,1248,1038,1237,1117,1223,1148,1236,1208,411,426,395,410,379,269,1193,1222,1132,1235,1221,1116,976,976,1192,1162,1177,1220,1131,1191,963,963,-1647,961,780,-1663,558,558,994,993,437,408,393,407,829,978,813,797,947,-1743,721,721,377,392,844,950,828,890,706,706,812,859,796,960,948,843,934,874,571,571,-1919,690,555,689,421,346,539,539,944,779,918,873,932,842,903,888,570,570,931,917,674,674,-2575,1562,-2591,1609,-2607,1654,1322,1322,1441,1441,1696,1546,1683,1593,1669,1624,1426,1426,1321,1321,1639,1680,1425,1425,1305,1305,1545,1668,1608,1623,1667,1592,1638,1666,1320,1320,1652,1607,1409,1409,1304,1304,1288,1288,1664,1637,1395,1395,1335,1335,1622,1636,1394,1394,1319,1319,1606,1621,1392,1392,1137,1137,1137,1137,345,390,360,375,404,373,1047,-2751,-2767,-2783,1062,1121,1046,-2799,1077,-2815,1106,1061,789,789,1105,1104,263,355,310,340,325,354,352,262,339,324,1091,1076,1029,1090,1060,1075,833,833,788,788,1088,1028,818,818,803,803,561,561,531,531,816,771,546,546,289,274,288,258,\n        -253,-317,-381,-446,-478,-509,1279,1279,-811,-1179,-1451,-1756,-1900,-2028,-2189,-2253,-2333,-2414,-2445,-2511,-2526,1313,1298,-2559,1041,1041,1040,1040,1025,1025,1024,1024,1022,1007,1021,991,1020,975,1019,959,687,687,1018,1017,671,671,655,655,1016,1015,639,639,758,758,623,623,757,607,756,591,755,575,754,559,543,543,1009,783,-575,-621,-685,-749,496,-590,750,749,734,748,974,989,1003,958,988,973,1002,942,987,957,972,1001,926,986,941,971,956,1000,910,985,925,999,894,970,-1071,-1087,-1102,1390,-1135,1436,1509,1451,1374,-1151,1405,1358,1480,1420,-1167,1507,1494,1389,1342,1465,1435,1450,1326,1505,1310,1493,1373,1479,1404,1492,1464,1419,428,443,472,397,736,526,464,464,486,457,442,471,484,482,1357,1449,1434,1478,1388,1491,1341,1490,1325,1489,1463,1403,1309,1477,1372,1448,1418,1433,1476,1356,1462,1387,-1439,1475,1340,1447,1402,1474,1324,1461,1371,1473,269,448,1432,1417,1308,1460,-1711,1459,-1727,1441,1099,1099,1446,1386,1431,1401,-1743,1289,1083,1083,1160,1160,1458,1445,1067,1067,1370,1457,1307,1430,1129,1129,1098,1098,268,432,267,416,266,400,-1887,1144,1187,1082,1173,1113,1186,1066,1050,1158,1128,1143,1172,1097,1171,1081,420,391,1157,1112,1170,1142,1127,1065,1169,1049,1156,1096,1141,1111,1155,1080,1126,1154,1064,1153,1140,1095,1048,-2159,1125,1110,1137,-2175,823,823,1139,1138,807,807,384,264,368,263,868,838,853,791,867,822,852,837,866,806,865,790,-2319,851,821,836,352,262,850,805,849,-2399,533,533,835,820,336,261,578,548,563,577,532,532,832,772,562,562,547,547,305,275,560,515,290,290,288,258 };\n    static const ma_uint8 tab32[] = { 130,162,193,209,44,28,76,140,9,9,9,9,9,9,9,9,190,254,222,238,126,94,157,157,109,61,173,205};\n    static const ma_uint8 tab33[] = { 252,236,220,204,188,172,156,140,124,108,92,76,60,44,28,12 };\n    static const ma_int16 tabindex[2*16] = { 0,32,64,98,0,132,180,218,292,364,426,538,648,746,0,1126,1460,1460,1460,1460,1460,1460,1460,1460,1842,1842,1842,1842,1842,1842,1842,1842 };\n    static const ma_uint8 g_linbits[] =  { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,6,8,10,13,4,5,6,7,8,9,11,13 };\n#define MA_DR_MP3_PEEK_BITS(n)    (bs_cache >> (32 - (n)))\n#define MA_DR_MP3_FLUSH_BITS(n)   { bs_cache <<= (n); bs_sh += (n); }\n#define MA_DR_MP3_CHECK_BITS      while (bs_sh >= 0) { bs_cache |= (ma_uint32)*bs_next_ptr++ << bs_sh; bs_sh -= 8; }\n#define MA_DR_MP3_BSPOS           ((bs_next_ptr - bs->buf)*8 - 24 + bs_sh)\n    float one = 0.0f;\n    int ireg = 0, big_val_cnt = gr_info->big_values;\n    const ma_uint8 *sfb = gr_info->sfbtab;\n    const ma_uint8 *bs_next_ptr = bs->buf + bs->pos/8;\n    ma_uint32 bs_cache = (((bs_next_ptr[0]*256u + bs_next_ptr[1])*256u + bs_next_ptr[2])*256u + bs_next_ptr[3]) << (bs->pos & 7);\n    int pairs_to_decode, np, bs_sh = (bs->pos & 7) - 8;\n    bs_next_ptr += 4;\n    while (big_val_cnt > 0)\n    {\n        int tab_num = gr_info->table_select[ireg];\n        int sfb_cnt = gr_info->region_count[ireg++];\n        const ma_int16 *codebook = tabs + tabindex[tab_num];\n        int linbits = g_linbits[tab_num];\n        if (linbits)\n        {\n            do\n            {\n                np = *sfb++ / 2;\n                pairs_to_decode = MA_DR_MP3_MIN(big_val_cnt, np);\n                one = *scf++;\n                do\n                {\n                    int j, w = 5;\n                    int leaf = codebook[MA_DR_MP3_PEEK_BITS(w)];\n                    while (leaf < 0)\n                    {\n                        MA_DR_MP3_FLUSH_BITS(w);\n                        w = leaf & 7;\n                        leaf = codebook[MA_DR_MP3_PEEK_BITS(w) - (leaf >> 3)];\n                    }\n                    MA_DR_MP3_FLUSH_BITS(leaf >> 8);\n                    for (j = 0; j < 2; j++, dst++, leaf >>= 4)\n                    {\n                        int lsb = leaf & 0x0F;\n                        if (lsb == 15)\n                        {\n                            lsb += MA_DR_MP3_PEEK_BITS(linbits);\n                            MA_DR_MP3_FLUSH_BITS(linbits);\n                            MA_DR_MP3_CHECK_BITS;\n                            *dst = one*ma_dr_mp3_L3_pow_43(lsb)*((ma_int32)bs_cache < 0 ? -1: 1);\n                        } else\n                        {\n                            *dst = g_ma_dr_mp3_pow43[16 + lsb - 16*(bs_cache >> 31)]*one;\n                        }\n                        MA_DR_MP3_FLUSH_BITS(lsb ? 1 : 0);\n                    }\n                    MA_DR_MP3_CHECK_BITS;\n                } while (--pairs_to_decode);\n            } while ((big_val_cnt -= np) > 0 && --sfb_cnt >= 0);\n        } else\n        {\n            do\n            {\n                np = *sfb++ / 2;\n                pairs_to_decode = MA_DR_MP3_MIN(big_val_cnt, np);\n                one = *scf++;\n                do\n                {\n                    int j, w = 5;\n                    int leaf = codebook[MA_DR_MP3_PEEK_BITS(w)];\n                    while (leaf < 0)\n                    {\n                        MA_DR_MP3_FLUSH_BITS(w);\n                        w = leaf & 7;\n                        leaf = codebook[MA_DR_MP3_PEEK_BITS(w) - (leaf >> 3)];\n                    }\n                    MA_DR_MP3_FLUSH_BITS(leaf >> 8);\n                    for (j = 0; j < 2; j++, dst++, leaf >>= 4)\n                    {\n                        int lsb = leaf & 0x0F;\n                        *dst = g_ma_dr_mp3_pow43[16 + lsb - 16*(bs_cache >> 31)]*one;\n                        MA_DR_MP3_FLUSH_BITS(lsb ? 1 : 0);\n                    }\n                    MA_DR_MP3_CHECK_BITS;\n                } while (--pairs_to_decode);\n            } while ((big_val_cnt -= np) > 0 && --sfb_cnt >= 0);\n        }\n    }\n    for (np = 1 - big_val_cnt;; dst += 4)\n    {\n        const ma_uint8 *codebook_count1 = (gr_info->count1_table) ? tab33 : tab32;\n        int leaf = codebook_count1[MA_DR_MP3_PEEK_BITS(4)];\n        if (!(leaf & 8))\n        {\n            leaf = codebook_count1[(leaf >> 3) + (bs_cache << 4 >> (32 - (leaf & 3)))];\n        }\n        MA_DR_MP3_FLUSH_BITS(leaf & 7);\n        if (MA_DR_MP3_BSPOS > layer3gr_limit)\n        {\n            break;\n        }\n#define MA_DR_MP3_RELOAD_SCALEFACTOR  if (!--np) { np = *sfb++/2; if (!np) break; one = *scf++; }\n#define MA_DR_MP3_DEQ_COUNT1(s) if (leaf & (128 >> s)) { dst[s] = ((ma_int32)bs_cache < 0) ? -one : one; MA_DR_MP3_FLUSH_BITS(1) }\n        MA_DR_MP3_RELOAD_SCALEFACTOR;\n        MA_DR_MP3_DEQ_COUNT1(0);\n        MA_DR_MP3_DEQ_COUNT1(1);\n        MA_DR_MP3_RELOAD_SCALEFACTOR;\n        MA_DR_MP3_DEQ_COUNT1(2);\n        MA_DR_MP3_DEQ_COUNT1(3);\n        MA_DR_MP3_CHECK_BITS;\n    }\n    bs->pos = layer3gr_limit;\n}\nstatic void ma_dr_mp3_L3_midside_stereo(float *left, int n)\n{\n    int i = 0;\n    float *right = left + 576;\n#if MA_DR_MP3_HAVE_SIMD\n    if (ma_dr_mp3_have_simd())\n    {\n        for (; i < n - 3; i += 4)\n        {\n            ma_dr_mp3_f4 vl = MA_DR_MP3_VLD(left + i);\n            ma_dr_mp3_f4 vr = MA_DR_MP3_VLD(right + i);\n            MA_DR_MP3_VSTORE(left + i, MA_DR_MP3_VADD(vl, vr));\n            MA_DR_MP3_VSTORE(right + i, MA_DR_MP3_VSUB(vl, vr));\n        }\n#ifdef __GNUC__\n        if (__builtin_constant_p(n % 4 == 0) && n % 4 == 0)\n            return;\n#endif\n    }\n#endif\n    for (; i < n; i++)\n    {\n        float a = left[i];\n        float b = right[i];\n        left[i] = a + b;\n        right[i] = a - b;\n    }\n}\nstatic void ma_dr_mp3_L3_intensity_stereo_band(float *left, int n, float kl, float kr)\n{\n    int i;\n    for (i = 0; i < n; i++)\n    {\n        left[i + 576] = left[i]*kr;\n        left[i] = left[i]*kl;\n    }\n}\nstatic void ma_dr_mp3_L3_stereo_top_band(const float *right, const ma_uint8 *sfb, int nbands, int max_band[3])\n{\n    int i, k;\n    max_band[0] = max_band[1] = max_band[2] = -1;\n    for (i = 0; i < nbands; i++)\n    {\n        for (k = 0; k < sfb[i]; k += 2)\n        {\n            if (right[k] != 0 || right[k + 1] != 0)\n            {\n                max_band[i % 3] = i;\n                break;\n            }\n        }\n        right += sfb[i];\n    }\n}\nstatic void ma_dr_mp3_L3_stereo_process(float *left, const ma_uint8 *ist_pos, const ma_uint8 *sfb, const ma_uint8 *hdr, int max_band[3], int mpeg2_sh)\n{\n    static const float g_pan[7*2] = { 0,1,0.21132487f,0.78867513f,0.36602540f,0.63397460f,0.5f,0.5f,0.63397460f,0.36602540f,0.78867513f,0.21132487f,1,0 };\n    unsigned i, max_pos = MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 7 : 64;\n    for (i = 0; sfb[i]; i++)\n    {\n        unsigned ipos = ist_pos[i];\n        if ((int)i > max_band[i % 3] && ipos < max_pos)\n        {\n            float kl, kr, s = MA_DR_MP3_HDR_TEST_MS_STEREO(hdr) ? 1.41421356f : 1;\n            if (MA_DR_MP3_HDR_TEST_MPEG1(hdr))\n            {\n                kl = g_pan[2*ipos];\n                kr = g_pan[2*ipos + 1];\n            } else\n            {\n                kl = 1;\n                kr = ma_dr_mp3_L3_ldexp_q2(1, (ipos + 1) >> 1 << mpeg2_sh);\n                if (ipos & 1)\n                {\n                    kl = kr;\n                    kr = 1;\n                }\n            }\n            ma_dr_mp3_L3_intensity_stereo_band(left, sfb[i], kl*s, kr*s);\n        } else if (MA_DR_MP3_HDR_TEST_MS_STEREO(hdr))\n        {\n            ma_dr_mp3_L3_midside_stereo(left, sfb[i]);\n        }\n        left += sfb[i];\n    }\n}\nstatic void ma_dr_mp3_L3_intensity_stereo(float *left, ma_uint8 *ist_pos, const ma_dr_mp3_L3_gr_info *gr, const ma_uint8 *hdr)\n{\n    int max_band[3], n_sfb = gr->n_long_sfb + gr->n_short_sfb;\n    int i, max_blocks = gr->n_short_sfb ? 3 : 1;\n    ma_dr_mp3_L3_stereo_top_band(left + 576, gr->sfbtab, n_sfb, max_band);\n    if (gr->n_long_sfb)\n    {\n        max_band[0] = max_band[1] = max_band[2] = MA_DR_MP3_MAX(MA_DR_MP3_MAX(max_band[0], max_band[1]), max_band[2]);\n    }\n    for (i = 0; i < max_blocks; i++)\n    {\n        int default_pos = MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 3 : 0;\n        int itop = n_sfb - max_blocks + i;\n        int prev = itop - max_blocks;\n        ist_pos[itop] = (ma_uint8)(max_band[i] >= prev ? default_pos : ist_pos[prev]);\n    }\n    ma_dr_mp3_L3_stereo_process(left, ist_pos, gr->sfbtab, hdr, max_band, gr[1].scalefac_compress & 1);\n}\nstatic void ma_dr_mp3_L3_reorder(float *grbuf, float *scratch, const ma_uint8 *sfb)\n{\n    int i, len;\n    float *src = grbuf, *dst = scratch;\n    for (;0 != (len = *sfb); sfb += 3, src += 2*len)\n    {\n        for (i = 0; i < len; i++, src++)\n        {\n            *dst++ = src[0*len];\n            *dst++ = src[1*len];\n            *dst++ = src[2*len];\n        }\n    }\n    MA_DR_MP3_COPY_MEMORY(grbuf, scratch, (dst - scratch)*sizeof(float));\n}\nstatic void ma_dr_mp3_L3_antialias(float *grbuf, int nbands)\n{\n    static const float g_aa[2][8] = {\n        {0.85749293f,0.88174200f,0.94962865f,0.98331459f,0.99551782f,0.99916056f,0.99989920f,0.99999316f},\n        {0.51449576f,0.47173197f,0.31337745f,0.18191320f,0.09457419f,0.04096558f,0.01419856f,0.00369997f}\n    };\n    for (; nbands > 0; nbands--, grbuf += 18)\n    {\n        int i = 0;\n#if MA_DR_MP3_HAVE_SIMD\n        if (ma_dr_mp3_have_simd()) for (; i < 8; i += 4)\n        {\n            ma_dr_mp3_f4 vu = MA_DR_MP3_VLD(grbuf + 18 + i);\n            ma_dr_mp3_f4 vd = MA_DR_MP3_VLD(grbuf + 14 - i);\n            ma_dr_mp3_f4 vc0 = MA_DR_MP3_VLD(g_aa[0] + i);\n            ma_dr_mp3_f4 vc1 = MA_DR_MP3_VLD(g_aa[1] + i);\n            vd = MA_DR_MP3_VREV(vd);\n            MA_DR_MP3_VSTORE(grbuf + 18 + i, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vu, vc0), MA_DR_MP3_VMUL(vd, vc1)));\n            vd = MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vu, vc1), MA_DR_MP3_VMUL(vd, vc0));\n            MA_DR_MP3_VSTORE(grbuf + 14 - i, MA_DR_MP3_VREV(vd));\n        }\n#endif\n#ifndef MA_DR_MP3_ONLY_SIMD\n        for(; i < 8; i++)\n        {\n            float u = grbuf[18 + i];\n            float d = grbuf[17 - i];\n            grbuf[18 + i] = u*g_aa[0][i] - d*g_aa[1][i];\n            grbuf[17 - i] = u*g_aa[1][i] + d*g_aa[0][i];\n        }\n#endif\n    }\n}\nstatic void ma_dr_mp3_L3_dct3_9(float *y)\n{\n    float s0, s1, s2, s3, s4, s5, s6, s7, s8, t0, t2, t4;\n    s0 = y[0]; s2 = y[2]; s4 = y[4]; s6 = y[6]; s8 = y[8];\n    t0 = s0 + s6*0.5f;\n    s0 -= s6;\n    t4 = (s4 + s2)*0.93969262f;\n    t2 = (s8 + s2)*0.76604444f;\n    s6 = (s4 - s8)*0.17364818f;\n    s4 += s8 - s2;\n    s2 = s0 - s4*0.5f;\n    y[4] = s4 + s0;\n    s8 = t0 - t2 + s6;\n    s0 = t0 - t4 + t2;\n    s4 = t0 + t4 - s6;\n    s1 = y[1]; s3 = y[3]; s5 = y[5]; s7 = y[7];\n    s3 *= 0.86602540f;\n    t0 = (s5 + s1)*0.98480775f;\n    t4 = (s5 - s7)*0.34202014f;\n    t2 = (s1 + s7)*0.64278761f;\n    s1 = (s1 - s5 - s7)*0.86602540f;\n    s5 = t0 - s3 - t2;\n    s7 = t4 - s3 - t0;\n    s3 = t4 + s3 - t2;\n    y[0] = s4 - s7;\n    y[1] = s2 + s1;\n    y[2] = s0 - s3;\n    y[3] = s8 + s5;\n    y[5] = s8 - s5;\n    y[6] = s0 + s3;\n    y[7] = s2 - s1;\n    y[8] = s4 + s7;\n}\nstatic void ma_dr_mp3_L3_imdct36(float *grbuf, float *overlap, const float *window, int nbands)\n{\n    int i, j;\n    static const float g_twid9[18] = {\n        0.73727734f,0.79335334f,0.84339145f,0.88701083f,0.92387953f,0.95371695f,0.97629601f,0.99144486f,0.99904822f,0.67559021f,0.60876143f,0.53729961f,0.46174861f,0.38268343f,0.30070580f,0.21643961f,0.13052619f,0.04361938f\n    };\n    for (j = 0; j < nbands; j++, grbuf += 18, overlap += 9)\n    {\n        float co[9], si[9];\n        co[0] = -grbuf[0];\n        si[0] = grbuf[17];\n        for (i = 0; i < 4; i++)\n        {\n            si[8 - 2*i] =   grbuf[4*i + 1] - grbuf[4*i + 2];\n            co[1 + 2*i] =   grbuf[4*i + 1] + grbuf[4*i + 2];\n            si[7 - 2*i] =   grbuf[4*i + 4] - grbuf[4*i + 3];\n            co[2 + 2*i] = -(grbuf[4*i + 3] + grbuf[4*i + 4]);\n        }\n        ma_dr_mp3_L3_dct3_9(co);\n        ma_dr_mp3_L3_dct3_9(si);\n        si[1] = -si[1];\n        si[3] = -si[3];\n        si[5] = -si[5];\n        si[7] = -si[7];\n        i = 0;\n#if MA_DR_MP3_HAVE_SIMD\n        if (ma_dr_mp3_have_simd()) for (; i < 8; i += 4)\n        {\n            ma_dr_mp3_f4 vovl = MA_DR_MP3_VLD(overlap + i);\n            ma_dr_mp3_f4 vc = MA_DR_MP3_VLD(co + i);\n            ma_dr_mp3_f4 vs = MA_DR_MP3_VLD(si + i);\n            ma_dr_mp3_f4 vr0 = MA_DR_MP3_VLD(g_twid9 + i);\n            ma_dr_mp3_f4 vr1 = MA_DR_MP3_VLD(g_twid9 + 9 + i);\n            ma_dr_mp3_f4 vw0 = MA_DR_MP3_VLD(window + i);\n            ma_dr_mp3_f4 vw1 = MA_DR_MP3_VLD(window + 9 + i);\n            ma_dr_mp3_f4 vsum = MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vc, vr1), MA_DR_MP3_VMUL(vs, vr0));\n            MA_DR_MP3_VSTORE(overlap + i, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vc, vr0), MA_DR_MP3_VMUL(vs, vr1)));\n            MA_DR_MP3_VSTORE(grbuf + i, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vovl, vw0), MA_DR_MP3_VMUL(vsum, vw1)));\n            vsum = MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vovl, vw1), MA_DR_MP3_VMUL(vsum, vw0));\n            MA_DR_MP3_VSTORE(grbuf + 14 - i, MA_DR_MP3_VREV(vsum));\n        }\n#endif\n        for (; i < 9; i++)\n        {\n            float ovl  = overlap[i];\n            float sum  = co[i]*g_twid9[9 + i] + si[i]*g_twid9[0 + i];\n            overlap[i] = co[i]*g_twid9[0 + i] - si[i]*g_twid9[9 + i];\n            grbuf[i]      = ovl*window[0 + i] - sum*window[9 + i];\n            grbuf[17 - i] = ovl*window[9 + i] + sum*window[0 + i];\n        }\n    }\n}\nstatic void ma_dr_mp3_L3_idct3(float x0, float x1, float x2, float *dst)\n{\n    float m1 = x1*0.86602540f;\n    float a1 = x0 - x2*0.5f;\n    dst[1] = x0 + x2;\n    dst[0] = a1 + m1;\n    dst[2] = a1 - m1;\n}\nstatic void ma_dr_mp3_L3_imdct12(float *x, float *dst, float *overlap)\n{\n    static const float g_twid3[6] = { 0.79335334f,0.92387953f,0.99144486f, 0.60876143f,0.38268343f,0.13052619f };\n    float co[3], si[3];\n    int i;\n    ma_dr_mp3_L3_idct3(-x[0], x[6] + x[3], x[12] + x[9], co);\n    ma_dr_mp3_L3_idct3(x[15], x[12] - x[9], x[6] - x[3], si);\n    si[1] = -si[1];\n    for (i = 0; i < 3; i++)\n    {\n        float ovl  = overlap[i];\n        float sum  = co[i]*g_twid3[3 + i] + si[i]*g_twid3[0 + i];\n        overlap[i] = co[i]*g_twid3[0 + i] - si[i]*g_twid3[3 + i];\n        dst[i]     = ovl*g_twid3[2 - i] - sum*g_twid3[5 - i];\n        dst[5 - i] = ovl*g_twid3[5 - i] + sum*g_twid3[2 - i];\n    }\n}\nstatic void ma_dr_mp3_L3_imdct_short(float *grbuf, float *overlap, int nbands)\n{\n    for (;nbands > 0; nbands--, overlap += 9, grbuf += 18)\n    {\n        float tmp[18];\n        MA_DR_MP3_COPY_MEMORY(tmp, grbuf, sizeof(tmp));\n        MA_DR_MP3_COPY_MEMORY(grbuf, overlap, 6*sizeof(float));\n        ma_dr_mp3_L3_imdct12(tmp, grbuf + 6, overlap + 6);\n        ma_dr_mp3_L3_imdct12(tmp + 1, grbuf + 12, overlap + 6);\n        ma_dr_mp3_L3_imdct12(tmp + 2, overlap, overlap + 6);\n    }\n}\nstatic void ma_dr_mp3_L3_change_sign(float *grbuf)\n{\n    int b, i;\n    for (b = 0, grbuf += 18; b < 32; b += 2, grbuf += 36)\n        for (i = 1; i < 18; i += 2)\n            grbuf[i] = -grbuf[i];\n}\nstatic void ma_dr_mp3_L3_imdct_gr(float *grbuf, float *overlap, unsigned block_type, unsigned n_long_bands)\n{\n    static const float g_mdct_window[2][18] = {\n        { 0.99904822f,0.99144486f,0.97629601f,0.95371695f,0.92387953f,0.88701083f,0.84339145f,0.79335334f,0.73727734f,0.04361938f,0.13052619f,0.21643961f,0.30070580f,0.38268343f,0.46174861f,0.53729961f,0.60876143f,0.67559021f },\n        { 1,1,1,1,1,1,0.99144486f,0.92387953f,0.79335334f,0,0,0,0,0,0,0.13052619f,0.38268343f,0.60876143f }\n    };\n    if (n_long_bands)\n    {\n        ma_dr_mp3_L3_imdct36(grbuf, overlap, g_mdct_window[0], n_long_bands);\n        grbuf += 18*n_long_bands;\n        overlap += 9*n_long_bands;\n    }\n    if (block_type == MA_DR_MP3_SHORT_BLOCK_TYPE)\n        ma_dr_mp3_L3_imdct_short(grbuf, overlap, 32 - n_long_bands);\n    else\n        ma_dr_mp3_L3_imdct36(grbuf, overlap, g_mdct_window[block_type == MA_DR_MP3_STOP_BLOCK_TYPE], 32 - n_long_bands);\n}\nstatic void ma_dr_mp3_L3_save_reservoir(ma_dr_mp3dec *h, ma_dr_mp3dec_scratch *s)\n{\n    int pos = (s->bs.pos + 7)/8u;\n    int remains = s->bs.limit/8u - pos;\n    if (remains > MA_DR_MP3_MAX_BITRESERVOIR_BYTES)\n    {\n        pos += remains - MA_DR_MP3_MAX_BITRESERVOIR_BYTES;\n        remains = MA_DR_MP3_MAX_BITRESERVOIR_BYTES;\n    }\n    if (remains > 0)\n    {\n        MA_DR_MP3_MOVE_MEMORY(h->reserv_buf, s->maindata + pos, remains);\n    }\n    h->reserv = remains;\n}\nstatic int ma_dr_mp3_L3_restore_reservoir(ma_dr_mp3dec *h, ma_dr_mp3_bs *bs, ma_dr_mp3dec_scratch *s, int main_data_begin)\n{\n    int frame_bytes = (bs->limit - bs->pos)/8;\n    int bytes_have = MA_DR_MP3_MIN(h->reserv, main_data_begin);\n    MA_DR_MP3_COPY_MEMORY(s->maindata, h->reserv_buf + MA_DR_MP3_MAX(0, h->reserv - main_data_begin), MA_DR_MP3_MIN(h->reserv, main_data_begin));\n    MA_DR_MP3_COPY_MEMORY(s->maindata + bytes_have, bs->buf + bs->pos/8, frame_bytes);\n    ma_dr_mp3_bs_init(&s->bs, s->maindata, bytes_have + frame_bytes);\n    return h->reserv >= main_data_begin;\n}\nstatic void ma_dr_mp3_L3_decode(ma_dr_mp3dec *h, ma_dr_mp3dec_scratch *s, ma_dr_mp3_L3_gr_info *gr_info, int nch)\n{\n    int ch;\n    for (ch = 0; ch < nch; ch++)\n    {\n        int layer3gr_limit = s->bs.pos + gr_info[ch].part_23_length;\n        ma_dr_mp3_L3_decode_scalefactors(h->header, s->ist_pos[ch], &s->bs, gr_info + ch, s->scf, ch);\n        ma_dr_mp3_L3_huffman(s->grbuf[ch], &s->bs, gr_info + ch, s->scf, layer3gr_limit);\n    }\n    if (MA_DR_MP3_HDR_TEST_I_STEREO(h->header))\n    {\n        ma_dr_mp3_L3_intensity_stereo(s->grbuf[0], s->ist_pos[1], gr_info, h->header);\n    } else if (MA_DR_MP3_HDR_IS_MS_STEREO(h->header))\n    {\n        ma_dr_mp3_L3_midside_stereo(s->grbuf[0], 576);\n    }\n    for (ch = 0; ch < nch; ch++, gr_info++)\n    {\n        int aa_bands = 31;\n        int n_long_bands = (gr_info->mixed_block_flag ? 2 : 0) << (int)(MA_DR_MP3_HDR_GET_MY_SAMPLE_RATE(h->header) == 2);\n        if (gr_info->n_short_sfb)\n        {\n            aa_bands = n_long_bands - 1;\n            ma_dr_mp3_L3_reorder(s->grbuf[ch] + n_long_bands*18, s->syn[0], gr_info->sfbtab + gr_info->n_long_sfb);\n        }\n        ma_dr_mp3_L3_antialias(s->grbuf[ch], aa_bands);\n        ma_dr_mp3_L3_imdct_gr(s->grbuf[ch], h->mdct_overlap[ch], gr_info->block_type, n_long_bands);\n        ma_dr_mp3_L3_change_sign(s->grbuf[ch]);\n    }\n}\nstatic void ma_dr_mp3d_DCT_II(float *grbuf, int n)\n{\n    static const float g_sec[24] = {\n        10.19000816f,0.50060302f,0.50241929f,3.40760851f,0.50547093f,0.52249861f,2.05778098f,0.51544732f,0.56694406f,1.48416460f,0.53104258f,0.64682180f,1.16943991f,0.55310392f,0.78815460f,0.97256821f,0.58293498f,1.06067765f,0.83934963f,0.62250412f,1.72244716f,0.74453628f,0.67480832f,5.10114861f\n    };\n    int i, k = 0;\n#if MA_DR_MP3_HAVE_SIMD\n    if (ma_dr_mp3_have_simd()) for (; k < n; k += 4)\n    {\n        ma_dr_mp3_f4 t[4][8], *x;\n        float *y = grbuf + k;\n        for (x = t[0], i = 0; i < 8; i++, x++)\n        {\n            ma_dr_mp3_f4 x0 = MA_DR_MP3_VLD(&y[i*18]);\n            ma_dr_mp3_f4 x1 = MA_DR_MP3_VLD(&y[(15 - i)*18]);\n            ma_dr_mp3_f4 x2 = MA_DR_MP3_VLD(&y[(16 + i)*18]);\n            ma_dr_mp3_f4 x3 = MA_DR_MP3_VLD(&y[(31 - i)*18]);\n            ma_dr_mp3_f4 t0 = MA_DR_MP3_VADD(x0, x3);\n            ma_dr_mp3_f4 t1 = MA_DR_MP3_VADD(x1, x2);\n            ma_dr_mp3_f4 t2 = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x1, x2), g_sec[3*i + 0]);\n            ma_dr_mp3_f4 t3 = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x0, x3), g_sec[3*i + 1]);\n            x[0] = MA_DR_MP3_VADD(t0, t1);\n            x[8] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(t0, t1), g_sec[3*i + 2]);\n            x[16] = MA_DR_MP3_VADD(t3, t2);\n            x[24] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(t3, t2), g_sec[3*i + 2]);\n        }\n        for (x = t[0], i = 0; i < 4; i++, x += 8)\n        {\n            ma_dr_mp3_f4 x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3], x4 = x[4], x5 = x[5], x6 = x[6], x7 = x[7], xt;\n            xt = MA_DR_MP3_VSUB(x0, x7); x0 = MA_DR_MP3_VADD(x0, x7);\n            x7 = MA_DR_MP3_VSUB(x1, x6); x1 = MA_DR_MP3_VADD(x1, x6);\n            x6 = MA_DR_MP3_VSUB(x2, x5); x2 = MA_DR_MP3_VADD(x2, x5);\n            x5 = MA_DR_MP3_VSUB(x3, x4); x3 = MA_DR_MP3_VADD(x3, x4);\n            x4 = MA_DR_MP3_VSUB(x0, x3); x0 = MA_DR_MP3_VADD(x0, x3);\n            x3 = MA_DR_MP3_VSUB(x1, x2); x1 = MA_DR_MP3_VADD(x1, x2);\n            x[0] = MA_DR_MP3_VADD(x0, x1);\n            x[4] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x0, x1), 0.70710677f);\n            x5 = MA_DR_MP3_VADD(x5, x6);\n            x6 = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(x6, x7), 0.70710677f);\n            x7 = MA_DR_MP3_VADD(x7, xt);\n            x3 = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(x3, x4), 0.70710677f);\n            x5 = MA_DR_MP3_VSUB(x5, MA_DR_MP3_VMUL_S(x7, 0.198912367f));\n            x7 = MA_DR_MP3_VADD(x7, MA_DR_MP3_VMUL_S(x5, 0.382683432f));\n            x5 = MA_DR_MP3_VSUB(x5, MA_DR_MP3_VMUL_S(x7, 0.198912367f));\n            x0 = MA_DR_MP3_VSUB(xt, x6); xt = MA_DR_MP3_VADD(xt, x6);\n            x[1] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(xt, x7), 0.50979561f);\n            x[2] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(x4, x3), 0.54119611f);\n            x[3] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x0, x5), 0.60134488f);\n            x[5] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VADD(x0, x5), 0.89997619f);\n            x[6] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(x4, x3), 1.30656302f);\n            x[7] = MA_DR_MP3_VMUL_S(MA_DR_MP3_VSUB(xt, x7), 2.56291556f);\n        }\n        if (k > n - 3)\n        {\n#if MA_DR_MP3_HAVE_SSE\n#define MA_DR_MP3_VSAVE2(i, v) _mm_storel_pi((__m64 *)(void*)&y[i*18], v)\n#else\n#define MA_DR_MP3_VSAVE2(i, v) vst1_f32((float32_t *)&y[(i)*18],  vget_low_f32(v))\n#endif\n            for (i = 0; i < 7; i++, y += 4*18)\n            {\n                ma_dr_mp3_f4 s = MA_DR_MP3_VADD(t[3][i], t[3][i + 1]);\n                MA_DR_MP3_VSAVE2(0, t[0][i]);\n                MA_DR_MP3_VSAVE2(1, MA_DR_MP3_VADD(t[2][i], s));\n                MA_DR_MP3_VSAVE2(2, MA_DR_MP3_VADD(t[1][i], t[1][i + 1]));\n                MA_DR_MP3_VSAVE2(3, MA_DR_MP3_VADD(t[2][1 + i], s));\n            }\n            MA_DR_MP3_VSAVE2(0, t[0][7]);\n            MA_DR_MP3_VSAVE2(1, MA_DR_MP3_VADD(t[2][7], t[3][7]));\n            MA_DR_MP3_VSAVE2(2, t[1][7]);\n            MA_DR_MP3_VSAVE2(3, t[3][7]);\n        } else\n        {\n#define MA_DR_MP3_VSAVE4(i, v) MA_DR_MP3_VSTORE(&y[(i)*18], v)\n            for (i = 0; i < 7; i++, y += 4*18)\n            {\n                ma_dr_mp3_f4 s = MA_DR_MP3_VADD(t[3][i], t[3][i + 1]);\n                MA_DR_MP3_VSAVE4(0, t[0][i]);\n                MA_DR_MP3_VSAVE4(1, MA_DR_MP3_VADD(t[2][i], s));\n                MA_DR_MP3_VSAVE4(2, MA_DR_MP3_VADD(t[1][i], t[1][i + 1]));\n                MA_DR_MP3_VSAVE4(3, MA_DR_MP3_VADD(t[2][1 + i], s));\n            }\n            MA_DR_MP3_VSAVE4(0, t[0][7]);\n            MA_DR_MP3_VSAVE4(1, MA_DR_MP3_VADD(t[2][7], t[3][7]));\n            MA_DR_MP3_VSAVE4(2, t[1][7]);\n            MA_DR_MP3_VSAVE4(3, t[3][7]);\n        }\n    } else\n#endif\n#ifdef MA_DR_MP3_ONLY_SIMD\n    {}\n#else\n    for (; k < n; k++)\n    {\n        float t[4][8], *x, *y = grbuf + k;\n        for (x = t[0], i = 0; i < 8; i++, x++)\n        {\n            float x0 = y[i*18];\n            float x1 = y[(15 - i)*18];\n            float x2 = y[(16 + i)*18];\n            float x3 = y[(31 - i)*18];\n            float t0 = x0 + x3;\n            float t1 = x1 + x2;\n            float t2 = (x1 - x2)*g_sec[3*i + 0];\n            float t3 = (x0 - x3)*g_sec[3*i + 1];\n            x[0] = t0 + t1;\n            x[8] = (t0 - t1)*g_sec[3*i + 2];\n            x[16] = t3 + t2;\n            x[24] = (t3 - t2)*g_sec[3*i + 2];\n        }\n        for (x = t[0], i = 0; i < 4; i++, x += 8)\n        {\n            float x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3], x4 = x[4], x5 = x[5], x6 = x[6], x7 = x[7], xt;\n            xt = x0 - x7; x0 += x7;\n            x7 = x1 - x6; x1 += x6;\n            x6 = x2 - x5; x2 += x5;\n            x5 = x3 - x4; x3 += x4;\n            x4 = x0 - x3; x0 += x3;\n            x3 = x1 - x2; x1 += x2;\n            x[0] = x0 + x1;\n            x[4] = (x0 - x1)*0.70710677f;\n            x5 =  x5 + x6;\n            x6 = (x6 + x7)*0.70710677f;\n            x7 =  x7 + xt;\n            x3 = (x3 + x4)*0.70710677f;\n            x5 -= x7*0.198912367f;\n            x7 += x5*0.382683432f;\n            x5 -= x7*0.198912367f;\n            x0 = xt - x6; xt += x6;\n            x[1] = (xt + x7)*0.50979561f;\n            x[2] = (x4 + x3)*0.54119611f;\n            x[3] = (x0 - x5)*0.60134488f;\n            x[5] = (x0 + x5)*0.89997619f;\n            x[6] = (x4 - x3)*1.30656302f;\n            x[7] = (xt - x7)*2.56291556f;\n        }\n        for (i = 0; i < 7; i++, y += 4*18)\n        {\n            y[0*18] = t[0][i];\n            y[1*18] = t[2][i] + t[3][i] + t[3][i + 1];\n            y[2*18] = t[1][i] + t[1][i + 1];\n            y[3*18] = t[2][i + 1] + t[3][i] + t[3][i + 1];\n        }\n        y[0*18] = t[0][7];\n        y[1*18] = t[2][7] + t[3][7];\n        y[2*18] = t[1][7];\n        y[3*18] = t[3][7];\n    }\n#endif\n}\n#ifndef MA_DR_MP3_FLOAT_OUTPUT\ntypedef ma_int16 ma_dr_mp3d_sample_t;\nstatic ma_int16 ma_dr_mp3d_scale_pcm(float sample)\n{\n    ma_int16 s;\n#if MA_DR_MP3_HAVE_ARMV6\n    ma_int32 s32 = (ma_int32)(sample + .5f);\n    s32 -= (s32 < 0);\n    s = (ma_int16)ma_dr_mp3_clip_int16_arm(s32);\n#else\n    if (sample >=  32766.5) return (ma_int16) 32767;\n    if (sample <= -32767.5) return (ma_int16)-32768;\n    s = (ma_int16)(sample + .5f);\n    s -= (s < 0);\n#endif\n    return s;\n}\n#else\ntypedef float ma_dr_mp3d_sample_t;\nstatic float ma_dr_mp3d_scale_pcm(float sample)\n{\n    return sample*(1.f/32768.f);\n}\n#endif\nstatic void ma_dr_mp3d_synth_pair(ma_dr_mp3d_sample_t *pcm, int nch, const float *z)\n{\n    float a;\n    a  = (z[14*64] - z[    0]) * 29;\n    a += (z[ 1*64] + z[13*64]) * 213;\n    a += (z[12*64] - z[ 2*64]) * 459;\n    a += (z[ 3*64] + z[11*64]) * 2037;\n    a += (z[10*64] - z[ 4*64]) * 5153;\n    a += (z[ 5*64] + z[ 9*64]) * 6574;\n    a += (z[ 8*64] - z[ 6*64]) * 37489;\n    a +=  z[ 7*64]             * 75038;\n    pcm[0] = ma_dr_mp3d_scale_pcm(a);\n    z += 2;\n    a  = z[14*64] * 104;\n    a += z[12*64] * 1567;\n    a += z[10*64] * 9727;\n    a += z[ 8*64] * 64019;\n    a += z[ 6*64] * -9975;\n    a += z[ 4*64] * -45;\n    a += z[ 2*64] * 146;\n    a += z[ 0*64] * -5;\n    pcm[16*nch] = ma_dr_mp3d_scale_pcm(a);\n}\nstatic void ma_dr_mp3d_synth(float *xl, ma_dr_mp3d_sample_t *dstl, int nch, float *lins)\n{\n    int i;\n    float *xr = xl + 576*(nch - 1);\n    ma_dr_mp3d_sample_t *dstr = dstl + (nch - 1);\n    static const float g_win[] = {\n        -1,26,-31,208,218,401,-519,2063,2000,4788,-5517,7134,5959,35640,-39336,74992,\n        -1,24,-35,202,222,347,-581,2080,1952,4425,-5879,7640,5288,33791,-41176,74856,\n        -1,21,-38,196,225,294,-645,2087,1893,4063,-6237,8092,4561,31947,-43006,74630,\n        -1,19,-41,190,227,244,-711,2085,1822,3705,-6589,8492,3776,30112,-44821,74313,\n        -1,17,-45,183,228,197,-779,2075,1739,3351,-6935,8840,2935,28289,-46617,73908,\n        -1,16,-49,176,228,153,-848,2057,1644,3004,-7271,9139,2037,26482,-48390,73415,\n        -2,14,-53,169,227,111,-919,2032,1535,2663,-7597,9389,1082,24694,-50137,72835,\n        -2,13,-58,161,224,72,-991,2001,1414,2330,-7910,9592,70,22929,-51853,72169,\n        -2,11,-63,154,221,36,-1064,1962,1280,2006,-8209,9750,-998,21189,-53534,71420,\n        -2,10,-68,147,215,2,-1137,1919,1131,1692,-8491,9863,-2122,19478,-55178,70590,\n        -3,9,-73,139,208,-29,-1210,1870,970,1388,-8755,9935,-3300,17799,-56778,69679,\n        -3,8,-79,132,200,-57,-1283,1817,794,1095,-8998,9966,-4533,16155,-58333,68692,\n        -4,7,-85,125,189,-83,-1356,1759,605,814,-9219,9959,-5818,14548,-59838,67629,\n        -4,7,-91,117,177,-106,-1428,1698,402,545,-9416,9916,-7154,12980,-61289,66494,\n        -5,6,-97,111,163,-127,-1498,1634,185,288,-9585,9838,-8540,11455,-62684,65290\n    };\n    float *zlin = lins + 15*64;\n    const float *w = g_win;\n    zlin[4*15]     = xl[18*16];\n    zlin[4*15 + 1] = xr[18*16];\n    zlin[4*15 + 2] = xl[0];\n    zlin[4*15 + 3] = xr[0];\n    zlin[4*31]     = xl[1 + 18*16];\n    zlin[4*31 + 1] = xr[1 + 18*16];\n    zlin[4*31 + 2] = xl[1];\n    zlin[4*31 + 3] = xr[1];\n    ma_dr_mp3d_synth_pair(dstr, nch, lins + 4*15 + 1);\n    ma_dr_mp3d_synth_pair(dstr + 32*nch, nch, lins + 4*15 + 64 + 1);\n    ma_dr_mp3d_synth_pair(dstl, nch, lins + 4*15);\n    ma_dr_mp3d_synth_pair(dstl + 32*nch, nch, lins + 4*15 + 64);\n#if MA_DR_MP3_HAVE_SIMD\n    if (ma_dr_mp3_have_simd()) for (i = 14; i >= 0; i--)\n    {\n#define MA_DR_MP3_VLOAD(k) ma_dr_mp3_f4 w0 = MA_DR_MP3_VSET(*w++); ma_dr_mp3_f4 w1 = MA_DR_MP3_VSET(*w++); ma_dr_mp3_f4 vz = MA_DR_MP3_VLD(&zlin[4*i - 64*k]); ma_dr_mp3_f4 vy = MA_DR_MP3_VLD(&zlin[4*i - 64*(15 - k)]);\n#define MA_DR_MP3_V0(k) { MA_DR_MP3_VLOAD(k) b =               MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vz, w1), MA_DR_MP3_VMUL(vy, w0)) ; a =               MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vz, w0), MA_DR_MP3_VMUL(vy, w1));  }\n#define MA_DR_MP3_V1(k) { MA_DR_MP3_VLOAD(k) b = MA_DR_MP3_VADD(b, MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vz, w1), MA_DR_MP3_VMUL(vy, w0))); a = MA_DR_MP3_VADD(a, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vz, w0), MA_DR_MP3_VMUL(vy, w1))); }\n#define MA_DR_MP3_V2(k) { MA_DR_MP3_VLOAD(k) b = MA_DR_MP3_VADD(b, MA_DR_MP3_VADD(MA_DR_MP3_VMUL(vz, w1), MA_DR_MP3_VMUL(vy, w0))); a = MA_DR_MP3_VADD(a, MA_DR_MP3_VSUB(MA_DR_MP3_VMUL(vy, w1), MA_DR_MP3_VMUL(vz, w0))); }\n        ma_dr_mp3_f4 a, b;\n        zlin[4*i]     = xl[18*(31 - i)];\n        zlin[4*i + 1] = xr[18*(31 - i)];\n        zlin[4*i + 2] = xl[1 + 18*(31 - i)];\n        zlin[4*i + 3] = xr[1 + 18*(31 - i)];\n        zlin[4*i + 64] = xl[1 + 18*(1 + i)];\n        zlin[4*i + 64 + 1] = xr[1 + 18*(1 + i)];\n        zlin[4*i - 64 + 2] = xl[18*(1 + i)];\n        zlin[4*i - 64 + 3] = xr[18*(1 + i)];\n        MA_DR_MP3_V0(0) MA_DR_MP3_V2(1) MA_DR_MP3_V1(2) MA_DR_MP3_V2(3) MA_DR_MP3_V1(4) MA_DR_MP3_V2(5) MA_DR_MP3_V1(6) MA_DR_MP3_V2(7)\n        {\n#ifndef MA_DR_MP3_FLOAT_OUTPUT\n#if MA_DR_MP3_HAVE_SSE\n            static const ma_dr_mp3_f4 g_max = { 32767.0f, 32767.0f, 32767.0f, 32767.0f };\n            static const ma_dr_mp3_f4 g_min = { -32768.0f, -32768.0f, -32768.0f, -32768.0f };\n            __m128i pcm8 = _mm_packs_epi32(_mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(a, g_max), g_min)),\n                                           _mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(b, g_max), g_min)));\n            dstr[(15 - i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 1);\n            dstr[(17 + i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 5);\n            dstl[(15 - i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 0);\n            dstl[(17 + i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 4);\n            dstr[(47 - i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 3);\n            dstr[(49 + i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 7);\n            dstl[(47 - i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 2);\n            dstl[(49 + i)*nch] = (ma_int16)_mm_extract_epi16(pcm8, 6);\n#else\n            int16x4_t pcma, pcmb;\n            a = MA_DR_MP3_VADD(a, MA_DR_MP3_VSET(0.5f));\n            b = MA_DR_MP3_VADD(b, MA_DR_MP3_VSET(0.5f));\n            pcma = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(a), vreinterpretq_s32_u32(vcltq_f32(a, MA_DR_MP3_VSET(0)))));\n            pcmb = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(b), vreinterpretq_s32_u32(vcltq_f32(b, MA_DR_MP3_VSET(0)))));\n            vst1_lane_s16(dstr + (15 - i)*nch, pcma, 1);\n            vst1_lane_s16(dstr + (17 + i)*nch, pcmb, 1);\n            vst1_lane_s16(dstl + (15 - i)*nch, pcma, 0);\n            vst1_lane_s16(dstl + (17 + i)*nch, pcmb, 0);\n            vst1_lane_s16(dstr + (47 - i)*nch, pcma, 3);\n            vst1_lane_s16(dstr + (49 + i)*nch, pcmb, 3);\n            vst1_lane_s16(dstl + (47 - i)*nch, pcma, 2);\n            vst1_lane_s16(dstl + (49 + i)*nch, pcmb, 2);\n#endif\n#else\n        #if MA_DR_MP3_HAVE_SSE\n            static const ma_dr_mp3_f4 g_scale = { 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f };\n        #else\n            const ma_dr_mp3_f4 g_scale = vdupq_n_f32(1.0f/32768.0f);\n        #endif\n            a = MA_DR_MP3_VMUL(a, g_scale);\n            b = MA_DR_MP3_VMUL(b, g_scale);\n#if MA_DR_MP3_HAVE_SSE\n            _mm_store_ss(dstr + (15 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(1, 1, 1, 1)));\n            _mm_store_ss(dstr + (17 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(1, 1, 1, 1)));\n            _mm_store_ss(dstl + (15 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(0, 0, 0, 0)));\n            _mm_store_ss(dstl + (17 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(0, 0, 0, 0)));\n            _mm_store_ss(dstr + (47 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(3, 3, 3, 3)));\n            _mm_store_ss(dstr + (49 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(3, 3, 3, 3)));\n            _mm_store_ss(dstl + (47 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(2, 2, 2, 2)));\n            _mm_store_ss(dstl + (49 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(2, 2, 2, 2)));\n#else\n            vst1q_lane_f32(dstr + (15 - i)*nch, a, 1);\n            vst1q_lane_f32(dstr + (17 + i)*nch, b, 1);\n            vst1q_lane_f32(dstl + (15 - i)*nch, a, 0);\n            vst1q_lane_f32(dstl + (17 + i)*nch, b, 0);\n            vst1q_lane_f32(dstr + (47 - i)*nch, a, 3);\n            vst1q_lane_f32(dstr + (49 + i)*nch, b, 3);\n            vst1q_lane_f32(dstl + (47 - i)*nch, a, 2);\n            vst1q_lane_f32(dstl + (49 + i)*nch, b, 2);\n#endif\n#endif\n        }\n    } else\n#endif\n#ifdef MA_DR_MP3_ONLY_SIMD\n    {}\n#else\n    for (i = 14; i >= 0; i--)\n    {\n#define MA_DR_MP3_LOAD(k) float w0 = *w++; float w1 = *w++; float *vz = &zlin[4*i - k*64]; float *vy = &zlin[4*i - (15 - k)*64];\n#define MA_DR_MP3_S0(k) { int j; MA_DR_MP3_LOAD(k); for (j = 0; j < 4; j++) b[j]  = vz[j]*w1 + vy[j]*w0, a[j]  = vz[j]*w0 - vy[j]*w1; }\n#define MA_DR_MP3_S1(k) { int j; MA_DR_MP3_LOAD(k); for (j = 0; j < 4; j++) b[j] += vz[j]*w1 + vy[j]*w0, a[j] += vz[j]*w0 - vy[j]*w1; }\n#define MA_DR_MP3_S2(k) { int j; MA_DR_MP3_LOAD(k); for (j = 0; j < 4; j++) b[j] += vz[j]*w1 + vy[j]*w0, a[j] += vy[j]*w1 - vz[j]*w0; }\n        float a[4], b[4];\n        zlin[4*i]     = xl[18*(31 - i)];\n        zlin[4*i + 1] = xr[18*(31 - i)];\n        zlin[4*i + 2] = xl[1 + 18*(31 - i)];\n        zlin[4*i + 3] = xr[1 + 18*(31 - i)];\n        zlin[4*(i + 16)]   = xl[1 + 18*(1 + i)];\n        zlin[4*(i + 16) + 1] = xr[1 + 18*(1 + i)];\n        zlin[4*(i - 16) + 2] = xl[18*(1 + i)];\n        zlin[4*(i - 16) + 3] = xr[18*(1 + i)];\n        MA_DR_MP3_S0(0) MA_DR_MP3_S2(1) MA_DR_MP3_S1(2) MA_DR_MP3_S2(3) MA_DR_MP3_S1(4) MA_DR_MP3_S2(5) MA_DR_MP3_S1(6) MA_DR_MP3_S2(7)\n        dstr[(15 - i)*nch] = ma_dr_mp3d_scale_pcm(a[1]);\n        dstr[(17 + i)*nch] = ma_dr_mp3d_scale_pcm(b[1]);\n        dstl[(15 - i)*nch] = ma_dr_mp3d_scale_pcm(a[0]);\n        dstl[(17 + i)*nch] = ma_dr_mp3d_scale_pcm(b[0]);\n        dstr[(47 - i)*nch] = ma_dr_mp3d_scale_pcm(a[3]);\n        dstr[(49 + i)*nch] = ma_dr_mp3d_scale_pcm(b[3]);\n        dstl[(47 - i)*nch] = ma_dr_mp3d_scale_pcm(a[2]);\n        dstl[(49 + i)*nch] = ma_dr_mp3d_scale_pcm(b[2]);\n    }\n#endif\n}\nstatic void ma_dr_mp3d_synth_granule(float *qmf_state, float *grbuf, int nbands, int nch, ma_dr_mp3d_sample_t *pcm, float *lins)\n{\n    int i;\n    for (i = 0; i < nch; i++)\n    {\n        ma_dr_mp3d_DCT_II(grbuf + 576*i, nbands);\n    }\n    MA_DR_MP3_COPY_MEMORY(lins, qmf_state, sizeof(float)*15*64);\n    for (i = 0; i < nbands; i += 2)\n    {\n        ma_dr_mp3d_synth(grbuf + i, pcm + 32*nch*i, nch, lins + i*64);\n    }\n#ifndef MA_DR_MP3_NONSTANDARD_BUT_LOGICAL\n    if (nch == 1)\n    {\n        for (i = 0; i < 15*64; i += 2)\n        {\n            qmf_state[i] = lins[nbands*64 + i];\n        }\n    } else\n#endif\n    {\n        MA_DR_MP3_COPY_MEMORY(qmf_state, lins + nbands*64, sizeof(float)*15*64);\n    }\n}\nstatic int ma_dr_mp3d_match_frame(const ma_uint8 *hdr, int mp3_bytes, int frame_bytes)\n{\n    int i, nmatch;\n    for (i = 0, nmatch = 0; nmatch < MA_DR_MP3_MAX_FRAME_SYNC_MATCHES; nmatch++)\n    {\n        i += ma_dr_mp3_hdr_frame_bytes(hdr + i, frame_bytes) + ma_dr_mp3_hdr_padding(hdr + i);\n        if (i + MA_DR_MP3_HDR_SIZE > mp3_bytes)\n            return nmatch > 0;\n        if (!ma_dr_mp3_hdr_compare(hdr, hdr + i))\n            return 0;\n    }\n    return 1;\n}\nstatic int ma_dr_mp3d_find_frame(const ma_uint8 *mp3, int mp3_bytes, int *free_format_bytes, int *ptr_frame_bytes)\n{\n    int i, k;\n    for (i = 0; i < mp3_bytes - MA_DR_MP3_HDR_SIZE; i++, mp3++)\n    {\n        if (ma_dr_mp3_hdr_valid(mp3))\n        {\n            int frame_bytes = ma_dr_mp3_hdr_frame_bytes(mp3, *free_format_bytes);\n            int frame_and_padding = frame_bytes + ma_dr_mp3_hdr_padding(mp3);\n            for (k = MA_DR_MP3_HDR_SIZE; !frame_bytes && k < MA_DR_MP3_MAX_FREE_FORMAT_FRAME_SIZE && i + 2*k < mp3_bytes - MA_DR_MP3_HDR_SIZE; k++)\n            {\n                if (ma_dr_mp3_hdr_compare(mp3, mp3 + k))\n                {\n                    int fb = k - ma_dr_mp3_hdr_padding(mp3);\n                    int nextfb = fb + ma_dr_mp3_hdr_padding(mp3 + k);\n                    if (i + k + nextfb + MA_DR_MP3_HDR_SIZE > mp3_bytes || !ma_dr_mp3_hdr_compare(mp3, mp3 + k + nextfb))\n                        continue;\n                    frame_and_padding = k;\n                    frame_bytes = fb;\n                    *free_format_bytes = fb;\n                }\n            }\n            if ((frame_bytes && i + frame_and_padding <= mp3_bytes &&\n                ma_dr_mp3d_match_frame(mp3, mp3_bytes - i, frame_bytes)) ||\n                (!i && frame_and_padding == mp3_bytes))\n            {\n                *ptr_frame_bytes = frame_and_padding;\n                return i;\n            }\n            *free_format_bytes = 0;\n        }\n    }\n    *ptr_frame_bytes = 0;\n    return mp3_bytes;\n}\nMA_API void ma_dr_mp3dec_init(ma_dr_mp3dec *dec)\n{\n    dec->header[0] = 0;\n}\nMA_API int ma_dr_mp3dec_decode_frame(ma_dr_mp3dec *dec, const ma_uint8 *mp3, int mp3_bytes, void *pcm, ma_dr_mp3dec_frame_info *info)\n{\n    int i = 0, igr, frame_size = 0, success = 1;\n    const ma_uint8 *hdr;\n    ma_dr_mp3_bs bs_frame[1];\n    ma_dr_mp3dec_scratch scratch;\n    if (mp3_bytes > 4 && dec->header[0] == 0xff && ma_dr_mp3_hdr_compare(dec->header, mp3))\n    {\n        frame_size = ma_dr_mp3_hdr_frame_bytes(mp3, dec->free_format_bytes) + ma_dr_mp3_hdr_padding(mp3);\n        if (frame_size != mp3_bytes && (frame_size + MA_DR_MP3_HDR_SIZE > mp3_bytes || !ma_dr_mp3_hdr_compare(mp3, mp3 + frame_size)))\n        {\n            frame_size = 0;\n        }\n    }\n    if (!frame_size)\n    {\n        MA_DR_MP3_ZERO_MEMORY(dec, sizeof(ma_dr_mp3dec));\n        i = ma_dr_mp3d_find_frame(mp3, mp3_bytes, &dec->free_format_bytes, &frame_size);\n        if (!frame_size || i + frame_size > mp3_bytes)\n        {\n            info->frame_bytes = i;\n            return 0;\n        }\n    }\n    hdr = mp3 + i;\n    MA_DR_MP3_COPY_MEMORY(dec->header, hdr, MA_DR_MP3_HDR_SIZE);\n    info->frame_bytes = i + frame_size;\n    info->channels = MA_DR_MP3_HDR_IS_MONO(hdr) ? 1 : 2;\n    info->hz = ma_dr_mp3_hdr_sample_rate_hz(hdr);\n    info->layer = 4 - MA_DR_MP3_HDR_GET_LAYER(hdr);\n    info->bitrate_kbps = ma_dr_mp3_hdr_bitrate_kbps(hdr);\n    ma_dr_mp3_bs_init(bs_frame, hdr + MA_DR_MP3_HDR_SIZE, frame_size - MA_DR_MP3_HDR_SIZE);\n    if (MA_DR_MP3_HDR_IS_CRC(hdr))\n    {\n        ma_dr_mp3_bs_get_bits(bs_frame, 16);\n    }\n    if (info->layer == 3)\n    {\n        int main_data_begin = ma_dr_mp3_L3_read_side_info(bs_frame, scratch.gr_info, hdr);\n        if (main_data_begin < 0 || bs_frame->pos > bs_frame->limit)\n        {\n            ma_dr_mp3dec_init(dec);\n            return 0;\n        }\n        success = ma_dr_mp3_L3_restore_reservoir(dec, bs_frame, &scratch, main_data_begin);\n        if (success && pcm != NULL)\n        {\n            for (igr = 0; igr < (MA_DR_MP3_HDR_TEST_MPEG1(hdr) ? 2 : 1); igr++, pcm = MA_DR_MP3_OFFSET_PTR(pcm, sizeof(ma_dr_mp3d_sample_t)*576*info->channels))\n            {\n                MA_DR_MP3_ZERO_MEMORY(scratch.grbuf[0], 576*2*sizeof(float));\n                ma_dr_mp3_L3_decode(dec, &scratch, scratch.gr_info + igr*info->channels, info->channels);\n                ma_dr_mp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 18, info->channels, (ma_dr_mp3d_sample_t*)pcm, scratch.syn[0]);\n            }\n        }\n        ma_dr_mp3_L3_save_reservoir(dec, &scratch);\n    } else\n    {\n#ifdef MA_DR_MP3_ONLY_MP3\n        return 0;\n#else\n        ma_dr_mp3_L12_scale_info sci[1];\n        if (pcm == NULL) {\n            return ma_dr_mp3_hdr_frame_samples(hdr);\n        }\n        ma_dr_mp3_L12_read_scale_info(hdr, bs_frame, sci);\n        MA_DR_MP3_ZERO_MEMORY(scratch.grbuf[0], 576*2*sizeof(float));\n        for (i = 0, igr = 0; igr < 3; igr++)\n        {\n            if (12 == (i += ma_dr_mp3_L12_dequantize_granule(scratch.grbuf[0] + i, bs_frame, sci, info->layer | 1)))\n            {\n                i = 0;\n                ma_dr_mp3_L12_apply_scf_384(sci, sci->scf + igr, scratch.grbuf[0]);\n                ma_dr_mp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 12, info->channels, (ma_dr_mp3d_sample_t*)pcm, scratch.syn[0]);\n                MA_DR_MP3_ZERO_MEMORY(scratch.grbuf[0], 576*2*sizeof(float));\n                pcm = MA_DR_MP3_OFFSET_PTR(pcm, sizeof(ma_dr_mp3d_sample_t)*384*info->channels);\n            }\n            if (bs_frame->pos > bs_frame->limit)\n            {\n                ma_dr_mp3dec_init(dec);\n                return 0;\n            }\n        }\n#endif\n    }\n    return success*ma_dr_mp3_hdr_frame_samples(dec->header);\n}\nMA_API void ma_dr_mp3dec_f32_to_s16(const float *in, ma_int16 *out, size_t num_samples)\n{\n    size_t i = 0;\n#if MA_DR_MP3_HAVE_SIMD\n    size_t aligned_count = num_samples & ~7;\n    for(; i < aligned_count; i+=8)\n    {\n        ma_dr_mp3_f4 scale = MA_DR_MP3_VSET(32768.0f);\n        ma_dr_mp3_f4 a = MA_DR_MP3_VMUL(MA_DR_MP3_VLD(&in[i  ]), scale);\n        ma_dr_mp3_f4 b = MA_DR_MP3_VMUL(MA_DR_MP3_VLD(&in[i+4]), scale);\n#if MA_DR_MP3_HAVE_SSE\n        ma_dr_mp3_f4 s16max = MA_DR_MP3_VSET( 32767.0f);\n        ma_dr_mp3_f4 s16min = MA_DR_MP3_VSET(-32768.0f);\n        __m128i pcm8 = _mm_packs_epi32(_mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(a, s16max), s16min)),\n                                        _mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(b, s16max), s16min)));\n        out[i  ] = (ma_int16)_mm_extract_epi16(pcm8, 0);\n        out[i+1] = (ma_int16)_mm_extract_epi16(pcm8, 1);\n        out[i+2] = (ma_int16)_mm_extract_epi16(pcm8, 2);\n        out[i+3] = (ma_int16)_mm_extract_epi16(pcm8, 3);\n        out[i+4] = (ma_int16)_mm_extract_epi16(pcm8, 4);\n        out[i+5] = (ma_int16)_mm_extract_epi16(pcm8, 5);\n        out[i+6] = (ma_int16)_mm_extract_epi16(pcm8, 6);\n        out[i+7] = (ma_int16)_mm_extract_epi16(pcm8, 7);\n#else\n        int16x4_t pcma, pcmb;\n        a = MA_DR_MP3_VADD(a, MA_DR_MP3_VSET(0.5f));\n        b = MA_DR_MP3_VADD(b, MA_DR_MP3_VSET(0.5f));\n        pcma = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(a), vreinterpretq_s32_u32(vcltq_f32(a, MA_DR_MP3_VSET(0)))));\n        pcmb = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(b), vreinterpretq_s32_u32(vcltq_f32(b, MA_DR_MP3_VSET(0)))));\n        vst1_lane_s16(out+i  , pcma, 0);\n        vst1_lane_s16(out+i+1, pcma, 1);\n        vst1_lane_s16(out+i+2, pcma, 2);\n        vst1_lane_s16(out+i+3, pcma, 3);\n        vst1_lane_s16(out+i+4, pcmb, 0);\n        vst1_lane_s16(out+i+5, pcmb, 1);\n        vst1_lane_s16(out+i+6, pcmb, 2);\n        vst1_lane_s16(out+i+7, pcmb, 3);\n#endif\n    }\n#endif\n    for(; i < num_samples; i++)\n    {\n        float sample = in[i] * 32768.0f;\n        if (sample >=  32766.5)\n            out[i] = (ma_int16) 32767;\n        else if (sample <= -32767.5)\n            out[i] = (ma_int16)-32768;\n        else\n        {\n            short s = (ma_int16)(sample + .5f);\n            s -= (s < 0);\n            out[i] = s;\n        }\n    }\n}\n#ifndef MA_DR_MP3_SEEK_LEADING_MP3_FRAMES\n#define MA_DR_MP3_SEEK_LEADING_MP3_FRAMES   2\n#endif\n#define MA_DR_MP3_MIN_DATA_CHUNK_SIZE   16384\n#ifndef MA_DR_MP3_DATA_CHUNK_SIZE\n#define MA_DR_MP3_DATA_CHUNK_SIZE  (MA_DR_MP3_MIN_DATA_CHUNK_SIZE*4)\n#endif\n#define MA_DR_MP3_COUNTOF(x)        (sizeof(x) / sizeof(x[0]))\n#define MA_DR_MP3_CLAMP(x, lo, hi)  (MA_DR_MP3_MAX(lo, MA_DR_MP3_MIN(x, hi)))\n#ifndef MA_DR_MP3_PI_D\n#define MA_DR_MP3_PI_D    3.14159265358979323846264\n#endif\n#define MA_DR_MP3_DEFAULT_RESAMPLER_LPF_ORDER   2\nstatic MA_INLINE float ma_dr_mp3_mix_f32(float x, float y, float a)\n{\n    return x*(1-a) + y*a;\n}\nstatic MA_INLINE float ma_dr_mp3_mix_f32_fast(float x, float y, float a)\n{\n    float r0 = (y - x);\n    float r1 = r0*a;\n    return x + r1;\n}\nstatic MA_INLINE ma_uint32 ma_dr_mp3_gcf_u32(ma_uint32 a, ma_uint32 b)\n{\n    for (;;) {\n        if (b == 0) {\n            break;\n        } else {\n            ma_uint32 t = a;\n            a = b;\n            b = t % a;\n        }\n    }\n    return a;\n}\nstatic void* ma_dr_mp3__malloc_default(size_t sz, void* pUserData)\n{\n    (void)pUserData;\n    return MA_DR_MP3_MALLOC(sz);\n}\nstatic void* ma_dr_mp3__realloc_default(void* p, size_t sz, void* pUserData)\n{\n    (void)pUserData;\n    return MA_DR_MP3_REALLOC(p, sz);\n}\nstatic void ma_dr_mp3__free_default(void* p, void* pUserData)\n{\n    (void)pUserData;\n    MA_DR_MP3_FREE(p);\n}\nstatic void* ma_dr_mp3__malloc_from_callbacks(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks == NULL) {\n        return NULL;\n    }\n    if (pAllocationCallbacks->onMalloc != NULL) {\n        return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData);\n    }\n    if (pAllocationCallbacks->onRealloc != NULL) {\n        return pAllocationCallbacks->onRealloc(NULL, sz, pAllocationCallbacks->pUserData);\n    }\n    return NULL;\n}\nstatic void* ma_dr_mp3__realloc_from_callbacks(void* p, size_t szNew, size_t szOld, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks == NULL) {\n        return NULL;\n    }\n    if (pAllocationCallbacks->onRealloc != NULL) {\n        return pAllocationCallbacks->onRealloc(p, szNew, pAllocationCallbacks->pUserData);\n    }\n    if (pAllocationCallbacks->onMalloc != NULL && pAllocationCallbacks->onFree != NULL) {\n        void* p2;\n        p2 = pAllocationCallbacks->onMalloc(szNew, pAllocationCallbacks->pUserData);\n        if (p2 == NULL) {\n            return NULL;\n        }\n        if (p != NULL) {\n            MA_DR_MP3_COPY_MEMORY(p2, p, szOld);\n            pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData);\n        }\n        return p2;\n    }\n    return NULL;\n}\nstatic void ma_dr_mp3__free_from_callbacks(void* p, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (p == NULL || pAllocationCallbacks == NULL) {\n        return;\n    }\n    if (pAllocationCallbacks->onFree != NULL) {\n        pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData);\n    }\n}\nstatic ma_allocation_callbacks ma_dr_mp3_copy_allocation_callbacks_or_defaults(const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks != NULL) {\n        return *pAllocationCallbacks;\n    } else {\n        ma_allocation_callbacks allocationCallbacks;\n        allocationCallbacks.pUserData = NULL;\n        allocationCallbacks.onMalloc  = ma_dr_mp3__malloc_default;\n        allocationCallbacks.onRealloc = ma_dr_mp3__realloc_default;\n        allocationCallbacks.onFree    = ma_dr_mp3__free_default;\n        return allocationCallbacks;\n    }\n}\nstatic size_t ma_dr_mp3__on_read(ma_dr_mp3* pMP3, void* pBufferOut, size_t bytesToRead)\n{\n    size_t bytesRead = pMP3->onRead(pMP3->pUserData, pBufferOut, bytesToRead);\n    pMP3->streamCursor += bytesRead;\n    return bytesRead;\n}\nstatic ma_bool32 ma_dr_mp3__on_seek(ma_dr_mp3* pMP3, int offset, ma_dr_mp3_seek_origin origin)\n{\n    MA_DR_MP3_ASSERT(offset >= 0);\n    if (!pMP3->onSeek(pMP3->pUserData, offset, origin)) {\n        return MA_FALSE;\n    }\n    if (origin == ma_dr_mp3_seek_origin_start) {\n        pMP3->streamCursor = (ma_uint64)offset;\n    } else {\n        pMP3->streamCursor += offset;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_mp3__on_seek_64(ma_dr_mp3* pMP3, ma_uint64 offset, ma_dr_mp3_seek_origin origin)\n{\n    if (offset <= 0x7FFFFFFF) {\n        return ma_dr_mp3__on_seek(pMP3, (int)offset, origin);\n    }\n    if (!ma_dr_mp3__on_seek(pMP3, 0x7FFFFFFF, ma_dr_mp3_seek_origin_start)) {\n        return MA_FALSE;\n    }\n    offset -= 0x7FFFFFFF;\n    while (offset > 0) {\n        if (offset <= 0x7FFFFFFF) {\n            if (!ma_dr_mp3__on_seek(pMP3, (int)offset, ma_dr_mp3_seek_origin_current)) {\n                return MA_FALSE;\n            }\n            offset = 0;\n        } else {\n            if (!ma_dr_mp3__on_seek(pMP3, 0x7FFFFFFF, ma_dr_mp3_seek_origin_current)) {\n                return MA_FALSE;\n            }\n            offset -= 0x7FFFFFFF;\n        }\n    }\n    return MA_TRUE;\n}\nstatic ma_uint32 ma_dr_mp3_decode_next_frame_ex__callbacks(ma_dr_mp3* pMP3, ma_dr_mp3d_sample_t* pPCMFrames)\n{\n    ma_uint32 pcmFramesRead = 0;\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    MA_DR_MP3_ASSERT(pMP3->onRead != NULL);\n    if (pMP3->atEnd) {\n        return 0;\n    }\n    for (;;) {\n        ma_dr_mp3dec_frame_info info;\n        if (pMP3->dataSize < MA_DR_MP3_MIN_DATA_CHUNK_SIZE) {\n            size_t bytesRead;\n            if (pMP3->pData != NULL) {\n                MA_DR_MP3_MOVE_MEMORY(pMP3->pData, pMP3->pData + pMP3->dataConsumed, pMP3->dataSize);\n            }\n            pMP3->dataConsumed = 0;\n            if (pMP3->dataCapacity < MA_DR_MP3_DATA_CHUNK_SIZE) {\n                ma_uint8* pNewData;\n                size_t newDataCap;\n                newDataCap = MA_DR_MP3_DATA_CHUNK_SIZE;\n                pNewData = (ma_uint8*)ma_dr_mp3__realloc_from_callbacks(pMP3->pData, newDataCap, pMP3->dataCapacity, &pMP3->allocationCallbacks);\n                if (pNewData == NULL) {\n                    return 0;\n                }\n                pMP3->pData = pNewData;\n                pMP3->dataCapacity = newDataCap;\n            }\n            bytesRead = ma_dr_mp3__on_read(pMP3, pMP3->pData + pMP3->dataSize, (pMP3->dataCapacity - pMP3->dataSize));\n            if (bytesRead == 0) {\n                if (pMP3->dataSize == 0) {\n                    pMP3->atEnd = MA_TRUE;\n                    return 0;\n                }\n            }\n            pMP3->dataSize += bytesRead;\n        }\n        if (pMP3->dataSize > INT_MAX) {\n            pMP3->atEnd = MA_TRUE;\n            return 0;\n        }\n        MA_DR_MP3_ASSERT(pMP3->pData != NULL);\n        MA_DR_MP3_ASSERT(pMP3->dataCapacity > 0);\n        if (pMP3->pData == NULL) {\n            return 0;\n        }\n        pcmFramesRead = ma_dr_mp3dec_decode_frame(&pMP3->decoder, pMP3->pData + pMP3->dataConsumed, (int)pMP3->dataSize, pPCMFrames, &info);\n        if (info.frame_bytes > 0) {\n            pMP3->dataConsumed += (size_t)info.frame_bytes;\n            pMP3->dataSize     -= (size_t)info.frame_bytes;\n        }\n        if (pcmFramesRead > 0) {\n            pcmFramesRead = ma_dr_mp3_hdr_frame_samples(pMP3->decoder.header);\n            pMP3->pcmFramesConsumedInMP3Frame = 0;\n            pMP3->pcmFramesRemainingInMP3Frame = pcmFramesRead;\n            pMP3->mp3FrameChannels = info.channels;\n            pMP3->mp3FrameSampleRate = info.hz;\n            break;\n        } else if (info.frame_bytes == 0) {\n            size_t bytesRead;\n            MA_DR_MP3_MOVE_MEMORY(pMP3->pData, pMP3->pData + pMP3->dataConsumed, pMP3->dataSize);\n            pMP3->dataConsumed = 0;\n            if (pMP3->dataCapacity == pMP3->dataSize) {\n                ma_uint8* pNewData;\n                size_t newDataCap;\n                newDataCap = pMP3->dataCapacity + MA_DR_MP3_DATA_CHUNK_SIZE;\n                pNewData = (ma_uint8*)ma_dr_mp3__realloc_from_callbacks(pMP3->pData, newDataCap, pMP3->dataCapacity, &pMP3->allocationCallbacks);\n                if (pNewData == NULL) {\n                    return 0;\n                }\n                pMP3->pData = pNewData;\n                pMP3->dataCapacity = newDataCap;\n            }\n            bytesRead = ma_dr_mp3__on_read(pMP3, pMP3->pData + pMP3->dataSize, (pMP3->dataCapacity - pMP3->dataSize));\n            if (bytesRead == 0) {\n                pMP3->atEnd = MA_TRUE;\n                return 0;\n            }\n            pMP3->dataSize += bytesRead;\n        }\n    };\n    return pcmFramesRead;\n}\nstatic ma_uint32 ma_dr_mp3_decode_next_frame_ex__memory(ma_dr_mp3* pMP3, ma_dr_mp3d_sample_t* pPCMFrames)\n{\n    ma_uint32 pcmFramesRead = 0;\n    ma_dr_mp3dec_frame_info info;\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    MA_DR_MP3_ASSERT(pMP3->memory.pData != NULL);\n    if (pMP3->atEnd) {\n        return 0;\n    }\n    for (;;) {\n        pcmFramesRead = ma_dr_mp3dec_decode_frame(&pMP3->decoder, pMP3->memory.pData + pMP3->memory.currentReadPos, (int)(pMP3->memory.dataSize - pMP3->memory.currentReadPos), pPCMFrames, &info);\n        if (pcmFramesRead > 0) {\n            pcmFramesRead = ma_dr_mp3_hdr_frame_samples(pMP3->decoder.header);\n            pMP3->pcmFramesConsumedInMP3Frame  = 0;\n            pMP3->pcmFramesRemainingInMP3Frame = pcmFramesRead;\n            pMP3->mp3FrameChannels             = info.channels;\n            pMP3->mp3FrameSampleRate           = info.hz;\n            break;\n        } else if (info.frame_bytes > 0) {\n            pMP3->memory.currentReadPos += (size_t)info.frame_bytes;\n        } else {\n            break;\n        }\n    }\n    pMP3->memory.currentReadPos += (size_t)info.frame_bytes;\n    return pcmFramesRead;\n}\nstatic ma_uint32 ma_dr_mp3_decode_next_frame_ex(ma_dr_mp3* pMP3, ma_dr_mp3d_sample_t* pPCMFrames)\n{\n    if (pMP3->memory.pData != NULL && pMP3->memory.dataSize > 0) {\n        return ma_dr_mp3_decode_next_frame_ex__memory(pMP3, pPCMFrames);\n    } else {\n        return ma_dr_mp3_decode_next_frame_ex__callbacks(pMP3, pPCMFrames);\n    }\n}\nstatic ma_uint32 ma_dr_mp3_decode_next_frame(ma_dr_mp3* pMP3)\n{\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    return ma_dr_mp3_decode_next_frame_ex(pMP3, (ma_dr_mp3d_sample_t*)pMP3->pcmFrames);\n}\n#if 0\nstatic ma_uint32 ma_dr_mp3_seek_next_frame(ma_dr_mp3* pMP3)\n{\n    ma_uint32 pcmFrameCount;\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    pcmFrameCount = ma_dr_mp3_decode_next_frame_ex(pMP3, NULL);\n    if (pcmFrameCount == 0) {\n        return 0;\n    }\n    pMP3->currentPCMFrame             += pcmFrameCount;\n    pMP3->pcmFramesConsumedInMP3Frame  = pcmFrameCount;\n    pMP3->pcmFramesRemainingInMP3Frame = 0;\n    return pcmFrameCount;\n}\n#endif\nstatic ma_bool32 ma_dr_mp3_init_internal(ma_dr_mp3* pMP3, ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    MA_DR_MP3_ASSERT(onRead != NULL);\n    ma_dr_mp3dec_init(&pMP3->decoder);\n    pMP3->onRead = onRead;\n    pMP3->onSeek = onSeek;\n    pMP3->pUserData = pUserData;\n    pMP3->allocationCallbacks = ma_dr_mp3_copy_allocation_callbacks_or_defaults(pAllocationCallbacks);\n    if (pMP3->allocationCallbacks.onFree == NULL || (pMP3->allocationCallbacks.onMalloc == NULL && pMP3->allocationCallbacks.onRealloc == NULL)) {\n        return MA_FALSE;\n    }\n    if (ma_dr_mp3_decode_next_frame(pMP3) == 0) {\n        ma_dr_mp3__free_from_callbacks(pMP3->pData, &pMP3->allocationCallbacks);\n        return MA_FALSE;\n    }\n    pMP3->channels   = pMP3->mp3FrameChannels;\n    pMP3->sampleRate = pMP3->mp3FrameSampleRate;\n    return MA_TRUE;\n}\nMA_API ma_bool32 ma_dr_mp3_init(ma_dr_mp3* pMP3, ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pMP3 == NULL || onRead == NULL) {\n        return MA_FALSE;\n    }\n    MA_DR_MP3_ZERO_OBJECT(pMP3);\n    return ma_dr_mp3_init_internal(pMP3, onRead, onSeek, pUserData, pAllocationCallbacks);\n}\nstatic size_t ma_dr_mp3__on_read_memory(void* pUserData, void* pBufferOut, size_t bytesToRead)\n{\n    ma_dr_mp3* pMP3 = (ma_dr_mp3*)pUserData;\n    size_t bytesRemaining;\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    MA_DR_MP3_ASSERT(pMP3->memory.dataSize >= pMP3->memory.currentReadPos);\n    bytesRemaining = pMP3->memory.dataSize - pMP3->memory.currentReadPos;\n    if (bytesToRead > bytesRemaining) {\n        bytesToRead = bytesRemaining;\n    }\n    if (bytesToRead > 0) {\n        MA_DR_MP3_COPY_MEMORY(pBufferOut, pMP3->memory.pData + pMP3->memory.currentReadPos, bytesToRead);\n        pMP3->memory.currentReadPos += bytesToRead;\n    }\n    return bytesToRead;\n}\nstatic ma_bool32 ma_dr_mp3__on_seek_memory(void* pUserData, int byteOffset, ma_dr_mp3_seek_origin origin)\n{\n    ma_dr_mp3* pMP3 = (ma_dr_mp3*)pUserData;\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    if (origin == ma_dr_mp3_seek_origin_current) {\n        if (byteOffset > 0) {\n            if (pMP3->memory.currentReadPos + byteOffset > pMP3->memory.dataSize) {\n                byteOffset = (int)(pMP3->memory.dataSize - pMP3->memory.currentReadPos);\n            }\n        } else {\n            if (pMP3->memory.currentReadPos < (size_t)-byteOffset) {\n                byteOffset = -(int)pMP3->memory.currentReadPos;\n            }\n        }\n        pMP3->memory.currentReadPos += byteOffset;\n    } else {\n        if ((ma_uint32)byteOffset <= pMP3->memory.dataSize) {\n            pMP3->memory.currentReadPos = byteOffset;\n        } else {\n            pMP3->memory.currentReadPos = pMP3->memory.dataSize;\n        }\n    }\n    return MA_TRUE;\n}\nMA_API ma_bool32 ma_dr_mp3_init_memory(ma_dr_mp3* pMP3, const void* pData, size_t dataSize, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pMP3 == NULL) {\n        return MA_FALSE;\n    }\n    MA_DR_MP3_ZERO_OBJECT(pMP3);\n    if (pData == NULL || dataSize == 0) {\n        return MA_FALSE;\n    }\n    pMP3->memory.pData = (const ma_uint8*)pData;\n    pMP3->memory.dataSize = dataSize;\n    pMP3->memory.currentReadPos = 0;\n    return ma_dr_mp3_init_internal(pMP3, ma_dr_mp3__on_read_memory, ma_dr_mp3__on_seek_memory, pMP3, pAllocationCallbacks);\n}\n#ifndef MA_DR_MP3_NO_STDIO\n#include <stdio.h>\n#include <wchar.h>\nstatic size_t ma_dr_mp3__on_read_stdio(void* pUserData, void* pBufferOut, size_t bytesToRead)\n{\n    return fread(pBufferOut, 1, bytesToRead, (FILE*)pUserData);\n}\nstatic ma_bool32 ma_dr_mp3__on_seek_stdio(void* pUserData, int offset, ma_dr_mp3_seek_origin origin)\n{\n    return fseek((FILE*)pUserData, offset, (origin == ma_dr_mp3_seek_origin_current) ? SEEK_CUR : SEEK_SET) == 0;\n}\nMA_API ma_bool32 ma_dr_mp3_init_file(ma_dr_mp3* pMP3, const char* pFilePath, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_bool32 result;\n    FILE* pFile;\n    if (ma_fopen(&pFile, pFilePath, \"rb\") != MA_SUCCESS) {\n        return MA_FALSE;\n    }\n    result = ma_dr_mp3_init(pMP3, ma_dr_mp3__on_read_stdio, ma_dr_mp3__on_seek_stdio, (void*)pFile, pAllocationCallbacks);\n    if (result != MA_TRUE) {\n        fclose(pFile);\n        return result;\n    }\n    return MA_TRUE;\n}\nMA_API ma_bool32 ma_dr_mp3_init_file_w(ma_dr_mp3* pMP3, const wchar_t* pFilePath, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_bool32 result;\n    FILE* pFile;\n    if (ma_wfopen(&pFile, pFilePath, L\"rb\", pAllocationCallbacks) != MA_SUCCESS) {\n        return MA_FALSE;\n    }\n    result = ma_dr_mp3_init(pMP3, ma_dr_mp3__on_read_stdio, ma_dr_mp3__on_seek_stdio, (void*)pFile, pAllocationCallbacks);\n    if (result != MA_TRUE) {\n        fclose(pFile);\n        return result;\n    }\n    return MA_TRUE;\n}\n#endif\nMA_API void ma_dr_mp3_uninit(ma_dr_mp3* pMP3)\n{\n    if (pMP3 == NULL) {\n        return;\n    }\n#ifndef MA_DR_MP3_NO_STDIO\n    if (pMP3->onRead == ma_dr_mp3__on_read_stdio) {\n        FILE* pFile = (FILE*)pMP3->pUserData;\n        if (pFile != NULL) {\n            fclose(pFile);\n            pMP3->pUserData = NULL;\n        }\n    }\n#endif\n    ma_dr_mp3__free_from_callbacks(pMP3->pData, &pMP3->allocationCallbacks);\n}\n#if defined(MA_DR_MP3_FLOAT_OUTPUT)\nstatic void ma_dr_mp3_f32_to_s16(ma_int16* dst, const float* src, ma_uint64 sampleCount)\n{\n    ma_uint64 i;\n    ma_uint64 i4;\n    ma_uint64 sampleCount4;\n    i = 0;\n    sampleCount4 = sampleCount >> 2;\n    for (i4 = 0; i4 < sampleCount4; i4 += 1) {\n        float x0 = src[i+0];\n        float x1 = src[i+1];\n        float x2 = src[i+2];\n        float x3 = src[i+3];\n        x0 = ((x0 < -1) ? -1 : ((x0 > 1) ? 1 : x0));\n        x1 = ((x1 < -1) ? -1 : ((x1 > 1) ? 1 : x1));\n        x2 = ((x2 < -1) ? -1 : ((x2 > 1) ? 1 : x2));\n        x3 = ((x3 < -1) ? -1 : ((x3 > 1) ? 1 : x3));\n        x0 = x0 * 32767.0f;\n        x1 = x1 * 32767.0f;\n        x2 = x2 * 32767.0f;\n        x3 = x3 * 32767.0f;\n        dst[i+0] = (ma_int16)x0;\n        dst[i+1] = (ma_int16)x1;\n        dst[i+2] = (ma_int16)x2;\n        dst[i+3] = (ma_int16)x3;\n        i += 4;\n    }\n    for (; i < sampleCount; i += 1) {\n        float x = src[i];\n        x = ((x < -1) ? -1 : ((x > 1) ? 1 : x));\n        x = x * 32767.0f;\n        dst[i] = (ma_int16)x;\n    }\n}\n#endif\n#if !defined(MA_DR_MP3_FLOAT_OUTPUT)\nstatic void ma_dr_mp3_s16_to_f32(float* dst, const ma_int16* src, ma_uint64 sampleCount)\n{\n    ma_uint64 i;\n    for (i = 0; i < sampleCount; i += 1) {\n        float x = (float)src[i];\n        x = x * 0.000030517578125f;\n        dst[i] = x;\n    }\n}\n#endif\nstatic ma_uint64 ma_dr_mp3_read_pcm_frames_raw(ma_dr_mp3* pMP3, ma_uint64 framesToRead, void* pBufferOut)\n{\n    ma_uint64 totalFramesRead = 0;\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    MA_DR_MP3_ASSERT(pMP3->onRead != NULL);\n    while (framesToRead > 0) {\n        ma_uint32 framesToConsume = (ma_uint32)MA_DR_MP3_MIN(pMP3->pcmFramesRemainingInMP3Frame, framesToRead);\n        if (pBufferOut != NULL) {\n        #if defined(MA_DR_MP3_FLOAT_OUTPUT)\n            float* pFramesOutF32 = (float*)MA_DR_MP3_OFFSET_PTR(pBufferOut,          sizeof(float) * totalFramesRead                   * pMP3->channels);\n            float* pFramesInF32  = (float*)MA_DR_MP3_OFFSET_PTR(&pMP3->pcmFrames[0], sizeof(float) * pMP3->pcmFramesConsumedInMP3Frame * pMP3->mp3FrameChannels);\n            MA_DR_MP3_COPY_MEMORY(pFramesOutF32, pFramesInF32, sizeof(float) * framesToConsume * pMP3->channels);\n        #else\n            ma_int16* pFramesOutS16 = (ma_int16*)MA_DR_MP3_OFFSET_PTR(pBufferOut,          sizeof(ma_int16) * totalFramesRead                   * pMP3->channels);\n            ma_int16* pFramesInS16  = (ma_int16*)MA_DR_MP3_OFFSET_PTR(&pMP3->pcmFrames[0], sizeof(ma_int16) * pMP3->pcmFramesConsumedInMP3Frame * pMP3->mp3FrameChannels);\n            MA_DR_MP3_COPY_MEMORY(pFramesOutS16, pFramesInS16, sizeof(ma_int16) * framesToConsume * pMP3->channels);\n        #endif\n        }\n        pMP3->currentPCMFrame              += framesToConsume;\n        pMP3->pcmFramesConsumedInMP3Frame  += framesToConsume;\n        pMP3->pcmFramesRemainingInMP3Frame -= framesToConsume;\n        totalFramesRead                    += framesToConsume;\n        framesToRead                       -= framesToConsume;\n        if (framesToRead == 0) {\n            break;\n        }\n        MA_DR_MP3_ASSERT(pMP3->pcmFramesRemainingInMP3Frame == 0);\n        if (ma_dr_mp3_decode_next_frame(pMP3) == 0) {\n            break;\n        }\n    }\n    return totalFramesRead;\n}\nMA_API ma_uint64 ma_dr_mp3_read_pcm_frames_f32(ma_dr_mp3* pMP3, ma_uint64 framesToRead, float* pBufferOut)\n{\n    if (pMP3 == NULL || pMP3->onRead == NULL) {\n        return 0;\n    }\n#if defined(MA_DR_MP3_FLOAT_OUTPUT)\n    return ma_dr_mp3_read_pcm_frames_raw(pMP3, framesToRead, pBufferOut);\n#else\n    {\n        ma_int16 pTempS16[8192];\n        ma_uint64 totalPCMFramesRead = 0;\n        while (totalPCMFramesRead < framesToRead) {\n            ma_uint64 framesJustRead;\n            ma_uint64 framesRemaining = framesToRead - totalPCMFramesRead;\n            ma_uint64 framesToReadNow = MA_DR_MP3_COUNTOF(pTempS16) / pMP3->channels;\n            if (framesToReadNow > framesRemaining) {\n                framesToReadNow = framesRemaining;\n            }\n            framesJustRead = ma_dr_mp3_read_pcm_frames_raw(pMP3, framesToReadNow, pTempS16);\n            if (framesJustRead == 0) {\n                break;\n            }\n            ma_dr_mp3_s16_to_f32((float*)MA_DR_MP3_OFFSET_PTR(pBufferOut, sizeof(float) * totalPCMFramesRead * pMP3->channels), pTempS16, framesJustRead * pMP3->channels);\n            totalPCMFramesRead += framesJustRead;\n        }\n        return totalPCMFramesRead;\n    }\n#endif\n}\nMA_API ma_uint64 ma_dr_mp3_read_pcm_frames_s16(ma_dr_mp3* pMP3, ma_uint64 framesToRead, ma_int16* pBufferOut)\n{\n    if (pMP3 == NULL || pMP3->onRead == NULL) {\n        return 0;\n    }\n#if !defined(MA_DR_MP3_FLOAT_OUTPUT)\n    return ma_dr_mp3_read_pcm_frames_raw(pMP3, framesToRead, pBufferOut);\n#else\n    {\n        float pTempF32[4096];\n        ma_uint64 totalPCMFramesRead = 0;\n        while (totalPCMFramesRead < framesToRead) {\n            ma_uint64 framesJustRead;\n            ma_uint64 framesRemaining = framesToRead - totalPCMFramesRead;\n            ma_uint64 framesToReadNow = MA_DR_MP3_COUNTOF(pTempF32) / pMP3->channels;\n            if (framesToReadNow > framesRemaining) {\n                framesToReadNow = framesRemaining;\n            }\n            framesJustRead = ma_dr_mp3_read_pcm_frames_raw(pMP3, framesToReadNow, pTempF32);\n            if (framesJustRead == 0) {\n                break;\n            }\n            ma_dr_mp3_f32_to_s16((ma_int16*)MA_DR_MP3_OFFSET_PTR(pBufferOut, sizeof(ma_int16) * totalPCMFramesRead * pMP3->channels), pTempF32, framesJustRead * pMP3->channels);\n            totalPCMFramesRead += framesJustRead;\n        }\n        return totalPCMFramesRead;\n    }\n#endif\n}\nstatic void ma_dr_mp3_reset(ma_dr_mp3* pMP3)\n{\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    pMP3->pcmFramesConsumedInMP3Frame = 0;\n    pMP3->pcmFramesRemainingInMP3Frame = 0;\n    pMP3->currentPCMFrame = 0;\n    pMP3->dataSize = 0;\n    pMP3->atEnd = MA_FALSE;\n    ma_dr_mp3dec_init(&pMP3->decoder);\n}\nstatic ma_bool32 ma_dr_mp3_seek_to_start_of_stream(ma_dr_mp3* pMP3)\n{\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    MA_DR_MP3_ASSERT(pMP3->onSeek != NULL);\n    if (!ma_dr_mp3__on_seek(pMP3, 0, ma_dr_mp3_seek_origin_start)) {\n        return MA_FALSE;\n    }\n    ma_dr_mp3_reset(pMP3);\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_mp3_seek_forward_by_pcm_frames__brute_force(ma_dr_mp3* pMP3, ma_uint64 frameOffset)\n{\n    ma_uint64 framesRead;\n#if defined(MA_DR_MP3_FLOAT_OUTPUT)\n    framesRead = ma_dr_mp3_read_pcm_frames_f32(pMP3, frameOffset, NULL);\n#else\n    framesRead = ma_dr_mp3_read_pcm_frames_s16(pMP3, frameOffset, NULL);\n#endif\n    if (framesRead != frameOffset) {\n        return MA_FALSE;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_mp3_seek_to_pcm_frame__brute_force(ma_dr_mp3* pMP3, ma_uint64 frameIndex)\n{\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    if (frameIndex == pMP3->currentPCMFrame) {\n        return MA_TRUE;\n    }\n    if (frameIndex < pMP3->currentPCMFrame) {\n        if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) {\n            return MA_FALSE;\n        }\n    }\n    MA_DR_MP3_ASSERT(frameIndex >= pMP3->currentPCMFrame);\n    return ma_dr_mp3_seek_forward_by_pcm_frames__brute_force(pMP3, (frameIndex - pMP3->currentPCMFrame));\n}\nstatic ma_bool32 ma_dr_mp3_find_closest_seek_point(ma_dr_mp3* pMP3, ma_uint64 frameIndex, ma_uint32* pSeekPointIndex)\n{\n    ma_uint32 iSeekPoint;\n    MA_DR_MP3_ASSERT(pSeekPointIndex != NULL);\n    *pSeekPointIndex = 0;\n    if (frameIndex < pMP3->pSeekPoints[0].pcmFrameIndex) {\n        return MA_FALSE;\n    }\n    for (iSeekPoint = 0; iSeekPoint < pMP3->seekPointCount; ++iSeekPoint) {\n        if (pMP3->pSeekPoints[iSeekPoint].pcmFrameIndex > frameIndex) {\n            break;\n        }\n        *pSeekPointIndex = iSeekPoint;\n    }\n    return MA_TRUE;\n}\nstatic ma_bool32 ma_dr_mp3_seek_to_pcm_frame__seek_table(ma_dr_mp3* pMP3, ma_uint64 frameIndex)\n{\n    ma_dr_mp3_seek_point seekPoint;\n    ma_uint32 priorSeekPointIndex;\n    ma_uint16 iMP3Frame;\n    ma_uint64 leftoverFrames;\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    MA_DR_MP3_ASSERT(pMP3->pSeekPoints != NULL);\n    MA_DR_MP3_ASSERT(pMP3->seekPointCount > 0);\n    if (ma_dr_mp3_find_closest_seek_point(pMP3, frameIndex, &priorSeekPointIndex)) {\n        seekPoint = pMP3->pSeekPoints[priorSeekPointIndex];\n    } else {\n        seekPoint.seekPosInBytes     = 0;\n        seekPoint.pcmFrameIndex      = 0;\n        seekPoint.mp3FramesToDiscard = 0;\n        seekPoint.pcmFramesToDiscard = 0;\n    }\n    if (!ma_dr_mp3__on_seek_64(pMP3, seekPoint.seekPosInBytes, ma_dr_mp3_seek_origin_start)) {\n        return MA_FALSE;\n    }\n    ma_dr_mp3_reset(pMP3);\n    for (iMP3Frame = 0; iMP3Frame < seekPoint.mp3FramesToDiscard; ++iMP3Frame) {\n        ma_uint32 pcmFramesRead;\n        ma_dr_mp3d_sample_t* pPCMFrames;\n        pPCMFrames = NULL;\n        if (iMP3Frame == seekPoint.mp3FramesToDiscard-1) {\n            pPCMFrames = (ma_dr_mp3d_sample_t*)pMP3->pcmFrames;\n        }\n        pcmFramesRead = ma_dr_mp3_decode_next_frame_ex(pMP3, pPCMFrames);\n        if (pcmFramesRead == 0) {\n            return MA_FALSE;\n        }\n    }\n    pMP3->currentPCMFrame = seekPoint.pcmFrameIndex - seekPoint.pcmFramesToDiscard;\n    leftoverFrames = frameIndex - pMP3->currentPCMFrame;\n    return ma_dr_mp3_seek_forward_by_pcm_frames__brute_force(pMP3, leftoverFrames);\n}\nMA_API ma_bool32 ma_dr_mp3_seek_to_pcm_frame(ma_dr_mp3* pMP3, ma_uint64 frameIndex)\n{\n    if (pMP3 == NULL || pMP3->onSeek == NULL) {\n        return MA_FALSE;\n    }\n    if (frameIndex == 0) {\n        return ma_dr_mp3_seek_to_start_of_stream(pMP3);\n    }\n    if (pMP3->pSeekPoints != NULL && pMP3->seekPointCount > 0) {\n        return ma_dr_mp3_seek_to_pcm_frame__seek_table(pMP3, frameIndex);\n    } else {\n        return ma_dr_mp3_seek_to_pcm_frame__brute_force(pMP3, frameIndex);\n    }\n}\nMA_API ma_bool32 ma_dr_mp3_get_mp3_and_pcm_frame_count(ma_dr_mp3* pMP3, ma_uint64* pMP3FrameCount, ma_uint64* pPCMFrameCount)\n{\n    ma_uint64 currentPCMFrame;\n    ma_uint64 totalPCMFrameCount;\n    ma_uint64 totalMP3FrameCount;\n    if (pMP3 == NULL) {\n        return MA_FALSE;\n    }\n    if (pMP3->onSeek == NULL) {\n        return MA_FALSE;\n    }\n    currentPCMFrame = pMP3->currentPCMFrame;\n    if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) {\n        return MA_FALSE;\n    }\n    totalPCMFrameCount = 0;\n    totalMP3FrameCount = 0;\n    for (;;) {\n        ma_uint32 pcmFramesInCurrentMP3Frame;\n        pcmFramesInCurrentMP3Frame = ma_dr_mp3_decode_next_frame_ex(pMP3, NULL);\n        if (pcmFramesInCurrentMP3Frame == 0) {\n            break;\n        }\n        totalPCMFrameCount += pcmFramesInCurrentMP3Frame;\n        totalMP3FrameCount += 1;\n    }\n    if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) {\n        return MA_FALSE;\n    }\n    if (!ma_dr_mp3_seek_to_pcm_frame(pMP3, currentPCMFrame)) {\n        return MA_FALSE;\n    }\n    if (pMP3FrameCount != NULL) {\n        *pMP3FrameCount = totalMP3FrameCount;\n    }\n    if (pPCMFrameCount != NULL) {\n        *pPCMFrameCount = totalPCMFrameCount;\n    }\n    return MA_TRUE;\n}\nMA_API ma_uint64 ma_dr_mp3_get_pcm_frame_count(ma_dr_mp3* pMP3)\n{\n    ma_uint64 totalPCMFrameCount;\n    if (!ma_dr_mp3_get_mp3_and_pcm_frame_count(pMP3, NULL, &totalPCMFrameCount)) {\n        return 0;\n    }\n    return totalPCMFrameCount;\n}\nMA_API ma_uint64 ma_dr_mp3_get_mp3_frame_count(ma_dr_mp3* pMP3)\n{\n    ma_uint64 totalMP3FrameCount;\n    if (!ma_dr_mp3_get_mp3_and_pcm_frame_count(pMP3, &totalMP3FrameCount, NULL)) {\n        return 0;\n    }\n    return totalMP3FrameCount;\n}\nstatic void ma_dr_mp3__accumulate_running_pcm_frame_count(ma_dr_mp3* pMP3, ma_uint32 pcmFrameCountIn, ma_uint64* pRunningPCMFrameCount, float* pRunningPCMFrameCountFractionalPart)\n{\n    float srcRatio;\n    float pcmFrameCountOutF;\n    ma_uint32 pcmFrameCountOut;\n    srcRatio = (float)pMP3->mp3FrameSampleRate / (float)pMP3->sampleRate;\n    MA_DR_MP3_ASSERT(srcRatio > 0);\n    pcmFrameCountOutF = *pRunningPCMFrameCountFractionalPart + (pcmFrameCountIn / srcRatio);\n    pcmFrameCountOut  = (ma_uint32)pcmFrameCountOutF;\n    *pRunningPCMFrameCountFractionalPart = pcmFrameCountOutF - pcmFrameCountOut;\n    *pRunningPCMFrameCount += pcmFrameCountOut;\n}\ntypedef struct\n{\n    ma_uint64 bytePos;\n    ma_uint64 pcmFrameIndex;\n} ma_dr_mp3__seeking_mp3_frame_info;\nMA_API ma_bool32 ma_dr_mp3_calculate_seek_points(ma_dr_mp3* pMP3, ma_uint32* pSeekPointCount, ma_dr_mp3_seek_point* pSeekPoints)\n{\n    ma_uint32 seekPointCount;\n    ma_uint64 currentPCMFrame;\n    ma_uint64 totalMP3FrameCount;\n    ma_uint64 totalPCMFrameCount;\n    if (pMP3 == NULL || pSeekPointCount == NULL || pSeekPoints == NULL) {\n        return MA_FALSE;\n    }\n    seekPointCount = *pSeekPointCount;\n    if (seekPointCount == 0) {\n        return MA_FALSE;\n    }\n    currentPCMFrame = pMP3->currentPCMFrame;\n    if (!ma_dr_mp3_get_mp3_and_pcm_frame_count(pMP3, &totalMP3FrameCount, &totalPCMFrameCount)) {\n        return MA_FALSE;\n    }\n    if (totalMP3FrameCount < MA_DR_MP3_SEEK_LEADING_MP3_FRAMES+1) {\n        seekPointCount = 1;\n        pSeekPoints[0].seekPosInBytes     = 0;\n        pSeekPoints[0].pcmFrameIndex      = 0;\n        pSeekPoints[0].mp3FramesToDiscard = 0;\n        pSeekPoints[0].pcmFramesToDiscard = 0;\n    } else {\n        ma_uint64 pcmFramesBetweenSeekPoints;\n        ma_dr_mp3__seeking_mp3_frame_info mp3FrameInfo[MA_DR_MP3_SEEK_LEADING_MP3_FRAMES+1];\n        ma_uint64 runningPCMFrameCount = 0;\n        float runningPCMFrameCountFractionalPart = 0;\n        ma_uint64 nextTargetPCMFrame;\n        ma_uint32 iMP3Frame;\n        ma_uint32 iSeekPoint;\n        if (seekPointCount > totalMP3FrameCount-1) {\n            seekPointCount = (ma_uint32)totalMP3FrameCount-1;\n        }\n        pcmFramesBetweenSeekPoints = totalPCMFrameCount / (seekPointCount+1);\n        if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) {\n            return MA_FALSE;\n        }\n        for (iMP3Frame = 0; iMP3Frame < MA_DR_MP3_SEEK_LEADING_MP3_FRAMES+1; ++iMP3Frame) {\n            ma_uint32 pcmFramesInCurrentMP3FrameIn;\n            MA_DR_MP3_ASSERT(pMP3->streamCursor >= pMP3->dataSize);\n            mp3FrameInfo[iMP3Frame].bytePos       = pMP3->streamCursor - pMP3->dataSize;\n            mp3FrameInfo[iMP3Frame].pcmFrameIndex = runningPCMFrameCount;\n            pcmFramesInCurrentMP3FrameIn = ma_dr_mp3_decode_next_frame_ex(pMP3, NULL);\n            if (pcmFramesInCurrentMP3FrameIn == 0) {\n                return MA_FALSE;\n            }\n            ma_dr_mp3__accumulate_running_pcm_frame_count(pMP3, pcmFramesInCurrentMP3FrameIn, &runningPCMFrameCount, &runningPCMFrameCountFractionalPart);\n        }\n        nextTargetPCMFrame = 0;\n        for (iSeekPoint = 0; iSeekPoint < seekPointCount; ++iSeekPoint) {\n            nextTargetPCMFrame += pcmFramesBetweenSeekPoints;\n            for (;;) {\n                if (nextTargetPCMFrame < runningPCMFrameCount) {\n                    pSeekPoints[iSeekPoint].seekPosInBytes     = mp3FrameInfo[0].bytePos;\n                    pSeekPoints[iSeekPoint].pcmFrameIndex      = nextTargetPCMFrame;\n                    pSeekPoints[iSeekPoint].mp3FramesToDiscard = MA_DR_MP3_SEEK_LEADING_MP3_FRAMES;\n                    pSeekPoints[iSeekPoint].pcmFramesToDiscard = (ma_uint16)(nextTargetPCMFrame - mp3FrameInfo[MA_DR_MP3_SEEK_LEADING_MP3_FRAMES-1].pcmFrameIndex);\n                    break;\n                } else {\n                    size_t i;\n                    ma_uint32 pcmFramesInCurrentMP3FrameIn;\n                    for (i = 0; i < MA_DR_MP3_COUNTOF(mp3FrameInfo)-1; ++i) {\n                        mp3FrameInfo[i] = mp3FrameInfo[i+1];\n                    }\n                    mp3FrameInfo[MA_DR_MP3_COUNTOF(mp3FrameInfo)-1].bytePos       = pMP3->streamCursor - pMP3->dataSize;\n                    mp3FrameInfo[MA_DR_MP3_COUNTOF(mp3FrameInfo)-1].pcmFrameIndex = runningPCMFrameCount;\n                    pcmFramesInCurrentMP3FrameIn = ma_dr_mp3_decode_next_frame_ex(pMP3, NULL);\n                    if (pcmFramesInCurrentMP3FrameIn == 0) {\n                        pSeekPoints[iSeekPoint].seekPosInBytes     = mp3FrameInfo[0].bytePos;\n                        pSeekPoints[iSeekPoint].pcmFrameIndex      = nextTargetPCMFrame;\n                        pSeekPoints[iSeekPoint].mp3FramesToDiscard = MA_DR_MP3_SEEK_LEADING_MP3_FRAMES;\n                        pSeekPoints[iSeekPoint].pcmFramesToDiscard = (ma_uint16)(nextTargetPCMFrame - mp3FrameInfo[MA_DR_MP3_SEEK_LEADING_MP3_FRAMES-1].pcmFrameIndex);\n                        break;\n                    }\n                    ma_dr_mp3__accumulate_running_pcm_frame_count(pMP3, pcmFramesInCurrentMP3FrameIn, &runningPCMFrameCount, &runningPCMFrameCountFractionalPart);\n                }\n            }\n        }\n        if (!ma_dr_mp3_seek_to_start_of_stream(pMP3)) {\n            return MA_FALSE;\n        }\n        if (!ma_dr_mp3_seek_to_pcm_frame(pMP3, currentPCMFrame)) {\n            return MA_FALSE;\n        }\n    }\n    *pSeekPointCount = seekPointCount;\n    return MA_TRUE;\n}\nMA_API ma_bool32 ma_dr_mp3_bind_seek_table(ma_dr_mp3* pMP3, ma_uint32 seekPointCount, ma_dr_mp3_seek_point* pSeekPoints)\n{\n    if (pMP3 == NULL) {\n        return MA_FALSE;\n    }\n    if (seekPointCount == 0 || pSeekPoints == NULL) {\n        pMP3->seekPointCount = 0;\n        pMP3->pSeekPoints = NULL;\n    } else {\n        pMP3->seekPointCount = seekPointCount;\n        pMP3->pSeekPoints = pSeekPoints;\n    }\n    return MA_TRUE;\n}\nstatic float* ma_dr_mp3__full_read_and_close_f32(ma_dr_mp3* pMP3, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount)\n{\n    ma_uint64 totalFramesRead = 0;\n    ma_uint64 framesCapacity = 0;\n    float* pFrames = NULL;\n    float temp[4096];\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    for (;;) {\n        ma_uint64 framesToReadRightNow = MA_DR_MP3_COUNTOF(temp) / pMP3->channels;\n        ma_uint64 framesJustRead = ma_dr_mp3_read_pcm_frames_f32(pMP3, framesToReadRightNow, temp);\n        if (framesJustRead == 0) {\n            break;\n        }\n        if (framesCapacity < totalFramesRead + framesJustRead) {\n            ma_uint64 oldFramesBufferSize;\n            ma_uint64 newFramesBufferSize;\n            ma_uint64 newFramesCap;\n            float* pNewFrames;\n            newFramesCap = framesCapacity * 2;\n            if (newFramesCap < totalFramesRead + framesJustRead) {\n                newFramesCap = totalFramesRead + framesJustRead;\n            }\n            oldFramesBufferSize = framesCapacity * pMP3->channels * sizeof(float);\n            newFramesBufferSize = newFramesCap   * pMP3->channels * sizeof(float);\n            if (newFramesBufferSize > (ma_uint64)MA_SIZE_MAX) {\n                break;\n            }\n            pNewFrames = (float*)ma_dr_mp3__realloc_from_callbacks(pFrames, (size_t)newFramesBufferSize, (size_t)oldFramesBufferSize, &pMP3->allocationCallbacks);\n            if (pNewFrames == NULL) {\n                ma_dr_mp3__free_from_callbacks(pFrames, &pMP3->allocationCallbacks);\n                break;\n            }\n            pFrames = pNewFrames;\n            framesCapacity = newFramesCap;\n        }\n        MA_DR_MP3_COPY_MEMORY(pFrames + totalFramesRead*pMP3->channels, temp, (size_t)(framesJustRead*pMP3->channels*sizeof(float)));\n        totalFramesRead += framesJustRead;\n        if (framesJustRead != framesToReadRightNow) {\n            break;\n        }\n    }\n    if (pConfig != NULL) {\n        pConfig->channels   = pMP3->channels;\n        pConfig->sampleRate = pMP3->sampleRate;\n    }\n    ma_dr_mp3_uninit(pMP3);\n    if (pTotalFrameCount) {\n        *pTotalFrameCount = totalFramesRead;\n    }\n    return pFrames;\n}\nstatic ma_int16* ma_dr_mp3__full_read_and_close_s16(ma_dr_mp3* pMP3, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount)\n{\n    ma_uint64 totalFramesRead = 0;\n    ma_uint64 framesCapacity = 0;\n    ma_int16* pFrames = NULL;\n    ma_int16 temp[4096];\n    MA_DR_MP3_ASSERT(pMP3 != NULL);\n    for (;;) {\n        ma_uint64 framesToReadRightNow = MA_DR_MP3_COUNTOF(temp) / pMP3->channels;\n        ma_uint64 framesJustRead = ma_dr_mp3_read_pcm_frames_s16(pMP3, framesToReadRightNow, temp);\n        if (framesJustRead == 0) {\n            break;\n        }\n        if (framesCapacity < totalFramesRead + framesJustRead) {\n            ma_uint64 newFramesBufferSize;\n            ma_uint64 oldFramesBufferSize;\n            ma_uint64 newFramesCap;\n            ma_int16* pNewFrames;\n            newFramesCap = framesCapacity * 2;\n            if (newFramesCap < totalFramesRead + framesJustRead) {\n                newFramesCap = totalFramesRead + framesJustRead;\n            }\n            oldFramesBufferSize = framesCapacity * pMP3->channels * sizeof(ma_int16);\n            newFramesBufferSize = newFramesCap   * pMP3->channels * sizeof(ma_int16);\n            if (newFramesBufferSize > (ma_uint64)MA_SIZE_MAX) {\n                break;\n            }\n            pNewFrames = (ma_int16*)ma_dr_mp3__realloc_from_callbacks(pFrames, (size_t)newFramesBufferSize, (size_t)oldFramesBufferSize, &pMP3->allocationCallbacks);\n            if (pNewFrames == NULL) {\n                ma_dr_mp3__free_from_callbacks(pFrames, &pMP3->allocationCallbacks);\n                break;\n            }\n            pFrames = pNewFrames;\n            framesCapacity = newFramesCap;\n        }\n        MA_DR_MP3_COPY_MEMORY(pFrames + totalFramesRead*pMP3->channels, temp, (size_t)(framesJustRead*pMP3->channels*sizeof(ma_int16)));\n        totalFramesRead += framesJustRead;\n        if (framesJustRead != framesToReadRightNow) {\n            break;\n        }\n    }\n    if (pConfig != NULL) {\n        pConfig->channels   = pMP3->channels;\n        pConfig->sampleRate = pMP3->sampleRate;\n    }\n    ma_dr_mp3_uninit(pMP3);\n    if (pTotalFrameCount) {\n        *pTotalFrameCount = totalFramesRead;\n    }\n    return pFrames;\n}\nMA_API float* ma_dr_mp3_open_and_read_pcm_frames_f32(ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_mp3 mp3;\n    if (!ma_dr_mp3_init(&mp3, onRead, onSeek, pUserData, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_mp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount);\n}\nMA_API ma_int16* ma_dr_mp3_open_and_read_pcm_frames_s16(ma_dr_mp3_read_proc onRead, ma_dr_mp3_seek_proc onSeek, void* pUserData, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_mp3 mp3;\n    if (!ma_dr_mp3_init(&mp3, onRead, onSeek, pUserData, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_mp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount);\n}\nMA_API float* ma_dr_mp3_open_memory_and_read_pcm_frames_f32(const void* pData, size_t dataSize, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_mp3 mp3;\n    if (!ma_dr_mp3_init_memory(&mp3, pData, dataSize, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_mp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount);\n}\nMA_API ma_int16* ma_dr_mp3_open_memory_and_read_pcm_frames_s16(const void* pData, size_t dataSize, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_mp3 mp3;\n    if (!ma_dr_mp3_init_memory(&mp3, pData, dataSize, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_mp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount);\n}\n#ifndef MA_DR_MP3_NO_STDIO\nMA_API float* ma_dr_mp3_open_file_and_read_pcm_frames_f32(const char* filePath, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_mp3 mp3;\n    if (!ma_dr_mp3_init_file(&mp3, filePath, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_mp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount);\n}\nMA_API ma_int16* ma_dr_mp3_open_file_and_read_pcm_frames_s16(const char* filePath, ma_dr_mp3_config* pConfig, ma_uint64* pTotalFrameCount, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    ma_dr_mp3 mp3;\n    if (!ma_dr_mp3_init_file(&mp3, filePath, pAllocationCallbacks)) {\n        return NULL;\n    }\n    return ma_dr_mp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount);\n}\n#endif\nMA_API void* ma_dr_mp3_malloc(size_t sz, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks != NULL) {\n        return ma_dr_mp3__malloc_from_callbacks(sz, pAllocationCallbacks);\n    } else {\n        return ma_dr_mp3__malloc_default(sz, NULL);\n    }\n}\nMA_API void ma_dr_mp3_free(void* p, const ma_allocation_callbacks* pAllocationCallbacks)\n{\n    if (pAllocationCallbacks != NULL) {\n        ma_dr_mp3__free_from_callbacks(p, pAllocationCallbacks);\n    } else {\n        ma_dr_mp3__free_default(p, NULL);\n    }\n}\n#endif\n/* dr_mp3_c end */\n#endif  /* MA_DR_MP3_IMPLEMENTATION */\n#endif  /* MA_NO_MP3 */\n\n\n/* End globally disabled warnings. */\n#if defined(_MSC_VER)\n    #pragma warning(pop)\n#endif\n\n#endif  /* miniaudio_c */\n#endif  /* MINIAUDIO_IMPLEMENTATION */\n\n\n/*\nThis software is available as a choice of the following licenses. Choose\nwhichever you prefer.\n\n===============================================================================\nALTERNATIVE 1 - Public Domain (www.unlicense.org)\n===============================================================================\nThis is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or distribute this\nsoftware, either in source code form or as a compiled binary, for any purpose,\ncommercial or non-commercial, and by any means.\n\nIn jurisdictions that recognize copyright laws, the author or authors of this\nsoftware dedicate any and all copyright interest in the software to the public\ndomain. We make this dedication for the benefit of the public at large and to\nthe detriment of our heirs and successors. We intend this dedication to be an\novert act of relinquishment in perpetuity of all present and future rights to\nthis software under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\nACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to <http://unlicense.org/>\n\n===============================================================================\nALTERNATIVE 2 - MIT No Attribution\n===============================================================================\nCopyright 2023 David Reid\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n"
  },
  {
    "path": "src/oscillators.c",
    "content": "#include \"amy.h\"\n\n\n// For checking assumptions about bitwidths.\n#include <assert.h>\n\n#include \"sine_lutset_fxpt.h\"\n#include \"saw_lutset_fxpt.h\"\n#include \"triangle_lutset_fxpt.h\"\n\n// For hardware random on ESP\n#ifdef ESP_PLATFORM\n#include <esp_system.h>\n#endif\n\n// Multiply used to apply amplitude to unit waveforms. sample is first arg (<=1), amp is 2nd.\n//#define MULA_SS MUL6A_SS\n#define MULA_SS(a, b) MUL5A_SS(a, b)\n\n\n/* Dan Ellis libblosca functions */\nconst LUT *choose_from_lutset(float period, const LUT *lutset) {\n    // Select the best entry from a lutset for a given period. \n    //\n    // Args:\n    //    period: (float) Target period of waveform in fractional samples.\n    //    lutset: Sorted list of LUTs, as generated by create_lutset().\n    //\n    // Returns:\n    //   One of the LUTs from the lutset, best suited to interpolating to generate\n    //   a waveform of the desired period.\n    // Use the earliest (i.e., longest, most harmonics) LUT that works\n    // (i.e., will not actually cause aliasing).\n    // So start with the highest-bandwidth (and longest) LUTs, but skip them\n    // if they result in aliasing.\n    const LUT *lut_table = NULL;\n    int lut_size = 0;\n    int lut_index = 0;\n    while(lutset[lut_index].table_size > 0) {\n        lut_table = &lutset[lut_index];\n        lut_size = lutset[lut_index].table_size;\n        // What proportion of nyquist does the highest harmonic in this table occupy?\n        float lut_bandwidth = 2 * lutset[lut_index].highest_harmonic / (float)lut_size;\n        // To complete one cycle of <lut_size> points in <period> steps, each step\n        // will need to be this many samples:\n        float lut_hop = lut_size / period;\n        // If we have a signal with a given bandwidth, but then speed it up by \n        // skipping lut_hop samples per sample, its bandwidth will increase \n        // proportionately.\n        float interp_bandwidth = lut_bandwidth * lut_hop;\n        //printf(\"period=%f freq=%f lut_size=%d interp_bandwidth=%f\\n\", period, ((float)AMY_SAMPLE_RATE)/period, lut_size, interp_bandwidth);\n        if (interp_bandwidth < 0.9) {\n            // No aliasing, even with a 10% buffer (i.e., 19.8 kHz).\n            break;\n        }\n        ++lut_index;\n    }\n    // At this point, we either got to the end of the LUT table, or we found a\n    // table we could interpolate without aliasing.\n\n    return lut_table;\n}\n\n// Multiple versions of render_lut with different features to avoid branches in sample loop.\n\n#define RENDER_LUT_PREAMBLE \\\n    if(lut == NULL)  return phase;\\\n    int lut_mask = lut->table_size - 1; \\\n    int lut_bits = lut->log_2_table_size; \\\n    SAMPLE sample = 0; \\\n    SAMPLE max_value = 0; \\\n    SAMPLE current_amp = incoming_amp;                                      \\\n    SAMPLE incremental_amp = SHIFTR(ending_amp - incoming_amp, BLOCK_SIZE_BITS);\n\n#define MOD_PART_MOD  \\\n            total_phase += S2P(mod[i]);\n\n// Feedback is taken before output scaling.\n#define FEEDBACK_PART_FB  \\\n            past1 = past0;  \\\n            past0 = sample;  \\\n            total_phase += S2P(MUL4_SS(feedback_level, SHIFTR(past1 + past0, 1)));\n\n#define RENDER_LUT_GUTS(MOD_PART, FEEDBACK_PART, INTERP_PART) \\\n            MOD_PART \\\n            FEEDBACK_PART \\\n            int16_t base_index = INT_OF_P(total_phase, lut_bits); \\\n            SAMPLE frac = S_FRAC_OF_P(total_phase, lut_bits); \\\n            SAMPLE b = L2S(lut->table[base_index]); \\\n            SAMPLE c = L2S(lut->table[(base_index + 1) & lut_mask]); \\\n            INTERP_PART\n\n#define INTERP_LINEAR \\\n            sample = b + MUL0_SS(c - b, frac);\n\n// Miller's optimization -\n// https://github.com/pure-data/pure-data/blob/db777311d808bb3ba728b94ab067f8d333b7d0c2/src/d_array.c#L831C1-L833C76\n// outlet_float(x->x_obj.ob_outlet, b + frac * (\n//    cminusb - 0.1666667f * (1.-frac) * (\n//        (d - a - 3.0f * cminusb) * frac + (d + 2.0f*a - 3.0f*b))));#\n#define INTERP_CUBIC \\\n            SAMPLE a = L2S(lut->table[(base_index - 1) & lut_mask]); \\\n            SAMPLE d = L2S(lut->table[(base_index + 2) & lut_mask]); \\\n            SAMPLE cminusb = c - b; \\\n            SAMPLE fr_d_ma_m3cmb = MUL0_SS(d - a - cminusb - SHIFTL(cminusb, 1), frac); \\\n            SAMPLE next_bit = MUL0_SS(fr_d_ma_m3cmb + d + SHIFTL(a - b, 1) - b, MUL0_SS(F2S(1.0f) - frac, F2S(0.16666666666667f))); \\\n            sample = b + MUL0_SS(cminusb - next_bit, frac);\n\n#define RENDER_LUT_LOOP_END \\\n            SAMPLE value = buf[i] + MULA_SS(sample, current_amp);\t\\\n            buf[i] = value;                            \\\n            if (value < 0) value = -value;             \\\n            if (value > max_value) max_value = value;  \\\n            current_amp += incremental_amp; \\\n            phase = P_WRAPPED_SUM(phase, step);\n\n\n#define NOTHING ;\n\n\nPHASOR render_lut_fm_fb(SAMPLE* buf,\n                        PHASOR phase, \n                        PHASOR step,\n                        SAMPLE incoming_amp, SAMPLE ending_amp,\n                        const LUT* lut,\n                        SAMPLE* mod, SAMPLE feedback_level, SAMPLE* last_two, SAMPLE *pmax_value) { \n    AMY_PROFILE_START(RENDER_LUT_FM_FB)\n    RENDER_LUT_PREAMBLE\n    SAMPLE past0 = 0, past1 = 0;\n    sample = last_two[0];\n    past0 = last_two[1];\n    for(uint16_t i = 0; i < AMY_BLOCK_SIZE; i++) {\n        PHASOR total_phase = phase;\n\n        RENDER_LUT_GUTS(MOD_PART_MOD, FEEDBACK_PART_FB, INTERP_LINEAR)\n\n        RENDER_LUT_LOOP_END\n    }\n    last_two[0] = sample;\n    last_two[1] = past0;\n    *pmax_value = max_value;\n    AMY_PROFILE_STOP(RENDER_LUT_FM_FB)\n    return phase;\n}\n\nPHASOR render_lut_fb(SAMPLE* buf,\n                     PHASOR phase,\n                     PHASOR step,\n                     SAMPLE incoming_amp, SAMPLE ending_amp,\n                     const LUT* lut,\n                     SAMPLE feedback_level, SAMPLE* last_two, SAMPLE *pmax_value) {\n    AMY_PROFILE_START(RENDER_LUT_FB)\n    RENDER_LUT_PREAMBLE\n    SAMPLE past0 = 0, past1 = 0;\n    sample = last_two[0];\n    past0 = last_two[1];\n    for(uint16_t i = 0; i < AMY_BLOCK_SIZE; i++) {\n        PHASOR total_phase = phase;\n\n        RENDER_LUT_GUTS(NOTHING, FEEDBACK_PART_FB, INTERP_LINEAR)\n\n        RENDER_LUT_LOOP_END\n    }\n    last_two[0] = sample;\n    last_two[1] = past0;\n    *pmax_value = max_value;\n    AMY_PROFILE_STOP(RENDER_LUT_FB)\n    return phase;\n}\n\nPHASOR render_lut_fm(SAMPLE* buf,\n                     PHASOR phase,\n                     PHASOR step,\n                     SAMPLE incoming_amp, SAMPLE ending_amp,\n                     const LUT* lut,\n                     SAMPLE* mod,\n                     SAMPLE* pmax_value) {\n    AMY_PROFILE_START(RENDER_LUT_FM)\n    RENDER_LUT_PREAMBLE\n    for(uint16_t i = 0; i < AMY_BLOCK_SIZE; i++) {\n        PHASOR total_phase = phase;\n\n        RENDER_LUT_GUTS(MOD_PART_MOD, NOTHING, INTERP_LINEAR)\n\n        RENDER_LUT_LOOP_END\n    }\n    *pmax_value = max_value;\n    AMY_PROFILE_STOP(RENDER_LUT_FM)\n    return phase;\n}\n\nPHASOR render_lut(SAMPLE* buf,\n                  PHASOR phase,\n                  PHASOR step,\n                  SAMPLE incoming_amp, SAMPLE ending_amp,\n                  const LUT* lut,\n                  SAMPLE* pmax_value) {\n    AMY_PROFILE_START(RENDER_LUT)\n    RENDER_LUT_PREAMBLE\n    for(uint16_t i = 0; i < AMY_BLOCK_SIZE; i++) {\n        PHASOR total_phase = phase;\n\n        RENDER_LUT_GUTS(NOTHING, NOTHING, INTERP_LINEAR)\n\n        RENDER_LUT_LOOP_END\n     }\n    *pmax_value = max_value;\n    AMY_PROFILE_STOP(RENDER_LUT)\n    return phase;\n}\n\nPHASOR render_lut_cub(SAMPLE* buf,\n                      PHASOR phase,\n                      PHASOR step,\n                      SAMPLE incoming_amp, SAMPLE ending_amp,\n                      const LUT* lut,\n                      SAMPLE *pmax_value) {\n    AMY_PROFILE_START(RENDER_LUT_CUB)\n    RENDER_LUT_PREAMBLE\n    for(uint16_t i = 0; i < AMY_BLOCK_SIZE; i++) {\n        PHASOR total_phase = phase;\n\n        RENDER_LUT_GUTS(NOTHING, NOTHING, INTERP_CUBIC)\n\n        RENDER_LUT_LOOP_END\n    }\n    *pmax_value = max_value;\n    AMY_PROFILE_STOP(RENDER_LUT_CUB)\n    return phase;\n}\n\n/* Audio in */\n\nvoid audio_in_note_on(uint16_t osc, uint8_t channel) {\n    // do i need to do anything here? probably not\n}\n\nvoid external_audio_in_note_on(uint16_t osc, uint8_t channel) {\n    // do i need to do anything here? probably not\n}\n\nSAMPLE render_audio_in(SAMPLE * buf, uint16_t osc, uint8_t channel) {\n    uint16_t c = 0;\n    for(uint16_t i=channel;i<AMY_BLOCK_SIZE*AMY_NCHANS;i=i+(AMY_NCHANS)) {\n        buf[c++] = SMULR7(L2S(amy_in_block[i]), F2S(msynth[osc]->amp));\n    }\n    // We have to return something for max_value or else the zero-amp reaper will come along. \n    return F2S(1.0); //max_value;\n}\n\nSAMPLE render_external_audio_in(SAMPLE *buf, uint16_t osc, uint8_t channel) {\n    uint16_t c = 0;\n    for(uint16_t i=channel;i<AMY_BLOCK_SIZE*AMY_NCHANS;i=i+(AMY_NCHANS)) {\n        buf[c++] = SMULR7(L2S(amy_external_in_block[i]), F2S(msynth[osc]->amp));\n    }\n    // We have to return something for max_value or else the zero-amp reaper will come along. \n    return F2S(1.0); //max_value;\n}\n\n\n/* Pulse wave */\nvoid pulse_note_on(uint16_t osc, float freq) {\n    //printf(\"pulse_note_on: time %lld osc %d logfreq %f amp %f last_amp %f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE, osc, synth[osc]->logfreq, msynth[osc]->amp, msynth[osc]->last_amp);\n    float period_samples = (float)AMY_SAMPLE_RATE / freq;\n    synth[osc]->lut = choose_from_lutset(period_samples, saw_fxpt_lutset);\n}\n\nSAMPLE render_lpf_lut(SAMPLE* buf, uint16_t osc, int8_t is_square, int8_t direction, SAMPLE dc_offset) {\n    AMY_PROFILE_START(RENDER_LPF_LUT)\n    // Common function for pulse and saw.\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    PHASOR step = F2P(freq / (float)AMY_SAMPLE_RATE);  // cycles per sec / samples per sec -> cycles per sample\n    SAMPLE amp = direction * F2S(msynth[osc]->amp);\n    SAMPLE last_amp = direction * F2S(msynth[osc]->last_amp);\n    PHASOR pwm_phase = synth[osc]->phase;\n    SAMPLE max_value;\n    synth[osc]->phase = render_lut_cub(buf, synth[osc]->phase, step, last_amp, amp, synth[osc]->lut, &max_value);\n    if (is_square) {  // For pulse only, add a second delayed negative LUT wave.\n        float duty = msynth[osc]->duty;\n        if (duty < 0.01f) duty = 0.01f;\n        if (duty > 0.99f) duty = 0.99f;\n        pwm_phase = P_WRAPPED_SUM(pwm_phase, F2P(msynth[osc]->last_duty));\n        // Second pulse is given some blockwise-constant FM to maintain phase continuity across blocks.\n        PHASOR delta_phase_per_sample = F2P((duty - msynth[osc]->last_duty) / AMY_BLOCK_SIZE);\n        render_lut_cub(buf, pwm_phase, step + delta_phase_per_sample, -last_amp, -amp, synth[osc]->lut, &max_value);\n        msynth[osc]->last_duty = duty;\n    }\n    // Remember last_amp.\n    msynth[osc]->last_amp = msynth[osc]->amp;\n    AMY_PROFILE_STOP(RENDER_LPF_LUT)\n    return max_value;\n}\n\nSAMPLE render_pulse(SAMPLE* buf, uint16_t osc) {\n    // Second (negative) impulse is <duty> cycles later.\n    return render_lpf_lut(buf, osc, true, 1, 0);\n}\n\nvoid pulse_mod_trigger(uint16_t osc) {\n    //float mod_sr = (float)AMY_SAMPLE_RATE / (float)AMY_BLOCK_SIZE;\n    //float freq = freq_of_logfreq(synth[osc]->logfreq);\n    //float period = 1. / (freq/mod_sr);\n    //synth[osc]->step = period * synth[osc]->phase;\n}\n\n// dpwe sez to use this method for low-freq mod pulse still \nSAMPLE compute_mod_pulse(uint16_t osc) {\n    // do BW pulse gen at SR=44100/64\n    SAMPLE sample;\n    if(msynth[osc]->duty < 0.001f || msynth[osc]->duty > 0.999) msynth[osc]->duty = 0.5;\n    if(synth[osc]->phase >= F2P(msynth[osc]->duty)) {\n        sample = F2S(1.0f);\n    } else {\n        sample = F2S(-1.0f);\n    }\n    float mod_sr = (float)AMY_SAMPLE_RATE / (float)AMY_BLOCK_SIZE;  // samples per sec / samples per call = calls per sec\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    synth[osc]->phase = P_WRAPPED_SUM(synth[osc]->phase, F2P(freq / mod_sr));  // cycles per sec / calls per sec = cycles per call\n    return MULA_SS(sample, F2S(msynth[osc]->amp));\n}\n\n\n/* Saw waves */\nvoid saw_note_on(uint16_t osc, int8_t direction_notused, float freq) {\n    //printf(\"saw_note_on: time %lld osc %d freq %f logfreq %f amp %f last_amp %f phase %f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE, osc, freq, synth[osc]->logfreq, msynth[osc]->amp, msynth[osc]->last_amp, P2F(synth[osc]->phase));\n    float period_samples = ((float)AMY_SAMPLE_RATE / freq);\n    synth[osc]->lut = choose_from_lutset(period_samples, saw_fxpt_lutset);\n}\n\nvoid saw_down_note_on(uint16_t osc, float freq) {\n    saw_note_on(osc, -1, freq);\n}\nvoid saw_up_note_on(uint16_t osc, float freq) {\n    saw_note_on(osc, 1, freq);\n}\n\nSAMPLE render_saw(SAMPLE* buf, uint16_t osc, int8_t direction) {\n    return render_lpf_lut(buf, osc, false, direction, /* dc offset */ 0);\n    //printf(\"render_saw: time %lld osc %d buf[]=%f %f %f %f %f %f %f %f\\n\",\n    //       amy_global.total_blocks*AMY_BLOCK_SIZE, osc, S2F(buf[0]), S2F(buf[1]), S2F(buf[2]), S2F(buf[3]), S2F(buf[4]), S2F(buf[5]), S2F(buf[6]), S2F(buf[7]));\n}\n\nSAMPLE render_saw_down(SAMPLE* buf, uint16_t osc) {\n    return render_saw(buf, osc, -1);\n}\nSAMPLE render_saw_up(SAMPLE* buf, uint16_t osc) {\n    return render_saw(buf, osc, 1);\n}\n\n\nvoid saw_mod_trigger(uint16_t osc) {\n    //float mod_sr = (float)AMY_SAMPLE_RATE / (float)AMY_BLOCK_SIZE;\n    //float freq = freq_of_logfreq(synth[osc]->logfreq);\n    //float period = 1. / (freq/mod_sr);\n    //synth[osc]->step = period * synth[osc]->phase;\n}\n\nvoid saw_up_mod_trigger(uint16_t osc) {\n    saw_mod_trigger(osc);\n}\nvoid saw_down_mod_trigger(uint16_t osc) {\n    saw_mod_trigger(osc);\n}\n\n// TODO -- this should use dpwe code\nSAMPLE compute_mod_saw(uint16_t osc, int8_t direction) {\n    // Saw waveform is just the phasor.\n    SAMPLE sample = SHIFTL(P2S(synth[osc]->phase), 1) - F2S(1.0f);\n    float mod_sr = (float)AMY_SAMPLE_RATE / (float)AMY_BLOCK_SIZE;  // samples per sec / samples per call = calls per sec\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    synth[osc]->phase = P_WRAPPED_SUM(synth[osc]->phase, F2P(freq / mod_sr));  // cycles per sec / calls per sec = cycles per call\n    return MULA_SS(sample, direction * F2S(msynth[osc]->amp));\n}\n\nSAMPLE compute_mod_saw_down(uint16_t osc) {\n    return compute_mod_saw(osc, -1);\n}\n\nSAMPLE compute_mod_saw_up(uint16_t osc) {\n    return compute_mod_saw(osc, 1);\n}\n\n\n\n/* triangle wave */\nvoid triangle_note_on(uint16_t osc, float freq) {\n    float period_samples = (float)AMY_SAMPLE_RATE / freq;\n    synth[osc]->lut = choose_from_lutset(period_samples, triangle_fxpt_lutset);\n}\n\nSAMPLE render_triangle(SAMPLE* buf, uint16_t osc) {\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    PHASOR step = F2P(freq / (float)AMY_SAMPLE_RATE);  // cycles per sec / samples per sec -> cycles per sample\n    SAMPLE amp = F2S(msynth[osc]->amp);\n    SAMPLE last_amp = F2S(msynth[osc]->last_amp);\n    SAMPLE max_value;\n    synth[osc]->phase = render_lut(buf, synth[osc]->phase, step, last_amp, amp, synth[osc]->lut, &max_value);\n    msynth[osc]->last_amp = msynth[osc]->amp;\n    return max_value;\n}\n\nvoid triangle_mod_trigger(uint16_t osc) {\n    // float mod_sr = (float)AMY_SAMPLE_RATE / (float)AMY_BLOCK_SIZE;\n    // float freq = freq_of_logfreq(synth[osc]->logfreq);\n    // float period = 1. / (freq/mod_sr);\n    // synth[osc]->step = period * synth[osc]->phase;\n}\n\n// TODO -- this should use dpwe code \nSAMPLE compute_mod_triangle(uint16_t osc) {\n    // Saw waveform is just the phasor.\n    SAMPLE sample = SHIFTL(P2S(synth[osc]->phase), 2);  // 0..4\n    if (sample > F2S(2.0f))  sample = F2S(4.0f) - sample;  // 0..2..0\n    sample -= F2S(1.0f);  // -1 .. 1\n    float mod_sr = (float)AMY_SAMPLE_RATE / (float)AMY_BLOCK_SIZE;  // samples per sec / samples per call = calls per sec\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    synth[osc]->phase = P_WRAPPED_SUM(synth[osc]->phase, F2P(freq / mod_sr));  // cycles per sec / calls per sec = cycles per call\n    return MULA_SS(sample, F2S(msynth[osc]->amp));\n}\n\n\n/* FM */\n// NB this uses new lingo for step, skip, phase etc\nvoid fm_sine_note_on(uint16_t osc, uint16_t algo_osc) {\n    if(AMY_IS_SET(synth[osc]->logratio)) {\n        msynth[osc]->logfreq = msynth[algo_osc]->logfreq + synth[osc]->logratio;\n    }\n    // An empty exercise since there is only one entry in sine_lutset.\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    float period_samples = (float)AMY_SAMPLE_RATE / freq;\n    synth[osc]->lut = choose_from_lutset(period_samples, sine_fxpt_lutset);\n}\n\nSAMPLE render_fm_sine(SAMPLE* buf, uint16_t osc, SAMPLE* mod, SAMPLE feedback_level, uint16_t algo_osc, SAMPLE mod_amp) {\n    if(AMY_IS_SET(synth[osc]->logratio)) {\n        msynth[osc]->logfreq = msynth[algo_osc]->logfreq + synth[osc]->logratio;\n    }\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    PHASOR step = F2P(freq / (float)AMY_SAMPLE_RATE);  // cycles per sec / samples per sec -> cycles per sample\n    SAMPLE amp = MUL8_SS(F2S(msynth[osc]->amp), mod_amp);\n    SAMPLE last_amp = MUL8_SS(F2S(msynth[osc]->last_amp), mod_amp);\n    SAMPLE max_value;\n    if (feedback_level > 0 && mod)\n        synth[osc]->phase = render_lut_fm_fb(buf, synth[osc]->phase, step,\n                                            last_amp, amp,\n                                            synth[osc]->lut,\n                                            mod, feedback_level, synth[osc]->last_two, &max_value);\n    else if (feedback_level > 0)\n        synth[osc]->phase = render_lut_fb(buf, synth[osc]->phase, step,\n                                         last_amp, amp,\n                                         synth[osc]->lut,\n                                         feedback_level, synth[osc]->last_two, &max_value);\n    else if (mod)\n        synth[osc]->phase = render_lut_fm(buf, synth[osc]->phase, step,\n                                         last_amp, amp,\n                                         synth[osc]->lut,\n                                         mod, &max_value);\n    else\n        synth[osc]->phase = render_lut(buf, synth[osc]->phase, step,\n                                      last_amp, amp,\n                                      synth[osc]->lut, &max_value);\n\n    msynth[osc]->last_amp = msynth[osc]->amp;\n    return max_value;\n}\n\n/* sine */\nvoid sine_note_on(uint16_t osc, float freq) {\n    //fprintf(stderr, \"sine_note_on: time %f osc %d freq %f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE, osc, freq_of_logfreq(synth[osc]->logfreq_coefs[0]));\n    // There's really only one sine table, but for symmetry with the other ones...\n    float period_samples = (float)AMY_SAMPLE_RATE / freq;\n    synth[osc]->lut = choose_from_lutset(period_samples, sine_fxpt_lutset);\n}\n\nSAMPLE render_sine(SAMPLE* buf, uint16_t osc) { \n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    PHASOR step = F2P(freq / (float)AMY_SAMPLE_RATE);  // cycles per sec / samples per sec -> cycles per sample\n    SAMPLE amp = F2S(msynth[osc]->amp);\n    SAMPLE last_amp = F2S(msynth[osc]->last_amp);\n    //fprintf(stderr, \"render_sine: time %f osc %d freq %f last_amp %f amp %f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE, osc, AMY_SAMPLE_RATE * P2F(step), S2F(last_amp), S2F(amp));\n    SAMPLE max_value;\n    synth[osc]->phase = render_lut(buf, synth[osc]->phase, step, last_amp, amp, synth[osc]->lut, &max_value);\n    msynth[osc]->last_amp = msynth[osc]->amp;\n    return max_value;\n}\n\n\n// TOOD -- not needed anymore\nSAMPLE compute_mod_sine(uint16_t osc) { \n    // One sample pulled out of render_lut.\n    const LUT *lut = synth[osc]->lut;\n    int lut_mask = lut->table_size - 1;\n    int lut_bits = lut->log_2_table_size;\n    int16_t base_index = INT_OF_P(synth[osc]->phase, lut_bits);\n    SAMPLE frac = S_FRAC_OF_P(synth[osc]->phase, lut_bits);\n    LUTSAMPLE b = lut->table[base_index];\n    LUTSAMPLE c = lut->table[(base_index + 1) & lut_mask];\n    SAMPLE sample = L2S(b) + MUL0_SS(L2S(c - b), frac);\n    float mod_sr = (float)AMY_SAMPLE_RATE / (float)AMY_BLOCK_SIZE;  // samples per sec / samples per call = calls per sec\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    synth[osc]->phase = P_WRAPPED_SUM(synth[osc]->phase, F2P(freq / mod_sr));  // cycles per sec / calls per sec = cycles per call\n    return MULA_SS(sample, F2S(msynth[osc]->amp));\n}\n\nvoid sine_mod_trigger(uint16_t osc) {\n    sine_note_on(osc, freq_of_logfreq(msynth[osc]->logfreq));\n}\n\n\n// On the RP2040, rand and mrand48 etc. don't work on core1.\n// I think this is to do with the implicit state - it's not repeatable, nor strictly safe,\n// to potentially have two cores accessing the same rand_state memory at the same time.\n// However, we just want random values, and any bit pattern is acceptable.\n// So we make our own implementation of mrand48, and don't worry about it being called from both cores.\n\nstatic uint64_t rand_state = 0;\nstatic const uint64_t a = 0x5deece66dL;\nstatic const uint32_t c = 0xb;\n\nvoid my_srand48(uint32_t seedval) {\n    rand_state = ((uint64_t)seedval) << 32L;\n}\n\nstatic inline int32_t my_mrand48(void) {\n    // per https://www.ibm.com/docs/en/zos/2.4.0?topic=functions-mrand48-pseudo-random-number-generator\n    rand_state = (a * rand_state + c) & 0x0000ffffffffffffL;\n    return (int32_t)rand_state;\n}\n\n#if (defined PICO_RP2350) || (defined PICO_RP2040)\n#include \"pico/rand.h\"\n#endif\n\n// Returns a SAMPLE between -1 and 1.\ninline static SAMPLE amy_get_random() {\n#ifndef AMY_USE_FIXEDPOINT\n    return ((float)drand48()) - 0.5f;\n#else\n    //assert(RAND_MAX == 2147483647); // 2^31 - 1\n    return SHIFTR((SAMPLE)my_mrand48(), (32 - S_FRAC_BITS));  // - F2S(0.5f);\n#endif\n}\n\n/* noise */\n\nvoid noise_note_on(uint16_t osc) {\n    synth[osc]->last_two[0] = 0;\n    synth[osc]->last_two[1] = 0;\n}\n\nSAMPLE render_noise(SAMPLE *buf, uint16_t osc) {\n    SAMPLE amp = F2S(msynth[osc]->amp);\n    SAMPLE max_value = 0;\n    SAMPLE last_white = synth[osc]->last_two[0];\n    SAMPLE last_last_white = synth[osc]->last_two[1];\n    for(uint16_t i=0;i<AMY_BLOCK_SIZE;i++) {\n        SAMPLE white = MULA_SS(amy_get_random(), amp);\n        // Two-zero LPF to make the noise a little more pink, closer to Juno noise.\n        SAMPLE value = white + last_white + last_white + last_last_white;\n        last_last_white = last_white;\n        last_white = white;\n        buf[i] += value;\n        if (value < 0) value = -value;\n        if (value > max_value) max_value = value;\n    }\n    synth[osc]->last_two[0] = last_white;\n    synth[osc]->last_two[1] = last_last_white;\n    return max_value;\n}\n\nSAMPLE compute_mod_noise(uint16_t osc) {\n    float mod_sr = (float)AMY_SAMPLE_RATE / (float)AMY_BLOCK_SIZE;\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    float fstep = freq / mod_sr;\n    SAMPLE amp = F2S(msynth[osc]->amp);\n    PHASOR starting_phase = synth[osc]->phase;\n    synth[osc]->phase = P_WRAPPED_SUM(synth[osc]->phase, F2P(fstep));  // cycles per sec / calls per sec = cycles per call\n    if (fstep > 1.0f || synth[osc]->phase < starting_phase) {\n        // phase wrapped, take new sample.\n        synth[osc]->last_two[0] = MULA_SS(amy_get_random(), amp);\n    }\n    //printf(\"mod_noise: time %lld fstep %f samp %f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE, fstep, S2F(synth[osc]->last_two[0]));\n    return synth[osc]->last_two[0];\n}\n\n/* silent, i.e. just apply envelope */\nSAMPLE render_envelope(SAMPLE *buf, uint16_t osc) {\n    SAMPLE incoming_amp = F2S(msynth[osc]->last_amp);\n    SAMPLE ending_amp = F2S(msynth[osc]->amp);\n    SAMPLE max_value = 0;\n    SAMPLE current_amp = incoming_amp;\n    SAMPLE incremental_amp = SHIFTR(ending_amp - incoming_amp, BLOCK_SIZE_BITS);\n    for(uint16_t i = 0; i < AMY_BLOCK_SIZE; i++) {\n        SAMPLE value = MULA_SS(buf[i], current_amp);\n        buf[i] = value;\n        if (value < 0) value = -value;\n        if (value > max_value) max_value = value;\n        current_amp += incremental_amp;\n    }\n    msynth[osc]->last_amp = msynth[osc]->amp;\n    return max_value;\n}\n\n\n/* partial */\n\nSAMPLE render_partial(SAMPLE * buf, uint16_t osc) {\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    PHASOR step = F2P(freq / (float)AMY_SAMPLE_RATE);  // cycles per sec / samples per sec -> cycles per sample\n    SAMPLE amp = F2S(msynth[osc]->amp);\n    SAMPLE last_amp = F2S(msynth[osc]->last_amp);\n    //printf(\"render_partial: time %.3f logfreq %f freq %f last_amp %f amp %f step %f\\n\", (float)amy_global.total_blocks*AMY_BLOCK_SIZE/(float)AMY_SAMPLE_RATE, msynth[osc]->logfreq, freq, S2F(last_amp), S2F(amp), P2F(step) * synth[osc]->lut->table_size);\n    SAMPLE max_value;\n    synth[osc]->phase = render_lut(buf, synth[osc]->phase, step, last_amp, amp, synth[osc]->lut, &max_value);\n    msynth[osc]->last_amp = msynth[osc]->amp;\n    return max_value;\n}\n\nvoid partial_note_on(uint16_t osc) {\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    float period_samples = (float)AMY_SAMPLE_RATE / freq;\n    synth[osc]->lut = choose_from_lutset(period_samples, sine_fxpt_lutset);\n}\n\nvoid partial_note_off(uint16_t osc) {\n    synth[osc]->substep = 2;\n    AMY_UNSET(synth[osc]->note_on_clock);\n    synth[osc]->note_off_clock = amy_global.total_blocks*AMY_BLOCK_SIZE;\n    msynth[osc]->last_amp = 0;\n    synth[osc]->status = SYNTH_OFF;\n}\n\n\n#define MAX_KS_BUFFER_LEN 802 // 44100/55  -- 55Hz (A1) lowest we can go for KS\nSAMPLE ** ks_buffer;\nuint8_t ks_polyphony_index;\n\n\n/* karplus-strong */\n\nSAMPLE render_ks(SAMPLE * buf, uint16_t osc) {\n    SAMPLE half = MUL0_SS(F2S(0.5f), F2S(synth[osc]->feedback));\n    SAMPLE amp = F2S(msynth[osc]->amp);\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    SAMPLE max_value = 0;\n    if(freq >= 55) { // lowest note we can play\n        uint16_t buflen = (uint16_t)(AMY_SAMPLE_RATE / freq);\n        for(uint16_t i = 0; i < AMY_BLOCK_SIZE; i++) {\n            uint16_t index = (uint16_t)(synth[osc]->step);\n            SAMPLE sample = ks_buffer[ks_polyphony_index][index];\n            ks_buffer[ks_polyphony_index][index] =                 \n                SMULR7(\n                    (ks_buffer[ks_polyphony_index][index] + ks_buffer[ks_polyphony_index][(index + 1) % buflen]),\n                    half);\n            synth[osc]->step = (index + 1) % buflen;\n            SAMPLE value = SMULR7(sample, amp);\n            buf[i] += value;\n            if (i == 0) {\n                max_value = value;\n            } else {\n                if (value > max_value) max_value = value;\n                else if (-value > max_value) max_value = -value;\n            }\n        }\n    }\n    //fprintf(stderr, \"render_ks time %u osc %d freq %.1f amp %.3f maxval %.3f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE, osc, freq, S2F(amp), S2F(max_value));\n    return max_value;\n}\n\nvoid ks_note_on(uint16_t osc) {\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    if(freq <= 1.f) freq = 1.f;\n    uint16_t buflen = (uint16_t)(AMY_SAMPLE_RATE / freq);\n    if(buflen > MAX_KS_BUFFER_LEN) buflen = MAX_KS_BUFFER_LEN;\n    // init KS buffer with noise up to max\n    SAMPLE sum = 0;\n    for(uint16_t i = 0; i < buflen; i++) {\n        SAMPLE val = amy_get_random();\n        ks_buffer[ks_polyphony_index][i] = val;\n        sum += val;\n    }\n    // Remove dc, to avoid ending up with a dc-offset residual.\n    SAMPLE mean = sum / buflen;\n    for(uint16_t i = 0; i < buflen; i++) {\n        ks_buffer[ks_polyphony_index][i] -= mean;\n    }\n    ks_polyphony_index++;\n    if(ks_polyphony_index == AMY_KS_OSCS) ks_polyphony_index = 0;\n    //fprintf(stderr, \"ks_note_on: osc %d buflen %d poly_index %d\\n\", osc, buflen, ks_polyphony_index);\n}\n\nvoid ks_note_off(uint16_t osc) {\n    msynth[osc]->amp = 0;\n}\n\n\nvoid ks_init(void) {\n    // 6ms buffer\n    ks_polyphony_index = 0;\n    ks_buffer = (SAMPLE**) malloc(sizeof(SAMPLE*)*AMY_KS_OSCS);\n    for(int i=0;i<AMY_KS_OSCS;i++) ks_buffer[i] = (SAMPLE*)malloc(sizeof(float)*MAX_KS_BUFFER_LEN); \n}\n\nvoid ks_deinit(void) {\n    for(int i=0;i<AMY_KS_OSCS;i++) free(ks_buffer[i]);\n    free(ks_buffer);\n}\n\n// --------- wavetable ----------\n\n#ifdef AMY_WAVETABLE\nvoid wavetable_note_on(uint16_t osc, float freq) {\n    //fprintf(stderr, \"wavetable_note_on: time %f osc %d freq %f\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE, osc, freq_of_logfreq(synth[osc]->logfreq_coefs[0]));\n    //float period_samples = (float)AMY_SAMPLE_RATE / freq;\n    //synth[osc]->lut = wavetable_lut;  // TODO(dpwe): choose based on synth[osc]->preset.\n}\n\n// Structure of waveeditonlie wavetables.\nconst int CYCLES_PER_WAVETABLE = 64;\nconst int WAVETABLE_SAMPLES_PER_CYCLE = 256;\nconst int WAVETABLE_LOG2_SAMPLES_PER_CYCLE = 8;\n\nSAMPLE render_wavetable(SAMPLE* buf, uint16_t osc) {\n    float freq = freq_of_logfreq(msynth[osc]->logfreq);\n    PHASOR step = F2P(freq / (float)AMY_SAMPLE_RATE);  // cycles per sec / samples per sec -> cycles per sample\n    SAMPLE amp = F2S(msynth[osc]->amp);\n    SAMPLE last_amp = F2S(msynth[osc]->last_amp);\n    //fprintf(stderr, \"render_wavetable: time %f osc %d freq %f last_amp %f amp %f preset %d\\n\", amy_global.total_blocks*AMY_BLOCK_SIZE / (float)AMY_SAMPLE_RATE, osc, AMY_SAMPLE_RATE * P2F(step), S2F(last_amp), S2F(amp), synth[osc]->preset);\n    SAMPLE max_value;\n    float interp = MAX(0, MIN(CYCLES_PER_WAVETABLE - 1, (CYCLES_PER_WAVETABLE - 1) * msynth[osc]->duty));  // Don't try to interp beyond end of table.  An N-waveform table can be interpolated from 0 to (N-1-eps).\n    int table = MIN((int)floor(interp), CYCLES_PER_WAVETABLE - 2);  // always need both this wavetable and the next one.\n    interp = interp - table;  // fractional part, normally < 1.0, but == 1.0 for very end of table.\n    int wavetable_preset = AMY_IS_SET(synth[osc]->preset)\n        ? (int)synth[osc]->preset\n        : (int)pcm_wavetable_base;\n    int wavetable_samples_per_table = (pcm_wavetable_len > 0) ? (int)pcm_wavetable_len : 16384;\n    uint32_t sample_length = 0;\n    const int16_t *wavetable_sample_ram =\n        pcm_get_sample_ram_for_preset((uint16_t)wavetable_preset, &sample_length);\n    if ((wavetable_sample_ram == NULL || sample_length < (uint32_t)wavetable_samples_per_table) &&\n        wavetable_preset != (int)pcm_wavetable_base) {\n        wavetable_sample_ram = pcm_get_sample_ram_for_preset(pcm_wavetable_base, &sample_length);\n    }\n    if (wavetable_sample_ram == NULL || sample_length < (uint32_t)wavetable_samples_per_table) {\n        return 0;\n    }\n    LUT wavetable_lut = {wavetable_sample_ram, WAVETABLE_SAMPLES_PER_CYCLE, WAVETABLE_LOG2_SAMPLES_PER_CYCLE, 0, 1.0f};\n    wavetable_lut.table += table * WAVETABLE_SAMPLES_PER_CYCLE;\n    // don't update phase in the first call to render_lut, so second call uses the same phase\n    SAMPLE interp_a = F2S(1.0f - interp);\n    SAMPLE interp_b = F2S(interp);\n    // If we used last_duty, we could actually smoothly interpolate the waveshape crossfade too (except across table boundaries).\n    render_lut(buf, synth[osc]->phase, step, SMULR7(last_amp, interp_a), SMULR7(amp, interp_a), &wavetable_lut, &max_value);\n    // Point to next cycle.\n    wavetable_lut.table += WAVETABLE_SAMPLES_PER_CYCLE;\n    synth[osc]->phase = render_lut(buf, synth[osc]->phase, step, SMULR7(last_amp, interp_b), SMULR7(amp, interp_b), &wavetable_lut, &max_value);\n    msynth[osc]->last_amp = msynth[osc]->amp;\n    return max_value;\n}\n#endif\n"
  },
  {
    "path": "src/parse.c",
    "content": "// parse.c\n// handle parsing wire strings\n\n#include \"amy.h\"\n#include \"transfer.h\"  // for amy_dump_state_to_sysex, amy_dump_file_to_sysex\n#include <ctype.h>  // for isalpha().\n#if defined(TULIP) || defined(AMYBOARD)\n#include \"py/runtime.h\"\n#endif\n\nfloat atoff(const char *s) {\n    // Returns float value corresponding to parseable prefix of s.\n    // Unlike atof(), it does not recognize scientific format ('e' or 'E')\n    // and will stop parsing there.  Needed for message strings that contain\n    // 'e' as a command prefix.\n    float frac = 0;\n    // Skip leading spaces.\n    while (*s == ' ') ++s;\n    float whole = (float)atoi(s);\n    int is_negative = (s[0] == '-');  // Can't use (whole < 0) because of \"-0.xx\".\n    //const char *s_in = s;  // for debug message.\n    s += strspn(s, \"-0123456789\");\n    if (*s == '.') {\n        // Float with a decimal part.\n        // Step over dp\n        ++s;\n        // Extract fractional part.\n        int fraclen = strspn(s, \"0123456789\");\n        char fracpart[8];\n        // atoi() will overflow for values larger than 2^31, so only decode a prefix.\n        if (fraclen > 6) {\n            for(int i = 0; i < 7; ++i) {\n                fracpart[i] = s[i];\n            }\n            fracpart[7] = '\\0';\n            s = fracpart;\n            fraclen = 7;\n        }\n        frac = (float)atoi(s);\n        frac /= powf(10.f, (float)fraclen);\n        if (is_negative) frac = -frac;\n    }\n    //fprintf(stderr, \"input was %s output is %f + %f = %f\\n\", s_in, whole, frac, whole+frac);\n    return whole + frac;\n}\n\n\n#define PARSE_LIST_STRSPN1(var) _Generic((var), \\\n    float:    \" -0123456789,.\", \\\n    uint32_t: \" 0123456789,\", \\\n    uint16_t: \" 0123456789,\", \\\n    int16_t:  \" -0123456789,\", \\\n    int32_t:  \" -0123456789,\" \\\n)\n\n#define PARSE_LIST_STRSPN2(var) _Generic((var), \\\n    float:    \"-0123456789.\", \\\n    uint32_t: \"0123456789\", \\\n    uint16_t: \"0123456789\", \\\n    int16_t:  \"-0123456789\", \\\n    int32_t:  \"-0123456789\" \\\n)\n\n#define PARSE_LIST_ATO(var) _Generic((var), \\\n    float:    atoff, \\\n    uint32_t: atoi, \\\n    uint16_t: atoi, \\\n    int32_t:  atoi, \\\n    int16_t:  atoi \\\n)\n\n#define PARSE_LIST(type) \\\n    int parse_list_##type(char *message, type *vals, int max_num_vals, type skipped_val) { \\\n        uint16_t c = 0, last_c; \\\n        uint16_t stop = strspn(message, PARSE_LIST_STRSPN1(skipped_val)); \\\n        int num_vals_received = 0; \\\n        while(c < stop && num_vals_received < max_num_vals) { \\\n            *vals = PARSE_LIST_ATO(skipped_val)(message + c); \\\n            while (message[c] == ' ') ++c; \\\n            last_c = c; \\\n            c += strspn(message + c, PARSE_LIST_STRSPN2(skipped_val));  \\\n            if (last_c == c)  \\\n                *vals = skipped_val;  \\\n            while (message[c] != ',' && message[c] != 0 && c < MAX_MESSAGE_LEN) c++; \\\n            ++c; \\\n            ++vals; \\\n            ++num_vals_received; \\\n        } \\\n        if (c < stop) { \\\n            fprintf(stderr, \"WARNING: parse__list_##type: More than %d values in \\\"%s\\\"\\n\", \\\n            max_num_vals, message); \\\n        } else { /* pad to end */       \\\n            for (int i = num_vals_received; i < max_num_vals; ++i) {  \\\n                *vals++ = skipped_val;  \\\n            }                           \\\n        }                               \\\n        return num_vals_received;       \\\n    }\n\n\nPARSE_LIST(float)\nPARSE_LIST(uint32_t)\nPARSE_LIST(uint16_t)\nPARSE_LIST(int32_t)\nPARSE_LIST(int16_t)\n\n\n#define PARSE_VAL(type) \\\n    int parse_val_##type(char *message, type *val) {             \\\n        int c = 0;                                                      \\\n        *val = PARSE_LIST_ATO(*val)(message);                           \\\n        c = strspn(message, PARSE_LIST_STRSPN2(*val));                  \\\n        return c; \\\n    }\n\nPARSE_VAL(float)\nPARSE_VAL(int32_t)\n\nchar *copy_with_trim(char *dest, size_t dest_len, const char *src, size_t src_len) {\n    // Copy a string while trimming leading and trailing spaces.\n    const char *s = src;\n    char *d = dest;\n    size_t d_writ = 0;\n    size_t s_read = 0;\n    size_t trimmed_src_len = src_len;\n    // scan for spaces at end\n    while (trimmed_src_len > 0 && isspace((unsigned char)src[trimmed_src_len - 1])) {\n        --trimmed_src_len;\n    }\n    // skip over leading spaces\n    while (s_read < trimmed_src_len && isspace((unsigned char)*s)) {\n        ++s;\n        ++s_read;\n    }\n    while(s_read < trimmed_src_len && d_writ < (dest_len - 1)) {\n        *d++ = *s++;\n        ++s_read;\n        ++d_writ;\n    }\n    *d = '\\0'; // terminator.\n    return (char*) (src + src_len);\n}\n\nstatic const char *strchrnul_local(const char *s, int c) {\n    const char *found = strchr(s, c);\n    if (found != NULL) {\n        return found;\n    }\n    return s + strlen(s);\n}\n\nuint16_t parse_list_file_params(char *message, uint32_t *preset, char *filename, size_t filename_len, uint32_t *midinote) {\n    // Returns number of characters of message that are consumed.\n    if (filename_len > 0) {\n        filename[0] = '\\0'; \n    }\n    char *m = message;\n    *preset = strtol(m, &m, 0);\n    if (*m != ',') return m - message;\n    ++m;\n    m = copy_with_trim(filename, filename_len, m, strchrnul_local(m, ',') - m);\n    if (*m != ',') return m - message;\n    ++m;\n    *midinote = strtol(m, &m, 0);\n    return m - message;\n}\n\n\nuint16_t parse_list_file_transfer_params(char *message, char *filename, size_t filename_len,\n                                            uint32_t *file_size) {\n    *file_size = 0;\n    if (filename_len > 0) {\n        filename[0] = '\\0';\n    }\n    char *m = message;\n    m = copy_with_trim(filename, filename_len, m, strchrnul_local(m, ',') - m);\n    if (*m != ',') return m - message;\n    ++m;\n    *file_size = strtol(m, &m, 0);\n    return m-message;\n}\n\n\nvoid copy_param_list_substring(char *dest, const char *src) {\n    // Copy wire command string up to next parameter char.\n    uint16_t c = 0;\n    uint16_t stop = strspn(src, \" 0123456789-,.\");  // Note space & period.\n    while (c < stop && src[c]) {\n        dest[c] = src[c];\n        c++;\n    }\n    dest[c] = '\\0';\n}\n\nfloat int_db_to_float_lin(uint32_t db) {\n    // in interp_partials.h, we store amplitudes as integer dB values in range 0..100.\n    float lin = 0;\n    if (AMY_IS_UNSET(db)) return AMY_UNSET_VALUE(lin);\n    lin = powf(10.0f, ((((float)db) - 100.0f) / 20.0f)) - 0.001f;\n    if (lin < 0) return 0;\n    return lin;\n}\n\nfloat int_db_to_60dB_01(uint32_t db) {\n    // Map 100 (db) to 1.0, 40 (db) to 0.0\n    float lin = 0;\n    if (AMY_IS_UNSET(db)) return AMY_UNSET_VALUE(lin);\n    lin = 1.0f + (((float)db - 100.0f) / (3.0f * 20.0f));\n    if (lin < 0) return 0;\n    return lin;\n}\n\n//static int16_t clamp_bp_time_ms_to_i16(uint32_t t_ms) {\n//    if (t_ms >= (uint32_t)SHRT_MAX) return (int16_t)(SHRT_MAX - 1);\n//    return (int16_t)t_ms;\n//}\n\nstatic int parse_breakpoint_event_core_float_lin(char* message, uint32_t *times_ms, float *values) {\n    float vals[2 * MAX_BREAKPOINTS];\n    int num_vals = parse_list_float(message, vals, 2 * MAX_BREAKPOINTS,\n                                    AMY_UNSET_VALUE(vals[0]));\n    for (int i = 0; i < num_vals; ++i) {\n        int bp_index = (i >> 1);\n        if (bp_index >= MAX_BREAKPOINTS) break;\n        if ((i % 2) == 0) {\n            if (AMY_IS_SET(vals[i])) {\n                int32_t t_ms = (int32_t)vals[i];\n                if (t_ms < 0) t_ms = 0;\n                times_ms[bp_index] = (uint32_t)t_ms;  // clamp_bp_time_ms_to_i16((uint32_t)t_ms);\n            } else {\n                AMY_UNSET(times_ms[bp_index]);\n            }\n        } else {\n            values[bp_index] = vals[i];\n        }\n    }\n    return num_vals;\n}\n\nstatic int parse_breakpoint_event_core_int_db(char* message, uint32_t *times_ms, float *values) {\n    uint32_t vals[2 * MAX_BREAKPOINTS];\n    int num_vals = parse_list_uint32_t(message, vals, 2 * MAX_BREAKPOINTS,\n                                       AMY_UNSET_VALUE(vals[0]));\n    for (int i = 0; i < num_vals; ++i) {\n        int bp_index = (i >> 1);\n        if (bp_index >= MAX_BREAKPOINTS) break;\n        if ((i % 2) == 0) {\n            if (AMY_IS_SET(vals[i])) {\n                times_ms[bp_index] = vals[i];  // clamp_bp_time_ms_to_i16(vals[i]);\n            } else {\n                AMY_UNSET(times_ms[bp_index]);\n            }\n        } else {\n            values[bp_index] = int_db_to_float_lin(vals[i]);\n            //values[bp_index] = int_db_to_60dB_01(vals[i]);\n        }\n    }\n    return num_vals;\n}\n\nstatic void parse_event_breakpoints(char *message, uint32_t *times_ms, float *values) {\n    int num_vals = 0;\n    for (int i = 0; i < MAX_BREAKPOINTS; ++i) {\n        AMY_UNSET(times_ms[i]);\n        AMY_UNSET(values[i]);\n    }\n    if (message[0] == '.' && message[1] == '.') {\n        num_vals = parse_breakpoint_event_core_int_db(message + 2, times_ms, values);\n    } else {\n        num_vals = parse_breakpoint_event_core_float_lin(message, times_ms, values);\n    }\n    for (int i = num_vals; i < 2 * MAX_BREAKPOINTS; ++i) {\n        int bp_index = (i >> 1);\n        if (bp_index < MAX_BREAKPOINTS) {\n            if ((i % 2) == 0) AMY_UNSET(times_ms[bp_index]);\n            else AMY_UNSET(values[bp_index]);\n        }\n    }\n}\n\n// helper to parse the list of source oscs for an algorithm\nvoid parse_algo_source(char *message, int16_t *vals) {\n    int num_parsed = parse_list_int16_t(message, vals, MAX_ALGO_OPS,\n                                        AMY_UNSET_VALUE(vals[0]));\n    // Clear unspecified values.\n    for (int i = num_parsed; i < MAX_ALGO_OPS; ++i) {\n        AMY_UNSET(vals[i]);\n    }\n}\n\nvoid parse_voices(char *message, uint16_t *vals) {\n    int num_parsed = parse_list_uint16_t(message, vals, MAX_VOICES_PER_INSTRUMENT,\n                                         AMY_UNSET_VALUE(vals[0]));\n    // Clear unspecified values.\n    for (int i = num_parsed; i < MAX_VOICES_PER_INSTRUMENT; ++i) {\n        AMY_UNSET(vals[i]);\n    }\n}\n\nuint32_t ms_to_samples(uint32_t ms) {\n    uint32_t samps = 0;\n    if (AMY_IS_UNSET(ms)) return AMY_UNSET_VALUE(samps);\n    samps = (uint32_t)(((float)ms / 1000.0) * (float)AMY_SAMPLE_RATE);\n    return samps;\n}\n\nvoid parse_coef_message(char *message, float *coefs) {\n    int num_coefs = parse_list_float(message, coefs, NUM_COMBO_COEFS,\n                                             AMY_UNSET_VALUE(coefs[0]));\n    // Clear the unspecified coefs to unset.\n    for (int i = num_coefs; i < NUM_COMBO_COEFS; ++i)\n        coefs[i] = AMY_UNSET_VALUE(coefs[0]);\n}\n\n#if defined(TULIP) || defined(AMYBOARD)\nextern const mp_obj_fun_builtin_var_t tulip_pcm_load_file_obj;\n#endif\n\nint parse_midi_cc_payload(char *message, int32_t *p_cc_code, int32_t *p_is_log, float *p_min_val, float *p_max_val, float *p_offset_val) {\n    char *m = message;\n    m += parse_val_int32_t(m, p_cc_code);\n    if (m[0] != ',') goto end; else ++m;\n    m += parse_val_int32_t(m, p_is_log);\n    if (m[0] != ',') goto end; else ++m;\n    m += parse_val_float(m, p_min_val);\n    if (m[0] != ',') goto end; else ++m;\n    m += parse_val_float(m, p_max_val);\n    if (m[0] != ',') goto end; else ++m;\n    m += parse_val_float(m, p_offset_val);\n end:\n    return m - message;\n}\n\n// Parser for synth-layer ('i') prefix.\nint amy_parse_synth_layer_message(char *message, amy_event *e) {\n    int skip_chars = 1;  // default is to skip one extra char.\n    if (message[0] >= '0' && message[0] <= '9') {\n        // It's just the instrument number.\n        e->synth = atoi(message);\n        return 0;  // no extra skip.\n    }\n    char cmd = message[0];\n    message++;\n    if (cmd == 'p')  e->pedal = atoi(message);\n    else if (cmd == 'f')  e->synth_flags = atoi(message);\n    else if (cmd == 'v')  e->num_voices = atoi(message);\n    else if (cmd == 't')  e->to_synth = atoi(message);\n    else if (cmd == 'm')  e->grab_midi_notes = atoi(message);\n    else if (cmd == 'd')  e->synth_delay_ms = atoi(message);\n    else if (cmd == 'n')  e->oscs_per_voice = atoi(message);\n    else if (cmd == 'c')  {\n        // MIDI CC mapping ic<C>,<L>,<N>,<X>,<O>,<CODE>, see https://github.com/shorepine/amy/issues/524\n        // ic255 clears all MIDI CC mappings for this synth (short form, no extra fields needed).\n        int32_t cc_code, is_log;\n        float min_val, max_val, offset_val;\n        AMY_UNSET(cc_code);\n        AMY_UNSET(is_log);\n        skip_chars = parse_midi_cc_payload(message, &cc_code, &is_log, &min_val, &max_val, &offset_val);\n        if (*(message + skip_chars) != ',') {\n            if (AMY_IS_UNSET(cc_code) || AMY_IS_SET(is_log)) {\n                // Either parsing bailed without even a CC code, or it got past the is_log, meaning it wasn't a bare ic<NUM> command.\n                fprintf(stderr, \"synth_layer: midi cc payload didn't parse for %s.\\n\", message - 1);\n                return skip_chars;  // maybe the rest will parse?\n            }\n            // Else we got an incomplete message with a valid CC code - clear it\n            midi_clear_control_code(e->synth, cc_code);  // (handles 255 as special case).\n            return skip_chars;\n        }\n        ++skip_chars;  // step over the \",\" before the wire string template.\n        midi_store_control_code(e->synth, cc_code, is_log, min_val, max_val, offset_val, message + skip_chars);\n        // Consume rest of message but leave the trailing 'Z' for the outer parser.\n        int remainder = strlen(message);\n        if (remainder > 0 && message[remainder - 1] == 'Z') remainder--;\n        skip_chars = remainder;\n    }\n    else fprintf(stderr, \"Unrecognized synth-level command '%s'\\n\", message - 1);\n    return skip_chars;\n}\n\n// Parser for transfer-layer ('z') prefix. Returns how much of a message to skip\nuint16_t amy_parse_transfer_layer_message(char *message) {\n\n    if (message[0] >= '0' && message[0] <= '9') {\n        // z: Signal to start loading sample. \n        // Params: preset number, length(frames), samplerate, midinote, loopstart, loopend. \n        uint32_t sm[6]; // preset, length, SR, midinote, loop_start, loopend\n        parse_list_uint32_t(message, sm, 6, 0);\n        if(sm[1]==0) { // remove preset\n            pcm_unload_preset(sm[0]);\n        } else {\n            int16_t * ram = pcm_load(sm[0], sm[1], sm[2], 1, sm[3], sm[4], sm[5]);\n            start_receiving_transfer(sm[1]*2, (uint8_t*)ram);\n        }\n        return 0;\n    }\n    char cmd = message[0];\n    message++;\n    if (cmd == 'T')  {\n        // zT: Signal to start loading file. \n        //Params: Destination name, file size.\n        uint32_t file_size = 0;\n        char filename[MAX_FILENAME_LEN];\n        uint16_t len = parse_list_file_transfer_params(message, filename, sizeof(filename), &file_size);\n        if (filename[0] != '\\0') {\n            sequencer_midi_stop();  // Stop sequencer (and sketch loop) during file transfer.\n            start_receiving_file_transfer(file_size, filename);\n        }\n        return len;\n    }\n    else if (cmd == 'F') {\n        // zF: setup PCM preset from WAV filename on disk. \n        // Params: Preset number, filename, midi note\n\n        uint32_t preset = 0;\n        uint32_t midinote = 0;\n        char filename[MAX_FILENAME_LEN];\n        uint16_t len = parse_list_file_params(message, &preset, filename, sizeof(filename),\n                               &midinote);\n        if (filename[0] != '\\0') {\n            amy_global.transfer_stored_bytes = midinote;\n            strncpy(amy_global.transfer_filename, filename, MAX_FILENAME_LEN);\n            amy_global.transfer_file_handle = preset;\n            // For tulip/amyboard we have to load the PCM file from the MP \"task\"\n            #if (defined AMYBOARD) || (defined TULIP)\n                mp_sched_schedule(MP_OBJ_FROM_PTR(&tulip_pcm_load_file_obj), mp_const_none);\n            #else\n                pcm_load_file();\n            #endif\n\n        }\n        return len;\n    }\n    else if (cmd == 'S') {\n        // zS: sample from BUS[1] to a memorypcm patch. \n        // Params: Preset number,  bus, max length in frames,midinote,loopstart,loopend\n        uint32_t sm[6]; // preset, bus, max frames, midinote, loop_start, loopend\n        parse_list_uint32_t(message, sm, 6, 0);\n        int16_t * ram = pcm_load(sm[0], sm[2], AMY_SAMPLE_RATE, 2, sm[3], sm[4], sm[5]);\n        start_receiving_sample(sm[2], sm[1], ram);\n        return 1;\n    }\n    else if (cmd == 'O') {\n        //zO: stop sampling from any bus\n        stop_receiving_sample();\n        return 1;\n    }\n    else if (cmd == 'D') {\n        // zD: Dump data over MIDI sysex.\n        //   zD[Z]              — dump all active instrument state + global effects.\n        //   zD<filename>[Z]    — dump file contents from the filesystem.\n        // The filename/payload is \"rest of message\" — we consume everything\n        // to the end of the C string. A trailing 'Z' (end-of-message marker\n        // some senders append) is stripped, so interior capital-Z characters\n        // in the filename (e.g. \"/ZIPFILE.py\") are preserved. Limitation:\n        // filenames whose last char is 'Z' are not addressable.\n        char filename[MAX_FILENAME_LEN];\n        uint16_t len = 0;\n        while (message[len] && len < MAX_FILENAME_LEN - 1) {\n            filename[len] = message[len];\n            len++;\n        }\n        filename[len] = '\\0';\n        if (len > 0 && filename[len - 1] == 'Z') {\n            filename[--len] = '\\0';\n        }\n        if (filename[0] == '\\0') {\n            amy_dump_state_to_sysex();\n        } else {\n            amy_dump_file_to_sysex(filename);\n        }\n        // Consume the whole rest of the message so the outer parser exits.\n        {\n            uint16_t total = 0;\n            const char *scan = message - 1;  // back to 'D'\n            while (scan[total]) total++;\n            return total;\n        }\n    }\n    else if (cmd == 'A') {\n        // zA: Update sketch.py on disk with current AMY state (calls update_file_hook).\n        // Takes optional filename; defaults to /user/current/sketch.py on AMYboard.\n        // Payload semantics match zD: the filename is \"rest of message\", a\n        // trailing 'Z' terminator is stripped, and interior capital-Z chars\n        // in the filename are preserved.\n        char filename[MAX_FILENAME_LEN];\n        uint16_t len = 0;\n        while (message[len] && len < MAX_FILENAME_LEN - 1) {\n            filename[len] = message[len];\n            len++;\n        }\n        filename[len] = '\\0';\n        if (len > 0 && filename[len - 1] == 'Z') {\n            filename[--len] = '\\0';\n        }\n        if (amy_global.config.amy_external_update_file_hook) {\n            if (filename[0]) {\n                amy_global.config.amy_external_update_file_hook(filename);\n            } else {\n                amy_global.config.amy_external_update_file_hook(\"/user/current/sketch.py\");\n            }\n        }\n        {\n            uint16_t total = 0;\n            const char *scan = message - 1;\n            while (scan[total]) total++;\n            return total;\n        }\n    }\n    else if (cmd == 'P') {\n        // zP: Execute Python code on host (e.g. zPimport amyboard; amyboard.restart_sketch()Z).\n        // Payload semantics match zD: the code string is \"rest of message\",\n        // a trailing 'Z' terminator is stripped, and interior capital-Z chars\n        // in the code are preserved.\n        char code[256];\n        uint16_t len = 0;\n        while (message[len] && len < sizeof(code) - 1) {\n            code[len] = message[len];\n            len++;\n        }\n        code[len] = '\\0';\n        if (len > 0 && code[len - 1] == 'Z') {\n            code[--len] = '\\0';\n        }\n        if (amy_global.config.amy_external_exec_hook) {\n            amy_global.config.amy_external_exec_hook(code);\n        }\n        {\n            uint16_t total = 0;\n            const char *scan = message - 1;\n            while (scan[total]) total++;\n            return total;\n        }\n    }\n    else fprintf(stderr, \"Unrecognized transfer-level command '%s'\\n\", message - 1);\n    return 0;\n}\n\n\nint _next_alpha(char *s) {\n    // Return how many chars to skip to get to the next alphabet (command prefix) (or EOS).\n    int p = 0;\n    while (*(s + p)) {\n        char c = *(s + p);\n        if (isalpha(c))  break;\n        ++p;\n    }\n    return p;\n}\n\n\n\n// given a string return a parsed event\nint amy_parse_message(char * message, int length, amy_event *e) {\n    peek_stack(\"parse_message\");\n    char cmd = '\\0';\n    uint16_t pos = 0;\n\n    // Check if we're in a transfer block, if so, parse it and leave this loop.\n    // FILE transfers (zT, used to write files over MIDI sysex) arrive async\n    // while a sketch may also be running, so we ONLY route them to the\n    // transfer handler when the data is sysex-originated -- otherwise a\n    // sketch calling amy.send(note=36) mid-transfer would get its wire\n    // command base64-decoded as file data and corrupt the file.\n    //\n    // AUDIO transfers (amy.load_sample / load_sample_bytes) are different:\n    // Python sends every chunk synchronously in a tight loop within the same\n    // call, so no other amy.send() can interleave. They route regardless of\n    // the sysex flag (which they don't carry, since send_raw goes through\n    // the regular wire path).\n    extern bool amy_parsing_from_sysex;\n    if (amy_global.transfer_flag == AMY_TRANSFER_TYPE_AUDIO ||\n        (amy_parsing_from_sysex && amy_global.transfer_flag == AMY_TRANSFER_TYPE_FILE)) {\n        parse_transfer_message(message, length);\n        e->status = EVENT_TRANSFER_DATA;\n        return length;\n    }\n\n    while(pos < length) {\n        cmd = message[pos];\n        char *arg = message + pos + 1;\n        if(isalpha(cmd)) {\n            switch(cmd) {\n            case 'a': parse_coef_message(arg, e->amp_coefs);break;\n            case 'A': {\n                char bp_msg[MAX_PARAM_LEN];\n                copy_param_list_substring(bp_msg, arg);\n                parse_event_breakpoints(bp_msg, e->eg0_times, e->eg0_values);\n                e->bp_is_set[0] = 1;\n                break;\n            }\n            case 'B': {\n                char bp_msg[MAX_PARAM_LEN];\n                copy_param_list_substring(bp_msg, arg);\n                parse_event_breakpoints(bp_msg, e->eg1_times, e->eg1_values);\n                e->bp_is_set[1] = 1;\n                break;\n            }\n            case 'b': e->feedback = atoff(arg); break;\n            case 'c': e->chained_osc = atoi(arg); break;\n            /* C available */\n            case 'd': parse_coef_message(arg, e->duty_coefs);break;\n            case 'D': show_debug(atoi(arg)); break;\n            case 'f': parse_coef_message(arg, e->freq_coefs);break;\n            case 'F': parse_coef_message(arg, e->filter_freq_coefs); break;\n            case 'G': e->filter_type = atoi(arg); break;\n            /* g used for Alles for client # */\n            case 'H': parse_list_uint32_t(arg, e->sequence, 3, 0); break;\n            case 'h': if (AMY_HAS_REVERB) {\n                float reverb_params[4];\n                parse_list_float(arg, reverb_params, 4, AMY_UNSET_VALUE(amy_global.reverb.liveness));\n                e->reverb_level = reverb_params[0];\n                e->reverb_liveness = reverb_params[1];\n                e->reverb_damping = reverb_params[2];\n                e->reverb_xover_hz = reverb_params[3];\n            }\n            break;\n            /* i is used by alles for sync index -- but only for sync messages -- ok to use here but test */\n            case 'i': pos += amy_parse_synth_layer_message(arg, e); break;  // Skip over second cmd letter, if any, or entire MIDI CC code string.\n            case 'I': e->ratio = atoff(arg); break;\n            case 'j': e->tempo = atof(arg); break;\n            /* j, J available */\n            // chorus.level\n            case 'k': if(AMY_HAS_CHORUS) {\n                float chorus_params[4];\n                parse_list_float(arg, chorus_params, 4, AMY_UNSET_FLOAT);\n                e->chorus_level = chorus_params[0];\n                e->chorus_max_delay = chorus_params[1];\n                e->chorus_lfo_freq = chorus_params[2];\n                e->chorus_depth = chorus_params[3];\n            }\n            break;\n            case 'K': e->patch_number = atoi(arg); break;\n            case 'l': e->velocity=atoff(arg); break;\n            case 'L': e->mod_source=atoi(arg); break;\n            case 'm': e->portamento_ms=atoi(arg); break;\n            case 'M': if (AMY_HAS_ECHO) {\n                float echo_params[5];\n                parse_list_float(arg, echo_params, 5, AMY_UNSET_FLOAT);\n                e->echo_level = echo_params[0];\n                e->echo_delay_ms = echo_params[1];\n                e->echo_max_delay_ms = echo_params[2];\n                e->echo_feedback = echo_params[3];\n                e->echo_filter_coef = echo_params[4];\n            }\n            break;\n            case 'n': e->midi_note=atof(arg); break;\n            case 'N': e->latency_ms = atoi(arg);  break;\n            case 'o': e->algorithm=atoi(arg); break;\n            case 'O': parse_algo_source(arg, e->algo_source); break;\n            case 'p': e->preset=atoi(arg); break;\n            case 'P': e->trigger_phase=atoff(arg); break;\n            /* q unused */\n            case 'Q': parse_coef_message(arg, e->pan_coefs); break;\n            case 'r': parse_voices(arg, e->voices); break;\n            case 'R': e->resonance=atoff(arg); break;\n            case 's': e->pitch_bend = atoff(arg); break;\n            case 'S':\n                e->reset_osc = atoi(arg);\n                // if we're resetting all of AMY, do it now\n                if (e->reset_osc & (RESET_AMY | RESET_TIMEBASE | RESET_EVENTS | RESET_SYNTHS)) {\n                    if(e->reset_osc & RESET_AMY) {\n                        amy_stop();\n                        amy_start(amy_global.config);\n                    }\n                    // if we're resetting timebase, do it NOW\n                    if(e->reset_osc & RESET_TIMEBASE) {\n                        amy_reset_sysclock();\n                    }\n                    if(e->reset_osc & RESET_EVENTS) {\n                        amy_deltas_reset();\n                    }\n                    if(e->reset_osc & RESET_SYNTHS) {\n                        amy_reset_oscs();\n                    }\n                    AMY_UNSET(e->reset_osc);\n                }\n                break;\n            /* t used for time */\n            case 't': e->time=atol(arg); break;\n            case 'T': e->eg_type[0] = atoi(arg); break;\n            case 'u': patches_store_patch(e, arg); pos = strlen(message) - 1; break;  // patches_store_patch processes the patch as all the rest of the message and maybe sets patch.\n            /* U used by Alles for sync */\n            case 'v': e->osc=((atoi(arg)) % (AMY_OSCS+1));  break; // allow osc wraparound\n            case 'V': e->volume = atoff(arg); break;\n            case 'w': e->wave=atoi(arg); break;\n            /* W used by Tulip for CV, external_channel */\n            case 'X': e->eg_type[1] = atoi(arg); break;\n            case 'x': {\n                  float eq[3] = {AMY_UNSET_VALUE(e->eq_l), AMY_UNSET_VALUE(e->eq_m), AMY_UNSET_VALUE(e->eq_h)};\n                  parse_list_float(arg, eq, 3, AMY_UNSET_VALUE(e->eq_l));\n                  e->eq_l = eq[0];\n                  e->eq_m = eq[1];\n                  e->eq_h = eq[2];\n                }\n                break;\n            case 'z': {\n                pos += amy_parse_transfer_layer_message(arg);\n                break;\n            }\n            /* Y,y available */\n            /* Z used for end of message */\n            case 'Z':\n\t      ++pos;\n\t      goto end;\n            default:\n                break;\n            }\n        }\n        // Skip over arg, line up for the next cmd.\n        ++pos;  // move over the current command.\n        if (pos > length) fprintf(stderr, \"parse string overrun %d %d %s\\n\", pos, length, message);\n        pos += _next_alpha(message + pos);  // Skip over any non-alpha argument to the current command.\n    }\n end:\n    // Return exactly how many characters we used.\n    return pos;\n}\n\n"
  },
  {
    "path": "src/patches.c",
    "content": "// patches.c\n// baked in AMY string patches (Juno-6 & DX7 for now)\n\n#include \"amy.h\"\n#include \"patches.h\"\n\n#include <assert.h>   // for buffer overruns in sprint_event.\n\n#define _PATCHES_FIRST_USER_PATCH 1024\n\n\nuint32_t max_num_memory_patches = 0;\nstruct delta **memory_patch_deltas = NULL;\nuint16_t *memory_patch_oscs = NULL;\nuint16_t next_user_patch_index = 0;\nuint8_t * osc_to_voice = NULL;\nuint16_t *voice_to_base_osc = NULL;\n\nvoid patches_deinit() {\n    memory_patch_deltas = NULL;\n    memory_patch_oscs = NULL;\n    osc_to_voice = NULL;\n    voice_to_base_osc = NULL;\n}\n\nvoid patches_init(int max_memory_patches) {\n    max_num_memory_patches = max_memory_patches;\n    uint8_t *alloc_base = malloc_caps(\n            max_num_memory_patches * sizeof(struct delta *)\n\t    + max_num_memory_patches * sizeof(uint16_t)\n            + AMY_OSCS * sizeof(uint8_t)\n            + amy_global.config.max_voices * sizeof(uint16_t),\n\t    amy_global.config.ram_caps_synth\n    );\n    memory_patch_deltas = (struct delta **)alloc_base;\n    memory_patch_oscs = (uint16_t *)(memory_patch_deltas + max_num_memory_patches);\n    osc_to_voice = (uint8_t *)(memory_patch_oscs + max_num_memory_patches);\n    voice_to_base_osc = (uint16_t *)(osc_to_voice + AMY_OSCS);\n    bzero(memory_patch_deltas, max_num_memory_patches * sizeof(struct delta *));\n    patches_reset();\n}\n\nvoid patches_reset_patch(int patch_number) {\n    int patch_index = patch_number - _PATCHES_FIRST_USER_PATCH;\n    if (patch_index < 0 || patch_index >= (int)max_num_memory_patches) {\n        fprintf(stderr, \"reset patch number %\" PRId32 \" is out of range (%\" PRId32 \" .. %\" PRId32 \")\\n\",\n                (int32_t)(patch_index + _PATCHES_FIRST_USER_PATCH),\n                (int32_t)_PATCHES_FIRST_USER_PATCH,\n                (int32_t)(_PATCHES_FIRST_USER_PATCH + (int32_t)max_num_memory_patches));\n        return;\n    }\n    if (memory_patch_deltas[patch_index] != NULL)  delta_release_list(memory_patch_deltas[patch_index]);\n    memory_patch_deltas[patch_index] = NULL;\n    memory_patch_oscs[patch_index] = 0;\n}\n\nvoid patches_reset() {\n    for(uint32_t v = 0; v < amy_global.config.max_voices; v++) {\n        AMY_UNSET(voice_to_base_osc[v]);\n    }\n    for(uint32_t i = 0; i < AMY_OSCS; i++) {\n        AMY_UNSET(osc_to_voice[i]);\n    }\n    for(uint32_t i = 0; i < max_num_memory_patches; i++) {\n        patches_reset_patch(_PATCHES_FIRST_USER_PATCH + i);\n    }\n    next_user_patch_index = 0;\n}\n\nvoid patches_debug() {\n    for(uint8_t v = 0; v < amy_global.config.max_voices; v++) {\n        if (AMY_IS_SET(voice_to_base_osc[v]))\n            fprintf(stderr, \"voice %\" PRIu8 \" base osc %\" PRIu16 \"\\n\", v, voice_to_base_osc[v]);\n    }\n    fprintf(stderr, \"osc_to_voice:\\n\");\n    for(uint16_t i=0;i<AMY_OSCS;) {\n        uint16_t j = 0;\n        fprintf(stderr, \"%\" PRIu16 \": \", i);\n        for (j=0; j < 16; ++j) {\n            if ((i + j) >= AMY_OSCS)  break;\n            fprintf(stderr, \"%\" PRIu8 \" \", osc_to_voice[i + j]);\n        }\n        i += j;\n        fprintf(stderr, \"\\n\");\n    }\n    for(uint8_t i = 0; i < max_num_memory_patches; i++) {\n        if(memory_patch_oscs[i])\n            fprintf(stderr, \"memory_patch %\" PRIu16 \" oscs %\" PRIu16 \" #deltas %\" PRIi32 \"\\n\",\n                    (uint16_t)(i + _PATCHES_FIRST_USER_PATCH), memory_patch_oscs[i], delta_list_len(memory_patch_deltas[i]));\n    }\n    uint16_t voices[MAX_VOICES_PER_INSTRUMENT];\n    for (uint8_t i = 0; i < 32 /* MAX_INSTRUMENTS */; ++i) {\n        int num_voices = instrument_get_num_voices(i, voices);\n        if (num_voices) {\n            fprintf(stderr, \"synth %\" PRIu8 \" num_voices %\" PRId32 \" patch_num %\" PRId32 \" flags %\" PRIu32 \" voices\",\n                    i, (int32_t)num_voices, (int32_t)instrument_get_patch_number(i), instrument_get_flags(i));\n            for (int j = 0; j < num_voices; ++j)  fprintf(stderr, \" %\" PRIu16, voices[j]);\n            fprintf(stderr, \"\\n\");\n        }\n    }\n}\n\nstruct delta **queue_for_patch_number(int patch_number) {\n    int patch_index = patch_number - _PATCHES_FIRST_USER_PATCH;\n    if (patch_index < 0 || patch_index >= (int)max_num_memory_patches) {\n        fprintf(stderr, \"queue for patch number %\" PRId32 \" is out of range (%\" PRId32 \" .. %\" PRId32 \")\\n\",\n                (int32_t)(patch_index + _PATCHES_FIRST_USER_PATCH),\n                (int32_t)_PATCHES_FIRST_USER_PATCH,\n                (int32_t)(_PATCHES_FIRST_USER_PATCH + (int32_t)max_num_memory_patches));\n        return NULL;\n    }\n    return &memory_patch_deltas[patch_index];\n}\n\nvoid update_num_oscs_for_patch_number(int patch_number) {\n    int patch_index = patch_number - _PATCHES_FIRST_USER_PATCH;\n    if (patch_index < 0 || patch_index >= (int)max_num_memory_patches) {\n        fprintf(stderr, \"queue for patch number %\" PRId32 \" is out of range (%\" PRId32 \" .. %\" PRId32 \")\\n\",\n                (int32_t)(patch_index + _PATCHES_FIRST_USER_PATCH),\n                (int32_t)_PATCHES_FIRST_USER_PATCH,\n                (int32_t)(_PATCHES_FIRST_USER_PATCH + (int32_t)max_num_memory_patches));\n        return;\n    }\n    int num_oscs = 0;\n    struct delta *d = memory_patch_deltas[patch_index];\n    while(d) {\n        if (d->osc >= num_oscs)  num_oscs = d->osc + 1;\n        d = d->next;\n    }\n    memory_patch_oscs[patch_index] = num_oscs;\n}\n\nvoid all_notes_off() {\n    for(uint16_t i=0;i<AMY_OSCS;i++) {\n        if (AMY_IS_SET(osc_to_voice[i])) {\n            if(synth[i]->status == SYNTH_AUDIBLE) {\n                synth[i]->status = SYNTH_INAUDIBLE;\n            }\n        }\n    }\n}\n\nvoid add_deltas_to_queue_with_baseosc(struct delta *d, int base_osc, struct delta **queue, uint32_t time) {\n    //fprintf(stderr, \"add_deltas_to_queue_with_baseosc: added %d baseosc %d time %d\\n\", delta_list_len(d), base_osc, time);\n    struct delta d_offset;\n    while(d) {\n        d_offset = *d;\n        d_offset.osc += base_osc;\n        if (d_offset.param == CHAINED_OSC || d_offset.param == MOD_SOURCE || d_offset.param == RESET_OSC\n            || (d_offset.param >= ALGO_SOURCE_START && d_offset.param < ALGO_SOURCE_START + MAX_ALGO_OPS))\n            if (!(AMY_IS_UNSET((int16_t)d_offset.data.i) || AMY_IS_UNSET((uint16_t)d_offset.data.i)))  // CHAINED_OSC is uint16_t, but ALGO_SOURCE is int16_t.\n                d_offset.data.i += base_osc;\n        d_offset.time = time;\n        // assume the d->time is 0 and that's good.\n        add_delta_to_queue(&d_offset, &amy_global.delta_queue);\n        d = d->next;\n    }\n}\n\n#define _EPRINT_I(FIELD, NAME, WIRECODE) if (AMY_IS_SET(e->FIELD)) { sprintf(s, \"%s%\" PRId32, wirecode ? WIRECODE : \" \" NAME \": \", (int32_t)e->FIELD); s += strlen(s); }\n#define _EPRINT_F(FIELD, NAME, WIRECODE) if (AMY_IS_SET(e->FIELD)) { sprintf(s, \"%s%.3f\", wirecode ? WIRECODE : \" \" NAME \": \", e->FIELD); s += strlen(s); }\n#define _EPRINT_COEF(FIELD, NAME, WIRECODE) {            \\\n    int last_set = -1; \\\n    for (int i = 0; i < NUM_COMBO_COEFS; ++i) {    \\\n        if (AMY_IS_SET(e->FIELD[i])) last_set = i; \\\n    }                                              \\\n    if (last_set >= 0) { \\\n        sprintf(s, \"%s\", wirecode ? WIRECODE : \" \" NAME \": \");        \\\n        s += strlen(s);  \\\n        for (int i = 0; i <= last_set; ++i) { \\\n            if (i > 0) { sprintf(s, \",\"); s += strlen(s); }      \\\n            if (AMY_IS_SET(e->FIELD[i])) {        \\\n                sprintf(s, \"%.3f\", e->FIELD[i]); \\\n                s += strlen(s);  \\\n            }   \\\n        } \\\n    }     \\\n}\n#define _EPRINT_I_SEQ(FIELD, NAME, LEN, WIRECODE) {      \\\n    int last_set = -1; \\\n    for (int i = 0; i < LEN; ++i) {    \\\n        if (AMY_IS_SET(e->FIELD[i])) last_set = i; \\\n    }                                              \\\n    if (last_set >= 0) { \\\n        sprintf(s, \"%s\", wirecode ? WIRECODE : \" \" NAME \": \");       \\\n        s += strlen(s);  \\\n        for (int i = 0; i <= last_set; ++i) { \\\n            if (i > 0) { sprintf(s, \",\"); s += strlen(s); }        \\\n            if (AMY_IS_SET(e->FIELD[i])) { \\\n                sprintf(s, \"%\" PRId32, (int32_t)e->FIELD[i]); \\\n                s += strlen(s); \\\n            } \\\n        } \\\n    }     \\\n}\n\n#define _EPRINT_BP(TFIELD, VFIELD, NAME, WIRECODE) {         \\\n    int last_set = -1;                              \\\n    for (int i = 0; i < MAX_BPS; ++i) {             \\\n        if (AMY_IS_SET(e->TFIELD[i]) || AMY_IS_SET(e->VFIELD[i])) last_set = i; \\\n    }                                                \\\n    if (last_set >= 0) {                            \\\n        sprintf(s, \"%s\", wirecode ? WIRECODE : \" \" NAME \": \");        \\\n        s += strlen(s);   \\\n        for (int i = 0; i <= last_set; ++i) {       \\\n            if (i > 0) { sprintf(s, \",\"); s += strlen(s); }        \\\n            if (AMY_IS_SET(e->TFIELD[i])) {                        \\\n                sprintf(s, \"%\" PRIu32, e->TFIELD[i]); \\\n                s += strlen(s);  \\\n            }    \\\n            sprintf(s, \",\");                   \\\n            s += strlen(s);    \\\n            if (AMY_IS_SET(e->VFIELD[i])) {       \\\n                sprintf(s, \"%.3f\", e->VFIELD[i]); \\\n                s += strlen(s);  \\\n            }  \\\n        }                                            \\\n    }                                                \\\n}\n\n#define _EPRINT_VALS_5(VAL1, VAL2, VAL3, VAL4, VAL5, NAME, WIRECODE)  {      \\\n        float vals[] = {VAL1, VAL2, VAL3, VAL4, VAL5}; \\\n        int n_vals = sizeof(vals) / sizeof(float); \\\n        int last_one = -1; \\\n        for (int i = 0; i < n_vals; ++i) { \\\n            if (AMY_IS_SET(vals[i])) last_one = i; \\\n        } \\\n        if (last_one >= 0) { \\\n            sprintf(s, \"%s\", wirecode ? WIRECODE : \" \" NAME \": \"); \\\n            s += strlen(s); \\\n            for (int j = 0; j <= last_one; ++j) {  \\\n                if (AMY_IS_SET(vals[j])) { \\\n                    sprintf(s, \"%.3f\", vals[j]);   \\\n                    s += strlen(s); \\\n                } \\\n                if (j < last_one) { \\\n                    sprintf(s, \",\"); \\\n                    s += strlen(s); \\\n                } \\\n            } \\\n        } \\\n    }\n\nint sprint_event(amy_event *e, char *s, size_t len, bool wirecode) {\n    // Convert an event into a string, either human-readable or wirecode.\n    // s must be allocated.  len tells us how big it is.\n    // Return is how many chrs written to s.  Will abort if it overruns.\n    char *s_entry = s;\n    if (!wirecode) {\n        sprintf(s, \"amy_event(time=%\" PRIu32 \", osc=%\" PRIu16 \"): \", e->time, e->osc);\n        s += strlen(s);\n    } else {\n        if (AMY_IS_SET(e->time)) { sprintf(s, \"t%\" PRIu32, (int32_t)e->time); s += strlen(s); }\n        if (AMY_IS_SET(e->osc)) { sprintf(s, \"v%\" PRIu16, (int16_t)e->osc); s += strlen(s); }\n    }\n    _EPRINT_I(wave, \"wave\", \"w\");\n    _EPRINT_I(preset, \"preset\", \"p\");\n    _EPRINT_F(midi_note, \"midi_note\", \"n\");\n    _EPRINT_F(velocity, \"velocity\", \"l\");\n    _EPRINT_I(patch_number, \"patch_number\", \"K\");\n    _EPRINT_COEF(amp_coefs, \"amp_coefs\", \"a\");\n    _EPRINT_COEF(freq_coefs, \"freq_coefs\", \"f\");\n    _EPRINT_COEF(filter_freq_coefs, \"filter_freq_coefs\", \"F\");\n    _EPRINT_COEF(duty_coefs, \"duty_coefs\", \"d\");\n    _EPRINT_COEF(pan_coefs, \"pan_coefs\", \"Q\");\n    _EPRINT_F(feedback, \"feedback\", \"b\");\n    _EPRINT_F(trigger_phase, \"phase\", \"P\");\n    _EPRINT_F(volume, \"volume\", \"V\");  // NOT osc-dep\n    _EPRINT_F(pitch_bend, \"pitch_bend\", \"s\");  // NOT osc-dep\n    _EPRINT_F(tempo, \"tempo\", \"j\");  // NOT osc-dep\n    _EPRINT_I(latency_ms, \"latency_ms\", \"N\");  // NOT osc-dep\n    _EPRINT_F(ratio, \"ratio\", \"I\");\n    _EPRINT_F(resonance, \"resonance\", \"R\");\n    _EPRINT_I(portamento_ms, \"portamento_ms\", \"m\");\n    _EPRINT_I(chained_osc, \"chained_osc\", \"c\");\n    _EPRINT_I(mod_source, \"mod_source\", \"L\");\n    _EPRINT_I(algorithm, \"algorithm\", \"o\");\n    _EPRINT_I(filter_type, \"filter_type\", \"G\");\n    _EPRINT_I_SEQ(bp_is_set, \"bp_is_set\", MAX_BREAKPOINT_SETS, \"??\");\n    // Convert these two at least to vectors of ints, save several hundred bytes\n    _EPRINT_I_SEQ(algo_source, \"algo_source\", MAX_ALGO_OPS, \"O\");\n    _EPRINT_I_SEQ(voices, \"voices\", MAX_VOICES_PER_INSTRUMENT, \"r\");\n    _EPRINT_BP(eg0_times, eg0_values, \"eg0\", \"A\");\n    _EPRINT_BP(eg1_times, eg1_values, \"eg1\", \"B\");\n    _EPRINT_I(eg_type[0], \"eg_type[0]\", \"T\");\n    _EPRINT_I(eg_type[1], \"eg_type[1]\", \"X\");\n    // Instrument-layer values.\n    _EPRINT_I(synth, \"synth\", \"i\");\n    _EPRINT_I(synth_flags, \"synth_flags\", \"if\");  // Special flags to set when defining instruments.\n    _EPRINT_I(synth_delay_ms, \"synth_delay_ms\", \"id\");  // Extra delay added to synth note-ons to allow decay on voice-stealing.\n    _EPRINT_I(to_synth, \"to_synth\", \"it\");  // For moving setup between synth numbers.\n    _EPRINT_I(grab_midi_notes, \"grab_midi_notes\", \"im\");  // To enable/disable automatic MIDI note-on/off generating note-on/off.\n    _EPRINT_I(pedal, \"pedal\", \"ip\");  // MIDI pedal value.\n    _EPRINT_I(num_voices, \"num_voices\", \"iv\");\n    _EPRINT_I(oscs_per_voice, \"oscs_per_voice\", \"in\");\n    _EPRINT_I_SEQ(sequence, \"sequence\", 3, \"H\"); // tick, period, tag\n    //\n    //_EPRINT_I(status, \"status\");\n    _EPRINT_I(note_source, \"note_source\", \"??\");  // .. to mark note on/offs that come from MIDI so we don't send them back out again.\n    _EPRINT_I(reset_osc, \"reset_osc\", \"S\");\n    // Global effects\n    _EPRINT_VALS_5(e->eq_l, e->eq_m, e->eq_h, AMY_UNSET_FLOAT, AMY_UNSET_FLOAT, \"eq_{l,m,h}\", \"x\");\n    _EPRINT_VALS_5(e->echo_level, e->echo_delay_ms, e->echo_max_delay_ms, e->echo_feedback, e->echo_filter_coef, \"echo_{level,delay,max,fb,filt}\", \"M\");\n    _EPRINT_VALS_5(e->chorus_level, e->chorus_max_delay, e->chorus_lfo_freq, e->chorus_depth, AMY_UNSET_FLOAT, \"chorus_{level,delay,lfo,depth}\", \"k\");\n    _EPRINT_VALS_5(e->reverb_level, e->reverb_liveness, e->reverb_damping, e->reverb_xover_hz, AMY_UNSET_FLOAT, \"reverb_{level,live,damp,xover}\", \"h\");\n\n    if (wirecode && (s - s_entry) > 0) { sprintf(s, \"Z\"); s += strlen(s); }\n\n    assert( ((size_t)(s - s_entry)) < len);  // if we corrupted memory, at least we'll abort.\n    return s - s_entry;\n}\n\n\n#define _CASE_I(FIELD, PARAM) case PARAM: event->FIELD = queue->data.i; break;\n#define _CASE_F(FIELD, PARAM) case PARAM: event->FIELD = queue->data.f; break;\n#define _CASE_LOG(FIELD, PARAM) case PARAM: event->FIELD = exp2f(queue->data.f); break;\n#define _TEST_COEFS(FIELD, PARAM)  \\\n    for (int i = 0; i < NUM_COMBO_COEFS; ++i) {                          \\\n        if ((int)queue->param == (int)PARAM + i) event->FIELD[i] = queue->data.f; \\\n    } \\\n// Const freq coef is in Hz, rest are linear.\n#define _TEST_FREQ_COEFS(FIELD, PARAM) \\\n    for (int i = 0; i < NUM_COMBO_COEFS; ++i) {      \\\n        if ((int)queue->param == (int)PARAM + i) {   \\\n            if (i == COEF_CONST)  \\\n                event->FIELD[i] = freq_of_logfreq(queue->data.f);   \\\n            else \\\n                event->FIELD[i] = queue->data.f; \\\n        }                                    \\\n    }\n\nstruct delta *deltas_to_event(struct delta *queue, struct amy_event *event) {\n  // Consume deltas from queue and push into event.  Return pointer to first non-consumed delta.\n  if (queue == NULL) return NULL;\n  event->osc = queue->osc;\n  event->time = queue->time;\n  uint32_t breakpoint_times[MAX_BREAKPOINT_SETS][MAX_BREAKPOINTS];\n  float breakpoint_values[MAX_BREAKPOINT_SETS][MAX_BREAKPOINTS];\n  for (int i = 0; i < MAX_BREAKPOINT_SETS; ++i) {\n      for (int j = 0; j < MAX_BREAKPOINTS; ++j) {\n          AMY_UNSET(breakpoint_times[i][j]);\n          AMY_UNSET(breakpoint_values[i][j]);\n      }\n  }\n  int highest_breakpoint[MAX_BREAKPOINT_SETS] = {-1, -1};\n  while(queue != NULL) {\n    if (queue->osc != event->osc || queue->time != event->time)  break;  // delta doesn't fit this event.\n    switch (queue->param) {\n      _CASE_I(wave, WAVE)\n      _CASE_I(preset, PRESET)\n      _CASE_F(midi_note, MIDI_NOTE)\n      _CASE_F(feedback, FEEDBACK)\n      _CASE_F(trigger_phase, PHASE)\n      _CASE_F(volume, VOLUME)\n      _CASE_F(pitch_bend, PITCH_BEND)\n      _CASE_I(latency_ms, LATENCY)\n      _CASE_F(tempo, TEMPO)\n      _CASE_LOG(ratio, RATIO)\n      _CASE_F(resonance, RESONANCE)\n      _CASE_I(portamento_ms, PORTAMENTO)\n      _CASE_I(chained_osc, CHAINED_OSC)\n      _CASE_I(reset_osc, RESET_OSC)\n      _CASE_I(mod_source, MOD_SOURCE)\n      _CASE_I(note_source, NOTE_SOURCE)\n      _CASE_I(filter_type, FILTER_TYPE)\n      _CASE_I(algorithm, ALGORITHM)\n      _CASE_F(eq_l, EQ_L)\n      _CASE_F(eq_m, EQ_M)\n      _CASE_F(eq_h, EQ_H)\n      _CASE_F(echo_max_delay_ms, ECHO_MAX_DELAY_MS)\n      _CASE_F(echo_level, ECHO_LEVEL)\n      _CASE_F(echo_delay_ms, ECHO_DELAY_MS)\n      _CASE_F(echo_feedback, ECHO_FEEDBACK)\n      _CASE_F(echo_filter_coef, ECHO_FILTER_COEF)\n      _CASE_F(chorus_max_delay, CHORUS_MAX_DELAY)\n      _CASE_F(chorus_level, CHORUS_LEVEL)\n      _CASE_F(chorus_lfo_freq, CHORUS_LFO_FREQ)\n      _CASE_F(chorus_depth, CHORUS_DEPTH)\n      _CASE_F(reverb_level, REVERB_LEVEL)\n      _CASE_F(reverb_liveness, REVERB_LIVENESS)\n      _CASE_F(reverb_damping, REVERB_DAMPING)\n      _CASE_F(reverb_xover_hz, REVERB_XOVER_HZ)\n      _CASE_I(eg_type[0], EG0_TYPE)\n      _CASE_I(eg_type[1], EG1_TYPE)\n      _CASE_F(velocity, VELOCITY)\n    default:  // blocks, not handled by case\n      _TEST_COEFS(amp_coefs, AMP)\n      _TEST_FREQ_COEFS(freq_coefs, FREQ)\n      _TEST_FREQ_COEFS(filter_freq_coefs, FILTER_FREQ)\n      _TEST_COEFS(duty_coefs, DUTY)\n      _TEST_COEFS(pan_coefs, PAN)\n      for (int i = 0; i < MAX_ALGO_OPS; ++i) {\n          if ((int)queue->param == (int)ALGO_SOURCE_START + i)\n              event->algo_source[i] = queue->data.i;\n      }\n      for (int i = 0; i < MAX_BREAKPOINT_SETS; ++i) {\n          for (int j = 0; j < MAX_BREAKPOINTS; ++j) {\n              if ((int)queue->param == (int)BP_START + (j * 2) + (i * MAX_BREAKPOINTS * 2)) {\n                  //event->bp[i].time[j] = queue->data.i;\n                  breakpoint_times[i][j] = queue->data.i;\n                  if (j > highest_breakpoint[i]) highest_breakpoint[i] = j;\n              }\n              else if ((int)queue->param == (int)BP_START + (j * 2 + 1) + (i * MAX_BREAKPOINTS * 2)) {\n                  //event->bp[i].value[j] = queue->data.f;\n                  breakpoint_values[i][j] = queue->data.f;\n                  if (j > highest_breakpoint[i]) highest_breakpoint[i] = j;\n              }\n          }\n      }\n      break;\n    }\n    queue = queue->next;\n  }\n  uint32_t *bp_times_ms[MAX_BREAKPOINT_SETS] = {event->eg0_times, event->eg1_times};\n  float *bp_values[MAX_BREAKPOINT_SETS] = {event->eg0_values, event->eg1_values};\n  for (int i = 0; i < MAX_BREAKPOINT_SETS; ++i) {\n      if (highest_breakpoint[i] >= 0) {\n          event->bp_is_set[i] = 1;\n          for (int j = 0; j <= highest_breakpoint[i]; ++j) {\n              if (AMY_IS_SET(breakpoint_times[i][j])) {\n                  float t_ms = ((float)breakpoint_times[i][j]) * 1000.0f / (float)AMY_SAMPLE_RATE;\n                  int32_t t_rounded = (int32_t)roundf(t_ms);\n                  if (t_rounded < 0) t_rounded = 0;\n                  if (t_rounded >= SHRT_MAX) t_rounded = SHRT_MAX - 1;\n                  bp_times_ms[i][j] = (int16_t)t_rounded;\n              }\n              if (AMY_IS_SET(breakpoint_values[i][j])) {\n                  bp_values[i][j] = breakpoint_values[i][j];\n              }\n          }\n      }\n  }\n  return queue;\n}\n\nvoid parse_patch_string_to_queue(char *message, int base_osc, struct delta **queue, uint32_t time);\n\nvoid *yield_patch_events(uint16_t patch_number, struct amy_event *event, void *state) {\n    // Return a sequence of events defining a patch (specified by number).\n    // state = NULL on first call and it returns state to be passed on next call.  Returns NULL when event sequence is finished.\n    amy_clear_event(event);\n    struct delta *queue = (struct delta *)state;\n    if (queue == NULL) {\n      // First call, initialize deltas queue.\n      if (patch_number < _PATCHES_FIRST_USER_PATCH) {\n\t// This grabs a new set of deltas from the pool, when are they returned?\n\tparse_patch_string_to_queue((char *)patch_commands[patch_number], 0, &queue, 0);\n      } else {\n\t  int32_t patch_index = patch_number - _PATCHES_FIRST_USER_PATCH;\n\t  if (patch_index < 0 || patch_index >= (int32_t)max_num_memory_patches) {\n\t\t      fprintf(stderr, \"patch_number %\" PRIu16 \" is out of range (%\" PRId32 \" .. %\" PRId32 \")\\n\",\n\t\t\t      patch_number, (int32_t)_PATCHES_FIRST_USER_PATCH,\n\t\t\t      (int32_t)(_PATCHES_FIRST_USER_PATCH + (int32_t)max_num_memory_patches));\n\t      return NULL;\n\t  }\n\t  queue = memory_patch_deltas[patch_index];\n      }\n    }\n    struct delta *queue_on_entry = queue;\n    /* Loop down the queue emitting events as needed. */\n    queue = deltas_to_event(queue, event);\n\n    if (patch_number < _PATCHES_FIRST_USER_PATCH) {\n      // We allocated this queue, take care of releasing deltas we're finished with.\n      while (queue_on_entry != queue) {\n\tstruct delta *doomed = queue_on_entry;\n\tqueue_on_entry = doomed->next;\n\tdelta_release(doomed);\n      }\n    }\n\n    return (void *)queue;\n}\n\n#define EVENT_FROM_OSC(FIELD)  \\\n    if (synth[osc]->FIELD != empty_synth.FIELD)  \\\n        event->FIELD = synth[osc]->FIELD;\n\n#define EVENT_FROM_OSC_BASEOSC(FIELD)  \\\n    if (synth[osc]->FIELD != empty_synth.FIELD)  \\\n        event->FIELD = synth[osc]->FIELD - base_osc;\n\n#define EVENT_FROM_OSC_MAPPED(SYNTH_FIELD, EVENT_FIELD, MAP_FN)        \\\n    if (synth[osc]->SYNTH_FIELD != empty_synth.SYNTH_FIELD)            \\\n        event->EVENT_FIELD = MAP_FN(synth[osc]->SYNTH_FIELD);\n\n#define EVENT_FROM_OSC_ARRAY(FIELD, NUM_ELS)                           \\\n    for (int i = 0; i < NUM_ELS; ++i) {                                \\\n        if (synth[osc]->FIELD[i] != empty_synth.FIELD[i])              \\\n            event->FIELD[i] = synth[osc]->FIELD[i];                    \\\n    }\n\n#define EVENT_FROM_OSC_ARRAY_BASEOSC(FIELD, NUM_ELS)                   \\\n    for (int i = 0; i < NUM_ELS; ++i) {                                \\\n        if (synth[osc]->FIELD[i] != empty_synth.FIELD[i])              \\\n            event->FIELD[i] = synth[osc]->FIELD[i] - base_osc;          \\\n    }\n\n#define EVENT_FROM_OSC_ARRAY2(SYNTH_FIELD, EVENT_FIELD, NUM_ELS)       \\\n    for (int i = 0; i < NUM_ELS; ++i) {                                \\\n        if (synth[osc]->SYNTH_FIELD[i] != empty_synth.SYNTH_FIELD[i])  \\\n            event->EVENT_FIELD[i] = synth[osc]->SYNTH_FIELD[i];        \\\n    }\n\n#define EVENT_FROM_OSC_ARRAY_T(SYNTH_FIELD, EVENT_FIELD, NUM_ELS)      \\\n    for (int i = 0; i < NUM_ELS; ++i) {                                \\\n        if (synth[osc]->SYNTH_FIELD[i] != empty_synth.SYNTH_FIELD[i])  \\\n            event->EVENT_FIELD[i] = lroundf(((float)synth[osc]->SYNTH_FIELD[i]) / (AMY_SAMPLE_RATE / 1000.0f)); \\\n    }\n\n#define EVENT_FROM_OSC_ARRAY_FREQ(SYNTH_FIELD, EVENT_FIELD, NUM_ELS)      \\\n    for (int i = 0; i < NUM_ELS; ++i) {                                   \\\n        if (synth[osc]->SYNTH_FIELD[i] != empty_synth.SYNTH_FIELD[i]) {   \\\n            if (i == COEF_CONST)                                          \\\n                event->EVENT_FIELD[i] = freq_of_logfreq(synth[osc]->SYNTH_FIELD[i]); \\\n            else                                                          \\\n                event->EVENT_FIELD[i] = synth[osc]->SYNTH_FIELD[i];       \\\n        }                                                                 \\\n    }\n\nvoid set_event_for_osc(int base_osc, int rel_osc, struct amy_event *event) {\n    // Set fields in the event to configure the osc away from default.\n    // We assume event has already been cleared.\n    // We do not set the osc field of the event.\n    int osc = base_osc + rel_osc;\n    // Generate the reference \"empty synth\".\n    struct synthinfo empty_synth;\n    // We need to have space for the breakpoints.\n    uint32_t times[MAX_BREAKPOINT_SETS * MAX_BREAKPOINTS];\n    float values[MAX_BREAKPOINT_SETS * MAX_BREAKPOINTS];\n    for (int i = 0; i < MAX_BREAKPOINT_SETS; ++i) {\n        empty_synth.max_num_breakpoints[i] = synth[osc]->max_num_breakpoints[i];\n        empty_synth.breakpoint_times[i] = times + i * MAX_BREAKPOINTS;\n        empty_synth.breakpoint_values[i] = values + i * MAX_BREAKPOINTS;\n    }\n    reset_osc_by_pointer(&empty_synth, /* msynth */ NULL);\n    // Go through parameter fields picking out the ones that are nondefault.\n    EVENT_FROM_OSC(wave);\n    EVENT_FROM_OSC(preset);\n    // Note and velocity are special for \"note on\" events, don't reflect them in config.\n    //EVENT_FROM_OSC(midi_note);\n    //EVENT_FROM_OSC(velocity);\n    EVENT_FROM_OSC_ARRAY(amp_coefs, NUM_COMBO_COEFS);\n    EVENT_FROM_OSC_ARRAY_FREQ(logfreq_coefs, freq_coefs, NUM_COMBO_COEFS);\n    EVENT_FROM_OSC_ARRAY_FREQ(filter_logfreq_coefs, filter_freq_coefs, NUM_COMBO_COEFS);\n    EVENT_FROM_OSC_ARRAY(duty_coefs, NUM_COMBO_COEFS);\n    EVENT_FROM_OSC_ARRAY(pan_coefs, NUM_COMBO_COEFS);\n    EVENT_FROM_OSC(feedback);\n    EVENT_FROM_OSC(trigger_phase);\n    EVENT_FROM_OSC_MAPPED(logratio, ratio, exp2f);\n    EVENT_FROM_OSC(resonance);\n    EVENT_FROM_OSC_MAPPED(portamento_alpha, portamento_ms, alpha_to_portamento_ms);\n    EVENT_FROM_OSC_BASEOSC(chained_osc);\n    EVENT_FROM_OSC_BASEOSC(mod_source);\n    EVENT_FROM_OSC(algorithm);\n    EVENT_FROM_OSC(filter_type);\n    EVENT_FROM_OSC_ARRAY_BASEOSC(algo_source, MAX_ALGO_OPS);\n    EVENT_FROM_OSC_ARRAY_T(breakpoint_times[0], eg0_times, synth[osc]->max_num_breakpoints[0]);\n    EVENT_FROM_OSC_ARRAY2(breakpoint_values[0], eg0_values, synth[osc]->max_num_breakpoints[0]);\n    EVENT_FROM_OSC_ARRAY_T(breakpoint_times[1], eg1_times, synth[osc]->max_num_breakpoints[1]);\n    EVENT_FROM_OSC_ARRAY2(breakpoint_values[1], eg1_values, synth[osc]->max_num_breakpoints[1]);\n    EVENT_FROM_OSC_ARRAY(eg_type, MAX_BREAKPOINT_SETS);\n}\n\nfloat lin_to_db(float lin) {\n    return 20.0f * log10f(lin);\n}\n\nvoid set_event_for_global_fx(amy_event *event, struct state *state) {\n    // Always emit all FX fields so saved patches are fully self-describing.\n    // Volume\n    event->volume = state->volume;\n    // EQ\n    event->eq_l = lin_to_db(S2F(state->eq[0]));\n    event->eq_m = lin_to_db(S2F(state->eq[1]));\n    event->eq_h = lin_to_db(S2F(state->eq[2]));\n    // Reverb\n    event->reverb_level = S2F(state->reverb.level);\n    event->reverb_liveness = state->reverb.liveness;\n    event->reverb_damping = state->reverb.damping;\n    event->reverb_xover_hz = state->reverb.xover_hz;\n    // Chorus\n    event->chorus_level = S2F(state->chorus.level);\n    event->chorus_max_delay = state->chorus.max_delay;\n    event->chorus_lfo_freq = state->chorus.lfo_freq;\n    event->chorus_depth = state->chorus.depth;\n    // Echo\n    event->echo_level = S2F(state->echo.level);\n    event->echo_delay_ms = state->echo.delay_samples * 1000.f / AMY_SAMPLE_RATE;\n    if (state->echo.max_delay_samples != 65536)\n        event->echo_max_delay_ms = state->echo.max_delay_samples * 1000.f / AMY_SAMPLE_RATE;\n    event->echo_feedback = S2F(state->echo.feedback);\n    event->echo_filter_coef = S2F(state->echo.filter_coef);\n}\n\n\nvoid *yield_synth_events(uint8_t synth, struct amy_event *event, bool include_fx, void *state) {\n    // Return a sequence of events defining a synth.\n    // state = NULL on first call and it returns state to be passed on next call.  Returns NULL when event sequence is finished.\n   // Find oscs for synth.\n    uint16_t voices[MAX_VOICES_PER_INSTRUMENT];\n    int num_voices = instrument_get_num_voices(synth, voices);\n    if (num_voices < 1) {\n        fprintf(stderr, \"yield_synth_events: synth %\" PRId32\" has no voices.\\n\", (int32_t)synth);\n        return NULL;  // instrument not allocated.\n    }\n    uint32_t flags = instrument_get_flags(synth);\n    uint16_t voice = voices[0];\n    uint16_t base_osc = voice_to_base_osc[voice];\n    int num_oscs = 0;\n    while(osc_to_voice[base_osc + num_oscs] == voice) ++num_oscs;\n    // The \"state\" indicates which osc within the voice we're going to report for.\n    int state_val = (intptr_t)state;\n    //fprintf(stderr, \"yield_synth_events(%d) voice=%d num_oscs=%d state_val=%d\\n\", synth, voice, num_oscs, (int)state_val);\n    amy_clear_event(event);\n    int first_osc_state_val = 0;\n    int last_osc_state_val = num_oscs;\n    if (flags != 0) {\n        ++first_osc_state_val;\n        ++last_osc_state_val;\n        if (state_val == 0) {\n            event->synth_flags = flags;\n        }\n    }\n    if (state_val >= first_osc_state_val && state_val < last_osc_state_val) {\n        event->osc = state_val - first_osc_state_val;\n        //fprintf(stderr, \"2 base_osc %d, event->osc %d, state_val %d first_osc_state_val %d last_osc_state_val %d\\n\",\n        //    base_osc, event->osc, state_val, first_osc_state_val, last_osc_state_val);\n        set_event_for_osc(base_osc, event->osc, event);\n    } else if (include_fx && (state_val == last_osc_state_val)) {\n        // optional final event contains the global settings (volume, eq, chorus, echo, reverb).\n        set_event_for_global_fx(event, &amy_global);\n    }\n    ++state_val;\n    if (state_val == last_osc_state_val + (include_fx ? 1 : 0))  state_val = 0;  // Indicate this is the final event.\n    return (void *)((intptr_t)state_val);\n}\n\n#define STATE_START_OF_MIDI 1024\nvoid *yield_synth_commands(uint8_t synth, char *s, size_t len, bool include_fx, void *state) {\n    // Generator to return multiple wirecode strings to reconfigure a synth.\n    int state_val = (intptr_t)state;\n    //fprintf(stderr, \"yield_synth_commands: synth %d state %d\\n\", synth, state_val);\n    s[0] = '\\0';  // By default, return an empty string.\n    if (state_val < STATE_START_OF_MIDI) {\n        amy_event event = amy_default_event();\n        state_val = (intptr_t)yield_synth_events(synth, &event, include_fx, (void *)(intptr_t)state_val);\n        sprint_event(&event, s, len, /* wirecode= */ true);\n        if (state_val == 0) {\n            // Push the state machine on to the MIDI codes\n            state_val = STATE_START_OF_MIDI;\n        }\n    } else {\n        // MIDI CC part\n        bool found = false;\n        for (int next_midi_code = state_val - STATE_START_OF_MIDI; next_midi_code < 128; ++next_midi_code) {\n            if (midi_fetch_control_code_command(synth, next_midi_code, s, len) == true) {\n                state_val = STATE_START_OF_MIDI + next_midi_code + 1;\n                found = true;\n                break;\n            }\n        }\n        if (found == false) {\n            // We hit the bottom of the MIDI CCs\n            state_val = 0;  // Will terminate the yield cycle.\n        }\n    }\n    return (void *)(intptr_t)state_val;\n}\n\n\nvoid parse_patch_string_to_queue(char *message, int base_osc, struct delta **queue, uint32_t time) {\n    // Work though the patch string and send to voices.\n    // Now actually initialize the newly-allocated osc blocks with the patch\n    uint16_t start = 0;\n    //fprintf(stderr, \"parse_patch_string: message %s\\n\", message);\n    while(strlen(message + start)) {\n      amy_event patch_event = amy_default_event();\n      int num_used = amy_parse_message(message + start, strlen(message + start), &patch_event);\n      //{\n      //  char sub_message[256];\n      //  strncpy(sub_message, message + start, num_used);\n      //  sub_message[num_used]= 0;\n      //  fprintf(stderr, \"parse_patch_string: sub_message %s\\n\", sub_message);\n      //}\n      start += num_used;\n      amy_process_event(&patch_event);\n      patch_event.time = time;\n      if(patch_event.status == EVENT_SCHEDULED) {\n\tamy_event_to_deltas_queue(&patch_event, base_osc, queue);\n      }\n    }\n}\n\n// So emscripten knows how big to make this struct.\nint size_of_amy_event(void) {\n    return sizeof(amy_event);\n}\n\nvoid patches_store_patch(amy_event *e, char * patch_string) {\n    peek_stack(\"store_patch\");\n    // amy patch string. Either pull patch_number from e, or allocate a new one and write it to e.\n    // Patch is stored in ram.\n    //fprintf(stderr, \"store_patch: synth %d patch_num %d patch '%s'\\n\", e->synth, e->patch, patch_string);\n    if (!AMY_IS_SET(e->patch_number)) {\n        // We need to allocate a new number.\n        e->patch_number = next_user_patch_index + _PATCHES_FIRST_USER_PATCH;\n        // next_user_patch_index is updated as needed at the bottom of the function (so it can reflect user-defined numbers too).\n        //fprintf(stderr, \"store_patch: auto-assigning patch number %d for '%s'\\n\", e->patch_number, patch_string);\n    }\n    int patch_index = (int)e->patch_number - _PATCHES_FIRST_USER_PATCH;\n    if (patch_index < 0 || patch_index >= (int)max_num_memory_patches) {\n        fprintf(stderr, \"patch number %\" PRId32 \" is out of range (%\" PRId32 \" .. %\" PRId32 \")\\n\",\n                (int32_t)(patch_index + _PATCHES_FIRST_USER_PATCH),\n                (int32_t)_PATCHES_FIRST_USER_PATCH,\n                (int32_t)(_PATCHES_FIRST_USER_PATCH + (int32_t)max_num_memory_patches));\n        return;\n    }\n    if (patch_index >= next_user_patch_index)  next_user_patch_index = patch_index + 1;\n    // Store the patch as deltas and  find out how many oscs this message uses\n    parse_patch_string_to_queue(patch_string, 0, &memory_patch_deltas[patch_index], e->time);\n    update_num_oscs_for_patch_number(patch_index + _PATCHES_FIRST_USER_PATCH);\n    //fprintf(stderr, \"store_patch: patch %d max_osc %d patch %s #deltas %d (e->num_vx=%d)\\n\", patch_index, max_osc, patch_string, delta_list_len(memory_patch_deltas[patch_index]), e->num_voices);\n}\n\nextern int32_t parse_list_uint16_t(char *message, uint16_t *vals, int32_t max_num_vals, uint16_t skipped_val);\n\n\n// This code was originally in midi.c, but putting it here allows endogenous use of MIDI drums.\n// Drum kit - copied from tulip/shared/py/patches.py\n// Drumkit is [base_midi_note, name, general_midi_note]\n\nstruct pcm_sample_info {\n    int8_t pcm_preset_number;\n    int8_t base_midi_note;\n};\n\n#define AMY_MIDI_DRUMS_LOWEST_NOTE 35\n#define AMY_MIDI_DRUMS_HIGHEST_NOTE 81\n\n// drumkit[midi_note - AMY_MIDI_DRUMS_LOWEST_NOTE] == {pcm_patch_number, base_midi_note}\n\n// PCM presets available (from pcm_tiny.h):\n//  [0]  808-MARACA    root=89\n//  [1]  808-KIK 4     root=39\n//  [2]  808-SNR 4     root=45\n//  [3]  808-SNR 7     root=52\n//  [4]  808-SNR 10    root=51\n//  [5]  808-SNR 12    root=41\n//  [6]  808-C-HAT1    root=53\n//  [7]  808-O-HAT1    root=56\n//  [8]  808-LTOM M    root=61\n//  [9]  808-DRYCLP    root=94\n//  [10] 808-CWBELL    root=69\nstruct pcm_sample_info drumkit[AMY_MIDI_DRUMS_HIGHEST_NOTE - AMY_MIDI_DRUMS_LOWEST_NOTE + 1] = {\n    {1, 39},   // 35 Acoustic Bass Drum -> 808-KIK\n    {1, 39},   // 36 Bass Drum 1        -> 808-KIK\n    {4, 51},   // 37 Side Stick         -> 808-SNR 10 (rimshot-like)\n    {2, 45},   // 38 Acoustic Snare     -> 808-SNR 4\n    {9, 94},   // 39 Hand Clap          -> 808-DRYCLP\n    {5, 41},   // 40 Electric Snare     -> 808-SNR 12\n    {8, 56},   // 41 Low Floor Tom      -> 808-LTOM (pitched down)\n    {6, 53},   // 42 Closed Hi Hat      -> 808-C-HAT1\n    {8, 61},   // 43 High Floor Tom     -> 808-LTOM (root)\n    {7, 61},   // 44 Pedal Hi-Hat       -> 808-O-HAT1 (short)\n    {8, 56},   // 45 Low Tom            -> 808-LTOM (pitched down)\n    {7, 56},   // 46 Open Hi-Hat        -> 808-O-HAT1\n    {8, 63},   // 47 Low-Mid Tom        -> 808-LTOM (slightly up)\n    {8, 68},   // 48 Hi Mid Tom         -> 808-LTOM (pitched up)\n    {7, 46},   // 49 Crash Cymbal 1     -> 808-O-HAT1 (pitched down for wash)\n    {8, 73},   // 50 High Tom           -> 808-LTOM (pitched up high)\n    {7, 51},   // 51 Ride Cymbal 1      -> 808-O-HAT1 (pitched down)\n    {7, 48},   // 52 Chinese Cymbal     -> 808-O-HAT1 (pitched down)\n    {6, 47},   // 53 Ride Bell          -> 808-C-HAT1 (pitched down, bell-like)\n    {0, 79},   // 54 Tambourine         -> 808-MARACA (pitched down)\n    {7, 46},   // 55 Splash Cymbal      -> 808-O-HAT1 (pitched down)\n    {10, 69},  // 56 Cowbell            -> 808-CWBELL\n    {7, 48},   // 57 Crash Cymbal 2     -> 808-O-HAT1 (pitched down)\n    {-1, -1},  // 58 Vibraslap\n    {7, 53},   // 59 Ride Cymbal 2      -> 808-O-HAT1 (pitched down)\n    {-1, -1},  // 60 Hi Bongo\n    {-1, -1},  // 61 Low Bongo\n    {-1, -1},  // 62 Mute Hi Conga\n    {-1, -1},  // 63 Open Hi Conga\n    {-1, -1},  // 64 Low Conga\n    {8, 73},   // 65 High Timbale       -> 808-LTOM (pitched up)\n    {8, 63},   // 66 Low Timbale        -> 808-LTOM (slightly up)\n    {10, 76},  // 67 High Agogo         -> 808-CWBELL (pitched up)\n    {10, 64},  // 68 Low Agogo          -> 808-CWBELL (pitched down)\n    {0, 79},   // 69 Cabasa             -> 808-MARACA (pitched down)\n    {0, 89},   // 70 Maracas            -> 808-MARACA (root)\n    {-1, -1},  // 71 Short Whistle\n    {-1, -1},  // 72 Long Whistle\n    {-1, -1},  // 73 Short Guiro\n    {-1, -1},  // 74 Long Guiro\n    {-1, -1},  // 75 Claves\n    {10, 76},  // 76 Hi Wood Block      -> 808-CWBELL (pitched up)\n    {10, 64},  // 77 Low Wood Block     -> 808-CWBELL (pitched down)\n    {-1, -1},  // 78 Mute Cuica\n    {-1, -1},  // 79 Open Cuica\n    {-1, -1},  // 80 Mute Triangle\n    {-1, -1},  // 81 Open Triangle\n};\n\n\nbool setup_drum_event(amy_event *e, uint8_t note) {\n  // Special-case processing to convert MIDI drum notes into PCM patch events.\n  bool forward_note = false;\n  if (note >= AMY_MIDI_DRUMS_LOWEST_NOTE && note <= AMY_MIDI_DRUMS_HIGHEST_NOTE) {\n      struct pcm_sample_info s = drumkit[note - AMY_MIDI_DRUMS_LOWEST_NOTE];\n      if (s.pcm_preset_number != -1) {\n          e->wave = PCM;\n          e->preset = s.pcm_preset_number;\n          e->midi_note = s.base_midi_note;\n          forward_note = true;\n      }\n  }\n  return forward_note;\n}\n\nint copy_voices(uint16_t *from, uint16_t *to) {\n    // Copy voice vectors up until first unset; return how many copied.\n    int num_voices = 0;\n    for (int i = 0; i < MAX_VOICES_PER_INSTRUMENT; ++i) {\n        if (AMY_IS_SET(from[i])) {\n            to[num_voices] = from[i];\n            ++num_voices;\n        } else {\n            break;\n        }\n    }\n    return num_voices;\n}\n\n\nuint8_t patches_voices_for_note_onoff_event(amy_event *e, uint16_t voices[], uint32_t synth_flags, bool *pstolen) {\n    // Identify the specific voice (or voices) for a note on/off event.\n    // e->velocity is assumed to be set when this function is called.\n    int num_voices = 0;\n    if (AMY_IS_UNSET(e->midi_note) && AMY_IS_UNSET(e->preset) && instrument_get_num_voices(e->synth, NULL) != 1) {\n        // velocity without midi_note is valid for velocity==0 => all-notes-off.\n        if (e->velocity != 0) {\n            // Attempted a note-on to all voices, suppress.\n            fprintf(stderr, \"note-on with no note for synth %\" PRId32 \" - ignored.\\n\", (int32_t)e->synth);\n            return 0;\n        }\n        // All notes off - find out which voices are actually currently active, so we can turn them off.\n        num_voices = instrument_all_notes_off(e->synth, voices);\n    } else {\n        // It's a note-on or note-off event, so the instrument mechanism chooses which single voice to use.\n        uint16_t note = 0;\n        if (AMY_IS_SET(e->midi_note))  // midi note can be unset if preset is set.\n            note = (uint8_t)roundf(e->midi_note);\n        if (synth_flags & _SYNTH_FLAGS_MIDI_DRUMS) {\n            if (!setup_drum_event(e, note))\n                return 0;   // It's not a MIDI drum event we can emulate, just drop the event.\n        }\n        if (AMY_IS_SET(e->preset)) {\n            // This event includes a note *and* a preset, so it's like a drum sample note on.\n            // Wrap the preset number into the note, so we don't allocate the same pitch for different drums to the same voice.\n            note += 128 * e->preset;\n        }\n        bool is_note_off = (e->velocity == 0);\n        voices[0] = instrument_voice_for_note_event(e->synth, note, is_note_off, pstolen);\n        if (voices[0] == _INSTRUMENT_NO_VOICE) {\n            // For now, I think this can only happen with a note-off that has no matching note-on.\n            //fprintf(stderr, \"synth %d did not find a voice, dropping message.\\n\", e->synth);\n            // No, it also happens with note-offs when pedal is down.\n            return 0;\n        }\n        num_voices = 1;\n    }\n    //fprintf(stderr, \"instrument %d vel %d note %d voice %d\\n\", e->synth, (int)roundf(127.f * e->velocity), (int)roundf(e->midi_note), voices[0]);\n    return num_voices;\n}\n\n\nuint8_t patches_voices_for_event(amy_event *e, uint16_t voices[]) {\n    // Convert an event that may specify a synth into a number of specific voices.\n    uint8_t num_voices = 0;\n    uint32_t synth_flags = 0;\n    if (!AMY_IS_SET(e->synth)) {\n        // No instrument, just directly naming the voices.\n        num_voices = copy_voices(e->voices, voices);\n    } else {  // We have an instrument specified - decide which of its voices are actually to be used.\n        // It's a mistake to specify both synth (instrument) and voices, warn user we're ignoring voices.\n        // (except in the afterlife of a load_patch event, which will most likely be empty anyway).\n        if (AMY_IS_SET(e->voices[0]) && !AMY_IS_SET(e->patch_number)) {\n            fprintf(stderr, \"You specified both synth %\" PRId32 \" and voices %\" PRIu16 \"...  Synth implies voices, ignoring voices.\\n\",\n                    (int32_t)e->synth, e->voices[0]);\n        }\n        synth_flags = instrument_get_flags(e->synth);\n        if (AMY_IS_SET(e->to_synth)) {\n            // This involves moving the instrument number.\n            instrument_change_number(e->synth, e->to_synth);\n            e->synth = e->to_synth;\n            AMY_UNSET(e->to_synth);\n            // Then continue handling any other args.\n        }\n        if (AMY_IS_SET(e->synth_delay_ms)) {\n            // Set the synth noteon delay.\n            instrument_set_noteon_delay_ms(e->synth, e->synth_delay_ms);\n        }\n        if (AMY_IS_SET(e->grab_midi_notes)) {\n            // Set the grab_midi state.\n            instrument_set_grab_midi_notes(e->synth, e->grab_midi_notes);\n        }\n        if (AMY_IS_SET(e->pedal)) {\n            // Pedal events are a special case\n            bool sustain = (e->pedal != 0);\n            if (synth_flags & _SYNTH_FLAGS_NEGATE_PEDAL) {\n                sustain = !sustain;  // Some MIDI pedals report backwards.\n            }\n            // A sustain release can result in note-off events for multiple voices.\n            num_voices = instrument_sustain(e->synth, sustain, voices);\n            if (num_voices) {\n                e->velocity = 0;\n            }\n            //fprintf(stderr, \"synth %d pedal %d num_voices %d\\n\", e->synth, e->pedal, num_voices);\n        } else if (AMY_IS_SET(e->velocity)) {\n            bool stolen = false;\n            num_voices = patches_voices_for_note_onoff_event(e, voices, synth_flags, &stolen);\n            if (stolen) {\n                // Here, we issue a quick note-off for the stolen note, to support short decay.  Kind of an abstraction violation.\n                struct delta d = {\n                    .time = e->time,\n                    .osc = voice_to_base_osc[voices[0]],\n                    .param = VELOCITY,\n                    .data.i = 0,\n                    .next = NULL,\n                };\n                add_delta_to_queue(&d, &amy_global.delta_queue);\n                //fprintf(stderr, \"synth %d note %d: voice %d stolen, osc %d time %d added note-off\\n\", e->synth, (int)roundf(e->midi_note), voices[0], d.osc, d.time);\n            }\n            // Apply noteon_delay_ms to note-on events.\n            if (instrument_noteon_delay_ms(e->synth)) {\n                uint32_t playback_time = amy_sysclock();\n                if(AMY_IS_SET(e->time)) playback_time = e->time;\n                playback_time += instrument_noteon_delay_ms(e->synth);\n                e->time = playback_time;\n                //fprintf(stderr, \"synth %d note %d delay %d time %d\\n\", e->synth, (int)roundf(e->midi_note), instrument_noteon_delay_ms(e->synth), e->time);\n            }\n        } else {\n            // Not note on/off, treat the synth as a shorthand for *all* the voices.\n            num_voices = instrument_get_num_voices(e->synth, voices);\n        }\n        if (AMY_IS_SET(e->velocity) && e->velocity == 0 && (synth_flags & _SYNTH_FLAGS_IGNORE_NOTE_OFFS))\n            return 0;  // Ignore the note off, as requested.\n    }\n    return num_voices;\n}\n\n// This is called when i get an event with voices (or an instrument) in it.\n// If the event also has synth and patch_number specified (a \"load patch\"), those are handled before this is called.\n// So i know that the patch / voice alloc already exists and the patch has already been set!\nvoid patches_event_has_voices(amy_event *e, struct delta **queue) {\n    peek_stack(\"has_voices\");\n    uint16_t voices[MAX_VOICES_PER_INSTRUMENT];\n    uint8_t num_voices = patches_voices_for_event(e, voices);\n    if (num_voices == 0) {\n        // No voices to process, somehow event is to be ignored.\n        return;\n    }\n    // Clear out the instrument, voices, patch from the event. If we didn't, we'd keep calling this over and over\n    AMY_UNSET(e->voices[0]);\n    AMY_UNSET(e->patch_number);\n    int32_t instrument = e->synth;\n    AMY_UNSET(e->synth);\n    // for each voice, send the event to the base osc (+ e->osc if given)\n    for(uint8_t i=0;i<num_voices;i++) {\n        if(AMY_IS_SET(voice_to_base_osc[voices[i]])) {\n            uint16_t target_osc = voice_to_base_osc[voices[i]];\n            amy_event_to_deltas_queue(e, target_osc, queue);\n\t    //fprintf(stderr, \"patches: synth %d voice %d osc %d wav %d note %d vel %d\\n\", instrument, voices[i], target_osc, e->wave, (int)e->midi_note, (int)(127.f * e->velocity));\n        }\n    }\n    // Restore the instrument in case this event is re-used.\n    e->synth = instrument;\n}\n\nvoid release_voice_oscs(int32_t voice) {\n    if(AMY_IS_SET(voice_to_base_osc[voice])) {\n        //fprintf(stderr, \"Already set voice %d, removing it\\n\", voice);\n        // Remove the oscs for this old voice\n        for(uint16_t i=0;i<AMY_OSCS;i++) {\n            if(osc_to_voice[i]==voice) {\n                //fprintf(stderr, \"Already set voice %d osc %d, removing it\\n\", voices[v], i);\n                AMY_UNSET(osc_to_voice[i]);\n                // Make sure the osc is cleared.\n                reset_osc(i);\n            }\n        }\n        AMY_UNSET(voice_to_base_osc[voice]);\n    }\n}\n\nvoid parse_patch_string_to_queue(char *message, int base_osc, struct delta **queue, uint32_t time);\n\nuint8_t patches_voices_for_load_synth(amy_event *e, uint16_t voices[]) {\n    // When load_patch specifies a synth, convert that into voices.\n    // e->synth is assumed to be set.\n    int num_voices = 0;\n    // If the instrument is alread initialized, copy the voice numbers.\n    num_voices = instrument_get_num_voices(e->synth, voices);\n    if (AMY_IS_SET(e->num_voices) && e->num_voices != num_voices) {\n        // If we did already have voice oscs, release them.\n        for (int32_t i = 0; i < num_voices; ++i) {\n            release_voice_oscs(voices[i]);\n        }\n        num_voices = 0;\n        // Find avaliable voices with a single pass through voice_to_base_osc.\n        uint32_t v = 0;\n        for (int32_t i = 0; i < e->num_voices; ++i) {\n            while (v < amy_global.config.max_voices) {\n                if (AMY_IS_UNSET(voice_to_base_osc[v])) break;\n                ++v;\n            }\n            if (v == amy_global.config.max_voices)  {\n                fprintf(stderr, \"ran out of voices allocating %\" PRId32 \" voices to synth %\" PRId32 \", ignoring.\",\n                        (int32_t)e->num_voices, (int32_t)e->synth);\n                patches_debug();\n                return 0;\n            }\n            voices[i] = v;\n            ++v;\n            ++num_voices;\n        }\n        // Was this deleting the instrument?  i.e. was e->num_voices set but setting the num_voices to zero?\n        if (num_voices == 0) {\n            instrument_release(e->synth);\n            // Delete the instrument number so we don't forward the 'rest' of the event to it.\n            AMY_UNSET(e->synth);\n            // Clear all the midi control code mappings.\n            midi_clear_channel_mappings(e->synth);\n            return 0;\n        }\n        //fprintf(stderr, \"Allocated %d voices to instrument %d\\n\", num_voices, e->synth);\n    }\n    //for (int i = 0; i < num_voices; ++i) {\n    //    fprintf(stderr, \"%d; \", voices[i]);\n    //}\n    //fprintf(stderr, \"\\n\");\n    return num_voices;\n}\n\n\nvoid patches_load_patch(amy_event *e) {\n    // Given an event with a synth (instrument) or voice spec, set up a synth.\n    // Common case is to call with a patch to load, but can also have just\n    // a oscs_per_voice value.\n    // (also called if instrument & num_voices even if no patch specified, to change #voices).\n    // This means to set/reset the voices and load the messages (from ROM or memory) and set them.\n    peek_stack(\"load_patch\");\n    uint16_t voices[MAX_VOICES_PER_INSTRUMENT];\n    uint8_t num_voices = 0;\n    uint16_t oscs_per_voice = 0;\n    uint16_t patch_number = e->patch_number;   // Need to match type of e->patch_number so AMY_IS_UNSET(patch_number) will work.\n    //fprintf(stderr, \"load_patch synth %d patch_number %d num_voices %d oscs_per_voice %d\\n\", e->synth, e->patch_number, e->num_voices, e->oscs_per_voice);\n    if (AMY_IS_SET(e->synth)) {\n        num_voices = patches_voices_for_load_synth(e, voices);\n    } else if (AMY_IS_SET(e->voices[0])) {\n        num_voices = copy_voices(e->voices, voices);\n    }\n    if (num_voices == 0) {\n        if (AMY_IS_UNSET(e->num_voices)) {\n            // Print a warning unless we deliberately set the voices to zero to release the synth.\n            fprintf(stderr, \"synth %\" PRId32 \": no voices selected, ignored (e->num_voices %\" PRId32 \" e->voices [0] %\" PRIu16 \"...)\\n\",\n                    (int32_t)e->synth, (int32_t)e->num_voices, e->voices[0]);\n        }\n        return;\n    } else {\n        // Reset every osc belonging to each voice so stale state doesn't persist\n        // before we reallocate and reinitialize them below.\n        for (uint8_t v = 0; v < num_voices; v++) {\n            if (AMY_IS_SET(voice_to_base_osc[voices[v]])) {\n                uint16_t base = voice_to_base_osc[voices[v]];\n                for (uint16_t j = 0; j < AMY_OSCS - base; j++) {\n                    if (osc_to_voice[base + j] != voices[v]) break;\n                    reset_osc(base + j);\n                }\n            }\n        }\n    }\n\n    // At this point, we have the voices[] array and num_voices set up to be initialized.\n    char *message = NULL;\n    struct delta *deltas = NULL;\n    // Figure out the #oscs per voice, setup message or deltas if available.\n    if (AMY_IS_SET(e->oscs_per_voice)) {\n        oscs_per_voice = e->oscs_per_voice;\n        if (AMY_IS_SET(patch_number)) {\n            fprintf(stderr, \"WARN: synth %\" PRId32 \": oscs_per_voice %\" PRIu16 \" made me ignore patch number %\" PRIu16 \"\\n\",\n                    (int32_t)e->synth, e->oscs_per_voice, patch_number);\n        }\n    } else {\n        if (AMY_IS_UNSET(patch_number))\n            patch_number = instrument_get_patch_number(e->synth);\n        if(patch_number < _PATCHES_FIRST_USER_PATCH) {\n            // Built-in patch\n            message = (char*)patch_commands[patch_number];\n            oscs_per_voice = patch_oscs[patch_number];\n        } else {\n            // User-defined patch\n            int32_t patch_index = patch_number - _PATCHES_FIRST_USER_PATCH;\n            oscs_per_voice = memory_patch_oscs[patch_index];\n            if(oscs_per_voice > 0){\n                deltas = memory_patch_deltas[patch_index];\n            } else {\n                fprintf(stderr, \"patch_number %\" PRIu16 \" has %\" PRIu16 \" num_deltas %\" PRIi32 \" (synth %\" PRId32 \" num_voices %\" PRId32 \"), ignored\\n\",\n                        patch_number, oscs_per_voice, delta_list_len(memory_patch_deltas[patch_index]),\n                        (int32_t)e->synth, (int32_t)e->num_voices);\n                return;\n            }\n        }\n    }\n\n    for(uint8_t v=0;v<num_voices;v++)  {\n        // Release all the oscs of any voices we're re-using before we start re-allocating oscs.\n        release_voice_oscs(voices[v]);\n    }\n\n    for(uint8_t v=0;v<num_voices;v++)  {\n        // Find the first osc with oscs_per_voice free oscs.\n        uint8_t good = 0;\n\n        uint16_t osc_start = (AMY_OSCS/2);\n\n        #ifdef TULIP\n        // On tulip. core 0 (oscs0-60) is shared with the display, who does GDMA a lot. so we favor core1 (oscs60-120)\n        if(voices[v]%3==2) osc_start = 0;\n        #else\n        if(voices[v]%2==1) osc_start = 0;\n        #endif\n\n        for(uint16_t i=0;i<AMY_OSCS;i++) {\n            uint16_t osc = (osc_start + i) % AMY_OSCS;\n            if(AMY_IS_UNSET(osc_to_voice[osc])) {\n                // Are there num_voices x oscs_per_voice free oscs after this one?\n                good = 1;\n                for(uint16_t j=0; j < oscs_per_voice; j++) {\n                    good = good & (AMY_IS_UNSET(osc_to_voice[osc + j]));\n                }\n                if(good) {\n                    //fprintf(stderr, \"found %d consecutive oscs starting at %d for voice %d\\n\", patch_oscs[patch_number], osc, voices[v]);\n                    //fprintf(stderr, \"setting base osc for voice %d to %d\\n\", voices[v], osc);\n                    voice_to_base_osc[voices[v]] = osc; \n                    for(uint16_t j=0; j < oscs_per_voice; j++) {\n                        //fprintf(stderr, \"setting osc %d for voice %d to amy osc %d\\n\", j, voices[v], osc+j);\n                        osc_to_voice[osc+j] = voices[v];\n                        //reset_osc(osc+j);\n                        // Use event mechanism to post osc resets, to ensure they are done in sequence.\n                        // This was important because for testing the patch reassignment, we were running the default\n                        // osc setup, then changing the patch, which reset the oscs here, but then the osc config\n                        // from the default setup was applied *after* the reset, so the osc state was not reset.\n                        //amy_event reset_event = amy_default_event();\n                        //reset_event.reset_osc = osc + j;\n                        //amy_event_to_deltas_queue(&reset_event, 0, &amy_global.delta_queue);\n                        // That's a lot of stack usage to add a single delta.  Let's cut to the chase.\n                        struct delta d = {\n                            .time = 0,\n                            .osc = 0,\n                            .param = RESET_OSC,\n                            .data.i = osc + j,\n                            .next = NULL,\n                        };\n                        add_delta_to_queue(&d, &amy_global.delta_queue);\n                    }\n                    // exit the loop\n                    i = AMY_OSCS + 1;\n                }\n            }\n        }\n        if(!good) {\n            fprintf(stderr, \"cannot find %\" PRIu16 \" oscs for patch %\" PRIu16 \" for voice %\" PRIu16 \". not setting this voice\\n\",\n                    oscs_per_voice, patch_number, voices[v]);\n        }\n    }  // end of loop setting up voice_to_base_osc for all voices[v]\n\n    // Now actually initialize the newly-allocated osc blocks with the patch\n    for(uint8_t v = 0; v < num_voices; v++) {\n        if(AMY_IS_SET(voice_to_base_osc[voices[v]])) {\n            if (deltas) {\n                add_deltas_to_queue_with_baseosc(deltas, voice_to_base_osc[voices[v]], &amy_global.delta_queue, e->time);\n            } else if (message) {\n                parse_patch_string_to_queue(message, voice_to_base_osc[voices[v]], &amy_global.delta_queue, e->time);\n            }\n            // Or maybe there's no deltas and no message, in which case we just set oscs_per_voice, waiting for config.\n        }\n    }\n\n    // Finally, store as an instrument if instrument number is specified.\n    if (AMY_IS_SET(e->synth)) {\n        uint32_t flags = 0;\n        if (AMY_IS_SET(e->synth_flags)) flags = e->synth_flags;\n        instrument_add_new(e->synth, num_voices, voices, patch_number, oscs_per_voice, flags);\n    }\n\n}\n"
  },
  {
    "path": "src/patches.h",
    "content": "// Automatically generated.\n// DX7 and juno 106 and custom patch table\n#ifndef __PATCHESH\n#define __PATCHESH\nstatic const char * const patch_commands[258] PROGMEM = {\n\t/* 0: Juno A11 Brass Set 1 */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.945A156,1.0,10000,0Zv2a0,,0,0f220,1,,,,0,1d0.902,,,,,0m0Zv3a1,,0,0f220,1,,,,0,1m0Zv4a0,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F179.93,0.677,,5.024,0,0R0.93Zv0a0.85,,1,1,0A30,1,1355,0.354,232,0Zx0,0,0k1,,0.5,0.5Z\",\n\t/* 1: Juno A12 Brass Swell */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.609A148,1.0,10000,0Zv2a0,,0,0f440,1,,,,0,1d0.72,,,,,0m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a0.551,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F300.23,0.661,,2.252,0,0R1.015Zv0a0.591,,1,1,0A518,1,83561,0.299,310,0Zx7,-3,-3k1,,0.5,0.5Z\",\n\t/* 2: Juno A13 Trumpet */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.437A128,1.0,10000,0Zv2a0,,0,0f440,1,,,,0.002,1d0.902,,,,,0m0Zv3a1,,0,0f440,1,,,,0.002,1m0Zv4a0,,0,0f220,1,,,,0.002,1m0Zv5a0,,0,0Zv0F591.35,0.465,,2.079,0,0.01R1.47Zv0a1,,1,1,0A46,1,3827,0.378,75,0Zx-8,0,0k0Z\",\n\t/* 3: Juno A14 Flutes */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f3.067A115,1.0,10000,0Zv2a0,,0,0f440,1,,,,0,1d0.5,,,,,0m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a0,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F549.34,0.323,,0.866,0,0.108R1.408Zv0a1,,1,1,0A190,1,9375,0,89,0Zx-15,8,8k0Z\",\n\t/* 4: Juno A15 Moving Strings */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f3.341A5,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.5,,,,,0.154m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a0.11,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F3058.4,0.874,,0.346,0,0R1.083Zv0a0.268,,1,1,0A110,1,13385,0.693,277,0Zx0,0,0k1,,0.83,0.5Z\",\n\t/* 5: Juno A16 Brass & Strings */ \"v1w4a1,,0,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,1,0A0,1,0,1,0,0B6,1,64,0.646,0,0Zx7,-3,-3k0Z\",\n\t/* 9: Juno A22 Organ II */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f1.932A22,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.5,,,,,0.209m0Zv3a0,,0,0f440,1,,,,0,1m0Zv4a0.457,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F577.55,0.669,,0,1.213,0.01R3.679Zv0a0.583,,1,1,0A0,1,0,1,0,0B6,1,64,0.646,0,0Zx7,-3,-3k1,,0.5,0.5Z\",\n\t/* 10: Juno A23 Combo Organ */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f4.7A34,1.0,10000,0Zv2a1,,0,0f880,1,,,,0.002,1d0.724,,,,,0m0Zv3a0,,0,0f880,1,,,,0.002,1m0Zv4a0.48,,0,0f440,1,,,,0.002,1m0Zv5a0,,0,0Zv0F1220.7,0.858,,0,0.346,0R3.227Zv0a0.756,,1,1,0A0,1,0,1,0,0B6,1,1272,0.339,504,0Zx-8,0,0k0Z\",\n\t/* 11: Juno A24 Calliope */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f5.728A99,1.0,10000,0Zv2a1,,0,0f440,1,,,,0.003,1d0.5,,,,,0m0Zv3a0,,0,0f440,1,,,,0.003,1m0Zv4a0.378,,0,0f220,1,,,,0.003,1m0Zv5a0,,0,0Zv0F4678.2,0.441,,-1.472,0,0R1.262Zv0a0.701,,1,1,0A62,1,142057,1,22,0Zx-8,0,0k1,,0.5,0.5Z\",\n\t/* 12: Juno A25 Donald Pluck */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f4.835A34,1.0,10000,0Zv2a1,,0,0f880,1,,,,0.002,1d0.724,,,,,0m0Zv3a0,,0,0f880,1,,,,0.002,1m0Zv4a1,,0,0f440,1,,,,0.002,1m0Zv5a0,,0,0Zv0F2060.1,0.614,,0,-1.299,0R6.928Zv0a0.646,,1,1,0A0,1,0,1,0,0B22,1,27,0.339,40,0Zx-15,8,8k0Z\",\n\t/* 13: Juno A26 Celeste* (1 oct.up) */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f1.204A5,1.0,10000,0Zv2a1,,0,0f880,1,,,,0,1d0.5,,,,,0m0Zv3a0,,0,0f880,1,,,,0,1m0Zv4a0.118,,0,0f440,1,,,,0,1m0Zv5a0,,0,0Zv0F129.81,0.299,,4.677,0,0R1.182Zv0a0.756,,1,1,0A6,1,988,0,2777,0Zx7,-3,-3k0Z\",\n\t/* 14: Juno A27 Elect. Piano I */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.98A5,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.5,,,,,0m0Zv3a0,,0,0f220,1,,,,0,1m0Zv4a0,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F42.457,0.276,,5.283,0,0.059R1.377Zv0a1,,1,1,0A14,1,11888,0.339,366,0Zx-15,8,8k0Z\",\n\t/* 15: Juno A28 Elect. Piano II */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.5A5,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.78,,,,,0m0Zv3a0,,0,0f220,1,,,,0,1m0Zv4a0,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F465.58,0.63,,0.606,0,0R3.157Zv0a0.803,,1,1,0A6,1,4315,0,121,0Zx0,0,0k1,,0.5,0.5Z\",\n\t/* 16: Juno A31 Clock Chimes* (1 o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182Zv0a1,,1,1,0A470,1,28883,0.74,310,0Zx7,-3,-3k1,,0.5,0.5Z\",\n\t/* 20: Juno A35 Fanfare */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.108A5,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.5,,,,,0.276m0Zv3a1,,0,0f220,1,,,,0,1m0Zv4a0.394,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F298.86,0.528,,2.772,0,0R0.7Zv0a0.26,,1,1,0A582,1,36580,0.591,588,0Zx7,-3,-3k1,,0.5,0.5Z\",\n\t/* 21: Juno A36 String III */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.171A48,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.5,,,,,0.402m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a0,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F1853.8,0.661,,0,0,0R0.95Zv0a0.575,,1,1,0A510,1,416,1,478,0Zx0,0,0k1,,0.83,0.5Z\",\n\t/* 22: Juno A37 Pizzicato */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f3.067A28,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.5,,,,,0.402m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a0,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F1127.8,0.331,,0.433,0,0R0.731Zv0a1,,1,1,0A6,1,72,0,51,0Zx-15,8,8k1,,0.5,0.5Z\",\n\t/* 23: Juno A38 High Strings */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.896A21,1.0,10000,0Zv2a1,,0,0f880,1,,,,0,1d0.5,,,,,0.402m0Zv3a0,,0,0f880,1,,,,0,1m0Zv4a0,,0,0f440,1,,,,0,1m0Zv5a0,,0,0Zv0F4093,0.559,,0.173,0,0R0.834Zv0a0.606,,1,1,0A150,1,988,1,366,0Zx-8,0,0k1,,0.83,0.5Z\",\n\t/* 24: Juno A41 Bass clarinet */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.437A128,1.0,10000,0Zv2a1,,0,0f220,1,,,,0.002,1d0.5,,,,,0m0Zv3a0,,0,0f220,1,,,,0.002,1m0Zv4a0,,0,0f110,1,,,,0.002,1m0Zv5a0,,0,0Zv0F373.6,0.457,,2.165,0,0.079R1.536Zv0a0.819,,1,1,0A94,1,6559,0,149,0Zx0,0,0k0Z\",\n\t/* 25: Juno A42 English Horn */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.108A128,1.0,10000,0Zv2a1,,0,0f440,1,,,,0.002,1d0.902,,,,,0m0Zv3a0,,0,0f440,1,,,,0.002,1m0Zv4a0,,0,0f220,1,,,,0.002,1m0Zv5a0,,0,0Zv0F1375.6,0.213,,0.606,0,0R1.996Zv0a1,,1,1,0A70,1,9375,0.205,75,0Zx-15,8,8k0Z\",\n\t/* 26: Juno A43 Brass Ensemble */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.437A128,1.0,10000,0Zv2a0,,0,0f440,1,,,,0,1d0.902,,,,,0m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a0.244,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F329.39,0.465,,2.512,0,0.01R1.829Zv0a0.811,,1,1,0A134,1,34482,0.764,261,0Zx0,0,0k1,,0.5,0.5Z\",\n\t/* 27: Juno A44 Guitar */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f6.412A242,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.756,,,,,0m0Zv3a1,,0,0f220,1,,,,0,1m0Zv4a0,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F32.071,0.236,,6.15,0,0R0.971Zv0a0.756,,1,1,0A6,1,1632,0.425,219,0Zx0,0,0k0Z\",\n\t/* 28: Juno A45 Koto */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f7.175A51,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.87,,,,,0m0Zv3a0,,0,0f440,1,,,,0,1m0Zv4a0.016,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F238.09,0.591,,2.512,0,0R2.483Zv0a1,,1,1,0A6,1,2087,0,346,0Zx-15,8,8k1,,0.5,0.5Z\",\n\t/* 29: Juno A46 Dark Pluck */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f1.317A5,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.843,,,,,0m0Zv3a0,,0,0f440,1,,,,0,1m0Zv4a0.764,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F205.66,0.559,,2.339,0,0R2.651Zv0a0.709,,1,1,0A6,1,1632,0.118,1179,0Zx7,-3,-3k1,,0.83,0.5Z\",\n\t/* 30: Juno A47 Funky I */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.57A5,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.787,,,,,0m0Zv3a1,,0,0f220,1,,,,0,1m0Zv4a0.504,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F115.39,0.323,,0,4.417,0R1.157Zv0a0.559,,1,1,0A0,1,0,1,0,0B6,1,388,0.283,6,0Zx7,-3,-3k1,,0.5,0.5Z\",\n\t/* 31: Juno A48 Synth Bass I (unison) */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.896A24,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.724,,,,,0m0Zv3a0,,0,0f220,1,,,,0,1m0Zv4a0.803,,0,0f110,1,,,,0,1m0Zv5a0.394,,0,0Zv0F120.15,0.276,,5.717,0,0R0.7Zv0a0.591,,1,1,0A6,1,513,0,293,0Zx7,-3,-3k0Z\",\n\t/* 32: Juno A51 Lead I */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f4.317A995,1.0,10000,0Zv2a1,,0,0f440,1,,,,0.004,1d0.5,,,,,0m0Zv3a0,,0,0f440,1,,,,0.004,1m0Zv4a0,,0,0f220,1,,,,0.004,1m0Zv5a0,,0,0Zv0F216.7,0.409,,0,3.118,0R5.818Zv0a0.78,,1,1,0A0,1,0,1,0,0B6,1,1053,0.575,0,0Zx7,-3,-3k0Z\",\n\t/* 33: Juno A52 Lead II */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f1.067A995,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.5,,,,,0.209m0Zv3a1,,0,0f220,1,,,,0,1m0Zv4a0.622,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F299.94,0.409,,0,3.724,0R0.7Zv0a0.441,,1,1,0A0,1,0,1,0,0B14,1,230,0.717,2093,0Zx0,0,0k0Z\",\n\t/* 34: Juno A53 Lead III */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f6.412A450,1.0,10000,0Zv2a0,,0,0f440,1,,,,0.005,1d0.902,,,,,0m0Zv3a1,,0,0f440,1,,,,0.005,1m0Zv4a0,,0,0f220,1,,,,0.005,1m0Zv5a0,,0,0Zv0F877.5,0.598,,0,1.559,0.01R1.377Zv0a1,,1,1,0A0,1,0,1,0,0B6,1,3827,0.378,45,0Zx0,0,0k0Z\",\n\t/* 35: Juno A54 Funky II */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.57A5,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.689,,,,,0m0Zv3a0,,0,0f440,1,,,,0,1m0Zv4a0.449,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F21.282,0.323,,0,7.016,0R1.157Zv0a0.787,,1,1,0A0,1,0,1,0,0B6,1,388,0.307,6,0Zx0,0,0k1,,0.5,0.5Z\",\n\t/* 36: Juno A55 Synth Bass II */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f7.175A34,1.0,10000,0Zv2a0,,0,0f220,1,,,,0,1d0.5,,,,,0m0Zv3a1,,0,0f220,1,,,,0,1m0Zv4a0.354,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F212.87,0,,0,4.071,0R0.7Zv0a0.614,,1,1,0A0,1,0,1,0,0B6,1,627,0.071,121,0Zx7,-3,-3k0Z\",\n\t/* 37: Juno A56 Funky III */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.57A5,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.535,,,,,0m0Zv3a1,,0,0f220,1,,,,0,1m0Zv4a1,,0,0f110,1,,,,0,1m0Zv5a0.795,,0,0Zv0F160.22,0.079,,0,3.898,0R2.276Zv0a0.622,,1,1,0A0,1,0,1,0,0B6,1,248,0,6,0Zx7,-3,-3k0Z\",\n\t/* 38: Juno A57 Thud Wah */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3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0k1,,0.5,0.5Z\",\n\t/* 42: Juno A63 Frontier Organ */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f5.263A22,1.0,10000,0Zv2a1,,0,0f440,1,,,,0.001,1d0.5,,,,,0.335m0Zv3a0,,0,0f440,1,,,,0.001,1m0Zv4a0.228,,0,0f220,1,,,,0.001,1m0Zv5a0,,0,0Zv0F1427.9,0.409,,0,0,0R2.276Zv0a1,,1,1,0A0,1,0,1,0,0B6,1,0,1,0,0Zx7,-3,-3k0Z\",\n\t/* 43: Juno A64 Snare Drum (unison) */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.437A48,1.0,10000,0Zv2a0,,0,0f440,1,,,,0,1d0.5,,,,,0m0Zv3a0,,0,0f440,1,,,,0,1m0Zv4a0.504,,0,0f220,1,,,,0,1m0Zv5a0.717,,0,0Zv0F5863.9,0,,1.472,0,0R0.89Zv0a0.795,,1,1,0A6,1,268,0,206,0Zx0,0,0k0Z\",\n\t/* 44: Juno A65 Tom Toms (unison) */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f3.247A24,1.0,10000,0Zv2a0,,0,0f220,1,,,,0.002,1d0.5,,,,,0m0Zv3a0,,0,0f220,1,,,,0.002,1m0Zv4a0.457,,0,0f110,1,,,,0.002,1m0Zv5a1,,0,0Zv0F444.44,0.165,,3.465,0,0R0.764Zv0a0.795,,1,1,0A6,1,388,0.118,366,0Zx7,-3,-3k0Z\",\n\t/* 45: Juno A66 Timpani (unison) */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.5A5,1.0,10000,0Zv2a0,,0,0f220,1,,,,0,1d0.638,,,,,0m0Zv3a0,,0,0f220,1,,,,0,1m0Zv4a0.37,,0,0f110,1,,,,0,1m0Zv5a1,,0,0Zv0F72.866,0.189,,4.677,0,0R0.7Zv0a1,,1,1,0A14,1,2087,0.205,1731,0Zx0,0,0k0Z\",\n\t/* 46: Juno A67 Shaker */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.974A450,1.0,10000,0Zv2a0,,0,0f440,1,,,,0,1d0.728,,,,,0m0Zv3a0,,0,0f440,1,,,,0,1m0Zv4a0,,0,0f220,1,,,,0,1m0Zv5a1,,0,0Zv0F5877.9,0.63,,0.087,0,0.167R1.87Zv0a1,,1,1,0A86,1,55,0,0,0Zx-15,8,8k0Z\",\n\t/* 47: Juno A68 Synth Pad */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.734A5,1.0,10000,0Zv2a1,,0,0f440,1,,,,0.001,1d0.5,,,,,0.169m0Zv3a0,,0,0f440,1,,,,0.001,1m0Zv4a0.291,,0,0f220,1,,,,0.001,1m0Zv5a0,,0,0Zv0F242.37,1,,7.276,0,0R0.7Zv0a0.402,,1,1,0A6,1,11888,0.591,1123,0Zx7,-3,-3k1,,0.83,0.5Z\",\n\t/* 48: Juno A71 Sweep I */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f5.116A5,1.0,10000,0Zv2a1,,0,0f880,1,,,,0,1d0.5,,,,,0.402m0Zv3a0,,0,0f880,1,,,,0,1m0Zv4a0.331,,0,0f440,1,,,,0,1m0Zv5a0.22,,0,0Zv0F22970,0,,-5.803,0,0R1.676Zv0a0.764,,1,1,0A6,1,3194,1,2910,0Zx0,0,0k1,,0.83,0.5Z\",\n\t/* 49: Juno A72 Pluck Sweep */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f3.853A148,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.5,,,,,0.268m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a0.984,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F960.19,0.772,,0.78,0,0.059R7.898Zv0a0.354,,1,1,0A6,1,16963,0,2301,0Zx-8,0,0k1,,0.83,0.5Z\",\n\t/* 50: Juno A73 Repeater */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f4.974A31,1.0,10000,0Zv2a1,,0,0f440,1,,,,0.002,1d0.898,,,,,0m0Zv3a0,,0,0f440,1,,,,0.002,1m0Zv4a0.346,,0,0f220,1,,,,0.002,1m0Zv5a0,,0,0Zv0F8999.7,0.449,,0,-4.85,0R1.348Zv0a0.685,,1,1,0A0,1,0,1,0,0B118,1,0,0.323,0,0Zx0,0,0k1,,0.5,0.5Z\",\n\t/* 51: Juno A74 Sweep II */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f6.783A472,1.0,10000,0Zv2a1,,0,0f440,1,,,,0.004,1d0.882,,,,,0m0Zv3a0,,0,0f440,1,,,,0.004,1m0Zv4a0.378,,0,0f220,1,,,,0.004,1m0Zv5a0,,0,0Zv0F1264.7,0.551,,5.89,0,0R6.489Zv0a0.795,,1,1,0A6,1,15068,0.417,2411,0Zx7,-3,-3k1,,0.5,0.5Z\",\n\t/* 52: Juno A75 Pluck Bell */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.367A5,1.0,10000,0Zv2a1,,0,0f880,1,,,,0.001,1d0.5,,,,,0.067m0Zv3a0,,0,0f880,1,,,,0.001,1m0Zv4a0.386,,0,0f440,1,,,,0.001,1m0Zv5a0,,0,0Zv0F276.02,1,,4.244,0,0R0.7Zv0a0.386,,1,1,0A6,1,11888,0.591,720,0Zx7,-3,-3k1,,0.83,0.5Z\",\n\t/* 53: Juno A76 Dark Synth Piano */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f20.195A5,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.5,,,,,0m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a1,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F662.85,0.559,,-0.52,0,0R4.576Zv0a0.622,,1,1,0A6,1,1195,0,619,0Zx7,-3,-3k1,,0.83,0.5Z\",\n\t/* 54: Juno A77 Sustainer */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f4.196A5,1.0,10000,0Zv2a1,,0,0f440,1,,,,0.001,1d0.5,,,,,0.181m0Zv3a0,,0,0f440,1,,,,0.001,1m0Zv4a0.386,,0,0f220,1,,,,0.001,1m0Zv5a0,,0,0Zv0F276.02,1,,7.276,0,0R0.7Zv0a0.449,,1,1,0A6,1,11888,0.591,1651,0Zx7,-3,-3k0Z\",\n\t/* 55: Juno A78 Wah Release */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f6.976A21,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.598,,,,,0m0Zv3a0,,0,0f440,1,,,,0,1m0Zv4a0.685,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F1837.9,0.52,,-1.646,0,0R4.78Zv0a0.819,,1,1,0A6,1,11203,0,193,0Zx0,0,0k1,,0.83,0.5Z\",\n\t/* 56: Juno A81 Gong (play low chords) */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f20.195A5,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.902,,,,,0m0Zv3a0,,0,0f220,1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649A64,1.0,10000,0Zv2a0,,0,0f880,1,,,,0,1d0.902,,,,,0m0Zv3a0,,0,0f880,1,,,,0,1m0Zv4a0,,0,0f440,1,,,,0,1m0Zv5a0.764,,0,0Zv0F1882.7,0.441,,-0.693,0,0R8.433Zv0a1,,1,1,0A6,1,15068,1,8083,0Zx-15,8,8k0Z\",\n\t/* 61: Juno A86 Hand Claps */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.98A5,1.0,10000,0Zv2a0,,0,0f220,1,,,,0,1d0.5,,,,,0m0Zv3a0,,0,0f220,1,,,,0,1m0Zv4a0,,0,0f110,1,,,,0,1m0Zv5a1,,0,0Zv0F49.174,0.433,,0,4.677,0R4.78Zv0a1,,1,1,0A0,1,0,1,0,0B14,1,72,0,30,0Zx-15,8,8k0Z\",\n\t/* 62: Juno A87 FX Sweep */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f20.195A339,1.0,10000,0Zv2a1,,0,0f220,1,,,,0.027,1d0.5,,,,,0.402m0Zv3a0,,0,0f220,1,,,,0.027,1m0Zv4a1,,0,0f110,1,,,,0.027,1m0Zv5a1,,0,0Zv0F1931.3,0.74,,-7.189,0,0R1.829Zv0a1,,1,1,0A6,1,20258,0,11687,0Zx0,0,0k0Z\",\n\t/* 63: Juno A88 Caverns */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.5A5,1.0,10000,0Zv2a0,,0,0f220,1,,,,0,1d0.5,,,,,0.402m0Zv3a0,,0,0f220,1,,,,0,1m0Zv4a0,,0,0f110,1,,,,0,1m0Zv5a1,,0,0Zv0F1434.5,0.543,,0,0,0R9.202Zv0a0.843,,1,1,0A6,1,92,0.299,531,0Zx-8,0,0k0Z\",\n\t/* 64: Juno B11 Strings */ \"v1w4a1,,0,1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0f220,1,,,,0,1m0Zv4a0,,0,0f110,1,,,,0,1m0Zv5a1,,0,0Zv0F22.662,0.819,,6.669,0,0R0.7Zv0a0.724,,1,1,0A118,1,7843,0.85,16883,0Zx7,-3,-3k0Z\",\n\t/* 72: Juno B21 Space Chimes */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f9.237A5,1.0,10000,0Zv2a1,,0,0f880,1,,,,0,1d0.5,,,,,0m0Zv3a0,,0,0f880,1,,,,0,1m0Zv4a0,,0,0f440,1,,,,0,1m0Zv5a0,,0,0Zv0F1667.5,0.583,,0,0,0R11.2Zv0a0.669,,1,1,0A6,1,268,0,1019,0Zx7,-3,-3k1,,0.5,0.5Z\",\n\t/* 73: Juno B22 Nylon Guitar */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f4.317A128,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.614,,,,,0m0Zv3a0,,0,0f440,1,,,,0,1m0Zv4a0,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F585.97,0.197,,2.252,0,0R0.7Zv0a0.906,,1,1,0A6,1,15068,0,232,0Zx-15,8,8k0Z\",\n\t/* 74: Juno B23 Orchestral Pad */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f1.004A128,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.5,,,,,0.413m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a1,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F128.75,0.283,,4.764,0,0R0.7Zv0a0,,1,1,0A238,1,14202,0.394,685,0Zx7,-3,-3k1,,0.83,0.5Z\",\n\t/* 75: Juno B24 Bright Pluck */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1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2a0,,0,0f220,1,,,,0,1d0.909,,,,,0m0Zv3a1,,0,0f220,1,,,,0,1m0Zv4a0,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F731.97,1,,0,0.606,0R7.081Zv0a0.622,,1,1,0A0,1,0,1,0,0B6,1,0,0,0,0Zx7,-3,-3k1,,0.5,0.5Z\",\n\t/* 98: Juno B53 Bassoon */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f6.06A89,1.0,10000,0Zv2a1,,0,0f220,1,,,,0.002,1d0.854,,,,,0m0Zv3a0,,0,0f220,1,,,,0.002,1m0Zv4a0,,0,0f110,1,,,,0.002,1m0Zv5a0,,0,0Zv0F188.99,0.772,,3.724,0,0.089R0.7Zv0a1,,1,1,0A46,1,142057,0.835,6,0Zx-15,8,8k0Z\",\n\t/* 99: Juno B54 Auto Release Noise Sweep */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f20.195A5,1.0,10000,0Zv2a0,,0,0f880,1,,,,0,1d0.5,,,,,0m0Zv3a0,,0,0f880,1,,,,0,1m0Zv4a0,,0,0f440,1,,,,0,1m0Zv5a1,,0,0Zv0F76715,0.819,,-11,0,0R0.7Zv0a0.843,,1,1,0A6,1,8324,0.449,3049,0Zx7,-3,-3k1,,0.5,0.5Z\",\n\t/* 100: Juno B55 Brass Ensemble */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f1.1A1313,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.5,,,,,0.287m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a0,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F360.26,0.512,,3.031,0,0R1.47Zv0a0.307,,1,1,0A54,1,4315,0.528,328,0Zx7,-3,-3k1,,0.5,0.5Z\",\n\t/* 101: Juno B56 Ethereal */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f3.964A5,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.5,,,,,0.413m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a0.465,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F464.34,1,,0,0,0R9.613Zv0a0.472,,1,1,0A742,1,1442,1,796,0Zx7,-3,-3k1,,0.83,0.5Z\",\n\t/* 102: Juno B57 Chorus Bell 2 */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f4.317A128,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.614,,,,,0m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a0,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F18.791,0.709,,5.37,0,0R6.489Zv0a0.236,,1,1,0A6,1,78775,0,16883,0Zx7,-3,-3k1,,0.5,0.5Z\",\n\t/* 103: Juno B58 Blizzard */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.517A5,1.0,10000,0Zv2a0,,0,0f880,1,,,,0,1d0.5,,,,,0.413m0Zv3a0,,0,0f880,1,,,,0,1m0Zv4a0,,0,0f440,1,,,,0,1m0Zv5a1,,0,0Zv0F813.39,0.953,,0.606,0,0.374R4.886Zv0a1,,1,1,0A630,1,25663,0.685,2411,0Zx-15,8,8k0Z\",\n\t/* 104: Juno B61 E. Piano with Tremolo */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f1.932A5,1.0,10000,0Zv2a1,,0,0f880,1,,,,0,1d0.5,,,,,0.083m0Zv3a0,,0,0f880,1,,,,0,1m0Zv4a1,,0,0f440,1,,,,0,1m0Zv5a0,,0,0Zv0F84.211,0.843,,3.031,0,0.069R0.7Zv0a0.811,,1,1,0A6,1,3603,0.472,6126,0Zx0,0,0k0Z\",\n\t/* 105: Juno B62 Clarinet */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f3.964A36,1.0,10000,0Zv2a1,,0,0f440,1,,,,0.002,1d0.5,,,,,0m0Zv3a0,,0,0f440,1,,,,0.002,1m0Zv4a0,,0,0f220,1,,,,0.002,1m0Zv5a0,,0,0Zv0F188.99,0.772,,3.724,0,0.069R0.7Zv0a0.819,,1,1,0A46,1,142057,0.835,26,0Zx-15,8,8k0Z\",\n\t/* 106: Juno B63 Thunder */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f20.195A5,1.0,10000,0Zv2a0,,0,0f220,1,,,,0,1d0.5,,,,,0m0Zv3a0,,0,0f220,1,,,,0,1m0Zv4a0,,0,0f110,1,,,,0,1m0Zv5a1,,0,0Zv0F22.662,0.819,,6.669,0,0R0.7Zv0a0.843,,1,1,0A6,1,212,0.85,16883,0Zx7,-3,-3k0Z\",\n\t/* 107: Juno B64 Reedy Organ */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f1.483A28,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.5,,,,,0.287m0Zv3a0,,0,0f440,1,,,,0,1m0Zv4a0,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F144.98,0.512,,0,4.591,0R0.7Zv0a0.543,,1,1,0A0,1,0,1,0,0B30,1,988,0.858,0,0Zx7,-3,-3k0Z\",\n\t/* 108: Juno B65 Flute / Horn */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f1.44A5,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.5,,,,,0.232m0Zv3a1,,0,0f220,1,,,,0,1m0Zv4a0,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F86.181,0.512,,3.638,0,0R0.7Zv0a0.173,,1,1,0A174,1,5821,0.559,559,0Zx7,-3,-3k1,,0.83,0.5Z\",\n\t/* 109: Juno B66 Toy Rhodes */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f1.278A128,1.0,10000,0Zv2a0,,0,0f880,1,,,,0.03,1d0.5,,,,,0m0Zv3a0,,0,0f880,1,,,,0.03,1m0Zv4a0,,0,0f440,1,,,,0.03,1m0Zv5a0,,0,0Zv0F949.38,1,,0,0,0R11.2Zv0a0.843,,1,1,0A6,1,15068,0,346,0Zx-15,8,8k0Z\",\n\t/* 110: Juno B67 Surf's Up */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.517A5,1.0,10000,0Zv2a0,,0,0f880,1,,,,0,1d0.5,,,,,0.413m0Zv3a0,,0,0f880,1,,,,0,1m0Zv4a0,,0,0f440,1,,,,0,1m0Zv5a1,,0,0Zv0F3817.8,0.425,,-0,0,0.482R0.89Zv0a0.591,,1,1,0A270,1,24190,1,17676,0Zx-8,0,0k0Z\",\n\t/* 111: Juno B68 OW Bass */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.3A5,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.697,,,,,0m0Zv3a1,,0,0f220,1,,,,0,1m0Zv4a0.37,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F1314.1,1,,0,-5.63,0R4.381Zv0a0.551,,1,1,0A0,1,0,1,0,0B1022,1,0,0.843,0,0Zx7,-3,-3k0Z\",\n\t/* 112: Juno B71 Piccolo */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f4.079A51,1.0,10000,0Zv2a1,,0,0f880,1,,,,0,1d0.555,,,,,0m0Zv3a1,,0,0f880,1,,,,0,1m0Zv4a0,,0,0f440,1,,,,0,1m0Zv5a0,,0,0Zv0F25.183,0.772,,5.457,0,0.157R0.7Zv0a0.685,,1,1,0A134,1,34482,0.835,112,0Zx-8,0,0k0Z\",\n\t/* 113: Juno B72 Melodic Taps */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f9.237A5,1.0,10000,0Zv2a0,,0,0f220,1,,,,0,1d0.5,,,,,0m0Zv3a0,,0,0f220,1,,,,0,1m0Zv4a0,,0,0f110,1,,,,0,1m0Zv5a1,,0,0Zv0F2359.1,1,,0,0,0R8.072Zv0a1,,1,1,0A6,1,248,0,139,0Zx-15,8,8k1,,0.5,0.5Z\",\n\t/* 114: Juno B73 Meow Brass */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.367A5991,1.0,10000,0Zv2a0,,0,0f440,1,,,,0,1d0.5,,,,,0.287m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a0,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F316.33,0.512,,0,3.031,0R6.212Zv0a0.661,,1,1,0A0,1,0,1,0,0B38,1,15988,0,170,0Zx7,-3,-3k0Z\",\n\t/* 115: Juno B74 Violin (high) */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f4.196A128,1.0,10000,0Zv2a0,,0,0f880,1,,,,0.005,1d0.5,,,,,0m0Zv3a1,,0,0f880,1,,,,0.005,1m0Zv4a0,,0,0f440,1,,,,0.005,1m0Zv5a0,,0,0Zv0F6923.6,0.945,,0,0,0.03R0.7Zv0a0.669,,1,1,0A350,1,1053,0.449,159,0Zx7,-3,-3k0Z\",\n\t/* 116: Juno B75 High Bells */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f1.278A128,1.0,10000,0Zv2a0,,0,0f880,1,,,,0.03,1d0.5,,,,,0m0Zv3a0,,0,0f880,1,,,,0.03,1m0Zv4a0,,0,0f440,1,,,,0.03,1m0Zv5a0,,0,0Zv0F3059.8,1,,0,0,0R11.2Zv0a0.874,,1,1,0A6,1,212,0.409,970,0Zx-15,8,8k0Z\",\n\t/* 117: Juno B76 Rolling Wah */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f1.528A5,1.0,10000,0Zv2a1,,0,0f440,1,,,,0,1d0.5,,,,,0.413m0Zv3a0,,0,0f440,1,,,,0,1m0Zv4a0,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F642.89,0,,0,0,1.25R0.852Zv0a0.606,,1,1,0A278,1,1963,1,8465,0Zx7,-3,-3k0Z\",\n\t/* 118: Juno B77 Ping Bell */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.5A16,1.0,10000,0Zv2a1,,0,0f880,1,,,,0,1d0.5,,,,,0.409m0Zv3a0,,0,0f880,1,,,,0,1m0Zv4a0,,0,0f440,1,,,,0,1m0Zv5a0,,0,0Zv0F3059.8,1,,0,0,0R11.2Zv0a0.654,,1,1,0A6,1,230,0.181,879,0Zx7,-3,-3k1,,0.5,0.5Z\",\n\t/* 119: Juno B78 Brassy Organ */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.835A5,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.5,,,,,0.268m0Zv3a1,,0,0f220,1,,,,0,1m0Zv4a0.441,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F27.056,0.409,,7.535,0,0R0.7Zv0a0.11,,1,1,0A6,1,587,0.858,0,0Zx7,-3,-3k1,,0.5,0.5Z\",\n\t/* 120: Juno B81 Low Dark Strings */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f0.974A128,1.0,10000,0Zv2a1,,0,0f220,1,,,,0.001,1d0.5,,,,,0.319m0Zv3a1,,0,0f220,1,,,,0.001,1m0Zv4a0,,0,0f110,1,,,,0.001,1m0Zv5a0,,0,0Zv0F2003.8,0.811,,0,0,0R0.7Zv0a0.315,,1,1,0A670,1,230,0.858,408,0Zx7,-3,-3k1,,0.83,0.5Z\",\n\t/* 121: Juno B82 Piccolo Trumpet */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.367A5991,1.0,10000,0Zv2a0,,0,0f440,1,,,,0,1d0.5,,,,,0.287m0Zv3a1,,0,0f440,1,,,,0,1m0Zv4a0,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F21.863,1,,0,8.142,0R0.7Zv0a0.764,,1,1,0A0,1,0,1,0,0B30,1,988,0.402,45,0Zx7,-3,-3k0Z\",\n\t/* 122: Juno B83 Cello */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.814A128,1.0,10000,0Zv2a0,,0,0f220,1,,,,0.005,1d0.5,,,,,0m0Zv3a1,,0,0f220,1,,,,0.005,1m0Zv4a0,,0,0f110,1,,,,0.005,1m0Zv5a0,,0,0Zv0F2049.7,0.354,,0.26,0,0.01R0.7Zv0a0.858,,1,1,0A390,1,3603,0.709,261,0Zx7,-3,-3k0Z\",\n\t/* 123: Juno B84 High Strings */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f5.414A5,1.0,10000,0Zv2a1,,0,0f880,1,,,,0.002,1d0.5,,,,,0.276m0Zv3a1,,0,0f880,1,,,,0.002,1m0Zv4a0,,0,0f440,1,,,,0.002,1m0Zv5a0,,0,0Zv0F6885.4,0.559,,0,0,0R0.7Zv0a0.378,,1,1,0A222,1,2219,0.449,386,0Zx7,-3,-3k1,,0.83,0.5Z\",\n\t/* 124: Juno B85 Rocket Men */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f11.884A5,1.0,10000,0Zv2a0,,0,0f440,1,,,,0,1d0.5,,,,,0m0Zv3a0,,0,0f440,1,,,,0,1m0Zv4a0,,0,0f220,1,,,,0,1m0Zv5a0,,0,0Zv0F27909,1,,-6.929,0,0.62R11.2Zv0a0,,1,1,0A6,1,142057,0.402,4035,0Zx7,-3,-3k1,,0.83,0.5Z\",\n\t/* 125: Juno B86 Forbidden Planet */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.3A16,1.0,10000,0Zv2a1,,0,0f880,1,,,,0,1d0.673,,,,,0m0Zv3a0,,0,0f880,1,,,,0,1m0Zv4a0.071,,0,0f440,1,,,,0,1m0Zv5a0,,0,0Zv0F126.38,0.748,,7.622,0,0.049R0.764Zv0a0.622,,1,1,0A6,1,1272,0.181,408,0Zx-15,8,8k1,,0.5,0.5Z\",\n\t/* 126: Juno B87 Froggy */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f5.116A5,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.5,,,,,0m0Zv3a0,,0,0f220,1,,,,0,1m0Zv4a1,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F781.14,1,,0,-3.724,0R11.2Zv0a0.606,,1,1,0A0,1,0,1,0,0B6,1,0,0,0,0Zx0,0,0k0Z\",\n\t/* 127: Juno B88 Owgan */ \"v1w4a1,,0,1Zv0w20c2L1G4Zv2w1c3L1Zv3w3c4L1Zv4w1c5L1Zv5w5L1Zv1f2.3A5,1.0,10000,0Zv2a1,,0,0f220,1,,,,0,1d0.677,,,,,0m0Zv3a1,,0,0f220,1,,,,0,1m0Zv4a0.441,,0,0f110,1,,,,0,1m0Zv5a0,,0,0Zv0F258.65,1,,2.772,0,0R4.381Zv0a0.795,,1,1,0A6,1,1355,0.433,0,0Zx7,-3,-3k0Z\",\n\t/* 128: DX7 BRASS   1  */ \"v2a0.458502,0,0,1,0,0P0.25A0,0.000188,97,0.917004,0,0.917004,530,0.5,70,0.000188L1I1Zv3a1.834008,0,0,1,0,0P0.25A0,0.000188,4,1,30,0.917004,0,0.917004,53,0.000188L1I1.00125Zv4a2,0,0,1,0,0P0.25A0,0.000188,4,1,30,0.917004,0,0.917004,53,0.000188L1I1Zv5a2,0,0,1,0,0P0.25A0,0.000188,4,1,0,0.917004,0,0.917004,53,0.000188L1I0.9975Zv6a0.64842,0,0,1,0,0P0.25A0,0.000188,11,0.229251,26,0.707107,37,0.771105,52,0.000188L1I0.504375Zv7a1.834008,0,0,1,0,0P0.25A0,0.000188,7,1,3,0.385553,0,0.771105,52,0.000188L1I0.504375Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.007298b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o22Z\",\n\t/* 129: DX7 BRASS   2  */ \"v2a0.385553,0,0,1,0,0P0.25A0,0.000188,0,1,21,0.917004,484,0.385553,48,0.000188L1I0.5Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,21,0.917004,822,0.210224,44,0.000188L1I0.500625Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,21,0.917004,822,0.210224,44,0.000188L1I0.49875Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,21,0.917004,822,0.210224,44,0.000188L1I0.498125Zv6a0.545254,0,0,1,0,0P0.25A0,0.000188,0,1,21,0.917004,871,0.192776,43,0.000188L1I0.504375Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,21,0.917004,871,0.192776,43,0.000188L1I0.504375Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o22Z\",\n\t/* 130: DX7 BRASS   3  */ \"v2a0.353553,0,0,1,0,0P0.25A0,0.000188,4,1,306,0.000188,0,0.000188,36,0.000188L1I8.47Zv3a0.162105,0,0,1,0,0P0.25A0,0.000188,109,0.917004,128,0.037163,24,0.040526,383,0.000188L1I3.17625Zv4a0.353553,0,0,1,0,0P0.25A0,0.000188,2,0.018581,0,0.037163,24,0.040526,383,0.000188L1I1Zv5a0.297302,0,0,1,0,0P0.25A0,0.000188,144,1,448,0.32421,0,0.32421,531,0.000188L1I1Zv6a0.162105,0,0,1,0,0P0.25A0,0.000188,231,0.297302,3282,0.000188,0,0.000188,36,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,51,1,1529,0.32421,0,0.32421,298,0.000188L1I1Zv1w4a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.007298b0.08A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o18Z\",\n\t/* 131: DX7 STRINGS 1  */ \"v2a0.037163,0,0,1,0,0P0.25A0,0.000188,64,1,1402,0.545254,1083,0.32421,335,0.000188L1I14Zv3a0.545254,0,0,1,0,0P0.25A0,0.000188,37,0.32421,491,0.545254,1083,0.32421,335,0.000188L1I3Zv4a0.297302,0,0,1,0,0P0.25A0,0.000188,0,1,1402,0.545254,1083,0.32421,335,0.000188L1I1Zv5a0.64842,0,0,1,0,0P0.25A0,0.000188,182,1,153,0.297302,541,0.229251,319,0.000188L1I1Zv6a0.5,0,0,1,0,0P0.25A0,0.000188,2,0.229251,1,0.545254,7382,0.040526,430,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,162,1,1647,0.297302,2707,0.081052,1217,0.000188L1I1Zv1w4a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.006869b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o2Z\",\n\t/* 132: DX7 STRINGS 2  */ \"v2a0.162105,0,0,1,0,0P0.25A0,0.000188,7,1,2,0.545254,44073,0.000188,2904,0.000188L1I8Zv3a0.114626,0,0,1,0,0P0.25A0,0.000188,4,1,3,0.545254,44073,0.000188,4545,0.000188L1I2Zv4a0.272627,0,0,1,0,0P0.25A0,0.000188,97,0.917004,0,0.917004,29702,0.00426,1742,0.000188L1I2Zv5a1.090508,0,0,1,0,0P0.25A0,0.000188,81,1,2103,0.545254,44073,0.000188,523,0.000188L1I2.015Zv6a0.229251,0,0,1,0,0P0.25A0,0.000188,2,1,2550,0.545254,39446,0.00213,2953,0.000188L1I1.985Zv7a1.090508,0,0,1,0,0P0.25A0,0.000188,109,0.917004,0,0.917004,29702,0.00426,314,0.000188L1I2Zv1w0a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.006869b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o2Z\",\n\t/* 133: DX7 STRINGS 3  */ \"v2a0.040526,0,0,1,0,0P0.25A0,0.000188,64,1,8,0.545254,443,0.024097,218,0.000188L1I14Zv3a0.545254,0,0,1,0,0P0.25A0,0.000188,37,0.32421,1,0.545254,440,0.114626,288,0.000188L1I3Zv4a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,1402,0.545254,541,0.420448,346,0.000188L1I1Zv5a2,0,0,1,0,0P0.25A0,0.000188,91,1,34,0.545254,34,0.5,1582,0.000188L1I1Zv6a0.64842,0,0,1,0,0P0.25A0,0.000188,0,0.229251,1,0.545254,172,0.353553,479,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,72,1,424,0.545254,210,0.458502,1244,0.000188L1I1Zv1w0a1f4.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.015152b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o15Z\",\n\t/* 134: DX7 ORCHESTRA  */ \"v2a0.458502,0,0,1,0,0P0.25A0,0.000188,7,1,2,0.545254,44073,0.000188,2904,0.000188L1I2Zv3a0.385553,0,0,1,0,0P0.25A0,0.000188,4,1,3,0.545254,44073,0.000188,208,0.000188L1I2Zv4a0.192776,0,0,1,0,0P0.25A0,0.000188,43,0.917004,0,0.917004,29702,0.00426,395,0.000188L1I2Zv5a1.542211,0,0,1,0,0P0.25A0,0.000188,57,1,2103,0.545254,44073,0.000188,523,0.000188L1I2.015Zv6a0.5,0,0,1,0,0P0.25A0,0.000188,64,1,58,0.594604,145,0.458502,156,0.000188L1I0.9925Zv7a2,0,0,1,0,0P0.25A0,0.000188,2,0.917004,0,0.917004,29702,0.00426,395,0.000188L1I1Zv1w0a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.008758b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o2Z\",\n\t/* 135: DX7 PIANO   1  */ \"v2a0.458502,0,0,1,0,0P0.25A0,0.000188,0,1,24000,0.125,7911,0.000188,60000,0.000188L1I0.99875Zv3a1.189207,0,0,1,0,0P0.25A0,0.000188,2,1,208,0.000633,430,0.000188,1311,0.000188L1I1.57875Zv4a2,0,0,1,0,0P0.25A0,0.000188,2,1,2753,0.162105,11387,0.000188,659,0.000188L1I1.00125Zv5a0.052556,0,0,1,0,0P0.25A0,0.000188,2,1,0,1,0,1,32783,0.000188L1I3Zv6a0.707107,0,0,1,0,0P0.25A0,0.000188,0,1,24000,0.125,7911,0.000188,60000,0.000188L1I1.0025Zv7a2,0,0,1,0,0P0.25A0,0.000188,2,1,1793,0.229251,14802,0.000188,466,0.000188L1I0.9975Zv1w4a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.08A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o19Z\",\n\t/* 136: DX7 PIANO   2  */ \"v2a0.32421,0,0,1,0,0P0.25A0,0.000188,0,1,54,0.000188,0,0.000188,1846,0.000188L1I0.500625Zv3a1.29684,0,0,1,0,0P0.25A0,0.000188,0,1,54,0.000188,0,0.000188,3250,0.000188L1I0.5Zv4a0.545254,0,0,1,0,0P0.25A0,0.000188,0,1,1100,0.32421,18204,0.012049,5063,0.000188L1I0.99875Zv5a0.5,0,0,1,0,0P0.25A0,0.000188,0,1,1185,0.297302,15343,0.000188,370,0.000188L1I5.00625Zv6a0.64842,0,0,1,0,0P0.25A0,0.000188,0,1,24000,0.125,7911,0.000188,60000,0.000188L1I1.0025Zv7a1.29684,0,0,1,0,0P0.25A0,0.000188,2,1,4352,0.040526,29702,0.000188,370,0.000188L1I1Zv1w4a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.04A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o18Z\",\n\t/* 137: DX7 PIANO   3  */ \"v2a0.545254,0,0,1,0,0P0.25A0,0.000188,2,1,34,0.000977,5708,0.000188,28743,0.000188L1I0.50125Zv3a0.707107,0,0,1,0,0P0.25A0,0.000188,0,0.5,180,0.458502,60000,0.000188,53099,0.000188L1I0.9975Zv4a1.414214,0,0,1,0,0P0.25A0,0.000188,0,1,2,0.840896,7348,0.000188,659,0.000188L1I1.00375Zv5a1.681793,0,0,1,0,0P0.25A0,0.000188,0,0.25,3,0.0625,13427,0.000188,24000,0.000188L1I6.97375Zv6a0.594604,0,0,1,0,0P0.25A0,0.000188,0,0.5,30,0.458502,60000,0.000188,2904,0.000188L1I1.005Zv7a0.64842,0,0,1,0,0P0.25A0,0.000188,0,1,242,0.707107,7197,0.000188,659,0.000188L1I0.995Zv1w4a1f7.5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.02A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o3Z\",\n\t/* 138: DX7 E.PIANO 1  */ \"v2a0.353553,0,0,1,0,0P0.25A0,0.000188,0,1,271,0.707107,17148,0.000188,370,0.000188L1I1.00875Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,722,0.707107,17148,0.000188,370,0.000188L1I0.99125Zv4a0.840896,0,0,1,0,0P0.25A0,0.000188,0,1,271,0.707107,17148,0.000188,370,0.000188L1I1Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,722,0.707107,17148,0.000188,370,0.000188L1I1Zv6a0.057313,0,0,1,0,0P0.25A0,0.000188,0,1,148,0.125,2585,0.000188,14,0.000188L1I14Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,2531,0.125,7911,0.000188,52,0.000188L1I1.00375Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.08A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 139: DX7 GUITAR  1  */ \"v2a0.052556,0,0,1,0,0.000244P0.25A0,0.000188,0,1,273,0.000188,0,0.000188,20,0.000188L1I12Zv3a2,0,0,1,0,0P0.25A0,0.000188,2,1,0,0.545254,13431,0.000188,20,0.000188L1I3Zv4a0.840896,0,0,1,0,0P0.25A0,0.000188,2,1,0,0.545254,13431,0.000188,20,0.000188L1I3Zv5a2,0,0,1,0,0P0.25A0,0.000188,3,1,0,0.545254,13431,0.000188,20,0.000188L1I1Zv6a1.189207,0,0,1,0,0P0.25A0,0.000188,0,1,1371,0.32421,1879,0.000188,117,0.000188L1I3Zv7a2,0,0,1,0,0P0.25A0,0.000188,5,1,0,0.707107,8041,0.000188,36,0.000188L1I1Zv1w0a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.00146b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o8Z\",\n\t/* 140: DX7 GUITAR  2  */ \"v2a0.210224,0,0,1,0,0P0.25A0,0.000188,0,1,36,0.771105,19788,0.125,41,0.000188L1I3Zv3a0.594604,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,9200,0.136313,76000,0.000188L1I0.5Zv4a0.162105,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.771105,6309,0.125,41,0.000188L1I0.5Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,54,0.000188L1I1.5Zv6a0.707107,0,0,1,0,0P0.25A0,1,0,1,0,1,0,1,930,1L1I1Zv7a0.64842,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,54,0.000188L1I3Zv1w4a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o16Z\",\n\t/* 141: DX7 SYN-LEAD 1 */ \"v2a0.022097,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,3,0.840896,97000,0.000188L1I17Zv3a0.015625,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.052556,0,0.034078,60000,0.000188L1I2.9925Zv4a0.176777,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.458502,6818,0.000188,117,0.000188L1I2.005Zv5a0.458502,0,0,1,0,0P0.25A0,0.000188,0,0.594604,0,0.458502,90000,0.000188,60000,0.000188L1I1Zv6a0.176777,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.771105,7000,0.420448,89000,0.000188L1I0.99875Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,4000,0.707107,0,0.707107,58,0.000188L1I1.00125Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o18Z\",\n\t/* 142: DX7 BASS    1  */ \"v2a0.594604,0,0,1,0,0P0.25A0,0.000188,0,0.594604,201,0.00213,3294,0.000188,208,0.000188L1I9Zv3a0.081052,0,0,1,0,0P0.25A0,0.000188,0,1,99000,0.000188,0,0.000188,60000,0.000188L1I0.5Zv4a1.189207,0,0,1,0,0P0.25A0,0.000188,0,0.458502,930,0.002533,18490,0.000188,208,0.000188L1I5Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,0.176777,0,0.052556,3146,0.000188,3636,0.000188L1I0.5Zv6a0.385553,0,0,1,0,0P0.25A0,0.000188,0,1,17871,0.000188,0,0.000188,60000,0.000188L1I0.5Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,6,0.707107,15503,0.003012,78,0.000188L1I0.5Zv1w4a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o16Z\",\n\t/* 143: DX7 BASS    2  */ \"v2a0.707107,0,0,1,0,0P0.25A0,0.000188,1424,0.771105,3,0.840896,11411,0.000188,208,0.000188L1I0.500625Zv3a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,137,0.114626,74000,0.000188,60000,0.000188L1I1.01Zv4a2,0,0,1,0,0P0.25A0,0.000188,2,0.594604,786,0.026278,4318,0.000188,262,0.000188L1I0.5Zv5a0.136313,0,0,1,0,0P0.25A0,0.000188,5,0.840896,2004,0.162105,3775,0.000188,3636,0.000188L1I1.00875Zv6a0.385553,0,0,1,0,0P0.25A0,0.000188,1157,1,2718,0.000188,0,0.000188,370,0.000188L1I0.515Zv7a2,0,0,1,0,0P0.25A0,0.000188,5,1,796,0.081052,15555,0.000188,82,0.000188L1I0.505Zv1w0a1f5.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o17Z\",\n\t/* 144: DX7 E.ORGAN 1  */ \"v2a1.29684,0,0,1,0,0P0.25A0,0.000188,0,1,385,0.000188,0,0.000188,3,0.000188L1I3Zv3a1.29684,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,6,0.000188L1I1.0025Zv4a1.29684,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,6,0.000188L1I0.503125Zv5a1.29684,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,15,0.000188L1I1.505Zv6a1.29684,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,291,0.840896,5,0.000188L1I1.0025Zv7a1.29684,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,6,0.000188L1I0.49875Zv1w4a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.00125A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o32Z\",\n\t/* 145: DX7 PIPES   1  */ \"v2a0.272627,0,0,1,0,0P0.25A0,0.000188,7,1,0,1,0,1,60,0.000188L1I10Zv3a1.681793,0,0,1,0,0P0.25A0,0.000188,25,1,0,1,632,0.594604,161,0.000188L1I2Zv4a0.771105,0,0,1,0,0P0.25A0,0.000188,25,1,0,1,210,0.840896,599,0.000188L1I4Zv5a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,13,0.458502,785,0.000188L1I1Zv6a0.917004,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,13,0.458502,785,0.000188L1I0.5Zv7a2,0,0,1,0,0P0.25A0,0.000188,162,1,0,1,105,0.917004,3015,0.000188L1I0.5Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o19Z\",\n\t/* 146: DX7 HARPSICH 1 */ \"v2a0.707107,0,0,1,0,0P0.25A0,0.917004,0,1,0,0.840896,3,0.5,0,0.917004L1I6Zv3a0.5,0,0,1,0,0P0.25A0,0.000188,0,1,681,0.458502,7618,0.000188,523,0.000188L1I3.995Zv4a2,0,0,1,0,0P0.25A0,0.917004,0,1,0,0.840896,3,0.5,0,0.917004L1I3Zv5a0.594604,0,0,1,0,0P0.25A0,0.000188,0,1,681,0.458502,7618,0.000188,523,0.000188L1I0.99875Zv6a2,0,0,1,0,0P0.25A0,0.917004,0,1,0,0.840896,3,0.5,0,0.917004L1I0.5Zv7a0.840896,0,0,1,0,0P0.25A0,0.000188,0,1,681,0.458502,7618,0.000188,523,0.000188L1I4Zv1w4a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.0025A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o5Z\",\n\t/* 147: DX7 CLAV    1  */ \"v2a0.32421,0,0,1,0,0P0.25A0,0.000188,0,0.353553,0,0.32421,86000,0.000188,60000,0.000188L1I8Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.771105,7000,0.420448,89000,0.000188L1I0.49875Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.458502,6818,0.000188,117,0.000188L1I2Zv5a0.176777,0,0,1,0,0P0.25A0,0.000188,0,0.353553,0,0.32421,86000,0.000188,60000,0.000188L1I6Zv6a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.771105,7000,0.420448,89000,0.000188L1I0.499375Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.458502,6818,0.000188,117,0.000188L1I0.500625Zv1w0a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.04A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o3Z\",\n\t/* 148: DX7 VIBE    1  */ \"v2a0.052556,0,0,1,0,0P0.25A0,0.000188,0,1,521,0.003012,0,0.000188,370,0.000188L1I14Zv3a2,0,0,1,0,0P0.25A0,0.000188,2,1,0,0.458502,5647,0.007164,259,0.000188L1I1.00875Zv4a2,0,0,1,0,0P0.25A0,0.000188,2,1,0,0.458502,10588,0.000188,370,0.000188L1I0.99125Zv5a0.192776,0,0,1,0,0P0.25A0,0.000188,2,1,2,0.114626,1022,0.000188,370,0.000188L1I3Zv6a2,0,0,1,0,0P0.25A0,0.000188,2,1,0,0.458502,10588,0.000188,370,0.000188L1I1Zv7a0.028656,0,0,1,0,0P0.25A0,0.000188,0,1,5606,0.001642,0,0.000188,370,0.000188L1I4Zv1w4a1f4.333333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.04A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o23Z\",\n\t/* 149: DX7 MARIMBA    */ \"v2a2,0,0,1,0,0P0.25A0,0.000188,12896,0.162105,0,0.162105,270,0.000188,60000,0.000188L1I4.52Zv3a1.189207,0,0,1,0,0P0.25A0,0.000188,0,0.229251,11,0.012049,48000,0.000188,34092,0.000188L1I0.75Zv4a0.594604,0,0,1,0,0P0.25A0,0.000188,0,0.229251,11,0.012049,48000,0.000188,9,0.000188L1I5Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,302,0.545254,638,0.000188,1043,0.000188L1I0.5Zv6a1.542211,0,0,1,0,0P0.25A0,0.000188,0,0.229251,16,0.012049,48000,0.000188,60000,0.000188L1I3Zv7a1.414214,0,0,1,0,0P0.25A0,0.000188,0,1,136,0.545254,638,0.000188,208,0.000188L1I0.5Zv1w4a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.00125A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o7Z\",\n\t/* 150: DX7 KOTO       */ \"v2a0.420448,0,0,1,0,0P0.25A0,0.000188,2,1,78,0.210224,2224,0.000188,466,0.000188L1I3Zv3a0.5,0,0,1,0,0P0.25A0,0.000188,0,1,247,0.458502,6099,0.000188,4066,0.000188L1I4Zv4a0.458502,0,0,1,0,0P0.25A0,0.000188,0,1,1742,0.136313,18702,0.000188,1311,0.000188L1I1Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,8,0.545254,5575,0.000188,2594,0.000188L1I1Zv6a2,0,0,1,0,0P0.25A0,0.000188,0,1,12,0.25,6288,0.000188,466,0.000188L1I4Zv7a0.917004,0,0,1,0,0P0.25A0,0.000188,0,1,10,0.545254,226,0.000188,2316,0.000188L1I1Zv1w0a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.014596b0.16A0,1,4,0.978572,2,1,0,1,12000,1L1O2,3,4,5,6,7o2Z\",\n\t/* 151: DX7 FLUTE   1  */ \"v2a0.5,0,0,1,0,0P0.25A0,0.000188,0,1,39,0.0625,0,0.017039,90,0.000188L1I1.535Zv3a0.048194,0,0,1,0,0P0.25A0,0.000188,16,1,2425,0.000188,0,0.000188,104,0.000188L1I2Zv4a0.000377,0,0,1,0,0P0.25A0,0.000188,25,1,0,1,210,0.840896,189,0.000188L1I2Zv5a0.272627,0,0,1,0,0.000581P0.25A0,0.000188,40,0.385553,1077,0.00852,6,0.001506,41,0.000188L1I0.99625Zv6a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,13,0.458502,350,0.000188L1I1.005Zv7a1.834008,0,0,1,0,0P0.25A0,0.000188,19,0.594604,3,0.420448,2,0.917004,107,0.000188L1I0.9975Zv1w4a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.00404b0.04A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o16Z\",\n\t/* 152: DX7 ORCH-CHIME */ \"v2a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,99000,0.000188L1I0.99125Zv3a1.834008,0,0,1,0,0P0.25A0,0.000188,257,1,0,1,0,1,3822,0.000188L1I1.00875Zv4a1,0,0,1,0,0P0.25A0,0.000188,1,0.385553,4,0.192776,41792,0.000188,24000,0.000188L1I3.14Zv5a2,0,0,1,0,0P0.25A0,0.000188,2,1,27,0.707107,23378,0.000188,3636,0.000188L1I0.5Zv6a0.707107,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,99000,0.000188L1I0.503125Zv7a1.681793,0,0,1,0,0P0.25A0,0.000188,578,1,0,1,0,1,3822,0.000188L1I0.503125Zv1w4a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.007298b0.16A0,1,0,1,0,1,0,1,179,1L1O2,3,4,5,6,7o5Z\",\n\t/* 153: DX7 TUB BELLS  */ \"v2a0.594604,0,0,1,0,0P0.25A0,0.000188,0,1,5,0.000188,0,0.000188,4545,0.000188L1I1.9825Zv3a2,0,0,1,0,0f323.593657P0.25A0,0.000188,4,1,24,0.000188,0,0.000188,36,0.000188L1Zv4a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,39600,0.000188,0,0.003012,2424,0.000188L1I3.495Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,4280,0.000188,0,0.003012,3375,0.000188L1I0.99375Zv6a0.32421,0,0,1,0,0P0.25A0,0.000188,0,1,39600,0.000188,0,0.003012,2424,0.000188L1I3.5075Zv7a1.414214,0,0,1,0,0P0.25A0,0.000188,0,1,4280,0.000188,0,0.003012,3375,0.000188L1I1.0025Zv1w2a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 154: DX7 STEEL DRUM */ \"v2a0.026278,0,0,1,0,0f398.107171P0.25A0,0.000188,0,0.5,62,0.229251,6212,0.000188,24000,0.000188L1Zv3a0.096388,0,0,1,0,0P0.25A0,0.000188,0,0.5,175,0.229251,2008,0.000188,60000,0.000188L1I5.32Zv4a0.771105,0,0,1,0,0P0.25A0,0.000188,0,0.5,110,0.229251,506,0.000188,9745,0.000188L1I2.0175Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,424,0.545254,3171,0.000188,930,0.000188L1I1Zv6a0.096388,0,0,1,0,0P0.25A0,0.000188,0,1,2404,0.353553,15704,0.000188,31344,0.000188L1I1.7Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,136,0.545254,3977,0.000188,1469,0.000188L1I1Zv1w0a1f4.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.008586b0.04A0,1,0,1,0,1,0,1,1067,1L1O2,3,4,5,6,7o15Z\",\n\t/* 155: DX7 TIMPANI    */ \"v2a0.210224,0,0,1,0,0P0.25A0,0.000188,0,0.917004,86728,0.000188,0,0.000188,5078,0.000188L1I0.78Zv3a0.210224,0,0,1,0,0P0.25A0,0.000188,0,1,611,0.000188,0,0.000188,12024,0.000188L1I0.5Zv4a0.707107,0,0,1,0,0P0.25A0,0.000188,0,1,1300,0.125,18456,0.000188,3636,0.000188L1I0.875Zv5a0.594604,0,0,1,0,0P0.25A0,0.000188,0,1,7,0.096388,6805,0.000188,7866,0.000188L1I0.678125Zv6a0.64842,0,0,1,0,0P0.25A0,0.000188,0,1,38,0.000188,0,0.000188,60000,0.000188L1I0.501875Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,3046,0.000188,0,0.000188,2594,0.000188L1I0.5Zv1w4a1f1.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.013737b0.16A0,1,0,1,3,1.021897,7,1,731,1L1O2,3,4,5,6,7o16Z\",\n\t/* 156: DX7 REFS WHISL */ \"v2a0.32421,0,0,1,0,0f10P0.25A0,0.000188,0,0.771105,55,0.162105,9176,0.000188,208,0.000188L1Zv3a0.096388,0,0,1,0,0f1P0.25A0,0.000188,0,1,99000,0.000188,0,0.000188,60000,0.000188L1Zv4a0.25,0,0,1,0,0f6606.93448P0.25A0,0.000188,0,0.771105,5,0.420448,10470,0.000188,208,0.000188L1Zv5a0.114626,0,0,1,0,0f46.773514P0.25A0,0.000188,28,1,0,1,0,1,99000,0.000188L1Zv6a1.189207,0,0,1,0,0f33.884416P0.25A0,0.000188,28,1,0,1,0,1,1087,0.000188L1Zv7a0.917004,0,0,1,0,0f2089.296131P0.25A0,0.000188,28,1,0,1,0,1,686,0.000188L1Zv1w5a1f50.29P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.005A0,1,313,0.78799,103,1,0,1,731,1L1O2,3,4,5,6,7o18Z\",\n\t/* 157: DX7 VOICE   1  */ \"v2a0.044194,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,24362,0.000188L1I5.10625Zv3a0.037163,0,0,1,0,0P0.25A0,0.000188,515,1,1461,0.458502,153,0.297302,117,0.000188L1I1.00875Zv4a2,0,0,1,0,0P0.25A0,0.000411,0,0.012049,291,0.028656,660,0.001065,4400,0.000411L1I1.02375Zv5a2,0,0,1,0,0P0.25A0,0.000188,649,1,902,0.64842,7,0.840896,2119,0.000188L1I1.00875Zv6a2,0,0,1,0,0.000224P0.25A0,0.015625,0,0.015625,137,0.037163,11,0.136313,2637,0.015625L1I1Zv7a0.707107,0,0,1,0,0P0.25A0,0.000188,578,1,902,0.64842,7,0.840896,267,0.000188L1I0.99125Zv1w4a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.027294b0.16A0,1,137,0.957603,36,1.021897,3,1,731,1L1O2,3,4,5,6,7o7Z\",\n\t/* 158: DX7 TRAIN      */ \"v2a2,0,0,1,0,0P0.25A0,0.917004,4,1,0,1,0,1,4,0.917004L1I5Zv3a0.5,0,0,1,0,1P0.25A0,1,0,1,0,1,0,1,262,1L1I9.03375Zv4a0.840896,0,0,1,0,0f971.627952P0.25A0,0.000188,0,1,6709,0.000188,0,0.000188,5078,0.000188L1Zv5a2,0,0,1,0,0f373.680125P0.25A0,0.000188,0,1,6709,0.000188,0,0.000188,2594,0.000188L1Zv6a0.192776,0,0,1,0,0P0.25A0,0.000188,324,1,13843,0.037163,401,0.057313,32,0.000188L1I3.03Zv7a2,0,0,1,0,0P0.25A0,0.000188,16,1,1647,0.297302,0,0.297302,234,0.000188L1I1.64Zv1w4a1f6.5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 159: DX7 TAKE OFF   */ \"v2a2,0,0,1,0,0P0.25A0,0.000188,1,1,1021,0.545254,16607,0.000188,1043,0.000188L1I0.5Zv3a1.542211,0,0,1,0,0P0.25A0,0.000188,1,1,1058,0.458502,11799,0.000188,1647,0.000188L1I2.02Zv4a2,0,0,1,0,0P0.25A0,0.000188,6550,1,1324,0.707107,487,1,6000,0.000188L1I0.5Zv5a2,0,0,1,0,0P0.25A0,0.000188,1,0.0625,999,0.005066,0,0.105112,31992,0.000188L1I6.06Zv6a1.542211,0,0,1,0,0P0.25A0,0.000188,1,0.192776,1,0.707107,19038,0.000188,19868,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,2303,0.037163,3783,0.771105,23624,0.000188,2316,0.000188L1I4.04Zv1w3a1f11.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.00125A0,15.657153,1791,1,1712,0.231848,264,1.957144,1368,15.657153L1O2,3,4,5,6,7o10Z\",\n\t/* 160: DX7 PIANO   4  */ \"v2a0.32421,0,0,1,0,0P0.25A0,0.000188,0,1,54,0.000188,0,0.000188,1846,0.000188L1I0.500625Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,54,0.000188,0,0.000188,3250,0.000188L1I0.5Zv4a0.192776,0,0,1,0,0P0.25A0,0.000188,0,1,1100,0.32421,18204,0.012049,5063,0.000188L1I0.99875Zv5a0.385553,0,0,1,0,0P0.25A0,0.000188,0,1,1185,0.297302,15343,0.000188,370,0.000188L1I4.005Zv6a0.64842,0,0,1,0,0P0.25A0,0.000188,0,1,24000,0.125,7911,0.000188,60000,0.000188L1I1.0025Zv7a0.917004,0,0,1,0,0P0.25A0,0.000188,2,1,4352,0.040526,62000,0.000188,370,0.000188L1I1Zv1w4a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.04A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o18Z\",\n\t/* 161: DX7 PIANO   5  */ \"v2a0.125,0,0,1,0,0P0.25A0,0.000188,0,0.000266,0,0.000977,821,0.000188,24000,0.000188L1I5Zv3a0.25,0,0,1,0,0P0.25A0,0.000188,0,0.5,180,0.458502,60000,0.000188,53099,0.000188L1I1Zv4a2,0,0,1,0,0P0.25A0,0.000188,9,1,848,0.297302,11144,0.000188,370,0.000188L1I1Zv5a1.090508,0,0,1,0,0P0.25A0,0.000188,0,0.114626,8933,0.000977,821,0.000188,24000,0.000188L1I3Zv6a0.192776,0,0,1,0,0P0.25A0,0.000188,0,0.5,30,0.458502,60000,0.000188,2904,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,9,1,848,0.297302,11144,0.000188,370,0.000188L1I1Zv1w4a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.08A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o3Z\",\n\t/* 162: DX7 E.PIANO 2  */ \"v2a0.64842,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,99000,0.000188,6,0.000188L1I1Zv3a0.037163,0,0,1,0,0P0.25A0,0.000188,0,0.353553,783,0.022097,2123,0.000188,46,0.000188L1I11.0275Zv4a1.189207,0,0,1,0,0P0.25A0,0.000188,0,1,172,0.000188,0,0.000188,14,0.000188L1I0.505625Zv5a2,0,0,1,0,0P0.25A0,0.000188,2,1,5,0.458502,3102,0.000188,208,0.000188L1I1.00125Zv6a0.25,0,0,1,0,0P0.25A0,0.000188,1,1,0,0.594604,16787,0.000188,233,0.000188L1I1.00375Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.594604,16787,0.000188,233,0.000188L1I0.99875Zv1w0a1f2.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o12Z\",\n\t/* 163: DX7 E.PIANO 3  */ \"v2a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,191,0.034078,6329,0.000188,233,0.000188L1I3Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.707107,17148,0.000188,165,0.000188L1I1Zv4a0.006024,0,0,1,0,0P0.25A0,0.000188,0,1,13,0.210224,29509,0.000188,233,0.000188L1I14Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,1029,0.192776,14441,0.000188,233,0.000188L1I1Zv6a0.229251,0,0,1,0,0P0.25A0,0.000188,0,1,24000,0.125,7911,0.000188,233,0.000188L1I2Zv7a1.834008,0,0,1,0,0P0.25A0,0.000188,0,1,1037,0.125,6348,0.000188,233,0.000188L1I1Zv1w4a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 164: DX7 E.PIANO 4  */ \"v2a0.176777,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.707107,17148,0.000188,20,0.000188L1I1Zv3a0.707107,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.707107,6438,0.000188,165,0.000188L1I1Zv4a0.136313,0,0,1,0,0P0.25A0,0.000188,0,1,1,0.034078,310,0.006024,196,0.000188L1I14Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,175,0.458502,6099,0.000188,20,0.000188L1I1Zv6a0.840896,0,0,1,0,0P0.25A0,1,0,1,0,0.125,7911,0.000188,11,1L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,331,0.125,4062,0.000188,6,0.000188L1I1Zv1w4a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.02A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 165: DX7 PIANO 5THS */ \"v2a0.057313,0,0,1,0,0P0.25A0,0.000188,0,1,949,0.458502,8507,0.000188,117,0.000188L1I1.50375Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,949,0.458502,8507,0.000188,117,0.000188L1I1.4975Zv4a0.192776,0,0,1,0,0P0.25A0,0.000188,0,0.297302,3,0.081052,70000,0.000188,1311,0.000188L1I8Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,1322,0.009291,4253,0.000188,117,0.000188L1I0.99125Zv6a0.458502,0,0,1,0,0P0.25A0,0.000188,0,1,13,0.545254,92000,0.000188,147,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,440,0.210224,7656,0.000188,117,0.000188L1I1.00875Zv1w4a1f8.333333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.083283b0.01A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o5Z\",\n\t/* 166: DX7 CELESTE    */ \"v2a0.105112,0,0,1,0,0P0.25A0,0.000188,0,1,1151,0.192776,8439,0.000188,1169,0.000188L1I5Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,2,0.192776,8439,0.000188,1169,0.000188L1I1Zv4a1.681793,0,0,1,0,0P0.25A0,0.000188,0,1,1151,0.192776,8439,0.000188,1169,0.000188L1I1Zv5a0.771105,0,0,1,0,0P0.25A0,0.000188,0,1,1151,0.192776,8439,0.000188,1169,0.000188L1I0.9925Zv6a0.64842,0,0,1,0,0P0.25A0,0.000188,0,1,1151,0.192776,8439,0.000188,1169,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,1151,0.192776,8439,0.000188,1169,0.000188L1I1Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.04A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o31Z\",\n\t/* 167: DX7 TOY PIANO  */ \"v2a0.594604,0,0,1,0,0.000188P0.25A0,0.000188,0,1,0,1,3046,0.000188,1043,0.000188L1I1.04Zv3a0.114626,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,1534,0.000188L1I12.12Zv4a0.136313,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,6000,0.000188L1I12.6Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,15,0.081052,1529,0.000188,930,0.000188L1I4.44Zv6a1.834008,0,0,1,0,0P0.25A0,0.000188,0,1,15,0.081052,4242,0.000188,930,0.000188L1I2.02Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,3046,0.000188,1043,0.000188L1I1Zv1w0a1f6P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o30Z\",\n\t/* 168: DX7 HARPSICH 2 */ \"v2a0.840896,0,0,1,0,0P0.25A0,1,0,1,0,1,189,0.840896,0,1L1I1Zv3a0.385553,0,0,1,0,0P0.25A0,0.000188,0,0.458502,1060,0.136313,19,0.125,1462,0.000188L1I8Zv4a0.594604,0,0,1,0,0P0.25A0,0.000188,0,1,2,0.458502,5454,0.000188,587,0.000188L1I3Zv5a0.32421,0,0,1,0,0P0.25A0,1,0,1,0,1,189,0.840896,0,1L1I2.99625Zv6a1.29684,0,0,1,0,0P0.25A0,0.000188,0,0.458502,12389,0.136313,0,0.125,1462,0.000188L1I1Zv7a0.458502,0,0,1,0,0P0.25A0,0.000188,3,1,3,0.458502,5454,0.000188,587,0.000188L1I1Zv1w4a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.00125A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o3Z\",\n\t/* 169: DX7 HARPSICH 3 */ \"v2a0.32421,0,0,1,0,0P0.25A0,1,0,1,0,1,189,0.840896,0,1L1I1Zv3a1.542211,0,0,1,0,0P0.25A0,0.000188,0,0.458502,12389,0.136313,19,0.125,1462,0.000188L1I4Zv4a0.594604,0,0,1,0,0P0.25A0,0.000188,0,1,5,0.458502,5454,0.000188,416,0.000188L1I1Zv5a0.272627,0,0,1,0,0P0.25A0,1,0,1,0,1,189,0.840896,0,1L1I2.99625Zv6a1.414214,0,0,1,0,0P0.25A0,0.000188,0,0.458502,12389,0.136313,19,0.125,1462,0.000188L1I0.5Zv7a0.917004,0,0,1,0,0P0.25A0,0.000188,0,1,5,0.458502,5454,0.000188,262,0.000188L1I1Zv1w4a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.0025A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o3Z\",\n\t/* 170: DX7 CLAV    2  */ \"v2a0.32421,0,0,1,0,0P0.25A0,0.000188,0,0.353553,0,0.32421,86000,0.000188,60000,0.000188L1I8Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.162105,6396,0.420448,89000,0.000188L1I0.49875Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,17,0.297302,6439,0.000188,117,0.000188L1I2Zv5a0.385553,0,0,1,0,0P0.25A0,0.000188,0,0.353553,6,0.32421,86000,0.000188,60000,0.000188L1I5.985Zv6a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.771105,7000,0.420448,89000,0.000188L1I0.499375Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,4,0.297302,6439,0.000188,117,0.000188L1I2.0025Zv1w4a1f6.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.04A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o4Z\",\n\t/* 171: DX7 CLAV    3  */ \"v2a0.125,0,0,1,0,0P0.25A0,0.000188,0,0.136313,17973,0.015625,12550,0.000188,3636,0.000188L1I12.045Zv3a1,0,0,1,0,0P0.25A0,0.000188,0,1,589,0.037163,18326,0.000188,1,0.000188L1I0.5Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,12979,0.000188,7,0.000188L1I2Zv5a0.297302,0,0,1,0,0P0.25A0,0.000188,0,1,984,0.707107,23378,0.000188,58,0.000188L1I3Zv6a1.189207,0,0,1,0,0P0.25A0,0.000188,0,1,305,0.297302,13805,0.000188,3636,0.000188L1I0.504375Zv7a2,0,0,1,0,0P0.25A0,0.000188,2,1,193,0.707107,21111,0.000188,58,0.000188L1I0.5Zv1w4a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.00125A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o4Z\",\n\t/* 172: DX7 E.ORGAN 2  */ \"v2a0.176777,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I1Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,1029,0.192776,0,0.192776,1,0.000188L1I3Zv4a0.420448,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I0.9975Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I2.0025Zv6a1.834008,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I1.50125Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I1Zv1w0a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.08A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o29Z\",\n\t/* 173: DX7 E.ORGAN 3  */ \"v2a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,172,0.000188,0,0.000188,1,0.000188L1I4Zv3a0.64842,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I2Zv4a0.176777,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I5Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I2Zv6a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I1.00125Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I0.5Zv1w0a1f5.5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.00125A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o29Z\",\n\t/* 174: DX7 E.ORGAN 4  */ \"v2a2,0,0,1,0,0P0.25A0,0.000188,0,0.32421,7,0.014328,1,0.000188,9,0.000188L1I4.035Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.458502,37,0.272627,12,0.000188L1I5Zv4a2,0,0,1,0,0P0.25A0,0.000188,3,1,0,0.420448,0,0.192776,12,0.000188L1I0.49875Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,0.840896,14,0.000188L1I1.00875Zv6a0.458502,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,0.840896,14,0.000188L1I0.50125Zv7a1.414214,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,15,0.000188L1I0.49875Zv1w4a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 175: DX7 E.ORGAN 5  */ \"v2a0.210224,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I1Zv3a0.840896,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I3Zv4a0.917004,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I3Zv5a0.917004,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I3Zv6a0.917004,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I2Zv7a1,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,2,0.000188L1I0.5Zv1w0a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.011111b0.08A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o29Z\",\n\t/* 176: DX7 PIPES   2  */ \"v2a0.068157,0,0,1,0,0P0.25A0,0.000188,7,0.458502,0,0.64842,97,0.000691,58,0.000188L1I19Zv3a0.707107,0,0,1,0,0f1P0.25A0,0.000188,0,1,0,1,13,0.458502,350,0.000188L1Zv4a0.385553,0,0,1,0,0P0.25A0,0.000188,51,1,0,1,632,0.594604,101,0.000188L1I2Zv5a0.385553,0,0,1,0,0P0.25A0,0.000188,19,0.458502,0,0.64842,24,0.014328,194,0.000188L1I8Zv6a0.297302,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,13,0.458502,350,0.000188L1I1Zv7a0.385553,0,0,1,0,0P0.25A0,0.000188,51,1,0,1,632,0.594604,101,0.000188L1I2Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o3Z\",\n\t/* 177: DX7 PIPES   3  */ \"v2a0.057313,0,0,1,0,0P0.25A0,0.000188,1,1,0,1,0,1,108,0.000188L1I4.04Zv3a0.385553,0,0,1,0,0P0.25A0,0.000188,0,0.034078,8,1,0,1,34,0.000188L1I8.08Zv4a1.834008,0,0,1,0,0P0.25A0,0.000188,2,0.176777,1,1,0,1,611,0.000188L1I2.0175Zv5a0.707107,0,0,1,0,0P0.25A0,0.000188,4,1,0,1,0,1,136,0.000188L1I1.01Zv6a2,0,0,1,0,0P0.25A0,0.000188,0,0.026278,0,0.017039,35,1,121,0.000188L1I4.04Zv7a2,0,0,1,0,0P0.25A0,0.000188,4,1,0,0.840896,0,1,770,0.000188L1I0.5Zv1w0a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.01A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o25Z\",\n\t/* 178: DX7 PIPES   4  */ \"v2a0.545254,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,1087,0.000188L1I4Zv3a0.64842,0,0,1,0,0P0.25A0,0.000188,14,1,0,1,0,1,545,0.000188L1I2Zv4a0.297302,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,611,0.000188L1I1Zv5a2,0,0,1,0,0P0.25A0,0.000188,40,1,0,1,13,0.458502,350,0.000188L1I2Zv6a0.771105,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,13,0.458502,350,0.000188L1I0.5Zv7a2,0,0,1,0,0P0.25A0,0.000188,28,1,0,1,105,0.917004,53,0.000188L1I1Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.00125A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o6Z\",\n\t/* 179: DX7 CALIOPE    */ \"v2a0.458502,0,0,1,0,0P0.25A0,0.000188,8,1,39,0.0625,0,0.017039,90,0.000188L1I7.045Zv3a0.048194,0,0,1,0,0P0.25A0,0.000188,16,1,2425,0.000188,0,0.000188,104,0.000188L1I2Zv4a0.25,0,0,1,0,0P0.25A0,0.000188,25,1,0,1,210,0.840896,189,0.000188L1I1.9825Zv5a0.125,0,0,1,0,0P0.25A0,0.000188,40,0.385553,1077,0.00852,6,0.001506,41,0.000188L1I2.0375Zv6a0.25,0,0,1,0,0P0.25A0,0.000188,32,1,170,0.034078,92,0.000188,233,0.000188L1I4.6Zv7a1.834008,0,0,1,0,0P0.25A0,0.000188,14,0.229251,3,0.125,6,0.707107,104,0.000188L1I1Zv1w4a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.04A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o16Z\",\n\t/* 180: DX7 ACCORDION  */ \"v2a0.148651,0,0,1,0,0P0.25A0,0.000188,0,0.458502,286,0.545254,11497,0.068157,420,0.000188L1I6.0075Zv3a0.25,0,0,1,0,0P0.25A0,0.000188,20,1,2103,0.545254,11497,0.068157,666,0.000188L1I0.99875Zv4a0.917004,0,0,1,0,0P0.25A0,0.000188,51,1,2103,0.545254,2439,1,68,0.000188L1I2Zv5a0.048194,0,0,1,0,0P0.25A0,0.000188,1,1,2103,0.545254,10060,0.088388,695,0.000188L1I3.0075Zv6a1,0,0,1,0,0P0.25A0,0.000188,0,1,2103,0.545254,10060,0.088388,43,0.000188L1I0.500625Zv7a0.707107,0,0,1,0,0P0.25A0,0.000188,51,1,2103,0.545254,4790,0.229251,25,0.000188L1I1Zv1w0a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o3Z\",\n\t/* 181: DX7 SITAR      */ \"v2a0.009291,0,0,1,0,0P0.25A0,0.000188,0,1,17,0.917004,9263,0.000188,28743,0.000188L1I9.01125Zv3a0.707107,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.917004,9263,0.000188,36980,0.000188L1I0.99375Zv4a0.917004,0,0,1,0,0P0.25A0,0.000188,0,1,17,0.917004,1519,0.000188,36980,0.000188L1I6.97375Zv5a1,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.917004,9263,0.000188,4545,0.000188L1I1Zv6a1.681793,0,0,1,0,0P0.25A0,0.000188,0,1,17,0.917004,9263,0.000188,36980,0.000188L1I1Zv7a0.210224,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.917004,9263,0.000188,930,0.000188L1I20Zv1w4a1f4.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.00125A0,1,0,1,0,1,0,1,179,1L1O2,3,4,5,6,7o8Z\",\n\t/* 182: DX7 GUITAR  3  */ \"v2a0.840896,0,0,1,0,0P0.25A0,0.000188,0,1,5454,0.001953,3176,0.000188,262,0.000188L1I5Zv3a0.074325,0,0,1,0,0P0.25A0,0.000188,62,0.771105,9046,0.001953,3176,0.000188,262,0.000188L1I1Zv4a0.088388,0,0,1,0,0P0.25A0,0.000188,0,1,5454,0.001953,3176,0.000188,262,0.000188L1I3Zv5a0.594604,0,0,1,0,0P0.25A0,0.000188,5,1,5454,0.001953,3176,0.000188,58,0.000188L1I1Zv6a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,5454,0.001953,3176,0.000188,262,0.000188L1I1.0025Zv7a0.64842,0,0,1,0,0P0.25A0,0.000188,5,1,5454,0.001953,3176,0.000188,58,0.000188L1I1Zv1w0a1f6.5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.000505b0.02A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o14Z\",\n\t/* 183: DX7 GUITAR  4  */ \"v2a0.917004,0,0,1,0,0P0.25A0,0.000188,0,1,24553,0.017039,52000,0.000188,262,0.000188L1I3Zv3a0.068157,0,0,1,0,0P0.25A0,0.000188,0,0.771105,3068,0.176777,739,0.420448,389,0.000188L1I1Zv4a0.32421,0,0,1,0,0P0.25A0,0.000188,0,1,7595,0.001953,6644,0.000188,262,0.000188L1I4Zv5a0.594604,0,0,1,0,0P0.25A0,0.000188,5,1,1029,0.192776,14441,0.000188,208,0.000188L1I1Zv6a1.834008,0,0,1,0,0P0.25A0,0.000188,0,1,99000,0.000188,0,0.000188,60000,0.000188L1I1.0025Zv7a0.114626,0,0,1,0,0P0.25A0,0.000188,0,1,686,0.000188,0,0.000188,58,0.000188L1I3Zv1w0a1f6.5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.000505b0.02A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o14Z\",\n\t/* 184: DX7 GUITAR  5  */ \"v2a0.353553,0,0,1,0,0P0.25A0,0.000188,0,1,3185,0.017039,10421,0.000188,930,0.000188L1I4.975Zv3a0.068157,0,0,1,0,0P0.25A0,0.000188,0,0.771105,3068,0.176777,739,0.420448,550,0.000188L1I0.995Zv4a0.32421,0,0,1,0,0P0.25A0,0.000188,0,1,7595,0.001953,6644,0.000188,370,0.000188L1I3.98Zv5a0.545254,0,0,1,0,0P0.25A0,0.000188,5,1,1029,0.192776,14441,0.000188,1169,0.000188L1I0.995Zv6a1.090508,0,0,1,0,0P0.25A0,0.000188,0,1,1929,0.000188,0,0.000188,18026,0.000188L1I6.0375Zv7a0.420448,0,0,1,0,0P0.25A0,0.000188,0,1,4280,0.000188,0,0.000188,416,0.000188L1I8.05Zv1w0a1f6.5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.000505b0.02A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o14Z\",\n\t/* 185: DX7 GUITAR  6  */ \"v2a0.420448,0,0,1,0,0P0.25A0,0.000188,2,1,78,0.210224,2224,0.000188,466,0.000188L1I6Zv3a1,0,0,1,0,0P0.25A0,0.000188,0,1,247,0.458502,6099,0.000188,4066,0.000188L1I4Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,86,0.545254,3171,0.000188,2316,0.000188L1I2Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,530,0.545254,5575,0.000188,2594,0.000188L1I1Zv6a0.840896,0,0,1,0,0P0.25A0,0.000188,0,1,349,0.25,3588,0.000188,16327,0.000188L1I2Zv7a1.090508,0,0,1,0,0P0.25A0,0.000188,0,1,86,0.545254,3171,0.000188,2316,0.000188L1I2Zv1w0a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,951,1L1O2,3,4,5,6,7o3Z\",\n\t/* 186: DX7 LUTE       */ \"v2a0.192776,0,0,1,0,0P0.25A0,0.000188,0,1,60,0.000188,0,0.000188,466,0.000188L1I6.0075Zv3a0.068157,0,0,1,0,0P0.25A0,0.000188,0,1,4280,0.000188,0,0.000188,32,0.000188L1I4Zv4a0.009291,0,0,1,0,0P0.25A0,0.000188,0,1,3822,0.000188,0,0.000188,32,0.000188L1I2.0075Zv5a2,0,0,1,0,0P0.25A0,0.000188,2,1,3822,0.000188,0,0.000188,1469,0.000188L1I1Zv6a0.210224,0,0,1,0,0P0.25A0,0.000188,0,1,3822,0.000188,0,0.000188,32,0.000188L1I2Zv7a0.545254,0,0,1,0,0P0.25A0,0.000188,2,1,3822,0.000188,0,0.000188,1469,0.000188L1I1Zv1w4a1f4.5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.002481b0.16A0,1,0,1,0,1,0,1,179,1L1O2,3,4,5,6,7o14Z\",\n\t/* 187: DX7 BANJO      */ \"v2a0.707107,0,0,1,0,0P0.25A0,0.000188,0,1,2,0.148651,1064,0.000188,32,0.000188L1I15Zv3a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.917004,9263,0.000188,466,0.000188L1I1.00375Zv4a0.32421,0,0,1,0,0P0.25A0,0.000188,0,1,242,0.707107,17148,0.000188,233,0.000188L1I4.9875Zv5a1,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,1220,0.000188,185,0.000188L1I1.0025Zv6a0.385553,0,0,1,0,0P0.25A0,0.000188,0,1,17871,0.000188,0,0.000188,60000,0.000188L1I1.06Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,60,0.034078,4545,0.000188,147,0.000188L1I1Zv1w4a1f1P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.00146b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o8Z\",\n\t/* 188: DX7 HARP    1  */ \"v2a0.64842,0,0,1,0,0.000188P0.25A0,0.000188,0,0.64842,146,0.176777,5985,0.000188,7866,0.000188L1I2Zv3a0.044194,0,0,1,0,0P0.25A0,0.000188,0,1,710,0.081052,1,0.000188,14765,0.000188L1I1Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,1965,0.081052,485,0.000188,3636,0.000188L1I1Zv5a0.707107,0,0,1,0,0P0.25A0,0.000188,0,1,449,0.081052,862,0.000188,2068,0.000188L1I1Zv6a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,1757,0.081052,1,0.000188,3636,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,2454,0.081052,769,0.000188,3250,0.000188L1I1Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o3Z\",\n\t/* 189: DX7 HARP    2  */ \"v2a0.917004,0,0,1,0,0.000188P0.25A0,0.000188,0,0.64842,146,0.176777,5985,0.000188,7058,0.000188L1I2.97375Zv3a0.353553,0,0,1,0,0P0.25A0,0.000188,0,1,999,0.081052,1,0.000188,4545,0.000188L1I3.015Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,1403,0.081052,485,0.000188,2594,0.000188L1I0.995Zv5a0.081052,0,0,1,0,0P0.25A0,0.000188,0,1,179,0.081052,862,0.000188,28743,0.000188L1I2.9775Zv6a0.353553,0,0,1,0,0P0.25A0,0.000188,0,1,284,0.081052,1,0.000188,24000,0.000188L1I1.995Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,1403,0.081052,769,0.000188,3250,0.000188L1I1.00625Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.08A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o3Z\",\n\t/* 190: DX7 BASS    3  */ \"v2a1,0,0,1,0,0P0.25A0,0.000188,1424,0.771105,3,0.840896,11411,0.000188,208,0.000188L1I0.500625Zv3a0.114626,0,0,1,0,0P0.25A0,0.000188,0,1,99000,0.000188,0,0.000188,60000,0.000188L1I1.01Zv4a2,0,0,1,0,0P0.25A0,0.000188,1,0.32421,357,0.026278,4318,0.000188,262,0.000188L1I0.5Zv5a2,0,0,1,0,0.000188P0.25A0,0.000188,735,0.297302,738,0.162105,3775,0.000188,3636,0.000188L1I0.504375Zv6a0.229251,0,0,1,0,0P0.25A0,0.000188,1157,1,2718,0.000188,0,0.000188,370,0.000188L1I0.515Zv7a2,0,0,1,0,0P0.25A0,0.000188,1,1,545,0.458502,6818,0.000188,82,0.000188L1I0.505Zv1w0a1f5.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o17Z\",\n\t/* 191: DX7 BASS    4  */ \"v2a0.458502,0,0,1,0,0P0.25A0,0.000188,0,0.771105,55,0.162105,9176,0.000188,208,0.000188L1I4Zv3a0.00426,0,0,1,0,0P0.25A0,0.000188,0,1,99000,0.000188,0,0.000188,60000,0.000188L1I0.5Zv4a1.681793,0,0,1,0,0P0.25A0,0.000188,0,0.771105,15,0.136313,8941,0.000188,208,0.000188L1I0.5Zv5a0.068157,0,0,1,0,0P0.25A0,0.000188,1,1,677,0.420448,6742,0.000188,18,0.000188L1I1Zv6a0.192776,0,0,1,0,0P0.25A0,0.000188,2,1,218,0.420448,6742,0.000188,233,0.000188L1I0.5Zv7a2,0,0,1,0,0P0.25A0,0.000188,1,1,677,0.420448,6742,0.000188,18,0.000188L1I0.5Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o17Z\",\n\t/* 192: DX7 PICCOLO    */ \"v2a0.017039,0,0,1,0,0P0.25A0,0.000188,0,0.192776,3,0.048194,0,0.048194,1,0.000188L1I5.55Zv3a1.29684,0,0,1,0,0P0.25A0,0.000188,11,1,0,1,24,0.64842,72,0.000188L1I1.00125Zv4a0.03125,0,0,1,0,0P0.25A0,0.000188,0,0.771105,140,0.048194,0,0.048194,1,0.000188L1I1.0125Zv5a1.29684,0,0,1,0,0P0.25A0,0.000188,11,1,0,1,530,0.545254,71,0.000188L1I1.01125Zv6a0.00657,0,0,1,0,0P0.25A0,0.000188,0,0.771105,140,0.048194,0,0.048194,1,0.000188L1I2.02Zv7a1.189207,0,0,1,0,0P0.25A0,0.000188,11,1,0,1,530,0.545254,71,0.000188L1I1Zv1w0a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.00125A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 193: DX7 FLUTE   2  */ \"v2a0.022097,0,0,1,0,0P0.25A0,0.000188,6,1,0,1,3,0.840896,97000,0.000188L1I17Zv3a0.096388,0,0,1,0,0P0.25A0,0.000188,91,1,20,0.052556,0,0.034078,60000,0.000188L1I2.9925Zv4a0.125,0,0,1,0,1P0.25A0,0.000188,0,1,0,0.458502,6818,0.000188,117,0.000188L1I1Zv5a0.840896,0,0,1,0,0P0.25A0,0.000188,0,0.594604,0,0.458502,90000,0.000188,60000,0.000188L1I1Zv6a0.192776,0,0,1,0,1P0.25A0,0.000188,0,1,0,0.771105,7000,0.420448,89000,0.000188L1I0.99875Zv7a2,0,0,1,0,0P0.25A0,0.000188,28,1,9000,0.458502,1676,0.840896,94,0.000188L1I1.00125Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.003535b0.04A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o18Z\",\n\t/* 194: DX7 OBOE       */ \"v2a0.353553,0,0,1,0,0P0.25A0,0.000188,20,1,9000,0.458502,2342,1,60,0.000188L1I1Zv3a0.25,0,0,1,0,0P0.25A0,0.000188,20,1,9000,0.458502,2342,1,60,0.000188L1I1Zv4a0.25,0,0,1,0,0P0.25A0,0.000188,91,1,0,1,338,0.707107,58,0.000188L1I8Zv5a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,1,0.458502,1,0.192776,49,0.000188L1I8Zv6a0.272627,0,0,1,0,0P0.25A0,0.000188,20,1,9000,0.458502,2342,1,60,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,23,0.707107,0,0.707107,1805,0.297302,52,0.000188L1I4Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.04A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o3Z\",\n\t/* 195: DX7 CLARINET   */ \"v2a0.022097,0,0,1,0,0P0.25A0,0.000188,6,1,0,1,3,0.840896,97000,0.000188L1I10Zv3a0.040526,0,0,1,0,0P0.25A0,0.000188,1,1,20,0.052556,0,0.034078,60000,0.000188L1I7.98Zv4a0.0625,0,0,1,0,1P0.25A0,0.000188,0,1,0,0.458502,6818,0.000188,117,0.000188L1I6Zv5a1.090508,0,0,1,0,0P0.25A0,0.000188,0,0.353553,0,0.32421,86000,0.000188,60000,0.000188L1I4Zv6a0.136313,0,0,1,0,1P0.25A0,0.000188,0,1,0,0.771105,7000,0.420448,89000,0.000188L1I1.9975Zv7a2,0,0,1,0,0P0.25A0,0.000188,16,1,9000,0.458502,1676,0.840896,59,0.000188L1I1.00125Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.003535b0.04A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o17Z\",\n\t/* 196: DX7 SAX BC     */ \"v2a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,385,0.000188L1I0.5Zv3a0.034078,0,0,1,0,0.000188P0.25A0,0.000188,0,0.917004,438,1,0,1,153,0.000188L1I5.84375Zv4a0.162105,0,0,1,0,0.000188P0.25A0,0.000188,0,1,0,1,0,1,121,0.000188L1I0.5Zv5a0.272627,0,0,1,0,0.000188P0.25A0,0.000188,0,1,0,1,331,0.917004,120,0.000188L1I0.5Zv6a0.25,0,0,1,0,0.000188P0.25A0,0.000188,0,1,0,1,0,1,385,0.000188L1I0.5Zv7a2,0,0,1,0,0.000188P0.25A0,0.000188,18,1,0,1,0,1,108,0.000188L1I0.99125Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o18Z\",\n\t/* 197: DX7 BASSOON    */ \"v2a0.114626,0,0,1,0,0P0.25A0,0.000188,51,1,43,0.707107,846,0.297302,52,0.000188L1I6.24Zv3a0.353553,0,0,1,0,0P0.25A0,0.000188,0,1,1,0.458502,3,0.081052,43,0.000188L1I5Zv4a0.192776,0,0,1,0,0P0.25A0,0.000188,51,1,9000,0.458502,2342,1,60,0.000188L1I0.5Zv5a2,0,0,1,0,0P0.25A0,0.000188,28,1,43,0.707107,846,0.297302,52,0.000188L1I2Zv6a0.32421,0,0,1,0,0P0.25A0,0.000188,51,1,9000,0.458502,2342,1,60,0.000188L1I0.5Zv7a2,0,0,1,0,0P0.25A0,0.000188,28,1,43,0.707107,846,0.297302,52,0.000188L1I2Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.01A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o2Z\",\n\t/* 198: DX7 STRINGS 4  */ \"v2a0.162105,0,0,1,0,0P0.25A0,0.000188,7,1,2,0.545254,44073,0.000188,2904,0.000188L1I8Zv3a0.114626,0,0,1,0,0P0.25A0,0.000188,4,1,3,0.545254,44073,0.000188,4545,0.000188L1I2Zv4a0.272627,0,0,1,0,0P0.25A0,0.000188,97,0.917004,0,0.917004,29702,0.00426,1742,0.000188L1I2Zv5a1.090508,0,0,1,0,0P0.25A0,0.000188,81,1,2103,0.545254,44073,0.000188,523,0.000188L1I2.015Zv6a0.272627,0,0,1,0,0P0.25A0,0.000188,2,1,2550,0.545254,39446,0.00213,2953,0.000188L1I0.9925Zv7a1.090508,0,0,1,0,0P0.25A0,0.000188,109,0.917004,0,0.917004,29702,0.00426,314,0.000188L1I2Zv1w0a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.006869b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o2Z\",\n\t/* 199: DX7 STRINGS 5  */ \"v2a0.081052,0,0,1,0,0P0.25A0,0.000188,204,1,2103,0.545254,44073,0.000188,587,0.000188L1I4Zv3a0.114626,0,0,1,0,0P0.25A0,0.000188,204,1,2103,0.545254,44073,0.000188,587,0.000188L1I2Zv4a0.176777,0,0,1,0,0P0.25A0,0.000188,204,1,2103,0.545254,44073,0.000188,587,0.000188L1I1Zv5a1.090508,0,0,1,0,0P0.25A0,0.000188,1157,1,2103,0.545254,44073,0.000188,587,0.000188L1I1.00875Zv6a0.25,0,0,1,0,0P0.25A0,0.000188,1,1,2103,0.545254,44073,0.000188,587,0.000188L1I1.00875Zv7a0.707107,0,0,1,0,0P0.25A0,0.000188,1299,1,2103,0.545254,44073,0.000188,587,0.000188L1I0.99875Zv1w0a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.007071b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o2Z\",\n\t/* 200: DX7 STRINGS 6  */ \"v2a0.192776,0,0,1,0,0P0.25A0,0.000188,0,0.917004,5254,0.000205,0,0.162105,14080,0.000188L1I3Zv3a0.5,0,0,1,0,0P0.25A0,0.000188,88,0.353553,0,0.353553,45,0.594604,1812,0.000188L1I0.995Zv4a0.272627,0,0,1,0,0P0.25A0,0.000188,3,1,0,1,0,1,1929,0.000188L1I0.9975Zv5a1.834008,0,0,1,0,0P0.25A0,0.000188,91,1,518,0.353553,13,0.420448,777,0.000188L1I1.00875Zv6a0.385553,0,0,1,0,0P0.25A0,0.000188,169,0.545254,518,0.192776,217,0.057313,14666,0.000188L1I3.0075Zv7a1,0,0,1,0,0P0.25A0,0.000188,144,1,6659,0.028656,6118,0.000188,208,0.000188L1I0.99125Zv1w4a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.009444b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o15Z\",\n\t/* 201: DX7 STRINGS 7  */ \"v2a0.136313,0,0,1,0,0P0.25A0,0.000188,0,0.917004,5254,0.000205,0,0.162105,14080,0.000188L1I1.49625Zv3a0.353553,0,0,1,0,0P0.25A0,0.000188,88,0.353553,0,0.353553,45,0.594604,1812,0.000188L1I3Zv4a0.210224,0,0,1,0,0P0.25A0,0.000188,3,1,0,1,0,1,1929,0.000188L1I1.5Zv5a1.542211,0,0,1,0,0P0.25A0,0.000188,114,1,518,0.353553,13,0.420448,777,0.000188L1I1.50375Zv6a0.32421,0,0,1,0,0P0.25A0,0.000188,3,1,0,1,0,1,1929,0.000188L1I0.9975Zv7a2,0,0,1,0,0P0.25A0,0.000188,45,1,518,0.353553,13,0.420448,777,0.000188L1I1.00375Zv1w4a1f5.5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.012879b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o2Z\",\n\t/* 202: DX7 STRINGS 8  */ \"v2a0.017039,0,0,1,0,0P0.25A0,0.000188,64,1,1402,0.545254,1083,0.32421,335,0.000188L1I1Zv3a0.162105,0,0,1,0,0P0.25A0,0.000188,37,0.32421,491,0.545254,1083,0.32421,335,0.000188L1I1Zv4a0.114626,0,0,1,0,0P0.25A0,0.000188,0,1,1402,0.545254,1083,0.32421,335,0.000188L1I1Zv5a2,0,0,1,0,0P0.25A0,0.000188,1,1,686,0.000188,0,0.000188,1043,0.000188L1I1Zv6a0.210224,0,0,1,0,0P0.25A0,0.000188,0,0.917004,762,0.000188,0,0.000188,370,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,486,0.000188,0,0.000188,659,0.000188L1I1Zv1w0a1f5.5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.00404b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o2Z\",\n\t/* 203: DX7 BRASS   4  */ \"v2a0.458502,0,0,1,0,0P0.25A0,0.000188,97,0.917004,0,0.917004,530,0.5,70,0.000188L1I0.495625Zv3a1.834008,0,0,1,0,0P0.25A0,0.000188,4,1,30,0.917004,0,0.917004,53,0.000188L1I0.495625Zv4a2,0,0,1,0,0P0.25A0,0.000188,4,1,30,0.917004,0,0.917004,53,0.000188L1I0.495625Zv5a2,0,0,1,0,0P0.25A0,0.000188,4,1,0,0.917004,0,0.917004,53,0.000188L1I0.495625Zv6a0.5,0,0,1,0,0P0.25A0,0.000188,11,0.229251,26,0.707107,37,0.771105,52,0.000188L1I0.504375Zv7a1.189207,0,0,1,0,0P0.25A0,0.000188,7,1,3,0.385553,0,0.771105,52,0.000188L1I0.504375Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o22Z\",\n\t/* 204: DX7 BRASS   5  */ \"v2a1.090508,0,0,1,0,0P0.25A0,0.000188,61,0.917004,6557,0.192776,2,0.297302,371,0.000188L1I1.5025Zv3a0.052556,0,0,1,0,0P0.25A0,0.000188,61,0.917004,6557,0.192776,2,0.297302,371,0.000188L1I1.5Zv4a0.545254,0,0,1,0,0P0.25A0,0.000188,61,0.917004,6557,0.192776,2,0.297302,371,0.000188L1I1.4975Zv5a1.834008,0,0,1,0,0P0.25A0,0.000188,22,1,4,0.545254,1444,0.272627,327,0.000188L1I1.505Zv6a0.458502,0,0,1,0,0P0.25A0,0.000188,61,0.917004,29,0.707107,0,0.707107,415,0.000188L1I0.99125Zv7a2,0,0,1,0,0P0.25A0,0.000188,22,1,1,0.840896,361,0.707107,370,0.000188L1I1Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o2Z\",\n\t/* 205: DX7 BRASS 6 BC */ \"v2a0.5,0,0,1,0,0.000188P0.25A0,0.000188,28,1,1,0.917004,200,0.840896,59,0.000188L1I1Zv3a2,0,0,1,0,0.000188P0.25A0,0.000188,11,1,722,0.707107,0,0.707107,58,0.000188L1I1Zv4a1.681793,0,0,1,0,0.000188P0.25A0,0.000188,11,1,722,0.707107,0,0.707107,58,0.000188L1I1Zv5a2,0,0,1,0,0.000188P0.25A0,0.000188,11,1,541,0.771105,180,0.707107,58,0.000188L1I1Zv6a0.840896,0,0,1,0,0.000188P0.25A0,0.000188,28,1,2703,0.458502,3004,0.192776,49,0.000188L1I1Zv7a2,0,0,1,0,0.000188P0.25A0,0.000188,11,1,722,0.707107,0,0.707107,58,0.000188L1I1Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o22Z\",\n\t/* 206: DX7 BRASS   7  */ \"v2a0.162105,0,0,1,0,0P0.25A0,0.000188,102,1,144,0.040526,0,0.040526,383,0.000188L1I3.15Zv3a0.64842,0,0,1,0,0P0.25A0,0.000188,2,0.018581,0,0.037163,24,0.040526,383,0.000188L1I1Zv4a0.297302,0,0,1,0,0P0.25A0,0.000188,459,1,276,0.458502,1624,0.192776,156,0.000188L1I1Zv5a2,0,0,1,0,0P0.25A0,0.000188,11,1,1529,0.32421,0,0.32421,298,0.000188L1I1Zv6a0.420448,0,0,1,0,0P0.25A0,0.000188,459,1,276,0.458502,1624,0.192776,156,0.000188L1I1Zv7a1.414214,0,0,1,0,0P0.25A0,0.000188,11,1,1529,0.32421,0,0.32421,298,0.000188L1I1Zv1w4a1f5.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.000505b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o8Z\",\n\t/* 207: DX7 BRASS   8  */ \"v2a0.458502,0,0,1,0,0P0.25A0,0.000188,162,1,532,0.385553,567,0.229251,451,0.000188L1I0.5Zv3a2,0,0,1,0,0P0.25A0,0.000188,40,1,1235,0.020263,44735,0.000188,370,0.000188L1I0.5Zv4a2,0,0,1,0,0P0.25A0,0.000188,10,1,1235,0.020263,44735,0.000188,370,0.000188L1I0.5Zv5a2,0,0,1,0,0P0.25A0,0.000188,22,1,1235,0.020263,44735,0.000188,330,0.000188L1I1Zv6a0.64842,0,0,1,0,0P0.25A0,0.000188,9,1,1235,0.020263,44735,0.000188,185,0.000188L1I0.5Zv7a2,0,0,1,0,0P0.25A0,0.000188,32,1,1235,0.020263,44735,0.000188,147,0.000188L1I0.5Zv1w0a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o22Z\",\n\t/* 208: DX7 RECORDER   */ \"v2a0.840896,0,0,1,0,1P0.25A0,0.000188,3,1,0,0.771105,12,0.125,75000,0.000188L1I2Zv3a0.594604,0,0,1,0,0P0.25A0,0.000188,114,1,9000,0.458502,1676,0.840896,59,0.000188L1I1Zv4a0.917004,0,0,1,0,0P0.25A0,0.000188,22,1,0,0.771105,10,0.176777,79000,0.000188L1I2.0175Zv5a2,0,0,1,0,0P0.25A0,0.000188,91,1,9000,0.458502,1676,0.840896,59,0.000188L1I1.01Zv6a0.917004,0,0,1,0,0P0.25A0,0.000188,12,1,0,0.771105,10,0.176777,79000,0.000188L1I1.9825Zv7a2,0,0,1,0,0P0.25A0,0.000188,81,1,9000,0.458502,1676,0.840896,59,0.000188L1I1Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.019192b0.04A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o6Z\",\n\t/* 209: DX7 HARMONICA1 */ \"v2a0.013139,0,0,1,0,0P0.25A0,0.000188,0,1,1548,0.0625,0,0.017039,80,0.000188L1I7.62Zv3a0.074325,0,0,1,0,0P0.25A0,0.000188,15,0.917004,9,0.000188,0,0.917004,151,0.000188L1I5.04375Zv4a0.192776,0,0,1,0,0P0.25A0,0.000188,239,0.420448,19440,0.000448,0,0.007812,74,0.000188L1I0.505Zv5a2,0,0,1,0,0P0.25A0,0.000188,42,0.545254,15,0.353553,6591,0.000188,73,0.000188L1I1Zv6a0.000377,0,0,1,0,0.000188P0.25A0,0.000188,239,0.420448,19440,0.000448,0,0.007812,74,0.000188L1I1Zv7a0.000377,0,0,1,0,0P0.25A0,0.000188,42,0.545254,15,0.353553,6591,0.000188,73,0.000188L1I0.495625Zv1w0a1f7P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.005152b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o1Z\",\n\t/* 210: DX7 HRMNCA2 BC */ \"v2a0.013139,0,0,1,0,0.034078P0.25A0,0.000188,0,1,1548,0.0625,0,0.017039,80,0.000188L1I7.62Zv3a0.074325,0,0,1,0,0.034078P0.25A0,0.000188,15,0.917004,9,0.000188,0,0.917004,151,0.000188L1I5.04375Zv4a0.192776,0,0,1,0,0.034078P0.25A0,0.000188,239,0.420448,19440,0.000448,0,0.007812,74,0.000188L1I0.505Zv5a2,0,0,1,0,0.034078P0.25A0,0.000188,42,0.545254,12,1,0,1,121,0.000188L1I1Zv6a2,0,0,1,0,0.034078P0.25A0,0.000188,53,0.420448,19440,0.000448,0,0.007812,74,0.000188L1I1Zv7a2,0,0,1,0,0.034078P0.25A0,0.000188,42,0.545254,15,0.353553,6591,0.000188,73,0.000188L1I0.495625Zv1w0a1f7P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.005152b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o1Z\",\n\t/* 211: DX7 VOICE   2  */ \"v2a0.028656,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,24362,0.000188L1I4.085Zv3a0.068157,0,0,1,0,0P0.25A0,0.000188,459,1,565,0.081052,400,0.026278,78,0.000188L1I1.00875Zv4a2,0,0,1,0,0P0.25A0,0.000411,4,0.32421,31,0.081052,69,0.057313,22800,0.000411L1I1.02375Zv5a2,0,0,1,0,0P0.25A0,0.000188,114,1,902,0.64842,7,0.840896,950,0.000188L1I1.00875Zv6a2,0,0,1,0,0.000224P0.25A0,0.037163,0,0.037163,14,0.088388,10,0.297302,2531,0.037163L1I1Zv7a0.707107,0,0,1,0,0P0.25A0,0.000188,40,1,902,0.64842,7,0.840896,267,0.000188L1I0.99125Zv1w4a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.027294b0.16A0,1,137,0.957603,36,1.021897,3,1,731,1L1O2,3,4,5,6,7o7Z\",\n\t/* 212: DX7 VOICE   3  */ \"v2a0.545254,0,0,1,0,0P0.25A0,0.000188,846,0.018581,2,0.011049,46,0.00657,10089,0.000188L1I2.0425Zv3a2,0,0,1,0,0P0.25A0,0.000188,818,1,1461,0.458502,153,0.297302,117,0.000188L1I2.0175Zv4a1.090508,0,0,1,0,0P0.25A0,0.000411,949,0.012049,291,0.028656,660,0.001065,4400,0.000411L1I1.02375Zv5a2,0,0,1,0,0P0.25A0,0.000188,818,1,902,0.64842,7,0.840896,2119,0.000188L1I1.00875Zv6a0.040526,0,0,1,0,0.000224P0.25A0,0.010132,0,0.010132,125,0.024097,10,0.088388,2637,0.010132L1I2Zv7a2,0,0,1,0,0P0.25A0,0.000188,818,1,902,0.64842,7,0.840896,267,0.000188L1I0.99125Zv1w4a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.012407b0.16A0,1,137,0.957603,36,1.021897,3,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 213: DX7 GLOKENSPL  */ \"v2a0.192776,0,0,1,0,0P0.25A0,0.000188,0,0.771105,55,0.162105,9176,0.000188,208,0.000188L1I16Zv3a0.148651,0,0,1,0,0P0.25A0,0.000188,0,1,68,0.000188,0,0.000188,1,0.000188L1I4Zv4a1.681793,0,0,1,0,0P0.25A0,0.000188,0,0.229251,18,0.012049,48000,0.000188,1,0.000188L1I8Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,35,0.210224,561,0.000188,1469,0.000188L1I1Zv6a0.458502,0,0,1,0,0P0.25A0,0.000188,0,0.192776,48,0.125,275,0.0625,67000,0.000188L1I8Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,61,0.545254,5575,0.000188,523,0.000188L1I1Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o7Z\",\n\t/* 214: DX7 VIBE    2  */ \"v2a0.840896,0,0,1,0,0P0.25A0,0.000188,1,1,1853,0.015625,2762,0.000188,370,0.000188L1I9.9Zv3a0.5,0,0,1,0,0P0.25A0,0.000188,0,1,184,0.003012,0,0.000188,370,0.000188L1I3.9975Zv4a0.034078,0,0,1,0,0P0.25A0,0.000188,114,1,0,0.458502,10588,0.000188,930,0.000188L1I9.8525Zv5a2,0,0,1,0,0P0.25A0,0.000188,2,1,0,0.458502,10588,0.000188,930,0.000188L1I1.00875Zv6a0.026278,0,0,1,0,0P0.25A0,0.000188,102,1,0,0.458502,10588,0.000188,930,0.000188L1I5Zv7a2,0,0,1,0,0P0.25A0,0.000188,2,1,0,0.458502,10588,0.000188,930,0.000188L1I0.99125Zv1w4a1f5.333333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.005A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 215: DX7 XYLOPHONE  */ \"v2a0.25,0,0,1,0,0P0.25A0,0.000188,12896,0.162105,0,0.162105,270,0.000188,60000,0.000188L1I4Zv3a0.353553,0,0,1,0,0P0.25A0,0.000188,0,0.771105,1,0.162105,270,0.000188,60000,0.000188L1I0.5Zv4a1.29684,0,0,1,0,0P0.25A0,0.000188,0,0.229251,14,0.012049,48000,0.000188,19868,0.000188L1I3Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,43,0.545254,638,0.000188,1043,0.000188L1I0.5Zv6a2,0,0,1,0,0P0.25A0,0.000188,0,0.229251,18,0.012049,48000,0.000188,60000,0.000188L1I3Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,96,0.545254,638,0.000188,262,0.000188L1I0.5Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.00125A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o7Z\",\n\t/* 216: DX7 CHIMES     */ \"v2a0.114626,0,0,1,0,0P0.25A0,0.000188,0,1,1624,0.458502,1805,0.192776,3088,0.000188L1I5Zv3a0.545254,0,0,1,0,0P0.25A0,0.000188,0,0.000188,0,0.458502,1805,0.192776,3459,0.000188L1I2.5075Zv4a0.125,0,0,1,0,0P0.25A0,0.000188,0,1,1624,0.458502,1805,0.192776,3088,0.000188L1I6Zv5a0.420448,0,0,1,0,0P0.25A0,0.000188,0,0.000188,0,0.458502,1805,0.192776,7561,0.000188L1I2.98875Zv6a0.420448,0,0,1,0,0P0.25A0,0.000188,0,1,1624,0.458502,1805,0.192776,3088,0.000188L1I8Zv7a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,1624,0.458502,1805,0.192776,7561,0.000188L1I4Zv1w5a1f10P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o6Z\",\n\t/* 217: DX7 GONG    1  */ \"v2a0.00852,0,0,1,0,0P0.25A0,0.000188,1210,0.32421,463,0.771105,59169,0.000188,19868,0.000188L1I1.2Zv3a0.458502,0,0,1,0,0P0.25A0,0.000188,3062,0.707107,484,0.353553,26138,0.000188,13333,0.000188L1I1.4Zv4a0.545254,0,0,1,0,0P0.25A0,0.000188,3062,0.707107,484,0.353553,26138,0.000188,8759,0.000188L1I3Zv5a0.229251,0,0,1,0,0P0.25A0,0.000188,2237,0.353553,0,0.353553,26138,0.000188,1311,0.000188L1I0.745Zv6a0.192776,0,0,1,0,0P0.25A0,0.000188,1,1,378,0.707107,9747,0.00657,2484,0.000188L1I0.8Zv7a2,0,0,1,0,0P0.25A0,0.000188,1,1,378,0.707107,9747,0.00657,2221,0.000188L1I0.5Zv1w1a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.04A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o16Z\",\n\t/* 218: DX7 GONG    2  */ \"v2a0.105112,0,0,1,0,0P0.25A0,0.000188,169,0.32421,463,0.771105,59169,0.000188,16327,0.000188L1I14.4Zv3a0.125,0,0,1,0,0P0.25A0,0.000188,170,0.707107,484,0.353553,26138,0.000188,28743,0.000188L1I5.6Zv4a0.105112,0,0,1,0,0P0.25A0,0.000188,2,0.707107,484,0.353553,26138,0.000188,7058,0.000188L1I3.78Zv5a0.088388,0,0,1,0,0P0.25A0,0.000188,382,0.707107,484,0.353553,537,0.000188,7058,0.000188L1I9.24Zv6a0.048194,0,0,1,0,0P0.25A0,0.000188,1031,1,217,0.297302,7942,0.00657,9111,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,3,1,378,0.707107,9747,0.00657,712,0.000188L1I1Zv1w0a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o17Z\",\n\t/* 219: DX7 BELLS      */ \"v2a0.229251,0,0,1,0,0P0.25A0,0.000188,0,1,5606,0.001642,0,0.000188,7866,0.000188L1I3.15375Zv3a0.024097,0,0,1,0,0P0.25A0,0.000188,0,1,5606,0.001642,0,0.000188,9745,0.000188L1I0.504375Zv4a0.353553,0,0,1,0,0P0.25A0,0.000188,0,1,5606,0.001642,7511,0.000188,6329,0.000188L1I1.17125Zv5a0.420448,0,0,1,0,0P0.25A0,0.000188,0,1,5606,0.001642,0,0.000188,4066,0.000188L1I3.15Zv6a1.189207,0,0,1,0,0P0.25A0,0.000188,0,1,5606,0.001642,0,0.000188,4066,0.000188L1I1.18Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,5606,0.001642,0,0.000188,4066,0.000188L1I0.5Zv1w2a1f4.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.04A0,1,3,0.978572,7,1.021897,7,1,731,1L1O2,3,4,5,6,7o27Z\",\n\t/* 220: DX7 COW BELL   */ \"v2a0.229251,0,0,1,0,0P0.25A0,0.000188,0,1,2,0.771105,0,0.420448,3848,0.000188L1I8Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,2,0.458502,556,0.000188,587,0.000188L1I1Zv4a0.385553,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.771105,7,0.840896,4194,0.000188L1I4Zv5a2,0,0,1,0,0f524.80746P0.25A0,0.000188,0,1,108,0.000188,0,0.000188,370,0.000188L1Zv6a2,0,0,1,0,0P0.25A0,0.000188,0,0.162105,0,0.125,463,0.000188,2594,0.000188L1I7Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,98,0.458502,556,0.000188,370,0.000188L1I1Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.00125A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o6Z\",\n\t/* 221: DX7 BLOCK      */ \"v2a0.353553,0,0,1,0,0P0.25A0,0.000188,0,1,1,0.458502,624,0.000188,58,0.000188L1I17Zv3a0.044194,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.458502,624,0.000188,58,0.000188L1I5Zv4a0.105112,0,0,1,0,0P0.25A0,0.000188,0,1,1,0.458502,78,0.000188,58,0.000188L1I5Zv5a0.162105,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.458502,17,0.000188,58,0.000188L1I5Zv6a0.353553,0,0,1,0,0P0.25A0,0.000188,0,0.034078,0,0.458502,98,0.000188,58,0.000188L1I5Zv7a1.681793,0,0,1,0,0P0.25A0,0.000188,0,1,347,0.458502,1109,0.000188,58,0.000188L1I1Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o18Z\",\n\t/* 222: DX7 FLEXATONE  */ \"v2a0.64842,0,0,1,0,0P0.25A0,0.000188,0,1,21,0.000188,0,0.000188,32,0.000188L1I16.21875Zv3a0.136313,0,0,1,0,0P0.25A0,0.000188,1,1,86,0.000188,0,0.000188,6329,0.000188L1I20.425Zv4a0.028656,0,0,1,0,0P0.25A0,0.000188,0,1,3822,0.000188,0,0.000188,4545,0.000188L1I7Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,864,0.000188,0,0.000188,1647,0.000188L1I2Zv6a0.176777,0,0,1,0,0P0.25A0,0.000188,0,1,6,0.000188,0,0.000188,60000,0.000188L1I5Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,96,0.000188,0,0.000188,1,0.000188L1I3Zv1w0a1f7.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.438865b0.08A0,1,0,1,0,1,0,1,179,1L1O2,3,4,5,6,7o7Z\",\n\t/* 223: DX7 LOG DRUM   */ \"v2a0.000896,0,0,1,0,0P0.25A0,0.000188,45,1,0,0.840896,179,0.068157,1182,0.000188L1I2.0425Zv3a1.834008,0,0,1,0,0P0.25A0,0.000188,3,0.353553,5,0.001953,166,0.000188,1043,0.000188L1I1.03875Zv4a1.834008,0,0,1,0,0P0.25A0,0.000188,0,0.771105,169,0.001953,166,0.000188,1043,0.000188L1I1.02375Zv5a2,0,0,1,0,0P0.25A0,0.000188,2,1,12997,0.001953,166,0.000188,1043,0.000188L1I0.5Zv6a2,0,0,1,0,0P0.25A0,0.000188,0,1,27,0.000188,0,0.000188,2068,0.000188L1I0.5Zv7a2,0,0,1,0,0P0.25A0,0.000188,1,1,864,0.000188,0,0.000188,587,0.000188L1I0.5Zv1w4a1f6P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.024381b0.04A0,1,0,1,0,1,0,1,179,1L1O2,3,4,5,6,7o14Z\",\n\t/* 224: DX7 SYN-LEAD 2 */ \"v2a0.272627,0,0,1,0,0P0.25A0,0.000188,0,1,666,0.024097,0,0.024097,30,0.000188L1I2Zv3a1.834008,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,52,0.000188L1I1Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,52,0.000188L1I1Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,52,0.000188L1I1Zv6a0.32421,0,0,1,0,0P0.25A0,0.000188,0,1,666,0.024097,0,0.024097,30,0.000188L1I2Zv7a1.189207,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,52,0.000188L1I1Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o22Z\",\n\t/* 225: DX7 SYN-LEAD 3 */ \"v2a0.32421,0,0,1,0,0P0.25A0,0.000188,0,1,666,0.024097,1930,0.000188,32,0.000188L1I2Zv3a0.5,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,52,0.000188L1I1Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,52,0.000188L1I2Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,52,0.000188L1I2Zv6a1.681793,0,0,1,0,0P0.25A0,0.000188,0,1,666,0.024097,1930,0.000188,32,0.000188L1I2Zv7a1.189207,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.007164,23,0.000188L1I1Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o22Z\",\n\t/* 226: DX7 SYN-LEAD 4 */ \"v2a0.272627,0,0,1,0,0P0.25A0,0.000188,0,1,666,0.024097,0,0.024097,30,0.000188L1I1Zv3a1.834008,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,52,0.000188L1I1Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,52,0.000188L1I1Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,52,0.000188L1I1Zv6a0.32421,0,0,1,0,0P0.25A0,0.000188,0,1,666,0.024097,0,0.024097,30,0.000188L1I1Zv7a1.189207,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,52,0.000188L1I1Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o22Z\",\n\t/* 227: DX7 SYN-LEAD 5 */ \"v2a0.148651,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,99000,0.000188,523,0.000188L1I7Zv3a0.297302,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,99000,0.000188,104,0.000188L1I3Zv4a0.64842,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,99000,0.000188,104,0.000188L1I1Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,4666,0.162105,40747,0.000188,104,0.000188L1I2Zv6a0.458502,0,0,1,0,0P0.25A0,0.000188,1424,0.771105,18,1,14000,0.297302,73,0.000188L1I3Zv7a2,0,0,1,0,0P0.25A0,0.000188,1424,0.771105,18,1,14000,0.297302,1,0.000188L1I3Zv1w0a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.035855b0.16A0,1,0,1,0,1,0,1,179,1L1O2,3,4,5,6,7o1Z\",\n\t/* 228: DX7 SYN-CLAV 1 */ \"v2a0.385553,0,0,1,0,0P0.25A0,0.000188,0,1,372,0.037163,3937,0.009291,24,0.000188L1I21Zv3a0.017039,0,0,1,0,0P0.25A0,0.000188,0,1,372,0.037163,3937,0.009291,24,0.000188L1I1Zv4a0.044194,0,0,1,0,0P0.25A0,0.000188,0,1,710,0.081052,1968,0.040526,33,0.000188L1I12Zv5a0.545254,0,0,1,0,0P0.25A0,0.000188,0,1,372,0.037163,3937,0.009291,24,0.000188L1I3Zv6a0.32421,0,0,1,0,0P0.25A0,0.000188,0,1,372,0.037163,3937,0.009291,24,0.000188L1I2Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,796,0.081052,3691,0.022097,30,0.000188L1I1Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o16Z\",\n\t/* 229: DX7 SYN-CLAV 2 */ \"v2a0.229251,0,0,1,0,0P0.25A0,0.000188,1,0.385553,430,0.00852,6,0.001642,43,0.000188L1I9.9625Zv3a0.420448,0,0,1,0,0P0.25A0,0.000188,1,0.385553,1077,0.00852,6,0.001642,43,0.000188L1I1Zv4a1.681793,0,0,1,0,0P0.25A0,0.000188,40,0.385553,1077,0.00852,6,0.001642,43,0.000188L1I0.5025Zv5a1.834008,0,0,1,0,0P0.25A0,0.000188,0,1,4,0.420448,1,0.917004,170,0.000188L1I0.499375Zv6a2,0,0,1,0,0P0.25A0,0.000188,40,0.385553,1077,0.00852,6,0.001642,43,0.000188L1I0.5Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,4,0.420448,1,0.917004,170,0.000188L1I1Zv1w4a1f5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.04A0,1,0,1,0,1,0,1,179,1L1O2,3,4,5,6,7o7Z\",\n\t/* 230: DX7 SYN-CLAV 3 */ \"v2a0.162105,0,0,1,0,1P0.25A0,0.000188,0,0.148651,7075,0.015625,2080,0.385553,5333,0.000188L1I12.045Zv3a0.385553,0,0,1,0,1P0.25A0,0.000188,0,1,2953,0.353553,2403,0.176777,1540,0.000188L1I12Zv4a1.542211,0,0,1,0,0P0.25A0,0.000188,0,1,3809,0.297302,1582,0.771105,5818,0.000188L1I0.5025Zv5a2,0,0,1,0,1P0.25A0,0.000188,0,1,984,0.707107,6152,0.081052,68,0.000188L1I1.00375Zv6a2,0,0,1,0,1P0.25A0,0.000188,2,1,8628,0.297302,812,0.192776,4848,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,2,1,193,0.707107,1111,0.458502,87,0.000188L1I1Zv1w5a1f6.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.005A0,1,0,1,0,1,0,1,179,1L1O2,3,4,5,6,7o2Z\",\n\t/* 231: DX7 SYN-PIANO  */ \"v2a0.545254,0,0,1,0,0P0.25A0,0.003012,2,0.385553,13,0.000188,0,0.000188,0,0.003012L1I23.20125Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,2531,0.125,7911,0.000188,370,0.000188L1I0.99125Zv4a2,0,0,1,0,0P0.25A0,0.074325,0,1,12,0.000188,0,0.000188,0,0.074325L1I2Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,2531,0.125,7911,0.000188,208,0.000188L1I1Zv6a1.189207,0,0,1,0,0P0.25A0,0.000188,4126,1,0,1,0,1,24,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,2531,0.125,7911,0.000188,233,0.000188L1I1.00875Zv1w3a1f50.29P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 232: DX7 SYNBRASS 1 */ \"v2a0.5,0,0,1,0,0P0.25A0,0.000188,0,0.917004,0,0.917004,454,0.545254,71,0.000188L1I0.5Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,30,0.917004,0,0.917004,53,0.000188L1I0.500625Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,30,0.917004,0,0.917004,53,0.000188L1I0.49875Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,0,0.917004,0,0.917004,53,0.000188L1I0.498125Zv6a1,0,0,1,0,0P0.25A0,0.000188,1206,0.545254,446,0.707107,444,0.594604,50,0.000188L1I0.504375Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,52,0.000188L1I1.00875Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o22Z\",\n\t/* 233: DX7 SYNBRASS 2 */ \"v2a0.771105,0,0,1,0,0P0.25A0,0.000188,18,1,0,1,206,0.594604,4,0.000188L1I1Zv3a2,0,0,1,0,0P0.25A0,0.000188,2,1,0,0.917004,0,0.917004,4,0.000188L1I1Zv4a2,0,0,1,0,0P0.25A0,0.000188,1,1,0,0.917004,0,0.917004,4,0.000188L1I1Zv5a1.834008,0,0,1,0,0P0.25A0,0.000188,2,1,0,1,0,0.917004,4,0.000188L1I1Zv6a1.090508,0,0,1,0,0P0.25A0,0.000188,45,1,0,1,92,0.272627,3,0.000188L1I0.504375Zv7a2,0,0,1,0,0P0.25A0,0.000188,2,1,0,1,0,0.917004,4,0.000188L1I1.00875Zv1w4a1f6.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.004963b0.08A0,1,0,1,0,1,0,1,179,1L1O2,3,4,5,6,7o22Z\",\n\t/* 234: DX7 SYNORGAN 1 */ \"v2a0.5,0,0,1,0,0P0.25A0,0.000188,0,1,173,0.00426,54,0.002762,16,0.000188L1I20Zv3a1.834008,0,0,1,0,0P0.25A0,0.000188,18,1,0,1,0,1,54,0.000188L1I4Zv4a2,0,0,1,0,0P0.25A0,0.000188,18,1,0,1,0,1,54,0.000188L1I2Zv5a2,0,0,1,0,0P0.25A0,0.000188,18,1,0,1,0,1,54,0.000188L1I1Zv6a0.32421,0,0,1,0,0P0.25A0,0.000188,0,1,666,0.024097,0,0.024097,30,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,52,0.000188L1I3Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o22Z\",\n\t/* 235: DX7 SYNORGAN 2 */ \"v2a0.25,0,0,1,0,0P0.25A0,0.000188,10,1,0,1,12979,0.000188,233,0.000188L1I0.99875Zv3a2,0,0,1,0,0P0.25A0,0.272627,4,1,0,1,14453,0.000188,31,0.272627L1I0.5Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,0.000188,7,0.707107,303,0.458502,98,0.000188L1I0.5Zv5a0.297302,0,0,1,0,0P0.25A0,0.000188,7352,1,0,1,10443,0.000188,233,0.000188L1I9Zv6a2,0,0,1,0,0P0.25A0,0.000188,7352,1,0,1,0,1,385,0.000188L1I0.5Zv7a1.189207,0,0,1,0,0P0.25A0,0.000188,0,0.000188,7,0.707107,193,0.458502,98,0.000188L1I8.02Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.02A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o3Z\",\n\t/* 236: DX7 SYN-VOX    */ \"v2a0.000377,0,0,1,0,0P0.25A0,0.000188,0,1,11825,0.000896,131,0.000821,822,0.000188L1I0.499375Zv3a0.000377,0,0,1,0,0.0625P0.25A0,0.000188,0,1,11825,0.000896,131,0.000821,822,0.000188L1I0.50125Zv4a0.000377,0,0,1,0,0P0.25A0,0.000188,0,1,99,0.000896,131,0.000821,822,0.000188L1I1Zv5a2,0,0,1,0,0P0.25A0,0.000188,173,0.917004,60,0.000188,0,0.000188,9,0.000188L1I2.005Zv6a2,0,0,1,0,0P0.25A0,0.000188,43,0.052556,636,0.000188,16,1,86,0.000188L1I2.0225Zv7a2,0,0,1,0,0P0.25A0,0.000188,43,0.052556,4,0.176777,8,1,96,0.000188L1I1.9825Zv1w4a1f5.333333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.01803b0.08A0,1,73,0.917004,24,0.937084,8,1,179,1L1O2,3,4,5,6,7o25Z\",\n\t/* 237: DX7 SYN-ORCH   */ \"v2a0.25,0,0,1,0,0P0.25A0,0.707107,0,1,0,1,0,1,43,0.707107L1I2Zv3a0.25,0,0,1,0,0P0.25A0,0.000188,128,1,0,1,0,1,1087,0.000188L1I2Zv4a2,0,0,1,0,0P0.25A0,0.000188,72,1,0,1,850,0.458502,1754,0.000188L1I2Zv5a1.834008,0,0,1,0,0P0.25A0,0.000188,102,1,17,0.917004,58,0.707107,1851,0.000188L1I4.035Zv6a1.834008,0,0,1,0,0P0.25A0,0.000188,459,1,0,1,850,0.458502,1754,0.000188L1I2.0175Zv7a2,0,0,1,0,0P0.25A0,0.000188,459,1,17,0.917004,58,0.707107,1851,0.000188L1I0.99125Zv1w4a1f5.5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.010217b0.16A0,1,0,1,0,1,0,1,179,1L1O2,3,4,5,6,7o25Z\",\n\t/* 238: DX7 SYN-BASS 1 */ \"v2a0.25,0,0,1,0,0P0.25A0,0.000188,25,1,661,0.096388,0,0.096388,3485,0.000188L1I1.00875Zv3a0.32421,0,0,1,0,0P0.25A0,0.000188,0,1,611,0.088388,738,0.048194,35,0.000188L1I1.00875Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,2,0.000188L1I1.00875Zv5a0.5,0,0,1,0,0P0.25A0,0.000188,0,1,611,0.088388,738,0.048194,2206,0.000188L1I1Zv6a0.272627,0,0,1,0,0P0.25A0,0.000188,25,1,661,0.096388,0,0.096388,628,0.000188L1I1Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,3,0.385553,0,0.771105,2,0.000188L1I2Zv1w4a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o3Z\",\n\t/* 239: DX7 SYN-BASS 2 */ \"v2a0.385553,0,0,1,0,0P0.25A0,0.000188,0,1,21,0.917004,1355,0.081052,38,0.000188L1I0.5Zv3a2,0,0,1,0,0P0.25A0,0.000188,0,1,21,0.917004,1355,0.081052,38,0.000188L1I0.500625Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,21,0.917004,1355,0.081052,38,0.000188L1I0.49875Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,1,21,0.917004,1355,0.081052,38,0.000188L1I0.99625Zv6a0.840896,0,0,1,0,0P0.25A0,0.000188,0,1,21,0.917004,1355,0.081052,685,0.000188L1I0.504375Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,105,0.917004,2953,0.081052,121,0.000188L1I2.0175Zv1w0a1f6.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.08A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o9Z\",\n\t/* 240: DX7 HARP-FLUTE */ \"v2a2,0,0,1,0,0.044194P0.25A0,0.000188,0,1,10,0.004645,105,0.001065,69,0.000188L1I9Zv3a0.297302,0,0,1,0,0P0.25A0,0.000188,289,1,246,0.917004,12,0.771105,333,0.000188L1I1Zv4a1.189207,0,0,1,0,0P0.25A0,0.000188,459,1,246,0.917004,12,0.771105,333,0.000188L1I0.99125Zv5a0.771105,0,0,1,0,0P0.25A0,0.000188,0,1,309,0.013139,1,0.000188,2068,0.000188L1I3Zv6a0.114626,0,0,1,0,0P0.25A0,0.000188,0,1,449,0.081052,1,0.000188,4545,0.000188L1I2Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,999,0.081052,4242,0.000188,2594,0.000188L1I1.00875Zv1w0a1f6.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o3Z\",\n\t/* 241: DX7 BELL-FLUTE */ \"v2a0.272627,0,0,1,0,0P0.25A0,0.000188,1,1,6659,0.028656,6118,0.000188,659,0.000188L1I8.04Zv3a1.090508,0,0,1,0,0P0.25A0,0.000188,0,0.000188,0,0.917004,2690,0.000188,659,0.000188L1I1Zv4a0.272627,0,0,1,0,0P0.25A0,0.000188,1,0.545254,5522,0.028656,6118,0.000188,659,0.000188L1I5.985Zv5a1.681793,0,0,1,0,0P0.25A0,0.000188,0,0.000188,0,1,2718,0.000188,659,0.000188L1I1.00875Zv6a0.210224,0,0,1,0,0P0.25A0,0.000188,52,0.105112,152,0.707107,2320,0.105112,1788,0.000188L1I1.0025Zv7a2,0,0,1,0,0P0.25A0,0.000188,57,1,3106,0.028656,1267,0.000188,587,0.000188L1I0.99125Zv1w0a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.00202b0.00125A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 242: DX7 E.P-BRS BC */ \"v2a0.32421,0,0,1,0,0.000188P0.25A0,0.000188,0,1,0,1,105,0.917004,382,0.000188L1I1Zv3a2,0,0,1,0,0.000188P0.25A0,0.000188,7,1,0,1,0,1,273,0.000188L1I1Zv4a0.014328,0,0,1,0,0P0.25A0,0.000188,0,1,312,0.210224,29509,0.000188,233,0.000188L1I14Zv5a1.29684,0,0,1,0,0P0.25A0,0.000188,0,1,1608,0.192776,14441,0.000188,233,0.000188L1I1.00875Zv6a0.272627,0,0,1,0,0P0.25A0,0.000188,0,1,24000,0.125,7911,0.000188,233,0.000188L1I1Zv7a1.414214,0,0,1,0,0P0.25A0,0.000188,0,1,3146,0.125,7911,0.000188,233,0.000188L1I1Zv1w0a1f5.666667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 243: DX7 T.BL-EXPA  */ \"v2a0.917004,0,0,1,0,0P0.25A0,0.000188,4631,1,0,1,7600,0.192776,6060,0.000188L1I1.005Zv3a2,0,0,1,0,0P0.25A0,0.000188,364,1,0,1,27000,0.096388,2482,0.000188L1I0.995Zv4a0.25,0,0,1,0,0P0.25A0,0.000188,0,1,39600,0.000188,0,0.000188,4545,0.000188L1I3.495Zv5a1.414214,0,0,1,0,0P0.25A0,0.000188,0,1,4280,0.000188,0,0.000188,6329,0.000188L1I0.99375Zv6a0.458502,0,0,1,0,0P0.25A0,0.000188,0,1,6709,0.000188,0,0.000188,4545,0.000188L1I3.5075Zv7a1.414214,0,0,1,0,0P0.25A0,0.000188,0,1,17871,0.000188,0,0.000188,6329,0.000188L1I1.0025Zv1w0a1f5.833333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.04A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 244: DX7 CHIME-STRG */ \"v2a0.229251,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,99000,0.000188L1I0.495625Zv3a2,0,0,1,0,0P0.25A0,0.000188,409,1,0,1,0,1,3822,0.000188L1I0.504375Zv4a0.162105,0,0,1,0,0P0.25A0,0.000188,0,0.000188,2,0.081052,3792,0.000188,14765,0.000188L1I13Zv5a1.681793,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,3046,0.000188,2068,0.000188L1I2Zv6a0.594604,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,0,1,99000,0.000188L1I0.503125Zv7a2,0,0,1,0,0P0.25A0,0.000188,409,1,0,1,0,1,3822,0.000188L1I1.00625Zv1w4a1f4.5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.013737b0.16A0,1,0,1,0,1,0,1,179,1L1O2,3,4,5,6,7o5Z\",\n\t/* 245: DX7 B.DRM-SNAR */ \"v2a2,0,0,1,0,0f3715.352291P0.25A0,0.000188,0,1,0,1,0,1,99000,0.000188L1Zv3a0.917004,0,0,1,0,0P0.25A0,0.000188,0,1,2,0.420448,173,0.000188,370,0.000188L1I0.5Zv4a2,0,0,1,0,0f158.489319P0.25A0,0.000188,0,1,117,0.192776,1240,0.000188,659,0.000188L1Zv5a1.29684,0,0,1,0,0f6.702703P0.25A0,0.000188,0,1,1,0.458502,3102,0.000188,165,0.000188L1Zv6a1.834008,0,0,1,0,0f10.086721P0.25A0,0.000188,0,1,273,0.000188,0,0.000188,60000,0.000188L1Zv7a2,0,0,1,0,0f81.283052P0.25A0,0.000188,0,1,611,0.000188,0,0.000188,92,0.000188L1Zv1w1a1f9.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o3Z\",\n\t/* 246: DX7 SHIMMER    */ \"v2a0.176777,0,0,1,0,0P0.25A0,0.000188,0,1,654,0.192776,14441,0.000188,233,0.000188L1I1.43Zv3a1.681793,0,0,1,0,0P0.25A0,0.000188,0,1,654,0.192776,14441,0.000188,233,0.000188L1I1.43Zv4a0.057313,0,0,1,0,0P0.25A0,0.000188,0,1,8,0.192776,80000,0.000188,233,0.000188L1I15Zv5a1.681793,0,0,1,0,0P0.25A0,0.000188,0,1,1151,0.192776,80000,0.000188,233,0.000188L1I0.955Zv6a0.162105,0,0,1,0,0P0.25A0,0.000188,0,1,881,0.32421,86000,0.000188,233,0.000188L1I0.95Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,654,0.192776,23000,0.026278,222,0.000188L1I0.955Zv1w1a1f8.333333P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.106551b0.08A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o5Z\",\n\t/* 247: DX7 EVOLUTION  */ \"v2a1.834008,0,0,1,0,0.000188P0.25A0,0.000188,45,1,19,0.001953,166,0.000188,1043,0.000188L1I1.07125Zv3a1.681793,0,0,1,0,0.000188P0.25A0,0.000188,45,1,4,0.707107,587,0.000188,1043,0.000188L1I0.499375Zv4a2,0,0,1,0,0.000188P0.25A0,0.000188,6550,1,650,0.353553,49,0.176777,1373,0.000188L1I0.505625Zv5a2,0,0,1,0,0P0.25A0,0.000188,6550,1,650,0.353553,49,0.176777,1373,0.000188L1I0.5Zv6a0.594604,0,0,1,0,0P0.25A0,0.000188,6550,1,650,0.353553,49,0.176777,1373,0.000188L1I0.505625Zv7a2,0,0,1,0,0P0.25A0,0.000188,6550,1,650,0.353553,49,0.176777,1373,0.000188L1I0.504375Zv1w4a1f0.064P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,179,1L1O2,3,4,5,6,7o1Z\",\n\t/* 248: DX7 WATER GDN  */ \"v2a2,0,0,1,0,0P0.25A0,0.000188,0,0.000188,0,1,193,0.000188,10,0.000188L1I12Zv3a1.189207,0,0,1,0,0P0.25A0,0.000188,0,0.000188,0,1,193,0.000188,11,0.000188L1I6Zv4a1.414214,0,0,1,0,0P0.25A0,0.000188,0,0.000188,0,1,193,0.000188,11,0.000188L1I3Zv5a2,0,0,1,0,0P0.25A0,0.000188,0,0.000188,0,1,193,0.000188,16,0.000188L1I2Zv6a2,0,0,1,0,0P0.25A0,0.000188,0,0.000188,0,1,193,0.000188,29,0.000188L1I1.5Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,0.000188,0,1,193,0.000188,65,0.000188L1I1Zv1w4a1f6P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.000505b0.01A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o32Z\",\n\t/* 249: DX7 WASP STING */ \"v2a0.385553,0,0,1,0,0P0.25A0,0.000188,28,1,2703,0.458502,3004,0.192776,49,0.000188L1I1.01Zv3a2,0,0,1,0,0P0.25A0,0.000188,11,1,1624,0.458502,1805,0.192776,49,0.000188L1I1.00375Zv4a1.681793,0,0,1,0,0P0.25A0,0.000188,11,1,1624,0.458502,1805,0.192776,49,0.000188L1I1Zv5a2,0,0,1,0,0P0.25A0,0.000188,11,1,1624,0.458502,1805,0.192776,17,0.000188L1I0.5Zv6a2,0,0,1,0,0P0.25A0,0.000188,6550,1,1624,0.458502,1805,0.192776,3088,0.000188L1I0.5Zv7a0.5,0,0,1,0,0P0.25A0,0.000188,515,1,1624,0.458502,929,1,9357,0.000188L1I1Zv1w5a1f10P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,1,0,1,0,1,0,1,731,1L1O2,3,4,5,6,7o18Z\",\n\t/* 250: DX7 LASER GUN  */ \"v2a0.545254,0,0,1,0,0P0.25A0,0.000188,1637,1,16079,0.000188,0,1,7500,0.000188L1I0.505Zv3a1.834008,0,0,1,0,0P0.25A0,0.000188,0,1,15,0.000188,0,0.917004,53,0.000188L1I0.505Zv4a0.074325,0,0,1,0,0P0.25A0,0.000188,0,1,15,0.000188,0,0.917004,53,0.000188L1I2.22Zv5a0.105112,0,0,1,0,0P0.25A0,0.000188,0,1,15,0.000188,0,0.917004,53,0.000188L1I17.17Zv6a0.64842,0,0,1,0,0P0.25A0,0.000188,0,1,232,0.003012,5,1,1721,0.000188L1I19.38Zv7a2,0,0,1,0,0P0.25A0,0.000188,0,1,2425,0.000188,0,0.000188,416,0.000188L1I5Zv1w3a1f7.166667P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,1.194688b0.16A0,2.043794,1122,1.138789,120,6.170625,191,0.897355,602,2.043794L1O2,3,4,5,6,7o31Z\",\n\t/* 251: DX7 DESCENT    */ \"v2a0.297302,0,0,1,0,0.000188P0.25A0,0.000188,6550,1,0,1,99000,0.000188,60000,0.000188L1I8.01Zv3a0.096388,0,0,1,0,0.000188P0.25A0,0.000188,6550,1,0,1,99000,0.000188,60000,0.000188L1I0.99875Zv4a0.272627,0,0,1,0,0.000188P0.25A0,0.000188,6550,1,0,1,99000,0.000188,60000,0.000188L1I3.00375Zv5a2,0,0,1,0,0P0.25A0,0.000188,919,1,0,1,39600,0.000188,3636,0.000188L1I0.5Zv6a1.414214,0,0,1,0,0P0.25A0,0.000188,6550,1,0,1,99000,0.000188,60000,0.000188L1I0.505625Zv7a2,0,0,1,0,0P0.25A0,0.000188,919,1,0,1,47427,0.000188,3636,0.000188L1I0.504375Zv1w0a1f6.5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.025253b0.16A0,1,93,1.915207,1875,1,0,1,186,1L1O2,3,4,5,6,7o1Z\",\n\t/* 252: DX7 OCTAVE WAR */ \"v2a0.148651,0,0,1,0,0P0.25A0,0.00029,5,1,0,1,30,0.917004,1146,0.00029L1I0.500625Zv3a0.096388,0,0,1,0,0P0.25A0,0.00029,2,1,0,1,30,0.917004,1146,0.00029L1I1.00125Zv4a0.017039,0,0,1,0,0P0.25A0,0.000188,114,1,8111,0.096388,17,0.420448,6742,0.000188L1I8Zv5a2,0,0,1,0,0P0.25A0,0.000188,114,1,8111,0.096388,17,0.420448,6742,0.000188L1I2Zv6a1.189207,0,0,1,0,0P0.25A0,0.000188,114,1,8111,0.096388,17,0.420448,6742,0.000188L1I3Zv7a2,0,0,1,0,0P0.25A0,0.000188,114,1,8111,0.096388,17,0.420448,6742,0.000188L1I3Zv1w1a1f3.5P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0.70706b0.08A0,1,0,1,0,1,0,1,186,1L1O2,3,4,5,6,7o7Z\",\n\t/* 253: DX7 GRAND PRIX */ \"v2a0.385553,0,0,1,0,0P0.25A0,0.000188,369,0.229251,2273,0.068157,1665,0.000188,3636,0.000188L1I0.5Zv3a0.044194,0,0,1,0,0P0.25A0,0.000188,65,0.229251,3610,0.040526,13,0.007164,1816,0.000188L1I0.496875Zv4a2,0,0,1,0,0P0.25A0,0.000188,289,1,1500,0.068157,9,0.000188,3636,0.000188L1I0.5Zv5a2,0,0,1,0,0P0.25A0,0.000188,64,1,948,0.297302,3481,0.017039,3151,0.000188L1I0.5Zv6a0.840896,0,0,1,0,0P0.25A0,0.000188,0,0.074325,92,0.385553,10564,0.03125,1815,0.000188L1I2Zv7a1.090508,0,0,1,0,0P0.25A0,0.000188,1031,1,10394,0.003906,1263,0.00213,173,0.000188L1I4Zv1w0a1f50.29P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,0.048389,9275,15.657153,63,2.612474,1683,0.382779,34,0.048389L1O2,3,4,5,6,7o17Z\",\n\t/* 254: DX7 ST.HELENS  */ \"v2a1.542211,0,0,1,0,0P0.25A0,0.420448,1126,1,17871,0.000188,0,1,2004,0.420448L1I0.745Zv3a1.834008,0,0,1,0,0P0.25A0,0.458502,6818,0.000188,0,0.000188,0,1,2000,0.458502L1I0.6Zv4a1.189207,0,0,1,0,0P0.25A0,0.420448,4308,0.000188,0,0.000188,0,1,1805,0.420448L1I0.615Zv5a1.681793,0,0,1,0,0P0.25A0,0.297302,13805,0.000188,0,0.000188,0,1,2805,0.297302L1I0.545Zv6a1.090508,0,0,1,0,0P0.25A0,0.297302,70,1,25166,0.001381,7616,0.000188,1852,0.297302L1I0.515Zv7a2,0,0,1,0,0P0.25A0,0.32421,67,1,25166,0.001381,7616,0.000188,427,0.32421L1I0.5Zv1w0a1f0.064P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.16A0,0.346878,37,0.048389,9,0.105447,12,0.231848,9,0.346878L1O2,3,4,5,6,7o17Z\",\n\t/* 255: DX7 EXPLOSION  */ \"v2a2,0,0,1,0,0P0.25A0,0.000188,0,1,2,0.297302,85000,0.000188,60000,0.000188L1I0.515Zv3a0.068157,0,0,1,0,0P0.25A0,0.000188,0,1,43,0.707107,11176,0.000188,24000,0.000188L1I8.3825Zv4a2,0,0,1,0,0P0.25A0,0.000188,0,1,43,0.707107,11176,0.000188,31344,0.000188L1I0.51Zv5a0.5,0,0,1,0,0P0.25A0,0.000188,0,0.297302,99,1,10443,0.000188,26295,0.000188L1I0.654375Zv6a0.458502,0,0,1,0,0f100P0.25A0,0.000188,0,1,37,0.594604,13577,0.000188,14765,0.000188L1Zv7a0.162105,0,0,1,0,0P0.25A0,0.000188,0,1,0,1,11647,0.000188,21858,0.000188L1I0.495625Zv1w4a1f50.29P0.25Zv0w8a1,0,1,0,0,0f0,1,0,1,0,0b0.01A0,1,0,1,0,1,0,1,12000,1L1O2,3,4,5,6,7o16Z\",\n\t/* 256: dpwe piano */ \"k0Zv0w11a1,0,0,0p0Z\",\n\t/* 257: amyboard default */ \"v0w20F200.0,1.0,,,5.0R0.7A0,1,1000,0.2,100,0B0,1,1000,0.2,1000,0c2L1G4Zv2w1a,,0,0c3L1Zv3w2a,,0,0f220.0L1Zv1w4a,,0f4.0,0,,,,,0A0,1.0,10000,0Zx0,0,0k0,,0.5,0.5Z\",\n};\nconst uint16_t patch_oscs[258] PROGMEM = {\n6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,25,4,\n};\n#endif\n"
  },
  {
    "path": "src/pcm.c",
    "content": "// pcm.c\n\n#include \"amy.h\"\n#include \"transfer.h\"\n\n#ifdef __EMSCRIPTEN__\n#include \"emscripten.h\"\n#endif\n\n#ifdef AMY_DAISY\n#define malloc_caps(a, b) qspi_malloc(a)\n#define free(a) qspi_free(a)\n#endif\n\n\n// This is for any in-memory PCM samples.\ntypedef struct {\n    uint8_t type; \n    char filename[MAX_FILENAME_LEN];\n    uint8_t channels;\n    uint32_t file_handle;\n    uint32_t file_bytes_remaining;\n    int16_t * sample_ram;\n    uint32_t length;\n    uint32_t loopstart;\n    uint32_t loopend;\n    uint8_t midinote;\n    uint32_t samplerate;\n    float log2sr;\n} memorypcm_preset_t;\n\n// linked list of memorypcm presets\ntypedef struct memorypcm_ll_t{\n    memorypcm_preset_t *preset;\n    struct memorypcm_ll_t *next;\n    uint16_t preset_number;\n} memorypcm_ll_t;\n\n\nmemorypcm_ll_t * memorypcm_ll_start;\n\n#define PCM_AMY_LOG2_SAMPLE_RATE log2f(PCM_AMY_SAMPLE_RATE / ZERO_LOGFREQ_IN_HZ)\n\n\n// Get either memory preset, file preset or baked in preset for preset number.\n// For ROM presets, fill the caller-provided rom_local and return it.\nmemorypcm_preset_t * get_preset_for_preset_number(uint16_t preset_number,\n                                                  memorypcm_preset_t *rom_local) {\n    // Get the memory preset. If we can't find it, it could be a ROM preset. So copy params in from ROM preset\n    memorypcm_ll_t *preset = memorypcm_ll_start;\n    while(preset != NULL) {\n        if(preset->preset_number == preset_number) {\n            if(preset->preset->sample_ram != NULL || preset->preset->file_handle > 0) {\n                return preset->preset;\n            }\n        }\n        preset = preset->next;\n    }\n\n    // No memory preset found, so try ROM preset. default to 0 if out of range\n    if (preset_number >= pcm_samples) preset_number = 0; \n    if (rom_local == NULL) {\n        return NULL;\n    }\n    memset(rom_local, 0, sizeof(*rom_local));\n    const pcm_map_t cpreset =  pcm_map[preset_number];\n    uint32_t offset = cpreset.offset;\n    uint32_t length = cpreset.length;\n#ifdef PCM_LENGTH\n    if (offset >= PCM_LENGTH) {\n        offset = 0;\n        length = 0;\n    } else if (length > (PCM_LENGTH - offset)) {\n        length = PCM_LENGTH - offset;\n    }\n#endif\n    rom_local->sample_ram = (int16_t*)pcm + offset;\n    rom_local->length = length;\n    rom_local->loopstart = cpreset.loopstart;\n    rom_local->loopend = cpreset.loopend;\n    if (rom_local->loopstart > rom_local->length) {\n        rom_local->loopstart = 0;\n    }\n    if (rom_local->loopend > rom_local->length) {\n        rom_local->loopend = rom_local->length;\n    }\n    rom_local->midinote = cpreset.midinote;\n    rom_local->samplerate = PCM_AMY_SAMPLE_RATE;\n    rom_local->log2sr = PCM_AMY_LOG2_SAMPLE_RATE;\n    rom_local->type = AMY_PCM_TYPE_ROM;\n    rom_local->channels = 1;\n    return rom_local;\n}\n\nconst int16_t *pcm_get_sample_ram_for_preset(uint16_t preset_number, uint32_t *length) {\n    memorypcm_preset_t rom_local;\n    memorypcm_preset_t *preset = get_preset_for_preset_number(preset_number, &rom_local);\n    if (length != NULL) {\n        *length = (preset != NULL) ? preset->length : 0;\n    }\n    if (preset == NULL) {\n        return NULL;\n    }\n    return preset->sample_ram;\n}\n\n\nvoid pcm_init() {\n    memorypcm_ll_start = NULL;\n}\nvoid pcm_deinit() {\n    pcm_unload_all_presets();\n}\n\n// How many bits used for fractional part of PCM table index.\n#define PCM_INDEX_FRAC_BITS 8\n// The number of bits used to hold the table index.\n#define PCM_INDEX_BITS (31 - PCM_INDEX_FRAC_BITS)\n\nstatic void fclose_if_file(memorypcm_preset_t *preset) {\n    if (preset == NULL) {\n        return;\n    }\n    if (preset->type == AMY_PCM_TYPE_FILE &&\n        preset->file_handle != 0 &&\n        amy_global.config.amy_external_fclose_hook != NULL) {\n        amy_global.config.amy_external_fclose_hook(preset->file_handle);\n        preset->file_handle = 0;\n    }\n}\n\nvoid pcm_note_on(uint16_t osc) {\n    if(AMY_IS_SET(synth[osc]->preset)) {\n        memorypcm_preset_t rom_local;\n        memorypcm_preset_t *preset =\n            get_preset_for_preset_number(synth[osc]->preset, &rom_local);\n        if (preset->type == AMY_PCM_TYPE_FILE) {\n            if (preset->file_handle != 0) {\n                wave_info_t info = {0};\n                uint32_t data_bytes = 0;\n                amy_global.config.amy_external_fseek_hook(preset->file_handle, 0);\n                if (wave_parse_header(preset->file_handle, &info, &data_bytes)) {\n                    preset->channels = info.channels;\n                    preset->samplerate = info.sample_rate;\n                    preset->log2sr = log2f((float)info.sample_rate / ZERO_LOGFREQ_IN_HZ);\n                    preset->file_bytes_remaining = data_bytes;\n                } else {\n                    amy_global.config.amy_external_fclose_hook(preset->file_handle);\n                }\n            }\n        } else if (preset->type == AMY_PCM_TYPE_ROM) {\n            // baked-in PCM - don't overrun.\n            if(synth[osc]->preset >= pcm_samples) synth[osc]->preset = 0;\n        }\n        \n        synth[osc]->phase = 0; // s16.15 index into the table; as if a PHASOR into a 16 bit sample table.\n        // Special case: We use the msynth feedback flag to indicate note-off for looping PCM.  As a result, it's explicitly NOT set in amy:hold_and_modify for PCM voices.  Set it here.\n        msynth[osc]->feedback = synth[osc]->feedback;\n\n        // Make sure PCM waveforms are excluded from auto-termination, so we don't cut-off samples with silent gaps.\n        synth[osc]->terminate_on_silence = 0;\n    }\n}\n\nvoid pcm_mod_trigger(uint16_t osc) {\n    pcm_note_on(osc);\n}\n\n\nvoid pcm_note_off(uint16_t osc) {\n    if(AMY_IS_SET(synth[osc]->preset)) {\n        uint32_t length = 0;\n        memorypcm_preset_t rom_local;\n        memorypcm_preset_t *preset =\n            get_preset_for_preset_number(synth[osc]->preset, &rom_local);\n        if(preset != NULL) {\n            length = preset->length;\n        }\n        if(msynth[osc]->feedback == 0) {\n            // Non-looping note: Set phase to the end to cause immediate stop.\n            synth[osc]->phase = F2P(length / (float)(1 << PCM_INDEX_BITS));\n        } else {\n            // Looping is requested, disable future looping, sample will play through to end.\n            // (sending a second note-off will stop it immediately).\n            msynth[osc]->feedback = 0;\n        }\n    }\n}\n\n\nuint32_t fill_sample_from_file(memorypcm_preset_t *preset_p, uint32_t frames_needed) {\n    //fprintf(stderr, \"fsff %ld frames\\n\", frames_needed);\n    uint32_t bytes_per_frame = preset_p->channels * 2;\n    uint32_t frames_available = 0;\n    if (bytes_per_frame > 0) {\n        frames_available = preset_p->file_bytes_remaining / bytes_per_frame;\n    }\n    if (frames_available > 0 && frames_needed > frames_available) {\n        frames_needed = frames_available;\n    }\n    uint32_t frames_read = wave_read_pcm_frames_s16(\n        preset_p->file_handle,\n        preset_p->channels,\n        &preset_p->file_bytes_remaining,\n        preset_p->sample_ram,\n        frames_needed);\n    return frames_read;\n}\n\nSAMPLE render_pcm(SAMPLE* buf, uint16_t osc) {\n    if(AMY_IS_SET(synth[osc]->preset)) {\n        SAMPLE max_value = 0;\n        memorypcm_preset_t rom_local;\n        memorypcm_preset_t *preset =\n            get_preset_for_preset_number(synth[osc]->preset, &rom_local);\n        float logfreq = msynth[osc]->logfreq;\n        // If osc[midi_note] is set, shift the freq by the preset's default base_note.\n        if (AMY_IS_SET(synth[osc]->midi_note)) {\n            logfreq -= logfreq_for_midi_note(preset->midinote);\n        }\n        float playback_freq = freq_of_logfreq(preset->log2sr + logfreq);\n        uint32_t sample_length = preset->length;\n        if (preset->type == AMY_PCM_TYPE_FILE) {\n            float frames_per_output = playback_freq / (float)AMY_SAMPLE_RATE;\n            uint32_t frames_needed = (uint32_t)ceilf(frames_per_output * AMY_BLOCK_SIZE) + 1;\n            uint32_t max_frames = AMY_BLOCK_SIZE * PCM_FILE_BUFFER_MULT;\n            if (frames_needed > max_frames) {\n                frames_needed = max_frames;\n            }\n            sample_length = fill_sample_from_file(preset, frames_needed);\n            if(sample_length != frames_needed) {\n                // reached end of file\n                synth[osc]->status = SYNTH_OFF;\n            }\n            synth[osc]->phase = 0;\n        }\n        if (preset->sample_ram == NULL || sample_length == 0) {\n            synth[osc]->status = SYNTH_OFF;\n            return 0;\n        }\n\n        SAMPLE amp = F2S(msynth[osc]->amp);\n        PHASOR step = F2P((playback_freq / (float)AMY_SAMPLE_RATE) / (float)(1 << PCM_INDEX_BITS));\n        const LUTSAMPLE* table = preset->sample_ram;\n        uint32_t base_index = INT_OF_P(synth[osc]->phase, PCM_INDEX_BITS);\n        for(uint16_t i=0; i < AMY_BLOCK_SIZE; i++) {\n            SAMPLE frac = S_FRAC_OF_P(synth[osc]->phase, PCM_INDEX_BITS);\n            LUTSAMPLE b = 0;\n            LUTSAMPLE c = 0;\n            uint32_t next_index = base_index + 1;\n            if (base_index >= sample_length) {\n                if (preset->type != AMY_PCM_TYPE_FILE) {\n                    synth[osc]->status = SYNTH_OFF;\n                }\n                buf[i] = 0;\n                continue;\n            }\n            if (preset->channels == 2) {\n                uint32_t base_offset = base_index * 2;\n                uint32_t next_offset = next_index * 2;\n                if (synth[osc]->wave == PCM_LEFT) {\n                    b = table[base_offset];\n                    c = (next_index < sample_length) ? table[next_offset] : b;\n                } else if (synth[osc]->wave == PCM_RIGHT) {\n                    b = table[base_offset + 1];\n                    c = (next_index < sample_length) ? table[next_offset + 1] : b;\n                } else { // PCM or PCM_MIX\n                    LUTSAMPLE bl = table[base_offset];\n                    LUTSAMPLE br = table[base_offset + 1];\n                    b = (LUTSAMPLE)(((int32_t)bl + (int32_t)br) / 2);\n                    if (next_index < sample_length) {\n                        LUTSAMPLE cl = table[next_offset];\n                        LUTSAMPLE cr = table[next_offset + 1];\n                        c = (LUTSAMPLE)(((int32_t)cl + (int32_t)cr) / 2);\n                    } else {\n                        c = b;\n                    }\n                }\n            } else {\n                b = table[base_index];\n                c = (next_index < sample_length) ? table[next_index] : b;\n            }\n            SAMPLE sample = L2S(b) + MUL4_SS(L2S(c - b), frac);\n            synth[osc]->phase = P_WRAPPED_SUM(synth[osc]->phase, step);\n            base_index = INT_OF_P(synth[osc]->phase, PCM_INDEX_BITS);\n\n            if(preset->type != AMY_PCM_TYPE_FILE) {\n                // For non-file samples, we have to check for end of sample/looping.\n                if(base_index >= sample_length) { // end\n                    synth[osc]->status = SYNTH_OFF;// is this right?\n                    sample = 0;\n                } else {\n                    if(msynth[osc]->feedback > 0) { // still looping.  The feedback flag is cleared by pcm_note_off.\n                        if(base_index >= preset->loopend) { // loopend\n                            // back to loopstart\n                            int32_t loop_len = preset->loopend - preset->loopstart;\n                            synth[osc]->phase -= F2P(loop_len / (float)(1 << PCM_INDEX_BITS));\n                            base_index -= loop_len;\n                        }\n                    }\n                }\n            }\n            SAMPLE value = buf[i] + MUL4_SS(amp, sample);\n            buf[i] = value;   \n            if (value < 0) value = -value;\n            if (value > max_value) max_value = value;  \n        }\n        //printf(\"render_pcm: osc %d preset %d len %d base_ix %d phase %f step %f tablestep %f amp %f\\n\",\n        //       osc, synth[osc]->preset, preset->length, base_index, P2F(synth[osc]->phase), P2F(step), (1 << PCM_INDEX_BITS) * P2F(step), S2F(msynth[osc]->amp));\n        return max_value; \n        // i don't believe we ever need to detect silence in a sample. it will shut itself off at the end.\n    }\n    return 0;\n}\n\n\nSAMPLE compute_mod_pcm(uint16_t osc) {\n    if(AMY_IS_SET(synth[osc]->preset)) {\n        SAMPLE buf[AMY_BLOCK_SIZE];\n        memset(buf, 0, sizeof(buf));\n        render_pcm(buf, osc);\n        return buf[0];\n    }\n    return 0;\n}\n\n\nint pcm_load_file() {\n    // We pass the inputs to this as aliases in the amy_global structure. This is to not destroy the MP heap for amy->AMYboard\n    uint8_t midinote = amy_global.transfer_stored_bytes;\n    uint16_t preset_number = amy_global.transfer_file_handle;\n    char * filename = amy_global.transfer_filename;\n\n    pcm_unload_preset(preset_number);\n    if (filename == NULL || filename[0] == '\\0') {\n        return 0;\n    }\n    if (amy_global.config.amy_external_fopen_hook == NULL || amy_global.config.amy_external_fclose_hook == NULL) {\n        fprintf(stderr, \"fopen hook not enabled on platform\\n\");\n        return 0;\n    }\n    uint32_t handle = amy_global.config.amy_external_fopen_hook((char *)filename, \"rb\");\n    if (handle == 0) {\n        fprintf(stderr, \"Could not open file %s\\n\", filename);\n        return 0;\n    }\n    wave_info_t info = {0};\n    uint32_t data_bytes = 0;\n    if (!wave_parse_header(handle, &info, &data_bytes)) {\n        fprintf(stderr, \"Could not parse WAVE file %s\\n\", filename);\n        amy_global.config.amy_external_fclose_hook(handle);\n        return 0;\n    }\n    uint32_t total_frames = 0;\n    if (info.channels > 0) {\n        total_frames = data_bytes / (info.channels * 2);\n    }\n    uint32_t buffer_frames = AMY_BLOCK_SIZE * PCM_FILE_BUFFER_MULT;\n    memorypcm_ll_t *new_preset_pointer = malloc_caps(\n        sizeof(memorypcm_ll_t) + sizeof(memorypcm_preset_t) + buffer_frames * sizeof(int16_t),\n        amy_global.config.ram_caps_sample);\n    if (new_preset_pointer == NULL) {\n        fprintf(stderr, \"No RAM left for sample load\\n\");\n        return 0;\n    }\n    new_preset_pointer->next = memorypcm_ll_start;\n    memorypcm_ll_start = new_preset_pointer;\n    new_preset_pointer->preset_number = preset_number;\n    memorypcm_preset_t *memory_preset =\n        (memorypcm_preset_t *)(((uint8_t *)new_preset_pointer) + sizeof(memorypcm_ll_t));\n    strncpy(memory_preset->filename, filename, MAX_FILENAME_LEN - 1);\n    memory_preset->filename[MAX_FILENAME_LEN - 1] = '\\0';\n    memory_preset->channels = info.channels;\n    memory_preset->samplerate = info.sample_rate;\n    memory_preset->log2sr = log2f((float)info.sample_rate / ZERO_LOGFREQ_IN_HZ);\n    memory_preset->midinote = midinote;\n    memory_preset->length = total_frames;\n    memory_preset->type = AMY_PCM_TYPE_FILE;\n    memory_preset->file_bytes_remaining = total_frames * info.channels * 2;\n    memory_preset->file_handle = handle;\n    memory_preset->sample_ram = malloc_caps(buffer_frames * info.channels * sizeof(int16_t),\n                                                     amy_global.config.ram_caps_sample);\n    new_preset_pointer->preset = memory_preset;\n    //fprintf(stderr, \"read file %s frames %ld channels %d preset %d handle %ld\\n\", filename, total_frames, info.channels, preset_number, handle);\n    return 1;\n}\n\n\n// load mono samples (let python parse wave files) into preset # \n// set loopstart, loopend, midinote, samplerate (and log2sr)\n// return the allocated sample ram that AMY will fill in.\nint16_t * pcm_load(uint16_t preset_number, uint32_t length, uint32_t samplerate, uint8_t channels, uint8_t midinote, uint32_t loopstart, uint32_t loopend) {\n    // if preset was already a memorypcm, we need to unload it\n    pcm_unload_preset(preset_number); // this is a no-op if preset doesn't exist or is a const pcm\n    // now alloc a new LL entry and preset (the old LL entry is removed with pcm_unload_preset)\n    memorypcm_ll_t *new_preset_pointer = malloc_caps(sizeof(memorypcm_ll_t) + sizeof(memorypcm_preset_t) + length * channels * sizeof(int16_t),\n\t\t\t\t\t\t     amy_global.config.ram_caps_sample);\n    if(new_preset_pointer  == NULL) {\n        fprintf(stderr, \"No RAM left for sample load\\n\");\n        return NULL; // no ram for sample\n    }\n    new_preset_pointer->next = memorypcm_ll_start;\n    memorypcm_ll_start = new_preset_pointer;\n    new_preset_pointer->preset_number = preset_number;\n    memorypcm_preset_t *memory_preset = (memorypcm_preset_t *)(((uint8_t *)new_preset_pointer) + sizeof(memorypcm_ll_t));\n    memory_preset->samplerate = samplerate;\n    memory_preset->log2sr = log2f((float)samplerate / ZERO_LOGFREQ_IN_HZ);\n    memory_preset->midinote = midinote;\n    memory_preset->loopstart = loopstart;\n    memory_preset->length = length;\n    memory_preset->channels = channels;\n    memory_preset->filename[0] = '\\0';\n    memory_preset->file_bytes_remaining = 0;\n    memory_preset->file_handle = 0;\n    memory_preset->type = AMY_PCM_TYPE_MEMORY;\n    memory_preset->sample_ram = (int16_t *)(((uint8_t *)memory_preset) + sizeof(memorypcm_preset_t));\n    if(loopend == 0) {  // loop whole sample\n        memory_preset->loopend = memory_preset->length-1;\n    } else {\n        memory_preset->loopend = loopend;\n    }\n    new_preset_pointer->preset = memory_preset;\n    return memory_preset->sample_ram;\n}\n\nvoid pcm_unload_preset(uint16_t preset_number) {\n    // run through the LL looking for the preset\n    memorypcm_ll_t **preset_pointer = &memorypcm_ll_start;\n    while(*preset_pointer != NULL) {\n        if((*preset_pointer)->preset_number == preset_number) {\n            memorypcm_ll_t *next = (*preset_pointer)->next;\n            fclose_if_file((*preset_pointer)->preset);\n            // free the memory we allocated\n            free((*preset_pointer));\n            // close up the list\n            *preset_pointer = next;\n            return;\n        } else {\n            preset_pointer = &(*preset_pointer)->next;\n        }\n    }\n    //fprintf(stderr, \"pcm_unload_preset: preset %d not found\\n\", preset_number);  // This happens during a routine load_preset.\n}\n\nvoid pcm_unload_all_presets() {\n    memorypcm_ll_t *preset_pointer = memorypcm_ll_start;\n    while(preset_pointer != NULL) {\n        memorypcm_ll_t *next_pointer = preset_pointer->next;\n        fclose_if_file(preset_pointer->preset);\n        free(preset_pointer);\n        // Go to the next one\n        preset_pointer = next_pointer;\n    }\n    memorypcm_ll_start = NULL;\n}\n"
  },
  {
    "path": "src/pcm_samples_tiny.h",
    "content": "// Automatically generated by amy.headers.generate_pcm_header()\n#ifndef __PCM_SAMPLES_H\n#define __PCM_SAMPLES_H\nconst int16_t pcm[PCM_LENGTH] PROGMEM = {\n    82      ,48      ,-109    ,502     ,-495    ,385     ,214     ,-610    ,749     ,-167    ,135     ,108     ,-91     ,167     ,32      ,\n    96      ,-13     ,132     ,44      ,45      ,-18     ,192     ,-254    ,583     ,-211    ,-76     ,132     ,-487    ,1097    ,-848    ,\n    574     ,-167    ,184     ,1311    ,-3163   ,2080    ,732     ,-2546   ,2752    ,-980    ,-253    ,853     ,-1204   ,1787    ,-565    ,\n    -1805   ,2327    ,900     ,-3597   ,2184    ,680     ,-1069   ,1340    ,-991    ,680     ,-1211   ,2841    ,-1441   ,-2795   ,3186    ,\n    -421    ,-279    ,653     ,-697    ,700     ,-251    ,-372    ,2193    ,-1105   ,-1536   ,-952    ,2070    ,-161    ,1113    ,-1097   ,\n    1934    ,-1327   ,-5113   ,6662    ,-2278   ,207     ,916     ,-1072   ,951     ,-848    ,978     ,-786    ,81      ,1895    ,-2657   ,\n    -719    ,2298    ,-120    ,293     ,-1565   ,687     ,1117    ,221     ,-2211   ,324     ,3128    ,-2481   ,-1337   ,2425    ,-731    ,\n    649     ,-689    ,2631    ,-2503   ,-2924   ,4460    ,-865    ,-134    ,-669    ,4032    ,-5652   ,982     ,3285    ,-4224   ,6732    ,\n    -5206   ,648     ,-234    ,-1498   ,3759    ,-2578   ,3727    ,-4096   ,2959    ,-2670   ,-1506   ,4868    ,-3426   ,3068    ,-3726   ,\n    2605    ,-313    ,-927    ,830     ,191     ,960     ,-3681   ,3823    ,-2200   ,1533    ,-29     ,-2088   ,2620    ,-1670   ,1474    ,\n    -1169   ,1037    ,-925    ,1233    ,100     ,-1751   ,1939    ,-3518   ,10322   ,-9046   ,-5297   ,7888    ,-5388   ,8250    ,-6162   ,\n    4389    ,-463    ,-26     ,-1139   ,-8670   ,11455   ,-6103   ,6886    ,-7099   ,3       ,6326    ,-6474   ,5657    ,-5024   ,4035    ,\n    -3586   ,3552    ,-3101   ,1786    ,2206    ,-6366   ,7610    ,-8748   ,6942    ,-2041   ,-104    ,1027    ,-1002   ,3949    ,-8958   ,\n    10099   ,-8910   ,6197    ,1216    ,-4584   ,2007    ,-4932   ,11157   ,-11829  ,8060    ,-1979   ,-479    ,2483    ,-4040   ,3958    ,\n    -4249   ,8533    ,-10486  ,3998    ,3112    ,-2907   ,-123    ,-2768   ,3913    ,3694    ,-5488   ,-1966   ,5673    ,-2613   ,5587    ,\n    -9982   ,3090    ,6373    ,-8467   ,8836    ,-1909   ,-10788  ,9555    ,-1492   ,-232    ,428     ,-325    ,3489    ,-9007   ,7896    ,\n    -2153   ,-954    ,3047    ,-1955   ,4354    ,-3037   ,-3723   ,2139    ,12      ,-8037   ,3569    ,15255   ,-11727  ,-4798   ,9750    ,\n    -5038   ,3685    ,-3110   ,534     ,-869    ,10001   ,-9418   ,-12877  ,18241   ,-4854   ,384     ,1211    ,-3488   ,3368    ,909     ,\n    -8079   ,10924   ,-720    ,-13418  ,10128   ,1740    ,2231    ,-8822   ,-2688   ,9933    ,-4173   ,1700    ,23      ,-2432   ,9001    ,\n    -13336  ,5339    ,4755    ,-11149  ,10073   ,-3680   ,968     ,-832    ,830     ,152     ,-638    ,1065    ,-1258   ,1737    ,-2189   ,\n    2523    ,-2345   ,2657    ,-3302   ,5514    ,-2888   ,-6689   ,10848   ,-6719   ,2551    ,-2728   ,7295    ,-4546   ,-5886   ,9866    ,\n    -7879   ,5850    ,-2031   ,366     ,177     ,-549    ,-114    ,3999    ,-3213   ,-6860   ,8359    ,302     ,-2500   ,-2844   ,7739    ,\n    -5453   ,-2534   ,7539    ,-6990   ,8084    ,-5408   ,-3456   ,6802    ,-3960   ,4494    ,-5765   ,5081    ,-4562   ,11224   ,-4438   ,\n    -20476  ,17902   ,2899    ,-3234   ,-7589   ,6635    ,724     ,1476    ,-3406   ,-3303   ,8397    ,-6658   ,4913    ,-1588   ,-2214   ,\n    6971    ,-10976  ,2658    ,10631   ,-11914  ,8345    ,-6389   ,-4500   ,9622    ,-2036   ,-1361   ,953     ,554     ,-2215   ,8944    ,\n    -14388  ,5615    ,6086    ,-6669   ,18      ,9165    ,-3687   ,-15996  ,17115   ,-5189   ,2501    ,-2827   ,7457    ,-5792   ,-9424   ,\n    16246   ,-10062  ,6942    ,-4844   ,1544    ,1026    ,-1792   ,2510    ,-3011   ,2991    ,-439    ,1594    ,-11226  ,16544   ,-5673   ,\n    -12039  ,11848   ,-1962   ,6023    ,-14985  ,8760    ,4188    ,-9106   ,5908    ,-521    ,-1131   ,-127    ,4366    ,92      ,1632    ,\n    -19484  ,9611    ,7606    ,2803    ,-3012   ,-16598  ,20057   ,-8863   ,6017    ,-824    ,-8542   ,4473    ,3218    ,1552    ,-10851  ,\n    15715   ,-12727  ,296     ,8723    ,-9762   ,9497    ,-4316   ,-2523   ,2510    ,961     ,-1763   ,1487    ,2507    ,-1377   ,-4622   ,\n    -2274   ,7672    ,-3858   ,-1425   ,5201    ,1081    ,-6340   ,-175    ,7350    ,-6823   ,5604    ,554     ,-10198  ,7951    ,-479    ,\n    -1362   ,1260    ,-900    ,535     ,-248    ,14      ,-113    ,839     ,-787    ,3347    ,-5629   ,-57     ,4287    ,-2274   ,778     ,\n    663     ,-2573   ,5009    ,-4992   ,1140    ,6667    ,-14385  ,10351   ,-2120   ,18      ,2293    ,-3017   ,3030    ,-9494   ,13096   ,\n    -7556   ,-1136   ,6160    ,-6513   ,6577    ,-6277   ,6698    ,-75     ,-9071   ,5341    ,-3379   ,2821    ,2067    ,-1952   ,1383    ,\n    -1607   ,732     ,289     ,-1042   ,1374    ,1206    ,-6246   ,5737    ,715     ,-7293   ,10458   ,-8600   ,568     ,7803    ,-10518  ,\n    5532    ,232     ,-1493   ,1252    ,-1031   ,825     ,-656    ,352     ,-280    ,470     ,-97     ,-442    ,-1391   ,3576    ,-1410   ,\n    -1910   ,548     ,1007    ,-177    ,307     ,777     ,-3069   ,3541    ,-1818   ,-309    ,-698    ,1076    ,275     ,-491    ,1961    ,\n    -4693   ,3832    ,-961    ,-1076   ,1848    ,-998    ,-132    ,-111    ,763     ,-893    ,827     ,-768    ,848     ,-723    ,57      ,\n    1425    ,-3053   ,3652    ,-17     ,-5429   ,4259    ,-89     ,-1134   ,1732    ,-1602   ,1853    ,-1551   ,-458    ,1808    ,-1439   ,\n    909     ,-245    ,-205    ,1012    ,-1619   ,808     ,572     ,-739    ,494     ,-133    ,177     ,-156    ,279     ,-325    ,359     ,\n    -268    ,501     ,11      ,-1073   ,1220    ,-446    ,263     ,-230    ,508     ,-72     ,-790    ,1257    ,-1103   ,202     ,685     ,\n    -396    ,267     ,-93     ,78      ,29      ,9       ,63      ,41      ,63      ,-47     ,281     ,-158    ,-167    ,426     ,-100    ,\n    108     ,-67     ,320     ,-202    ,264     ,246     ,-858    ,954     ,-514    ,76      ,466     ,-262    ,446     ,-494    ,371     ,\n    34      ,-56     ,234     ,-104    ,-61     ,193     ,71      ,-95     ,180     ,3       ,71      ,11      ,87      ,20      ,53      ,\n    59      ,22      ,77      ,49      ,40      ,61      ,88      ,-1      ,78      ,58      ,75      ,7       ,153     ,23      ,-61     ,\n    195     ,62      ,54      ,34      ,111     ,-37     ,178     ,137     ,-165    ,112     ,-6      ,-4      ,8       ,-10     ,11      ,\n    -12     ,11      ,-10     ,8       ,-7      ,5       ,-3      ,1       ,0       ,0       ,1       ,-1      ,1       ,-1      ,1       ,\n    -1      ,0       ,340     ,-16     ,20714   ,32767   ,31230   ,31466   ,29645   ,29929   ,29261   ,29251   ,29063   ,28751   ,28730   ,\n    28201   ,28203   ,27545   ,27467   ,26792   ,26572   ,25880   ,25452   ,24821   ,24101   ,23618   ,17650   ,11527   ,9149    ,7093    ,\n    5526    ,3639    ,1974    ,290     ,-1294   ,-2801   ,-4309   ,-5695   ,-7129   ,-8435   ,-9792   ,-11037  ,-12312  ,-13508  ,-14700  ,\n    -15842  ,-16960  ,-18040  ,-19080  ,-20102  ,-21067  ,-22012  ,-22904  ,-23778  ,-24587  ,-25368  ,-26109  ,-26801  ,-27459  ,-28069  ,\n    -28636  ,-29155  ,-29633  ,-30061  ,-30442  ,-30777  ,-31065  ,-31307  ,-31500  ,-31647  ,-31744  ,-31792  ,-31797  ,-31749  ,-31654  ,\n    -31515  ,-31327  ,-31091  ,-30814  ,-30489  ,-30118  ,-29705  ,-29243  ,-28740  ,-28193  ,-27609  ,-26982  ,-26319  ,-25614  ,-24872  ,\n    -24099  ,-23281  ,-22437  ,-21555  ,-20642  ,-19699  ,-18731  ,-17730  ,-16709  ,-15657  ,-14584  ,-13486  ,-12367  ,-11230  ,-10068  ,\n    -8897   ,-7696   ,-6494   ,-5259   ,-4011   ,-2746   ,-1460   ,-148    ,1179    ,2542    ,3931    ,5356    ,6734    ,7609    ,8144    ,\n    8657    ,9134    ,9617    ,10077   ,10538   ,10979   ,11414   ,11839   ,12256   ,12661   ,13053   ,13441   ,13814   ,14180   ,14533   ,\n    14878   ,15214   ,15542   ,15855   ,16161   ,16457   ,16745   ,17020   ,17287   ,17547   ,17793   ,18033   ,18266   ,18485   ,18696   ,\n    18901   ,19094   ,19278   ,19452   ,19619   ,19776   ,19926   ,20067   ,20198   ,20321   ,20436   ,20546   ,20640   ,20733   ,20814   ,\n    20885   ,20955   ,21011   ,21062   ,21103   ,21137   ,21164   ,21182   ,21193   ,21198   ,21195   ,21185   ,21166   ,21144   ,21114   ,\n    21075   ,21030   ,20975   ,20916   ,20853   ,20779   ,20702   ,20618   ,20525   ,20429   ,20321   ,20211   ,20095   ,19974   ,19842   ,\n    19709   ,19573   ,19425   ,19273   ,19115   ,18955   ,18786   ,18612   ,18434   ,18251   ,18060   ,17867   ,17669   ,17464   ,17256   ,\n    17040   ,16824   ,16600   ,16375   ,16140   ,15907   ,15669   ,15422   ,15174   ,14920   ,14669   ,14409   ,14147   ,13880   ,13609   ,\n    13336   ,13062   ,12784   ,12500   ,12214   ,11926   ,11635   ,11344   ,11047   ,10747   ,10448   ,10143   ,9837    ,9528    ,9216    ,\n    8903    ,8587    ,8270    ,7950    ,7627    ,7299    ,6973    ,6638    ,6305    ,5968    ,5621    ,5275    ,4922    ,4565    ,4200    ,\n    3833    ,3458    ,3078    ,2693    ,2304    ,1907    ,1506    ,1098    ,686     ,269     ,-152    ,-575    ,-1007   ,-1443   ,-1881   ,\n    -2326   ,-2775   ,-3225   ,-3678   ,-4137   ,-4597   ,-5060   ,-5524   ,-5991   ,-6458   ,-6928   ,-7399   ,-7870   ,-8342   ,-8812   ,\n    -9288   ,-9759   ,-10230  ,-10702  ,-11172  ,-11640  ,-12110  ,-12575  ,-13036  ,-13498  ,-13956  ,-14409  ,-14862  ,-15309  ,-15753  ,\n    -16191  ,-16625  ,-17057  ,-17481  ,-17904  ,-18320  ,-18731  ,-19133  ,-19530  ,-19922  ,-20308  ,-20689  ,-21057  ,-21423  ,-21780  ,\n    -22128  ,-22471  ,-22804  ,-23129  ,-23440  ,-23747  ,-24046  ,-24333  ,-24614  ,-24885  ,-25144  ,-25392  ,-25632  ,-25863  ,-26079  ,\n    -26286  ,-26485  ,-26673  ,-26849  ,-27016  ,-27168  ,-27310  ,-27442  ,-27562  ,-27670  ,-27767  ,-27854  ,-27924  ,-27990  ,-28038  ,\n    -28074  ,-28103  ,-28114  ,-28119  ,-28106  ,-28086  ,-28055  ,-28009  ,-27952  ,-27883  ,-27805  ,-27711  ,-27609  ,-27489  ,-27359  ,\n    -27222  ,-27069  ,-26908  ,-26737  ,-26552  ,-26356  ,-26148  ,-25927  ,-25695  ,-25456  ,-25202  ,-24939  ,-24671  ,-24386  ,-24094  ,\n    -23790  ,-23478  ,-23158  ,-22824  ,-22480  ,-22132  ,-21771  ,-21400  ,-21025  ,-20639  ,-20249  ,-19844  ,-19438  ,-19020  ,-18600  ,\n    -18170  ,-17731  ,-17293  ,-16842  ,-16390  ,-15930  ,-15467  ,-14999  ,-14528  ,-14054  ,-13576  ,-13096  ,-12614  ,-12131  ,-11646  ,\n    -11164  ,-10679  ,-10198  ,-9716   ,-9235   ,-8757   ,-8281   ,-7807   ,-7335   ,-6867   ,-6400   ,-5937   ,-5477   ,-5022   ,-4566   ,\n    -4116   ,-3667   ,-3223   ,-2781   ,-2344   ,-1911   ,-1477   ,-1050   ,-621    ,-204    ,212     ,630     ,1043    ,1451    ,1856    ,\n    2260    ,2657    ,3051    ,3443    ,3834    ,4216    ,4598    ,4973    ,5345    ,5717    ,6081    ,6441    ,6797    ,7153    ,7503    ,\n    7850    ,8191    ,8530    ,8864    ,9195    ,9520    ,9841    ,10162   ,10473   ,10783   ,11089   ,11390   ,11684   ,11981   ,12268   ,\n    12552   ,12834   ,13108   ,13379   ,13644   ,13908   ,14167   ,14420   ,14669   ,14914   ,15154   ,15388   ,15620   ,15844   ,16066   ,\n    16287   ,16500   ,16708   ,16912   ,17110   ,17305   ,17496   ,17682   ,17864   ,18040   ,18213   ,18383   ,18544   ,18700   ,18855   ,\n    19000   ,19147   ,19285   ,19418   ,19551   ,19675   ,19797   ,19913   ,20025   ,20132   ,20231   ,20329   ,20420   ,20507   ,20592   ,\n    20668   ,20742   ,20812   ,20877   ,20936   ,20989   ,21041   ,21085   ,21124   ,21161   ,21196   ,21222   ,21243   ,21261   ,21272   ,\n    21279   ,21282   ,21283   ,21278   ,21267   ,21251   ,21234   ,21213   ,21183   ,21151   ,21114   ,21074   ,21030   ,20982   ,20928   ,\n    20871   ,20811   ,20742   ,20670   ,20595   ,20518   ,20435   ,20347   ,20258   ,20163   ,20064   ,19960   ,19855   ,19744   ,19629   ,\n    19510   ,19389   ,19263   ,19130   ,18999   ,18862   ,18721   ,18574   ,18429   ,18275   ,18119   ,17963   ,17798   ,17636   ,17467   ,\n    17293   ,17117   ,16939   ,16759   ,16575   ,16386   ,16194   ,16000   ,15805   ,15606   ,15403   ,15199   ,14990   ,14778   ,14566   ,\n    14351   ,14135   ,13914   ,13692   ,13466   ,13240   ,13010   ,12777   ,12544   ,12307   ,12068   ,11828   ,11587   ,11343   ,11100   ,\n    10851   ,10602   ,10351   ,10096   ,9844    ,9590    ,9331    ,9071    ,8811    ,8548    ,8286    ,8021    ,7756    ,7488    ,7220    ,\n    6952    ,6682    ,6410    ,6138    ,5871    ,5597    ,5323    ,5048    ,4774    ,4498    ,4222    ,3947    ,3668    ,3392    ,3116    ,\n    2840    ,2562    ,2286    ,2007    ,1728    ,1450    ,1172    ,894     ,616     ,335     ,55      ,-219    ,-501    ,-782    ,-1063   ,\n    -1348   ,-1630   ,-1916   ,-2205   ,-2493   ,-2785   ,-3075   ,-3370   ,-3667   ,-3962   ,-4263   ,-4563   ,-4869   ,-5173   ,-5477   ,\n    -5786   ,-6096   ,-6407   ,-6718   ,-7031   ,-7343   ,-7660   ,-7975   ,-8292   ,-8604   ,-8922   ,-9240   ,-9552   ,-9873   ,-10185  ,\n    -10501  ,-10816  ,-11130  ,-11442  ,-11751  ,-12062  ,-12368  ,-12672  ,-12976  ,-13277  ,-13575  ,-13874  ,-14167  ,-14456  ,-14743  ,\n    -15024  ,-15304  ,-15582  ,-15853  ,-16119  ,-16385  ,-16646  ,-16902  ,-17150  ,-17398  ,-17637  ,-17873  ,-18102  ,-18336  ,-18555  ,\n    -18761  ,-18970  ,-19169  ,-19366  ,-19555  ,-19740  ,-19911  ,-20081  ,-20247  ,-20400  ,-20549  ,-20693  ,-20828  ,-20952  ,-21075  ,\n    -21185  ,-21289  ,-21389  ,-21478  ,-21558  ,-21631  ,-21698  ,-21755  ,-21806  ,-21849  ,-21885  ,-21910  ,-21926  ,-21937  ,-21937  ,\n    -21930  ,-21918  ,-21896  ,-21863  ,-21821  ,-21773  ,-21716  ,-21652  ,-21577  ,-21497  ,-21407  ,-21311  ,-21205  ,-21092  ,-20971  ,\n    -20839  ,-20706  ,-20560  ,-20408  ,-20246  ,-20080  ,-19909  ,-19727  ,-19536  ,-19339  ,-19136  ,-18923  ,-18709  ,-18483  ,-18254  ,\n    -18018  ,-17773  ,-17525  ,-17270  ,-17012  ,-16744  ,-16474  ,-16196  ,-15916  ,-15632  ,-15340  ,-15048  ,-14750  ,-14447  ,-14141  ,\n    -13832  ,-13521  ,-13208  ,-12890  ,-12574  ,-12254  ,-11932  ,-11612  ,-11290  ,-10966  ,-10640  ,-10317  ,-9991   ,-9669   ,-9344   ,\n    -9023   ,-8700   ,-8377   ,-8058   ,-7736   ,-7417   ,-7097   ,-6778   ,-6462   ,-6147   ,-5831   ,-5518   ,-5205   ,-4893   ,-4582   ,\n    -4274   ,-3967   ,-3659   ,-3356   ,-3050   ,-2747   ,-2446   ,-2147   ,-1847   ,-1550   ,-1254   ,-962    ,-670    ,-379    ,-93     ,\n    194     ,477     ,762     ,1042    ,1322    ,1602    ,1877    ,2152    ,2423    ,2693    ,2961    ,3228    ,3492    ,3755    ,4015    ,\n    4274    ,4529    ,4781    ,5034    ,5282    ,5531    ,5773    ,6016    ,6255    ,6490    ,6725    ,6956    ,7186    ,7412    ,7638    ,\n    7859    ,8078    ,8295    ,8506    ,8717    ,8927    ,9129    ,9333    ,9536    ,9732    ,9926    ,10116   ,10307   ,10491   ,10673   ,\n    10855   ,11031   ,11205   ,11378   ,11545   ,11712   ,11871   ,12030   ,12186   ,12336   ,12489   ,12636   ,12777   ,12919   ,13059   ,\n    13190   ,13322   ,13450   ,13573   ,13693   ,13811   ,13926   ,14037   ,14147   ,14249   ,14353   ,14448   ,14543   ,14636   ,14722   ,\n    14808   ,14890   ,14969   ,15042   ,15113   ,15180   ,15247   ,15308   ,15365   ,15421   ,15470   ,15518   ,15563   ,15603   ,15642   ,\n    15675   ,15704   ,15732   ,15757   ,15776   ,15795   ,15814   ,15821   ,15829   ,15832   ,15832   ,15830   ,15823   ,15817   ,15801   ,\n    15784   ,15768   ,15746   ,15720   ,15689   ,15660   ,15622   ,15584   ,15544   ,15496   ,15450   ,15400   ,15346   ,15287   ,15227   ,\n    15164   ,15097   ,15028   ,14954   ,14881   ,14804   ,14724   ,14638   ,14551   ,14463   ,14369   ,14273   ,14176   ,14079   ,13973   ,\n    13867   ,13760   ,13645   ,13533   ,13416   ,13297   ,13174   ,13050   ,12922   ,12790   ,12662   ,12529   ,12391   ,12252   ,12112   ,\n    11967   ,11821   ,11675   ,11524   ,11372   ,11220   ,11064   ,10906   ,10744   ,10583   ,10417   ,10252   ,10087   ,9913    ,9743    ,\n    9570    ,9394    ,9218    ,9040    ,8862    ,8679    ,8498    ,8315    ,8128    ,7940    ,7753    ,7564    ,7370    ,7181    ,6988    ,\n    6792    ,6596    ,6400    ,6201    ,6005    ,5804    ,5604    ,5402    ,5199    ,4997    ,4791    ,4588    ,4382    ,4176    ,3971    ,\n    3765    ,3557    ,3350    ,3141    ,2933    ,2726    ,2515    ,2308    ,2098    ,1888    ,1678    ,1468    ,1261    ,1052    ,842     ,\n    633     ,423     ,214     ,7       ,-198    ,-405    ,-614    ,-819    ,-1027   ,-1234   ,-1439   ,-1645   ,-1848   ,-2053   ,-2258   ,\n    -2460   ,-2663   ,-2863   ,-3063   ,-3265   ,-3463   ,-3662   ,-3862   ,-4060   ,-4254   ,-4450   ,-4646   ,-4839   ,-5034   ,-5225   ,\n    -5416   ,-5608   ,-5801   ,-5991   ,-6182   ,-6372   ,-6559   ,-6750   ,-6938   ,-7125   ,-7312   ,-7500   ,-7687   ,-7872   ,-8060   ,\n    -8246   ,-8430   ,-8614   ,-8800   ,-8984   ,-9168   ,-9350   ,-9532   ,-9714   ,-9892   ,-10072  ,-10250  ,-10425  ,-10601  ,-10774  ,\n    -10948  ,-11118  ,-11288  ,-11456  ,-11620  ,-11786  ,-11945  ,-12105  ,-12264  ,-12419  ,-12572  ,-12723  ,-12871  ,-13017  ,-13160  ,\n    -13299  ,-13435  ,-13567  ,-13697  ,-13823  ,-13945  ,-14068  ,-14185  ,-14298  ,-14409  ,-14514  ,-14615  ,-14712  ,-14804  ,-14893  ,\n    -14978  ,-15060  ,-15140  ,-15211  ,-15279  ,-15343  ,-15402  ,-15456  ,-15506  ,-15552  ,-15593  ,-15627  ,-15661  ,-15687  ,-15707  ,\n    -15726  ,-15736  ,-15742  ,-15742  ,-15741  ,-15731  ,-15715  ,-15700  ,-15677  ,-15648  ,-15615  ,-15578  ,-15532  ,-15482  ,-15430  ,\n    -15370  ,-15308  ,-15241  ,-15167  ,-15088  ,-15005  ,-14917  ,-14822  ,-14726  ,-14624  ,-14519  ,-14409  ,-14292  ,-14175  ,-14049  ,\n    -13922  ,-13790  ,-13651  ,-13514  ,-13370  ,-13222  ,-13072  ,-12918  ,-12762  ,-12600  ,-12435  ,-12270  ,-12098  ,-11926  ,-11750  ,\n    -11574  ,-11397  ,-11214  ,-11028  ,-10842  ,-10655  ,-10466  ,-10277  ,-10083  ,-9890   ,-9697   ,-9501   ,-9304   ,-9108   ,-8910   ,\n    -8709   ,-8511   ,-8310   ,-8110   ,-7906   ,-7705   ,-7499   ,-7296   ,-7093   ,-6887   ,-6685   ,-6478   ,-6274   ,-6067   ,-5862   ,\n    -5657   ,-5451   ,-5244   ,-5037   ,-4832   ,-4627   ,-4420   ,-4213   ,-4007   ,-3802   ,-3595   ,-3389   ,-3184   ,-2977   ,-2772   ,\n    -2567   ,-2362   ,-2156   ,-1951   ,-1748   ,-1545   ,-1343   ,-1140   ,-938    ,-737    ,-535    ,-336    ,-136    ,58      ,255     ,\n    453     ,651     ,847     ,1042    ,1236    ,1430    ,1623    ,1814    ,2005    ,2194    ,2384    ,2571    ,2759    ,2942    ,3125    ,\n    3312    ,3492    ,3674    ,3852    ,4031    ,4206    ,4382    ,4557    ,4731    ,4902    ,5069    ,5239    ,5405    ,5570    ,5735    ,\n    5898    ,6057    ,6218    ,6374    ,6528    ,6683    ,6836    ,6987    ,7136    ,7284    ,7429    ,7573    ,7714    ,7855    ,7991    ,\n    8125    ,8259    ,8392    ,8521    ,8646    ,8774    ,8898    ,9019    ,9137    ,9256    ,9371    ,9483    ,9596    ,9704    ,9811    ,\n    9916    ,10018   ,10117   ,10216   ,10311   ,10404   ,10495   ,10583   ,10672   ,10756   ,10837   ,10918   ,10995   ,11070   ,11141   ,\n    11209   ,11278   ,11342   ,11403   ,11463   ,11522   ,11577   ,11627   ,11677   ,11727   ,11773   ,11815   ,11855   ,11892   ,11929   ,\n    11962   ,11992   ,12021   ,12047   ,12071   ,12091   ,12108   ,12124   ,12139   ,12148   ,12158   ,12161   ,12165   ,12168   ,12163   ,\n    12163   ,12155   ,12142   ,12132   ,12120   ,12103   ,12085   ,12065   ,12040   ,12014   ,11985   ,11954   ,11922   ,11888   ,11849   ,\n    11809   ,11766   ,11722   ,11676   ,11625   ,11576   ,11520   ,11468   ,11410   ,11348   ,11285   ,11218   ,11155   ,11084   ,11014   ,\n    10941   ,10865   ,10789   ,10708   ,10628   ,10545   ,10459   ,10371   ,10282   ,10191   ,10098   ,10003   ,9908    ,9809    ,9708    ,\n    9607    ,9504    ,9398    ,9290    ,9182    ,9069    ,8958    ,8844    ,8727    ,8610    ,8492    ,8371    ,8247    ,8125    ,7995    ,\n    7873    ,7747    ,7617    ,7489    ,7355    ,7224    ,7089    ,6954    ,6820    ,6680    ,6539    ,6402    ,6258    ,6116    ,5973    ,\n    5826    ,5683    ,5534    ,5389    ,5242    ,5092    ,4943    ,4790    ,4641    ,4489    ,4336    ,4183    ,4029    ,3877    ,3721    ,\n    3563    ,3407    ,3252    ,3094    ,2935    ,2779    ,2619    ,2462    ,2302    ,2142    ,1985    ,1823    ,1665    ,1504    ,1344    ,\n    1184    ,1025    ,865     ,704     ,544     ,384     ,226     ,66      ,-91     ,-250    ,-409    ,-568    ,-726    ,-885    ,-1043   ,\n    -1199   ,-1359   ,-1512   ,-1670   ,-1826   ,-1982   ,-2136   ,-2288   ,-2444   ,-2597   ,-2750   ,-2899   ,-3050   ,-3199   ,-3349   ,\n    -3495   ,-3641   ,-3789   ,-3933   ,-4078   ,-4223   ,-4365   ,-4506   ,-4647   ,-4783   ,-4920   ,-5058   ,-5196   ,-5330   ,-5462   ,\n    -5596   ,-5726   ,-5856   ,-5985   ,-6113   ,-6238   ,-6361   ,-6486   ,-6609   ,-6728   ,-6849   ,-6968   ,-7084   ,-7200   ,-7313   ,\n    -7426   ,-7538   ,-7647   ,-7754   ,-7861   ,-7965   ,-8069   ,-8173   ,-8273   ,-8371   ,-8471   ,-8566   ,-8658   ,-8754   ,-8844   ,\n    -8934   ,-9024   ,-9109   ,-9193   ,-9273   ,-9357   ,-9436   ,-9513   ,-9590   ,-9663   ,-9737   ,-9804   ,-9874   ,-9939   ,-10003  ,\n    -10067  ,-10126  ,-10186  ,-10246  ,-10301  ,-10352  ,-10401  ,-10449  ,-10496  ,-10541  ,-10582  ,-10621  ,-10658  ,-10692  ,-10726  ,\n    -10756  ,-10784  ,-10810  ,-10833  ,-10853  ,-10870  ,-10888  ,-10900  ,-10911  ,-10923  ,-10927  ,-10928  ,-10931  ,-10927  ,-10924  ,\n    -10918  ,-10906  ,-10895  ,-10878  ,-10861  ,-10842  ,-10819  ,-10796  ,-10767  ,-10736  ,-10706  ,-10671  ,-10635  ,-10593  ,-10552  ,\n    -10510  ,-10459  ,-10413  ,-10361  ,-10305  ,-10250  ,-10189  ,-10129  ,-10066  ,-10001  ,-9934   ,-9863   ,-9791   ,-9717   ,-9642   ,\n    -9565   ,-9483   ,-9403   ,-9318   ,-9232   ,-9145   ,-9056   ,-8966   ,-8871   ,-8779   ,-8685   ,-8584   ,-8485   ,-8385   ,-8281   ,\n    -8179   ,-8073   ,-7966   ,-7856   ,-7747   ,-7637   ,-7526   ,-7414   ,-7301   ,-7183   ,-7067   ,-6951   ,-6829   ,-6711   ,-6590   ,\n    -6467   ,-6345   ,-6220   ,-6096   ,-5967   ,-5845   ,-5715   ,-5586   ,-5456   ,-5326   ,-5195   ,-5063   ,-4931   ,-4793   ,-4664   ,\n    -4527   ,-4390   ,-4256   ,-4118   ,-3980   ,-3842   ,-3704   ,-3566   ,-3427   ,-3287   ,-3146   ,-3003   ,-2864   ,-2724   ,-2579   ,\n    -2439   ,-2297   ,-2154   ,-2011   ,-1869   ,-1726   ,-1582   ,-1440   ,-1296   ,-1152   ,-1010   ,-867    ,-724    ,-581    ,-440    ,\n    -297    ,-152    ,-13     ,126     ,267     ,409     ,549     ,691     ,831     ,970     ,1111    ,1249    ,1389    ,1527    ,1666    ,\n    1801    ,1936    ,2073    ,2210    ,2347    ,2479    ,2613    ,2746    ,2878    ,3007    ,3138    ,3270    ,3399    ,3528    ,3654    ,\n    3778    ,3902    ,4028    ,4152    ,4274    ,4396    ,4517    ,4634    ,4752    ,4871    ,4985    ,5099    ,5214    ,5327    ,5438    ,\n    5547    ,5656    ,5762    ,5867    ,5973    ,6075    ,6179    ,6278    ,6377    ,6476    ,6571    ,6665    ,6759    ,6853    ,6942    ,\n    7032    ,7119    ,7205    ,7291    ,7373    ,7456    ,7534    ,7613    ,7690    ,7766    ,7839    ,7912    ,7982    ,8050    ,8119    ,\n    8185    ,8248    ,8309    ,8373    ,8429    ,8486    ,8539    ,8593    ,8644    ,8692    ,8743    ,8790    ,8832    ,8875    ,8920    ,\n    8957    ,8995    ,9030    ,9064    ,9095    ,9127    ,9156    ,9182    ,9207    ,9228    ,9252    ,9269    ,9286    ,9302    ,9316    ,\n    9328    ,9337    ,9345    ,9352    ,9355    ,9355    ,9358    ,9358    ,9354    ,9347    ,9341    ,9333    ,9324    ,9310    ,9295    ,\n    9281    ,9259    ,9242    ,9222    ,9197    ,9173    ,9145    ,9118    ,9084    ,9054    ,9022    ,8985    ,8947    ,8908    ,8868    ,\n    8824    ,8782    ,8735    ,8686    ,8638    ,8587    ,8534    ,8480    ,8428    ,8369    ,8309    ,8250    ,8188    ,8124    ,8058    ,\n    7991    ,7923    ,7854    ,7783    ,7711    ,7637    ,7562    ,7484    ,7405    ,7326    ,7245    ,7163    ,7081    ,6996    ,6909    ,\n    6823    ,6734    ,6644    ,6551    ,6460    ,6368    ,6272    ,6178    ,6083    ,5984    ,5887    ,5785    ,5684    ,5584    ,5481    ,\n    5376    ,5272    ,5166    ,5059    ,4953    ,4844    ,4735    ,4625    ,4513    ,4403    ,4288    ,4177    ,4065    ,3951    ,3834    ,\n    3718    ,3604    ,3486    ,3368    ,3250    ,3135    ,3015    ,2896    ,2779    ,2659    ,2540    ,2418    ,2297    ,2174    ,2054    ,\n    1932    ,1810    ,1689    ,1565    ,1443    ,1320    ,1198    ,1075    ,953     ,829     ,707     ,585     ,461     ,339     ,218     ,\n    95      ,-24     ,-144    ,-266    ,-388    ,-510    ,-627    ,-750    ,-872    ,-992    ,-1113   ,-1231   ,-1351   ,-1469   ,-1589   ,\n    -1705   ,-1823   ,-1943   ,-2057   ,-2172   ,-2287   ,-2402   ,-2518   ,-2630   ,-2744   ,-2857   ,-2967   ,-3080   ,-3189   ,-3298   ,\n    -3407   ,-3516   ,-3623   ,-3729   ,-3832   ,-3938   ,-4044   ,-4146   ,-4249   ,-4349   ,-4448   ,-4547   ,-4647   ,-4742   ,-4837   ,\n    -4934   ,-5028   ,-5121   ,-5210   ,-5302   ,-5391   ,-5477   ,-5566   ,-5650   ,-5734   ,-5818   ,-5898   ,-5980   ,-6058   ,-6137   ,\n    -6214   ,-6290   ,-6367   ,-6438   ,-6510   ,-6582   ,-6650   ,-6718   ,-6786   ,-6850   ,-6912   ,-6975   ,-7035   ,-7094   ,-7153   ,\n    -7207   ,-7264   ,-7318   ,-7368   ,-7418   ,-7466   ,-7513   ,-7558   ,-7604   ,-7648   ,-7688   ,-7727   ,-7765   ,-7801   ,-7836   ,\n    -7868   ,-7899   ,-7930   ,-7958   ,-7986   ,-8010   ,-8031   ,-8054   ,-8072   ,-8089   ,-8108   ,-8122   ,-8133   ,-8147   ,-8158   ,\n    -8165   ,-8172   ,-8177   ,-8180   ,-8183   ,-8183   ,-8181   ,-8177   ,-8171   ,-8166   ,-8157   ,-8146   ,-8136   ,-8124   ,-8110   ,\n    -8094   ,-8076   ,-8057   ,-8037   ,-8015   ,-7994   ,-7965   ,-7938   ,-7911   ,-7879   ,-7848   ,-7816   ,-7780   ,-7743   ,-7708   ,\n    -7670   ,-7629   ,-7588   ,-7544   ,-7499   ,-7455   ,-7407   ,-7358   ,-7306   ,-7254   ,-7200   ,-7145   ,-7090   ,-7033   ,-6973   ,\n    -6913   ,-6853   ,-6789   ,-6724   ,-6659   ,-6594   ,-6526   ,-6453   ,-6385   ,-6313   ,-6240   ,-6167   ,-6093   ,-6017   ,-5939   ,\n    -5861   ,-5780   ,-5701   ,-5621   ,-5540   ,-5455   ,-5372   ,-5287   ,-5201   ,-5112   ,-5024   ,-4938   ,-4848   ,-4758   ,-4667   ,\n    -4578   ,-4484   ,-4389   ,-4297   ,-4202   ,-4106   ,-4014   ,-3914   ,-3816   ,-3719   ,-3619   ,-3522   ,-3421   ,-3322   ,-3220   ,\n    -3120   ,-3018   ,-2914   ,-2812   ,-2709   ,-2605   ,-2502   ,-2399   ,-2290   ,-2187   ,-2080   ,-1973   ,-1868   ,-1760   ,-1653   ,\n    -1545   ,-1440   ,-1334   ,-1225   ,-1117   ,-1009   ,-903    ,-794    ,-685    ,-579    ,-469    ,-364    ,-254    ,-145    ,-40     ,\n    64      ,171     ,282     ,388     ,493     ,600     ,705     ,813     ,921     ,1026    ,1130    ,1234    ,1341    ,1444    ,1545    ,\n    1649    ,1751    ,1856    ,1957    ,2057    ,2159    ,2258    ,2358    ,2458    ,2557    ,2652    ,2753    ,2849    ,2944    ,3039    ,\n    3131    ,3227    ,3321    ,3413    ,3505    ,3596    ,3684    ,3775    ,3865    ,3950    ,4040    ,4125    ,4208    ,4294    ,4375    ,\n    4458    ,4540    ,4620    ,4699    ,4778    ,4857    ,4930    ,5006    ,5080    ,5151    ,5224    ,5295    ,5366    ,5431    ,5499    ,\n    5564    ,5627    ,5693    ,5754    ,5814    ,5874    ,5932    ,5989    ,6045    ,6098    ,6153    ,6205    ,6254    ,6304    ,6351    ,\n    6398    ,6443    ,6489    ,6532    ,6573    ,6613    ,6651    ,6688    ,6726    ,6762    ,6796    ,6828    ,6860    ,6890    ,6916    ,\n    6945    ,6971    ,6995    ,7019    ,7038    ,7058    ,7076    ,7091    ,7109    ,7124    ,7135    ,7148    ,7157    ,7165    ,7172    ,\n    7179    ,7184    ,7186    ,7188    ,7189    ,7188    ,7185    ,7182    ,7175    ,7167    ,7159    ,7151    ,7138    ,7123    ,7112    ,\n    7093    ,7077    ,7062    ,7041    ,7019    ,6998    ,6974    ,6949    ,6921    ,6895    ,6868    ,6835    ,6804    ,6772    ,6738    ,\n    6704    ,6669    ,6629    ,6591    ,6550    ,6509    ,6467    ,6423    ,6378    ,6332    ,6286    ,6233    ,6188    ,6136    ,6083    ,\n    6032    ,5977    ,5922    ,5866    ,5810    ,5749    ,5691    ,5630    ,5568    ,5506    ,5442    ,5377    ,5312    ,5244    ,5176    ,\n    5109    ,5038    ,4969    ,4897    ,4823    ,4750    ,4676    ,4602    ,4527    ,4449    ,4371    ,4295    ,4215    ,4135    ,4056    ,\n    3974    ,3891    ,3809    ,3727    ,3645    ,3557    ,3470    ,3388    ,3299    ,3214    ,3128    ,3040    ,2950    ,2861    ,2774    ,\n    2685    ,2595    ,2503    ,2411    ,2321    ,2230    ,2135    ,2043    ,1951    ,1859    ,1764    ,1671    ,1580    ,1485    ,1392    ,\n    1298    ,1203    ,1108    ,1014    ,920     ,826     ,733     ,636     ,540     ,448     ,350     ,257     ,165     ,68      ,-22     ,\n    -116    ,-209    ,-303    ,-399    ,-493    ,-584    ,-676    ,-770    ,-860    ,-955    ,-1046   ,-1138   ,-1227   ,-1318   ,-1408   ,\n    -1496   ,-1589   ,-1675   ,-1764   ,-1853   ,-1940   ,-2027   ,-2113   ,-2197   ,-2284   ,-2370   ,-2453   ,-2537   ,-2620   ,-2703   ,\n    -2785   ,-2866   ,-2945   ,-3026   ,-3104   ,-3181   ,-3262   ,-3338   ,-3412   ,-3490   ,-3565   ,-3638   ,-3712   ,-3784   ,-3856   ,\n    -3926   ,-3997   ,-4068   ,-4134   ,-4201   ,-4270   ,-4335   ,-4398   ,-4463   ,-4529   ,-4590   ,-4651   ,-4711   ,-4772   ,-4829   ,\n    -4884   ,-4941   ,-4995   ,-5050   ,-5102   ,-5155   ,-5206   ,-5254   ,-5304   ,-5349   ,-5394   ,-5438   ,-5484   ,-5525   ,-5565   ,\n    -5610   ,-5646   ,-5683   ,-5720   ,-5757   ,-5789   ,-5823   ,-5858   ,-5886   ,-5917   ,-5945   ,-5972   ,-6000   ,-6025   ,-6049   ,\n    -6070   ,-6092   ,-6113   ,-6130   ,-6149   ,-6166   ,-6182   ,-6197   ,-6208   ,-6222   ,-6231   ,-6239   ,-6249   ,-6255   ,-6260   ,\n    -6263   ,-6267   ,-6271   ,-6271   ,-6271   ,-6267   ,-6262   ,-6260   ,-6254   ,-6248   ,-6240   ,-6229   ,-6218   ,-6207   ,-6193   ,\n    -6179   ,-6162   ,-6144   ,-6127   ,-6108   ,-6087   ,-6065   ,-6045   ,-6020   ,-5993   ,-5970   ,-5941   ,-5912   ,-5882   ,-5852   ,\n    -5820   ,-5786   ,-5754   ,-5718   ,-5682   ,-5645   ,-5605   ,-5568   ,-5526   ,-5483   ,-5443   ,-5400   ,-5354   ,-5308   ,-5261   ,\n    -5212   ,-5164   ,-5116   ,-5066   ,-5012   ,-4960   ,-4910   ,-4853   ,-4797   ,-4741   ,-4684   ,-4627   ,-4568   ,-4507   ,-4446   ,\n    -4386   ,-4323   ,-4261   ,-4197   ,-4133   ,-4067   ,-4002   ,-3937   ,-3866   ,-3798   ,-3729   ,-3658   ,-3589   ,-3518   ,-3448   ,\n    -3376   ,-3304   ,-3231   ,-3156   ,-3084   ,-3010   ,-2932   ,-2857   ,-2781   ,-2705   ,-2627   ,-2551   ,-2473   ,-2395   ,-2318   ,\n    -2241   ,-2161   ,-2082   ,-2003   ,-1919   ,-1841   ,-1761   ,-1680   ,-1600   ,-1518   ,-1439   ,-1357   ,-1276   ,-1194   ,-1111   ,\n    -1033   ,-950    ,-866    ,-783    ,-701    ,-620    ,-536    ,-454    ,-372    ,-289    ,-206    ,-123    ,-40     ,40      ,119     ,\n    203     ,284     ,367     ,448     ,528     ,610     ,692     ,774     ,853     ,935     ,1013    ,1096    ,1174    ,1253    ,1334    ,\n    1409    ,1488    ,1565    ,1644    ,1722    ,1796    ,1874    ,1950    ,2022    ,2099    ,2173    ,2247    ,2319    ,2392    ,2464    ,\n    2535    ,2607    ,2677    ,2748    ,2815    ,2883    ,2953    ,3021    ,3085    ,3153    ,3216    ,3282    ,3346    ,3408    ,3474    ,\n    3534    ,3597    ,3657    ,3716    ,3776    ,3834    ,3892    ,3946    ,4003    ,4058    ,4110    ,4165    ,4217    ,4267    ,4317    ,\n    4367    ,4412    ,4461    ,4508    ,4554    ,4599    ,4641    ,4683    ,4725    ,4765    ,4804    ,4844    ,4880    ,4917    ,4956    ,\n    4988    ,5022    ,5052    ,5084    ,5118    ,5144    ,5173    ,5200    ,5226    ,5251    ,5275    ,5297    ,5319    ,5340    ,5357    ,\n    5378    ,5395    ,5412    ,5430    ,5444    ,5455    ,5470    ,5483    ,5490    ,5502    ,5511    ,5516    ,5523    ,5527    ,5531    ,\n    5534    ,5535    ,5534    ,5533    ,5532    ,5529    ,5525    ,5519    ,5512    ,5507    ,5498    ,5488    ,5480    ,5468    ,5454    ,\n    5439    ,5425    ,5409    ,5391    ,5373    ,5352    ,5334    ,5312    ,5290    ,5267    ,5241    ,5217    ,5190    ,5162    ,5136    ,\n    5105    ,5076    ,5045    ,5013    ,4982    ,4946    ,4913    ,4877    ,4840    ,4804    ,4765    ,4726    ,4688    ,4646    ,4605    ,\n    4563    ,4518    ,4475    ,4430    ,4384    ,4340    ,4293    ,4244    ,4196    ,4146    ,4095    ,4045    ,3993    ,3941    ,3887    ,\n    3835    ,3780    ,3724    ,3670    ,3611    ,3555    ,3497    ,3439    ,3378    ,3318    ,3259    ,3196    ,3135    ,3073    ,3010    ,\n    2948    ,2884    ,2819    ,2757    ,2691    ,2624    ,2558    ,2490    ,2425    ,2357    ,2290    ,2223    ,2152    ,2086    ,2017    ,\n    1948    ,1876    ,1805    ,1739    ,1667    ,1599    ,1527    ,1455    ,1385    ,1314    ,1246    ,1172    ,1101    ,1030    ,958     ,\n    885     ,815     ,742     ,667     ,598     ,525     ,453     ,381     ,307     ,235     ,163     ,90      ,18      ,-51     ,-122    ,\n    -195    ,-267    ,-339    ,-410    ,-482    ,-555    ,-626    ,-697    ,-768    ,-840    ,-911    ,-980    ,-1050   ,-1119   ,-1191   ,\n    -1261   ,-1329   ,-1397   ,-1465   ,-1532   ,-1598   ,-1665   ,-1730   ,-1797   ,-1863   ,-1927   ,-1992   ,-2056   ,-2119   ,-2181   ,\n    -2243   ,-2306   ,-2367   ,-2426   ,-2485   ,-2546   ,-2606   ,-2662   ,-2720   ,-2778   ,-2833   ,-2888   ,-2944   ,-2998   ,-3051   ,\n    -3106   ,-3156   ,-3209   ,-3263   ,-3312   ,-3360   ,-3409   ,-3461   ,-3505   ,-3552   ,-3601   ,-3644   ,-3692   ,-3738   ,-3777   ,\n    -3822   ,-3863   ,-3903   ,-3947   ,-3986   ,-4023   ,-4059   ,-4097   ,-4135   ,-4169   ,-4201   ,-4236   ,-4268   ,-4298   ,-4330   ,\n    -4358   ,-4388   ,-4411   ,-4439   ,-4467   ,-4491   ,-4517   ,-4538   ,-4560   ,-4580   ,-4600   ,-4619   ,-4639   ,-4654   ,-4670   ,\n    -4688   ,-4699   ,-4713   ,-4726   ,-4738   ,-4748   ,-4757   ,-4768   ,-4774   ,-4781   ,-4788   ,-4792   ,-4796   ,-4799   ,-4800   ,\n    -4802   ,-4803   ,-4804   ,-4801   ,-4797   ,-4796   ,-4793   ,-4786   ,-4781   ,-4775   ,-4767   ,-4760   ,-4751   ,-4739   ,-4728   ,\n    -4715   ,-4702   ,-4688   ,-4672   ,-4657   ,-4638   ,-4621   ,-4602   ,-4584   ,-4564   ,-4539   ,-4516   ,-4493   ,-4469   ,-4444   ,\n    -4418   ,-4389   ,-4363   ,-4335   ,-4304   ,-4275   ,-4242   ,-4211   ,-4180   ,-4145   ,-4110   ,-4076   ,-4039   ,-4003   ,-3967   ,\n    -3929   ,-3890   ,-3849   ,-3812   ,-3769   ,-3730   ,-3688   ,-3644   ,-3602   ,-3557   ,-3511   ,-3467   ,-3421   ,-3374   ,-3327   ,\n    -3280   ,-3233   ,-3184   ,-3135   ,-3084   ,-3034   ,-2984   ,-2932   ,-2880   ,-2827   ,-2777   ,-2722   ,-2667   ,-2614   ,-2555   ,\n    -2501   ,-2445   ,-2388   ,-2333   ,-2273   ,-2215   ,-2155   ,-2098   ,-2037   ,-1976   ,-1917   ,-1857   ,-1795   ,-1733   ,-1674   ,\n    -1612   ,-1552   ,-1490   ,-1428   ,-1365   ,-1302   ,-1241   ,-1180   ,-1114   ,-1052   ,-990    ,-925    ,-860    ,-798    ,-736    ,\n    -671    ,-607    ,-545    ,-482    ,-418    ,-355    ,-291    ,-228    ,-167    ,-101    ,-40     ,19      ,81      ,145     ,207     ,\n    270     ,332     ,395     ,459     ,519     ,583     ,645     ,707     ,771     ,832     ,894     ,955     ,1015    ,1076    ,1136    ,\n    1196    ,1256    ,1318    ,1375    ,1434    ,1494    ,1551    ,1609    ,1663    ,1721    ,1779    ,1833    ,1890    ,1945    ,2001    ,\n    2054    ,2107    ,2161    ,2215    ,2266    ,2317    ,2368    ,2419    ,2470    ,2516    ,2565    ,2614    ,2661    ,2707    ,2753    ,\n    2801    ,2844    ,2888    ,2932    ,2977    ,3019    ,3063    ,3104    ,3143    ,3184    ,3224    ,3264    ,3302    ,3342    ,3378    ,\n    3415    ,3452    ,3487    ,3520    ,3552    ,3587    ,3620    ,3652    ,3681    ,3714    ,3743    ,3771    ,3799    ,3825    ,3852    ,\n    3877    ,3902    ,3926    ,3951    ,3971    ,3991    ,4012    ,4031    ,4052    ,4069    ,4086    ,4102    ,4117    ,4134    ,4149    ,\n    4159    ,4172    ,4183    ,4192    ,4201    ,4211    ,4218    ,4223    ,4231    ,4235    ,4239    ,4243    ,4248    ,4248    ,4248    ,\n    4248    ,4249    ,4249    ,4247    ,4244    ,4242    ,4240    ,4233    ,4229    ,4221    ,4214    ,4205    ,4196    ,4188    ,4175    ,\n    4164    ,4151    ,4140    ,4127    ,4111    ,4096    ,4080    ,4064    ,4046    ,4027    ,4007    ,3985    ,3966    ,3944    ,3920    ,\n    3899    ,3873    ,3849    ,3825    ,3797    ,3769    ,3742    ,3712    ,3683    ,3651    ,3622    ,3593    ,3559    ,3525    ,3492    ,\n    3457    ,3422    ,3387    ,3349    ,3313    ,3276    ,3241    ,3200    ,3162    ,3124    ,3082    ,3042    ,2999    ,2960    ,2918    ,\n    2877    ,2834    ,2792    ,2748    ,2703    ,2660    ,2611    ,2568    ,2522    ,2471    ,2427    ,2379    ,2332    ,2283    ,2234    ,\n    2187    ,2133    ,2083    ,2034    ,1984    ,1932    ,1880    ,1831    ,1778    ,1725    ,1672    ,1620    ,1566    ,1515    ,1458    ,\n    1404    ,1353    ,1295    ,1242    ,1187    ,1134    ,1077    ,1021    ,968     ,911     ,857     ,802     ,746     ,691     ,635     ,\n    580     ,526     ,470     ,415     ,361     ,304     ,246     ,193     ,137     ,80      ,29      ,-22     ,-78     ,-133    ,-188    ,\n    -242    ,-296    ,-352    ,-403    ,-458    ,-516    ,-567    ,-620    ,-675    ,-727    ,-780    ,-836    ,-889    ,-940    ,-993    ,\n    -1046   ,-1098   ,-1150   ,-1204   ,-1253   ,-1305   ,-1356   ,-1404   ,-1456   ,-1505   ,-1556   ,-1604   ,-1653   ,-1701   ,-1747   ,\n    -1797   ,-1844   ,-1891   ,-1938   ,-1982   ,-2027   ,-2072   ,-2118   ,-2160   ,-2202   ,-2246   ,-2287   ,-2330   ,-2371   ,-2411   ,\n    -2452   ,-2491   ,-2529   ,-2566   ,-2603   ,-2643   ,-2678   ,-2715   ,-2749   ,-2784   ,-2818   ,-2848   ,-2884   ,-2917   ,-2949   ,\n    -2979   ,-3011   ,-3042   ,-3069   ,-3099   ,-3127   ,-3156   ,-3184   ,-3209   ,-3234   ,-3260   ,-3284   ,-3308   ,-3331   ,-3352   ,\n    -3375   ,-3395   ,-3417   ,-3438   ,-3456   ,-3474   ,-3491   ,-3510   ,-3527   ,-3539   ,-3554   ,-3570   ,-3584   ,-3595   ,-3605   ,\n    -3617   ,-3629   ,-3635   ,-3644   ,-3653   ,-3659   ,-3666   ,-3671   ,-3677   ,-3682   ,-3685   ,-3687   ,-3689   ,-3689   ,-3689   ,\n    -3690   ,-3688   ,-3686   ,-3684   ,-3681   ,-3678   ,-3673   ,-3668   ,-3661   ,-3653   ,-3647   ,-3638   ,-3628   ,-3618   ,-3607   ,\n    -3598   ,-3584   ,-3574   ,-3561   ,-3546   ,-3531   ,-3516   ,-3502   ,-3485   ,-3469   ,-3449   ,-3432   ,-3413   ,-3394   ,-3373   ,\n    -3350   ,-3331   ,-3309   ,-3286   ,-3263   ,-3238   ,-3214   ,-3189   ,-3162   ,-3134   ,-3107   ,-3078   ,-3050   ,-3019   ,-2989   ,\n    -2960   ,-2927   ,-2897   ,-2865   ,-2832   ,-2800   ,-2766   ,-2730   ,-2697   ,-2661   ,-2627   ,-2591   ,-2553   ,-2519   ,-2480   ,\n    -2444   ,-2406   ,-2367   ,-2329   ,-2289   ,-2249   ,-2208   ,-2170   ,-2129   ,-2087   ,-2046   ,-2006   ,-1965   ,-1922   ,-1882   ,\n    -1837   ,-1794   ,-1749   ,-1704   ,-1661   ,-1619   ,-1573   ,-1527   ,-1484   ,-1438   ,-1394   ,-1348   ,-1300   ,-1255   ,-1208   ,\n    -1161   ,-1115   ,-1066   ,-1018   ,-972    ,-923    ,-872    ,-825    ,-776    ,-726    ,-678    ,-630    ,-583    ,-533    ,-482    ,\n    -433    ,-385    ,-334    ,-286    ,-237    ,-186    ,-139    ,-89     ,-41     ,5       ,51      ,100     ,151     ,197     ,248     ,\n    294     ,341     ,391     ,437     ,485     ,533     ,578     ,625     ,673     ,718     ,766     ,813     ,858     ,905     ,951     ,\n    994     ,1041    ,1087    ,1129    ,1175    ,1218    ,1263    ,1305    ,1349    ,1396    ,1435    ,1479    ,1522    ,1562    ,1605    ,\n    1647    ,1689    ,1729    ,1768    ,1807    ,1846    ,1886    ,1925    ,1964    ,2001    ,2039    ,2078    ,2112    ,2148    ,2185    ,\n    2219    ,2253    ,2288    ,2321    ,2353    ,2386    ,2419    ,2450    ,2481    ,2511    ,2541    ,2571    ,2599    ,2628    ,2654    ,\n    2680    ,2708    ,2732    ,2757    ,2781    ,2804    ,2827    ,2851    ,2873    ,2894    ,2915    ,2936    ,2957    ,2976    ,2996    ,\n    3015    ,3030    ,3048    ,3066    ,3080    ,3095    ,3110    ,3122    ,3137    ,3151    ,3162    ,3174    ,3184    ,3195    ,3204    ,\n    3215    ,3222    ,3229    ,3239    ,3242    ,3248    ,3255    ,3257    ,3262    ,3264    ,3266    ,3271    ,3270    ,3272    ,3272    ,\n    3269    ,3267    ,3266    ,3263    ,3257    ,3254    ,3249    ,3242    ,3235    ,3228    ,3222    ,3213    ,3204    ,3196    ,3185    ,\n    3175    ,3166    ,3154    ,3142    ,3128    ,3114    ,3101    ,3088    ,3073    ,3057    ,3041    ,3026    ,3007    ,2990    ,2975    ,\n    2955    ,2935    ,2916    ,2896    ,2873    ,2853    ,2830    ,2812    ,2789    ,2763    ,2742    ,2716    ,2692    ,2666    ,2642    ,\n    2615    ,2588    ,2562    ,2533    ,2504    ,2474    ,2446    ,2415    ,2385    ,2354    ,2320    ,2289    ,2257    ,2225    ,2193    ,\n    2159    ,2127    ,2092    ,2057    ,2022    ,1985    ,1951    ,1915    ,1879    ,1842    ,1805    ,1769    ,1729    ,1693    ,1654    ,\n    1615    ,1579    ,1541    ,1500    ,1460    ,1422    ,1382    ,1345    ,1305    ,1262    ,1224    ,1184    ,1142    ,1100    ,1060    ,\n    1018    ,976     ,937     ,892     ,851     ,810     ,769     ,724     ,682     ,642     ,599     ,555     ,513     ,470     ,426     ,\n    383     ,340     ,298     ,254     ,212     ,168     ,124     ,81      ,37      ,-1      ,-43     ,-87     ,-130    ,-172    ,-214    ,\n    -258    ,-300    ,-342    ,-385    ,-427    ,-468    ,-511    ,-552    ,-593    ,-635    ,-676    ,-714    ,-757    ,-797    ,-836    ,\n    -876    ,-915    ,-954    ,-990    ,-1030   ,-1068   ,-1107   ,-1145   ,-1183   ,-1220   ,-1257   ,-1294   ,-1330   ,-1366   ,-1401   ,\n    -1435   ,-1471   ,-1508   ,-1540   ,-1575   ,-1609   ,-1641   ,-1675   ,-1707   ,-1741   ,-1774   ,-1804   ,-1837   ,-1867   ,-1894   ,\n    -1927   ,-1957   ,-1985   ,-2017   ,-2043   ,-2074   ,-2099   ,-2127   ,-2156   ,-2180   ,-2207   ,-2231   ,-2255   ,-2279   ,-2302   ,\n    -2324   ,-2347   ,-2370   ,-2391   ,-2412   ,-2432   ,-2452   ,-2469   ,-2489   ,-2509   ,-2525   ,-2544   ,-2559   ,-2576   ,-2593   ,\n    -2606   ,-2622   ,-2637   ,-2650   ,-2665   ,-2678   ,-2689   ,-2699   ,-2711   ,-2723   ,-2732   ,-2742   ,-2753   ,-2760   ,-2769   ,\n    -2777   ,-2785   ,-2792   ,-2799   ,-2804   ,-2809   ,-2815   ,-2819   ,-2821   ,-2824   ,-2827   ,-2829   ,-2830   ,-2831   ,-2832   ,\n    -2830   ,-2829   ,-2828   ,-2825   ,-2824   ,-2819   ,-2815   ,-2811   ,-2803   ,-2799   ,-2793   ,-2785   ,-2776   ,-2769   ,-2760   ,\n    -2751   ,-2739   ,-2729   ,-2720   ,-2704   ,-2694   ,-2682   ,-2667   ,-2655   ,-2640   ,-2624   ,-2610   ,-2594   ,-2577   ,-2561   ,\n    -2544   ,-2525   ,-2509   ,-2489   ,-2470   ,-2450   ,-2430   ,-2411   ,-2392   ,-2369   ,-2347   ,-2327   ,-2302   ,-2280   ,-2258   ,\n    -2232   ,-2210   ,-2186   ,-2160   ,-2136   ,-2108   ,-2082   ,-2057   ,-2028   ,-2001   ,-1974   ,-1946   ,-1914   ,-1888   ,-1858   ,\n    -1827   ,-1800   ,-1767   ,-1736   ,-1707   ,-1677   ,-1644   ,-1610   ,-1579   ,-1548   ,-1515   ,-1482   ,-1450   ,-1416   ,-1381   ,\n    -1347   ,-1313   ,-1279   ,-1244   ,-1209   ,-1175   ,-1139   ,-1103   ,-1069   ,-1032   ,-997    ,-960    ,-924    ,-887    ,-852    ,\n    -819    ,-777    ,-742    ,-706    ,-669    ,-635    ,-597    ,-561    ,-521    ,-486    ,-447    ,-410    ,-374    ,-338    ,-300    ,\n    -261    ,-226    ,-187    ,-151    ,-110    ,-76     ,-38     ,-4      ,31      ,71      ,105     ,143     ,180     ,218     ,253     ,\n    290     ,327     ,363     ,400     ,437     ,475     ,511     ,545     ,580     ,618     ,652     ,689     ,723     ,758     ,793     ,\n    826     ,863     ,895     ,929     ,963     ,999     ,1030    ,1063    ,1096    ,1125    ,1160    ,1192    ,1222    ,1254    ,1285    ,\n    1316    ,1346    ,1377    ,1405    ,1435    ,1464    ,1494    ,1521    ,1549    ,1578    ,1605    ,1635    ,1662    ,1688    ,1714    ,\n    1740    ,1766    ,1791    ,1818    ,1843    ,1868    ,1891    ,1915    ,1939    ,1960    ,1985    ,2006    ,2027    ,2050    ,2069    ,\n    2090    ,2112    ,2131    ,2150    ,2170    ,2189    ,2205    ,2222    ,2239    ,2255    ,2271    ,2287    ,2301    ,2314    ,2331    ,\n    2341    ,2353    ,2367    ,2377    ,2390    ,2401    ,2411    ,2422    ,2431    ,2439    ,2449    ,2457    ,2464    ,2472    ,2478    ,\n    2485    ,2489    ,2496    ,2501    ,2505    ,2507    ,2510    ,2514    ,2514    ,2517    ,2517    ,2517    ,2517    ,2518    ,2518    ,\n    2514    ,2514    ,2511    ,2508    ,2506    ,2500    ,2497    ,2490    ,2484    ,2479    ,2473    ,2468    ,2459    ,2451    ,2443    ,\n    2433    ,2425    ,2417    ,2405    ,2393    ,2382    ,2371    ,2360    ,2347    ,2334    ,2321    ,2305    ,2292    ,2279    ,2263    ,\n    2249    ,2230    ,2215    ,2199    ,2180    ,2164    ,2147    ,2128    ,2109    ,2091    ,2073    ,2052    ,2032    ,2013    ,1991    ,\n    1970    ,1949    ,1927    ,1905    ,1884    ,1860    ,1836    ,1813    ,1787    ,1765    ,1741    ,1717    ,1691    ,1666    ,1642    ,\n    1615    ,1590    ,1563    ,1536    ,1508    ,1480    ,1454    ,1425    ,1398    ,1370    ,1340    ,1310    ,1281    ,1252    ,1223    ,\n    1194    ,1162    ,1134    ,1102    ,1073    ,1044    ,1011    ,982     ,949     ,919     ,888     ,855     ,825     ,792     ,761     ,\n    730     ,698     ,666     ,634     ,604     ,572     ,539     ,506     ,475     ,444     ,411     ,378     ,344     ,312     ,278     ,\n    246     ,216     ,181     ,150     ,117     ,82      ,50      ,18      ,-10     ,-41     ,-77     ,-109    ,-140    ,-173    ,-205    ,\n    -240    ,-271    ,-304    ,-336    ,-367    ,-401    ,-433    ,-466    ,-497    ,-530    ,-561    ,-591    ,-622    ,-652    ,-686    ,\n    -715    ,-745    ,-775    ,-805    ,-837    ,-864    ,-895    ,-923    ,-951    ,-980    ,-1008   ,-1035   ,-1066   ,-1093   ,-1118   ,\n    -1147   ,-1173   ,-1201   ,-1226   ,-1251   ,-1279   ,-1303   ,-1328   ,-1352   ,-1377   ,-1402   ,-1426   ,-1448   ,-1469   ,-1495   ,\n    -1517   ,-1539   ,-1562   ,-1581   ,-1602   ,-1625   ,-1644   ,-1665   ,-1687   ,-1703   ,-1725   ,-1743   ,-1762   ,-1781   ,-1799   ,\n    -1818   ,-1832   ,-1851   ,-1866   ,-1880   ,-1899   ,-1912   ,-1926   ,-1941   ,-1955   ,-1968   ,-1980   ,-1993   ,-2003   ,-2017   ,\n    -2027   ,-2036   ,-2047   ,-2055   ,-2066   ,-2073   ,-2083   ,-2091   ,-2098   ,-2106   ,-2112   ,-2118   ,-2124   ,-2130   ,-2135   ,\n    -2139   ,-2144   ,-2147   ,-2149   ,-2152   ,-2156   ,-2159   ,-2160   ,-2162   ,-2162   ,-2162   ,-2163   ,-2162   ,-2162   ,-2161   ,\n    -2159   ,-2156   ,-2154   ,-2153   ,-2150   ,-2145   ,-2142   ,-2137   ,-2132   ,-2127   ,-2121   ,-2116   ,-2109   ,-2103   ,-2094   ,\n    -2086   ,-2080   ,-2069   ,-2061   ,-2052   ,-2043   ,-2033   ,-2023   ,-2011   ,-1998   ,-1987   ,-1975   ,-1962   ,-1950   ,-1936   ,\n    -1921   ,-1908   ,-1894   ,-1879   ,-1867   ,-1849   ,-1832   ,-1819   ,-1801   ,-1784   ,-1768   ,-1750   ,-1734   ,-1715   ,-1697   ,\n    -1681   ,-1662   ,-1640   ,-1621   ,-1602   ,-1581   ,-1561   ,-1543   ,-1522   ,-1498   ,-1478   ,-1455   ,-1437   ,-1414   ,-1390   ,\n    -1369   ,-1346   ,-1324   ,-1298   ,-1275   ,-1252   ,-1227   ,-1202   ,-1177   ,-1150   ,-1125   ,-1101   ,-1075   ,-1050   ,-1021   ,\n    -996    ,-970    ,-943    ,-916    ,-887    ,-861    ,-834    ,-806    ,-778    ,-750    ,-723    ,-693    ,-666    ,-638    ,-608    ,\n    -579    ,-551    ,-523    ,-492    ,-464    ,-436    ,-407    ,-377    ,-349    ,-320    ,-291    ,-263    ,-235    ,-207    ,-177    ,\n    -151    ,-120    ,-92     ,-64     ,-33     ,-8      ,17      ,46      ,75      ,104     ,134     ,159     ,188     ,216     ,244     ,\n    275     ,301     ,329     ,358     ,385     ,415     ,443     ,470     ,500     ,526     ,551     ,580     ,607     ,632     ,661     ,\n    688     ,713     ,739     ,766     ,793     ,818     ,841     ,866     ,893     ,919     ,940     ,965     ,990     ,1012    ,1037    ,\n    1062    ,1083    ,1105    ,1129    ,1150    ,1172    ,1192    ,1213    ,1236    ,1256    ,1277    ,1296    ,1316    ,1337    ,1355    ,\n    1373    ,1394    ,1412    ,1432    ,1448    ,1467    ,1484    ,1501    ,1518    ,1534    ,1552    ,1568    ,1585    ,1599    ,1613    ,\n    1628    ,1645    ,1658    ,1672    ,1686    ,1700    ,1714    ,1724    ,1738    ,1750    ,1760    ,1774    ,1784    ,1792    ,1805    ,\n    1813    ,1822    ,1831    ,1840    ,1847    ,1858    ,1866    ,1871    ,1880    ,1884    ,1893    ,1896    ,1901    ,1907    ,1910    ,\n    1914    ,1918    ,1921    ,1920    ,1926    ,1930    ,1930    ,1932    ,1934    ,1936    ,1936    ,1935    ,1936    ,1935    ,1932    ,\n    1933    ,1931    ,1928    ,1925    ,1921    ,1918    ,1914    ,1911    ,1907    ,1903    ,1897    ,1891    ,1887    ,1879    ,1872    ,\n    1869    ,1861    ,1851    ,1845    ,1836    ,1826    ,1818    ,1810    ,1798    ,1789    ,1781    ,1768    ,1757    ,1745    ,1733    ,\n    1722    ,1707    ,1696    ,1680    ,1665    ,1653    ,1639    ,1623    ,1606    ,1592    ,1576    ,1560    ,1543    ,1526    ,1510    ,\n    1493    ,1476    ,1455    ,1441    ,1422    ,1404    ,1386    ,1365    ,1348    ,1326    ,1307    ,1287    ,1267    ,1246    ,1227    ,\n    1207    ,1185    ,1165    ,1143    ,1122    ,1099    ,1082    ,1059    ,1036    ,1015    ,992     ,972     ,949     ,927     ,904     ,\n    881     ,860     ,836     ,812     ,790     ,766     ,740     ,719     ,696     ,669     ,645     ,622     ,595     ,572     ,549     ,\n    522     ,497     ,470     ,446     ,421     ,396     ,369     ,343     ,320     ,294     ,268     ,243     ,218     ,192     ,168     ,\n    141     ,116     ,92      ,65      ,41      ,17      ,-4      ,-29     ,-53     ,-77     ,-102    ,-127    ,-153    ,-177    ,-202    ,\n    -225    ,-249    ,-274    ,-298    ,-320    ,-343    ,-368    ,-391    ,-415    ,-437    ,-460    ,-484    ,-508    ,-530    ,-554    ,\n    -576    ,-599    ,-622    ,-643    ,-667    ,-689    ,-712    ,-733    ,-755    ,-777    ,-798    ,-820    ,-842    ,-864    ,-882    ,\n    -904    ,-924    ,-945    ,-965    ,-984    ,-1006   ,-1024   ,-1043   ,-1062   ,-1080   ,-1096   ,-1115   ,-1133   ,-1150   ,-1169   ,\n    -1186   ,-1202   ,-1217   ,-1234   ,-1252   ,-1265   ,-1282   ,-1296   ,-1310   ,-1325   ,-1339   ,-1351   ,-1366   ,-1381   ,-1393   ,\n    -1406   ,-1417   ,-1430   ,-1444   ,-1456   ,-1466   ,-1478   ,-1490   ,-1499   ,-1509   ,-1521   ,-1532   ,-1540   ,-1551   ,-1560   ,\n    -1568   ,-1577   ,-1582   ,-1590   ,-1599   ,-1607   ,-1611   ,-1619   ,-1625   ,-1628   ,-1636   ,-1640   ,-1644   ,-1647   ,-1650   ,\n    -1653   ,-1656   ,-1659   ,-1662   ,-1664   ,-1663   ,-1663   ,-1666   ,-1665   ,-1666   ,-1667   ,-1665   ,-1664   ,-1662   ,-1662   ,\n    -1659   ,-1658   ,-1655   ,-1650   ,-1648   ,-1645   ,-1639   ,-1634   ,-1630   ,-1624   ,-1618   ,-1614   ,-1607   ,-1601   ,-1595   ,\n    -1589   ,-1582   ,-1574   ,-1569   ,-1561   ,-1554   ,-1545   ,-1535   ,-1528   ,-1516   ,-1506   ,-1497   ,-1488   ,-1478   ,-1467   ,\n    -1456   ,-1444   ,-1432   ,-1421   ,-1409   ,-1396   ,-1385   ,-1372   ,-1357   ,-1343   ,-1331   ,-1315   ,-1301   ,-1287   ,-1272   ,\n    -1258   ,-1244   ,-1228   ,-1213   ,-1197   ,-1178   ,-1165   ,-1150   ,-1132   ,-1115   ,-1096   ,-1080   ,-1064   ,-1047   ,-1027   ,\n    -1009   ,-991    ,-973    ,-955    ,-935    ,-917    ,-898    ,-880    ,-860    ,-842    ,-824    ,-803    ,-785    ,-762    ,-744    ,\n    -724    ,-703    ,-683    ,-661    ,-641    ,-621    ,-601    ,-579    ,-560    ,-537    ,-514    ,-496    ,-473    ,-450    ,-429    ,\n    -406    ,-384    ,-363    ,-341    ,-317    ,-298    ,-275    ,-252    ,-232    ,-208    ,-185    ,-164    ,-142    ,-121    ,-98     ,\n    -74     ,-55     ,-30     ,-9      ,7       ,28      ,49      ,75      ,96      ,118     ,140     ,160     ,183     ,203     ,225     ,\n    247     ,265     ,288     ,311     ,331     ,352     ,372     ,393     ,414     ,434     ,456     ,475     ,497     ,518     ,539     ,\n    560     ,581     ,602     ,621     ,642     ,659     ,681     ,700     ,719     ,738     ,756     ,778     ,794     ,813     ,831     ,\n    847     ,867     ,885     ,902     ,919     ,936     ,955     ,971     ,987     ,1003    ,1016    ,1035    ,1050    ,1063    ,1083    ,\n    1093    ,1108    ,1124    ,1137    ,1152    ,1165    ,1178    ,1190    ,1203    ,1216    ,1226    ,1237    ,1249    ,1260    ,1271    ,\n    1281    ,1292    ,1303    ,1312    ,1322    ,1331    ,1341    ,1349    ,1358    ,1366    ,1375    ,1384    ,1390    ,1397    ,1405    ,\n    1410    ,1417    ,1422    ,1429    ,1435    ,1438    ,1445    ,1449    ,1454    ,1456    ,1461    ,1465    ,1467    ,1470    ,1474    ,\n    1478    ,1478    ,1482    ,1484    ,1484    ,1485    ,1485    ,1486    ,1487    ,1487    ,1486    ,1485    ,1485    ,1484    ,1483    ,\n    1481    ,1478    ,1477    ,1475    ,1472    ,1467    ,1464    ,1459    ,1456    ,1452    ,1447    ,1443    ,1436    ,1433    ,1427    ,\n    1420    ,1414    ,1408    ,1402    ,1396    ,1390    ,1382    ,1375    ,1365    ,1359    ,1350    ,1341    ,1334    ,1322    ,1312    ,\n    1303    ,1296    ,1284    ,1276    ,1264    ,1251    ,1241    ,1228    ,1219    ,1206    ,1194    ,1182    ,1170    ,1158    ,1145    ,\n    1132    ,1117    ,1104    ,1090    ,1076    ,1062    ,1047    ,1032    ,1018    ,1004    ,989     ,973     ,957     ,941     ,926     ,\n    911     ,895     ,878     ,862     ,845     ,829     ,812     ,795     ,778     ,759     ,743     ,725     ,705     ,690     ,672     ,\n    654     ,638     ,620     ,601     ,584     ,563     ,545     ,527     ,507     ,490     ,471     ,453     ,433     ,413     ,396     ,\n    378     ,355     ,338     ,319     ,297     ,280     ,262     ,240     ,221     ,201     ,179     ,162     ,140     ,122     ,103     ,\n    81      ,64      ,43      ,24      ,4       ,-12     ,-32     ,-53     ,-70     ,-91     ,-109    ,-129    ,-149    ,-167    ,-186    ,\n    -204    ,-225    ,-241    ,-262    ,-280    ,-299    ,-318    ,-335    ,-354    ,-369    ,-390    ,-407    ,-425    ,-446    ,-461    ,\n    -480    ,-495    ,-512    ,-529    ,-545    ,-561    ,-580    ,-595    ,-610    ,-628    ,-641    ,-658    ,-673    ,-690    ,-706    ,\n    -720    ,-735    ,-749    ,-765    ,-780    ,-793    ,-809    ,-823    ,-836    ,-850    ,-863    ,-876    ,-889    ,-904    ,-916    ,\n    -932    ,-942    ,-953    ,-965    ,-977    ,-990    ,-999    ,-1012   ,-1023   ,-1034   ,-1045   ,-1054   ,-1065   ,-1076   ,-1085   ,\n    -1093   ,-1103   ,-1112   ,-1120   ,-1129   ,-1138   ,-1146   ,-1152   ,-1160   ,-1168   ,-1172   ,-1180   ,-1186   ,-1193   ,-1200   ,\n    -1206   ,-1209   ,-1215   ,-1221   ,-1225   ,-1231   ,-1234   ,-1239   ,-1242   ,-1248   ,-1251   ,-1252   ,-1257   ,-1259   ,-1261   ,\n    -1263   ,-1265   ,-1268   ,-1268   ,-1271   ,-1271   ,-1271   ,-1274   ,-1272   ,-1272   ,-1273   ,-1272   ,-1270   ,-1269   ,-1269   ,\n    -1268   ,-1267   ,-1264   ,-1260   ,-1259   ,-1255   ,-1254   ,-1250   ,-1245   ,-1242   ,-1236   ,-1233   ,-1226   ,-1222   ,-1220   ,\n    -1213   ,-1208   ,-1202   ,-1193   ,-1187   ,-1182   ,-1173   ,-1168   ,-1163   ,-1153   ,-1146   ,-1136   ,-1131   ,-1122   ,-1110   ,\n    -1102   ,-1092   ,-1083   ,-1073   ,-1062   ,-1053   ,-1046   ,-1034   ,-1021   ,-1013   ,-1001   ,-990    ,-978    ,-967    ,-959    ,\n    -946    ,-933    ,-921    ,-906    ,-895    ,-884    ,-870    ,-859    ,-845    ,-832    ,-818    ,-805    ,-790    ,-776    ,-763    ,\n    -748    ,-736    ,-720    ,-705    ,-691    ,-674    ,-660    ,-644    ,-629    ,-614    ,-596    ,-582    ,-567    ,-550    ,-536    ,\n    -520    ,-500    ,-487    ,-471    ,-453    ,-439    ,-419    ,-406    ,-389    ,-371    ,-357    ,-340    ,-324    ,-308    ,-289    ,\n    -272    ,-258    ,-240    ,-222    ,-205    ,-188    ,-172    ,-156    ,-139    ,-120    ,-105    ,-88     ,-72     ,-56     ,-38     ,\n    -21     ,-7      ,5       ,22      ,40      ,57      ,72      ,89      ,108     ,122     ,139     ,155     ,173     ,190     ,205     ,\n    222     ,237     ,253     ,270     ,286     ,301     ,320     ,335     ,348     ,363     ,381     ,398     ,411     ,427     ,445     ,\n    458     ,474     ,493     ,504     ,519     ,536     ,549     ,566     ,578     ,594     ,608     ,620     ,637     ,647     ,661     ,\n    677     ,689     ,701     ,716     ,727     ,739     ,753     ,763     ,777     ,789     ,799     ,812     ,823     ,835     ,847     ,\n    859     ,869     ,878     ,889     ,898     ,908     ,918     ,929     ,940     ,947     ,957     ,965     ,976     ,984     ,992     ,\n    1002    ,1006    ,1015    ,1024    ,1031    ,1039    ,1045    ,1052    ,1058    ,1064    ,1073    ,1078    ,1084    ,1090    ,1095    ,\n    1099    ,1102    ,1108    ,1113    ,1119    ,1122    ,1124    ,1127    ,1131    ,1136    ,1136    ,1139    ,1141    ,1144    ,1146    ,\n    1145    ,1148    ,1149    ,1150    ,1150    ,1152    ,1151    ,1151    ,1152    ,1149    ,1150    ,1147    ,1148    ,1146    ,1144    ,\n    1143    ,1140    ,1138    ,1136    ,1134    ,1131    ,1130    ,1125    ,1121    ,1118    ,1114    ,1110    ,1102    ,1100    ,1095    ,\n    1091    ,1085    ,1079    ,1076    ,1068    ,1060    ,1054    ,1049    ,1043    ,1035    ,1028    ,1020    ,1013    ,1006    ,997     ,\n    992     ,982     ,974     ,966     ,957     ,950     ,939     ,928     ,920     ,910     ,900     ,890     ,879     ,869     ,858     ,\n    847     ,835     ,826     ,813     ,802     ,793     ,780     ,769     ,757     ,746     ,735     ,723     ,712     ,700     ,687     ,\n    676     ,664     ,652     ,639     ,627     ,612     ,599     ,589     ,576     ,561     ,546     ,535     ,521     ,506     ,495     ,\n    480     ,467     ,453     ,438     ,424     ,412     ,397     ,380     ,369     ,351     ,337     ,325     ,308     ,292     ,278     ,\n    264     ,247     ,234     ,220     ,204     ,189     ,174     ,159     ,143     ,130     ,114     ,100     ,86      ,69      ,57      ,\n    40      ,26      ,12      ,-1      ,-12     ,-26     ,-40     ,-55     ,-71     ,-85     ,-99     ,-113    ,-129    ,-143    ,-156    ,\n    -170    ,-185    ,-198    ,-212    ,-228    ,-240    ,-256    ,-269    ,-282    ,-296    ,-311    ,-324    ,-338    ,-353    ,-365    ,\n    -380    ,-392    ,-408    ,-421    ,-430    ,-444    ,-457    ,-471    ,-484    ,-497    ,-510    ,-522    ,-534    ,-547    ,-557    ,\n    -570    ,-582    ,-593    ,-604    ,-616    ,-627    ,-636    ,-649    ,-659    ,-670    ,-680    ,-690    ,-701    ,-708    ,-720    ,\n    -730    ,-737    ,-746    ,-755    ,-763    ,-773    ,-780    ,-788    ,-799    ,-806    ,-813    ,-823    ,-831    ,-836    ,-844    ,\n    -849    ,-857    ,-865    ,-870    ,-876    ,-880    ,-887    ,-892    ,-896    ,-904    ,-909    ,-913    ,-917    ,-922    ,-927    ,\n    -929    ,-934    ,-939    ,-942    ,-946    ,-949    ,-953    ,-956    ,-957    ,-959    ,-960    ,-964    ,-964    ,-967    ,-968    ,\n    -967    ,-969    ,-969    ,-968    ,-968    ,-969    ,-968    ,-967    ,-968    ,-967    ,-966    ,-966    ,-966    ,-962    ,-960    ,\n    -957    ,-955    ,-953    ,-950    ,-947    ,-946    ,-943    ,-940    ,-937    ,-932    ,-929    ,-926    ,-924    ,-918    ,-916    ,\n    -911    ,-905    ,-903    ,-896    ,-893    ,-887    ,-882    ,-878    ,-871    ,-866    ,-860    ,-855    ,-850    ,-844    ,-837    ,\n    -829    ,-822    ,-814    ,-807    ,-802    ,-792    ,-785    ,-776    ,-767    ,-759    ,-749    ,-743    ,-732    ,-723    ,-715    ,\n    -707    ,-698    ,-688    ,-677    ,-668    ,-658    ,-646    ,-635    ,-627    ,-616    ,-606    ,-599    ,-586    ,-574    ,-565    ,\n    -553    ,-542    ,-531    ,-519    ,-507    ,-495    ,-485    ,-473    ,-460    ,-451    ,-438    ,-426    ,-414    ,-403    ,-390    ,\n    -378    ,-367    ,-354    ,-342    ,-327    ,-317    ,-306    ,-293    ,-279    ,-266    ,-252    ,-238    ,-226    ,-213    ,-199    ,\n    -186    ,-173    ,-159    ,-149    ,-135    ,-120    ,-108    ,-96     ,-81     ,-67     ,-57     ,-42     ,-30     ,-17     ,-6      ,\n    4       ,20      ,31      ,45      ,57      ,70      ,84      ,97      ,111     ,124     ,137     ,148     ,161     ,175     ,189     ,\n    201     ,212     ,224     ,239     ,250     ,262     ,275     ,286     ,298     ,309     ,321     ,332     ,345     ,358     ,369     ,\n    383     ,391     ,402     ,415     ,425     ,436     ,447     ,459     ,471     ,482     ,492     ,503     ,515     ,525     ,536     ,\n    545     ,556     ,566     ,574     ,584     ,593     ,602     ,612     ,621     ,630     ,637     ,647     ,655     ,662     ,671     ,\n    679     ,686     ,694     ,701     ,707     ,715     ,723     ,730     ,738     ,742     ,749     ,754     ,759     ,766     ,770     ,\n    777     ,782     ,787     ,790     ,797     ,801     ,805     ,812     ,812     ,819     ,825     ,826     ,831     ,835     ,839     ,\n    842     ,846     ,850     ,853     ,855     ,858     ,863     ,865     ,867     ,870     ,871     ,875     ,879     ,878     ,881     ,\n    880     ,881     ,885     ,885     ,886     ,883     ,885     ,885     ,884     ,885     ,883     ,882     ,882     ,881     ,878     ,\n    878     ,877     ,873     ,871     ,870     ,869     ,865     ,864     ,858     ,855     ,854     ,849     ,845     ,843     ,838     ,\n    834     ,832     ,826     ,822     ,817     ,813     ,808     ,802     ,799     ,792     ,787     ,782     ,776     ,770     ,762     ,\n    756     ,749     ,745     ,740     ,730     ,723     ,717     ,709     ,703     ,695     ,688     ,678     ,670     ,664     ,654     ,\n    649     ,637     ,629     ,623     ,613     ,602     ,593     ,584     ,573     ,566     ,557     ,545     ,537     ,527     ,516     ,\n    506     ,495     ,487     ,476     ,464     ,456     ,445     ,436     ,426     ,413     ,403     ,394     ,383     ,370     ,362     ,\n    353     ,341     ,329     ,319     ,309     ,298     ,286     ,277     ,266     ,253     ,242     ,233     ,221     ,208     ,198     ,\n    187     ,174     ,164     ,154     ,142     ,128     ,119     ,106     ,96      ,85      ,72      ,62      ,48      ,38      ,25      ,\n    16      ,4       ,-8      ,-15     ,-28     ,-41     ,-50     ,-61     ,-73     ,-83     ,-96     ,-105    ,-117    ,-130    ,-139    ,\n    -149    ,-159    ,-171    ,-181    ,-192    ,-202    ,-212    ,-221    ,-232    ,-243    ,-252    ,-260    ,-271    ,-280    ,-290    ,\n    -303    ,-311    ,-320    ,-331    ,-339    ,-348    ,-358    ,-368    ,-377    ,-387    ,-395    ,-404    ,-413    ,-420    ,-431    ,\n    -439    ,-448    ,-454    ,-462    ,-474    ,-480    ,-490    ,-497    ,-504    ,-513    ,-521    ,-530    ,-537    ,-545    ,-551    ,\n    -560    ,-567    ,-573    ,-581    ,-589    ,-595    ,-600    ,-606    ,-615    ,-623    ,-625    ,-633    ,-638    ,-643    ,-649    ,\n    -652    ,-658    ,-662    ,-669    ,-673    ,-677    ,-682    ,-687    ,-693    ,-697    ,-700    ,-704    ,-707    ,-710    ,-714    ,\n    -716    ,-720    ,-723    ,-726    ,-728    ,-730    ,-734    ,-734    ,-737    ,-739    ,-740    ,-742    ,-742    ,-744    ,-745    ,\n    -745    ,-745    ,-747    ,-748    ,-748    ,-747    ,-747    ,-747    ,-748    ,-746    ,-744    ,-744    ,-742    ,-740    ,-739    ,\n    -736    ,-735    ,-732    ,-728    ,-727    ,-723    ,-720    ,-716    ,-714    ,-710    ,-708    ,-704    ,-700    ,-698    ,-693    ,\n    -689    ,-686    ,-682    ,-676    ,-674    ,-669    ,-664    ,-660    ,-654    ,-649    ,-642    ,-639    ,-634    ,-628    ,-624    ,\n    -617    ,-611    ,-606    ,-600    ,-592    ,-587    ,-582    ,-575    ,-569    ,-561    ,-554    ,-548    ,-542    ,-536    ,-527    ,\n    -522    ,-514    ,-505    ,-500    ,-492    ,-485    ,-476    ,-468    ,-460    ,-452    ,-443    ,-433    ,-424    ,-419    ,-412    ,\n    -400    ,-394    ,-385    ,-377    ,-368    ,-358    ,-348    ,-340    ,-329    ,-320    ,-312    ,-303    ,-295    ,-284    ,-275    ,\n    -268    ,-255    ,-246    ,-238    ,-227    ,-217    ,-209    ,-200    ,-190    ,-179    ,-170    ,-161    ,-151    ,-143    ,-133    ,\n    -123    ,-114    ,-106    ,-94     ,-85     ,-76     ,-64     ,-57     ,-46     ,-35     ,-27     ,-16     ,-6      ,-2      ,4       ,\n    18      ,28      ,34      ,47      ,57      ,65      ,78      ,87      ,96      ,107     ,116     ,125     ,137     ,147     ,155     ,\n    165     ,174     ,187     ,197     ,205     ,216     ,226     ,234     ,243     ,252     ,262     ,274     ,280     ,290     ,301     ,\n    308     ,317     ,327     ,334     ,343     ,351     ,360     ,368     ,376     ,385     ,391     ,399     ,407     ,415     ,421     ,\n    428     ,437     ,443     ,452     ,460     ,466     ,474     ,481     ,488     ,494     ,501     ,508     ,515     ,521     ,529     ,\n    536     ,540     ,547     ,553     ,561     ,567     ,571     ,578     ,583     ,589     ,595     ,599     ,604     ,610     ,613     ,\n    616     ,622     ,626     ,630     ,633     ,636     ,636     ,644     ,645     ,647     ,652     ,652     ,658     ,657     ,658     ,\n    661     ,662     ,664     ,666     ,668     ,668     ,670     ,671     ,673     ,673     ,674     ,677     ,676     ,678     ,677     ,\n    678     ,679     ,679     ,680     ,679     ,679     ,678     ,679     ,679     ,676     ,676     ,677     ,676     ,675     ,673     ,\n    673     ,672     ,670     ,667     ,664     ,664     ,660     ,657     ,656     ,654     ,650     ,650     ,648     ,643     ,640     ,\n    635     ,634     ,629     ,625     ,623     ,618     ,612     ,606     ,606     ,599     ,593     ,593     ,586     ,580     ,577     ,\n    571     ,565     ,562     ,555     ,549     ,546     ,541     ,534     ,531     ,525     ,518     ,514     ,509     ,503     ,495     ,\n    490     ,485     ,478     ,474     ,467     ,460     ,455     ,449     ,440     ,433     ,428     ,421     ,413     ,406     ,398     ,\n    392     ,385     ,376     ,368     ,361     ,351     ,344     ,336     ,326     ,320     ,310     ,302     ,294     ,282     ,275     ,\n    268     ,256     ,249     ,239     ,230     ,223     ,213     ,204     ,194     ,186     ,177     ,166     ,159     ,149     ,140     ,\n    130     ,123     ,113     ,104     ,97      ,85      ,77      ,69      ,59      ,53      ,42      ,34      ,25      ,18      ,10      ,\n    1       ,-4      ,-15     ,-21     ,-29     ,-39     ,-46     ,-55     ,-62     ,-73     ,-80     ,-87     ,-98     ,-105    ,-113    ,\n    -124    ,-133    ,-139    ,-147    ,-157    ,-164    ,-172    ,-183    ,-189    ,-198    ,-207    ,-213    ,-222    ,-230    ,-237    ,\n    -245    ,-252    ,-262    ,-269    ,-274    ,-282    ,-287    ,-296    ,-303    ,-309    ,-317    ,-322    ,-329    ,-336    ,-341    ,\n    -347    ,-356    ,-362    ,-366    ,-373    ,-378    ,-384    ,-390    ,-396    ,-402    ,-407    ,-411    ,-416    ,-423    ,-425    ,\n    -432    ,-439    ,-441    ,-448    ,-454    ,-456    ,-463    ,-467    ,-472    ,-477    ,-480    ,-487    ,-490    ,-493    ,-497    ,\n    -498    ,-502    ,-508    ,-511    ,-513    ,-517    ,-522    ,-523    ,-528    ,-530    ,-531    ,-536    ,-538    ,-540    ,-541    ,\n    -544    ,-544    ,-547    ,-550    ,-549    ,-553    ,-555    ,-556    ,-557    ,-558    ,-559    ,-559    ,-561    ,-560    ,-560    ,\n    -562    ,-560    ,-560    ,-562    ,-561    ,-561    ,-560    ,-561    ,-560    ,-561    ,-560    ,-559    ,-561    ,-558    ,-556    ,\n    -554    ,-553    ,-552    ,-551    ,-551    ,-548    ,-549    ,-546    ,-543    ,-542    ,-539    ,-539    ,-536    ,-534    ,-531    ,\n    -528    ,-525    ,-523    ,-519    ,-515    ,-513    ,-507    ,-503    ,-500    ,-496    ,-494    ,-488    ,-485    ,-481    ,-476    ,\n    -471    ,-466    ,-463    ,-456    ,-451    ,-446    ,-442    ,-435    ,-430    ,-425    ,-417    ,-413    ,-408    ,-403    ,-398    ,\n    -390    ,-385    ,-377    ,-369    ,-365    ,-360    ,-352    ,-346    ,-339    ,-332    ,-326    ,-319    ,-313    ,-309    ,-301    ,\n    -293    ,-286    ,-279    ,-273    ,-266    ,-259    ,-251    ,-244    ,-239    ,-233    ,-224    ,-215    ,-210    ,-202    ,-195    ,\n    -188    ,-180    ,-172    ,-165    ,-158    ,-150    ,-145    ,-136    ,-128    ,-120    ,-112    ,-105    ,-97     ,-89     ,-84     ,\n    -74     ,-66     ,-59     ,-50     ,-44     ,-36     ,-30     ,-22     ,-14     ,-7      ,-2      ,2       ,12      ,19      ,27      ,\n    33      ,41      ,50      ,57      ,65      ,73      ,80      ,87      ,95      ,102     ,109     ,117     ,126     ,131     ,139     ,\n    148     ,152     ,160     ,164     ,173     ,181     ,188     ,196     ,203     ,208     ,214     ,222     ,230     ,235     ,242     ,\n    248     ,252     ,262     ,268     ,274     ,282     ,285     ,292     ,299     ,307     ,314     ,319     ,325     ,330     ,337     ,\n    344     ,348     ,353     ,358     ,363     ,370     ,374     ,378     ,384     ,389     ,394     ,399     ,403     ,408     ,413     ,\n    417     ,423     ,427     ,432     ,436     ,439     ,445     ,448     ,453     ,456     ,460     ,463     ,467     ,475     ,475     ,\n    479     ,482     ,485     ,490     ,492     ,496     ,500     ,502     ,503     ,506     ,507     ,510     ,513     ,514     ,517     ,\n    520     ,523     ,524     ,525     ,525     ,528     ,529     ,528     ,532     ,532     ,532     ,532     ,535     ,535     ,535     ,\n    535     ,535     ,535     ,533     ,535     ,534     ,533     ,534     ,534     ,534     ,532     ,531     ,528     ,527     ,525     ,\n    523     ,522     ,522     ,518     ,518     ,516     ,511     ,510     ,508     ,504     ,501     ,498     ,496     ,493     ,489     ,\n    486     ,482     ,479     ,477     ,472     ,468     ,466     ,462     ,458     ,456     ,450     ,449     ,446     ,443     ,437     ,\n    432     ,433     ,425     ,421     ,420     ,414     ,410     ,406     ,405     ,398     ,393     ,390     ,384     ,379     ,374     ,\n    370     ,363     ,360     ,356     ,350     ,345     ,340     ,335     ,330     ,323     ,317     ,313     ,307     ,301     ,294     ,\n    287     ,281     ,275     ,269     ,264     ,256     ,251     ,246     ,239     ,234     ,227     ,221     ,214     ,207     ,201     ,\n    195     ,189     ,183     ,175     ,171     ,164     ,156     ,150     ,144     ,137     ,131     ,125     ,119     ,112     ,105     ,\n    98      ,93      ,87      ,78      ,72      ,67      ,60      ,53      ,48      ,38      ,31      ,27      ,18      ,11      ,5       ,\n    0       ,-5      ,-12     ,-19     ,-24     ,-31     ,-37     ,-47     ,-53     ,-58     ,-67     ,-74     ,-79     ,-83     ,-92     ,\n    -99     ,-104    ,-111    ,-118    ,-121    ,-130    ,-137    ,-138    ,-148    ,-155    ,-160    ,-166    ,-173    ,-179    ,-184    ,\n    -190    ,-194    ,-201    ,-207    ,-213    ,-220    ,-223    ,-229    ,-234    ,-239    ,-247    ,-248    ,-256    ,-263    ,-266    ,\n    -272    ,-276    ,-280    ,-284    ,-289    ,-294    ,-299    ,-305    ,-309    ,-313    ,-319    ,-324    ,-328    ,-332    ,-337    ,\n    -341    ,-345    ,-351    ,-354    ,-357    ,-362    ,-367    ,-370    ,-372    ,-375    ,-380    ,-381    ,-384    ,-389    ,-390    ,\n    -393    ,-395    ,-397    ,-398    ,-402    ,-405    ,-405    ,-410    ,-410    ,-410    ,-413    ,-413    ,-415    ,-418    ,-419    ,\n    -421    ,-423    ,-422    ,-421    ,-423    ,-424    ,-425    ,-425    ,-425    ,-426    ,-425    ,-426    ,-425    ,-425    ,-427    ,\n    -425    ,-425    ,-425    ,-425    ,-426    ,-425    ,-425    ,-424    ,-424    ,-425    ,-424    ,-425    ,-422    ,-421    ,-420    ,\n    -417    ,-416    ,-416    ,-415    ,-412    ,-412    ,-410    ,-407    ,-406    ,-405    ,-403    ,-402    ,-399    ,-397    ,-395    ,\n    -392    ,-390    ,-387    ,-385    ,-381    ,-379    ,-376    ,-374    ,-373    ,-369    ,-365    ,-363    ,-359    ,-354    ,-351    ,\n    -348    ,-346    ,-340    ,-336    ,-333    ,-327    ,-324    ,-321    ,-315    ,-313    ,-308    ,-303    ,-299    ,-294    ,-290    ,\n    -285    ,-284    ,-278    ,-273    ,-268    ,-264    ,-259    ,-255    ,-252    ,-244    ,-241    ,-235    ,-231    ,-225    ,-219    ,\n    -217    ,-210    ,-203    ,-199    ,-194    ,-191    ,-186    ,-177    ,-173    ,-169    ,-163    ,-158    ,-152    ,-145    ,-142    ,\n    -138    ,-129    ,-125    ,-116    ,-111    ,-106    ,-98     ,-94     ,-88     ,-82     ,-75     ,-68     ,-63     ,-55     ,-51     ,\n    -44     ,-36     ,-31     ,-24     ,-19     ,-15     ,-8      ,-3      ,0       ,5       ,13      ,20      ,26      ,32      ,35      ,\n    41      ,49      ,54      ,62      ,65      ,70      ,78      ,81      ,88      ,95      ,100     ,105     ,111     ,118     ,122     ,\n    127     ,134     ,139     ,144     ,150     ,156     ,160     ,164     ,172     ,177     ,181     ,187     ,192     ,200     ,205     ,\n    208     ,215     ,218     ,225     ,233     ,235     ,239     ,246     ,250     ,253     ,258     ,264     ,267     ,271     ,274     ,\n    278     ,282     ,285     ,290     ,295     ,298     ,302     ,305     ,309     ,313     ,315     ,320     ,323     ,326     ,326     ,\n    330     ,334     ,337     ,340     ,342     ,346     ,348     ,350     ,357     ,361     ,362     ,363     ,367     ,369     ,369     ,\n    372     ,375     ,377     ,380     ,383     ,385     ,386     ,389     ,392     ,391     ,394     ,396     ,395     ,397     ,401     ,\n    401     ,402     ,404     ,404     ,404     ,405     ,406     ,406     ,406     ,406     ,408     ,409     ,408     ,409     ,409     ,\n    409     ,407     ,408     ,410     ,410     ,407     ,407     ,407     ,409     ,408     ,405     ,406     ,406     ,405     ,405     ,\n    403     ,401     ,402     ,400     ,396     ,398     ,398     ,395     ,395     ,393     ,391     ,391     ,388     ,387     ,383     ,\n    381     ,380     ,376     ,374     ,372     ,370     ,367     ,364     ,362     ,359     ,354     ,352     ,349     ,346     ,343     ,\n    337     ,334     ,329     ,328     ,325     ,322     ,319     ,313     ,311     ,306     ,304     ,298     ,295     ,291     ,286     ,\n    284     ,280     ,276     ,271     ,268     ,263     ,258     ,253     ,249     ,244     ,238     ,237     ,232     ,227     ,221     ,\n    217     ,213     ,206     ,203     ,199     ,193     ,191     ,185     ,180     ,175     ,168     ,163     ,159     ,155     ,149     ,\n    144     ,138     ,135     ,128     ,121     ,117     ,110     ,105     ,99      ,95      ,89      ,83      ,77      ,73      ,66      ,\n    62      ,57      ,51      ,48      ,40      ,34      ,32      ,26      ,18      ,16      ,11      ,5       ,2       ,-2      ,-3      ,\n    -9      ,-14     ,-18     ,-22     ,-25     ,-31     ,-35     ,-40     ,-47     ,-51     ,-56     ,-60     ,-63     ,-68     ,-74     ,\n    -77     ,-81     ,-87     ,-92     ,-98     ,-100    ,-105    ,-111    ,-114    ,-120    ,-125    ,-132    ,-136    ,-139    ,-146    ,\n    -149    ,-154    ,-158    ,-162    ,-167    ,-172    ,-175    ,-178    ,-186    ,-189    ,-190    ,-196    ,-198    ,-201    ,-205    ,\n    -209    ,-213    ,-215    ,-219    ,-222    ,-227    ,-231    ,-234    ,-236    ,-239    ,-243    ,-243    ,-248    ,-250    ,-252    ,\n    -258    ,-259    ,-263    ,-265    ,-270    ,-269    ,-274    ,-277    ,-276    ,-283    ,-284    ,-286    ,-289    ,-291    ,-295    ,\n    -297    ,-300    ,-302    ,-304    ,-306    ,-311    ,-310    ,-309    ,-314    ,-314    ,-316    ,-317    ,-317    ,-320    ,-319    ,\n    -322    ,-322    ,-322    ,-326    ,-325    ,-325    ,-325    ,-327    ,-328    ,-326    ,-327    ,-326    ,-327    ,-327    ,-326    ,\n    -325    ,-326    ,-326    ,-323    ,-325    ,-324    ,-323    ,-321    ,-321    ,-323    ,-318    ,-319    ,-317    ,-317    ,-318    ,\n    -315    ,-314    ,-315    ,-315    ,-312    ,-312    ,-308    ,-307    ,-307    ,-307    ,-305    ,-301    ,-302    ,-299    ,-298    ,\n    -294    ,-293    ,-292    ,-286    ,-287    ,-284    ,-283    ,-279    ,-276    ,-275    ,-272    ,-271    ,-267    ,-264    ,-260    ,\n    -259    ,-254    ,-249    ,-247    ,-245    ,-241    ,-236    ,-233    ,-228    ,-226    ,-221    ,-217    ,-215    ,-207    ,-205    ,\n    -201    ,-199    ,-194    ,-190    ,-186    ,-182    ,-179    ,-175    ,-172    ,-169    ,-166    ,-160    ,-158    ,-156    ,-151    ,\n    -147    ,-143    ,-142    ,-138    ,-136    ,-131    ,-124    ,-123    ,-119    ,-116    ,-110    ,-109    ,-103    ,-98     ,-97     ,\n    -92     ,-87     ,-83     ,-80     ,-74     ,-72     ,-65     ,-61     ,-57     ,-50     ,-48     ,-42     ,-36     ,-30     ,-27     ,\n    -21     ,-17     ,-14     ,-8      ,-3      ,-1      ,-1      ,5       ,14      ,17      ,22      ,26      ,29      ,34      ,38      ,\n    42      ,48      ,52      ,55      ,59      ,63      ,67      ,69      ,75      ,78      ,81      ,87      ,90      ,96      ,96      ,\n    102     ,107     ,108     ,115     ,119     ,123     ,127     ,133     ,137     ,140     ,145     ,150     ,153     ,158     ,164     ,\n    166     ,171     ,174     ,180     ,184     ,186     ,194     ,196     ,202     ,205     ,208     ,213     ,215     ,220     ,225     ,\n    228     ,229     ,236     ,237     ,240     ,244     ,249     ,251     ,251     ,254     ,255     ,260     ,262     ,265     ,267     ,\n    269     ,273     ,272     ,275     ,276     ,277     ,280     ,281     ,284     ,287     ,286     ,288     ,289     ,290     ,294     ,\n    294     ,296     ,299     ,300     ,302     ,303     ,304     ,305     ,307     ,306     ,308     ,313     ,314     ,315     ,317     ,\n    317     ,318     ,319     ,321     ,320     ,322     ,322     ,321     ,323     ,324     ,324     ,322     ,324     ,323     ,319     ,\n    321     ,321     ,317     ,317     ,318     ,316     ,315     ,316     ,314     ,311     ,310     ,307     ,305     ,304     ,304     ,\n    304     ,302     ,301     ,299     ,297     ,295     ,294     ,292     ,290     ,291     ,288     ,286     ,286     ,285     ,283     ,\n    282     ,280     ,281     ,280     ,278     ,277     ,276     ,273     ,273     ,271     ,270     ,270     ,266     ,265     ,262     ,\n    261     ,258     ,253     ,251     ,250     ,247     ,243     ,241     ,237     ,236     ,231     ,228     ,226     ,222     ,220     ,\n    215     ,215     ,209     ,205     ,201     ,197     ,194     ,190     ,189     ,182     ,181     ,176     ,173     ,169     ,164     ,\n    162     ,158     ,157     ,151     ,148     ,145     ,141     ,138     ,133     ,130     ,125     ,125     ,121     ,116     ,114     ,\n    112     ,107     ,104     ,103     ,97      ,92      ,91      ,86      ,80      ,79      ,73      ,70      ,66      ,61      ,58      ,\n    53      ,49      ,43      ,38      ,37      ,32      ,28      ,24      ,19      ,15      ,9       ,6       ,1       ,-1      ,-6      ,\n    -9      ,-12     ,-18     ,-21     ,-27     ,-30     ,-34     ,-37     ,-42     ,-46     ,-49     ,-56     ,-58     ,-61     ,-65     ,\n    -69     ,-72     ,-74     ,-78     ,-80     ,-86     ,-88     ,-91     ,-95     ,-98     ,-101    ,-105    ,-109    ,-110    ,-114    ,\n    -115    ,-119    ,-124    ,-125    ,-132    ,-132    ,-135    ,-140    ,-141    ,-145    ,-149    ,-152    ,-152    ,-156    ,-161    ,\n    -162    ,-167    ,-168    ,-172    ,-176    ,-177    ,-181    ,-182    ,-187    ,-188    ,-188    ,-191    ,-192    ,-196    ,-197    ,\n    -199    ,-201    ,-202    ,-204    ,-206    ,-206    ,-207    ,-209    ,-211    ,-212    ,-214    ,-214    ,-214    ,-215    ,-217    ,\n    -219    ,-219    ,-220    ,-219    ,-221    ,-222    ,-222    ,-221    ,-224    ,-226    ,-226    ,-227    ,-228    ,-231    ,-230    ,\n    -231    ,-233    ,-233    ,-235    ,-234    ,-237    ,-237    ,-237    ,-239    ,-238    ,-239    ,-243    ,-243    ,-241    ,-244    ,\n    -243    ,-243    ,-244    ,-244    ,-246    ,-248    ,-247    ,-248    ,-247    ,-247    ,-247    ,-244    ,-245    ,-244    ,-242    ,\n    -241    ,-239    ,-238    ,-237    ,-236    ,-233    ,-233    ,-232    ,-230    ,-229    ,-226    ,-223    ,-223    ,-221    ,-219    ,\n    -218    ,-215    ,-216    ,-213    ,-211    ,-209    ,-207    ,-205    ,-203    ,-201    ,-200    ,-199    ,-196    ,-195    ,-193    ,\n    -190    ,-188    ,-187    ,-187    ,-182    ,-180    ,-179    ,-174    ,-174    ,-170    ,-167    ,-167    ,-162    ,-161    ,-160    ,\n    -155    ,-153    ,-152    ,-146    ,-143    ,-141    ,-138    ,-134    ,-129    ,-124    ,-121    ,-119    ,-114    ,-110    ,-107    ,\n    -103    ,-99     ,-98     ,-93     ,-90     ,-85     ,-81     ,-78     ,-73     ,-72     ,-67     ,-65     ,-62     ,-56     ,-55     ,\n    -50     ,-49     ,-45     ,-40     ,-36     ,-33     ,-31     ,-27     ,-22     ,-20     ,-18     ,-13     ,-11     ,-9      ,-6      ,\n    -3      ,0       ,-2      ,2       ,8       ,10      ,15      ,16      ,22      ,24      ,27      ,32      ,36      ,37      ,39      ,\n    45      ,50      ,54      ,56      ,60      ,62      ,65      ,70      ,71      ,74      ,77      ,81      ,84      ,88      ,92      ,\n    94      ,95      ,99      ,103     ,104     ,106     ,110     ,113     ,116     ,119     ,120     ,121     ,126     ,129     ,130     ,\n    135     ,134     ,136     ,139     ,141     ,145     ,147     ,148     ,149     ,153     ,154     ,156     ,163     ,162     ,163     ,\n    168     ,170     ,172     ,173     ,179     ,182     ,183     ,187     ,190     ,192     ,194     ,197     ,199     ,203     ,204     ,\n    207     ,209     ,212     ,215     ,216     ,219     ,220     ,223     ,224     ,227     ,228     ,228     ,232     ,234     ,234     ,\n    235     ,236     ,235     ,236     ,239     ,237     ,239     ,242     ,240     ,241     ,242     ,243     ,244     ,246     ,245     ,\n    246     ,248     ,247     ,248     ,247     ,249     ,248     ,249     ,249     ,248     ,250     ,249     ,250     ,249     ,249     ,\n    251     ,250     ,250     ,250     ,251     ,252     ,250     ,249     ,249     ,249     ,249     ,248     ,248     ,246     ,246     ,\n    246     ,243     ,242     ,241     ,240     ,238     ,236     ,236     ,236     ,234     ,230     ,230     ,228     ,228     ,226     ,\n    221     ,223     ,218     ,214     ,215     ,211     ,211     ,208     ,206     ,206     ,204     ,202     ,198     ,195     ,193     ,\n    191     ,190     ,187     ,184     ,184     ,182     ,182     ,178     ,176     ,172     ,172     ,169     ,164     ,165     ,161     ,\n    160     ,156     ,156     ,153     ,149     ,149     ,147     ,144     ,138     ,138     ,134     ,132     ,132     ,126     ,123     ,\n    123     ,119     ,117     ,116     ,112     ,109     ,105     ,104     ,103     ,98      ,94      ,93      ,92      ,88      ,86      ,\n    82      ,80      ,77      ,74      ,73      ,71      ,65      ,62      ,60      ,58      ,55      ,53      ,51      ,48      ,46      ,\n    41      ,39      ,37      ,31      ,31      ,29      ,26      ,22      ,18      ,16      ,14      ,10      ,7       ,816     ,-4954   ,\n    -12866  ,-12799  ,-13917  ,-13687  ,-13641  ,-13498  ,-13174  ,-13433  ,-13127  ,-13327  ,-12750  ,-12796  ,-11900  ,-11814  ,-10056  ,\n    -10117  ,-10045  ,-8169   ,-10085  ,-8812   ,-8181   ,1679    ,13665   ,8319    ,7775    ,16654   ,18401   ,13349   ,13353   ,22288   ,\n    27227   ,24442   ,15645   ,17240   ,25604   ,23945   ,24483   ,21626   ,18899   ,21229   ,24607   ,25142   ,24623   ,23021   ,22049   ,\n    27754   ,24093   ,9647    ,5266    ,13759   ,9936    ,3725    ,7843    ,6741    ,7740    ,16472   ,7320    ,-10282  ,-11544  ,-6665   ,\n    -4777   ,-3947   ,-7145   ,-6626   ,-4055   ,-16689  ,-20086  ,-19345  ,-9561   ,-8524   ,-28630  ,-28712  ,-23578  ,-18104  ,-17053  ,\n    -12007  ,-9587   ,-27517  ,-32768  ,-21415  ,-20348  ,-13235  ,-11103  ,-27627  ,-25477  ,-19702  ,-12974  ,-8949   ,-12815  ,-15285  ,\n    -8535   ,-918    ,-14523  ,-22750  ,-12764  ,-608    ,-7405   ,-3114   ,3725    ,-8949   ,-1833   ,4762    ,236     ,-4143   ,-5576   ,\n    8835    ,12750   ,5392    ,11109   ,13337   ,4965    ,3157    ,9409    ,12726   ,22557   ,27208   ,14928   ,6247    ,6609    ,13783   ,\n    19660   ,20033   ,27642   ,26765   ,13416   ,11937   ,18215   ,22207   ,12935   ,15820   ,26182   ,15035   ,14200   ,10573   ,9518    ,\n    14342   ,10535   ,15197   ,11432   ,8134    ,2261    ,2880    ,9124    ,5228    ,3810    ,-4209   ,-4309   ,-2809   ,-5539   ,2839    ,\n    -2229   ,-10603  ,-9222   ,-17432  ,-12758  ,-11066  ,-17218  ,-14173  ,-15162  ,-12179  ,-10886  ,-11231  ,-17772  ,-24574  ,-24674  ,\n    -15373  ,-9327   ,-18391  ,-17801  ,-20555  ,-21618  ,-15688  ,-14375  ,-11363  ,-9781   ,-12807  ,-13892  ,-11863  ,-10802  ,-8582   ,\n    -8493   ,-2524   ,495     ,-5539   ,-11193  ,-14334  ,-7079   ,1184    ,2179    ,10075   ,6889    ,-5100   ,6208    ,6648    ,790     ,\n    7845    ,5232    ,7632    ,11723   ,10303   ,13871   ,11990   ,10599   ,10307   ,10361   ,15357   ,11517   ,16176   ,17259   ,14541   ,\n    15990   ,10317   ,11789   ,15838   ,17589   ,14846   ,21267   ,19270   ,10067   ,6481    ,3656    ,8234    ,13774   ,15308   ,12536   ,\n    11268   ,2325    ,-1008   ,3278    ,4986    ,5751    ,4659    ,5763    ,7437    ,-3862   ,-9625   ,-6953   ,-6459   ,-37     ,-6330   ,\n    -9053   ,-10254  ,-7193   ,-6981   ,-16467  ,-16075  ,-11776  ,-3609   ,-11205  ,-17192  ,-13278  ,-17337  ,-18344  ,-11427  ,-10909  ,\n    -16205  ,-12519  ,-14943  ,-16615  ,-12491  ,-14933  ,-10693  ,-5979   ,-10976  ,-13673  ,-7032   ,-5939   ,-12882  ,-7667   ,-4883   ,\n    -8903   ,-1376   ,-493    ,-6631   ,-1274   ,2091    ,-1191   ,-1579   ,7       ,6254    ,12204   ,3955    ,-75     ,1869    ,7598    ,\n    15490   ,9614    ,8700    ,7335    ,5747    ,8064    ,12681   ,16294   ,9804    ,8510    ,15254   ,16562   ,13022   ,11386   ,6596    ,\n    7455    ,12741   ,12370   ,11407   ,17779   ,14369   ,4257    ,6121    ,8140    ,9961    ,9693    ,9679    ,7786    ,5524    ,5669    ,\n    3882    ,9351    ,3453    ,-4718   ,-1135   ,-1293   ,5325    ,4823    ,-4252   ,-7244   ,-9434   ,-9023   ,-4889   ,1481    ,-3631   ,\n    -11427  ,-8577   ,-8176   ,-12650  ,-13838  ,-10510  ,-9304   ,-4429   ,-4292   ,-13887  ,-14424  ,-15522  ,-17360  ,-13087  ,-10830  ,\n    -8676   ,-9301   ,-8661   ,-8240   ,-9313   ,-11231  ,-8386   ,-2072   ,-9085   ,-14425  ,-9017   ,-2714   ,-5786   ,-3583   ,-1651   ,\n    -6263   ,-3033   ,-1762   ,5130    ,4022    ,1179    ,4037    ,498     ,-1459   ,-1479   ,4233    ,8036    ,7096    ,10592   ,13980   ,\n    7391    ,3855    ,5938    ,6310    ,13064   ,13288   ,5931    ,7961    ,11446   ,13092   ,11057   ,6878    ,7105    ,9256    ,14462   ,\n    11581   ,6290    ,6880    ,11782   ,11654   ,5056    ,5503    ,5798    ,5286    ,4816    ,5420    ,5828    ,7460    ,4208    ,649     ,\n    3388    ,739     ,3414    ,1376    ,-6610   ,-5680   ,1255    ,-294    ,-4634   ,-3577   ,-7117   ,-6677   ,-8184   ,-7830   ,-4802   ,\n    -3953   ,-2931   ,-8307   ,-12545  ,-10517  ,-8586   ,-9537   ,-11212  ,-11254  ,-6860   ,-8001   ,-11403  ,-9252   ,-9183   ,-7599   ,\n    -5529   ,-4134   ,-7706   ,-12449  ,-8067   ,-7019   ,-7477   ,-7046   ,-7801   ,-6297   ,556     ,1191    ,-5215   ,-4483   ,-2507   ,\n    1709    ,2713    ,1477    ,1366    ,2183    ,602     ,1769    ,5306    ,1096    ,2010    ,5011    ,6872    ,8040    ,7905    ,8192    ,\n    7736    ,8078    ,7929    ,8464    ,7975    ,8129    ,8353    ,9022    ,8448    ,7820    ,14504   ,9763    ,1432    ,2628    ,6821    ,\n    12039   ,7267    ,4007    ,6651    ,9339    ,6357    ,3338    ,3946    ,2036    ,3549    ,1527    ,-249    ,1614    ,3344    ,2151    ,\n    319     ,3683    ,1345    ,-3785   ,-3262   ,-3136   ,-5158   ,-7135   ,-5963   ,-1458   ,-1297   ,-4146   ,-6436   ,-8664   ,-9283   ,\n    -8141   ,-6363   ,-6558   ,-4857   ,-2805   ,-6730   ,-12621  ,-9334   ,-6303   ,-9128   ,-6932   ,-7877   ,-10102  ,-5794   ,-1860   ,\n    -5523   ,-7590   ,-6069   ,-6544   ,-5417   ,-4987   ,-3906   ,-4749   ,-5239   ,-828    ,1543    ,-105    ,-1627   ,-2878   ,-2317   ,\n    259     ,1716    ,4787    ,5944    ,3587    ,1592    ,104     ,1749    ,7548    ,7188    ,2982    ,4483    ,5186    ,5675    ,6964    ,\n    7994    ,8669    ,6596    ,6440    ,9283    ,8497    ,6182    ,5023    ,4024    ,6455    ,9291    ,7939    ,6172    ,4571    ,2775    ,\n    5810    ,5266    ,2852    ,4291    ,4344    ,6705    ,6825    ,2149    ,-1225   ,-837    ,3354    ,4213    ,-777    ,-3661   ,-394    ,\n    674     ,-1503   ,-1963   ,-4786   ,-5131   ,-3821   ,-1490   ,325     ,-4456   ,-6831   ,-6533   ,-6556   ,-5245   ,-5146   ,-4945   ,\n    -5352   ,-4927   ,-5067   ,-7838   ,-3887   ,-5015   ,-9243   ,-8586   ,-8380   ,-5683   ,-4445   ,-2111   ,-5141   ,-8248   ,-6412   ,\n    -3369   ,-1520   ,-5366   ,-4303   ,-221    ,-765    ,-4060   ,-3906   ,-2551   ,-1387   ,270     ,-990    ,321     ,110     ,-237    ,\n    4165    ,2296    ,1120    ,3154    ,3447    ,4192    ,3423    ,6683    ,6331    ,2749    ,2438    ,6147    ,8595    ,5318    ,3815    ,\n    3152    ,6039    ,6704    ,5779    ,6233    ,5105    ,4172    ,4363    ,5196    ,6550    ,8649    ,5237    ,2991    ,3538    ,5173    ,\n    6172    ,3355    ,1032    ,359     ,2966    ,3859    ,871     ,-974    ,-560    ,867     ,821     ,1536    ,3225    ,155     ,-2828   ,\n    -4955   ,-5527   ,-3450   ,-2532   ,-1166   ,-1491   ,-3666   ,-4694   ,-4482   ,-5137   ,-2100   ,-2255   ,-6514   ,-7106   ,-7095   ,\n    -6278   ,-4062   ,-1212   ,-4352   ,-6740   ,-5352   ,-5956   ,-5673   ,-5379   ,-4636   ,-4419   ,-5427   ,-2913   ,-814    ,-2348   ,\n    -3208   ,-3187   ,-3489   ,-3551   ,-2838   ,-715    ,1611    ,-488    ,-1420   ,-1203   ,619     ,2711    ,1435    ,2333    ,1823    ,\n    1576    ,1545    ,379     ,1995    ,4776    ,4891    ,4408    ,4254    ,4195    ,4923    ,4616    ,3647    ,2384    ,3456    ,4813    ,\n    6120    ,8412    ,5509    ,3011    ,4704    ,3406    ,3138    ,5418    ,5223    ,3600    ,3049    ,2847    ,1830    ,2217    ,3363    ,\n    3352    ,2857    ,1902    ,2346    ,1549    ,1265    ,2852    ,539     ,-1933   ,-1715   ,-1756   ,-2694   ,-2786   ,-1720   ,946     ,\n    -511    ,-3961   ,-3497   ,-3047   ,-3071   ,-3022   ,-3389   ,-3029   ,-2110   ,-3991   ,-3989   ,-3535   ,-5402   ,-6338   ,-6294   ,\n    -3811   ,-3435   ,-4397   ,-4351   ,-3347   ,-567    ,-2540   ,-6091   ,-5048   ,-2661   ,-2439   ,-3122   ,-2811   ,-3617   ,-2203   ,\n    -1402   ,-2765   ,-1697   ,-579    ,165     ,105     ,801     ,296     ,1477    ,3255    ,-848    ,-107    ,1158    ,374     ,1778    ,\n    2250    ,4801    ,4205    ,1709    ,1995    ,4396    ,4690    ,3454    ,3999    ,2645    ,2707    ,4273    ,3928    ,2718    ,3290    ,\n    4124    ,4197    ,4817    ,3984    ,4093    ,3994    ,3629    ,4753    ,3972    ,1087    ,830     ,2314    ,1161    ,2174    ,2050    ,\n    1394    ,1583    ,-472    ,-332    ,586     ,1492    ,241     ,-39     ,1479    ,-1337   ,-3476   ,-3207   ,-1921   ,349     ,-1418   ,\n    -3036   ,-2841   ,-3621   ,-3007   ,-2138   ,-3213   ,-3413   ,-1129   ,-2462   ,-4876   ,-5782   ,-5098   ,-3275   ,-3041   ,-1365   ,\n    -1136   ,-3668   ,-5239   ,-3761   ,-2933   ,-4275   ,-3594   ,-2238   ,-1588   ,-1815   ,-1827   ,-1284   ,-710    ,-1313   ,-1944   ,\n    -1249   ,-962    ,949     ,647     ,-1451   ,-953    ,232     ,1486    ,2986    ,1916    ,-918    ,31      ,1040    ,3404    ,4200    ,\n    2601    ,2976    ,1721    ,1969    ,2054    ,1806    ,2785    ,3757    ,3961    ,5031    ,4549    ,2683    ,3414    ,2467    ,2018    ,\n    2913    ,3176    ,2461    ,1902    ,2526    ,3017    ,4075    ,4185    ,1663    ,517     ,1571    ,674     ,509     ,1584    ,359     ,\n    -113    ,582     ,501     ,779     ,-15     ,1152    ,923     ,-2444   ,-1310   ,-913    ,-2870   ,-3190   ,-2637   ,-1665   ,-1663   ,\n    -1598   ,-1984   ,-2086   ,-599    ,-2476   ,-4439   ,-2777   ,-2320   ,-3299   ,-3647   ,-3418   ,-3572   ,-3841   ,-2394   ,-1620   ,\n    -2032   ,-1526   ,-2414   ,-3037   ,-2371   ,-2368   ,-2009   ,-1756   ,-2293   ,-1799   ,-1236   ,-804    ,-298    ,60      ,409     ,\n    -647    ,-1181   ,-324    ,296     ,1477    ,1040    ,-255    ,1149    ,1656    ,2010    ,1235    ,1397    ,2000    ,1841    ,2532    ,\n    1504    ,2956    ,2695    ,2372    ,3027    ,1924    ,2696    ,2764    ,2270    ,2913    ,2848    ,1822    ,1979    ,2646    ,2928    ,\n    2590    ,3364    ,3294    ,1102    ,1048    ,1186    ,1684    ,3106    ,2033    ,634     ,89      ,385     ,308     ,-662    ,-117    ,\n    393     ,1399    ,742     ,-1311   ,-1614   ,-980    ,477     ,-262    ,-2018   ,-2652   ,-1610   ,-280    ,-1726   ,-2831   ,-2734   ,\n    -1951   ,-1097   ,-1721   ,-2795   ,-3285   ,-3152   ,-2467   ,-1817   ,-1876   ,-1094   ,-1271   ,-2333   ,-3189   ,-3686   ,-2989   ,\n    -1391   ,-50     ,-1351   ,-2230   ,-1746   ,-1491   ,-1985   ,-1955   ,-1106   ,-357    ,-110    ,153     ,1420    ,23      ,-1045   ,\n    -114    ,120     ,115     ,284     ,913     ,614     ,1164    ,2050    ,1779    ,974     ,778     ,2416    ,2478    ,1299    ,1791    ,\n    2233    ,1417    ,2268    ,3478    ,2009    ,1924    ,2141    ,1266    ,1881    ,2120    ,3439    ,2784    ,1233    ,2352    ,1800    ,\n    1687    ,1184    ,566     ,937     ,2060    ,2759    ,1174    ,-17     ,-448    ,203     ,531     ,754     ,726     ,961     ,1010    ,\n    -796    ,-1719   ,-1530   ,-243    ,-464    ,-1223   ,-698    ,-1605   ,-2111   ,-1677   ,-1428   ,-1280   ,-1254   ,-1468   ,-1585   ,\n    -1883   ,-1297   ,-853    ,-2205   ,-2659   ,-2954   ,-3117   ,-2183   ,-1721   ,-857    ,-438    ,-1449   ,-2102   ,-2466   ,-1667   ,\n    -1546   ,-1836   ,-619    ,-733    ,-1276   ,-1283   ,-981    ,-614    ,-85     ,324     ,-166    ,544     ,1152    ,-414    ,-910    ,\n    -102    ,467     ,971     ,1094    ,1431    ,1352    ,1417    ,1100    ,1655    ,1864    ,1046    ,1993    ,1539    ,1270    ,1201    ,\n    743     ,1545    ,1923    ,2403    ,3385    ,2417    ,1268    ,1785    ,771     ,1301    ,2125    ,1285    ,1815    ,1103    ,978     ,\n    1876    ,950     ,500     ,603     ,1404    ,2004    ,543     ,-624    ,59      ,937     ,-146    ,-837    ,339     ,477     ,-274    ,\n    -780    ,-1361   ,-825    ,-474    ,-1148   ,-1452   ,-1637   ,-719    ,-576    ,-1139   ,-1289   ,-1604   ,-1299   ,-1834   ,-2328   ,\n    -2058   ,-938    ,-969    ,-1935   ,-1770   ,-1472   ,-736    ,-1308   ,-2048   ,-1481   ,-1575   ,-1495   ,-1279   ,-1598   ,-1331   ,\n    -928    ,-20     ,250     ,-883    ,-1158   ,-756    ,-415    ,236     ,732     ,360     ,-164    ,-207    ,-322    ,-286    ,381     ,\n    780     ,1104    ,1237    ,1706    ,1543    ,719     ,854     ,500     ,830     ,1269    ,1613    ,1622    ,1960    ,2864    ,1661    ,\n    901     ,1065    ,1022    ,1066    ,1414    ,1378    ,919     ,1185    ,1488    ,1494    ,1526    ,1303    ,1291    ,977     ,1188    ,\n    1921    ,563     ,146     ,8       ,-499    ,565     ,767     ,24      ,-55     ,-301    ,-506    ,59      ,-226    ,-382    ,-482    ,\n    -860    ,-1232   ,-875    ,-336    ,-842    ,-1119   ,-1231   ,-1321   ,-850    ,-211    ,-889    ,-1921   ,-2179   ,-1372   ,-1200   ,\n    -947    ,-591    ,-1594   ,-1397   ,-1403   ,-1526   ,-1196   ,-1370   ,-1285   ,-592    ,-634    ,-1058   ,-669    ,-472    ,-943    ,\n    -1007   ,-151    ,-370    ,-254    ,-323    ,-273    ,444     ,-107    ,-313    ,-180    ,314     ,546     ,869     ,1240    ,766     ,\n    547     ,439     ,683     ,1326    ,1752    ,946     ,421     ,741     ,701     ,948     ,1277    ,1998    ,2101    ,1138    ,435     ,\n    918     ,1502    ,1437    ,1338    ,1006    ,924     ,945     ,873     ,658     ,531     ,1163    ,1710    ,925     ,505     ,389     ,\n    -137    ,435     ,740     ,209     ,17      ,-321    ,-156    ,79      ,-129    ,307     ,-12     ,-664    ,-983    ,-1013   ,-353    ,\n    -166    ,-732    ,-1007   ,-820    ,-870    ,-785    ,-1263   ,-1305   ,-687    ,-923    ,-1074   ,-1340   ,-1494   ,-1118   ,-845    ,\n    -917    ,-870    ,-543    ,-560    ,-789    ,-1064   ,-1267   ,-1085   ,-821    ,-676    ,-752    ,-662    ,-520    ,-410    ,-88     ,\n    -191    ,-212    ,-443    ,-131    ,490     ,-13     ,-181    ,474     ,587     ,244     ,563     ,411     ,344     ,884     ,588     ,\n    373     ,549     ,982     ,1659    ,1285    ,715     ,652     ,711     ,885     ,856     ,1110    ,1299    ,1077    ,1079    ,1097    ,\n    962     ,866     ,928     ,952     ,859     ,885     ,757     ,1193    ,1107    ,384     ,375     ,231     ,0       ,28      ,206     ,\n    188     ,315     ,100     ,145     ,471     ,163     ,-87     ,-491    ,-357    ,-509    ,-857    ,-838    ,-446    ,-6      ,-612    ,\n    -457    ,-393    ,-854    ,-973    ,-1021   ,-890    ,-1179   ,-1131   ,-1020   ,-576    ,-94     ,-688    ,-1093   ,-1094   ,-933    ,\n    -822    ,-876    ,-1064   ,-860    ,-243    ,-263    ,-649    ,-924    ,-364    ,-214    ,-721    ,-587    ,-418    ,68      ,270     ,\n    -81     ,-134    ,207     ,385     ,211     ,-8      ,64      ,421     ,355     ,315     ,460     ,570     ,440     ,417     ,762     ,\n    623     ,841     ,1415    ,1067    ,596     ,617     ,781     ,884     ,826     ,692     ,829     ,976     ,861     ,781     ,700     ,\n    786     ,461     ,703     ,1059    ,559     ,406     ,470     ,1020    ,668     ,247     ,326     ,-136    ,314     ,493     ,59      ,\n    -54     ,25      ,49      ,-125    ,-268    ,-550    ,-450    ,73      ,22      ,-639    ,-667    ,-210    ,-459    ,-817    ,-906    ,\n    -624    ,-378    ,-663    ,-384    ,-278    ,-993    ,-1039   ,-591    ,-849    ,-1041   ,-864    ,-676    ,-405    ,-202    ,-256    ,\n    -844    ,-1017   ,-522    ,-281    ,-478    ,-507    ,-616    ,-646    ,-139    ,80      ,-168    ,-344    ,-93     ,-122    ,-172    ,\n    287     ,565     ,218     ,-174    ,72      ,491     ,580     ,272     ,230     ,307     ,343     ,636     ,690     ,609     ,643     ,\n    680     ,734     ,904     ,736     ,586     ,594     ,697     ,948     ,692     ,535     ,506     ,826     ,1104    ,620     ,400     ,\n    264     ,276     ,509     ,467     ,501     ,366     ,54      ,333     ,598     ,293     ,41      ,-51     ,154     ,366     ,178     ,\n    -2      ,-189    ,-371    ,-257    ,-284    ,-457    ,-408    ,-264    ,-426    ,-298    ,98      ,-282    ,-705    ,-812    ,-624    ,\n    -662    ,-501    ,-260    ,-649    ,-597    ,-550    ,-689    ,-910    ,-637    ,-226    ,-367    ,-452    ,-614    ,-573    ,-552    ,\n    -481    ,-276    ,-356    ,-543    ,-442    ,-251    ,-45     ,377     ,-8      ,-324    ,-96     ,-137    ,-35     ,-17     ,167     ,\n    310     ,203     ,203     ,216     ,133     ,106     ,320     ,466     ,567     ,587     ,595     ,565     ,632     ,1011    ,773     ,\n    169     ,155     ,329     ,493     ,609     ,762     ,749     ,603     ,564     ,476     ,953     ,693     ,164     ,323     ,141     ,\n    371     ,443     ,147     ,177     ,475     ,412     ,99      ,28      ,219     ,440     ,-46     ,-76     ,212     ,-191    ,-223    ,\n    -219    ,-389    ,-70     ,-61     ,-373    ,-357    ,-142    ,-346    ,-508    ,-372    ,-414    ,-365    ,-496    ,-537    ,-572    ,\n    -648    ,-265    ,-154    ,-559    ,-720    ,-628    ,-382    ,-146    ,-441    ,-481    ,-367    ,-290    ,-59     ,-289    ,-404    ,\n    -483    ,-539    ,-454    ,-121    ,207     ,-3      ,6       ,-178    ,-221    ,-11     ,90      ,144     ,5       ,103     ,165     ,\n    517     ,653     ,213     ,8       ,96      ,167     ,443     ,800     ,602     ,243     ,227     ,492     ,613     ,531     ,394     ,\n    299     ,301     ,642     ,729     ,468     ,605     ,511     ,327     ,357     ,393     ,438     ,262     ,333     ,360     ,276     ,\n    378     ,148     ,80      ,135     ,378     ,375     ,-15     ,102     ,170     ,33      ,-91     ,-253    ,-264    ,-46     ,-128    ,\n    -344    ,-289    ,-231    ,-178    ,-198    ,-208    ,-254    ,-188    ,47      ,-316    ,-758    ,-629    ,-529    ,-441    ,-343    ,\n    -88     ,-167    ,-537    ,-370    ,-401    ,-451    ,-449    ,-538    ,-468    ,-238    ,113     ,-54     ,-294    ,-428    ,-340    ,\n    -16     ,-157    ,-234    ,-167    ,31      ,302     ,172     ,9       ,-106    ,-39     ,87      ,50      ,169     ,340     ,192     ,\n    175     ,298     ,154     ,209     ,326     ,344     ,449     ,661     ,588     ,334     ,93      ,234     ,509     ,394     ,482     ,\n    307     ,379     ,498     ,387     ,411     ,330     ,352     ,162     ,182     ,294     ,489     ,573     ,308     ,135     ,57      ,\n    151     ,136     ,-6      ,20      ,258     ,143     ,6       ,44      ,-76     ,-185    ,-231    ,49      ,118     ,-98     ,-201    ,\n    -189    ,-299    ,-321    ,-189    ,-278    ,-202    ,-228    ,-282    ,-345    ,-479    ,-348    ,-312    ,-233    ,-243    ,-233    ,\n    34      ,-89     ,-380    ,-473    ,-488    ,-427    ,-262    ,-181    ,-191    ,-172    ,-174    ,-151    ,-122    ,-125    ,-192    ,\n    -62     ,-13     ,-26     ,57      ,-77     ,-58     ,106     ,278     ,186     ,13      ,94      ,103     ,256     ,326     ,225     ,\n    167     ,219     ,212     ,166     ,424     ,447     ,265     ,190     ,360     ,493     ,308     ,191     ,215     ,497     ,577     ,\n    296     ,138     ,116     ,252     ,288     ,325     ,306     ,304     ,520     ,357     ,140     ,57      ,2       ,27      ,-57     ,\n    -44     ,220     ,220     ,-32     ,55      ,15      ,-102    ,1       ,103     ,-64     ,-300    ,-157    ,-167    ,-196    ,-63     ,\n    -76     ,-260    ,-278    ,-204    ,-294    ,-183    ,-185    ,-251    ,-273    ,-377    ,-298    ,-148    ,-284    ,-215    ,-40     ,\n    -233    ,-228    ,-243    ,-245    ,-226    ,-313    ,-272    ,-62     ,102     ,-75     ,-120    ,-160    ,-189    ,-9      ,-32     ,\n    -16     ,62      ,-49     ,-22     ,190     ,103     ,44      ,207     ,177     ,134     ,138     ,144     ,153     ,245     ,264     ,\n    96      ,239     ,393     ,310     ,234     ,182     ,314     ,345     ,190     ,183     ,256     ,326     ,322     ,298     ,452     ,\n    459     ,234     ,105     ,143     ,163     ,118     ,151     ,207     ,160     ,142     ,116     ,18      ,140     ,132     ,95      ,\n    75      ,-68     ,23      ,71      ,-108    ,-126    ,70      ,18      ,-118    ,-182    ,-115    ,-103    ,-246    ,-240    ,-201    ,\n    -166    ,-131    ,33      ,-21     ,-306    ,-294    ,-173    ,-190    ,-279    ,-253    ,-273    ,-292    ,-203    ,-202    ,-161    ,\n    -169    ,4       ,94      ,-144    ,-166    ,-243    ,-226    ,-80     ,-73     ,-63     ,-135    ,-43     ,7       ,-18     ,68      ,\n    60      ,130     ,149     ,50      ,6       ,86      ,128     ,120     ,129     ,115     ,235     ,239     ,141     ,164     ,226     ,\n    306     ,274     ,165     ,203     ,252     ,168     ,181     ,351     ,380     ,301     ,161     ,109     ,232     ,175     ,145     ,\n    186     ,263     ,376     ,246     ,132     ,127     ,35      ,58      ,56      ,57      ,200     ,123     ,39      ,12      ,7       ,\n    3       ,-49     ,-69     ,-92     ,-14     ,17      ,31      ,-19     ,-158    ,-169    ,-98     ,-95     ,-132    ,-179    ,-197    ,\n    -132    ,-124    ,-187    ,-238    ,-181    ,-103    ,-40     ,-120    ,-210    ,-155    ,-175    ,-201    ,-186    ,-176    ,-169    ,\n    -23     ,45      ,-53     ,-89     ,-127    ,-138    ,-61     ,-43     ,-21     ,-59     ,-55     ,20      ,8       ,133     ,70      ,\n    33      ,87      ,69      ,127     ,87      ,32      ,44      ,235     ,229     ,98      ,127     ,154     ,200     ,215     ,219     ,\n    227     ,207     ,298     ,296     ,157     ,167     ,154     ,142     ,148     ,230     ,302     ,194     ,76      ,56      ,168     ,\n    165     ,129     ,112     ,53      ,139     ,155     ,104     ,61      ,-3      ,-21     ,12      ,42      ,52      ,53      ,27      ,\n    177     ,135     ,-162    ,-204    ,-56     ,-28     ,-152    ,-162    ,-103    ,-114    ,-138    ,-107    ,-99     ,-74     ,-95     ,\n    -77     ,86      ,-28     ,-198    ,-221    ,-229    ,-214    ,-236    ,-110    ,31      ,-2      ,-111    ,-125    ,-148    ,-151    ,\n    8       ,54      ,-46     ,-101    ,-23     ,-24     ,-41     ,26      ,49      ,7       ,8       ,100     ,68      ,53      ,71      ,\n    61      ,41      ,58      ,194     ,189     ,79      ,79      ,202     ,209     ,123     ,144     ,125     ,173     ,208     ,163     ,\n    164     ,153     ,147     ,138     ,99      ,113     ,169     ,173     ,291     ,334     ,181     ,42      ,31      ,83      ,76      ,\n    95      ,71      ,89      ,105     ,47      ,-19     ,46      ,151     ,79      ,-31     ,-75     ,-11     ,-7      ,50      ,7       ,\n    -109    ,-95     ,-75     ,63      ,46      ,-70     ,-119    ,-180    ,-156    ,-57     ,-90     ,-166    ,-145    ,-72     ,45      ,\n    -36     ,-149    ,-139    ,-110    ,-150    ,-128    ,-37     ,-99     ,-71     ,-47     ,-61     ,-67     ,-78     ,-55     ,-46     ,\n    -29     ,-5      ,-30     ,-76     ,-36     ,-4      ,127     ,148     ,0       ,-33     ,109     ,159     ,13      ,-24     ,35      ,\n    75      ,155     ,265     ,154     ,70      ,115     ,93      ,65      ,117     ,156     ,162     ,164     ,91      ,141     ,189     ,\n    154     ,134     ,120     ,124     ,140     ,152     ,88      ,65      ,152     ,216     ,132     ,61      ,94      ,104     ,41      ,\n    -2      ,40      ,48      ,131     ,160     ,47      ,4       ,10      ,-46     ,-84     ,32      ,56      ,-8      ,-102    ,-63     ,\n    33      ,-38     ,-76     ,-88     ,-18     ,17      ,-65     ,-135    ,-150    ,-105    ,-70     ,-55     ,-41     ,-63     ,32      ,\n    84      ,-107    ,-173    ,-123    ,-148    ,-149    ,-69     ,-59     ,-16     ,52      ,-31     ,-61     ,-31     ,-39     ,-34     ,\n    -74     ,-74     ,-11     ,23      ,156     ,122     ,-5      ,37      ,42      ,26      ,29      ,38      ,5       ,29      ,83      ,\n    109     ,138     ,131     ,151     ,113     ,217     ,274     ,108     ,39      ,36      ,29      ,25      ,157     ,221     ,151     ,\n    90      ,42      ,120     ,143     ,80      ,96      ,114     ,145     ,218     ,140     ,38      ,25      ,25      ,33      ,40      ,\n    11      ,1       ,99      ,89      ,4       ,40      ,31      ,-25     ,-34     ,1       ,73      ,25      ,-74     ,-48     ,28      ,\n    0       ,-52     ,-53     ,-87     ,-56     ,-15     ,-66     ,-65     ,-17     ,-27     ,-52     ,-101    ,-105    ,-31     ,0       ,\n    13      ,-35     ,-116    ,-41     ,1       ,-74     ,-88     ,-71     ,16      ,79      ,44      ,-19     ,-87     ,-69     ,-10     ,\n    111     ,94      ,-37     ,-35     ,-23     ,79      ,139     ,61      ,54      ,27      ,-10     ,12      ,94      ,96      ,105     ,\n    191     ,114     ,15      ,23      ,137     ,145     ,73      ,112     ,124     ,80      ,39      ,96      ,151     ,137     ,116     ,\n    85      ,53      ,77      ,89      ,88      ,111     ,79      ,21      ,20      ,56      ,105     ,156     ,105     ,10      ,-20     ,\n    -24     ,-5      ,49      ,30      ,44      ,51      ,-46     ,-50     ,33      ,35      ,-8      ,-33     ,-54     ,-50     ,-63     ,\n    -16     ,-38     ,-49     ,-16     ,-32     ,10      ,-40     ,-93     ,-94     ,-19     ,48      ,-29     ,-46     ,-46     ,-65     ,\n    -33     ,-27     ,-39     ,-24     ,-8      ,-3      ,-3      ,-2      ,-6      ,-36     ,-15     ,31      ,73      ,76      ,10      ,\n    16      ,35      ,16      ,47      ,53      ,61      ,62      ,14      ,26      ,50      ,151     ,178     ,76      ,38      ,64      ,\n    109     ,53      ,77      ,145     ,127     ,62      ,37      ,116     ,125     ,71      ,68      ,104     ,85      ,79      ,86      ,\n    77      ,71      ,74      ,80      ,35      ,78      ,105     ,56      ,52      ,32      ,12      ,34      ,61      ,41      ,-6      ,\n    -16     ,47      ,69      ,22      ,11      ,-16     ,-57     ,-54     ,-41     ,-9      ,-13     ,20      ,101     ,27      ,-81     ,\n    -87     ,-52     ,-69     ,-91     ,-72     ,-43     ,-12     ,-30     ,25      ,53      ,-58     ,-95     ,-62     ,-26     ,26      ,\n    0       ,-68     ,-82     ,-2      ,55      ,1       ,-12     ,-25     ,-61     ,5       ,73      ,63      ,11      ,9       ,26      ,\n    26      ,21      ,10      ,79      ,76      ,49      ,85      ,75      ,27      ,34      ,117     ,116     ,52      ,30      ,13      ,\n    -3      ,1       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,\n    0       ,0       ,0       ,0       ,282     ,-1133   ,-4903   ,-7187   ,-9285   ,-11203  ,-12816  ,-14273  ,-15338  ,-16233  ,-16704  ,\n    -16973  ,-16847  ,-16480  ,-15787  ,-14830  ,-13638  ,-12169  ,-10583  ,-8688   ,-6829   ,-4656   ,-2760   ,240     ,5825    ,10661   ,\n    14721   ,18671   ,22054   ,25162   ,27693   ,29800   ,31318   ,32324   ,32760   ,32650   ,31999   ,30824   ,29162   ,27049   ,24534   ,\n    21661   ,18501   ,15102   ,11544   ,7876    ,4186    ,518     ,-3035   ,-6448   ,-9624   ,-12547  ,-15139  ,-17371  ,-19236  ,-20663  ,\n    -21681  ,-22243  ,-22377  ,-22081  ,-21370  ,-20271  ,-18804  ,-17032  ,-14964  ,-12677  ,-10203  ,-7602   ,-4928   ,-2227   ,413     ,\n    2988    ,5415    ,7658    ,9673    ,11414   ,12868   ,13990   ,14777   ,15199   ,15269   ,14977   ,14333   ,13364   ,12075   ,10517   ,\n    8692    ,6667    ,4473    ,2140    ,-254    ,-2701   ,-5122   ,-7484   ,-9739   ,-11842  ,-13754  ,-15436  ,-16863  ,-17991  ,-18822  ,\n    -19321  ,-19489  ,-19323  ,-18814  ,-17991  ,-16848  ,-15422  ,-13722  ,-11788  ,-9658   ,-7359   ,-4939   ,-2430   ,102     ,2645    ,\n    5133    ,7536    ,9814    ,11922   ,13837   ,15517   ,16948   ,18093   ,18957   ,19517   ,19766   ,19717   ,19359   ,18719   ,17796   ,\n    16623   ,15221   ,13615   ,11836   ,9917    ,7903    ,5808    ,3697    ,1582    ,-483    ,-2463   ,-4358   ,-6100   ,-7687   ,-9079   ,\n    -10267  ,-11237  ,-11968  ,-12469  ,-12724  ,-12747  ,-12534  ,-12110  ,-11486  ,-10668  ,-9694   ,-8576   ,-7354   ,-6041   ,-4672   ,\n    -3278   ,-1881   ,-524    ,777     ,1994    ,3104    ,4086    ,4926    ,5603    ,6107    ,6435    ,6573    ,6535    ,6312    ,5919    ,\n    5367    ,4663    ,3830    ,2881    ,1842    ,730     ,-420    ,-1595   ,-2767   ,-3903   ,-4999   ,-6010   ,-6922   ,-7721   ,-8390   ,\n    -8905   ,-9259   ,-9450   ,-9466   ,-9308   ,-8969   ,-8468   ,-7802   ,-6985   ,-6029   ,-4951   ,-3779   ,-2508   ,-1182   ,184     ,\n    1567    ,2946    ,4298    ,5595    ,6824    ,7945    ,8971    ,9865    ,10616   ,11218   ,11652   ,11925   ,12020   ,11950   ,11707   ,\n    11300   ,10744   ,10042   ,9210    ,8259    ,7216    ,6086    ,4896    ,3671    ,2412    ,1161    ,-72     ,-1266   ,-2409   ,-3480   ,\n    -4457   ,-5340   ,-6107   ,-6754   ,-7272   ,-7657   ,-7909   ,-8026   ,-8017   ,-7877   ,-7622   ,-7257   ,-6794   ,-6247   ,-5624   ,\n    -4947   ,-4229   ,-3484   ,-2729   ,-1983   ,-1250   ,-553    ,93      ,683     ,1206    ,1649    ,2010    ,2282    ,2458    ,2546    ,\n    2538    ,2446    ,2265    ,2005    ,1683    ,1293    ,854     ,377     ,-120    ,-637    ,-1158   ,-1664   ,-2148   ,-2596   ,-2995   ,\n    -3338   ,-3617   ,-3822   ,-3951   ,-3990   ,-3946   ,-3813   ,-3593   ,-3290   ,-2904   ,-2443   ,-1916   ,-1326   ,-683    ,-6      ,\n    703     ,1424    ,2155    ,2876    ,3580    ,4249    ,4870    ,5451    ,5955    ,6391    ,6750    ,7015    ,7195    ,7282    ,7272    ,\n    7163    ,6963    ,6671    ,6295    ,5838    ,5305    ,4715    ,4064    ,3368    ,2634    ,1884    ,1117    ,348     ,-399    ,-1141   ,\n    -1842   ,-2506   ,-3119   ,-3673   ,-4164   ,-4584   ,-4935   ,-5202   ,-5401   ,-5517   ,-5556   ,-5519   ,-5414   ,-5242   ,-5004   ,\n    -4716   ,-4382   ,-4010   ,-3606   ,-3179   ,-2738   ,-2294   ,-1848   ,-1418   ,-1007   ,-615    ,-262    ,54      ,334     ,572     ,\n    761     ,905     ,1002    ,1048    ,1054    ,1016    ,937     ,828     ,691     ,525     ,347     ,157     ,-36     ,-226    ,-415    ,\n    -589    ,-743    ,-871    ,-967    ,-1033   ,-1064   ,-1053   ,-1001   ,-908    ,-775    ,-601    ,-388    ,-145    ,127     ,431     ,\n    760     ,1100    ,1452    ,1810    ,2168    ,2520    ,2849    ,3166    ,3453    ,3705    ,3925    ,4098    ,4232    ,4315    ,4345    ,\n    4326    ,4255    ,4128    ,3949    ,3722    ,3447    ,3131    ,2771    ,2383    ,1965    ,1518    ,1058    ,583     ,107     ,-367    ,\n    -834    ,-1289   ,-1725   ,-2131   ,-2512   ,-2857   ,-3162   ,-3424   ,-3644   ,-3814   ,-3942   ,-4020   ,-4048   ,-4037   ,-3977   ,\n    -3876   ,-3736   ,-3565   ,-3357   ,-3121   ,-2867   ,-2595   ,-2313   ,-2015   ,-1722   ,-1430   ,-1140   ,-862    ,-595    ,-349    ,\n    -121    ,81      ,262     ,419     ,551     ,658     ,739     ,797     ,833     ,848     ,839     ,821     ,789     ,746     ,695     ,\n    642     ,588     ,534     ,489     ,450     ,424     ,405     ,406     ,423     ,454     ,498     ,564     ,649     ,746     ,856     ,\n    977     ,1112    ,1252    ,1401    ,1547    ,1698    ,1843    ,1981    ,2109    ,2223    ,2324    ,2401    ,2463    ,2498    ,2511    ,\n    2494    ,2447    ,2379    ,2277    ,2149    ,1997    ,1819    ,1613    ,1388    ,1142    ,876     ,604     ,314     ,22      ,-269    ,\n    -566    ,-860    ,-1148   ,-1419   ,-1682   ,-1923   ,-2148   ,-2349   ,-2524   ,-2677   ,-2795   ,-2889   ,-2949   ,-2984   ,-2987   ,\n    -2960   ,-2906   ,-2825   ,-2722   ,-2591   ,-2444   ,-2275   ,-2094   ,-1902   ,-1698   ,-1488   ,-1268   ,-1052   ,-837    ,-626    ,\n    -423    ,-225    ,-41     ,129     ,291     ,435     ,563     ,684     ,782     ,868     ,938     ,997     ,1040    ,1072    ,1093    ,\n    1104    ,1112    ,1107    ,1104    ,1093    ,1079    ,1067    ,1057    ,1052    ,1043    ,1047    ,1048    ,1056    ,1069    ,1084    ,\n    1111    ,1134    ,1168    ,1199    ,1235    ,1273    ,1303    ,1336    ,1366    ,1390    ,1407    ,1416    ,1414    ,1407    ,1384    ,\n    1349    ,1304    ,1241    ,1169    ,1081    ,978     ,863     ,735     ,595     ,443     ,286     ,117     ,-55     ,-231    ,-412    ,\n    -596    ,-774    ,-954    ,-1126   ,-1289   ,-1448   ,-1591   ,-1725   ,-1844   ,-1946   ,-2034   ,-2100   ,-2150   ,-2182   ,-2192   ,\n    -2183   ,-2159   ,-2113   ,-2051   ,-1973   ,-1877   ,-1769   ,-1645   ,-1514   ,-1371   ,-1218   ,-1060   ,-898    ,-730    ,-565    ,\n    -401    ,-236    ,-79     ,73      ,219     ,360     ,490     ,612     ,723     ,825     ,916     ,992     ,1064    ,1120    ,1172    ,\n    1210    ,1240    ,1261    ,1270    ,1276    ,1274    ,1271    ,1257    ,1245    ,1226    ,1203    ,1185    ,1161    ,1135    ,1114    ,\n    1091    ,1067    ,1047    ,1024    ,1000    ,976     ,956     ,931     ,901     ,877     ,845     ,811     ,778     ,736     ,689     ,\n    645     ,590     ,528     ,463     ,395     ,320     ,237     ,151     ,61      ,-29     ,-126    ,-229    ,-333    ,-435    ,-540    ,\n    -646    ,-747    ,-850    ,-948    ,-1043   ,-1130   ,-1207   ,-1282   ,-1345   ,-1400   ,-1446   ,-1477   ,-1503   ,-1515   ,-1514   ,\n    -1505   ,-1482   ,-1449   ,-1401   ,-1347   ,-1282   ,-1204   ,-1123   ,-1027   ,-926    ,-822    ,-711    ,-594    ,-477    ,-360    ,\n    -238    ,-117    ,-4      ,109     ,223     ,330     ,431     ,529     ,620     ,702     ,780     ,849     ,913     ,966     ,1011    ,\n    1050    ,1079    ,1101    ,1117    ,1128    ,1131    ,1124    ,1113    ,1101    ,1083    ,1059    ,1031    ,1001    ,969     ,936     ,\n    898     ,858     ,820     ,778     ,737     ,694     ,651     ,606     ,560     ,517     ,467     ,422     ,375     ,323     ,276     ,\n    227     ,175     ,122     ,68      ,16      ,-35     ,-93     ,-150    ,-209    ,-267    ,-329    ,-389    ,-447    ,-507    ,-565    ,\n    -620    ,-673    ,-724    ,-775    ,-821    ,-862    ,-902    ,-932    ,-959    ,-982    ,-999    ,-1009   ,-1012   ,-1011   ,-997    ,\n    -979    ,-955    ,-926    ,-889    ,-844    ,-795    ,-738    ,-679    ,-615    ,-543    ,-470    ,-395    ,-316    ,-233    ,-150    ,\n    -69     ,8       ,90      ,172     ,248     ,326     ,398     ,470     ,536     ,596     ,654     ,702     ,747     ,788     ,819     ,\n    848     ,871     ,889     ,898     ,903     ,905     ,898     ,889     ,874     ,854     ,832     ,805     ,775     ,743     ,708     ,\n    671     ,631     ,590     ,545     ,501     ,459     ,412     ,368     ,322     ,274     ,230     ,183     ,139     ,95      ,49      ,\n    7       ,-34     ,-76     ,-118    ,-158    ,-200    ,-239    ,-276    ,-317    ,-354    ,-391    ,-424    ,-455    ,-488    ,-515    ,\n    -543    ,-568    ,-590    ,-613    ,-630    ,-645    ,-657    ,-665    ,-672    ,-672    ,-671    ,-668    ,-657    ,-645    ,-627    ,\n    -609    ,-586    ,-555    ,-525    ,-490    ,-451    ,-409    ,-364    ,-315    ,-267    ,-216    ,-163    ,-109    ,-52     ,-1      ,\n    52      ,109     ,162     ,217     ,269     ,322     ,370     ,414     ,459     ,496     ,534     ,568     ,595     ,622     ,642     ,\n    659     ,672     ,681     ,686     ,686     ,683     ,678     ,664     ,649     ,635     ,611     ,589     ,562     ,530     ,499     ,\n    466     ,431     ,395     ,357     ,318     ,279     ,239     ,199     ,162     ,120     ,79      ,41      ,4       ,-30     ,-66     ,\n    -101    ,-136    ,-170    ,-201    ,-232    ,-259    ,-288    ,-314    ,-337    ,-359    ,-380    ,-397    ,-414    ,-432    ,-441    ,\n    -452    ,-462    ,-469    ,-476    ,-478    ,-479    ,-476    ,-473    ,-469    ,-459    ,-448    ,-436    ,-421    ,-405    ,-382    ,\n    -363    ,-338    ,-311    ,-286    ,-256    ,-225    ,-192    ,-158    ,-124    ,-88     ,-51     ,-16     ,17      ,54      ,92      ,\n    128     ,164     ,199     ,234     ,268     ,299     ,329     ,357     ,384     ,408     ,429     ,447     ,465     ,477     ,488     ,\n    497     ,503     ,504     ,504     ,502     ,495     ,487     ,475     ,462     ,445     ,426     ,406     ,383     ,359     ,332     ,\n    306     ,279     ,248     ,218     ,187     ,156     ,124     ,92      ,62      ,30      ,1       ,-26     ,-55     ,-83     ,-110    ,\n    -137    ,-163    ,-185    ,-209    ,-230    ,-251    ,-268    ,-283    ,-297    ,-310    ,-322    ,-329    ,-337    ,-342    ,-346    ,\n    -350    ,-350    ,-349    ,-347    ,-342    ,-336    ,-328    ,-319    ,-311    ,-297    ,-283    ,-269    ,-252    ,-236    ,-219    ,\n    -198    ,-178    ,-158    ,-136    ,-114    ,-89     ,-66     ,-42     ,-18     ,3       ,27      ,51      ,75      ,98      ,120     ,\n    145     ,165     ,185     ,205     ,223     ,241     ,256     ,272     ,286     ,297     ,307     ,315     ,323     ,327     ,329     ,\n    332     ,332     ,328     ,325     ,319     ,311     ,302     ,292     ,280     ,267     ,252     ,236     ,219     ,202     ,184     ,\n    164     ,143     ,124     ,104     ,82      ,61      ,40      ,20      ,0       ,-15     ,-35     ,-56     ,-73     ,-91     ,-106    ,\n    -123    ,-138    ,-150    ,-163    ,-175    ,-184    ,-194    ,-202    ,-207    ,-212    ,-216    ,-218    ,-220    ,-220    ,-221    ,\n    -219    ,-214    ,-212    ,-206    ,-200    ,-195    ,-186    ,-176    ,-168    ,-157    ,-146    ,-135    ,-124    ,-109    ,-96     ,\n    -83     ,-68     ,-53     ,-40     ,-26     ,-10     ,2       ,16      ,30      ,43      ,58      ,70      ,82      ,96      ,107     ,\n    120     ,131     ,141     ,150     ,159     ,168     ,174     ,178     ,185     ,189     ,192     ,195     ,196     ,197     ,195     ,\n    192     ,191     ,186     ,181     ,177     ,169     ,162     ,155     ,146     ,137     ,127     ,115     ,105     ,94      ,81      ,\n    70      ,59      ,47      ,35      ,22      ,9       ,0       ,-11     ,-22     ,-34     ,-42     ,-53     ,-63     ,-72     ,-81     ,\n    -88     ,-95     ,-101    ,-107    ,-113    ,-116    ,-120    ,-122    ,-124    ,-125    ,-126    ,-127    ,-125    ,-122    ,-120    ,\n    -118    ,-115    ,-110    ,-104    ,-98     ,-91     ,-85     ,-77     ,-70     ,-63     ,-55     ,-47     ,-40     ,-33     ,-25     ,\n    -18     ,-10     ,-4      ,0       ,6       ,13      ,18      ,24      ,30      ,34      ,39      ,42      ,46      ,49      ,51      ,\n    54      ,55      ,57      ,57      ,58      ,58      ,57      ,57      ,56      ,55      ,53      ,51      ,48      ,46      ,43      ,\n    41      ,38      ,34      ,31      ,29      ,26      ,23      ,20      ,17      ,14      ,12      ,10      ,7       ,6       ,3       ,\n    2       ,1       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,\n    0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,-12     ,-251    ,-9595   ,-14720  ,-14612  ,\n    -16474  ,-16717  ,-17875  ,-18139  ,-18685  ,-18842  ,-18833  ,-18792  ,-18286  ,-17999  ,-17055  ,-16496  ,-15220  ,-14329  ,-12790  ,\n    -11572  ,-9959   ,-8226   ,-6919   ,3277    ,12091   ,14960   ,18423   ,20680   ,23324   ,25298   ,27300   ,28912   ,30256   ,31391   ,\n    32095   ,32650   ,32741   ,32686   ,32197   ,31544   ,30530   ,29320   ,27849   ,26190   ,24337   ,22323   ,20187   ,17939   ,15624   ,\n    13259   ,10883   ,8507    ,6186    ,3891    ,1700    ,-394    ,-2377   ,-4236   ,-5949   ,-7508   ,-8912   ,-10161  ,-11255  ,-12193  ,\n    -12979  ,-13627  ,-14144  ,-14535  ,-14823  ,-15020  ,-15129  ,-15163  ,-15155  ,-15103  ,-15018  ,-14924  ,-14826  ,-14725  ,-14640  ,\n    -14573  ,-14530  ,-14509  ,-14510  ,-14532  ,-14569  ,-14629  ,-14689  ,-14749  ,-14791  ,-14815  ,-14810  ,-14755  ,-14648  ,-14465  ,\n    -14213  ,-13870  ,-13417  ,-12870  ,-12206  ,-11422  ,-10519  ,-9496   ,-8356   ,-7085   ,-5717   ,-4232   ,-2656   ,-997    ,739     ,\n    2527    ,4365    ,6206    ,8075    ,9919    ,11726   ,13489   ,15169   ,16761   ,18247   ,19603   ,20818   ,21887   ,22775   ,23496   ,\n    24023   ,24358   ,24505   ,24445   ,24198   ,23751   ,23121   ,22301   ,21320   ,20182   ,18886   ,17471   ,15928   ,14304   ,12584   ,\n    10804   ,8987    ,7132    ,5279    ,3422    ,1600    ,-180    ,-1905   ,-3568   ,-5140   ,-6624   ,-8009   ,-9278   ,-10444  ,-11485  ,\n    -12411  ,-13216  ,-13906  ,-14478  ,-14947  ,-15299  ,-15556  ,-15725  ,-15795  ,-15801  ,-15721  ,-15588  ,-15401  ,-15161  ,-14879  ,\n    -14557  ,-14220  ,-13849  ,-13466  ,-13063  ,-12649  ,-12226  ,-11785  ,-11337  ,-10872  ,-10398  ,-9908   ,-9402   ,-8867   ,-8312   ,\n    -7725   ,-7110   ,-6457   ,-5760   ,-5033   ,-4256   ,-3437   ,-2570   ,-1672   ,-720    ,268     ,1286    ,2355    ,3437    ,4548    ,\n    5666    ,6795    ,7921    ,9036    ,10132   ,11191   ,12217   ,13176   ,14087   ,14916   ,15675   ,16340   ,16901   ,17368   ,17705   ,\n    17943   ,18044   ,18023   ,17882   ,17607   ,17212   ,16677   ,16033   ,15276   ,14407   ,13433   ,12372   ,11212   ,9981    ,8689    ,\n    7342    ,5964    ,4543    ,3116    ,1675    ,257     ,-1152   ,-2535   ,-3874   ,-5167   ,-6381   ,-7549   ,-8635   ,-9638   ,-10549  ,\n    -11379  ,-12113  ,-12743  ,-13283  ,-13728  ,-14078  ,-14331  ,-14503  ,-14576  ,-14567  ,-14491  ,-14333  ,-14109  ,-13819  ,-13468  ,\n    -13067  ,-12621  ,-12128  ,-11598  ,-11044  ,-10453  ,-9849   ,-9212   ,-8560   ,-7903   ,-7221   ,-6539   ,-5842   ,-5139   ,-4428   ,\n    -3715   ,-2996   ,-2268   ,-1531   ,-801    ,-60     ,677     ,1418    ,2172    ,2914    ,3674    ,4419    ,5160    ,5898    ,6624    ,\n    7333    ,8025    ,8707    ,9349    ,9966    ,10549   ,11096   ,11593   ,12045   ,12436   ,12768   ,13042   ,13244   ,13380   ,13439   ,\n    13425   ,13322   ,13141   ,12884   ,12542   ,12117   ,11614   ,11034   ,10378   ,9658    ,8868    ,8021    ,7117    ,6158    ,5167    ,\n    4129    ,3074    ,1994    ,907     ,-177    ,-1261   ,-2332   ,-3389   ,-4406   ,-5396   ,-6330   ,-7220   ,-8059   ,-8836   ,-9544   ,\n    -10179  ,-10758  ,-11239  ,-11658  ,-12001  ,-12255  ,-12438  ,-12539  ,-12569  ,-12522  ,-12403  ,-12213  ,-11969  ,-11659  ,-11293  ,\n    -10872  ,-10394  ,-9887   ,-9335   ,-8743   ,-8126   ,-7483   ,-6814   ,-6131   ,-5432   ,-4724   ,-4013   ,-3292   ,-2570   ,-1850   ,\n    -1137   ,-430    ,259     ,944     ,1621    ,2278    ,2927    ,3559    ,4170    ,4765    ,5336    ,5879    ,6415    ,6915    ,7387    ,\n    7843    ,8255    ,8646    ,8996    ,9317    ,9597    ,9829    ,10038   ,10194   ,10308   ,10372   ,10390   ,10363   ,10276   ,10144   ,\n    9958    ,9721    ,9429    ,9090    ,8687    ,8239    ,7756    ,7212    ,6628    ,5998    ,5337    ,4638    ,3902    ,3143    ,2366    ,\n    1565    ,749     ,-62     ,-882    ,-1696   ,-2504   ,-3300   ,-4074   ,-4815   ,-5536   ,-6220   ,-6859   ,-7460   ,-8002   ,-8509   ,\n    -8949   ,-9332   ,-9665   ,-9932   ,-10143  ,-10288  ,-10367  ,-10387  ,-10345  ,-10244  ,-10082  ,-9864   ,-9602   ,-9278   ,-8906   ,\n    -8501   ,-8036   ,-7548   ,-7024   ,-6460   ,-5882   ,-5272   ,-4643   ,-4009   ,-3363   ,-2700   ,-2040   ,-1377   ,-722    ,-69     ,\n    562     ,1188    ,1807    ,2396    ,2974    ,3527    ,4064    ,4572    ,5050    ,5507    ,5935    ,6328    ,6692    ,7025    ,7330    ,\n    7594    ,7826    ,8021    ,8181    ,8318    ,8404    ,8454    ,8476    ,8456    ,8395    ,8304    ,8169    ,7995    ,7787    ,7546    ,\n    7266    ,6942    ,6601    ,6218    ,5800    ,5358    ,4885    ,4383    ,3861    ,3308    ,2738    ,2159    ,1556    ,950     ,335     ,\n    -284    ,-905    ,-1525   ,-2136   ,-2739   ,-3326   ,-3899   ,-4457   ,-4978   ,-5476   ,-5942   ,-6378   ,-6782   ,-7133   ,-7457   ,\n    -7732   ,-7958   ,-8147   ,-8283   ,-8365   ,-8399   ,-8391   ,-8334   ,-8230   ,-8080   ,-7889   ,-7643   ,-7361   ,-7036   ,-6677   ,\n    -6284   ,-5855   ,-5407   ,-4920   ,-4416   ,-3895   ,-3353   ,-2804   ,-2242   ,-1673   ,-1106   ,-531    ,35      ,584     ,1137    ,\n    1674    ,2193    ,2703    ,3186    ,3652    ,4093    ,4506    ,4895    ,5260    ,5595    ,5890    ,6158    ,6390    ,6596    ,6772    ,\n    6903    ,7013    ,7085    ,7125    ,7126    ,7094    ,7042    ,6942    ,6819    ,6660    ,6474    ,6261    ,6020    ,5754    ,5454    ,\n    5135    ,4794    ,4433    ,4040    ,3637    ,3219    ,2780    ,2324    ,1863    ,1392    ,911     ,431     ,-55     ,-537    ,-1022   ,\n    -1499   ,-1979   ,-2439   ,-2889   ,-3329   ,-3749   ,-4155   ,-4529   ,-4896   ,-5226   ,-5521   ,-5801   ,-6035   ,-6245   ,-6423   ,\n    -6556   ,-6669   ,-6739   ,-6771   ,-6764   ,-6718   ,-6636   ,-6516   ,-6373   ,-6177   ,-5955   ,-5708   ,-5414   ,-5106   ,-4767   ,\n    -4401   ,-4015   ,-3600   ,-3178   ,-2734   ,-2285   ,-1828   ,-1354   ,-882    ,-400    ,68      ,540     ,1000    ,1456    ,1901    ,\n    2326    ,2743    ,3132    ,3515    ,3871    ,4197    ,4510    ,4791    ,5044    ,5272    ,5460    ,5632    ,5773    ,5878    ,5956    ,\n    5997    ,6023    ,6006    ,5963    ,5899    ,5797    ,5665    ,5515    ,5337    ,5131    ,4910    ,4663    ,4395    ,4108    ,3801    ,\n    3475    ,3138    ,2788    ,2419    ,2048    ,1672    ,1279    ,889     ,491     ,94      ,-297    ,-695    ,-1082   ,-1467   ,-1839   ,\n    -2206   ,-2559   ,-2899   ,-3224   ,-3530   ,-3822   ,-4097   ,-4347   ,-4572   ,-4780   ,-4956   ,-5111   ,-5234   ,-5336   ,-5412   ,\n    -5446   ,-5467   ,-5449   ,-5402   ,-5337   ,-5231   ,-5105   ,-4950   ,-4766   ,-4565   ,-4330   ,-4079   ,-3806   ,-3508   ,-3202   ,\n    -2865   ,-2523   ,-2167   ,-1800   ,-1425   ,-1037   ,-658    ,-261    ,117     ,498     ,879     ,1251    ,1624    ,1971    ,2318    ,\n    2647    ,2957    ,3254    ,3527    ,3784    ,4015    ,4224    ,4413    ,4573    ,4718    ,4826    ,4914    ,4976    ,5003    ,5014    ,\n    4994    ,4960    ,4887    ,4793    ,4686    ,4546    ,4382    ,4205    ,4003    ,3788    ,3556    ,3296    ,3037    ,2753    ,2458    ,\n    2157    ,1847    ,1534    ,1207    ,885     ,552     ,218     ,-104    ,-430    ,-753    ,-1071   ,-1383   ,-1687   ,-1983   ,-2265   ,\n    -2531   ,-2789   ,-3035   ,-3264   ,-3467   ,-3655   ,-3827   ,-3976   ,-4112   ,-4223   ,-4311   ,-4372   ,-4417   ,-4439   ,-4434   ,\n    -4412   ,-4365   ,-4299   ,-4199   ,-4086   ,-3954   ,-3796   ,-3622   ,-3425   ,-3215   ,-2987   ,-2748   ,-2491   ,-2219   ,-1939   ,\n    -1646   ,-1351   ,-1043   ,-734    ,-420    ,-110    ,198     ,511     ,815     ,1123    ,1417    ,1703    ,1982    ,2248    ,2506    ,\n    2743    ,2966    ,3167    ,3354    ,3530    ,3677    ,3810    ,3922    ,4008    ,4080    ,4125    ,4153    ,4155    ,4134    ,4095    ,\n    4030    ,3952    ,3854    ,3737    ,3593    ,3439    ,3264    ,3078    ,2875    ,2651    ,2436    ,2197    ,1950    ,1694    ,1425    ,\n    1162    ,891     ,614     ,339     ,66      ,-205    ,-474    ,-743    ,-1003   ,-1263   ,-1507   ,-1748   ,-1978   ,-2192   ,-2399   ,\n    -2589   ,-2769   ,-2929   ,-3080   ,-3208   ,-3316   ,-3416   ,-3498   ,-3559   ,-3598   ,-3628   ,-3636   ,-3617   ,-3583   ,-3540   ,\n    -3467   ,-3380   ,-3282   ,-3160   ,-3029   ,-2874   ,-2710   ,-2534   ,-2342   ,-2142   ,-1926   ,-1704   ,-1472   ,-1232   ,-986    ,\n    -739    ,-487    ,-226    ,26      ,273     ,529     ,778     ,1017    ,1264    ,1494    ,1707    ,1929    ,2134    ,2323    ,2509    ,\n    2670    ,2821    ,2956    ,3073    ,3179    ,3261    ,3332    ,3383    ,3414    ,3436    ,3432    ,3408    ,3375    ,3318    ,3247    ,\n    3160    ,3056    ,2938    ,2807    ,2656    ,2494    ,2324    ,2143    ,1953    ,1747    ,1542    ,1325    ,1109    ,882     ,654     ,\n    423     ,187     ,-24     ,-258    ,-484    ,-703    ,-926    ,-1125   ,-1332   ,-1531   ,-1713   ,-1886   ,-2047   ,-2209   ,-2346   ,\n    -2473   ,-2589   ,-2687   ,-2777   ,-2849   ,-2906   ,-2946   ,-2974   ,-2991   ,-2990   ,-2962   ,-2925   ,-2880   ,-2819   ,-2741   ,\n    -2645   ,-2544   ,-2423   ,-2293   ,-2155   ,-2000   ,-1840   ,-1674   ,-1493   ,-1313   ,-1114   ,-923    ,-720    ,-507    ,-308    ,\n    -91     ,98      ,313     ,520     ,708     ,914     ,1107    ,1295    ,1469    ,1644    ,1801    ,1963    ,2101    ,2227    ,2355    ,\n    2453    ,2551    ,2627    ,2695    ,2750    ,2789    ,2808    ,2823    ,2819    ,2792    ,2763    ,2712    ,2657    ,2581    ,2493    ,\n    2385    ,2280    ,2158    ,2023    ,1888    ,1725    ,1570    ,1397    ,1226    ,1046    ,857     ,674     ,488     ,299     ,105     ,\n    -78     ,-262    ,-449    ,-633    ,-808    ,-982    ,-1150   ,-1308   ,-1458   ,-1597   ,-1731   ,-1855   ,-1968   ,-2069   ,-2163   ,\n    -2237   ,-2304   ,-2368   ,-2399   ,-2434   ,-2450   ,-2452   ,-2447   ,-2415   ,-2392   ,-2342   ,-2281   ,-2216   ,-2131   ,-2033   ,\n    -1943   ,-1829   ,-1701   ,-1580   ,-1441   ,-1296   ,-1145   ,-996    ,-829    ,-671    ,-505    ,-337    ,-166    ,3       ,158     ,\n    335     ,496     ,658     ,821     ,978     ,1123    ,1264    ,1406    ,1528    ,1649    ,1766    ,1866    ,1955    ,2038    ,2107    ,\n    2172    ,2214    ,2257    ,2289    ,2295    ,2300    ,2290    ,2278    ,2239    ,2197    ,2149    ,2075    ,2006    ,1925    ,1824    ,\n    1721    ,1613    ,1496    ,1369    ,1234    ,1096    ,957     ,807     ,653     ,507     ,350     ,188     ,40      ,-115    ,-272    ,\n    -419    ,-567    ,-713    ,-858    ,-989    ,-1116   ,-1243   ,-1354   ,-1464   ,-1563   ,-1650   ,-1735   ,-1806   ,-1869   ,-1922   ,\n    -1966   ,-1990   ,-2007   ,-2020   ,-2016   ,-2007   ,-1986   ,-1956   ,-1912   ,-1862   ,-1797   ,-1724   ,-1645   ,-1558   ,-1465   ,\n    -1361   ,-1252   ,-1130   ,-1013   ,-882    ,-753    ,-625    ,-481    ,-345    ,-206    ,-70     ,59      ,198     ,337     ,479     ,\n    610     ,736     ,860     ,976     ,1096    ,1202    ,1301    ,1392    ,1481    ,1556    ,1623    ,1689    ,1737    ,1782    ,1819    ,\n    1848    ,1862    ,1862    ,1858    ,1853    ,1832    ,1796    ,1755    ,1709    ,1654    ,1585    ,1524    ,1440    ,1348    ,1257    ,\n    1159    ,1056    ,946     ,837     ,717     ,597     ,475     ,354     ,232     ,109     ,-11     ,-129    ,-248    ,-366    ,-483    ,\n    -594    ,-703    ,-813    ,-908    ,-1001   ,-1090   ,-1171   ,-1248   ,-1317   ,-1382   ,-1430   ,-1472   ,-1514   ,-1539   ,-1565   ,\n    -1575   ,-1573   ,-1575   ,-1560   ,-1540   ,-1514   ,-1478   ,-1431   ,-1379   ,-1323   ,-1258   ,-1188   ,-1114   ,-1029   ,-937    ,\n    -844    ,-752    ,-648    ,-545    ,-440    ,-331    ,-224    ,-106    ,-15     ,94      ,207     ,308     ,424     ,518     ,621     ,\n    715     ,804     ,896     ,978     ,1054    ,1127    ,1192    ,1251    ,1308    ,1352    ,1391    ,1424    ,1453    ,1470    ,1482    ,\n    1484    ,1478    ,1463    ,1442    ,1418    ,1385    ,1344    ,1293    ,1246    ,1182    ,1120    ,1054    ,977     ,898     ,810     ,\n    727     ,635     ,545     ,448     ,357     ,261     ,158     ,63      ,-32     ,-124    ,-217    ,-314    ,-407    ,-492    ,-578    ,\n    -662    ,-740    ,-812    ,-876    ,-947    ,-997    ,-1052   ,-1096   ,-1132   ,-1174   ,-1189   ,-1217   ,-1230   ,-1238   ,-1234   ,\n    -1224   ,-1219   ,-1195   ,-1170   ,-1140   ,-1099   ,-1056   ,-1014   ,-953    ,-899    ,-832    ,-765    ,-699    ,-616    ,-550    ,\n    -466    ,-380    ,-300    ,-214    ,-129    ,-46     ,29      ,119     ,203     ,289     ,368     ,443     ,519     ,593     ,668     ,\n    727     ,787     ,846     ,900     ,949     ,991     ,1032    ,1063    ,1090    ,1118    ,1138    ,1143    ,1145    ,1142    ,1142    ,\n    1131    ,1111    ,1087    ,1055    ,1029    ,986     ,948     ,900     ,844     ,792     ,733     ,677     ,605     ,542     ,475     ,\n    396     ,332     ,257     ,181     ,107     ,30      ,-40     ,-115    ,-186    ,-255    ,-324    ,-389    ,-458    ,-522    ,-579    ,\n    -639    ,-685    ,-729    ,-775    ,-813    ,-851    ,-877    ,-900    ,-922    ,-938    ,-949    ,-947    ,-949    ,-946    ,-934    ,\n    -918    ,-892    ,-866    ,-839    ,-804    ,-764    ,-725    ,-675    ,-624    ,-572    ,-517    ,-459    ,-397    ,-337    ,-270    ,\n    -203    ,-138    ,-70     ,-9      ,55      ,122     ,188     ,256     ,319     ,381     ,443     ,495     ,552     ,607     ,646     ,\n    693     ,732     ,767     ,804     ,828     ,855     ,873     ,887     ,901     ,911     ,912     ,907     ,901     ,884     ,867     ,\n    846     ,822     ,795     ,762     ,728     ,685     ,644     ,599     ,550     ,502     ,445     ,393     ,334     ,274     ,221     ,\n    160     ,101     ,40      ,-11     ,-69     ,-125    ,-177    ,-236    ,-286    ,-340    ,-389    ,-437    ,-477    ,-515    ,-559    ,\n    -588    ,-624    ,-648    ,-670    ,-698    ,-712    ,-726    ,-732    ,-736    ,-738    ,-734    ,-730    ,-720    ,-706    ,-688    ,\n    -664    ,-640    ,-609    ,-576    ,-547    ,-505    ,-470    ,-427    ,-382    ,-336    ,-285    ,-239    ,-185    ,-140    ,-83     ,\n    -39     ,6       ,66      ,113     ,166     ,214     ,264     ,311     ,357     ,400     ,443     ,484     ,519     ,554     ,584     ,\n    614     ,635     ,657     ,676     ,691     ,708     ,709     ,713     ,719     ,711     ,706     ,700     ,683     ,666     ,644     ,\n    625     ,600     ,570     ,539     ,501     ,475     ,436     ,390     ,351     ,304     ,262     ,214     ,168     ,123     ,76      ,\n    29      ,-11     ,-52     ,-102    ,-143    ,-188    ,-230    ,-267    ,-307    ,-342    ,-380    ,-411    ,-442    ,-466    ,-490    ,\n    -515    ,-526    ,-543    ,-555    ,-560    ,-573    ,-577    ,-575    ,-575    ,-561    ,-550    ,-538    ,-522    ,-506    ,-481    ,\n    -459    ,-434    ,-402    ,-377    ,-345    ,-308    ,-276    ,-238    ,-200    ,-158    ,-121    ,-82     ,-35     ,-8      ,28      ,\n    76      ,115     ,157     ,194     ,231     ,267     ,297     ,335     ,366     ,391     ,422     ,447     ,463     ,483     ,506     ,\n    519     ,528     ,538     ,549     ,556     ,557     ,555     ,556     ,546     ,536     ,522     ,516     ,501     ,477     ,463     ,\n    439     ,416     ,386     ,361     ,328     ,297     ,265     ,231     ,201     ,165     ,133     ,90      ,58      ,20      ,-10     ,\n    -38     ,-75     ,-109    ,-139    ,-167    ,-205    ,-233    ,-262    ,-285    ,-304    ,-330    ,-353    ,-370    ,-384    ,-397    ,\n    -407    ,-418    ,-426    ,-432    ,-432    ,-433    ,-431    ,-423    ,-417    ,-404    ,-392    ,-375    ,-363    ,-345    ,-321    ,\n    -302    ,-279    ,-255    ,-225    ,-199    ,-165    ,-135    ,-106    ,-72     ,-45     ,-13     ,10      ,45      ,78      ,106     ,\n    137     ,165     ,196     ,224     ,250     ,272     ,293     ,319     ,337     ,354     ,373     ,385     ,398     ,410     ,418     ,\n    422     ,428     ,432     ,431     ,429     ,422     ,418     ,410     ,400     ,385     ,374     ,360     ,338     ,323     ,301     ,\n    278     ,259     ,235     ,208     ,184     ,159     ,132     ,105     ,75      ,53      ,22      ,0       ,-16     ,-48     ,-73     ,\n    -100    ,-124    ,-141    ,-168    ,-191    ,-204    ,-225    ,-243    ,-258    ,-270    ,-277    ,-296    ,-304    ,-303    ,-317    ,\n    -321    ,-321    ,-320    ,-319    ,-313    ,-301    ,-301    ,-290    ,-276    ,-267    ,-254    ,-238    ,-221    ,-207    ,-189    ,\n    -169    ,-147    ,-124    ,-107    ,-81     ,-59     ,-36     ,-11     ,0       ,26      ,53      ,76      ,96      ,118     ,146     ,\n    164     ,188     ,205     ,224     ,244     ,257     ,271     ,285     ,296     ,310     ,320     ,324     ,331     ,332     ,339     ,\n    338     ,337     ,338     ,330     ,324     ,318     ,314     ,299     ,290     ,276     ,264     ,249     ,231     ,216     ,194     ,\n    181     ,158     ,135     ,118     ,98      ,73      ,52      ,32      ,8       ,-6      ,-25     ,-48     ,-64     ,-81     ,-107    ,\n    -121    ,-138    ,-156    ,-168    ,-187    ,-193    ,-204    ,-219    ,-224    ,-233    ,-239    ,-244    ,-248    ,-248    ,-249    ,\n    -247    ,-248    ,-244    ,-236    ,-231    ,-222    ,-216    ,-202    ,-190    ,-182    ,-170    ,-152    ,-135    ,-122    ,-105    ,\n    -91     ,-72     ,-55     ,-40     ,-18     ,-6      ,7       ,27      ,43      ,60      ,79      ,98      ,112     ,126     ,143     ,\n    157     ,172     ,181     ,194     ,206     ,212     ,224     ,232     ,233     ,244     ,246     ,246     ,250     ,250     ,250     ,\n    246     ,244     ,241     ,236     ,229     ,223     ,218     ,207     ,197     ,183     ,170     ,162     ,148     ,131     ,120     ,\n    104     ,92      ,74      ,57      ,47      ,28      ,12      ,1       ,-12     ,-23     ,-41     ,-54     ,-64     ,-80     ,-92     ,\n    -106    ,-110    ,-120    ,-135    ,-140    ,-148    ,-155    ,-160    ,-164    ,-167    ,-169    ,-170    ,-171    ,-169    ,-168    ,\n    -167    ,-164    ,-161    ,-156    ,-148    ,-139    ,-133    ,-123    ,-112    ,-103    ,-91     ,-81     ,-69     ,-57     ,-49     ,\n    -33     ,-20     ,-7      ,-1      ,7       ,26      ,39      ,50      ,62      ,75      ,85      ,98      ,105     ,114     ,125     ,\n    131     ,144     ,149     ,153     ,159     ,164     ,172     ,176     ,175     ,178     ,178     ,179     ,178     ,176     ,174     ,\n    173     ,172     ,163     ,157     ,149     ,146     ,141     ,128     ,122     ,115     ,102     ,96      ,86      ,75      ,66      ,\n    53      ,45      ,35      ,23      ,13      ,3       ,-1      ,-9      ,-21     ,-26     ,-38     ,-47     ,-54     ,-64     ,-71     ,\n    -77     ,-83     ,-90     ,-93     ,-97     ,-99     ,-103    ,-104    ,-105    ,-106    ,-106    ,-109    ,-106    ,-103    ,-102    ,\n    -98     ,-92     ,-91     ,-87     ,-82     ,-76     ,-69     ,-64     ,-52     ,-47     ,-42     ,-32     ,-24     ,-16     ,-5      ,\n    0       ,0       ,13      ,24      ,31      ,42      ,48      ,57      ,63      ,73      ,81      ,83      ,91      ,96      ,102     ,\n    108     ,112     ,116     ,121     ,124     ,124     ,125     ,125     ,126     ,125     ,125     ,124     ,124     ,120     ,117     ,\n    115     ,107     ,103     ,100     ,93      ,86      ,81      ,75      ,69      ,61      ,56      ,47      ,39      ,35      ,23      ,\n    16      ,8       ,2       ,-1      ,-6      ,-11     ,-20     ,-27     ,-35     ,-39     ,-42     ,-49     ,-54     ,-59     ,-59     ,\n    -64     ,-69     ,-69     ,-73     ,-74     ,-74     ,-76     ,-76     ,-75     ,-74     ,-73     ,-69     ,-67     ,-66     ,-60     ,\n    -56     ,-56     ,-51     ,-42     ,-38     ,-35     ,-31     ,-25     ,-19     ,-14     ,-5      ,0       ,-2      ,4       ,14      ,\n    18      ,25      ,32      ,35      ,41      ,48      ,52      ,57      ,62      ,66      ,68      ,72      ,76      ,79      ,82      ,\n    84      ,85      ,86      ,87      ,90      ,92      ,90      ,92      ,90      ,87      ,86      ,83      ,82      ,81      ,76      ,\n    72      ,70      ,64      ,62      ,58      ,53      ,48      ,42      ,39      ,32      ,29      ,26      ,16      ,13      ,8       ,\n    1       ,0       ,-2      ,-7      ,-13     ,-15     ,-21     ,-26     ,-28     ,-31     ,-34     ,-38     ,-40     ,-44     ,-44     ,\n    -44     ,-45     ,-45     ,-48     ,-48     ,-48     ,-47     ,-47     ,-45     ,-40     ,-40     ,-39     ,-38     ,-36     ,-32     ,\n    -28     ,-24     ,-23     ,-21     ,-17     ,-13     ,-10     ,-6      ,-4      ,0       ,0       ,0       ,5       ,9       ,10      ,\n    15      ,19      ,18      ,20      ,24      ,26      ,28      ,28      ,30      ,31      ,33      ,34      ,33      ,34      ,33      ,\n    34      ,34      ,34      ,35      ,34      ,33      ,32      ,29      ,30      ,28      ,26      ,26      ,24      ,23      ,22      ,\n    20      ,18      ,18      ,16      ,13      ,11      ,9       ,9       ,8       ,6       ,5       ,3       ,1       ,0       ,0       ,\n    0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,\n    0       ,0       ,0       ,0       ,0       ,0       ,336     ,-1323   ,-5148   ,-6704   ,-7890   ,-8279   ,-8377   ,-8486   ,-7852   ,\n    -8812   ,-10494  ,-9825   ,-7925   ,-11438  ,-12936  ,-9784   ,-8336   ,-4326   ,-5490   ,-6539   ,-5799   ,-3903   ,3404    ,8040    ,\n    2317    ,-5938   ,-2079   ,8731    ,24025   ,25510   ,13781   ,7794    ,6301    ,9008    ,21897   ,31897   ,26198   ,12096   ,4274    ,\n    9946    ,15750   ,19900   ,19507   ,14691   ,12856   ,22669   ,4726    ,-13112  ,372     ,2576    ,5544    ,-2883   ,9558    ,10154   ,\n    -9314   ,-13773  ,-22030  ,-4993   ,-3685   ,-13080  ,-6455   ,5560    ,198     ,-15600  ,-22898  ,-14650  ,-3258   ,61      ,14015   ,\n    -6716   ,-14853  ,-4034   ,-2471   ,12068   ,3609    ,-8219   ,-10344  ,-11294  ,-6181   ,-399    ,12834   ,21758   ,4728    ,-15037  ,\n    -14441  ,-7119   ,-2158   ,852     ,2589    ,273     ,-1154   ,-1134   ,-2748   ,-6641   ,-8439   ,591     ,-783    ,-16296  ,-20662  ,\n    -9442   ,-1853   ,-10384  ,-21699  ,-17064  ,-6748   ,-455    ,506     ,461     ,-897    ,-1299   ,-1668   ,349     ,19080   ,-2729   ,\n    -13425  ,6344    ,-5623   ,-42     ,9500    ,10205   ,8967    ,19462   ,29951   ,14040   ,2513    ,-3974   ,-3387   ,6628    ,15054   ,\n    18685   ,28403   ,24652   ,8843    ,-5671   ,-5930   ,10140   ,15334   ,19760   ,-2458   ,-971    ,9217    ,-5769   ,-3946   ,-2489   ,\n    14520   ,5488    ,-17316  ,-10051  ,-6798   ,-1219   ,1853    ,-3733   ,6492    ,-6545   ,-10634  ,-7020   ,-18056  ,-1538   ,-3336   ,\n    -8374   ,-12993  ,-17146  ,-6349   ,-354    ,2722    ,907     ,-329    ,146     ,-2077   ,1577    ,-558    ,-7596   ,-6150   ,-4659   ,\n    8486    ,5702    ,-12418  ,-6710   ,3446    ,-4169   ,-13796  ,-1277   ,13215   ,-7218   ,-10028  ,-731    ,-6687   ,100     ,-9725   ,\n    -7862   ,4254    ,-6768   ,-2656   ,11906   ,-2759   ,-15500  ,-8722   ,-3543   ,1032    ,2715    ,3390    ,1950    ,5865    ,16647   ,\n    6183    ,-9535   ,-2429   ,-6649   ,-4786   ,4492    ,14843   ,23710   ,3772    ,-1674   ,3921    ,8936    ,10898   ,10941   ,10542   ,\n    12390   ,22424   ,5395    ,-10433  ,-2487   ,6394    ,9232    ,6746    ,6684    ,19616   ,9659    ,-13439  ,-7817   ,-1540   ,3176    ,\n    3702    ,2057    ,1065    ,-1086   ,-1651   ,-4368   ,-3228   ,-5499   ,-3342   ,-6492   ,-16     ,8688    ,-8927   ,-12459  ,-4433   ,\n    -13855  ,-14471  ,-3646   ,-8626   ,-10708  ,-4243   ,6188    ,5845    ,-9997   ,-7859   ,1861    ,-5226   ,-1616   ,6690    ,-2850   ,\n    -12749  ,-4495   ,6033    ,-7618   ,-11929  ,-3893   ,721     ,4373    ,13223   ,7688    ,-13079  ,-14246  ,-5797   ,48      ,2766    ,\n    2268    ,1245    ,1033    ,-1456   ,9910    ,7711    ,-14343  ,-10443  ,2805    ,2021    ,-2725   ,-343    ,3183    ,2779    ,5458    ,\n    4473    ,11858   ,13303   ,-9631   ,-11468  ,-464    ,5800    ,13575   ,9427    ,77      ,9817    ,15364   ,-1096   ,-6370   ,5112    ,\n    18572   ,10538   ,-224    ,-2736   ,-5581   ,9364    ,11106   ,2159    ,7024    ,4911    ,-3422   ,-7022   ,98      ,5793    ,8412    ,\n    -626    ,-3357   ,-1106   ,-174    ,13383   ,-4509   ,-6933   ,-5130   ,-12062  ,-3532   ,-9250   ,-2495   ,-110    ,-4982   ,-6832   ,\n    -4231   ,-3700   ,-1588   ,-1724   ,-1977   ,5072    ,-13873  ,-8194   ,2555    ,-13702  ,-6062   ,430     ,-7722   ,-5762   ,-3168   ,\n    2870    ,11674   ,-1393   ,-13494  ,-8278   ,6418    ,2391    ,-7743   ,6470    ,3220    ,-9505   ,-6067   ,-576    ,1291    ,2067    ,\n    3675    ,5470    ,3414    ,-4055   ,778     ,12436   ,291     ,-13458  ,1282    ,8334    ,-3643   ,-5255   ,1345    ,3134    ,12498   ,\n    15357   ,-3423   ,-8952   ,-2910   ,3856    ,6413    ,11823   ,8121    ,-1184   ,7321    ,3982    ,3367    ,1840    ,-4176   ,-2915   ,\n    6628    ,11610   ,4812    ,3441    ,-5361   ,-44     ,11010   ,7292    ,-3016   ,-2500   ,8904    ,1168    ,-3584   ,1396    ,2024    ,\n    -3168   ,-5383   ,2781    ,4108    ,-2317   ,-8328   ,-7032   ,-1996   ,-986    ,5070    ,5433    ,-9214   ,-11099  ,-6260   ,-3248   ,\n    7197    ,2088    ,-12377  ,-12411  ,-7289   ,-2923   ,-768    ,-2083   ,-990    ,-594    ,4289    ,-1235   ,-7891   ,-2588   ,-10624  ,\n    -8762   ,3706    ,-40     ,-5205   ,4445    ,7749    ,-2835   ,-7787   ,-6258   ,3932    ,7743    ,1269    ,-6646   ,-4193   ,6650    ,\n    3478    ,3789    ,-771    ,-5173   ,-1922   ,2210    ,11101   ,4626    ,1755    ,2057    ,137     ,797     ,-770    ,-2389   ,-981    ,\n    9415    ,9930    ,570     ,-4235   ,-1152   ,2932    ,6387    ,7915    ,2846    ,974     ,3028    ,4197    ,8367    ,5389    ,-6180   ,\n    -4635   ,451     ,3029    ,4385    ,3287    ,3967    ,2542    ,7496    ,7067    ,-5447   ,-8428   ,-4730   ,-2855   ,2391    ,837     ,\n    3465    ,6829    ,245     ,-1124   ,-5586   ,-7838   ,-7234   ,-3246   ,-873    ,-664    ,144     ,372     ,4498    ,-4210   ,-10855  ,\n    -6741   ,-1529   ,2470    ,3557    ,-4653   ,-11817  ,-10074  ,-4148   ,-1370   ,686     ,7184    ,-945    ,-8311   ,-4728   ,4839    ,\n    -461    ,-7001   ,-3679   ,469     ,4236    ,1208    ,2512    ,-3496   ,-3010   ,-4856   ,1242    ,6376    ,-2853   ,-3650   ,-1290   ,\n    6209    ,2222    ,5940    ,5451    ,-3614   ,-1231   ,1377    ,7455    ,3521    ,2014    ,2833    ,-4193   ,-3297   ,524     ,4659    ,\n    7318    ,3349    ,1726    ,1971    ,2708    ,5852    ,2714    ,1361    ,5140    ,-964    ,-5377   ,-299    ,1558    ,3927    ,2762    ,\n    6505    ,10365   ,-1186   ,-4194   ,-5303   ,-4939   ,152     ,4564    ,10650   ,-455    ,-7461   ,-3789   ,-1101   ,4756    ,1998    ,\n    -2722   ,-2646   ,-931    ,-1198   ,1520    ,12      ,-4173   ,-3076   ,-3108   ,5152    ,759     ,-11107  ,-6706   ,-2145   ,-1726   ,\n    -2004   ,-491    ,-2000   ,-3210   ,-285    ,-2816   ,2290    ,2715    ,-6939   ,-8231   ,-6338   ,-2376   ,22      ,886     ,482     ,\n    1187    ,1429    ,4856    ,585     ,-9470   ,-6266   ,-1536   ,1601    ,2149    ,4206    ,8897    ,2514    ,-6006   ,-1248   ,-2038   ,\n    -3765   ,1188    ,2845    ,4269    ,3790    ,4101    ,2515    ,1340    ,2854    ,7242    ,1008    ,-5496   ,-430    ,1840    ,4441    ,\n    719     ,5666    ,7805    ,1553    ,73      ,-5146   ,-4745   ,-263    ,8850    ,4323    ,1359    ,3469    ,-1105   ,2307    ,-1423   ,\n    -1828   ,-1452   ,810     ,8531    ,2855    ,-2627   ,-1246   ,-491    ,-310    ,-202    ,-2332   ,-4288   ,-1304   ,-691    ,1187    ,\n    112     ,2085    ,5436    ,-3845   ,-6662   ,-4282   ,1856    ,3941    ,-3572   ,-3872   ,-2365   ,-6366   ,-4153   ,-946    ,938     ,\n    2243    ,-2850   ,-3357   ,-1575   ,-671    ,-1967   ,-2530   ,-3846   ,-5386   ,-2390   ,-130    ,1129    ,960     ,955     ,1246    ,\n    -586    ,1770    ,3662    ,-2807   ,-6608   ,-5017   ,81      ,2120    ,2780    ,3189    ,2313    ,4127    ,-926    ,-5234   ,1107    ,\n    3400    ,975     ,3768    ,1750    ,694     ,2552    ,287     ,1267    ,876     ,-1716   ,-687    ,1140    ,6838    ,5899    ,-681    ,\n    -350    ,1157    ,2193    ,2065    ,7543    ,3187    ,-2718   ,474     ,-3564   ,-1731   ,971     ,1714    ,3108    ,1577    ,4961    ,\n    3424    ,-1702   ,-794    ,-4128   ,-5532   ,2529    ,4311    ,394     ,-716    ,-5257   ,-2946   ,3374    ,-892    ,-2917   ,-320    ,\n    3006    ,3474    ,-2531   ,-6447   ,-5630   ,-1469   ,-765    ,1178    ,517     ,224     ,3315    ,-3380   ,-3617   ,-2343   ,-3399   ,\n    -3222   ,-1414   ,-486    ,-3663   ,-2006   ,-843    ,3814    ,3160    ,-4140   ,-4758   ,-1830   ,-1008   ,363     ,2905    ,2456    ,\n    -3018   ,-3912   ,3192    ,137     ,-1384   ,2470    ,1170    ,-1523   ,-2866   ,-1536   ,1536    ,5279    ,2523    ,-1446   ,1225    ,\n    5699    ,3861    ,-2020   ,-3699   ,-1398   ,1456    ,2893    ,2758    ,3004    ,1732    ,3057    ,5479    ,-218    ,-3386   ,2946    ,\n    2320    ,-1921   ,3185    ,3282    ,-608    ,-1181   ,-334    ,-185    ,-1366   ,896     ,1908    ,1804    ,6504    ,3645    ,-3204   ,\n    -3828   ,-3760   ,-1249   ,537     ,1305    ,864     ,1080    ,-158    ,2137    ,1695    ,-3863   ,-315    ,-40     ,-3642   ,-5390   ,\n    -132    ,2246    ,-1578   ,-3144   ,-3321   ,750     ,-867    ,385     ,3020    ,-2809   ,-4884   ,-405    ,1969    ,-661    ,-2410   ,\n    -2630   ,-2743   ,-3401   ,-1663   ,185     ,975     ,2174    ,-612    ,-1719   ,-1279   ,-353    ,240     ,1       ,3631    ,778     ,\n    -1680   ,449     ,-3929   ,-2345   ,3085    ,934     ,-343    ,-821    ,934     ,2754    ,-664    ,-1101   ,688     ,1588    ,2255    ,\n    1989    ,1780    ,1622    ,1130    ,4740    ,1795    ,-2630   ,2277    ,538     ,-2527   ,345     ,1260    ,2553    ,3392    ,515     ,\n    -206    ,756     ,3382    ,1276    ,-2104   ,-794    ,3102    ,3015    ,-2849   ,-1192   ,-464    ,1378    ,2255    ,1419    ,2621    ,\n    -1266   ,-4496   ,-2888   ,1894    ,553     ,-1277   ,-1278   ,1397    ,2613    ,-2578   ,-2683   ,-2129   ,-28     ,2247    ,-1321   ,\n    -3929   ,-1005   ,1511    ,-1810   ,-2859   ,-1042   ,-443    ,-194    ,-689    ,542     ,2781    ,476     ,-2798   ,-3528   ,-5240   ,\n    -2354   ,2583    ,-322    ,-2354   ,-845    ,-358    ,733     ,4       ,1551    ,2841    ,564     ,-1278   ,-3524   ,-3053   ,1574    ,\n    1423    ,-732    ,2512    ,1585    ,-91     ,-2115   ,-2329   ,1535    ,913     ,3655    ,3179    ,-1342   ,-1961   ,942     ,3801    ,\n    351     ,-1001   ,852     ,1894    ,2490    ,2782    ,1986    ,250     ,-812    ,-563    ,422     ,-620    ,-989    ,679     ,1991    ,\n    2650    ,1127    ,902     ,3813    ,1125    ,-3036   ,-1515   ,59      ,1014    ,534     ,394     ,1940    ,101     ,-986    ,-1681   ,\n    1238    ,2417    ,-1988   ,-868    ,316     ,-1919   ,-3568   ,-1853   ,-572    ,2690    ,2133    ,-1533   ,196     ,-1310   ,-2051   ,\n    -1429   ,-2106   ,-1245   ,-1501   ,-1488   ,-375    ,6       ,316     ,-267    ,2337    ,643     ,-3669   ,-2911   ,-49     ,2702    ,\n    -2314   ,-2945   ,-1448   ,719     ,3005    ,-1077   ,-300    ,-845    ,-784    ,-64     ,-683    ,458     ,111     ,174     ,-193    ,\n    -985    ,-1013   ,382     ,1137    ,2337    ,3559    ,913     ,-261    ,652     ,-360    ,-387    ,-929    ,-609    ,1324    ,3528    ,\n    2181    ,-1245   ,535     ,2067    ,1045    ,92      ,98      ,-913    ,1009    ,1584    ,1755    ,1855    ,-1125   ,879     ,1430    ,\n    124     ,-1201   ,-956    ,272     ,1893    ,2085    ,-326    ,-373    ,1401    ,1170    ,-1162   ,-397    ,9       ,-509    ,-549    ,\n    -1349   ,-2421   ,442     ,1850    ,132     ,-581    ,-1582   ,241     ,-706    ,-2363   ,-1538   ,-323    ,28      ,-133    ,-72     ,\n    -379    ,-298    ,-722    ,1581    ,1021    ,-1529   ,-2641   ,-3652   ,-1752   ,-517    ,512     ,357     ,1067    ,2441    ,-1137   ,\n    -3104   ,-2174   ,-330    ,2661    ,1048    ,-2207   ,-1437   ,-583    ,1357    ,3289    ,172     ,-1780   ,-1595   ,-1129   ,1       ,\n    822     ,1197    ,1270    ,2326    ,1838    ,29      ,-1781   ,-262    ,2408    ,1507    ,-769    ,-1699   ,-256    ,1048    ,1018    ,\n    1392    ,3560    ,2151    ,-1841   ,-1558   ,-180    ,1108    ,2954    ,1796    ,282     ,-1070   ,-593    ,1257    ,108     ,-537    ,\n    -741    ,1219    ,2648    ,-304    ,-1196   ,1136    ,-157    ,-845    ,1422    ,527     ,-1135   ,-2179   ,-386    ,1339    ,87      ,\n    -709    ,-239    ,804     ,223     ,-1613   ,-1892   ,-1173   ,893     ,1736    ,-951    ,-2465   ,-1675   ,1090    ,245     ,-1101   ,\n    848     ,-1382   ,-2315   ,-143    ,221     ,187     ,-1439   ,-1673   ,334     ,869     ,-441    ,-772    ,276     ,-1138   ,-1393   ,\n    -265    ,936     ,1329    ,-22     ,-1198   ,-523    ,321     ,-953    ,670     ,1793    ,333     ,-676    ,-402    ,716     ,155     ,\n    -445    ,-153    ,649     ,808     ,992     ,1169    ,1871    ,1561    ,-1285   ,-456    ,991     ,260     ,509     ,-211    ,-722    ,\n    447     ,678     ,1211    ,1981    ,1482    ,842     ,-797    ,-1345   ,49      ,366     ,1278    ,2616    ,-178    ,-973    ,1194    ,\n    334     ,-1512   ,-833    ,1292    ,449     ,-919    ,-36     ,646     ,472     ,-223    ,-1551   ,-1039   ,-245    ,217     ,240     ,\n    184     ,71      ,75      ,1822    ,-563    ,-2803   ,-1808   ,-824    ,8       ,97      ,-132    ,-469    ,119     ,172     ,91      ,\n    -807    ,-1748   ,-1088   ,434     ,1513    ,-112    ,-2452   ,-1378   ,938     ,-388    ,-1292   ,27      ,783     ,480     ,-339    ,\n    -1042   ,-1207   ,-245    ,306     ,651     ,554     ,516     ,339     ,267     ,251     ,110     ,2206    ,1558    ,-706    ,-1671   ,\n    -2012   ,-498    ,661     ,1654    ,936     ,366     ,587     ,363     ,1728    ,1103    ,-648    ,-522    ,188     ,390     ,918     ,\n    464     ,1145    ,2540    ,53      ,-1562   ,-1193   ,-130    ,122     ,1717    ,1664    ,-501    ,-168    ,-664    ,24      ,806     ,\n    1371    ,-285    ,-676    ,32      ,-1300   ,-300    ,266     ,228     ,42      ,559     ,172     ,778     ,701     ,-1596   ,-1852   ,\n    -1104   ,-387    ,196     ,1864    ,181     ,-1757   ,-1589   ,-434    ,1568    ,304     ,-910    ,-1568   ,-1894   ,-757    ,-132    ,\n    324     ,1534    ,318     ,-1356   ,-783    ,727     ,637     ,-1497   ,-634    ,-438    ,-170    ,1       ,24      ,638     ,-799    ,\n    29      ,-635    ,228     ,1149    ,-481    ,-555    ,548     ,1555    ,-243    ,136     ,-23     ,-802    ,5       ,361     ,749     ,\n    643     ,1011    ,964     ,572     ,-594    ,-454    ,241     ,1076    ,1798    ,-30     ,-1070   ,-206    ,1432    ,509     ,-259    ,\n    763     ,-55     ,49      ,454     ,25      ,121     ,382     ,309     ,98      ,-120    ,325     ,-149    ,-286    ,923     ,-166    ,\n    -598    ,-146    ,275     ,1088    ,728     ,202     ,-493    ,-786    ,-1003   ,-1183   ,-336    ,-31     ,491     ,1572    ,418     ,\n    -752    ,-831    ,-1511   ,-1081   ,-637    ,184     ,1084    ,141     ,-832    ,-387    ,751     ,-288    ,-1418   ,-1208   ,43      ,\n    1055    ,30      ,-958    ,-991    ,-347    ,158     ,-115    ,340     ,1320    ,-526    ,-492    ,58      ,-972    ,-292    ,-261    ,\n    58      ,516     ,1284    ,862     ,-216    ,-1078   ,-669    ,904     ,165     ,-273    ,-147    ,168     ,501     ,600     ,580     ,\n    513     ,598     ,731     ,1416    ,425     ,-721    ,-570    ,-198    ,653     ,-174    ,-19     ,930     ,136     ,631     ,669     ,\n    327     ,194     ,11      ,-252    ,-646    ,-78     ,346     ,530     ,509     ,389     ,255     ,282     ,202     ,-140    ,-159    ,\n    1033    ,273     ,-1413   ,-913    ,-532    ,115     ,-22     ,766     ,801     ,-857    ,-226    ,-73     ,-466    ,-353    ,-704    ,\n    -542    ,-377    ,-837    ,-424    ,-153    ,522     ,1276    ,74      ,-618    ,-693    ,-785    ,-302    ,-224    ,-716    ,-554    ,\n    -168    ,261     ,735     ,93      ,-452    ,1       ,265     ,475     ,457     ,-675    ,-1161   ,-466    ,35      ,104     ,271     ,\n    261     ,226     ,1131    ,1158    ,-604    ,-941    ,143     ,43      ,-166    ,53      ,1174    ,1244    ,-122    ,-352    ,-198    ,\n    371     ,433     ,190     ,-87     ,-97     ,48      ,51      ,434     ,514     ,654     ,486     ,536     ,327     ,55      ,58      ,\n    0       ,-43     ,52      ,201     ,132     ,785     ,728     ,301     ,-109    ,-624    ,-1053   ,-296    ,203     ,21      ,713     ,\n    -193    ,-49     ,-132    ,-664    ,-208    ,-118    ,900     ,504     ,-253    ,-298    ,-585    ,-431    ,-536    ,-434    ,41      ,\n    -16     ,21      ,-150    ,-697    ,-339    ,319     ,28      ,-179    ,-298    ,-815    ,122     ,513     ,-510    ,-615    ,-142    ,\n    67      ,138     ,-159    ,196     ,800     ,-468    ,-767    ,-288    ,-14     ,119     ,366     ,1079    ,-244    ,-165    ,98      ,\n    -417    ,12      ,-543    ,351     ,600     ,148     ,467     ,-85     ,-36     ,614     ,320     ,-195    ,166     ,79      ,-119    ,\n    245     ,384     ,412     ,1012    ,863     ,35      ,-412    ,-541    ,-317    ,493     ,894     ,248     ,187     ,-139    ,-515    ,\n    -240    ,141     ,216     ,944     ,823     ,-344    ,169     ,-52     ,-626    ,-670    ,-183    ,837     ,499     ,-62     ,-315    ,\n    -700    ,-187    ,342     ,99      ,-39     ,-707    ,-233    ,479     ,-225    ,-342    ,-20     ,485     ,-354    ,-503    ,198     ,\n    -489    ,-485    ,-133    ,-192    ,-201    ,560     ,520     ,-341    ,-288    ,-408    ,-712    ,-109    ,462     ,-26     ,-205    ,\n    0       ,-56     ,-73     ,-116    ,-351    ,-384    ,97      ,153     ,276     ,895     ,189     ,-564    ,-243    ,-83     ,189     ,\n    145     ,681     ,547     ,-221    ,213     ,-166    ,-113    ,-78     ,46      ,887     ,473     ,-247    ,-413    ,-13     ,571     ,\n    599     ,-218    ,-15     ,493     ,271     ,333     ,-31     ,5       ,-98     ,-130    ,318     ,-45     ,354     ,635     ,26      ,\n    -369    ,-320    ,473     ,731     ,-68     ,-328    ,75      ,-317    ,17      ,136     ,-351    ,-249    ,35      ,696     ,-30     ,\n    -273    ,191     ,-97     ,-352    ,-624    ,-40     ,457     ,20      ,-129    ,-189    ,-538    ,-100    ,-247    ,-360    ,185     ,\n    41      ,-138    ,-382    ,215     ,262     ,-172    ,-306    ,-516    ,-376    ,-180    ,521     ,467     ,14      ,-464    ,-244    ,\n    139     ,-48     ,208     ,49      ,-17     ,-9      ,-233    ,-121    ,237     ,-26     ,-109    ,501     ,428     ,95      ,50      ,\n    -41     ,18      ,-182    ,5       ,291     ,-6      ,99      ,187     ,806     ,546     ,-20     ,-68     ,-262    ,353     ,72      ,\n    -102    ,-40     ,194     ,710     ,160     ,-320    ,-4      ,258     ,244     ,350     ,-162    ,102     ,481     ,-19     ,-90     ,\n    -187    ,-158    ,-67     ,-110    ,60      ,355     ,284     ,-43     ,-323    ,-273    ,159     ,277     ,42      ,-43     ,-223    ,\n    -496    ,-258    ,-102    ,323     ,279     ,-142    ,140     ,-88     ,-131    ,-145    ,-288    ,-198    ,-191    ,-335    ,-321    ,\n    -108    ,129     ,628     ,145     ,-383    ,-283    ,-338    ,-185    ,-66     ,54      ,57      ,69      ,55      ,9       ,424     ,\n    264     ,-408    ,-373    ,-181    ,51      ,513     ,332     ,-313    ,-347    ,232     ,63      ,-7      ,225     ,-132    ,-94     ,\n    -5      ,490     ,720     ,204     ,-57     ,-113    ,-21     ,-79     ,88      ,325     ,285     ,168     ,97      ,15      ,53      ,\n    -37     ,180     ,451     ,-111    ,178     ,218     ,44      ,278     ,-40     ,161     ,-37     ,-258    ,-132    ,222     ,429     ,\n    164     ,69      ,-282    ,-287    ,-81     ,398     ,195     ,-256    ,178     ,-74     ,-116    ,-2      ,-331    ,-77     ,0       ,\n    -117    ,40      ,44      ,-226    ,-200    ,95      ,-257    ,-288    ,-135    ,124     ,332     ,-195    ,54      ,38      ,-342    ,\n    -347    ,2       ,392     ,47      ,-86     ,-302    ,-186    ,36      ,-36     ,-188    ,-196    ,292     ,190     ,-58     ,-108    ,\n    -31     ,196     ,234     ,-19     ,-208    ,-103    ,-6      ,83      ,138     ,182     ,177     ,181     ,217     ,275     ,327     ,\n    121     ,-349    ,-176    ,169     ,55      ,-3      ,-100    ,-79     ,129     ,190     ,276     ,672     ,241     ,-163    ,152     ,\n    22      ,-161    ,-287    ,-123    ,312     ,247     ,12      ,144     ,180     ,22      ,189     ,299     ,-101    ,-339    ,-319    ,\n    -71     ,72      ,163     ,484     ,191     ,-363    ,-232    ,206     ,-6      ,-53     ,-52     ,-169    ,-46     ,-43     ,-39     ,\n    -270    ,-76     ,156     ,36      ,-154    ,-163    ,1       ,-93     ,-39     ,-116    ,-255    ,-181    ,186     ,264     ,-149    ,\n    -28     ,6       ,-30     ,-111    ,-287    ,-204    ,-55     ,384     ,214     ,-205    ,-129    ,-43     ,105     ,427     ,145     ,\n    -166    ,-22     ,-35     ,85      ,0       ,-18     ,11      ,71      ,64      ,-4      ,141     ,109     ,-87     ,101     ,360     ,\n    96      ,131     ,-22     ,13      ,210     ,-51     ,-2      ,78      ,116     ,413     ,472     ,-95     ,-280    ,-126    ,67      ,\n    481     ,161     ,-194    ,123     ,102     ,-45     ,-27     ,-48     ,-14     ,-99     ,-89     ,-20     ,167     ,469     ,115     ,\n    -217    ,-52     ,4       ,-116    ,-294    ,-14     ,262     ,59      ,-234    ,-134    ,100     ,-112    ,-197    ,-47     ,84      ,\n    235     ,124     ,-117    ,-167    ,-177    ,-135    ,-204    ,-78     ,202     ,-70     ,-197    ,97      ,154     ,-142    ,-221    ,\n    -102    ,-13     ,68      ,44      ,320     ,359     ,-29     ,-200    ,-198    ,-232    ,-131    ,107     ,120     ,155     ,94      ,\n    -138    ,-76     ,-13     ,179     ,470     ,183     ,-51     ,-88     ,-145    ,30      ,135     ,55      ,-51     ,108     ,271     ,\n    158     ,59      ,-40     ,-127    ,-18     ,54      ,134     ,167     ,268     ,443     ,70      ,-234    ,-141    ,15      ,24      ,\n    212     ,427     ,125     ,-71     ,-112    ,-174    ,-154    ,-22     ,23      ,306     ,360     ,-98     ,-20     ,-4      ,-227    ,\n    99      ,202     ,-95     ,-10     ,6       ,-54     ,-105    ,-200    ,-85     ,-5      ,-2      ,76      ,273     ,136     ,-203    ,\n    -310    ,-228    ,69      ,155     ,56      ,-7      ,-124    ,-71     ,-142    ,-129    ,31      ,-106    ,-118    ,22      ,84      ,\n    68      ,119     ,193     ,-49     ,-218    ,45      ,172     ,13      ,-56     ,-196    ,-139    ,-10     ,98      ,376     ,200     ,\n    -117    ,-22     ,216     ,52      ,-45     ,37      ,108     ,124     ,-80     ,43      ,88      ,77      ,111     ,49      ,10      ,\n    27      ,65      ,-57     ,-25     ,67      ,111     ,146     ,115     ,104     ,69      ,75      ,256     ,111     ,-135    ,-115    ,\n    -70     ,203     ,233     ,46      ,-141    ,-158    ,101     ,6       ,-66     ,-127    ,-18     ,316     ,73      ,-70     ,25      ,\n    7       ,-5      ,-126    ,-39     ,41      ,54      ,95      ,-30     ,-78     ,-122    ,-80     ,-64     ,138     ,265     ,-70     ,\n    -51     ,-10     ,-22     ,-41     ,-64     ,29      ,-7      ,-51     ,-36     ,-39     ,-95     ,35      ,28      ,3       ,37      ,\n    4       ,-22     ,-72     ,35      ,51      ,64      ,-8      ,-100    ,71      ,57      ,14      ,81      ,33      ,-57     ,-96     ,\n    33      ,65      ,173     ,224     ,32      ,32      ,-27     ,-4      ,93      ,-3      ,3       ,88      ,113     ,-14     ,-38     ,\n    147     ,59      ,19      ,89      ,134     ,262     ,113     ,-8      ,-43     ,-39     ,-7      ,32      ,11      ,-18     ,107     ,\n    -4      ,43      ,142     ,-35     ,-20     ,102     ,-40     ,-53     ,66      ,-33     ,27      ,-30     ,-83     ,13      ,-12     ,\n    55      ,-40     ,-55     ,109     ,-24     ,-61     ,-27     ,-30     ,-65     ,-152    ,67      ,29      ,7       ,32      ,-48     ,\n    37      ,-13     ,-38     ,-116    ,4       ,20      ,-88     ,-67     ,44      ,229     ,8       ,-51     ,13      ,-57     ,-41     ,\n    -46     ,144     ,200     ,-31     ,-79     ,66      ,114     ,-14     ,-122    ,-82     ,9       ,48      ,88      ,76      ,93      ,\n    71      ,142     ,286     ,19      ,-201    ,-73     ,102     ,48      ,27      ,41      ,-50     ,75      ,88      ,35      ,17      ,\n    3       ,92      ,49      ,31      ,0       ,16      ,108     ,68      ,107     ,25      ,-89     ,58      ,169     ,-8      ,-35     ,\n    77      ,-10     ,24      ,-30     ,-16     ,140     ,48      ,2       ,-25     ,-111    ,-53     ,-14     ,24      ,12      ,94      ,\n    221     ,56      ,-87     ,-118    ,-89     ,-46     ,-53     ,-99     ,-81     ,-20     ,103     ,112     ,-25     ,-45     ,-105    ,\n    -105    ,-99     ,11      ,117     ,-35     ,-69     ,23      ,77      ,104     ,-19     ,-80     ,-24     ,-82     ,5       ,0       ,\n    22      ,152     ,113     ,15      ,-61     ,11      ,11      ,55      ,53      ,36      ,88      ,-27     ,-29     ,155     ,132     ,\n    -16     ,124     ,98      ,-56     ,42      ,72      ,2       ,25      ,27      ,84      ,259     ,141     ,-87     ,-37     ,57      ,\n    15      ,-45     ,29      ,74      ,26      ,-20     ,-49     ,127     ,82      ,-10     ,63      ,-20     ,-4      ,30      ,7       ,\n    -28     ,8       ,29      ,-17     ,-69     ,-62     ,10      ,25      ,182     ,137     ,-56     ,30      ,-2      ,-70     ,-30     ,\n    -24     ,24      ,13      ,1       ,-59     ,-1      ,35      ,-55     ,83      ,71      ,-30     ,-15     ,53      ,67      ,-46     ,\n    -10     ,-18     ,-90     ,-52     ,-6      ,35      ,41      ,51      ,56      ,98      ,159     ,-11     ,-173    ,-98     ,-61     ,\n    68      ,174     ,76      ,-32     ,-98     ,-82     ,-9      ,159     ,147     ,-29     ,-79     ,-27     ,0       ,144     ,239     ,\n    47      ,-17     ,-18     ,-7      ,3       ,22      ,10      ,-8      ,17      ,38      ,187     ,171     ,61      ,-8      ,24      ,\n    51      ,-38     ,-26     ,60      ,157     ,78      ,-31     ,38      ,53      ,11      ,10      ,-65     ,-3      ,103     ,58      ,\n    15      ,-65     ,-51     ,1       ,14      ,46      ,26      ,119     ,141     ,-49     ,-129    ,-45     ,83      ,-12     ,-68     ,\n    -9      ,-57     ,-27     ,-44     ,-38     ,-14     ,18      ,19      ,132     ,184     ,-16     ,-38     ,-89     ,-49     ,-14     ,\n    -40     ,87      ,79      ,15      ,-18     ,-27     ,30      ,84      ,41      ,45      ,22      ,-6      ,17      ,6       ,42      ,\n    35      ,42      ,25      ,-23     ,7       ,66      ,94      ,61      ,-22     ,-48     ,-2      ,29      ,52      ,59      ,59      ,\n    56      ,146     ,157     ,-27     ,-124    ,-104    ,-2      ,131     ,100     ,20      ,-7      ,-4      ,-2      ,-43     ,-26     ,\n    10      ,73      ,50      ,116     ,175     ,-9      ,-83     ,-47     ,-5      ,39      ,155     ,117     ,-20     ,-72     ,-34     ,\n    101     ,80      ,2       ,-56     ,-85     ,-34     ,13      ,34      ,160     ,162     ,-18     ,-106    ,-82     ,28      ,57      ,\n    3       ,-63     ,-63     ,2       ,21      ,1       ,-2      ,5       ,36      ,18      ,-5      ,-16     ,-12     ,127     ,99      ,\n    -56     ,-77     ,-81     ,-83     ,-41     ,-42     ,47      ,90      ,-13     ,-39     ,-2      ,116     ,130     ,11      ,-61     ,\n    -26     ,31      ,57      ,16      ,12      ,49      ,-3      ,-23     ,10      ,38      ,71      ,201     ,128     ,-41     ,-71     ,\n    42      ,126     ,32      ,37      ,-20     ,-43     ,2       ,-3      ,3       ,-3      ,2       ,-1      ,1       ,0       ,0       ,\n    0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,-1293   ,878     ,\n    -292    ,-2564   ,9621    ,-5915   ,-7462   ,10982   ,3235    ,-15809  ,7820    ,10448   ,-16255  ,3586    ,8816    ,-3665   ,-7449   ,\n    10026   ,328     ,-9978   ,5127    ,1963    ,-1122   ,-4484   ,3911    ,1668    ,-1079   ,129     ,624     ,271     ,-1971   ,2723    ,\n    -736    ,-1222   ,-2121   ,1557    ,1953    ,-1284   ,1089    ,-461    ,-4676   ,7343    ,1620    ,-7741   ,3067    ,472     ,6971    ,\n    -9033   ,-3787   ,6347    ,3132    ,-3094   ,-4936   ,15374   ,-15151  ,-3045   ,15408   ,-6537   ,-5558   ,4063    ,3305    ,-4595   ,\n    6897    ,-3822   ,-7488   ,9726    ,2169    ,-10064  ,6545    ,-152    ,-2581   ,2638    ,-5205   ,11143   ,-10009  ,1541    ,6107    ,\n    -9761   ,8932    ,-2294   ,-4117   ,5229    ,-2477   ,-1675   ,1626    ,2250    ,5853    ,-15235  ,6472    ,9561    ,-15219  ,10362   ,\n    -836    ,-7556   ,7298    ,2009    ,-5862   ,475     ,4584    ,-5547   ,2030    ,1408    ,-278    ,222     ,-1416   ,7407    ,-9220   ,\n    -2423   ,8670    ,-1749   ,-1593   ,-710    ,5556    ,-7619   ,4599    ,7411    ,-17050  ,7709    ,6510    ,-10617  ,6782    ,506     ,\n    -6904   ,8104    ,424     ,-7828   ,5333    ,-29     ,-1819   ,-578    ,651     ,5638    ,-8332   ,6065    ,3981    ,-14323  ,9370    ,\n    3735    ,-8677   ,5128    ,-321    ,-3506   ,2618    ,5257    ,-6410   ,-843    ,7135    ,-8164   ,3732    ,905     ,-1208   ,-1572   ,\n    699     ,7940    ,-10072  ,166     ,7139    ,-4584   ,1390    ,624     ,-774    ,6157    ,-8939   ,-43     ,4118    ,-2170   ,4305    ,\n    -7243   ,4001    ,6293    ,-9773   ,861     ,8125    ,-4389   ,-3402   ,3772    ,63      ,-1659   ,-80     ,-584    ,7067    ,-3588   ,\n    -8293   ,7627    ,3825    ,-7807   ,1823    ,6699    ,-8428   ,2383    ,1020    ,1596    ,527     ,-8341   ,10361   ,-1437   ,-7787   ,\n    6634    ,-1777   ,3438    ,-690    ,-5484   ,2849    ,-74     ,5542    ,-7924   ,2596    ,6577    ,-8251   ,1512    ,-1038   ,7238    ,\n    -4249   ,-6288   ,10001   ,-2341   ,-6252   ,4869    ,4886    ,-8610   ,879     ,8165    ,-7708   ,174     ,5487    ,-4586   ,506     ,\n    216     ,3300    ,-1234   ,-5016   ,6475    ,-2277   ,-440    ,-795    ,328     ,1477    ,-67     ,4266    ,-7986   ,2961    ,241     ,\n    -507    ,3480    ,-5081   ,730     ,4887    ,-2246   ,-1516   ,2689    ,-5975   ,7762    ,-2181   ,-4428   ,5118    ,-5027   ,5028    ,\n    910     ,-5073   ,3477    ,1108    ,-4022   ,-189    ,5829    ,-1572   ,-6169   ,5036    ,1540    ,-3917   ,5770    ,-2167   ,-5270   ,\n    5015    ,-458    ,-2771   ,2526    ,3978    ,-6240   ,-487    ,5530    ,-2827   ,-1699   ,4082    ,-9      ,-5252   ,4945    ,-2332   ,\n    -1258   ,2294    ,312     ,681     ,-3344   ,7547    ,-7504   ,-982    ,9815    ,-9920   ,1108    ,5699    ,-1427   ,-6117   ,5889    ,\n    2615    ,-8914   ,7640    ,-2098   ,-4024   ,4110    ,2567    ,-4859   ,115     ,5977    ,-6344   ,-283    ,3197    ,867     ,-3468   ,\n    4573    ,-1722   ,-5871   ,8818    ,-4224   ,-3260   ,6489    ,-1004   ,-5421   ,3295    ,4668    ,-7083   ,2084    ,3713    ,-5802   ,\n    2562    ,1633    ,877     ,-4283   ,2265    ,3596    ,-6236   ,5643    ,-5089   ,1612    ,3427    ,-4176   ,1518    ,-1680   ,6600    ,\n    -6633   ,-688    ,4694    ,-1657   ,-820    ,-170    ,6263    ,-10415  ,4180    ,5002    ,-7890   ,3201    ,2329    ,-342    ,-4491   ,\n    5855    ,-870    ,-4082   ,2022    ,1623    ,475     ,-3321   ,3349    ,-3905   ,4322    ,1652    ,-6876   ,3607    ,3195    ,-3055   ,\n    -2586   ,6862    ,-4203   ,-1703   ,4421    ,-3926   ,1210    ,1289    ,758     ,-1859   ,-349    ,4795    ,-6382   ,3008    ,3099    ,\n    -7397   ,4318    ,254     ,464     ,-1529   ,1374    ,2602    ,-5946   ,2061    ,4786    ,-3598   ,-4105   ,7441    ,-2727   ,-2843   ,\n    4736    ,-4169   ,1663    ,808     ,1302    ,-3198   ,1777    ,2562    ,-5699   ,6346    ,-5112   ,1119    ,3142    ,-4893   ,2152    ,\n    2699    ,-711    ,-4380   ,4628    ,-933    ,-1683   ,735     ,2760    ,-1943   ,-2940   ,5489    ,-1747   ,-2392   ,617     ,4577    ,\n    -3936   ,-2141   ,5943    ,-4520   ,731     ,3417    ,-4215   ,1811    ,51      ,-1197   ,1280    ,-12     ,3206    ,-4328   ,-170    ,\n    1590    ,-741    ,3434    ,-3518   ,410     ,1067    ,-1036   ,1295    ,-1456   ,407     ,2399    ,-850    ,-3818   ,4652    ,-49     ,\n    -2993   ,2383    ,-2068   ,2824    ,-994    ,-1411   ,421     ,2571    ,156     ,-4962   ,3294    ,2905    ,-4261   ,-17     ,4251    ,\n    -3778   ,903     ,976     ,-1389   ,561     ,186     ,1124    ,-898    ,184     ,618     ,47      ,-1411   ,2332    ,-317    ,-2884   ,\n    2321    ,-1203   ,875     ,3188    ,-4556   ,324     ,2522    ,-2113   ,2833    ,-643    ,-3783   ,3725    ,402     ,-2054   ,884     ,\n    -1045   ,2963    ,-520    ,-4091   ,4234    ,633     ,-3404   ,2456    ,-1331   ,560     ,2106    ,-3554   ,1311    ,1568    ,-1619   ,\n    2891    ,-1467   ,-2780   ,3082    ,-1088   ,340     ,304     ,-514    ,-660    ,2730    ,-410    ,-4432   ,5650    ,-1343   ,-3225   ,\n    2658    ,116     ,-251    ,531     ,-283    ,486     ,-859    ,-302    ,620     ,-1206   ,3279    ,-1313   ,-2435   ,2063    ,1204    ,\n    -634    ,-1982   ,2053    ,1660    ,-3286   ,1020    ,368     ,-321    ,1513    ,-1786   ,776     ,171     ,-224    ,85      ,467     ,\n    -1140   ,1324    ,510     ,-1807   ,176     ,1952    ,215     ,-4075   ,4483    ,-536    ,-3421   ,3920    ,-843    ,-1882   ,2034    ,\n    164     ,-1367   ,140     ,774     ,895     ,-965    ,-742    ,2412    ,-1251   ,-1596   ,3525    ,-2217   ,-852    ,1050    ,849     ,\n    613     ,-1775   ,510     ,671     ,-596    ,-342    ,2275    ,-1447   ,-1711   ,2620    ,672     ,-2251   ,804     ,306     ,421     ,\n    -714    ,-250    ,1404    ,-740    ,2119    ,-2817   ,374     ,491     ,1189    ,373     ,-3363   ,3973    ,-1728   ,-456    ,300     ,\n    1514    ,351     ,-3439   ,3064    ,-294    ,-908    ,-205    ,1955    ,-718    ,-2289   ,3083    ,222     ,-2494   ,577     ,3186    ,\n    -3298   ,299     ,2318    ,-1950   ,98      ,1333    ,-1130   ,-370    ,2748    ,-2715   ,402     ,152     ,1999    ,-1227   ,-2222   ,\n    3085    ,-1554   ,1994    ,-1753   ,-878    ,1422    ,1281    ,-1492   ,-1153   ,3113    ,-2523   ,756     ,636     ,-804    ,335     ,\n    -795    ,2913    ,-2681   ,-226    ,3255    ,-3697   ,1239    ,353     ,1033    ,-424    ,-2060   ,2380    ,-1306   ,779     ,-321    ,\n    -137    ,-152    ,1154    ,425     ,-3110   ,3637    ,-1021   ,-1742   ,1119    ,908     ,-685    ,-93     ,2242    ,-4056   ,2422    ,\n    938     ,-2656   ,1762    ,-504    ,894     ,465     ,-1069   ,-636    ,632     ,1141    ,-919    ,-922    ,1588    ,806     ,-2360   ,\n    1205    ,1374    ,-2588   ,1429    ,1361    ,-1899   ,-385    ,2612    ,-1340   ,-1525   ,2929    ,-1156   ,-1777   ,2512    ,178     ,\n    -2511   ,2093    ,803     ,-2673   ,1595    ,1518    ,-2727   ,1152    ,197     ,600     ,836     ,-2763   ,1244    ,1237    ,-233    ,\n    -1164   ,101     ,1152    ,789     ,-2374   ,1124    ,1854    ,-2911   ,1992    ,-218    ,-1118   ,1149    ,839     ,-1187   ,-469    ,\n    2519    ,-1831   ,-976    ,2198    ,-162    ,-1579   ,866     ,1735    ,-1807   ,-700    ,2389    ,-680    ,-1609   ,1896    ,467     ,\n    -2044   ,825     ,1797    ,-1671   ,-688    ,2328    ,-626    ,-1784   ,2359    ,-178    ,-2022   ,2338    ,-165    ,-1567   ,1209    ,\n    -86     ,453     ,228     ,-1036   ,1352    ,-497    ,-777    ,1119    ,-378    ,185     ,147     ,-455    ,1094    ,-574    ,-754    ,\n    1629    ,-274    ,-1337   ,969     ,1501    ,-2293   ,828     ,1261    ,-1981   ,804     ,978     ,-208    ,-1540   ,1960    ,-109    ,\n    -1830   ,2070    ,-501    ,-457    ,-197    ,1608    ,-545    ,-1522   ,2453    ,-1001   ,-1231   ,1856    ,90      ,-1776   ,1769    ,\n    -489    ,-342    ,1024    ,-1052   ,623     ,-70     ,-85     ,-20     ,1042    ,-777    ,-696    ,1479    ,-409    ,-584    ,694     ,\n    -103    ,-30     ,-137    ,317     ,752     ,-1473   ,1093    ,191     ,-1184   ,1618    ,-515    ,-934    ,1082    ,580     ,-784    ,\n    -627    ,1260    ,237     ,-1060   ,747     ,110     ,-574    ,739     ,-292    ,181     ,40      ,-324    ,1275    ,-1415   ,598     ,\n    895     ,-1358   ,1107    ,-251    ,-302    ,217     ,881     ,-495    ,-982    ,1915    ,-738    ,-682    ,856     ,124     ,2       ,\n    -193    ,600     ,55      ,-289    ,-690    ,872     ,502     ,-634    ,-247    ,668     ,717     ,-1094   ,-10     ,581     ,876     ,\n    -1414   ,488     ,1147    ,-1858   ,1127    ,949     ,-1274   ,-110    ,891     ,-38     ,-504    ,1331    ,-769    ,-1018   ,1824    ,\n    -1109   ,438     ,-163    ,201     ,762     ,-1602   ,1816    ,-916    ,-413    ,1604    ,-1238   ,288     ,386     ,-453    ,666     ,\n    -502    ,-29     ,976     ,-619    ,-453    ,738     ,654     ,-1158   ,164     ,924     ,-721    ,149     ,393     ,-307    ,294     ,\n    -427    ,429     ,784     ,-1187   ,574     ,156     ,-359    ,126     ,726     ,-102    ,-1022   ,960     ,313     ,-645    ,-123    ,\n    1359    ,-821    ,-508    ,1236    ,-551    ,-96     ,0       ,680     ,-35     ,-768    ,503     ,864     ,-710    ,-325    ,786     ,\n    -448    ,153     ,522     ,-285    ,-427    ,978     ,-365    ,-117    ,264     ,-259    ,977     ,-1208   ,904     ,397     ,-1081   ,\n    898     ,98      ,-377    ,-173    ,1061    ,-322    ,-747    ,643     ,765     ,-913    ,-68     ,956     ,-579    ,170     ,-282    ,\n    828     ,-84     ,-661    ,731     ,-287    ,-25     ,530     ,-38     ,-707    ,638     ,560     ,-722    ,-267    ,980     ,-29     ,\n    -799    ,317     ,473     ,-151    ,-184    ,949     ,-809    ,-520    ,1305    ,-578    ,-186    ,524     ,-243    ,73      ,41      ,\n    95      ,-375    ,793     ,-14     ,-922    ,966     ,-171    ,-308    ,78      ,709     ,-376    ,-584    ,1073    ,-638    ,0       ,\n    778     ,-836    ,268     ,431     ,-261    ,-220    ,265     ,816     ,-1243   ,698     ,355     ,-786    ,408     ,362     ,209     ,\n    -1127   ,1211    ,109     ,-1150   ,888     ,470     ,-770    ,-24     ,757     ,-520    ,754     ,-243    ,-741    ,890     ,-242    ,\n    94      ,-194    ,578     ,120     ,-796    ,866     ,-220    ,-240    ,267     ,286     ,-184    ,61      ,556     ,-681    ,347     ,\n    66      ,-544    ,871     ,-12     ,-502    ,128     ,607     ,-8      ,-823    ,726     ,312     ,-595    ,74      ,590     ,-33     ,\n    -522    ,576     ,41      ,-461    ,694     ,69      ,-523    ,428     ,161     ,-409    ,337     ,535     ,-586    ,112     ,278     ,\n    -306    ,455     ,208     ,-545    ,257     ,341     ,-298    ,184     ,96      ,63      ,-226    ,412     ,307     ,-627    ,166     ,\n    788     ,-585    ,-205    ,1018    ,-628    ,-257    ,748     ,147     ,-757    ,527     ,661     ,-1062   ,541     ,590     ,-779    ,\n    332     ,481     ,-406    ,-46     ,379     ,18      ,9       ,521     ,-594    ,-140    ,756     ,-178    ,-351    ,478     ,400     ,\n    -809    ,540     ,224     ,-405    ,307     ,65      ,-44     ,-76     ,658     ,-418    ,-149    ,586     ,-176    ,-283    ,505     ,\n    247     ,-657    ,476     ,244     ,-332    ,11      ,483     ,29      ,-527    ,413     ,516     ,-626    ,118     ,601     ,-452    ,\n    107     ,306     ,-174    ,-3      ,437     ,-155    ,-229    ,395     ,43      ,87      ,-206    ,45      ,541     ,-370    ,148     ,\n    40      ,5       ,432     ,-314    ,-51     ,287     ,325     ,-330    ,-173    ,637     ,-56     ,-287    ,195     ,14      ,372     ,\n    -241    ,-25     ,320     ,-65     ,-110    ,159     ,506     ,-641    ,318     ,267     ,-235    ,94      ,47      ,401     ,-289    ,\n    -125    ,529     ,-73     ,-208    ,298     ,-83     ,92      ,89      ,23      ,-107    ,238     ,340     ,-587    ,263     ,363     ,\n    -237    ,-18     ,52      ,452     ,-218    ,-158    ,425     ,-305    ,116     ,462     ,-375    ,117     ,75      ,-118    ,642     ,\n    -468    ,93      ,296     ,-318    ,286     ,-38     ,377     ,-144    ,-411    ,548     ,57      ,-271    ,264     ,42      ,-19     ,\n    48      ,147     ,-118    ,101     ,294     ,-183    ,-5      ,94      ,390     ,-320    ,-33     ,535     ,-279    ,-191    ,598     ,\n    -144    ,-356    ,638     ,-69     ,-277    ,214     ,359     ,-255    ,147     ,70      ,104     ,274     ,-398    ,268     ,25      ,\n    265     ,-107    ,9       ,207     ,-61     ,54      ,-5      ,566     ,-553    ,217     ,429     ,-583    ,464     ,268     ,-375    ,\n    41      ,519     ,-267    ,-57     ,414     ,-195    ,132     ,70      ,74      ,-80     ,148     ,394     ,-401    ,180     ,15      ,\n    65      ,452     ,-499    ,171     ,364     ,-278    ,58      ,178     ,141     ,-104    ,18      ,118     ,40      ,44      ,36      ,\n    90      ,-102    ,334     ,-75     ,-81     ,223     ,-44     ,93      ,-107    ,333     ,-50     ,-118    ,190     ,-61     ,220     ,\n    -78     ,23      ,152     ,-140    ,206     ,162     ,-237    ,58      ,199     ,-14     ,210     ,-139    ,-104    ,236     ,-60     ,\n    76      ,-72     ,132     ,141     ,-53     ,-123    ,86      ,291     ,-232    ,22      ,124     ,55      ,-9      ,-22     ,100     ,\n    -10     ,54      ,-12     ,58      ,42      ,-33     ,121     ,-41     ,73      ,72      ,29      ,-84     ,125     ,287     ,-280    ,\n    123     ,-58     ,182     ,192     ,-292    ,68      ,206     ,60      ,-126    ,123     ,-62     ,298     ,-79     ,-200    ,418     ,\n    -111    ,-26     ,147     ,33      ,5       ,-23     ,235     ,18      ,-227    ,311     ,168     ,-278    ,101     ,288     ,-14     ,\n    -196    ,207     ,114     ,-175    ,314     ,-59     ,-71     ,255     ,-63     ,-67     ,215     ,209     ,-295    ,120     ,289     ,\n    -172    ,45      ,275     ,-140    ,-64     ,369     ,-93     ,-69     ,225     ,-27     ,62      ,43      ,95      ,-32     ,62      ,\n    342     ,-304    ,98      ,343     ,-175    ,-86     ,379     ,-15     ,-235    ,444     ,-87     ,-126    ,331     ,35      ,-179    ,\n    280     ,151     ,-206    ,105     ,202     ,52      ,-95     ,204     ,-24     ,-78     ,317     ,-76     ,31      ,219     ,-105    ,\n    -44     ,229     ,190     ,-214    ,141     ,244     ,-180    ,85      ,270     ,-104    ,-92     ,319     ,71      ,-215    ,191     ,\n    264     ,-283    ,201     ,198     ,-130    ,99      ,33      ,161     ,-118    ,216     ,24      ,-128    ,398     ,-146    ,-46     ,\n    274     ,-39     ,-13     ,124     ,42      ,-6      ,23      ,255     ,-103    ,-74     ,357     ,-157    ,35      ,194     ,-84     ,\n    23      ,180     ,38      ,-146    ,220     ,177     ,-184    ,16      ,363     ,-148    ,-82     ,371     ,-98     ,-101    ,303     ,\n    71      ,-220    ,263     ,150     ,-205    ,151     ,265     ,-184    ,16      ,311     ,-141    ,33      ,186     ,-91     ,91      ,\n    238     ,-166    ,108     ,172     ,-101    ,113     ,64      ,41      ,-7      ,115     ,87      ,5       ,-24     ,228     ,83      ,\n    -160    ,247     ,-41     ,25      ,206     ,-107    ,39      ,217     ,-20     ,-82     ,196     ,105     ,-102    ,120     ,94      ,\n    -24     ,95      ,38      ,53      ,35      ,40      ,94      ,42      ,-66     ,205     ,109     ,-187    ,218     ,77      ,-80     ,\n    94      ,57      ,134     ,30      ,-45     ,112     ,-2      ,85      ,154     ,-97     ,107     ,99      ,0       ,68      ,52      ,\n    49      ,21      ,83      ,7       ,84      ,61      ,9       ,76      ,17      ,36      ,76      ,63      ,-47     ,94      ,47      ,\n    11      ,19      ,66      ,116     ,-121    ,177     ,76      ,-56     ,99      ,50      ,62      ,10      ,91      ,47      ,-15     ,\n    87      ,171     ,-101    ,31      ,243     ,-85     ,-4      ,196     ,7       ,-39     ,147     ,34      ,10      ,110     ,-22     ,\n    112     ,160     ,-135    ,110     ,189     ,-92     ,77      ,136     ,-18     ,77      ,0       ,56      ,200     ,-128    ,95      ,\n    124     ,-72     ,40      ,-25     ,16      ,-9      ,4       ,0       ,-2      ,4       ,-5      ,5       ,-5      ,5       ,-4      ,\n    3       ,-2      ,1       ,0       ,0       ,0       ,0       ,0       ,0       ,-888    ,-209    ,-962    ,1660    ,2336    ,-654    ,\n    -5068   ,12901   ,-3674   ,-21849  ,22706   ,3318    ,-19942  ,10710   ,2685    ,-2632   ,6745    ,-10986  ,552     ,5457    ,-2563   ,\n    8277    ,-11279  ,-985    ,13275   ,-12035  ,1485    ,9903    ,-15118  ,4801    ,14917   ,-15093  ,-7424   ,20179   ,-4975   ,-12725  ,\n    7486    ,-1646   ,4605    ,-515    ,-1704   ,-3198   ,13017   ,-6360   ,-17715  ,23502   ,-8751   ,-7812   ,9370    ,8511    ,-14594  ,\n    -4372   ,24116   ,-17975  ,-6800   ,19306   ,-2393   ,-18315  ,13249   ,9216    ,-17549  ,2636    ,14713   ,-6872   ,-16694  ,20860   ,\n    -2223   ,-17171  ,24321   ,-10752  ,-12033  ,13444   ,447     ,-810    ,-8002   ,13228   ,-5193   ,-6551   ,8315    ,-8927   ,8747    ,\n    -1531   ,-5062   ,1546    ,7704    ,-4582   ,-10039  ,14745   ,-1156   ,-11982  ,16472   ,-3157   ,-21254  ,22719   ,672     ,-18367  ,\n    10719   ,10581   ,-13690  ,-2438   ,14352   ,-11041  ,76      ,5587    ,-2680   ,-2642   ,-661    ,15503   ,-15723  ,-5870   ,24672   ,\n    -18430  ,-6842   ,19121   ,-3644   ,-15140  ,14762   ,1790    ,-17427  ,18973   ,-8376   ,-8363   ,19621   ,-10565  ,-10454  ,21131   ,\n    -7042   ,-15751  ,20093   ,-4220   ,-10567  ,5339    ,4002    ,5519    ,-14058  ,2644    ,16667   ,-20397  ,7840    ,9454    ,-21189  ,\n    10302   ,12169   ,-15181  ,-2933   ,20890   ,-17185  ,-6131   ,18286   ,-4951   ,-9397   ,6725    ,10584   ,-19242  ,7953    ,4320    ,\n    -11378  ,9111    ,662     ,-118    ,-5581   ,12287   ,-7593   ,-14815  ,26788   ,-15464  ,-4254   ,20567   ,-19583  ,-1758   ,14626   ,\n    237     ,-15222  ,9885    ,3809    ,-14805  ,16398   ,-344    ,-13291  ,2288    ,14329   ,-6689   ,-13367  ,13303   ,1922    ,-6462   ,\n    2811    ,4860    ,-6203   ,-3685   ,5693    ,-712    ,-4239   ,7512    ,2619    ,-16400  ,12244   ,9395    ,-21814  ,11870   ,6802    ,\n    -15077  ,9913    ,-3918   ,-603    ,13202   ,-14813  ,-926    ,7114    ,-6403   ,6912    ,188     ,-5018   ,3177    ,2605    ,-4230   ,\n    -1829   ,9861    ,-8462   ,-1122   ,3261    ,-5012   ,15967   ,-15999  ,-3421   ,18070   ,-14745  ,-1145   ,16768   ,-9983   ,-12390  ,\n    19854   ,-1726   ,-14044  ,3008    ,13474   ,-10411  ,-1643   ,14371   ,-20857  ,5536    ,14971   ,-10174  ,-9252   ,8978    ,7729    ,\n    -10257  ,-4742   ,14390   ,-409    ,-17183  ,7827    ,10707   ,-4770   ,-13120  ,13436   ,3741    ,-14518  ,9485    ,-2533   ,2129    ,\n    -3316   ,-3290   ,16847   ,-14332  ,-6961   ,20048   ,-9267   ,-9076   ,13599   ,-4668   ,-4785   ,7224    ,-3444   ,-391    ,1867    ,\n    -890    ,-2117   ,-473    ,6115    ,-770    ,-5935   ,4178    ,8336    ,-10854  ,-9345   ,14666   ,283     ,-3657   ,-3797   ,8524    ,\n    6254    ,-25319  ,16922   ,5256    ,-15434  ,4652    ,11610   ,-6728   ,-10874  ,20523   ,-14707  ,-4966   ,15749   ,-1921   ,-13587  ,\n    10446   ,4262    ,-14122  ,10478   ,-946    ,-4481   ,97      ,11006   ,-8460   ,-7979   ,11071   ,3356    ,-8879   ,1740    ,9015    ,\n    -16250  ,5491    ,11001   ,-11660  ,2565    ,13172   ,-19794  ,1483    ,18499   ,-22641  ,13414   ,6854    ,-19969  ,9598    ,7607    ,\n    -2501   ,-13054  ,14089   ,1451    ,-15067  ,12345   ,-4935   ,5133    ,-2373   ,-4619   ,6034    ,-7315   ,14655   ,-9960   ,-10158  ,\n    22126   ,-10754  ,-8943   ,9148    ,3772    ,-2592   ,-6964   ,10784   ,-330    ,-13431  ,11123   ,-3703   ,-1761   ,4422    ,2158    ,\n    4658    ,-19803  ,9901    ,5263    ,-3499   ,288     ,1002    ,52      ,-5176   ,12602   ,-13552  ,6518    ,-586    ,-7254   ,11204   ,\n    -7516   ,-1043   ,8988    ,-562    ,-12086  ,11969   ,-1692   ,-10550  ,7860    ,7606    ,-5445   ,-13030  ,14375   ,-1467   ,-5045   ,\n    15736   ,-15538  ,-7065   ,13604   ,2987    ,-10623  ,521     ,12720   ,-13722  ,-259    ,13964   ,-9607   ,-3779   ,8120    ,-3193   ,\n    -2461   ,547     ,9039    ,-7707   ,-4677   ,6049    ,-2839   ,13532   ,-15327  ,-5133   ,18779   ,-8059   ,-8699   ,12000   ,2258    ,\n    -14885  ,5237    ,10967   ,-9308   ,-4789   ,6749    ,4005    ,-3592   ,-7780   ,19369   ,-12907  ,-12919  ,26884   ,-15522  ,-5367   ,\n    11210   ,-1472   ,1018    ,-6358   ,6220    ,4176    ,-16345  ,11975   ,4874    ,-17832  ,12349   ,3004    ,-5946   ,818     ,5178    ,\n    -4206   ,-4076   ,9569    ,-4358   ,-5113   ,7393    ,6414    ,-17494  ,3749    ,11881   ,-14170  ,12021   ,-3891   ,-9673   ,19962   ,\n    -11545  ,-8734   ,11378   ,3439    ,-6701   ,-4142   ,15369   ,-12651  ,-4718   ,18873   ,-15376  ,-3004   ,17836   ,-11813  ,-5905   ,\n    10337   ,3390    ,-11034  ,2472    ,15920   ,-23428  ,4955    ,12527   ,-8198   ,-226    ,1091    ,9625    ,-15992  ,3502    ,8166    ,\n    -5061   ,3550    ,-7297   ,8077    ,1861    ,-9770   ,-626    ,4481    ,9047    ,-7687   ,-9286   ,10257   ,6738    ,-12790  ,3317    ,\n    7741    ,-14999  ,11725   ,4437    ,-17903  ,14378   ,4429    ,-14912  ,7250    ,-1320   ,-569    ,2817    ,5326    ,-3804   ,-14771  ,\n    21372   ,-8170   ,-10095  ,13979   ,-1715   ,-4114   ,-3337   ,17062   ,-13180  ,-12575  ,25893   ,-12145  ,-11420  ,21514   ,-7592   ,\n    -12370  ,14249   ,2865    ,-14431  ,7894    ,9133    ,-14306  ,459     ,9157    ,-4913   ,-5118   ,13620   ,-8362   ,-8287   ,13824   ,\n    -1756   ,-5937   ,192     ,12210   ,-16661  ,7313    ,11920   ,-24859  ,10939   ,7368    ,-3607   ,-9080   ,16109   ,-3808   ,-20713  ,\n    26367   ,-8615   ,-12833  ,16915   ,2517    ,-18841  ,11238   ,10667   ,-23402  ,12935   ,10878   ,-17597  ,-347    ,11407   ,-907    ,\n    -9275   ,9119    ,1060    ,-13430  ,7102    ,8962    ,-6938   ,-6698   ,13219   ,-5163   ,-8786   ,12770   ,-8551   ,2106    ,7989    ,\n    -14109  ,5746    ,12636   ,-13832  ,-7058   ,19437   ,-7313   ,-10603  ,14632   ,-8425   ,-2378   ,10223   ,255     ,-10302  ,1014    ,\n    9893    ,-9813   ,-33     ,7509    ,-501    ,-6468   ,3357    ,8071    ,-8933   ,-4139   ,1714    ,7875    ,-648    ,-7670   ,9048    ,\n    -7560   ,-920    ,8618    ,-7061   ,1169    ,-2269   ,9129    ,-902    ,-12368  ,8730    ,-2380   ,2311    ,5545    ,-9700   ,1218    ,\n    4584    ,-3636   ,1984    ,-4931   ,7895    ,3599    ,-14727  ,3880    ,11339   ,-2841   ,-15988  ,18168   ,830     ,-20391  ,17397   ,\n    4433    ,-15853  ,6149    ,8640    ,-11903  ,2975    ,910     ,3750    ,2511    ,-14766  ,15879   ,-379    ,-16504  ,10984   ,3912    ,\n    1223    ,-9295   ,-1101   ,6626    ,-1886   ,10201   ,-13510  ,-2031   ,12345   ,-9793   ,3583    ,-2960   ,4856    ,4139    ,-9532   ,\n    4762    ,-1980   ,-2997   ,4442    ,9068    ,-14175  ,-1963   ,16407   ,-10033  ,-5523   ,12425   ,-1527   ,-12748  ,11051   ,-4723   ,\n    2613    ,10430   ,-19035  ,2633    ,14427   ,-8867   ,-4583   ,5371    ,2040    ,1867    ,-9012   ,5424    ,-1115   ,-410    ,10424   ,\n    -17534  ,6348    ,13365   ,-15041  ,-3706   ,17069   ,-6069   ,-13046  ,17378   ,-6441   ,-8096   ,7997    ,6316    ,-8304   ,-5935   ,\n    17165   ,-8786   ,-10865  ,13122   ,6475    ,-18078  ,8001    ,5335    ,-12378  ,9451    ,2055    ,-5204   ,-1192   ,8468    ,-6500   ,\n    -2733   ,3863    ,8871    ,-9986   ,-9183   ,12943   ,-5098   ,9711    ,-11014  ,4341    ,6922    ,-18020  ,13261   ,1062    ,-6977   ,\n    3579    ,2364    ,-3773   ,124     ,-737    ,5717    ,1067    ,-11668  ,11217   ,-411    ,-12315  ,11400   ,5317    ,-13483  ,4523    ,\n    5884    ,-7302   ,548     ,5930    ,-1235   ,-6586   ,6194    ,-829    ,-2129   ,192     ,-1132   ,7966    ,-3616   ,-3673   ,-47     ,\n    -919    ,9092    ,-4304   ,-7128   ,7688    ,-1909   ,-1490   ,2734    ,-1778   ,452     ,130     ,806     ,-4068   ,2273    ,11173   ,\n    -15778  ,-1092   ,20607   ,-18041  ,-2497   ,11670   ,-4319   ,750     ,4480    ,-5241   ,-11258  ,18998   ,-2795   ,-14386  ,9303    ,\n    4055    ,-867    ,-8883   ,8078    ,8373    ,-19796  ,5906    ,14444   ,-18831  ,10753   ,1687    ,-14048  ,17872   ,-5949   ,-11023  ,\n    18112   ,-7838   ,-10099  ,19135   ,-10668  ,-5780   ,7174    ,-160    ,3082    ,-5633   ,2020    ,5707    ,-7781   ,479     ,9107    ,\n    -9352   ,-2679   ,7143    ,-3389   ,-2246   ,13420   ,-9922   ,-8466   ,10085   ,4237    ,-1470   ,-17026  ,20355   ,-961    ,-19681  ,\n    21421   ,-5395   ,-11948  ,13851   ,1774    ,-10711  ,427     ,12709   ,-5404   ,-12928  ,14245   ,653     ,-9990   ,6850    ,-419    ,\n    -6916   ,12425   ,-806    ,-15937  ,11036   ,5858    ,-8871   ,1753    ,2248    ,-2509   ,5987    ,-3459   ,-8368   ,6181    ,8125    ,\n    -6745   ,-4927   ,5616    ,2396    ,-1827   ,-3841   ,3822    ,-1014   ,-1647   ,7388    ,-10899  ,3653    ,13243   ,-19669  ,4916    ,\n    8337    ,-5252   ,-1119   ,7574    ,-4830   ,-8761   ,19858   ,-15850  ,-5013   ,14806   ,-4002   ,-1688   ,-1418   ,3305    ,1226    ,\n    -4780   ,7269    ,-638    ,-16487  ,13839   ,7893    ,-19359  ,12607   ,5485    ,-17881  ,9569    ,2539    ,-1946   ,-1225   ,7807    ,\n    -9297   ,-3075   ,19776   ,-23423  ,2289    ,14153   ,-6137   ,-4806   ,3903    ,8574    ,-15849  ,7579    ,5803    ,-15653  ,16015   ,\n    -4012   ,-9675   ,7248    ,4806    ,-700    ,-13402  ,14744   ,696     ,-13619  ,6955    ,12082   ,-16282  ,-2638   ,19092   ,-15866  ,\n    -927    ,10375   ,-239    ,-11761  ,13894   ,-7122   ,-8731   ,22860   ,-20088  ,573     ,8828    ,4155    ,-10734  ,-4795   ,21024   ,\n    -17775  ,-1874   ,16874   ,-11078  ,-7852   ,18295   ,-7258   ,-13119  ,22041   ,-9682   ,-10661  ,13855   ,-1002   ,-4415   ,128     ,\n    5140    ,-6116   ,6799    ,1530    ,-14287  ,12227   ,-2647   ,-4952   ,4504    ,-2180   ,10535   ,-9808   ,-7674   ,16035   ,-9110   ,\n    3698    ,2717    ,-13618  ,14382   ,2985    ,-15128  ,3948    ,13576   ,-16503  ,5668    ,10055   ,-17637  ,7547    ,9541    ,-10111  ,\n    -3922   ,15155   ,-13827  ,-704    ,9169    ,-1309   ,1658    ,-12204  ,17097   ,-9123   ,-4806   ,6903    ,-4712   ,7159    ,-6626   ,\n    11979   ,-11477  ,-6568   ,11436   ,4436    ,-7410   ,-8009   ,13668   ,-4631   ,4213    ,-7889   ,-765    ,8884    ,-7990   ,5324    ,\n    -6459   ,6442    ,3492    ,-11965  ,14130   ,-7160   ,-7895   ,14290   ,-6019   ,-2976   ,4150    ,-988    ,-830    ,-2328   ,6916    ,\n    519     ,-9793   ,6851    ,-2648   ,1905    ,5603    ,-12412  ,6375    ,6160    ,-8059   ,-1569   ,5201    ,5253    ,-11676  ,1775    ,\n    9787    ,-10981  ,10471   ,-5631   ,-5923   ,5802    ,2750    ,6332    ,-18355  ,8665    ,5846    ,-6110   ,2878    ,-143    ,1444    ,\n    -4287   ,4150    ,2378    ,-7604   ,-1332   ,4531    ,2375    ,-2596   ,1339    ,8479    ,-14725  ,701     ,10140   ,-9275   ,3188    ,\n    9064    ,-9908   ,-3245   ,15066   ,-14208  ,-2001   ,15112   ,-6569   ,-4366   ,-564    ,4868    ,5379    ,-14025  ,6303    ,7590    ,\n    -10902  ,3474    ,131     ,4339    ,-1876   ,-7694   ,8450    ,2054    ,-12117  ,12617   ,-578    ,-9933   ,4493    ,1050    ,9234    ,\n    -16218  ,3817    ,11834   ,-10133  ,-2386   ,10213   ,-2076   ,-11846  ,14160   ,-5219   ,-5609   ,8170    ,-2805   ,-1919   ,3966    ,\n    -2901   ,-2577   ,4855    ,907     ,3781    ,-9134   ,-205    ,6688    ,-5263   ,3760    ,-4444   ,4004    ,6064    ,-13297  ,6851    ,\n    3190    ,-5726   ,-1419   ,6466    ,5235    ,-14615  ,1979    ,11003   ,-5265   ,-6061   ,11151   ,-5473   ,-1347   ,6168    ,-11565  ,\n    7951    ,742     ,-3956   ,3659    ,-5170   ,6775    ,-19     ,-9136   ,11089   ,346     ,-12972  ,7958    ,7247    ,-11231  ,-219    ,\n    11042   ,-4744   ,-7216   ,5621    ,-1861   ,5663    ,-757    ,-9078   ,14936   ,-11440  ,-4291   ,15038   ,-9563   ,783     ,-632    ,\n    2689    ,6053    ,-14513  ,5919    ,12866   ,-17201  ,384     ,17425   ,-15214  ,-3631   ,15730   ,-8217   ,-4220   ,4529    ,5293    ,\n    -7507   ,528     ,11429   ,-18508  ,3861    ,13622   ,-9127   ,-6661   ,10747   ,3459    ,-14868  ,10350   ,586     ,-9206   ,8094    ,\n    4405    ,-9060   ,335     ,11105   ,-8111   ,-7844   ,11323   ,-140    ,-8545   ,10737   ,-9454   ,3110    ,10124   ,-16376  ,4982    ,\n    11712   ,-10485  ,-4536   ,12885   ,-8355   ,-1080   ,6009    ,-3205   ,-2497   ,1663    ,2023    ,2186    ,-2148   ,-4895   ,15689   ,\n    -19380  ,2020    ,19082   ,-20134  ,2938    ,10349   ,-3843   ,-9071   ,15102   ,-4130   ,-16866  ,21073   ,-3247   ,-12346  ,11011   ,\n    62      ,-8650   ,4804    ,8565    ,-8852   ,-7391   ,15024   ,-495    ,-15179  ,9828    ,2802    ,-4929   ,4393    ,-1459   ,-969    ,\n    -548    ,5751    ,-9930   ,3765    ,10067   ,-20907  ,14920   ,5409    ,-16645  ,5905    ,10676   ,-7605   ,-8149   ,15437   ,-7945   ,\n    -6943   ,9830    ,2132    ,-9782   ,8283    ,5888    ,-21268  ,11736   ,10913   ,-16103  ,1704    ,9497    ,-3957   ,-6736   ,10500   ,\n    3077    ,-17805  ,8361    ,6556    ,-4921   ,184     ,-2029   ,3465    ,-2154   ,1669    ,-1560   ,-1705   ,7133    ,-5300   ,-4659   ,\n    14505   ,-7635   ,-11750  ,16749   ,-2544   ,-9748   ,7231    ,3231    ,-9379   ,5226    ,6118    ,-10568  ,471     ,10829   ,-4989   ,\n    -8485   ,15407   ,-10116  ,-7187   ,16003   ,-2398   ,-13175  ,9720    ,8888    ,-18476  ,6647    ,6244    ,1437    ,-11411  ,1007    ,\n    14475   ,-12769  ,-2417   ,8340    ,5339    ,-16274  ,11350   ,1462    ,-12966  ,17945   ,-12757  ,222     ,10109   ,-12456  ,6985    ,\n    5317    ,-10573  ,729     ,6861    ,1268    ,-8876   ,-255    ,11695   ,-5767   ,-4755   ,7371    ,-7804   ,2461    ,10201   ,-11031  ,\n    -2845   ,10049   ,336     ,-13481  ,10980   ,6377    ,-15598  ,4546    ,8531    ,-946    ,-12575  ,9091    ,5203    ,-14726  ,9478    ,\n    3093    ,-7279   ,6835    ,231     ,-5720   ,1787    ,-1355   ,2741    ,-269    ,-1652   ,2962    ,-5409   ,7543    ,-778    ,-7803   ,\n    7041    ,-4825   ,7563    ,-1664   ,-10020  ,8061    ,5037    ,-3695   ,-9768   ,13033   ,-1991   ,-8664   ,8900    ,-4356   ,-2332   ,\n    9267    ,-2245   ,-9766   ,10277   ,-3575   ,-2277   ,3873    ,-3363   ,6020    ,-6728   ,-2080   ,11121   ,-1351   ,-13213  ,6350    ,\n    12747   ,-15982  ,1640    ,12616   ,-13635  ,583     ,9822    ,-1807   ,-9558   ,9209    ,3544    ,-13317  ,6700    ,3375    ,-1349   ,\n    -5343   ,5058    ,2534    ,-10603  ,11064   ,3299    ,-16240  ,10003   ,7054    ,-13824  ,5864    ,4197    ,-5891   ,1850    ,1847    ,\n    -5686   ,9974    ,-5834   ,-6792   ,18924   ,-14458  ,-5028   ,12689   ,-1561   ,-6051   ,1959    ,8566    ,-9779   ,-3783   ,13578   ,\n    -2505   ,-14309  ,9367    ,9798    ,-10696  ,-4978   ,7868    ,4054    ,-7390   ,2907    ,1913    ,-7783   ,3497    ,9712    ,-9265   ,\n    -3286   ,11438   ,-7977   ,-2397   ,3492    ,8024    ,-10042  ,-3831   ,15890   ,-12322  ,-1164   ,12358   ,-5676   ,-10645  ,12067   ,\n    -1826   ,-4120   ,2490    ,-878    ,7358    ,-9161   ,-663    ,2744    ,8463    ,-8785   ,-7018   ,16867   ,-7269   ,-7512   ,5829    ,\n    1271    ,61      ,881     ,-1707   ,1662    ,-4517   ,11706   ,-6288   ,-15479  ,16566   ,3182    ,-9979   ,-4      ,12387   ,-11505  ,\n    -1510   ,9913    ,-9404   ,2528    ,2323    ,4555    ,-3221   ,-6525   ,5978    ,-2442   ,782     ,-3026   ,9214    ,-102    ,-15507  ,\n    11011   ,2158    ,2409    ,-7754   ,-789    ,6890    ,-4950   ,1099    ,-1985   ,7904    ,-2831   ,-5127   ,2917    ,-2562   ,1680    ,\n    6274    ,-6884   ,321     ,2321    ,1966    ,4968    ,-16333  ,4247    ,13628   ,-8711   ,-5864   ,8276    ,-2948   ,6199    ,-2551   ,\n    -13667  ,16131   ,324     ,-11116  ,2676    ,12276   ,-11273  ,-1800   ,9527    ,-8555   ,1815    ,1110    ,9927    ,-15097  ,3018    ,\n    10572   ,-14229  ,5354    ,3855    ,-980    ,-4833   ,13054   ,-14322  ,415     ,15459   ,-20373  ,7784    ,9105    ,-9713   ,-1558   ,\n    8870    ,-6322   ,-119    ,3810    ,-3029   ,-2968   ,6204    ,6196    ,-16248  ,4062    ,10827   ,-7878   ,-4055   ,15199   ,-14270  ,\n    -4720   ,21299   ,-16475  ,-3032   ,13909   ,-1728   ,-14480  ,10633   ,8284    ,-15933  ,3068    ,11727   ,-5258   ,-14008  ,18801   ,\n    -3664   ,-14037  ,14427   ,747     ,-8928   ,1624    ,12255   ,-14345  ,1547    ,5027    ,-2763   ,3950    ,-8832   ,6849    ,-139    ,\n    5528    ,-8031   ,-6384   ,15114   ,-6804   ,-3488   ,4852    ,849     ,-7600   ,8925    ,877     ,-12345  ,9689    ,675     ,-1734   ,\n    -2053   ,7792    ,-3529   ,-14102  ,21553   ,-5326   ,-15151  ,11957   ,3558    ,-5909   ,-1506   ,13181   ,-13388  ,-6616   ,19550   ,\n    -8392   ,-8554   ,7840    ,7447    ,-11864  ,2228    ,9829    ,-16408  ,9281    ,8882    ,-15430  ,1562    ,13768   ,-9623   ,-4005   ,\n    8326    ,-8131   ,7480    ,2406    ,-10122  ,1432    ,12151   ,-9093   ,-7609   ,17783   ,-10997  ,-5499   ,13715   ,-1935   ,-12208  ,\n    8440    ,9632    ,-16038  ,358     ,12026   ,-1346   ,-12888  ,8048    ,10376   ,-17562  ,6197    ,8023    ,-10581  ,3092    ,3331    ,\n    -6755   ,5764    ,7876    ,-15931  ,3133    ,8465    ,-5786   ,2520    ,-972    ,1643    ,-2009   ,-570    ,10691   ,-13875  ,-5886   ,\n    19981   ,-9459   ,-5005   ,8375    ,-5053   ,-1636   ,10893   ,-7432   ,-7480   ,16627   ,-11158  ,-5079   ,12618   ,-5039   ,354     ,\n    4816    ,-9844   ,1413    ,7483    ,-6021   ,1374    ,2031    ,-1875   ,405     ,-2072   ,1327    ,6888    ,-6765   ,-4395   ,12590   ,\n    -5629   ,-8872   ,14302   ,-6485   ,-4873   ,7664    ,-3244   ,-2023   ,2022    ,10116   ,-16065  ,5473    ,4928    ,-11033  ,18313   ,\n    -15294  ,505     ,8995    ,-10798  ,10604   ,-5755   ,-4211   ,11937   ,-5444   ,-6702   ,8649    ,-3377   ,-751    ,2459    ,-4258   ,\n    2902    ,1122    ,742     ,-3636   ,10087   ,-8460   ,-7654   ,15139   ,-10919  ,1701    ,8765    ,-7621   ,-1617   ,5607    ,-2607   ,\n    -1500   ,353     ,621     ,8281    ,-6590   ,-9030   ,10517   ,3536    ,-10492  ,1661    ,9345    ,-4250   ,-8644   ,13515   ,-5018   ,\n    -9005   ,13024   ,-5539   ,-4412   ,5383    ,6975    ,-11971  ,-751    ,14954   ,-13126  ,490     ,6472    ,-4477   ,929     ,893     ,\n    -123    ,-1161   ,2170    ,-3883   ,4076    ,3516    ,-11592  ,6773    ,8563    ,-14671  ,2171    ,13589   ,-11345  ,-4940   ,11419   ,\n    1812    ,-13790  ,8526    ,6420    ,-12988  ,6507    ,2419    ,-5182   ,-1239   ,11245   ,-7452   ,-8044   ,13068   ,-3745   ,-3029   ,\n    2517    ,2469    ,-3971   ,-1085   ,5302    ,-4366   ,5969    ,932     ,-16800  ,11469   ,8732    ,-16007  ,10290   ,3414    ,-15144  ,\n    10961   ,3929    ,-9470   ,413     ,4955    ,2834    ,-7080   ,4629    ,1671    ,-8191   ,5986    ,375     ,-3280   ,262     ,4229    ,\n    3132    ,-13604  ,12650   ,1789    ,-15866  ,10518   ,1114    ,4064    ,-9148   ,-97     ,5744    ,-4377   ,7223    ,-9270   ,1791    ,\n    4547    ,-1452   ,3276    ,-6112   ,4003    ,2253    ,-7960   ,3377    ,3306    ,-3382   ,1662    ,33      ,-3349   ,7679    ,-2958   ,\n    -7469   ,6570    ,522     ,-384    ,-157    ,79      ,930     ,-1603   ,837     ,1764    ,-2255   ,515     ,2223    ,-5802   ,1882    ,\n    3890    ,-3343   ,1463    ,-3515   ,5306    ,-1931   ,523     ,9236    ,-20508  ,13366   ,5052    ,-17682  ,15086   ,-3121   ,-1476   ,\n    3813    ,-9227   ,4963    ,8732    ,-8919   ,-2615   ,3521    ,2030    ,3093    ,-10263  ,4307    ,10152   ,-11564  ,-513    ,8819    ,\n    -7006   ,-475    ,6281    ,-6923   ,2348    ,7274    ,-10572  ,3376    ,3150    ,-7099   ,7219    ,1069    ,-1301   ,-5266   ,1266    ,\n    7085    ,-9324   ,3016    ,3672    ,-689    ,907     ,-4728   ,6412    ,-2849   ,-5799   ,6300    ,-2977   ,-35     ,8679    ,-11348  ,\n    3991    ,9631    ,-18601  ,7896    ,4354    ,-1989   ,-1405   ,-409    ,12544   ,-21770  ,9376    ,9317    ,-18116  ,11361   ,309     ,\n    -279    ,-458    ,-2488   ,7178    ,-7492   ,-1489   ,5814    ,-5334   ,6201    ,80      ,-9636   ,6235    ,9746    ,-16465  ,6788    ,\n    8502    ,-18467  ,12337   ,312     ,-2200   ,-2883   ,10083   ,-4310   ,-16623  ,24682   ,-10732  ,-9108   ,13856   ,-1706   ,-6481   ,\n    2289    ,8539    ,-10423  ,-2206   ,13627   ,-8200   ,-9031   ,14495   ,121     ,-13648  ,8791    ,7808    ,-12801  ,804     ,8141    ,\n    -4359   ,2230    ,370     ,-7694   ,4617    ,2875    ,-1404   ,1041    ,-1209   ,2688    ,-4387   ,-2053   ,9145    ,-6863   ,-3455   ,\n    10820   ,-9230   ,5884    ,4077    ,-15767  ,10608   ,3778    ,-4974   ,-3026   ,6504    ,3413    ,-14890  ,12749   ,-80     ,-11959  ,\n    8620    ,5329    ,-6212   ,-4906   ,13318   ,-8284   ,-4723   ,9332    ,-5547   ,-1285   ,4922    ,5212    ,-14399  ,7177    ,10945   ,\n    -20975  ,11942   ,6043    ,-14797  ,6321    ,7709    ,-7646   ,-3864   ,15044   ,-11297  ,-7954   ,18326   ,-8031   ,-7748   ,14880   ,\n    -4411   ,-13560  ,17200   ,-3114   ,-11871  ,17626   ,-9516   ,-6693   ,9718    ,3606    ,-7117   ,-5394   ,13382   ,-6670   ,-6320   ,\n    10936   ,1       ,-13417  ,12832   ,3721    ,-16284  ,8159    ,5151    ,-3946   ,-3584   ,12263   ,-11771  ,-5534   ,19729   ,-13244  ,\n    -3067   ,9990    ,-5603   ,-2272   ,10101   ,-6460   ,-6640   ,7530    ,5262    ,-7908   ,-3082   ,14015   ,-12012  ,385     ,5004    ,\n    -894    ,-1254   ,-2265   ,6994    ,-7408   ,5069    ,-3017   ,4144    ,154     ,-8689   ,5323    ,3941    ,456     ,-8754   ,3050    ,\n    6042    ,410     ,-9753   ,4861    ,6435    ,-8199   ,-766    ,7127    ,527     ,-9556   ,3504    ,8526    ,-4000   ,-8728   ,6025    ,\n    3595    ,-1374   ,-3914   ,4249    ,3294    ,-9172   ,5047    ,150     ,-4907   ,4791    ,917     ,-1295   ,4082    ,-3324   ,-3807   ,\n    4473    ,-2553   ,1799    ,5       ,-2955   ,8424    ,-7740   ,-1076   ,2811    ,4017    ,1774    ,-15163  ,14961   ,-736    ,-13133  ,\n    11971   ,2923    ,-10396  ,3116    ,6691    ,-8527   ,3333    ,2630    ,-3864   ,1966    ,-121    ,-417    ,2421    ,-5761   ,5087    ,\n    4512    ,-12587  ,6105    ,5393    ,-6078   ,-868    ,7882    ,-4953   ,-5126   ,11247   ,-6581   ,-4296   ,4570    ,4297    ,-3608   ,\n    -5400   ,5661    ,5133    ,-4239   ,-7087   ,8517    ,-2382   ,-1134   ,2112    ,-1314   ,652     ,-3471   ,7961    ,-2990   ,-6612   ,\n    3919    ,8221    ,-7860   ,-5900   ,11412   ,-2879   ,-3095   ,1844    ,3655    ,-4871   ,-1168   ,9352    ,-9978   ,-571    ,13569   ,\n    -15312  ,373     ,14854   ,-14739  ,3376    ,3113    ,2089    ,2013    ,-10838  ,8047    ,-4733   ,986     ,7253    ,-6480   ,-1632   ,\n    7494    ,-1817   ,-9043   ,11560   ,-6089   ,-1651   ,4193    ,-4128   ,6833    ,-7525   ,8696    ,-4262   ,-5898   ,6762    ,-2609   ,\n    6099    ,-8788   ,3319    ,612     ,3972    ,-2107   ,-8327   ,8121    ,696     ,-201    ,-4827   ,11418   ,-8589   ,-8564   ,13935   ,\n    -8      ,-8513   ,885     ,9579    ,-8571   ,2629    ,558     ,-5518   ,11046   ,-4211   ,-6333   ,3348    ,2029    ,4457    ,-7372   ,\n    439     ,3791    ,-6166   ,5017    ,898     ,-1376   ,-615    ,1601    ,-248    ,-1636   ,3817    ,-5246   ,2267    ,3578    ,-6916   ,\n    4138    ,5510    ,-6896   ,-2291   ,2815    ,911     ,124     ,-3010   ,6031    ,-1623   ,-6885   ,9418    ,-4577   ,-4276   ,12230   ,\n    -9492   ,-4227   ,15754   ,-10273  ,-7169   ,15531   ,-4986   ,-7100   ,4833    ,1859    ,-2566   ,-3077   ,11376   ,-7813   ,-7547   ,\n    15061   ,-6067   ,-5526   ,3897    ,4763    ,-1717   ,-7252   ,7560    ,-2733   ,300     ,1238    ,-6060   ,12866   ,-7384   ,-7082   ,\n    8119    ,2135    ,593     ,-10608  ,8163    ,1765    ,-9813   ,10515   ,1180    ,-11196  ,5067    ,9377    ,-11755  ,1189    ,7416    ,\n    -6371   ,285     ,4264    ,-4028   ,-1554   ,4660    ,-201    ,-707    ,-3966   ,12393   ,-8506   ,-11835  ,16606   ,-3786   ,-3098   ,\n    1850    ,2754    ,-3012   ,-2272   ,7545    ,-4507   ,-4385   ,9518    ,-3761   ,-10128  ,12359   ,1352    ,-11122  ,8191    ,1050    ,\n    -9711   ,12410   ,-1933   ,-10910  ,8491    ,4784    ,-10121  ,4639    ,9426    ,-18631  ,8258    ,9048    ,-15761  ,6875    ,9646    ,\n    -12780  ,-1224   ,11012   ,-4538   ,-5061   ,6182    ,3204    ,-10815  ,7230    ,5145    ,-14686  ,6766    ,9971    ,-11923  ,-1018   ,\n    7857    ,-3138   ,449     ,755     ,-1037   ,1802    ,-2548   ,2614    ,-1494   ,-2216   ,12000   ,-13951  ,-3217   ,14744   ,-9904   ,\n    1414    ,3954    ,-4836   ,5608    ,-2647   ,-3953   ,2865    ,1762    ,1148    ,-4209   ,7962    ,-6622   ,-4935   ,14876   ,-10258  ,\n    -3866   ,9233    ,-4743   ,3       ,-1472   ,5954    ,2781    ,-15009  ,10452   ,5890    ,-13003  ,1970    ,12746   ,-10444  ,-4427   ,\n    15087   ,-12012  ,-1892   ,10239   ,-4268   ,-1876   ,834     ,2845    ,-803    ,-5103   ,12574   ,-9503   ,-7904   ,14460   ,-8836   ,\n    848     ,9716    ,-6622   ,-8868   ,13514   ,-761    ,-10875  ,9928    ,-4650   ,-1153   ,8074    ,-5131   ,-1207   ,1945    ,-2190   ,\n    2277    ,-434    ,-462    ,-479    ,-2241   ,10537   ,-7288   ,-8008   ,14477   ,-2981   ,-9747   ,5140    ,9306    ,-9457   ,-4942   ,\n    10275   ,220     ,-7130   ,3935    ,540     ,665     ,3980    ,-11357  ,3774    ,4145    ,1851    ,-1551   ,-5748   ,2361    ,4962    ,\n    377     ,-10381  ,10198   ,2055    ,-12824  ,9225    ,1676    ,-6295   ,9382    ,-7236   ,-3889   ,10163   ,-7489   ,3214    ,3198    ,\n    -6849   ,3308    ,2144    ,-4245   ,-304    ,4974    ,-1001   ,-2141   ,-154    ,7077    ,-3402   ,-12804  ,13675   ,2066    ,-10231  ,\n    4175    ,3568    ,-6508   ,4132    ,7195    ,-12776  ,1798    ,6064    ,1326    ,-7429   ,3172    ,7367    ,-11658  ,3474    ,3823    ,\n    -5756   ,3287    ,6493    ,-8788   ,-92     ,3017    ,3422    ,600     ,-12844  ,8250    ,8082    ,-10271  ,-2427   ,7410    ,3190    ,\n    -5324   ,-7851   ,14103   ,-3296   ,-11610  ,17024   ,-8385   ,-6545   ,12107   ,-1912   ,-6272   ,642     ,8718    ,-6181   ,-3442   ,\n    9081    ,-6283   ,-1883   ,5180    ,-4705   ,2744    ,6803    ,-9496   ,324     ,548     ,6170    ,722     ,-13080  ,9815    ,1117    ,\n    1145    ,-5802   ,2763    ,4095    ,-9257   ,7141    ,-2382   ,-2122   ,6451    ,965     ,-9795   ,3337    ,2956    ,2029    ,-3526   ,\n    -809    ,11073   ,-18455  ,9082    ,3839    ,-6201   ,12604   ,-17393  ,4432    ,9172    ,-8363   ,841     ,4342    ,-2718   ,-4339   ,\n    10472   ,-5249   ,-6775   ,7743    ,2406    ,-5279   ,-975    ,4477    ,526     ,1268    ,-8084   ,1263    ,3417    ,590     ,6286    ,\n    -13567  ,4810    ,11319   ,-15281  ,1520    ,12958   ,-9890   ,-4018   ,11211   ,-5667   ,-4035   ,3717    ,6197    ,-5421   ,-7896   ,\n    15019   ,-4834   ,-8454   ,6909    ,2042    ,795     ,-10444  ,8150    ,5217    ,-13327  ,6285    ,5580    ,-2690   ,-5880   ,4422    ,\n    -1718   ,727     ,6353    ,-10844  ,6358    ,-1423   ,-1434   ,7503    ,-8539   ,-1284   ,7895    ,200     ,-6888   ,3875    ,-2988   ,\n    3062    ,4186    ,-8076   ,2261    ,-44     ,1762    ,987     ,-1661   ,153     ,4038    ,-4101   ,-4769   ,11083   ,-4556   ,-7829   ,\n    12309   ,-3756   ,-8259   ,9245    ,-3491   ,-2275   ,6748    ,266     ,-8538   ,2883    ,8879    ,-8631   ,-4469   ,11331   ,-1756   ,\n    -9679   ,9764    ,-5234   ,2339    ,6369    ,-13122  ,4764    ,9323    ,-8706   ,-3088   ,9785    ,-5103   ,-5093   ,7547    ,4289    ,\n    -12139  ,2966    ,6792    ,-4329   ,422     ,1143    ,4315    ,-11730  ,7627    ,5565    ,-10891  ,6587    ,-3273   ,-741    ,3941    ,\n    -12     ,-3314   ,-1514   ,8883    ,-5077   ,-6573   ,9828    ,97      ,-8239   ,5677    ,1101    ,-6910   ,6892    ,4671    ,-12064  ,\n    2417    ,12164   ,-14538  ,6197    ,7399    ,-15800  ,6960    ,5562    ,-3144   ,-5668   ,9477    ,675     ,-16059  ,14389   ,2576    ,\n    -12923  ,8147    ,2693    ,-6997   ,-279    ,9123    ,-3036   ,-9425   ,8895    ,2388    ,-8183   ,4147    ,8517    ,-14366  ,613     ,\n    15717   ,-13873  ,-790    ,11308   ,-9367   ,-1457   ,7581    ,-1870   ,-2418   ,2224    ,3604    ,-7166   ,108     ,4395    ,-6198   ,\n    9998    ,-1877   ,-10869  ,7155    ,5372    ,-6942   ,-163    ,10052   ,-12587  ,-1686   ,14683   ,-10684  ,-1019   ,11771   ,-11037  ,\n    -4034   ,12699   ,-2265   ,-11035  ,11515   ,1749    ,-13986  ,9749    ,2388    ,-4072   ,-731    ,2170    ,7837    ,-13591  ,-811    ,\n    15692   ,-11830  ,-2517   ,10943   ,-6682   ,-1483   ,5064    ,-4673   ,344     ,7281    ,-4145   ,-5118   ,6315    ,-4921   ,2353    ,\n    7478    ,-12609  ,7258    ,2622    ,-11273  ,9535    ,3439    ,-8481   ,4430    ,-1663   ,-1419   ,5788    ,-8396   ,7866    ,-617    ,\n    -9050   ,8775    ,3151    ,-8442   ,-1876   ,13213   ,-9405   ,-3345   ,10750   ,-7327   ,-3438   ,10345   ,-960    ,-11791  ,11196   ,\n    -252    ,-8093   ,5860    ,2762    ,-2857   ,-6081   ,8951    ,2104    ,-10460  ,5556    ,3814    ,-8067   ,5116    ,538     ,-3013   ,\n    2492    ,-802    ,105     ,-3520   ,7811    ,-3121   ,-3288   ,6881    ,-8972   ,2809    ,7987    ,-7510   ,-1727   ,6594    ,-3722   ,\n    -1885   ,1661    ,4565    ,-1581   ,-7391   ,11383   ,-6959   ,-4899   ,12910   ,-8413   ,2234    ,-1175   ,-1255   ,3732    ,-1940   ,\n    5563    ,-9071   ,1772    ,3157    ,1574    ,-662    ,-7404   ,8985    ,-1649   ,-4248   ,4515    ,-2658   ,-1463   ,5277    ,-3193   ,\n    3122    ,1950    ,-9758   ,5258    ,1638    ,-1656   ,-1504   ,4190    ,1698    ,-10700  ,11210   ,-990    ,-8725   ,6095    ,1857    ,\n    1402    ,-4036   ,-3083   ,4551    ,3909    ,-7018   ,1594    ,744     ,-390    ,7106    ,-8650   ,382     ,4534    ,-3716   ,-1332   ,\n    6264    ,1669    ,-13133  ,9417    ,5519    ,-13287  ,7260    ,5395    ,-8411   ,1060    ,2876    ,-5010   ,8398    ,-916    ,-10457  ,\n    8692    ,2289    ,-5454   ,-2471   ,7730    ,717     ,-9593   ,7121    ,171     ,-4574   ,5477    ,-4042   ,1798    ,953     ,-1936   ,\n    368     ,-1379   ,8250    ,-10827  ,3052    ,7748    ,-11670  ,3904    ,8101    ,-7000   ,-4649   ,11812   ,-6274   ,-5561   ,6071    ,\n    4616    ,-7087   ,990     ,4848    ,-8357   ,3751    ,2648    ,1240    ,-5242   ,2830    ,1535    ,-6692   ,5874    ,3635    ,-8514   ,\n    813     ,9069    ,-6943   ,-2514   ,2146    ,7014    ,-5155   ,-7919   ,13545   ,-3829   ,-6183   ,3506    ,2688    ,338     ,-6016   ,\n    3675    ,4061    ,-5875   ,977     ,3260    ,-3321   ,1731    ,-2161   ,4154    ,104     ,-7590   ,8448    ,-1472   ,-4706   ,1168    ,\n    6479    ,-3034   ,-4466   ,7380    ,-8295   ,1698    ,10190   ,-9443   ,-4007   ,12990   ,-7059   ,-4070   ,4881    ,-2100   ,9311    ,\n    -11665  ,-792    ,12438   ,-11662  ,4564    ,5291    ,-11969  ,6845    ,4642    ,-8472   ,3880    ,-690    ,1841    ,964     ,-7401   ,\n    5975    ,3310    ,-7933   ,6633    ,4334    ,-15895  ,9529    ,6575    ,-13041  ,7217    ,1677    ,-5721   ,1659    ,5038    ,-4826   ,\n    2701    ,5776    ,-15979  ,11609   ,2840    ,-12311  ,7774    ,-531    ,2012    ,-2725   ,2072    ,1431    ,-5845   ,3918    ,4165    ,\n    -8176   ,3099    ,7407    ,-12373  ,2049    ,7154    ,895     ,-9494   ,6496    ,2550    ,-10728  ,14792   ,-7242   ,-6750   ,9566    ,\n    2239    ,-10188  ,3701    ,10203   ,-16606  ,10145   ,4138    ,-14295  ,10470   ,4025    ,-10347  ,408     ,11912   ,-7280   ,-7545   ,\n    9230    ,3814    ,-9966   ,1879    ,9972    ,-14188  ,7112    ,5850    ,-13416  ,7065    ,2087    ,-1310   ,-1291   ,2178    ,485     ,\n    -6465   ,12242   ,-5308   ,-12629  ,13876   ,3030    ,-11918  ,2852    ,10694   ,-9234   ,-2902   ,6325    ,3002    ,-4886   ,-4154   ,\n    7782    ,-4647   ,2760    ,859     ,-8452   ,11548   ,-1071   ,-11176  ,8621    ,2112    ,-4105   ,-795    ,7196    ,-3480   ,-10320  ,\n    14632   ,-1978   ,-11014  ,10121   ,-455    ,-6398   ,6243    ,-1287   ,-1998   ,2112    ,-219    ,-1580   ,-1668   ,9788    ,-6692   ,\n    -7034   ,11114   ,1376    ,-9825   ,1290    ,13299   ,-14380  ,-459    ,13549   ,-10004  ,-3592   ,9198    ,-70     ,-9593   ,12523   ,\n    -6046   ,-6625   ,9232    ,-2398   ,-2395   ,5154    ,1109    ,-13205  ,14456   ,-1583   ,-11349  ,9153    ,4391    ,-8573   ,-378    ,\n    9431    ,-8973   ,1776    ,3570    ,-3090   ,-2956   ,8863    ,-2004   ,-10136  ,8187    ,3988    ,-8327   ,3445    ,7555    ,-14759  ,\n    4776    ,10467   ,-10266  ,-2687   ,10699   ,-2238   ,-10118  ,6861    ,7090    ,-12616  ,6924    ,4131    ,-12840  ,14023   ,-5582   ,\n    -5517   ,6238    ,1044    ,-590    ,-4089   ,6113    ,-4166   ,-2049   ,5519    ,-6458   ,6762    ,1826    ,-11441  ,7449    ,122     ,\n    5492    ,-7081   ,-5748   ,14849   ,-9211   ,-1904   ,6618    ,-2788   ,-2356   ,4036    ,-1842   ,-1739   ,491     ,4122    ,2121    ,\n    -10499  ,8928    ,-3724   ,-2704   ,11538   ,-10690  ,856     ,3411    ,-1107   ,-1807   ,1330    ,5346    ,-8032   ,3620    ,906     ,\n    -2172   ,2913    ,-4317   ,3850    ,1063    ,-4286   ,2632    ,-2347   ,1585    ,6017    ,-7386   ,-2930   ,10568   ,-1737   ,-9740   ,\n    6377    ,-561    ,836     ,1651    ,-4417   ,966     ,2039    ,3167    ,-7290   ,3459    ,1605    ,-5510   ,8376    ,-2476   ,-5504   ,\n    5110    ,-574    ,-1210   ,-270    ,-554    ,3035    ,268     ,-2556   ,749     ,2673    ,-2658   ,-1515   ,5881    ,-3564   ,-3310   ,\n    3992    ,-1669   ,7146    ,-7680   ,-3567   ,6924    ,-2922   ,6856    ,-6726   ,-699    ,4688    ,-4121   ,2186    ,106     ,-2657   ,\n    1376    ,6721    ,-5130   ,-6525   ,7059    ,2629    ,-4384   ,-1738   ,2276    ,3661    ,-3976   ,-2505   ,3139    ,5348    ,-5461   ,\n    -5572   ,10672   ,-3465   ,-4728   ,3227    ,4559    ,-5142   ,-4433   ,12563   ,-7099   ,-6108   ,9288    ,-430    ,-6941   ,8011    ,\n    1885    ,-15168  ,12852   ,2224    ,-11342  ,7333    ,1888    ,-5682   ,391     ,8638    ,-7720   ,-1466   ,2758    ,952     ,5758    ,\n    -10954  ,696     ,9280    ,-2615   ,-6258   ,1364    ,5969    ,-3343   ,-4579   ,7252    ,2241    ,-11070  ,4920    ,8837    ,-12714  ,\n    3043    ,5836    ,-4740   ,1412    ,977     ,5124    ,-9765   ,475     ,6057    ,-5845   ,2627    ,6003    ,-6715   ,-2369   ,10152   ,\n    -8354   ,-1780   ,4288    ,3988    ,-2012   ,-10191  ,10238   ,3695    ,-10284  ,1230    ,9831    ,-6313   ,-6670   ,13998   ,-9321   ,\n    -1626   ,11064   ,-11511  ,3174    ,651     ,3407    ,2233    ,-13361  ,11813   ,1504    ,-11470  ,11444   ,-6374   ,1165    ,5148    ,\n    -9895   ,5167    ,4266    ,-2688   ,-6244   ,10683   ,-4504   ,-7323   ,14561   ,-10844  ,-1475   ,11479   ,-7958   ,-2159   ,2907    ,\n    4190    ,-1971   ,-5855   ,7800    ,-3831   ,-2006   ,4840    ,-3468   ,-717    ,2030    ,2993    ,-4043   ,135     ,2459    ,-1162   ,\n    3147    ,-5162   ,3427    ,420     ,-9012   ,12304   ,-5725   ,15      ,8459    ,-14028  ,4778    ,3723    ,1814    ,-2574   ,-6132   ,\n    8397    ,-3567   ,-57     ,832     ,-2999   ,8474    ,-4844   ,-5384   ,4370    ,3659    ,-2830   ,-49     ,3608    ,-7747   ,1515    ,\n    5914    ,-1884   ,-4699   ,9812    ,-5949   ,-7975   ,14608   ,-6945   ,-2693   ,4803    ,-71     ,-4651   ,3396    ,4497    ,-8904   ,\n    2243    ,4662    ,2094    ,-9302   ,1741    ,7674    ,-6727   ,6446    ,-3744   ,-7072   ,9938    ,-34     ,-9363   ,8481    ,3512    ,\n    -12541  ,7142    ,2620    ,-4007   ,1520    ,1956    ,-1358   ,-3561   ,9345    ,-6159   ,-7981   ,10522   ,2908    ,-9718   ,4596    ,\n    2862    ,-7522   ,4821    ,2492    ,-1524   ,-4888   ,9398    ,-1662   ,-13732  ,14481   ,1575    ,-12769  ,6744    ,3566    ,-3260   ,\n    -1212   ,3194    ,962     ,-6809   ,10055   ,-3276   ,-11431  ,11580   ,3024    ,-10941  ,5805    ,4158    ,-7822   ,4473    ,2441    ,\n    -1067   ,-6110   ,3404    ,2208    ,-4212   ,7072    ,-4320   ,-4515   ,9244    ,-4352   ,-3862   ,9782    ,-7984   ,-2219   ,8304    ,\n    40      ,-9572   ,4944    ,8209    ,-11509  ,1251    ,8310    ,-1810   ,-10890  ,9734    ,3628    ,-11225  ,3403    ,9082    ,-7052   ,\n    -5683   ,14325   ,-11299  ,-1844   ,10857   ,-4928   ,-5272   ,7282    ,2452    ,-11191  ,7121    ,1925    ,-7660   ,6146    ,-1221   ,\n    2420    ,3911    ,-14888  ,10449   ,2832    ,-8944   ,2872    ,3893    ,2673    ,-9847   ,2120    ,7981    ,-2191   ,-9705   ,10328   ,\n    -137    ,-10879  ,12166   ,-145    ,-10342  ,6057    ,7782    ,-13402  ,3609    ,9388    ,-9750   ,-1611   ,9556    ,-3157   ,-6916   ,\n    11343   ,-9462   ,-391    ,7500    ,-5086   ,6314    ,-8857   ,5612    ,2769    ,-10999  ,9044    ,1598    ,-6308   ,2327    ,3007    ,\n    -5487   ,3634    ,4595    ,-7975   ,1205    ,1671    ,1782    ,1129    ,-5343   ,5470    ,-1143   ,-4997   ,4749    ,-108    ,-3963   ,\n    7102    ,-2699   ,-6741   ,12089   ,-9171   ,-677    ,11125   ,-10147  ,-1782   ,8327    ,57      ,-9512   ,7572    ,1681    ,-7505   ,\n    3320    ,4159    ,-410    ,-8189   ,9668    ,-1430   ,-7821   ,7907    ,-2636   ,-2141   ,2404    ,5326    ,-8257   ,289     ,10875   ,\n    -12491  ,134     ,10529   ,-6063   ,-5763   ,9952    ,-766    ,-10689  ,10543   ,1040    ,-8786   ,5449    ,-1756   ,250     ,8209    ,\n    -11336  ,-558    ,12426   ,-10106  ,-1290   ,7949    ,-5205   ,-2776   ,7967    ,-1515   ,-5745   ,2126    ,646     ,5310    ,-7154   ,\n    -2014   ,9287    ,-7307   ,4668    ,3056    ,-10027  ,1455    ,6067    ,1436    ,-7534   ,3368    ,3772    ,-6386   ,3973    ,304     ,\n    -2146   ,1447    ,-3413   ,7698    ,-1752   ,-9583   ,8988    ,-429    ,906     ,-1456   ,-3324   ,3910    ,-4421   ,6567    ,-1193   ,\n    -5474   ,4731    ,-548    ,-578    ,-2181   ,3980    ,2608    ,-7613   ,2920    ,3024    ,-6403   ,7704    ,-1303   ,-6360   ,3757    ,\n    525     ,6228    ,-9131   ,-2319   ,12056   ,-5662   ,-6635   ,8173    ,3701    ,-12329  ,5450    ,7680    ,-10732  ,1831    ,3582    ,\n    1470    ,-3909   ,950     ,7817    ,-12957  ,1796    ,11006   ,-6357   ,-5190   ,4572    ,1304    ,136     ,1102    ,-4217   ,5331    ,\n    -3008   ,-3779   ,6082    ,-4109   ,2425    ,3372    ,-7457   ,4320    ,197     ,-4006   ,8105    ,-7412   ,3701    ,3296    ,-9722   ,\n    7956    ,-971    ,-5280   ,5978    ,3196    ,-8005   ,1696    ,148     ,5386    ,-1168   ,-10448  ,13237   ,-3945   ,-6746   ,6984    ,\n    3395    ,-8347   ,3356    ,5908    ,-12379  ,6750    ,6820    ,-9409   ,-1753   ,10426   ,-3551   ,-8471   ,8354    ,4028    ,-9421   ,\n    -839    ,11481   ,-7574   ,-4337   ,12775   ,-9097   ,-4178   ,12060   ,-5939   ,-4155   ,7033    ,-2552   ,-2068   ,3148    ,-1306   ,\n    -2682   ,4016    ,2147    ,-5417   ,803     ,3629    ,-772    ,-3132   ,3551    ,1599    ,-7007   ,2826    ,1427    ,-2600   ,9623    ,\n    -10664  ,523     ,11816   ,-15069  ,6235    ,462     ,4268    ,-1750   ,-10903  ,14465   ,-6029   ,-4871   ,8240    ,1166    ,-10088  ,\n    7035    ,5170    ,-13783  ,7930    ,5159    ,-7254   ,-1083   ,5234    ,-1495   ,-4047   ,6353    ,-261    ,-5895   ,4152    ,266     ,\n    -1792   ,1592    ,-399    ,-259    ,345     ,445     ,-2181   ,761     ,2746    ,-226    ,-4224   ,7506    ,-3408   ,-8360   ,15131   ,\n    -6513   ,-9720   ,12417   ,521     ,-10143  ,6554    ,5823    ,-12661  ,4903    ,8315    ,-9192   ,-1750   ,6074    ,1599    ,-6710   ,\n    6631    ,587     ,-11988  ,11256   ,2831    ,-10521  ,3708    ,7106    ,-7483   ,-1841   ,10663   ,-7053   ,-4563   ,8897    ,-6455   ,\n    1692    ,7676    ,-11793  ,3319    ,4494    ,-2304   ,-1122   ,2326    ,6002    ,-14151  ,3725    ,11533   ,-10635  ,-2725   ,11681   ,\n    -5315   ,-7218   ,9453    ,-216    ,-5301   ,1801    ,6475    ,-8398   ,1808    ,6582    ,-11016  ,4085    ,8368    ,-8163   ,-3164   ,\n    7694    ,-2101   ,1571    ,-2837   ,-2907   ,11665   ,-9142   ,-3651   ,7324    ,-3155   ,2909    ,-1611   ,-1975   ,2757    ,-530    ,\n    -2998   ,6451    ,-2745   ,-4882   ,7097    ,-5052   ,368     ,6713    ,-3333   ,-5828   ,4660    ,1381    ,-4685   ,5697    ,-251    ,\n    -4871   ,2910    ,985     ,-2054   ,-856    ,3070    ,1209    ,-2847   ,-1794   ,8435    ,-3758   ,-10789  ,14016   ,-2414   ,-8116   ,\n    8424    ,-1213   ,-5261   ,5231    ,3344    ,-9585   ,4097    ,3379    ,-3565   ,6563    ,-6272   ,-2778   ,3109    ,3207    ,473     ,\n    -8381   ,5779    ,5400    ,-8290   ,-103    ,9122    ,-8821   ,366     ,5334    ,-4423   ,1847    ,-7      ,-2008   ,1243    ,7655    ,\n    -12305  ,3524    ,8232    ,-11526  ,3545    ,6807    ,-4855   ,-5292   ,10574   ,-4621   ,-5213   ,4060    ,3789    ,-754    ,-8393   ,\n    6661    ,2718    ,-6814   ,6851    ,930     ,-11624  ,8877    ,1569    ,-7017   ,3024    ,4798    ,-1503   ,-9475   ,10309   ,1940    ,\n    -10433  ,4313    ,4044    ,1660    ,-7255   ,591     ,4456    ,-4502   ,6304    ,-2269   ,-4922   ,5106    ,-1449   ,-263    ,637     ,\n    59      ,-764    ,-1183   ,6241    ,-7253   ,848     ,9497    ,-11426  ,708     ,10156   ,-8632   ,-2509   ,11532   ,-7375   ,-4310   ,\n    9347    ,-2755   ,-7460   ,9408    ,-26     ,-8818   ,6615    ,617     ,1665    ,-5249   ,2461    ,2697    ,-6375   ,5489    ,-2253   ,\n    -1940   ,6547    ,-1441   ,-7844   ,6745    ,3270    ,-8063   ,4349    ,-804    ,-2430   ,8750    ,-6070   ,-4721   ,5679    ,1720    ,\n    -1121   ,-3408   ,2820    ,-221    ,-3130   ,6561    ,-2746   ,-4027   ,4950    ,-1182   ,-1575   ,-1042   ,6609    ,-2841   ,-7527   ,\n    7901    ,3372    ,-7406   ,17      ,2292    ,1839    ,2028    ,-7200   ,2866    ,1266    ,1008    ,786     ,-5722   ,3313    ,365     ,\n    1926    ,3003    ,-8785   ,3001    ,3483    ,-3541   ,1384    ,-926    ,5457    ,-6483   ,65      ,4137    ,-2141   ,4069    ,-6221   ,\n    509     ,1882    ,4470    ,-2667   ,-8002   ,9334    ,1536    ,-8467   ,2970    ,7807    ,-8701   ,2684    ,1569    ,-5378   ,8273    ,\n    -8180   ,4645    ,1705    ,-7485   ,12150   ,-7825   ,-4718   ,11376   ,-4933   ,-3872   ,5493    ,-2610   ,-2523   ,7933    ,-2636   ,\n    -8268   ,7724    ,-444    ,336     ,213     ,-5912   ,10877   ,-4743   ,-9507   ,10580   ,2918    ,-10309  ,4623    ,2627    ,-2703   ,\n    4619    ,-7866   ,3231    ,3287    ,-4298   ,2621    ,-829    ,-33     ,1217    ,-3929   ,4863    ,2674    ,-10859  ,7525    ,5084    ,\n    -11284  ,3046    ,8238    ,-6916   ,-3237   ,8752    ,-4701   ,-2546   ,5949    ,-6198   ,4803    ,2739    ,-8942   ,2823    ,6553    ,\n    -2302   ,-8636   ,9751    ,811     ,-11340  ,10797   ,519     ,-9192   ,4928    ,6121    ,-5281   ,-5472   ,7513    ,2141    ,-8568   ,\n    7216    ,392     ,-10296  ,11769   ,-1775   ,-9173   ,10555   ,533     ,-10799  ,7456    ,5601    ,-10655  ,1366    ,6589    ,-4174   ,\n    516     ,7233    ,-13512  ,4466    ,10310   ,-12868  ,2134    ,6193    ,678     ,-9128   ,4393    ,6090    ,-9055   ,3675    ,2581    ,\n    -4092   ,-542    ,7092    ,-2860   ,-8418   ,11267   ,-1046   ,-9947   ,11572   ,-2553   ,-8781   ,9092    ,2223    ,-8786   ,2479    ,\n    7681    ,-7361   ,-1360   ,6383    ,-4810   ,2050    ,4776    ,-8136   ,157     ,5558    ,-2130   ,-3755   ,5989    ,314     ,-6877   ,\n    2613    ,6879    ,-4647   ,-6763   ,13161   ,-7279   ,-5888   ,13459   ,-6299   ,-6270   ,7482    ,3717    ,-8344   ,-1042   ,11106   ,\n    -7507   ,-4076   ,11277   ,-8975   ,-940    ,7971    ,-1853   ,-7387   ,6600    ,4675    ,-11254  ,6831    ,-806    ,-4783   ,8140    ,\n    -536    ,-8517   ,7378    ,1306    ,-8169   ,5030    ,1397    ,27      ,-2921   ,3208    ,1820    ,-8120   ,6815    ,3165    ,-9702   ,\n    5036    ,1877    ,-5739   ,4122    ,5035    ,-6222   ,-4844   ,12237   ,-5097   ,-6511   ,9795    ,-3979   ,-4836   ,6929    ,2914    ,\n    -9802   ,2889    ,4755    ,-3701   ,2289    ,-1235   ,1300    ,-1544   ,1303    ,1095    ,-2406   ,858     ,-4354   ,7024    ,-510    ,\n    -5703   ,2971    ,2069    ,2036    ,-7247   ,3149    ,4633    ,-5586   ,873     ,2911    ,-2475   ,-44     ,-683    ,2711    ,1638    ,\n    -5365   ,3597    ,-911    ,3221    ,-3386   ,-5814   ,8987    ,-1406   ,-1909   ,-1351   ,5061    ,1702    ,-12521  ,10023   ,2494    ,\n    -10357  ,7959    ,-618    ,-2832   ,154     ,1271    ,5179    ,-8921   ,1439    ,8486    ,-10995  ,9046    ,163     ,-11520  ,8713    ,\n    1101    ,1605    ,-7424   ,4221    ,3026    ,-8693   ,8186    ,511     ,-5285   ,1178    ,2708    ,-2097   ,891     ,-1031   ,-836    ,\n    5183    ,-715    ,-7606   ,5054    ,4394    ,-8841   ,6407    ,353     ,-5824   ,2926    ,5341    ,-4541   ,-3497   ,7043    ,-3993   ,\n    -1918   ,3051    ,3417    ,-6529   ,270     ,8055    ,-6394   ,-437    ,1561    ,467     ,-373    ,-1509   ,3957    ,-2255   ,-3606   ,\n    5630    ,2605    ,-10105  ,6406    ,5776    ,-12116  ,4376    ,3373    ,-592    ,-1894   ,1144    ,2454    ,-5239   ,1903    ,1464    ,\n    -608    ,-370    ,726     ,-329    ,296     ,-333    ,614     ,-453    ,417     ,-1450   ,-285    ,7645    ,-8368   ,-1515   ,8380    ,\n    -3552   ,-4180   ,8172    ,-1422   ,-11403  ,12504   ,428     ,-10944  ,8657    ,2950    ,-10207  ,4441    ,6979    ,-7978   ,636     ,\n    1552    ,2090    ,-2899   ,-900    ,6406    ,-9062   ,7069    ,2050    ,-11209  ,9727    ,-1328   ,-4593   ,7925    ,-6513   ,-352    ,\n    6163    ,-3817   ,-1797   ,1186    ,5122    ,-7019   ,2899    ,5145    ,-11475  ,7187    ,4308    ,-6944   ,-1443   ,4947    ,4226    ,\n    -9125   ,273     ,6936    ,-1986   ,-4448   ,5976    ,34      ,-7511   ,4813    ,-23     ,2725    ,-3182   ,-847    ,2260    ,-2155   ,\n    5169    ,-4371   ,-2399   ,7113    ,-3095   ,-3244   ,4562    ,-3399   ,3676    ,-1504   ,-2769   ,5305    ,-3966   ,-1386   ,6422    ,\n    -1912   ,-6605   ,5974    ,1360    ,-1393   ,-3317   ,1227    ,5412    ,-5088   ,-1834   ,5979    ,-2074   ,-5551   ,9424    ,-4147   ,\n    -5496   ,10128   ,-5525   ,-2668   ,8893    ,-6358   ,-1863   ,3496    ,-2176   ,6158    ,-5016   ,-2099   ,4381    ,-3145   ,-113    ,\n    5999    ,-1804   ,-9220   ,9932    ,958     ,-9612   ,6202    ,4709    ,-5815   ,-3939   ,7640    ,1037    ,-7913   ,3301    ,6391    ,\n    -7106   ,-2450   ,10240   ,-6994   ,-2144   ,5838    ,-1957   ,4024    ,-7225   ,641     ,3540    ,-3817   ,8286    ,-5178   ,-7013   ,\n    12456   ,-5738   ,-4519   ,8171    ,-4244   ,4355    ,-4330   ,-2116   ,5514    ,-3020   ,587     ,428     ,328     ,-1643   ,310     ,\n    746     ,5845    ,-7406   ,-2406   ,10505   ,-9885   ,1782    ,4362    ,-1609   ,-1493   ,443     ,6134    ,-10777  ,5498    ,7007    ,\n    -15148  ,8691    ,5803    ,-11262  ,3530    ,5314    ,-2789   ,-4496   ,6828    ,688     ,-8803   ,7048    ,-458    ,-3912   ,4330    ,\n    -1490   ,-500    ,888     ,122     ,-2246   ,2727    ,3636    ,-9264   ,4769    ,6120    ,-10163  ,2335    ,6126    ,-2474   ,-6132   ,\n    8021    ,611     ,-9664   ,8506    ,-1782   ,-3330   ,2319    ,4596    ,-4061   ,-4317   ,10634   ,-9204   ,209     ,4514    ,-1027   ,\n    815     ,-2060   ,5628    ,-9248   ,4189    ,5024    ,-9191   ,5222    ,3693    ,-5580   ,-193    ,4758    ,-4008   ,1232    ,601     ,\n    -651    ,-1056   ,1426    ,5990    ,-10584  ,3982    ,5259    ,-8631   ,3527    ,5254    ,-4110   ,-5643   ,9561    ,-862    ,-9870   ,\n    9353    ,1775    ,-10960  ,9535    ,1089    ,-9975   ,7687    ,-400    ,-733    ,-940    ,3491    ,-282    ,-8753   ,9194    ,-683    ,\n    -5109   ,3620    ,836     ,1582    ,-4234   ,-289    ,2324    ,-3779   ,7679    ,-3832   ,-5782   ,11516   ,-7044   ,-4451   ,8547    ,\n    363     ,-8093   ,4411    ,5884    ,-10340  ,4460    ,3075    ,-7105   ,7046    ,-149    ,-8355   ,8694    ,1505    ,-9196   ,3439    ,\n    6058    ,-5184   ,-2380   ,6558    ,-3533   ,-3548   ,8309    ,-1018   ,-10428  ,6547    ,3993    ,-3796   ,-1371   ,3434    ,1902    ,\n    -8721   ,9756    ,-2764   ,-7484   ,6451    ,3110    ,-2433   ,-5879   ,8961    ,-4314   ,-2564   ,2941    ,1916    ,-611    ,-6174   ,\n    6271    ,-577    ,-1289   ,2478    ,-33     ,-2090   ,-959    ,-1286   ,4633    ,1346    ,-6691   ,4285    ,-934    ,-1815   ,3330    ,\n    -753    ,-211    ,-15     ,594     ,-234    ,-1029   ,2226    ,-612    ,-2179   ,3586    ,-621    ,-6287   ,4167    ,6110    ,-7216   ,\n    -1677   ,6045    ,1751    ,-6432   ,-928    ,10620   ,-8749   ,-3118   ,11243   ,-6986   ,-3797   ,7167    ,452     ,-5383   ,3993    ,\n    210     ,-1719   ,996     ,-4675   ,7882    ,-2120   ,-5331   ,3854    ,70      ,5585    ,-8029   ,-995    ,9486    ,-7782   ,1233    ,\n    1752    ,-1220   ,1793    ,-2382   ,2140    ,-3510   ,4636    ,2204    ,-9442   ,5165    ,5758    ,-7504   ,-1063   ,8520    ,-6826   ,\n    -364    ,4750    ,-3528   ,267     ,-708    ,6661    ,-5262   ,-3983   ,5245    ,231     ,-1386   ,1947    ,2777    ,-8802   ,5727    ,\n    1638    ,-6974   ,4849    ,3779    ,-3014   ,-6212   ,7243    ,2216    ,-6094   ,-131    ,4458    ,2085    ,-8044   ,3049    ,3048    ,\n    -2191   ,1148    ,-3076   ,902     ,5403    ,-3247   ,-5341   ,9351    ,-4238   ,-4114   ,6420    ,-3806   ,-596    ,3290    ,626     ,\n    -3203   ,1482    ,302     ,-376    ,2295    ,-2583   ,118     ,-679    ,822     ,1161    ,-3266   ,5981    ,-4852   ,-773    ,8466    ,\n    -9472   ,2230    ,3692    ,-4051   ,2727    ,-1842   ,840     ,3033    ,-4772   ,199     ,5679    ,-4399   ,-1326   ,3978    ,-2335   ,\n    212     ,-1526   ,3636    ,2458    ,-7560   ,639     ,7677    ,-3455   ,-5267   ,7504    ,-4891   ,-865    ,8061    ,-6612   ,-1522   ,\n    5609    ,-3574   ,381     ,690     ,-2613   ,7812    ,-5445   ,-5051   ,9771    ,-2060   ,-6984   ,7499    ,-1746   ,-4859   ,5802    ,\n    -2089   ,3006    ,-3659   ,3080    ,1376    ,-10348  ,9281    ,2986    ,-8858   ,2216    ,7965    ,-7596   ,-1330   ,7762    ,-7367   ,\n    709     ,7132    ,-3826   ,-5647   ,5091    ,4924    ,-6781   ,-1838   ,3996    ,3397    ,-2717   ,-5659   ,5295    ,3636    ,-4723   ,\n    -3198   ,4557    ,4158    ,-7313   ,636     ,7407    ,-7216   ,-470    ,5742    ,-3666   ,-1380   ,1807    ,3524    ,-4557   ,228     ,\n    8098    ,-11070  ,37      ,10535   ,-6142   ,-4892   ,6989    ,2331    ,-10488  ,8956    ,1271    ,-9582   ,6520    ,-449    ,4592    ,\n    -6410   ,-3239   ,12514   ,-8887   ,-1430   ,6628    ,-6989   ,3817    ,4550    ,-8100   ,741     ,6463    ,-1814   ,-3291   ,-130    ,\n    2621    ,-1258   ,1322    ,2478    ,-6511   ,3265    ,1373    ,-2185   ,-562    ,3134    ,2534    ,-8162   ,5081    ,1248    ,-4355   ,\n    3704    ,-1365   ,-2333   ,6309    ,-1689   ,-8103   ,9318    ,788     ,-8664   ,4722    ,5602    ,-7772   ,-562    ,9910    ,-10236  ,\n    1077    ,8513    ,-8051   ,-63     ,3149    ,-554    ,38      ,4147    ,-5288   ,-3526   ,8097    ,-1742   ,-4982   ,3040    ,2810    ,\n    -2567   ,-358    ,1694    ,362     ,-2937   ,2389    ,-236    ,-854    ,7403    ,-10413  ,-2600   ,11819   ,-4973   ,-5060   ,5826    ,\n    2230    ,-6719   ,2356    ,6699    ,-8834   ,1431    ,6368    ,-7198   ,631     ,3203    ,2917    ,-6660   ,1364    ,6828    ,-8937   ,\n    3462    ,1921    ,-2615   ,-591    ,4216    ,-356    ,-8066   ,9770    ,-1091   ,-7218   ,4638    ,3172    ,-1318   ,-5593   ,4886    ,\n    1511    ,-5168   ,4151    ,-1057   ,-2828   ,5987    ,-1870   ,-6393   ,6999    ,2547    ,-8891   ,5424    ,2133    ,-7708   ,5257    ,\n    4188    ,-6745   ,-946    ,8903    ,-6186   ,-5001   ,11352   ,-5112   ,-4308   ,4072    ,1684    ,-1515   ,-957    ,7033    ,-9849   ,\n    -406    ,7462    ,227     ,-5690   ,-627    ,10086   ,-10129  ,1440    ,5418    ,-4596   ,136     ,3101    ,-3080   ,-350    ,6388    ,\n    -6670   ,969     ,1993    ,-2926   ,5391    ,-1513   ,-6381   ,9119    ,-2262   ,-6711   ,5431    ,-75     ,2741    ,-4780   ,645     ,\n    2542    ,-2172   ,1353    ,-366    ,-193    ,-1958   ,6278    ,-2889   ,-6643   ,8584    ,720     ,-7426   ,1820    ,7264    ,-4022   ,\n    -5506   ,4202    ,3326    ,-1782   ,-2638   ,1742    ,-1563   ,1310    ,2009    ,-2501   ,1475    ,927     ,-1563   ,-663    ,4561    ,\n    -4257   ,-2312   ,4292    ,-926    ,-1528   ,478     ,6384    ,-8402   ,636     ,6190    ,-5891   ,5347    ,-3102   ,-4022   ,7176    ,\n    811     ,-7743   ,2849    ,3987    ,-1742   ,-2650   ,2569    ,3509    ,-8425   ,6504    ,1422    ,-8037   ,3169    ,6604    ,-5616   ,\n    -2828   ,9327    ,-7307   ,-2612   ,9741    ,-4353   ,-5501   ,9704    ,-4942   ,-5371   ,9074    ,-152    ,-7468   ,2776    ,3651    ,\n    -3092   ,2226    ,-1270   ,1112    ,-1052   ,1987    ,-2804   ,-2520   ,6745    ,-2880   ,-2992   ,3352    ,3872    ,-7610   ,2426    ,\n    4945    ,-7777   ,3772    ,4946    ,-6101   ,-1420   ,6271    ,-3266   ,-1091   ,1393    ,-2046   ,5334    ,-1816   ,-5872   ,4982    ,\n    4358    ,-7176   ,213     ,4121    ,967     ,-1389   ,-5771   ,6362    ,1232    ,-6280   ,3208    ,4385    ,-5536   ,63      ,3675    ,\n    -2335   ,-20     ,364     ,1635    ,-2103   ,-996    ,2400    ,2699    ,-3097   ,-1823   ,770     ,2212    ,1887    ,-5436   ,2713    ,\n    1223    ,-2095   ,1494    ,-394    ,245     ,-476    ,622     ,28      ,-1941   ,3572    ,353     ,-5845   ,4590    ,2757    ,-6801   ,\n    3670    ,3581    ,-7576   ,3406    ,4392    ,-7447   ,5626    ,280     ,-7012   ,9213    ,-4527   ,-3324   ,6836    ,-4380   ,3816    ,\n    -1295   ,-4917   ,5781    ,-1213   ,-1785   ,2170    ,-745    ,-181    ,281     ,16      ,214     ,-199    ,-1291   ,819     ,5618    ,\n    -6279   ,-3534   ,10459   ,-4924   ,-3963   ,5854    ,-4692   ,3874    ,907     ,-5956   ,8392    ,-5896   ,-1603   ,7404    ,-6721   ,\n    1016    ,2676    ,-65     ,1036    ,-2073   ,-112    ,-967    ,-736    ,6247    ,-1951   ,-7463   ,6594    ,3766    ,-8128   ,1793    ,\n    7043    ,-7439   ,-1175   ,7881    ,-4499   ,-4088   ,7886    ,-364    ,-8787   ,7706    ,2323    ,-8246   ,4140    ,3667    ,-6600   ,\n    2996    ,3580    ,-7129   ,4242    ,933     ,-1365   ,-602    ,4465    ,-884    ,-9918   ,9412    ,2321    ,-8145   ,2369    ,6210    ,\n    -7032   ,1800    ,5510    ,-9296   ,4649    ,3882    ,-6208   ,538     ,6536    ,-5376   ,-3599   ,10430   ,-6569   ,-3099   ,5725    ,\n    -1567   ,148     ,106     ,40      ,-134    ,318     ,-1124   ,6676    ,-8710   ,-2131   ,10459   ,-7671   ,4897    ,-3369   ,-3398   ,\n    9642    ,-5025   ,-3550   ,2527    ,5328    ,-3809   ,-5962   ,10744   ,-5164   ,-4750   ,6835    ,-2072   ,421     ,385     ,995     ,\n    -3320   ,2987    ,1976    ,-6754   ,2940    ,2035    ,-2533   ,-596    ,6626    ,-4934   ,-4789   ,10364   ,-5057   ,-5327   ,9384    ,\n    -1579   ,-8406   ,9006    ,124     ,-7940   ,4422    ,4431    ,-5488   ,-665    ,8357    ,-9004   ,-1415   ,9302    ,-3930   ,-5709   ,\n    8165    ,-1623   ,-5796   ,8996    ,-5601   ,-2593   ,4553    ,2489    ,-5170   ,-721    ,8368    ,-7917   ,-274    ,5385    ,-3835   ,\n    -1654   ,6642    ,-3379   ,-4947   ,7096    ,-1392   ,-2825   ,2069    ,2212    ,-3798   ,64      ,6075    ,-5768   ,-3392   ,9074    ,\n    -4699   ,-2368   ,5441    ,-4624   ,3035    ,-2321   ,2141    ,2392    ,-7448   ,6160    ,-147    ,-5033   ,4609    ,3133    ,-6521   ,\n    -458    ,8249    ,-5412   ,-4178   ,7584    ,-693    ,-4977   ,1859    ,876     ,470     ,1287    ,-1491   ,-1558   ,4594    ,-2093   ,\n    -3935   ,6635    ,-4650   ,-427    ,3518    ,-2027   ,-58     ,-1216   ,5947    ,-3542   ,-5602   ,8988    ,-792    ,-9064   ,9554    ,\n    69      ,-8570   ,5680    ,2877    ,-1489   ,-6478   ,7899    ,1540    ,-9089   ,5414    ,1098    ,-3024   ,-92     ,5033    ,-1672   ,\n    -3860   ,2873    ,-1684   ,347     ,5025    ,-5205   ,-673    ,5215    ,-3938   ,2475    ,-3742   ,900     ,5868    ,-6008   ,-775    ,\n    3548    ,3058    ,-6150   ,-75     ,5414    ,-3400   ,-2005   ,4020    ,1910    ,-7879   ,5119    ,3157    ,-5162   ,-1260   ,4312    ,\n    2870    ,-8817   ,4605    ,1500    ,-1362   ,-898    ,4240    ,-452    ,-9046   ,8778    ,-3314   ,-1861   ,7746    ,-4768   ,-4958   ,\n    7836    ,-441    ,-5948   ,3414    ,1308    ,1381    ,-4487   ,1007    ,3350    ,-5530   ,5329    ,1326    ,-6895   ,2574    ,3844    ,\n    -3805   ,1898    ,5323    ,-10774  ,3985    ,4768    ,-7681   ,4975    ,4014    ,-6833   ,-1055   ,7604    ,-3691   ,-4256   ,5192    ,\n    2401    ,-6293   ,2396    ,1927    ,-2901   ,300     ,4779    ,-3515   ,-3850   ,10194   ,-8400   ,-1536   ,7385    ,-2408   ,-2553   ,\n    1310    ,4798    ,-7278   ,1715    ,7815    ,-10539  ,1306    ,7542    ,-5774   ,2009    ,-1289   ,-807    ,4913    ,-3779   ,-1094   ,\n    1636    ,-609    ,3875    ,-4093   ,617     ,6078    ,-11611  ,6103    ,2363    ,-3178   ,6644    ,-10224  ,3275    ,2471    ,2265    ,\n    -1302   ,-7807   ,10591   ,-2911   ,-5123   ,5970    ,-1438   ,-1910   ,1939    ,220     ,-1879   ,756     ,3655    ,-4112   ,-1104   ,\n    2789    ,-10     ,3753    ,-6453   ,-689    ,7962    ,-6139   ,-296    ,3883    ,-3928   ,3227    ,430     ,-4596   ,3777    ,2045    ,\n    -5166   ,3376    ,-2289   ,1945    ,3341    ,-8309   ,4650    ,1009    ,2226    ,-5975   ,1763    ,6111    ,-8917   ,3977    ,1484    ,\n    -2105   ,-982    ,5106    ,-2717   ,-4353   ,5116    ,2673    ,-4778   ,-3016   ,7733    ,-5106   ,3392    ,-647    ,-4102   ,8822    ,\n    -8527   ,1023    ,4196    ,-4384   ,4104    ,590     ,-5764   ,3273    ,3928    ,-4654   ,-947    ,2887    ,2313    ,-5961   ,2288    ,\n    2283    ,-1137   ,-415    ,3165    ,502     ,-10502  ,9940    ,1322    ,-8239   ,3734    ,4064    ,-2042   ,-2602   ,1378    ,62      ,\n    2115    ,-1997   ,-1088   ,1460    ,2481    ,-2244   ,-3398   ,6547    ,-2558   ,-4126   ,8462    ,-7073   ,647     ,7446    ,-9532   ,\n    1933    ,6442    ,-3401   ,-5877   ,7733    ,1243    ,-9094   ,5676    ,4363    ,-8313   ,1744    ,7663    ,-6988   ,-2213   ,4691    ,\n    3587    ,-7210   ,934     ,6820    ,-9962   ,5885    ,4089    ,-9775   ,4659    ,5110    ,-6789   ,-1566   ,8558    ,-3582   ,-6250   ,\n    6588    ,-1149   ,1855    ,-753    ,-5121   ,2913    ,2635    ,915     ,-6215   ,4503    ,756     ,-4028   ,3978    ,-1766   ,250     ,\n    -2002   ,4437    ,-1168   ,-4623   ,9470    ,-7199   ,-3082   ,7304    ,-1945   ,-1112   ,-370    ,3747    ,-3852   ,-203    ,7385    ,\n    -9372   ,-1141   ,9903    ,-4907   ,-3604   ,3066    ,5136    ,-5870   ,-2846   ,8614    ,-6055   ,-668    ,3355    ,557     ,-3352   ,\n    4618    ,739     ,-10164  ,9836    ,-1450   ,-4233   ,4061    ,-1407   ,-1871   ,4165    ,1379    ,-7747   ,3682    ,5117    ,-5044   ,\n    -2362   ,7744    ,-4445   ,-3343   ,6364    ,-4774   ,1303    ,4693    ,-5002   ,-2448   ,6063    ,905     ,-7103   ,2541    ,5980    ,\n    -4823   ,-3881   ,7136    ,65      ,-7600   ,8171    ,-613    ,-7984   ,6391    ,3355    ,-4776   ,-1549   ,3037    ,-1485   ,3398    ,\n    -613    ,-5960   ,5653    ,1729    ,-5921   ,1408    ,6033    ,-3739   ,-5682   ,8406    ,-284    ,-7342   ,6697    ,-978    ,-5075   ,\n    6971    ,534     ,-7335   ,2726    ,4496    ,-3177   ,-1346   ,1900    ,2389    ,-3062   ,-240    ,3705    ,-5083   ,1558    ,2368    ,\n    -2183   ,-780    ,2557    ,3567    ,-8086   ,1327    ,7922    ,-7008   ,-572    ,5276    ,-6252   ,4117    ,3228    ,-7356   ,2255    ,\n    2761    ,-1384   ,797     ,-876    ,-1068   ,5431    ,-5060   ,-3261   ,8054    ,-3914   ,-1146   ,2291    ,-3291   ,6578    ,-5050   ,\n    -1102   ,8147    ,-10502  ,3850    ,5699    ,-7236   ,-163    ,6768    ,-2458   ,-5636   ,4289    ,3870    ,-3290   ,-5438   ,9112    ,\n    -1975   ,-6262   ,7197    ,-4165   ,-57     ,5642    ,-4388   ,-2988   ,4483    ,2863    ,-5674   ,631     ,3134    ,-3489   ,2848    ,\n    -407    ,-1215   ,161     ,192     ,4087    ,-6119   ,764     ,3825    ,-2359   ,4738    ,-6747   ,578     ,6896    ,-7431   ,1751    ,\n    2784    ,-2512   ,687     ,709     ,46      ,-1644   ,1577    ,1641    ,-3496   ,1988    ,438     ,-1734   ,111     ,2006    ,3658    ,\n    -7735   ,166     ,6134    ,-2482   ,-2167   ,2171    ,2772    ,-5712   ,2254    ,5242    ,-8076   ,2250    ,2842    ,-2226   ,-596    ,\n    1577    ,2621    ,-6435   ,7931    ,-3562   ,-5106   ,5594    ,586     ,695     ,-5683   ,7526    ,-3648   ,-5045   ,8802    ,-1356   ,\n    -6411   ,5766    ,135     ,-3500   ,4426    ,-5572   ,3615    ,3788    ,-5965   ,-1036   ,6255    ,-1318   ,-5649   ,3345    ,3447    ,\n    -3939   ,225     ,6390    ,-7726   ,-1996   ,8533    ,-2133   ,-5461   ,3443    ,2705    ,-3827   ,3467    ,2336    ,-8176   ,995     ,\n    7585    ,-4039   ,-3495   ,5348    ,-523    ,-5519   ,7052    ,-2178   ,-4358   ,8089    ,-6329   ,1773    ,3404    ,-6910   ,3984    ,\n    3586    ,-3790   ,-858    ,1396    ,-169    ,1583    ,-2296   ,817     ,880     ,-2916   ,4791    ,156     ,-5778   ,4077    ,1283    ,\n    -4380   ,2818    ,-106    ,1496    ,478     ,-4761   ,1118    ,5553    ,-2521   ,-5661   ,8846    ,-4297   ,-2088   ,6162    ,-8051   ,\n    5643    ,3188    ,-8957   ,4214    ,5036    ,-5305   ,-2288   ,4176    ,2763    ,-4815   ,-1557   ,4338    ,2342    ,-6404   ,2036    ,\n    4334    ,-5615   ,1918    ,318     ,2567    ,-2638   ,-2342   ,5281    ,-1766   ,-3239   ,2486    ,609     ,982     ,467     ,-3390   ,\n    2242    ,-2067   ,3104    ,-720    ,-3443   ,4888    ,-1177   ,-2867   ,1714    ,4164    ,-6438   ,2248    ,3261    ,-4998   ,3116    ,\n    -1331   ,2874    ,-3295   ,-1280   ,6592    ,-5422   ,-1848   ,6567    ,-1323   ,-6632   ,7214    ,-970    ,-4697   ,2403    ,3069    ,\n    -256    ,-6183   ,6723    ,-2154   ,-3990   ,6889    ,-1234   ,-4171   ,1112    ,3208    ,-3311   ,398     ,4432    ,-4986   ,221     ,\n    4303    ,-4931   ,973     ,5488    ,-5009   ,-1474   ,5080    ,-4574   ,515     ,6261    ,-5711   ,-2998   ,7932    ,-2194   ,-6408   ,\n    7986    ,-508    ,-7769   ,7163    ,1382    ,-6316   ,1651    ,4556    ,-1518   ,-5363   ,6476    ,983     ,-8558   ,5864    ,3933    ,\n    -7868   ,1738    ,4910    ,-2903   ,-2173   ,3247    ,2085    ,-7349   ,6167    ,486     ,-6121   ,6225    ,-3079   ,487     ,15      ,\n    2332    ,-2900   ,-544    ,3200    ,-1180   ,3752    ,-6458   ,1067    ,1282    ,3185    ,-3273   ,-1083   ,6584    ,-7836   ,1340    ,\n    4902    ,-833    ,-5669   ,3876    ,3981    ,-7241   ,1800    ,5938    ,-5024   ,-3382   ,7259    ,-485    ,-4646   ,189     ,4379    ,\n    -1044   ,-3685   ,4179    ,-2285   ,-1118   ,6074    ,-4335   ,-2231   ,5317    ,-3443   ,-2000   ,5697    ,-618    ,-4862   ,1259    ,\n    6404    ,-6181   ,-1535   ,7913    ,-8477   ,4272    ,2632    ,-7141   ,5061    ,1311    ,-3617   ,-681    ,5501    ,-2653   ,-4313   ,\n    5465    ,2140    ,-7576   ,3276    ,5592    ,-7791   ,1054    ,4661    ,-589    ,-5657   ,5472    ,1885    ,-8931   ,7983    ,481     ,\n    -7672   ,6893    ,770     ,-7313   ,7559    ,-1252   ,-5664   ,5383    ,-204    ,-965    ,-119    ,1109    ,-122    ,-1622   ,2124    ,\n    788     ,-4016   ,4045    ,341     ,-5316   ,3512    ,1438    ,-2963   ,1208    ,3856    ,-5374   ,-658    ,6158    ,-3225   ,-1933   ,\n    1788    ,2150    ,-175    ,-5497   ,5464    ,869     ,-7613   ,6522    ,1782    ,-5329   ,2168    ,509     ,-1723   ,1966    ,3226    ,\n    -4232   ,-2878   ,7020    ,-4474   ,-520    ,5628    ,-5144   ,-1404   ,5159    ,372     ,-6771   ,5405    ,1446    ,-4987   ,1524    ,\n    1692    ,224     ,-2409   ,6478    ,-5874   ,-2852   ,8378    ,-5995   ,653     ,2895    ,-2347   ,617     ,470     ,42      ,-1748   ,\n    2280    ,2386    ,-7069   ,4793    ,3160    ,-7477   ,2812    ,4126    ,-2525   ,-4595   ,8779    ,-4290   ,-5643   ,10785   ,-6513   ,\n    -2378   ,7589    ,-2153   ,-4349   ,1897    ,2011    ,817     ,-3174   ,796     ,1890    ,-3964   ,5588    ,-752    ,-6210   ,5229    ,\n    3262    ,-7268   ,2564    ,3949    ,-4930   ,1247    ,1730    ,-3250   ,2826    ,3656    ,-8265   ,4320    ,2739    ,-6713   ,3863    ,\n    4166    ,-6044   ,-270    ,6123    ,-5131   ,-1277   ,4059    ,1866    ,-6070   ,938     ,4566    ,-2006   ,-1897   ,1788    ,1209    ,\n    -3268   ,6812    ,-5114   ,-5037   ,6875    ,1739    ,-3604   ,-2573   ,5750    ,-2541   ,-1536   ,3092    ,-1845   ,493     ,61      ,\n    506     ,-1414   ,693     ,3485    ,-4745   ,1134    ,1547    ,-2216   ,4005    ,-3182   ,-414    ,2309    ,-1431   ,314     ,-1400   ,\n    2167    ,617     ,-1089   ,-1188   ,3847    ,362     ,-7355   ,3403    ,3187    ,664     ,-3488   ,-2491   ,6768    ,-1138   ,-4004   ,\n    1641    ,420     ,2314    ,-2061   ,-2656   ,4926    ,-1093   ,-3012   ,3052    ,-387    ,-2383   ,2205    ,212     ,3154    ,-4237   ,\n    -4168   ,8563    ,-2010   ,-5252   ,4259    ,3077    ,-5886   ,1688    ,1981    ,-623    ,2907    ,-6419   ,1891    ,2926    ,-2485   ,\n    1194    ,-92     ,-216    ,170     ,110     ,42      ,-305    ,-1078   ,3995    ,-2371   ,-3990   ,6619    ,-706    ,-5706   ,3482    ,\n    4503    ,-6878   ,1394    ,4355    ,-5881   ,4731    ,-621    ,-4623   ,4042    ,137     ,479     ,-2884   ,3028    ,959     ,-5079   ,\n    6746    ,-4461   ,-2778   ,4339    ,819     ,-2650   ,2712    ,2436    ,-8897   ,5528    ,667     ,82      ,-1120   ,-1416   ,2515    ,\n    -2036   ,4063    ,-4290   ,-40     ,4258    ,-2895   ,-1075   ,2648    ,-1278   ,-184    ,817     ,-438    ,-1442   ,1998    ,3971    ,\n    -7642   ,1430    ,4535    ,-2221   ,-1381   ,1595    ,2829    ,-6000   ,3263    ,2642    ,-7372   ,5943    ,1096    ,-5079   ,1431    ,\n    3838    ,-326    ,-6290   ,5347    ,1905    ,-6656   ,3454    ,4630    ,-6488   ,-396    ,5955    ,-2338   ,-3816   ,4327    ,3064    ,\n    -7621   ,2126    ,3818    ,-3697   ,1048    ,1323    ,-2755   ,3591    ,-566    ,-3679   ,2254    ,2700    ,-734    ,-5483   ,7906    ,\n    -3812   ,-3043   ,7914    ,-7253   ,-12     ,6424    ,-2440   ,-5018   ,4289    ,2045    ,-3495   ,916     ,1731    ,-293    ,-3768   ,\n    5375    ,977     ,-9774   ,9012    ,635     ,-7657   ,5236    ,1372    ,-2638   ,-265    ,4514    ,-3765   ,-1193   ,4995    ,-5153   ,\n    -354    ,6592    ,-4107   ,-3246   ,4686    ,-6      ,-2612   ,4863    ,-3974   ,-1670   ,7931    ,-8756   ,836     ,5362    ,-536    ,\n    -4952   ,1757    ,5197    ,-7808   ,5948    ,-338    ,-4499   ,2702    ,2744    ,-1025   ,-4925   ,3995    ,1587    ,-1998   ,-353    ,\n    1225    ,-100    ,-441    ,1297    ,-1190   ,891     ,-15     ,-3775   ,4509    ,701     ,-4790   ,2321    ,1092    ,-152    ,141     ,\n    89      ,298     ,-1007   ,1987    ,-1028   ,-2651   ,1329    ,853     ,3628    ,-5021   ,-75     ,4436    ,-4586   ,1850    ,2060    ,\n    -3402   ,-36     ,5637    ,-4303   ,-3021   ,4784    ,2105    ,-4826   ,-778    ,5560    ,-4624   ,1128    ,1413    ,-1016   ,-1438   ,\n    2355    ,2717    ,-8059   ,6493    ,1753    ,-8270   ,6751    ,1624    ,-7494   ,4429    ,3361    ,-4611   ,647     ,1206    ,-675    ,\n    -505    ,4477    ,-4425   ,-1589   ,3114    ,-750    ,3525    ,-5297   ,1991    ,220     ,434     ,1457    ,-4155   ,1931    ,2616    ,\n    93      ,-6116   ,7019    ,-855    ,-5305   ,4348    ,-1174   ,1868    ,-1293   ,888     ,-2888   ,2162    ,2631    ,-4991   ,1381    ,\n    3130    ,1132    ,-7177   ,4454    ,3613    ,-6958   ,3451    ,1526    ,-3720   ,1506    ,1970    ,-214    ,-2811   ,3198    ,3352    ,\n    -10124  ,4810    ,2710    ,-2615   ,1819    ,-961    ,1093    ,-2797   ,7652    ,-7918   ,-2200   ,7999    ,-4478   ,3473    ,-4626   ,\n    1945    ,1622    ,-1956   ,1132    ,-1563   ,3567    ,-3064   ,-1217   ,3540    ,1073    ,-5442   ,4106    ,3377    ,-9610   ,5155    ,\n    4612    ,-6296   ,-852    ,6958    ,-2948   ,-5442   ,6174    ,1950    ,-7368   ,3913    ,4118    ,-8724   ,7057    ,-239    ,-5552   ,\n    3522    ,1434    ,2030    ,-6891   ,2763    ,5788    ,-6537   ,1178    ,1531    ,-2252   ,3922    ,-1764   ,-2860   ,3829    ,-408    ,\n    -2931   ,3668    ,-682    ,-3667   ,4276    ,1760    ,-5452   ,568     ,6364    ,-4914   ,-2279   ,3189    ,1790    ,-2930   ,761     ,\n    5200    ,-9545   ,4000    ,4347    ,-6605   ,2264    ,2538    ,1503    ,-6465   ,1813    ,5801    ,-5664   ,-1093   ,5669    ,-1509   ,\n    -4977   ,5541    ,-916    ,-2820   ,2955    ,-1084   ,-271    ,-298    ,574     ,1411    ,-517    ,-1806   ,3475    ,-1152   ,-4872   ,\n    5262    ,-1211   ,-756    ,3079    ,-4672   ,2297    ,2865    ,-5487   ,1927    ,4086    ,-6209   ,4422    ,73      ,-5543   ,8259    ,\n    -5246   ,-577    ,4308    ,-4208   ,2047    ,74      ,-559    ,181     ,505     ,-564    ,430     ,-349    ,-1099   ,2413    ,-742    ,\n    1805    ,-1813   ,-2205   ,2939    ,-742    ,143     ,-48     ,241     ,-1720   ,2601    ,2118    ,-4769   ,732     ,1668    ,-1657   ,\n    2518    ,2321    ,-6622   ,902     ,6808    ,-5257   ,-2429   ,7505    ,-4657   ,-2983   ,5874    ,-2865   ,1484    ,-826    ,2174    ,\n    52      ,-6761   ,5113    ,389     ,1450    ,-2044   ,-2661   ,4702    ,-2592   ,-530    ,1265    ,2304    ,-2663   ,-1493   ,5898    ,\n    -3818   ,-2888   ,4878    ,-2302   ,-1370   ,5169    ,-3916   ,-2562   ,7497    ,-3416   ,-4944   ,6162    ,-1041   ,-715    ,-609    ,\n    2112    ,955     ,-6170   ,8269    ,-4157   ,-4655   ,6106    ,545     ,-2249   ,-1892   ,6563    ,-5416   ,-774    ,3949    ,-2476   ,\n    800     ,108     ,-943    ,208     ,4884    ,-6657   ,446     ,7362    ,-8273   ,1337    ,6807    ,-6828   ,-962    ,7212    ,-4132   ,\n    -3388   ,4532    ,2070    ,-5095   ,838     ,5540    ,-5706   ,-1554   ,6108    ,-1150   ,-5627   ,4588    ,2925    ,-6407   ,1791    ,\n    5543    ,-4711   ,-3405   ,7124    ,-1027   ,-6328   ,6430    ,808     ,-6518   ,5184    ,-716    ,-3061   ,3436    ,-637    ,127     ,\n    -146    ,389     ,-108    ,-312    ,975     ,115     ,-1430   ,-921    ,1683    ,-1471   ,4099    ,-2587   ,-3253   ,6842    ,-5344   ,\n    587     ,2240    ,546     ,-1716   ,-1178   ,7127    ,-8159   ,-985    ,7535    ,-2606   ,-4793   ,5784    ,632     ,-6223   ,5454    ,\n    -1990   ,-1145   ,2238    ,2658    ,-4283   ,-2836   ,9252    ,-7015   ,-615    ,7422    ,-7118   ,46      ,6004    ,-4099   ,-1340   ,\n    3697    ,-1564   ,-1881   ,2729    ,744     ,-3808   ,4484    ,-919    ,-3547   ,2427    ,150     ,2694    ,-4082   ,454     ,1652    ,\n    -1509   ,3951    ,-4287   ,-1071   ,5713    ,-2225   ,-3678   ,2727    ,3653    ,-4560   ,-1278   ,5642    ,-3651   ,-1767   ,3457    ,\n    333     ,-2000   ,509     ,1412    ,-1937   ,1966    ,-133    ,434     ,-2482   ,-1747   ,5474    ,-2969   ,935     ,2329    ,-5516   ,\n    2080    ,4808    ,-5540   ,-549    ,6552    ,-4445   ,-2640   ,5001    ,-933    ,-3474   ,3219    ,1318    ,-4193   ,3392    ,2563    ,\n    -6351   ,1590    ,3138    ,-2500   ,454     ,992     ,-1848   ,668     ,4163    ,-4422   ,-2776   ,7261    ,-1909   ,-4964   ,3548    ,\n    2745    ,-3664   ,-488    ,6686    ,-6905   ,-1557   ,5313    ,-511    ,-1514   ,-781    ,4496    ,-5941   ,5285    ,-137    ,-6843   ,\n    6374    ,-1346   ,308     ,533     ,-1263   ,-346    ,1218    ,-1225   ,1686    ,2360    ,-6408   ,2323    ,4984    ,-4478   ,-1047   ,\n    1004    ,2616    ,667     ,-5900   ,3346    ,4577    ,-6427   ,380     ,5971    ,-5608   ,375     ,3030    ,-1946   ,-1125   ,2687    ,\n    1284    ,-4759   ,2085    ,527     ,729     ,-1413   ,3354    ,-543    ,-7301   ,6918    ,1687    ,-6438   ,2824    ,4951    ,-6511   ,\n    -169    ,5352    ,-1983   ,-3125   ,3511    ,2438    ,-5733   ,419     ,2486    ,-526    ,1548    ,-449    ,-2579   ,3909    ,-1606   ,\n    -4049   ,5568    ,-84     ,-5304   ,4819    ,1866    ,-6101   ,2018    ,2959    ,-515    ,-4274   ,5607    ,-498    ,-7479   ,9713    ,\n    -3289   ,-5211   ,7099    ,-770    ,-4504   ,1923    ,4625    ,-5183   ,-762    ,5718    ,-5244   ,349     ,2616    ,-687    ,-135    ,\n    -1197   ,5437    ,-5322   ,-3985   ,8968    ,-2648   ,-5067   ,5934    ,-623    ,-3874   ,3421    ,-250    ,-1596   ,1721    ,-1201   ,\n    -326    ,3318    ,-1977   ,-3077   ,3880    ,-252    ,-3497   ,6528    ,-4958   ,-1503   ,7397    ,-6823   ,1637    ,1244    ,-1135   ,\n    2082    ,-3177   ,701     ,4600    ,-4169   ,-1541   ,5087    ,-5173   ,2761    ,2282    ,-5830   ,4125    ,2180    ,-4852   ,-158    ,\n    5545    ,-3180   ,-2367   ,2340    ,-522    ,4238    ,-4617   ,-1650   ,5809    ,-4917   ,649     ,5053    ,-4314   ,-1589   ,2871    ,\n    1913    ,-2579   ,-2214   ,4245    ,-1455   ,-1461   ,560     ,1575    ,-900    ,2056    ,738     ,-6648   ,4852    ,190     ,-1421   ,\n    694     ,478     ,638     ,-2571   ,3329    ,-2469   ,1141    ,701     ,-2751   ,5057    ,-2160   ,-4411   ,5546    ,-13     ,-3146   ,\n    1004    ,122     ,2105    ,-2623   ,2935    ,-525    ,-4056   ,2949    ,2013    ,-883    ,-3686   ,2666    ,1749    ,-1430   ,-645    ,\n    1726    ,-939    ,-1125   ,3963    ,-3256   ,-537    ,3320    ,-3773   ,1105    ,1645    ,-1417   ,-1014   ,3374    ,-26     ,-4753   ,\n    6066    ,-3075   ,-2390   ,4927    ,-2616   ,-118    ,1015    ,149     ,-1794   ,1693    ,2398    ,-5256   ,1738    ,4858    ,-4699   ,\n    -2250   ,5782    ,26      ,-6047   ,3209    ,3098    ,-3151   ,-864    ,3736    ,-1884   ,-2545   ,7311    ,-6699   ,-2058   ,8342    ,\n    -5262   ,-621    ,3149    ,-1319   ,-1858   ,3096    ,557     ,-4331   ,2149    ,4048    ,-4282   ,-1929   ,6728    ,-6092   ,1581    ,\n    4194    ,-5682   ,2392    ,553     ,-1338   ,-247    ,4476    ,-2633   ,-3992   ,3992    ,2845    ,-3950   ,-2174   ,5648    ,-2187   ,\n    -2479   ,3109    ,380     ,-2842   ,2180    ,263     ,-2478   ,1571    ,3733    ,-3948   ,-2669   ,6409    ,-3673   ,-2142   ,5025    ,\n    -368    ,-5161   ,5147    ,1047    ,-7877   ,7690    ,-372    ,-4892   ,2460    ,1872    ,1511    ,-7033   ,5907    ,546     ,-5550   ,\n    4305    ,336     ,-729    ,-701    ,4355    ,-6097   ,283     ,4925    ,-3841   ,802     ,1536    ,-2215   ,545     ,4145    ,-5120   ,\n    -581    ,5586    ,-2004   ,-4470   ,5965    ,-1221   ,-4886   ,6686    ,-1620   ,-4789   ,5352    ,1558    ,-5861   ,1298    ,3496    ,\n    -440    ,-3738   ,3669    ,947     ,-4808   ,3094    ,802     ,-2871   ,2218    ,2865    ,-5621   ,903     ,5831    ,-4823   ,-2410   ,\n    5885    ,-3183   ,1317    ,2713    ,-6649   ,2756    ,2699    ,-1716   ,-1045   ,1543    ,-286    ,-442    ,627     ,-105    ,-878    ,\n    121     ,4150    ,-4354   ,-2010   ,5946    ,-951    ,-5483   ,4157    ,3211    ,-5114   ,-73     ,2215    ,1169    ,-1665   ,-953    ,\n    1231    ,-845    ,1441    ,2734    ,-5652   ,735     ,6565    ,-6005   ,-879    ,4014    ,-1640   ,-815    ,1551    ,-526    ,-1505   ,\n    3563    ,-1457   ,-3321   ,4650    ,-408    ,-3350   ,2989    ,-304    ,-2865   ,4343    ,826     ,-5767   ,2156    ,2926    ,-1761   ,\n    -633    ,961     ,1462    ,-3202   ,1834    ,2760    ,-4619   ,1083    ,2198    ,-3282   ,877     ,4447    ,-4340   ,-1534   ,4257    ,\n    -952    ,-1909   ,3835    ,-774    ,-5431   ,6037    ,-1134   ,-3969   ,4314    ,-1364   ,2361    ,-528    ,-5686   ,5854    ,646     ,\n    -4172   ,626     ,3323    ,116     ,-4387   ,1860    ,3112    ,-1203   ,-4645   ,4436    ,1981    ,-5636   ,2048    ,4371    ,-5272   ,\n    11      ,5977    ,-6021   ,-22     ,3226    ,-1301   ,750     ,999     ,-3069   ,1981    ,1664    ,-4771   ,2932    ,607     ,-1413   ,\n    1005    ,-1816   ,2105    ,2715    ,-5838   ,885     ,6158    ,-5681   ,415     ,2380    ,-3055   ,3842    ,-2096   ,-863    ,549     ,\n    1227    ,2261    ,-6784   ,5521    ,882     ,-5255   ,3950    ,-1090   ,105     ,243     ,93      ,-1807   ,3158    ,1111    ,-6292   ,\n    5029    ,1602    ,-5816   ,3256    ,3319    ,-5539   ,1212    ,1891    ,1371    ,-1064   ,-3891   ,5566    ,-3897   ,320     ,4961    ,\n    -4697   ,-12     ,2050    ,-1971   ,581     ,3704    ,-4185   ,59      ,1631    ,1735    ,225     ,-6455   ,5534    ,105     ,-2805   ,\n    2645    ,-856    ,-125    ,-44     ,1049    ,-2093   ,1280    ,341     ,1433    ,471     ,-6488   ,5878    ,1798    ,-7216   ,5257    ,\n    1924    ,-6531   ,4609    ,576     ,-3204   ,4738    ,-4580   ,678     ,3023    ,-2568   ,464     ,-801    ,2342    ,-1396   ,1718    ,\n    400     ,-5557   ,4247    ,3314    ,-5180   ,-392    ,3113    ,-79     ,-872    ,-611    ,3224    ,-2245   ,-2107   ,2562    ,-933    ,\n    -822    ,3389    ,407     ,-5995   ,4243    ,2135    ,-4788   ,2584    ,892     ,-1770   ,845     ,381     ,-1720   ,1896    ,2543    ,\n    -5805   ,2315    ,4804    ,-6222   ,1364    ,2015    ,-1613   ,743     ,145     ,-570    ,-503    ,3103    ,-2017   ,-2842   ,5215    ,\n    -1651   ,-2301   ,2414    ,32      ,-1953   ,704     ,4424    ,-5243   ,-378    ,2629    ,1503    ,-694    ,-5128   ,4664    ,2091    ,\n    -4642   ,1226    ,3931    ,-4997   ,1247    ,1693    ,-1094   ,282     ,-611    ,2681    ,-3325   ,1446    ,600     ,-2327   ,3551    ,\n    -159    ,-3647   ,2799    ,-620    ,-1637   ,6112    ,-6150   ,141     ,5129    ,-5568   ,1044    ,4194    ,-1711   ,-4869   ,5199    ,\n    1071    ,-5549   ,2948    ,3559    ,-3784   ,-2541   ,5968    ,-1429   ,-3835   ,3827    ,143     ,-4204   ,4728    ,1005    ,-5406   ,\n    1911    ,3786    ,-2934   ,-1654   ,6331    ,-6616   ,-238    ,4764    ,-2921   ,1447    ,-210    ,489     ,-2023   ,2859    ,-79     ,\n    -3078   ,1646    ,68      ,90      ,217     ,51      ,-1343   ,3457    ,-1912   ,-2065   ,1929    ,363     ,3275    ,-6044   ,1154    ,\n    5378    ,-6457   ,2240    ,3730    ,-4207   ,25      ,2012    ,-898    ,-938    ,3087    ,-1950   ,-1948   ,4252    ,-3015   ,-88     ,\n    416     ,3284    ,-1601   ,-5466   ,8230    ,-3168   ,-3845   ,5062    ,1132    ,-5260   ,2273    ,4265    ,-6232   ,1018    ,3007    ,\n    1049    ,-5329   ,3606    ,1489    ,-5772   ,7763    ,-4094   ,-1905   ,3610    ,-1247   ,410     ,-1426   ,1669    ,126     ,-1158   ,\n    689     ,-81     ,-1256   ,4191    ,-2649   ,-2099   ,3885    ,-3004   ,585     ,1928    ,138     ,-3474   ,5176    ,-1095   ,-6178   ,\n    5333    ,1322    ,-1056   ,-3334   ,3195    ,-315    ,-1257   ,1840    ,-1153   ,474     ,-805    ,2578    ,-3211   ,555     ,4634    ,\n    -5359   ,-343    ,5658    ,-3548   ,-1593   ,3123    ,-2776   ,2520    ,1144    ,-3940   ,1012    ,3260    ,-2111   ,-1547   ,2415    ,\n    -642    ,-1676   ,2195    ,2401    ,-5348   ,2030    ,2835    ,-4396   ,1244    ,1963    ,-187    ,-1542   ,330     ,2992    ,-4088   ,\n    747     ,5322    ,-6070   ,-1680   ,5047    ,635     ,-5086   ,4429    ,1207    ,-7098   ,5468    ,2145    ,-5485   ,1449    ,4284    ,\n    -4295   ,-1051   ,4148    ,-848    ,-3687   ,3461    ,2389    ,-5523   ,2741    ,-266    ,-1201   ,3799    ,-2844   ,-1886   ,2600    ,\n    2721    ,-4827   ,-484    ,6515    ,-5965   ,-324    ,6548    ,-6070   ,-894    ,6520    ,-3924   ,-3182   ,5907    ,-780    ,-5174   ,\n    4229    ,2808    ,-6631   ,2376    ,4823    ,-5911   ,-99     ,3803    ,-1312   ,-471    ,-63     ,1153    ,-1024   ,511     ,3778    ,\n    -6895   ,2130    ,3111    ,-5547   ,5903    ,-606    ,-4255   ,3467    ,320     ,-2208   ,1625    ,-203    ,-314    ,577     ,-629    ,\n    102     ,-1050   ,5083    ,-4315   ,-2073   ,6271    ,-4807   ,-457    ,4061    ,296     ,-4862   ,1118    ,4612    ,-2647   ,-3324   ,\n    5576    ,-799    ,-5150   ,5599    ,-1645   ,-1331   ,304     ,3357    ,-2769   ,-2195   ,6578    ,-5920   ,1185    ,2018    ,167     ,\n    668     ,-4796   ,4059    ,-495    ,-2336   ,4811    ,-2258   ,-3520   ,4544    ,1489    ,-5487   ,2454    ,3617    ,-5092   ,1560    ,\n    303     ,-149    ,4071    ,-6266   ,1413    ,5380    ,-5853   ,-151    ,5183    ,-2389   ,-3550   ,5318    ,-1550   ,-2495   ,1750    ,\n    240     ,3425    ,-5757   ,876     ,5353    ,-5833   ,1169    ,3497    ,-3410   ,630     ,1292    ,-1240   ,-64     ,745     ,2396    ,\n    -3593   ,504     ,1678    ,-1266   ,170     ,-669    ,4353    ,-4562   ,-887    ,3697    ,-786    ,-1071   ,571     ,4221    ,-7501   ,\n    1502    ,5856    ,-5307   ,392     ,2947    ,-1954   ,-1528   ,4383    ,-2622   ,-1277   ,2854    ,-1595   ,-118    ,-506    ,3739    ,\n    -2234   ,-3166   ,5318    ,-2592   ,-1274   ,2983    ,-2817   ,1573    ,2516    ,-4909   ,1404    ,4464    ,-3292   ,-2580   ,2704    ,\n    3008    ,-4389   ,-117    ,4474    ,-4240   ,-334    ,4754    ,-2878   ,-2895   ,5683    ,-1815   ,-3865   ,3849    ,2061    ,-4338   ,\n    -562    ,5749    ,-5178   ,1881    ,2628    ,-5423   ,2976    ,1640    ,-3277   ,1160    ,3387    ,-4215   ,816     ,1876    ,-2196   ,\n    207     ,2966    ,-770    ,-4040   ,4717    ,-1470   ,-1704   ,2756    ,-1652   ,822     ,-1082   ,1310    ,1332    ,-3064   ,1384    ,\n    478     ,-1954   ,3205    ,965     ,-5678   ,3199    ,4089    ,-6469   ,1914    ,3866    ,-5305   ,1049    ,4379    ,-2736   ,-3320   ,\n    4071    ,1996    ,-4544   ,-350    ,4092    ,-1      ,-5154   ,4996    ,-637    ,-3596   ,6081    ,-5427   ,989     ,4988    ,-5165   ,\n    -744    ,4313    ,-402    ,-4492   ,3630    ,2107    ,-5745   ,3294    ,3298    ,-5946   ,1512    ,4519    ,-4478   ,-509    ,4220    ,\n    -3878   ,744     ,3508    ,-4138   ,-438    ,5025    ,-2025   ,-4152   ,3873    ,120     ,-926    ,903     ,-724    ,715     ,-639    ,\n    630     ,253     ,-1215   ,690     ,623     ,-569    ,-324    ,1612    ,-1330   ,-162    ,535     ,1030    ,-157    ,-3292   ,5564    ,\n    -2190   ,-3725   ,3963    ,-503    ,-863    ,535     ,1548    ,-1844   ,-1482   ,3310    ,1296    ,-3988   ,-467    ,2886    ,1574    ,\n    -3055   ,-2108   ,5884    ,-1816   ,-3452   ,4275    ,-2792   ,5       ,4091    ,-3453   ,-1543   ,3274    ,869     ,-3093   ,244     ,\n    1011    ,2538    ,-2293   ,-3416   ,7164    ,-4303   ,-1143   ,5227    ,-5193   ,444     ,3584    ,-510    ,-4565   ,4788    ,869     ,\n    -5090   ,1988    ,1707    ,1576    ,-5608   ,3752    ,1121    ,-2647   ,3030    ,-3390   ,1494    ,923     ,-1921   ,1025    ,2628    ,\n    -3823   ,-146    ,4183    ,-2635   ,-2305   ,3686    ,1441    ,-4908   ,1252    ,2292    ,91      ,-2332   ,1679    ,-53     ,-2672   ,\n    4574    ,-2388   ,-2416   ,4411    ,-106    ,-4291   ,1985    ,2930    ,-3343   ,-40     ,4261    ,-3514   ,-1660   ,4047    ,-2600   ,\n    -663    ,1981    ,939     ,-2652   ,551     ,4855    ,-6654   ,457     ,4812    ,-4058   ,3749    ,-1219   ,-3818   ,3013    ,1930    ,\n    -2139   ,-1824   ,4198    ,-1491   ,-1804   ,755     ,2083    ,-492    ,-2643   ,2833    ,-1891   ,130     ,1611    ,-361    ,-525    ,\n    273     ,689     ,-958    ,392     ,534     ,-39     ,-1782   ,3939    ,-3237   ,-428    ,3729    ,-5425   ,2381    ,2156    ,359     ,\n    -3911   ,345     ,5602    ,-5039   ,-991    ,5693    ,-4445   ,-1046   ,6415    ,-5308   ,-1358   ,5728    ,-2681   ,-2360   ,3572    ,\n    -2942   ,1767    ,2914    ,-5356   ,969     ,3470    ,-174    ,-4870   ,3432    ,2405    ,-4687   ,1918    ,1824    ,-3333   ,1605    ,\n    3426    ,-4286   ,-1098   ,4097    ,480     ,-5031   ,4001    ,1230    ,-5704   ,4163    ,2222    ,-4300   ,228     ,4517    ,-3807   ,\n    -1779   ,5382    ,-2272   ,-1761   ,966     ,1226    ,1268    ,-2915   ,-434    ,2161    ,2408    ,-4309   ,-415    ,3505    ,-887    ,\n    -701    ,291     ,2436    ,-3526   ,31      ,2412    ,-1386   ,-491    ,2275    ,-121    ,-3710   ,3815    ,671     ,-3585   ,2206    ,\n    997     ,-3043   ,1804    ,3043    ,-3980   ,-740    ,3259    ,702     ,-3581   ,-177    ,4243    ,-1164   ,-3764   ,3606    ,2243    ,\n    -6194   ,4046    ,-245    ,-97     ,1920    ,-4679   ,2273    ,612     ,1594    ,-3145   ,697     ,705     ,913     ,1789    ,-5475   ,\n    3105    ,-40     ,901     ,-395    ,-1833   ,1534    ,-723    ,2954    ,-2276   ,-1217   ,2366    ,-1493   ,857     ,-749    ,908     ,\n    826     ,-3201   ,3837    ,-826    ,-2484   ,2737    ,-1184   ,259     ,172     ,194     ,-1000   ,944     ,2264    ,-4745   ,2649    ,\n    2325    ,-5176   ,3731    ,1611    ,-5043   ,2170    ,3616    ,-4487   ,435     ,2994    ,-2340   ,-103    ,1760    ,-1661   ,-511    ,\n    4393    ,-3487   ,-1652   ,2622    ,1321    ,-1418   ,-1724   ,3970    ,-3866   ,534     ,4268    ,-5038   ,815     ,4247    ,-3274   ,\n    -1999   ,3423    ,1515    ,-4400   ,663     ,4639    ,-5405   ,1456    ,4476    ,-6425   ,3005    ,3003    ,-6048   ,2724    ,3174    ,\n    -4203   ,660     ,2601    ,-2359   ,423     ,1078    ,-1032   ,-642    ,1455    ,1229    ,-2220   ,-179    ,3268    ,-2477   ,-1778   ,\n    5394    ,-4799   ,161     ,4707    ,-6082   ,2144    ,3794    ,-4107   ,-823    ,3094    ,-870    ,-222    ,417     ,306     ,2163    ,\n    -4437   ,401     ,1778    ,-786    ,3257    ,-3285   ,-488    ,2627    ,-1849   ,-676    ,3462    ,-1129   ,-3909   ,4224    ,1721    ,\n    -5071   ,905     ,5047    ,-4385   ,-1686   ,5437    ,-1561   ,-4242   ,4901    ,94      ,-4477   ,4152    ,-1132   ,-1053   ,228     ,\n    2822    ,-236    ,-4762   ,3074    ,1583    ,-1487   ,-99     ,3174    ,-5132   ,898     ,5247    ,-6545   ,2726    ,3555    ,-5613   ,\n    2243    ,2018    ,-3968   ,3732    ,-520    ,-2270   ,2050    ,-170    ,-800    ,-340    ,1477    ,128     ,-868    ,381     ,689     ,\n    -1000   ,664     ,-113    ,681     ,-2169   ,3611    ,358     ,-7758   ,7954    ,-663    ,-5353   ,4933    ,1194    ,-4637   ,1988    ,\n    3072    ,-5230   ,2356    ,3468    ,-4724   ,3       ,2408    ,-735    ,3173    ,-5164   ,168     ,6141    ,-5921   ,609     ,3484    ,\n    -3022   ,702     ,-22     ,-594    ,3630    ,-3080   ,-2529   ,5901    ,-2769   ,-2847   ,6121    ,-4188   ,-767    ,3576    ,-2808   ,\n    899     ,151     ,-1063   ,2924    ,-1412   ,-2180   ,2820    ,-2032   ,1955    ,-146    ,-2583   ,1522    ,2656    ,-2559   ,-2142   ,\n    6516    ,-6500   ,1526    ,4889    ,-7011   ,3072    ,2384    ,-2657   ,-1231   ,3673    ,-1305   ,-2690   ,2922    ,-414    ,309     ,\n    -906    ,3723    ,-4102   ,-2046   ,7249    ,-5762   ,613     ,2564    ,-1711   ,-946    ,2652    ,327     ,-4395   ,4436    ,-568    ,\n    -2621   ,1183    ,3335    ,-2843   ,-2684   ,6272    ,-3382   ,-2434   ,4214    ,-825    ,-2739   ,3845    ,-78     ,-3983   ,3293    ,\n    -555    ,-705    ,863     ,-104    ,-283    ,-817    ,3083    ,-1642   ,-2619   ,4014    ,-213    ,-3783   ,3357    ,1460    ,-4747   ,\n    2425    ,3003    ,-4584   ,911     ,2419    ,-1548   ,204     ,231     ,208     ,644     ,458     ,-2978   ,1173    ,1450    ,-828    ,\n    -480    ,337     ,2491    ,-3319   ,-404    ,3204    ,128     ,-3775   ,1894    ,3768    ,-4154   ,-833    ,2977    ,-2060   ,383     ,\n    3594    ,-3545   ,-1782   ,3685    ,1284    ,-4875   ,2805    ,2013    ,-3756   ,385     ,2606    ,-396    ,-2665   ,4766    ,-4021   ,\n    403     ,2667    ,-4625   ,4463    ,53      ,-4269   ,3359    ,1508    ,-2987   ,-602    ,2784    ,594     ,-3827   ,4084    ,-319    ,\n    -4821   ,4572    ,1562    ,-5140   ,3264    ,820     ,-3496   ,2282    ,1784    ,-766    ,-4159   ,5569    ,-464    ,-4858   ,2998    ,\n    2828    ,-3005   ,-1610   ,5214    ,-3604   ,-1672   ,3925    ,341     ,-3178   ,1498    ,-456    ,257     ,3398    ,-5335   ,1457    ,\n    3867    ,-4937   ,1958    ,3407    ,-5458   ,2028    ,2006    ,-2730   ,1653    ,-85     ,-273    ,-116    ,762     ,-702    ,-98     ,\n    1004    ,-1266   ,2916    ,-2830   ,-1146   ,4702    ,-2969   ,-939    ,2070    ,-460    ,-353    ,47      ,637     ,-656    ,-440    ,\n    2998    ,-3096   ,-141    ,2269    ,-1200   ,1408    ,-2041   ,1005    ,120     ,-582    ,1251    ,-1086   ,-866    ,3565    ,-1421   ,\n    -3124   ,4230    ,-2188   ,-1044   ,2422    ,1574    ,-3072   ,-1396   ,2951    ,-726    ,493     ,-35     ,4       ,-373    ,1065    ,\n    -139    ,-1110   ,260     ,-382    ,1183    ,-518    ,332     ,-928    ,531     ,2961    ,-3583   ,-786    ,3117    ,568     ,-2175   ,\n    -1681   ,3923    ,-238    ,-3731   ,2757    ,193     ,276     ,542     ,-3191   ,2525    ,111     ,-924    ,-364    ,1453    ,2158    ,\n    -5312   ,2342    ,3256    ,-4763   ,916     ,4347    ,-4445   ,-235    ,5174    ,-4901   ,-60     ,3403    ,-2017   ,-277    ,708     ,\n    -658    ,1956    ,-587    ,-2351   ,2409    ,-935    ,832     ,502     ,-2254   ,1776    ,703     ,-1678   ,849     ,218     ,-1762   ,\n    3574    ,-896    ,-3909   ,4505    ,801     ,-4876   ,3088    ,2405    ,-5090   ,1655    ,4111    ,-4775   ,79      ,4797    ,-3726   ,\n    -1011   ,2016    ,1194    ,-679    ,-3249   ,4726    ,-882    ,-3922   ,5186    ,-3353   ,788     ,2955    ,-4057   ,509     ,2260    ,\n    784     ,-3464   ,1724    ,-28     ,660     ,201     ,-2382   ,1904    ,1203    ,662     ,-4563   ,3206    ,826     ,-2825   ,2634    ,\n    -1100   ,190     ,-1261   ,2815    ,490     ,-4629   ,2651    ,2828    ,-3508   ,-944    ,5544    ,-4662   ,-1564   ,5860    ,-2955   ,\n    -1960   ,1526    ,3328    ,-3690   ,-1591   ,5674    ,-3757   ,-2123   ,5770    ,-2773   ,-2375   ,2464    ,831     ,-11     ,-2482   ,\n    4303    ,-3937   ,-498    ,5323    ,-4955   ,897     ,1783    ,-1411   ,115     ,912     ,-1304   ,131     ,907     ,547     ,-1858   ,\n    3535    ,-1252   ,-5427   ,7664    ,-4004   ,-1376   ,5398    ,-3572   ,-1329   ,1817    ,2612    ,-3859   ,-689    ,4905    ,-2655   ,\n    -2953   ,4303    ,853     ,-4847   ,2036    ,3601    ,-3994   ,-799    ,4004    ,-3094   ,2020    ,1866    ,-5632   ,2381    ,1338    ,\n    837     ,-1952   ,-764    ,2628    ,-1609   ,351     ,207     ,-193    ,-1008   ,3331    ,-1670   ,-2499   ,3665    ,-1615   ,-395    ,\n    1120    ,-388    ,-261    ,497     ,-1228   ,1449    ,627     ,-1012   ,-360    ,342     ,3212    ,-4509   ,-892    ,5416    ,-2392   ,\n    -2714   ,3987    ,-737    ,-3040   ,2672    ,1865    ,-2771   ,-1759   ,5384    ,-2355   ,-3113   ,4558    ,-1918   ,-1638   ,4010    ,\n    -1359   ,-3677   ,4662    ,270     ,-4401   ,2209    ,2769    ,-2226   ,-1754   ,2481    ,379     ,-1010   ,1166    ,-1492   ,-822    ,\n    2978    ,-1978   ,-1077   ,4315    ,-2390   ,-2835   ,4425    ,-310    ,-2963   ,1129    ,2595    ,-2835   ,-599    ,4540    ,-3237   ,\n    -2180   ,4100    ,542     ,-4710   ,4167    ,55      ,-4740   ,5334    ,-149    ,-3601   ,773     ,3777    ,-1897   ,-2704   ,2092    ,\n    2815    ,-3418   ,-866    ,4702    ,-4949   ,2474    ,1509    ,-3970   ,1753    ,2482    ,-1493   ,-2271   ,3809    ,-2716   ,-211    ,\n    3281    ,-4107   ,2836    ,1232    ,-3979   ,1322    ,1694    ,773     ,-3281   ,2111    ,1818    ,-4723   ,2720    ,2300    ,-4222   ,\n    1414    ,3503    ,-3508   ,-1266   ,2375    ,1949    ,-3052   ,-1414   ,5289    ,-2738   ,-2912   ,5195    ,-2211   ,-1588   ,2438    ,\n    -569    ,-1517   ,1453    ,1295    ,-2400   ,1929    ,-894    ,1396    ,-330    ,-3969   ,4335    ,1338    ,-4461   ,1933    ,992     ,\n    -94     ,533     ,-3520   ,4646    ,-2199   ,-1149   ,3191    ,-2971   ,790     ,1576    ,1052    ,-4214   ,2398    ,2445    ,-4944   ,\n    2375    ,3015    ,-3761   ,-342    ,3921    ,-3270   ,467     ,1408    ,-1069   ,202     ,-613    ,2962    ,-3284   ,642     ,2710    ,\n    -3934   ,2045    ,1165    ,-1881   ,389     ,1085    ,-903    ,-50     ,-109    ,403     ,2869    ,-3116   ,-2294   ,4507    ,348     ,\n    -4093   ,1359    ,2957    ,-2274   ,-1126   ,2631    ,-1555   ,1472    ,1375    ,-5984   ,4028    ,2001    ,-4410   ,1971    ,1996    ,\n    -1627   ,-1078   ,1905    ,-1391   ,681     ,357     ,838     ,404     ,-3484   ,2590    ,268     ,-1139   ,757     ,122     ,-412    ,\n    397     ,-898    ,365     ,3319    ,-4485   ,91      ,3664    ,-1584   ,-1224   ,216     ,2231    ,-2305   ,865     ,3090    ,-6004   ,\n    1067    ,5103    ,-3823   ,-834    ,1921    ,1373    ,-500    ,-3092   ,2411    ,551     ,-1561   ,1687    ,-1550   ,1096    ,1275    ,\n    -1847   ,-459    ,1292    ,1028    ,-1905   ,253     ,314     ,1583    ,-964    ,-1295   ,492     ,1360    ,1139    ,-3516   ,2000    ,\n    825     ,-1818   ,169     ,2807    ,-1494   ,-2773   ,4170    ,-812    ,-3313   ,4019    ,538     ,-4096   ,1745    ,1205    ,-174    ,\n    -1014   ,3430    ,-3024   ,-1955   ,4472    ,-3017   ,178     ,1335    ,1928    ,-2722   ,-1798   ,3073    ,1134    ,-2696   ,-141    ,\n    3081    ,-3131   ,1210    ,414     ,-1095   ,2338    ,-2621   ,88      ,3438    ,-2589   ,-1971   ,3887    ,107     ,-4529   ,3875    ,\n    1422    ,-4995   ,2414    ,2022    ,-1597   ,-1534   ,2758    ,287     ,-4073   ,4136    ,-83     ,-3821   ,3187    ,-409    ,-906    ,\n    -173    ,1710    ,1389    ,-4278   ,2098    ,-50     ,-220    ,2467    ,-3519   ,1386    ,813     ,-939    ,-338    ,558     ,2641    ,\n    -3752   ,284     ,3149    ,-3635   ,1307    ,2459    ,-3373   ,1068    ,1163    ,-2252   ,1465    ,2594    ,-3510   ,-1225   ,5030    ,\n    -2734   ,-1796   ,3003    ,-380    ,-1140   ,-345    ,2102    ,-584    ,-2537   ,2757    ,1715    ,-3972   ,136     ,4588    ,-3367   ,\n    -1728   ,4661    ,-2549   ,-1045   ,1354    ,1454    ,-1447   ,-1535   ,3943    ,-2809   ,-50     ,1716    ,-1430   ,-545    ,3011    ,\n    -331    ,-4745   ,5116    ,28      ,-4526   ,3471    ,1861    ,-3858   ,1756    ,635     ,-1689   ,2164    ,-2832   ,3172    ,14      ,\n    -3005   ,1790    ,-329    ,2624    ,-2916   ,-1410   ,4226    ,-1022   ,-3135   ,3329    ,-237    ,-2884   ,4484    ,-1934   ,-1850   ,\n    969     ,2831    ,-1738   ,-2560   ,4861    ,-3386   ,-711    ,2986    ,714     ,-3708   ,504     ,4412    ,-4585   ,653     ,2408    ,\n    -1158   ,-2013   ,2840    ,633     ,-3022   ,939     ,928     ,1954    ,-3449   ,1256    ,-368    ,502     ,2657    ,-4226   ,698     ,\n    2232    ,-326    ,-2033   ,4124    ,-2785   ,-2429   ,4969    ,-2293   ,-1560   ,3011    ,211     ,-3827   ,3567    ,120     ,-3345   ,\n    3046    ,1386    ,-2996   ,-958    ,4075    ,-1124   ,-3527   ,3787    ,1066    ,-4898   ,3371    ,2244    ,-4883   ,1279    ,3724    ,\n    -2983   ,-1911   ,5120    ,-2922   ,-2188   ,5843    ,-4425   ,-707    ,5046    ,-4351   ,29      ,3151    ,-1610   ,-2130   ,2889    ,\n    1377    ,-3870   ,639     ,2407    ,-627    ,-1572   ,3880    ,-3395   ,-2147   ,5185    ,-1703   ,-1925   ,1782    ,2299    ,-4792   ,\n    1614    ,3906    ,-4916   ,504     ,3760    ,-2517   ,-1231   ,2739    ,-981    ,-1783   ,2456    ,712     ,-2826   ,2673    ,-979    ,\n    -2331   ,3926    ,-602    ,-2832   ,2457    ,316     ,-1807   ,1374    ,-17     ,-463    ,31      ,1071    ,-1030   ,-344    ,2057    ,\n    -1769   ,-937    ,3808    ,-1800   ,-2726   ,3014    ,351     ,-53     ,-2517   ,1434    ,2636    ,-3658   ,1150    ,1219    ,-1349   ,\n    714     ,146     ,-297    ,95      ,518     ,-1216   ,948     ,2128    ,-3110   ,-248    ,2980    ,-1268   ,-1485   ,2172    ,-1224   ,\n    863     ,21      ,-1903   ,3170    ,-2500   ,2284    ,294     ,-3810   ,3016    ,-1131   ,1322    ,326     ,-2520   ,2338    ,-678    ,\n    -103    ,262     ,-646    ,2120    ,-2062   ,269     ,1923    ,-2992   ,1476    ,2885    ,-4196   ,1001    ,2481    ,-2622   ,-446    ,\n    3268    ,-1007   ,-3339   ,5288    ,-2398   ,-2170   ,2272    ,815     ,-210    ,-1924   ,1644    ,50      ,-1036   ,601     ,1874    ,\n    -2245   ,-145    ,568     ,1995    ,-1109   ,-3035   ,4537    ,-1011   ,-2728   ,2668    ,484     ,-3019   ,2361    ,1820    ,-4051   ,\n    1125    ,3415    ,-3335   ,-439    ,2901    ,-1557   ,-1283   ,2356    ,-171    ,-2477   ,2058    ,662     ,-1103   ,-35     ,2007    ,\n    -1583   ,-1063   ,1807    ,-1286   ,846     ,-22     ,-609    ,-74     ,2533    ,-832    ,-3675   ,3391    ,1504    ,-3724   ,1275    ,\n    3430    ,-5134   ,986     ,4365    ,-5194   ,2474    ,2102    ,-4542   ,1514    ,3471    ,-3307   ,-1049   ,4130    ,-2137   ,-1364   ,\n    1008    ,1969    ,-1545   ,-1531   ,2055    ,1655    ,-2329   ,-1521   ,3766    ,-2507   ,779     ,1072    ,-3019   ,2776    ,1299    ,\n    -4348   ,3041    ,1590    ,-5163   ,3417    ,2065    ,-3935   ,228     ,4108    ,-3283   ,-1117   ,3883    ,-2868   ,42      ,539     ,\n    1542    ,-722    ,-1972   ,3515    ,-3281   ,399     ,1527    ,-164    ,-475    ,733     ,1507    ,-5101   ,4285    ,-459    ,-2509   ,\n    3440    ,-1910   ,-790    ,2527    ,242     ,-3796   ,3344    ,49      ,-2888   ,3139    ,-79     ,-2344   ,770     ,2804    ,-2676   ,\n    -1204   ,3792    ,-744    ,-3551   ,3501    ,1149    ,-5021   ,3976    ,698     ,-3535   ,1608    ,2380    ,-1666   ,-2475   ,4643    ,\n    -1436   ,-3387   ,3708    ,672     ,-3747   ,1916    ,2826    ,-4631   ,1735    ,1447    ,-1194   ,1681    ,-3113   ,3561    ,-1111   ,\n    -3538   ,4177    ,-1990   ,2553    ,-1023   ,-3058   ,2787    ,1557    ,-1913   ,-1784   ,4657    ,-2379   ,-1850   ,2963    ,-1828   ,\n    669     ,1481    ,-2949   ,2311    ,439     ,-2706   ,3808    ,-2442   ,-1009   ,3445    ,-2768   ,1090    ,1190    ,-3270   ,3196    ,\n    352     ,-3681   ,2816    ,1841    ,-3920   ,841     ,3437    ,-2610   ,-963    ,1931    ,-260    ,-1562   ,2514    ,96      ,-2969   ,\n    1418    ,2677    ,-1841   ,-2530   ,3112    ,1032    ,-3270   ,1547    ,1974    ,-3711   ,3522    ,-427    ,-4136   ,4701    ,-1046   ,\n    -1484   ,1404    ,235     ,-1002   ,-114    ,2616    ,-2903   ,89      ,3857    ,-3787   ,-605    ,4360    ,-3650   ,307     ,3378    ,\n    -4220   ,1232    ,2431    ,-2169   ,-968    ,2588    ,3       ,-3044   ,2114    ,531     ,-651    ,632     ,-544    ,876     ,-1496   ,\n    2191    ,1032    ,-5989   ,3006    ,3509    ,-3744   ,539     ,1294    ,-1549   ,1885    ,-1325   ,-867    ,3631    ,-2521   ,-897    ,\n    970     ,1416    ,-256    ,-2883   ,3026    ,171     ,-1959   ,116     ,2124    ,265     ,-3150   ,2770    ,-827    ,-1649   ,4181    ,\n    -2450   ,-1887   ,2481    ,927     ,-1696   ,-1015   ,4059    ,-2129   ,-3417   ,4940    ,-780    ,-3351   ,4040    ,-542    ,-3075   ,\n    2210    ,2284    ,-3668   ,803     ,3420    ,-5300   ,3540    ,1022    ,-3742   ,1579    ,1840    ,-202    ,-3673   ,4908    ,-1752   ,\n    -2848   ,3512    ,-775    ,11      ,117     ,1135    ,-2595   ,1106    ,1250    ,-2121   ,943     ,2049    ,-1440   ,-2298   ,4402    ,\n    -1483   ,-3075   ,3202    ,1170    ,-3530   ,851     ,3494    ,-2969   ,-1579   ,4290    ,-1149   ,-3383   ,3589    ,-1456   ,1677    ,\n    341     ,-4001   ,2337    ,1740    ,-468    ,-2214   ,1469    ,538     ,-834    ,596     ,-269    ,312     ,-204    ,168     ,103     ,\n    -431    ,873     ,-758    ,538     ,412     ,-1032   ,709     ,-71     ,-81     ,-881    ,3203    ,-2134   ,-1991   ,2759    ,265     ,\n    -82     ,-2779   ,3936    ,-754    ,-3465   ,3787    ,-1421   ,-718    ,2760    ,-1938   ,-871    ,1193    ,473     ,856     ,-2646   ,\n    1961    ,1872    ,-4229   ,1987    ,1362    ,-2774   ,1653    ,1799    ,-2339   ,-171    ,1584    ,-879    ,415     ,-806    ,1342    ,\n    730     ,-2914   ,2012    ,1161    ,-2049   ,430     ,1202    ,-2161   ,2417    ,-60     ,-2187   ,3435    ,-2502   ,-266    ,1912    ,\n    -2162   ,1529    ,1998    ,-3661   ,756     ,1985    ,-746    ,-370    ,-61     ,2304    ,-2677   ,-210    ,1701    ,-1070   ,655     ,\n    -19     ,-123    ,109     ,-978    ,1982    ,771     ,-3985   ,2647    ,2026    ,-4314   ,1991    ,2353    ,-3501   ,94      ,3272    ,\n    -1322   ,-2954   ,3249    ,994     ,-3703   ,1120    ,2628    ,-1342   ,-2665   ,3501    ,698     ,-4592   ,3741    ,-430    ,-2275   ,\n    3576    ,-1812   ,-1659   ,2047    ,1808    ,-3925   ,1641    ,1936    ,-4273   ,4029    ,-356    ,-3111   ,1863    ,2295    ,-2693   ,\n    -1149   ,4183    ,-2448   ,-1234   ,2530    ,-888    ,-908    ,1534    ,-921    ,-380    ,546     ,1489    ,-1949   ,409     ,3337    ,\n    -5296   ,1451    ,1549    ,1258    ,-1915   ,-2371   ,3425    ,-376    ,1178    ,-3179   ,1292    ,1164    ,-1801   ,2413    ,-1170   ,\n    -1309   ,2313    ,-373    ,-1293   ,813     ,-561    ,914     ,743     ,-1375   ,17      ,2457    ,-2830   ,1573    ,66      ,-2619   ,\n    3571    ,-2105   ,-3      ,1386    ,934     ,-2505   ,5       ,2545    ,-2091   ,299     ,-235    ,2765    ,-1739   ,-2726   ,4511    ,\n    -1304   ,-2624   ,3210    ,383     ,-3199   ,1666    ,2169    ,-2909   ,612     ,1483    ,-1280   ,112     ,856     ,-1017   ,-224    ,\n    3106    ,-2676   ,-1452   ,3227    ,-1192   ,782     ,404     ,-3471   ,3357    ,486     ,-2516   ,922     ,430     ,1982    ,-3082   ,\n    850     ,1459    ,-1451   ,-182    ,1458    ,557     ,-3358   ,3803    ,-1024   ,-2636   ,3422    ,550     ,-3408   ,869     ,3407    ,\n    -3020   ,-418    ,1402    ,1947    ,-2834   ,-396    ,2585    ,-2952   ,1660    ,821     ,-786    ,-196    ,684     ,180     ,-1075   ,\n    1022    ,823     ,-2147   ,1474    ,1486    ,-4500   ,3389    ,1341    ,-3283   ,1067    ,254     ,806     ,-51     ,424     ,-466    ,\n    -1215   ,968     ,137     ,-880    ,2763    ,-1264   ,-2625   ,4243    ,-1982   ,-1195   ,2011    ,-497    ,-1224   ,1548    ,1464    ,\n    -3258   ,455     ,2741    ,-712    ,-3273   ,3436    ,1070    ,-4170   ,1662    ,3167    ,-3579   ,-178    ,3669    ,-3761   ,749     ,\n    1264    ,1388    ,-2622   ,-826    ,4307    ,-4509   ,2626    ,801     ,-3225   ,2556    ,409     ,-1677   ,-497    ,3655    ,-2877   ,\n    -355    ,3279    ,-4430   ,2825    ,1835    ,-4668   ,2382    ,2391    ,-3480   ,133     ,2065    ,-103    ,-1146   ,2       ,2597    ,\n    -2905   ,215     ,2976    ,-2983   ,-732    ,3046    ,-665    ,-2529   ,3393    ,-711    ,-2825   ,3017    ,1043    ,-3637   ,1638    ,\n    2983    ,-4759   ,1424    ,3255    ,-3197   ,-340    ,1185    ,1232    ,76      ,-3144   ,1820    ,2450    ,-2915   ,346     ,879     ,\n    -720    ,1501    ,-1931   ,225     ,2937    ,-2305   ,-1499   ,2225    ,1611    ,-3508   ,1569    ,1918    ,-3791   ,2618    ,488     ,\n    -1802   ,96      ,1894    ,411     ,-3746   ,3488    ,-258    ,-2730   ,3968    ,-2159   ,-1434   ,3048    ,-151    ,-2853   ,1710    ,\n    2285    ,-3119   ,-236    ,2408    ,499     ,-3161   ,1770    ,2437    ,-3834   ,1335    ,977     ,-1101   ,910     ,-1185   ,1725    ,\n    -43     ,-1784   ,451     ,1517    ,799     ,-3636   ,2770    ,640     ,-2481   ,1152    ,651     ,837     ,-2593   ,1705    ,608     ,\n    -2460   ,3209    ,-192    ,-3566   ,3103    ,1328    ,-2678   ,-635    ,2621    ,451     ,-3000   ,1814    ,121     ,337     ,-182    ,\n    -1219   ,1381    ,-118    ,-1415   ,2717    ,-820    ,-2218   ,3763    ,-2562   ,-440    ,1135    ,1442    ,-1291   ,-1725   ,3374    ,\n    -2147   ,197     ,869     ,-632    ,93      ,-632    ,2084    ,-151    ,-3019   ,2926    ,1198    ,-4543   ,2746    ,1788    ,-3021   ,\n    664     ,892     ,955     ,-1490   ,-672    ,1884    ,-653    ,-1135   ,1519    ,1300    ,-3262   ,972     ,2630    ,-2210   ,-1302   ,\n    2325    ,1325    ,-3889   ,1435    ,3165    ,-4411   ,866     ,3237    ,-2581   ,-1303   ,2199    ,1209    ,-3596   ,3010    ,529     ,\n    -4204   ,4214    ,-1875   ,234     ,1655    ,-2629   ,1805    ,-911    ,1038    ,-178    ,-1740   ,2562    ,-1324   ,954     ,271     ,\n    -2649   ,2288    ,-54     ,-873    ,844     ,-720    ,186     ,1091    ,-330    ,-346    ,-1392   ,2136    ,608     ,-2800   ,1287    ,\n    400     ,1287    ,-1999   ,835     ,1813    ,-4315   ,2276    ,2300    ,-2483   ,-784    ,1716    ,1609    ,-2486   ,-653    ,2224    ,\n    -782    ,-1071   ,1712    ,563     ,-2203   ,1369    ,66      ,-609    ,958     ,-807    ,-321    ,981     ,2019    ,-4158   ,1243    ,\n    3445    ,-4582   ,1454    ,1701    ,-1600   ,302     ,1879    ,-1960   ,-283    ,1068    ,-1218   ,2105    ,-1143   ,-966    ,1077    ,\n    1747    ,-2046   ,-963    ,1953    ,-183    ,233     ,-331    ,86      ,-831    ,1047    ,-73     ,-553    ,-216    ,2022    ,-294    ,\n    -3071   ,3522    ,-734    ,-1746   ,2138    ,-873    ,196     ,-556    ,385     ,1231    ,-1346   ,2331    ,-2603   ,-991    ,4213    ,\n    -2594   ,-491    ,1301    ,-1234   ,2226    ,-70     ,-2429   ,1489    ,-342    ,1215    ,-804    ,-1347   ,3446    ,-1625   ,-2047   ,\n    2628    ,132     ,-1672   ,948     ,606     ,-1174   ,163     ,2134    ,-1598   ,-821    ,1429    ,-194    ,-879    ,846     ,1723    ,\n    -3453   ,1615    ,2460    ,-3716   ,613     ,2471    ,-1136   ,-1536   ,1999    ,792     ,-3095   ,2226    ,1589    ,-3730   ,1652    ,\n    -173    ,1123    ,-44     ,-876    ,1906    ,-3523   ,2934    ,135     ,-2405   ,2489    ,-656    ,-1523   ,2639    ,-163    ,-3391   ,\n    3856    ,-411    ,-2924   ,2425    ,1753    ,-3839   ,1578    ,2382    ,-3721   ,1086    ,1463    ,815     ,-3614   ,2333    ,2054    ,\n    -4920   ,3135    ,1284    ,-2436   ,-413    ,2815    ,-605    ,-2635   ,2666    ,-147    ,-2060   ,2173    ,1140    ,-3678   ,2308    ,\n    1692    ,-3527   ,1068    ,1542    ,663     ,-2590   ,227     ,1827    ,-1187   ,2193    ,-1844   ,-1242   ,2516    ,-1093   ,46      ,\n    386     ,-62     ,-260    ,-117    ,1605    ,-1336   ,-1259   ,3136    ,-817    ,-2872   ,3982    ,-978    ,-3051   ,3918    ,-359    ,\n    -2999   ,2179    ,1884    ,-3500   ,833     ,3096    ,-3723   ,461     ,3310    ,-2645   ,-1301   ,2964    ,343     ,-3420   ,2352    ,\n    1840    ,-4456   ,2882    ,1669    ,-3641   ,846     ,2262    ,-1121   ,-1493   ,3488    ,-2521   ,-1933   ,4797    ,-2589   ,-1529   ,\n    4125    ,-2056   ,-2406   ,3484    ,313     ,-3167   ,2081    ,1297    ,-2689   ,1594    ,88      ,-667    ,-375    ,2374    ,-794    ,\n    -3128   ,4937    ,-2505   ,-1843   ,3422    ,-466    ,-1883   ,860     ,2485    ,-3312   ,126     ,3462    ,-2355   ,-1910   ,3553    ,\n    -602    ,-2224   ,2535    ,-1617   ,590     ,1826    ,-2578   ,196     ,1116    ,-192    ,985     ,-984    ,-531    ,2495    ,-2551   ,\n    -118    ,1757    ,-937    ,364     ,-85     ,-486    ,693     ,2044    ,-3638   ,858     ,3304    ,-4039   ,878     ,2731    ,-2215   ,\n    -802    ,2425    ,-1116   ,-781    ,1561    ,-917    ,460     ,-715    ,1050    ,622     ,-1924   ,1177    ,-429    ,1142    ,-574    ,\n    -707    ,544     ,222     ,933     ,-2003   ,932     ,1137    ,-1383   ,293     ,200     ,-758    ,2203    ,-512    ,-1780   ,755     ,\n    748     ,-554    ,-282    ,2347    ,-2633   ,-725    ,3731    ,-2045   ,-1186   ,2216    ,-1677   ,502     ,413     ,737     ,602     ,\n    -4021   ,3264    ,888     ,-2576   ,1195    ,-635    ,1829    ,-860    ,-1495   ,1995    ,-817    ,-653    ,1584    ,-116    ,-2348   ,\n    2404    ,1038    ,-3311   ,1761    ,1272    ,-2235   ,1053    ,587     ,-1506   ,1938    ,-540    ,-1008   ,722     ,-363    ,1869    ,\n    -1307   ,-1674   ,2939    ,-293    ,-1738   ,686     ,551     ,346     ,-351    ,-1223   ,1399    ,1466    ,-2363   ,-265    ,1294    ,\n    1423    ,-2029   ,-9      ,968     ,-1522   ,3193    ,-2155   ,-1637   ,3392    ,-450    ,-2789   ,2084    ,1788    ,-3245   ,978     ,\n    1984    ,-2577   ,405     ,2559    ,-2212   ,-441    ,1420    ,912     ,-1612   ,-831    ,2000    ,-712    ,-409    ,934     ,-898    ,\n    -44     ,2248    ,-2080   ,-1112   ,3033    ,-71     ,-2592   ,756     ,1192    ,1       ,115     ,-379    ,-961    ,540     ,2005    ,\n    -1888   ,-492    ,1154    ,895     ,-1091   ,-1025   ,2233    ,-847    ,-764    ,1073    ,-1141   ,1533    ,990     ,-3273   ,1244    ,\n    2222    ,-2190   ,-91     ,1714    ,-1127   ,-34     ,672     ,-219    ,-794    ,1102    ,1356    ,-2317   ,-527    ,2534    ,178     ,\n    -2892   ,1643    ,1484    ,-2656   ,2648    ,278     ,-4241   ,4073    ,341     ,-3879   ,2955    ,1277    ,-3020   ,889     ,2236    ,\n    -3264   ,2358    ,344     ,-2725   ,2077    ,-415    ,2213    ,-2900   ,-144    ,2928    ,-3254   ,3035    ,-1948   ,-59     ,2500    ,\n    -2724   ,833     ,-179    ,2218    ,-1776   ,-1767   ,3689    ,-1221   ,-1950   ,1742    ,554     ,-1176   ,1454    ,-364    ,-1629   ,\n    707     ,2054    ,-1241   ,-1124   ,1328    ,-1125   ,2201    ,-335    ,-3329   ,3842    ,-41     ,-3049   ,1994    ,-7      ,1576    ,\n    -1558   ,-1906   ,3459    ,-1107   ,-1116   ,1495    ,-956    ,9       ,1958    ,-1573   ,-1149   ,1784    ,1184    ,-2244   ,-277    ,\n    2715    ,-1231   ,-1810   ,2016    ,1408    ,-3089   ,709     ,2803    ,-2746   ,-485    ,3522    ,-2100   ,-1532   ,2579    ,-890    ,\n    -407    ,946     ,-447    ,43      ,165     ,128     ,-474    ,-170    ,2277    ,-1312   ,-2028   ,2860    ,-411    ,-1979   ,2618    ,\n    -211    ,-2088   ,1757    ,44      ,-1446   ,2154    ,-389    ,-1974   ,2278    ,-133    ,-1741   ,967     ,2227    ,-2943   ,125     ,\n    3364    ,-3581   ,210     ,1867    ,549     ,-2271   ,-80     ,3663    ,-3445   ,178     ,1287    ,546     ,178     ,-2586   ,1763    ,\n    -683    ,1633    ,46      ,-3142   ,3086    ,712     ,-2880   ,1105    ,2220    ,-2943   ,388     ,2498    ,-1736   ,-1485   ,2970    ,\n    -110    ,-3064   ,3437    ,-1783   ,120     ,1645    ,-2662   ,2390    ,-823    ,-338    ,186     ,412     ,962     ,-2284   ,1415    ,\n    686     ,-1039   ,-228    ,1161    ,91      ,-2081   ,2606    ,94      ,-3095   ,2552    ,1382    ,-3145   ,594     ,2793    ,-1991   ,\n    -1704   ,3955    ,-1823   ,-2184   ,4046    ,-1819   ,-1657   ,2097    ,1229    ,-2172   ,-187    ,1583    ,-1498   ,511     ,2174    ,\n    -2287   ,-810    ,3599    ,-2493   ,-1432   ,2840    ,290     ,-2452   ,1629    ,301     ,-2245   ,3310    ,-821    ,-2370   ,2036    ,\n    1588    ,-2941   ,347     ,3284    ,-3094   ,-1024   ,3609    ,-1670   ,-1247   ,3354    ,-2464   ,-1236   ,2587    ,332     ,-1642   ,\n    -978    ,2830    ,-263    ,-2347   ,2269    ,-863    ,-822    ,2751    ,-2356   ,276     ,710     ,-478    ,1006    ,-1101   ,-87     ,\n    505     ,1031    ,-1286   ,-314    ,1258    ,-859    ,282     ,178     ,-221    ,280     ,-963    ,1405    ,813     ,-2935   ,1288    ,\n    2413    ,-3046   ,89      ,3079    ,-2506   ,-793    ,1771    ,847     ,-1651   ,-1018   ,3675    ,-1814   ,-1561   ,1370    ,65      ,\n    961     ,-1653   ,733     ,-143    ,-82     ,1641    ,-2263   ,213     ,2580    ,-1660   ,-1674   ,3233    ,-1464   ,-946    ,1620    ,\n    -596    ,-70     ,-167    ,48      ,655     ,1593    ,-3752   ,1755    ,2523    ,-4186   ,1480    ,2538    ,-2576   ,-640    ,3085    ,\n    -1978   ,-400    ,642     ,522     ,705     ,-1994   ,1119    ,115     ,-981    ,2240    ,-917    ,-1417   ,1605    ,-608    ,345     ,\n    -286    ,447     ,227     ,-1206   ,1409    ,-129    ,-797    ,776     ,-99     ,-27     ,-313    ,415     ,1157    ,-1945   ,506     ,\n    1534    ,-1298   ,-333    ,1132    ,175     ,-1418   ,596     ,2049    ,-2331   ,60      ,1859    ,-1935   ,1612    ,-429    ,-725    ,\n    215     ,1070    ,584     ,-2593   ,1989    ,70      ,-1085   ,1073    ,-422    ,-489    ,1639    ,-105    ,-2163   ,2197    ,-432    ,\n    -1453   ,2794    ,-1048   ,-1931   ,2188    ,1241    ,-3304   ,1448    ,2310    ,-2945   ,45      ,1606    ,966     ,-2801   ,1170    ,\n    2240    ,-3219   ,554     ,2551    ,-2191   ,-707    ,3407    ,-2619   ,-758    ,2219    ,-24     ,-1131   ,-263    ,2971    ,-2995   ,\n    -129    ,2831    ,-3082   ,1326    ,725     ,-312    ,295     ,-1590   ,1216    ,755     ,-1232   ,429     ,516     ,-649    ,812     ,\n    -803    ,166     ,435     ,665     ,-295    ,-1287   ,621     ,397     ,1406    ,-2054   ,-309    ,1996    ,-19     ,-2127   ,972     ,\n    2378    ,-2935   ,28      ,2213    ,-237    ,-2459   ,2203    ,1181    ,-3086   ,1568    ,271     ,-667    ,802     ,-72     ,-527    ,\n    498     ,108     ,-328    ,445     ,-276    ,429     ,-790    ,1002    ,454     ,-1701   ,1643    ,-826    ,-453    ,2677    ,-2506   ,\n    -497    ,3060    ,-2096   ,-652    ,1338    ,1406    ,-2079   ,-608    ,2964    ,-2109   ,-682    ,1888    ,671     ,-2560   ,911     ,\n    2467    ,-3191   ,373     ,2780    ,-2459   ,28      ,2138    ,-2642   ,1028    ,2023    ,-2631   ,918     ,304     ,-638    ,1612    ,\n    -1962   ,1483    ,181     ,-2275   ,2969    ,-505    ,-2004   ,1896    ,35      ,-1103   ,947     ,-50     ,-312    ,306     ,114     ,\n    -543    ,683     ,749     ,-2314   ,1664    ,1614    ,-2560   ,-306    ,2484    ,92      ,-3288   ,2727    ,771     ,-3059   ,1747    ,\n    1923    ,-2597   ,-209    ,3091    ,-2562   ,-725    ,2564    ,-87     ,-2723   ,2452    ,929     ,-3869   ,3419    ,258     ,-2728   ,\n    1457    ,799     ,-258    ,-709    ,826     ,336     ,-1050   ,538     ,1387    ,-1211   ,-1235   ,1234    ,-125    ,1290    ,-913    ,\n    -873    ,1565    ,-819    ,270     ,48      ,196     ,-415    ,164     ,1181    ,-1501   ,-388    ,2550    ,-1250   ,-1782   ,3409    ,\n    -1406   ,-2320   ,3441    ,-399    ,-2167   ,925     ,1866    ,-938    ,-2042   ,3254    ,-651    ,-2389   ,1814    ,1220    ,-1202   ,\n    -1305   ,2528    ,-1677   ,60      ,2294    ,-2564   ,78      ,1736    ,-768    ,33      ,-17     ,22      ,1821    ,-2789   ,-70     ,\n    1932    ,-455    ,78      ,-99     ,491     ,-1232   ,756     ,259     ,-276    ,28      ,-205    ,1447    ,-1713   ,-259    ,2601    ,\n    -1545   ,-1589   ,2109    ,986     ,-2652   ,296     ,2855    ,-2270   ,-1189   ,3154    ,-1019   ,-2408   ,3032    ,-261    ,-2558   ,\n    2610    ,626     ,-2597   ,503     ,1219    ,-85     ,-879    ,1008    ,768     ,-3044   ,2874    ,-87     ,-2736   ,2881    ,-543    ,\n    -1585   ,1658    ,1113    ,-3090   ,2073    ,1263    ,-3523   ,2059    ,1528    ,-2081   ,-797    ,3247    ,-1730   ,-1608   ,2980    ,\n    -1787   ,708     ,518     ,-1661   ,1357    ,223     ,-598    ,8       ,-392    ,1836    ,-515    ,-1911   ,1669    ,274     ,291     ,\n    -1368   ,474     ,874     ,-1644   ,2220    ,-148    ,-2018   ,929     ,929     ,59      ,-1389   ,125     ,2438    ,-1839   ,-1001   ,\n    1490    ,495     ,314     ,-1985   ,1008    ,689     ,-835    ,423     ,-685    ,2064    ,-1178   ,-1072   ,1530    ,-1019   ,1396    ,\n    -1208   ,357     ,569     ,-791    ,1566    ,-1865   ,547     ,1067    ,-986    ,255     ,237     ,-857    ,1685    ,208     ,-2488   ,\n    1306    ,1886    ,-1717   ,-1266   ,2417    ,-1268   ,1372    ,194     ,-2833   ,2147    ,-604    ,1400    ,-376    ,-1549   ,1829    ,\n    -864    ,157     ,-461    ,1469    ,73      ,-2172   ,1992    ,-256    ,-802    ,1027    ,-263    ,-356    ,658     ,-317    ,251     ,\n    -542    ,423     ,1427    ,-1535   ,-535    ,790     ,1402    ,-1123   ,-1709   ,2850    ,-88     ,-2934   ,3533    ,-1160   ,-1575   ,\n    2899    ,-1871   ,-387    ,1344    ,504     ,-1220   ,-527    ,1273    ,1198    ,-2281   ,425     ,2129    ,-2578   ,431     ,2547    ,\n    -1999   ,-1054   ,1870    ,105     ,-607    ,-305    ,1440    ,-1092   ,-75     ,230     ,1501    ,-631    ,-2529   ,2401    ,-194    ,\n    304     ,-786    ,467     ,-135    ,220     ,1004    ,-1929   ,1390    ,122     ,-575    ,203     ,-346    ,482     ,1421    ,-1939   ,\n    -303    ,3069    ,-2742   ,-153    ,2160    ,-1695   ,474     ,417     ,-227    ,-217    ,-139    ,1897    ,-1629   ,-916    ,2658    ,\n    -1255   ,-1104   ,2030    ,-581    ,-894    ,1142    ,-301    ,-173    ,376     ,-80     ,-33     ,186     ,5       ,-36     ,199     ,\n    -768    ,1422    ,323     ,-2561   ,2194    ,866     ,-2160   ,918     ,435     ,-558    ,-10     ,1257    ,-702    ,-1229   ,2267    ,\n    -1148   ,-610    ,2035    ,-2142   ,877     ,2032    ,-2968   ,326     ,2814    ,-2300   ,-693    ,2619    ,-1495   ,-561    ,1455    ,\n    -850    ,194     ,440     ,-529    ,369     ,-464    ,1048    ,-187    ,-1476   ,2270    ,-880    ,-1576   ,2976    ,-1271   ,-1773   ,\n    3260    ,-1115   ,-2165   ,2600    ,633     ,-3118   ,2213    ,465     ,-2123   ,2685    ,-1584   ,-489    ,709     ,1189    ,-221    ,\n    -2679   ,2914    ,247     ,-2474   ,1755    ,549     ,-1431   ,778     ,177     ,-823    ,714     ,780     ,-755    ,-427    ,1281    ,\n    -118    ,-1813   ,2381    ,366     ,-2921   ,762     ,2089    ,-1041   ,-962    ,2594    ,-2194   ,-698    ,2627    ,-406    ,-1843   ,\n    922     ,1487    ,-1994   ,1024    ,8       ,-605    ,327     ,1339    ,-422    ,-2487   ,3189    ,-371    ,-1998   ,1649    ,-519    ,\n    -309    ,1961    ,-1099   ,-1889   ,2877    ,-267    ,-2331   ,2019    ,938     ,-2306   ,531     ,2324    ,-2366   ,-219    ,2535    ,\n    -1725   ,-779    ,1573    ,853     ,-2327   ,837     ,2359    ,-3025   ,-109    ,2775    ,-1135   ,-1693   ,2871    ,-1648   ,-1132   ,\n    3460    ,-2134   ,-930    ,1689    ,-99     ,-218    ,34      ,-382    ,435     ,-38     ,67      ,-130    ,-471    ,1655    ,-1378   ,\n    472     ,938     ,-2399   ,1272    ,1612    ,-1761   ,-887    ,2515    ,-380    ,-2479   ,2115    ,1178    ,-2619   ,288     ,2555    ,\n    -1764   ,-1416   ,3255    ,-2052   ,-400    ,2473    ,-2237   ,-105    ,1165    ,597     ,-1488   ,189     ,1674    ,-1373   ,-509    ,\n    2299    ,-1286   ,-1452   ,2172    ,-827    ,-512    ,1191    ,311     ,-1848   ,1198    ,925     ,-2196   ,2292    ,-337    ,-2215   ,\n    2240    ,507     ,-1786   ,149     ,1287    ,-167    ,-1113   ,1806    ,128     ,-2553   ,1589    ,529     ,-1114   ,1107    ,-77     ,\n    -992    ,436     ,1844    ,-1547   ,-1417   ,2843    ,-885    ,-1393   ,1742    ,-347    ,-612    ,760     ,-220    ,-267    ,-50     ,\n    1412    ,-239    ,-2352   ,2597    ,-429    ,-1554   ,2675    ,-1688   ,-501    ,1812    ,-694    ,-882    ,712     ,1301    ,-1630   ,\n    51      ,1345    ,-1552   ,978     ,982     ,-1796   ,781     ,517     ,-966    ,1266    ,-502    ,-990    ,2034    ,-623    ,-1663   ,\n    1814    ,863     ,-2449   ,962     ,1387    ,-1628   ,1783    ,-1401   ,-695    ,2681    ,-2046   ,-151    ,1744    ,-918    ,-47     ,\n    44      ,-388    ,1736    ,-1103   ,-719    ,1345    ,-1270   ,1305    ,702     ,-2304   ,762     ,2134    ,-1832   ,-872    ,2650    ,\n    -1125   ,-1578   ,2259    ,-768    ,-848    ,2525    ,-2120   ,-477    ,2385    ,-1891   ,255     ,1956    ,-2033   ,-348    ,2103    ,\n    -1039   ,-849    ,1032    ,1396    ,-2369   ,405     ,1491    ,-1666   ,2533    ,-1892   ,-864    ,1332    ,822     ,-417    ,-2005   ,\n    3214    ,-1151   ,-1457   ,1136    ,1297    ,-1003   ,-1500   ,2998    ,-1169   ,-1466   ,1697    ,124     ,-1021   ,196     ,1375    ,\n    33      ,-1955   ,727     ,797     ,-215    ,1215    ,-1639   ,-349    ,1433    ,-700    ,-276    ,1599    ,-1342   ,-445    ,2285    ,\n    -2109   ,151     ,2407    ,-2506   ,229     ,1847    ,-1388   ,-136    ,211     ,1597    ,-1287   ,-805    ,1949    ,-1013   ,-284    ,\n    467     ,1027    ,-1123   ,-814    ,2307    ,-775    ,-1868   ,2973    ,-759    ,-2297   ,3318    ,-1594   ,-881    ,2633    ,-1594   ,\n    -581    ,1428    ,-597    ,-233    ,405     ,-37     ,734     ,-807    ,-175    ,1210    ,-1302   ,292     ,1734    ,-1817   ,78      ,\n    704     ,80      ,713     ,-1432   ,396     ,602     ,-105    ,-575    ,560     ,935     ,-1305   ,-335    ,1452    ,240     ,-1867   ,\n    841     ,1937    ,-2179   ,-354    ,2675    ,-2084   ,128     ,522     ,-270    ,1188    ,-1392   ,-127    ,1277    ,652     ,-2097   ,\n    534     ,968     ,228     ,-530    ,-759    ,1341    ,-538    ,86      ,82      ,204     ,-789    ,1181    ,-143    ,-438    ,1350    ,\n    -2083   ,1277    ,-70     ,-536    ,1931    ,-2116   ,111     ,2220    ,-2189   ,1065    ,893     ,-2306   ,1676    ,157     ,-1314   ,\n    1306    ,872     ,-1679   ,-138    ,1636    ,-694    ,-1000   ,1695    ,224     ,-1810   ,562     ,1707    ,-1032   ,-1372   ,2388    ,\n    -820    ,-1395   ,2755    ,-1268   ,-1394   ,2433    ,-909    ,-1185   ,1996    ,-553    ,-819    ,853     ,143     ,-972    ,818     ,\n    1319    ,-2572   ,1140    ,1445    ,-2002   ,332     ,1891    ,-943    ,-1611   ,2036    ,-678    ,-785    ,2076    ,-964    ,-1514   ,\n    2181    ,-70     ,-1630   ,585     ,1544    ,-495    ,-2170   ,2353    ,494     ,-2654   ,1912    ,876     ,-2411   ,1040    ,977     ,\n    -318    ,-1306   ,1561    ,421     ,-2285   ,2567    ,-1352   ,-677    ,795     ,1112    ,-790    ,-1305   ,2798    ,-2304   ,178     ,\n    1572    ,-1354   ,311     ,340     ,-128    ,-211    ,413     ,-255    ,-557    ,1815    ,-854    ,-1753   ,2631    ,-194    ,-2311   ,\n    1675    ,1437    ,-2113   ,-467    ,2174    ,-360    ,-1961   ,2495    ,-217    ,-2772   ,2914    ,68      ,-2314   ,1824    ,743     ,\n    -2252   ,1134    ,1767    ,-2310   ,-111    ,1957    ,-533    ,-1361   ,1416    ,863     ,-2499   ,1650    ,987     ,-2418   ,1474    ,\n    -231    ,-269    ,1814    ,-1616   ,-853    ,1731    ,473     ,-1896   ,542     ,1913    ,-2122   ,79      ,2298    ,-1605   ,-1260   ,\n    2302    ,-37     ,-1955   ,1167    ,1667    ,-2388   ,445     ,2160    ,-3232   ,2026    ,687     ,-2169   ,1135    ,1265    ,-514    ,\n    -2081   ,2725    ,-958    ,-986    ,1273    ,182     ,701     ,-1761   ,590     ,813     ,-1263   ,1039    ,942     ,-2171   ,1656    ,\n    531     ,-2420   ,2370    ,-542    ,-1273   ,2456    ,-1607   ,-351    ,849     ,699     ,191     ,-2311   ,1240    ,957     ,-177    ,\n    -676    ,-514    ,963     ,889     ,-1053   ,-577    ,778     ,590     ,-294    ,-1216   ,1877    ,-209    ,-1807   ,1913    ,139     ,\n    -1335   ,788     ,489     ,-954    ,115     ,1927    ,-2270   ,597     ,1921    ,-2404   ,532     ,683     ,233     ,-461    ,-238    ,\n    757     ,-525    ,-282    ,1405    ,-982    ,310     ,852     ,-1890   ,1372    ,94      ,-1078   ,1384    ,387     ,-1830   ,659     ,\n    1280    ,-945    ,778     ,-597    ,-794    ,1341    ,-141    ,-492    ,374     ,252     ,-403    ,435     ,-467    ,302     ,1052    ,\n    -1975   ,1393    ,846     ,-2258   ,1536    ,299     ,-907    ,554     ,-426    ,950     ,-78     ,-1444   ,1331    ,1164    ,-2308   ,\n    630     ,2016    ,-2011   ,-547    ,2024    ,34      ,-2267   ,2176    ,3       ,-1919   ,2461    ,-764    ,-1040   ,1254    ,-253    ,\n    -274    ,460     ,-211    ,94      ,295     ,-412    ,-369    ,1841    ,-1081   ,-1178   ,2635    ,-1546   ,-833    ,2057    ,-468    ,\n    -1230   ,1263    ,96      ,-834    ,209     ,902     ,417     ,-2290   ,1863    ,765     ,-2063   ,677     ,693     ,985     ,-2281   ,\n    673     ,1868    ,-2265   ,1753    ,-712    ,-1049   ,2303    ,-1424   ,137     ,232     ,-176    ,1117    ,-1051   ,-32     ,553     ,\n    -548    ,327     ,1323    ,-1308   ,-578    ,883     ,589     ,-321    ,-947    ,1159    ,-121    ,-385    ,-236    ,1076    ,260     ,\n    -1712   ,529     ,1743    ,-1006   ,-1182   ,926     ,1268    ,-996    ,-1052   ,2809    ,-2496   ,291     ,2137    ,-2340   ,402     ,\n    1310    ,75      ,-2121   ,2115    ,402     ,-2242   ,1638    ,182     ,-1152   ,732     ,1197    ,-1372   ,-756    ,2046    ,-168    ,\n    -1561   ,723     ,1050    ,135     ,-1384   ,262     ,765     ,-666    ,907     ,467     ,-1363   ,183     ,1010    ,-1032   ,478     ,\n    1267    ,-1623   ,313     ,591     ,-1041   ,1851    ,-496    ,-1819   ,1863    ,556     ,-1985   ,1984    ,-68     ,-2164   ,2299    ,\n    -726    ,-484    ,563     ,92      ,1264    ,-1734   ,-468    ,2131    ,-692    ,-1316   ,1463    ,570     ,-1703   ,1015    ,373     ,\n    -1083   ,1375    ,-439    ,-667    ,784     ,-28     ,-122    ,-4      ,-218    ,1095    ,-608    ,-606    ,1088    ,-835    ,610     ,\n    170     ,-659    ,525     ,29      ,-175    ,173     ,5       ,42      ,-72     ,247     ,-375    ,-121    ,1695    ,-1595   ,-742    ,\n    2011    ,-66     ,-1830   ,687     ,2096    ,-2629   ,445     ,1982    ,-2196   ,71      ,1963    ,-840    ,-1752   ,2146    ,50      ,\n    -2043   ,1652    ,920     ,-2134   ,571     ,1773    ,-2399   ,949     ,1376    ,-2198   ,946     ,1001    ,-1777   ,883     ,1577    ,\n    -2628   ,1036    ,1543    ,-2033   ,109     ,1326    ,374     ,-2037   ,836     ,1904    ,-2342   ,248     ,1865    ,-1578   ,-60     ,\n    1098    ,-733    ,-372    ,1230    ,354     ,-2287   ,1664    ,1133    ,-2457   ,1064    ,563     ,-155    ,-276    ,1215    ,-464    ,\n    -2415   ,2862    ,0       ,-1629   ,496     ,850     ,695     ,-2081   ,690     ,1862    ,-2166   ,545     ,926     ,-1356   ,1969    ,\n    -1245   ,-831    ,2481    ,-1411   ,-739    ,1520    ,-710    ,-225    ,1224    ,-715    ,-494    ,338     ,1224    ,-832    ,-782    ,\n    1491    ,-941    ,-209    ,1757    ,-1126   ,-752    ,1600    ,-666    ,-647    ,853     ,1106    ,-1429   ,-840    ,2503    ,-789    ,\n    -1673   ,2147    ,-163    ,-1766   ,2054    ,228     ,-2222   ,1506    ,1224    ,-1878   ,172     ,935     ,283     ,-763    ,19      ,\n    569     ,-364    ,284     ,-425    ,979     ,-251    ,-642    ,562     ,144     ,-233    ,-292    ,1353    ,-748    ,-1106   ,1766    ,\n    409     ,-1671   ,-14     ,1639    ,-46     ,-1944   ,1805    ,465     ,-1912   ,1340    ,-104    ,-620    ,572     ,1217    ,-1490   ,\n    -704    ,2441    ,-994    ,-1498   ,1895    ,428     ,-1968   ,1203    ,840     ,-1431   ,326     ,959     ,-226    ,-1209   ,1134    ,\n    1106    ,-1849   ,609     ,-178    ,720     ,429     ,-2045   ,2382    ,-868    ,-1006   ,1604    ,-600    ,348     ,-297    ,-129    ,\n    583     ,-217    ,-25     ,175     ,64      ,-447    ,369     ,1298    ,-1826   ,1       ,2388    ,-2166   ,-277    ,2280    ,-1407   ,\n    -603    ,1505    ,-729    ,-100    ,502     ,-199    ,-38     ,-330    ,1464    ,-730    ,-813    ,579     ,469     ,472     ,-1385   ,\n    848     ,262     ,-531    ,429     ,-70     ,106     ,-83     ,125     ,58      ,-34     ,91      ,18      ,49      ,-19     ,98      ,\n    21      ,-340    ,842     ,-32     ,-1064   ,759     ,974     ,-1289   ,91      ,1008    ,-835    ,286     ,115     ,-63     ,287     ,\n    -409    ,-203    ,1394    ,-202    ,-1751   ,1080    ,1390    ,-1678   ,-133    ,1802    ,-1421   ,-88     ,998     ,-734    ,-65     ,\n    1282    ,-903    ,-637    ,1519    ,-840    ,-32     ,401     ,-6      ,-262    ,377     ,-134    ,-406    ,1406    ,-914    ,-905    ,\n    1808    ,-175    ,-1778   ,2402    ,-988    ,-1084   ,2377    ,-1516   ,-465    ,1185    ,603     ,-1275   ,8       ,652     ,158     ,\n    62      ,-790    ,1015    ,-853    ,496     ,1240    ,-2010   ,544     ,1290    ,-542    ,-1038   ,1398    ,564     ,-2373   ,2085    ,\n    72      ,-1438   ,887     ,171     ,376     ,-973    ,708     ,390     ,-814    ,446     ,240     ,-203    ,-366    ,580     ,1072    ,\n    -1258   ,-448    ,1319    ,-1098   ,980     ,524     ,-1719   ,815     ,688     ,-327    ,-220    ,955     ,-701    ,-626    ,1144    ,\n    -714    ,519     ,515     ,-1023   ,598     ,293     ,-898    ,1304    ,-227    ,-847    ,582     ,-6      ,904     ,-1268   ,-136    ,\n    1475    ,-418    ,-835    ,604     ,954     ,-1613   ,679     ,1432    ,-1992   ,312     ,1228    ,-1192   ,305     ,991     ,-871    ,\n    -574    ,1335    ,482     ,-1949   ,672     ,1791    ,-2054   ,343     ,1272    ,-1789   ,1024    ,497     ,-921    ,1197    ,-1013   ,\n    -645    ,1666    ,-379    ,-1065   ,509     ,1133    ,-588    ,-1260   ,1331    ,588     ,-1568   ,750     ,635     ,-882    ,295     ,\n    346     ,-317    ,-238    ,1074    ,-768    ,-687    ,1886    ,-695    ,-1397   ,1535    ,725     ,-2156   ,1256    ,832     ,-1601   ,\n    787     ,307     ,-502    ,-177    ,1519    ,-1067   ,-539    ,1373    ,-907    ,321     ,153     ,26      ,-378    ,441     ,604     ,\n    -1116   ,11      ,1581    ,-711    ,-1389   ,2402    ,-1050   ,-1255   ,2138    ,-170    ,-1460   ,389     ,1902    ,-1870   ,172     ,\n    1690    ,-1985   ,178     ,1898    ,-1283   ,-718    ,2258    ,-1472   ,-916    ,1891    ,159     ,-1726   ,777     ,1260    ,-1864   ,\n    598     ,1507    ,-1372   ,-591    ,2007    ,-1329   ,-502    ,2159    ,-1585   ,-580    ,1998    ,-822    ,-1198   ,1787    ,125     ,\n    -1841   ,1516    ,394     ,-1358   ,926     ,32      ,-214    ,-390    ,1360    ,-741    ,-878    ,1945    ,-1311   ,-300    ,1376    ,\n    129     ,-1470   ,555     ,949     ,-1034   ,158     ,1052    ,-558    ,-909    ,1541    ,-244    ,-908    ,881     ,59      ,-471    ,\n    368     ,258     ,-296    ,-446    ,1306    ,8       ,-1491   ,867     ,202     ,939     ,-991    ,-712    ,1575    ,-859    ,218     ,\n    138     ,-2      ,386     ,-948    ,892     ,846     ,-1748   ,451     ,1722    ,-1661   ,-114    ,1499    ,-889    ,-213    ,726     ,\n    -400    ,-211    ,1171    ,-379    ,-965    ,535     ,1225    ,-1073   ,-761    ,2199    ,-1204   ,-929    ,1725    ,131     ,-1607   ,\n    673     ,1555    ,-1843   ,354     ,1160    ,-954    ,2       ,691     ,-431    ,119     ,160     ,-523    ,1175    ,-374    ,-918    ,\n    614     ,1154    ,-1031   ,-299    ,713     ,-429    ,723     ,-773    ,609     ,104     ,-1017   ,1275    ,433     ,-1760   ,1120    ,\n    591     ,-1348   ,1337    ,-520    ,-347    ,458     ,643     ,-613    ,-318    ,858     ,-529    ,327     ,-474    ,778     ,422     ,\n    -1618   ,927     ,1102    ,-1359   ,204     ,740     ,-636    ,354     ,84      ,-81     ,122     ,-1      ,124     ,-202    ,301     ,\n    175     ,-667    ,607     ,819     ,-1606   ,764     ,1103    ,-1779   ,722     ,480     ,-94     ,-57     ,297     ,-44     ,-929    ,\n    1916    ,-1516   ,-488    ,2167    ,-1295   ,-328    ,356     ,1332    ,-1323   ,-341    ,1795    ,-1514   ,117     ,509     ,748     ,\n    -1004   ,-34     ,886     ,-929    ,326     ,200     ,1087    ,-1265   ,-343    ,1123    ,-336    ,180     ,-664    ,581     ,1066    ,\n    -1776   ,411     ,1579    ,-1647   ,470     ,674     ,-881    ,206     ,1119    ,-789    ,-702    ,1535    ,-584    ,-456    ,761     ,\n    -585    ,400     ,731     ,-1145   ,491     ,341     ,-394    ,426     ,-468    ,152     ,1164    ,-909    ,-910    ,2178    ,-992    ,\n    -948    ,1644    ,-666    ,-576    ,947     ,656     ,-1609   ,712     ,1013    ,-1416   ,658     ,-242    ,847     ,189     ,-1294   ,\n    747     ,-219    ,929     ,-708    ,-348    ,1403    ,-1236   ,220     ,846     ,-578    ,-94     ,544     ,-299    ,67      ,-118    ,\n    283     ,787     ,-1119   ,172     ,580     ,-466    ,313     ,-66     ,-281    ,966     ,-468    ,-889    ,1196    ,575     ,-1409   ,\n    -163    ,1887    ,-948    ,-734    ,474     ,545     ,378     ,-1432   ,947     ,168     ,-956    ,1418    ,-371    ,-896    ,973     ,\n    -164    ,-226    ,-138    ,610     ,484     ,-1649   ,1094    ,773     ,-1823   ,1023    ,1078    ,-1872   ,537     ,1302    ,-1399   ,\n    181     ,792     ,-588    ,79      ,321     ,-640    ,913     ,251     ,-1513   ,1231    ,296     ,-919    ,481     ,-26     ,364     ,\n    -257    ,-630    ,1555    ,-772    ,-780    ,1947    ,-1298   ,-662    ,1665    ,-201    ,-1266   ,1096    ,335     ,-1087   ,832     ,\n    -129    ,-353    ,241     ,1080    ,-1126   ,-475    ,1996    ,-1270   ,-653    ,1078    ,794     ,-1449   ,-36     ,933     ,-339    ,\n    1118    ,-1625   ,287     ,1017    ,-688    ,44      ,-28     ,996     ,-1013   ,99      ,602     ,-537    ,-44     ,663     ,624     ,\n    -1576   ,279     ,1469    ,-892    ,-708    ,1578    ,-364    ,-1201   ,1214    ,-451    ,-90     ,1269    ,-1077   ,-536    ,1286    ,\n    310     ,-1397   ,485     ,1176    ,-1183   ,228     ,598     ,-496    ,-242    ,1311    ,-631    ,-1007   ,1955    ,-820    ,-961    ,\n    1439    ,49      ,-970    ,536     ,540     ,-876    ,351     ,1074    ,-1110   ,-386    ,1495    ,-260    ,-1383   ,1526    ,352     ,\n    -1797   ,1554    ,59      ,-1179   ,899     ,865     ,-1225   ,-126    ,1252    ,-628    ,-102    ,363     ,314     ,-880    ,1335    ,\n    -188    ,-2160   ,2466    ,-44     ,-1334   ,357     ,1117    ,-396    ,-1140   ,2001    ,-940    ,-1085   ,1984    ,-757    ,-1008   ,\n    2006    ,-855    ,-898    ,1565    ,-598    ,-778    ,1424    ,-100    ,-1474   ,1959    ,-619    ,-1059   ,1066    ,625     ,-942    ,\n    -150    ,1785    ,-2035   ,544     ,1128    ,-1175   ,46      ,1032    ,16      ,-1317   ,714     ,731     ,-149    ,-1041   ,1224    ,\n    394     ,-1901   ,1925    ,-167    ,-1590   ,1597    ,185     ,-1036   ,331     ,764     ,-342    ,-463    ,395     ,525     ,-196    ,\n    -812    ,746     ,770     ,-1111   ,184     ,104     ,735     ,51      ,-1510   ,1620    ,-29     ,-991    ,824     ,92      ,-667    ,\n    586     ,785     ,-1153   ,-102    ,1263    ,-203    ,-1199   ,1184    ,245     ,-1294   ,1223    ,452     ,-1503   ,797     ,983     ,\n    -1149   ,-163    ,744     ,733     ,-1168   ,-338    ,1814    ,-1127   ,-370    ,1124    ,-450    ,-180    ,233     ,-178    ,359     ,\n    1047    ,-1841   ,578     ,799     ,-1035   ,1570    ,-1235   ,-55     ,937     ,-580    ,103     ,239     ,-357    ,380     ,582     ,\n    -1070   ,566     ,151     ,-291    ,600     ,-467    ,-271    ,957     ,-83     ,-840    ,375     ,699     ,-214    ,-665    ,345     ,\n    843     ,-556    ,-614    ,1017    ,-130    ,-456    ,381     ,123     ,-491    ,496     ,798     ,-1225   ,-42     ,1318    ,-319    ,\n    -1052   ,842     ,508     ,-950    ,652     ,-68     ,-363    ,1153    ,-782    ,-543    ,985     ,-203    ,206     ,367     ,-1020   ,\n    1106    ,64      ,-1147   ,681     ,66      ,621     ,-560    ,-162    ,674     ,-368    ,114     ,179     ,-107    ,-68     ,91      ,\n    595     ,-522    ,162     ,1036    ,-1548   ,0       ,1365    ,-632    ,-91     ,1211    ,-1376   ,1       ,1145    ,-782    ,110     ,\n    22      ,971     ,-487    ,-986    ,986     ,616     ,-690    ,-454    ,664     ,323     ,-218    ,-504    ,360     ,627     ,-394    ,\n    -414    ,573     ,-408    ,160     ,1173    ,-1628   ,625     ,695     ,-1295   ,1236    ,-517    ,-219    ,846     ,-641    ,63      ,\n    299     ,-441    ,571     ,295     ,-1056   ,460     ,922     ,-834    ,-709    ,1701    ,-619    ,-911    ,739     ,553     ,-202    ,\n    -1233   ,1894    ,-1018   ,-635    ,1498    ,-826    ,-285    ,427     ,887     ,-1208   ,33      ,718     ,352     ,-533    ,-741    ,\n    1247    ,-894    ,423     ,773     ,-1275   ,1062    ,-43     ,-925    ,1202    ,-710    ,100     ,983     ,-1219   ,132     ,1260    ,\n    -556    ,-1101   ,1492    ,-114    ,-1096   ,1126    ,-207    ,436     ,-186    ,-805    ,939     ,-458    ,404     ,502     ,-1146   ,\n    660     ,738     ,-1137   ,236     ,1024    ,-861    ,-18     ,492     ,57      ,-302    ,-39     ,750     ,-605    ,-282    ,912     ,\n    348     ,-1296   ,267     ,1413    ,-1161   ,-299    ,1330    ,-637    ,-449    ,927     ,-627    ,419     ,162     ,-552    ,704     ,\n    -373    ,97      ,87      ,-79     ,521     ,-443    ,-188    ,948     ,-588    ,-320    ,1173    ,-767    ,-119    ,607     ,-296    ,\n    103     ,84      ,69      ,-417    ,796     ,255     ,-1417   ,1305    ,380     ,-1513   ,969     ,764     ,-1171   ,211     ,989     ,\n    -1065   ,327     ,1091    ,-1209   ,82      ,440     ,201     ,60      ,-572    ,1367    ,-916    ,-946    ,1959    ,-672    ,-785    ,\n    1200    ,-400    ,-413    ,1083    ,-549    ,-482    ,1045    ,-349    ,-521    ,941     ,-199    ,-845    ,1087    ,336     ,-1224   ,\n    329     ,1158    ,-747    ,-740    ,1635    ,-615    ,-795    ,1193    ,-392    ,-272    ,119     ,894     ,-750    ,-369    ,1529    ,\n    -1311   ,-114    ,1417    ,-896    ,-505    ,1251    ,61      ,-1280   ,745     ,763     ,-1101   ,248     ,556     ,-54     ,75      ,\n    -22     ,-63     ,-274    ,443     ,-143    ,-107    ,858     ,-622    ,-444    ,1133    ,-266    ,-909    ,1150    ,240     ,-1250   ,\n    665     ,1046    ,-1207   ,-226    ,1456    ,-565    ,-919    ,1100    ,489     ,-1367   ,847     ,771     ,-1614   ,681     ,986     ,\n    -785    ,-426    ,852     ,598     ,-1472   ,673     ,941     ,-1143   ,328     ,241     ,-50     ,77      ,52      ,-299    ,735     ,\n    41      ,-980    ,1112    ,-180    ,-743    ,1095    ,89      ,-1067   ,819     ,321     ,-784    ,575     ,2       ,-168    ,-97     ,\n    571     ,469     ,-1394   ,635     ,935     ,-1118   ,-28     ,1147    ,-335    ,-733    ,671     ,133     ,-418    ,123     ,872     ,\n    -664    ,-632    ,1451    ,-523    ,-545    ,832     ,-428    ,287     ,-272    ,250     ,646     ,-967    ,522     ,79      ,-280    ,\n    395     ,-108    ,-25     ,146     ,5       ,51      ,-18     ,175     ,-348    ,348     ,656     ,-1311   ,1078    ,302     ,-1455   ,\n    1439    ,-201    ,-707    ,1020    ,-415    ,-351    ,349     ,791     ,-540    ,-716    ,1181    ,-186    ,-686    ,734     ,234     ,\n    -830    ,791     ,126     ,-673    ,209     ,672     ,53      ,-1086   ,1093    ,332     ,-1261   ,693     ,701     ,-679    ,-286    ,\n    601     ,428     ,-653    ,95      ,352     ,-258    ,280     ,-139    ,141     ,137     ,-145    ,182     ,-8      ,115     ,-127    ,\n    56      ,466     ,-302    ,-152    ,168     ,244     ,307     ,-426    ,-395    ,942     ,73      ,-798    ,361     ,478     ,26      ,\n    -575    ,314     ,285     ,-215    ,3       ,94      ,529     ,-648    ,111     ,619     ,-614    ,76      ,275     ,206     ,-284    ,\n    671     ,-287    ,-812    ,1253    ,-674    ,-9      ,281     ,-165    ,340     ,21      ,-1      ,-281    ,121     ,23      ,570     ,\n    -434    ,-473    ,809     ,265     ,-840    ,333     ,-26     ,-76     ,918     ,-1257   ,779     ,487     ,-1460   ,914     ,652     ,\n    -1080   ,187     ,853     ,-697    ,-254    ,848     ,-89     ,-587    ,423     ,18      ,2       ,-185    ,369     ,333     ,-827    ,\n    555     ,63      ,-219    ,311     ,-403    ,534     ,169     ,-651    ,479     ,-53     ,-205    ,688     ,-372    ,-504    ,985     ,\n    32      ,-803    ,475     ,158     ,-189    ,230     ,-100    ,134     ,-155    ,43      ,616     ,-435    ,-285    ,353     ,455     ,\n    -314    ,-478    ,748     ,216     ,-806    ,352     ,604     ,-617    ,110     ,400     ,-306    ,-28     ,661     ,-468    ,-246    ,\n    802     ,-332    ,-180    ,-14     ,752     ,-113    ,-1006   ,1339    ,-330    ,-748    ,1258    ,-456    ,-640    ,1042    ,113     ,\n    -1112   ,946     ,219     ,-704    ,434     ,-48     ,-19     ,173     ,592     ,-629    ,-188    ,341     ,273     ,141     ,-627    ,\n    566     ,-5      ,-152    ,259     ,-184    ,154     ,460     ,-544    ,-76     ,905     ,-385    ,-511    ,629     ,422     ,-770    ,\n    288     ,474     ,-608    ,457     ,351     ,-811    ,476     ,682     ,-686    ,-255    ,606     ,521     ,-935    ,350     ,659     ,\n    -1060   ,600     ,704     ,-752    ,-326    ,830     ,293     ,-980    ,490     ,784     ,-1065   ,343     ,503     ,-693    ,696     ,\n    -51     ,-492    ,575     ,38      ,-349    ,79      ,814     ,-596    ,-362    ,1079    ,-729    ,-20     ,704     ,-395    ,-341    ,\n    701     ,202     ,-1016   ,970     ,124     ,-945    ,764     ,338     ,-782    ,259     ,805     ,-618    ,-469    ,1030    ,42      ,\n    -992    ,743     ,59      ,284     ,-125    ,-568    ,444     ,-77     ,530     ,-385    ,-90     ,401     ,-284    ,2       ,743     ,\n    -356    ,-778    ,1205    ,-210    ,-833    ,947     ,262     ,-924    ,230     ,1073    ,-1001   ,-33     ,970     ,-828    ,561     ,\n    27      ,-382    ,168     ,243     ,477     ,-849    ,156     ,830     ,-292    ,-633    ,517     ,649     ,-682    ,-19     ,396     ,\n    -273    ,348     ,119     ,-438    ,404     ,157     ,-466    ,572     ,-89     ,-331    ,623     ,-283    ,-19     ,-34     ,386     ,\n    121     ,-564    ,503     ,-58     ,-104    ,-35     ,420     ,293     ,-1031   ,949     ,55      ,-887    ,1288    ,-546    ,-596    ,\n    952     ,143     ,-842    ,418     ,808     ,-1090   ,359     ,581     ,-599    ,-40     ,691     ,-27     ,-780    ,589     ,90      ,\n    239     ,-25     ,-729    ,849     ,73      ,-471    ,108     ,497     ,64      ,-538    ,330     ,249     ,-224    ,107     ,163     ,\n    -189    ,267     ,138     ,-247    ,-51     ,523     ,7       ,-408    ,318     ,45      ,-48     ,153     ,-108    ,-10     ,605     ,\n    -443    ,-36     ,103     ,159     ,538     ,-875    ,487     ,296     ,-594    ,583     ,215     ,-582    ,344     ,203     ,-225    ,\n    67      ,-46     ,730     ,-421    ,-486    ,702     ,319     ,-642    ,25      ,839     ,-752    ,405     ,203     ,-652    ,919     ,\n    -60     ,-788    ,666     ,500     ,-882    ,487     ,194     ,-372    ,403     ,-188    ,248     ,-265    ,273     ,302     ,-469    ,\n    233     ,-47     ,236     ,20      ,-164    ,-34     ,317     ,255     ,-623    ,142     ,616     ,-202    ,-636    ,681     ,361     ,\n    -845    ,426     ,434     ,-614    ,112     ,704     ,-768    ,87      ,758     ,-559    ,-80     ,194     ,224     ,-314    ,298     ,\n    56      ,-352    ,294     ,18      ,81      ,-196    ,176     ,1       ,-29     ,34      ,122     ,-153    ,134     ,195     ,-347    ,\n    437     ,-103    ,-275    ,191     ,527     ,-454    ,-244    ,769     ,-447    ,-31     ,314     ,-147    ,106     ,-222    ,511     ,\n    -26     ,-609    ,923     ,-329    ,-281    ,426     ,-317    ,610     ,-191    ,-451    ,635     ,-88     ,-142    ,8       ,242     ,\n    234     ,-408    ,188     ,-70     ,393     ,128     ,-753    ,677     ,101     ,-342    ,73      ,145     ,401     ,-403    ,-297    ,\n    770     ,54      ,-793    ,761     ,131     ,-706    ,495     ,456     ,-395    ,-227    ,560     ,-151    ,-109    ,249     ,-53     ,\n    56      ,10      ,88      ,-19     ,84      ,-27     ,-112    ,428     ,-100    ,103     ,139     ,-606    ,455     ,550     ,-658    ,\n    35      ,679     ,-448    ,-22     ,354     ,-334    ,424     ,43      ,-230    ,124     ,43      ,290     ,-194    ,-14     ,205     ,\n    -16     ,-209    ,504     ,-100    ,-178    ,623     ,-698    ,292     ,434     ,-364    ,97      ,221     ,-117    ,-88     ,618     ,\n    -396    ,-275    ,792     ,-128    ,-578    ,465     ,534     ,-691    ,39      ,825     ,-636    ,-129    ,733     ,-382    ,-257    ,\n    686     ,22      ,-691    ,575     ,441     ,-818    ,372     ,542     ,-672    ,179     ,514     ,-395    ,-132    ,682     ,-178    ,\n    -499    ,642     ,49      ,-287    ,85      ,215     ,8       ,-92     ,152     ,-46     ,142     ,55      ,-84     ,-39     ,392     ,\n    -7      ,-402    ,530     ,-41     ,-354    ,566     ,31      ,-523    ,379     ,502     ,-643    ,69      ,705     ,-580    ,3       ,\n    637     ,-336    ,-289    ,639     ,24      ,-471    ,196     ,521     ,-132    ,-558    ,698     ,67      ,-459    ,405     ,65      ,\n    -158    ,177     ,22      ,-85     ,345     ,-83     ,-276    ,422     ,182     ,-384    ,218     ,330     ,-283    ,-23     ,611     ,\n    -441    ,-281    ,943     ,-558    ,-262    ,833     ,-284    ,-353    ,542     ,157     ,-553    ,323     ,446     ,-437    ,-103    ,\n    541     ,-8      ,-465    ,706     ,-120    ,-653    ,892     ,-116    ,-448    ,495     ,-28     ,-130    ,137     ,53      ,-126    ,\n    84      ,503     ,-479    ,-138    ,789     ,-562    ,-32     ,621     ,-396    ,-146    ,348     ,276     ,-416    ,-30     ,705     ,\n    -576    ,-30     ,738     ,-645    ,-65     ,713     ,-288    ,-396    ,615     ,94      ,-487    ,174     ,478     ,-78     ,-415    ,\n    349     ,158     ,-320    ,292     ,312     ,-404    ,169     ,172     ,-258    ,442     ,-36     ,-215    ,285     ,-128    ,150     ,\n    184     ,-207    ,109     ,55      ,154     ,-63     ,-9      ,112     ,69      ,21      ,3       ,67      ,-127    ,417     ,-41     ,\n    -322    ,176     ,417     ,-185    ,-268    ,541     ,-210    ,-186    ,507     ,11      ,-399    ,394     ,137     ,-344    ,286     ,\n    175     ,-230    ,23      ,553     ,-499    ,83      ,523     ,-497    ,255     ,32      ,2       ,143     ,-135    ,86      ,356     ,\n    -160    ,-266    ,426     ,-61     ,-56     ,72      ,77      ,127     ,-163    ,89      ,172     ,-91     ,17      ,131     ,-99     ,\n    4       ,480     ,-354    ,-198    ,653     ,-307    ,-91     ,180     ,25      ,-36     ,46      ,155     ,-129    ,13      ,52      ,\n    202     ,-171    ,-16     ,180     ,-33     ,-95     ,60      ,396     ,-386    ,-96     ,570     ,-253    ,-317    ,513     ,64      ,\n    -462    ,332     ,219     ,-390    ,160     ,409     ,-372    ,-49     ,447     ,-267    ,10      ,193     ,-74     ,64      ,12      ,\n    96      ,-106    ,121     ,130     ,-80     ,100     ,-31     ,-111    ,301     ,158     ,-398    ,296     ,133     ,-178    ,4       ,\n    297     ,55      ,-353    ,384     ,-4      ,-154    ,84      ,337     ,-68     ,-270    ,366     ,-186    ,69      ,343     ,-260    ,\n    -96     ,461     ,-123    ,-224    ,314     ,-18     ,44      ,-33     ,25      ,143     ,-47     ,-32     ,-25     ,16      ,-11     ,\n    6       ,-3      ,0       ,1       ,-3      ,3       ,-4      ,4       ,-3      ,3       ,-2      ,1       ,0       ,0       ,0       ,\n    0       ,0       ,0       ,0       ,-137    ,1352    ,7600    ,14684   ,20671   ,25482   ,28813   ,31066   ,32247   ,32757   ,32649   ,\n    32190   ,31413   ,30455   ,29345   ,28132   ,26863   ,25536   ,24178   ,22781   ,21402   ,19965   ,18604   ,16998   ,14851   ,12654   ,\n    10588   ,8646    ,6852    ,5171    ,3631    ,2167    ,809     ,-486    ,-1713   ,-2879   ,-4007   ,-5082   ,-6128   ,-7126   ,-8104   ,\n    -9042   ,-9954   ,-10829  ,-11691  ,-12520  ,-13317  ,-14104  ,-14850  ,-15586  ,-16278  ,-16966  ,-17622  ,-18245  ,-18852  ,-19421  ,\n    -19975  ,-20497  ,-20992  ,-21461  ,-21907  ,-22324  ,-22717  ,-23078  ,-23413  ,-23720  ,-23995  ,-24246  ,-24469  ,-24665  ,-24830  ,\n    -24964  ,-25069  ,-25151  ,-25205  ,-25230  ,-25229  ,-25200  ,-25144  ,-25065  ,-24958  ,-24830  ,-24675  ,-24493  ,-24287  ,-24060  ,\n    -23811  ,-23527  ,-23240  ,-22925  ,-22580  ,-22222  ,-21841  ,-21443  ,-21020  ,-20578  ,-20122  ,-19642  ,-19152  ,-18639  ,-18107  ,\n    -17564  ,-17002  ,-16426  ,-15831  ,-15236  ,-14620  ,-13994  ,-13358  ,-12709  ,-12052  ,-11384  ,-10707  ,-10017  ,-9326   ,-8615   ,\n    -7910   ,-7187   ,-6463   ,-5731   ,-4995   ,-4256   ,-3512   ,-2779   ,-2026   ,-1293   ,-549    ,179     ,902     ,1624    ,2332    ,\n    3047    ,3747    ,4441    ,5116    ,5791    ,6450    ,7104    ,7753    ,8398    ,9034    ,9664    ,10303   ,10921   ,11550   ,12169   ,\n    12780   ,13388   ,13987   ,14581   ,15162   ,15734   ,16298   ,16851   ,17384   ,17909   ,18420   ,18919   ,19406   ,19877   ,20341   ,\n    20802   ,21243   ,21666   ,22082   ,22481   ,22862   ,23224   ,23581   ,23916   ,24227   ,24529   ,24808   ,25064   ,25306   ,25526   ,\n    25726   ,25910   ,26068   ,26210   ,26330   ,26430   ,26506   ,26574   ,26627   ,26660   ,26678   ,26676   ,26661   ,26617   ,26556   ,\n    26461   ,26332   ,26187   ,25996   ,25790   ,25549   ,25284   ,25014   ,24718   ,24413   ,24095   ,23756   ,23392   ,23022   ,22637   ,\n    22227   ,21802   ,21361   ,20898   ,20407   ,19908   ,19379   ,18830   ,18248   ,17643   ,17024   ,16385   ,15734   ,15068   ,14404   ,\n    13736   ,13059   ,12380   ,11704   ,11009   ,10316   ,9617    ,8914    ,8217    ,7514    ,6820    ,6122    ,5436    ,4751    ,4071    ,\n    3399    ,2722    ,2047    ,1377    ,707     ,43      ,-616    ,-1277   ,-1926   ,-2581   ,-3225   ,-3866   ,-4512   ,-5153   ,-5796   ,\n    -6433   ,-7073   ,-7710   ,-8344   ,-8975   ,-9610   ,-10235  ,-10853  ,-11471  ,-12077  ,-12687  ,-13288  ,-13873  ,-14450  ,-15021  ,\n    -15577  ,-16118  ,-16639  ,-17152  ,-17658  ,-18140  ,-18620  ,-19089  ,-19534  ,-19972  ,-20392  ,-20800  ,-21200  ,-21579  ,-21952  ,\n    -22303  ,-22654  ,-22995  ,-23313  ,-23632  ,-23939  ,-24232  ,-24504  ,-24764  ,-25002  ,-25214  ,-25412  ,-25583  ,-25734  ,-25863  ,\n    -25963  ,-26047  ,-26100  ,-26134  ,-26145  ,-26132  ,-26098  ,-26038  ,-25963  ,-25853  ,-25720  ,-25565  ,-25380  ,-25186  ,-24977  ,\n    -24748  ,-24506  ,-24252  ,-23978  ,-23697  ,-23407  ,-23107  ,-22797  ,-22481  ,-22151  ,-21812  ,-21462  ,-21085  ,-20690  ,-20273  ,\n    -19824  ,-19357  ,-18870  ,-18356  ,-17826  ,-17279  ,-16725  ,-16155  ,-15571  ,-14975  ,-14364  ,-13733  ,-13098  ,-12455  ,-11802  ,\n    -11156  ,-10497  ,-9846   ,-9193   ,-8540   ,-7888   ,-7238   ,-6586   ,-5930   ,-5278   ,-4610   ,-3953   ,-3295   ,-2634   ,-1975   ,\n    -1311   ,-647    ,13      ,661     ,1310    ,1952    ,2592    ,3221    ,3839    ,4451    ,5054    ,5657    ,6252    ,6837    ,7422    ,\n    8003    ,8579    ,9165    ,9738    ,10322   ,10900   ,11466   ,12042   ,12606   ,13169   ,13723   ,14275   ,14807   ,15331   ,15844   ,\n    16347   ,16836   ,17301   ,17766   ,18212   ,18635   ,19054   ,19461   ,19846   ,20227   ,20593   ,20943   ,21278   ,21606   ,21919   ,\n    22208   ,22483   ,22722   ,22942   ,23128   ,23282   ,23425   ,23533   ,23623   ,23692   ,23744   ,23784   ,23809   ,23829   ,23832   ,\n    23829   ,23810   ,23785   ,23737   ,23670   ,23600   ,23503   ,23407   ,23285   ,23149   ,23005   ,22841   ,22655   ,22453   ,22239   ,\n    21996   ,21750   ,21478   ,21181   ,20867   ,20529   ,20177   ,19797   ,19399   ,18988   ,18561   ,18119   ,17666   ,17199   ,16724   ,\n    16249   ,15770   ,15287   ,14804   ,14322   ,13839   ,13356   ,12860   ,12362   ,11863   ,11344   ,10824   ,10298   ,9755    ,9199    ,\n    8626    ,8043    ,7446    ,6835    ,6216    ,5587    ,4941    ,4296    ,3636    ,2973    ,2299    ,1611    ,941     ,253     ,-428    ,\n    -1111   ,-1796   ,-2477   ,-3155   ,-3818   ,-4494   ,-5150   ,-5807   ,-6459   ,-7107   ,-7765   ,-8408   ,-9037   ,-9658   ,-10262  ,\n    -10859  ,-11448  ,-12014  ,-12579  ,-13123  ,-13654  ,-14167  ,-14664  ,-15151  ,-15608  ,-16056  ,-16487  ,-16908  ,-17318  ,-17713  ,\n    -18097  ,-18469  ,-18831  ,-19185  ,-19519  ,-19839  ,-20144  ,-20424  ,-20690  ,-20932  ,-21154  ,-21349  ,-21530  ,-21692  ,-21835  ,\n    -21967  ,-22075  ,-22168  ,-22245  ,-22315  ,-22366  ,-22398  ,-22425  ,-22432  ,-22428  ,-22414  ,-22384  ,-22341  ,-22288  ,-22225  ,\n    -22144  ,-22044  ,-21935  ,-21807  ,-21662  ,-21498  ,-21309  ,-21117  ,-20901  ,-20664  ,-20419  ,-20147  ,-19864  ,-19558  ,-19241  ,\n    -18901  ,-18542  ,-18171  ,-17785  ,-17393  ,-16981  ,-16566  ,-16141  ,-15709  ,-15266  ,-14813  ,-14351  ,-13867  ,-13374  ,-12868  ,\n    -12351  ,-11816  ,-11282  ,-10729  ,-10164  ,-9595   ,-9018   ,-8424   ,-7814   ,-7217   ,-6601   ,-5993   ,-5384   ,-4779   ,-4188   ,\n    -3599   ,-3009   ,-2417   ,-1835   ,-1248   ,-671    ,-84     ,493     ,1070    ,1659    ,2236    ,2814    ,3389    ,3959    ,4529    ,\n    5095    ,5648    ,6204    ,6754    ,7291    ,7825    ,8357    ,8883    ,9406    ,9919    ,10421   ,10912   ,11395   ,11865   ,12313   ,\n    12753   ,13180   ,13596   ,13998   ,14384   ,14762   ,15121   ,15474   ,15819   ,16139   ,16447   ,16752   ,17034   ,17311   ,17580   ,\n    17834   ,18083   ,18322   ,18548   ,18765   ,18976   ,19175   ,19359   ,19532   ,19695   ,19838   ,19970   ,20098   ,20204   ,20302   ,\n    20379   ,20437   ,20478   ,20499   ,20506   ,20488   ,20463   ,20412   ,20346   ,20260   ,20146   ,20026   ,19878   ,19711   ,19534   ,\n    19343   ,19134   ,18916   ,18691   ,18462   ,18237   ,17999   ,17763   ,17527   ,17278   ,17020   ,16759   ,16494   ,16220   ,15941   ,\n    15662   ,15372   ,15069   ,14762   ,14430   ,14100   ,13752   ,13386   ,13016   ,12628   ,12231   ,11814   ,11397   ,10963   ,10520   ,\n    10066   ,9607    ,9136    ,8643    ,8150    ,7636    ,7105    ,6566    ,6014    ,5452    ,4887    ,4316    ,3745    ,3166    ,2588    ,\n    2003    ,1421    ,840     ,258     ,-312    ,-887    ,-1448   ,-2010   ,-2566   ,-3118   ,-3670   ,-4210   ,-4744   ,-5276   ,-5797   ,\n    -6315   ,-6824   ,-7319   ,-7820   ,-8303   ,-8796   ,-9285   ,-9771   ,-10265  ,-10742  ,-11218  ,-11680  ,-12137  ,-12578  ,-13012  ,\n    -13444  ,-13856  ,-14258  ,-14649  ,-15023  ,-15377  ,-15719  ,-16042  ,-16349  ,-16643  ,-16913  ,-17172  ,-17413  ,-17639  ,-17850  ,\n    -18034  ,-18206  ,-18361  ,-18501  ,-18623  ,-18719  ,-18809  ,-18883  ,-18946  ,-18987  ,-19013  ,-19033  ,-19032  ,-19016  ,-18986  ,\n    -18944  ,-18894  ,-18835  ,-18761  ,-18679  ,-18595  ,-18504  ,-18397  ,-18289  ,-18173  ,-18048  ,-17916  ,-17776  ,-17626  ,-17462  ,\n    -17296  ,-17109  ,-16917  ,-16716  ,-16495  ,-16268  ,-16022  ,-15768  ,-15496  ,-15210  ,-14918  ,-14611  ,-14296  ,-13969  ,-13629  ,\n    -13288  ,-12935  ,-12577  ,-12206  ,-11825  ,-11428  ,-11013  ,-10593  ,-10159  ,-9711   ,-9247   ,-8778   ,-8295   ,-7810   ,-7314   ,\n    -6807   ,-6300   ,-5788   ,-5275   ,-4760   ,-4253   ,-3738   ,-3223   ,-2715   ,-2201   ,-1686   ,-1178   ,-663    ,-153    ,353     ,\n    874     ,1385    ,1909    ,2414    ,2921    ,3427    ,3912    ,4399    ,4861    ,5319    ,5764    ,6204    ,6638    ,7060    ,7477    ,\n    7882    ,8288    ,8681    ,9075    ,9461    ,9837    ,10211   ,10572   ,10931   ,11276   ,11605   ,11923   ,12225   ,12520   ,12797   ,\n    13063   ,13318   ,13565   ,13802   ,14028   ,14247   ,14457   ,14658   ,14853   ,15039   ,15211   ,15383   ,15545   ,15697   ,15839   ,\n    15968   ,16092   ,16206   ,16315   ,16429   ,16538   ,16641   ,16737   ,16818   ,16895   ,16954   ,17005   ,17044   ,17067   ,17083   ,\n    17082   ,17084   ,17073   ,17047   ,17021   ,16983   ,16934   ,16873   ,16803   ,16713   ,16601   ,16475   ,16332   ,16178   ,16001   ,\n    15819   ,15632   ,15426   ,15214   ,14977   ,14736   ,14481   ,14204   ,13919   ,13614   ,13295   ,12953   ,12595   ,12221   ,11838   ,\n    11447   ,11038   ,10623   ,10206   ,9779    ,9348    ,8920    ,8483    ,8044    ,7607    ,7172    ,6737    ,6300    ,5857    ,5420    ,\n    4989    ,4552    ,4119    ,3689    ,3267    ,2842    ,2422    ,2006    ,1586    ,1167    ,753     ,338     ,-78     ,-492    ,-916    ,\n    -1336   ,-1761   ,-2183   ,-2608   ,-3033   ,-3450   ,-3877   ,-4304   ,-4732   ,-5161   ,-5598   ,-6038   ,-6479   ,-6914   ,-7344   ,\n    -7773   ,-8192   ,-8603   ,-9006   ,-9410   ,-9799   ,-10185  ,-10568  ,-10935  ,-11303  ,-11659  ,-12004  ,-12332  ,-12653  ,-12967  ,\n    -13265  ,-13551  ,-13817  ,-14067  ,-14300  ,-14524  ,-14734  ,-14924  ,-15105  ,-15281  ,-15442  ,-15594  ,-15733  ,-15865  ,-15994  ,\n    -16112  ,-16228  ,-16336  ,-16433  ,-16522  ,-16603  ,-16669  ,-16719  ,-16759  ,-16780  ,-16786  ,-16778  ,-16748  ,-16707  ,-16646  ,\n    -16562  ,-16465  ,-16348  ,-16219  ,-16074  ,-15922  ,-15764  ,-15586  ,-15410  ,-15221  ,-15023  ,-14822  ,-14606  ,-14393  ,-14166  ,\n    -13927  ,-13686  ,-13429  ,-13162  ,-12883  ,-12592  ,-12299  ,-11989  ,-11681  ,-11364  ,-11030  ,-10698  ,-10353  ,-9997   ,-9637   ,\n    -9273   ,-8900   ,-8517   ,-8132   ,-7747   ,-7357   ,-6969   ,-6590   ,-6202   ,-5822   ,-5443   ,-5059   ,-4678   ,-4284   ,-3885   ,\n    -3477   ,-3071   ,-2660   ,-2240   ,-1827   ,-1403   ,-980    ,-567    ,-150    ,265     ,682     ,1097    ,1516    ,1941    ,2357    ,\n    2784    ,3204    ,3619    ,4039    ,4456    ,4870    ,5280    ,5695    ,6104    ,6509    ,6918    ,7318    ,7712    ,8100    ,8470    ,\n    8838    ,9188    ,9533    ,9867    ,10186   ,10513   ,10821   ,11126   ,11421   ,11703   ,11975   ,12235   ,12500   ,12746   ,12988   ,\n    13219   ,13442   ,13665   ,13871   ,14072   ,14269   ,14449   ,14621   ,14775   ,14919   ,15052   ,15167   ,15275   ,15371   ,15458   ,\n    15535   ,15595   ,15641   ,15677   ,15696   ,15699   ,15691   ,15664   ,15623   ,15570   ,15505   ,15424   ,15331   ,15225   ,15110   ,\n    14984   ,14848   ,14709   ,14563   ,14413   ,14249   ,14083   ,13928   ,13758   ,13585   ,13414   ,13229   ,13037   ,12838   ,12625   ,\n    12398   ,12167   ,11915   ,11646   ,11365   ,11072   ,10765   ,10443   ,10126   ,9788    ,9450    ,9113    ,8763    ,8419    ,8070    ,\n    7725    ,7381    ,7028    ,6680    ,6321    ,5962    ,5599    ,5229    ,4863    ,4492    ,4126    ,3757    ,3396    ,3032    ,2652    ,\n    2281    ,1899    ,1509    ,1116    ,716     ,308     ,-94     ,-506    ,-923    ,-1340   ,-1755   ,-2165   ,-2570   ,-2962   ,-3362   ,\n    -3755   ,-4145   ,-4536   ,-4930   ,-5324   ,-5711   ,-6105   ,-6489   ,-6874   ,-7246   ,-7609   ,-7973   ,-8318   ,-8656   ,-8989   ,\n    -9314   ,-9632   ,-9934   ,-10232  ,-10527  ,-10813  ,-11097  ,-11376  ,-11645  ,-11911  ,-12163  ,-12408  ,-12639  ,-12856  ,-13077  ,\n    -13289  ,-13491  ,-13688  ,-13878  ,-14056  ,-14218  ,-14372  ,-14511  ,-14628  ,-14734  ,-14821  ,-14891  ,-14948  ,-14989  ,-15016  ,\n    -15026  ,-15024  ,-15004  ,-14969  ,-14931  ,-14881  ,-14817  ,-14748  ,-14667  ,-14575  ,-14476  ,-14369  ,-14244  ,-14105  ,-13965  ,\n    -13807  ,-13641  ,-13473  ,-13291  ,-13099  ,-12897  ,-12686  ,-12463  ,-12244  ,-12009  ,-11767  ,-11529  ,-11270  ,-11012  ,-10748  ,\n    -10481  ,-10210  ,-9927   ,-9644   ,-9354   ,-9058   ,-8745   ,-8430   ,-8114   ,-7783   ,-7449   ,-7121   ,-6788   ,-6459   ,-6136   ,\n    -5810   ,-5489   ,-5163   ,-4833   ,-4501   ,-4169   ,-3833   ,-3484   ,-3128   ,-2770   ,-2410   ,-2049   ,-1693   ,-1329   ,-967    ,\n    -601    ,-235    ,129     ,503     ,867     ,1230    ,1596    ,1963    ,2329    ,2695    ,3064    ,3422    ,3779    ,4139    ,4484    ,\n    4817    ,5153    ,5483    ,5813    ,6139    ,6457    ,6769    ,7075    ,7390    ,7699    ,8004    ,8316    ,8611    ,8907    ,9201    ,\n    9474    ,9743    ,10001   ,10254   ,10499   ,10726   ,10950   ,11168   ,11369   ,11567   ,11754   ,11929   ,12097   ,12250   ,12392   ,\n    12532   ,12666   ,12783   ,12892   ,12986   ,13069   ,13145   ,13208   ,13263   ,13311   ,13359   ,13398   ,13437   ,13476   ,13504   ,\n    13534   ,13558   ,13571   ,13574   ,13569   ,13557   ,13534   ,13505   ,13461   ,13405   ,13333   ,13251   ,13155   ,13050   ,12933   ,\n    12801   ,12667   ,12505   ,12341   ,12162   ,11977   ,11785   ,11575   ,11369   ,11151   ,10930   ,10693   ,10453   ,10197   ,9932    ,\n    9659    ,9370    ,9074    ,8761    ,8451    ,8121    ,7789    ,7460    ,7123    ,6790    ,6450    ,6107    ,5762    ,5419    ,5073    ,\n    4732    ,4389    ,4047    ,3703    ,3357    ,3026    ,2686    ,2340    ,2007    ,1666    ,1326    ,994     ,655     ,312     ,-32     ,\n    -371    ,-725    ,-1080   ,-1433   ,-1794   ,-2142   ,-2495   ,-2842   ,-3183   ,-3518   ,-3846   ,-4176   ,-4489   ,-4800   ,-5108   ,\n    -5402   ,-5709   ,-6010   ,-6307   ,-6608   ,-6904   ,-7203   ,-7494   ,-7792   ,-8084   ,-8370   ,-8653   ,-8928   ,-9195   ,-9444   ,\n    -9688   ,-9921   ,-10144  ,-10358  ,-10567  ,-10768  ,-10951  ,-11133  ,-11305  ,-11476  ,-11637  ,-11784  ,-11939  ,-12078  ,-12207  ,\n    -12331  ,-12438  ,-12544  ,-12648  ,-12743  ,-12833  ,-12908  ,-12972  ,-13024  ,-13058  ,-13079  ,-13084  ,-13074  ,-13048  ,-13007  ,\n    -12952  ,-12880  ,-12802  ,-12709  ,-12597  ,-12483  ,-12366  ,-12242  ,-12115  ,-11988  ,-11856  ,-11725  ,-11585  ,-11440  ,-11288  ,\n    -11119  ,-10949  ,-10772  ,-10590  ,-10401  ,-10209  ,-10015  ,-9816   ,-9611   ,-9400   ,-9184   ,-8950   ,-8719   ,-8480   ,-8231   ,\n    -7986   ,-7729   ,-7469   ,-7206   ,-6937   ,-6663   ,-6384   ,-6102   ,-5815   ,-5526   ,-5225   ,-4928   ,-4618   ,-4301   ,-3990   ,\n    -3663   ,-3339   ,-3002   ,-2671   ,-2338   ,-1998   ,-1654   ,-1307   ,-966    ,-616    ,-267    ,85      ,434     ,787     ,1146    ,\n    1500    ,1853    ,2205    ,2545    ,2885    ,3220    ,3540    ,3861    ,4167    ,4469    ,4759    ,5047    ,5331    ,5608    ,5886    ,\n    6151    ,6421    ,6687    ,6945    ,7192    ,7432    ,7665    ,7895    ,8111    ,8318    ,8529    ,8726    ,8921    ,9111    ,9302    ,\n    9487    ,9667    ,9844    ,10009   ,10172   ,10324   ,10467   ,10596   ,10714   ,10824   ,10922   ,11010   ,11093   ,11161   ,11221   ,\n    11271   ,11311   ,11347   ,11370   ,11397   ,11416   ,11431   ,11442   ,11449   ,11456   ,11457   ,11461   ,11459   ,11467   ,11468   ,\n    11459   ,11456   ,11445   ,11423   ,11390   ,11347   ,11292   ,11229   ,11155   ,11062   ,10961   ,10847   ,10720   ,10575   ,10421   ,\n    10264   ,10090   ,9910    ,9722    ,9530    ,9334    ,9133    ,8929    ,8717    ,8506    ,8282    ,8055    ,7824    ,7583    ,7342    ,\n    7091    ,6836    ,6576    ,6310    ,6041    ,5760    ,5475    ,5187    ,4897    ,4602    ,4311    ,4017    ,3719    ,3418    ,3123    ,\n    2825    ,2528    ,2237    ,1942    ,1652    ,1351    ,1061    ,759     ,450     ,149     ,-154    ,-450    ,-755    ,-1047   ,-1334   ,\n    -1626   ,-1912   ,-2200   ,-2492   ,-2778   ,-3072   ,-3367   ,-3661   ,-3958   ,-4241   ,-4524   ,-4797   ,-5060   ,-5318   ,-5572   ,\n    -5822   ,-6059   ,-6307   ,-6544   ,-6774   ,-7013   ,-7235   ,-7458   ,-7675   ,-7879   ,-8093   ,-8292   ,-8488   ,-8686   ,-8872   ,\n    -9058   ,-9234   ,-9398   ,-9548   ,-9694   ,-9825   ,-9940   ,-10046  ,-10144  ,-10236  ,-10321  ,-10395  ,-10454  ,-10519  ,-10574  ,\n    -10623  ,-10661  ,-10696  ,-10731  ,-10753  ,-10782  ,-10802  ,-10822  ,-10831  ,-10837  ,-10843  ,-10837  ,-10833  ,-10818  ,-10784  ,\n    -10756  ,-10722  ,-10677  ,-10637  ,-10588  ,-10534  ,-10477  ,-10412  ,-10333  ,-10252  ,-10165  ,-10064  ,-9955   ,-9842   ,-9718   ,\n    -9583   ,-9444   ,-9286   ,-9123   ,-8956   ,-8773   ,-8585   ,-8392   ,-8188   ,-7974   ,-7757   ,-7528   ,-7294   ,-7055   ,-6806   ,\n    -6552   ,-6286   ,-6019   ,-5744   ,-5462   ,-5184   ,-4889   ,-4590   ,-4286   ,-3973   ,-3657   ,-3335   ,-3012   ,-2683   ,-2359   ,\n    -2029   ,-1700   ,-1370   ,-1046   ,-730    ,-407    ,-99     ,207     ,509     ,807     ,1099    ,1382    ,1665    ,1937    ,2207    ,\n    2477    ,2747    ,3012    ,3284    ,3561    ,3836    ,4117    ,4400    ,4680    ,4955    ,5230    ,5497    ,5760    ,6012    ,6258    ,\n    6495    ,6715    ,6929    ,7134    ,7326    ,7512    ,7690    ,7853    ,8018    ,8177    ,8328    ,8481    ,8629    ,8777    ,8914    ,\n    9049    ,9178    ,9298    ,9417    ,9530    ,9635    ,9729    ,9814    ,9896    ,9972    ,10039   ,10104   ,10161   ,10216   ,10272   ,\n    10327   ,10378   ,10430   ,10466   ,10495   ,10518   ,10519   ,10520   ,10503   ,10473   ,10434   ,10380   ,10324   ,10265   ,10189   ,\n    10105   ,10020   ,9906    ,9798    ,9671    ,9533    ,9401    ,9254    ,9109    ,8960    ,8805    ,8650    ,8496    ,8324    ,8148    ,\n    7971    ,7789    ,7599    ,7408    ,7211    ,7010    ,6813    ,6610    ,6405    ,6196    ,5990    ,5771    ,5561    ,5356    ,5135    ,\n    4921    ,4700    ,4474    ,4241    ,4003    ,3757    ,3515    ,3273    ,3025    ,2787    ,2544    ,2300    ,2052    ,1804    ,1542    ,\n    1279    ,1014    ,741     ,467     ,182     ,-86     ,-364    ,-645    ,-925    ,-1199   ,-1471   ,-1740   ,-2002   ,-2273   ,-2525   ,\n    -2785   ,-3042   ,-3294   ,-3546   ,-3789   ,-4040   ,-4286   ,-4518   ,-4748   ,-4976   ,-5194   ,-5422   ,-5643   ,-5856   ,-6071   ,\n    -6282   ,-6487   ,-6682   ,-6873   ,-7054   ,-7232   ,-7409   ,-7577   ,-7741   ,-7896   ,-8046   ,-8198   ,-8333   ,-8468   ,-8593   ,\n    -8712   ,-8826   ,-8926   ,-9027   ,-9113   ,-9195   ,-9270   ,-9341   ,-9409   ,-9463   ,-9513   ,-9553   ,-9589   ,-9615   ,-9635   ,\n    -9647   ,-9649   ,-9645   ,-9625   ,-9614   ,-9599   ,-9571   ,-9543   ,-9510   ,-9474   ,-9425   ,-9368   ,-9303   ,-9223   ,-9135   ,\n    -9049   ,-8941   ,-8827   ,-8716   ,-8591   ,-8467   ,-8334   ,-8200   ,-8060   ,-7914   ,-7767   ,-7615   ,-7453   ,-7287   ,-7120   ,\n    -6952   ,-6772   ,-6583   ,-6394   ,-6195   ,-5995   ,-5789   ,-5579   ,-5367   ,-5153   ,-4933   ,-4715   ,-4504   ,-4287   ,-4069   ,\n    -3851   ,-3634   ,-3418   ,-3202   ,-2977   ,-2748   ,-2521   ,-2291   ,-2058   ,-1822   ,-1580   ,-1337   ,-1098   ,-849    ,-609    ,\n    -365    ,-126    ,104     ,346     ,580     ,820     ,1059    ,1298    ,1539    ,1778    ,2026    ,2274    ,2519    ,2757    ,3005    ,\n    3255    ,3491    ,3728    ,3962    ,4184    ,4404    ,4614    ,4821    ,5026    ,5227    ,5423    ,5611    ,5796    ,5972    ,6151    ,\n    6319    ,6477    ,6634    ,6783    ,6929    ,7068    ,7198    ,7322    ,7443    ,7559    ,7672    ,7783    ,7884    ,7974    ,8069    ,\n    8157    ,8234    ,8311    ,8383    ,8453    ,8510    ,8572    ,8621    ,8658    ,8689    ,8700    ,8719    ,8728    ,8730    ,8729    ,\n    8720    ,8709    ,8695    ,8687    ,8670    ,8647    ,8626    ,8602    ,8572    ,8543    ,8510    ,8467    ,8423    ,8376    ,8321    ,\n    8262    ,8197    ,8120    ,8042    ,7958    ,7862    ,7756    ,7647    ,7533    ,7411    ,7291    ,7165    ,7029    ,6890    ,6747    ,\n    6590    ,6425    ,6258    ,6088    ,5905    ,5718    ,5533    ,5339    ,5143    ,4942    ,4738    ,4531    ,4317    ,4104    ,3877    ,\n    3657    ,3436    ,3206    ,2979    ,2742    ,2503    ,2262    ,2023    ,1777    ,1532    ,1289    ,1040    ,793     ,547     ,298     ,\n    53      ,-192    ,-439    ,-683    ,-934    ,-1174   ,-1416   ,-1658   ,-1894   ,-2129   ,-2360   ,-2589   ,-2817   ,-3035   ,-3248   ,\n    -3463   ,-3669   ,-3870   ,-4069   ,-4267   ,-4459   ,-4648   ,-4830   ,-5011   ,-5192   ,-5362   ,-5530   ,-5696   ,-5862   ,-6031   ,\n    -6196   ,-6359   ,-6525   ,-6689   ,-6856   ,-7011   ,-7164   ,-7316   ,-7452   ,-7585   ,-7708   ,-7829   ,-7939   ,-8039   ,-8132   ,\n    -8206   ,-8274   ,-8337   ,-8390   ,-8438   ,-8477   ,-8512   ,-8540   ,-8561   ,-8576   ,-8587   ,-8596   ,-8603   ,-8601   ,-8583   ,\n    -8568   ,-8540   ,-8505   ,-8459   ,-8406   ,-8348   ,-8275   ,-8204   ,-8125   ,-8042   ,-7949   ,-7860   ,-7772   ,-7672   ,-7577   ,\n    -7472   ,-7366   ,-7265   ,-7156   ,-7037   ,-6924   ,-6810   ,-6686   ,-6562   ,-6433   ,-6299   ,-6161   ,-6017   ,-5859   ,-5706   ,\n    -5542   ,-5362   ,-5183   ,-4998   ,-4801   ,-4608   ,-4410   ,-4202   ,-3998   ,-3786   ,-3575   ,-3361   ,-3149   ,-2947   ,-2743   ,\n    -2539   ,-2340   ,-2145   ,-1950   ,-1759   ,-1559   ,-1364   ,-1173   ,-973    ,-780    ,-582    ,-387    ,-190    ,9       ,203     ,\n    411     ,614     ,821     ,1029    ,1229    ,1439    ,1644    ,1846    ,2054    ,2265    ,2472    ,2680    ,2885    ,3086    ,3288    ,\n    3487    ,3680    ,3868    ,4052    ,4235    ,4424    ,4610    ,4792    ,4970    ,5145    ,5326    ,5500    ,5668    ,5835    ,6001    ,\n    6162    ,6316    ,6463    ,6605    ,6743    ,6866    ,6991    ,7108    ,7213    ,7319    ,7415    ,7505    ,7589    ,7672    ,7744    ,\n    7808    ,7872    ,7932    ,7983    ,8032    ,8077    ,8103    ,8130    ,8150    ,8158    ,8154    ,8137    ,8121    ,8094    ,8055    ,\n    8012    ,7961    ,7905    ,7842    ,7771    ,7697    ,7620    ,7547    ,7466    ,7377    ,7295    ,7202    ,7110    ,7017    ,6919    ,\n    6820    ,6721    ,6621    ,6512    ,6404    ,6297    ,6180    ,6060    ,5943    ,5816    ,5685    ,5551    ,5413    ,5273    ,5133    ,\n    4985    ,4837    ,4693    ,4532    ,4379    ,4218    ,4050    ,3878    ,3704    ,3535    ,3352    ,3172    ,2988    ,2795    ,2588    ,\n    2384    ,2172    ,1947    ,1721    ,1482    ,1247    ,1002    ,765     ,524     ,285     ,53      ,-174    ,-397    ,-625    ,-843    ,\n    -1068   ,-1280   ,-1493   ,-1703   ,-1904   ,-2107   ,-2300   ,-2486   ,-2675   ,-2856   ,-3021   ,-3190   ,-3353   ,-3514   ,-3666   ,\n    -3813   ,-3963   ,-4103   ,-4240   ,-4377   ,-4507   ,-4635   ,-4770   ,-4896   ,-5029   ,-5159   ,-5290   ,-5423   ,-5550   ,-5690   ,\n    -5823   ,-5956   ,-6086   ,-6221   ,-6350   ,-6474   ,-6604   ,-6722   ,-6846   ,-6961   ,-7066   ,-7162   ,-7253   ,-7329   ,-7398   ,\n    -7458   ,-7506   ,-7544   ,-7571   ,-7597   ,-7608   ,-7617   ,-7613   ,-7610   ,-7604   ,-7589   ,-7576   ,-7556   ,-7541   ,-7504   ,\n    -7466   ,-7428   ,-7381   ,-7331   ,-7273   ,-7215   ,-7149   ,-7085   ,-7018   ,-6943   ,-6862   ,-6781   ,-6690   ,-6593   ,-6494   ,\n    -6384   ,-6279   ,-6160   ,-6039   ,-5915   ,-5780   ,-5646   ,-5500   ,-5344   ,-5181   ,-5017   ,-4843   ,-4673   ,-4493   ,-4305   ,\n    -4119   ,-3925   ,-3730   ,-3539   ,-3343   ,-3145   ,-2948   ,-2741   ,-2544   ,-2336   ,-2135   ,-1932   ,-1726   ,-1536   ,-1333   ,\n    -1149   ,-965    ,-785    ,-611    ,-433    ,-258    ,-80     ,81      ,263     ,445     ,619     ,805     ,988     ,1182    ,1368    ,\n    1568    ,1768    ,1966    ,2174    ,2372    ,2575    ,2776    ,2972    ,3169    ,3359    ,3538    ,3714    ,3881    ,4041    ,4200    ,\n    4352    ,4501    ,4639    ,4770    ,4892    ,5005    ,5117    ,5216    ,5313    ,5403    ,5488    ,5571    ,5656    ,5736    ,5812    ,\n    5886    ,5953    ,6021    ,6078    ,6134    ,6185    ,6228    ,6271    ,6297    ,6328    ,6353    ,6374    ,6396    ,6409    ,6429    ,\n    6443    ,6457    ,6475    ,6486    ,6495    ,6508    ,6519    ,6530    ,6538    ,6543    ,6550    ,6549    ,6546    ,6536    ,6525    ,\n    6499    ,6478    ,6443    ,6399    ,6356    ,6292    ,6234    ,6157    ,6083    ,6006    ,5920    ,5832    ,5740    ,5651    ,5555    ,\n    5464    ,5373    ,5281    ,5190    ,5107    ,5015    ,4920    ,4830    ,4726    ,4620    ,4509    ,4387    ,4260    ,4129    ,3981    ,\n    3839    ,3690    ,3541    ,3392    ,3226    ,3062    ,2895    ,2729    ,2560    ,2378    ,2197    ,2012    ,1812    ,1616    ,1408    ,\n    1201    ,996     ,781     ,577     ,363     ,153     ,-47     ,-255    ,-456    ,-657    ,-855    ,-1051   ,-1242   ,-1430   ,-1618   ,\n    -1797   ,-1978   ,-2148   ,-2318   ,-2494   ,-2656   ,-2815   ,-2974   ,-3128   ,-3280   ,-3421   ,-3568   ,-3706   ,-3839   ,-3967   ,\n    -4084   ,-4203   ,-4306   ,-4408   ,-4505   ,-4601   ,-4689   ,-4776   ,-4862   ,-4952   ,-5041   ,-5124   ,-5220   ,-5309   ,-5402   ,\n    -5490   ,-5573   ,-5648   ,-5726   ,-5787   ,-5844   ,-5905   ,-5944   ,-5993   ,-6028   ,-6063   ,-6092   ,-6113   ,-6133   ,-6145   ,\n    -6167   ,-6179   ,-6188   ,-6200   ,-6208   ,-6209   ,-6205   ,-6192   ,-6180   ,-6166   ,-6142   ,-6120   ,-6093   ,-6057   ,-6020   ,\n    -5976   ,-5928   ,-5876   ,-5820   ,-5763   ,-5702   ,-5643   ,-5588   ,-5530   ,-5470   ,-5406   ,-5340   ,-5276   ,-5203   ,-5123   ,\n    -5040   ,-4951   ,-4863   ,-4766   ,-4664   ,-4561   ,-4449   ,-4329   ,-4211   ,-4089   ,-3964   ,-3839   ,-3711   ,-3586   ,-3452   ,\n    -3319   ,-3178   ,-3036   ,-2883   ,-2720   ,-2562   ,-2388   ,-2219   ,-2048   ,-1862   ,-1685   ,-1518   ,-1349   ,-1185   ,-1030   ,\n    -874    ,-721    ,-564    ,-410    ,-252    ,-89     ,70      ,242     ,413     ,584     ,765     ,933     ,1112    ,1289    ,1456    ,\n    1634    ,1801    ,1969    ,2135    ,2300    ,2466    ,2630    ,2792    ,2944    ,3096    ,3244    ,3391    ,3533    ,3674    ,3809    ,\n    3943    ,4076    ,4202    ,4334    ,4455    ,4574    ,4695    ,4807    ,4915    ,5017    ,5117    ,5211    ,5303    ,5392    ,5476    ,\n    5557    ,5640    ,5725    ,5800    ,5866    ,5933    ,5991    ,6042    ,6086    ,6125    ,6169    ,6202    ,6234    ,6262    ,6286    ,\n    6308    ,6325    ,6332    ,6336    ,6341    ,6332    ,6324    ,6303    ,6274    ,6244    ,6203    ,6152    ,6095    ,6037    ,5967    ,\n    5897    ,5821    ,5736    ,5646    ,5552    ,5453    ,5354    ,5245    ,5128    ,5017    ,4900    ,4784    ,4661    ,4542    ,4422    ,\n    4299    ,4179    ,4051    ,3929    ,3800    ,3671    ,3546    ,3415    ,3287    ,3151    ,3030    ,2899    ,2764    ,2643    ,2515    ,\n    2403    ,2289    ,2179    ,2069    ,1953    ,1841    ,1726    ,1611    ,1495    ,1378    ,1246    ,1124    ,990     ,852     ,723     ,\n    576     ,445     ,308     ,159     ,22      ,-118    ,-263    ,-414    ,-565    ,-721    ,-871    ,-1030   ,-1194   ,-1344   ,-1499   ,\n    -1652   ,-1799   ,-1938   ,-2073   ,-2208   ,-2340   ,-2469   ,-2600   ,-2731   ,-2863   ,-2994   ,-3124   ,-3262   ,-3400   ,-3535   ,\n    -3662   ,-3788   ,-3907   ,-4026   ,-4137   ,-4240   ,-4341   ,-4435   ,-4532   ,-4614   ,-4696   ,-4780   ,-4854   ,-4927   ,-4998   ,\n    -5060   ,-5123   ,-5181   ,-5228   ,-5275   ,-5314   ,-5350   ,-5385   ,-5412   ,-5434   ,-5461   ,-5480   ,-5506   ,-5527   ,-5548   ,\n    -5564   ,-5575   ,-5597   ,-5607   ,-5620   ,-5633   ,-5646   ,-5655   ,-5662   ,-5666   ,-5664   ,-5658   ,-5642   ,-5621   ,-5591   ,\n    -5552   ,-5506   ,-5454   ,-5392   ,-5331   ,-5268   ,-5196   ,-5123   ,-5048   ,-4959   ,-4879   ,-4794   ,-4693   ,-4597   ,-4492   ,\n    -4381   ,-4257   ,-4134   ,-4008   ,-3873   ,-3742   ,-3606   ,-3468   ,-3327   ,-3192   ,-3056   ,-2916   ,-2784   ,-2644   ,-2503   ,\n    -2359   ,-2213   ,-2065   ,-1910   ,-1762   ,-1603   ,-1455   ,-1303   ,-1155   ,-1012   ,-847    ,-695    ,-533    ,-368    ,-204    ,\n    -35     ,133     ,312     ,478     ,647     ,813     ,979     ,1140    ,1289    ,1442    ,1587    ,1737    ,1884    ,2033    ,2179    ,\n    2323    ,2470    ,2605    ,2746    ,2877    ,3002    ,3126    ,3251    ,3377    ,3494    ,3615    ,3735    ,3854    ,3975    ,4093    ,\n    4214    ,4324    ,4434    ,4537    ,4629    ,4720    ,4799    ,4880    ,4953    ,5028    ,5101    ,5166    ,5233    ,5294    ,5358    ,\n    5413    ,5458    ,5504    ,5536    ,5556    ,5566    ,5566    ,5562    ,5541    ,5508    ,5473    ,5431    ,5379    ,5327    ,5270    ,\n    5212    ,5156    ,5097    ,5037    ,4971    ,4911    ,4851    ,4785    ,4724    ,4665    ,4602    ,4548    ,4494    ,4437    ,4380    ,\n    4324    ,4266    ,4203    ,4144    ,4078    ,4012    ,3941    ,3869    ,3794    ,3712    ,3629    ,3544    ,3455    ,3361    ,3275    ,\n    3180    ,3088    ,2990    ,2893    ,2792    ,2688    ,2590    ,2478    ,2371    ,2264    ,2155    ,2049    ,1937    ,1828    ,1722    ,\n    1607    ,1500    ,1395    ,1280    ,1173    ,1070    ,956     ,845     ,731     ,613     ,497     ,378     ,262     ,143     ,24      ,\n    -86     ,-204    ,-323    ,-440    ,-557    ,-672    ,-787    ,-897    ,-1007   ,-1117   ,-1222   ,-1327   ,-1437   ,-1543   ,-1647   ,\n    -1755   ,-1858   ,-1960   ,-2064   ,-2165   ,-2271   ,-2377   ,-2479   ,-2585   ,-2690   ,-2798   ,-2904   ,-3012   ,-3127   ,-3234   ,\n    -3350   ,-3458   ,-3563   ,-3674   ,-3769   ,-3870   ,-3964   ,-4056   ,-4141   ,-4216   ,-4296   ,-4358   ,-4423   ,-4482   ,-4536   ,\n    -4589   ,-4634   ,-4680   ,-4724   ,-4763   ,-4803   ,-4845   ,-4879   ,-4917   ,-4952   ,-4981   ,-5016   ,-5042   ,-5066   ,-5086   ,\n    -5099   ,-5110   ,-5112   ,-5110   ,-5105   ,-5092   ,-5076   ,-5057   ,-5037   ,-5008   ,-4974   ,-4932   ,-4881   ,-4829   ,-4768   ,\n    -4704   ,-4633   ,-4556   ,-4484   ,-4402   ,-4309   ,-4218   ,-4120   ,-4017   ,-3908   ,-3794   ,-3678   ,-3548   ,-3422   ,-3286   ,\n    -3147   ,-3006   ,-2861   ,-2722   ,-2581   ,-2441   ,-2303   ,-2164   ,-2033   ,-1903   ,-1771   ,-1641   ,-1515   ,-1390   ,-1265   ,\n    -1149   ,-1030   ,-911    ,-801    ,-684    ,-574    ,-468    ,-354    ,-246    ,-135    ,-26     ,79      ,193     ,308     ,428     ,\n    550     ,670     ,787     ,906     ,1027    ,1139    ,1257    ,1371    ,1487    ,1603    ,1714    ,1831    ,1942    ,2056    ,2165    ,\n    2269    ,2376    ,2479    ,2586    ,2692    ,2793    ,2901    ,3005    ,3107    ,3210    ,3311    ,3414    ,3517    ,3609    ,3701    ,\n    3793    ,3876    ,3957    ,4031    ,4106    ,4179    ,4239    ,4297    ,4352    ,4403    ,4449    ,4496    ,4537    ,4569    ,4596    ,\n    4618    ,4643    ,4651    ,4657    ,4663    ,4653    ,4647    ,4633    ,4615    ,4591    ,4571    ,4539    ,4499    ,4470    ,4432    ,\n    4397    ,4363    ,4329    ,4296    ,4266    ,4235    ,4206    ,4179    ,4146    ,4119    ,4082    ,4044    ,4003    ,3959    ,3914    ,\n    3866    ,3813    ,3751    ,3692    ,3623    ,3549    ,3477    ,3405    ,3334    ,3255    ,3174    ,3100    ,3023    ,2941    ,2861    ,\n    2779    ,2694    ,2604    ,2505    ,2408    ,2309    ,2207    ,2104    ,2002    ,1901    ,1799    ,1697    ,1590    ,1481    ,1372    ,\n    1262    ,1153    ,1040    ,922     ,803     ,687     ,561     ,430     ,300     ,161     ,29      ,-102    ,-237    ,-376    ,-514    ,\n    -651    ,-793    ,-921    ,-1056   ,-1183   ,-1305   ,-1431   ,-1545   ,-1664   ,-1779   ,-1887   ,-1997   ,-2099   ,-2197   ,-2300   ,\n    -2393   ,-2486   ,-2584   ,-2679   ,-2771   ,-2862   ,-2949   ,-3031   ,-3115   ,-3193   ,-3274   ,-3353   ,-3426   ,-3497   ,-3570   ,\n    -3639   ,-3699   ,-3761   ,-3819   ,-3876   ,-3926   ,-3979   ,-4029   ,-4071   ,-4115   ,-4150   ,-4184   ,-4206   ,-4233   ,-4252   ,\n    -4266   ,-4283   ,-4292   ,-4305   ,-4310   ,-4308   ,-4311   ,-4306   ,-4293   ,-4276   ,-4254   ,-4229   ,-4200   ,-4166   ,-4132   ,\n    -4095   ,-4056   ,-4020   ,-3983   ,-3951   ,-3915   ,-3875   ,-3840   ,-3794   ,-3749   ,-3696   ,-3643   ,-3588   ,-3529   ,-3463   ,\n    -3391   ,-3325   ,-3253   ,-3179   ,-3105   ,-3036   ,-2964   ,-2891   ,-2816   ,-2743   ,-2674   ,-2593   ,-2520   ,-2444   ,-2367   ,\n    -2286   ,-2204   ,-2130   ,-2047   ,-1969   ,-1889   ,-1798   ,-1706   ,-1610   ,-1511   ,-1409   ,-1298   ,-1188   ,-1076   ,-960    ,\n    -846    ,-736    ,-619    ,-509    ,-396    ,-278    ,-161    ,-46     ,63      ,190     ,311     ,432     ,552     ,674     ,801     ,\n    915     ,1037    ,1148    ,1263    ,1372    ,1470    ,1567    ,1652    ,1739    ,1819    ,1901    ,1976    ,2046    ,2118    ,2184    ,\n    2246    ,2304    ,2367    ,2424    ,2488    ,2550    ,2609    ,2677    ,2737    ,2803    ,2872    ,2937    ,2998    ,3061    ,3127    ,\n    3192    ,3260    ,3331    ,3399    ,3469    ,3537    ,3605    ,3673    ,3738    ,3811    ,3874    ,3938    ,3999    ,4054    ,4105    ,\n    4143    ,4180    ,4209    ,4234    ,4259    ,4274    ,4291    ,4305    ,4308    ,4314    ,4319    ,4322    ,4315    ,4305    ,4304    ,\n    4283    ,4271    ,4252    ,4219    ,4191    ,4149    ,4116    ,4078    ,4033    ,3988    ,3941    ,3889    ,3835    ,3776    ,3704    ,\n    3635    ,3548    ,3460    ,3371    ,3272    ,3174    ,3071    ,2975    ,2869    ,2765    ,2661    ,2550    ,2441    ,2334    ,2226    ,\n    2111    ,2005    ,1897    ,1790    ,1687    ,1577    ,1469    ,1361    ,1248    ,1129    ,1009    ,887     ,756     ,628     ,498     ,\n    363     ,240     ,108     ,-13     ,-128    ,-250    ,-363    ,-478    ,-588    ,-694    ,-803    ,-903    ,-1003   ,-1103   ,-1199   ,\n    -1294   ,-1389   ,-1477   ,-1568   ,-1663   ,-1746   ,-1837   ,-1926   ,-2011   ,-2096   ,-2177   ,-2254   ,-2332   ,-2403   ,-2475   ,\n    -2547   ,-2607   ,-2671   ,-2728   ,-2783   ,-2841   ,-2894   ,-2942   ,-2996   ,-3050   ,-3096   ,-3148   ,-3194   ,-3244   ,-3292   ,\n    -3340   ,-3387   ,-3431   ,-3477   ,-3514   ,-3548   ,-3584   ,-3610   ,-3634   ,-3653   ,-3663   ,-3676   ,-3675   ,-3673   ,-3668   ,\n    -3656   ,-3646   ,-3627   ,-3603   ,-3585   ,-3566   ,-3544   ,-3524   ,-3505   ,-3484   ,-3462   ,-3441   ,-3425   ,-3406   ,-3382   ,\n    -3362   ,-3342   ,-3325   ,-3297   ,-3277   ,-3251   ,-3212   ,-3185   ,-3145   ,-3108   ,-3065   ,-3017   ,-2974   ,-2924   ,-2875   ,\n    -2824   ,-2768   ,-2714   ,-2658   ,-2597   ,-2535   ,-2467   ,-2397   ,-2323   ,-2247   ,-2168   ,-2089   ,-2010   ,-1927   ,-1838   ,\n    -1750   ,-1662   ,-1574   ,-1494   ,-1410   ,-1324   ,-1238   ,-1154   ,-1062   ,-974    ,-881    ,-787    ,-693    ,-587    ,-489    ,\n    -386    ,-281    ,-180    ,-78     ,20      ,126     ,229     ,334     ,444     ,551     ,666     ,785     ,901     ,1017    ,1133    ,\n    1256    ,1375    ,1488    ,1603    ,1713    ,1823    ,1933    ,2041    ,2145    ,2245    ,2345    ,2445    ,2541    ,2630    ,2714    ,\n    2800    ,2871    ,2940    ,3001    ,3053    ,3107    ,3146    ,3190    ,3228    ,3265    ,3301    ,3336    ,3372    ,3398    ,3424    ,\n    3439    ,3457    ,3468    ,3467    ,3467    ,3462    ,3454    ,3444    ,3434    ,3417    ,3393    ,3370    ,3347    ,3320    ,3292    ,\n    3262    ,3232    ,3203    ,3173    ,3142    ,3111    ,3077    ,3044    ,3011    ,2972    ,2936    ,2902    ,2863    ,2830    ,2793    ,\n    2756    ,2722    ,2691    ,2656    ,2620    ,2588    ,2554    ,2524    ,2492    ,2467    ,2442    ,2416    ,2388    ,2364    ,2343    ,\n    2311    ,2287    ,2257    ,2218    ,2184    ,2145    ,2108    ,2067    ,2024    ,1982    ,1933    ,1887    ,1833    ,1774    ,1716    ,\n    1650    ,1589    ,1524    ,1450    ,1377    ,1296    ,1212    ,1137    ,1048    ,965     ,882     ,795     ,709     ,615     ,530     ,\n    438     ,343     ,249     ,157     ,65      ,-25     ,-116    ,-207    ,-297    ,-394    ,-478    ,-572    ,-662    ,-745    ,-838    ,\n    -931    ,-1026   ,-1117   ,-1213   ,-1308   ,-1402   ,-1497   ,-1592   ,-1687   ,-1775   ,-1868   ,-1956   ,-2042   ,-2132   ,-2217   ,\n    -2299   ,-2376   ,-2458   ,-2538   ,-2611   ,-2685   ,-2749   ,-2813   ,-2878   ,-2933   ,-2987   ,-3029   ,-3077   ,-3113   ,-3144   ,\n    -3179   ,-3202   ,-3223   ,-3238   ,-3252   ,-3260   ,-3258   ,-3250   ,-3235   ,-3219   ,-3206   ,-3187   ,-3167   ,-3145   ,-3128   ,\n    -3109   ,-3092   ,-3077   ,-3057   ,-3050   ,-3028   ,-3014   ,-3003   ,-2985   ,-2979   ,-2972   ,-2963   ,-2957   ,-2953   ,-2942   ,\n    -2935   ,-2926   ,-2911   ,-2900   ,-2881   ,-2859   ,-2833   ,-2808   ,-2777   ,-2734   ,-2693   ,-2636   ,-2583   ,-2518   ,-2447   ,\n    -2381   ,-2299   ,-2227   ,-2149   ,-2059   ,-1969   ,-1880   ,-1791   ,-1700   ,-1610   ,-1519   ,-1427   ,-1347   ,-1269   ,-1193   ,\n    -1123   ,-1048   ,-978    ,-906    ,-837    ,-768    ,-703    ,-637    ,-574    ,-505    ,-426    ,-354    ,-274    ,-193    ,-108    ,\n    -26     ,54      ,146     ,237     ,325     ,408     ,493     ,574     ,657     ,740     ,812     ,889     ,965     ,1035    ,1106    ,\n    1176    ,1243    ,1309    ,1376    ,1437    ,1500    ,1563    ,1630    ,1694    ,1759    ,1827    ,1890    ,1956    ,2019    ,2084    ,\n    2146    ,2215    ,2280    ,2337    ,2404    ,2465    ,2524    ,2584    ,2642    ,2704    ,2755    ,2804    ,2860    ,2902    ,2944    ,\n    2978    ,3006    ,3038    ,3058    ,3082    ,3104    ,3117    ,3128    ,3138    ,3140    ,3144    ,3150    ,3157    ,3158    ,3148    ,\n    3149    ,3145    ,3141    ,3136    ,3129    ,3123    ,3119    ,3104    ,3086    ,3066    ,3047    ,3030    ,3005    ,2985    ,2958    ,\n    2931    ,2904    ,2871    ,2836    ,2804    ,2765    ,2722    ,2688    ,2643    ,2596    ,2547    ,2494    ,2443    ,2386    ,2331    ,\n    2270    ,2208    ,2149    ,2082    ,2015    ,1948    ,1879    ,1812    ,1746    ,1682    ,1614    ,1545    ,1475    ,1399    ,1322    ,\n    1249    ,1172    ,1088    ,1005    ,926     ,840     ,764     ,679     ,591     ,508     ,409     ,315     ,218     ,116     ,20      ,\n    -77     ,-176    ,-288    ,-391    ,-494    ,-596    ,-694    ,-794    ,-884    ,-979    ,-1063   ,-1145   ,-1222   ,-1293   ,-1368   ,\n    -1434   ,-1500   ,-1562   ,-1618   ,-1670   ,-1724   ,-1772   ,-1822   ,-1869   ,-1918   ,-1969   ,-2014   ,-2067   ,-2117   ,-2160   ,\n    -2213   ,-2265   ,-2310   ,-2360   ,-2404   ,-2446   ,-2490   ,-2532   ,-2573   ,-2613   ,-2654   ,-2692   ,-2724   ,-2751   ,-2779   ,\n    -2804   ,-2824   ,-2836   ,-2845   ,-2852   ,-2846   ,-2836   ,-2824   ,-2819   ,-2804   ,-2784   ,-2776   ,-2757   ,-2747   ,-2742   ,\n    -2731   ,-2731   ,-2721   ,-2710   ,-2709   ,-2697   ,-2681   ,-2673   ,-2662   ,-2647   ,-2627   ,-2608   ,-2595   ,-2578   ,-2559   ,\n    -2540   ,-2519   ,-2507   ,-2483   ,-2457   ,-2432   ,-2404   ,-2375   ,-2341   ,-2302   ,-2261   ,-2222   ,-2175   ,-2130   ,-2077   ,\n    -2018   ,-1959   ,-1891   ,-1831   ,-1761   ,-1686   ,-1615   ,-1541   ,-1470   ,-1396   ,-1324   ,-1252   ,-1175   ,-1094   ,-1016   ,\n    -942    ,-858    ,-772    ,-686    ,-602    ,-520    ,-430    ,-348    ,-264    ,-180    ,-98     ,-20     ,51      ,131     ,212     ,\n    293     ,370     ,446     ,525     ,599     ,670     ,750     ,825     ,903     ,986     ,1065    ,1153    ,1237    ,1318    ,1404    ,\n    1489    ,1567    ,1652    ,1727    ,1797    ,1871    ,1932    ,1996    ,2059    ,2109    ,2160    ,2207    ,2248    ,2285    ,2313    ,\n    2347    ,2375    ,2403    ,2430    ,2451    ,2483    ,2510    ,2534    ,2565    ,2591    ,2612    ,2640    ,2661    ,2671    ,2690    ,\n    2704    ,2710    ,2719    ,2727    ,2730    ,2735    ,2731    ,2726    ,2726    ,2708    ,2705    ,2690    ,2667    ,2660    ,2633    ,\n    2613    ,2591    ,2566    ,2536    ,2508    ,2478    ,2445    ,2422    ,2388    ,2357    ,2322    ,2289    ,2256    ,2214    ,2177    ,\n    2139    ,2096    ,2061    ,2020    ,1971    ,1933    ,1883    ,1834    ,1793    ,1746    ,1705    ,1660    ,1615    ,1578    ,1537    ,\n    1495    ,1457    ,1412    ,1364    ,1317    ,1262    ,1204    ,1142    ,1078    ,1010    ,944     ,875     ,799     ,727     ,651     ,\n    580     ,507     ,433     ,368     ,296     ,225     ,164     ,98      ,34      ,-20     ,-76     ,-135    ,-189    ,-245    ,-301    ,\n    -356    ,-416    ,-468    ,-527    ,-580    ,-630    ,-687    ,-740    ,-793    ,-838    ,-891    ,-938    ,-986    ,-1038   ,-1076   ,\n    -1120   ,-1161   ,-1203   ,-1240   ,-1280   ,-1321   ,-1353   ,-1395   ,-1431   ,-1468   ,-1502   ,-1534   ,-1572   ,-1608   ,-1653   ,\n    -1691   ,-1733   ,-1774   ,-1812   ,-1853   ,-1890   ,-1929   ,-1963   ,-1997   ,-2032   ,-2070   ,-2105   ,-2136   ,-2168   ,-2199   ,\n    -2224   ,-2247   ,-2272   ,-2288   ,-2312   ,-2331   ,-2347   ,-2362   ,-2378   ,-2399   ,-2412   ,-2428   ,-2438   ,-2449   ,-2462   ,\n    -2473   ,-2481   ,-2480   ,-2480   ,-2485   ,-2483   ,-2475   ,-2478   ,-2460   ,-2444   ,-2432   ,-2405   ,-2378   ,-2342   ,-2310   ,\n    -2271   ,-2231   ,-2184   ,-2129   ,-2077   ,-2019   ,-1958   ,-1889   ,-1827   ,-1765   ,-1696   ,-1630   ,-1559   ,-1486   ,-1423   ,\n    -1354   ,-1283   ,-1220   ,-1153   ,-1096   ,-1038   ,-981    ,-927    ,-872    ,-822    ,-768    ,-713    ,-662    ,-609    ,-554    ,\n    -501    ,-447    ,-391    ,-332    ,-273    ,-210    ,-147    ,-81     ,-19     ,38      ,101     ,162     ,226     ,290     ,359     ,\n    425     ,488     ,551     ,606     ,662     ,715     ,765     ,811     ,857     ,898     ,939     ,981     ,1021    ,1065    ,1104    ,\n    1150    ,1196    ,1242    ,1291    ,1340    ,1388    ,1434    ,1485    ,1527    ,1570    ,1615    ,1661    ,1708    ,1754    ,1799    ,\n    1842    ,1884    ,1927    ,1973    ,2014    ,2060    ,2099    ,2137    ,2183    ,2225    ,2264    ,2305    ,2345    ,2387    ,2428    ,\n    2468    ,2516    ,2560    ,2598    ,2636    ,2669    ,2694    ,2706    ,2719    ,2724    ,2713    ,2705    ,2686    ,2666    ,2645    ,\n    2614    ,2585    ,2554    ,2520    ,2481    ,2446    ,2406    ,2366    ,2330    ,2291    ,2259    ,2220    ,2178    ,2141    ,2102    ,\n    2059    ,2007    ,1961    ,1917    ,1865    ,1818    ,1772    ,1715    ,1660    ,1607    ,1547    ,1479    ,1413    ,1349    ,1276    ,\n    1207    ,1133    ,1063    ,994     ,922     ,855     ,784     ,723     ,655     ,591     ,530     ,463     ,402     ,336     ,279     ,\n    218     ,159     ,105     ,46      ,-4      ,-47     ,-101    ,-144    ,-191    ,-239    ,-280    ,-330    ,-371    ,-421    ,-470    ,\n    -519    ,-573    ,-627    ,-687    ,-748    ,-805    ,-865    ,-924    ,-975    ,-1031   ,-1083   ,-1138   ,-1186   ,-1235   ,-1287   ,\n    -1332   ,-1380   ,-1428   ,-1478   ,-1523   ,-1569   ,-1617   ,-1660   ,-1697   ,-1736   ,-1765   ,-1795   ,-1830   ,-1857   ,-1881   ,\n    -1906   ,-1931   ,-1949   ,-1970   ,-1985   ,-2000   ,-2020   ,-2033   ,-2052   ,-2061   ,-2065   ,-2075   ,-2077   ,-2077   ,-2082   ,\n    -2080   ,-2073   ,-2064   ,-2062   ,-2059   ,-2048   ,-2042   ,-2025   ,-2020   ,-2017   ,-2002   ,-1996   ,-1987   ,-1981   ,-1979   ,\n    -1968   ,-1954   ,-1945   ,-1945   ,-1931   ,-1913   ,-1908   ,-1895   ,-1876   ,-1859   ,-1838   ,-1817   ,-1791   ,-1761   ,-1736   ,\n    -1707   ,-1672   ,-1643   ,-1605   ,-1571   ,-1530   ,-1489   ,-1449   ,-1400   ,-1361   ,-1318   ,-1269   ,-1217   ,-1173   ,-1122   ,\n    -1067   ,-1022   ,-966    ,-912    ,-854    ,-790    ,-732    ,-674    ,-612    ,-551    ,-487    ,-425    ,-364    ,-303    ,-242    ,\n    -180    ,-129    ,-74     ,-23     ,22      ,83      ,130     ,181     ,236     ,289     ,341     ,394     ,450     ,499     ,554     ,\n    603     ,655     ,712     ,761     ,813     ,865     ,912     ,962     ,1013    ,1056    ,1100    ,1146    ,1187    ,1224    ,1264    ,\n    1296    ,1328    ,1360    ,1385    ,1420    ,1450    ,1480    ,1514    ,1542    ,1575    ,1605    ,1635    ,1668    ,1695    ,1724    ,\n    1749    ,1780    ,1806    ,1834    ,1854    ,1885    ,1910    ,1925    ,1960    ,1974    ,1998    ,2017    ,2042    ,2059    ,2075    ,\n    2100    ,2113    ,2133    ,2143    ,2163    ,2170    ,2184    ,2197    ,2204    ,2209    ,2206    ,2208    ,2205    ,2208    ,2203    ,\n    2191    ,2176    ,2166    ,2151    ,2125    ,2096    ,2068    ,2034    ,1991    ,1950    ,1902    ,1853    ,1800    ,1744    ,1688    ,\n    1628    ,1574    ,1521    ,1468    ,1416    ,1371    ,1328    ,1276    ,1233    ,1188    ,1138    ,1090    ,1036    ,983     ,929     ,\n    872     ,815     ,757     ,701     ,643     ,590     ,535     ,484     ,433     ,384     ,333     ,286     ,241     ,188     ,146     ,\n    101     ,53      ,16      ,-21     ,-62     ,-106    ,-140    ,-174    ,-217    ,-257    ,-293    ,-335    ,-374    ,-414    ,-455    ,\n    -496    ,-545    ,-592    ,-641    ,-695    ,-749    ,-801    ,-855    ,-908    ,-962    ,-1014   ,-1063   ,-1115   ,-1168   ,-1221   ,\n    -1265   ,-1317   ,-1366   ,-1411   ,-1457   ,-1495   ,-1543   ,-1582   ,-1622   ,-1661   ,-1688   ,-1726   ,-1758   ,-1790   ,-1825   ,\n    -1851   ,-1881   ,-1906   ,-1931   ,-1950   ,-1972   ,-1988   ,-1998   ,-2013   ,-2023   ,-2035   ,-2043   ,-2042   ,-2042   ,-2043   ,\n    -2034   ,-2021   ,-2017   ,-2000   ,-1984   ,-1972   ,-1948   ,-1925   ,-1903   ,-1879   ,-1845   ,-1817   ,-1789   ,-1761   ,-1733   ,\n    -1692   ,-1658   ,-1620   ,-1587   ,-1549   ,-1513   ,-1480   ,-1440   ,-1405   ,-1371   ,-1334   ,-1302   ,-1267   ,-1233   ,-1205   ,\n    -1166   ,-1137   ,-1100   ,-1066   ,-1038   ,-998    ,-964    ,-924    ,-885    ,-845    ,-807    ,-767    ,-725    ,-688    ,-648    ,\n    -613    ,-573    ,-539    ,-502    ,-461    ,-428    ,-390    ,-354    ,-320    ,-289    ,-253    ,-220    ,-180    ,-142    ,-112    ,\n    -63     ,-28     ,9       ,54      ,100     ,151     ,193     ,245     ,294     ,341     ,390     ,438     ,485     ,532     ,582     ,\n    630     ,688     ,741     ,786     ,836     ,892     ,943     ,994     ,1047    ,1102    ,1156    ,1201    ,1246    ,1284    ,1327    ,\n    1361    ,1387    ,1421    ,1450    ,1478    ,1503    ,1526    ,1552    ,1581    ,1596    ,1619    ,1637    ,1647    ,1657    ,1660    ,\n    1668    ,1665    ,1663    ,1658    ,1658    ,1656    ,1645    ,1642    ,1641    ,1640    ,1637    ,1637    ,1636    ,1636    ,1635    ,\n    1638    ,1639    ,1638    ,1644    ,1644    ,1649    ,1648    ,1641    ,1640    ,1637    ,1630    ,1616    ,1605    ,1596    ,1589    ,\n    1571    ,1561    ,1550    ,1530    ,1511    ,1494    ,1476    ,1452    ,1433    ,1408    ,1383    ,1354    ,1320    ,1293    ,1258    ,\n    1229    ,1202    ,1169    ,1144    ,1111    ,1081    ,1053    ,1022    ,992     ,957     ,926     ,891     ,859     ,820     ,775     ,\n    737     ,691     ,643     ,600     ,553     ,501     ,451     ,402     ,354     ,307     ,260     ,212     ,163     ,114     ,64      ,\n    14      ,-28     ,-72     ,-123    ,-168    ,-215    ,-262    ,-305    ,-350    ,-386    ,-424    ,-461    ,-499    ,-539    ,-575    ,\n    -615    ,-648    ,-684    ,-718    ,-747    ,-777    ,-804    ,-830    ,-851    ,-876    ,-900    ,-914    ,-930    ,-957    ,-973    ,\n    -997    ,-1021   ,-1044   ,-1072   ,-1098   ,-1133   ,-1160   ,-1194   ,-1226   ,-1257   ,-1304   ,-1337   ,-1380   ,-1420   ,-1455   ,\n    -1499   ,-1530   ,-1573   ,-1609   ,-1646   ,-1683   ,-1714   ,-1752   ,-1780   ,-1814   ,-1833   ,-1855   ,-1872   ,-1885   ,-1894   ,\n    -1889   ,-1893   ,-1886   ,-1873   ,-1863   ,-1847   ,-1830   ,-1814   ,-1792   ,-1768   ,-1746   ,-1720   ,-1692   ,-1673   ,-1640   ,\n    -1606   ,-1575   ,-1542   ,-1511   ,-1474   ,-1442   ,-1399   ,-1364   ,-1328   ,-1280   ,-1239   ,-1194   ,-1148   ,-1101   ,-1049   ,\n    -1002   ,-958    ,-906    ,-858    ,-806    ,-758    ,-711    ,-654    ,-605    ,-554    ,-501    ,-449    ,-398    ,-340    ,-288    ,\n    -245    ,-187    ,-137    ,-91     ,-39     ,-4      ,34      ,72      ,104     ,140     ,166     ,192     ,216     ,232     ,253     ,\n    270     ,284     ,298     ,307     ,323     ,336     ,356     ,375     ,393     ,423     ,447     ,478     ,514     ,546     ,586     ,\n    620     ,655     ,696     ,738     ,780     ,816     ,858     ,895     ,930     ,971     ,1013    ,1053    ,1091    ,1130    ,1176    ,\n    1215    ,1247    ,1288    ,1318    ,1350    ,1377    ,1400    ,1429    ,1445    ,1466    ,1483    ,1500    ,1516    ,1521    ,1540    ,\n    1553    ,1565    ,1584    ,1593    ,1599    ,1608    ,1616    ,1616    ,1616    ,1617    ,1610    ,1602    ,1594    ,1585    ,1566    ,\n    1555    ,1538    ,1521    ,1514    ,1495    ,1482    ,1464    ,1450    ,1434    ,1413    ,1391    ,1369    ,1354    ,1327    ,1299    ,\n    1276    ,1250    ,1222    ,1202    ,1178    ,1151    ,1130    ,1106    ,1084    ,1065    ,1046    ,1029    ,1006    ,986     ,966     ,\n    938     ,916     ,889     ,864     ,834     ,799     ,766     ,731     ,697     ,664     ,625     ,589     ,557     ,516     ,480     ,\n    443     ,406     ,368     ,331     ,297     ,257     ,226     ,192     ,158     ,126     ,91      ,65      ,32      ,1       ,-21     ,\n    -50     ,-76     ,-104    ,-133    ,-155    ,-183    ,-211    ,-235    ,-267    ,-294    ,-326    ,-366    ,-401    ,-438    ,-479    ,\n    -523    ,-568    ,-613    ,-661    ,-711    ,-763    ,-815    ,-869    ,-922    ,-972    ,-1025   ,-1075   ,-1126   ,-1171   ,-1215   ,\n    -1259   ,-1295   ,-1332   ,-1365   ,-1393   ,-1419   ,-1437   ,-1452   ,-1466   ,-1468   ,-1471   ,-1478   ,-1478   ,-1469   ,-1459   ,\n    -1457   ,-1451   ,-1447   ,-1441   ,-1435   ,-1432   ,-1431   ,-1432   ,-1430   ,-1431   ,-1433   ,-1438   ,-1445   ,-1447   ,-1450   ,\n    -1449   ,-1450   ,-1442   ,-1433   ,-1425   ,-1410   ,-1399   ,-1380   ,-1364   ,-1342   ,-1314   ,-1294   ,-1267   ,-1239   ,-1212   ,\n    -1186   ,-1156   ,-1124   ,-1088   ,-1061   ,-1030   ,-998    ,-972    ,-936    ,-910    ,-876    ,-844    ,-821    ,-790    ,-761    ,\n    -739    ,-707    ,-681    ,-656    ,-620    ,-598    ,-568    ,-540    ,-510    ,-483    ,-454    ,-424    ,-394    ,-360    ,-327    ,\n    -291    ,-259    ,-214    ,-175    ,-135    ,-86     ,-42     ,-13     ,26      ,68      ,102     ,145     ,178     ,215     ,246     ,\n    281     ,307     ,339     ,375     ,401     ,438     ,463     ,494     ,525     ,552     ,582     ,605     ,636     ,665     ,692     ,\n    720     ,744     ,769     ,795     ,823     ,847     ,873     ,899     ,924     ,949     ,975     ,1004    ,1031    ,1056    ,1082    ,\n    1108    ,1135    ,1156    ,1181    ,1203    ,1224    ,1246    ,1261    ,1278    ,1298    ,1317    ,1332    ,1353    ,1367    ,1374    ,\n    1391    ,1403    ,1407    ,1413    ,1423    ,1429    ,1431    ,1436    ,1437    ,1437    ,1435    ,1435    ,1433    ,1429    ,1423    ,\n    1414    ,1411    ,1402    ,1397    ,1379    ,1370    ,1361    ,1338    ,1330    ,1305    ,1289    ,1271    ,1242    ,1220    ,1191    ,\n    1163    ,1136    ,1106    ,1075    ,1055    ,1024    ,998     ,978     ,945     ,925     ,899     ,873     ,848     ,824     ,800     ,\n    771     ,746     ,716     ,686     ,653     ,617     ,582     ,549     ,509     ,473     ,437     ,399     ,369     ,330     ,298     ,\n    265     ,233     ,202     ,164     ,142     ,108     ,73      ,48      ,15      ,-5      ,-30     ,-57     ,-79     ,-110    ,-135    ,\n    -151    ,-173    ,-202    ,-226    ,-260    ,-286    ,-319    ,-356    ,-388    ,-431    ,-462    ,-505    ,-543    ,-580    ,-626    ,\n    -660    ,-708    ,-749    ,-792    ,-846    ,-887    ,-930    ,-972    ,-1016   ,-1054   ,-1089   ,-1128   ,-1153   ,-1181   ,-1208   ,\n    -1223   ,-1242   ,-1257   ,-1261   ,-1274   ,-1280   ,-1278   ,-1279   ,-1277   ,-1277   ,-1270   ,-1261   ,-1258   ,-1257   ,-1258   ,\n    -1255   ,-1242   ,-1240   ,-1239   ,-1235   ,-1236   ,-1232   ,-1230   ,-1233   ,-1229   ,-1231   ,-1230   ,-1219   ,-1220   ,-1219   ,\n    -1215   ,-1209   ,-1200   ,-1187   ,-1183   ,-1174   ,-1156   ,-1145   ,-1132   ,-1112   ,-1093   ,-1078   ,-1057   ,-1039   ,-1018   ,\n    -994    ,-974    ,-946    ,-916    ,-895    ,-866    ,-839    ,-819    ,-790    ,-769    ,-749    ,-726    ,-702    ,-678    ,-654    ,\n    -624    ,-597    ,-566    ,-535    ,-498    ,-466    ,-433    ,-398    ,-368    ,-328    ,-303    ,-270    ,-237    ,-210    ,-173    ,\n    -142    ,-107    ,-75     ,-37     ,-9      ,24      ,64      ,96      ,131     ,167     ,207     ,240     ,276     ,309     ,344     ,\n    376     ,410     ,442     ,470     ,497     ,526     ,551     ,576     ,608     ,631     ,661     ,687     ,712     ,740     ,762     ,\n    785     ,810     ,832     ,852     ,873     ,891     ,910     ,924     ,942     ,963     ,982     ,996     ,1015    ,1037    ,1053    ,\n    1069    ,1079    ,1095    ,1103    ,1113    ,1125    ,1135    ,1142    ,1147    ,1155    ,1162    ,1178    ,1182    ,1198    ,1213    ,\n    1214    ,1230    ,1241    ,1253    ,1260    ,1273    ,1284    ,1291    ,1293    ,1296    ,1303    ,1302    ,1311    ,1308    ,1300    ,\n    1298    ,1293    ,1292    ,1285    ,1267    ,1256    ,1241    ,1222    ,1209    ,1190    ,1169    ,1141    ,1122    ,1092    ,1062    ,\n    1027    ,991     ,954     ,906     ,872     ,827     ,791     ,752     ,714     ,681     ,642     ,609     ,573     ,542     ,504     ,\n    476     ,444     ,412     ,383     ,348     ,318     ,291     ,260     ,225     ,199     ,164     ,139     ,114     ,79      ,56      ,\n    31      ,4       ,-13     ,-41     ,-67     ,-88     ,-115    ,-133    ,-157    ,-173    ,-197    ,-222    ,-239    ,-268    ,-294    ,\n    -319    ,-342    ,-369    ,-397    ,-422    ,-450    ,-474    ,-494    ,-517    ,-537    ,-559    ,-580    ,-598    ,-616    ,-631    ,\n    -650    ,-671    ,-686    ,-705    ,-723    ,-738    ,-757    ,-773    ,-794    ,-813    ,-829    ,-845    ,-863    ,-883    ,-899    ,\n    -915    ,-926    ,-941    ,-955    ,-973    ,-986    ,-993    ,-1002   ,-1015   ,-1028   ,-1034   ,-1046   ,-1055   ,-1062   ,-1071   ,\n    -1079   ,-1088   ,-1101   ,-1104   ,-1113   ,-1128   ,-1132   ,-1143   ,-1146   ,-1146   ,-1151   ,-1153   ,-1155   ,-1151   ,-1148   ,\n    -1146   ,-1141   ,-1132   ,-1119   ,-1103   ,-1086   ,-1071   ,-1055   ,-1037   ,-1016   ,-993    ,-973    ,-944    ,-917    ,-896    ,\n    -862    ,-836    ,-810    ,-778    ,-748    ,-714    ,-679    ,-644    ,-615    ,-585    ,-551    ,-523    ,-494    ,-460    ,-431    ,\n    -399    ,-371    ,-345    ,-314    ,-292    ,-259    ,-228    ,-204    ,-173    ,-145    ,-113    ,-79     ,-42     ,-16     ,7       ,\n    45      ,76      ,110     ,144     ,171     ,208     ,240     ,271     ,301     ,335     ,369     ,396     ,431     ,456     ,479     ,\n    511     ,533     ,554     ,579     ,600     ,617     ,643     ,666     ,690     ,710     ,727     ,750     ,762     ,778     ,795     ,\n    802     ,820     ,834     ,838     ,854     ,872     ,884     ,900     ,916     ,928     ,941     ,958     ,975     ,987     ,994     ,\n    1014    ,1026    ,1035    ,1047    ,1055    ,1063    ,1065    ,1066    ,1065    ,1066    ,1065    ,1066    ,1065    ,1064    ,1062    ,\n    1053    ,1050    ,1042    ,1031    ,1026    ,1015    ,1004    ,992     ,987     ,976     ,956     ,950     ,939     ,929     ,915     ,\n    909     ,901     ,888     ,882     ,875     ,876     ,870     ,865     ,859     ,852     ,847     ,838     ,837     ,827     ,806     ,\n    798     ,788     ,773     ,759     ,756     ,743     ,725     ,711     ,694     ,681     ,658     ,635     ,610     ,584     ,553     ,\n    522     ,484     ,445     ,414     ,371     ,337     ,294     ,257     ,223     ,179     ,144     ,102     ,62      ,23      ,-10     ,\n    -46     ,-84     ,-118    ,-155    ,-189    ,-230    ,-265    ,-295    ,-334    ,-368    ,-398    ,-432    ,-464    ,-489    ,-514    ,\n    -537    ,-556    ,-574    ,-590    ,-603    ,-611    ,-620    ,-637    ,-649    ,-647    ,-658    ,-668    ,-671    ,-681    ,-685    ,\n    -685    ,-693    ,-700    ,-710    ,-724    ,-738    ,-753    ,-764    ,-781    ,-803    ,-825    ,-840    ,-853    ,-880    ,-895    ,\n    -909    ,-920    ,-928    ,-945    ,-955    ,-969    ,-975    ,-981    ,-986    ,-982    ,-988    ,-986    ,-976    ,-975    ,-968    ,\n    -956    ,-951    ,-941    ,-925    ,-914    ,-900    ,-886    ,-869    ,-848    ,-838    ,-828    ,-813    ,-800    ,-789    ,-770    ,\n    -764    ,-750    ,-731    ,-716    ,-693    ,-675    ,-651    ,-630    ,-605    ,-576    ,-548    ,-522    ,-489    ,-462    ,-437    ,\n    -405    ,-384    ,-356    ,-340    ,-317    ,-301    ,-290    ,-272    ,-264    ,-247    ,-239    ,-235    ,-228    ,-225    ,-215    ,\n    -213    ,-203    ,-191    ,-192    ,-183    ,-171    ,-159    ,-153    ,-148    ,-135    ,-128    ,-116    ,-98     ,-81     ,-64     ,\n    -45     ,-21     ,-6      ,7       ,40      ,59      ,86      ,111     ,132     ,163     ,186     ,211     ,237     ,268     ,296     ,\n    322     ,356     ,384     ,413     ,447     ,473     ,508     ,536     ,560     ,589     ,607     ,633     ,650     ,666     ,684     ,\n    694     ,710     ,720     ,727     ,741     ,754     ,756     ,757     ,763     ,773     ,778     ,778     ,790     ,797     ,800     ,\n    815     ,823     ,832     ,834     ,840     ,847     ,850     ,866     ,875     ,877     ,882     ,886     ,895     ,897     ,902     ,\n    910     ,910     ,913     ,912     ,919     ,930     ,929     ,930     ,938     ,946     ,949     ,950     ,949     ,951     ,939     ,\n    930     ,927     ,918     ,909     ,896     ,882     ,864     ,847     ,829     ,811     ,790     ,767     ,748     ,725     ,703     ,\n    684     ,664     ,644     ,625     ,602     ,578     ,552     ,529     ,504     ,480     ,454     ,426     ,401     ,374     ,345     ,\n    315     ,287     ,257     ,227     ,196     ,162     ,132     ,104     ,72      ,43      ,16      ,-5      ,-26     ,-52     ,-79     ,\n    -104    ,-125    ,-145    ,-163    ,-186    ,-211    ,-230    ,-250    ,-275    ,-295    ,-313    ,-337    ,-360    ,-382    ,-399    ,\n    -426    ,-451    ,-465    ,-488    ,-507    ,-524    ,-539    ,-554    ,-569    ,-579    ,-592    ,-601    ,-612    ,-622    ,-637    ,\n    -647    ,-650    ,-665    ,-671    ,-679    ,-685    ,-686    ,-691    ,-695    ,-701    ,-705    ,-708    ,-710    ,-714    ,-713    ,\n    -716    ,-721    ,-725    ,-728    ,-727    ,-731    ,-737    ,-744    ,-745    ,-745    ,-746    ,-746    ,-747    ,-745    ,-744    ,\n    -740    ,-730    ,-726    ,-722    ,-711    ,-703    ,-695    ,-689    ,-686    ,-686    ,-680    ,-668    ,-669    ,-668    ,-661    ,\n    -653    ,-648    ,-648    ,-638    ,-628    ,-616    ,-610    ,-603    ,-583    ,-575    ,-561    ,-545    ,-533    ,-517    ,-504    ,\n    -487    ,-467    ,-457    ,-441    ,-421    ,-405    ,-384    ,-368    ,-347    ,-320    ,-302    ,-284    ,-263    ,-243    ,-225    ,\n    -210    ,-191    ,-173    ,-155    ,-140    ,-117    ,-98     ,-83     ,-56     ,-41     ,-16     ,-3      ,13      ,48      ,67      ,\n    95      ,120     ,141     ,165     ,186     ,212     ,235     ,262     ,283     ,302     ,328     ,353     ,376     ,394     ,418     ,\n    438     ,455     ,476     ,486     ,504     ,525     ,534     ,546     ,563     ,572     ,579     ,594     ,604     ,609     ,619     ,\n    629     ,642     ,652     ,663     ,677     ,683     ,693     ,700     ,714     ,723     ,723     ,736     ,741     ,746     ,753     ,\n    758     ,760     ,766     ,778     ,777     ,784     ,795     ,796     ,798     ,801     ,806     ,809     ,817     ,826     ,827     ,\n    831     ,834     ,834     ,835     ,833     ,831     ,832     ,829     ,823     ,813     ,805     ,798     ,791     ,777     ,761     ,\n    755     ,743     ,728     ,709     ,693     ,677     ,656     ,633     ,611     ,598     ,577     ,559     ,541     ,526     ,507     ,\n    484     ,472     ,451     ,433     ,408     ,386     ,372     ,343     ,318     ,299     ,276     ,255     ,227     ,208     ,182     ,\n    158     ,145     ,125     ,103     ,83      ,74      ,58      ,41      ,31      ,18      ,4       ,-1      ,-13     ,-31     ,-43     ,\n    -64     ,-76     ,-100    ,-116    ,-133    ,-153    ,-165    ,-189    ,-204    ,-224    ,-238    ,-256    ,-276    ,-294    ,-317    ,\n    -332    ,-356    ,-373    ,-394    ,-416    ,-434    ,-455    ,-470    ,-489    ,-504    ,-525    ,-537    ,-557    ,-573    ,-589    ,\n    -610    ,-614    ,-636    ,-652    ,-663    ,-678    ,-686    ,-699    ,-718    ,-722    ,-731    ,-746    ,-745    ,-757    ,-763    ,\n    -760    ,-768    ,-769    ,-767    ,-767    ,-764    ,-762    ,-761    ,-759    ,-754    ,-746    ,-746    ,-734    ,-726    ,-724    ,\n    -715    ,-704    ,-694    ,-688    ,-685    ,-686    ,-675    ,-668    ,-668    ,-665    ,-653    ,-647    ,-645    ,-631    ,-621    ,\n    -609    ,-603    ,-585    ,-567    ,-549    ,-529    ,-516    ,-491    ,-472    ,-452    ,-435    ,-413    ,-393    ,-380    ,-356    ,\n    -338    ,-316    ,-297    ,-279    ,-254    ,-235    ,-214    ,-193    ,-170    ,-153    ,-136    ,-113    ,-94     ,-76     ,-57     ,\n    -35     ,-15     ,-4      ,11      ,40      ,60      ,80      ,103     ,123     ,145     ,163     ,180     ,199     ,220     ,235     ,\n    254     ,270     ,288     ,304     ,317     ,339     ,356     ,371     ,381     ,392     ,406     ,416     ,418     ,428     ,440     ,\n    446     ,454     ,454     ,457     ,468     ,473     ,479     ,490     ,491     ,492     ,501     ,511     ,526     ,527     ,535     ,\n    546     ,550     ,566     ,573     ,583     ,595     ,604     ,606     ,612     ,625     ,628     ,642     ,648     ,650     ,657     ,\n    666     ,674     ,677     ,679     ,681     ,683     ,682     ,687     ,689     ,692     ,693     ,694     ,699     ,701     ,702     ,\n    704     ,714     ,715     ,716     ,723     ,722     ,723     ,723     ,722     ,722     ,720     ,716     ,707     ,700     ,697     ,\n    683     ,680     ,673     ,657     ,643     ,629     ,615     ,603     ,591     ,573     ,556     ,539     ,525     ,504     ,485     ,\n    464     ,443     ,423     ,398     ,376     ,351     ,331     ,306     ,284     ,257     ,233     ,215     ,188     ,165     ,139     ,\n    121     ,101     ,74      ,61      ,40      ,15      ,-2      ,-13     ,-36     ,-68     ,-90     ,-117    ,-148    ,-173    ,-201    ,\n    -232    ,-260    ,-287    ,-307    ,-330    ,-356    ,-376    ,-391    ,-411    ,-427    ,-445    ,-459    ,-460    ,-473    ,-489    ,\n    -495    ,-507    ,-517    ,-521    ,-531    ,-536    ,-535    ,-538    ,-544    ,-544    ,-544    ,-550    ,-554    ,-553    ,-557    ,\n    -565    ,-567    ,-569    ,-571    ,-571    ,-571    ,-574    ,-573    ,-578    ,-584    ,-591    ,-592    ,-594    ,-602    ,-601    ,\n    -606    ,-609    ,-609    ,-606    ,-608    ,-609    ,-598    ,-592    ,-593    ,-590    ,-579    ,-574    ,-568    ,-563    ,-554    ,\n    -545    ,-537    ,-535    ,-529    ,-516    ,-517    ,-507    ,-498    ,-497    ,-494    ,-494    ,-495    ,-491    ,-481    ,-477    ,\n    -472    ,-466    ,-463    ,-457    ,-445    ,-436    ,-426    ,-413    ,-398    ,-384    ,-374    ,-353    ,-339    ,-323    ,-305    ,\n    -295    ,-278    ,-260    ,-243    ,-222    ,-202    ,-184    ,-159    ,-144    ,-124    ,-95     ,-75     ,-57     ,-32     ,-7      ,\n    -3      ,15      ,44      ,64      ,75      ,91      ,109     ,115     ,132     ,141     ,150     ,165     ,181     ,191     ,202     ,\n    223     ,232     ,251     ,267     ,278     ,298     ,304     ,317     ,334     ,345     ,363     ,376     ,383     ,399     ,414     ,\n    426     ,438     ,450     ,458     ,469     ,483     ,491     ,508     ,525     ,532     ,540     ,558     ,572     ,574     ,592     ,\n    601     ,611     ,622     ,630     ,645     ,646     ,651     ,657     ,664     ,667     ,674     ,675     ,673     ,676     ,675     ,\n    680     ,674     ,676     ,678     ,676     ,672     ,669     ,667     ,662     ,663     ,651     ,649     ,650     ,643     ,646     ,\n    640     ,644     ,637     ,625     ,625     ,621     ,617     ,608     ,606     ,604     ,593     ,580     ,568     ,552     ,539     ,\n    525     ,507     ,497     ,479     ,455     ,436     ,409     ,383     ,366     ,340     ,314     ,295     ,275     ,257     ,232     ,\n    217     ,202     ,180     ,170     ,152     ,145     ,137     ,120     ,109     ,83      ,71      ,69      ,64      ,57      ,46      ,\n    41      ,34      ,26      ,13      ,4       ,-5      ,-10     ,-27     ,-40     ,-52     ,-71     ,-79     ,-104    ,-117    ,-137    ,\n    -151    ,-165    ,-190    ,-199    ,-220    ,-232    ,-247    ,-267    ,-276    ,-293    ,-305    ,-312    ,-328    ,-337    ,-345    ,\n    -360    ,-374    ,-380    ,-389    ,-410    ,-420    ,-432    ,-452    ,-463    ,-479    ,-490    ,-499    ,-514    ,-525    ,-535    ,\n    -538    ,-544    ,-555    ,-554    ,-555    ,-564    ,-565    ,-560    ,-564    ,-566    ,-561    ,-562    ,-556    ,-553    ,-552    ,\n    -547    ,-544    ,-537    ,-536    ,-536    ,-535    ,-534    ,-524    ,-517    ,-515    ,-518    ,-515    ,-507    ,-496    ,-495    ,\n    -494    ,-481    ,-474    ,-464    ,-460    ,-451    ,-443    ,-433    ,-420    ,-414    ,-391    ,-386    ,-374    ,-354    ,-343    ,\n    -326    ,-310    ,-295    ,-285    ,-268    ,-250    ,-240    ,-224    ,-214    ,-201    ,-187    ,-175    ,-159    ,-153    ,-146    ,\n    -136    ,-125    ,-116    ,-104    ,-90     ,-78     ,-73     ,-66     ,-49     ,-38     ,-29     ,-15     ,-3      ,-4      ,10      ,\n    32      ,43      ,58      ,72      ,87      ,102     ,114     ,130     ,143     ,153     ,167     ,181     ,190     ,199     ,217     ,\n    224     ,231     ,242     ,254     ,266     ,269     ,283     ,293     ,299     ,309     ,317     ,327     ,337     ,352     ,368     ,\n    376     ,388     ,405     ,415     ,432     ,451     ,458     ,476     ,491     ,500     ,520     ,531     ,537     ,545     ,558     ,\n    570     ,571     ,576     ,585     ,591     ,593     ,598     ,603     ,600     ,601     ,598     ,596     ,592     ,589     ,586     ,\n    574     ,571     ,572     ,559     ,546     ,537     ,530     ,524     ,506     ,492     ,482     ,471     ,463     ,455     ,445     ,\n    435     ,424     ,411     ,400     ,391     ,381     ,375     ,370     ,360     ,351     ,340     ,338     ,330     ,320     ,321     ,\n    316     ,311     ,304     ,301     ,301     ,300     ,301     ,297     ,289     ,284     ,272     ,265     ,260     ,243     ,238     ,\n    230     ,221     ,209     ,193     ,182     ,164     ,151     ,137     ,123     ,106     ,93      ,78      ,71      ,60      ,39      ,\n    30      ,16      ,1       ,-2      ,-11     ,-26     ,-38     ,-51     ,-69     ,-81     ,-96     ,-115    ,-133    ,-149    ,-156    ,\n    -178    ,-192    ,-200    ,-220    ,-230    ,-240    ,-253    ,-267    ,-269    ,-279    ,-291    ,-296    ,-305    ,-310    ,-317    ,\n    -323    ,-328    ,-337    ,-342    ,-343    ,-344    ,-351    ,-361    ,-364    ,-365    ,-366    ,-374    ,-381    ,-380    ,-380    ,\n    -381    ,-383    ,-385    ,-391    ,-390    ,-396    ,-400    ,-400    ,-407    ,-413    ,-420    ,-423    ,-437    ,-441    ,-448    ,\n    -459    ,-462    ,-469    ,-473    ,-477    ,-477    ,-480    ,-476    ,-475    ,-477    ,-469    ,-463    ,-461    ,-458    ,-451    ,\n    -441    ,-435    ,-424    ,-418    ,-405    ,-388    ,-381    ,-369    ,-358    ,-343    ,-334    ,-317    ,-306    ,-301    ,-291    ,\n    -283    ,-269    ,-265    ,-248    ,-236    ,-227    ,-214    ,-203    ,-189    ,-178    ,-159    ,-153    ,-139    ,-126    ,-112    ,\n    -96     ,-85     ,-74     ,-63     ,-44     ,-38     ,-28     ,-19     ,-8      ,-1      ,-1      ,-4      ,6       ,34      ,34      ,\n    51      ,67      ,78      ,92      ,103     ,114     ,122     ,143     ,146     ,153     ,160     ,170     ,183     ,190     ,204     ,\n    210     ,221     ,229     ,234     ,249     ,263     ,268     ,284     ,298     ,306     ,325     ,338     ,358     ,374     ,387     ,\n    405     ,423     ,443     ,452     ,461     ,476     ,492     ,496     ,509     ,523     ,521     ,529     ,531     ,531     ,531     ,\n    529     ,529     ,530     ,531     ,531     ,532     ,531     ,532     ,531     ,532     ,531     ,532     ,531     ,530     ,529     ,\n    521     ,517     ,508     ,500     ,491     ,493     ,487     ,473     ,470     ,458     ,451     ,442     ,430     ,419     ,408     ,\n    397     ,385     ,376     ,373     ,366     ,356     ,348     ,339     ,338     ,334     ,323     ,319     ,316     ,310     ,301     ,\n    300     ,301     ,294     ,290     ,290     ,282     ,274     ,268     ,264     ,252     ,241     ,238     ,224     ,220     ,205     ,\n    189     ,182     ,166     ,152     ,145     ,141     ,123     ,111     ,104     ,85      ,72      ,65      ,49      ,32      ,22      ,\n    6       ,-5      ,-15     ,-36     ,-51     ,-71     ,-95     ,-115    ,-136    ,-156    ,-178    ,-197    ,-220    ,-238    ,-258    ,\n    -284    ,-298    ,-307    ,-330    ,-343    ,-348    ,-363    ,-370    ,-379    ,-381    ,-383    ,-388    ,-390    ,-395    ,-397    ,\n    -399    ,-398    ,-400    ,-400    ,-400    ,-400    ,-399    ,-396    ,-400    ,-398    ,-396    ,-400    ,-403    ,-412    ,-415    ,\n    -419    ,-419    ,-422    ,-421    ,-422    ,-432    ,-434    ,-437    ,-427    ,-428    ,-431    ,-424    ,-421    ,-421    ,-420    ,\n    -418    ,-416    ,-412    ,-410    ,-403    ,-398    ,-394    ,-386    ,-379    ,-373    ,-361    ,-345    ,-338    ,-323    ,-311    ,\n    -302    ,-292    ,-281    ,-270    ,-264    ,-249    ,-235    ,-229    ,-218    ,-203    ,-193    ,-184    ,-166    ,-154    ,-144    ,\n    -131    ,-122    ,-113    ,-100    ,-85     ,-76     ,-73     ,-63     ,-57     ,-45     ,-35     ,-29     ,-17     ,-8      ,-1      ,\n    -2      ,-3      ,12      ,30      ,37      ,49      ,66      ,73      ,85      ,107     ,116     ,131     ,145     ,149     ,162     ,\n    172     ,179     ,187     ,189     ,196     ,204     ,204     ,210     ,214     ,222     ,224     ,227     ,229     ,231     ,241     ,\n    242     ,243     ,251     ,259     ,261     ,262     ,262     ,264     ,264     ,265     ,264     ,267     ,269     ,275     ,285     ,\n    291     ,299     ,300     ,303     ,312     ,325     ,334     ,341     ,349     ,366     ,376     ,381     ,395     ,398     ,413     ,\n    420     ,421     ,438     ,439     ,444     ,452     ,453     ,456     ,455     ,456     ,455     ,455     ,456     ,455     ,454     ,\n    454     ,451     ,451     ,452     ,446     ,439     ,436     ,430     ,417     ,418     ,412     ,398     ,394     ,380     ,373     ,\n    361     ,342     ,331     ,318     ,307     ,292     ,282     ,267     ,252     ,244     ,230     ,224     ,215     ,205     ,195     ,\n    187     ,182     ,167     ,155     ,150     ,148     ,142     ,134     ,121     ,114     ,107     ,94      ,89      ,75      ,69      ,\n    63      ,47      ,37      ,28      ,19      ,14      ,1       ,-3      ,-6      ,-20     ,-32     ,-39     ,-51     ,-68     ,-77     ,\n    -84     ,-99     ,-112    ,-119    ,-130    ,-136    ,-144    ,-152    ,-151    ,-155    ,-168    ,-177    ,-181    ,-184    ,-187    ,\n    -192    ,-190    ,-195    ,-199    ,-205    ,-211    ,-212    ,-216    ,-219    ,-227    ,-229    ,-231    ,-232    ,-235    ,-238    ,\n    -243    ,-249    ,-247    ,-254    ,-263    ,-263    ,-267    ,-269    ,-272    ,-277    ,-287    ,-287    ,-289    ,-299    ,-302    ,\n    -306    ,-303    ,-313    ,-320    ,-324    ,-336    ,-340    ,-345    ,-342    ,-344    ,-346    ,-354    ,-361    ,-361    ,-363    ,\n    -364    ,-363    ,-361    ,-363    ,-357    ,-353    ,-347    ,-343    ,-340    ,-329    ,-323    ,-316    ,-305    ,-305    ,-297    ,\n    -287    ,-286    ,-272    ,-267    ,-264    ,-249    ,-237    ,-234    ,-228    ,-219    ,-208    ,-194    ,-188    ,-168    ,-157    ,\n    -151    ,-142    ,-130    ,-113    ,-101    ,-82     ,-73     ,-61     ,-45     ,-30     ,-19     ,-6      ,0       ,-3      ,22      ,\n    33      ,44      ,63      ,71      ,81      ,95      ,110     ,122     ,136     ,145     ,155     ,165     ,177     ,189     ,200     ,\n    216     ,223     ,230     ,244     ,261     ,265     ,275     ,294     ,298     ,302     ,317     ,320     ,329     ,337     ,337     ,\n    344     ,346     ,355     ,363     ,366     ,369     ,372     ,376     ,378     ,377     ,378     ,377     ,378     ,376     ,376     ,\n    376     ,367     ,372     ,368     ,368     ,367     ,362     ,365     ,358     ,358     ,354     ,346     ,341     ,337     ,340     ,\n    334     ,324     ,321     ,319     ,317     ,309     ,301     ,300     ,301     ,297     ,284     ,286     ,280     ,265     ,265     ,\n    264     ,253     ,243     ,241     ,239     ,234     ,229     ,228     ,225     ,225     ,223     ,222     ,218     ,218     ,218     ,\n    210     ,217     ,213     ,207     ,210     ,211     ,214     ,216     ,214     ,209     ,213     ,213     ,210     ,211     ,211     ,\n    207     ,206     ,204     ,200     ,191     ,186     ,186     ,173     ,166     ,153     ,147     ,139     ,119     ,109     ,96      ,\n    81      ,71      ,63      ,42      ,30      ,21      ,1       ,-3      ,-16     ,-26     ,-35     ,-52     ,-59     ,-71     ,-77     ,\n    -83     ,-94     ,-102    ,-113    ,-116    ,-129    ,-134    ,-139    ,-152    ,-150    ,-161    ,-171    ,-182    ,-192    ,-196    ,\n    -211    ,-221    ,-229    ,-234    ,-243    ,-256    ,-268    ,-271    ,-279    ,-287    ,-290    ,-302    ,-303    ,-305    ,-305    ,\n    -308    ,-316    ,-319    ,-317    ,-321    ,-318    ,-315    ,-317    ,-308    ,-305    ,-304    ,-305    ,-302    ,-299    ,-290    ,\n    -286    ,-289    ,-284    ,-287    ,-281    ,-275    ,-275    ,-270    ,-270    ,-269    ,-268    ,-266    ,-262    ,-257    ,-251    ,\n    -243    ,-242    ,-235    ,-228    ,-232    ,-226    ,-222    ,-215    ,-213    ,-207    ,-199    ,-191    ,-190    ,-186    ,-173    ,\n    -172    ,-166    ,-160    ,-156    ,-153    ,-150    ,-148    ,-146    ,-135    ,-134    ,-134    ,-124    ,-116    ,-115    ,-111    ,\n    -100    ,-87     ,-80     ,-75     ,-66     ,-59     ,-45     ,-37     ,-29     ,-14     ,-1      ,-4      ,3       ,27      ,34      ,\n    46      ,66      ,68      ,84      ,104     ,113     ,131     ,146     ,157     ,176     ,190     ,204     ,220     ,230     ,240     ,\n    244     ,253     ,262     ,266     ,270     ,268     ,275     ,283     ,283     ,286     ,293     ,294     ,296     ,299     ,299     ,\n    301     ,299     ,301     ,300     ,300     ,301     ,300     ,301     ,300     ,301     ,300     ,300     ,300     ,293     ,294     ,\n    290     ,283     ,282     ,272     ,271     ,265     ,263     ,265     ,261     ,260     ,248     ,243     ,245     ,243     ,243     ,\n    245     ,246     ,250     ,262     ,260     ,260     ,266     ,264     ,265     ,264     ,267     ,267     ,266     ,269     ,265     ,\n    267     ,266     ,265     ,267     ,265     ,265     ,266     ,266     ,267     ,266     ,265     ,264     ,265     ,263     ,257     ,\n    258     ,246     ,241     ,241     ,234     ,230     ,226     ,225     ,220     ,216     ,206     ,198     ,188     ,188     ,180     ,\n    166     ,159     ,148     ,146     ,134     ,121     ,107     ,94      ,79      ,68      ,60      ,40      ,34      ,21      ,6       ,\n    -2      ,-7      ,-14     ,-29     ,-37     ,-45     ,-60     ,-72     ,-75     ,-83     ,-91     ,-101    ,-111    ,-117    ,-122    ,\n    -130    ,-138    ,-144    ,-150    ,-152    ,-151    ,-152    ,-155    ,-161    ,-166    ,-166    ,-173    ,-173    ,-176    ,-183    ,\n    -185    ,-191    ,-188    ,-192    ,-195    ,-196    ,-205    ,-208    ,-213    ,-212    ,-216    ,-224    ,-226    ,-232    ,-230    ,\n    -230    ,-234    ,-238    ,-238    ,-235    ,-241    ,-241    ,-237    ,-238    ,-239    ,-237    ,-236    ,-238    ,-236    ,-234    ,\n    -234    ,-231    ,-230    ,-232    ,-230    ,-230    ,-232    ,-231    ,-234    ,-234    ,-236    ,-236    ,-237    ,-242    ,-237    ,\n    -243    ,-239    ,-235    ,-237    ,-232    ,-232    ,-230    ,-231    ,-227    ,-218    ,-211    ,-205    ,-194    ,-188    ,-179    ,\n    -159    ,-154    ,-146    ,-136    ,-126    ,-116    ,-110    ,-96     ,-85     ,-77     ,-72     ,-65     ,-57     ,-42     ,-37     ,\n    -31     ,-16     ,-9      ,-3      ,-3      ,-1      ,-4      ,2       ,17      ,26      ,34      ,35      ,40      ,52      ,56      ,\n    62      ,69      ,69      ,78      ,87      ,93      ,100     ,107     ,111     ,114     ,123     ,131     ,135     ,145     ,148     ,\n    151     ,164     ,165     ,179     ,188     ,186     ,191     ,200     ,206     ,206     ,217     ,222     ,223     ,227     ,226     ,\n    234     ,238     ,243     ,253     ,261     ,266     ,268     ,279     ,285     ,292     ,301     ,301     ,304     ,317     ,322     ,\n    320     ,332     ,338     ,338     ,338     ,339     ,340     ,341     ,341     ,337     ,339     ,338     ,332     ,325     ,322     ,\n    319     ,320     ,320     ,312     ,310     ,309     ,307     ,307     ,303     ,300     ,302     ,301     ,300     ,301     ,300     ,\n    301     ,300     ,301     ,298     ,296     ,290     ,282     ,271     ,266     ,264     ,248     ,238     ,228     ,219     ,207     ,\n    192     ,185     ,170     ,163     ,154     ,143     ,140     ,125     ,112     ,106     ,90      ,76      ,71      ,60      ,44      ,\n    35      ,25      ,13      ,1       ,-3      ,-7      ,-14     ,-26     ,-34     ,-36     ,-38     ,-37     ,-41     ,-40     ,-42     ,\n    -54     ,-51     ,-51     ,-56     ,-56     ,-58     ,-59     ,-59     ,-65     ,-70     ,-74     ,-75     ,-77     ,-83     ,-93     ,\n    -99     ,-111    ,-114    ,-119    ,-133    ,-137    ,-150    ,-151    ,-155    ,-170    ,-174    ,-185    ,-190    ,-189    ,-194    ,\n    -198    ,-206    ,-212    ,-211    ,-211    ,-212    ,-216    ,-220    ,-224    ,-227    ,-229    ,-231    ,-231    ,-230    ,-231    ,\n    -229    ,-230    ,-229    ,-225    ,-223    ,-216    ,-211    ,-212    ,-207    ,-196    ,-193    ,-189    ,-190    ,-188    ,-183    ,\n    -180    ,-170    ,-172    ,-172    ,-171    ,-168    ,-162    ,-163    ,-159    ,-158    ,-153    ,-152    ,-152    ,-152    ,-153    ,\n    -152    ,-152    ,-151    ,-152    ,-152    ,-151    ,-152    ,-151    ,-152    ,-151    ,-150    ,-148    ,-142    ,-134    ,-135    ,\n    -128    ,-117    ,-119    ,-110    ,-100    ,-90     ,-81     ,-75     ,-65     ,-57     ,-44     ,-34     ,-29     ,-20     ,-8      ,\n    -2      ,-2      ,-3      ,8       ,27      ,33      ,39      ,54      ,64      ,68      ,72      ,79      ,87      ,95      ,108     ,\n    111     ,120     ,132     ,141     ,146     ,154     ,164     ,169     ,186     ,186     ,190     ,205     ,211     ,217     ,222     ,\n    225     ,225     ,226     ,227     ,233     ,234     ,232     ,239     ,243     ,244     ,243     ,244     ,243     ,244     ,242     ,\n    238     ,235     ,232     ,230     ,226     ,226     ,224     ,222     ,221     ,218     ,218     ,216     ,218     ,218     ,219     ,\n    224     ,224     ,225     ,225     ,227     ,229     ,232     ,232     ,235     ,235     ,235     ,235     ,237     ,238     ,235     ,\n    235     ,234     ,241     ,236     ,235     ,242     ,233     ,238     ,238     ,232     ,239     ,237     ,232     ,233     ,229     ,\n    228     ,227     ,226     ,226     ,223     ,222     ,219     ,213     ,208     ,202     ,193     ,189     ,187     ,182     ,176     ,\n    165     ,163     ,157     ,147     ,149     ,136     ,121     ,112     ,100     ,87      ,75      ,68      ,62      ,44      ,33      ,\n    29      ,14      ,7       ,-1      ,-4      ,-2      ,-4      ,-8      ,-16     ,-24     ,-36     ,-38     ,-41     ,-54     ,-59     ,\n    -66     ,-75     ,-75     ,-79     ,-88     ,-92     ,-104    ,-112    ,-114    ,-118    ,-118    ,-125    ,-128    ,-128    ,-135    ,\n    -135    ,-142    ,-147    ,-149    ,-152    ,-151    ,-152    ,-151    ,-152    ,-151    ,-151    ,-153    ,-155    ,-159    ,-158    ,\n    -156    ,-158    ,-164    ,-165    ,-161    ,-162    ,-163    ,-162    ,-165    ,-159    ,-158    ,-159    ,-152    ,-151    ,-152    ,\n    -151    ,-151    ,-147    ,-140    ,-135    ,-134    ,-133    ,-125    ,-117    ,-116    ,-115    ,-115    ,-116    ,-115    ,-117    ,\n    -117    ,-116    ,-119    ,-118    ,-121    ,-120    ,-119    ,-119    ,-114    ,-117    ,-116    ,-115    ,-116    ,-114    ,-115    ,\n    -112    ,-107    ,-106    ,-102    ,-100    ,-98     ,-96     ,-97     ,-93     ,-86     ,-87     ,-83     ,-75     ,-76     ,-74     ,\n    -74     ,-72     ,-65     ,-60     ,-59     ,-56     ,-46     ,-47     ,-42     ,-37     ,-37     ,-38     ,-35     ,-23     ,-19     ,\n    -11     ,-6      ,-3      ,-1      ,-2      ,-1      ,-2      ,-1      ,-1      ,-2      ,1       ,13      ,15      ,16      ,27      ,\n    32      ,32      ,33      ,35      ,41      ,51      ,60      ,64      ,70      ,72      ,73      ,88      ,90      ,100     ,111     ,\n    110     ,118     ,131     ,139     ,147     ,147     ,155     ,165     ,171     ,183     ,188     ,196     ,202     ,218     ,224     ,\n    220     ,228     ,229     ,240     ,242     ,240     ,252     ,258     ,265     ,265     ,264     ,266     ,268     ,269     ,276     ,\n    279     ,276     ,281     ,278     ,280     ,286     ,284     ,285     ,284     ,285     ,285     ,283     ,281     ,273     ,271     ,\n    268     ,265     ,265     ,264     ,265     ,263     ,264     ,252     ,242     ,244     ,239     ,232     ,228     ,227     ,223     ,\n    222     ,220     ,213     ,200     ,192     ,189     ,186     ,180     ,168     ,164     ,159     ,148     ,146     ,149     ,139     ,\n    131     ,129     ,116     ,113     ,113     ,112     ,109     ,100     ,94      ,93      ,85      ,81      ,75      ,71      ,71      ,\n    67      ,66      ,57      ,50      ,36      ,35      ,31      ,19      ,11      ,-1      ,-2      ,-5      ,-10     ,-29     ,-36     ,\n    -40     ,-56     ,-63     ,-73     ,-75     ,-82     ,-92     ,-104    ,-114    ,-114    ,-122    ,-129    ,-137    ,-139    ,-146    ,\n    -153    ,-150    ,-153    ,-159    ,-163    ,-161    ,-165    ,-166    ,-170    ,-169    ,-168    ,-172    ,-165    ,-165    ,-164    ,\n    -165    ,-169    ,-165    ,-162    ,-161    ,-165    ,-161    ,-157    ,-157    ,-153    ,-152    ,-151    ,-152    ,-151    ,-152    ,\n    -151    ,-152    ,-151    ,-152    ,-151    ,-152    ,-151    ,-152    ,-149    ,-151    ,-147    ,-139    ,-142    ,-135    ,-135    ,\n    -127    ,-120    ,-117    ,-115    ,-116    ,-107    ,-105    ,-98     ,-94     ,-93     ,-90     ,-85     ,-81     ,-85     ,-81     ,\n    -76     ,-75     ,-76     ,-75     ,-74     ,-71     ,-70     ,-65     ,-57     ,-59     ,-59     ,-57     ,-54     ,-52     ,-46     ,\n    -39     ,-42     ,-40     ,-37     ,-38     ,-37     ,-38     ,-35     ,-29     ,-25     ,-21     ,-20     ,-15     ,-9      ,-10     ,\n    -5      ,-2      ,-2      ,-2      ,-1      ,-4      ,1       ,16      ,25      ,34      ,37      ,45      ,52      ,61      ,69      ,\n    71      ,80      ,86      ,91      ,101     ,111     ,112     ,113     ,119     ,126     ,131     ,136     ,142     ,145     ,148     ,\n    148     ,151     ,163     ,168     ,174     ,186     ,186     ,187     ,194     ,196     ,203     ,207     ,208     ,214     ,214     ,\n    214     ,216     ,216     ,218     ,219     ,218     ,219     ,224     ,224     ,224     ,226     ,224     ,229     ,228     ,234     ,\n    233     ,234     ,242     ,240     ,244     ,243     ,244     ,242     ,248     ,246     ,247     ,248     ,241     ,244     ,242     ,\n    243     ,232     ,228     ,227     ,223     ,220     ,213     ,207     ,199     ,190     ,187     ,185     ,170     ,167     ,159     ,\n    146     ,149     ,140     ,133     ,128     ,116     ,111     ,110     ,106     ,97      ,90      ,89      ,83      ,71      ,71      ,\n    71      ,68      ,65      ,57      ,49      ,46      ,43      ,40      ,36      ,33      ,34      ,31      ,29      ,23      ,14      ,\n    16      ,11      ,8       ,3       ,-3      ,-1      ,-2      ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,\n    0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,-41     ,\n    181     ,6726    ,10005   ,-787    ,-8824   ,-17442  ,-13549  ,1969    ,-6368   ,111     ,7120    ,-1594   ,1928    ,9334    ,20985   ,\n    19844   ,12605   ,8925    ,4794    ,5418    ,4253    ,-4112   ,-10882  ,-11035  ,-7806   ,-8054   ,-8897   ,-5884   ,-6085   ,-4840   ,\n    -4894   ,-7100   ,-5779   ,711     ,6886    ,8156    ,9626    ,7950    ,3200    ,1391    ,2444    ,4598    ,-365    ,-4695   ,-540    ,\n    3       ,-400    ,1462    ,-1955   ,-7419   ,-5898   ,-2808   ,577     ,3912    ,1955    ,-287    ,-1813   ,-2625   ,-2105   ,-1530   ,\n    -576    ,2172    ,2376    ,-1310   ,735     ,3809    ,2253    ,-1376   ,-2559   ,-774    ,-1561   ,-839    ,1562    ,1080    ,-2841   ,\n    -4394   ,-4817   ,-4753   ,-954    ,2464    ,4339    ,3417    ,2529    ,3865    ,3711    ,2083    ,1528    ,500     ,-2      ,960     ,\n    739     ,-1214   ,-3898   ,-4665   ,-4310   ,-3698   ,-3076   ,-2975   ,209     ,2008    ,551     ,806     ,1612    ,2641    ,2529    ,\n    442     ,-1121   ,-1170   ,-879    ,-401    ,557     ,1212    ,1324    ,1312    ,880     ,428     ,-374    ,-636    ,-128    ,-192    ,\n    -288    ,-698    ,-686    ,-1000   ,-519    ,-344    ,-1008   ,-853    ,-696    ,500     ,335     ,329     ,812     ,318     ,939     ,\n    779     ,338     ,294     ,-99     ,46      ,306     ,204     ,349     ,60      ,-655    ,-294    ,-194    ,-588    ,-254    ,94      ,\n    332     ,-72     ,-487    ,-287    ,89      ,37      ,-264    ,246     ,475     ,591     ,227     ,54      ,358     ,148     ,-78     ,\n    -344    ,32      ,103     ,-252    ,-479    ,-775    ,-705    ,-265    ,96      ,507     ,387     ,308     ,1030    ,713     ,435     ,\n    283     ,-168    ,63      ,59      ,168     ,313     ,213     ,13      ,-225    ,-302    ,-264    ,-94     ,-430    ,-251    ,-79     ,\n    152     ,69      ,-197    ,-217    ,-73     ,-20     ,-383    ,333     ,406     ,968     ,29      ,833     ,4       ,752     ,177     ,\n    422     ,515     ,-825    ,20076   ,15152   ,-11721  ,-23383  ,-21524  ,-6347   ,-4237   ,-7986   ,3069    ,18105   ,7720    ,-2418   ,\n    3620    ,5450    ,9324    ,12030   ,8497    ,6680    ,4201    ,-2378   ,-518    ,-3815   ,-11189  ,-5855   ,-11019  ,-12868  ,-7506   ,\n    -7197   ,-790    ,1749    ,11503   ,17260   ,14524   ,10793   ,4773    ,4920    ,670     ,3976    ,7624    ,-515    ,-7652   ,-14272  ,\n    -14454  ,-10811  ,-9009   ,-6486   ,-4098   ,-997    ,2145    ,6318    ,6994    ,7535    ,6146    ,974     ,-1520   ,-7137   ,-5909   ,\n    -2740   ,-5167   ,-1264   ,1738    ,-137    ,5383    ,12083   ,5300    ,-2271   ,-4144   ,-1517   ,1122    ,424     ,3910    ,5671    ,\n    1833    ,-2611   ,-2337   ,-5178   ,-7932   ,-3874   ,-3142   ,-2142   ,969     ,908     ,3094    ,4844    ,-833    ,-2523   ,2064    ,\n    4799    ,5702    ,5532    ,1447    ,-1838   ,-1583   ,-3762   ,-5918   ,-5145   ,-2161   ,-146    ,272     ,645     ,2116    ,2912    ,\n    381     ,-2168   ,-461    ,2804    ,4381    ,3897    ,1087    ,-1143   ,-2605   ,-2362   ,-2883   ,-3522   ,-1601   ,-956    ,1654    ,\n    4073    ,1257    ,-973    ,-667    ,-43     ,-150    ,38      ,-346    ,-1326   ,-2980   ,-2584   ,951     ,1725    ,2746    ,3882    ,\n    1933    ,-2345   ,-2927   ,-491    ,10      ,95      ,806     ,1166    ,1201    ,2985    ,3291    ,1674    ,-349    ,-1160   ,-2532   ,\n    -3691   ,-3982   ,-3494   ,-1025   ,-108    ,318     ,2234    ,4451    ,3105    ,1735    ,1808    ,53      ,-876    ,-433    ,-294    ,\n    -1579   ,-2138   ,-1617   ,-1140   ,-852    ,-1528   ,-921    ,-327    ,52      ,1579    ,2930    ,2494    ,1382    ,1756    ,317     ,\n    -529    ,-140    ,-103    ,-476    ,-1367   ,-215    ,888     ,585     ,5       ,-377    ,-801    ,-921    ,-877    ,-830    ,-1873   ,\n    -1655   ,-453    ,-589    ,672     ,2132    ,2354    ,2081    ,2404    ,1457    ,349     ,372     ,-295    ,-1012   ,-1917   ,-1703   ,\n    -948    ,-531    ,184     ,24      ,-275    ,138     ,437     ,891     ,1237    ,737     ,526     ,406     ,-336    ,-665    ,-488    ,\n    -211    ,-324    ,-73     ,111     ,-257    ,-67     ,-138    ,-225    ,305     ,739     ,605     ,111     ,33      ,295     ,8       ,\n    -42     ,32      ,-370    ,-803    ,-791    ,-30     ,313     ,425     ,669     ,764     ,438     ,-56     ,-132    ,196     ,141     ,\n    156     ,82      ,147     ,317     ,200     ,121     ,-599    ,-548    ,-749    ,305     ,-242    ,0       ,-481    ,176     ,507     ,\n    145     ,12864   ,19444   ,12162   ,-3805   ,-8419   ,-6482   ,-15132  ,-7514   ,4398    ,5780    ,10095   ,6591    ,-4731   ,-3284   ,\n    -3468   ,-3198   ,780     ,-13626  ,-25141  ,-12662  ,1716    ,3718    ,3506    ,1605    ,5763    ,7355    ,3328    ,11149   ,8385    ,\n    5624    ,8720    ,6505    ,5059    ,-3477   ,1814    ,9792    ,2884    ,-3334   ,-7420   ,-9156   ,-12417  ,-11419  ,-8378   ,-14274  ,\n    -9648   ,1489    ,6824    ,7598    ,3713    ,5643    ,5774    ,4562    ,764     ,-3321   ,344     ,2735    ,3313    ,1313    ,-2006   ,\n    -3392   ,-1549   ,-1143   ,-2651   ,377     ,167     ,-2490   ,2868    ,5546    ,2072    ,1848    ,720     ,1190    ,-3396   ,-9107   ,\n    -6690   ,-4647   ,-2091   ,-311    ,1646    ,-610    ,1017    ,7284    ,5539    ,4184    ,2866    ,742     ,446     ,424     ,-2037   ,\n    -3850   ,85      ,1418    ,-97     ,287     ,-991    ,-2996   ,-1782   ,-2596   ,-2595   ,2094    ,3346    ,3324    ,2385    ,188     ,\n    175     ,65      ,-1365   ,-376    ,553     ,-504    ,-830    ,-2114   ,-3965   ,-5057   ,-2828   ,-1596   ,-390    ,1494    ,438     ,\n    1901    ,4899    ,4654    ,2819    ,2975    ,1859    ,996     ,2090    ,689     ,-2205   ,-1510   ,286     ,-2932   ,-4342   ,-3163   ,\n    -2149   ,-314    ,-961    ,-970    ,1033    ,2100    ,2137    ,2298    ,1182    ,371     ,1535    ,1791    ,1386    ,-621    ,-2320   ,\n    -1835   ,-983    ,-1013   ,-898    ,-203    ,-1279   ,-1582   ,49      ,1616    ,1011    ,391     ,1270    ,1891    ,2385    ,544     ,\n    -593    ,176     ,370     ,-364    ,-1116   ,-1382   ,-2503   ,-1725   ,-614    ,-594    ,-316    ,451     ,1498    ,1069    ,241     ,\n    -129    ,717     ,1151    ,404     ,61      ,-379    ,-215    ,551     ,720     ,105     ,-850    ,-1384   ,-593    ,136     ,379     ,\n    824     ,843     ,851     ,304     ,382     ,1145    ,337     ,-263    ,-926    ,-1315   ,-999    ,-644    ,-1062   ,-1000   ,347     ,\n    133     ,973     ,621     ,1759    ,426     ,6517    ,21667   ,23651   ,12513   ,-6461   ,-24406  ,-32768  ,-21813  ,-9393   ,-410    ,\n    11924   ,9325    ,22245   ,20850   ,7041    ,-57     ,-6382   ,-9327   ,-17459  ,-3365   ,8913    ,3838    ,156     ,-3316   ,-5924   ,\n    -6233   ,691     ,-4750   ,-7421   ,3651    ,12285   ,10403   ,2634    ,7703    ,1410    ,4104    ,7026    ,-11845  ,-12028  ,-13784  ,\n    -13279  ,-7294   ,-862    ,2808    ,10570   ,26894   ,15585   ,9017    ,5708    ,555     ,-7547   ,-27198  ,-31576  ,-24605  ,-7774   ,\n    4790    ,16560   ,22407   ,8155    ,998     ,8543    ,10041   ,11392   ,14744   ,10637   ,2854    ,-6522   ,-9912   ,-12099  ,-12547  ,\n    -11944  ,-9894   ,-9011   ,-10157  ,-5349   ,8302    ,13512   ,1696    ,2567    ,3857    ,-2038   ,-3644   ,3713    ,5967    ,-4187   ,\n    928     ,8301    ,-443    ,-8798   ,-4454   ,6130    ,10216   ,3636    ,3376    ,10554   ,7164    ,-9605   ,-21292  ,-20659  ,-16135  ,\n    -12355  ,-507    ,10709   ,3996    ,2125    ,4309    ,9545    ,16369   ,12935   ,12391   ,6760    ,974     ,350     ,-5238   ,-4681   ,\n    -4225   ,-3406   ,-3599   ,-13556  ,-12066  ,-3145   ,-1941   ,2015    ,13009   ,18058   ,6737    ,-6728   ,-12289  ,-14650  ,-10317  ,\n    -1299   ,-2005   ,2556    ,10173   ,9832    ,9528    ,9196    ,12896   ,4090    ,1805    ,-3975   ,-13866  ,-14078  ,-15894  ,-7047   ,\n    -2393   ,4231    ,6313    ,4492    ,-140    ,-7508   ,824     ,4908    ,-671    ,-3481   ,-3201   ,-765    ,1980    ,7872    ,10449   ,\n    9240    ,4468    ,2058    ,8089    ,117     ,-1582   ,494     ,-6460   ,-7903   ,-13148  ,-15012  ,-10378  ,-4208   ,-1795   ,628     ,\n    1823    ,5394    ,12127   ,10421   ,10540   ,7219    ,7253    ,6154    ,-1039   ,-858    ,-1315   ,-5783   ,-9017   ,-6483   ,-9959   ,\n    -5738   ,-6301   ,-10050  ,-507    ,555     ,2886    ,8628    ,13454   ,13035   ,12004   ,6829    ,-4470   ,-8442   ,-8509   ,-11068  ,\n    -3076   ,2633    ,-4944   ,1513    ,8145    ,2610    ,601     ,3546    ,1447    ,-24     ,-3126   ,-8987   ,-8671   ,-1510   ,1199    ,\n    -5072   ,-726    ,1663    ,-779    ,2685    ,7962    ,13273   ,5981    ,-3010   ,154     ,-3194   ,-5055   ,2375    ,2875    ,1444    ,\n    2332    ,2791    ,-4732   ,-5181   ,525     ,-1854   ,606     ,-973    ,-3174   ,-2327   ,-5049   ,-3594   ,3099    ,6300    ,4230    ,\n    8035    ,11260   ,5771    ,-2923   ,-7396   ,-10405  ,-14170  ,-8323   ,-800    ,2508    ,3507    ,4152    ,4458    ,3346    ,6967    ,\n    7119    ,8       ,-3249   ,-2543   ,-4119   ,-2445   ,-274    ,-2867   ,-4414   ,-2221   ,-440    ,621     ,3335    ,2590    ,-1563   ,\n    -2595   ,-1884   ,-2830   ,1784    ,5752    ,877     ,4924    ,8993    ,1136    ,1965    ,4372    ,103     ,358     ,4546    ,-138    ,\n    -6271   ,-6579   ,-9123   ,-6119   ,-187    ,-2059   ,-1612   ,-5247   ,-13859  ,-4456   ,-76     ,2618    ,9629    ,12886   ,15380   ,\n    10143   ,8073    ,5352    ,5015    ,6030    ,-834    ,-12767  ,-12658  ,-10215  ,-8971   ,-8104   ,-12957  ,-6411   ,-5887   ,-4980   ,\n    4991    ,10619   ,11536   ,12020   ,10415   ,7230    ,9007    ,5287    ,66      ,232     ,-4765   ,-3165   ,-183    ,-9793   ,-6201   ,\n    -3584   ,-8098   ,-2499   ,-1088   ,-694    ,3831    ,1729    ,-5065   ,-3848   ,3660    ,7793    ,4646    ,6634    ,9102    ,3790    ,\n    3727    ,3448    ,253     ,-4204   ,-9459   ,-11332  ,-9709   ,-7229   ,-7964   ,-8192   ,-2859   ,40      ,4901    ,16449   ,14413   ,\n    8229    ,4569    ,1666    ,2601    ,-4442   ,-6966   ,-2697   ,-3      ,-1045   ,-2838   ,2228    ,5285    ,4168    ,2146    ,-4522   ,\n    -11223  ,-7707   ,-4921   ,-4450   ,0       ,1750    ,4847    ,5517    ,1913    ,56      ,4960    ,7581    ,362     ,1684    ,560     ,\n    -9126   ,-9945   ,-5346   ,678     ,5263    ,12258   ,8390    ,3038    ,4337    ,-2279   ,-4160   ,-5676   ,-5260   ,-3688   ,-393    ,\n    -2741   ,-4902   ,769     ,-257    ,2504    ,2691    ,5468    ,8357    ,5727    ,2167    ,-914    ,-1555   ,-4026   ,434     ,-2197   ,\n    -7935   ,-7547   ,-9193   ,-7594   ,-1987   ,4653    ,9275    ,11171   ,7957    ,2867    ,1111    ,-721    ,-5782   ,-6242   ,1458    ,\n    4544    ,-558    ,-275    ,4169    ,4893    ,1412    ,-4601   ,-4090   ,-2719   ,-2106   ,-5341   ,-4793   ,2901    ,-1008   ,-1668   ,\n    2378    ,2828    ,-83     ,-1842   ,2013    ,4802    ,1470    ,2       ,6109    ,3481    ,574     ,-2916   ,-6359   ,774     ,3507    ,\n    2221    ,-181    ,-2178   ,104     ,1266    ,-163    ,-2393   ,-793    ,-300    ,-1084   ,1669    ,426     ,-682    ,-371    ,-2264   ,\n    -3208   ,-507    ,640     ,-2564   ,758     ,4214    ,917     ,881     ,200     ,-1541   ,1995    ,1178    ,-2008   ,-2697   ,-3859   ,\n    -3773   ,-3307   ,-2262   ,-1015   ,712     ,2397    ,2485    ,1772    ,4904    ,5914    ,3586    ,4522    ,2681    ,-75     ,-1365   ,\n    -2690   ,-436    ,4041    ,1229    ,-2223   ,-1669   ,-1545   ,-1871   ,-6502   ,-5587   ,-2062   ,-2513   ,-1975   ,-1194   ,1219    ,\n    4768    ,6473    ,5648    ,4528    ,2756    ,98      ,752     ,794     ,-1325   ,2393    ,4654    ,1430    ,-2711   ,-5747   ,-5315   ,\n    -6509   ,-6979   ,-4347   ,-4007   ,-4298   ,-1017   ,2448    ,2811    ,3889    ,6198    ,7022    ,2419    ,-1392   ,503     ,2845    ,\n    5252    ,4654    ,4794    ,2675    ,-2907   ,-4026   ,-5097   ,-5539   ,-5176   ,-7245   ,-6913   ,-2279   ,1082    ,3202    ,5376    ,\n    2222    ,505     ,2592    ,2935    ,4561    ,2774    ,1964    ,3897    ,3933    ,1082    ,-2840   ,-2980   ,-3275   ,-4149   ,-3892   ,\n    -1083   ,-502    ,-1502   ,-2593   ,-2779   ,-1967   ,-1965   ,2478    ,4589    ,4883    ,5531    ,4075    ,843     ,-3285   ,-3013   ,\n    -1556   ,-514    ,-2407   ,-3046   ,380     ,-1307   ,-2350   ,-2244   ,-1867   ,-1802   ,-90     ,5344    ,4283    ,3536    ,2649    ,\n    -193    ,1875    ,1582    ,1897    ,3077    ,1896    ,3460    ,1270    ,394     ,-388    ,-4145   ,-4553   ,-5012   ,-3384   ,-3616   ,\n    -1456   ,661     ,-990    ,-668    ,-895    ,-9      ,-1854   ,-2877   ,-383    ,1226    ,1619    ,2217    ,5465    ,7058    ,5510    ,\n    4067    ,3294    ,1817    ,-87     ,-1653   ,-2432   ,-2300   ,-2316   ,-3482   ,-3825   ,-5488   ,-7629   ,-6400   ,-2593   ,2518    ,\n    4382    ,5891    ,5782    ,3534    ,2962    ,1767    ,165     ,-1040   ,-737    ,122     ,505     ,-2481   ,-6442   ,-6367   ,-3963   ,\n    -618    ,651     ,4041    ,6880    ,4199    ,1818    ,596     ,1942    ,1642    ,-453    ,1181    ,1679    ,-213    ,-1252   ,-2824   ,\n    -2446   ,-1870   ,-2524   ,-1925   ,-888    ,852     ,-556    ,352     ,3588    ,582     ,-2875   ,-1239   ,821     ,2065    ,3096    ,\n    2310    ,705     ,-421    ,1313    ,1948    ,323     ,-1963   ,-3310   ,-3349   ,-1859   ,-981    ,-2731   ,-1611   ,-2819   ,-1509   ,\n    866     ,1561    ,4599    ,4788    ,4464    ,1907    ,2608    ,2354    ,-326    ,879     ,865     ,-1010   ,-3486   ,-2950   ,-1447   ,\n    -403    ,-1459   ,-3176   ,-3800   ,-2181   ,2418    ,2086    ,917     ,1682    ,2855    ,2520    ,-1342   ,-1423   ,-64     ,-1104   ,\n    -2297   ,-1282   ,262     ,1476    ,3207    ,3669    ,3213    ,-514    ,-2753   ,-2283   ,-1378   ,-1637   ,-1798   ,-360    ,-1784   ,\n    -1042   ,997     ,734     ,1023    ,2640    ,2105    ,1838    ,3685    ,2032    ,-1113   ,-1313   ,-926    ,-1485   ,-818    ,-1      ,\n    -944    ,-1076   ,-1272   ,-3801   ,-3045   ,-2491   ,-1746   ,92      ,-888    ,708     ,2761    ,3905    ,4728    ,2911    ,1527    ,\n    2880    ,3427    ,1794    ,140     ,-1080   ,-1970   ,-2853   ,-3175   ,-1983   ,-1935   ,-2630   ,-684    ,1312    ,898     ,-760    ,\n    -600    ,50      ,175     ,1423    ,2677    ,4410    ,3031    ,1119    ,842     ,-893    ,-2233   ,-1898   ,104     ,-1682   ,-3625   ,\n    -3892   ,-3064   ,493     ,994     ,956     ,2643    ,4368    ,3679    ,1122    ,-1232   ,-1632   ,-651    ,-1233   ,-2804   ,-2612   ,\n    -347    ,-92     ,1066    ,2095    ,1681    ,1470    ,715     ,79      ,-2536   ,-2904   ,-410    ,541     ,1224    ,1265    ,167     ,\n    958     ,1074    ,909     ,3579    ,2365    ,310     ,550     ,-2271   ,-4019   ,-2218   ,-1943   ,-1471   ,-347    ,-771    ,-593    ,\n    -490    ,952     ,2440    ,3540    ,2227    ,-822    ,-529    ,-749    ,-968    ,290     ,1158    ,1980    ,1282    ,-1289   ,-1594   ,\n    -1185   ,-2185   ,-2497   ,-1524   ,445     ,1566    ,2016    ,2761    ,2973    ,1908    ,1965    ,670     ,-760    ,-867    ,-2824   ,\n    -3391   ,-3134   ,-1935   ,-561    ,143     ,137     ,-617    ,-478    ,752     ,2982    ,3299    ,1286    ,-426    ,-1097   ,-764    ,\n    310     ,565     ,1794    ,1908    ,-17     ,-749    ,-1025   ,-1242   ,-1139   ,-848    ,-1668   ,-556    ,1548    ,624     ,1361    ,\n    2584    ,1497    ,554     ,-569    ,299     ,1068    ,-1576   ,-3529   ,-2682   ,-2517   ,-1234   ,1554    ,1403    ,1334    ,1494    ,\n    1276    ,1460    ,1268    ,1652    ,825     ,-1166   ,-972    ,235     ,-361    ,-557    ,33      ,-1214   ,-2143   ,-1498   ,-1395   ,\n    -1707   ,-272    ,1697    ,1933    ,2797    ,2542    ,1372    ,1190    ,-297    ,-634    ,-968    ,-1576   ,-528    ,-294    ,-482    ,\n    -818    ,-647    ,-326    ,-1216   ,-868    ,842     ,1145    ,1123    ,504     ,-102    ,781     ,125     ,-228    ,582     ,136     ,\n    -1036   ,-1292   ,-310    ,184     ,354     ,401     ,408     ,1026    ,609     ,-850    ,-1195   ,137     ,364     ,-113    ,134     ,\n    53      ,2       ,-879    ,327     ,733     ,123     ,1705    ,1537    ,1561    ,57      ,-835    ,-425    ,-1292   ,-778    ,-952    ,\n    -862    ,-1266   ,-983    ,-261    ,-687    ,-158    ,710     ,1123    ,1510    ,2257    ,2374    ,2698    ,690     ,-310    ,-304    ,\n    -1514   ,-1421   ,-1169   ,-18     ,-947    ,-1582   ,-1468   ,-1498   ,-701    ,-64     ,1215    ,837     ,426     ,663     ,530     ,\n    201     ,484     ,220     ,-324    ,856     ,1096    ,883     ,378     ,89      ,389     ,-356    ,-626    ,-491    ,-1249   ,-1333   ,\n    -641    ,-690    ,-342    ,989     ,1364    ,308     ,648     ,937     ,471     ,416     ,-123    ,-135    ,-171    ,-838    ,-1226   ,\n    -720    ,-34     ,712     ,1503    ,973     ,296     ,761     ,201     ,-749    ,-1083   ,-1022   ,-1056   ,-915    ,-1033   ,-1123   ,\n    -311    ,-328    ,811     ,1436    ,1503    ,861     ,674     ,537     ,164     ,1940    ,1386    ,1319    ,473     ,-825    ,-1316   ,\n    -1776   ,-395    ,-178    ,-167    ,-926    ,-1506   ,-939    ,-592    ,74      ,846     ,1261    ,547     ,-49     ,-286    ,-625    ,\n    234     ,737     ,246     ,-273    ,-619    ,-680    ,-1      ,1058    ,959     ,1585    ,1354    ,153     ,138     ,-309    ,-541    ,\n    -433    ,56      ,808     ,152     ,-1084   ,-1350   ,-2002   ,-938    ,661     ,563     ,1033    ,480     ,107     ,-281    ,-656    ,\n    -150    ,-669    ,-722    ,387     ,712     ,164     ,538     ,1304    ,1043    ,1128    ,1551    ,905     ,752     ,-221    ,-1197   ,\n    -947    ,-1055   ,-1347   ,-1540   ,-1109   ,-731    ,604     ,676     ,-124    ,381     ,725     ,841     ,47      ,22      ,862     ,\n    689     ,-70     ,-223    ,-310    ,-597    ,-899    ,-910    ,-58     ,794     ,972     ,258     ,-398    ,-609    ,275     ,761     ,\n    131     ,634     ,591     ,356     ,779     ,443     ,142     ,-15     ,-595    ,-1622   ,-1737   ,-1010   ,-335    ,-467    ,-728    ,\n    -205    ,-36     ,903     ,887     ,641     ,1499    ,1341    ,818     ,613     ,1045    ,452     ,-308    ,-443    ,-811    ,-728    ,\n    -448    ,-438    ,-1214   ,-1156   ,-291    ,76      ,220     ,533     ,938     ,640     ,334     ,955     ,895     ,369     ,559     ,\n    -58     ,-214    ,-225    ,-167    ,66      ,-474    ,-481    ,-1350   ,-1337   ,-529    ,-454    ,-86     ,116     ,290     ,123     ,\n    -259    ,-475    ,225     ,620     ,644     ,1082    ,1361    ,1393    ,1029    ,790     ,-74     ,-775    ,-560    ,-505    ,-387    ,\n    -248    ,-989    ,-773    ,-77     ,69      ,446     ,234     ,294     ,-163    ,-18     ,589     ,-144    ,-466    ,-161    ,213     ,\n    498     ,311     ,259     ,518     ,-105    ,-873    ,-956    ,-453    ,111     ,394     ,569     ,426     ,443     ,458     ,603     ,\n    -94     ,-731    ,25      ,-301    ,-594    ,-129    ,-106    ,-161    ,184     ,233     ,29      ,429     ,511     ,446     ,450     ,\n    685     ,338     ,-108    ,-235    ,-728    ,-338    ,81      ,-380    ,-658    ,-202    ,-492    ,-1060   ,-350    ,358     ,898     ,\n    978     ,962     ,960     ,137     ,261     ,478     ,9       ,-803    ,-978    ,-434    ,-1207   ,-1150   ,-214    ,219     ,631     ,\n    849     ,1368    ,1619    ,824     ,286     ,407     ,61      ,-462    ,-781    ,-1145   ,-1244   ,-767    ,-47     ,134     ,-1      ,\n    227     ,-143    ,-280    ,368     ,320     ,-381    ,-370    ,314     ,383     ,943     ,1313    ,719     ,585     ,390     ,-264    ,\n    -480    ,-276    ,-188    ,-197    ,-47     ,256     ,200     ,123     ,101     ,4       ,-255    ,-568    ,-951    ,-746    ,102     ,\n    12      ,124     ,525     ,394     ,-266    ,-678    ,-121    ,215     ,346     ,8       ,-169    ,322     ,224     ,14      ,-4      ,\n    246     ,500     ,39      ,-57     ,151     ,46      ,-130    ,-154    ,-5      ,-28     ,-127    ,9       ,261     ,425     ,384     ,\n    38      ,-99     ,-200    ,-404    ,-503    ,-282    ,-14     ,55      ,313     ,424     ,479     ,321     ,363     ,510     ,226     ,\n    10      ,-284    ,-453    ,-679    ,-830    ,-798    ,-652    ,-176    ,385     ,773     ,993     ,902     ,507     ,431     ,421     ,\n    419     ,-98     ,-403    ,-377    ,-696    ,-465    ,-194    ,-526    ,-882    ,-693    ,-455    ,22      ,487     ,825     ,595     ,\n    336     ,852     ,508     ,23      ,94      ,90      ,-116    ,-396    ,-242    ,42      ,-117    ,-226    ,25      ,187     ,487     ,\n    468     ,92      ,28      ,-62     ,-72     ,-219    ,-81     ,241     ,323     ,473     ,258     ,-4      ,-299    ,-328    ,-168    ,\n    -264    ,-420    ,-428    ,-175    ,215     ,230     ,-84     ,199     ,388     ,122     ,-105    ,-149    ,21      ,150     ,-154    ,\n    -273    ,13      ,194     ,202     ,-4      ,417     ,456     ,228     ,411     ,275     ,131     ,-157    ,-493    ,-823    ,-293    ,\n    355     ,268     ,101     ,-183    ,-29     ,-21     ,-119    ,35      ,115     ,249     ,266     ,61      ,151     ,327     ,36      ,\n    21      ,293     ,326     ,152     ,-79     ,-388    ,-449    ,-404    ,-123    ,68      ,-32     ,127     ,51      ,95      ,29      ,\n    184     ,360     ,149     ,-88     ,-800    ,-937    ,-649    ,-3      ,659     ,751     ,1181    ,1128    ,700     ,191     ,-40     ,\n    7       ,-448    ,-347    ,-325    ,-703    ,-382    ,-32     ,-224    ,-299    ,-200    ,-15     ,239     ,49      ,-23     ,147     ,\n    225     ,346     ,225     ,345     ,451     ,83      ,-207    ,-184    ,112     ,235     ,148     ,140     ,262     ,20      ,-254    ,\n    -177    ,-108    ,-118    ,-182    ,-94     ,-326    ,-397    ,65      ,227     ,99      ,98      ,236     ,291     ,236     ,384     ,\n    403     ,8       ,-49     ,-22     ,16      ,138     ,164     ,147     ,-242    ,-353    ,-181    ,-257    ,-442    ,-291    ,-13     ,\n    -51     ,259     ,642     ,357     ,-55     ,10      ,-19     ,-83     ,169     ,195     ,208     ,137     ,11      ,138     ,9       ,\n    -20     ,169     ,166     ,70      ,-175    ,-217    ,-260    ,-201    ,93      ,-157    ,-244    ,-20     ,-81     ,-166    ,-191    ,\n    -50     ,70      ,212     ,533     ,535     ,338     ,328     ,283     ,139     ,37      ,-165    ,-423    ,-435    ,-216    ,111     ,\n    78      ,-100    ,235     ,434     ,439     ,332     ,-6      ,130     ,-10     ,-402    ,-295    ,-232    ,-239    ,-307    ,-265    ,\n    -103    ,132     ,149     ,91      ,248     ,233     ,217     ,3       ,-5      ,113     ,207     ,461     ,380     ,22      ,-239    ,\n    -185    ,-151    ,-96     ,39      ,94      ,146     ,54      ,-84     ,58      ,202     ,179     ,-63     ,-157    ,-3      ,-4      ,\n    -23     ,-187    ,-128    ,-163    ,-198    ,-38     ,22      ,267     ,202     ,121     ,89      ,138     ,280     ,175     ,185     ,\n    160     ,186     ,150     ,156     ,281     ,243     ,154     ,-230    ,-409    ,-336    ,-359    ,-318    ,-247    ,41      ,201     ,\n    -90     ,-271    ,-144    ,140     ,388     ,237     ,106     ,127     ,92      ,-136    ,-222    ,-189    ,-119    ,91      ,49      ,\n    241     ,268     ,308     ,362     ,211     ,307     ,124     ,17      ,-74     ,-157    ,-165    ,-333    ,-349    ,-327    ,-154    ,\n    12      ,122     ,162     ,-19     ,19      ,97      ,45      ,187     ,374     ,375     ,186     ,-202    ,-373    ,-281    ,-327    ,\n    -161    ,1       ,113     ,380     ,352     ,248     ,306     ,269     ,116     ,58      ,-85     ,-275    ,-434    ,-427    ,-91     ,\n    17      ,-71     ,-127    ,68      ,467     ,477     ,399     ,194     ,-135    ,-165    ,-88     ,95      ,84      ,-63     ,-77     ,\n    -124    ,-153    ,-31     ,-35     ,6       ,75      ,28      ,279     ,376     ,384     ,163     ,-22     ,76      ,47      ,-146    ,\n    -461    ,-394    ,-291    ,-70     ,215     ,310     ,260     ,57      ,-78     ,-46     ,234     ,144     ,-16     ,-193    ,-422    ,\n    -291    ,-99     ,213     ,291     ,171     ,236     ,333     ,255     ,144     ,159     ,108     ,-51     ,-287    ,-230    ,-213    ,\n    -318    ,-61     ,48      ,-40     ,54      ,297     ,342     ,188     ,84      ,34      ,119     ,152     ,75      ,-48     ,-172    ,\n    -150    ,-27     ,48      ,83      ,47      ,2       ,87      ,58      ,35      ,36      ,-12     ,22      ,87      ,96      ,46      ,\n    63      ,-54     ,-141    ,-144    ,-212    ,-96     ,-9      ,69      ,129     ,112     ,41      ,-58     ,11      ,106     ,264     ,\n    313     ,364     ,282     ,88      ,55      ,-30     ,100     ,71      ,-259    ,-279    ,-79     ,-21     ,-31     ,-136    ,-155    ,\n    -59     ,-26     ,43      ,101     ,167     ,-104    ,-211    ,138     ,275     ,258     ,204     ,117     ,70      ,187     ,211     ,\n    30      ,-104    ,40      ,129     ,-138    ,-188    ,-186    ,-149    ,34      ,-2      ,-63     ,46      ,121     ,165     ,148     ,\n    105     ,215     ,66      ,13      ,107     ,-23     ,-19     ,-84     ,-148    ,-110    ,-61     ,-16     ,-70     ,-79     ,42      ,\n    106     ,35      ,139     ,257     ,169     ,45      ,61      ,49      ,-29     ,4       ,20      ,62      ,102     ,67      ,30      ,\n    5       ,-12     ,55      ,110     ,96      ,0       ,-126    ,-148    ,-113    ,40      ,7       ,-92     ,35      ,3       ,40      ,\n    132     ,42      ,29      ,-9      ,115     ,192     ,156     ,212     ,152     ,17      ,-168    ,-190    ,-190    ,-155    ,-31     ,\n    69      ,177     ,143     ,83      ,26      ,-32     ,-69     ,-115    ,49      ,190     ,110     ,186     ,246     ,103     ,-25     ,\n    30      ,-15     ,-142    ,-28     ,-55     ,-130    ,-98     ,-20     ,80      ,39      ,-90     ,-128    ,23      ,110     ,162     ,\n    201     ,125     ,220     ,228     ,93      ,48      ,-16     ,0       ,28      ,-57     ,-105    ,6       ,115     ,112     ,67      ,\n    32      ,25      ,57      ,60      ,-11     ,-76     ,-113    ,-93     ,-41     ,-46     ,-129    ,-65     ,8       ,-4      ,139     ,\n    199     ,162     ,88      ,66      ,106     ,45      ,64      ,118     ,146     ,70      ,15      ,-31     ,-94     ,-83     ,-115    ,\n    -58     ,12      ,88      ,100     ,58      ,116     ,111     ,105     ,218     ,26      ,-225    ,-129    ,-50     ,52      ,90      ,\n    98      ,120     ,39      ,54      ,100     ,56      ,32      ,126     ,31      ,-43     ,-35     ,-141    ,-108    ,-46     ,-11     ,\n    -16     ,-5      ,-38     ,-52     ,-9      ,-7      ,78      ,69      ,101     ,221     ,201     ,139     ,63      ,31      ,-68     ,\n    -108    ,-19     ,-61     ,-30     ,51      ,35      ,-50     ,-46     ,-15     ,-22     ,74      ,94      ,35      ,-17     ,26      ,\n    23      ,-42     ,-85     ,-121    ,35      ,133     ,161     ,229     ,251     ,204     ,46      ,-80     ,-109    ,-69     ,-130    ,\n    -214    ,-111    ,-105    ,-129    ,-51     ,65      ,211     ,212     ,296     ,305     ,131     ,40      ,55      ,68      ,-14     ,\n    -41     ,-120    ,-106    ,-29     ,-10     ,78      ,82      ,35      ,18      ,21      ,-47     ,-109    ,0       ,65      ,16      ,\n    -3      ,-63     ,-42     ,88      ,107     ,26      ,-13     ,76      ,52      ,-25     ,21      ,40      ,99      ,118     ,78      ,\n    62      ,39      ,70      ,65      ,4       ,-20     ,-21     ,-35     ,-51     ,-11     ,19      ,33      ,19      ,-15     ,20      ,\n    8       ,124     ,218     ,134     ,108     ,12      ,-7      ,-33     ,-47     ,-3      ,-52     ,-42     ,34      ,68      ,5       ,\n    77      ,112     ,-12     ,3       ,46      ,-12     ,-5      ,49      ,82      ,84      ,-30     ,-52     ,4       ,9       ,21      ,\n    110     ,118     ,84      ,88      ,-42     ,-64     ,-57     ,-94     ,-19     ,41      ,83      ,114     ,136     ,153     ,100     ,\n    118     ,89      ,-66     ,-133    ,-134    ,-78     ,-36     ,-12     ,71      ,116     ,104     ,109     ,96      ,97      ,103     ,\n    30      ,20      ,0       ,-32     ,5       ,-1      ,0       ,0       ,-1      ,1       ,-1      ,1       ,-1      ,1       ,0       ,\n    0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,-576    ,-1359   ,-1815   ,-2100   ,\n    -2621   ,-3623   ,-4290   ,-4326   ,-4128   ,-3133   ,-2265   ,-445    ,461     ,4925    ,12698   ,13738   ,13518   ,11203   ,11621   ,\n    16506   ,14267   ,8962    ,3420    ,-2233   ,-7243   ,-11652  ,-14975  ,-17262  ,-18368  ,-18206  ,-18405  ,-20058  ,-20143  ,-17726  ,\n    -13715  ,-8203   ,-1994   ,4531    ,10848   ,16351   ,21058   ,23964   ,26092   ,25510   ,28473   ,32405   ,26862   ,19512   ,10643   ,\n    1955    ,-6829   ,-13617  ,-12216  ,-14679  ,-20476  ,-24479  ,-28768  ,-31033  ,-30960  ,-28348  ,-23996  ,-17901  ,-10943  ,-3291   ,\n    4234    ,11353   ,17522   ,22345   ,25944   ,26471   ,30434   ,32286   ,26949   ,20533   ,13035   ,5543    ,-1830   ,-8492   ,-14191  ,\n    -18655  ,-21641  ,-23380  ,-24938  ,-24844  ,-22701  ,-19037  ,-13934  ,-8244   ,-1713   ,4064    ,14844   ,25264   ,27024   ,27323   ,\n    25286   ,22437   ,23741   ,21039   ,13435   ,5670    ,-2466   ,-9682   ,-15975  ,-20932  ,-24178  ,-26020  ,-25764  ,-25106  ,-25052  ,\n    -23238  ,-19100  ,-13490  ,-6754   ,530     ,7676    ,14460   ,20020   ,24555   ,27139   ,28555   ,27495   ,26727   ,28282   ,24168   ,\n    16716   ,8464    ,373     ,-8059   ,-12912  ,-13308  ,-17551  ,-22006  ,-24828  ,-26990  ,-27842  ,-26835  ,-23619  ,-19133  ,-13213  ,\n    -6789   ,38      ,6579    ,12495   ,17635   ,21159   ,23846   ,23258   ,24001   ,25914   ,22150   ,16560   ,10342   ,3791    ,-2316   ,\n    -8073   ,-12790  ,-16539  ,-18998  ,-20145  ,-20919  ,-20660  ,-18898  ,-15615  ,-11551  ,-6513   ,-1477   ,4176    ,13764   ,20007   ,\n    21309   ,21526   ,20219   ,17622   ,17200   ,16591   ,11238   ,5272    ,-860    ,-6611   ,-11478  ,-15561  ,-18180  ,-19857  ,-19871  ,\n    -19570  ,-19529  ,-18200  ,-15139  ,-10866  ,-5796   ,-170    ,5266    ,10552   ,14857   ,18425   ,20579   ,21625   ,21272   ,19678   ,\n    20428   ,18846   ,13430   ,7421    ,1211    ,-5128   ,-7773   ,-9053   ,-13337  ,-16796  ,-19247  ,-20671  ,-21425  ,-20855  ,-18599  ,\n    -15266  ,-10828  ,-5930   ,-684    ,4409    ,9058    ,13067   ,16044   ,17995   ,17813   ,17425   ,19144   ,17791   ,13573   ,9155    ,\n    4153    ,-531    ,-5041   ,-8832   ,-11897  ,-14082  ,-15159  ,-15775  ,-15841  ,-14896  ,-12598  ,-9809   ,-5960   ,-2446   ,2706    ,\n    10312   ,13982   ,15287   ,15474   ,14900   ,13113   ,11969   ,12425   ,9429    ,5150    ,722     ,-3579   ,-7288   ,-10468  ,-12661  ,\n    -14118  ,-14485  ,-14622  ,-14643  ,-13900  ,-11921  ,-8911   ,-5269   ,-1174   ,2942    ,6891    ,10318   ,13051   ,14986   ,15878   ,\n    15949   ,14792   ,14596   ,14605   ,11115   ,6770    ,2114    ,-2464   ,-3789   ,-5767   ,-9486   ,-12377  ,-14584  ,-15706  ,-16448  ,\n    -16272  ,-14877  ,-12461  ,-9264   ,-5530   ,-1541   ,2431    ,6138    ,9334    ,11910   ,13369   ,13620   ,12966   ,14069   ,14277   ,\n    11530   ,8286    ,4550    ,916     ,-2619   ,-5724   ,-8309   ,-10238  ,-11394  ,-11923  ,-12211  ,-11840  ,-10387  ,-8481   ,-5664   ,\n    -3089   ,1697    ,7387    ,9541    ,10789   ,11093   ,10821   ,9920    ,8586    ,9074    ,7998    ,4930    ,1789    ,-1446   ,-4327   ,\n    -6796   ,-8701   ,-9934   ,-10607  ,-11056  ,-11140  ,-10733  ,-9520   ,-7430   ,-4800   ,-1788   ,1347    ,4343    ,7087    ,9267    ,\n    10951   ,11790   ,12085   ,11420   ,10730   ,11223   ,9367    ,6230    ,2622    ,-418    ,-1238   ,-3586   ,-6709   ,-9213   ,-11197  ,\n    -12209  ,-12875  ,-12936  ,-12140  ,-10397  ,-8059   ,-5199   ,-2082   ,1053    ,4097    ,6683    ,8944    ,10066   ,10520   ,10181   ,\n    10541   ,11493   ,9953    ,7493    ,4745    ,1787    ,-989    ,-3606   ,-5800   ,-7517   ,-8702   ,-9243   ,-9621   ,-9562   ,-8736   ,\n    -7360   ,-5375   ,-3257   ,1077    ,5097    ,6573    ,7697    ,8063    ,8041    ,7612    ,6540    ,6618    ,6644    ,4722    ,2345    ,\n    -57     ,-2386   ,-4338   ,-6011   ,-7090   ,-7926   ,-8574   ,-8672   ,-8461   ,-7742   ,-6310   ,-4382   ,-2140   ,301     ,2621    ,\n    4862    ,6663    ,8110    ,8968    ,9277    ,9093    ,8240    ,8600    ,7947    ,5687    ,2893    ,1023    ,273     ,-2180   ,-4787   ,\n    -7025   ,-8787   ,-9780   ,-10374  ,-10549  ,-10140  ,-8886   ,-7142   ,-4891   ,-2416   ,151     ,2661    ,4878    ,6778    ,7748    ,\n    8263    ,8264    ,8248    ,9182    ,8722    ,6838    ,4751    ,2362    ,64      ,-2135   ,-4076   ,-5607   ,-6793   ,-7381   ,-7782   ,\n    -7888   ,-7517   ,-6469   ,-5151   ,-3128   ,714     ,3358    ,4543    ,5473    ,5946    ,6050    ,5894    ,5250    ,4915    ,5454    ,\n    4448    ,2654    ,832     ,-1056   ,-2642   ,-4109   ,-5094   ,-6053   ,-6784   ,-6940   ,-6812   ,-6403   ,-5431   ,-3992   ,-2289   ,\n    -366    ,1509    ,3339    ,4882    ,6122    ,6955    ,7333    ,7337    ,6701    ,6669    ,6712    ,5232    ,3048    ,2127    ,1148    ,\n    -1216   ,-3455   ,-5475   ,-7030   ,-8051   ,-8563   ,-8786   ,-8603   ,-7716   ,-6359   ,-4574   ,-2543   ,-405    ,1716    ,3662    ,\n    5228    ,6124    ,6635    ,6944    ,6765    ,7446    ,7683    ,6321    ,4694    ,2716    ,779     ,-1123   ,-2839   ,-4262   ,-5394   ,\n    -6049   ,-6455   ,-6639   ,-6562   ,-5763   ,-4896   ,-2821   ,391     ,2087    ,3146    ,3923    ,4421    ,4669    ,4638    ,4356    ,\n    3881    ,4396    ,4177    ,2825    ,1406    ,-114    ,-1495   ,-2730   ,-3710   ,-4697   ,-5465   ,-5686   ,-5611   ,-5374   ,-4728   ,\n    -3654   ,-2321   ,-801    ,755     ,2270    ,3617    ,4701    ,5517    ,5919    ,6034    ,5677    ,5311    ,5661    ,4787    ,3244    ,\n    2836    ,1609    ,-528    ,-2512   ,-4343   ,-5750   ,-6777   ,-7264   ,-7489   ,-7430   ,-6841   ,-5756   ,-4309   ,-2627   ,-777    ,\n    1016    ,2765    ,4074    ,4924    ,5481    ,5889    ,5831    ,6120    ,6725    ,5943    ,4570    ,2985    ,1268    ,-378    ,-1936   ,\n    -3269   ,-4344   ,-5082   ,-5480   ,-5714   ,-5795   ,-5270   ,-4607   ,-2542   ,10      ,1161    ,2127    ,2797    ,3323    ,3659    ,\n    3714    ,3684    ,3236    ,3546    ,3827    ,2958    ,1801    ,560     ,-653    ,-1729   ,-2708   ,-3700   ,-4457   ,-4765   ,-4740   ,\n    -4594   ,-4189   ,-3399   ,-2347   ,-1121   ,198     ,1475    ,2675    ,3662    ,4418    ,4897    ,5031    ,4942    ,4450    ,4731    ,\n    4412    ,3468    ,3275    ,1920    ,14      ,-1794   ,-3476   ,-4773   ,-5796   ,-6294   ,-6529   ,-6529   ,-6158   ,-5284   ,-4104   ,\n    -2662   ,-1064   ,511     ,2080    ,3182    ,4023    ,4622    ,5087    ,5191    ,5229    ,5875    ,5619    ,4496    ,3167    ,1659    ,\n    175     ,-1248   ,-2520   ,-3544   ,-4336   ,-4761   ,-5036   ,-5164   ,-4913   ,-4285   ,-2235   ,-382    ,467     ,1315    ,1929    ,\n    2459    ,2851    ,3025    ,3100    ,2883    ,2890    ,3433    ,3052    ,2090    ,1117    ,-4      ,-933    ,-1951   ,-2945   ,-3666   ,\n    -4042   ,-4077   ,-3984   ,-3748   ,-3184   ,-2342   ,-1355   ,-223    ,869     ,1943    ,2845    ,3571    ,4077    ,4267    ,4329    ,\n    3891    ,3976    ,3999    ,3798    ,3568    ,2108    ,417     ,-1278   ,-2816   ,-4056   ,-5030   ,-5578   ,-5804   ,-5825   ,-5604   ,\n    -4908   ,-3928   ,-2678   ,-1282   ,144     ,1517    ,2500    ,3303    ,3980    ,4430    ,4718    ,4664    ,5112    ,5302    ,4419    ,\n    3314    ,1964    ,602     ,-708    ,-1943   ,-2929   ,-3765   ,-4224   ,-4537   ,-4661   ,-4655   ,-3940   ,-2038   ,-767    ,-57     ,\n    667     ,1253    ,1801    ,2205    ,2495    ,2637    ,2616    ,2488    ,2990    ,3077    ,2331    ,1503    ,531     ,-344    ,-1350   ,\n    -2344   ,-3041   ,-3478   ,-3591   ,-3526   ,-3391   ,-3014   ,-2358   ,-1542   ,-584    ,381     ,1333    ,2181    ,2871    ,3401    ,\n    3665    ,3770    ,3537    ,3353    ,3606    ,4028    ,3672    ,2270    ,724     ,-852    ,-2278   ,-3482   ,-4413   ,-5004   ,-5256   ,\n    -5281   ,-5150   ,-4633   ,-3796   ,-2718   ,-1486   ,-170    ,1020    ,1929    ,2718    ,3432    ,3924    ,4284    ,4291    ,4507    ,\n    4921    ,4384    ,3390    ,2217    ,946     ,-278    ,-1452   ,-2443   ,-3267   ,-3802   ,-4147   ,-4264   ,-4416   ,-3571   ,-1935   ,\n    -1122   ,-478    ,121     ,703     ,1248    ,1678    ,2069    ,2238    ,2402    ,2253    ,2611    ,3014    ,2527    ,1821    ,983     ,\n    132     ,-875    ,-1837   ,-2515   ,-2985   ,-3173   ,-3150   ,-3072   ,-2841   ,-2335   ,-1659   ,-851    ,10      ,865     ,1656    ,\n    2346    ,2856    ,3206    ,3312    ,3278    ,2967    ,3303    ,4201    ,3704    ,2393    ,984     ,-510    ,-1823   ,-3003   ,-3884   ,\n    -4506   ,-4785   ,-4817   ,-4724   ,-4344   ,-3635   ,-2693   ,-1598   ,-397    ,622     ,1482    ,2262    ,3002    ,3528    ,3924    ,\n    4053    ,4057    ,4523    ,4319    ,3458    ,2425    ,1243    ,81      ,-1044   ,-2027   ,-2845   ,-3439   ,-3803   ,-3952   ,-4122   ,\n    -3185   ,-1916   ,-1399   ,-829    ,-312    ,251     ,792     ,1260    ,1690    ,1952    ,2180    ,2157    ,2322    ,2850    ,2706    ,\n    2064    ,1372    ,513     ,-456    ,-1377   ,-2065   ,-2551   ,-2817   ,-2841   ,-2804   ,-2665   ,-2311   ,-1751   ,-1069   ,-304    ,\n    474     ,1217    ,1884    ,2393    ,2795    ,2925    ,3042    ,2708    ,3094    ,4180    ,3691    ,2507    ,1189    ,-197    ,-1436   ,\n    -2574   ,-3429   ,-4073   ,-4380   ,-4445   ,-4360   ,-4090   ,-3499   ,-2674   ,-1701   ,-611    ,277     ,1089    ,1884    ,2605    ,\n    3198    ,3598    ,3829    ,3781    ,4089    ,4213    ,3517    ,2580    ,1510    ,379     ,-673    ,-1668   ,-2466   ,-3120   ,-3502   ,\n    -3712   ,-3784   ,-2832   ,-1958   ,-1615   ,-1125   ,-674    ,-133    ,395     ,895     ,1359    ,1699    ,1971    ,2090    ,2121    ,\n    2626    ,2797    ,2286    ,1694    ,843     ,-102    ,-965    ,-1659   ,-2163   ,-2489   ,-2582   ,-2562   ,-2499   ,-2277   ,-1822   ,\n    -1253   ,-576    ,128     ,818     ,1466    ,1980    ,2412    ,2611    ,2764    ,2561    ,2992    ,4009    ,3635    ,2573    ,1367    ,\n    76      ,-1101   ,-2186   ,-3036   ,-3676   ,-4031   ,-4120   ,-4035   ,-3845   ,-3368   ,-2664   ,-1778   ,-826    ,-36     ,743     ,\n    1536    ,2258    ,2886    ,3310    ,3612    ,3604    ,3720    ,4005    ,3561    ,2718    ,1736    ,662     ,-348    ,-1335   ,-2136   ,\n    -2825   ,-3231   ,-3529   ,-3399   ,-2527   ,-2049   ,-1801   ,-1423   ,-1008   ,-495    ,19      ,562     ,1029    ,1475    ,1761    ,\n    2014    ,2035    ,2367    ,2810    ,2495    ,1963    ,1146    ,221     ,-584    ,-1284   ,-1803   ,-2173   ,-2336   ,-2357   ,-2342   ,\n    -2221   ,-1884   ,-1420   ,-824    ,-197    ,457     ,1068    ,1602    ,2032    ,2327    ,2471    ,2487    ,3050    ,3711    ,3512    ,\n    2636    ,1502    ,336     ,-804    ,-1814   ,-2669   ,-3293   ,-3689   ,-3820   ,-3741   ,-3590   ,-3215   ,-2620   ,-1823   ,-1030   ,\n    -322    ,425     ,1219    ,1941    ,2586    ,3056    ,3374    ,3478    ,3425    ,3728    ,3562    ,2816    ,1930    ,913     ,-70     ,\n    -1029   ,-1850   ,-2550   ,-2987   ,-3349   ,-2982   ,-2287   ,-2154   ,-1968   ,-1708   ,-1316   ,-832    ,-316    ,235     ,733     ,\n    1230    ,1577    ,1896    ,2001    ,2179    ,2686    ,2665    ,2149    ,1388    ,507     ,-254    ,-945    ,-1490   ,-1890   ,-2137   ,\n    -2193   ,-2206   ,-2166   ,-1950   ,-1561   ,-1057   ,-491    ,120     ,692     ,1260    ,1665    ,2053    ,2179    ,2458    ,3100    ,\n    3339    ,3316    ,2649    ,1614    ,563     ,-536    ,-1475   ,-2319   ,-2939   ,-3359   ,-3535   ,-3486   ,-3347   ,-3071   ,-2574   ,\n    -1877   ,-1220   ,-576    ,155     ,917     ,1649    ,2287    ,2804    ,3144    ,3325    ,3244    ,3398    ,3483    ,2912    ,2084    ,\n    1163    ,192     ,-713    ,-1560   ,-2251   ,-2754   ,-3104   ,-2600   ,-2130   ,-2200   ,-2082   ,-1904   ,-1549   ,-1110   ,-597    ,\n    -32     ,487     ,1012    ,1425    ,1772    ,1986    ,2079    ,2525    ,2756    ,2316    ,1600    ,793     ,65      ,-601    ,-1165   ,\n    -1595   ,-1895   ,-2018   ,-2052   ,-2063   ,-1954   ,-1644   ,-1235   ,-719    ,-154    ,380     ,938     ,1363    ,1787    ,1938    ,\n    2461    ,3138    ,3049    ,3061    ,2633    ,1705    ,749     ,-280    ,-1172   ,-1990   ,-2602   ,-3033   ,-3253   ,-3240   ,-3103   ,\n    -2895   ,-2487   ,-1905   ,-1365   ,-772    ,-71     ,672     ,1397    ,2037    ,2574    ,2925    ,3162    ,3120    ,3125    ,3316    ,\n    2952    ,2190    ,1354    ,410     ,-452    ,-1294   ,-1969   ,-2545   ,-2799   ,-2244   ,-2022   ,-2199   ,-2173   ,-2055   ,-1739   ,\n    -1337   ,-827    ,-282    ,280     ,806     ,1285    ,1645    ,1940    ,2050    ,2332    ,2749    ,2424    ,1759    ,1049    ,337     ,\n    -293    ,-876    ,-1320   ,-1665   ,-1848   ,-1922   ,-1955   ,-1929   ,-1707   ,-1361   ,-912    ,-408    ,116     ,652     ,1097    ,\n    1521    ,1747    ,2455    ,3082    ,2824    ,2769    ,2544    ,1791    ,899     ,-31     ,-895    ,-1669   ,-2283   ,-2723   ,-2969   ,\n    -3017   ,-2877   ,-2716   ,-2390   ,-1923   ,-1489   ,-939    ,-263    ,438     ,1151    ,1782    ,2330    ,2730    ,2958    ,3023    ,\n    2913    ,3081    ,2946    ,2273    ,1520    ,619     ,-214    ,-1039   ,-1700   ,-2320   ,-2460   ,-1967   ,-1944   ,-2161   ,-2231   ,\n    -2155   ,-1892   ,-1528   ,-1035   ,-504    ,75      ,610     ,1126    ,1528    ,1866    ,2030    ,2191    ,2622    ,2490    ,1897    ,\n    1271    ,596     ,-20     ,-588    ,-1062   ,-1432   ,-1678   ,-1790   ,-1844   ,-1879   ,-1738   ,-1469   ,-1078   ,-627    ,-115    ,\n    363     ,845     ,1238    ,1610    ,2451    ,2931    ,2662    ,2466    ,2375    ,1830    ,1010    ,186     ,-648    ,-1365   ,-1974   ,\n    -2412   ,-2681   ,-2767   ,-2667   ,-2517   ,-2262   ,-1937   ,-1577   ,-1072   ,-435    ,240     ,917     ,1558    ,2096    ,2518    ,\n    2768    ,2884    ,2765    ,2825    ,2859    ,2351    ,1628    ,817     ,-2      ,-789    ,-1456   ,-2084   ,-2065   ,-1740   ,-1886   ,\n    -2103   ,-2270   ,-2228   ,-2020   ,-1684   ,-1217   ,-697    ,-115    ,430     ,972     ,1411    ,1767    ,2009    ,2105    ,2441    ,\n    2475    ,1994    ,1449    ,825     ,223     ,-328    ,-822    ,-1209   ,-1500   ,-1664   ,-1738   ,-1804   ,-1755   ,-1548   ,-1216   ,\n    -821    ,-342    ,114     ,612     ,970     ,1525    ,2423    ,2718    ,2519    ,2218    ,2136    ,1829    ,1096    ,361     ,-417    ,\n    -1085   ,-1680   ,-2123   ,-2403   ,-2534   ,-2475   ,-2333   ,-2134   ,-1937   ,-1640   ,-1177   ,-595    ,54      ,698     ,1326    ,\n    1860    ,2298    ,2557    ,2714    ,2641    ,2574    ,2675    ,2352    ,1685    ,960     ,165     ,-575    ,-1263   ,-1818   ,-1692   ,\n    -1591   ,-1851   ,-2063   ,-2292   ,-2292   ,-2139   ,-1826   ,-1391   ,-877    ,-306    ,256     ,797     ,1275    ,1661    ,1942    ,\n    2064    ,2234    ,2383    ,2071    ,1568    ,1019    ,434     ,-96     ,-604    ,-1011   ,-1338   ,-1546   ,-1654   ,-1734   ,-1749   ,\n    -1604   ,-1337   ,-984    ,-540    ,-113    ,386     ,737     ,1465    ,2326    ,2470    ,2375    ,2032    ,1903    ,1759    ,1162    ,\n    501     ,-210    ,-847    ,-1414   ,-1840   ,-2140   ,-2290   ,-2284   ,-2149   ,-1998   ,-1909   ,-1663   ,-1243   ,-714    ,-103    ,\n    514     ,1122    ,1651    ,2078    ,2381    ,2537    ,2536    ,2400    ,2465    ,2341    ,1747    ,1101    ,334     ,-355    ,-1050   ,\n    -1510   ,-1352   ,-1452   ,-1754   ,-1986   ,-2230   ,-2282   ,-2178   ,-1891   ,-1493   ,-994    ,-446    ,125     ,662     ,1165    ,\n    1561    ,1873    ,2036    ,2074    ,2249    ,2114    ,1687    ,1189    ,640     ,122     ,-382    ,-803    ,-1158   ,-1399   ,-1541   ,\n    -1626   ,-1699   ,-1616   ,-1404   ,-1094   ,-706    ,-278    ,178     ,566     ,1422    ,2178    ,2253    ,2203    ,1904    ,1684    ,\n    1637    ,1230    ,617     ,-5      ,-609    ,-1139   ,-1566   ,-1873   ,-2040   ,-2078   ,-1965   ,-1875   ,-1854   ,-1652   ,-1282   ,\n    -797    ,-225    ,355     ,935     ,1456    ,1877    ,2193    ,2355    ,2409    ,2264    ,2260    ,2246    ,1784    ,1181    ,478     ,\n    -169    ,-865    ,-1169   ,-1062   ,-1342   ,-1681   ,-1933   ,-2170   ,-2275   ,-2205   ,-1957   ,-1591   ,-1110   ,-580    ,-6      ,\n    532     ,1037    ,1457    ,1780    ,1993    ,1934    ,2060    ,2113    ,1761    ,1330    ,814     ,310     ,-169    ,-615    ,-974    ,\n    -1259   ,-1440   ,-1534   ,-1634   ,-1609   ,-1463   ,-1186   ,-853    ,-437    ,-27     ,450     ,1389    ,1976    ,2035    ,2007    ,\n    1760    ,1508    ,1469    ,1242    ,710     ,167     ,-389    ,-886    ,-1307   ,-1613   ,-1795   ,-1875   ,-1785   ,-1750   ,-1774   ,\n    -1623   ,-1295   ,-853    ,-336    ,214     ,755     ,1270    ,1681    ,2013    ,2181    ,2261    ,2154    ,2053    ,2105    ,1801    ,\n    1246    ,618     ,-14     ,-649    ,-810    ,-821    ,-1227   ,-1581   ,-1870   ,-2090   ,-2229   ,-2197   ,-1986   ,-1653   ,-1192   ,\n    -686    ,-126    ,410     ,915     ,1355    ,1693    ,1910    ,1838    ,1886    ,2044    ,1825    ,1434    ,976     ,479     ,15      ,\n    -432    ,-810    ,-1119   ,-1332   ,-1452   ,-1558   ,-1586   ,-1492   ,-1263   ,-972    ,-574    ,-225    ,393     ,1317    ,1739    ,\n    1827    ,1791    ,1630    ,1361    ,1277    ,1210    ,790     ,313     ,-195    ,-653    ,-1052   ,-1358   ,-1556   ,-1652   ,-1630   ,\n    -1644   ,-1672   ,-1570   ,-1293   ,-905    ,-425    ,88      ,593     ,1083    ,1484    ,1813    ,2009    ,2096    ,2041    ,1895    ,\n    1902    ,1777    ,1288    ,735     ,122     ,-408    ,-451    ,-646    ,-1113   ,-1491   ,-1808   ,-2009   ,-2175   ,-2174   ,-2005   ,\n    -1691   ,-1275   ,-778    ,-243    ,291     ,792     ,1240    ,1592    ,1784    ,1758    ,1730    ,1930    ,1854    ,1512    ,1119    ,\n    641     ,189     ,-260    ,-646    ,-977    ,-1221   ,-1375   ,-1476   ,-1557   ,-1509   ,-1327   ,-1080   ,-715    ,-381    ,375     ,\n    1201    ,1478    ,1609    ,1567    ,1468    ,1240    ,1087    ,1114    ,843     ,420     ,-22     ,-443    ,-822    ,-1125   ,-1340   ,\n    -1448   ,-1493   ,-1561   ,-1581   ,-1520   ,-1295   ,-947    ,-527    ,-53     ,422     ,884     ,1276    ,1588    ,1807    ,1901    ,\n    1905    ,1752    ,1696    ,1685    ,1300    ,822     ,229     ,-161    ,-179    ,-514    ,-994    ,-1406   ,-1736   ,-1931   ,-2098   ,\n    -2129   ,-2009   ,-1724   ,-1340   ,-868    ,-350    ,171     ,668     ,1113    ,1484    ,1641    ,1669    ,1626    ,1765    ,1845    ,\n    1574    ,1227    ,790     ,340     ,-88     ,-492    ,-830    ,-1101   ,-1288   ,-1393   ,-1503   ,-1499   ,-1375   ,-1147   ,-842    ,\n    -475    ,349     ,1029    ,1253    ,1397    ,1371    ,1320    ,1151    ,963     ,997     ,883     ,533     ,145     ,-234    ,-588    ,\n    -884    ,-1108   ,-1233   ,-1339   ,-1445   ,-1464   ,-1421   ,-1256   ,-957    ,-581    ,-154    ,289     ,715     ,1108    ,1403    ,\n    1640    ,1744    ,1766    ,1659    ,1538    ,1565    ,1319    ,890     ,354     ,98      ,44      ,-378    ,-860    ,-1292   ,-1628   ,\n    -1840   ,-1995   ,-2055   ,-1966   ,-1719   ,-1374   ,-928    ,-442    ,67      ,550     ,995     ,1358    ,1504    ,1578    ,1553    ,\n    1629    ,1786    ,1627    ,1309    ,921     ,485     ,74      ,-328    ,-682    ,-969    ,-1190   ,-1302   ,-1426   ,-1453   ,-1388   ,\n    -1187   ,-941    ,-525    ,312     ,839     ,1044    ,1183    ,1200    ,1164    ,1058    ,889     ,863     ,887     ,619     ,294     ,\n    -50     ,-385    ,-655    ,-895    ,-1037   ,-1205   ,-1331   ,-1343   ,-1321   ,-1203   ,-958    ,-623    ,-239    ,167     ,564     ,\n    932     ,1226    ,1462    ,1583    ,1632    ,1560    ,1419    ,1419    ,1303    ,940     ,481     ,367     ,220     ,-260    ,-730    ,\n    -1188   ,-1522   ,-1754   ,-1889   ,-1967   ,-1918   ,-1705   ,-1390   ,-979    ,-514    ,-27     ,442     ,879     ,1219    ,1368    ,\n    1463    ,1503    ,1507    ,1679    ,1650    ,1370    ,1031    ,613     ,211     ,-192    ,-546    ,-849    ,-1088   ,-1230   ,-1343   ,\n    -1408   ,-1389   ,-1215   ,-1028   ,-504    ,268     ,642     ,850     ,968     ,1023    ,1007    ,949     ,822     ,746     ,835     ,\n    694     ,422     ,112     ,-183    ,-451    ,-682    ,-853    ,-1067   ,-1214   ,-1235   ,-1208   ,-1136   ,-935    ,-655    ,-313    ,\n    56      ,414     ,765     ,1050    ,1277    ,1420    ,1478    ,1453    ,1322    ,1251    ,1249    ,949     ,619     ,601     ,344     ,\n    -150    ,-622    ,-1072   ,-1415   ,-1660   ,-1784   ,-1870   ,-1838   ,-1671   ,-1389   ,-1008   ,-575    ,-108    ,344     ,771     ,\n    1074    ,1243    ,1359    ,1440    ,1432    ,1553    ,1628    ,1412    ,1113    ,728     ,336     ,-51     ,-413    ,-719    ,-975    ,\n    -1152   ,-1255   ,-1348   ,-1361   ,-1234   ,-1062   ,-466    ,185     ,456     ,663     ,773     ,856     ,869     ,847     ,776     ,\n    672     ,758     ,731     ,517     ,261     ,-12     ,-268    ,-480    ,-690    ,-929    ,-1088   ,-1127   ,-1100   ,-1055   ,-907    ,\n    -672    ,-373    ,-45     ,287     ,605     ,887     ,1109    ,1261    ,1335    ,1329    ,1240    ,1121    ,1151    ,950     ,765     ,\n    777     ,435     ,-45     ,-521    ,-958    ,-1305   ,-1563   ,-1685   ,-1762   ,-1756   ,-1628   ,-1375   ,-1036   ,-625    ,-192    ,\n    246     ,658     ,915     ,1101    ,1240    ,1350    ,1358    ,1426    ,1557    ,1423    ,1157    ,815     ,436     ,59      ,-297    ,\n    -626    ,-884    ,-1083   ,-1196   ,-1296   ,-1333   ,-1269   ,-1066   ,-436    ,58      ,265     ,454     ,566     ,662     ,709     ,\n    715     ,686     ,602     ,640     ,723     ,580     ,365     ,130     ,-116    ,-316    ,-566    ,-814    ,-979    ,-1034   ,-1011   ,\n    -976    ,-871    ,-687    ,-429    ,-140    ,162     ,447     ,718     ,932     ,1089    ,1176    ,1193    ,1142    ,1005    ,1019    ,\n    924     ,903     ,886     ,489     ,34      ,-434    ,-853    ,-1199   ,-1450   ,-1594   ,-1653   ,-1657   ,-1568   ,-1339   ,-1035   ,\n    -653    ,-253    ,162     ,540     ,777     ,974     ,1138    ,1257    ,1314    ,1327    ,1451    ,1427    ,1186    ,889     ,524     ,\n    167     ,-187    ,-506    ,-771    ,-994    ,-1109   ,-1215   ,-1261   ,-1258   ,-998    ,-409    ,-49     ,132     ,299     ,423     ,\n    522     ,589     ,623     ,633     ,587     ,575     ,699     ,651     ,472     ,269     ,45      ,-154    ,-421    ,-678    ,-840    ,\n    -919    ,-910    ,-876    ,-818    ,-666    ,-453    ,-199    ,72      ,332     ,583     ,788     ,951     ,1047    ,1088    ,1051    ,\n    953     ,899     ,901     ,1029    ,951     ,557     ,120     ,-330    ,-734    ,-1072   ,-1327   ,-1482   ,-1535   ,-1549   ,-1482   ,\n    -1291   ,-1017   ,-669    ,-297    ,96      ,427     ,652     ,859     ,1042    ,1173    ,1257    ,1261    ,1343    ,1394    ,1207    ,\n    940     ,610     ,261     ,-75     ,-399    ,-672    ,-895    ,-1038   ,-1136   ,-1194   ,-1227   ,-909    ,-399    ,-157    ,14      ,\n    149     ,277     ,387     ,471     ,532     ,554     ,560     ,531     ,644     ,678     ,551     ,377     ,174     ,-27     ,-303    ,\n    -552    ,-719    ,-811    ,-818    ,-790    ,-753    ,-644    ,-468    ,-253    ,-19     ,220     ,457     ,653     ,817     ,923     ,\n    971     ,959     ,901     ,794     ,884     ,1114    ,966     ,591     ,180     ,-254    ,-635    ,-970    ,-1211   ,-1374   ,-1425   ,\n    -1434   ,-1389   ,-1231   ,-986    ,-676    ,-328    ,38      ,322     ,544     ,753     ,951     ,1092    ,1195    ,1215    ,1250    ,\n    1332    ,1211    ,971     ,666     ,337     ,7       ,-298    ,-576    ,-797    ,-961    ,-1057   ,-1116   ,-1163   ,-801    ,-402    ,\n    -243    ,-86     ,20      ,149     ,265     ,366     ,448     ,496     ,527     ,506     ,584     ,678     ,613     ,463     ,291     ,\n    72      ,-203    ,-438    ,-606    ,-704    ,-731    ,-709    ,-679    ,-616    ,-478    ,-293    ,-86     ,124     ,332     ,526     ,\n    678     ,791     ,855     ,858     ,838     ,712     ,867     ,1136    ,958     ,616     ,214     ,-186    ,-541    ,-869    ,-1101   ,\n    -1265   ,-1326   ,-1324   ,-1287   ,-1164   ,-949    ,-674    ,-346    ,-21     ,219     ,440     ,658     ,852     ,1006    ,1122    ,\n    1158    ,1162    ,1237    ,1191    ,980     ,705     ,398     ,81      ,-212    ,-490    ,-708    ,-891    ,-981    ,-1060   ,-1059   ,\n    -695    ,-427    ,-317    ,-181    ,-83     ,44      ,156     ,266     ,362     ,428     ,490     ,491     ,531     ,658     ,644     ,\n    528     ,380     ,150     ,-109    ,-332    ,-495    ,-602    ,-644    ,-629    ,-605    ,-568    ,-474    ,-323    ,-143    ,44      ,\n    234     ,415     ,557     ,678     ,749     ,765     ,762     ,667     ,857     ,1099    ,927     ,623     ,248     ,-121    ,-465    ,\n    -773    ,-998    ,-1155   ,-1226   ,-1225   ,-1184   ,-1097   ,-913    ,-670    ,-374    ,-92     ,116     ,336     ,550     ,750     ,\n    913     ,1021    ,1090    ,1083    ,1118    ,1126    ,961     ,716     ,432     ,133     ,-151    ,-425    ,-639    ,-824    ,-930    ,\n    -1011   ,-941    ,-627    ,-469    ,-388    ,-286    ,-192    ,-72     ,40      ,160     ,268     ,361     ,428     ,477     ,488     ,\n    596     ,657     ,572     ,444     ,212     ,-31     ,-236    ,-394    ,-502    ,-567    ,-567    ,-543    ,-532    ,-472    ,-345    ,\n    -198    ,-31     ,131     ,302     ,441     ,561     ,639     ,675     ,671     ,648     ,863     ,1027    ,886     ,614     ,271     ,\n    -63     ,-392    ,-674    ,-893    ,-1047   ,-1124   ,-1119   ,-1078   ,-1009   ,-852    ,-642    ,-376    ,-142    ,43      ,256     ,\n    470     ,671     ,838     ,956     ,1034    ,1037    ,1037    ,1068    ,953     ,734     ,476     ,196     ,-73     ,-334    ,-555    ,\n    -737    ,-851    ,-937    ,-787    ,-551    ,-488    ,-422    ,-358    ,-262    ,-150    ,-37     ,88      ,205     ,312     ,392     ,\n    463     ,477     ,564     ,654     ,620     ,501     ,271     ,45      ,-138    ,-294    ,-408    ,-475    ,-491    ,-482    ,-474    ,\n    -442    ,-357    ,-231    ,-89     ,58      ,211     ,345     ,463     ,541     ,606     ,591     ,657     ,862     ,929     ,844     ,\n    604     ,298     ,-10     ,-312    ,-566    ,-785    ,-927    ,-1012   ,-1021   ,-976    ,-914    ,-792    ,-614    ,-384    ,-188    ,\n    -22     ,182     ,395     ,591     ,765     ,888     ,970     ,992     ,967     ,994     ,928     ,744     ,511     ,245     ,-14     ,\n    -251    ,-480    ,-653    ,-782    ,-852    ,-653    ,-504    ,-496    ,-455    ,-415    ,-325    ,-226    ,-104    ,22      ,142     ,\n    265     ,359     ,441     ,482     ,528     ,630     ,643     ,527     ,323     ,112     ,-59     ,-209    ,-314    ,-389    ,-425    ,\n    -422    ,-423    ,-409    ,-356    ,-253    ,-133    ,-5      ,127     ,257     ,373     ,455     ,528     ,528     ,675     ,857     ,\n    840     ,778     ,586     ,309     ,32      ,-237    ,-479    ,-681    ,-824    ,-906    ,-917    ,-880    ,-819    ,-735    ,-574    ,\n    -381    ,-231    ,-69     ,122     ,330     ,525     ,693     ,822     ,902     ,942     ,916     ,911     ,886     ,736     ,525     ,\n    287     ,37      ,-187    ,-411    ,-576    ,-725    ,-742    ,-532    ,-469    ,-493    ,-486    ,-463    ,-381    ,-286    ,-165    ,\n    -40     ,88      ,212     ,324     ,413     ,476     ,508     ,595     ,647     ,534     ,349     ,168     ,12      ,-127    ,-230    ,\n    -308    ,-363    ,-368    ,-366    ,-372    ,-351    ,-276    ,-175    ,-60     ,55      ,181     ,286     ,372     ,447     ,478     ,\n    687     ,830     ,754     ,698     ,539     ,313     ,62      ,-184    ,-401    ,-587    ,-720    ,-802    ,-821    ,-794    ,-726    ,\n    -661    ,-532    ,-382    ,-264    ,-110    ,74      ,270     ,460     ,620     ,750     ,838     ,881     ,869     ,838     ,831     ,\n    720     ,530     ,315     ,76      ,-134    ,-348    ,-504    ,-654    ,-629    ,-443    ,-438    ,-487    ,-501    ,-485    ,-420    ,\n    -333    ,-218    ,-89     ,42      ,170     ,293     ,383     ,466     ,497     ,557     ,632     ,531     ,370     ,217     ,61      ,\n    -61     ,-168    ,-251    ,-304    ,-334    ,-335    ,-348    ,-344    ,-299    ,-222    ,-109    ,-15     ,100     ,200     ,298     ,\n    355     ,435     ,674     ,763     ,674     ,602     ,488     ,296     ,72      ,-146    ,-346    ,-517    ,-646    ,-722    ,-752    ,\n    -730    ,-669    ,-607    ,-511    ,-404    ,-306    ,-158    ,13      ,197     ,384     ,537     ,670     ,759     ,806     ,804     ,\n    759     ,746     ,673     ,517     ,316     ,103     ,-98     ,-293    ,-454    ,-593    ,-522    ,-392    ,-419    ,-477    ,-520    ,\n    -504    ,-454    ,-373    ,-261    ,-137    ,-3      ,124     ,244     ,344     ,430     ,474     ,515     ,569     ,507     ,368     ,\n    242     ,108     ,-5      ,-101    ,-187    ,-240    ,-284    ,-292    ,-301    ,-321    ,-292    ,-232    ,-150    ,-60     ,41      ,\n    125     ,224     ,281     ,404     ,630     ,678     ,600     ,512     ,429     ,287     ,95      ,-83     ,-265    ,-406    ,-519    ,\n    -598    ,-630    ,-615    ,-557    ,-500    ,-433    ,-371    ,-290    ,-160    ,-9      ,146     ,311     ,462     ,576     ,666     ,\n    707     ,718     ,676     ,647     ,608     ,484     ,315     ,130     ,-49     ,-212    ,-373    ,-473    ,-384    ,-324    ,-365    ,\n    -421    ,-481    ,-472    ,-439    ,-368    ,-267    ,-148    ,-29     ,89      ,210     ,306     ,391     ,444     ,473     ,494     ,\n    461     ,370     ,266     ,156     ,49      ,-41     ,-117    ,-173    ,-218    ,-240    ,-251    ,-272    ,-266    ,-224    ,-171    ,\n    -90     ,-10     ,69      ,160     ,211     ,378     ,559     ,581     ,519     ,419     ,358     ,255     ,107     ,-41     ,-185    ,\n    -307    ,-415    ,-474    ,-507    ,-502    ,-459    ,-408    ,-369    ,-340    ,-274    ,-170    ,-36     ,104     ,246     ,379     ,\n    488     ,571     ,615     ,631     ,595     ,557     ,530     ,441     ,303     ,152     ,-11     ,-149    ,-294    ,-362    ,-281    ,\n    -279    ,-323    ,-373    ,-437    ,-443    ,-420    ,-359    ,-271    ,-168    ,-53     ,61      ,169     ,267     ,340     ,400     ,\n    426     ,419     ,409     ,348     ,266     ,181     ,87      ,8       ,-65     ,-119    ,-166    ,-196    ,-203    ,-230    ,-244    ,\n    -217    ,-178    ,-113    ,-45     ,22      ,95      ,164     ,345     ,485     ,485     ,446     ,357     ,290     ,227     ,117     ,\n    -9      ,-123    ,-230    ,-317    ,-376    ,-402    ,-400    ,-382    ,-328    ,-309    ,-307    ,-256    ,-163    ,-50     ,69      ,\n    194     ,311     ,409     ,480     ,527     ,542     ,521     ,473     ,445     ,390     ,279     ,153     ,15      ,-105    ,-236    ,\n    -258    ,-205    ,-240    ,-283    ,-337    ,-390    ,-409    ,-391    ,-337    ,-265    ,-166    ,-66     ,38      ,137     ,234     ,\n    303     ,360     ,388     ,359     ,351     ,322     ,262     ,193     ,114     ,45      ,-22     ,-80     ,-124    ,-158    ,-175    ,\n    -196    ,-215    ,-205    ,-180    ,-126    ,-73     ,-6      ,50      ,136     ,312     ,407     ,400     ,370     ,299     ,236     ,\n    191     ,111     ,17      ,-76     ,-167    ,-234    ,-287    ,-316    ,-320    ,-304    ,-265    ,-264    ,-269    ,-228    ,-156    ,\n    -62     ,42      ,155     ,255     ,339     ,404     ,445     ,457     ,450     ,408     ,376     ,341     ,255     ,149     ,33      ,\n    -75     ,-178    ,-172    ,-151    ,-205    ,-251    ,-300    ,-344    ,-375    ,-363    ,-316    ,-254    ,-169    ,-78     ,15      ,\n    107     ,193     ,262     ,314     ,331     ,299     ,288     ,283     ,241     ,182     ,118     ,54      ,-4      ,-55     ,-99     ,\n    -138    ,-159    ,-173    ,-200    ,-206    ,-187    ,-147    ,-104    ,-44     ,2       ,101     ,258     ,317     ,314     ,288     ,\n    237     ,177     ,140     ,92      ,14      ,-50     ,-125    ,-186    ,-230    ,-254    ,-262    ,-255    ,-226    ,-231    ,-241    ,\n    -212    ,-154    ,-72     ,12      ,104     ,191     ,264     ,325     ,364     ,381     ,376     ,347     ,310     ,280     ,228     ,\n    136     ,45      ,-50     ,-126    ,-111    ,-117    ,-174    ,-223    ,-260    ,-299    ,-329    ,-323    ,-290    ,-230    ,-162    ,\n    -76     ,6       ,83      ,163     ,224     ,272     ,286     ,257     ,244     ,251     ,228     ,183     ,133     ,78      ,25      ,\n    -22     ,-66     ,-101    ,-125    ,-140    ,-162    ,-178    ,-164    ,-139    ,-100    ,-52     ,-11     ,98      ,222     ,261     ,\n    262     ,237     ,204     ,153     ,118     ,93      ,40      ,-17     ,-72     ,-122    ,-164    ,-185    ,-195    ,-193    ,-182    ,\n    -189    ,-199    ,-178    ,-134    ,-71     ,0       ,75      ,150     ,210     ,264     ,301     ,312     ,311     ,292     ,256     ,\n    230     ,195     ,125     ,53      ,-26     ,-70     ,-54     ,-85     ,-136    ,-184    ,-222    ,-245    ,-277    ,-274    ,-252    ,\n    -203    ,-144    ,-75     ,-2      ,63      ,132     ,182     ,227     ,233     ,212     ,201     ,207     ,201     ,169     ,130     ,\n    85      ,40      ,-2      ,-36     ,-69     ,-98     ,-112    ,-125    ,-144    ,-141    ,-127    ,-98     ,-62     ,-18     ,82      ,\n    165     ,190     ,195     ,177     ,155     ,117     ,89      ,73      ,44      ,4       ,-35     ,-69     ,-102    ,-120    ,-130    ,\n    -131    ,-133    ,-148    ,-151    ,-139    ,-109    ,-61     ,-6      ,49      ,102     ,154     ,195     ,222     ,240     ,238     ,\n    225     ,195     ,175     ,154     ,106     ,55      ,-5      ,-24     ,-19     ,-56     ,-98     ,-139    ,-171    ,-186    ,-207    ,\n    -212    ,-194    ,-163    ,-116    ,-62     ,-9      ,45      ,95      ,141     ,171     ,173     ,166     ,159     ,162     ,163     ,\n    144     ,116     ,83      ,47      ,13      ,-17     ,-43     ,-65     ,-82     ,-93     ,-109    ,-111    ,-104    ,-85     ,-62     ,\n    -17     ,63      ,113     ,129     ,133     ,124     ,111     ,90      ,67      ,56      ,42      ,15      ,-9      ,-35     ,-56     ,\n    -73     ,-85     ,-87     ,-97     ,-108    ,-107    ,-103    ,-84     ,-50     ,-13     ,27      ,67      ,104     ,132     ,154     ,\n    167     ,167     ,161     ,142     ,124     ,109     ,83      ,46      ,5       ,0       ,-5      ,-37     ,-70     ,-103    ,-125    ,\n    -138    ,-152    ,-155    ,-143    ,-123    ,-90     ,-50     ,-10     ,27      ,66      ,100     ,119     ,119     ,117     ,115     ,\n    115     ,121     ,110     ,93      ,71      ,44      ,19      ,-5      ,-24     ,-43     ,-57     ,-66     ,-77     ,-83     ,-81     ,\n    -67     ,-50     ,-13     ,40      ,68      ,81      ,85      ,81      ,74      ,62      ,47      ,39      ,34      ,20      ,4       ,\n    -9      ,-24     ,-34     ,-40     ,-48     ,-59     ,-63     ,-61     ,-59     ,-47     ,-31     ,-10     ,9       ,31      ,50      ,\n    64      ,77      ,81      ,82      ,78      ,69      ,58      ,48      ,39      ,21      ,8       ,8       ,1       ,-13     ,-28     ,\n    -41     ,-50     ,-54     ,-56     ,-58     ,-53     ,-44     ,-33     ,-19     ,-6      ,5       ,16      ,25      ,29      ,29      ,\n    28      ,27      ,25      ,25      ,23      ,18      ,13      ,8       \n#if defined(AMY_WAVETABLE)\n    // sounds/wavetables/111.WAV\n    -1946   ,-2630   ,-3431   ,-4782   ,-5750   ,-5603   ,-6049   ,-7092   ,-7906   ,-8874   ,-9710   ,-10474  ,-11380  ,-12145  ,-12816  ,\n    -13661  ,-14707  ,-15744  ,-16562  ,-17128  ,-17702  ,-18435  ,-19120  ,-19628  ,-20182  ,-20911  ,-21622  ,-22240  ,-22823  ,-23323  ,\n    -23764  ,-24231  ,-24785  ,-25407  ,-25986  ,-26506  ,-27019  ,-27535  ,-27990  ,-28392  ,-28812  ,-29212  ,-29558  ,-29875  ,-30133  ,\n    -30354  ,-30576  ,-30741  ,-30881  ,-31055  ,-31270  ,-31520  ,-31739  ,-31881  ,-31935  ,-31987  ,-32106  ,-32254  ,-32377  ,-32425  ,\n    -32420  ,-32432  ,-32464  ,-32529  ,-32647  ,-32700  ,-32696  ,-32753  ,-32767  ,-32715  ,-32700  ,-32668  ,-32607  ,-32584  ,-32561  ,\n    -32513  ,-32483  ,-32325  ,-31953  ,-31583  ,-31242  ,-30790  ,-30323  ,-29905  ,-29400  ,-28882  ,-28458  ,-27969  ,-27417  ,-26895  ,\n    -26373  ,-25903  ,-25490  ,-25010  ,-24481  ,-23994  ,-23471  ,-22874  ,-22385  ,-21968  ,-21418  ,-20854  ,-20350  ,-19769  ,-19252  ,\n    -18817  ,-18212  ,-17689  ,-17360  ,-16835  ,-16297  ,-15832  ,-14942  ,-13851  ,-12962  ,-12080  ,-11252  ,-10396  ,-9277   ,-8191   ,\n    -7204   ,-6231   ,-5416   ,-4529   ,-3715   ,-2923   ,-2027   ,-1866   ,-1676   ,-911    ,-348    ,430     ,1273    ,1939    ,2748    ,\n    3450    ,4055    ,4761    ,5490    ,6198    ,6975    ,7716    ,8281    ,8811    ,9387    ,9981    ,10627   ,11321   ,11975   ,12583   ,\n    13214   ,13858   ,14495   ,15166   ,15844   ,16520   ,17212   ,17696   ,18015   ,18594   ,19330   ,19945   ,20549   ,21097   ,21595   ,\n    22156   ,22473   ,22553   ,22863   ,23261   ,23603   ,24100   ,24522   ,24780   ,25053   ,25332   ,25624   ,25932   ,26217   ,26514   ,\n    26834   ,27120   ,27392   ,27655   ,27892   ,28138   ,28381   ,28642   ,28936   ,29223   ,29476   ,29726   ,30018   ,30302   ,30511   ,\n    30694   ,30931   ,31239   ,31636   ,32054   ,32317   ,32440   ,32596   ,32767   ,32753   ,32613   ,32659   ,32643   ,32093   ,31368   ,\n    30863   ,30315   ,29645   ,29011   ,28329   ,27560   ,26798   ,26015   ,25192   ,24344   ,23487   ,22712   ,21990   ,21226   ,20479   ,\n    19775   ,19051   ,18304   ,17532   ,16767   ,16063   ,15368   ,14714   ,14098   ,13377   ,12596   ,11835   ,11053   ,10296   ,9576    ,\n    8856    ,8111    ,7257    ,6351    ,5512    ,4659    ,3814    ,3098    ,2530    ,2026    ,1394    ,691     ,135     ,-347    ,-928    ,\n    -1603   ,-726    ,-1355   ,-1967   ,-2508   ,-3027   ,-3538   ,-3970   ,-4384   ,-4892   ,-5435   ,-6014   ,-6659   ,-7334   ,-8065   ,\n    -8759   ,-9381   ,-9947   ,-10379  ,-10873  ,-11546  ,-12239  ,-12854  ,-13298  ,-13589  ,-13954  ,-14464  ,-15053  ,-15672  ,-16199  ,\n    -16696  ,-17197  ,-17628  ,-18097  ,-18589  ,-19050  ,-19517  ,-19935  ,-20323  ,-20757  ,-21170  ,-21547  ,-21960  ,-22363  ,-22745  ,\n    -23118  ,-23451  ,-23806  ,-24169  ,-24471  ,-24808  ,-25163  ,-25465  ,-25833  ,-26185  ,-26524  ,-26929  ,-27188  ,-27598  ,-27940  ,\n    -27981  ,-29121  ,-30827  ,-31209  ,-31176  ,-31577  ,-31665  ,-31720  ,-31959  ,-31937  ,-31993  ,-32153  ,-32204  ,-32378  ,-32457  ,\n    -32466  ,-32701  ,-32767  ,-32311  ,-31603  ,-30914  ,-30201  ,-29453  ,-28672  ,-27864  ,-27171  ,-26524  ,-25757  ,-24958  ,-24128  ,\n    -23185  ,-22373  ,-21782  ,-21127  ,-20428  ,-19771  ,-19047  ,-18366  ,-17717  ,-17016  ,-16402  ,-15765  ,-14966  ,-14184  ,-13447  ,\n    -12703  ,-12053  ,-11412  ,-10703  ,-10100  ,-9578   ,-8939   ,-8252   ,-7582   ,-6916   ,-6415   ,-6064   ,-5689   ,-5144   ,-4289   ,\n    -3330   ,-2583   ,-2011   ,-1507   ,-988    ,-502    ,137     ,704     ,489     ,472     ,1167    ,1660    ,2167    ,2800    ,3023    ,\n    3216    ,3746    ,4216    ,4643    ,5176    ,5744    ,6337    ,6892    ,7465    ,8090    ,8693    ,9230    ,9702    ,10165   ,10655   ,\n    11155   ,11667   ,12200   ,12751   ,13339   ,13973   ,14608   ,15180   ,15619   ,15978   ,16395   ,16870   ,17375   ,17897   ,18419   ,\n    18973   ,19514   ,19996   ,20433   ,20881   ,21372   ,21881   ,22384   ,22824   ,23239   ,23691   ,24171   ,24700   ,25243   ,25734   ,\n    26222   ,26737   ,27204   ,27707   ,28320   ,28907   ,29450   ,29992   ,30480   ,30992   ,31606   ,32237   ,32700   ,32767   ,32527   ,\n    32222   ,31870   ,31513   ,31153   ,30750   ,30379   ,30030   ,29665   ,29315   ,28954   ,28509   ,28027   ,27622   ,27188   ,26590   ,\n    25980   ,25452   ,24912   ,24335   ,23744   ,23135   ,22524   ,21911   ,21264   ,20612   ,19976   ,19354   ,18761   ,18162   ,17579   ,\n    17029   ,16469   ,15878   ,15271   ,14682   ,14098   ,13510   ,12937   ,12368   ,11815   ,11263   ,10677   ,10086   ,9515    ,8937    ,\n    8354    ,7808    ,7260    ,6674    ,6117    ,5571    ,5012    ,4500    ,3991    ,3494    ,3047    ,2561    ,2023    ,1500    ,1007    ,\n    543     ,115     ,8078    ,7606    ,7060    ,6523    ,5992    ,5406    ,4787    ,4193    ,3625    ,3050    ,2497    ,2047    ,1786    ,\n    1616    ,1314    ,923     ,506     ,46      ,-342    ,-699    ,-1132   ,-1628   ,-2138   ,-2664   ,-3301   ,-3955   ,-4533   ,-5138   ,\n    -5752   ,-6254   ,-6678   ,-7143   ,-7619   ,-8194   ,-8867   ,-9428   ,-9936   ,-10433  ,-10842  ,-11069  ,-11103  ,-11227  ,-11591  ,\n    -12308  ,-13199  ,-13772  ,-14446  ,-15101  ,-15427  ,-16280  ,-16888  ,-17283  ,-18365  ,-18593  ,-19175  ,-20310  ,-19778  ,-20792  ,\n    -21286  ,-19484  ,-24778  ,-32767  ,-32458  ,-30485  ,-31121  ,-30139  ,-29057  ,-28800  ,-27705  ,-26959  ,-26399  ,-25411  ,-24847  ,\n    -24192  ,-23383  ,-22801  ,-22097  ,-21429  ,-20810  ,-20122  ,-19502  ,-18855  ,-18182  ,-17557  ,-16922  ,-16257  ,-15584  ,-14909  ,\n    -14242  ,-13620  ,-12990  ,-12334  ,-11706  ,-11071  ,-10426  ,-9791   ,-9171   ,-8553   ,-7903   ,-7282   ,-6729   ,-6169   ,-5568   ,\n    -4959   ,-4314   ,-3656   ,-3044   ,-2436   ,-1796   ,-1105   ,-418    ,226     ,914     ,1590    ,2185    ,2801    ,3443    ,4080    ,\n    4712    ,5321    ,5913    ,6400    ,6824    ,7304    ,7849    ,8365    ,8727    ,9156    ,9680    ,10164   ,10574   ,10881   ,11326   ,\n    11604   ,11787   ,12337   ,12840   ,13292   ,13852   ,14406   ,15019   ,15638   ,16280   ,16937   ,17536   ,18076   ,18584   ,19105   ,\n    19641   ,20149   ,20661   ,21198   ,21702   ,22214   ,22795   ,23414   ,24049   ,24661   ,25187   ,25660   ,26144   ,26635   ,27160   ,\n    27711   ,28238   ,28754   ,29265   ,29767   ,30287   ,30819   ,31349   ,31808   ,32020   ,32072   ,32162   ,32242   ,32326   ,32445   ,\n    32537   ,32636   ,32738   ,32734   ,32688   ,32721   ,32762   ,32767   ,32761   ,32707   ,32639   ,32618   ,32574   ,32403   ,32037   ,\n    31519   ,30987   ,30484   ,30002   ,29526   ,29033   ,28543   ,28142   ,27823   ,27534   ,27290   ,27020   ,26702   ,26375   ,26048   ,\n    25732   ,25416   ,25113   ,24833   ,24539   ,24222   ,23916   ,23615   ,23322   ,23033   ,22738   ,22442   ,22126   ,21825   ,21550   ,\n    21281   ,21015   ,20736   ,20442   ,20147   ,19857   ,19575   ,19297   ,19015   ,18731   ,18454   ,18174   ,17883   ,17623   ,17369   ,\n    17090   ,16842   ,16607   ,16380   ,16166   ,15868   ,15456   ,15077   ,14776   ,14416   ,14083   ,13852   ,13591   ,13337   ,13121   ,\n    12956   ,12898   ,12821   ,14804   ,14784   ,14818   ,14773   ,14391   ,13888   ,13576   ,13355   ,13114   ,12859   ,12668   ,12599   ,\n    12573   ,12462   ,12355   ,12334   ,12207   ,12092   ,12089   ,12004   ,11801   ,11443   ,11183   ,10946   ,10921   ,11423   ,11290   ,\n    11314   ,11607   ,10610   ,10762   ,10861   ,9811    ,11568   ,10726   ,9027    ,12249   ,9135    ,10862   ,17085   ,-5794   ,-32470  ,\n    -31097  ,-28743  ,-32767  ,-30679  ,-29601  ,-30494  ,-28542  ,-28202  ,-28089  ,-26560  ,-26448  ,-25721  ,-24749  ,-24473  ,-23625  ,\n    -22980  ,-22463  ,-21704  ,-21131  ,-20516  ,-19834  ,-19206  ,-18580  ,-17984  ,-17379  ,-16766  ,-16163  ,-15558  ,-14950  ,-14357  ,\n    -13791  ,-13262  ,-12756  ,-12228  ,-11694  ,-11153  ,-10607  ,-10111  ,-9624   ,-9109   ,-8580   ,-8031   ,-7477   ,-6928   ,-6374   ,\n    -5810   ,-5273   ,-4776   ,-4287   ,-3809   ,-3302   ,-2742   ,-2173   ,-1655   ,-1195   ,-729    ,-254    ,230     ,739     ,1258    ,\n    1743    ,2189    ,2654    ,3130    ,3567    ,4005    ,4487    ,5004    ,5518    ,6002    ,6512    ,7027    ,7510    ,8014    ,8515    ,\n    9023    ,9481    ,9894    ,10362   ,10644   ,10741   ,10972   ,11307   ,11602   ,11862   ,12199   ,12580   ,12895   ,13221   ,13447   ,\n    13668   ,14104   ,14532   ,14951   ,15420   ,15872   ,16379   ,16886   ,17364   ,17895   ,18460   ,18962   ,19429   ,19850   ,20129   ,\n    20403   ,20758   ,21082   ,21418   ,21760   ,22024   ,22285   ,22589   ,22945   ,23350   ,23710   ,23996   ,24275   ,24572   ,24862   ,\n    25145   ,25432   ,25721   ,26009   ,26298   ,26597   ,26874   ,27132   ,27418   ,27635   ,27633   ,27507   ,27405   ,27282   ,27139   ,\n    27039   ,26958   ,26908   ,26882   ,26796   ,26683   ,26610   ,26553   ,26503   ,26477   ,26473   ,26466   ,26454   ,26446   ,26443   ,\n    26447   ,26461   ,26463   ,26475   ,26527   ,26548   ,26563   ,26632   ,26720   ,26821   ,26917   ,26973   ,27007   ,27049   ,27066   ,\n    27055   ,27089   ,27148   ,27176   ,27212   ,27273   ,27309   ,27296   ,27319   ,27421   ,27466   ,27472   ,27613   ,27849   ,28024   ,\n    28091   ,28096   ,28114   ,28148   ,28144   ,28162   ,28175   ,28151   ,28141   ,28125   ,28224   ,28317   ,28283   ,28311   ,28408   ,\n    28546   ,28661   ,28756   ,28827   ,28790   ,28716   ,28785   ,29134   ,29535   ,29874   ,30235   ,30615   ,31173   ,31411   ,31380   ,\n    31618   ,31579   ,32135   ,32767   ,23633   ,24356   ,24464   ,23986   ,25440   ,24658   ,24621   ,26958   ,24204   ,26194   ,28719   ,\n    23671   ,32767   ,26717   ,-14409  ,-32767  ,-25891  ,-28724  ,-31015  ,-28518  ,-29927  ,-29734  ,-27971  ,-28946  ,-28049  ,-27180  ,\n    -27654  ,-26621  ,-26424  ,-26320  ,-25537  ,-25406  ,-24981  ,-24454  ,-24219  ,-23757  ,-23319  ,-22966  ,-22586  ,-22247  ,-21917  ,\n    -21588  ,-21233  ,-20844  ,-20412  ,-19947  ,-19443  ,-18922  ,-18444  ,-17991  ,-17543  ,-17118  ,-16699  ,-16257  ,-15827  ,-15423  ,\n    -15015  ,-14612  ,-14174  ,-13708  ,-13269  ,-12832  ,-12397  ,-11989  ,-11551  ,-11075  ,-10629  ,-10188  ,-9782   ,-9455   ,-9125   ,\n    -8771   ,-8430   ,-8104   ,-7781   ,-7447   ,-7114   ,-6788   ,-6460   ,-6142   ,-5837   ,-5536   ,-5189   ,-4745   ,-4310   ,-3979   ,\n    -3676   ,-3373   ,-3087   ,-2768   ,-2473   ,-2243   ,-1935   ,-1534   ,-1141   ,-756    ,-362    ,-14     ,259     ,513     ,747     ,\n    991     ,1277    ,1578    ,1939    ,2294    ,2594    ,2918    ,3245    ,3558    ,3859    ,4147    ,4497    ,4862    ,5205    ,5558    ,\n    5859    ,6192    ,6463    ,6686    ,7151    ,7348    ,7213    ,7477    ,7614    ,7837    ,8550    ,7498    ,5281    ,5141    ,5734    ,\n    5495    ,5749    ,6087    ,6139    ,6482    ,6660    ,6823    ,7210    ,7474    ,7754    ,8098    ,8457    ,8856    ,9200    ,9518    ,\n    9782    ,9992    ,10174   ,10269   ,10317   ,10337   ,10385   ,10519   ,10633   ,10737   ,10903   ,11017   ,11171   ,11358   ,11491   ,\n    11643   ,11658   ,11999   ,12594   ,12735   ,12863   ,13093   ,13216   ,13376   ,13538   ,13691   ,13810   ,13906   ,14029   ,14197   ,\n    14403   ,14538   ,14579   ,14598   ,14628   ,14763   ,15010   ,15209   ,15373   ,15579   ,15760   ,15902   ,16028   ,16129   ,16256   ,\n    16417   ,16550   ,16708   ,16875   ,16996   ,17175   ,17311   ,17274   ,17289   ,17442   ,17592   ,17780   ,18005   ,18203   ,18504   ,\n    18897   ,19211   ,19427   ,19589   ,19733   ,19887   ,20066   ,20268   ,20402   ,20455   ,20529   ,20635   ,20732   ,20887   ,21104   ,\n    21348   ,21604   ,21775   ,21929   ,22106   ,22230   ,22386   ,22554   ,22729   ,22979   ,23151   ,23184   ,23221   ,23312   ,23378   ,\n    23508   ,23727   ,23888   ,23953   ,23848   ,23791   ,23778   ,23993   ,24679   ,24799   ,25163   ,26025   ,25699   ,26347   ,26884   ,\n    25906   ,27412   ,27225   ,26304   ,29557   ,24294   ,25783   ,32767   ,10125   ,-22538  ,-22946  ,-17475  ,-22891  ,-22086  ,-20218  ,\n    -21325  ,-20354  ,-18300  ,-20029  ,-28148  ,-32767  ,-30811  ,-30781  ,-31493  ,-30409  ,-30426  ,-30071  ,-28942  ,-28900  ,-28492  ,\n    -28029  ,-27932  ,-27377  ,-27082  ,-26781  ,-26327  ,-26176  ,-25899  ,-25523  ,-25327  ,-25102  ,-24773  ,-24418  ,-24098  ,-23819  ,\n    -23451  ,-23026  ,-22678  ,-22313  ,-21893  ,-21518  ,-21124  ,-20716  ,-20374  ,-19969  ,-19526  ,-19137  ,-18684  ,-18206  ,-17812  ,\n    -17417  ,-17090  ,-16665  ,-15876  ,-15153  ,-14710  ,-14243  ,-13821  ,-13445  ,-12824  ,-12111  ,-11565  ,-11099  ,-10797  ,-10685  ,\n    -10491  ,-10247  ,-10117  ,-9953   ,-9710   ,-9527   ,-9315   ,-9054   ,-8847   ,-8598   ,-8349   ,-8214   ,-8055   ,-7805   ,-7560   ,\n    -7318   ,-7053   ,-6768   ,-6444   ,-6056   ,-5661   ,-5385   ,-5154   ,-4904   ,-4643   ,-4200   ,-3621   ,-3186   ,-2952   ,-2716   ,\n    -2412   ,-2189   ,-1994   ,-1733   ,-1462   ,-1200   ,-925    ,-638    ,-376    ,-80     ,185     ,467     ,892     ,1122    ,1417    ,\n    1867    ,1985    ,2477    ,2813    ,2835    ,3864    ,3688    ,3670    ,6180    ,4938    ,2388    ,4289    ,1216    ,-5921   ,-6165   ,\n    -4805   ,-5892   ,-5189   ,-4620   ,-4676   ,-3996   ,-4031   ,-3987   ,-3633   ,-3701   ,-3455   ,-3158   ,-2938   ,-2481   ,-2113   ,\n    -1695   ,-1174   ,-824    ,-664    ,-646    ,-740    ,-891    ,-918    ,-750    ,-558    ,-373    ,-128    ,48      ,301     ,529     ,\n    669     ,865     ,770     ,1441    ,2641    ,2857    ,3031    ,3388    ,3570    ,3855    ,4104    ,4367    ,4598    ,4786    ,5014    ,\n    5324    ,5689    ,5875    ,5880    ,5804    ,5749    ,6010    ,6449    ,6761    ,7171    ,7680    ,8021    ,8284    ,8507    ,8624    ,\n    8794    ,8985    ,9037    ,9141    ,9350    ,9509    ,9754    ,9989    ,9984    ,10002   ,10159   ,10304   ,10551   ,10860   ,11116   ,\n    11449   ,11848   ,12198   ,12459   ,12645   ,12841   ,13036   ,13250   ,13513   ,13697   ,13769   ,13811   ,13913   ,14090   ,14272   ,\n    14430   ,14647   ,14918   ,15124   ,15309   ,15463   ,15558   ,15718   ,15922   ,16165   ,16491   ,16731   ,16759   ,16767   ,16895   ,\n    16991   ,17161   ,17464   ,17611   ,17619   ,17527   ,17397   ,17559   ,18032   ,18518   ,19276   ,19499   ,14245   ,3794    ,-1864   ,\n    -1764   ,-2315   ,-2383   ,-2656   ,-3366   ,-2121   ,2373    ,2737    ,5682    ,-4800   ,-19178  ,-18717  ,-15952  ,-17815  ,-16818  ,\n    -16129  ,-16620  ,-15711  ,-15619  ,-15597  ,-15076  ,-15216  ,-14955  ,-14498  ,-14307  ,-13960  ,-13675  ,-12976  ,-12060  ,-11736  ,\n    -11574  ,-11325  ,-11132  ,-10904  ,-10739  ,-10594  ,-10245  ,-9640   ,-9056   ,-8801   ,-8703   ,-8657   ,-8572   ,-7992   ,-7283   ,\n    -7042   ,-6848   ,-6502   ,-6268   ,-6108   ,-5884   ,-5585   ,-5281   ,-5021   ,-4761   ,-4416   ,-4059   ,-3686   ,-3215   ,-2774   ,\n    -2424   ,-2204   ,-2112   ,-1832   ,-1326   ,-893    ,-551    ,-424    ,-473    ,-282    ,-200    ,-395    ,-178    ,249     ,461     ,\n    722     ,1070    ,1498    ,1913    ,2174    ,2570    ,3023    ,3267    ,3804    ,4083    ,4336    ,4860    ,4533    ,5467    ,4688    ,\n    5292    ,6112    ,4249    ,10651   ,-3720   ,-30373  ,-28461  ,-28198  ,-32767  ,-29317  ,-31474  ,-31761  ,-30304  ,-32301  ,-30391  ,\n    -30176  ,-31166  ,-27636  ,-32563  ,-19688  ,8591    ,10467   ,8565    ,11605   ,10360   ,11842   ,11227   ,11480   ,12331   ,11127   ,\n    11652   ,11408   ,10171   ,11585   ,10324   ,9181    ,11664   ,7489    ,9771    ,22512   ,14192   ,-3763   ,-2075   ,971     ,-2981   ,\n    -1564   ,-793    ,-2380   ,-703    ,-680    ,-2588   ,1978    ,10217   ,11923   ,10262   ,11247   ,11661   ,11425   ,12130   ,12224   ,\n    12480   ,13132   ,13336   ,13596   ,13727   ,13777   ,13875   ,13645   ,13598   ,13776   ,13870   ,14129   ,14356   ,14474   ,14731   ,\n    14995   ,15136   ,15193   ,15241   ,15382   ,15591   ,15816   ,16023   ,16126   ,16149   ,16192   ,16284   ,16497   ,16880   ,17260   ,\n    17605   ,18002   ,18248   ,18524   ,19071   ,19354   ,19471   ,19994   ,20502   ,20910   ,21652   ,22363   ,22830   ,23281   ,23604   ,\n    23821   ,24075   ,24195   ,24079   ,23918   ,23950   ,24222   ,24674   ,25129   ,25444   ,25739   ,26011   ,26190   ,26400   ,26631   ,\n    26799   ,26920   ,27039   ,27148   ,27159   ,27095   ,27062   ,27135   ,27396   ,27703   ,27885   ,27980   ,28033   ,28146   ,28219   ,\n    28093   ,28007   ,28139   ,28349   ,28530   ,28655   ,28619   ,28484   ,28472   ,28558   ,28684   ,28882   ,29104   ,29245   ,29341   ,\n    29478   ,29559   ,29708   ,29989   ,30198   ,30454   ,30595   ,30721   ,31169   ,31498   ,31959   ,32767   ,32619   ,28759   ,20909   ,\n    16963   ,18696   ,17818   ,19201   ,20247   ,18268   ,22812   ,10617   ,11744   ,15354   ,8216    ,-189    ,-19457  ,-32767  ,-27776  ,\n    -30176  ,-32243  ,-30032  ,-31438  ,-31136  ,-30524  ,-31164  ,-30686  ,-30558  ,-30759  ,-30429  ,-30470  ,-30326  ,-30304  ,-29683  ,\n    -30199  ,-29221  ,-23545  ,-21545  ,-22387  ,-21782  ,-21902  ,-21633  ,-21300  ,-21054  ,-20638  ,-20564  ,-20576  ,-20751  ,-20762  ,\n    -20539  ,-20381  ,-20253  ,-20069  ,-19905  ,-19766  ,-19654  ,-19668  ,-19717  ,-19748  ,-19798  ,-19817  ,-19827  ,-19924  ,-20154  ,\n    -20402  ,-20558  ,-20691  ,-20812  ,-20811  ,-20773  ,-20801  ,-20783  ,-20756  ,-20813  ,-20875  ,-20939  ,-21015  ,-20997  ,-20899  ,\n    -20833  ,-20741  ,-20541  ,-20396  ,-20398  ,-20382  ,-20296  ,-20148  ,-19922  ,-19670  ,-19508  ,-19569  ,-19640  ,-19558  ,-19551  ,\n    -19603  ,-19577  ,-19542  ,-19499  ,-19425  ,-19351  ,-19320  ,-19417  ,-19557  ,-19551  ,-19453  ,-19310  ,-19131  ,-18900  ,-18584  ,\n    -18282  ,-18015  ,-17876  ,-17840  ,-17763  ,-17686  ,-17626  ,-17552  ,-17350  ,-17060  ,-16886  ,-16823  ,-16691  ,-16570  ,-16690  ,\n    -16862  ,-17018  ,-17320  ,-17492  ,-17570  ,-17721  ,-17738  ,-17856  ,-17742  ,-17533  ,-17835  ,-17522  ,-17434  ,-17813  ,-17620  ,\n    -18147  ,-18525  ,-18076  ,-12999  ,-3005   ,-2255   ,-7304   ,3832    ,22149   ,24879   ,21483   ,23708   ,24122   ,23255   ,24276   ,\n    23924   ,23585   ,23888   ,23536   ,23622   ,23768   ,23775   ,23739   ,23136   ,22983   ,23207   ,23057   ,23088   ,23154   ,23130   ,\n    23424   ,23730   ,23769   ,23718   ,23669   ,23614   ,23607   ,23642   ,23659   ,23567   ,23359   ,23203   ,23111   ,23121   ,23287   ,\n    23406   ,23589   ,23868   ,23905   ,24169   ,24890   ,25247   ,25313   ,25556   ,25720   ,25855   ,26040   ,26109   ,26190   ,26259   ,\n    26247   ,26288   ,26306   ,26219   ,26066   ,25840   ,25693   ,25758   ,25933   ,26083   ,26181   ,26290   ,26422   ,26521   ,26549   ,\n    26534   ,26515   ,26483   ,26485   ,26472   ,26344   ,26179   ,26032   ,25964   ,26032   ,26102   ,26107   ,26081   ,26073   ,26095   ,\n    26011   ,25818   ,25591   ,25466   ,25515   ,25534   ,25515   ,25465   ,25329   ,25225   ,25155   ,25098   ,25111   ,25174   ,25181   ,\n    25201   ,25247   ,25227   ,25267   ,25198   ,25232   ,25428   ,25270   ,25543   ,25682   ,25328   ,25987   ,25635   ,25351   ,26553   ,\n    25209   ,25913   ,27064   ,24330   ,27463   ,27283   ,24830   ,32767   ,19740   ,-3608   ,-13875  ,-12751  ,-16606  ,-25914  ,-28548  ,\n    -27571  ,-28703  ,-28324  ,-28563  ,-28734  ,-28329  ,-28713  ,-28585  ,-28536  ,-28701  ,-28611  ,-28681  ,-28684  ,-28693  ,-28716  ,\n    -28669  ,-28813  ,-28425  ,-27136  ,-25802  ,-27963  ,-31833  ,-31994  ,-31556  ,-31877  ,-31549  ,-31574  ,-31560  ,-31583  ,-31639  ,\n    -31605  ,-31609  ,-31518  ,-31447  ,-31361  ,-31249  ,-31196  ,-31178  ,-31190  ,-31264  ,-31390  ,-31513  ,-31575  ,-31589  ,-31615  ,\n    -31671  ,-31737  ,-31780  ,-31811  ,-31837  ,-31821  ,-31807  ,-31826  ,-31845  ,-31881  ,-31925  ,-31967  ,-32014  ,-32057  ,-32108  ,\n    -32205  ,-32391  ,-32579  ,-32677  ,-32750  ,-32767  ,-32706  ,-32637  ,-32543  ,-32464  ,-32391  ,-32233  ,-32087  ,-32038  ,-32060  ,\n    -32109  ,-32081  ,-31960  ,-31850  ,-31770  ,-31701  ,-31684  ,-31644  ,-31573  ,-31562  ,-31513  ,-31531  ,-31577  ,-31459  ,-31388  ,\n    -31363  ,-31288  ,-31250  ,-31219  ,-31143  ,-31041  ,-30996  ,-30957  ,-30906  ,-30872  ,-30824  ,-30783  ,-30707  ,-30749  ,-30726  ,\n    -30551  ,-30691  ,-30537  ,-30403  ,-30679  ,-30240  ,-30380  ,-30620  ,-29937  ,-30390  ,-30293  ,-29671  ,-30380  ,-29844  ,-29256  ,\n    -30959  ,-29971  ,-30465  ,-29164  ,-107    ,31996   ,30729   ,27372   ,32767   ,30629   ,30540   ,31862   ,30268   ,30917   ,31012   ,\n    30178   ,30687   ,30391   ,30102   ,30341   ,30001   ,29948   ,29957   ,29724   ,29703   ,29610   ,29458   ,29367   ,29260   ,29174   ,\n    29085   ,29008   ,28940   ,28870   ,28820   ,28725   ,28592   ,28499   ,28403   ,28284   ,28188   ,28098   ,27995   ,27885   ,27782   ,\n    27688   ,27585   ,27480   ,27353   ,27194   ,27067   ,26933   ,26756   ,26591   ,26426   ,26272   ,26127   ,25961   ,25820   ,25695   ,\n    25564   ,25454   ,25329   ,25162   ,24986   ,24823   ,24698   ,24590   ,24445   ,24310   ,24225   ,24146   ,24044   ,23950   ,23903   ,\n    23830   ,23697   ,23559   ,23435   ,23343   ,23254   ,23151   ,23064   ,22959   ,22845   ,22749   ,22623   ,22471   ,22354   ,22253   ,\n    22150   ,22061   ,21967   ,21821   ,21696   ,21653   ,21560   ,21434   ,21363   ,21248   ,21080   ,20911   ,20718   ,20555   ,20501   ,\n    20507   ,20509   ,20456   ,20306   ,20136   ,19993   ,19845   ,19671   ,19559   ,19448   ,19251   ,19194   ,18938   ,18702   ,18745   ,\n    18269   ,18440   ,18245   ,17680   ,18468   ,17851   ,18839   ,20143   ,15194   ,3811    ,-14285  ,-21156  ,-17479  ,-18702  ,-19805  ,\n    -18676  ,-19608  ,-19561  ,-19346  ,-20011  ,-19899  ,-20013  ,-20368  ,-20324  ,-20555  ,-20740  ,-20729  ,-20807  ,-20842  ,-20957  ,\n    -21105  ,-21277  ,-21355  ,-21498  ,-21636  ,-21579  ,-22317  ,-23776  ,-24279  ,-23568  ,-25755  ,-29411  ,-29514  ,-29390  ,-29946  ,\n    -29753  ,-29863  ,-29867  ,-29875  ,-29940  ,-29949  ,-29973  ,-29992  ,-30093  ,-30140  ,-30127  ,-30110  ,-30079  ,-30054  ,-30003  ,\n    -29919  ,-29868  ,-29804  ,-29665  ,-29536  ,-29415  ,-29275  ,-29285  ,-29362  ,-29243  ,-29066  ,-29054  ,-29099  ,-29072  ,-29059  ,\n    -29062  ,-29044  ,-29063  ,-29052  ,-29009  ,-29031  ,-29070  ,-29102  ,-29162  ,-29240  ,-29335  ,-29388  ,-29389  ,-29398  ,-29421  ,\n    -29435  ,-29403  ,-29382  ,-29400  ,-29422  ,-29454  ,-29481  ,-29508  ,-29550  ,-29587  ,-29611  ,-29685  ,-29774  ,-29794  ,-29790  ,\n    -29806  ,-29850  ,-29896  ,-29918  ,-29943  ,-29978  ,-29997  ,-30024  ,-30077  ,-30111  ,-30143  ,-30170  ,-30186  ,-30277  ,-30335  ,\n    -30342  ,-30412  ,-30355  ,-30374  ,-30475  ,-30341  ,-30533  ,-30552  ,-30358  ,-30768  ,-30554  ,-30486  ,-31057  ,-30506  ,-30560  ,\n    -31757  ,-30957  ,-32767  ,-32523  ,-8535   ,23411   ,32240   ,30996   ,32732   ,32565   ,32578   ,32767   ,32124   ,32263   ,32100   ,\n    31694   ,31724   ,31446   ,31235   ,31177   ,30916   ,30746   ,30605   ,30401   ,30235   ,30058   ,29863   ,29680   ,29513   ,29341   ,\n    29165   ,29006   ,28844   ,28684   ,28514   ,28322   ,28136   ,27956   ,27775   ,27604   ,27451   ,27296   ,27126   ,26913   ,26687   ,\n    26502   ,26310   ,26108   ,25924   ,25744   ,25548   ,25360   ,25179   ,24967   ,24764   ,24576   ,24372   ,24151   ,23895   ,23643   ,\n    23423   ,23214   ,22996   ,22736   ,22453   ,22196   ,21992   ,21816   ,21620   ,21417   ,21226   ,21074   ,20965   ,20801   ,20588   ,\n    20421   ,20256   ,20076   ,19890   ,19690   ,19540   ,19372   ,19141   ,18947   ,18758   ,18571   ,18419   ,18245   ,18079   ,17950   ,\n    17807   ,17663   ,17517   ,17313   ,17150   ,17048   ,16891   ,16664   ,16422   ,16246   ,16097   ,15892   ,15689   ,15500   ,15299   ,\n    15171   ,15135   ,15097   ,14981   ,14736   ,14488   ,14311   ,14006   ,13675   ,13412   ,13063   ,12833   ,12510   ,12130   ,12049   ,\n    11622   ,11497   ,11466   ,10990   ,11480   ,11259   ,11616   ,12535   ,7392    ,-679    ,-6589   ,-9468   ,-10230  ,-10160  ,-10584  ,\n    -10713  ,-10741  ,-10923  ,-11042  ,-11173  ,-11405  ,-11613  ,-11803  ,-12044  ,-12253  ,-12383  ,-12452  ,-12578  ,-12836  ,-13126  ,\n    -13353  ,-13532  ,-13679  ,-13824  ,-14033  ,-14174  ,-14404  ,-14556  ,-14734  ,-15010  ,-14903  ,-15812  ,-16876  ,-17180  ,-17190  ,\n    -17398  ,-20350  ,-22436  ,-21964  ,-22231  ,-22324  ,-22341  ,-22544  ,-22552  ,-22697  ,-22733  ,-22754  ,-22754  ,-22718  ,-22720  ,\n    -22728  ,-22752  ,-22798  ,-22833  ,-22866  ,-22921  ,-22989  ,-23097  ,-23204  ,-23214  ,-23159  ,-23183  ,-23297  ,-23391  ,-23469  ,\n    -23592  ,-23731  ,-23844  ,-23941  ,-24048  ,-24157  ,-24201  ,-24214  ,-24215  ,-24223  ,-24329  ,-24440  ,-24528  ,-24683  ,-24846  ,\n    -24995  ,-25177  ,-25338  ,-25403  ,-25469  ,-25599  ,-25673  ,-25722  ,-25806  ,-25899  ,-26011  ,-26084  ,-26227  ,-26387  ,-26391  ,\n    -26462  ,-26612  ,-26719  ,-26832  ,-26933  ,-27031  ,-27128  ,-27224  ,-27312  ,-27405  ,-27488  ,-27582  ,-27724  ,-27809  ,-27964  ,\n    -28056  ,-28053  ,-28362  ,-28298  ,-28312  ,-28769  ,-28324  ,-28720  ,-29093  ,-28315  ,-29398  ,-29210  ,-28463  ,-30110  ,-29116  ,\n    -28302  ,-30961  ,-29001  ,-30344  ,-32767  ,-1907   ,32767   ,28117   ,23832   ,30541   ,27340   ,27243   ,28833   ,26597   ,27406   ,\n    27394   ,26212   ,26838   ,26301   ,25828   ,26072   ,25503   ,25334   ,25246   ,24831   ,24713   ,24496   ,24203   ,24008   ,23773   ,\n    23534   ,23298   ,23088   ,22888   ,22680   ,22460   ,22195   ,21944   ,21741   ,21540   ,21333   ,21128   ,20901   ,20634   ,20372   ,\n    20166   ,19969   ,19753   ,19536   ,19308   ,19071   ,18835   ,18600   ,18358   ,18120   ,17897   ,17653   ,17401   ,17156   ,16903   ,\n    16665   ,16439   ,16184   ,15893   ,15582   ,15279   ,15025   ,14801   ,14535   ,14237   ,13985   ,13768   ,13545   ,13332   ,13107   ,\n    12891   ,12714   ,12503   ,12271   ,12056   ,11832   ,11628   ,11414   ,11138   ,10866   ,10614   ,10360   ,10134   ,9931    ,9759    ,\n    9596    ,9417    ,9239    ,9032    ,8817    ,8630    ,8442    ,8197    ,7906    ,7655    ,7437    ,7207    ,6943    ,6655    ,6443    ,\n    6297    ,6132    ,5950    ,5788    ,5597    ,5382    ,5227    ,4978    ,4682    ,4400    ,3950    ,3631    ,3317    ,2846    ,2786    ,\n    2539    ,2143    ,2278    ,1790    ,1675    ,1943    ,1284    ,1804    ,971     ,-2442   ,-4185   ,-2982   ,-3095   ,-3189   ,-3627   ,\n    -3676   ,-3796   ,-3970   ,-4008   ,-4070   ,-4138   ,-4363   ,-4619   ,-4800   ,-5031   ,-5309   ,-5522   ,-5674   ,-5894   ,-6141   ,\n    -6333   ,-6636   ,-7044   ,-7335   ,-7536   ,-7762   ,-7929   ,-8037   ,-8184   ,-8369   ,-8514   ,-8635   ,-8891   ,-8994   ,-9204   ,\n    -9400   ,-9491   ,-10763  ,-11542  ,-11571  ,-11888  ,-11700  ,-13571  ,-15813  ,-15784  ,-15978  ,-16251  ,-16289  ,-16400  ,-16306  ,\n    -16400  ,-16521  ,-16638  ,-16795  ,-16918  ,-17056  ,-17194  ,-17335  ,-17508  ,-17674  ,-17791  ,-17868  ,-17929  ,-18051  ,-18250  ,\n    -18426  ,-18585  ,-18776  ,-18954  ,-19133  ,-19332  ,-19502  ,-19652  ,-19802  ,-19974  ,-20176  ,-20367  ,-20557  ,-20758  ,-20967  ,\n    -21194  ,-21411  ,-21612  ,-21825  ,-22043  ,-22200  ,-22348  ,-22548  ,-22734  ,-22921  ,-23104  ,-23268  ,-23381  ,-23534  ,-23819  ,\n    -23971  ,-24089  ,-24347  ,-24578  ,-24784  ,-24990  ,-25203  ,-25391  ,-25570  ,-25766  ,-25933  ,-26113  ,-26274  ,-26454  ,-26610  ,\n    -26756  ,-26973  ,-27023  ,-27241  ,-27413  ,-27316  ,-27771  ,-27648  ,-27614  ,-28354  ,-27751  ,-28287  ,-28922  ,-27851  ,-29131  ,\n    -29286  ,-27704  ,-29877  ,-29659  ,-28773  ,-32767  ,-14381  ,19703   ,22836   ,14558   ,19814   ,18692   ,15740   ,18155   ,16116   ,\n    15525   ,24948   ,32767   ,31226   ,30235   ,31377   ,30518   ,30250   ,30277   ,29614   ,29544   ,29281   ,28792   ,28676   ,28283   ,\n    27932   ,27742   ,27338   ,27052   ,26797   ,26469   ,26213   ,25946   ,25702   ,25462   ,25192   ,24937   ,24667   ,24393   ,24099   ,\n    23784   ,23493   ,23199   ,22923   ,22700   ,22480   ,22260   ,22065   ,21866   ,21656   ,21482   ,21318   ,21118   ,20910   ,20701   ,\n    20490   ,20303   ,20140   ,19972   ,19778   ,19574   ,19362   ,19157   ,18922   ,18619   ,18353   ,18167   ,18024   ,17900   ,17730   ,\n    17583   ,17485   ,17428   ,17127   ,15201   ,11677   ,9508    ,9483    ,9350    ,8828    ,8679    ,8428    ,8091    ,7897    ,7606    ,\n    7328    ,7102    ,6826    ,6597    ,6370    ,6126    ,5914    ,5686    ,5471    ,5264    ,5051    ,4837    ,4558    ,4214    ,3897    ,\n    3708    ,3640    ,3568    ,3390    ,3113    ,2861    ,2609    ,2308    ,2068    ,1769    ,1509    ,1199    ,881     ,712     ,-3      ,\n    -317    ,-180    ,-717    ,-815    ,-860    ,-1396   ,-1749   ,-2024   ,-2292   ,-2761   ,-3147   ,-3196   ,-7745   ,-7755   ,-7840   ,\n    -7995   ,-8163   ,-8379   ,-8589   ,-8762   ,-8945   ,-9078   ,-9160   ,-9234   ,-9249   ,-9303   ,-9539   ,-9810   ,-10006  ,-10193  ,\n    -10302  ,-10379  ,-10613  ,-10919  ,-11137  ,-11309  ,-11427  ,-11580  ,-11734  ,-11671  ,-11565  ,-11450  ,-11623  ,-11722  ,-11746  ,\n    -13019  ,-14068  ,-14046  ,-14302  ,-14456  ,-14639  ,-14825  ,-14774  ,-15576  ,-16450  ,-16545  ,-16733  ,-16958  ,-17115  ,-17329  ,\n    -17472  ,-17634  ,-17790  ,-17925  ,-18070  ,-18224  ,-18381  ,-18561  ,-18810  ,-19098  ,-19350  ,-19515  ,-19613  ,-19720  ,-19871  ,\n    -20068  ,-20298  ,-20507  ,-20678  ,-20823  ,-20967  ,-21149  ,-21348  ,-21578  ,-21774  ,-21807  ,-21788  ,-21873  ,-21988  ,-22078  ,\n    -22215  ,-22345  ,-22456  ,-22615  ,-22730  ,-22848  ,-23074  ,-23292  ,-23486  ,-23703  ,-23917  ,-24155  ,-24401  ,-24642  ,-24902  ,\n    -25109  ,-25248  ,-25403  ,-25529  ,-25636  ,-25755  ,-25831  ,-25954  ,-26138  ,-26394  ,-26620  ,-26698  ,-26861  ,-27104  ,-27300  ,\n    -27473  ,-27670  ,-27847  ,-27918  ,-27968  ,-28048  ,-28152  ,-28226  ,-28320  ,-28470  ,-28526  ,-28691  ,-28798  ,-28789  ,-29102  ,\n    -29035  ,-29068  ,-29540  ,-29130  ,-29536  ,-29876  ,-29154  ,-30198  ,-29957  ,-29318  ,-30881  ,-29813  ,-29155  ,-31585  ,-29693  ,\n    -31187  ,-32767  ,-4841   ,23462   ,17718   ,15081   ,20669   ,17299   ,17850   ,18697   ,16682   ,17952   ,17136   ,16234   ,16843   ,\n    15888   ,22311   ,32410   ,32767   ,30763   ,32147   ,31603   ,30967   ,31261   ,30599   ,30381   ,30316   ,29794   ,29667   ,29438   ,\n    29042   ,28878   ,28597   ,28304   ,28110   ,27899   ,27758   ,27613   ,27447   ,27310   ,27155   ,27020   ,26895   ,26746   ,26607   ,\n    26470   ,26319   ,26176   ,26082   ,25986   ,25831   ,25678   ,25532   ,25384   ,25213   ,25002   ,24846   ,24740   ,24644   ,24544   ,\n    24406   ,24338   ,24266   ,24245   ,24039   ,22017   ,18351   ,16126   ,16025   ,16004   ,15486   ,15230   ,15238   ,14606   ,14365   ,\n    14656   ,13693   ,14345   ,14379   ,9270    ,1386    ,-2516   ,24      ,-4740   ,-10092  ,-6259   ,-7968   ,-9418   ,-7701   ,-9341   ,\n    -8962   ,-8713   ,-9167   ,-8372   ,-8789   ,-9242   ,-9147   ,-9648   ,-9908   ,-10040  ,-10536  ,-10698  ,-10859  ,-11092  ,-11035  ,\n    -11512  ,-11787  ,-11655  ,-12104  ,-12158  ,-12105  ,-12486  ,-12658  ,-12956  ,-13176  ,-13111  ,-13198  ,-13157  ,-18904  ,-19204  ,\n    -19715  ,-19834  ,-19905  ,-20274  ,-20491  ,-20682  ,-20897  ,-20902  ,-21009  ,-20893  ,-21125  ,-21066  ,-21149  ,-21712  ,-18803  ,\n    -16264  ,-16992  ,-17025  ,-17227  ,-17572  ,-17605  ,-17941  ,-17972  ,-18091  ,-18333  ,-18477  ,-18624  ,-18726  ,-18875  ,-18937  ,\n    -18975  ,-19488  ,-19936  ,-20055  ,-20245  ,-20297  ,-20311  ,-20359  ,-20380  ,-20484  ,-20521  ,-20599  ,-20925  ,-21242  ,-21424  ,\n    -21633  ,-21799  ,-21878  ,-21985  ,-22093  ,-22183  ,-22324  ,-22504  ,-22689  ,-22839  ,-22936  ,-23001  ,-23028  ,-23083  ,-23190  ,\n    -23283  ,-23390  ,-23481  ,-23486  ,-23495  ,-23580  ,-23682  ,-23780  ,-23890  ,-23985  ,-24078  ,-24188  ,-24278  ,-24332  ,-24370  ,\n    -24461  ,-24587  ,-24695  ,-24823  ,-24944  ,-25056  ,-25177  ,-25284  ,-25404  ,-25538  ,-25668  ,-25753  ,-25810  ,-25871  ,-25993  ,\n    -26215  ,-26394  ,-26514  ,-26654  ,-26741  ,-26791  ,-26920  ,-27066  ,-27164  ,-27274  ,-27388  ,-27504  ,-27611  ,-27713  ,-27841  ,\n    -27929  ,-27955  ,-27984  ,-28040  ,-28097  ,-28178  ,-28270  ,-28340  ,-28416  ,-28535  ,-28677  ,-28710  ,-28729  ,-28826  ,-28891  ,\n    -28937  ,-28980  ,-29034  ,-29121  ,-29200  ,-29257  ,-29321  ,-29391  ,-29442  ,-29525  ,-29577  ,-29640  ,-29747  ,-29744  ,-29913  ,\n    -30029  ,-29952  ,-30270  ,-30204  ,-30164  ,-30627  ,-30197  ,-30508  ,-30973  ,-30170  ,-31074  ,-31183  ,-29969  ,-31904  ,-31703  ,\n    -31563  ,-32767  ,-11457  ,19729   ,22505   ,16506   ,21085   ,20320   ,19207   ,24892   ,29997   ,32767   ,32649   ,31670   ,32334   ,\n    32015   ,31485   ,31720   ,31285   ,31078   ,31031   ,30693   ,30636   ,30487   ,30277   ,30182   ,29993   ,29871   ,29742   ,29574   ,\n    29457   ,29276   ,29112   ,28974   ,28814   ,28701   ,28560   ,28402   ,28280   ,28134   ,27985   ,27860   ,27733   ,27599   ,27491   ,\n    27372   ,27232   ,27144   ,26997   ,26870   ,26798   ,26554   ,26408   ,26230   ,25909   ,25886   ,25614   ,25326   ,25437   ,24673   ,\n    24588   ,24982   ,23753   ,25089   ,24732   ,18773   ,10302   ,4342    ,8840    ,3278    ,-4179   ,4254    ,-2968   ,-12594  ,-15687  ,\n    -24841  ,-23287  ,-22507  ,-25255  ,-22919  ,-23973  ,-24529  ,-23654  ,-24619  ,-24508  ,-24338  ,-24929  ,-24787  ,-24799  ,-24940  ,\n    -24681  ,-24694  ,-24726  ,-24574  ,-24532  ,-24499  ,-24429  ,-24425  ,-24453  ,-24562  ,-24712  ,-24715  ,-24686  ,-24647  ,-27577  ,\n    -27754  ,-28015  ,-27990  ,-27952  ,-28063  ,-28059  ,-28094  ,-28164  ,-28193  ,-28390  ,-28423  ,-28524  ,-28431  ,-28407  ,-28689  ,\n    -27226  ,-25887  ,-26252  ,-26255  ,-26238  ,-26426  ,-26511  ,-26835  ,-26780  ,-26820  ,-27062  ,-25777  ,-24643  ,-24861  ,-24731  ,\n    -24640  ,-24690  ,-24616  ,-24661  ,-24757  ,-25013  ,-25223  ,-25326  ,-25385  ,-25399  ,-25450  ,-25474  ,-25514  ,-25716  ,-25963  ,\n    -26120  ,-26292  ,-26487  ,-26591  ,-26612  ,-26611  ,-26647  ,-26745  ,-26858  ,-26953  ,-27024  ,-27066  ,-27093  ,-27131  ,-27184  ,\n    -27263  ,-27335  ,-27395  ,-27473  ,-27508  ,-27538  ,-27618  ,-27676  ,-27732  ,-27791  ,-27845  ,-27899  ,-27919  ,-27928  ,-27927  ,\n    -27918  ,-27930  ,-27948  ,-27969  ,-27994  ,-28021  ,-28080  ,-28154  ,-28223  ,-28304  ,-28386  ,-28448  ,-28491  ,-28528  ,-28581  ,\n    -28662  ,-28752  ,-28810  ,-28863  ,-28930  ,-28974  ,-28982  ,-28992  ,-29030  ,-29088  ,-29137  ,-29177  ,-29253  ,-29367  ,-29486  ,\n    -29563  ,-29568  ,-29586  ,-29620  ,-29590  ,-29558  ,-29566  ,-29578  ,-29594  ,-29618  ,-29645  ,-29678  ,-29691  ,-29696  ,-29737  ,\n    -29772  ,-29782  ,-29805  ,-29855  ,-29877  ,-29859  ,-29873  ,-29876  ,-29857  ,-29873  ,-29877  ,-29865  ,-29876  ,-29893  ,-29899  ,\n    -29899  ,-29922  ,-29952  ,-30006  ,-30072  ,-30088  ,-30095  ,-30121  ,-30162  ,-30206  ,-30247  ,-30261  ,-30250  ,-30297  ,-30346  ,\n    -30337  ,-30414  ,-30407  ,-30392  ,-30497  ,-30415  ,-30863  ,-31553  ,-32767  ,-30766  ,-11623  ,18966   ,32767   ,29697   ,29864   ,\n    31969   ,30820   ,30951   ,31190   ,30479   ,30705   ,30514   ,30163   ,30267   ,29965   ,29813   ,29783   ,29524   ,29426   ,29306   ,\n    29113   ,29002   ,28822   ,28665   ,28562   ,28399   ,28304   ,28184   ,27993   ,27885   ,27757   ,27605   ,27490   ,27365   ,27222   ,\n    27081   ,26924   ,26741   ,26613   ,26481   ,26370   ,26272   ,26119   ,26070   ,25903   ,25751   ,25746   ,25425   ,25432   ,25412   ,\n    24875   ,25177   ,24913   ,24294   ,25291   ,24122   ,24014   ,25591   ,22840   ,25487   ,22472   ,13781   ,16722   ,6663    ,-7655   ,\n    -17160  ,-30539  ,-28739  ,-27909  ,-31854  ,-29303  ,-30449  ,-30840  ,-29747  ,-30657  ,-30327  ,-30069  ,-30522  ,-30304  ,-30298  ,\n    -30378  ,-29693  ,-28545  ,-27571  ,-27285  ,-27123  ,-26808  ,-26703  ,-26611  ,-26482  ,-26438  ,-26408  ,-26293  ,-26124  ,-26149  ,\n    -25992  ,-26048  ,-26036  ,-25717  ,-25514  ,-25405  ,-24965  ,-25868  ,-27970  ,-28486  ,-28135  ,-28413  ,-28422  ,-28309  ,-28406  ,\n    -28426  ,-28478  ,-28424  ,-28451  ,-28382  ,-28199  ,-28417  ,-28239  ,-28290  ,-28535  ,-27787  ,-28743  ,-31252  ,-31518  ,-30119  ,\n    -29511  ,-29657  ,-29732  ,-29667  ,-29571  ,-29612  ,-29747  ,-29881  ,-29985  ,-29990  ,-29991  ,-29989  ,-29994  ,-30004  ,-30030  ,\n    -30140  ,-30242  ,-30327  ,-30453  ,-30540  ,-30539  ,-30508  ,-30521  ,-30580  ,-30637  ,-30674  ,-30719  ,-30763  ,-30797  ,-30845  ,\n    -30883  ,-30915  ,-30954  ,-30976  ,-31016  ,-31061  ,-31089  ,-31119  ,-31139  ,-31178  ,-31221  ,-31260  ,-31296  ,-31237  ,-31038  ,\n    -30792  ,-30668  ,-30689  ,-30756  ,-30793  ,-30800  ,-30799  ,-30749  ,-30711  ,-30703  ,-30653  ,-30632  ,-30626  ,-30577  ,-30552  ,\n    -30530  ,-30493  ,-30491  ,-30451  ,-30393  ,-30526  ,-30780  ,-30880  ,-30849  ,-30850  ,-30876  ,-30871  ,-30847  ,-30821  ,-30814  ,\n    -30828  ,-30819  ,-30791  ,-30769  ,-30747  ,-30718  ,-30690  ,-30685  ,-30690  ,-30707  ,-30722  ,-30736  ,-30748  ,-30735  ,-30773  ,\n    -30803  ,-30753  ,-30717  ,-30703  ,-30692  ,-30680  ,-30666  ,-30651  ,-30626  ,-30622  ,-30619  ,-30597  ,-30584  ,-30582  ,-30555  ,\n    -30530  ,-30571  ,-30494  ,-30452  ,-30516  ,-30333  ,-30407  ,-30425  ,-30140  ,-30435  ,-30240  ,-30089  ,-30541  ,-29999  ,-30034  ,\n    -30461  ,-29611  ,-29982  ,-30877  ,-29803  ,-32767  ,-28526  ,637     ,27135   ,30927   ,31270   ,32621   ,32108   ,32767   ,32529   ,\n    32145   ,32474   ,32106   ,31973   ,32034   ,31728   ,31686   ,31631   ,31468   ,31447   ,31340   ,31224   ,31186   ,30980   ,30525   ,\n    30128   ,30026   ,29985   ,29652   ,29223   ,28999   ,28816   ,28629   ,28499   ,28360   ,28211   ,28074   ,27931   ,27789   ,27660   ,\n    27471   ,27243   ,26968   ,26653   ,26482   ,26401   ,26334   ,26287   ,26175   ,26091   ,26002   ,25918   ,25914   ,25760   ,25720   ,\n    25744   ,25409   ,25512   ,25542   ,25292   ,25851   ,25379   ,25384   ,26239   ,26165   ,26734   ,18051   ,-1132   ,-13195  ,-14502  ,\n    -15560  ,-20726  ,-24110  ,-24199  ,-24329  ,-24441  ,-24557  ,-24428  ,-24406  ,-24428  ,-24234  ,-24279  ,-24070  ,-23919  ,-23997  ,\n    -23822  ,-23796  ,-22809  ,-19973  ,-18063  ,-18196  ,-19467  ,-22455  ,-24913  ,-24802  ,-24717  ,-25257  ,-25228  ,-25294  ,-25436  ,\n    -25606  ,-24377  ,-24694  ,-24878  ,-24823  ,-24819  ,-24932  ,-24760  ,-25881  ,-28090  ,-28552  ,-28055  ,-28232  ,-28244  ,-28180  ,\n    -28271  ,-28252  ,-28266  ,-28186  ,-28200  ,-28108  ,-27986  ,-28201  ,-27861  ,-27775  ,-28105  ,-27215  ,-28153  ,-31697  ,-32767  ,\n    -31585  ,-30981  ,-31211  ,-31974  ,-30134  ,-25529  ,-24410  ,-24920  ,-23850  ,-27447  ,-31476  ,-30828  ,-30747  ,-30995  ,-30689  ,\n    -30780  ,-30720  ,-30646  ,-30609  ,-30575  ,-30494  ,-30458  ,-30402  ,-30327  ,-30315  ,-30267  ,-30218  ,-30180  ,-30139  ,-30109  ,\n    -30066  ,-30006  ,-29952  ,-29890  ,-29819  ,-29782  ,-29713  ,-29668  ,-29638  ,-29528  ,-29546  ,-29513  ,-29394  ,-29487  ,-29325  ,\n    -29200  ,-29369  ,-29078  ,-29285  ,-29140  ,-26105  ,-23420  ,-23801  ,-24009  ,-23483  ,-23725  ,-23724  ,-23482  ,-23459  ,-23200  ,\n    -23102  ,-23245  ,-23289  ,-23377  ,-23378  ,-23281  ,-23339  ,-23374  ,-23295  ,-23171  ,-23302  ,-24900  ,-27585  ,-28778  ,-28431  ,\n    -28442  ,-28618  ,-28479  ,-28498  ,-28496  ,-28383  ,-28380  ,-28312  ,-28224  ,-28213  ,-28159  ,-28116  ,-28076  ,-28008  ,-27977  ,\n    -27936  ,-27896  ,-27855  ,-27783  ,-27766  ,-27745  ,-27682  ,-27627  ,-27556  ,-27505  ,-27465  ,-27410  ,-27348  ,-27304  ,-27277  ,\n    -27202  ,-27137  ,-27107  ,-27072  ,-27046  ,-27017  ,-27033  ,-27012  ,-26950  ,-26982  ,-26892  ,-26878  ,-26966  ,-26770  ,-26894  ,\n    -26918  ,-26637  ,-26975  ,-26713  ,-26484  ,-27030  ,-26347  ,-26447  ,-27547  ,-26569  ,-28559  ,-28611  ,-8285   ,20389   ,31626   ,\n    31502   ,32083   ,32604   ,32767   ,32708   ,32488   ,32569   ,32443   ,32272   ,32239   ,31848   ,31480   ,31356   ,30992   ,30740   ,\n    30600   ,30254   ,30368   ,29852   ,27025   ,23900   ,22744   ,22634   ,22415   ,22163   ,21974   ,21778   ,21592   ,21399   ,21237   ,\n    21070   ,20810   ,20555   ,20351   ,20195   ,20041   ,19911   ,19887   ,19818   ,19817   ,19835   ,19669   ,19706   ,19636   ,19391   ,\n    19548   ,19363   ,19254   ,19636   ,19154   ,19472   ,20066   ,16629   ,12581   ,12511   ,13345   ,12505   ,12349   ,13351   ,12636   ,\n    13466   ,9791    ,-4317   ,-13095  ,-13680  ,-14040  ,-14245  ,-14572  ,-14384  ,-14395  ,-14283  ,-14503  ,-14112  ,-11268  ,-10173  ,\n    -10870  ,-10276  ,-10097  ,-10216  ,-9731   ,-9702   ,-9580   ,-11599  ,-17389  ,-21143  ,-20539  ,-19928  ,-20535  ,-20049  ,-19055  ,\n    -19426  ,-18191  ,-15995  ,-19167  ,-21004  ,-26520  ,-32767  ,-31888  ,-31318  ,-32488  ,-31970  ,-31999  ,-32200  ,-31864  ,-31981  ,\n    -31987  ,-31776  ,-31863  ,-31795  ,-31678  ,-31725  ,-31623  ,-31577  ,-31631  ,-31502  ,-31503  ,-31525  ,-31325  ,-31426  ,-31362  ,\n    -31117  ,-31375  ,-31207  ,-31163  ,-31868  ,-29929  ,-25032  ,-23812  ,-24433  ,-23152  ,-27054  ,-31345  ,-30406  ,-30692  ,-30848  ,\n    -30477  ,-31590  ,-29165  ,-23117  ,-20007  ,-19904  ,-19328  ,-19069  ,-19044  ,-18633  ,-18666  ,-18449  ,-18020  ,-18051  ,-17601  ,\n    -17317  ,-17514  ,-16870  ,-16941  ,-17154  ,-16134  ,-16717  ,-16220  ,-14461  ,-21403  ,-31076  ,-30767  ,-29883  ,-31101  ,-30794  ,\n    -31306  ,-24493  ,-17976  ,-19195  ,-19193  ,-18738  ,-18064  ,-16806  ,-16665  ,-16909  ,-16914  ,-16817  ,-17447  ,-16912  ,-16560  ,\n    -17292  ,-15438  ,-16775  ,-24880  ,-28514  ,-26526  ,-27064  ,-27741  ,-26991  ,-27321  ,-27232  ,-26996  ,-27835  ,-28625  ,-28984  ,\n    -28964  ,-28817  ,-28900  ,-28878  ,-28794  ,-28818  ,-28789  ,-28770  ,-28761  ,-28722  ,-28713  ,-28695  ,-28690  ,-28696  ,-28681  ,\n    -28689  ,-28690  ,-28649  ,-28600  ,-28574  ,-28554  ,-28537  ,-28554  ,-28552  ,-28517  ,-28505  ,-28506  ,-28489  ,-28512  ,-28555  ,\n    -28533  ,-28523  ,-28488  ,-28442  ,-28457  ,-28349  ,-28338  ,-28345  ,-28128  ,-28240  ,-28213  ,-27999  ,-28328  ,-28009  ,-27818  ,\n    -28613  ,-28242  ,-29779  ,-31490  ,-17463  ,11496   ,30517   ,32157   ,31139   ,32581   ,32767   ,32497   ,32536   ,32432   ,32332   ,\n    32129   ,32253   ,32043   ,31812   ,32199   ,31533   ,31632   ,32279   ,31078   ,32655   ,32217   ,22029   ,15040   ,17074   ,16983   ,\n    15530   ,16321   ,15877   ,15517   ,15898   ,15484   ,15421   ,15437   ,15152   ,15110   ,14803   ,14464   ,14425   ,14243   ,14083   ,\n    14076   ,13905   ,13807   ,13808   ,13535   ,13543   ,13536   ,13166   ,13587   ,13407   ,11637   ,10578   ,10516   ,10709   ,10526   ,\n    10046   ,10577   ,10012   ,9535    ,11040   ,9752    ,10510   ,13012   ,2052    ,-11154  ,-10045  ,-8529   ,-10763  ,-10021  ,-10677  ,\n    -9386   ,-5133   ,-4994   ,-5844   ,-5118   ,-5137   ,-5301   ,-5248   ,-4913   ,-5298   ,-5399   ,-4726   ,-6510   ,-4487   ,3910    ,\n    6705    ,5042    ,6178    ,6405    ,6886    ,7046    ,2420    ,-530    ,582     ,346     ,-245    ,-104    ,-369    ,-954    ,-809    ,\n    -41     ,-805    ,272     ,1019    ,-3338   ,-6096   ,-12843  ,-20089  ,-18499  ,-17500  ,-21717  ,-27834  ,-32511  ,-32748  ,-32074  ,\n    -32767  ,-32716  ,-32453  ,-32664  ,-32478  ,-32412  ,-32482  ,-32315  ,-32313  ,-32306  ,-32218  ,-32222  ,-32163  ,-32103  ,-32060  ,\n    -32004  ,-31962  ,-31886  ,-31878  ,-31808  ,-31747  ,-31798  ,-31609  ,-31595  ,-31634  ,-31358  ,-31556  ,-31430  ,-31137  ,-31638  ,\n    -31209  ,-31309  ,-32363  ,-29554  ,-24351  ,-21810  ,-21449  ,-22975  ,-20638  ,-10738  ,-10751  ,-20928  ,-22581  ,-21705  ,-23555  ,\n    -22941  ,-23059  ,-23753  ,-23198  ,-23658  ,-24021  ,-23526  ,-24203  ,-24138  ,-23507  ,-26744  ,-30659  ,-30475  ,-30075  ,-30396  ,\n    -30177  ,-30323  ,-27996  ,-25715  ,-26129  ,-26175  ,-26159  ,-26449  ,-26345  ,-26102  ,-26073  ,-26046  ,-26047  ,-26247  ,-26129  ,\n    -26183  ,-26233  ,-25619  ,-26137  ,-28667  ,-29950  ,-29255  ,-29348  ,-29623  ,-29315  ,-29394  ,-29385  ,-29240  ,-29294  ,-29243  ,\n    -29206  ,-29195  ,-29089  ,-29048  ,-29025  ,-28955  ,-28924  ,-28896  ,-28846  ,-28808  ,-28765  ,-28720  ,-28686  ,-28652  ,-28606  ,\n    -28583  ,-28598  ,-28550  ,-28483  ,-28474  ,-28383  ,-28322  ,-28306  ,-28195  ,-28237  ,-28181  ,-28042  ,-28208  ,-27991  ,-27882  ,\n    -28174  ,-27650  ,-27824  ,-28433  ,-28011  ,-30540  ,-29625  ,-10180  ,17923   ,31000   ,30453   ,30381   ,31655   ,31529   ,31414   ,\n    31395   ,31339   ,31201   ,31054   ,31233   ,30812   ,30834   ,31110   ,30251   ,30917   ,31083   ,30086   ,32767   ,29445   ,15712   ,\n    8989    ,10722   ,9546    ,8617    ,9376    ,8715    ,8835    ,9094    ,8521    ,8574    ,8473    ,8211    ,8316    ,8213    ,8155    ,\n    8210    ,8107    ,8068    ,8077    ,7995    ,7926    ,7856    ,7708    ,7517    ,7279    ,7194    ,7199    ,7062    ,7082    ,7052    ,\n    6898    ,7065    ,6903    ,6663    ,6814    ,6364    ,6350    ,6644    ,5936    ,6780    ,6643    ,1268    ,-2565   ,-1632   ,-1751   ,\n    -2566   ,-2060   ,-2171   ,-2410   ,-2130   ,-2340   ,-2567   ,-2363   ,-2845   ,-2468   ,1555    ,4051    ,2104    ,2818    ,3179    ,\n    143     ,6309    ,17354   ,18128   ,16140   ,17734   ,17600   ,17340   ,17741   ,17563   ,17717   ,17526   ,17848   ,17750   ,17465   ,\n    18822   ,16715   ,12358   ,11493   ,11481   ,12811   ,11685   ,1892    ,-4435   ,-2229   ,-2474   ,-3808   ,-2757   ,-3212   ,-3507   ,\n    -2918   ,-3510   ,-3413   ,-2904   ,-356    ,343     ,-1834   ,-9971   ,-15352  ,-14060  ,-14014  ,-18895  ,-26093  ,-31188  ,-31368  ,\n    -30614  ,-31356  ,-31234  ,-30984  ,-31274  ,-31060  ,-31018  ,-31102  ,-30923  ,-30931  ,-30912  ,-30834  ,-30833  ,-30763  ,-30710  ,\n    -30684  ,-30771  ,-30843  ,-30821  ,-30939  ,-30859  ,-30875  ,-30951  ,-30537  ,-30582  ,-30528  ,-30180  ,-30537  ,-30366  ,-30259  ,\n    -30594  ,-30250  ,-30350  ,-30453  ,-30059  ,-30434  ,-30615  ,-30200  ,-31706  ,-29080  ,-16186  ,-9273   ,-14714  ,-16911  ,-15628  ,\n    -16149  ,-15994  ,-15553  ,-15592  ,-15385  ,-14992  ,-15059  ,-14829  ,-14387  ,-14693  ,-14238  ,-13855  ,-14429  ,-13354  ,-13254  ,\n    -13699  ,-11351  ,-16786  ,-29666  ,-32767  ,-29988  ,-31602  ,-32084  ,-31311  ,-32094  ,-31805  ,-31602  ,-31962  ,-31659  ,-31720  ,\n    -31866  ,-31734  ,-31775  ,-31755  ,-31715  ,-31738  ,-31683  ,-31627  ,-31597  ,-31564  ,-31543  ,-31512  ,-31466  ,-31376  ,-31292  ,\n    -31249  ,-31188  ,-31119  ,-31053  ,-30976  ,-30896  ,-30814  ,-30734  ,-30679  ,-30640  ,-30596  ,-30547  ,-30454  ,-30336  ,-30269  ,\n    -30148  ,-29983  ,-29925  ,-29755  ,-29583  ,-29604  ,-29405  ,-29215  ,-29186  ,-28859  ,-28731  ,-28637  ,-28092  ,-28198  ,-28279  ,\n    -28399  ,-30653  ,-26553  ,-5388   ,19828   ,29047   ,27395   ,28134   ,29578   ,29027   ,29401   ,29742   ,29367   ,29861   ,29749   ,\n    29473   ,30166   ,29631   ,29710   ,30481   ,29295   ,30275   ,30939   ,29286   ,32767   ,29193   ,11432   ,3724    ,7986    ,6750    ,\n    5257    ,6540    ,5515    ,5654    ,6296    ,5674    ,6058    ,6211    ,5963    ,6226    ,6078    ,5958    ,6073    ,6064    ,6265    ,\n    6449    ,6452    ,6465    ,6485    ,6503    ,6317    ,6016    ,5887    ,5751    ,5610    ,5541    ,5427    ,5378    ,5367    ,5291    ,\n    5262    ,5250    ,5175    ,5111    ,4983    ,4760    ,4625    ,4429    ,4125    ,3967    ,3750    ,3554    ,3474    ,3146    ,3068    ,\n    2929    ,2459    ,2677    ,2350    ,1880    ,2436    ,1479    ,1199    ,1648    ,-829    ,4379    ,19032   ,24504   ,21637   ,22676   ,\n    23380   ,22134   ,22586   ,22234   ,21645   ,21982   ,21358   ,21307   ,21641   ,20954   ,21357   ,21336   ,20466   ,21535   ,21100   ,\n    20998   ,23055   ,14638   ,121     ,-2296   ,252     ,-1628   ,-1761   ,-1163   ,-1927   ,-1433   ,-1422   ,-1763   ,-1257   ,-1493   ,\n    -1494   ,-1124   ,-1524   ,-1036   ,-501    ,2177    ,1334    ,-7551   ,-22420  ,-28156  ,-26097  ,-26512  ,-27066  ,-26227  ,-26417  ,\n    -26195  ,-25753  ,-25813  ,-25484  ,-25421  ,-25605  ,-25435  ,-25449  ,-25538  ,-25432  ,-25397  ,-25399  ,-25373  ,-25322  ,-25268  ,\n    -25274  ,-25371  ,-25565  ,-25670  ,-25783  ,-25908  ,-25839  ,-25962  ,-25910  ,-25630  ,-25786  ,-25485  ,-25479  ,-25845  ,-25342  ,\n    -26139  ,-25960  ,-25950  ,-27817  ,-23283  ,-18112  ,-16760  ,-18459  ,-27596  ,-31033  ,-27903  ,-27437  ,-19821  ,-7855   ,-4952   ,\n    -5801   ,-4945   ,-5823   ,-5994   ,-5754   ,-6733   ,-6556   ,-6783   ,-7573   ,-7164   ,-7846   ,-8433   ,-7586   ,-8896   ,-8522   ,\n    -6902   ,-14197  ,-23351  ,-25488  ,-28613  ,-31606  ,-30426  ,-30897  ,-31779  ,-31155  ,-31765  ,-32007  ,-31782  ,-32263  ,-32271  ,\n    -32325  ,-32617  ,-32527  ,-32603  ,-32738  ,-32714  ,-32731  ,-32716  ,-32750  ,-32767  ,-32752  ,-32747  ,-32626  ,-32507  ,-32436  ,\n    -32311  ,-32167  ,-32047  ,-31906  ,-31732  ,-31545  ,-31341  ,-31156  ,-30951  ,-30692  ,-30416  ,-30170  ,-29925  ,-29506  ,-29197  ,\n    -28912  ,-28256  ,-28040  ,-27744  ,-26974  ,-26948  ,-26256  ,-25690  ,-26122  ,-24617  ,-24486  ,-24920  ,-22326  ,-23824  ,-23720  ,\n    -20699  ,-27254  ,-18170  ,15120   ,27457   ,20725   ,24588   ,26878   ,24776   ,26955   ,26925   ,26581   ,27812   ,27663   ,27996   ,\n    28431   ,28922   ,29091   ,29264   ,30495   ,29929   ,31337   ,32767   ,22911   ,12423   ,13236   ,14203   ,12496   ,13430   ,13806   ,\n    13727   ,14447   ,14253   ,14332   ,14697   ,14481   ,14542   ,14583   ,14475   ,14561   ,14493   ,14429   ,14532   ,14633   ,14695   ,\n    14654   ,14537   ,14409   ,14231   ,14004   ,13795   ,13585   ,13352   ,13126   ,12903   ,12652   ,12344   ,12049   ,11834   ,11637   ,\n    11420   ,11169   ,10828   ,10428   ,10045   ,9616    ,9145    ,8655    ,8162    ,7813    ,7395    ,6870    ,6491    ,5980    ,5572    ,\n    5228    ,4562    ,4382    ,3991    ,3241    ,3422    ,2641    ,1901    ,2419    ,200     ,941     ,10043   ,16126   ,15504   ,15948   ,\n    16387   ,15497   ,15811   ,15738   ,15282   ,15535   ,14896   ,14347   ,14529   ,13785   ,13820   ,14221   ,13210   ,13889   ,14193   ,\n    13165   ,15799   ,13006   ,674     ,-4338   ,-1465   ,-2433   ,-3387   ,-2389   ,-3032   ,-2897   ,-2419   ,-2895   ,-2410   ,-2188   ,\n    -2455   ,-1824   ,-1859   ,-1817   ,-688    ,-1149   ,996     ,-3713   ,-12607  ,-18334  ,-17212  ,-16437  ,-17112  ,-16295  ,-15822  ,\n    -15711  ,-15086  ,-14905  ,-14686  ,-14253  ,-14177  ,-14057  ,-13900  ,-13904  ,-13781  ,-13597  ,-13547  ,-13526  ,-13439  ,-13370  ,\n    -13324  ,-13346  ,-13504  ,-13582  ,-13649  ,-13819  ,-13825  ,-13832  ,-13854  ,-13808  ,-14028  ,-14115  ,-14191  ,-14686  ,-14765  ,\n    -15033  ,-15994  ,-15748  ,-16878  ,-16540  ,-8066   ,-2184   ,-1554   ,-3445   ,-12427  ,-15735  ,-13457  ,-16235  ,-13643  ,-5029   ,\n    -2529   ,-3594   ,-3518   ,-4351   ,-4849   ,-5149   ,-6075   ,-6412   ,-6880   ,-7694   ,-8047   ,-8706   ,-9419   ,-9471   ,-10223  ,\n    -10498  ,-11179  ,-17672  ,-25505  ,-26905  ,-26382  ,-27753  ,-28265  ,-28528  ,-29237  ,-29467  ,-29929  ,-30398  ,-30558  ,-30938  ,\n    -31266  ,-31528  ,-31850  ,-31972  ,-32110  ,-32378  ,-32482  ,-32478  ,-32554  ,-32692  ,-32767  ,-32726  ,-32680  ,-32586  ,-32383  ,\n    -32226  ,-32064  ,-31787  ,-31552  ,-31355  ,-31011  ,-30605  ,-30301  ,-29988  ,-29563  ,-29068  ,-28515  ,-28004  ,-27472  ,-26872  ,\n    -26348  ,-25682  ,-24918  ,-24150  ,-23291  ,-22660  ,-21760  ,-20731  ,-20276  ,-19270  ,-18361  ,-17823  ,-16187  ,-15860  ,-15476  ,\n    -13695  ,-15517  ,-11581  ,5358    ,16969   ,17454   ,18833   ,20303   ,20386   ,21911   ,22644   ,23162   ,24387   ,24875   ,25599   ,\n    26633   ,27193   ,27925   ,28747   ,29375   ,30155   ,30938   ,31736   ,32767   ,32093   ,27895   ,23444   ,22538   ,23378   ,23550   ,\n    23827   ,24389   ,24603   ,24865   ,25140   ,25193   ,25460   ,25815   ,25903   ,25899   ,25903   ,25825   ,25689   ,25606   ,25603   ,\n    25555   ,25389   ,25200   ,25014   ,24623   ,23958   ,23371   ,23040   ,22677   ,22269   ,21897   ,21414   ,20953   ,20549   ,20041   ,\n    19616   ,19332   ,18881   ,18174   ,17441   ,16775   ,16014   ,15175   ,14418   ,13728   ,12999   ,12235   ,11452   ,10642   ,9923    ,\n    9137    ,8284    ,7727    ,7040    ,6206    ,5726    ,4918    ,4199    ,3963    ,2904    ,2245    ,2186    ,1398    ,3872    ,8975    ,\n    9714    ,8215    ,8582    ,8372    ,7688    ,7558    ,7035    ,6540    ,6132    ,5729    ,5427    ,5296    ,5519    ,5133    ,5094    ,\n    5754    ,5219    ,5536    ,5110    ,-490    ,-4720   ,-3532   ,-3233   ,-4061   ,-3472   ,-3430   ,-3504   ,-2963   ,-2947   ,-2675   ,\n    -2108   ,-2139   ,-1701   ,-1096   ,-1115   ,-32     ,6       ,-3071   ,-8018   ,-8722   ,-8223   ,-8193   ,-7663   ,-7226   ,-6814   ,\n    -6227   ,-5854   ,-5448   ,-5094   ,-4835   ,-4436   ,-4117   ,-3839   ,-3518   ,-3335   ,-3090   ,-2772   ,-2739   ,-2762   ,-2595   ,\n    -2549   ,-2624   ,-2703   ,-2901   ,-3059   ,-3076   ,-3146   ,-3350   ,-3412   ,-3288   ,-3399   ,-3618   ,-3699   ,-4122   ,-4469   ,\n    -4555   ,-5331   ,-5701   ,-6004   ,-6884   ,-4815   ,-1558   ,-1172   ,-1694   ,-2456   ,-3035   ,-2252   ,-2208   ,-2838   ,-2626   ,\n    -2920   ,-3768   ,-4254   ,-4993   ,-5801   ,-6507   ,-7418   ,-8118   ,-8792   ,-9711   ,-10536  ,-11322  ,-12170  ,-12876  ,-13595  ,\n    -14352  ,-15123  ,-17224  ,-20879  ,-23473  ,-24222  ,-24911  ,-25811  ,-26433  ,-27065  ,-27756  ,-28375  ,-28926  ,-29406  ,-29855  ,\n    -30313  ,-30802  ,-31215  ,-31455  ,-31702  ,-32046  ,-32242  ,-32295  ,-32427  ,-32611  ,-32765  ,-32767  ,-32676  ,-32614  ,-32419  ,\n    -32159  ,-31938  ,-31607  ,-31271  ,-31007  ,-30557  ,-30003  ,-29595  ,-29165  ,-28592  ,-27930  ,-27169  ,-26412  ,-25697  ,-24934  ,\n    -24124  ,-23231  ,-22309  ,-21356  ,-20262  ,-19231  ,-18132  ,-16820  ,-15734  ,-14637  ,-13393  ,-12253  ,-10930  ,-9923   ,-8950   ,\n    -7476   ,-6900   ,-4897   ,1536    ,7632    ,9827    ,10976   ,12197   ,13154   ,14402   ,15581   ,16708   ,17956   ,18953   ,19998   ,\n    21232   ,22276   ,23226   ,24322   ,25373   ,26334   ,27450   ,28431   ,29100   ,29601   ,29223   ,28187   ,28212   ,29046   ,29476   ,\n    30011   ,30704   ,31004   ,31371   ,31744   ,31807   ,32096   ,32570   ,32728   ,32718   ,32767   ,32713   ,32482   ,32325   ,32272   ,\n    32163   ,32008   ,31720   ,31460   ,31317   ,30712   ,29875   ,29450   ,28962   ,28206   ,27587   ,26903   ,26033   ,25352   ,24739   ,\n    23856   ,22992   ,22324   ,21456   ,20451   ,19728   ,18984   ,17841   ,16685   ,15792   ,14878   ,13841   ,12903   ,12089   ,11144   ,\n    10045   ,9211    ,8629    ,7736    ,6770    ,6117    ,5234    ,4262    ,3809    ,3307    ,2346    ,1604    ,1688    ,2500    ,3048    ,\n    2610    ,1984    ,1766    ,1490    ,1054    ,626     ,153     ,-255    ,-623    ,-1118   ,-1484   ,-1636   ,-1825   ,-2038   ,-2251   ,\n    -2306   ,-2047   ,-2230   ,-3434   ,-4640   ,-4855   ,-4609   ,-4504   ,-4372   ,-4271   ,-4240   ,-4038   ,-3720   ,-3467   ,-3382   ,\n    -3093   ,-2540   ,-2371   ,-1980   ,-1299   ,-1332   ,-671    ,83      ,-2832   ,-4834   ,-4178   ,-3623   ,-3854   ,-3514   ,-3082   ,\n    -2717   ,-2342   ,-2008   ,-1575   ,-1445   ,-1342   ,-881    ,-634    ,-485    ,-106    ,95      ,174     ,383     ,435     ,388     ,\n    527     ,572     ,434     ,332     ,103     ,-118    ,-36     ,-99     ,-440    ,-544    ,-573    ,-946    ,-1463   ,-1759   ,-1986   ,\n    -2450   ,-2728   ,-2901   ,-3623   ,-4111   ,-4079   ,-4550   ,-5180   ,-5403   ,-5628   ,-6680   ,-7011   ,-5942   ,-5978   ,-5174   ,\n    -4212   ,-5538   ,-6026   ,-6052   ,-7067   ,-7919   ,-8472   ,-9363   ,-10409  ,-10705  ,-11152  ,-12464  ,-13388  ,-13773  ,-14698  ,\n    -15682  ,-15825  ,-16359  ,-18276  ,-20002  ,-20735  ,-21690  ,-22632  ,-22893  ,-23607  ,-24802  ,-25466  ,-26220  ,-27316  ,-27854  ,\n    -28077  ,-28738  ,-29649  ,-30164  ,-30240  ,-30640  ,-31357  ,-31636  ,-31807  ,-32221  ,-32410  ,-32521  ,-32707  ,-32737  ,-32767  ,\n    -32707  ,-32477  ,-32394  ,-32327  ,-32009  ,-31660  ,-31379  ,-30822  ,-30145  ,-29977  ,-29718  ,-28596  ,-27655  ,-27176  ,-26067  ,\n    -25001  ,-24726  ,-24071  ,-22526  ,-21134  ,-20683  ,-20036  ,-18083  ,-16479  ,-15696  ,-13838  ,-12061  ,-11740  ,-10596  ,-8388   ,\n    -7102   ,-5953   ,-3827   ,-2017   ,-687    ,1894    ,4685    ,5721    ,6922    ,9244    ,10384   ,10694   ,12288   ,14518   ,15522   ,\n    15650   ,17048   ,19199   ,20039   ,21070   ,23125   ,23868   ,23953   ,25364   ,26646   ,26966   ,27790   ,28779   ,28866   ,29048   ,\n    30004   ,30830   ,31225   ,31763   ,32247   ,32155   ,32057   ,32471   ,32767   ,32655   ,32581   ,32488   ,32141   ,31790   ,31537   ,\n    31281   ,31156   ,30931   ,30315   ,29833   ,29429   ,28394   ,27516   ,27461   ,26911   ,25679   ,25042   ,24368   ,22927   ,22157   ,\n    22225   ,21331   ,19836   ,19326   ,18668   ,17046   ,16452   ,16550   ,15092   ,13463   ,13059   ,12008   ,10468   ,10204   ,10078   ,\n    8713    ,7232    ,7042    ,7245    ,6115    ,4865    ,4697    ,3768    ,2444    ,2776    ,3062    ,1893    ,1216    ,1234    ,415     ,\n    -418    ,-302    ,-448    ,-1161   ,-1380   ,-1455   ,-2015   ,-2343   ,-2234   ,-2363   ,-2754   ,-2935   ,-2882   ,-2925   ,-3184   ,\n    -3420   ,-3293   ,-3023   ,-2913   ,-2689   ,-2373   ,-2210   ,-2085   ,-1939   ,-1819   ,-1921   ,-2223   ,-2152   ,-1870   ,-2058   ,\n    -2162   ,-1700   ,-1554   ,-1724   ,-1366   ,-1018   ,-1083   ,-866    ,-651    ,-2122   ,-2307   ,-2205   ,-2120   ,-2306   ,-2771   ,\n    -2912   ,-3020   ,-3569   ,-3789   ,-3809   ,-4353   ,-4830   ,-4863   ,-5072   ,-5428   ,-5545   ,-5698   ,-6038   ,-6248   ,-6394   ,\n    -6600   ,-6652   ,-6864   ,-6944   ,-7020   ,-7237   ,-7236   ,-7738   ,-6343   ,-3938   ,-4042   ,-4399   ,-4895   ,-5883   ,-6046   ,\n    -6319   ,-6818   ,-7069   ,-7304   ,-7902   ,-8524   ,-8814   ,-9056   ,-9350   ,-9604   ,-9570   ,-10118  ,-10370  ,-10110  ,-10635  ,\n    -8589   ,-6397   ,-7471   ,-7634   ,-7201   ,-7858   ,-8614   ,-8837   ,-9028   ,-9866   ,-10069  ,-9974   ,-10967  ,-11828  ,-11829  ,\n    -12271  ,-12920  ,-12996  ,-13465  ,-14383  ,-14928  ,-15514  ,-16374  ,-17117  ,-17796  ,-18480  ,-19135  ,-20008  ,-21120  ,-22080  ,\n    -22836  ,-23549  ,-24132  ,-24835  ,-25681  ,-26183  ,-26757  ,-27777  ,-28504  ,-28881  ,-29489  ,-30084  ,-30455  ,-30954  ,-31532  ,\n    -31845  ,-31956  ,-32154  ,-32444  ,-32656  ,-32751  ,-32767  ,-32729  ,-32528  ,-32209  ,-32134  ,-32023  ,-31427  ,-30901  ,-30508  ,\n    -29721  ,-28936  ,-28379  ,-27720  ,-26798  ,-25676  ,-24930  ,-24344  ,-22845  ,-21090  ,-20192  ,-19121  ,-17335  ,-16193  ,-15325  ,\n    -13290  ,-11293  ,-10308  ,-8930   ,-7025   ,-5479   ,-4144   ,-2744   ,-831    ,1429    ,3154    ,4900    ,6846    ,7984    ,9266    ,\n    11413   ,12906   ,14095   ,16284   ,18009   ,18579   ,19877   ,21763   ,22757   ,23836   ,25578   ,26591   ,27059   ,27990   ,29011   ,\n    29686   ,30053   ,30562   ,31412   ,31825   ,32000   ,32606   ,32767   ,32395   ,32472   ,32556   ,32181   ,31936   ,31809   ,31398   ,\n    30921   ,30488   ,29860   ,29175   ,28548   ,27844   ,27156   ,26382   ,25369   ,24525   ,23811   ,22667   ,21440   ,20651   ,19929   ,\n    18970   ,17967   ,17178   ,16430   ,15295   ,14269   ,13761   ,12895   ,11750   ,11356   ,10997   ,9823    ,8921    ,8468    ,7285    ,\n    6316    ,6678    ,6625    ,5507    ,5084    ,5037    ,4091    ,3641    ,4311    ,4170    ,3358    ,3459    ,3640    ,3244    ,3391    ,\n    4004    ,4105    ,3880    ,4096    ,4613    ,4576    ,4264    ,4626    ,5097    ,5101    ,5581    ,6447    ,6534    ,6247    ,6371    ,\n    6394    ,6238    ,6605    ,7090    ,6887    ,6534    ,6580    ,6614    ,6642    ,6826    ,6864    ,6858    ,6949    ,6790    ,6481    ,\n    6372    ,6153    ,5741    ,5514    ,5194    ,4519    ,4043    ,3777    ,3145    ,2435    ,1484    ,944     ,-139    ,-855    ,-929    ,\n    -1833   ,-3628   ,-5353   ,-7109   ,-8998   ,-10687  ,-12106  ,-13564  ,-15130  ,-16640  ,-18022  ,-19269  ,-20370  ,-21493  ,-22603  ,\n    -23660  ,-24653  ,-25286  ,-26198  ,-26520  ,-26912  ,-27327  ,-27163  ,-28928  ,-24761  ,-17035  ,-16932  ,-17529  ,-16783  ,-17392  ,\n    -16411  ,-14795  ,-14303  ,-14252  ,-13976  ,-13886  ,-13863  ,-13536  ,-13047  ,-12864  ,-12641  ,-12050  ,-11773  ,-11631  ,-11166  ,\n    -10882  ,-10658  ,-9906   ,-9286   ,-9247   ,-8911   ,-8271   ,-8197   ,-8065   ,-7172   ,-6644   ,-6797   ,-6572   ,-6214   ,-6279   ,\n    -6226   ,-5842   ,-5636   ,-5955   ,-6284   ,-6126   ,-6268   ,-6847   ,-6889   ,-7105   ,-8162   ,-8687   ,-8711   ,-9575   ,-10660  ,\n    -11286  ,-12197  ,-13274  ,-13915  ,-14595  ,-15740  ,-16826  ,-17598  ,-18688  ,-19991  ,-20817  ,-21716  ,-22994  ,-23859  ,-24638  ,\n    -25854  ,-26810  ,-27485  ,-28319  ,-29039  ,-29679  ,-30419  ,-30982  ,-31357  ,-31798  ,-32188  ,-32325  ,-32449  ,-32712  ,-32767  ,\n    -32559  ,-32484  ,-32269  ,-31513  ,-30870  ,-30551  ,-29832  ,-28918  ,-28333  ,-27462  ,-26021  ,-24881  ,-23976  ,-22355  ,-20655  ,\n    -19663  ,-18242  ,-16098  ,-14517  ,-13157  ,-10961  ,-8830   ,-7589   ,-6035   ,-3587   ,-1322   ,652     ,2943    ,5046    ,6525    ,\n    8214    ,10575   ,12549   ,13830   ,15682   ,17777   ,18923   ,20265   ,22357   ,23649   ,24476   ,26057   ,27493   ,28223   ,29082   ,\n    30104   ,30695   ,30972   ,31482   ,32152   ,32361   ,32365   ,32729   ,32767   ,32220   ,31944   ,31731   ,31031   ,30427   ,30029   ,\n    29258   ,28377   ,27666   ,26652   ,25443   ,24425   ,23357   ,22191   ,21042   ,19716   ,18384   ,17234   ,15866   ,14332   ,13027   ,\n    11717   ,10266   ,9104    ,8208    ,6994    ,5665    ,4755    ,3881    ,2833    ,2063    ,1536    ,808     ,26      ,-248    ,-221    ,\n    -583    ,-1114   ,-1128   ,-932    ,-1047   ,-905    ,-376    ,-249    ,-90     ,715     ,1315    ,1615    ,2459    ,3487    ,4181    ,\n    5018    ,6057    ,6756    ,7430    ,8690    ,9889    ,10425   ,11037   ,12149   ,13231   ,14114   ,15062   ,15932   ,16492   ,17040   ,\n    17795   ,18552   ,19203   ,19876   ,20550   ,20821   ,20695   ,20759   ,20929   ,20809   ,20613   ,20407   ,20078   ,19729   ,19220   ,\n    18451   ,17614   ,16672   ,15640   ,14714   ,13622   ,12234   ,10972   ,9637    ,7929    ,6366    ,5561    ,3909    ,2262    ,400     ,\n    -1074   ,-1529   ,-3131   ,-5810   ,-7673   ,-9753   ,-12289  ,-13995  ,-15242  ,-17124  ,-19170  ,-20723  ,-22304  ,-23871  ,-25026  ,\n    -26150  ,-27567  ,-28892  ,-29787  ,-30489  ,-31275  ,-31831  ,-32007  ,-32334  ,-32612  ,-32767  ,-32458  ,-32270  ,-32324  ,-31144  ,\n    -31401  ,-29636  ,-24918  ,-24907  ,-25420  ,-24166  ,-23921  ,-23184  ,-22609  ,-21993  ,-21113  ,-20192  ,-18985  ,-17914  ,-16925  ,\n    -15841  ,-14769  ,-13820  ,-12652  ,-11195  ,-10066  ,-9147   ,-7886   ,-6703   ,-5863   ,-4751   ,-3433   ,-2599   ,-2070   ,-1307   ,\n    -570    ,-151    ,274     ,751     ,964     ,1061    ,1239    ,1174    ,894     ,850     ,736     ,156     ,-425    ,-840    ,-1559   ,\n    -2566   ,-3570   ,-4585   ,-5578   ,-6609   ,-7905   ,-9331   ,-10598  ,-11821  ,-13240  ,-14646  ,-15894  ,-17323  ,-18868  ,-20114  ,\n    -21218  ,-22529  ,-23928  ,-25158  ,-26207  ,-27202  ,-28217  ,-29154  ,-29914  ,-30588  ,-31213  ,-31725  ,-32155  ,-32488  ,-32619  ,\n    -32604  ,-32538  ,-32372  ,-32068  ,-31660  ,-31105  ,-30365  ,-29533  ,-28600  ,-27562  ,-26434  ,-25018  ,-23486  ,-22076  ,-20441  ,\n    -18563  ,-16809  ,-14984  ,-12925  ,-10949  ,-8930   ,-6565   ,-4235   ,-2237   ,-107    ,2332    ,4577    ,6662    ,8936    ,11094   ,\n    12941   ,14896   ,16949   ,18615   ,20131   ,21869   ,23402   ,24624   ,26031   ,27478   ,28512   ,29311   ,30156   ,30964   ,31552   ,\n    31974   ,32481   ,32767   ,32588   ,32601   ,32754   ,32307   ,31678   ,31284   ,30510   ,29457   ,28708   ,27887   ,26786   ,25762   ,\n    24608   ,23126   ,21693   ,20385   ,18950   ,17489   ,16012   ,14375   ,12750   ,11150   ,9460    ,7775    ,6051    ,4406    ,3147    ,\n    1993    ,601     ,-721    ,-1750   ,-2636   ,-3470   ,-4281   ,-5029   ,-5665   ,-6125   ,-6320   ,-6389   ,-6472   ,-6553   ,-6435   ,\n    -5954   ,-5475   ,-5133   ,-4580   ,-3867   ,-3040   ,-1899   ,-675    ,388     ,1469    ,2783    ,4291    ,5784    ,7233    ,8710    ,\n    10215   ,11878   ,13560   ,14865   ,16058   ,17530   ,18976   ,20211   ,21360   ,22457   ,23582   ,24613   ,25607   ,26851   ,27898   ,\n    28521   ,29313   ,29954   ,29868   ,29841   ,30089   ,29881   ,29499   ,29138   ,28437   ,27694   ,26889   ,25665   ,24428   ,23233   ,\n    21684   ,20106   ,18651   ,17135   ,15726   ,14113   ,12147   ,10250   ,8250    ,5925    ,3934    ,2334    ,944     ,-598    ,-1967   ,\n    -5388   ,-7061   ,-6336   ,-8328   ,-11228  ,-11851  ,-13290  ,-16192  ,-16892  ,-16510  ,-18350  ,-20317  ,-20756  ,-22094  ,-24001  ,\n    -24173  ,-24105  ,-25283  ,-26052  ,-26204  ,-26839  ,-27397  ,-27575  ,-27746  ,-27741  ,-27683  ,-27711  ,-27123  ,-26771  ,-26746  ,\n    -25333  ,-24874  ,-24667  ,-24373  ,-26778  ,-27196  ,-26042  ,-26285  ,-25362  ,-23980  ,-22724  ,-21536  ,-20505  ,-18859  ,-17200  ,\n    -16076  ,-14802  ,-13069  ,-11674  ,-10463  ,-8694   ,-7168   ,-6359   ,-5267   ,-3768   ,-2646   ,-1729   ,-543    ,409     ,848     ,\n    1409    ,2161    ,2644    ,2956    ,3282    ,3448    ,3446    ,3353    ,3000    ,2598    ,2477    ,2089    ,1293    ,777     ,83      ,\n    -1311   ,-2253   ,-2654   ,-4021   ,-5767   ,-6700   ,-8205   ,-10385  ,-11297  ,-11968  ,-14049  ,-15917  ,-16919  ,-18654  ,-20611  ,\n    -21466  ,-22331  ,-24065  ,-25496  ,-26399  ,-27720  ,-28955  ,-29513  ,-30183  ,-31141  ,-31772  ,-32109  ,-32444  ,-32682  ,-32767  ,\n    -32709  ,-32329  ,-31914  ,-31832  ,-31383  ,-30302  ,-29509  ,-28659  ,-26927  ,-25534  ,-24994  ,-23510  ,-21133  ,-19634  ,-17943  ,\n    -14981  ,-13245  ,-12671  ,-10037  ,-6886   ,-5415   ,-2828   ,783     ,2337    ,3339    ,6168    ,9409    ,10922   ,11704   ,14313   ,\n    17292   ,18526   ,20438   ,23141   ,23818   ,24280   ,26480   ,28112   ,28748   ,30034   ,31170   ,31377   ,31710   ,32333   ,32709   ,\n    32767   ,32559   ,32473   ,32609   ,32359   ,31456   ,30600   ,30359   ,29754   ,28176   ,27001   ,26213   ,24426   ,22926   ,22691   ,\n    21432   ,18974   ,17644   ,16471   ,14024   ,12543   ,12323   ,10622   ,8226    ,7196    ,5771    ,3352    ,2461    ,2373    ,706     ,\n    -994    ,-1446   ,-2363   ,-3617   ,-3811   ,-3860   ,-4581   ,-5085   ,-5083   ,-5067   ,-5120   ,-5101   ,-4861   ,-4118   ,-3227   ,\n    -3029   ,-2847   ,-1686   ,-682    ,-114    ,1670    ,3411    ,3139    ,3568    ,6011    ,7102    ,7350    ,9754    ,11562   ,10973   ,\n    12068   ,14786   ,15589   ,16527   ,19085   ,20082   ,19736   ,20782   ,22605   ,23202   ,22711   ,23228   ,24748   ,25159   ,25340   ,\n    26404   ,26462   ,25809   ,26079   ,26136   ,25762   ,25550   ,24375   ,23228   ,23156   ,22134   ,20704   ,20083   ,18279   ,16187   ,\n    16018   ,15704   ,13437   ,11007   ,10517   ,10328   ,7793    ,5459    ,4853    ,2484    ,-259    ,-135    ,-378    ,-2372   ,-3441   ,\n    -4028   ,-5794   ,-6798   ,-6482   ,-7386   ,-9132   ,-9630   ,-10216  ,-11835  ,-12495  ,-12393  ,-13409  ,-14682  ,-15175  ,-15913  ,\n    -16932  ,-17330  ,-17561  ,-18148  ,-18690  ,-19162  ,-19713  ,-20183  ,-20679  ,-21087  ,-21062  ,-21056  ,-21458  ,-21551  ,-21228  ,\n    -21502  ,-21686  ,-20916  ,-20521  ,-20470  ,-19843  ,-18989  ,-19427  ,-21356  ,-21506  ,-19771  ,-18748  ,-18688  ,-18507  ,-16800  ,\n    -15109  ,-15062  ,-14507  ,-12670  ,-11486  ,-10740  ,-8906   ,-7486   ,-7413   ,-6660   ,-5227   ,-4482   ,-3754   ,-2687   ,-2051   ,\n    -1586   ,-879    ,-371    ,-66     ,321     ,590     ,681     ,751     ,613     ,241     ,88      ,-43     ,-633    ,-1018   ,-1180   ,\n    -2242   ,-3557   ,-4057   ,-4602   ,-5858   ,-7335   ,-8641   ,-9917   ,-11237  ,-12204  ,-13127  ,-14801  ,-16719  ,-18195  ,-19598  ,\n    -20955  ,-21998  ,-23150  ,-24647  ,-26033  ,-27141  ,-28208  ,-29156  ,-29896  ,-30605  ,-31372  ,-32070  ,-32493  ,-32682  ,-32767  ,\n    -32738  ,-32591  ,-32246  ,-31773  ,-31588  ,-31328  ,-30181  ,-28893  ,-28032  ,-26449  ,-24577  ,-23725  ,-22705  ,-20583  ,-18349  ,\n    -16413  ,-14662  ,-12972  ,-10910  ,-8615   ,-6228   ,-3467   ,-943    ,936     ,3089    ,5487    ,7537    ,10150   ,12904   ,14139   ,\n    15425   ,18188   ,20344   ,21647   ,23773   ,25601   ,26169   ,27195   ,28936   ,29982   ,30677   ,31642   ,32170   ,32237   ,32484   ,\n    32767   ,32739   ,32488   ,32201   ,31922   ,31516   ,30710   ,29559   ,28699   ,28144   ,27016   ,25468   ,24401   ,23203   ,21303   ,\n    20008   ,19363   ,17705   ,15741   ,14677   ,13037   ,10907   ,10068   ,9484    ,7885    ,6126    ,5005    ,4391    ,3425    ,2235    ,\n    1601    ,726     ,-354    ,-637    ,-1011   ,-1583   ,-1480   ,-1542   ,-1789   ,-1445   ,-1160   ,-1057   ,-703    ,-437    ,-59     ,\n    844     ,1567    ,1957    ,2921    ,3835    ,3841    ,4486    ,6118    ,6876    ,7475    ,9199    ,10099   ,9821    ,10796   ,12454   ,\n    12864   ,13418   ,14987   ,15421   ,14897   ,15812   ,17175   ,17232   ,17594   ,18645   ,18411   ,17784   ,18404   ,18752   ,18211   ,\n    18341   ,18652   ,17946   ,17290   ,17210   ,16764   ,16159   ,15926   ,15524   ,14996   ,14723   ,13972   ,12909   ,12677   ,12201   ,\n    10512   ,9396    ,8918    ,7363    ,5971    ,6102    ,5421    ,3289    ,2463    ,1844    ,76      ,-992    ,-1490   ,-1598   ,-2156   ,\n    -3188   ,-3135   ,-3007   ,-3896   ,-4306   ,-4315   ,-5064   ,-5598   ,-5330   ,-5607   ,-6435   ,-6813   ,-7149   ,-7881   ,-8400   ,\n    -8569   ,-8994   ,-9760   ,-10398  ,-10918  ,-11610  ,-12343  ,-12974  ,-13643  ,-14397  ,-15093  ,-15566  ,-15842  ,-16369  ,-17116  ,\n    -17355  ,-17388  ,-17858  ,-18032  ,-17858  ,-18284  ,-18744  ,-18390  ,-18172  ,-18428  ,-17749  ,-17169  ,-17406  ,-17195  ,-17383  ,\n    -17226  ,-16523  ,-16034  ,-14668  ,-14119  ,-14521  ,-13581  ,-12240  ,-11737  ,-11153  ,-10055  ,-9370   ,-8972   ,-7986   ,-7019   ,\n    -6616   ,-5980   ,-5080   ,-4638   ,-4336   ,-3814   ,-3406   ,-3067   ,-2704   ,-2634   ,-2699   ,-2540   ,-2713   ,-3262   ,-3037   ,\n    -2751   ,-3688   ,-4449   ,-4681   ,-5759   ,-6829   ,-7363   ,-8514   ,-9690   ,-10263  ,-11362  ,-13047  ,-14313  ,-15412  ,-17035  ,\n    -18516  ,-19407  ,-20774  ,-22593  ,-23716  ,-24671  ,-26049  ,-27056  ,-27834  ,-29026  ,-30109  ,-30767  ,-31414  ,-32093  ,-32558  ,\n    -32767  ,-32763  ,-32661  ,-32579  ,-32338  ,-31916  ,-31585  ,-30965  ,-29710  ,-28517  ,-27613  ,-26340  ,-24702  ,-23323  ,-21922  ,\n    -19596  ,-17265  ,-16164  ,-14557  ,-11536  ,-9252   ,-7518   ,-4485   ,-1658   ,-157    ,2067    ,5124    ,7235    ,9297    ,12258   ,\n    14366   ,15534   ,17722   ,20281   ,21754   ,23364   ,25564   ,26775   ,27436   ,28857   ,30173   ,30828   ,31604   ,32322   ,32505   ,\n    32596   ,32767   ,32715   ,32451   ,32042   ,31579   ,31213   ,30529   ,29360   ,28372   ,27524   ,26207   ,24796   ,23853   ,22878   ,\n    21198   ,19436   ,18497   ,17470   ,15626   ,14225   ,13190   ,11355   ,9853    ,9430    ,8514    ,6845    ,5826    ,5234    ,4026    ,\n    3061    ,2963    ,2449    ,1543    ,1363    ,1284    ,930     ,1043    ,1205    ,1137    ,1506    ,2036    ,2318    ,2683    ,3128    ,\n    3581    ,4332    ,5238    ,5731    ,6005    ,6765    ,7641    ,8161    ,8981    ,10006   ,10345   ,10500   ,11302   ,12145   ,12521   ,\n    13174   ,13969   ,13782   ,13533   ,14282   ,14549   ,14230   ,14753   ,15036   ,14339   ,14113   ,14446   ,14328   ,13754   ,13332   ,\n    13132   ,12801   ,12621   ,12533   ,11851   ,11165   ,10846   ,10070   ,9239    ,8704    ,7832    ,7163    ,6981    ,6314    ,5329    ,\n    4798    ,4095    ,2939    ,2561    ,2713    ,1926    ,1037    ,841     ,140     ,-783    ,-709    ,-616    ,-1523   ,-2116   ,-2011   ,\n    -2214   ,-2491   ,-2019   ,-1652   ,-1844   ,-1890   ,-1788   ,-1990   ,-2086   ,-2049   ,-2271   ,-2439   ,-2530   ,-2933   ,-3339   ,\n    -3402   ,-3360   ,-3446   ,-3817   ,-4477   ,-5084   ,-5612   ,-6313   ,-7010   ,-7540   ,-8055   ,-8703   ,-9473   ,-10078  ,-10529  ,\n    -11083  ,-11602  ,-12223  ,-12978  ,-13311  ,-13554  ,-14204  ,-14622  ,-14735  ,-15080  ,-15300  ,-15213  ,-15325  ,-15568  ,-15462  ,\n    -15237  ,-15253  ,-15098  ,-14734  ,-14577  ,-14722  ,-15130  ,-15287  ,-14845  ,-14435  ,-14367  ,-14324  ,-13750  ,-12438  ,-11425  ,\n    -10843  ,-10271  ,-9819   ,-9084   ,-8318   ,-7804   ,-7284   ,-6764   ,-6275   ,-5854   ,-5552   ,-5313   ,-5117   ,-5133   ,-5230   ,\n    -4997   ,-4845   ,-5284   ,-5708   ,-5953   ,-6655   ,-7511   ,-7999   ,-8650   ,-9759   ,-10738  ,-11573  ,-12848  ,-14205  ,-15161  ,\n    -16391  ,-18010  ,-19278  ,-20512  ,-22074  ,-23273  ,-24115  ,-25241  ,-26503  ,-27581  ,-28640  ,-29713  ,-30529  ,-31150  ,-31862  ,\n    -32445  ,-32649  ,-32720  ,-32767  ,-32696  ,-32537  ,-32212  ,-31667  ,-30967  ,-29942  ,-28742  ,-27846  ,-26739  ,-24921  ,-23252  ,\n    -21835  ,-19711  ,-17393  ,-15680  ,-13653  ,-11025  ,-8859   ,-6828   ,-4027   ,-1206   ,1069    ,3508    ,6106    ,8259    ,10435   ,\n    13008   ,15254   ,17053   ,19036   ,21126   ,22908   ,24503   ,26107   ,27538   ,28670   ,29677   ,30671   ,31500   ,32055   ,32489   ,\n    32767   ,32726   ,32641   ,32536   ,32050   ,31458   ,31062   ,30467   ,29514   ,28473   ,27395   ,26259   ,25027   ,23698   ,22540   ,\n    21459   ,19987   ,18366   ,17127   ,15923   ,14479   ,13240   ,12113   ,10709   ,9446    ,8699    ,7908    ,6824    ,6014    ,5330    ,\n    4436    ,3957    ,3798    ,3404    ,3256    ,3319    ,3260    ,3494    ,3740    ,3761    ,4115    ,4693    ,5193    ,5769    ,6301    ,\n    6769    ,7460    ,8167    ,8661    ,9264    ,9956    ,10473   ,11086   ,11783   ,12243   ,12700   ,13092   ,13133   ,13369   ,13856   ,\n    13964   ,14061   ,14275   ,13989   ,13619   ,13553   ,13241   ,12718   ,12357   ,11918   ,11354   ,10815   ,10100   ,9342    ,8749    ,\n    7938    ,6892    ,6174    ,5550    ,4542    ,3660    ,3174    ,2615    ,1929    ,1309    ,746     ,227     ,-306    ,-753    ,-1023   ,\n    -1386   ,-1862   ,-2202   ,-2521   ,-2871   ,-2966   ,-2975   ,-3196   ,-3338   ,-3230   ,-3018   ,-2871   ,-2790   ,-2591   ,-2322   ,\n    -2369   ,-3189   ,-3551   ,-3417   ,-3453   ,-3626   ,-3689   ,-3753   ,-3672   ,-3448   ,-3427   ,-3485   ,-3265   ,-3116   ,-3133   ,\n    -2900   ,-2730   ,-2744   ,-2526   ,-2327   ,-2235   ,-2123   ,-2403   ,-2819   ,-2843   ,-2827   ,-2951   ,-3105   ,-3296   ,-3364   ,\n    -3546   ,-3769   ,-3760   ,-4595   ,-5891   ,-5904   ,-6070   ,-7294   ,-7721   ,-8193   ,-9549   ,-9623   ,-9096   ,-10111  ,-11293  ,\n    -11602  ,-12336  ,-13486  ,-13821  ,-13937  ,-14839  ,-15500  ,-15886  ,-16775  ,-17383  ,-17546  ,-17468  ,-17848  ,-18002  ,-16204  ,\n    -14832  ,-14683  ,-14240  ,-13886  ,-13248  ,-12487  ,-12098  ,-11520  ,-10737  ,-10231  ,-9857   ,-9249   ,-8785   ,-8682   ,-8520   ,\n    -8066   ,-7727   ,-7870   ,-7944   ,-7675   ,-7768   ,-8219   ,-8548   ,-8900   ,-9391   ,-10083  ,-10907  ,-11570  ,-12470  ,-13687  ,\n    -14438  ,-15158  ,-16578  ,-17916  ,-18939  ,-20324  ,-21597  ,-22420  ,-23756  ,-25589  ,-26805  ,-27673  ,-28988  ,-30075  ,-30502  ,\n    -31092  ,-31946  ,-32386  ,-32481  ,-32632  ,-32767  ,-32691  ,-32467  ,-32109  ,-31534  ,-30920  ,-30204  ,-29085  ,-27846  ,-26608  ,\n    -24973  ,-23438  ,-22359  ,-20485  ,-17888  ,-16027  ,-13941  ,-10863  ,-8872   ,-7741   ,-4870   ,-1455   ,478     ,2644    ,5469    ,\n    7086    ,8304    ,11021   ,14225   ,15743   ,16552   ,19112   ,21909   ,23087   ,24938   ,27468   ,28072   ,28356   ,30089   ,31235   ,\n    31508   ,32284   ,32767   ,32606   ,32558   ,32365   ,32083   ,31876   ,31143   ,30328   ,30061   ,29435   ,27973   ,26688   ,26132   ,\n    25316   ,23605   ,22181   ,21275   ,19392   ,17200   ,16318   ,15400   ,13591   ,12510   ,11777   ,10316   ,9529    ,9497    ,8664    ,\n    7645    ,7324    ,6889    ,6233    ,6082    ,6206    ,6089    ,6036    ,6306    ,6599    ,6875    ,7222    ,7560    ,8109    ,8902    ,\n    9413    ,9735    ,10499   ,11194   ,11376   ,12126   ,13214   ,13168   ,13110   ,14206   ,14527   ,13753   ,13892   ,14409   ,14243   ,\n    14331   ,14662   ,14657   ,14714   ,14683   ,14462   ,14480   ,14201   ,13506   ,13174   ,12652   ,11609   ,11119   ,11051   ,10474   ,\n    9575    ,8998    ,8835    ,8307    ,7230    ,6604    ,6093    ,4940    ,4321    ,4285    ,3379    ,2462    ,2231    ,1424    ,661     ,\n    628     ,-108    ,-1579   ,-1865   ,-789    ,-311    ,-444    ,-305    ,-560    ,-1037   ,-1076   ,-1013   ,-1147   ,-1421   ,-1560   ,\n    -1465   ,-1611   ,-2682   ,-2433   ,-2383   ,-2650   ,-2804   ,-2980   ,-3182   ,-3147   ,-2894   ,-3053   ,-3558   ,-3630   ,-3851   ,\n    -4303   ,-4477   ,-4994   ,-4915   ,-4342   ,-4887   ,-4570   ,-4435   ,-7947   ,-10804  ,-10147  ,-10027  ,-10975  ,-11305  ,-11276  ,\n    -11170  ,-11706  ,-12211  ,-12055  ,-12883  ,-13735  ,-13011  ,-12909  ,-13989  ,-14186  ,-14038  ,-14656  ,-14901  ,-14741  ,-15274  ,\n    -15941  ,-16242  ,-16540  ,-16937  ,-17483  ,-18152  ,-18150  ,-17851  ,-19210  ,-20676  ,-20628  ,-20535  ,-20542  ,-20326  ,-19997  ,\n    -20029  ,-19716  ,-18533  ,-18573  ,-19156  ,-18337  ,-17983  ,-18748  ,-18351  ,-17121  ,-16613  ,-16109  ,-15307  ,-14862  ,-14651  ,\n    -14236  ,-13486  ,-12912  ,-12777  ,-12372  ,-11630  ,-11182  ,-10988  ,-10868  ,-10695  ,-10394  ,-10554  ,-11124  ,-11214  ,-11476  ,\n    -12455  ,-12604  ,-12250  ,-13280  ,-14528  ,-14942  ,-16076  ,-17508  ,-18091  ,-19422  ,-21644  ,-22807  ,-23844  ,-26265  ,-28160  ,\n    -28401  ,-28787  ,-30010  ,-31028  ,-31437  ,-31742  ,-32297  ,-32733  ,-32767  ,-32669  ,-32607  ,-32643  ,-32367  ,-31354  ,-30529  ,\n    -30038  ,-28654  ,-27223  ,-26776  ,-25611  ,-23394  ,-21675  ,-19577  ,-16429  ,-14230  ,-13042  ,-10879  ,-7960   ,-5440   ,-3058   ,\n    -392    ,2080    ,3485    ,4348    ,6201    ,8468    ,10053   ,12008   ,14667   ,17076   ,19440   ,21888   ,23655   ,24830   ,26202   ,\n    27871   ,29401   ,30482   ,31241   ,31898   ,32178   ,32197   ,32536   ,32767   ,32368   ,31949   ,31923   ,31678   ,30731   ,29730   ,\n    29436   ,29007   ,27364   ,25806   ,25471   ,24318   ,21939   ,21072   ,20518   ,17571   ,14819   ,13992   ,13032   ,12055   ,11857   ,\n    11577   ,11149   ,10683   ,10130   ,9914    ,9771    ,9603    ,9855    ,10050   ,10002   ,10332   ,10855   ,11286   ,11775   ,12183   ,\n    12790   ,13654   ,14173   ,14889   ,15990   ,16603   ,17058   ,17581   ,17910   ,18170   ,18260   ,18582   ,18916   ,18894   ,19476   ,\n    19119   ,16389   ,14798   ,15513   ,15620   ,15209   ,15323   ,15235   ,14959   ,14679   ,14226   ,13730   ,13132   ,12485   ,11931   ,\n    11435   ,11065   ,10695   ,10355   ,10376   ,10329   ,9680    ,9114    ,8950    ,8300    ,7538    ,7711    ,7722    ,6723    ,6092    ,\n    6036    ,5514    ,5036    ,5047    ,5102    ,4508    ,2353    ,127     ,-412    ,-606    ,-1106   ,-1323   ,-1701   ,-2303   ,-2552   ,\n    -2773   ,-3274   ,-3676   ,-5384   ,-5720   ,-5965   ,-7088   ,-7646   ,-7861   ,-8533   ,-7638   ,-7436   ,-7597   ,-4997   ,-7841   ,\n    -16288  ,-17625  ,-15478  ,-16931  ,-16535  ,-15154  ,-15995  ,-15896  ,-15264  ,-15535  ,-15568  ,-15281  ,-14792  ,-14677  ,-14981  ,\n    -14390  ,-13570  ,-13616  ,-13521  ,-13445  ,-14447  ,-15388  ,-15681  ,-16485  ,-17306  ,-17451  ,-17965  ,-18536  ,-18579  ,-19026  ,\n    -19225  ,-19083  ,-19552  ,-19516  ,-21109  ,-26588  ,-30117  ,-29013  ,-28627  ,-29501  ,-28885  ,-28445  ,-28705  ,-28764  ,-28868  ,\n    -28355  ,-28045  ,-26192  ,-22982  ,-22981  ,-23097  ,-22384  ,-25008  ,-27849  ,-27860  ,-27571  ,-27249  ,-26180  ,-25938  ,-25368  ,\n    -24117  ,-23767  ,-23114  ,-22264  ,-21831  ,-20914  ,-19882  ,-18956  ,-18021  ,-17219  ,-16354  ,-15606  ,-15038  ,-14399  ,-13948  ,\n    -13569  ,-13134  ,-13295  ,-13330  ,-12534  ,-12376  ,-12784  ,-12681  ,-12876  ,-13545  ,-14640  ,-16303  ,-17541  ,-19558  ,-23265  ,\n    -25975  ,-27138  ,-27736  ,-27773  ,-28845  ,-30505  ,-30863  ,-31482  ,-32668  ,-32665  ,-32368  ,-32673  ,-32767  ,-32493  ,-32143  ,\n    -31751  ,-31368  ,-30855  ,-29674  ,-28139  ,-27235  ,-26116  ,-23773  ,-21283  ,-18986  ,-15855  ,-12668  ,-11275  ,-9662   ,-5211   ,\n    -2224   ,-2896   ,-1562   ,1127    ,858     ,1712    ,5461    ,8084    ,9877    ,12503   ,15216   ,17609   ,20054   ,22887   ,25076   ,\n    26062   ,27376   ,28978   ,29739   ,30557   ,31698   ,32056   ,32136   ,32560   ,32767   ,32726   ,32392   ,31945   ,32046   ,31850   ,\n    30901   ,30332   ,29853   ,28597   ,27390   ,27352   ,27024   ,23839   ,19857   ,18036   ,16169   ,13786   ,13410   ,13559   ,12797   ,\n    12720   ,13150   ,13219   ,13393   ,13721   ,13934   ,14088   ,14474   ,15152   ,15707   ,16208   ,16921   ,17792   ,18834   ,19703   ,\n    20468   ,21619   ,22647   ,23678   ,25061   ,25743   ,25825   ,25917   ,26166   ,26773   ,26478   ,26538   ,27680   ,24614   ,19116   ,\n    18303   ,18678   ,16684   ,15935   ,16094   ,15495   ,15305   ,15092   ,14614   ,14381   ,13743   ,12957   ,12406   ,11419   ,10472   ,\n    10499   ,10877   ,10864   ,10808   ,10893   ,10968   ,11104   ,11167   ,11363   ,11532   ,10982   ,10871   ,11265   ,10775   ,11051   ,\n    11543   ,10774   ,11853   ,11428   ,5408    ,2165    ,3811    ,3170    ,2053    ,2744    ,2376    ,1642    ,1293    ,706     ,205     ,\n    -281    ,-817    ,-1215   ,-1450   ,763     ,44      ,-355    ,-1279   ,-2323   ,-2847   ,-3472   ,-4167   ,-4779   ,-5672   ,-6375   ,\n    -6808   ,-7755   ,-8675   ,-9224   ,-9421   ,-8454   ,-7623   ,-7234   ,-6888   ,-11075  ,-18005  ,-19305  ,-17390  ,-17258  ,-16706  ,\n    -15980  ,-15899  ,-15141  ,-14596  ,-14220  ,-13401  ,-12899  ,-12303  ,-11516  ,-10879  ,-10055  ,-9400   ,-8640   ,-7784   ,-8119   ,\n    -9012   ,-9370   ,-9837   ,-10625  ,-11318  ,-11843  ,-12317  ,-12883  ,-13436  ,-13835  ,-14172  ,-14515  ,-14563  ,-15142  ,-19422  ,\n    -26797  ,-30979  ,-30925  ,-31227  ,-32020  ,-31882  ,-32166  ,-32767  ,-32618  ,-31807  ,-30400  ,-29127  ,-28271  ,-26834  ,-25301  ,\n    -24051  ,-22551  ,-20824  ,-19525  ,-19800  ,-19781  ,-18146  ,-16977  ,-16461  ,-15035  ,-13840  ,-14334  ,-14233  ,-13364  ,-12773  ,\n    -11772  ,-10851  ,-10206  ,-9710   ,-8782   ,-8330   ,-8548   ,-6798   ,-5820   ,-6466   ,-4444   ,-6683   ,-16103  ,-19906  ,-18017  ,\n    -19182  ,-20567  ,-20526  ,-20970  ,-20964  ,-21438  ,-22202  ,-22255  ,-22742  ,-23051  ,-22738  ,-22705  ,-22637  ,-22494  ,-22167  ,\n    -21385  ,-21008  ,-20916  ,-20228  ,-19258  ,-18402  ,-16831  ,-14162  ,-12227  ,-10879  ,-7978   ,-5336   ,-3719   ,-1479   ,432     ,\n    3684    ,6784    ,3168    ,-1387   ,350     ,2637    ,4228    ,7415    ,9158    ,10879   ,13885   ,15537   ,17256   ,19976   ,21912   ,\n    23319   ,24526   ,25086   ,25259   ,25570   ,26226   ,26651   ,26609   ,26663   ,26737   ,26660   ,26646   ,26341   ,25965   ,26139   ,\n    25931   ,25137   ,24858   ,24499   ,23608   ,23208   ,23438   ,22637   ,18227   ,11649   ,8349    ,8882    ,9785    ,10467   ,11108   ,\n    11621   ,12698   ,13542   ,13953   ,15095   ,16227   ,16751   ,17564   ,18610   ,19433   ,20301   ,21432   ,22547   ,23616   ,24951   ,\n    26091   ,27147   ,28669   ,29700   ,30735   ,32287   ,32460   ,32230   ,32400   ,31887   ,32286   ,32094   ,31265   ,32767   ,29117   ,\n    19283   ,16076   ,17773   ,16415   ,15583   ,15732   ,14789   ,14486   ,14056   ,13268   ,12961   ,12180   ,11324   ,10618   ,9607    ,\n    9272    ,9679    ,10127   ,10821   ,11501   ,11697   ,12051   ,12846   ,13214   ,13587   ,14614   ,14933   ,14946   ,15642   ,15761   ,\n    16388   ,17410   ,17158   ,18616   ,18300   ,10668   ,5417    ,7457    ,8120    ,7513    ,8609    ,8071    ,6834    ,6429    ,5516    ,\n    4828    ,4309    ,3437    ,2738    ,2104    ,1060    ,-233    ,-1908   ,-2740   ,-3861   ,-5499   ,-5772   ,-5802   ,-7306   ,-8234   ,\n    -8650   ,-10279  ,-11207  ,-11257  ,-11423  ,-10666  ,-10138  ,-9249   ,-7131   ,-9752   ,-17276  ,-20578  ,-19102  ,-18581  ,-18253  ,\n    -16707  ,-16141  ,-16331  ,-15439  ,-13863  ,-13251  ,-13669  ,-12925  ,-11360  ,-11031  ,-10154  ,-8345   ,-7939   ,-7874   ,-7238   ,\n    -6860   ,-6699   ,-7428   ,-8355   ,-8360   ,-8833   ,-9694   ,-9880   ,-9877   ,-10493  ,-11567  ,-11601  ,-11941  ,-13252  ,-12479  ,\n    -14659  ,-23865  ,-29884  ,-29508  ,-30291  ,-31643  ,-31375  ,-31823  ,-32613  ,-32767  ,-32078  ,-30305  ,-29445  ,-29434  ,-27576  ,\n    -25359  ,-24482  ,-22785  ,-20742  ,-20146  ,-19307  ,-17573  ,-15714  ,-14168  ,-14167  ,-12479  ,-10525  ,-13315  ,-14715  ,-13276  ,\n    -12331  ,-11093  ,-10604  ,-9846   ,-8495   ,-7307   ,-6213   ,-5853   ,-4366   ,-2218   ,-2525   ,-3219   ,-5041   ,-11491  ,-15942  ,\n    -15020  ,-15092  ,-16089  ,-15870  ,-16076  ,-15960  ,-15653  ,-15979  ,-15955  ,-16044  ,-16303  ,-16089  ,-16017  ,-16020  ,-15837  ,\n    -15634  ,-15325  ,-15115  ,-14992  ,-14827  ,-14203  ,-12871  ,-11869  ,-10686  ,-8439   ,-6699   ,-5192   ,-2772   ,-566    ,1226    ,\n    2639    ,3271    ,2785    ,31      ,-2172   ,-587    ,1207    ,1960    ,4567    ,7013    ,7425    ,8596    ,11288   ,13250   ,14407   ,\n    16150   ,17425   ,17406   ,17548   ,17943   ,18016   ,18236   ,18311   ,18134   ,18199   ,18278   ,18377   ,18564   ,18524   ,18595   ,\n    18660   ,18339   ,18303   ,18232   ,17897   ,18087   ,17954   ,17956   ,17642   ,12414   ,5178    ,3358    ,4448    ,5078    ,6609    ,\n    7667    ,8625    ,10846   ,11687   ,11753   ,13558   ,15211   ,15747   ,17024   ,18900   ,19626   ,20093   ,22107   ,23863   ,24620   ,\n    26559   ,28398   ,28700   ,29631   ,31548   ,32758   ,32767   ,32627   ,32637   ,31793   ,31535   ,31520   ,30009   ,30904   ,30640   ,\n    21539   ,13501   ,13738   ,13426   ,11731   ,12106   ,11513   ,10589   ,10568   ,9800    ,9036    ,8873    ,8790    ,8280    ,6816    ,\n    6115    ,7333    ,8462    ,8634    ,8938    ,9802    ,10994   ,11464   ,11267   ,12070   ,13078   ,13487   ,14343   ,14844   ,15140   ,\n    15768   ,16089   ,17825   ,18246   ,13047   ,8055    ,6870    ,5945    ,6394    ,8275    ,8521    ,7989    ,7555    ,7141    ,6688    ,\n    5344    ,4462    ,4109    ,2495    ,1286    ,1115    ,492     ,-190    ,-1337   ,-2804   ,-3872   ,-5155   ,-6824   ,-8442   ,-9860   ,\n    -10813  ,-11246  ,-11751  ,-12339  ,-12490  ,-12837  ,-13535  ,-13316  ,-12340  ,-11583  ,-11041  ,-9745   ,-6981   ,-6809   ,-11849  ,\n    -15515  ,-15231  ,-15293  ,-14922  ,-13879  ,-13997  ,-13413  ,-12953  ,-13610  ,-12872  ,-12300  ,-13167  ,-12601  ,-11646  ,-11906  ,\n    -11154  ,-9983   ,-9525   ,-8565   ,-8334   ,-8467   ,-7551   ,-8122   ,-9141   ,-8117   ,-7253   ,-7041   ,-7464   ,-8623   ,-8954   ,\n    -9572   ,-9573   ,-10083  ,-17043  ,-24250  ,-24962  ,-26572  ,-29424  ,-28807  ,-28824  ,-30420  ,-31344  ,-32572  ,-32767  ,-30785  ,\n    -28776  ,-27597  ,-25873  ,-23721  ,-23018  ,-22233  ,-19737  ,-18659  ,-18258  ,-15308  ,-13146  ,-13340  ,-12498  ,-11259  ,-11492  ,\n    -11170  ,-9545   ,-9011   ,-9956   ,-10455  ,-9029   ,-7238   ,-7014   ,-6086   ,-3737   ,-1123   ,-1802   ,-9063   ,-14868  ,-14818  ,\n    -15010  ,-15599  ,-14895  ,-14602  ,-14553  ,-14280  ,-13787  ,-13206  ,-13054  ,-12752  ,-12208  ,-11998  ,-11781  ,-11672  ,-11643  ,\n    -11202  ,-10998  ,-11175  ,-11058  ,-11080  ,-11390  ,-10623  ,-9014   ,-8957   ,-9085   ,-6416   ,-4272   ,-4530   ,-2696   ,458     ,\n    1784    ,3440    ,4022    ,804     ,-1807   ,-636    ,1551    ,2699    ,3958    ,6520    ,8552    ,8409    ,9001    ,11805   ,13561   ,\n    14180   ,15586   ,15764   ,14587   ,14481   ,14527   ,14108   ,14180   ,13854   ,13371   ,13558   ,13325   ,13017   ,13460   ,14169   ,\n    14962   ,15128   ,15088   ,15620   ,15357   ,15370   ,16389   ,16453   ,17024   ,15782   ,8482    ,2660    ,3227    ,4276    ,4857    ,\n    5890    ,6134    ,7886    ,9832    ,9196    ,9352    ,11661   ,13104   ,13028   ,13750   ,15999   ,17217   ,17846   ,20657   ,22917   ,\n    23118   ,25181   ,27942   ,28353   ,29604   ,32319   ,32767   ,32024   ,32228   ,31851   ,31301   ,30977   ,29385   ,29210   ,29894   ,\n    24620   ,16785   ,14122   ,13014   ,11154   ,11433   ,11319   ,9933    ,10074   ,10506   ,10009   ,10002   ,10511   ,10545   ,10539   ,\n    10589   ,9734    ,9945    ,12134   ,12665   ,12079   ,13245   ,14126   ,13682   ,13446   ,13361   ,12989   ,13008   ,13808   ,13547   ,\n    12287   ,13006   ,14116   ,13863   ,14366   ,13021   ,7852    ,4321    ,4470    ,5183    ,6203    ,7746    ,8193    ,7828    ,7523    ,\n    6315    ,4980    ,5285    ,5168    ,3243    ,1609    ,823     ,-146    ,-2126   ,-3478   ,-3692   ,-6051   ,-9984   ,-11618  ,-12677  ,\n    -14780  ,-15073  ,-14125  ,-15475  ,-17401  ,-15924  ,-14217  ,-15516  ,-15006  ,-12374  ,-11651  ,-9922   ,-8046   ,-10429  ,-11993  ,\n    -10143  ,-10137  ,-11284  ,-10314  ,-9942   ,-11638  ,-11534  ,-9835   ,-11317  ,-13433  ,-12671  ,-13570  ,-15457  ,-13817  ,-12708  ,\n    -14134  ,-14184  ,-13306  ,-12329  ,-10222  ,-9253   ,-9321   ,-7459   ,-5858   ,-6437   ,-6196   ,-4770   ,-3842   ,-3584   ,-5296   ,\n    -7189   ,-5579   ,-5727   ,-12376  ,-17983  ,-18925  ,-21269  ,-25176  ,-26856  ,-27162  ,-27695  ,-29260  ,-31697  ,-32767  ,-31925  ,\n    -30361  ,-28330  ,-26407  ,-24717  ,-23013  ,-21747  ,-19834  ,-17823  ,-17788  ,-16742  ,-13433  ,-11867  ,-11341  ,-10491  ,-11648  ,\n    -12683  ,-11492  ,-11248  ,-12542  ,-13298  ,-14613  ,-15340  ,-14187  ,-14888  ,-14024  ,-10737  ,-11460  ,-11434  ,-10080  ,-14427  ,\n    -19207  ,-19188  ,-18254  ,-17561  ,-16393  ,-16220  ,-15708  ,-13442  ,-11861  ,-11314  ,-10176  ,-9098   ,-8585   ,-8433   ,-8559   ,\n    -8183   ,-7462   ,-7322   ,-7279   ,-7317   ,-8359   ,-8967   ,-8187   ,-8483   ,-9704   ,-8893   ,-6977   ,-6380   ,-6496   ,-5486   ,\n    -2689   ,296     ,2541    ,5422    ,6918    ,4393    ,2667    ,5549    ,8769    ,9967    ,11227   ,12148   ,12239   ,13528   ,15679   ,\n    16640   ,16904   ,16906   ,15662   ,14050   ,13434   ,13217   ,12870   ,12344   ,11218   ,10603   ,11025   ,10288   ,9250    ,10748   ,\n    13076   ,14094   ,14494   ,15013   ,15631   ,15757   ,16499   ,18417   ,18369   ,15877   ,12447   ,7786    ,5265    ,6758    ,7599    ,\n    6427    ,5866    ,6454    ,7531    ,7846    ,7136    ,7556    ,9678    ,10754   ,10061   ,10811   ,13262   ,14575   ,16130   ,19424   ,\n    21691   ,23111   ,25653   ,27646   ,29294   ,31866   ,32767   ,31870   ,31815   ,31990   ,31802   ,31518   ,30122   ,28814   ,28541   ,\n    26559   ,22494   ,18292   ,14015   ,11672   ,12224   ,11725   ,10411   ,11181   ,11801   ,11544   ,12541   ,14197   ,14934   ,14846   ,\n    16018   ,17565   ,16900   ,17281   ,19019   ,18348   ,18051   ,18867   ,18157   ,17507   ,16104   ,13785   ,13533   ,13408   ,12101   ,\n    11103   ,10292   ,10607   ,10569   ,8646    ,8966    ,10423   ,7334    ,2810    ,2151    ,4085    ,6437    ,8281    ,8591    ,7846    ,\n    6874    ,6005    ,6277    ,6479    ,4325    ,1916    ,1030    ,-87     ,-3195   ,-5674   ,-5077   ,-6596   ,-12944  ,-16202  ,-16179  ,\n    -18629  ,-20359  ,-18807  ,-19055  ,-21712  ,-20528  ,-16598  ,-16964  ,-18278  ,-14667  ,-12093  ,-12552  ,-8648   ,-3751   ,-4707   ,\n    -5865   ,-5175   ,-6902   ,-7200   ,-6054   ,-8934   ,-9986   ,-6811   ,-8881   ,-13749  ,-13253  ,-13310  ,-16577  ,-15952  ,-14219  ,\n    -16544  ,-17845  ,-16843  ,-16127  ,-13354  ,-10907  ,-10879  ,-7636   ,-4003   ,-5402   ,-5474   ,-2357   ,-685    ,191     ,-975    ,\n    -3995   ,-3076   ,-1992   ,-7733   ,-13844  ,-14484  ,-15798  ,-21016  ,-24717  ,-24993  ,-25512  ,-27637  ,-30494  ,-32767  ,-32594  ,\n    -30588  ,-28292  ,-25905  ,-23915  ,-22164  ,-20642  ,-19327  ,-17262  ,-16306  ,-16355  ,-13463  ,-10046  ,-9727   ,-10220  ,-11122  ,\n    -12835  ,-13789  ,-14371  ,-14956  ,-16300  ,-19392  ,-20792  ,-20443  ,-21786  ,-22735  ,-23087  ,-23978  ,-25639  ,-23824  ,-17369  ,\n    -17363  ,-20323  ,-20494  ,-21235  ,-19791  ,-19122  ,-19072  ,-15561  ,-12058  ,-10539  ,-9100   ,-7309   ,-5864   ,-5140   ,-5928   ,\n    -6250   ,-4767   ,-4228   ,-4532   ,-4369   ,-5657   ,-7739   ,-7839   ,-8030   ,-10270  ,-10689  ,-8949   ,-9406   ,-10150  ,-8657   ,\n    -7202   ,-4373   ,-192    ,1815    ,4993    ,9479    ,8795    ,7525    ,11805   ,15389   ,15408   ,15569   ,15728   ,16073   ,17598   ,\n    18424   ,18335   ,17801   ,15670   ,13166   ,11770   ,10774   ,10440   ,10151   ,8253    ,6540    ,6759    ,6474    ,4640    ,4984    ,\n    8793    ,11667   ,12248   ,13253   ,14184   ,14492   ,15728   ,17761   ,19644   ,18764   ,14043   ,9848    ,8143    ,8232    ,9802    ,\n    8555    ,4524    ,4003    ,5674    ,5047    ,3737    ,3627    ,4669    ,5930    ,5758    ,5719    ,7722    ,9396    ,10656   ,14348   ,\n    18092   ,19996   ,23089   ,25952   ,27169   ,30285   ,32767   ,31276   ,30125   ,30548   ,30818   ,31236   ,29526   ,26838   ,26782   ,\n    24853   ,20203   ,18683   ,16240   ,10589   ,9783    ,11307   ,9212    ,9114    ,11454   ,11468   ,12003   ,14962   ,17091   ,17488   ,\n    19412   ,22365   ,21918   ,21957   ,25009   ,24146   ,21935   ,23241   ,22890   ,21259   ,19763   ,15543   ,12384   ,12153   ,11217   ,\n    8693    ,6080    ,6101    ,6612    ,3746    ,2261    ,3524    ,1978    ,-712    ,-1436   ,-1047   ,1751    ,5552    ,6825    ,6845    ,\n    6513    ,4578    ,3933    ,5714    ,4536    ,1266    ,-850    ,-3179   ,-3017   ,-2194   ,-11373  ,-17463  ,-19906  ,-24668  ,-28173  ,\n    -31351  ,-32767  ,-30615  ,-31190  ,-28817  ,-20487  ,-20385  ,-25789  ,-22731  ,-14766  ,-11785  ,-13269  ,-8785   ,2219    ,6843    ,\n    4214    ,1978    ,1930    ,3961    ,3552    ,663     ,1083    ,-2349   ,-11175  ,-10767  ,-6040   ,-10541  ,-15124  ,-15887  ,-20004  ,\n    -22114  ,-22246  ,-23037  ,-17292  ,-11645  ,-10039  ,-3261   ,1130    ,-220    ,2859    ,6354    ,7786    ,9490    ,6697    ,3815    ,\n    5036    ,3791    ,-161    ,-3099   ,-6344   ,-10739  ,-14692  ,-19059  ,-23880  ,-23308  ,-20184  ,-24649  ,-30992  ,-31999  ,-32048  ,\n    -28699  ,-22138  ,-19439  ,-16114  ,-11636  ,-13276  ,-14581  ,-11433  ,-11452  ,-11527  ,-6492   ,-3450   ,-4417   ,-5778   ,-9275   ,\n    -12748  ,-13023  ,-14656  ,-18168  ,-19893  ,-21555  ,-23568  ,-23744  ,-24108  ,-25160  ,-24498  ,-23292  ,-20270  ,-15736  ,-12549  ,\n    -11590  ,-9784   ,-2085   ,-5812   ,-18006  ,-16427  ,-15227  ,-15815  ,-10312  ,-7801   ,-7195   ,-5434   ,-3197   ,-2052   ,-3004   ,\n    -4018   ,-3276   ,-2295   ,-3528   ,-3263   ,-1310   ,-3299   ,-4889   ,-3157   ,-4884   ,-7784   ,-5737   ,-3866   ,-4891   ,-5018   ,\n    -5710   ,-5714   ,-2401   ,-1846   ,-3111   ,717     ,3510    ,1759    ,2739    ,5110    ,6695    ,10469   ,12763   ,15071   ,20728   ,\n    21388   ,18273   ,20407   ,23298   ,22320   ,20506   ,18932   ,17678   ,16948   ,16300   ,15532   ,14521   ,12467   ,8239    ,5082    ,\n    6384    ,8580    ,9556    ,10097   ,8515    ,6978    ,8624    ,10510   ,11052   ,11837   ,12568   ,12909   ,12588   ,11887   ,13669   ,\n    16258   ,14218   ,10437   ,10237   ,10599   ,8962    ,7286    ,5460    ,5364    ,8831    ,8543    ,2234    ,-192    ,1887    ,1802    ,\n    2147    ,3491    ,3363    ,6017    ,8516    ,6254    ,7849    ,12585   ,11298   ,12545   ,21218   ,24332   ,21719   ,23854   ,28409   ,\n    30779   ,31503   ,29348   ,25971   ,24093   ,23190   ,24073   ,24252   ,20591   ,18180   ,18348   ,16822   ,15538   ,15230   ,13523   ,\n    12698   ,13616   ,12722   ,10609   ,13256   ,18144   ,16478   ,14793   ,21357   ,26514   ,27204   ,30900   ,32767   ,29015   ,27709   ,\n    29156   ,27746   ,26124   ,25580   ,24001   ,23692   ,21003   ,12528   ,7999    ,7384    ,1893    ,-1313   ,1053    ,-716    ,-5619   ,\n    -7158   ,-5716   ,-4009   ,-4788   ,-6609   ,-4368   ,971     ,3782    ,4369    ,6765    ,-4075   ,-6395   ,-4285   ,-4474   ,-3661   ,\n    -5272   ,-9556   ,-12845  ,-30608  ,-30479  ,-13560  ,-17555  ,-15189  ,-8368   ,-10702  ,-8152   ,-10201  ,-13278  ,-9253   ,-9907   ,\n    -11865  ,-9672   ,-12388  ,-17709  ,-18959  ,-19860  ,-21957  ,-23101  ,-23953  ,-25712  ,-28300  ,-29141  ,-23684  ,-15933  ,-15040  ,\n    -15457  ,-10173  ,-7261   ,-7126   ,-5663   ,-10287  ,-16538  ,-15805  ,-17078  ,-21543  ,-22622  ,-23636  ,-23805  ,-22180  ,-24350  ,\n    -28954  ,-30979  ,-30144  ,-30246  ,-32647  ,-32767  ,-30975  ,-30795  ,-30806  ,-31044  ,-29268  ,-22663  ,-17365  ,-13686  ,-6822   ,\n    -1686   ,-122    ,2889    ,8407    ,12097   ,8411    ,737     ,-2949   ,-2967   ,-3815   ,-7724   ,-10892  ,-9789   ,-12065  ,-19157  ,\n    -21115  ,-20711  ,-23803  ,-24432  ,-22510  ,-22936  ,-22653  ,-19721  ,-16716  ,-13122  ,-9214   ,-6598   ,-1572   ,5197    ,5809    ,\n    3267    ,6203    ,11298   ,12857   ,11610   ,9933    ,10331   ,10620   ,5852    ,-355    ,-2474   ,-4518   ,-8605   ,-10705  ,-13028  ,\n    -15326  ,-14716  ,-15627  ,-18222  ,-20029  ,-17098  ,-10821  ,-9399   ,-7540   ,-3899   ,-4626   ,-3487   ,1049    ,2127    ,2007    ,\n    1857    ,-2380   ,-5239   ,-6663   ,-13729  ,-17503  ,-15338  ,-19517  ,-23962  ,-22520  ,-24517  ,-24135  ,-19681  ,-22537  ,-21238  ,\n    -11929  ,-12453  ,-15562  ,-9907   ,-5156   ,-2708   ,-324    ,-838    ,-876    ,326     ,942     ,2703    ,3381    ,-189    ,-5271   ,\n    -7952   ,-9452   ,-11734  ,-12035  ,-12636  ,-18526  ,-22859  ,-21244  ,-21335  ,-23641  ,-23011  ,-20433  ,-16429  ,-12736  ,-11809  ,\n    -9069   ,-4961   ,-4107   ,-1628   ,2611    ,1932    ,629     ,2557    ,2185    ,1561    ,5479    ,6275    ,32      ,-3268   ,-1238   ,\n    -1685   ,-3769   ,-4460   ,-6068   ,-6249   ,-5327   ,-8284   ,-9543   ,-5713   ,-6278   ,-6590   ,1215    ,4069    ,7690    ,15908   ,\n    10008   ,4538    ,8428    ,8445    ,9714    ,12007   ,12493   ,15001   ,17700   ,17636   ,15916   ,15484   ,15452   ,14741   ,14658   ,\n    13939   ,13211   ,14476   ,13017   ,9820    ,11575   ,12405   ,8985    ,8959    ,13524   ,17670   ,17121   ,18212   ,25221   ,25282   ,\n    25535   ,32767   ,18401   ,-7460   ,-8723   ,-2082   ,-3496   ,-4502   ,-9103   ,-12405  ,-11219  ,-14444  ,-15939  ,-13849  ,-15417  ,\n    -17687  ,-19950  ,-21518  ,-18877  ,-17657  ,-19845  ,-19300  ,-16872  ,-16295  ,-16204  ,-16137  ,-13003  ,-10430  ,-5765   ,-4710   ,\n    -2330   ,199     ,-665    ,524     ,-4895   ,-17436  ,-23599  ,-23834  ,-22219  ,-20798  ,-20643  ,-19811  ,-19166  ,-22237  ,-26086  ,\n    -24948  ,-22611  ,-23813  ,-26048  ,-26422  ,-25271  ,-24740  ,-24996  ,-25028  ,-23666  ,-20263  ,-19544  ,-19568  ,-12869  ,-7031   ,\n    -5436   ,-1361   ,1287    ,5191    ,9184    ,-2473   ,-16209  ,-13611  ,-11157  ,-14991  ,-15255  ,-15677  ,-17044  ,-16376  ,-17514  ,\n    -19465  ,-20152  ,-20887  ,-21096  ,-19777  ,-18403  ,-19763  ,-16619  ,-8751   ,-5652   ,-4326   ,-3572   ,1846    ,12079   ,14251   ,\n    14244   ,15944   ,12653   ,12629   ,17725   ,16963   ,14217   ,14086   ,8956    ,3652    ,3409    ,-3754   ,-17112  ,-22370  ,-22755  ,\n    -28274  ,-32767  ,-28422  ,-24062  ,-27493  ,-30049  ,-27700  ,-25558  ,-22898  ,-19822  ,-16253  ,-11157  ,-8835   ,-4334   ,5846    ,\n    9563    ,7605    ,8779    ,7869    ,6233    ,9971    ,10858   ,5606    ,3477    ,3361    ,-1872   ,-4753   ,-1106   ,-4863   ,-16042  ,\n    -19589  ,-18132  ,-18153  ,-16841  ,-15520  ,-11653  ,-3974   ,-1607   ,-2136   ,2158    ,5776    ,7550    ,12086   ,15647   ,16000   ,\n    16003   ,14897   ,13300   ,13571   ,10298   ,3716    ,5289    ,8735    ,1232    ,-5413   ,-4279   ,-3830   ,-3713   ,-6997   ,-17378  ,\n    -22067  ,-17397  ,-18461  ,-21914  ,-18305  ,-15871  ,-13528  ,-9316   ,-7829   ,-5579   ,-1726   ,376     ,720     ,1693    ,2876    ,\n    1713    ,-1148   ,-3657   ,-4440   ,-4155   ,-6431   ,-10923  ,-13398  ,-15207  ,-17466  ,-16496  ,-15176  ,-16118  ,-14391  ,-13662  ,\n    -15985  ,-12076  ,-7190   ,-6689   ,1215    ,11251   ,11868   ,12460   ,16550   ,18868   ,21003   ,22143   ,22435   ,23336   ,22409   ,\n    23049   ,24166   ,17568   ,9898    ,8391    ,6491    ,3677    ,2170    ,-2      ,298     ,373     ,-2038   ,-544    ,1849    ,7870    ,\n    13828   ,6700    ,2297    ,4808    ,6066    ,12736   ,17482   ,17024   ,18366   ,21174   ,23886   ,24118   ,23612   ,25076   ,24641   ,\n    23387   ,24607   ,25965   ,27338   ,25037   ,18040   ,15300   ,14688   ,11634   ,11371   ,14075   ,17227   ,16874   ,15808   ,21719   ,\n    24189   ,25134   ,32767   ,21983   ,-746    ,-546    ,6069    ,3304    ,4487    ,4431    ,1941    ,4060    ,4848    ,2865    ,1033    ,\n    1447    ,2401    ,-209    ,733     ,1094    ,-10605  ,-18848  ,-15609  ,-14587  ,-14291  ,-11458  ,-11139  ,-4248   ,-723    ,1043    ,\n    3010    ,5969    ,8154    ,9881    ,11168   ,10916   ,8444    ,4629    ,2651    ,3299    ,2231    ,-871    ,-582    ,1921    ,-835    ,\n    -4550   ,-3325   ,-3243   ,-2198   ,-2674   ,-589    ,2496    ,-17937  ,-32767  ,-24701  ,-24465  ,-23815  ,-19516  ,-20532  ,-17601  ,\n    -13511  ,-13000  ,-11338  ,-10223  ,-10373  ,-9435   ,-12564  ,-17353  ,-16090  ,-13468  ,-13720  ,-14001  ,-13619  ,-12580  ,-11485  ,\n    -11520  ,-11099  ,-9250   ,-6378   ,-3982   ,-3327   ,-493    ,2631    ,-4794   ,-20623  ,-30009  ,-30432  ,-30165  ,-29775  ,-28223  ,\n    -27050  ,-25027  ,-24996  ,-28222  ,-29019  ,-27464  ,-27232  ,-27475  ,-27402  ,-26551  ,-25140  ,-24442  ,-22480  ,-19472  ,-18747  ,\n    -18471  ,-15411  ,-11217  ,-9216   ,-7248   ,-3089   ,-2034   ,-1040   ,2437    ,-7761   ,-26818  ,-29854  ,-24456  ,-25255  ,-25290  ,\n    -24539  ,-25443  ,-24025  ,-22692  ,-22208  ,-20856  ,-20818  ,-20822  ,-19625  ,-19429  ,-18392  ,-15442  ,-13873  ,-12518  ,-8930   ,\n    -6262   ,-5484   ,-3291   ,121     ,2016    ,2487    ,3659    ,5336    ,6259    ,7367    ,8310    ,8900    ,10505   ,10561   ,9034    ,\n    9858    ,10737   ,10191   ,11360   ,12682   ,12840   ,13372   ,14053   ,16087   ,18409   ,18209   ,17925   ,20541   ,22714   ,24362   ,\n    25907   ,25964   ,29698   ,20105   ,85      ,145     ,6218    ,7233    ,10554   ,12536   ,13765   ,14834   ,16310   ,16999   ,17425   ,\n    20087   ,21179   ,19814   ,19410   ,18187   ,15505   ,15517   ,17155   ,16402   ,13966   ,13609   ,16008   ,16224   ,13706   ,13838   ,\n    15564   ,15943   ,16567   ,17298   ,18839   ,21759   ,22005   ,20699   ,21687   ,21773   ,21278   ,23400   ,24496   ,24593   ,24713   ,\n    22202   ,23342   ,25718   ,16205   ,5900    ,7465    ,8359    ,5655    ,7133    ,8320    ,8288    ,10260   ,10357   ,10392   ,12933   ,\n    13243   ,13908   ,17136   ,18352   ,20526   ,20918   ,12592   ,7393    ,10871   ,11632   ,11048   ,13628   ,14396   ,14756   ,16584   ,\n    15986   ,14737   ,16196   ,18502   ,19579   ,17918   ,13603   ,10695   ,10580   ,10494   ,10548   ,11951   ,13603   ,14677   ,15679   ,\n    17102   ,17752   ,18002   ,20286   ,22819   ,24116   ,25744   ,26455   ,26743   ,27985   ,28019   ,27773   ,29096   ,30219   ,29741   ,\n    28802   ,29606   ,30479   ,30371   ,32621   ,32767   ,25973   ,21995   ,25519   ,27255   ,26810   ,29284   ,29845   ,18075   ,19831   ,\n    19672   ,21304   ,22450   ,20627   ,25294   ,23926   ,26112   ,32767   ,23179   ,10126   ,-15337  ,-28008  ,-17457  ,-22339  ,-22578  ,\n    -18741  ,-22274  ,-18983  ,-18466  ,-19552  ,-17066  ,-16053  ,-15381  ,-17867  ,-20460  ,-18509  ,-17235  ,-16627  ,-15736  ,-15595  ,\n    -14060  ,-12153  ,-12397  ,-12267  ,-10504  ,-10038  ,-9444   ,-8221   ,-8267   ,-6022   ,-5888   ,-16178  ,-27013  ,-28782  ,-27601  ,\n    -27567  ,-27687  ,-27241  ,-25758  ,-24895  ,-24334  ,-22769  ,-21929  ,-21963  ,-21917  ,-22351  ,-22849  ,-22132  ,-20510  ,-20343  ,\n    -20728  ,-18895  ,-17642  ,-17366  ,-15630  ,-14986  ,-14249  ,-13040  ,-13065  ,-9146   ,-9754   ,-23851  ,-32767  ,-30285  ,-30080  ,\n    -29902  ,-27783  ,-27936  ,-26422  ,-24761  ,-25784  ,-24884  ,-22701  ,-22079  ,-21114  ,-19253  ,-18524  ,-18983  ,-18104  ,-16296  ,\n    -15838  ,-14939  ,-12819  ,-12232  ,-12492  ,-11211  ,-9804   ,-9500   ,-8417   ,-6571   ,-6248   ,-6190   ,-4320   ,-2836   ,-2421   ,\n    -871    ,600     ,550     ,889     ,2284    ,3287    ,3324    ,3571    ,4919    ,5936    ,6225    ,7546    ,8952    ,8891    ,9297    ,\n    10931   ,11789   ,12093   ,13377   ,14347   ,14318   ,15396   ,16465   ,16386   ,17981   ,18803   ,16617   ,15749   ,14488   ,10837   ,\n    11773   ,16496   ,18319   ,14987   ,4586    ,-3471   ,-2426   ,-1608   ,-2474   ,-1409   ,-523    ,-92     ,365     ,1090    ,2791    ,\n    3959    ,4657    ,6429    ,7402    ,7202    ,8582    ,10932   ,12115   ,12939   ,14055   ,14549   ,14733   ,15359   ,15917   ,16335   ,\n    17243   ,18002   ,17819   ,17992   ,19261   ,18651   ,13801   ,8104    ,6063    ,6588    ,6851    ,7501    ,8738    ,9107    ,9555    ,\n    11087   ,12162   ,12417   ,13225   ,14310   ,14839   ,15361   ,15796   ,15812   ,16388   ,17321   ,17439   ,17132   ,17255   ,17609   ,\n    17397   ,17228   ,17788   ,18116   ,19060   ,18925   ,11546   ,732     ,-2959   ,-965    ,-54     ,52      ,812     ,1771    ,2676    ,\n    3125    ,3691    ,4745    ,5492    ,6156    ,6895    ,7176    ,7413    ,7816    ,7986    ,8362    ,9272    ,9752    ,9460    ,9637    ,\n    10568   ,11087   ,11006   ,11164   ,11848   ,12557   ,12983   ,13793   ,15091   ,15738   ,16152   ,17513   ,18715   ,19119   ,20024   ,\n    21266   ,21737   ,22011   ,22786   ,23423   ,23892   ,24798   ,25427   ,25442   ,25914   ,26817   ,27072   ,26962   ,27895   ,24062   ,\n    23255   ,24764   ,25423   ,24564   ,26616   ,26230   ,28098   ,32767   ,21853   ,-1342   ,-21412  ,-32767  ,-32702  ,-30450  ,-31818  ,\n    -30831  ,-29449  ,-28835  ,-27254  ,-26920  ,-26164  ,-24531  ,-23872  ,-22850  ,-21405  ,-20692  ,-20006  ,-18786  ,-17549  ,-16928  ,\n    -16068  ,-14425  ,-13854  ,-13444  ,-11776  ,-11100  ,-10082  ,-8181   ,-8049   ,-6129   ,-5317   ,-13636  ,-21973  ,-22488  ,-22271  ,\n    -22443  ,-21099  ,-20461  ,-19199  ,-17456  ,-16992  ,-16027  ,-14312  ,-13318  ,-12493  ,-10718  ,-9224   ,-8813   ,-7459   ,-8100   ,\n    -13753  ,-16721  ,-14234  ,-13407  ,-13663  ,-11822  ,-10435  ,-9751   ,-8889   ,-7940   ,-6382   ,-7470   ,-12948  ,-16799  ,-16365  ,\n    -15727  ,-15515  ,-14581  ,-13923  ,-13052  ,-11930  ,-11663  ,-11341  ,-10282  ,-9307   ,-8829   ,-8429   ,-7483   ,-6538   ,-6141   ,\n    -5316   ,-4264   ,-4048   ,-3640   ,-2491   ,-1959   ,-1742   ,-716    ,81      ,-1      ,412     ,1580    ,2250    ,2666    ,3968    ,\n    4930    ,4619    ,5602    ,6934    ,3593    ,-2348   ,-4643   ,-3686   ,-3003   ,-2614   ,-1551   ,-746    ,-600    ,72      ,1314    ,\n    1959    ,1987    ,1959    ,1907    ,2183    ,2902    ,3754    ,4411    ,4734    ,5942    ,6469    ,6879    ,8852    ,8024    ,1326    ,\n    -10321  ,-8939   ,6852    ,8916    ,-304    ,-5650   ,-6671   ,-5857   ,-5393   ,-4235   ,-3726   ,-2965   ,-1747   ,-1911   ,-1309   ,\n    109     ,732     ,1466    ,2768    ,3412    ,3471    ,4252    ,5417    ,6059    ,6854    ,8078    ,8664    ,8726    ,9739    ,11096   ,\n    11301   ,12044   ,13617   ,13624   ,14065   ,16102   ,14586   ,8229    ,2622    ,1092    ,1796    ,2218    ,2544    ,3464    ,3822    ,\n    3921    ,4958    ,5734    ,6021    ,6782    ,7489    ,7943    ,8303    ,8931    ,9707    ,9791    ,10627   ,11644   ,11388   ,13015   ,\n    13210   ,6968    ,2044    ,1708    ,1442    ,2789    ,1741    ,-4439   ,-6997   ,-6013   ,-5986   ,-5270   ,-4610   ,-4063   ,-2935   ,\n    -2797   ,-2710   ,-1597   ,-849    ,-459    ,312     ,785     ,1000    ,1722    ,2331    ,2666    ,3668    ,4530    ,5277    ,6409    ,\n    4559    ,691     ,764     ,2464    ,1909    ,2669    ,4027    ,1930    ,-112    ,768     ,1456    ,1401    ,1978    ,2304    ,2461    ,\n    3129    ,3505    ,3553    ,3894    ,4158    ,4379    ,4987    ,5438    ,5680    ,6127    ,6455    ,6912    ,7302    ,7374    ,8033    ,\n    8217    ,7808    ,8884    ,8689    ,8838    ,10471   ,9568    ,11357   ,10769   ,369     ,-7909   ,-11215  ,-12316  ,-10770  ,-10339  ,\n    -9888   ,-8566   ,-7816   ,-6458   ,-5936   ,-9006   ,-12691  ,-13036  ,-11733  ,-10991  ,-10152  ,-9137   ,-8546   ,-7814   ,-6712   ,\n    -5865   ,-5182   ,-4308   ,-3394   ,-2434   ,-1552   ,-882    ,160     ,1143    ,1686    ,3217    ,3825    ,1447    ,436     ,1979    ,\n    2620    ,3364    ,4980    ,5973    ,7266    ,8948    ,9851    ,10590   ,11779   ,13070   ,14138   ,15047   ,16168   ,17394   ,18509   ,\n    19168   ,19873   ,20597   ,21194   ,22984   ,23573   ,25602   ,26637   ,29091   ,32767   ,14547   ,-1204   ,-7706   ,-27943  ,-32767  ,\n    -28661  ,-30993  ,-28841  ,-27894  ,-27155  ,-25429  ,-24556  ,-23694  ,-22568  ,-21188  ,-20252  ,-19089  ,-17833  ,-16830  ,-15829  ,\n    -14732  ,-13294  ,-12244  ,-11571  ,-10113  ,-9046   ,-8256   ,-6438   ,-5577   ,-4849   ,-3210   ,-2800   ,-644    ,839     ,-5533   ,\n    -10941  ,-8511   ,-6774   ,-6838   ,-5295   ,-4444   ,-3505   ,-1967   ,-1277   ,-10     ,1423    ,1885    ,2999    ,4530    ,5340    ,\n    6782    ,7494    ,3194    ,-3733   ,-6248   ,-4385   ,-3048   ,-2328   ,-392    ,678     ,1101    ,3285    ,4255    ,4787    ,7306    ,\n    4701    ,671     ,2343    ,2805    ,4766    ,5593    ,-1098   ,-3328   ,-1323   ,-1161   ,-43     ,829     ,1257    ,2053    ,2819    ,\n    3550    ,4438    ,5612    ,6509    ,7017    ,7584    ,8518    ,9364    ,9786    ,10675   ,11637   ,11753   ,12524   ,13594   ,13925   ,\n    14976   ,15472   ,16044   ,18022   ,17766   ,19352   ,20973   ,7765    ,-9042   ,-9970   ,-7151   ,-9095   ,-8263   ,-7219   ,-7602   ,\n    -6527   ,-6068   ,-5793   ,-4771   ,-4266   ,-3761   ,-3114   ,-2467   ,-1900   ,-1333   ,-517    ,-130    ,600     ,1470    ,1871    ,\n    3776    ,3501    ,-2924   ,-8400   ,-8554   ,-7734   ,-7014   ,-5952   ,-5195   ,-4547   ,-4791   ,-4691   ,-3464   ,-2636   ,-1703   ,\n    -464    ,90      ,820     ,2361    ,2989    ,3560    ,5269    ,5503    ,6201    ,8290    ,8001    ,9743    ,11424   ,3710    ,-2206   ,\n    1154    ,-80     ,-5200   ,-4266   ,-2290   ,-2605   ,-1330   ,73      ,-1759   ,-4560   ,-4629   ,-3488   ,-3269   ,-2688   ,-1848   ,\n    -1359   ,-498    ,268     ,781     ,1486    ,2009    ,2535    ,3318    ,4053    ,4754    ,5426    ,6125    ,6892    ,7486    ,8176    ,\n    8889    ,11311   ,11905   ,12962   ,13372   ,14472   ,15713   ,15747   ,16937   ,17113   ,14575   ,14915   ,16327   ,16093   ,18020   ,\n    18641   ,19055   ,21925   ,13634   ,-1786   ,-2869   ,-774    ,-4303   ,-3184   ,-7850   ,-14046  ,-12166  ,-11496  ,-10658  ,-9383   ,\n    -9255   ,-8205   ,-7119   ,-6359   ,-5765   ,-4401   ,-3776   ,-3535   ,-1550   ,-980    ,-674    ,783     ,-5499   ,-15780  ,-16575  ,\n    -13748  ,-14290  ,-13773  ,-14505  ,-17266  ,-17209  ,-16192  ,-16188  ,-15894  ,-15519  ,-14996  ,-14707  ,-14675  ,-13999  ,-13749  ,\n    -14132  ,-13708  ,-13021  ,-12795  ,-12425  ,-12063  ,-11915  ,-11758  ,-11689  ,-10957  ,-10467  ,-11425  ,-11125  ,-10103  ,-10089  ,\n    -8896   ,-7971   ,-7354   ,-5762   ,-8981   ,-15067  ,-14608  ,-11661  ,-11757  ,-10303  ,-8727   ,-8679   ,-5982   ,-4837   ,-4605   ,\n    251     ,-3438   ,-18230  ,-23774  ,-20746  ,-20805  ,-19944  ,-18121  ,-18134  ,-16623  ,-14806  ,-13927  ,-12542  ,-11485  ,-10047  ,\n    -8306   ,-7456   ,-6140   ,-4660   ,-3812   ,-2432   ,-708    ,467     ,1791    ,3367    ,3634    ,3551    ,4986    ,6495    ,7221    ,\n    8211    ,9610    ,10515   ,11048   ,12385   ,13402   ,14032   ,15448   ,16048   ,16971   ,18197   ,18243   ,20492   ,21172   ,20167   ,\n    23905   ,22712   ,23269   ,28983   ,23570   ,27669   ,26049   ,-1931   ,-11779  ,-7135   ,-7798   ,-5590   ,-5253   ,-4407   ,-2610   ,\n    -2015   ,-739    ,682     ,2126    ,3061    ,4108    ,5383    ,6260    ,7500    ,8964    ,10072   ,11258   ,12209   ,13386   ,14904   ,\n    15757   ,17265   ,18516   ,19198   ,21796   ,23113   ,24519   ,22560   ,-705    ,-29566  ,-32767  ,-26918  ,-29419  ,-28377  ,-25274  ,\n    -24650  ,-22580  ,-20776  ,-19077  ,-17249  ,-15629  ,-13135  ,-12048  ,-9471   ,-7404   ,-14104  ,-19453  ,-16123  ,-14435  ,-14256  ,\n    -11863  ,-10950  ,-9732   ,-7465   ,-6570   ,-5207   ,-3369   ,-2228   ,-555    ,1026    ,1526    ,1579    ,1977    ,3444    ,5131    ,\n    6157    ,7678    ,9419    ,10683   ,12352   ,13533   ,14758   ,16824   ,17299   ,18682   ,21195   ,21078   ,24152   ,26005   ,16284   ,\n    9454    ,12908   ,14278   ,14521   ,16519   ,17832   ,19578   ,20003   ,22223   ,23533   ,21810   ,25256   ,24313   ,25891   ,32767   ,\n    20817   ,5813    ,883     ,-1446   ,-403    ,-895    ,-623    ,194     ,-624    ,-307    ,-45     ,88      ,1089    ,2395    ,3239    ,\n    4464    ,4895    ,-3499   ,-2484   ,39      ,-792    ,-2072   ,-2084   ,-1008   ,1630    ,1676    ,2377    ,2347    ,-10871  ,-23601  ,\n    -20817  ,-19853  ,-23788  ,-21895  ,-22692  ,-27322  ,-27544  ,-27541  ,-26697  ,-23759  ,-26674  ,-29632  ,-27324  ,-26559  ,-26346  ,\n    -24867  ,-24710  ,-24917  ,-23448  ,-22297  ,-22572  ,-21027  ,-18882  ,-19274  ,-19236  ,-17834  ,-18077  ,-18144  ,-17632  ,-20007  ,\n    -21897  ,-20784  ,-19807  ,-18283  ,-17940  ,-18706  ,-15013  ,-12924  ,-14064  ,-10472  ,-9013   ,-10239  ,-6740   ,-3433   ,1081    ,\n    -1342   ,-21182  ,-32767  ,-27867  ,-27727  ,-28201  ,-25724  ,-26029  ,-22722  ,-19990  ,-20640  ,-16937  ,-13910  ,-15054  ,-15249  ,\n    -13572  ,-10648  ,-9851   ,-10986  ,-7774   ,-3652   ,-4309   ,-4042   ,-216    ,1754    ,2857    ,6012    ,5912    ,3772    ,7358    ,\n    10582   ,9993    ,12757   ,16407   ,15650   ,14194   ,18805   ,18399   ,9224    ,8106    ,9983    ,9748    ,11301   ,11439   ,12232   ,\n    13300   ,13704   ,14187   ,14918   ,16172   ,15894   ,16769   ,18803   ,18665   ,20345   ,15420   ,-4086   ,-16366  ,-12760  ,-10889  ,\n    -12065  ,-11139  ,-11578  ,-11989  ,-11300  ,-11208  ,-10719  ,-8965   ,-7242   ,-7956   ,-8602   ,-6249   ,-5407   ,-6037   ,-3596   ,\n    -1897   ,-3990   ,-4292   ,-994    ,1504    ,-599    ,-9485   ,-18953  ,-21189  ,-19906  ,-19925  ,-19513  ,-18113  ,-17901  ,-17471  ,\n    -15400  ,-17258  ,-25310  ,-31228  ,-30921  ,-29756  ,-29400  ,-28034  ,-27187  ,-26949  ,-25647  ,-24586  ,-24469  ,-23894  ,-22759  ,\n    -21678  ,-21116  ,-20708  ,-19475  ,-18174  ,-17440  ,-16387  ,-15322  ,-14948  ,-14271  ,-12442  ,-11300  ,-11919  ,-11821  ,-11206  ,\n    -10843  ,-8862   ,-7976   ,-7968   ,-5094   ,-3354   ,-2648   ,-788    ,-518    ,2776    ,3703    ,-7941   ,-16170  ,-12155  ,-8838   ,\n    -7498   ,-5687   ,-4495   ,-1942   ,-57     ,1395    ,1002    ,-5938   ,-11925  ,-11216  ,-9248   ,-8144   ,-7477   ,-6123   ,-3789   ,\n    -2935   ,-1856   ,42      ,376     ,899     ,2263    ,3594    ,5109    ,5682    ,6407    ,8197    ,9060    ,9923    ,11567   ,11785   ,\n    11769   ,13516   ,14578   ,14566   ,15723   ,16722   ,17461   ,19073   ,20210   ,22355   ,22903   ,23314   ,27379   ,24516   ,26125   ,\n    32767   ,20180   ,6241    ,3402    ,2621    ,3211    ,2538    ,3482    ,3799    ,3648    ,6227    ,6892    ,3744    ,-4246   ,-12820  ,\n    -13992  ,-11972  ,-12613  ,-1205   ,947     ,-281    ,-770    ,1242    ,822     ,1207    ,5238    ,5623    ,3003    ,3150    ,791     ,\n    -3861   ,-3996   ,-2697   ,-1973   ,-2173   ,-79     ,-148    ,-17211  ,-32767  ,-32747  ,-31568  ,-25276  ,-19188  ,-24985  ,-25647  ,\n    -19308  ,-22164  ,-23239  ,-17582  ,-22438  ,-27586  ,-21164  ,-20734  ,-24842  ,-21901  ,-22119  ,-20951  ,-9814   ,-8374   ,-17371  ,\n    -14014  ,-4940   ,-3806   ,-3628   ,-4547   ,-3806   ,5870    ,4770    ,-8488   ,-5604   ,336     ,-4185   ,2575    ,8555    ,1816    ,\n    1916    ,664     ,-6516   ,-3133   ,5384    ,14376   ,21612   ,19650   ,19316   ,22919   ,20696   ,20432   ,23791   ,13847   ,-6636   ,\n    -10743  ,-2414   ,-3350   ,2415    ,11060   ,-75     ,68      ,12858   ,2375    ,-7567   ,-4037   ,-3752   ,3850    ,5913    ,-4303   ,\n    -62     ,8207    ,8048    ,10249   ,7962    ,3200    ,6598    ,11233   ,8906    ,4339    ,6197    ,4864    ,3762    ,19972   ,24177   ,\n    11453   ,19942   ,24422   ,10452   ,15779   ,23742   ,15455   ,14999   ,22997   ,29512   ,30083   ,24978   ,22854   ,18383   ,16247   ,\n    25590   ,26038   ,13563   ,5442    ,564     ,-2419   ,-2325   ,-2021   ,4404    ,9823    ,-1261   ,-10079  ,-2367   ,-777    ,-2970   ,\n    4209    ,5214    ,-3194   ,-2795   ,8026    ,8307    ,4325    ,11702   ,13790   ,10871   ,14951   ,12788   ,7030    ,12402   ,15860   ,\n    14615   ,19381   ,11772   ,-13732  ,-27776  ,-27089  ,-29916  ,-30051  ,-23246  ,-21181  ,-21742  ,-20759  ,-20071  ,-15207  ,-13640  ,\n    -20437  ,-19891  ,-15838  ,-18719  ,-15038  ,-8891   ,-11703  ,-11638  ,-10246  ,-13277  ,-10428  ,-4784   ,-741    ,6002    ,9451    ,\n    8114    ,8142    ,9513    ,9856    ,8978    ,9407    ,8144    ,3627    ,3151    ,6086    ,12270   ,17341   ,9315    ,6913    ,18559   ,\n    17130   ,9466    ,9893    ,10505   ,18062   ,22278   ,12590   ,10047   ,11179   ,6190    ,6373    ,6268    ,2353    ,3965    ,9020    ,\n    9330    ,4984    ,5900    ,6782    ,3517    ,13796   ,22279   ,14336   ,19049   ,25834   ,14742   ,14487   ,22527   ,18047   ,15480   ,\n    22206   ,29889   ,30155   ,24288   ,23059   ,19831   ,15908   ,24474   ,27735   ,18077   ,15644   ,17248   ,14546   ,12986   ,11311   ,\n    15058   ,24892   ,20135   ,8605    ,16658   ,24023   ,15763   ,22167   ,32767   ,19664   ,11380   ,19271   ,22213   ,17703   ,9423    ,\n    6193    ,9416    ,9176    ,7777    ,3268    ,2421    ,-4333   ,-9380   ,-8673   ,-7062   ,-5666   ,-6019   ,-11799  ,-15772  ,-13335  ,\n    -14019  ,-13979  ,-6660   ,-4517   ,-5304   ,-2907   ,-5031   ,-4706   ,-4206   ,-13961  ,-20191  ,-18185  ,-14109  ,-8134   ,-8705   ,\n    -8446   ,-1591   ,-11230  ,-25196  ,-18674  ,-19182  ,-32767  ,-29644  ,-19570  ,-20428  ,-25153  ,-29458  ,-24178  ,-12531  ,-18439  ,\n    -28115  ,-19670  ,-14100  ,-14562  ,-9862   ,-14376  ,-18121  ,-7813   ,-8980   ,-19687  ,-14506  ,-7817   ,-13605  ,-14883  ,-11625  ,\n    -17741  ,-20125  ,-10116  ,-9046   ,-17462  ,-16242  ,-10762  ,-9822   ,-11088  ,-10243  ,-3137   ,-2529   ,-8616   ,-2887   ,-1892   ,\n    -12949  ,-6593   ,7501    ,3681    ,-4376   ,-5851   ,-11589  ,-21963  ,-23315  ,-20209  ,-25570  ,-23200  ,-11424  ,-14320  ,-17257  ,\n    -6216   ,-4906   ,-12511  ,-13208  ,-11154  ,-8241   ,-9471   ,-16995  ,-14006  ,-3222   ,-4240   ,-8014   ,-2179   ,2305    ,5174    ,\n    9436    ,728     ,-8700   ,2093    ,6983    ,-1108   ,7280    ,14262   ,2811    ,1424    ,8160    ,9237    ,13214   ,11157   ,6317    ,\n    16216   ,22521   ,13178   ,7252    ,9578    ,12116   ,13148   ,14267   ,18919   ,22727   ,16267   ,-2335   ,-18284  ,-20694  ,-18108  ,\n    -7781   ,-7610   ,-20986  ,-13910  ,-3296   ,-554    ,-2763   ,-10485  ,-2791   ,-646    ,-6776   ,2946    ,-1229   ,-16699  ,-11336  ,\n    -9600   ,-17884  ,-14552  ,-14296  ,-14157  ,2694    ,7496    ,-9269   ,-12136  ,-1326   ,2315    ,3861    ,1296    ,-1647   ,11083   ,\n    13744   ,-9412   ,-14504  ,-273    ,-2630   ,-2908   ,4753    ,477     ,-2458   ,-5214   ,-11850  ,-5459   ,4841    ,12310   ,22760   ,\n    23128   ,14865   ,13683   ,18742   ,22314   ,17858   ,7045    ,-853    ,-3932   ,-5908   ,-5753   ,1422    ,7104    ,890     ,-988    ,\n    7130    ,7324    ,1742    ,-4232   ,-8310   ,191     ,5338    ,-5502   ,-12246  ,-7184   ,3787    ,9005    ,471     ,-2307   ,6046    ,\n    11502   ,13253   ,4371    ,-7391   ,-3155   ,2510    ,5138    ,14493   ,16300   ,11940   ,11928   ,8913    ,9710    ,16835   ,13065   ,\n    5513    ,15635   ,32767   ,29783   ,13147   ,7961    ,8383    ,6302    ,13751   ,20028   ,12886   ,7452    ,4441    ,-2499   ,-5083   ,\n    -4267   ,2487    ,14591   ,8127    ,-5725   ,4840    ,13132   ,197     ,188     ,6403    ,-4311   ,-8002   ,-6423   ,-11799  ,-6644   ,\n    -4066   ,-9956   ,-2407   ,1354    ,-5481   ,2288    ,4094    ,-5758   ,7235    ,12596   ,-1548   ,7921    ,10428   ,-19379  ,-21922  ,\n    1418    ,-2621   ,-10194  ,-318    ,-2457   ,-11300  ,-14227  ,-19174  ,-19038  ,1556    ,18170   ,2566    ,-6132   ,3404    ,5234    ,\n    4415    ,5290    ,9373    ,5434    ,-8912   ,-12766  ,-9377   ,-11187  ,-12190  ,-13471  ,-21358  ,-24645  ,-24028  ,-25577  ,-14750  ,\n    -6919   ,-15423  ,-9930   ,-1973   ,-8033   ,-1014   ,-595    ,-18762  ,-17550  ,-10604  ,-14432  ,-5757   ,1771    ,-3904   ,-6133   ,\n    -10318  ,-13721  ,-8318   ,-17890  ,-32767  ,-18772  ,-3320   ,-13842  ,-26972  ,-25279  ,-7491   ,-958    ,-23765  ,-27695  ,-7584   ,\n    -4834   ,-2932   ,-3061   ,-14162  ,-628    ,9388    ,-13696  ,-16224  ,868     ,-7343   ,-17136  ,-8720   ,-11743  ,-24757  ,-17959  ,\n    -2834   ,-3365   ,-11275  ,-18210  ,-17573  ,-5521   ,-360    ,131     ,3397    ,-5071   ,-7254   ,-1210   ,-15310  ,-13535  ,17879   ,\n    19211   ,-3977   ,-8417   ,-8943   ,-17036  ,-16342  ,-8896   ,-11486  ,-23554  ,-19985  ,-815    ,1934    ,2412    ,18028   ,5183    ,\n    -21567  ,-7785   ,5853    ,-8872   ,-15613  ,-12265  ,-298    ,10868   ,353     ,-52     ,14378   ,15186   ,14470   ,2154    ,-18095  ,\n    -3722   ,11023   ,-4683   ,1423    ,19736   ,2936    ,-9270   ,9144    ,19705   ,16590   ,13893   ,11763   ,18580   ,30026   ,30223   ,\n    16018   ,-599    ,1193    ,12714   ,13805   ,19016   ,30705   ,28607   ,15008   ,-2782   ,-16947  ,-9837   ,802     ,-2259   ,-3344   ,\n    -7208   ,-5708   ,-10055  ,-32049  ,-11259  ,17805   ,-12976  ,-29708  ,-4984   ,1583    ,-8923   ,-11293  ,8544    ,24503   ,3229    ,\n    1913    ,18270   ,-10599  ,-19836  ,18652   ,31028   ,10620   ,-14183  ,-16648  ,-1750   ,-8777   ,-15249  ,-17173  ,-26987  ,-3817   ,\n    9711    ,-12708  ,5756    ,28642   ,2471    ,-9966   ,-1163   ,-61     ,-1180   ,-16474  ,-26967  ,-7234   ,7546    ,250     ,-569    ,\n    12117   ,22861   ,24174   ,8250    ,-12079  ,-2475   ,11257   ,-2353   ,7978    ,32767   ,10635   ,-6681   ,10003   ,10171   ,11429   ,\n    18744   ,3461    ,5805    ,29832   ,24497   ,-940    ,-11589  ,-2520   ,9037    ,7366    ,6279    ,16151   ,16788   ,2409    ,-3492   ,\n    2828    ,1750    ,910     ,11046   ,8836    ,-2618   ,5329    ,14470   ,2540    ,-9455   ,-12971  ,-12521  ,-4820   ,-11173  ,-26896  ,\n    -14662  ,-2554   ,-13209  ,-12600  ,-14957  ,-23712  ,-8802   ,-9854   ,-10088  ,11684   ,12825   ,1822    ,11493   ,8522    ,-4651   ,\n    -1618   ,-1860   ,-8447   ,-7394   ,-2819   ,-66     ,-2794   ,-5368   ,-3445   ,-8049   ,-80     ,18467   ,1300    ,-18160  ,-1365   ,\n    10254   ,1779    ,-8107   ,-8055   ,5318    ,6622    ,-13708  ,-14494  ,2187    ,1701    ,-558    ,-3739   ,-14119  ,-7292   ,-114    ,\n    -8101   ,-5546   ,3990    ,4528    ,-1570   ,-2739   ,366     ,-9680   ,-12407  ,-3071   ,-9458   ,-10628  ,-1150   ,-4806   ,-6752   ,\n    1075    ,55      ,-1697   ,2325    ,-8061   ,-19260  ,-11057  ,4215    ,12991   ,1060    ,-10434  ,6399    ,7916    ,-11637  ,-4944   ,\n    -3635   ,-20639  ,-12287  ,-9191   ,-25457  ,-18163  ,-14405  ,-26260  ,-7999   ,7211    ,-14451  ,-17860  ,1898    ,3422    ,2249    ,\n    1665    ,-3907   ,15360   ,20661   ,-18104  ,-23341  ,-3912   ,-17459  ,-9437   ,12385   ,-4880   ,-14681  ,-13893  ,-27721  ,-24846  ,\n    -9205   ,7590    ,21868   ,17563   ,12307   ,9593    ,4580    ,8860    ,4916    ,-2595   ,-35     ,-5643   ,-11073  ,-4758   ,13617   ,\n    24639   ,-7331   ,-22136  ,13924   ,9104    ,-24442  ,-25229  ,-22194  ,-5010   ,11032   ,-20387  ,-32767  ,2287    ,13541   ,-4095   ,\n    -10825  ,-9350   ,-10351  ,-4560   ,-323    ,-11349  ,-16199  ,-22292  ,-28909  ,9368    ,23173   ,-21243  ,-3675   ,27237   ,-10401  ,\n    -4471   ,27678   ,3662    ,-6708   ,7764    ,16509   ,32767   ,30135   ,13292   ,5633    ,-3602   ,-1196   ,7643    ,358     ,-7580   ,\n    -6236   ,800     ,-1517   ,-11912  ,2010    ,13487   ,8821    ,15917   ,20890   ,22526   ,20343   ,11855   ,6534    ,4100    ,241     ,\n    -9413   ,-5216   ,2287    ,82      ,15333   ,15332   ,-3361   ,12070   ,14697   ,-13792  ,-18007  ,-14918  ,-8895   ,2343    ,-13159  ,\n    -18433  ,-3842   ,-4713   ,2992    ,7538    ,-11107  ,-10749  ,3768    ,662     ,-9327   ,-7860   ,-68     ,-5362   ,-1064   ,19561   ,\n    9352    ,-1593   ,16343   ,11932   ,3327    ,12789   ,3580    ,-2651   ,9463    ,17394   ,20342   ,12278   ,7999    ,10471   ,-3613   ,\n    831     ,21971   ,9282    ,-3378   ,3606    ,-1054   ,-2446   ,-1990   ,-8866   ,3709    ,12274   ,-4994   ,-4846   ,9613    ,4201    ,\n    7560    ,27302   ,15406   ,-12153  ,-4016   ,8660    ,-5479   ,-6285   ,7901    ,2942    ,-5418   ,-3664   ,636     ,10413   ,8588    ,\n    -4385   ,3261    ,16470   ,8322    ,-7788   ,-14506  ,-15520  ,-13673  ,-10741  ,-6433   ,-6365   ,-5147   ,-4679   ,-2427   ,-1887   ,\n    -9      ,-280    ,-8605   ,-3734   ,8613    ,11928   ,13735   ,9916    ,5950    ,7756    ,665     ,24      ,13443   ,9501    ,-1025   ,\n    9778    ,22551   ,17958   ,-4467   ,-24908  ,-6211   ,21894   ,3770    ,-21363  ,-11833  ,5855    ,14994   ,4371    ,-17433  ,-6607   ,\n    20411   ,15472   ,-4898   ,-4942   ,12569   ,17708   ,6009    ,104     ,-3202   ,-5944   ,-2158   ,1294    ,2278    ,-4153   ,-10039  ,\n    3462    ,21793   ,14420   ,-4005   ,-1294   ,8228    ,8455    ,10244   ,12931   ,11596   ,7390    ,-2837   ,-14536  ,-9915   ,13520   ,\n    22515   ,-1670   ,-21749  ,-16055  ,-12641  ,-12829  ,-1572   ,-4539   ,-22744  ,-13003  ,13546   ,18090   ,21745   ,32767   ,15271   ,\n    -13172  ,-12333  ,3925    ,8390    ,-8497   ,-23293  ,-1921   ,19044   ,1710    ,-9295   ,6940    ,21110   ,17722   ,-10659  ,-32767  ,\n    -14751  ,-406    ,-5463   ,8804    ,13577   ,-9010   ,-11943  ,1452    ,7737    ,12039   ,8096    ,4801    ,14350   ,20746   ,22765   ,\n    18252   ,-4974   ,-21220  ,-13412  ,1032    ,5577    ,2307    ,9587    ,12908   ,6276    ,16346   ,26981   ,12762   ,117     ,9783    ,\n    8962    ,-7976   ,-3435   ,14961   ,12653   ,-4229   ,-2595   ,11729   ,12021   ,14966   ,18597   ,6488    ,12483   ,20796   ,-5292   ,\n    -20623  ,-17653  ,-25166  ,-16818  ,1488    ,7609    ,18307   ,15301   ,-5980   ,781     ,22620   ,13567   ,-13624  ,-26023  ,-11388  ,\n    10167   ,6083    ,1408    ,20754   ,20015   ,4050    ,19010   ,24015   ,-9491   ,-23469  ,-1870   ,16867   ,9351    ,-19069  ,-15711  ,\n    22319   ,15187   ,-11549  ,7364    ,12885   ,-389    ,21194   ,23627   ,-3750   ,7216    ,24067   ,2193    ,-5533   ,18374   ,18586   ,\n    -1127   ,-516    ,-5650   ,-14848  ,7912    ,9799    ,-22112  ,-14553  ,9167    ,-455    ,-8638   ,5455    ,23448   ,22977   ,10740   ,\n    16102   ,15119   ,-8421   ,-11980  ,9775    ,23517   ,6150    ,-19852  ,-6694   ,10841   ,-3488   ,-11874  ,-14481  ,-11007  ,3820    ,\n    -8495   ,-14253  ,14981   ,24640   ,18819   ,14218   ,2544    ,6383    ,2822    ,-20188  ,-15843  ,4406    ,7734    ,1654    ,-3010   ,\n    1523    ,9508    ,12554   ,5007    ,-8122   ,3830    ,17995   ,1994    ,6206    ,24669   ,5979    ,-10485  ,-2710   ,3684    ,11259   ,\n    7143    ,-3777   ,9878    ,23171   ,13381   ,5491    ,13061   ,12752   ,-9061   ,-11500  ,-16910  ,-26516  ,-21394  ,-25020  ,-28449  ,\n    -20799  ,-22955  ,-22058  ,-7377   ,1232    ,516     ,2960    ,737     ,-9251   ,-12410  ,-13025  ,-16659  ,-11180  ,1271    ,11930   ,\n    20493   ,21307   ,18099   ,15902   ,1248    ,-17376  ,-10983  ,10967   ,16025   ,2125    ,-7770   ,-1012   ,6175    ,-3910   ,-12924  ,\n    -1295   ,12599   ,7633    ,-9398   ,-14022  ,2917    ,11025   ,-2244   ,-1203   ,11685   ,353     ,-14560  ,-6022   ,-2465   ,-11024  ,\n    -321    ,17325   ,10669   ,-4970   ,-11540  ,-12554  ,-7571   ,-1377   ,1341    ,-1104   ,-6842   ,-1263   ,5012    ,-2257   ,-1022   ,\n    10165   ,16913   ,16325   ,-2656   ,-23783  ,-21954  ,-18271  ,-20052  ,-11479  ,-11068  ,-17924  ,-14800  ,-10882  ,-9226   ,-12305  ,\n    -14770  ,-13187  ,-16705  ,-14644  ,-10353  ,-20208  ,-23216  ,-6535   ,4395    ,3769    ,4914    ,7414    ,12584   ,13886   ,-16     ,\n    -10569  ,-6266   ,-6540   ,-14734  ,-16459  ,-10541  ,-11897  ,-24915  ,-28739  ,-24526  ,-26679  ,-11228  ,18139   ,23643   ,17646   ,\n    17213   ,11972   ,4899    ,-2616   ,-5716   ,977     ,-3256   ,-14046  ,-7354   ,1449    ,6880    ,13027   ,-2569   ,-19262  ,-8172   ,\n    -6557   ,-25143  ,-30567  ,-21175  ,-3951   ,1877    ,-18522  ,-21407  ,-1336   ,-3174   ,-9056   ,-4494   ,-11551  ,-9466   ,20      ,\n    -12606  ,-19818  ,-19750  ,-32767  ,-17130  ,10733   ,2060    ,7071    ,26417   ,4442    ,-15394  ,-4328   ,311     ,-3059   ,-6750   ,\n    338     ,26982   ,32767   ,9977    ,763     ,-2373   ,-12471  ,-6151   ,1116    ,-8605   ,-6947   ,3911    ,-161    ,-5885   ,-30     ,\n    9305    ,8725    ,-4297   ,-8473   ,3778    ,12940   ,12355   ,15672   ,26713   ,23376   ,3653    ,-647    ,4883    ,-3371   ,-5470   ,\n    5142    ,3630    ,-5615   ,-5704   ,2688    ,8953    ,1323    ,-11503  ,-14786  ,-11514  ,-5103   ,6484    ,16791   ,16564   ,10506   ,\n    9672    ,14260   ,14038   ,3216    ,-7701   ,-8146   ,-7138   ,-13542  ,-19707  ,-17961  ,-10212  ,-8991   ,-19385  ,-22369  ,-15292  ,\n    -15540  ,-17443  ,-14549  ,-5979   ,11118   ,15571   ,10081   ,14056   ,-2007   ,-31402  ,-23078  ,-1072   ,-2085   ,-4579   ,-6031   ,\n    -16965  ,-21564  ,-21603  ,-28431  ,-19760  ,9659    ,20472   ,8535    ,7171    ,14862   ,11362   ,-237    ,-6553   ,-3337   ,-493    ,\n    -7602   ,-12355  ,-5158   ,-838    ,-3593   ,-879    ,5270    ,7684    ,6057    ,2320    ,-11279  ,-13506  ,-7621   ,-6869   ,-13871  ,\n    -19115  ,-13782  ,-4862   ,835     ,5881    ,3810    ,-2680   ,1966    ,1433    ,-14018  ,-19495  ,-17739  ,-13636  ,-7576   ,-8224   ,\n    -754    ,9019    ,9129    ,7436    ,3748    ,669     ,279     ,2125    ,11106   ,26592   ,30624   ,12105   ,-4076   ,-1247   ,2392    ,\n    3931    ,13917   ,20087   ,12116   ,4491    ,12030   ,17656   ,-113    ,-14828  ,-806    ,15395   ,7175    ,-14634  ,-17283  ,2991    ,\n    9613    ,6382    ,12437   ,5372    ,-347    ,11713   ,3160    ,-12456  ,-353    ,6198    ,-5979   ,-3403   ,11630   ,9602    ,-257    ,\n    4585    ,4060    ,-4515   ,4502    ,8002    ,-5809   ,-5807   ,-2963   ,-9192   ,-5152   ,2732    ,8814    ,8292    ,-1138   ,851     ,\n    -4076   ,-22787  ,-16788  ,3115    ,9674    ,1517    ,-16243  ,-16700  ,-4516   ,-5137   ,429     ,5033    ,-8193   ,-5450   ,8579    ,\n    9813    ,19725   ,29350   ,13343   ,-8344   ,-16027  ,-8890   ,-4311   ,-22969  ,-32767  ,-11125  ,360     ,-998    ,14350   ,24694   ,\n    21148   ,21888   ,7393    ,-18131  ,-11496  ,2699    ,-8476   ,-5245   ,4978    ,-11512  ,-16203  ,-4192   ,-859    ,7049    ,5571    ,\n    -2918   ,10912   ,21908   ,15793   ,7831    ,-6985   ,-20493  ,-19228  ,-12578  ,-1036   ,12099   ,9948    ,10988   ,22780   ,14639   ,\n    -8099   ,-20096  ,-24252  ,-27089  ,-16664  ,6250    ,18202   ,14060   ,9480    ,8757    ,7558    ,4802    ,-6454   ,-25080  ,-28465  ,\n    -11486  ,412     ,3950    ,20030   ,32767   ,17974   ,7195    ,15120   ,6954    ,-4814   ,7947    ,23773   ,25652   ,8367    ,-8989   ,\n    6259    ,11929   ,-15897  ,-17240  ,4752    ,12967   ,22634   ,26709   ,17687   ,20550   ,27529   ,18293   ,8945    ,17776   ,25362   ,\n    14453   ,5587    ,251     ,-11924  ,-1841   ,21869   ,10247   ,-13383  ,-9967   ,-5222   ,-8960   ,-1437   ,6628    ,7828    ,13137   ,\n    12882   ,4647    ,5084    ,6649    ,6706    ,21858   ,25865   ,-1765   ,-14113  ,4501    ,15048   ,9546    ,-3117   ,-12912  ,-109    ,\n    14963   ,3707    ,-6195   ,8103    ,19427   ,6762    ,-10534  ,-7386   ,6420    ,5308    ,-7223   ,-9120   ,-1202   ,140     ,-654    ,\n    5975    ,12601   ,18713   ,19644   ,2079    ,-11199  ,-558    ,8120    ,9276    ,16178   ,13559   ,1587    ,601     ,3931    ,-1095   ,\n    -9768   ,-12718  ,-4355   ,2656    ,-5300   ,-12206  ,-7945   ,-6505   ,-8449   ,-8775   ,-14986  ,-10334  ,-3776   ,-7354   ,-10056  ,\n    -9163   ,-15172  ,-9521   ,8741    ,7272    ,63      ,9090    ,10052   ,5792    ,6993    ,-4260   ,-17027  ,-16309  ,-2586   ,8290    ,\n    -536    ,-7003   ,-8161   ,-15275  ,-13477  ,-3527   ,-381    ,-5406   ,-7167   ,2964    ,13904   ,7364    ,-7216   ,-8541   ,-801    ,\n    2126    ,-1933   ,-3242   ,4215    ,8850    ,9246    ,15000   ,11810   ,-6507   ,-15770  ,-10952  ,-6966   ,-8481   ,-15681  ,-17030  ,\n    -3312   ,6079    ,2753    ,3962    ,8728    ,7520    ,9752    ,12593   ,2033    ,-10492  ,-12965  ,-17092  ,-21265  ,-7357   ,-1893   ,\n    -20255  ,-21298  ,-13849  ,-21635  ,-24711  ,-20225  ,-14936  ,-6923   ,-1939   ,-11774  ,-22186  ,-6886   ,8680    ,1943    ,1869    ,\n    8316    ,4628    ,530     ,-5850   ,-9184   ,-5351   ,-8867   ,-9508   ,-7123   ,-12478  ,-12758  ,-17271  ,-28261  ,-30647  ,-32767  ,\n    -18136  ,16026   ,28027   ,20457   ,12544   ,5785    ,7543    ,2453    ,-9145   ,-5893   ,-5670   ,-13755  ,-9035   ,1343    ,8135    ,\n    8120    ,-2371   ,-2916   ,5865    ,-5694   ,-24747  ,-29159  ,-25079  ,-10682  ,-6925   ,-25415  ,-19657  ,921     ,-7333   ,-11706  ,\n    -3035   ,-9566   ,-8103   ,912     ,-10304  ,-20130  ,-19991  ,-25669  ,-16846  ,5043    ,2814    ,-9003   ,-943    ,4785    ,-1647   ,\n    2097    ,10469   ,2406    ,-10850  ,13      ,27727   ,32767   ,15776   ,7147    ,-1093   ,-13979  ,-7081   ,2890    ,-8762   ,-13337  ,\n    -1275   ,2166    ,-3036   ,-11843  ,-15747  ,3674    ,19755   ,6611    ,1383    ,11377   ,1587    ,137     ,29110   ,27263   ,-7494   ,\n    -7365   ,6065    ,-7966   ,-10797  ,2232    ,-1473   ,-4321   ,989     ,1221    ,12160   ,19315   ,6219    ,-228    ,-3670   ,-10103  ,\n    -2617   ,8380    ,14552   ,16365   ,8331    ,8153    ,19428   ,18126   ,9549    ,-2336   ,-21026  ,-21406  ,-12425  ,-20283  ,-21248  ,\n    -10501  ,-12006  ,-11524  ,-2037   ,-8446   ,-20248  ,-10619  ,-469    ,-4063   ,3410    ,14872   ,14802   ,14643   ,1893    ,-21378  ,\n    -19947  ,-3869   ,-148    ,-1642   ,-7968   ,-19537  ,-21719  ,-21985  ,-28664  ,-24605  ,-4334   ,17215   ,24034   ,12637   ,2978    ,\n    7419    ,8556    ,398     ,-3395   ,-3422   ,-5380   ,-8223   ,-10259  ,-1236   ,12057   ,1096    ,-14043  ,5702    ,25611   ,6756    ,\n    -21687  ,-27888  ,-12562  ,-1774   ,-16695  ,-27888  ,-15586  ,-6325   ,-5063   ,-5353   ,-9258   ,-2554   ,5218    ,-8799   ,-18880  ,\n    -7249   ,-4802   ,-15801  ,-11618  ,-5404   ,-14971  ,-9562   ,9238    ,6340    ,-1718   ,978     ,-2756   ,-9126   ,-7637   ,7198    ,\n    22750   ,13108   ,2814    ,2599    ,-16178  ,-16793  ,15404   ,19007   ,-2404   ,-7870   ,-4041   ,-2588   ,-5592   ,-8119   ,-5269   ,\n    -3593   ,61      ,3227    ,-1539   ,1350    ,12392   ,11756   ,3265    ,-1270   ,-1458   ,-3674   ,-16570  ,-24773  ,-10050  ,1163    ,\n    -8683   ,-8363   ,6852    ,10678   ,10842   ,8376    ,-8413   ,-4712   ,14240   ,-3369   ,-20160  ,-5520   ,-11902  ,-24763  ,-6981   ,\n    674     ,-6615   ,-5982   ,-8919   ,-4159   ,529     ,-9987   ,-12523  ,-13146  ,-17715  ,-17912  ,-20762  ,-10864  ,5570    ,2122    ,\n    -3706   ,-2078   ,-1709   ,1611    ,3837    ,2922    ,171     ,-1798   ,6737    ,8353    ,1720    ,2091    ,-15835  ,-29813  ,-26293  ,\n    -27583  ,-16044  ,-9472   ,-6687   ,-6367   ,-13993  ,254     ,10361   ,10246   ,12970   ,6943    ,9454    ,5996    ,-21377  ,-23524  ,\n    9072    ,17320   ,-8308   ,-26158  ,-10367  ,19616   ,8933    ,-25819  ,-16670  ,5006    ,416     ,4428    ,1844    ,-13101  ,5187    ,\n    15156   ,-13781  ,-9988   ,18231   ,5836    ,-10492  ,-4627   ,-19685  ,-32684  ,-7672   ,6970    ,-5959   ,-10805  ,-9879   ,-7834   ,\n    -5303   ,-7915   ,6907    ,15622   ,-4409   ,821     ,5418    ,-26657  ,-12109  ,32767   ,20314   ,-6726   ,-8465   ,-10965  ,-12632  ,\n    -7564   ,-4190   ,-12152  ,-21164  ,-6608   ,7480    ,2137    ,14978   ,31458   ,7839    ,-14676  ,-2869   ,4554    ,-9991   ,-31476  ,\n    -32767  ,-3628   ,3331    ,-17141  ,-4332   ,15505   ,7894    ,9383    ,608     ,-24840  ,-6841   ,10061   ,-19999  ,-15336  ,10632   ,\n    -10827  ,-20099  ,-1793   ,-3356   ,-4076   ,-3676   ,-9129   ,4206    ,15164   ,6214    ,-10060  ,-22469  ,-17530  ,-15466  ,-19155  ,\n    -789    ,10908   ,17      ,-3377   ,-3813   ,-8713   ,-6395   ,2461    ,5885    ,-837    ,1694    ,13509   ,9954    ,-4664   ,-11563  ,\n    -6142   ,2495    ,25      ,-12229  ,-15639  ,-14362  ,-18266  ,-3116   ,14473   ,1607    ,-4114   ,2560    ,-1014   ,11013   ,14048   ,\n    -13315  ,-18367  ,-9173   ,-14563  ,-9626   ,-2861   ,-3817   ,3438    ,5331    ,3574    ,4428    ,-15903  ,-28298  ,2061    ,19750   ,\n    -5241   ,-26685  ,-16585  ,12260   ,14771   ,-13140  ,-14963  ,-6399   ,-11390  ,5227    ,7040    ,-13127  ,8307    ,23203   ,-5697   ,\n    -7099   ,10841   ,2132    ,-8715   ,-6511   ,-1579   ,1900    ,245     ,-3512   ,-6199   ,-9607   ,-10899  ,-5756   ,-4349   ,-10078  ,\n    501     ,12427   ,-2021   ,-7032   ,-3399   ,-16143  ,-2061   ,24344   ,14031   ,1031    ,-2573   ,-4709   ,6347    ,-1258   ,-20277  ,\n    -11887  ,-6501   ,-13106  ,-7235   ,-1832   ,5120    ,15662   ,5711    ,-7501   ,1809    ,10717   ,2228    ,-14114  ,-27813  ,-20133  ,\n    -6104   ,-19497  ,-22390  ,-664    ,-3819   ,-7709   ,3219    ,-15490  ,-22832  ,1353    ,-6468   ,-12159  ,12708   ,5096    ,-7986   ,\n    6655    ,-2492   ,-19806  ,-10612  ,-2594   ,-1685   ,63      ,-4908   ,-14037  ,-22976  ,-29391  ,-32431  ,-29916  ,-11529  ,13758   ,\n    19470   ,8611    ,5102    ,9799    ,7497    ,6       ,1709    ,4393    ,-6354   ,-11226  ,-4577   ,-597    ,8208    ,2074    ,-17663  ,\n    -3334   ,14362   ,-9910   ,-32767  ,-29054  ,-23650  ,-15236  ,-14687  ,-21808  ,-5297   ,3319    ,-6088   ,-1253   ,-6803   ,-20369  ,\n    -10219  ,-227    ,-10333  ,-20760  ,-20849  ,-18243  ,-7917   ,5437    ,-3801   ,-9406   ,13548   ,15470   ,-2747   ,2335    ,4538    ,\n    -7307   ,-4473   ,10548   ,23372   ,19585   ,5139    ,-1269   ,-10527  ,-10929  ,6159    ,-948    ,-17106  ,-3423   ,4774    ,-4314   ,\n    -7240   ,-11772  ,-3675   ,20288   ,15102   ,-3090   ,5716    ,4656    ,-5993   ,20156   ,32767   ,-4185   ,-15407  ,4426    ,-5206   ,\n    -15953  ,-3623   ,-4533   ,-8468   ,1157    ,2409    ,8802    ,23659   ,9130    ,-7793   ,9410    ,15854   ,-3525   ,-17394  ,-22790  ,\n    -21864  ,-23718  ,-17626  ,8333    ,2762    ,-18237  ,406     ,12326   ,17040   ,29819   ,-1995   ,-24389  ,-3944   ,-10165  ,-15900  ,\n    601     ,-810    ,-17339  ,-25990  ,-17282  ,-21857  ,-29758  ,-7546   ,-3756   ,-14299  ,3021    ,-4979   ,-27333  ,-6195   ,761     ,\n    -13111  ,6522    ,17442   ,5662    ,6907    ,-3721   ,-27384  ,-23553  ,-3852   ,-1140   ,-8418   ,-10711  ,-13491  ,-14372  ,-14148  ,\n    -25547  ,-23241  ,8619    ,25162   ,16720   ,10666   ,2364    ,1025    ,17970   ,22414   ,6780    ,-957    ,-4641   ,-17786  ,-16986  ,\n    5292    ,14159   ,-346    ,-10883  ,-9012   ,-6594   ,-8722   ,-16494  ,-23335  ,-17852  ,-5153   ,-3350   ,-14361  ,-13686  ,3395    ,\n    6894    ,-7669   ,-17461  ,-8975   ,7646    ,3084    ,-9502   ,-9778   ,-22290  ,-19900  ,8562    ,-827    ,-16188  ,8486    ,7175    ,\n    -3833   ,10445   ,12298   ,2655    ,-1088   ,2295    ,21328   ,32767   ,21419   ,5936    ,-8538   ,-18576  ,-14263  ,-1598   ,3986    ,\n    2875    ,6138    ,3280    ,-5857   ,474     ,6335    ,3943    ,15941   ,20290   ,12490   ,20552   ,19173   ,10115   ,18091   ,821     ,\n    -24673  ,-9303   ,-4477   ,-16038  ,-10732  ,-10653  ,-7827   ,-3250   ,-9715   ,-8735   ,-7119   ,-7539   ,6581    ,14218   ,-3691   ,\n    -13762  ,-6509   ,-8607   ,-9072   ,-5619   ,-14903  ,-12886  ,-1146   ,-11130  ,-17192  ,-4543   ,-4478   ,-6008   ,1042    ,-6846   ,\n    -11644  ,-1739   ,-4298   ,-7042   ,2158    ,-4291   ,-16700  ,-9224   ,158     ,226     ,591     ,-3891   ,-12704  ,-18255  ,-22670  ,\n    -16115  ,5867    ,17101   ,6150    ,-5565   ,-8692   ,-11943  ,-13396  ,-10685  ,-12831  ,-18293  ,-16383  ,-3387   ,14406   ,18376   ,\n    9597    ,6691    ,-3781   ,-21372  ,-19288  ,-16973  ,-22566  ,-9453   ,650     ,-4944   ,2017    ,12594   ,11628   ,8358    ,386     ,\n    -11515  ,-16737  ,-14149  ,-11541  ,-14355  ,-15970  ,-14606  ,-15856  ,-12986  ,-1603   ,10776   ,13806   ,4822    ,2876    ,15822   ,\n    20373   ,11541   ,3907    ,-5765   ,-16669  ,-14939  ,-5709   ,644     ,8831    ,11976   ,-98     ,-8018   ,3808    ,16356   ,14576   ,\n    9755    ,11443   ,16100   ,21894   ,25865   ,21503   ,10894   ,-2287   ,-9577   ,-5637   ,-9506   ,-16663  ,-9918   ,-265    ,6109    ,\n    5549    ,6474    ,13185   ,13386   ,6183    ,-6687   ,-15175  ,-24243  ,-32767  ,-14709  ,8564    ,10184   ,14819   ,19954   ,8158    ,\n    6995    ,6671    ,-17519  ,-15205  ,13575   ,3342    ,-17852  ,-1429   ,22869   ,27775   ,17952   ,10401   ,8499    ,-2349   ,-2433   ,\n    19206   ,29592   ,27845   ,20834   ,-1030   ,-1691   ,23771   ,18859   ,-1924   ,738     ,7707    ,19113   ,22202   ,-6250   ,-7055   ,\n    22047   ,7042    ,-9105   ,16932   ,21451   ,5432    ,5196    ,-8123   ,-22619  ,-1575   ,20405   ,13842   ,-1389   ,-6014   ,4349    ,\n    10189   ,3967    ,7229    ,9549    ,4296    ,7958    ,-4450   ,-26650  ,-7507   ,24147   ,17184   ,-4850   ,-13547  ,-14984  ,-13749  ,\n    -6392   ,273     ,-7290   ,-16294  ,-2602   ,18044   ,23515   ,29323   ,31338   ,1902    ,-25965  ,-8035   ,14104   ,-2211   ,-25144  ,\n    -25629  ,-9911   ,3155    ,-2107   ,-3725   ,9979    ,14525   ,16177   ,12216   ,-6063   ,1991    ,17877   ,-2136   ,-14698  ,-14717  ,\n    -19468  ,-10653  ,7668    ,13009   ,9354    ,1218    ,3730    ,6894    ,9       ,9320    ,11259   ,-15129  ,-26900  ,-20106  ,-18985  ,\n    -13554  ,595     ,3416    ,-7093   ,-9377   ,452     ,7974    ,5420    ,-1987   ,-4610   ,-1564   ,5339    ,10527   ,4774    ,-2098   ,\n    -6231   ,-10478  ,-9827   ,-18253  ,-21419  ,-14476  ,-25564  ,-28140  ,-14669  ,-12237  ,-16653  ,-27235  ,-29760  ,-4211   ,12722   ,\n    -1104   ,-8454   ,-3993   ,-305    ,1930    ,-10229  ,-18417  ,-9309   ,-10127  ,-13586  ,-5215   ,-6306   ,-13701  ,-15664  ,-25805  ,\n    -32756  ,-18081  ,-8268   ,-17602  ,-18220  ,-8519   ,-12350  ,-24961  ,-27084  ,-15781  ,-3681   ,-1121   ,-2350   ,-4844   ,-17997  ,\n    -32767  ,-23703  ,1289    ,3877    ,-15701  ,-23347  ,-17928  ,-16639  ,-18602  ,-20701  ,-18473  ,-11142  ,-12454  ,-16594  ,-5181   ,\n    7594    ,6804    ,861     ,-9813   ,-17177  ,-11149  ,-15239  ,-30975  ,-24811  ,-8338   ,-8899   ,-9077   ,737     ,5539    ,5251    ,\n    -18     ,-12215  ,-16314  ,-9965   ,-6868   ,-5183   ,-3388   ,-9423   ,-18274  ,-19007  ,-10227  ,-2224   ,-5930   ,-10969  ,-2283   ,\n    7476    ,2522    ,-5466   ,-5219   ,-4150   ,-13376  ,-21929  ,-14210  ,-9547   ,164     ,18543   ,3180    ,-15399  ,1186    ,15473   ,\n    14253   ,12408   ,3280    ,-11904  ,-10019  ,9763    ,19172   ,9715    ,-4198   ,-14067  ,-18376  ,-22444  ,-26626  ,-19864  ,-1569   ,\n    15501   ,18033   ,10888   ,14188   ,23920   ,17688   ,967     ,-8059   ,-10778  ,-11559  ,-12689  ,-8321   ,5873    ,12048   ,11120   ,\n    16353   ,22554   ,28219   ,17085   ,-12635  ,-22382  ,-18371  ,-23451  ,-20394  ,-12391  ,-11165  ,-12310  ,-11929  ,-424    ,7666    ,\n    2031    ,4601    ,3271    ,-11274  ,-12968  ,-9311   ,-8383   ,999     ,7120    ,11339   ,21905   ,25954   ,24023   ,19086   ,9043    ,\n    4826    ,3855    ,3447    ,18496   ,32767   ,19978   ,1997    ,862     ,2413    ,3526    ,11273   ,13254   ,5390    ,1438    ,4739    ,\n    6669    ,-2634   ,-16080  ,-6732   ,20502   ,24990   ,5253    ,-5340   ,-5581   ,-5654   ,2913    ,9439    ,-1850   ,-15459  ,-18045  ,\n    -13765  ,-10886  ,-15748  ,-16155  ,-7695   ,-4094   ,3046    ,15039   ,16465   ,15203   ,11137   ,4630    ,10926   ,5629    ,-18449  ,\n    -20703  ,-12926  ,-19041  ,-13290  ,-5018   ,-19673  ,-27016  ,-11047  ,3909    ,14227   ,19414   ,10836   ,5479    ,4910    ,-11799  ,\n    -20214  ,-3751   ,10473   ,12680   ,15274   ,10339   ,2727    ,1785    ,-12634  ,-25283  ,-3529   ,10041   ,-5692   ,-12208  ,-12360  ,\n    -20652  ,-21843  ,-9980   ,-2140   ,-1661   ,-1048   ,-4456   ,-5449   ,-5755   ,-14095  ,-19894  ,-23703  ,-23231  ,-11547  ,-8302   ,\n    -8237   ,3310    ,3088    ,-5995   ,-6631   ,-8390   ,-11240  ,-17078  ,-20747  ,-5577   ,3504    ,-10455  ,-19040  ,-11812  ,-1661   ,\n    -1538   ,-10264  ,-10429  ,-3996   ,-1738   ,-4210   ,-11160  ,-10060  ,-2505   ,-6562   ,-8720   ,-3135   ,-10744  ,-18998  ,-16220  ,\n    -24464  ,-32767  ,-18866  ,-9544   ,-20617  ,-26913  ,-19584  ,-13676  ,-17934  ,-23533  ,-18326  ,-10191  ,-8697   ,-7087   ,-5012   ,\n    -11203  ,-21931  ,-21082  ,-9643   ,-10243  ,-21357  ,-21786  ,-16762  ,-14929  ,-11918  ,-14853  ,-18921  ,-9651   ,-3642   ,-11793  ,\n    -14362  ,-8448   ,-4300   ,-2765   ,-9493   ,-17847  ,-14918  ,-16399  ,-26721  ,-23045  ,-11543  ,-9818   ,-8509   ,-5568   ,-6622   ,\n    -3758   ,-1295   ,-5478   ,-4412   ,-281    ,-1206   ,867     ,1617    ,-6258   ,-11943  ,-12084  ,-9769   ,-4662   ,-4321   ,-7603   ,\n    -4121   ,-2122   ,-6834   ,-9812   ,-9483   ,-3082   ,539     ,-1278   ,914     ,-4229   ,-3492   ,11802   ,10745   ,2464    ,6796    ,\n    9025    ,9359    ,10435   ,-1205   ,-15720  ,-15194  ,-8135   ,-4151   ,-2746   ,-6651   ,-12599  ,-8193   ,6616    ,11151   ,232     ,\n    -566    ,14875   ,22796   ,17702   ,14057   ,16441   ,17994   ,11885   ,-370    ,-7356   ,-2629   ,2266    ,942     ,3815    ,6800    ,\n    3726    ,4889    ,3027    ,-2896   ,8423    ,22394   ,18734   ,14882   ,14536   ,10616   ,12079   ,13521   ,8045    ,10271   ,17310   ,\n    10425   ,781     ,5857    ,15842   ,16194   ,3683    ,-5776   ,3161    ,9584    ,-340    ,-7847   ,-4385   ,8580    ,17525   ,6693    ,\n    32      ,11305   ,15959   ,11379   ,4887    ,-1102   ,8368    ,17787   ,6752    ,1700    ,3745    ,-5731   ,1169    ,19880   ,15997   ,\n    16653   ,29385   ,18107   ,2128    ,5998    ,10787   ,9020    ,4990    ,9099    ,27434   ,32767   ,16669   ,7852    ,7526    ,4105    ,\n    4650    ,3188    ,-2578   ,3012    ,11725   ,10423   ,9387    ,10176   ,10245   ,11999   ,5417    ,-1295   ,8488    ,14040   ,11891   ,\n    23655   ,20935   ,-8853   ,-12397  ,11489   ,12259   ,-3240   ,-4828   ,2080    ,5541    ,2319    ,-2652   ,1536    ,8940    ,8286    ,\n    5030    ,3874    ,3097    ,1124    ,-6515   ,-14594  ,-17677  ,-21790  ,-16550  ,-1391   ,-1129   ,-9297   ,-12543  ,-16465  ,-15688  ,\n    -9283   ,-6732   ,-6931   ,-5612   ,-6599   ,-8979   ,-9513   ,-12429  ,-18740  ,-22354  ,-19209  ,-13678  ,-11106  ,-8190   ,-3550   ,\n    -5207   ,-11349  ,-12240  ,-14325  ,-18505  ,-13671  ,-8828   ,-7514   ,-4547   ,-13029  ,-21995  ,-17689  ,-23613  ,-32767  ,-24338  ,\n    -17350  ,-16196  ,-12124  ,-13112  ,-14893  ,-13118  ,-13883  ,-14976  ,-15354  ,-16032  ,-16731  ,-20462  ,-26525  ,-32145  ,-31514  ,\n    -21959  ,-19045  ,-28130  ,-31143  ,-26048  ,-24859  ,-25277  ,-22430  ,-20427  ,-21293  ,-21637  ,-21166  ,-21269  ,-19491  ,-17297  ,\n    -17250  ,-16975  ,-21120  ,-30865  ,-32584  ,-24370  ,-18856  ,-20128  ,-24201  ,-24863  ,-21322  ,-22232  ,-25613  ,-21410  ,-16336  ,\n    -18015  ,-19735  ,-18589  ,-14151  ,-9323   ,-16211  ,-27842  ,-27895  ,-24421  ,-23544  ,-21376  ,-21168  ,-17069  ,-8898   ,-10377  ,\n    -14181  ,-10023  ,-7112   ,-7471   ,-8683   ,-12314  ,-12483  ,-9925   ,-12338  ,-14518  ,-12747  ,-13728  ,-14133  ,-8336   ,-3432   ,\n    -3442   ,-6248   ,-7592   ,-4575   ,-3364   ,-3097   ,-480    ,2071    ,5014    ,2088    ,-2346   ,2964    ,8261    ,10804   ,15538   ,\n    13560   ,7702    ,5831    ,1483    ,-5071   ,-8584   ,-8878   ,-6501   ,-4186   ,-2266   ,-2678   ,-1315   ,12668   ,22087   ,11599   ,\n    4978    ,13083   ,21384   ,22165   ,16774   ,15376   ,17871   ,15805   ,15572   ,14645   ,7923    ,7793    ,11787   ,10940   ,10505   ,\n    10269   ,8106    ,3627    ,-154    ,9988    ,27723   ,32767   ,30093   ,28585   ,25090   ,25453   ,30376   ,28165   ,22232   ,21785   ,\n    18167   ,11268   ,17935   ,28771   ,23113   ,13840   ,13585   ,13645   ,12359   ,9626    ,6710    ,12230   ,19325   ,17291   ,14022   ,\n    18293   ,26455   ,26934   ,16233   ,9587    ,15597   ,21264   ,17312   ,10730   ,8538    ,8772    ,9136    ,11132   ,13370   ,12480   ,\n    10258   ,10184   ,11703   ,14982   ,21485   ,23651   ,14920   ,10581   ,20820   ,27950   ,25952   ,24525   ,18950   ,10895   ,9034    ,\n    6614    ,3979    ,7339    ,10006   ,11172   ,13198   ,9980    ,4803    ,6689    ,11373   ,11139   ,10145   ,12182   ,10681   ,8098    ,\n    14008   ,19572   ,15188   ,10744   ,9822    ,4906    ,50      ,1918    ,3600    ,-245    ,-2394   ,-476    ,883     ,3048    ,2878    ,\n    -1529   ,-2386   ,-1198   ,-2910   ,-5361   ,-9012   ,-15634  ,-15810  ,-4552   ,1404    ,1153    ,1262    ,-4289   ,-10039  ,-7782   ,\n    -2961   ,-5732   ,-11354  ,-12045  ,-12303  ,-13043  ,-12961  ,-13073  ,-14335  ,-18481  ,-17982  ,-9982   ,-6316   ,-6660   ,-6912   ,\n    -11589  ,-15014  ,-15069  ,-17739  ,-18339  ,-14413  ,-12162  ,-14243  ,-15437  ,-12711  ,-16217  ,-25006  ,-26068  ,-25727  ,-28268  ,\n    -28497  ,-30283  ,-26788  ,-17430  ,-18475  ,-23892  ,-23559  ,-22495  ,-21075  ,-22896  ,-27931  ,-27840  ,-27570  ,-31370  ,-31873  ,\n    -28321  ,-26833  ,-29466  ,-30394  ,-27436  ,-27807  ,-30229  ,-28411  ,-25636  ,-25034  ,-26231  ,-28299  ,-28100  ,-26192  ,-25137  ,\n    -23977  ,-23200  ,-25064  ,-28829  ,-32298  ,-32767  ,-27756  ,-22393  ,-23768  ,-26913  ,-26775  ,-27018  ,-26509  ,-23224  ,-20837  ,\n    -21956  ,-25277  ,-24302  ,-19626  ,-19509  ,-20712  ,-21064  ,-24833  ,-26787  ,-24711  ,-22485  ,-21871  ,-23242  ,-19636  ,-13334  ,\n    -15079  ,-15977  ,-10864  ,-10265  ,-11901  ,-12664  ,-15727  ,-15609  ,-13107  ,-14305  ,-14574  ,-12594  ,-13104  ,-12244  ,-7633   ,\n    -5302   ,-5126   ,-6501   ,-7796   ,-3184   ,922     ,-274    ,-4983   ,-8168   ,-5103   ,-3727   ,-2082   ,3724    ,4133    ,1413    ,\n    3205    ,6529    ,7660    ,6074    ,3890    ,4211    ,5556    ,7384    ,9978    ,9366    ,5927    ,3222    ,3831    ,8597    ,8457    ,\n    2197    ,4405    ,12578   ,14270   ,13104   ,11618   ,8024    ,7733    ,11022   ,12921   ,14947   ,18139   ,19000   ,18425   ,17640   ,\n    13116   ,10386   ,16590   ,20613   ,17326   ,18273   ,20713   ,17368   ,15208   ,15340   ,15645   ,21163   ,28276   ,28771   ,25559   ,\n    25270   ,26082   ,24021   ,23074   ,23398   ,20375   ,18603   ,18574   ,17517   ,21057   ,24610   ,23821   ,26771   ,30701   ,32572   ,\n    32767   ,23576   ,14084   ,15512   ,17416   ,16269   ,16056   ,16279   ,16958   ,16369   ,19211   ,25214   ,24359   ,22231   ,21986   ,\n    16473   ,13644   ,16446   ,17201   ,18570   ,21120   ,22788   ,26044   ,28211   ,27600   ,25913   ,22361   ,19582   ,18762   ,17588   ,\n    20656   ,26731   ,24485   ,17515   ,15553   ,13711   ,11708   ,15590   ,18357   ,14923   ,12053   ,12300   ,12868   ,10598   ,4929    ,\n    4238    ,12562   ,17540   ,11809   ,5423    ,4288    ,3820    ,4589    ,7087    ,5137    ,-482    ,-3364   ,-2769   ,-1775   ,-3272   ,\n    -4528   ,-2904   ,-2535   ,526     ,3292    ,3841    ,2509    ,676     ,483     ,406     ,-1305   ,-2690   ,-5175   ,-7483   ,-9952   ,\n    -13083  ,-11361  ,-7785   ,-8286   ,-9141   ,-8994   ,-10748  ,-12352  ,-12364  ,-13993  ,-17351  ,-18602  ,-17516  ,-16203  ,-14367  ,\n    -12874  ,-13880  ,-15300  ,-14708  ,-16132  ,-20485  ,-20824  ,-17777  ,-16153  ,-15008  ,-17763  ,-23388  ,-23517  ,-23426  ,-27319  ,\n    -26577  ,-22633  ,-21962  ,-22331  ,-22116  ,-22363  ,-22955  ,-22927  ,-22641  ,-23136  ,-23010  ,-23510  ,-25847  ,-26789  ,-28907  ,\n    -32767  ,-30071  ,-24579  ,-26646  ,-31368  ,-31626  ,-30405  ,-30160  ,-29656  ,-29076  ,-29061  ,-28043  ,-26391  ,-27542  ,-29307  ,\n    -27808  ,-25788  ,-24559  ,-24751  ,-28179  ,-29585  ,-27197  ,-25837  ,-25099  ,-25590  ,-27430  ,-26837  ,-25324  ,-23816  ,-22372  ,\n    -22527  ,-21403  ,-21392  ,-23596  ,-22093  ,-21949  ,-24874  ,-23706  ,-23058  ,-23938  ,-21897  ,-21764  ,-22431  ,-20130  ,-18176  ,\n    -17139  ,-17761  ,-18814  ,-15892  ,-12936  ,-12622  ,-11668  ,-11819  ,-12595  ,-10883  ,-9875   ,-10400  ,-9634   ,-8857   ,-7975   ,\n    -6084   ,-6649   ,-7832   ,-7520   ,-7657   ,-4707   ,-1777   ,-2259   ,-1796   ,-1822   ,-1400   ,1479    ,2695    ,2642    ,4642    ,\n    5936    ,6258    ,10066   ,12939   ,10661   ,8840    ,8410    ,7153    ,7708    ,8730    ,8168    ,8769    ,9166    ,8809    ,11307   ,\n    12139   ,8689    ,9576    ,14652   ,16931   ,19327   ,21589   ,18725   ,17073   ,20181   ,21059   ,20853   ,22889   ,23081   ,21545   ,\n    20474   ,19894   ,20616   ,20875   ,20619   ,20337   ,18558   ,20896   ,27783   ,29499   ,27017   ,26618   ,28390   ,30706   ,30225   ,\n    28615   ,29638   ,28756   ,25504   ,24738   ,25720   ,28404   ,30735   ,27258   ,23452   ,26059   ,28308   ,25243   ,22565   ,24537   ,\n    28789   ,29978   ,26663   ,25286   ,29589   ,32767   ,29167   ,24285   ,25142   ,28622   ,28055   ,24568   ,22939   ,23144   ,23322   ,\n    23800   ,24328   ,23698   ,22459   ,21736   ,21620   ,22479   ,24872   ,26694   ,23980   ,19900   ,22103   ,26658   ,26479   ,25076   ,\n    23243   ,19067   ,16810   ,15718   ,13485   ,13813   ,15353   ,15493   ,16098   ,15313   ,12244   ,11288   ,13057   ,13589   ,12512   ,\n    12552   ,12230   ,10270   ,10822   ,13229   ,12281   ,9806    ,8896    ,7258    ,4771    ,4134    ,4519    ,3495    ,2089    ,1940    ,\n    1871    ,1779    ,1608    ,296     ,\n    // sounds/wavetables/BRAIDS01.WAV\n    -5257   ,-7083   ,-6068   ,-5581   ,-4992   ,-5231   ,-5330   ,-4957   ,-4573   ,-4235   ,-4085   ,-3790   ,-3386   ,-3096   ,-3000   ,\n    -2928   ,-2617   ,-2064   ,-1499   ,-1150   ,-1045   ,-1049   ,-1009   ,-840    ,-528    ,-122    ,278     ,573     ,739     ,859     ,\n    1055    ,1378    ,1764    ,2101    ,2321    ,2446    ,2558    ,2745    ,3056    ,3465    ,3874    ,4167    ,4300    ,4345    ,4416    ,\n    4575    ,4794    ,5011    ,5187    ,5297    ,5321    ,5257    ,5157    ,5096    ,5105    ,5134    ,5113    ,5022    ,4888    ,4738    ,\n    4572    ,4374    ,4140    ,3863    ,3539    ,3188    ,2855    ,2566    ,2275    ,1876    ,1298    ,556     ,-262    ,-1063   ,-1795   ,\n    -2448   ,-3065   ,-3747   ,-4614   ,-5704   ,-6910   ,-8039   ,-8953   ,-9655   ,-10254  ,-10856  ,-11500  ,-12170  ,-12821  ,-13389  ,\n    -13804  ,-14025  ,-14094  ,-14095  ,-14066  ,-13933  ,-13584  ,-12994  ,-12264  ,-11522  ,-10787  ,-9954   ,-8912   ,-7641   ,-6202   ,\n    -4652   ,-3009   ,-1290   ,450     ,2168    ,3894    ,5706    ,7635    ,9617    ,11557   ,13437   ,15321   ,17266   ,19249   ,21185   ,\n    22967   ,24495   ,25697   ,26628   ,27522   ,28659   ,30092   ,31493   ,32361   ,32431   ,31885   ,31165   ,30593   ,30189   ,29795   ,\n    29278   ,28597   ,27736   ,26671   ,25412   ,24034   ,22637   ,21262   ,19877   ,18423   ,16897   ,15363   ,13904   ,12541   ,11193   ,\n    9733    ,8103    ,6389    ,4763    ,3346    ,2125    ,1001    ,-114    ,-1253   ,-2420   ,-3609   ,-4784   ,-5871   ,-6823   ,-7686   ,\n    -8560   ,-9477   ,-10335  ,-10994  ,-11434  ,-11792  ,-12231  ,-12787  ,-13359  ,-13828  ,-14151  ,-14341  ,-14398  ,-14324  ,-14179  ,\n    -14092  ,-14155  ,-14326  ,-14436  ,-14339  ,-14015  ,-13571  ,-13139  ,-12794  ,-12530  ,-12291  ,-11982  ,-11521  ,-10902  ,-10230  ,\n    -9654   ,-9234   ,-8876   ,-8427   ,-7832   ,-7185   ,-6612   ,-6137   ,-5667   ,-5115   ,-4487   ,-3857   ,-3285   ,-2792   ,-2386   ,\n    -2071   ,-1809   ,-1520   ,-1153   ,-775    ,-534    ,-513    ,-641    ,-761    ,-787    ,-775    ,-838    ,-1020   ,-1273   ,-1533   ,\n    -1790   ,-2055   ,-2317   ,-2554   ,-2786   ,-3073   ,-3446   ,-3846   ,-4160   ,-4339   ,-4454   ,-4622   ,-4869   ,-5109   ,-5264   ,\n    -5387   ,-5592   ,-5863   ,-6019   ,-5953   ,-5849   ,-6004   ,-6404   ,-6643   ,-6424   ,-6039   ,-6083   ,-6613   ,-6828   ,-5859   ,\n    -3822   ,-1837   ,-915    ,-1023   ,-1373   ,-1444   ,-1437   ,-1747   ,-2321   ,-2742   ,-2807   ,-2728   ,-2760   ,-2846   ,-2771   ,\n    -2554   ,-2496   ,-2822   ,-3391   ,-3822   ,-3869   ,-3615   ,-3344   ,-3290   ,-3500   ,-3875   ,-4271   ,-4583   ,-4777   ,-4874   ,\n    -4904   ,-4866   ,-4750   ,-4596   ,-4519   ,-4626   ,-4885   ,-5099   ,-5037   ,-4632   ,-4050   ,-3554   ,-3271   ,-3111   ,-2886   ,\n    -2509   ,-2045   ,-1600   ,-1181   ,-692    ,-56     ,687     ,1386    ,1872    ,2053    ,1976    ,1828    ,1851    ,2191    ,2771    ,\n    3331    ,3616    ,3563    ,3308    ,3035    ,2828    ,2672    ,2554    ,2509    ,2560    ,2631    ,2567    ,2267    ,1775    ,1243    ,\n    799     ,467     ,210     ,-4      ,-199    ,-439    ,-832    ,-1449   ,-2239   ,-3030   ,-3642   ,-4025   ,-4307   ,-4717   ,-5400   ,\n    -6292   ,-7169   ,-7862   ,-8418   ,-9027   ,-9784   ,-10570  ,-11186  ,-11576  ,-11866  ,-12174  ,-12451  ,-12540  ,-12375  ,-12055  ,\n    -11699  ,-11266  ,-10560  ,-9421   ,-7882   ,-6143   ,-4399   ,-2706   ,-983    ,899     ,3042    ,5489    ,8198    ,11038   ,13857   ,\n    16564   ,19111   ,21383   ,23189   ,24496   ,25643   ,27153   ,29184   ,31180   ,32230   ,31864   ,30484   ,28968   ,27908   ,27250   ,\n    26572   ,25556   ,24163   ,22482   ,20588   ,18564   ,16566   ,14787   ,13363   ,12301   ,11479   ,10698   ,9765    ,8617    ,7389    ,\n    6338    ,5665    ,5383    ,5347    ,5387    ,5397    ,5320    ,5110    ,4759    ,4347    ,4016    ,3859    ,3835    ,3809    ,3661    ,\n    3366    ,2969    ,2520    ,2047    ,1573    ,1130    ,736     ,379     ,24      ,-360    ,-785    ,-1255   ,-1783   ,-2385   ,-3075   ,\n    -3835   ,-4610   ,-5318   ,-5881   ,-6296   ,-6668   ,-7169   ,-7915   ,-8852   ,-9759   ,-10402  ,-10708  ,-10787  ,-10807  ,-10857  ,\n    -10945  ,-11090  ,-11321  ,-11593  ,-11730  ,-11550  ,-11031  ,-10351  ,-9728   ,-9264   ,-8940   ,-8698   ,-8478   ,-8174   ,-7648   ,\n    -6848   ,-5912   ,-5099   ,-4598   ,-4398   ,-4345   ,-4278   ,-4118   ,-3861   ,-3551   ,-3269   ,-3108   ,-3122   ,-3295   ,-3564   ,\n    -3865   ,-4143   ,-4338   ,-4406   ,-4351   ,-4229   ,-4114   ,-4052   ,-4061   ,-4116   ,-4146   ,-4053   ,-3780   ,-3359   ,-2875   ,\n    -2406   ,-2007   ,-1719   ,-1532   ,-1354   ,-1107   ,-876    ,-828    ,-927    ,-840    ,-348    ,205     ,162     ,-566    ,-1054   ,\n    -152    ,2217    ,4778    ,6093    ,5894    ,5112    ,4726    ,4880    ,5117    ,5126    ,4995    ,4858    ,4638    ,4255    ,3863    ,\n    3711    ,3799    ,3846    ,3616    ,3183    ,2803    ,2621    ,2557    ,2467    ,2314    ,2158    ,2040    ,1931    ,1793    ,1643    ,\n    1544    ,1520    ,1520    ,1459    ,1302    ,1113    ,995     ,997     ,1062    ,1078    ,978     ,783     ,565     ,371     ,199     ,\n    18      ,-197    ,-470    ,-824    ,-1262   ,-1740   ,-2195   ,-2605   ,-3026   ,-3547   ,-4199   ,-4893   ,-5478   ,-5866   ,-6121   ,\n    -6412   ,-6863   ,-7420   ,-7905   ,-8189   ,-8318   ,-8452   ,-8687   ,-8960   ,-9145   ,-9204   ,-9209   ,-9244   ,-9323   ,-9428   ,\n    -9573   ,-9783   ,-10017  ,-10183  ,-10245  ,-10290  ,-10440  ,-10718  ,-11026  ,-11278  ,-11499  ,-11780  ,-12147  ,-12527  ,-12838  ,\n    -13076  ,-13300  ,-13552  ,-13820  ,-14084  ,-14346  ,-14600  ,-14790  ,-14829  ,-14670  ,-14362  ,-14030  ,-13794  ,-13683  ,-13596  ,\n    -13347  ,-12774  ,-11861  ,-10775  ,-9759   ,-8937   ,-8182   ,-7192   ,-5728   ,-3811   ,-1720   ,224     ,1879    ,3359    ,4940    ,\n    6890    ,9313    ,12034   ,14630   ,16663   ,18031   ,19148   ,20654   ,22858   ,25406   ,27558   ,28809   ,29268   ,29468   ,29883   ,\n    30632   ,31522   ,32241   ,32512   ,32206   ,31448   ,30597   ,30014   ,29778   ,29619   ,29162   ,28229   ,26934   ,25544   ,24303   ,\n    23325   ,22551   ,21751   ,20658   ,19189   ,17562   ,16144   ,15116   ,14325   ,13445   ,12282   ,10901   ,9500    ,8226    ,7115    ,\n    6132    ,5192    ,4176    ,2987    ,1653    ,345     ,-756    ,-1620   ,-2392   ,-3255   ,-4289   ,-5439   ,-6585   ,-7624   ,-8506   ,\n    -9271   ,-10040  ,-10948  ,-12021  ,-13121  ,-14057  ,-14778  ,-15430  ,-16196  ,-17077  ,-17856  ,-18323  ,-18481  ,-18529  ,-18654  ,\n    -18845  ,-18961  ,-18899  ,-18679  ,-18356  ,-17923  ,-17342  ,-16631  ,-15876  ,-15117  ,-14288  ,-13294  ,-12156  ,-11023  ,-10042  ,\n    -9209   ,-8380   ,-7416   ,-6302   ,-5146   ,-4100   ,-3285   ,-2735   ,-2358   ,-1983   ,-1476   ,-862    ,-316    ,-6      ,50      ,\n    -12     ,-32     ,70      ,263     ,455     ,531     ,431     ,214     ,42      ,55      ,243     ,456     ,563     ,555     ,510     ,\n    489     ,546     ,769     ,1225    ,1805    ,2225    ,2295    ,2183    ,2283    ,2773    ,3403    ,3804    ,3953    ,4161    ,4561    ,\n    4794    ,4351    ,3186    ,1809    ,740     ,2       ,-732    ,-1585   ,-2268   ,-2449   ,-2200   ,-1968   ,-2119   ,-2584   ,-2951   ,\n    -2831   ,-2161   ,-1244   ,-526    ,-300    ,-490    ,-728    ,-665    ,-285    ,75      ,15      ,-595    ,-1537   ,-2446   ,-3084   ,\n    -3474   ,-3814   ,-4285   ,-4902   ,-5499   ,-5837   ,-5739   ,-5182   ,-4288   ,-3259   ,-2268   ,-1350   ,-379    ,838     ,2366    ,\n    4029    ,5485    ,6463    ,6937    ,7108    ,7193    ,7224    ,7022    ,6347    ,5092    ,3380    ,1489    ,-309    ,-1884   ,-3273   ,\n    -4600   ,-5947   ,-7269   ,-8381   ,-9028   ,-9036   ,-8457   ,-7597   ,-6814   ,-6228   ,-5599   ,-4532   ,-2856   ,-826    ,1046    ,\n    2332    ,2935    ,3083    ,3168    ,3531    ,4235    ,4955    ,5150    ,4485    ,3184    ,1930    ,1373    ,1656    ,2374    ,2932    ,\n    2997    ,2734    ,2730    ,3624    ,5616    ,8190    ,10381   ,11489   ,11673   ,11826   ,12783   ,14535   ,16147   ,16440   ,14834   ,\n    11724   ,8165    ,5169    ,3055    ,1224    ,-1454   ,-5817   ,-11629  ,-17498  ,-21709  ,-23440  ,-23381  ,-23158  ,-24004  ,-25740  ,\n    -26874  ,-25685  ,-21467  ,-15062  ,-8358   ,-3057   ,488     ,3507    ,7805    ,14211   ,21745   ,28246   ,31951   ,32689   ,31810   ,\n    31065   ,31392   ,32386   ,32626   ,30632   ,25915   ,19496   ,13383   ,9206    ,7032    ,5371    ,2452    ,-2300   ,-7822   ,-12276  ,\n    -14417  ,-14364  ,-13341  ,-12764  ,-13326  ,-14619  ,-15478  ,-14845  ,-12595  ,-9690   ,-7491   ,-6737   ,-7044   ,-7303   ,-6583   ,\n    -4755   ,-2465   ,-615    ,214     ,117     ,-154    ,366     ,2158    ,4791    ,7191    ,8487    ,8707    ,8687    ,9302    ,10764   ,\n    12534   ,13798   ,14003   ,13106   ,11530   ,9902    ,8673    ,7791    ,6695    ,4735    ,1712    ,-1918   ,-5365   ,-8051   ,-9934   ,\n    -11429  ,-13077  ,-15162  ,-17490  ,-19427  ,-20265  ,-19714  ,-18163  ,-16396  ,-14977  ,-13801  ,-12246  ,-9753   ,-6324   ,-2533   ,\n    896     ,3551    ,5516    ,7213    ,9070    ,11201   ,13274   ,14674   ,14908   ,13977   ,12408   ,10871   ,9674    ,8578    ,7049    ,\n    4730    ,1737    ,-1390   ,-4018   ,-5798   ,-6870   ,-7743   ,-8912   ,-10461  ,-11968  ,-12806  ,-12608  ,-11543  ,-10197  ,-9164   ,\n    -8630   ,-8267   ,-7514   ,-6054   ,-4080   ,-2138   ,-713    ,70      ,431     ,738     ,1317    ,2277    ,3347    ,3928    ,3548    ,\n    2421    ,1492    ,1703    ,3136    ,4956    ,6238    ,6786    ,7091    ,7604    ,8261    ,8719    ,8882    ,8997    ,9286    ,9656    ,\n    9855    ,9813    ,9695    ,9643    ,9575    ,9291    ,8747    ,8127    ,7627    ,7226    ,6691    ,5834    ,4726    ,3633    ,2750    ,\n    2007    ,1156    ,31      ,-1291   ,-2581   ,-3676   ,-4597   ,-5477   ,-6403   ,-7342   ,-8193   ,-8894   ,-9470   ,-9992   ,-10495  ,\n    -10943  ,-11271  ,-11450  ,-11501  ,-11451  ,-11296  ,-11034  ,-10704  ,-10370  ,-10048  ,-9664   ,-9139   ,-8478   ,-7761   ,-7051   ,\n    -6322   ,-5527   ,-4676   ,-3831   ,-3018   ,-2192   ,-1318   ,-453    ,282     ,827     ,1260    ,1731    ,2321    ,2978    ,3568    ,\n    3964    ,4110    ,4032    ,3830    ,3646    ,3586    ,3621    ,3592    ,3326    ,2799    ,2155    ,1556    ,1033    ,497     ,-117    ,\n    -768    ,-1393   ,-2025   ,-2764   ,-3633   ,-4519   ,-5304   ,-6007   ,-6743   ,-7560   ,-8355   ,-9012   ,-9560   ,-10162  ,-10932  ,\n    -11806  ,-12603  ,-13181  ,-13523  ,-13713  ,-13854  ,-14038  ,-14315  ,-14646  ,-14862  ,-14720  ,-14071  ,-12995  ,-11778  ,-10689  ,\n    -9729   ,-8595   ,-6908   ,-4549   ,-1797   ,855     ,3077    ,4952    ,6911    ,9401    ,12537   ,15994   ,19212   ,21747   ,23529   ,\n    24853   ,26140   ,27663   ,29403   ,31075   ,32293   ,32766   ,32469   ,31665   ,30758   ,30016   ,29404   ,28635   ,27417   ,25668   ,\n    23531   ,21237   ,18957   ,16745   ,14578   ,12418   ,10259   ,8144    ,6110    ,4128    ,2101    ,-17     ,-2123   ,-4010   ,-5537   ,\n    -6748   ,-7784   ,-8740   ,-9627   ,-10471  ,-11347  ,-12250  ,-13002  ,-13371  ,-13329  ,-13127  ,-13074  ,-13257  ,-13520  ,-13663  ,\n    -13631  ,-13476  ,-13245  ,-12946  ,-12602  ,-12274  ,-11989  ,-11689  ,-11289  ,-10778  ,-10228  ,-9711   ,-9218   ,-8660   ,-7936   ,\n    -7002   ,-5889   ,-4702   ,-3580   ,-2618   ,-1797   ,-978    ,2       ,1210    ,2565    ,3908    ,5106    ,6111    ,6932    ,7602    ,\n    8167    ,8695    ,9242    ,9786    ,10216   ,10397   ,10257   ,9829    ,9206    ,8474    ,7680    ,6826    ,5896    ,4889    ,3825    ,\n    2724    ,1552    ,226     ,-1295   ,-2900   ,-4344   ,-5419   ,-6139   ,-6732   ,-7443   ,-8319   ,-9183   ,-9795   ,-10027  ,-9932   ,\n    -9681   ,-9438   ,-9259   ,-9055   ,-8668   ,-8019   ,-7194   ,-6367   ,-5610   ,-4822   ,-3868   ,-2780   ,-1746   ,-880    ,-73     ,\n    859     ,1895    ,2800    ,3458    ,4128    ,5256    ,6965    ,8831    ,10224   ,10860   ,10968   ,10930   ,10855   ,10541   ,9793    ,\n    8685    ,7491    ,6400    ,5350    ,4106    ,2478    ,500     ,-1555   ,-3318   ,-4513   ,-5127   ,-5435   ,-5885   ,-6859   ,-8442   ,\n    -10344  ,-12048  ,-13134  ,-13538  ,-13557  ,-13612  ,-13952  ,-14533  ,-15067  ,-15170  ,-14517  ,-12985  ,-10755  ,-8260   ,-5953   ,\n    -4034   ,-2347   ,-566    ,1482    ,3627    ,5456    ,6626    ,7113    ,7182    ,7111    ,6914    ,6333    ,5100    ,3226    ,1058    ,\n    -915    ,-2345   ,-3206   ,-3800   ,-4589   ,-5916   ,-7759   ,-9719   ,-11299  ,-12276  ,-12830  ,-13341  ,-14074  ,-15063  ,-16220  ,\n    -17450  ,-18604  ,-19417  ,-19581  ,-18968  ,-17775  ,-16372  ,-15000  ,-13562  ,-11725  ,-9237   ,-6197   ,-3040   ,-242    ,2012    ,\n    3892    ,5666    ,7359    ,8679    ,9258    ,8971    ,8000    ,6662    ,5210    ,3818    ,2646    ,1824    ,1339    ,988     ,509     ,\n    -222    ,-1089   ,-1816   ,-2150   ,-2038   ,-1736   ,-1785   ,-2804   ,-5146   ,-8575   ,-12241  ,-15075  ,-16449  ,-16666  ,-16814  ,\n    -17938  ,-20055  ,-21885  ,-21672  ,-18569  ,-13388  ,-8035   ,-4035   ,-1398   ,1233    ,5346    ,11300   ,18025   ,23775   ,27277   ,\n    28445   ,28275   ,28127   ,28887   ,30490   ,32050   ,32488   ,31253   ,28685   ,25781   ,23542   ,22387   ,22022   ,21761   ,20978   ,\n    19360   ,16914   ,13889   ,10729   ,7954    ,5909    ,4521    ,3316    ,1774    ,-260    ,-2467   ,-4330   ,-5495   ,-5925   ,-5797   ,\n    -5331   ,-4678   ,-3883   ,-2871   ,-1501   ,272     ,2281    ,4218    ,5901    ,7459    ,9207    ,11310   ,13580   ,15616   ,17132   ,\n    18119   ,18710   ,18980   ,18919   ,18589   ,18193   ,17908   ,17655   ,17093   ,15865   ,13874   ,11283   ,8315    ,5089    ,1674    ,\n    -1752   ,-4920   ,-7725   ,-10473  ,-13776  ,-18024  ,-22826  ,-26984  ,-29147  ,-28739  ,-26389  ,-23489  ,-21238  ,-19925  ,-18940  ,\n    -17364  ,-14598  ,-10614  ,-5887   ,-1162   ,2827    ,5653    ,7402    ,8583    ,9755    ,11131   ,12519   ,13622   ,14349   ,14818   ,\n    15107   ,15090   ,14572   ,13557   ,12318   ,11172   ,10208   ,9229    ,7961    ,6297    ,4336    ,2230    ,9       ,-2420   ,-5132   ,\n    -8016   ,-10727  ,-12788  ,-13864  ,-14071  ,-14035  ,-14492  ,-15630  ,-16839  ,-17217  ,-16377  ,-14639  ,-12493  ,-10128  ,-7708   ,\n    -5786   ,-4863   ,-4387   ,-2693   ,1432    ,7126    ,11870   ,13758   ,13112   ,11681   ,10634   ,9822    ,8842    ,8049    ,8014    ,\n    8379    ,7960    ,6169    ,3885    ,2541    ,2522    ,2824    ,2287    ,830     ,-682    ,-1552   ,-1930   ,-2443   ,-3427   ,-4672   ,\n    -5766   ,-6528   ,-7092   ,-7697   ,-8437   ,-9202   ,-9845   ,-10394  ,-11034  ,-11800  ,-12365  ,-12342  ,-11876  ,-11724  ,-12480  ,\n    -13759  ,-14412  ,-13750  ,-12406  ,-11761  ,-12525  ,-14041  ,-15005  ,-14712  ,-13524  ,-12321  ,-11726  ,-11835  ,-12396  ,-13046  ,\n    -13438  ,-13326  ,-12661  ,-11642  ,-10672  ,-10217  ,-10521  ,-11308  ,-11810  ,-11319  ,-9898   ,-8473   ,-8052   ,-8790   ,-9867   ,\n    -10302  ,-9812   ,-8880   ,-8167   ,-8011   ,-8397   ,-9125   ,-9852   ,-10153  ,-9802   ,-9081   ,-8660   ,-9029   ,-10024  ,-10954  ,\n    -11199  ,-10729  ,-10094  ,-9959   ,-10577  ,-11581  ,-12285  ,-12259  ,-11688  ,-11176  ,-11189  ,-11689  ,-12278  ,-12562  ,-12358  ,\n    -11714  ,-10913  ,-10422  ,-10571  ,-11113  ,-11252  ,-10343  ,-8619   ,-7085   ,-6594   ,-7067   ,-7647   ,-7467   ,-6237   ,-4260   ,\n    -2197   ,-819    ,-589    ,-1145   ,-1257   ,268     ,3357    ,6460    ,7878    ,7433    ,6706    ,7523    ,10229   ,13517   ,15825   ,\n    16729   ,16991   ,17515   ,18566   ,19909   ,21362   ,22930   ,24489   ,25653   ,26157   ,26262   ,26604   ,27575   ,28936   ,30095   ,\n    30694   ,30875   ,31029   ,31390   ,31906   ,32376   ,32635   ,32621   ,32367   ,31989   ,31633   ,31365   ,31092   ,30622   ,29814   ,\n    28713   ,27548   ,26586   ,25929   ,25385   ,24525   ,22974   ,20758   ,18407   ,16648   ,15832   ,15570   ,14924   ,13142   ,10349   ,\n    7553    ,5817    ,5280    ,4969    ,3661    ,1016    ,-2127   ,-4559   ,-5785   ,-6319   ,-7056   ,-8455   ,-10302  ,-12100  ,-13556  ,\n    -14731  ,-15841  ,-16967  ,-17973  ,-18679  ,-19145  ,-19734  ,-20760  ,-22074  ,-23066  ,-23230  ,-22687  ,-22082  ,-21921  ,-22133  ,\n    -22316  ,-22246  ,-21983  ,-21551  ,-20792  ,-19678  ,-18567  ,-17901  ,-17612  ,-17086  ,-15834  ,-14108  ,-12650  ,-11865  ,-11371  ,\n    -10454  ,-8864   ,-7067   ,-5744   ,-5108   ,-4714   ,-3869   ,-2250   ,-201    ,1544    ,2473    ,2746    ,3043    ,3964    ,5533    ,\n    7267    ,8629    ,9381    ,9601    ,9580    ,9768    ,10612   ,12154   ,13734   ,14360   ,13653   ,12395   ,11914   ,12784   ,14265   ,\n    15158   ,15086   ,14671   ,14435   ,13902   ,12138   ,9140    ,6298    ,5201    ,6031    ,7346    ,7464    ,5970    ,3882    ,2533    ,\n    2447    ,3145    ,3747    ,3619    ,2621    ,1043    ,-551    ,-1531   ,-1518   ,-683    ,264     ,509     ,-293    ,-1796   ,-3265   ,\n    -4108   ,-4172   ,-3676   ,-3002   ,-2550   ,-2605   ,-3158   ,-3835   ,-4122   ,-3801   ,-3142   ,-2636   ,-2543   ,-2717   ,-2829   ,\n    -2668   ,-2192   ,-1429   ,-474    ,411     ,835     ,606     ,56      ,-89     ,687     ,2127    ,3325    ,3523    ,2874    ,2338    ,\n    2729    ,3838    ,4575    ,4071    ,2636    ,1575    ,2000    ,3806    ,5739    ,6414    ,5326    ,3082    ,918     ,-26     ,705     ,\n    2586    ,4272    ,4347    ,2337    ,-801    ,-3268   ,-3765   ,-2478   ,-876    ,-563    ,-2179   ,-5119   ,-8061   ,-9751   ,-9615   ,\n    -8037   ,-6241   ,-5717   ,-7337   ,-10680  ,-14162  ,-16025  ,-15535  ,-13481  ,-11595  ,-11345  ,-12994  ,-15538  ,-17445  ,-17630  ,\n    -16121  ,-14060  ,-13033  ,-13990  ,-16423  ,-18514  ,-18393  ,-15642  ,-11794  ,-9259   ,-9485   ,-11874  ,-14288  ,-14651  ,-12362  ,\n    -8569   ,-5292   ,-4065   ,-4942   ,-6453   ,-6594   ,-4293   ,-297    ,3298    ,4633    ,3559    ,1774    ,1510    ,3858    ,8071    ,\n    12263   ,14774   ,15132   ,14099   ,13026   ,13109   ,14871   ,17950   ,21232   ,23365   ,23558   ,22193   ,20726   ,20792   ,23057   ,\n    26657   ,29657   ,30294   ,28218   ,24878   ,22704   ,23479   ,26964   ,30877   ,32429   ,30413   ,26176   ,22622   ,21969   ,24070   ,\n    26650   ,27181   ,24815   ,20877   ,17672   ,16697   ,17659   ,18895   ,18682   ,16407   ,12816   ,9347    ,7137    ,6395    ,6446    ,\n    6310    ,5318    ,3377    ,827     ,-1840   ,-4145   ,-5697   ,-6370   ,-6562   ,-7173   ,-9024   ,-12048  ,-15070  ,-16613  ,-16185  ,\n    -14869  ,-14548  ,-16383  ,-19824  ,-23009  ,-24197  ,-23097  ,-21080  ,-20145  ,-21396  ,-24141  ,-26364  ,-26306  ,-23930  ,-21017  ,\n    -19711  ,-20750  ,-22943  ,-24263  ,-23510  ,-21075  ,-18348  ,-16545  ,-15991  ,-16213  ,-16442  ,-16062  ,-14814  ,-12837  ,-10600  ,\n    -8693   ,-7537   ,-7158   ,-7159   ,-6935   ,-6009   ,-4320   ,-2281   ,-548    ,393     ,548     ,430     ,733     ,1857    ,3621    ,\n    5359    ,6359    ,6343    ,5679    ,5180    ,5582    ,6995    ,8742    ,9825    ,9733    ,8863    ,8094    ,7930    ,8180    ,8470    ,\n    8782    ,9249    ,9599    ,9289    ,8398    ,7994    ,9114    ,11401   ,13155   ,12927   ,10801   ,7949    ,5266    ,2896    ,892     ,\n    -384    ,-911    ,-1657   ,-3885   ,-7652   ,-11361  ,-13116  ,-12478  ,-10783  ,-9829   ,-10396  ,-11852  ,-12849  ,-12306  ,-10042  ,\n    -6808   ,-3759   ,-1698   ,-640    ,-74     ,457     ,1119    ,2028    ,3434    ,5401    ,7395    ,8487    ,8140    ,6741    ,5236    ,\n    4296    ,3945    ,3898    ,3991    ,4131    ,3977    ,2974    ,832     ,-2073   ,-4862   ,-6738   ,-7489   ,-7569   ,-7821   ,-9013   ,\n    -11404  ,-14555  ,-17528  ,-19334  ,-19295  ,-17229  ,-13538  ,-9274   ,-5832   ,-4157   ,-3979   ,-3925   ,-2618   ,245     ,3884    ,\n    7299    ,9902    ,11301   ,10917   ,8326    ,4079    ,-165    ,-2696   ,-3089   ,-2495   ,-2741   ,-5158   ,-9987   ,-16328  ,-22317  ,\n    -25696  ,-25052  ,-21103  ,-16748  ,-15280  ,-17930  ,-22849  ,-26540  ,-26556  ,-23169  ,-18753  ,-15701  ,-14791  ,-15157  ,-15396  ,\n    -14583  ,-12530  ,-9576   ,-6406   ,-3873   ,-2534   ,-2116   ,-1610   ,-220    ,1676    ,2709    ,1845    ,-463    ,-2578   ,-3149   ,\n    -2279   ,-1306   ,-1609   ,-3596   ,-6506   ,-8860   ,-9189   ,-6918   ,-3041   ,131     ,461     ,-2202   ,-5600   ,-6697   ,-4081   ,\n    961     ,5563    ,7440    ,6251    ,3397    ,907     ,386     ,2397    ,6242    ,10193   ,12346   ,11768   ,9162    ,6451    ,5571    ,\n    7353    ,11174   ,15422   ,18385   ,19169   ,18236   ,17133   ,17434   ,19518   ,22260   ,23968   ,23803   ,22375   ,21047   ,20642   ,\n    20778   ,20290   ,18268   ,14804   ,10992   ,8222    ,7263    ,7647    ,7825    ,6188    ,2387    ,-2100   ,-4803   ,-4055   ,-283    ,\n    4348    ,7650    ,8908    ,8907    ,8813    ,9244    ,10353   ,12316   ,15231   ,18531   ,20930   ,21399   ,20174   ,18549   ,17573   ,\n    17185   ,16645   ,15516   ,13835   ,11483   ,7990    ,3325    ,-1468   ,-4971   ,-6820   ,-7997   ,-9445   ,-10744  ,-10710  ,-9279   ,\n    -8213   ,-9454   ,-12877  ,-16068  ,-16416  ,-13259  ,-8047   ,-2812   ,1232    ,3953    ,5909    ,8017    ,11199   ,15754   ,20894   ,\n    25142   ,27372   ,27431   ,25718   ,22415   ,17478   ,11396   ,5582    ,1603    ,-187    ,-1246   ,-3956   ,-9894   ,-18512  ,-27161  ,\n    -32485  ,-32426  ,-27627  ,-21215  ,-16941  ,-16864  ,-20167  ,-23926  ,-25134  ,-22541  ,-17132  ,-11172  ,-6623   ,-4060   ,-2666   ,\n    -1075   ,1733    ,6054    ,11480   ,16946   ,20861   ,21740   ,19270   ,14838   ,10693   ,8274    ,7261    ,6282    ,4441    ,2048    ,\n    8       ,-1218   ,-1899   ,-2497   ,-3140   ,-3636   ,-3826   ,-3760   ,-3569   ,-3290   ,-2841   ,-2098   ,-1000   ,377     ,1774    ,\n    2791    ,3083    ,2613    ,1791    ,1321    ,1778    ,3179    ,4897    ,6048    ,6088    ,5154    ,3913    ,3121    ,3248    ,4326    ,\n    5958    ,7455    ,8146    ,7820    ,6923    ,6228    ,6167    ,6449    ,6351    ,5376    ,3643    ,1681    ,-51     ,-1465   ,-2789   ,\n    -4356   ,-6392   ,-8847   ,-11308  ,-13121  ,-13745  ,-13102  ,-11619  ,-9950   ,-8599   ,-7697   ,-7008   ,-6087   ,-4532   ,-2244   ,\n    468     ,3022    ,4871    ,5741    ,5663    ,4890    ,3771    ,2631    ,1636    ,715     ,-379    ,-1899   ,-3960   ,-6512   ,-9351   ,\n    -12140  ,-14467  ,-16013  ,-16747  ,-16954  ,-17067  ,-17397  ,-17981  ,-18594  ,-18899  ,-18623  ,-17690  ,-16253  ,-14576  ,-12883  ,\n    -11270  ,-9768   ,-8447   ,-7454   ,-6909   ,-6746   ,-6658   ,-6259   ,-5380   ,-4282   ,-3566   ,-3805   ,-5158   ,-7256   ,-9407   ,\n    -10962  ,-11608  ,-11497  ,-11159  ,-11198  ,-11887  ,-12939  ,-13719  ,-13766  ,-13143  ,-12241  ,-11195  ,-9531   ,-6452   ,-1554   ,\n    4649    ,10838   ,15577   ,18100   ,18727   ,18733   ,19665   ,22441   ,26670   ,30696   ,32466   ,30745   ,25886   ,19628   ,14065   ,\n    10512   ,8958    ,8311    ,7182    ,4707    ,1003    ,-2941   ,-5868   ,-6994   ,-6412   ,-4906   ,-3329   ,-2034   ,-751    ,1039    ,\n    3551    ,6394    ,8752    ,9935    ,9925    ,9455    ,9534    ,10729   ,12739   ,14571   ,15156   ,13996   ,11484   ,8716    ,6924    ,\n    6816    ,8205    ,10190   ,11738   ,12269   ,11828   ,10869   ,9930    ,9420    ,9514    ,10084   ,10733   ,10975   ,10484   ,9197    ,\n    7208    ,4652    ,1731    ,-1210   ,-3771   ,-5739   ,-7229   ,-8553   ,-9942   ,-11410  ,-12817  ,-13964  ,-14594  ,-14420  ,-13301  ,\n    -11423  ,-9219   ,-7035   ,-4881   ,-2546   ,46      ,2677    ,5043    ,7090    ,9061    ,11205   ,13451   ,15382   ,16508   ,16589   ,\n    15744   ,14328   ,12669   ,10885   ,8835    ,6245    ,2936    ,-967    ,-4970   ,-8422   ,-10926  ,-12677  ,-14384  ,-16721  ,-19699  ,\n    -22513  ,-24044  ,-23638  ,-21537  ,-18676  ,-16094  ,-14418  ,-13588  ,-12877  ,-11244  ,-8035   ,-3641   ,604     ,3482    ,4959    ,\n    6079    ,7729    ,9758    ,11536   ,13048   ,14777   ,16326   ,15848   ,11734   ,4948    ,-1003   ,-3006   ,-1162   ,1585    ,2478    ,\n    1254    ,-439    ,-1211   ,-1060   ,-713    ,-575    ,-607    ,-787    ,-1216   ,-1753   ,-1868   ,-1050   ,736     ,3078    ,5502    ,\n    7683    ,9308    ,9988    ,9498    ,8170    ,6910    ,6694    ,7923    ,10195   ,12626   ,14374   ,14959   ,14315   ,12724   ,10747   ,\n    9032    ,7963    ,7411    ,6870    ,5928    ,4656    ,3543    ,3026    ,3064    ,3109    ,2509    ,996     ,-1101   ,-3051   ,-4194   ,\n    -4369   ,-4004   ,-3821   ,-4360   ,-5658   ,-7249   ,-8408   ,-8492   ,-7226   ,-4875   ,-2224   ,-288    ,158     ,-1018   ,-3217   ,\n    -5389   ,-6517   ,-6069   ,-4240   ,-1837   ,160     ,1138    ,1095    ,422     ,-552    ,-1823   ,-3574   ,-5859   ,-8435   ,-10841  ,\n    -12569  ,-13194  ,-12516  ,-10769  ,-8725   ,-7482   ,-7926   ,-10200  ,-13567  ,-16816  ,-18951  ,-19722  ,-19699  ,-19821  ,-20750  ,\n    -22413  ,-24043  ,-24684  ,-23833  ,-21778  ,-19420  ,-17720  ,-17191  ,-17780  ,-19159  ,-21058  ,-23327  ,-25707  ,-27630  ,-28315  ,\n    -27128  ,-23933  ,-19232  ,-14057  ,-9669   ,-7099   ,-6737   ,-8151   ,-10398  ,-12581  ,-14167  ,-15096  ,-14984  ,-13239  ,-8832   ,\n    -1039   ,9196    ,20665   ,29407   ,32767   ,32397   ,26689   ,18753   ,13365   ,12319   ,16202   ,22761   ,28804   ,32024   ,31768   ,\n    29459   ,27198   ,26574   ,27657   ,28996   ,28601   ,25257   ,19450   ,13146   ,8572    ,6828    ,7305    ,8257    ,8075    ,6362    ,\n    4093    ,2819    ,3479    ,5667    ,7859    ,8374    ,6358    ,2153    ,-2992   ,-7549   ,-10284  ,-10622  ,-8719   ,-5236   ,-964    ,\n    3412    ,7269    ,9941    ,10874   ,9984    ,7845    ,5412    ,3501    ,2504    ,2483    ,3384    ,5095    ,7383    ,9904    ,12308   ,\n    14260   ,15362   ,15181   ,13550   ,10902   ,8212    ,6439    ,5877    ,5948    ,5627    ,4151    ,1558    ,-1235   ,-2848   ,-2188   ,\n    799     ,4854    ,7919    ,8242    ,5370    ,323     ,-5089   ,-9238   ,-11316  ,-11403  ,-10174  ,-8484   ,-6980   ,-5839   ,-4803   ,\n    -3543   ,-2096   ,-1002   ,-994    ,-2462   ,-5132   ,-8152   ,-10499  ,-11427  ,-10737  ,-8805   ,-6424   ,-4521   ,-3808   ,-4454   ,\n    -5926   ,-7171   ,-7121   ,-5332   ,-2364   ,419     ,1610    ,675     ,-1621   ,-3658   ,-4011   ,-2352   ,447     ,2975    ,4114    ,\n    3548    ,1843    ,203     ,-137    ,1261    ,3549    ,5102    ,4835    ,3166    ,1595    ,1273    ,1998    ,2619    ,2310    ,1361    ,\n    829     ,1589    ,3705    ,6480    ,8906    ,10163   ,9982    ,8784    ,7464    ,6881    ,7360    ,8564    ,9802    ,10532   ,10677   ,\n    10566   ,10563   ,10714   ,10697   ,10139   ,8998    ,7653    ,6635    ,6246    ,6403    ,6757    ,6923    ,6648    ,5866    ,4687    ,\n    3357    ,2150    ,1245    ,658     ,296     ,72      ,-45     ,-90     ,-206    ,-645    ,-1589   ,-2945   ,-4298   ,-5134   ,-5169   ,\n    -4553   ,-3801   ,-3476   ,-3864   ,-4816   ,-5881   ,-6628   ,-6902   ,-6843   ,-6679   ,-6524   ,-6369   ,-6222   ,-6178   ,-6329   ,\n    -6622   ,-6869   ,-6942   ,-6942   ,-7143   ,-7712   ,-8466   ,-8929   ,-8693   ,-7817   ,-6914   ,-6799   ,-7945   ,-10129  ,-12523  ,\n    -14143  ,-14366  ,-13245  ,-11482  ,-10111  ,-10022  ,-11546  ,-14301  ,-17376  ,-19741  ,-20656  ,-19939  ,-18037  ,-15899  ,-14644  ,\n    -15070  ,-17213  ,-20266  ,-22971  ,-24264  ,-23762  ,-21821  ,-19275  ,-17088  ,-16037  ,-16440  ,-17956  ,-19669  ,-20534  ,-19991  ,\n    -18260  ,-16122  ,-14355  ,-13305  ,-12790  ,-12296  ,-11239  ,-9215   ,-6224   ,-2800   ,103     ,1499    ,909     ,-1222   ,-3475   ,\n    -3915   ,-997    ,5463    ,13832   ,21152   ,24512   ,22623   ,16667   ,9893    ,6053    ,7507    ,13984   ,22710   ,29868   ,32571   ,\n    30259   ,24779   ,19205   ,16169   ,16633   ,19680   ,23257   ,25360   ,24996   ,22523   ,19299   ,16887   ,16224   ,17168   ,18619   ,\n    19181   ,17927   ,14859   ,10839   ,7167    ,5046    ,5106    ,7078    ,9756    ,11431   ,10712   ,7329    ,2349    ,-2374   ,-5165   ,\n    -5316   ,-3290   ,-362    ,2020    ,2832    ,1811    ,-557    ,-3342   ,-5588   ,-6645   ,-6324   ,-4876   ,-2870   ,-1008   ,117     ,\n    235     ,-484    ,-1509   ,-2194   ,-2083   ,-1130   ,299     ,1654    ,2511    ,2767    ,2609    ,2344    ,2261    ,2570    ,3358    ,\n    4500    ,5619    ,6250    ,6138    ,5436    ,4628    ,4241    ,4582    ,5610    ,6932    ,7912    ,7931    ,6772    ,4843    ,3013    ,\n    2096    ,2379    ,3515    ,4785    ,5456    ,5049    ,3504    ,1245    ,-956    ,-2345   ,-2611   ,-2028   ,-1246   ,-892    ,-1302   ,\n    -2463   ,-4081   ,-5666   ,-6665   ,-6709   ,-5889   ,-4823   ,-4334   ,-4878   ,-6180   ,-7430   ,-7891   ,-7365   ,-6172   ,-4835   ,\n    -3872   ,-3719   ,-4466   ,-5545   ,-5923   ,-5012   ,-3382   ,-2224   ,-1884   ,-1176   ,1463    ,6091    ,10810   ,13337   ,12931   ,\n    10761   ,8702    ,8074    ,9312    ,12150   ,15678   ,18465   ,19263   ,17982   ,15891   ,14658   ,15046   ,16472   ,17721   ,18034   ,\n    17630   ,17358   ,17917   ,19237   ,20522   ,20851   ,19885   ,18069   ,16245   ,15062   ,14703   ,14973   ,15522   ,15963   ,15959   ,\n    15348   ,14242   ,12929   ,11630   ,10324   ,8823    ,7054    ,5289    ,4084    ,3889    ,4587    ,5369    ,5147    ,3294    ,129     ,\n    -3252   ,-5708   ,-6771   ,-6840   ,-6761   ,-7167   ,-8119   ,-9263   ,-10282  ,-11196  ,-12272  ,-13693  ,-15351  ,-16937  ,-18203  ,\n    -19091  ,-19672  ,-19982  ,-20009  ,-19815  ,-19677  ,-19995  ,-21010  ,-22541  ,-24067  ,-25107  ,-25563  ,-25676  ,-25667  ,-25490  ,\n    -24985  ,-24231  ,-23682  ,-23869  ,-24934  ,-26422  ,-27550  ,-27779  ,-27237  ,-26608  ,-26499  ,-26817  ,-26777  ,-25654  ,-23610  ,\n    -21788  ,-21486  ,-23117  ,-25834  ,-28059  ,-28461  ,-26692  ,-23493  ,-20197  ,-17964  ,-17226  ,-17651  ,-18569  ,-19416  ,-19885  ,\n    -19815  ,-19105  ,-17739  ,-15831  ,-13568  ,-11165  ,-8884   ,-7029   ,-5778   ,-4970   ,-4143   ,-2939   ,-1545   ,-683    ,-966    ,\n    -2055   ,-2405   ,-72     ,5768    ,13730   ,20571   ,23017   ,19889   ,13108   ,6728    ,4695    ,8628    ,16934   ,25973   ,31878   ,\n    32767   ,29621   ,24764   ,21164   ,20780   ,23502   ,27652   ,30900   ,31696   ,30139   ,27722   ,26278   ,26781   ,28890   ,31338   ,\n    32766   ,32397   ,30250   ,26996   ,23623   ,21122   ,20262   ,21382   ,24163   ,27495   ,29672   ,29101   ,25259   ,19251   ,13443   ,\n    10222   ,10638   ,13801   ,17441   ,19261   ,18233   ,15003   ,11265   ,8580    ,7510    ,7523    ,7572    ,6828    ,5105    ,2892    ,\n    1071    ,439     ,1185    ,2633    ,3516    ,2742    ,168     ,-3254   ,-6116   ,-7498   ,-7477   ,-6834   ,-6335   ,-6232   ,-6355   ,\n    -6547   ,-6937   ,-7821   ,-9303   ,-11083  ,-12575  ,-13280  ,-13133  ,-12530  ,-12009  ,-11830  ,-11829  ,-11687  ,-11340  ,-11122  ,\n    -11507  ,-12665  ,-14241  ,-15506  ,-15753  ,-14694  ,-12638  ,-10396  ,-8914   ,-8802   ,-9982   ,-11676  ,-12813  ,-12646  ,-11222  ,\n    -9365   ,-8130   ,-8049   ,-8723   ,-9097   ,-8278   ,-6264   ,-3998   ,-2698   ,-2988   ,-4472   ,-5973   ,-6260   ,-4825   ,-2250   ,\n    206     ,1607    ,2049    ,2296    ,2705    ,2820    ,2268    ,1770    ,2612    ,4869    ,6691    ,5994    ,2808    ,-610    ,-2180   ,\n    -2067   ,-2016   ,-3052   ,-4480   ,-5087   ,-4612   ,-3648   ,-2609   ,-1526   ,-715    ,-864    ,-2025   ,-2995   ,-2418   ,-509    ,\n    905     ,428     ,-1110   ,-1417   ,673     ,3756    ,5256    ,4089    ,1628    ,111     ,462     ,1868    ,3106    ,3765    ,4105    ,\n    4241    ,3977    ,3328    ,2711    ,2400    ,2142    ,1665    ,1354    ,1857    ,2909    ,3148    ,1704    ,-248    ,-378    ,1924    ,\n    4125    ,2888    ,-1968   ,-6529   ,-6447   ,-1515   ,3869    ,4908    ,853     ,-4732   ,-7611   ,-6387   ,-2796   ,526     ,2077    ,\n    1828    ,516     ,-900    ,-1459   ,-533    ,1675    ,4044    ,5226    ,4683    ,3268    ,2767    ,4545    ,8183    ,11284   ,11075   ,\n    6905    ,1443    ,-1092   ,1351    ,6372    ,8957    ,6170    ,168     ,-3793   ,-2651   ,1274    ,2619    ,-1499   ,-8537   ,-13174  ,\n    -12621  ,-9092   ,-7212   ,-9439   ,-14173  ,-17946  ,-18934  ,-18277  ,-18408  ,-20503  ,-23549  ,-25586  ,-25667  ,-24640  ,-24159  ,\n    -25037  ,-26613  ,-27687  ,-27845  ,-27595  ,-27225  ,-25983  ,-22949  ,-18773  ,-15934  ,-16540  ,-19682  ,-21475  ,-18435  ,-11110  ,\n    -4094   ,-1962   ,-4883   ,-8256   ,-6861   ,363     ,9385    ,14732   ,14192   ,10377   ,8067    ,10156   ,15733   ,21595   ,25266   ,\n    26430   ,26423   ,26160   ,25844   ,25701   ,26207   ,28729   ,31689   ,32767   ,32237   ,28483   ,24569   ,24071   ,26060   ,27815   ,\n    26586   ,22754   ,19335   ,18501   ,19539   ,19364   ,15802   ,9849    ,4955    ,3975    ,6513    ,9116    ,8140    ,2868    ,-3845   ,\n    -8005   ,-7889   ,-5398   ,-4163   ,-6239   ,-10430  ,-13658  ,-13868  ,-11718  ,-9722   ,-9915   ,-12239  ,-14884  ,-15982  ,-15064  ,\n    -13145  ,-11593  ,-10952  ,-10751  ,-10296  ,-9449   ,-8609   ,-8095   ,-7841   ,-7744   ,-7962   ,-8480   ,-8467   ,-6679   ,-3052   ,\n    265     ,278     ,-3767   ,-8788   ,-10083  ,-5761   ,1074    ,5000    ,3392    ,-1230   ,-3984   ,-2498   ,1250    ,3668    ,3433    ,\n    2283    ,2400    ,3872    ,5075    ,5005    ,4468    ,4847    ,6241    ,7322    ,6911    ,5297    ,3901    ,3900    ,5339    ,7332    ,\n    8766    ,8854    ,7440    ,5167    ,3314    ,3072    ,4629    ,6872    ,8140    ,7502    ,5471    ,3465    ,2510    ,2454    ,2462    ,\n    2167    ,2016    ,2346    ,2496    ,1436    ,-632    ,-1982   ,-1316   ,267     ,182     ,-2360   ,-4673   ,-3079   ,2967    ,9956    ,\n    13845   ,13977   ,13054   ,13673   ,15713   ,17237   ,17162   ,16349   ,16352   ,17710   ,19666   ,21093   ,21413   ,20828   ,20060   ,\n    19865   ,20529   ,21654   ,22490   ,22562   ,21998   ,21280   ,20792   ,20641   ,20739   ,20871   ,20729   ,20067   ,18955   ,17813   ,\n    17066   ,16772   ,16605   ,16215   ,15493   ,14537   ,13451   ,12326   ,11294   ,10450   ,9644    ,8518    ,6926    ,5274    ,4230    ,\n    3961    ,3768    ,2703    ,587     ,-1722   ,-3175   ,-3576   ,-3703   ,-4458   ,-6054   ,-7986   ,-9599   ,-10532  ,-10786  ,-10654  ,\n    -10664  ,-11394  ,-13065  ,-15223  ,-16946  ,-17525  ,-17082  ,-16567  ,-16975  ,-18431  ,-19955  ,-20328  ,-19338  ,-18188  ,-18465  ,\n    -20631  ,-23503  ,-25271  ,-24998  ,-23270  ,-21625  ,-21407  ,-22868  ,-24985  ,-26148  ,-25451  ,-23634  ,-22607  ,-23680  ,-26139  ,\n    -27772  ,-26981  ,-24345  ,-22033  ,-21723  ,-23172  ,-24731  ,-25035  ,-24120  ,-23027  ,-22568  ,-22587  ,-22334  ,-21407  ,-20179  ,\n    -19314  ,-19008  ,-18829  ,-18268  ,-17244  ,-15984  ,-14533  ,-12688  ,-10508  ,-8664   ,-7970   ,-8389   ,-8627   ,-7037   ,-3183   ,\n    1407    ,4239    ,3932    ,1615    ,288     ,2522    ,8303    ,14837   ,18539   ,17722   ,13942   ,10908   ,11765   ,16756   ,23121   ,\n    27282   ,27550   ,25156   ,22939   ,23034   ,25522   ,28852   ,31257   ,31896   ,31114   ,29981   ,29555   ,30226   ,31509   ,32463   ,\n    32487   ,31794   ,31118   ,30933   ,30966   ,30482   ,29066   ,27140   ,25720   ,25566   ,26452   ,27193   ,26494   ,23977   ,20548   ,\n    17772   ,16739   ,17279   ,18122   ,17802   ,15685   ,12401   ,9432    ,8074    ,8455    ,9340    ,8993    ,6528    ,2691    ,-643    ,\n    -1920   ,-1137   ,157     ,94      ,-2073   ,-5448   ,-8241   ,-9164   ,-8407   ,-7461   ,-7923   ,-10210  ,-13198  ,-15135  ,-15099  ,\n    -13783  ,-12930  ,-13881  ,-16459  ,-19114  ,-20201  ,-19317  ,-17598  ,-16736  ,-17556  ,-19402  ,-20841  ,-21005  ,-20276  ,-19719  ,\n    -19921  ,-20464  ,-20503  ,-19712  ,-18598  ,-17944  ,-18070  ,-18630  ,-19001  ,-18768  ,-17930  ,-16801  ,-15795  ,-15194  ,-14969  ,\n    -14773  ,-14197  ,-13105  ,-11782  ,-10726  ,-10253  ,-10247  ,-10241  ,-9729   ,-8472   ,-6653   ,-4819   ,-3590   ,-3216   ,-3305   ,\n    -3038   ,-1860   ,-9      ,1688    ,2595    ,2795    ,2854    ,3245    ,4181    ,5817    ,8143    ,10432   ,11143   ,8965    ,4169    ,\n    -1308   ,-5367   ,-7294   ,-7744   ,-7453   ,-6336   ,-3894   ,-120    ,4251    ,8223    ,10966   ,11874   ,10730   ,8194    ,5934    ,\n    5747    ,8142    ,11798   ,14642   ,15639   ,15556   ,15963   ,17483   ,19049   ,18847   ,16004   ,11369   ,6797    ,3738    ,2461    ,\n    2387    ,2910    ,3783    ,4854    ,5665    ,5486    ,3823    ,908     ,-2294   ,-4619   ,-5386   ,-4723   ,-3315   ,-1832   ,-524    ,\n    690     ,1797    ,2421    ,2057    ,613     ,-1307   ,-2726   ,-3028   ,-2442   ,-1851   ,-2083   ,-3260   ,-4710   ,-5445   ,-4871   ,\n    -3263   ,-1719   ,-1594   ,-3677   ,-7630   ,-12086  ,-15402  ,-16604  ,-15837  ,-14018  ,-12057  ,-10306  ,-8693   ,-7289   ,-6642   ,\n    -7480   ,-10032  ,-13606  ,-16805  ,-18250  ,-17281  ,-14262  ,-10336  ,-6809   ,-4521   ,-3637   ,-3942   ,-5231   ,-7284   ,-9476   ,\n    -10688  ,-10005  ,-7689   ,-5319   ,-4647   ,-6097   ,-8372   ,-9616   ,-9061   ,-7636   ,-7051   ,-8328   ,-11134  ,-14381  ,-17280  ,\n    -19748  ,-21878  ,-23235  ,-22938  ,-20531  ,-16712  ,-13061  ,-10966  ,-10755  ,-11792  ,-13194  ,-14329  ,-14763  ,-14091  ,-12157  ,\n    -9445   ,-6961   ,-5420   ,-4424   ,-2510   ,1829    ,8918    ,17430   ,24846   ,28525   ,26916   ,20284   ,11203   ,3487    ,862     ,\n    5063    ,14359   ,25342   ,32519   ,32767   ,28108   ,19248   ,10290   ,5259    ,4481    ,6907    ,10059   ,11957   ,12026   ,10809   ,\n    9701    ,9800    ,11329   ,13389   ,14498   ,13564   ,10601   ,6771    ,3733    ,2815    ,4451    ,8081    ,12458   ,16185   ,18242   ,\n    18285   ,16591   ,13738   ,10269   ,6575    ,3060    ,391     ,-516    ,1044    ,4879    ,9541    ,12774   ,12658   ,8735    ,2338    ,\n    -4132   ,-8475   ,-9683   ,-8153   ,-5178   ,-2147   ,74      ,1336    ,1958    ,2248    ,2150    ,1329    ,-363    ,-2504   ,-4249   ,\n    -4957   ,-4698   ,-4122   ,-3769   ,-3498   ,-2607   ,-561    ,2325    ,4859    ,5635    ,3898    ,-28     ,-4955   ,-9424   ,-12219  ,\n    -12603  ,-10437  ,-6339   ,-1739   ,1483    ,1833    ,-988    ,-5896   ,-11021  ,-14644  ,-15880  ,-14823  ,-12263  ,-9207   ,-6433   ,\n    -4239   ,-2526   ,-1156   ,-286    ,-327    ,-1510   ,-3445   ,-5148   ,-5586   ,-4314   ,-1685   ,1481    ,4416    ,6729    ,8372    ,\n    9393    ,9657    ,8762    ,6329    ,2562    ,-1453   ,-4206   ,-4715   ,-3068   ,-75     ,3410    ,6570    ,8271    ,7275    ,3390    ,\n    -1720   ,-5397   ,-6045   ,-4288   ,-2007   ,-438    ,607     ,1884    ,3604    ,5361    ,6827    ,8111    ,9426    ,10711   ,11729   ,\n    12405   ,12909   ,13414   ,13905   ,14240   ,14323   ,14186   ,13946   ,13693   ,13406   ,12963   ,12259   ,11319   ,10270   ,9203    ,\n    8092    ,6885    ,5623    ,4412    ,3301    ,2218    ,1067    ,-156    ,-1352   ,-2403   ,-3266   ,-4011   ,-4782   ,-5692   ,-6708   ,\n    -7655   ,-8385   ,-8946   ,-9542   ,-10291  ,-11083  ,-11692  ,-12015  ,-12135  ,-12181  ,-12181  ,-12085  ,-11870  ,-11566  ,-11198  ,\n    -10765  ,-10263  ,-9684   ,-8987   ,-8120   ,-7089   ,-5952   ,-4734   ,-3387   ,-1889   ,-340    ,1107    ,2429    ,3744    ,5136    ,\n    6536    ,7827    ,9014    ,10176   ,11293   ,12234   ,12935   ,13498   ,14029   ,14451   ,14578   ,14352   ,13867   ,13186   ,12250   ,\n    11042   ,9722    ,8475    ,7243    ,5771    ,3940    ,1928    ,-23     ,-1902   ,-3876   ,-6000   ,-8129   ,-10140  ,-12085  ,-14035  ,\n    -15858  ,-17321  ,-18383  ,-19251  ,-20077  ,-20753  ,-21087  ,-21133  ,-21172  ,-21371  ,-21588  ,-21596  ,-21375  ,-21065  ,-20669  ,\n    -19951  ,-18679  ,-16864  ,-14665  ,-12167  ,-9352   ,-6291   ,-3213   ,-308    ,2437    ,5150    ,7831    ,10340   ,12609   ,14793   ,\n    17125   ,19669   ,22264   ,24708   ,26904   ,28830   ,30429   ,31597   ,32288   ,32556   ,32481   ,32068   ,31254   ,30007   ,28394   ,\n    26550   ,24593   ,22568   ,20462   ,18242   ,15888   ,13385   ,10736   ,7967    ,5133    ,2295    ,-524    ,-3336   ,-6132   ,-8828   ,\n    -11278  ,-13368  ,-15084  ,-16497  ,-17687  ,-18671  ,-19427  ,-19943  ,-20258  ,-20416  ,-20438  ,-20305  ,-20017  ,-19613  ,-19136  ,\n    -18550  ,-17741  ,-16629  ,-15263  ,-13810  ,-12397  ,-11022  ,-9610   ,-8158   ,-6772   ,-5554   ,-4506   ,-3554   ,-2635   ,-1711   ,\n    -729    ,364     ,1532    ,2635    ,3557    ,4346    ,5166    ,6116    ,7119    ,8022    ,8738    ,9287    ,9720    ,10092   ,10469   ,\n    10898   ,11327   ,11615   ,11685   ,11632   ,11624   ,11688   ,11678   ,11461   ,11080   ,10661   ,10209   ,9583    ,8686    ,7594    ,\n    6465    ,5365    ,4248    ,3085    ,1919    ,779     ,-386    ,-1639   ,-2955   ,-4245   ,-5466   ,-6661   ,-7879   ,-9100   ,-10262  ,\n    -11330  ,-12299  ,-13139  ,-13784  ,-14191  ,-14400  ,-14494  ,-14503  ,-14351  ,-13935  ,-13247  ,-12411  ,-11549  ,-10645  ,-9567   ,\n    -8291   ,-7068   ,-6293   ,-6172   ,-6531   ,-6984   ,-7253   ,-7285   ,-7134   ,-6827   ,-6380   ,-5829   ,-5185   ,-4406   ,-3494   ,\n    -2597   ,-1877   ,-1264   ,-466    ,706     ,2069    ,3279    ,4245    ,5206    ,6337    ,7445    ,8185    ,8513    ,8750    ,9175    ,\n    9679    ,9925    ,9743    ,9273    ,8750    ,8275    ,7810    ,7277    ,6609    ,5775    ,4838    ,3945    ,3152    ,2304    ,1171    ,\n    -250    ,-1685   ,-2886   ,-3921   ,-5053   ,-6360   ,-7593   ,-8437   ,-8841   ,-9016   ,-9177   ,-9386   ,-9613   ,-9823   ,-9957   ,\n    -9901   ,-9569   ,-9011   ,-8360   ,-7674   ,-6870   ,-5841   ,-4578   ,-3172   ,-1733   ,-365    ,847     ,1865    ,2734    ,3528    ,\n    4263    ,4928    ,5573    ,6299    ,7109    ,7849    ,8371    ,8698    ,8940    ,9069    ,8929    ,8495    ,7960    ,7452    ,6763    ,\n    5565    ,3921    ,2364    ,1357    ,758     ,-20     ,-1354   ,-3058   ,-4691   ,-6029   ,-7181   ,-8346   ,-9637   ,-11093  ,-12681  ,\n    -14227  ,-15466  ,-16267  ,-16766  ,-17194  ,-17581  ,-17772  ,-17686  ,-17495  ,-17440  ,-17595  ,-17841  ,-18072  ,-18279  ,-18419  ,\n    -18320  ,-17778  ,-16743  ,-15299  ,-13481  ,-11169  ,-8263   ,-4907   ,-1477   ,1694    ,4557    ,7289    ,10029   ,12735   ,15329   ,\n    17853   ,20485   ,23233   ,25893   ,28224   ,30087   ,31648   ,32641   ,32767   ,32272   ,30980   ,29397   ,27962   ,26388   ,24460   ,\n    22217   ,20048   ,18282   ,16837   ,15455   ,13984   ,12502   ,11103   ,9726    ,8250    ,6685    ,5214    ,4055    ,3298    ,2852    ,\n    2544    ,2286    ,2154    ,2293    ,2697    ,3120    ,3250    ,2984    ,2481    ,1915    ,1262    ,365     ,-821    ,-2154   ,-3474   ,\n    -4734   ,-5949   ,-7093   ,-8149   ,-9217   ,-10449  ,-11862  ,-13308  ,-14672  ,-16006  ,-17404  ,-18782  ,-19917  ,-20665  ,-21063  ,\n    -21169  ,-20931  ,-20266  ,-19213  ,-17909  ,-16440  ,-14836  ,-13166  ,-11543  ,-9961   ,-8263   ,-6346   ,-4330   ,-2409   ,-566    ,\n    1400    ,3530    ,5536    ,7096    ,8228    ,9236    ,10283   ,11179   ,11646   ,11667   ,11470   ,11247   ,11006   ,10684   ,10259   ,\n    9705    ,8961    ,8044    ,7107    ,6289    ,5526    ,4633    ,3589    ,2612    ,1880    ,1291    ,613     ,-170    ,-841    ,-1290   ,\n    -1715   ,-2314   ,-2910   ,-3127   ,-2978   ,-3009   ,-3626   ,-4446   ,-4687   ,-4270   ,-4088   ,-4839   ,-5851   ,-5742   ,-4456   ,\n    -4080   ,-6919   ,-12731  ,-18420  ,-20833  ,-19617  ,-17064  ,-15377  ,-14618  ,-13341  ,-10649  ,-7066   ,-3590   ,-482    ,2717    ,\n    6294    ,9933    ,13201   ,16117   ,19018   ,21965   ,24555   ,26400   ,27580   ,28459   ,29099   ,29111   ,28136   ,26321   ,24161   ,\n    21946   ,19585   ,16952   ,14170   ,11434   ,8709    ,5844    ,2925    ,264     ,-1997   ,-4054   ,-6086   ,-7899   ,-9169   ,-9932   ,\n    -10582  ,-11340  ,-11981  ,-12230  ,-12236  ,-12385  ,-12745  ,-12993  ,-12940  ,-12850  ,-13071  ,-13546  ,-13954  ,-14253  ,-14762  ,\n    -15627  ,-16498  ,-16928  ,-16940  ,-16916  ,-16996  ,-16844  ,-16119  ,-14894  ,-13470  ,-11900  ,-9972   ,-7589   ,-4925   ,-2145   ,\n    810     ,3995    ,7210    ,10173   ,12883   ,15567   ,18248   ,20591   ,22301   ,23479   ,24411   ,25087   ,25180   ,24498   ,23205   ,\n    21508   ,19349   ,16624   ,13555   ,10580   ,7845    ,5061    ,1983    ,-1160   ,-3899   ,-6080   ,-7959   ,-9780   ,-11478  ,-12901  ,\n    -14074  ,-15066  ,-15724  ,-15807  ,-15368  ,-14767  ,-14217  ,-13540  ,-12537  ,-11456  ,-10837  ,-10914  ,-11419  ,-12044  ,-12850  ,\n    -14031  ,-15415  ,-16493  ,-16957  ,-16957  ,-16724  ,-16141  ,-14895  ,-12975  ,-10784  ,-8725   ,-6856   ,-5012   ,-3096   ,-1070   ,\n    1226    ,4016    ,7328    ,10929   ,14573   ,18174   ,21621   ,24582   ,26692   ,27929   ,28622   ,29021   ,29001   ,28310   ,26993   ,\n    25396   ,23784   ,22144   ,20402   ,18662   ,17055   ,15470   ,13610   ,11359   ,8930    ,6597    ,4413    ,2312    ,383     ,-1125   ,\n    -2086   ,-2617   ,-2870   ,-2825   ,-2427   ,-1852   ,-1462   ,-1486   ,-1856   ,-2382   ,-2978   ,-3627   ,-4255   ,-4802   ,-5380   ,\n    -6199   ,-7265   ,-8293   ,-9028   ,-9567   ,-10234  ,-11186  ,-12272  ,-13313  ,-14326  ,-15396  ,-16461  ,-17395  ,-18253  ,-19215  ,\n    -20261  ,-21023  ,-21098  ,-20416  ,-19177  ,-17507  ,-15335  ,-12621  ,-9495   ,-6087   ,-2325   ,1916    ,6498    ,11021   ,15166   ,\n    18905   ,22303   ,25255   ,27534   ,29083   ,30110   ,30891   ,31573   ,32182   ,32649   ,32714   ,31924   ,29933   ,26868   ,23258   ,\n    19552   ,15798   ,11861   ,7835    ,4053    ,721     ,-2260   ,-5032   ,-7516   ,-9531   ,-11081  ,-12336  ,-13358  ,-14048  ,-14419  ,\n    -14716  ,-15123  ,-15489  ,-15547  ,-15333  ,-15136  ,-15068  ,-14945  ,-14735  ,-14785  ,-15320  ,-15958  ,-16177  ,-16262  ,-17163  ,\n    -19054  ,-20398  ,-19193  ,-15252  ,-10794  ,-8377   ,-8484   ,-9400   ,-9270   ,-7823   ,-6041   ,-4674   ,-3480   ,-1767   ,746     ,\n    3709    ,6546    ,8902    ,10786   ,12445   ,14078   ,15595   ,16640   ,16900   ,16360   ,15223   ,13629   ,11577   ,9106    ,6419    ,\n    3740    ,1127    ,-1466   ,-3976   ,-6210   ,-8064   ,-9633   ,-11029  ,-12184  ,-12951  ,-13336  ,-13479  ,-13368  ,-12742  ,-11395  ,\n    -9518   ,-7587   ,-5911   ,-4443   ,-3070   ,-1920   ,-1228   ,-960    ,-791    ,-500    ,-245    ,-333    ,-806    ,-1422   ,-2011   ,\n    -2677   ,-3557   ,-4524   ,-5270   ,-5653   ,-5818   ,-5942   ,-5984   ,-5762   ,-5180   ,-4281   ,-3095   ,-1569   ,297     ,2325    ,\n    4238    ,5858    ,7175    ,8247    ,9085    ,9635    ,9827    ,9610    ,8982    ,8005    ,6773    ,5355    ,3770    ,2025    ,122     ,\n    -1989   ,-4426   ,-7251   ,-10305  ,-13221  ,-15655  ,-17488  ,-18799  ,-19651  ,-19994  ,-19741  ,-18918  ,-17665  ,-16165  ,-14564  ,\n    -12947  ,-11304  ,-9551   ,-7641   ,-5678   ,-3860   ,-2273   ,-781    ,790     ,2358    ,3551    ,3999    ,3639    ,2696    ,1404    ,\n    -165    ,-1994   ,-3915   ,-5568   ,-6582   ,-6781   ,-6231   ,-5101   ,-3471   ,-1256   ,1646    ,5096    ,8627    ,11704   ,14132   ,\n    16167   ,18133   ,19930   ,21041   ,21052   ,20152   ,18979   ,18015   ,17212   ,16271   ,15156   ,14187   ,13656   ,13493   ,13422   ,\n    13324   ,13337   ,13639   ,14269   ,15194   ,16415   ,17915   ,19561   ,21188   ,22727   ,24151   ,25279   ,25779   ,25440   ,24335   ,\n    22626   ,20301   ,17261   ,13627   ,9769    ,5947    ,2086    ,-1946   ,-5959   ,-9522   ,-12418  ,-14795  ,-16805  ,-18284  ,-18975  ,\n    -18994  ,-18767  ,-18497  ,-17871  ,-16465  ,-14288  ,-11772  ,-9285   ,-6881   ,-4561   ,-2578   ,-1288   ,-807    ,-974    ,-1666   ,\n    -2989   ,-5090   ,-7869   ,-10932  ,-13789  ,-16044  ,-17450  ,-17920  ,-17482  ,-16183  ,-14054  ,-11183  ,-7801   ,-4163   ,-319    ,\n    3852    ,8298    ,12630   ,16374   ,19511   ,22357   ,25151   ,27742   ,29746   ,31353   ,32450   ,32767   ,32207   ,29537   ,25019   ,\n    19809   ,14444   ,9121    ,3634    ,-1932   ,-7123   ,-11588  ,-15204  ,-18029  ,-20100  ,-21490  ,-22374  ,-22887  ,-22991  ,-22583  ,\n    -21728  ,-20624  ,-19313  ,-17565  ,-15175  ,-12312  ,-9437   ,-6929   ,-4907   ,-3396   ,-2460   ,-2064   ,-1988   ,-2118   ,-2760   ,\n    -4328   ,-6566   ,-8281   ,-8200   ,-6171   ,-3356   ,-1149   ,18      ,756     ,1823    ,3363    ,5019    ,6498    ,7854    ,9272    ,\n    10772   ,12185   ,13332   ,14169   ,14810   ,15439   ,16158   ,16886   ,17397   ,17538   ,17389   ,17159   ,16945   ,16625   ,16050   ,\n    15254   ,14436   ,13707   ,12943   ,11929   ,10612   ,9169    ,7824    ,6636    ,5476    ,4185    ,2730    ,1226    ,-185    ,-1449   ,\n    -2618   ,-3750   ,-4812   ,-5715   ,-6456   ,-7197   ,-8121   ,-9182   ,-10080  ,-10540  ,-10628  ,-10677  ,-10894  ,-11128  ,-11124  ,\n    -10926  ,-10856  ,-11058  ,-11229  ,-10941  ,-10182  ,-9377   ,-8862   ,-8501   ,-7945   ,-7149   ,-6450   ,-6128   ,-6072   ,-5965   ,\n    -5687   ,-5416   ,-5371   ,-5561   ,-5819   ,-5986   ,-6045   ,-6124   ,-6403   ,-6980   ,-7771   ,-8581   ,-9293   ,-9974   ,-10748  ,\n    -11621  ,-12494  ,-13320  ,-14157  ,-15020  ,-15792  ,-16340  ,-16696  ,-17018  ,-17391  ,-17723  ,-17885  ,-17865  ,-17746  ,-17568  ,\n    -17281  ,-16841  ,-16287  ,-15660  ,-14914  ,-13949  ,-12767  ,-11500  ,-10225  ,-8796   ,-6991   ,-4875   ,-2919   ,-1574   ,-734    ,\n    236     ,1801    ,3717    ,5364    ,6578    ,7900    ,9852    ,12155   ,13962   ,14869   ,15422   ,16471   ,18163   ,19795   ,20640   ,\n    20690   ,20558   ,20784   ,21421   ,22178   ,22792   ,23203   ,23503   ,23811   ,24198   ,24661   ,25161   ,25676   ,26189   ,26635   ,\n    26921   ,27037   ,27111   ,27305   ,27678   ,28184   ,28781   ,29449   ,30130   ,30700   ,31066   ,31222   ,31204   ,31046   ,30803   ,\n    30548   ,30253   ,29736   ,28850   ,27715   ,26627   ,25673   ,24590   ,23095   ,21279   ,19486   ,17835   ,16054   ,13856   ,11334   ,\n    8810    ,6367    ,3745    ,746     ,-2416   ,-5298   ,-7703   ,-9848   ,-12066  ,-14447  ,-16840  ,-19093  ,-21188  ,-23151  ,-24944  ,\n    -26499  ,-27834  ,-29058  ,-30250  ,-31353  ,-32202  ,-32635  ,-32593  ,-32145  ,-31426  ,-30546  ,-29534  ,-28366  ,-27043  ,-25601  ,\n    -24044  ,-22323  ,-20445  ,-18574  ,-16925  ,-15527  ,-14158  ,-12595  ,-10868  ,-9173   ,-7578   ,-5955   ,-4249   ,-2693   ,-1598   ,\n    -972    ,-504    ,38      ,522     ,645     ,350     ,-65     ,-269    ,-236    ,-228    ,-508    ,-1097   ,-1811   ,-2469   ,-3037   ,\n    -3579   ,-4149   ,-4787   ,-5578   ,-6540   ,-7426   ,-7852   ,-7828   ,-7969   ,-8782   ,-9775   ,-9814   ,-8707   ,-7852   ,-8484   ,\n    -9555   ,-8544   ,-5152   ,-3201   ,-7309   ,-17522  ,-28087  ,-32767  ,-30695  ,-25906  ,-22514  ,-20689  ,-17897  ,-12991  ,-7402   ,\n    -2911   ,558     ,4355    ,9004    ,13563   ,16883   ,18833   ,20024   ,20748   ,20606   ,19153   ,16574   ,13585   ,10776   ,8156    ,\n    5376    ,2333    ,-530    ,-2566   ,-3552   ,-3892   ,-4133   ,-4340   ,-4068   ,-2972   ,-1287   ,438     ,2027    ,3890    ,6441    ,\n    9422    ,11989   ,13509   ,14100   ,14268   ,14093   ,13006   ,10451   ,6620    ,2363    ,-1635   ,-5428   ,-9450   ,-13796  ,-17973  ,\n    -21508  ,-24508  ,-27375  ,-30214  ,-32263  ,-32767  ,-31911  ,-30067  ,-27752  ,-24882  ,-20842  ,-15561  ,-9618   ,-3721   ,1900    ,\n    7414    ,12749   ,17416   ,20974   ,23548   ,25673   ,27621   ,29073   ,29508   ,28789   ,27249   ,25229   ,22723   ,19560   ,15826   ,\n    11925   ,8178    ,4471    ,442     ,-3978   ,-8310   ,-11880  ,-14382  ,-16016  ,-17122  ,-17803  ,-17988  ,-17729  ,-17291  ,-16882  ,\n    -16453  ,-15840  ,-15075  ,-14389  ,-13921  ,-13508  ,-12900  ,-12088  ,-11262  ,-10435  ,-9275   ,-7511   ,-5467   ,-3959   ,-3473   ,\n    -3529   ,-3070   ,-1535   ,650     ,2784    ,4942    ,7959    ,12254   ,16918   ,20322   ,21673   ,21702   ,21643   ,21659   ,20566   ,\n    17167   ,11675   ,5695    ,920     ,-2022   ,-3554   ,-4324   ,-4562   ,-4081   ,-2664   ,-364    ,2432    ,5192    ,7566    ,9639    ,\n    11837   ,14520   ,17685   ,21070   ,24453   ,27679   ,30424   ,32154   ,32470   ,31420   ,29266   ,25969   ,21159   ,14754   ,7481    ,\n    528     ,-5387   ,-10440  ,-15130  ,-19434  ,-22742  ,-24619  ,-25367  ,-25690  ,-25868  ,-25489  ,-24009  ,-21384  ,-17994  ,-14062  ,\n    -9405   ,-3896   ,2016    ,7492    ,12015   ,15737   ,18998   ,21632   ,22972   ,22532   ,20521   ,17569   ,14092   ,10089   ,5554    ,\n    814     ,-3707   ,-7944   ,-12196  ,-16611  ,-20820  ,-24219  ,-26528  ,-27918  ,-28517  ,-27982  ,-25761  ,-21780  ,-16706  ,-11385  ,\n    -6112   ,-631    ,5112    ,10436   ,14349   ,16480   ,17347   ,17612   ,17292   ,15952   ,13590   ,10959   ,8752    ,6691    ,3766    ,\n    -548    ,-5589   ,-10221  ,-14045  ,-17560  ,-21118  ,-24099  ,-25396  ,-24580  ,-22242  ,-19152  ,-15425  ,-10753  ,-5215   ,528     ,\n    5852    ,10649   ,15011   ,18746   ,21520   ,23336   ,24534   ,25268   ,25291   ,24317   ,22254   ,18971   ,14307   ,8696    ,3318    ,\n    -1207   ,-6110   ,-13224  ,-21689  ,-26832  ,-23945  ,-13631  ,-2335   ,3290    ,2249    ,-1046   ,-2245   ,-1100   ,-124    ,-733    ,\n    -1914   ,-2232   ,-1795   ,-1746   ,-2608   ,-3850   ,-4864   ,-5697   ,-6717   ,-7998   ,-9296   ,-10409  ,-11302  ,-11976  ,-12410  ,\n    -12642  ,-12741  ,-12671  ,-12316  ,-11681  ,-10983  ,-10437  ,-10027  ,-9551   ,-8876   ,-8071   ,-7307   ,-6688   ,-6196   ,-5723   ,\n    -5136   ,-4368   ,-3503   ,-2737   ,-2178   ,-1710   ,-1120   ,-366    ,341     ,768     ,932     ,1072    ,1392    ,1883    ,2424    ,\n    2953    ,3485    ,4001    ,4438    ,4814    ,5294    ,6042    ,6993    ,7853    ,8370    ,8586    ,8766    ,9082    ,9439    ,9653    ,\n    9720    ,9818    ,10034   ,10215   ,10154   ,9869    ,9573    ,9376    ,9123    ,8587    ,7740    ,6728    ,5622    ,4325    ,2768    ,\n    1100    ,-413    ,-1646   ,-2693   ,-3700   ,-4720   ,-5746   ,-6786   ,-7847   ,-8866   ,-9759   ,-10536  ,-11288  ,-12053  ,-12742  ,\n    -13227  ,-13457  ,-13454  ,-13248  ,-12868  ,-12404  ,-11992  ,-11711  ,-11551  ,-11476  ,-11474  ,-11531  ,-11604  ,-11696  ,-11891  ,\n    -12222  ,-12494  ,-12336  ,-11506  ,-10075  ,-8253   ,-6094   ,-3501   ,-524    ,2481    ,5100    ,7221    ,9045    ,10740   ,12171   ,\n    13022   ,13123   ,12619   ,11853   ,11156   ,10731   ,10621   ,10729   ,10881   ,10939   ,10870   ,10695   ,10391   ,9908    ,9308    ,\n    8852    ,8871    ,9547    ,10849   ,12674   ,14990   ,17777   ,20865   ,23941   ,26735   ,29151   ,31113   ,32337   ,32396   ,31096   ,\n    28740   ,25918   ,23026   ,20053   ,16846   ,13489   ,10346   ,7747    ,5734    ,4123    ,2748    ,1616    ,813     ,321     ,-33     ,\n    -454    ,-990    ,-1501   ,-1843   ,-2037   ,-2216   ,-2407   ,-2448   ,-2206   ,-1831   ,-1699   ,-2088   ,-2983   ,-4234   ,-5820   ,\n    -7863   ,-10416  ,-13337  ,-16401  ,-19457  ,-22409  ,-25073  ,-27160  ,-28424  ,-28806  ,-28420  ,-27408  ,-25824  ,-23675  ,-21057  ,\n    -18227  ,-15504  ,-13069  ,-10920  ,-9018   ,-7442   ,-6332   ,-5690   ,-5317   ,-4987   ,-4627   ,-4294   ,-4035   ,-3852   ,-3776   ,\n    -3845   ,-4004   ,-4106   ,-4080   ,-4037   ,-4111   ,-4232   ,-4139   ,-3609   ,-2590   ,-1098   ,873     ,3233    ,5700    ,7972    ,\n    10015   ,12014   ,14001   ,15653   ,16589   ,16810   ,16640   ,16266   ,15508   ,14167   ,12418   ,10643   ,8938    ,7101    ,5193    ,\n    3776    ,3238    ,3029    ,2114    ,430     ,-478    ,1162    ,5274    ,9625    ,11831   ,11497   ,10168   ,9429    ,9477    ,9557    ,\n    9234    ,8811    ,8675    ,8711    ,8533    ,8001    ,7292    ,6581    ,5877    ,5156    ,4477    ,3870    ,3236    ,2454    ,1551    ,\n    694     ,12      ,-510    ,-981    ,-1470   ,-1967   ,-2434   ,-2886   ,-3392   ,-3989   ,-4600   ,-5072   ,-5338   ,-5499   ,-5702   ,\n    -5943   ,-6060   ,-5947   ,-5709   ,-5560   ,-5579   ,-5652   ,-5646   ,-5596   ,-5662   ,-5935   ,-6324   ,-6641   ,-6777   ,-6772   ,\n    -6744   ,-6777   ,-6873   ,-7006   ,-7150   ,-7258   ,-7247   ,-7063   ,-6770   ,-6509   ,-6345   ,-6183   ,-5898   ,-5503   ,-5136   ,\n    -4865   ,-4586   ,-4159   ,-3591   ,-3029   ,-2581   ,-2192   ,-1734   ,-1174   ,-611    ,-165    ,147     ,386     ,565     ,570     ,\n    269     ,-291    ,-856    ,-1195   ,-1369   ,-1671   ,-2290   ,-3093   ,-3797   ,-4287   ,-4679   ,-5104   ,-5569   ,-6068   ,-6668   ,\n    -7380   ,-8007   ,-8303   ,-8273   ,-8187   ,-8216   ,-8190   ,-7820   ,-7103   ,-6325   ,-5659   ,-4902   ,-3753   ,-2278   ,-965    ,\n    -283    ,-249    ,-479    ,-603    ,-551    ,-427    ,-212    ,294     ,1229    ,2449    ,3654    ,4712    ,5783    ,7038    ,8345    ,\n    9330    ,9773    ,9858    ,9993    ,10442   ,11216   ,12265   ,13629   ,15355   ,17360   ,19458   ,21510   ,23437   ,25135   ,26496   ,\n    27539   ,28438   ,29339   ,30179   ,30785   ,31136   ,31431   ,31846   ,32320   ,32631   ,32676   ,32560   ,32375   ,31980   ,31077   ,\n    29535   ,27573   ,25600   ,23848   ,22218   ,20473   ,18544   ,16599   ,14810   ,13154   ,11494   ,9823    ,8325    ,7132    ,6088    ,\n    4849    ,3218    ,1332    ,-505    ,-2122   ,-3587   ,-5033   ,-6465   ,-7771   ,-8884   ,-9895   ,-10957  ,-12112  ,-13250  ,-14276  ,\n    -15267  ,-16402  ,-17763  ,-19239  ,-20700  ,-22149  ,-23634  ,-25047  ,-26145  ,-26820  ,-27270  ,-27789  ,-28432  ,-28975  ,-29209  ,\n    -29174  ,-29055  ,-28916  ,-28649  ,-28172  ,-27598  ,-27123  ,-26781  ,-26372  ,-25652  ,-24574  ,-23303  ,-22004  ,-20679  ,-19230  ,\n    -17648  ,-16059  ,-14580  ,-13179  ,-11755  ,-10296  ,-8912   ,-7713   ,-6697   ,-5759   ,-4756   ,-3551   ,-2087   ,-459    ,1112    ,\n    2428    ,3454    ,4300    ,5092    ,5883    ,6623    ,7206    ,7585    ,7913    ,8438    ,9144    ,9606    ,9489    ,9158    ,9397    ,\n    10319   ,10970   ,10561   ,9851    ,10431   ,12283   ,12796   ,9233    ,2180    ,-4308   ,-6456   ,-4269   ,-910    ,924     ,1273    ,\n    1729    ,2999    ,4323    ,4838    ,4666    ,4451    ,4354    ,3946    ,2926    ,1562    ,352     ,-540    ,-1359   ,-2369   ,-3507   ,\n    -4447   ,-4950   ,-5070   ,-5010   ,-4800   ,-4251   ,-3261   ,-2081   ,-1139   ,-561    ,-15     ,902     ,2175    ,3378    ,4115    ,\n    4355    ,4305    ,4065    ,3488    ,2338    ,529     ,-1810   ,-4443   ,-7183   ,-9964   ,-12737  ,-15304  ,-17271  ,-18228  ,-17989  ,\n    -16639  ,-14334  ,-11147  ,-7103   ,-2321   ,2950    ,8405    ,13732   ,18584   ,22598   ,25480   ,27060   ,27240   ,25952   ,23232   ,\n    19314   ,14581   ,9412    ,4110    ,-1026   ,-5645   ,-9409   ,-12067  ,-13428  ,-13315  ,-11619  ,-8422   ,-4017   ,1199    ,6831    ,\n    12486   ,17769   ,22344   ,25953   ,28333   ,29156   ,28149   ,25282   ,20788   ,14999   ,8277    ,1039    ,-6188   ,-13011  ,-19295  ,\n    -24882  ,-29437  ,-32193  ,-32767  ,-31694  ,-29235  ,-25712  ,-21242  ,-15886  ,-10293  ,-5213   ,-996    ,2483    ,5388    ,7433    ,\n    8064    ,6943    ,4291    ,716     ,-3192   ,-7107   ,-10895  ,-14396  ,-17330  ,-19407  ,-20471  ,-20499  ,-19487  ,-17432  ,-14461  ,\n    -10917  ,-7195   ,-3500   ,178     ,3844    ,7331    ,10410   ,12968   ,14995   ,16443   ,17229   ,17379   ,17069   ,16437   ,15482   ,\n    14216   ,12867   ,11764   ,11021   ,10451   ,9890    ,9500    ,9632    ,10409   ,11570   ,12745   ,13796   ,14826   ,15899   ,16844   ,\n    17360   ,17282   ,16720   ,15969   ,15231   ,14423   ,13241   ,11469   ,9222    ,6860    ,4667    ,2648    ,648     ,-1398   ,-3414   ,\n    -5319   ,-7115   ,-8804   ,-10281  ,-11376  ,-11981  ,-12108  ,-11854  ,-11333  ,-10630  ,-9751   ,-8621   ,-7203   ,-5663   ,-4361   ,\n    -3599   ,-3394   ,-3535   ,-3858   ,-4420   ,-5392   ,-6840   ,-8636   ,-10556  ,-12398  ,-14046  ,-15465  ,-16635  ,-17453  ,-17710  ,\n    -17223  ,-16040  ,-14435  ,-12658  ,-10689  ,-8326   ,-5496   ,-2406   ,622     ,3384    ,5782    ,7691    ,8974    ,9637    ,9833    ,\n    9639    ,8906    ,7452    ,5378    ,3078    ,911     ,-1034   ,-2818   ,-4369   ,-5436   ,-5820   ,-5541   ,-4739   ,-3503   ,-1853   ,\n    138     ,2316    ,4529    ,6668    ,8566    ,9973    ,10746   ,11008   ,10953   ,10480   ,9254    ,7273    ,5112    ,3274    ,1432    ,\n    -1147   ,-4255   ,-6464   ,-6848   ,-6619   ,-7947   ,-10706  ,-11341  ,-6166   ,4184    ,14549   ,19971   ,20102   ,18533   ,18380   ,\n    19535   ,20099   ,19271   ,17951   ,17042   ,16281   ,14955   ,13092   ,11410   ,10404   ,9956    ,9777    ,9755    ,9768    ,9516    ,\n    8834    ,7983    ,7332    ,6818    ,6008    ,4731    ,3367    ,2315    ,1396    ,55      ,-1841   ,-3711   ,-4876   ,-5299   ,-5541   ,\n    -6072   ,-6859   ,-7634   ,-8348   ,-9196   ,-10271  ,-11389  ,-12300  ,-12958  ,-13521  ,-14109  ,-14668  ,-15059  ,-15252  ,-15355  ,\n    -15499  ,-15714  ,-15963  ,-16232  ,-16562  ,-16942  ,-17225  ,-17160  ,-16560  ,-15418  ,-13917  ,-12322  ,-10893  ,-9851   ,-9357   ,\n    -9464   ,-10060  ,-10899  ,-11753  ,-12536  ,-13263  ,-13884  ,-14215  ,-14099  ,-13593  ,-12900  ,-12102  ,-11040  ,-9571   ,-7915   ,\n    -6634   ,-6158   ,-6347   ,-6616   ,-6536   ,-6237   ,-6161   ,-6453   ,-6767   ,-6721   ,-6398   ,-6210   ,-6290   ,-6283   ,-5880   ,\n    -5383   ,-5449   ,-6288   ,-7347   ,-7938   ,-7958   ,-7775   ,-7493   ,-6676   ,-4953   ,-2645   ,-503    ,1171    ,2857    ,5099    ,\n    7616    ,9367    ,9552    ,8389    ,6799    ,5488    ,4534    ,3814    ,3540    ,4157    ,5833    ,8288    ,11141   ,14185   ,17193   ,\n    19623   ,20800   ,20452   ,18989   ,17153   ,15498   ,14235   ,13470   ,13386   ,14152   ,15727   ,17866   ,20246   ,22558   ,24459   ,\n    25590   ,25754   ,25076   ,23913   ,22541   ,20981   ,19201   ,17464   ,16340   ,16293   ,17257   ,18690   ,20039   ,21073   ,21773   ,\n    21995   ,21402   ,19776   ,17337   ,14668   ,12269   ,10224   ,8308    ,6383    ,4633    ,3412    ,2927    ,3090    ,3572    ,3938    ,\n    3765    ,2821    ,1180    ,-863    ,-3063   ,-5331   ,-7578   ,-9556   ,-10995  ,-11867  ,-12375  ,-12668  ,-12683  ,-12353  ,-11866  ,\n    -11636  ,-12024  ,-13122  ,-14714  ,-16375  ,-17733  ,-18787  ,-19928  ,-21408  ,-22792  ,-23201  ,-22329  ,-20978  ,-20280  ,-20442  ,\n    -20654  ,-20368  ,-20241  ,-21391  ,-23901  ,-26598  ,-28464  ,-29751  ,-31236  ,-32605  ,-32286  ,-29133  ,-23893  ,-18564  ,-14460  ,\n    -11367  ,-8597   ,-6322   ,-5441   ,-6330   ,-8228   ,-9983   ,-11049  ,-11533  ,-11466  ,-10422  ,-7957   ,-4234   ,-33     ,3829    ,\n    7010    ,9587    ,11600   ,12781   ,12821   ,11863   ,10599   ,9751    ,9515    ,9695    ,10319   ,11806   ,14334   ,17285   ,19736   ,\n    21442   ,22871   ,24143   ,24469   ,23234   ,21326   ,20430   ,20644   ,19577   ,14808   ,7272    ,1286    ,653     ,5059    ,10732   ,\n    14327   ,15535   ,15997   ,16665   ,16935   ,15989   ,14045   ,12009   ,10375   ,8968    ,7603    ,6551    ,6228    ,6679    ,7557    ,\n    8546    ,9641    ,10995   ,12584   ,14093   ,15112   ,15417   ,15037   ,14055   ,12424   ,10030   ,6953    ,3605    ,552     ,-1777   ,\n    -3188   ,-3587   ,-2887   ,-1139   ,1287    ,3758    ,5691    ,6804    ,7036    ,6277    ,4312    ,1109    ,-2870   ,-6772   ,-9835   ,\n    -11739  ,-12521  ,-12261  ,-10965  ,-8742   ,-5969   ,-3195   ,-933    ,443     ,694     ,-260    ,-2266   ,-4964   ,-7924   ,-10763  ,\n    -13122  ,-14631  ,-14984  ,-14099  ,-12202  ,-9739   ,-7203   ,-5035   ,-3596   ,-3147   ,-3777   ,-5352   ,-7543   ,-9930   ,-12104  ,\n    -13729  ,-14595  ,-14653  ,-13990  ,-12721  ,-10934  ,-8786   ,-6636   ,-4985   ,-4202   ,-4286   ,-4941   ,-5858   ,-6891   ,-7970   ,\n    -8942   ,-9583   ,-9767   ,-9569   ,-9165   ,-8656   ,-7992   ,-7061   ,-5834   ,-4396   ,-2859   ,-1289   ,278     ,1773    ,3090    ,\n    4133    ,4781    ,4821    ,4010    ,2341    ,237     ,-1617   ,-2681   ,-2794   ,-2040   ,-521    ,1628    ,4059    ,6230    ,7664    ,\n    8156    ,7714    ,6411    ,4437    ,2299    ,815     ,777     ,2541    ,5876    ,10102   ,14338   ,17743   ,19734   ,20141   ,19129   ,\n    16976   ,13952   ,10512   ,7487    ,5895    ,6394    ,8897    ,12770   ,17329   ,22050   ,26357   ,29428   ,30457   ,29140   ,25850   ,\n    21360   ,16459   ,11841   ,8192    ,6150    ,6077    ,7867    ,10993   ,14712   ,18236   ,20823   ,21893   ,21208   ,18952   ,15591   ,\n    11631   ,7528    ,3753    ,824     ,-860    ,-1229   ,-535    ,864     ,2626    ,4358    ,5555    ,5797    ,5009    ,3481    ,1592    ,\n    -440    ,-2549   ,-4684   ,-6742   ,-8589   ,-10098  ,-11191  ,-11927  ,-12524  ,-13152  ,-13687  ,-13753  ,-13095  ,-11879  ,-10536  ,\n    -9398   ,-8609   ,-8355   ,-9091   ,-11215  ,-14696  ,-19009  ,-23445  ,-27644  ,-30997  ,-32767  ,-32497  ,-29446  ,-24188  ,-18048  ,\n    -12007  ,-6856   ,-3223   ,-1854   ,-3294   ,-7325   ,-13010  ,-19135  ,-24665  ,-28709  ,-30364  ,-28934  ,-24399  ,-17616  ,-9937   ,\n    -2597   ,3579    ,8026    ,10194   ,9606    ,6253    ,907     ,-5050   ,-10241  ,-13810  ,-15380  ,-14678  ,-11473  ,-6016   ,636     ,\n    7054    ,12251   ,15908   ,17814   ,17501   ,14821   ,10764   ,7039    ,4469    ,2040    ,-1980   ,-7855   ,-13650  ,-16840  ,-16460  ,\n    -13513  ,-9548   ,-5295   ,-772    ,3773    ,7522    ,9665    ,10011   ,8872    ,6546    ,3140    ,-1122   ,-5604   ,-9402   ,-11803  ,\n    -12598  ,-11977  ,-10195  ,-7373   ,-3629   ,679     ,4922    ,8466    ,10921   ,12114   ,11903   ,10160   ,6995    ,2923    ,-1322   ,\n    -5134   ,-8179   ,-10233  ,-11005  ,-10235  ,-7942   ,-4510   ,-511    ,3527    ,7174    ,9992    ,11509   ,11360   ,9482    ,6187    ,\n    2042    ,-2332   ,-6403   ,-9752   ,-12013  ,-12857  ,-12068  ,-9691   ,-6088   ,-1832   ,2485    ,6354    ,9304    ,10861   ,10659   ,\n    8651    ,5210    ,976     ,-3412   ,-7440   ,-10676  ,-12690  ,-13127  ,-11875  ,-9144   ,-5377   ,-1100   ,3132    ,6740    ,9189    ,\n    10151   ,9604    ,7767    ,4942    ,1460    ,-2242   ,-5577   ,-7952   ,-8984   ,-8595   ,-6921   ,-4194   ,-725    ,3045    ,6583    ,\n    9388    ,11104   ,11541   ,10640   ,8462    ,5238    ,1405    ,-2420   ,-5581   ,-7572   ,-8191   ,-7518   ,-5741   ,-2993   ,615     ,\n    4801    ,8971    ,12332   ,14210   ,14312   ,12729   ,9727    ,5569    ,543     ,-4881   ,-10050  ,-14367  ,-17563  ,-19654  ,-20603  ,\n    -20099  ,-17788  ,-13734  ,-8565   ,-3099   ,2131    ,6910    ,10970   ,13748   ,14585   ,13131   ,9508    ,4194    ,-2089   ,-8375   ,\n    -13552  ,-16653  ,-17116  ,-14746  ,-9576   ,-1923   ,7348    ,16790   ,24848   ,30356   ,32767   ,31952   ,27869   ,20900   ,12053   ,\n    2786    ,-5358   ,-11171  ,-13894  ,-13173  ,-9088   ,-2196   ,6471    ,15544   ,23531   ,29068   ,31203   ,29616   ,24640   ,17103   ,\n    8097    ,-1196   ,-9612   ,-16099  ,-19841  ,-20385  ,-17786  ,-12648  ,-6016   ,902     ,7028    ,11562   ,13982   ,14002   ,11594   ,\n    7046    ,974     ,-5771   ,-12263  ,-17692  ,-21502  ,-23405  ,-23315  ,-21302  ,-17627  ,-12787  ,-7468   ,-2392   ,1832    ,4759    ,\n    6123    ,5857    ,4088    ,1045    ,-3028   ,-7833   ,-12879  ,-17468  ,-20885  ,-22614  ,-22385  ,-20084  ,-15765  ,-9791   ,-2896   ,\n    3991    ,10021   ,14516   ,16910   ,16773   ,14012   ,9033    ,2674    ,-4050   ,-10133  ,-14626  ,-16727  ,-15983  ,-12458  ,-6709   ,\n    415     ,7963    ,14965   ,20471   ,23661   ,24006   ,21423   ,16320   ,9519    ,2088    ,-4877   ,-10425  ,-13848  ,-14731  ,-12989  ,\n    -8912   ,-3188   ,3184    ,9134    ,13800   ,16656   ,17419   ,15913   ,12197   ,6824    ,833     ,-4753   ,-9518   ,-13672  ,-17427  ,\n    -20409  ,-21750  ,-20751  ,-17366  ,-12075  ,-5470   ,1892    ,9296    ,15729   ,20107   ,21672   ,20200   ,15938   ,9481    ,1745    ,\n    -6080   ,-12789  ,-17438  ,-19402  ,-18256  ,-13694  ,-5984   ,3802    ,13937   ,22717   ,29262   ,32724   ,32767   ,29553   ,22494   ,\n    12814   ,2482    ,-7116   ,-14706  ,-19391  ,-20430  ,-17572  ,-11407  ,-3036   ,6255    ,15168   ,22285   ,26247   ,26308   ,22646   ,\n    16091   ,7606    ,-1878   ,-11269  ,-19271  ,-24732  ,-27016  ,-26043  ,-22116  ,-15867  ,-8332   ,-817    ,5482    ,9797    ,11758   ,\n    11191   ,8103    ,2885    ,-3606   ,-10308  ,-16346  ,-21172  ,-24356  ,-25430  ,-24055  ,-20376  ,-15133  ,-9332   ,-3766   ,1141    ,\n    5121    ,7835    ,8925    ,8262    ,6064    ,2787    ,-1042   ,-4880   ,-8175   ,-10442  ,-11371  ,-10826  ,-8773   ,-5300   ,-743    ,\n    4295    ,9150    ,13337   ,16545   ,18440   ,18618   ,16859   ,13428   ,9004    ,4331    ,-28     ,-3608   ,-5902   ,-6442   ,-5043   ,\n    -1875   ,2667    ,8050    ,13527   ,18136   ,20988   ,21614   ,19975   ,16208   ,10525   ,3424    ,-4203   ,-11376  ,-17451  ,-22100  ,\n    -24895  ,-25191  ,-22627  ,-17677  ,-11476  ,-5034   ,1249    ,7224    ,12342   ,15576   ,16027   ,13477   ,8339    ,1295    ,-6832   ,\n    -14921  ,-21583  ,-25583  ,-26258  ,-23513  ,-17563  ,-8893   ,1486    ,11955   ,20750   ,26641   ,29173   ,28364   ,24351   ,17477   ,\n    8621    ,-769    ,-9066   ,-14951  ,-17627  ,-16777  ,-12516  ,-5421   ,3510    ,12988   ,21600   ,27992   ,31133   ,30606   ,26698   ,\n    20178   ,11996   ,3177    ,-5133   ,-11759  ,-15810  ,-16922  ,-15203  ,-11030  ,-5003   ,1942    ,8596    ,13833   ,16969   ,17796   ,\n    16360   ,12844   ,7642    ,1424    ,-5026   ,-11023  ,-16007  ,-19436  ,-20830  ,-20019  ,-17320  ,-13373  ,-8797   ,-4009   ,618     ,\n    4533    ,7052    ,7660    ,6266    ,3178    ,-1152   ,-6314   ,-11897  ,-17339  ,-21905  ,-24859  ,-25689  ,-24185  ,-20413  ,-14706  ,\n    -7721   ,-411    ,6166    ,11107   ,13808   ,13959   ,11541   ,6891    ,727     ,-5982   ,-12218  ,-17028  ,-19553  ,-19163  ,-15755  ,\n    -9907   ,-2679   ,4855    ,11879   ,17732   ,21685   ,22996   ,21285   ,16831   ,10483   ,3325    ,-3585   ,-9255   ,-12795  ,-13640  ,\n    -11785  ,-7751   ,-2272   ,3954    ,10155   ,15300   ,18341   ,18867   ,17408   ,14780   ,11072   ,5546    ,-2118   ,-10590  ,-17411  ,\n    -21030  ,-22123  ,-22542  ,-23098  ,-22873  ,-20807  ,-17358  ,-14020  ,-11493  ,-9162   ,-6538   ,-4363   ,-3515   ,-3205   ,-1359   ,\n    2854    ,7658    ,10626   ,11694   ,13385   ,17829   ,24208   ,29600   ,31999   ,31926   ,31180   ,30701   ,30000   ,28331   ,25816   ,\n    23246   ,21016   ,18582   ,15097   ,10518   ,5861    ,2246    ,-190    ,-2184   ,-4181   ,-5697   ,-6101   ,-5787   ,-6040   ,-7694   ,\n    -10358  ,-13204  ,-16133  ,-19661  ,-23757  ,-27360  ,-29252  ,-29047  ,-27017  ,-23257  ,-17636  ,-10665  ,-3939   ,786     ,2932    ,\n    3256    ,2706    ,1417    ,-914    ,-3878   ,-6018   ,-5898   ,-3422   ,174     ,3659    ,6903    ,10403   ,13873   ,15773   ,14591   ,\n    10491   ,5405    ,1394    ,-880    ,-1982   ,-2431   ,-2096   ,-911    ,353     ,496     ,-960    ,-3424   ,-6107   ,-8866   ,-11878  ,\n    -14672  ,-16023  ,-15032  ,-12070  ,-8392   ,-4935   ,-1868   ,699     ,2030    ,1264    ,-1426   ,-4557   ,-6445   ,-6443   ,-4895   ,\n    -2032   ,2627    ,9471    ,17557   ,24593   ,28398   ,28348   ,25306   ,20341   ,13890   ,6262    ,-1498   ,-7841   ,-11947  ,-14318  ,\n    -15813  ,-16302  ,-14822  ,-11191  ,-6968   ,-4267   ,-3651   ,-3661   ,-2592   ,-350    ,1763    ,2771    ,2872    ,2479    ,1118    ,\n    -2022   ,-6635   ,-11094  ,-13987  ,-15350  ,-15858  ,-15116  ,-11550  ,-4321   ,5149    ,14080   ,20610   ,24705   ,26890   ,26723   ,\n    23068   ,15707   ,6194    ,-3044   ,-10231  ,-14762  ,-16502  ,-15043  ,-9914   ,-1484   ,8507    ,17503   ,23386   ,25345   ,23698   ,\n    19103   ,12133   ,3530    ,-5515   ,-13657  ,-19929  ,-23768  ,-24596  ,-21817  ,-15560  ,-7284   ,773     ,6910    ,10687   ,12405   ,\n    12213   ,10040   ,6226    ,1770    ,-2297   ,-5599   ,-8243   ,-10050  ,-10329  ,-8608   ,-5439   ,-2150   ,307     ,2132    ,4144    ,\n    6602    ,8773    ,9766    ,9555    ,8897    ,8248    ,7043    ,4299    ,-229    ,-5735   ,-11197  ,-16142  ,-20341  ,-23018  ,-22938  ,\n    -19518  ,-13579  ,-6681   ,135     ,6568    ,12025   ,14954   ,13753   ,8323    ,319     ,-8264   ,-16353  ,-23386  ,-28076  ,-28441  ,\n    -23496  ,-14536  ,-4226   ,5541    ,14441   ,22356   ,27930   ,29156   ,25359   ,18007   ,9430    ,1233    ,-5764   ,-10609  ,-12118  ,\n    -9801   ,-4362   ,2888    ,10633   ,17416   ,21698   ,22870   ,21869   ,19844   ,16235   ,9472    ,312     ,-6576   ,-6102   ,1808    ,\n    11189   ,14939   ,10282   ,-587    ,-13577  ,-24656  ,-29353  ,-23272  ,-5761   ,16689   ,32488   ,32488   ,16959   ,-4199   ,-18414  ,\n    -19099  ,-9426   ,1329    ,5620    ,3260    ,404     ,3189    ,11835   ,20174   ,20637   ,10322   ,-6440   ,-20536  ,-23696  ,-13634  ,\n    4481    ,21157   ,28273   ,23566   ,11168   ,-1666   ,-9128   ,-9863   ,-6766   ,-3994   ,-3401   ,-3200   ,-65     ,7136    ,15381   ,\n    19219   ,14796   ,2902    ,-11129  ,-20377  ,-20216  ,-10925  ,2415    ,12843   ,15665   ,11066   ,3337    ,-2620   ,-4640   ,-4025   ,\n    -3553   ,-4758   ,-6676   ,-6760   ,-3058   ,3888    ,10734   ,13000   ,7960    ,-2994   ,-14359  ,-19478  ,-14839  ,-2721   ,10006   ,\n    16360   ,13769   ,5234    ,-3517   ,-8298   ,-8747   ,-7294   ,-6419   ,-6705   ,-6808   ,-4733   ,591     ,8086    ,14275   ,14810   ,\n    7549    ,-4979   ,-16408  ,-20755  ,-16647  ,-7784   ,536     ,5322    ,6837    ,6692    ,5830    ,4224    ,1646    ,-1950   ,-6506   ,\n    -11473  ,-15013  ,-14234  ,-7278   ,4266    ,15295   ,20234   ,16824   ,7404    ,-3100   ,-10419  ,-12895  ,-11473  ,-8568   ,-6509   ,\n    -5950   ,-5165   ,-1409   ,6090    ,14231   ,17674   ,13100   ,2270    ,-8963   ,-14685  ,-12520  ,-4426   ,4991    ,11023   ,11063   ,\n    5833    ,-1057   ,-5407   ,-5346   ,-2589   ,-788    ,-2254   ,-5898   ,-8204   ,-6343   ,-695    ,5270    ,7542    ,4489    ,-1911   ,\n    -7303   ,-7811   ,-2727   ,4753    ,9479    ,7803    ,107     ,-9472   ,-15803  ,-15879  ,-10238  ,-2161   ,4517    ,7629    ,7655    ,\n    6751    ,6460    ,6106    ,3587    ,-2081   ,-9122   ,-14080  ,-14455  ,-10229  ,-3207   ,4400    ,10600   ,13654   ,12547   ,7744    ,\n    1058    ,-5570   ,-10960  ,-14247  ,-14051  ,-8959   ,721     ,11854   ,19510   ,19584   ,11163   ,-2627   ,-15652  ,-21556  ,-17326  ,\n    -5496   ,7146    ,13994   ,12926   ,7017    ,1373    ,-978    ,-863    ,-1461   ,-5021   ,-10315  ,-12867  ,-8275   ,3555    ,16906   ,\n    23506   ,18469   ,4113    ,-11511  ,-20112  ,-18360  ,-9289   ,526     ,5740    ,5739    ,4425    ,6318    ,12035   ,17091   ,15324   ,\n    4124    ,-12822  ,-27251  ,-31024  ,-20833  ,-529    ,20357   ,31689   ,28958   ,15905   ,1155    ,-8362   ,-12385  ,-14372  ,-17336  ,\n    -19252  ,-14701  ,-2358   ,17121   ,31909   ,32767   ,24552   ,2274    ,-21580  ,-32767  ,-32231  ,-17666  ,2200    ,16323   ,20985   ,\n    15535   ,5398    ,-3462   ,-7763   ,-7746   ,-5953   ,-3679   ,-768    ,2732    ,5120    ,4166    ,-429    ,-6268   ,-9764   ,-8302   ,\n    -1601   ,7747    ,14730   ,14305   ,5263    ,-7587   ,-15929  ,-13966  ,-2940   ,9811    ,16284   ,13194   ,3522    ,-6193   ,-10384  ,\n    -7655   ,-821    ,5657    ,8585    ,7355    ,3481    ,-700    ,-3368   ,-4131   ,-3840   ,-3182   ,-1506   ,2321    ,7557    ,10829   ,\n    8788    ,1759    ,-5844   ,-9207   ,-7170   ,-2590   ,831     ,1707    ,1286    ,1329    ,2111    ,2466    ,1527    ,33      ,-439    ,\n    485     ,1284    ,328     ,-1981   ,-3575   ,-3175   ,-1550   ,-42     ,1237    ,2810    ,3998    ,3152    ,103     ,-2770   ,-2979   ,\n    -924    ,592     ,-155    ,-1859   ,-2061   ,-140    ,2319    ,3584    ,3152    ,1188    ,-2066   ,-5411   ,-6027   ,-1442   ,6961    ,\n    13204   ,11110   ,360     ,-12108  ,-17584  ,-12981  ,-2844   ,5628    ,8881    ,8218    ,6027    ,2726    ,-1948   ,-6185   ,-6743   ,\n    -2800   ,2184    ,3628    ,608     ,-3344   ,-4055   ,-534    ,4900    ,9023    ,9461    ,5205    ,-2667   ,-10291  ,-12609  ,-7457   ,\n    1678    ,7948    ,6977    ,573     ,-5238   ,-5565   ,-355    ,6053    ,8178    ,3005    ,-7713   ,-17683  ,-19598  ,-10472  ,5282    ,\n    18276   ,20660   ,11397   ,-3701   ,-16350  ,-20639  ,-15421  ,-4010   ,7846    ,14793   ,14299   ,7398    ,-2443   ,-11074  ,-14931  ,\n    -12080  ,-3453   ,6845    ,13595   ,13867   ,8580    ,715     ,-7320   ,-13906  ,-16521  ,-11872  ,650     ,15788   ,24272   ,19486   ,\n    3180    ,-15138  ,-24686  ,-20296  ,-4742   ,13808   ,26172   ,25871   ,11854   ,-9907   ,-27874  ,-30979  ,-16366  ,7609    ,26793   ,\n    30914   ,19279   ,-1021   ,-20453  ,-30748  ,-26780  ,-9076   ,14245   ,30452   ,30348   ,14853   ,-6327   ,-22173  ,-26531  ,-19045  ,\n    -3503   ,13195   ,22667   ,19389   ,5234    ,-10938  ,-19420  ,-16198  ,-4535   ,8323    ,15567   ,13889   ,4831    ,-5974   ,-12146  ,\n    -10837  ,-4382   ,2258    ,5612    ,5485    ,3563    ,1232    ,-1109   ,-3245   ,-4289   ,-2931   ,1145    ,5922    ,7667    ,4016    ,\n    -3112   ,-8430   ,-8006   ,-2940   ,2235    ,4480    ,4504    ,4172    ,3380    ,977     ,-1988   ,-2204   ,1685    ,6029    ,5082    ,\n    -2681   ,-11998  ,-15156  ,-8822   ,3311    ,13892   ,17419   ,13116   ,3965    ,-5853   ,-12715  ,-14190  ,-9611   ,-880    ,7682    ,\n    11421   ,8235    ,-310    ,-10661  ,-19911  ,-26809  ,-30847  ,-31425  ,-28450  ,-23346  ,-18706  ,-16625  ,-17410  ,-19770  ,-21908  ,\n    -22341  ,-20250  ,-15735  ,-9991   ,-4828   ,-1509   ,186     ,1744    ,4625    ,9038    ,13798   ,17292   ,18627   ,18069   ,16560   ,\n    14926   ,13442   ,11976   ,10341   ,8482    ,6448    ,4347    ,2360    ,727     ,-332    ,-664    ,-173    ,1097    ,2732    ,3851    ,\n    3509    ,1445    ,-1474   ,-3681   ,-3960   ,-2259   ,368     ,2552    ,3449    ,3055    ,1945    ,796     ,76      ,-22     ,424     ,\n    1013    ,1080    ,77      ,-1943   ,-4270   ,-6095   ,-7134   ,-7587   ,-7570   ,-6863   ,-5401   ,-3813   ,-3081   ,-3530   ,-4363   ,\n    -4451   ,-3509   ,-2302   ,-1695   ,-1743   ,-1815   ,-1446   ,-784    ,-244    ,14      ,134     ,276     ,560     ,1215    ,2448    ,\n    3933    ,4625    ,3496    ,684     ,-2257   ,-3517   ,-2544   ,-337    ,1715    ,3104    ,4207    ,5262    ,5783    ,5161    ,3650    ,\n    2377    ,2292    ,3299    ,4579    ,5625    ,6686    ,8195    ,10000   ,11330   ,11417   ,9962    ,7123    ,3397    ,-314    ,-2807   ,\n    -3198   ,-1650   ,613     ,2144    ,2174    ,780     ,-1588   ,-4527   ,-7731   ,-10890  ,-13663  ,-15617  ,-16123  ,-14564  ,-10955  ,\n    -6442   ,-2881   ,-1613   ,-2524   ,-4313   ,-5604   ,-5788   ,-4971   ,-3480   ,-1609   ,295     ,1814    ,2653    ,2810    ,2515    ,\n    2083    ,1824    ,1945    ,2377    ,2755    ,2722    ,2268    ,1641    ,880     ,-302    ,-1938   ,-3222   ,-2942   ,-778    ,1980    ,\n    3367    ,2541    ,564     ,-666    ,-138    ,1641    ,3462    ,4498    ,4605    ,4011    ,3123    ,2542    ,2827    ,3973    ,5232    ,\n    5657    ,4845    ,3097    ,1017    ,-779    ,-1610   ,-835    ,1565    ,4548    ,6489    ,6305    ,4099    ,755     ,-2830   ,-5990   ,\n    -8078   ,-8543   ,-7418   ,-5526   ,-3945   ,-3253   ,-3334   ,-3790   ,-4329   ,-4812   ,-5194   ,-5532   ,-5853   ,-5858   ,-4931   ,\n    -2760   ,-2      ,1955    ,2172    ,1108    ,289     ,988     ,3211    ,5846    ,7647    ,8079    ,7403    ,6137    ,4513    ,2439    ,\n    -64     ,-2560   ,-4494   ,-5794   ,-6914   ,-8074   ,-8620   ,-7563   ,-4896   ,-2075   ,-812    ,-1390   ,-2423   ,-2303   ,-588    ,\n    2189    ,5688    ,10148   ,15463   ,20342   ,22882   ,22071   ,18609   ,14370   ,11327   ,10933   ,13626   ,18203   ,21654   ,20563   ,\n    14119   ,4779    ,-3152   ,-7850   ,-11445  ,-16429  ,-24603  ,-31365  ,-32767  ,-32481  ,-28595  ,-23652  ,-21299  ,-20570  ,-21122  ,\n    -21803  ,-21337  ,-18840  ,-13876  ,-7608   ,-1780   ,2248    ,4406    ,5697    ,7214    ,9398    ,11880   ,13897   ,14830   ,14531   ,\n    13340   ,11809   ,10379   ,9217    ,8264    ,7381    ,6418    ,5207    ,3608    ,1659    ,-283    ,-1614   ,-1794   ,-731    ,1040    ,\n    2560    ,2964    ,2014    ,276     ,-1217   ,-1586   ,-598    ,1270    ,3177    ,4369    ,4493    ,3636    ,2163    ,524     ,-872    ,\n    -1732   ,-1966   ,-1774   ,-1586   ,-1803   ,-2549   ,-3650   ,-4835   ,-5909   ,-6717   ,-7068   ,-6834   ,-6158   ,-5454   ,-5089   ,\n    -5055   ,-5009   ,-4652   ,-4004   ,-3305   ,-2691   ,-2055   ,-1230   ,-255    ,591     ,1020    ,990     ,781     ,842     ,1515    ,\n    2767    ,4120    ,4874    ,4591    ,3478    ,2305    ,1852    ,2326    ,3278    ,4051    ,4309    ,4158    ,3851    ,3512    ,3154    ,\n    2891    ,2965    ,3511    ,4323    ,4935    ,4985    ,4534    ,4023    ,3923    ,4361    ,5023    ,5365    ,4980    ,3868    ,2423    ,\n    1169    ,411     ,75      ,-169    ,-624    ,-1359   ,-2220   ,-2992   ,-3597   ,-4187   ,-5039   ,-6291   ,-7682   ,-8579   ,-8378   ,\n    -7011   ,-5087   ,-3511   ,-2876   ,-3121   ,-3707   ,-4064   ,-3927   ,-3350   ,-2505   ,-1516   ,-465    ,487     ,1072    ,1061    ,\n    489     ,-308    ,-930    ,-1213   ,-1291   ,-1359   ,-1443   ,-1450   ,-1419   ,-1624   ,-2296   ,-3242   ,-3819   ,-3411   ,-2030   ,\n    -431    ,432     ,176     ,-697    ,-1200   ,-629    ,945     ,2812    ,4170    ,4619    ,4286    ,3622    ,3129    ,3155    ,3792    ,\n    4853    ,5929    ,6543    ,6359    ,5359    ,3885    ,2506    ,1738    ,1771    ,2371    ,3033    ,3243    ,2700    ,1383    ,-467    ,\n    -2426   ,-4035   ,-4981   ,-5236   ,-5013   ,-4600   ,-4202   ,-3904   ,-3725   ,-3660   ,-3717   ,-3910   ,-4194   ,-4362   ,-4023   ,\n    -2824   ,-818    ,1371    ,2848    ,3073    ,2283    ,1329    ,1038    ,1615    ,2548    ,3042    ,2573    ,1161    ,-789    ,-2811   ,\n    -4574   ,-5891   ,-6708   ,-7169   ,-7602   ,-8280   ,-9066   ,-9330   ,-8312   ,-5703   ,-1952   ,1950    ,5038    ,6890    ,7764    ,\n    8344    ,9369    ,11441   ,14983   ,20057   ,25930   ,30819   ,32490   ,29704   ,23492   ,16988   ,13487   ,13958   ,16037   ,15683   ,\n    10564   ,2318    ,-4703   ,-7514   ,-7551   ,-9331   ,-15729  ,-24708  ,-30982  ,-30798  ,-24818  ,-16628  ,-9367   ,-4355   ,-2180   ,\n    -3554   ,-8314   ,-14205  ,-17840  ,-17378  ,-14034  ,-10704  ,-9216   ,-9012   ,-8174   ,-5283   ,-313    ,5704    ,11345   ,15220   ,\n    16313   ,14443   ,10514   ,6154    ,2878    ,1418    ,1638    ,2878    ,4335    ,5338    ,5578    ,5254    ,4971    ,5341    ,6511    ,\n    7988    ,8876    ,8372    ,6204    ,2814    ,-805    ,-3526   ,-4598   ,-3976   ,-2283   ,-452    ,712     ,794     ,-165    ,-1725   ,\n    -3188   ,-3912   ,-3720   ,-3058   ,-2655   ,-2943   ,-3799   ,-4842   ,-5851   ,-6750   ,-7294   ,-7017   ,-5681   ,-3674   ,-1798   ,\n    -638    ,-234    ,-337    ,-766    ,-1378   ,-1850   ,-1787   ,-1155   ,-435    ,-182    ,-456    ,-811    ,-825    ,-470    ,103     ,\n    963     ,2301    ,3922    ,5069    ,5030    ,3953    ,2889    ,2887    ,4065    ,5614    ,6630    ,6832    ,6479    ,5847    ,5001    ,\n    4070    ,3461    ,3608    ,4483    ,5505    ,5990    ,5670    ,4788    ,3766    ,2873    ,2143    ,1482    ,799     ,69      ,-625    ,\n    -1125   ,-1299   ,-1134   ,-726    ,-198    ,336     ,765     ,990     ,979     ,719     ,78      ,-1191   ,-3161   ,-5406   ,-7093   ,\n    -7533   ,-6691   ,-5147   ,-3607   ,-2501   ,-1959   ,-1975   ,-2455   ,-3183   ,-3900   ,-4454   ,-4821   ,-4989   ,-4917   ,-4677   ,\n    -4524   ,-4673   ,-4991   ,-5026   ,-4437   ,-3355   ,-2250   ,-1479   ,-1060   ,-882    ,-995    ,-1533   ,-2330   ,-2784   ,-2280   ,\n    -833    ,751     ,1479    ,1033    ,81      ,-263    ,701     ,2833    ,5413    ,7636    ,8890    ,8789    ,7262    ,4733    ,2074    ,\n    170     ,-595    ,-446    ,116     ,699     ,1129    ,1377    ,1551    ,1904    ,2670    ,3784    ,4788    ,5121    ,4515    ,3115    ,\n    1293    ,-582    ,-2195   ,-3252   ,-3509   ,-2879   ,-1499   ,291     ,1996    ,3076    ,3114    ,2002    ,-16     ,-2479   ,-4879   ,\n    -6759   ,-7816   ,-8082   ,-8024   ,-8296   ,-9174   ,-10149  ,-10183  ,-8529   ,-5417   ,-1962   ,607     ,1690    ,1434    ,375     ,\n    -832    ,-1395   ,-497    ,2112    ,5528    ,7984    ,8087    ,5930    ,3004    ,1164    ,1756    ,5355    ,11508   ,18226   ,22337   ,\n    21561   ,16871   ,12252   ,11214   ,13378   ,15036   ,13266   ,8855    ,4746    ,2356    ,720     ,-645    ,331     ,5651    ,12996   ,\n    16083   ,10850   ,1235    ,-4265   ,-786    ,6571    ,7476    ,-2342   ,-19427  ,-31670  ,-32767  ,-29359  ,-21458  ,-13636  ,-10009  ,\n    -9843   ,-14069  ,-21068  ,-27505  ,-30154  ,-27339  ,-20314  ,-11304  ,-2572   ,4201    ,8191    ,9860    ,10901   ,12852   ,15653   ,\n    17777   ,17934   ,16349   ,14228   ,12284   ,10266   ,7793    ,5077    ,2551    ,144     ,-2553   ,-5425   ,-7583   ,-8219   ,-7526   ,\n    -6530   ,-6113   ,-6412   ,-7121   ,-7983   ,-8762   ,-8898   ,-7586   ,-4403   ,167     ,4897    ,8503    ,10222   ,9923    ,7940    ,\n    4973    ,2063    ,341     ,461     ,2115    ,4204    ,5625    ,5967    ,5412    ,4082    ,1762    ,-1560   ,-5070   ,-7410   ,-7771   ,\n    -6605   ,-5135   ,-4258   ,-4074   ,-4313   ,-4834   ,-5537   ,-6050   ,-5905   ,-5032   ,-3836   ,-2696   ,-1598   ,-413    ,690     ,\n    1436    ,1981    ,2874    ,4299    ,5631    ,6107    ,5864    ,5941    ,7114    ,8971    ,10368   ,10606   ,9896    ,8765    ,7429    ,\n    5913    ,4463    ,3432    ,2798    ,2141    ,1188    ,140     ,-687    ,-1326   ,-1963   ,-2397   ,-2116   ,-1038   ,100     ,405     ,\n    -185    ,-856    ,-842    ,-158    ,677     ,1361    ,1981    ,2602    ,3043    ,3148    ,2990    ,2606    ,1685    ,-125    ,-2572   ,\n    -4713   ,-5690   ,-5499   ,-4889   ,-4553   ,-4609   ,-4831   ,-5150   ,-5752   ,-6767   ,-8001   ,-8986   ,-9189   ,-8241   ,-6167   ,\n    -3530   ,-1231   ,23      ,158     ,-375    ,-1122   ,-1935   ,-2776   ,-3383   ,-3322   ,-2421   ,-1061   ,73      ,561     ,583     ,\n    725     ,1432    ,2581    ,3523    ,3595    ,2707    ,1485    ,807     ,1116    ,2138    ,3199    ,3776    ,3739    ,3218    ,2394    ,\n    1463    ,673     ,228     ,114     ,82      ,-144    ,-616    ,-1101   ,-1232   ,-725    ,451     ,2031    ,3562    ,4611    ,4956    ,\n    4607    ,3681    ,2313    ,706     ,-789    ,-1768   ,-2018   ,-1662   ,-1052   ,-555    ,-500    ,-1284   ,-3308   ,-6618   ,-10557  ,\n    -13907  ,-15516  ,-14911  ,-12407  ,-8796   ,-5011   ,-1878   ,187     ,1509    ,3079    ,5837    ,9790    ,13830   ,16514   ,17084   ,\n    15795   ,13430   ,10779   ,8633    ,7963    ,9501    ,12700   ,15242   ,14267   ,8777    ,997     ,-5074   ,-7058   ,-6364   ,-6819   ,\n    -10874  ,-16981  ,-20634  ,-18046  ,-9117   ,2595    ,12411   ,17243   ,16636   ,12055   ,5639    ,-415    ,-3729   ,-1953   ,5823    ,\n    17291   ,27068   ,29928   ,24913   ,16207   ,9274    ,5783    ,2537    ,-4451   ,-15157  ,-25119  ,-29541  ,-27369  ,-21478  ,-15733  ,\n    -12468  ,-12256  ,-14799  ,-19163  ,-23497  ,-25475  ,-23645  ,-18398  ,-11521  ,-4863   ,584     ,4624    ,7388    ,9152    ,10467   ,\n    12154   ,14875   ,18505   ,21873   ,23268   ,21567   ,17150   ,11699   ,6911    ,3261    ,40      ,-3428   ,-6773   ,-8868   ,-8993   ,\n    -7559   ,-5712   ,-4493   ,-4428   ,-5641   ,-7927   ,-10590  ,-12525  ,-12800  ,-11272  ,-8605   ,-5658   ,-2907   ,-439    ,1681    ,\n    3206    ,3925    ,4008    ,4040    ,4651    ,6016    ,7680    ,8855    ,8919    ,7710    ,5447    ,2563    ,-339    ,-2495   ,-3258   ,\n    -2559   ,-1054   ,322     ,995     ,944     ,350     ,-724    ,-2192   ,-3644   ,-4442   ,-4225   ,-3223   ,-1995   ,-922    ,-42     ,\n    740     ,1476    ,2254    ,3236    ,4468    ,5686    ,6502    ,6797    ,6810    ,6766    ,6539    ,5788    ,4402    ,2676    ,1057    ,\n    -164    ,-882    ,-1082   ,-846    ,-441    ,-210    ,-342    ,-820    ,-1606   ,-2719   ,-4017   ,-5034   ,-5250   ,-4610   ,-3630   ,\n    -2891   ,-2505   ,-2180   ,-1705   ,-1157   ,-616    ,102     ,1207    ,2522    ,3513    ,3800    ,3493    ,2930    ,2201    ,1113    ,\n    -374    ,-1860   ,-2750   ,-2739   ,-1986   ,-878    ,254     ,1179    ,1683    ,1592    ,880     ,-277    ,-1553   ,-2556   ,-2938   ,\n    -2565   ,-1663   ,-743    ,-262    ,-317    ,-648    ,-919    ,-941    ,-661    ,-82     ,697     ,1388    ,1588    ,1018    ,-311    ,\n    -2124   ,-4019   ,-5538   ,-6260   ,-5995   ,-4957   ,-3655   ,-2508   ,-1593   ,-794    ,-161    ,22      ,-434    ,-1318   ,-2130   ,\n    -2491   ,-2364   ,-1900   ,-1165   ,-111    ,1235    ,2642    ,3802    ,4543    ,4927    ,5180    ,5532    ,6078    ,6682    ,6989    ,\n    6591    ,5287    ,3233    ,867     ,-1355   ,-3177   ,-4560   ,-5525   ,-5977   ,-5735   ,-4771   ,-3490   ,-2700   ,-3149   ,-4907   ,\n    -7118   ,-8412   ,-7688   ,-4731   ,-302    ,4239    ,7533    ,8823    ,8278    ,6862    ,5840    ,6279    ,8759    ,13100   ,18048   ,\n    21424   ,21262   ,17347   ,11555   ,6263    ,2242    ,-1682   ,-6807   ,-12689  ,-17359  ,-19212  ,-18285  ,-15796  ,-12973  ,-10724  ,\n    -9966   ,-11396  ,-14490  ,-17097  ,-16599  ,-11845  ,-3994   ,4387    ,10971   ,14685   ,15634   ,14670   ,12987   ,12081   ,13490   ,\n    17974   ,24806   ,30938   ,32767   ,28986   ,20936   ,12720   ,7338    ,3564    ,-2206   ,-11979  ,-23521  ,-31621  ,-32767  ,-27974  ,\n    -20810  ,-15181  ,-13083  ,-14367  ,-18027  ,-22507  ,-25937  ,-26702  ,-24237  ,-19334  ,-13420  ,-7632   ,-2415   ,2203    ,6229    ,\n    9637    ,12465   ,14778   ,16468   ,17177   ,16545   ,14587   ,11874   ,9298    ,7588    ,6893    ,6728    ,6305    ,5079    ,3120    ,\n    1031    ,-601    ,-1765   ,-3071   ,-5175   ,-8078   ,-10937  ,-12551  ,-12102  ,-9604   ,-5832   ,-1896   ,1252    ,3149    ,3829    ,\n    3569    ,2614    ,1175    ,-348    ,-1268   ,-905    ,928     ,3712    ,6482    ,8309    ,8629    ,7333    ,4754    ,1592    ,-1319   ,\n    -3352   ,-4310   ,-4346   ,-3742   ,-2823   ,-2013   ,-1765   ,-2250   ,-3132   ,-3770   ,-3746   ,-3162   ,-2423   ,-1772   ,-1154   ,\n    -479    ,141     ,549     ,861     ,1441    ,2489    ,3732    ,4674    ,5109    ,5293    ,5532    ,5756    ,5609    ,4941    ,4036    ,\n    3305    ,2865    ,2548    ,2245    ,2065    ,2081    ,2058    ,1584    ,450     ,-1180   ,-2947   ,-4513   ,-5561   ,-5748   ,-4889   ,\n    -3251   ,-1533   ,-446    ,-256    ,-747    ,-1524   ,-2291   ,-2842   ,-2967   ,-2526   ,-1611   ,-542    ,371     ,1041    ,1526    ,\n    1794    ,1657    ,1005    ,52      ,-740    ,-1017   ,-795    ,-365    ,17      ,296     ,508     ,611     ,503     ,216     ,20      ,\n    247     ,994     ,2006    ,2858    ,3230    ,3006    ,2193    ,872     ,-731    ,-2203   ,-3127   ,-3371   ,-3153   ,-2827   ,-2647   ,\n    -2769   ,-3337   ,-4409   ,-5756   ,-6874   ,-7348   ,-7164   ,-6575   ,-5687   ,-4336   ,-2458   ,-474    ,892     ,1250    ,912     ,\n    563     ,623     ,1041    ,1688    ,2735    ,4430    ,6528    ,8162    ,8476    ,7387    ,5611    ,3947    ,2668    ,1633    ,770     ,\n    173     ,-246    ,-911    ,-2156   ,-3769   ,-5185   ,-6114   ,-6761   ,-7302   ,-7350   ,-6184   ,-3531   ,5       ,3294    ,5346    ,\n    5693    ,4468    ,2418    ,773     ,755     ,2968    ,7172    ,12502   ,17687   ,21134   ,21399   ,18249   ,13359   ,9367    ,7626    ,\n    6843    ,4345    ,-1057   ,-7560   ,-11912  ,-12421  ,-10407  ,-8837   ,-9814   ,-13353  ,-18057  ,-22392  ,-25246  ,-25846  ,-23876  ,\n    -19931  ,-15544  ,-12250  ,-10341  ,-8533   ,-4971   ,1282    ,9529    ,17931   ,24556   ,28114   ,28152   ,25075   ,20241   ,15870   ,\n    14304   ,16755   ,22328   ,28198   ,31124   ,29421   ,23992   ,17521   ,12248   ,8064    ,2727    ,-5758   ,-16676  ,-26485  ,-31353  ,\n    -30029  ,-24492  ,-18157  ,-13678  ,-12161  ,-13623  ,-17403  ,-22089  ,-25713  ,-26665  ,-24627  ,-20553  ,-15758  ,-11116  ,-6988   ,\n    -3499   ,-613    ,1947    ,4515    ,7052    ,9015    ,9798    ,9326    ,8159    ,6999    ,6155    ,5453    ,4599    ,3555    ,2583    ,\n    1969    ,1737    ,1664    ,1634    ,1955    ,3183    ,5433    ,7864    ,9065    ,8246    ,6090    ,4286    ,4029    ,4968    ,5653    ,\n    4961    ,3001    ,723     ,-1093   ,-2289   ,-2972   ,-3091   ,-2530   ,-1477   ,-438    ,131     ,79      ,-569    ,-1815   ,-3591   ,\n    -5500   ,-6866   ,-7132   ,-6198   ,-4358   ,-2008   ,454     ,2548    ,3751    ,3826    ,3064    ,2075    ,1257    ,488     ,-639    ,\n    -2297   ,-4163   ,-5612   ,-6098   ,-5428   ,-3798   ,-1713   ,198     ,1439    ,1898    ,1894    ,1952    ,2466    ,3478    ,4681    ,\n    5595    ,5841    ,5390    ,4628    ,4105    ,4095    ,4357    ,4343    ,3703    ,2565    ,1335    ,265     ,-723    ,-1816   ,-3006   ,\n    -4064   ,-4781   ,-5145   ,-5296   ,-5376   ,-5470   ,-5591   ,-5608   ,-5207   ,-4063   ,-2178   ,6       ,1900    ,3205    ,3981    ,\n    4345    ,4244    ,3652    ,2871    ,2429    ,2562    ,2940    ,3021    ,2684    ,2384    ,2654    ,3496    ,4319    ,4427    ,3553    ,\n    2001    ,384     ,-759    ,-1237   ,-1249   ,-1185   ,-1348   ,-1806   ,-2463   ,-3206   ,-3950   ,-4592   ,-5013   ,-5185   ,-5205   ,\n    -5176   ,-5071   ,-4796   ,-4357   ,-3911   ,-3618   ,-3507   ,-3528   ,-3626   ,-3636   ,-3153   ,-1767   ,373     ,2321    ,2948    ,\n    1991    ,418     ,-436    ,-151    ,450     ,247     ,-1009   ,-2559   ,-3533   ,-3763   ,-3702   ,-3762   ,-3935   ,-3942   ,-3490   ,\n    -2301   ,-141    ,2930    ,6374    ,9445    ,11691   ,13057   ,13499   ,12754   ,10760   ,8207    ,6381    ,6338    ,8310    ,11795   ,\n    15830   ,18967   ,19464   ,16381   ,10779   ,5349    ,2180    ,839     ,-956    ,-4684   ,-9346   ,-12580  ,-13022  ,-11197  ,-8434   ,\n    -5722   ,-3912   ,-4261   ,-7741   ,-13534  ,-18840  ,-20839  ,-19002  ,-15363  ,-12582  ,-11925  ,-12909  ,-14309  ,-15074  ,-14511  ,\n    -12280  ,-8694   ,-4867   ,-2101   ,-791    ,61      ,2098    ,6232    ,11967   ,17927   ,22859   ,26008   ,26770   ,24613   ,19904   ,\n    14715   ,12200   ,14410   ,20514   ,27429   ,31952   ,32767   ,30457   ,25777   ,19532   ,12538   ,5347    ,-1955   ,-9639   ,-17205  ,\n    -22776  ,-24291  ,-21540  ,-16865  ,-13511  ,-13329  ,-15978  ,-19907  ,-23584  ,-25888  ,-26008  ,-23634  ,-19308  ,-14262  ,-9651   ,\n    -5917   ,-2847   ,-74     ,2549    ,4948    ,6953    ,8345    ,8899    ,8538    ,7498    ,6270    ,5292    ,4623    ,3931    ,2855    ,\n    1447    ,236     ,-186    ,347     ,1507    ,2841    ,4063    ,4921    ,4970    ,3793    ,1619    ,-449    ,-1067   ,370     ,3371    ,\n    6867    ,9895    ,11769   ,11947   ,10176   ,6894    ,3236    ,373     ,-1208   ,-1728   ,-1548   ,-795    ,407     ,1566    ,1916    ,\n    959     ,-1150   ,-3722   ,-5968   ,-7340   ,-7676   ,-7206   ,-6441   ,-5881   ,-5693   ,-5620   ,-5246   ,-4371   ,-3169   ,-2031   ,\n    -1289   ,-1032   ,-1116   ,-1287   ,-1301   ,-999    ,-310    ,725     ,1903    ,2872    ,3322    ,3268    ,3123    ,3379    ,4111    ,\n    4835    ,4906    ,4096    ,2731    ,1310    ,60      ,-1079   ,-2101   ,-2748   ,-2729   ,-2116   ,-1415   ,-1222   ,-1784   ,-2857   ,\n    -3935   ,-4589   ,-4636   ,-4092   ,-3032   ,-1562   ,101     ,1578    ,2495    ,2767    ,2721    ,2859    ,3447    ,4333    ,5148    ,\n    5611    ,5626    ,5188    ,4377    ,3473    ,2915    ,2951    ,3329    ,3454    ,2933    ,1884    ,671     ,-543    ,-1825   ,-3110   ,\n    -4032   ,-4256   ,-3854   ,-3196   ,-2498   ,-1678   ,-740    ,-69     ,-112    ,-766    ,-1332   ,-1212   ,-564    ,-122    ,-390    ,\n    -1129   ,-1689   ,-1687   ,-1288   ,-896    ,-749    ,-859    ,-1232   ,-1998   ,-3263   ,-4876   ,-6363   ,-7187   ,-7149   ,-6616   ,\n    -6300   ,-6705   ,-7703   ,-8661   ,-8970   ,-8466   ,-7364   ,-5913   ,-4196   ,-2219   ,-56     ,2151    ,4294    ,6364    ,8458    ,\n    10732   ,13232   ,15666   ,17402   ,17873   ,17122   ,15867   ,14993   ,14946   ,15587   ,16416   ,16771   ,15973   ,13675   ,10284   ,\n    6752    ,3600    ,188     ,-4620   ,-10811  ,-16434  ,-18902  ,-17255  ,-13084  ,-9215   ,-7595   ,-8373   ,-10538  ,-12905  ,-14439  ,\n    -14246  ,-11942  ,-8234   ,-4787   ,-3083   ,-3252   ,-4045   ,-3992   ,-2626   ,-699    ,572     ,382     ,-1323   ,-4015   ,-6887   ,\n    -9088   ,-9996   ,-9514   ,-8189   ,-6884   ,-6131   ,-5679   ,-4647   ,-2200   ,1868    ,7099    ,12692   ,17667   ,20841   ,21181   ,\n    18626   ,14863   ,12465   ,13280   ,17200   ,22452   ,27706   ,31494   ,32767   ,31313   ,25547   ,16788   ,7850    ,-145    ,-7465   ,\n    -14881  ,-21426  ,-24673  ,-23370  ,-18989  ,-14783  ,-13116  ,-14196  ,-16920  ,-20217  ,-23332  ,-25328  ,-25117  ,-22236  ,-17365  ,\n    -11895  ,-7002   ,-3122   ,-77     ,2544    ,5103    ,7733    ,10248   ,12223   ,13287   ,13367   ,12674   ,11483   ,9965    ,8207    ,\n    6300    ,4357    ,2476    ,744     ,-718    ,-1750   ,-2260   ,-2363   ,-2396   ,-2739   ,-3523   ,-4444   ,-4878   ,-4247   ,-2376   ,\n    400     ,3425    ,5996    ,7563    ,7848    ,6914    ,5175    ,3294    ,2036    ,2086    ,3807    ,6912    ,10309   ,12454   ,12201   ,\n    9527    ,5458    ,1256    ,-2362   ,-5263   ,-7405   ,-8527   ,-8426   ,-7392   ,-6200   ,-5597   ,-5811   ,-6528   ,-7249   ,-7637   ,\n    -7609   ,-7249   ,-6706   ,-6128   ,-5606   ,-5134   ,-4607   ,-3880   ,-2839   ,-1484   ,40      ,1511    ,2765    ,3790    ,4660    ,\n    5386    ,5843    ,5869    ,5406    ,4519    ,3314    ,1909    ,510     ,-560    ,-1012   ,-818    ,-269    ,198     ,262     ,-174    ,\n    -1015   ,-2025   ,-2845   ,-3083   ,-2510   ,-1258   ,190     ,1258    ,1611    ,1349    ,948     ,997     ,1862    ,3465    ,5319    ,\n    6796    ,7464    ,7252    ,6375    ,5149    ,3856    ,2694    ,1777    ,1140    ,795     ,759     ,978     ,1170    ,832     ,-414    ,\n    -2378   ,-4232   ,-5052   ,-4520   ,-3112   ,-1614   ,-516    ,111     ,314     ,54      ,-622    ,-1403   ,-1900   ,-2054   ,-2214   ,\n    -2713   ,-3420   ,-3803   ,-3472   ,-2623   ,-1934   ,-2052   ,-3152   ,-4921   ,-6864   ,-8617   ,-10001  ,-10871  ,-11018  ,-10310  ,\n    -8926   ,-7338   ,-5939   ,-4660   ,-3018   ,-596    ,2523    ,5764    ,8442    ,10135   ,10828   ,10830   ,10584   ,10470   ,10764   ,\n    11791   ,13981   ,17453   ,21388   ,24062   ,23942   ,20946   ,16407   ,11647   ,6794    ,1272    ,-4686   ,-9502   ,-11511  ,-10550  ,\n    -8080   ,-5919   ,-5174   ,-6284   ,-9394   ,-14083  ,-18850  ,-21530  ,-20715  ,-16816  ,-11638  ,-6977   ,-3663   ,-1680   ,-699    ,\n    -234    ,414     ,1852    ,3984    ,5871    ,6471    ,5589    ,4047    ,2868    ,2355    ,1963    ,955     ,-945    ,-3495   ,-6304   ,\n    -9064   ,-11439  ,-12943  ,-13156  ,-12152  ,-10615  ,-9332   ,-8467   ,-7345   ,-5017   ,-1057   ,4196    ,9980    ,15485   ,19694   ,\n    21434   ,20101   ,16429   ,12778   ,11095   ,12330   ,16053   ,21316   ,28116   ,32515   ,32767   ,30375   ,21439   ,10525   ,2322    ,\n    -4864   ,-12684  ,-21645  ,-28536  ,-29645  ,-25209  ,-19016  ,-15488  ,-16121  ,-19598  ,-23862  ,-27471  ,-29453  ,-28851  ,-25198  ,\n    -19211  ,-12574  ,-6864   ,-2671   ,399     ,3115    ,6029    ,9195    ,12181   ,14367   ,15373   ,15292   ,14532   ,13421   ,12036   ,\n    10347   ,8407    ,6324    ,4131    ,1852    ,-293    ,-1853   ,-2464   ,-2228   ,-1726   ,-1635   ,-2275   ,-3464   ,-4667   ,-5249   ,\n    -4715   ,-2950   ,-370    ,2206    ,3996    ,4675    ,4406    ,3541    ,2435    ,1579    ,1679    ,3251    ,5973    ,8596    ,9757    ,\n    8973    ,6811    ,4178    ,1656    ,-410    ,-1504   ,-1102   ,650     ,2667    ,3616    ,2890    ,806     ,-2021   ,-5186   ,-8319   ,\n    -10715  ,-11574  ,-10725  ,-8940   ,-7366   ,-6682   ,-6818   ,-7363   ,-8005   ,-8553   ,-8749   ,-8304   ,-7150   ,-5542   ,-3822   ,\n    -2135   ,-415    ,1378    ,3098    ,4494    ,5389    ,5757    ,5664    ,5251    ,4756    ,4461    ,4515    ,4783    ,4927    ,4658    ,\n    3905    ,2790    ,1542    ,527     ,279     ,1257    ,3406    ,5933    ,7679    ,7861    ,6540    ,4454    ,2466    ,1165    ,804     ,\n    1388    ,2692    ,4274    ,5594    ,6172    ,5657    ,3869    ,961     ,-2387   ,-5101   ,-6278   ,-5768   ,-4235   ,-2638   ,-1661   ,\n    -1528   ,-2150   ,-3236   ,-4294   ,-4719   ,-4102   ,-2525   ,-555    ,1081    ,1876    ,1733    ,907     ,-222    ,-1394   ,-2600   ,\n    -3998   ,-5684   ,-7511   ,-9120   ,-10152  ,-10489  ,-10340  ,-10106  ,-10114  ,-10390  ,-10661  ,-10553  ,-9775   ,-8112   ,-5365   ,\n    -1489   ,3086    ,7358    ,10218   ,11187   ,10767   ,10042   ,9975    ,11080   ,13583   ,17499   ,22228   ,26161   ,27224   ,24339   ,\n    18543   ,12423   ,8123    ,5773    ,3890    ,1286    ,-1597   ,-3318   ,-3238   ,-2464   ,-2935   ,-5694   ,-10105  ,-14581  ,-17794  ,\n    -19164  ,-18578  ,-16173  ,-12628  ,-9348   ,-7865   ,-8663   ,-10569  ,-11481  ,-9894   ,-5896   ,-881    ,3567    ,6531    ,7852    ,\n    7799    ,6869    ,5766    ,5215    ,5501    ,6158    ,6279    ,5287    ,3431    ,1526    ,178     ,-708    ,-1738   ,-3445   ,-5930   ,\n    -8920   ,-11986  ,-14609  ,-16187  ,-16241  ,-14772  ,-12412  ,-10062  ,-8262   ,-6853   ,-5186   ,-2588   ,1399    ,6913    ,13603   ,\n    20200   ,24738   ,25747   ,23189   ,19199   ,15798   ,14570   ,16130   ,20019   ,27137   ,32365   ,32767   ,31187   ,21896   ,10179   ,\n    2297    ,-4043   ,-11146  ,-20470  ,-28725  ,-31039  ,-26672  ,-19120  ,-13399  ,-11726  ,-13283  ,-16402  ,-19991  ,-23175  ,-24574  ,\n    -22959  ,-18439  ,-12552  ,-7035   ,-2679   ,717     ,3645    ,6369    ,8895    ,11075   ,12651   ,13363   ,13143   ,12220   ,10982   ,\n    9752    ,8680    ,7734    ,6710    ,5335    ,3523    ,1575    ,44      ,-704    ,-772    ,-549    ,-304    ,-73     ,100     ,22      ,\n    -398    ,-817    ,-608    ,528     ,2152    ,3356    ,3455    ,2362    ,413     ,-1963   ,-4270   ,-5835   ,-5975   ,-4489   ,-1928   ,\n    718     ,2644    ,3522    ,3303    ,1980    ,-281    ,-2864   ,-4811   ,-5400   ,-4659   ,-3325   ,-2279   ,-1987   ,-2287   ,-2554   ,\n    -2108   ,-711    ,1115    ,2297    ,1945    ,65      ,-2471   ,-4680   ,-6200   ,-7238   ,-7922   ,-7887   ,-6633   ,-4193   ,-1323   ,\n    1021    ,2343    ,2787    ,2803    ,2757    ,2789    ,2871    ,2882    ,2721    ,2467    ,2423    ,2918    ,3985    ,5285    ,6369    ,\n    6976    ,7018    ,6368    ,4847    ,2565    ,199     ,-1273   ,-1253   ,-3      ,1565    ,2546    ,2525    ,1571    ,-18     ,-1844   ,\n    -3381   ,-4037   ,-3418   ,-1586   ,927     ,3355    ,4983    ,5382    ,4564    ,3030    ,1568    ,842     ,1015    ,1696    ,2240    ,\n    2151    ,1345    ,160     ,-842    ,-1204   ,-884    ,-302    ,-51     ,-502    ,-1654   ,-3301   ,-5278   ,-7487   ,-9741   ,-11685  ,\n    -12910  ,-13161  ,-12433  ,-10902  ,-8785   ,-6230   ,-3316   ,-204    ,2666    ,4592    ,4982    ,3832    ,1837    ,6       ,-806    ,\n    32      ,3040    ,8349    ,14986   ,20652   ,22858   ,20764   ,15932   ,10988   ,7403    ,4675    ,1647    ,-1698   ,-4060   ,-4330   ,\n    -2872   ,-1150   ,-331    ,-578    ,-1585   ,-3277   ,-5629   ,-8011   ,-9237   ,-8590   ,-6673   ,-5006   ,-4684   ,-5485   ,-6258   ,\n    -6014   ,-4545   ,-2214   ,494     ,3013    ,4516    ,4140    ,1695    ,-1841   ,-4728   ,-5562   ,-4135   ,-1374   ,1397    ,3182    ,\n    3577    ,2703    ,1100    ,-408    ,-1058   ,-602    ,491     ,1357    ,1393    ,699     ,-52     ,-191    ,407     ,1217    ,1410    ,\n    315     ,-2255   ,-5942   ,-9949   ,-13260  ,-14967  ,-14650  ,-12597  ,-9647   ,-6695   ,-4213   ,-2140   ,-100    ,2379    ,5705    ,\n    10021   ,14759   ,18528   ,19901   ,18252   ,14827   ,11425   ,9886    ,11454   ,15878   ,23610   ,30537   ,32767   ,31672   ,23925   ,\n    13708   ,6374    ,736     ,-5472   ,-13916  ,-22145  ,-25655  ,-22931  ,-16504  ,-10962  ,-9032   ,-10597  ,-14195  ,-18477  ,-22320  ,\n    -24387  ,-23562  ,-19847  ,-14498  ,-9103   ,-4577   ,-947    ,2209    ,5266    ,8299    ,11033   ,12972   ,13733   ,13355   ,12276   ,\n    11009   ,9860    ,8920    ,8174    ,7490    ,6558    ,5048    ,2918    ,570     ,-1398   ,-2586   ,-2979   ,-2833   ,-2483   ,-2241   ,\n    -2318   ,-2661   ,-2877   ,-2430   ,-1074   ,873     ,2695    ,3752    ,3836    ,3139    ,1996    ,731     ,-311    ,-768    ,-473    ,\n    294     ,883     ,699     ,-416    ,-2219   ,-4395   ,-6739   ,-8999   ,-10685  ,-11251  ,-10538  ,-9002   ,-7408   ,-6279   ,-5626   ,\n    -5154   ,-4630   ,-4012   ,-3286   ,-2342   ,-1094   ,328     ,1643    ,2759    ,3945    ,5522    ,7359    ,8805    ,9261    ,8765    ,\n    7880    ,7006    ,5985    ,4529    ,2909    ,1959    ,2287    ,3582    ,4816    ,5089    ,4184    ,2412    ,154     ,-2284   ,-4519   ,\n    -6037   ,-6458   ,-5826   ,-4586   ,-3289   ,-2292   ,-1673   ,-1320   ,-1050   ,-706    ,-209    ,435     ,1162    ,1880    ,2505    ,\n    2977    ,3274    ,3422    ,3523    ,3755    ,4306    ,5188    ,6069    ,6358    ,5595    ,3852    ,1750    ,14      ,-1028   ,-1568   ,\n    -2038   ,-2779   ,-3917   ,-5402   ,-7030   ,-8444   ,-9241   ,-9194   ,-8405   ,-7212   ,-5956   ,-4801   ,-3732   ,-2640   ,-1350   ,\n    356     ,2617    ,5242    ,7597    ,8883    ,8707    ,7448    ,6043    ,5398    ,5991    ,7896    ,10815   ,13837   ,15364   ,13886   ,\n    9300    ,3409    ,-1321   ,-3793   ,-5032   ,-6818   ,-9668   ,-12301  ,-13043  ,-11543  ,-9033   ,-7148   ,-6689   ,-7415   ,-8643   ,\n    -9773   ,-10342  ,-9908   ,-8162   ,-5215   ,-1679   ,1639    ,4211    ,6042    ,7486    ,8801    ,9841    ,10149   ,9351    ,7506    ,\n    5144    ,2998    ,1663    ,1345    ,1770    ,2246    ,1938    ,311     ,-2502   ,-5689   ,-8169   ,-9150   ,-8453   ,-6477   ,-3958   ,\n    -1702   ,-348    ,-97     ,-564    ,-928    ,-412    ,1190    ,3361    ,5201    ,5987    ,5562    ,4318    ,2876    ,1720    ,970     ,\n    384     ,-464    ,-1937   ,-4141   ,-6869   ,-9684   ,-12074  ,-13614  ,-14085  ,-13515  ,-12099  ,-10041  ,-7440   ,-4301   ,-620    ,\n    3567    ,8097    ,12489   ,15820   ,17056   ,15839   ,13031   ,10347   ,9331    ,10741   ,14721   ,20930   ,27921   ,32723   ,32212   ,\n    25772   ,16351   ,8020    ,2188    ,-3259   ,-10694  ,-19145  ,-24690  ,-24463  ,-19642  ,-14229  ,-11431  ,-11681  ,-13716  ,-16443  ,\n    -19276  ,-21315  ,-21227  ,-18285  ,-13208  ,-7689   ,-3115   ,172     ,2602    ,4723    ,6837    ,9003    ,11125   ,12968   ,14180   ,\n    14415   ,13490   ,11538   ,9025    ,6560    ,4541    ,2924    ,1360    ,-386    ,-2150   ,-3518   ,-4219   ,-4354   ,-4264   ,-4248   ,\n    -4405   ,-4664   ,-4838   ,-4657   ,-3845   ,-2303   ,-263    ,1734    ,3086    ,3430    ,2795    ,1564    ,283     ,-532    ,-544    ,\n    315     ,1826    ,3525    ,4833    ,5223    ,4376    ,2269    ,-780    ,-4119   ,-6911   ,-8483   ,-8700   ,-8075   ,-7422   ,-7296   ,\n    -7699   ,-8263   ,-8660   ,-8767   ,-8518   ,-7745   ,-6314   ,-4377   ,-2387   ,-782    ,314     ,1081    ,1773    ,2611    ,3816    ,\n    5556    ,7732    ,9925    ,11726   ,13117   ,14345   ,15334   ,15418   ,13943   ,11122   ,8083    ,5846    ,4330    ,2561    ,-142    ,\n    -3327   ,-5826   ,-6878   ,-6733   ,-6237   ,-6039   ,-6239   ,-6601   ,-6879   ,-6925   ,-6642   ,-5968   ,-4907   ,-3537   ,-1992   ,\n    -437    ,968     ,2137    ,3120    ,4064    ,5086    ,6132    ,6929    ,7058    ,6145    ,4099    ,1261    ,-1693   ,-4065   ,-5466   ,\n    -5923   ,-5750   ,-5346   ,-5023   ,-4880   ,-4717   ,-4101   ,-2628   ,-224    ,2730    ,5564    ,7634    ,8563    ,8332    ,7248    ,\n    5902    ,5112    ,5724    ,8126    ,11685   ,14712   ,15391   ,13172   ,9302    ,5738    ,3348    ,1260    ,-1900   ,-6248   ,-10339  ,\n    -12559  ,-12584  ,-11365  ,-10010  ,-9042   ,-8655   ,-9156   ,-10689  ,-12625  ,-13633  ,-12671  ,-9910   ,-6576   ,-3919   ,-2351   ,\n    -1476   ,-735    ,108     ,987     ,1813    ,2609    ,3435    ,4288    ,5129    ,5966    ,6826    ,7589    ,7892    ,7270    ,5516    ,\n    2960    ,378     ,-1419   ,-1994   ,-1395   ,-1      ,1640    ,2858    ,2988    ,1688    ,-708    ,-3203   ,-4645   ,-4374   ,-2538   ,\n    92      ,2542    ,4015    ,4122    ,2991    ,1235    ,-304    ,-955    ,-524    ,673     ,2029    ,2933    ,3000    ,2168    ,670     ,\n    -1132   ,-2964   ,-4762   ,-6606   ,-8548   ,-10486  ,-12185  ,-13391  ,-13935  ,-13767  ,-12935  ,-11524  ,-9596   ,-7165   ,-4236   ,\n    -840    ,2985    ,7190    ,11559   ,15470   ,17931   ,18166   ,16339   ,13686   ,11798   ,11801   ,14157   ,18842   ,25080   ,30736   ,\n    32766   ,29244   ,21233   ,12133   ,4587    ,-1778   ,-9058   ,-17690  ,-25003  ,-27537  ,-24518  ,-18632  ,-13590  ,-11419  ,-12021  ,\n    -14420  ,-17625  ,-20451  ,-21409  ,-19482  ,-14985  ,-9392   ,-4241   ,-279    ,2515    ,4451    ,5859    ,7062    ,8275    ,9416    ,\n    10132   ,10107   ,9318    ,7979    ,6324    ,4543    ,2855    ,1489    ,509     ,-266    ,-1046   ,-1801   ,-2269   ,-2295   ,-2082   ,\n    -2026   ,-2279   ,-2543   ,-2316   ,-1329   ,256     ,2024    ,3591    ,4696    ,5113    ,4604    ,3073    ,798     ,-1530   ,-3084   ,\n    -3342   ,-2371   ,-748    ,804     ,1769    ,1946    ,1302    ,-157    ,-2322   ,-4799   ,-6901   ,-7943   ,-7684   ,-6498   ,-5120   ,\n    -4168   ,-3840   ,-3980   ,-4348   ,-4776   ,-5130   ,-5219   ,-4848   ,-3979   ,-2833   ,-1808   ,-1268   ,-1335   ,-1788   ,-2131   ,\n    -1822   ,-553    ,1599    ,4280    ,7069    ,9579    ,11391   ,12068   ,11381   ,9566    ,7291    ,5329    ,4276    ,4462    ,5889    ,\n    8032    ,9817    ,10119   ,8529    ,5606    ,2284    ,-893    ,-3841   ,-6336   ,-7705   ,-7356   ,-5540   ,-3366   ,-1974   ,-1784   ,\n    -2542   ,-3852   ,-5466   ,-7105   ,-8321   ,-8682   ,-8061   ,-6653   ,-4772   ,-2764   ,-1063   ,-106    ,-11     ,-372    ,-469    ,\n    269     ,2003    ,4541    ,7436    ,9978    ,11313   ,10922   ,9094    ,6849    ,5301    ,5103    ,6451    ,9264    ,12979   ,16192   ,\n    17047   ,14574   ,9725    ,4776    ,1391    ,-703    ,-3010   ,-6331   ,-9750   ,-11553  ,-10979  ,-8949   ,-7240   ,-7141   ,-8830   ,\n    -11625  ,-14519  ,-16529  ,-16927  ,-15512  ,-12790  ,-9775   ,-7428   ,-6093   ,-5369   ,-4472   ,-2830   ,-467    ,2071    ,4128    ,\n    5345    ,5768    ,5667    ,5298    ,4827    ,4392    ,4131    ,4123    ,4317    ,4597    ,4902    ,5251    ,5581    ,5611    ,4936    ,\n    3370    ,1179    ,-1034   ,-2686   ,-3453   ,-3221   ,-2012   ,-105    ,1783    ,2683    ,1963    ,-157    ,-2719   ,-4665   ,-5401   ,\n    -4843   ,-3179   ,-768    ,1760    ,3583    ,4092    ,3312    ,1877    ,558     ,-192    ,-337    ,-66     ,365     ,684     ,642     ,\n    107     ,-895    ,-2268   ,-3958   ,-5939   ,-8098   ,-10169  ,-11838  ,-12889  ,-13281  ,-13114  ,-12547  ,-11692  ,-10505  ,-8753   ,\n    -6142   ,-2511   ,2071    ,7369    ,12999   ,18269   ,22095   ,23407   ,21940   ,18738   ,15633   ,14220   ,15200   ,18478   ,23588   ,\n    29128   ,32767   ,32294   ,26673   ,17762   ,8699    ,1008    ,-6065   ,-13901  ,-21983  ,-27710  ,-28779  ,-25378  ,-20029  ,-15536  ,\n    -13383  ,-13729  ,-16107  ,-19633  ,-22817  ,-23917  ,-21922  ,-17259  ,-11428  ,-5941   ,-1565   ,1676    ,4086    ,5999    ,7703    ,\n    9377    ,10990   ,12261   ,12806   ,12374   ,11009   ,9037    ,6911    ,4984    ,3321    ,1683    ,-237    ,-2476   ,-4639   ,-6131   ,\n    -6615   ,-6281   ,-5676   ,-5256   ,-5079   ,-4882   ,-4384   ,-3490   ,-2285   ,-950    ,252     ,991     ,1017    ,378     ,-502    ,\n    -1026   ,-776    ,272     ,1791    ,3352    ,4622    ,5414    ,5601    ,5038    ,3630    ,1516    ,-826    ,-2743   ,-3777   ,-3947   ,\n    -3640   ,-3223   ,-2778   ,-2210   ,-1548   ,-1061   ,-1040   ,-1521   ,-2264   ,-2949   ,-3381   ,-3538   ,-3534   ,-3577   ,-3871   ,\n    -4457   ,-5123   ,-5507   ,-5331   ,-4524   ,-3157   ,-1367   ,632     ,2513    ,3954    ,4828    ,5268    ,5517    ,5750    ,6058    ,\n    6508    ,7138    ,7875    ,8494    ,8711    ,8302    ,7210    ,5677    ,4276    ,3647    ,3922    ,4368    ,3782    ,1484    ,-2038   ,\n    -5550   ,-8146   ,-9839   ,-11099  ,-11983  ,-11922  ,-10334  ,-7265   ,-3326   ,830     ,4746    ,7912    ,9588    ,9218    ,7074    ,\n    4343    ,2458    ,2347    ,4275    ,8103    ,13289   ,18550   ,21945   ,21899   ,18455   ,13378   ,8752    ,5396    ,2656    ,-379    ,\n    -3698   ,-6445   ,-7865   ,-7940   ,-7214   ,-6399   ,-6278   ,-7631   ,-10723  ,-14722  ,-17890  ,-18726  ,-17068  ,-14110  ,-11366  ,\n    -9659   ,-8898   ,-8523   ,-7967   ,-6852   ,-5112   ,-3108   ,-1546   ,-1008   ,-1432   ,-2053   ,-1953   ,-765    ,1092    ,2812    ,\n    3828    ,4101    ,3930    ,3580    ,3121    ,2563    ,2038    ,1789    ,1978    ,2566    ,3389    ,4344    ,5442    ,6662    ,7792    ,\n    8448    ,8277    ,7156    ,5230    ,2841    ,472     ,-1317   ,-2075   ,-1751   ,-821    ,-36     ,78      ,-489    ,-1392   ,-2307   ,\n    -3089   ,-3598   ,-3563   ,-2794   ,-1545   ,-531    ,-423    ,-1273   ,-2476   ,-3319   ,-3538   ,-3347   ,-3017   ,-2537   ,-1757   ,\n    -788    ,-157    ,-500    ,-2085   ,-4611   ,-7437   ,-9986   ,-11963  ,-13306  ,-14022  ,-14084  ,-13433  ,-12031  ,-9902   ,-7168   ,\n    -4047   ,-761    ,2594    ,6118    ,10020   ,14392   ,19011   ,23186   ,25891   ,26300   ,24285   ,21018   ,18147   ,17155   ,18636   ,\n    21906   ,26747   ,31009   ,32767   ,32302   ,26818   ,17952   ,9249    ,1565    ,-5470   ,-13225  ,-21237  ,-26888  ,-27998  ,-24776  ,\n    -19982  ,-16534  ,-15657  ,-16875  ,-19110  ,-21387  ,-22707  ,-22047  ,-18952  ,-14084  ,-8900   ,-4600   ,-1396   ,1286    ,4026    ,\n    6895    ,9537    ,11532   ,12595   ,12552   ,11349   ,9177    ,6508    ,3909    ,1723    ,-91     ,-1827   ,-3739   ,-5821   ,-7772   ,\n    -9155   ,-9657   ,-9312   ,-8488   ,-7621   ,-6909   ,-6229   ,-5343   ,-4128   ,-2619   ,-919    ,842     ,2475    ,3769    ,4631    ,\n    5172    ,5568    ,5864    ,5974    ,5883    ,5783    ,5914    ,6284    ,6621    ,6616    ,6173    ,5388    ,4334    ,2973    ,1286    ,\n    -566    ,-2305   ,-3740   ,-4859   ,-5693   ,-6160   ,-6121   ,-5602   ,-4896   ,-4392   ,-4297   ,-4564   ,-5050   ,-5671   ,-6355   ,\n    -6884   ,-6906   ,-6162   ,-4692   ,-2801   ,-827    ,999     ,2525    ,3630    ,4314    ,4785    ,5330    ,6002    ,6473    ,6256    ,\n    5108    ,3228    ,1128    ,-658    ,-1781   ,-2196   ,-2168   ,-2095   ,-2191   ,-2330   ,-2298   ,-2210   ,-2517   ,-3467   ,-4606   ,\n    -4974   ,-3836   ,-1136   ,2755    ,7473    ,12586   ,17171   ,19898   ,19897   ,17583   ,14412   ,11819   ,10456   ,10419   ,11750   ,\n    14233   ,16732   ,17325   ,14719   ,9597    ,4210    ,325     ,-2357   ,-5517   ,-10016  ,-14621  ,-17036  ,-16079  ,-12707  ,-9096   ,\n    -7005   ,-6972   ,-8568   ,-10884  ,-12742  ,-13009  ,-11264  ,-8292   ,-5663   ,-4544   ,-4837   ,-5455   ,-5368   ,-4352   ,-2873   ,\n    -1522   ,-666    ,-458    ,-900    ,-1778   ,-2676   ,-3235   ,-3457   ,-3691   ,-4243   ,-5003   ,-5460   ,-5093   ,-3781   ,-1895   ,\n    -37     ,1328    ,2066    ,2314    ,2304    ,2239    ,2290    ,2625    ,3350    ,4416    ,5605    ,6662    ,7454    ,8010    ,8416    ,\n    8688    ,8739    ,8431    ,7639    ,6284    ,4399    ,2223    ,205     ,-1178   ,-1742   ,-1769   ,-1833   ,-2406   ,-3555   ,-5007   ,\n    -6414   ,-7535   ,-8189   ,-8181   ,-7421   ,-6138   ,-4867   ,-4092   ,-3840   ,-3664   ,-3072   ,-1988   ,-756    ,256     ,990     ,\n    1600    ,2114    ,2309    ,1948    ,1052    ,-133    ,-1397   ,-2680   ,-3984   ,-5293   ,-6661   ,-8201   ,-9835   ,-11093  ,-11390  ,\n    -10575  ,-9037   ,-7139   ,-4713   ,-1334   ,3014    ,7857    ,12813   ,17782   ,22230   ,24730   ,24035   ,20816   ,17716   ,17023   ,\n    18363   ,19239   ,17871   ,15010   ,12699   ,11794   ,11294   ,9955    ,7795    ,5691    ,4010    ,2252    ,-47     ,-2590   ,-4714   ,\n    -6197   ,-7384   ,-8648   ,-10006  ,-11263  ,-12301  ,-13142  ,-13882  ,-14668  ,-15663  ,-16901  ,-18211  ,-19386  ,-20396  ,-21352  ,\n    -22258  ,-22924  ,-23188  ,-23136  ,-23016  ,-22976  ,-22992  ,-23051  ,-23283  ,-23845  ,-24729  ,-25772  ,-26859  ,-28015  ,-29288  ,\n    -30589  ,-31691  ,-32385  ,-32598  ,-32388  ,-31859  ,-31081  ,-30071  ,-28839  ,-27474  ,-26179  ,-25173  ,-24521  ,-24069  ,-23593  ,\n    -23023  ,-22486  ,-22107  ,-21802  ,-21307  ,-20431  ,-19241  ,-17968  ,-16763  ,-15570  ,-14262  ,-12834  ,-11437  ,-10221  ,-9185   ,\n    -8195   ,-7115   ,-5899   ,-4550   ,-3050   ,-1368   ,485     ,2432    ,4382    ,6293    ,8160    ,9948    ,11553   ,12851   ,13785   ,\n    14415   ,14896   ,15403   ,16066   ,16932   ,17992   ,19225   ,20655   ,22312   ,24142   ,25965   ,27576   ,28895   ,30004   ,30974   ,\n    31710   ,32000   ,31752   ,31141   ,30472   ,29917   ,29415   ,28835   ,28187   ,27643   ,27363   ,27336   ,27411   ,27439   ,27378   ,\n    27268   ,27137   ,26946   ,26632   ,26166   ,25575   ,24888   ,24099   ,23197   ,22220   ,21242   ,20284   ,19272   ,18107   ,16790   ,\n    15427   ,14099   ,12736   ,11158   ,9270    ,7221    ,5335    ,3876    ,2839    ,1974    ,1023    ,-46     ,-1053   ,-1842   ,-2496   ,\n    -3291   ,-4453   ,-5999   ,-7801   ,-9728   ,-11679  ,-13535  ,-15193  ,-16667  ,-18070  ,-19439  ,-20618  ,-21409  ,-21826  ,-22117  ,\n    -22510  ,-23016  ,-23525  ,-24026  ,-24625  ,-25352  ,-26055  ,-26570  ,-26920  ,-27261  ,-27629  ,-27833  ,-27634  ,-27005  ,-26150  ,\n    -25298  ,-24512  ,-23720  ,-22860  ,-21975  ,-21158  ,-20448  ,-19807  ,-19186  ,-18584  ,-18037  ,-17511  ,-16881  ,-16029  ,-14985  ,\n    -13905  ,-12917  ,-11972  ,-10929  ,-9760   ,-8618   ,-7674   ,-6912   ,-6130   ,-5131   ,-3862   ,-2382   ,-750    ,999     ,2815    ,\n    4621    ,6378    ,8096    ,9774    ,11352   ,12730   ,13841   ,14677   ,15283   ,15783   ,16378   ,17225   ,18304   ,19409   ,20374   ,\n    21250   ,22226   ,23337   ,24357   ,25005   ,25227   ,25195   ,25044   ,24709   ,24062   ,23160   ,22272   ,21643   ,21295   ,21100   ,\n    21009   ,21141   ,21622   ,22372   ,23135   ,23715   ,24112   ,24383   ,24429   ,24047   ,23219   ,22217   ,21299   ,20354   ,19058   ,\n    17458   ,16229   ,16126   ,17152   ,18415   ,18923   ,18430   ,17432   ,16425   ,15331   ,13734   ,11466   ,8830    ,6264    ,3954    ,\n    1840    ,-122    ,-1835   ,-3183   ,-4150   ,-4779   ,-5101   ,-5189   ,-5251   ,-5561   ,-6255   ,-7261   ,-8461   ,-9851   ,-11478  ,\n    -13235  ,-14852  ,-16161  ,-17272  ,-18426  ,-19656  ,-20729  ,-21466  ,-22012  ,-22734  ,-23829  ,-25127  ,-26320  ,-27301  ,-28224  ,\n    -29263  ,-30386  ,-31383  ,-32076  ,-32419  ,-32438  ,-32145  ,-31551  ,-30745  ,-29888  ,-29118  ,-28482  ,-27969  ,-27565  ,-27253  ,\n    -26979  ,-26658  ,-26247  ,-25765  ,-25218  ,-24545  ,-23673  ,-22643  ,-21627  ,-20781  ,-20119  ,-19546  ,-19020  ,-18607  ,-18379  ,\n    -18292  ,-18203  ,-18000  ,-17650  ,-17140  ,-16388  ,-15291  ,-13821  ,-12081  ,-10242  ,-8471   ,-6911   ,-5685   ,-4860   ,-4384   ,\n    -4110   ,-3920   ,-3812   ,-3828   ,-3880   ,-3701   ,-3025   ,-1818   ,-301    ,1275    ,2851    ,4533    ,6382    ,8272    ,9981    ,\n    11394   ,12566   ,13610   ,14552   ,15332   ,15925   ,16445   ,17083   ,17960   ,19023   ,20122   ,21155   ,22143   ,23140   ,24121   ,\n    24982   ,25659   ,26207   ,26738   ,27308   ,27896   ,28476   ,29062   ,29651   ,30165   ,30495   ,30584   ,30428   ,30002   ,29225   ,\n    28052   ,26564   ,24904   ,23111   ,21101   ,18863   ,16657   ,14926   ,13927   ,13499   ,13229   ,12856   ,12462   ,12240   ,12140   ,\n    11826   ,10994   ,9662    ,8096    ,6488    ,4805    ,2959    ,1052    ,-636    ,-1887   ,-2697   ,-3191   ,-3456   ,-3514   ,-3438   ,\n    -3383   ,-3494   ,-3830   ,-4427   ,-5393   ,-6840   ,-8683   ,-10575  ,-12129  ,-13218  ,-14014  ,-14695  ,-15192  ,-15254  ,-14768  ,\n    -13916  ,-13012  ,-12218  ,-11497  ,-10792  ,-10168  ,-9713   ,-9371   ,-8956   ,-8362   ,-7693   ,-7120   ,-6641   ,-6040   ,-5137   ,\n    -4027   ,-3050   ,-2486   ,-2336   ,-2395   ,-2512   ,-2724   ,-3137   ,-3722   ,-4274   ,-4555   ,-4432   ,-3894   ,-3002   ,-1850   ,\n    -559    ,767     ,2062    ,3238    ,4115    ,4487    ,4308    ,3768    ,3125    ,2471    ,1751    ,1007    ,522     ,609     ,1314    ,\n    2421    ,3755    ,5360    ,7299    ,9361    ,11101   ,12208   ,12717   ,12831   ,12643   ,12131   ,11375   ,10636   ,10194   ,10206   ,\n    10725   ,11741   ,13142   ,14756   ,16539   ,18582   ,20761   ,22544   ,23456   ,23742   ,24104   ,24577   ,24164   ,22224   ,19957   ,\n    19465   ,20840   ,20955   ,16339   ,7328    ,-1502   ,-5599   ,-4683   ,-2283   ,-1570   ,-2558   ,-3375   ,-3177   ,-2914   ,-3668   ,\n    -5228   ,-6634   ,-7498   ,-8256   ,-9328   ,-10527  ,-11398  ,-11798  ,-11940  ,-12030  ,-12078  ,-12046  ,-12016  ,-12148  ,-12546  ,\n    -13206  ,-14081  ,-15144  ,-16378  ,-17756  ,-19210  ,-20653  ,-21992  ,-23155  ,-24097  ,-24802  ,-25299  ,-25649  ,-25901  ,-26050  ,\n    -26068  ,-25978  ,-25886  ,-25912  ,-26091  ,-26357  ,-26628  ,-26882  ,-27142  ,-27404  ,-27627  ,-27788  ,-27931  ,-28124  ,-28378  ,\n    -28609  ,-28716  ,-28685  ,-28615  ,-28625  ,-28733  ,-28843  ,-28857  ,-28788  ,-28743  ,-28789  ,-28855  ,-28787  ,-28481  ,-27962  ,\n    -27329  ,-26644  ,-25910  ,-25111  ,-24266  ,-23415  ,-22580  ,-21755  ,-20931  ,-20104  ,-19266  ,-18417  ,-17588  ,-16841  ,-16205  ,\n    -15632  ,-15030  ,-14348  ,-13630  ,-12933  ,-12239  ,-11457  ,-10530  ,-9496   ,-8424   ,-7324   ,-6161   ,-4956   ,-3824   ,-2873   ,\n    -2065   ,-1228   ,-237    ,837     ,1771    ,2414    ,2838    ,3260    ,3815    ,4422    ,4898    ,5166    ,5326    ,5506    ,5703    ,\n    5814    ,5793    ,5731    ,5749    ,5861    ,6014    ,6210    ,6529    ,7011    ,7564    ,8072    ,8538    ,9063    ,9671    ,10215   ,\n    10520   ,10569   ,10496   ,10400   ,10225   ,9843    ,9232    ,8530    ,7929    ,7554    ,7411    ,7415    ,7462    ,7510    ,7615    ,\n    7868    ,8280    ,8739    ,9113    ,9371    ,9578    ,9768    ,9888    ,9881    ,9801    ,9786    ,9941    ,10277   ,10760   ,11364   ,\n    12055   ,12777   ,13522   ,14374   ,15412   ,16563   ,17620   ,18469   ,19216   ,20059   ,21009   ,21868   ,22469   ,22897   ,23385   ,\n    24034   ,24718   ,25277   ,25717   ,26184   ,26767   ,27406   ,27995   ,28532   ,29113   ,29797   ,30506   ,31089   ,31467   ,31718   ,\n    31990   ,32319   ,32545   ,32444   ,31937   ,31158   ,30290   ,29375   ,28316   ,27059   ,25695   ,24384   ,23213   ,22185   ,21299   ,\n    20568   ,19951   ,19345   ,18666   ,17934   ,17198   ,16436   ,15555   ,14514   ,13370   ,12190   ,10968   ,9693    ,8459    ,7431    ,\n    6677    ,6101    ,5581    ,5146    ,4933    ,4966    ,5045    ,4895    ,4420    ,3743    ,3016    ,2240    ,1332    ,327     ,-578    ,\n    -1236   ,-1691   ,-2038   ,-2189   ,-1954   ,-1382   ,-798    ,-356    ,236     ,1222    ,2136    ,2125    ,1146    ,326     ,526     ,\n    838     ,-536    ,-3483   ,-4887   ,-1435   ,6435    ,14224   ,17523   ,16055   ,13185   ,11922   ,12236   ,12255   ,11032   ,9372    ,\n    8355    ,7995    ,7583    ,6782    ,5879    ,5171    ,4555    ,3791    ,2852    ,1879    ,915     ,-135    ,-1336   ,-2641   ,-3976   ,\n    -5319   ,-6665   ,-7981   ,-9240   ,-10455  ,-11656  ,-12837  ,-13970  ,-15072  ,-16207  ,-17427  ,-18701  ,-19964  ,-21207  ,-22508  ,\n    -23924  ,-25384  ,-26720  ,-27841  ,-28817  ,-29768  ,-30683  ,-31412  ,-31845  ,-32062  ,-32245  ,-32462  ,-32605  ,-32540  ,-32284  ,\n    -31984  ,-31735  ,-31491  ,-31153  ,-30716  ,-30286  ,-29955  ,-29702  ,-29426  ,-29074  ,-28690  ,-28365  ,-28132  ,-27934  ,-27677  ,\n    -27311  ,-26842  ,-26288  ,-25641  ,-24880  ,-24012  ,-23069  ,-22072  ,-21017  ,-19902  ,-18777  ,-17731  ,-16830  ,-16059  ,-15354  ,\n    -14655  ,-13950  ,-13255  ,-12561  ,-11822  ,-10968  ,-9948   ,-8761   ,-7448   ,-6054   ,-4596   ,-3078   ,-1536   ,-56     ,1269    ,\n    2397    ,3346    ,4153    ,4843    ,5425    ,5905    ,6302    ,6647    ,6999    ,7419    ,7926    ,8471    ,8980    ,9427    ,9855    ,\n    10306   ,10764   ,11178   ,11533   ,11874   ,12256   ,12697   ,13178   ,13664   ,14118   ,14509   ,14842   ,15167   ,15517   ,15829   ,\n    15978   ,15891   ,15638   ,15355   ,15109   ,14842   ,14489   ,14086   ,13750   ,13569   ,13530   ,13554   ,13578   ,13597   ,13651   ,\n    13778   ,13968   ,14135   ,14169   ,14016   ,13725   ,13376   ,12982   ,12490   ,11894   ,11295   ,10821   ,10495   ,10227   ,9950    ,\n    9698    ,9539    ,9461    ,9380    ,9243    ,9064    ,8861    ,8599    ,8232    ,7773    ,7293    ,6839    ,6398    ,5934    ,5421    ,\n    4848    ,4216    ,3572    ,3008    ,2593    ,2293    ,2002    ,1664    ,1328    ,1089    ,984     ,984     ,1047    ,1152    ,1277    ,\n    1398    ,1516    ,1665    ,1828    ,1895    ,1748    ,1413    ,1065    ,853     ,737     ,561     ,272     ,20      ,-1      ,221     ,\n    504     ,681     ,779     ,953     ,1274    ,1617    ,1790    ,1726    ,1549    ,1450    ,1510    ,1669    ,1829    ,1989    ,2256    ,\n    2730    ,3387    ,4107    ,4796    ,5474    ,6217    ,7037    ,7862    ,8614    ,9283    ,9890    ,10449   ,10979   ,11532   ,12156   ,\n    12833   ,13522   ,14250   ,15087   ,16001   ,16839   ,17521   ,18142   ,18791   ,19309   ,19456   ,19317   ,19279   ,19447   ,19343   ,\n    18547   ,17538   ,17326   ,17988   ,17957   ,15430   ,10520   ,5570    ,2984    ,2977    ,3724    ,3500    ,2205    ,808     ,-142    ,\n    -1010   ,-2307   ,-3952   ,-5475   ,-6640   ,-7628   ,-8678   ,-9782   ,-10781  ,-11594  ,-12276  ,-12915  ,-13559  ,-14215  ,-14870  ,\n    -15499  ,-16097  ,-16718  ,-17437  ,-18280  ,-19170  ,-20007  ,-20759  ,-21483  ,-22248  ,-23054  ,-23828  ,-24500  ,-25064  ,-25584  ,\n    -26134  ,-26739  ,-27362  ,-27941  ,-28447  ,-28911  ,-29399  ,-29943  ,-30508  ,-31019  ,-31434  ,-31768  ,-32054  ,-32292  ,-32454  ,\n    -32535  ,-32560  ,-32548  ,-32471  ,-32292  ,-32021  ,-31728  ,-31482  ,-31311  ,-31216  ,-31199  ,-31259  ,-31360  ,-31447  ,-31494  ,\n    -31531  ,-31599  ,-31698  ,-31778  ,-31782  ,-31676  ,-31454  ,-31131  ,-30741  ,-30331  ,-29938  ,-29563  ,-29184  ,-28794  ,-28419  ,\n    -28107  ,-27892  ,-27761  ,-27660  ,-27534  ,-27376  ,-27234  ,-27145  ,-27065  ,-26873  ,-26467  ,-25852  ,-25117  ,-24329  ,-23472  ,\n    -22509  ,-21479  ,-20501  ,-19658  ,-18921  ,-18189  ,-17427  ,-16704  ,-16108  ,-15622  ,-15123  ,-14511  ,-13798  ,-13063  ,-12320  ,\n    -11482  ,-10456  ,-9256   ,-7977   ,-6683   ,-5340   ,-3885   ,-2329   ,-756    ,777     ,2296    ,3846    ,5407    ,6894    ,8251    ,\n    9493    ,10663   ,11760   ,12740   ,13571   ,14267   ,14859   ,15372   ,15845   ,16345   ,16934   ,17627   ,18383   ,19175   ,20018   ,\n    20946   ,21964   ,23035   ,24107   ,25136   ,26074   ,26855   ,27418   ,27745   ,27885   ,27921   ,27904   ,27825   ,27663   ,27464   ,\n    27353   ,27438   ,27706   ,28036   ,28337   ,28636   ,29013   ,29459   ,29864   ,30133   ,30281   ,30375   ,30408   ,30295   ,29977   ,\n    29494   ,28925   ,28302   ,27626   ,26953   ,26399   ,26038   ,25818   ,25616   ,25374   ,25154   ,25064   ,25147   ,25354   ,25605   ,\n    25856   ,26105   ,26352   ,26558   ,26647   ,26566   ,26333   ,26012   ,25638   ,25170   ,24532   ,23717   ,22825   ,21975   ,21210   ,\n    20480   ,19741   ,19021   ,18412   ,17973   ,17672   ,17422   ,17149   ,16861   ,16636   ,16560   ,16643   ,16799   ,16890   ,16834   ,\n    16645   ,16394   ,16120   ,15795   ,15370   ,14855   ,14320   ,13818   ,13335   ,12817   ,12258   ,11726   ,11296   ,10976   ,10723   ,\n    10545   ,10506   ,10620   ,10768   ,10799   ,10705   ,10608   ,10562   ,10457   ,10180   ,9807    ,9482    ,9138    ,8536    ,7671    ,\n    6940    ,6659    ,6529    ,5920    ,4849    ,4348    ,5482    ,8012    ,10371   ,11131   ,10304   ,9041    ,8252    ,7835    ,7205    ,\n    6161    ,4985    ,3909    ,2821    ,1535    ,78      ,-1410   ,-2926   ,-4566   ,-6297   ,-7920   ,-9287   ,-10443  ,-11487  ,-12392  ,\n    -13055  ,-13488  ,-13842  ,-14224  ,-14572  ,-14772  ,-14854  ,-15004  ,-15373  ,-15943  ,-16605  ,-17333  ,-18224  ,-19357  ,-20679  ,\n    -22044  ,-23347  ,-24587  ,-25811  ,-27026  ,-28191  ,-29255  ,-30181  ,-30938  ,-31511  ,-31922  ,-32224  ,-32446  ,-32549  ,-32468  ,\n    -32203  ,-31854  ,-31550  ,-31339  ,-31157  ,-30902  ,-30543  ,-30154  ,-29864  ,-29751  ,-29783  ,-29850  ,-29864  ,-29821  ,-29773  ,\n    -29730  ,-29628  ,-29382  ,-28974  ,-28454  ,-27875  ,-27258  ,-26631  ,-26057  ,-25604  ,-25285  ,-25074  ,-24987  ,-25092  ,-25416  ,\n    -25862  ,-26277  ,-26598  ,-26881  ,-27173  ,-27383  ,-27347  ,-26992  ,-26403  ,-25683  ,-24809  ,-23677  ,-22271  ,-20730  ,-19218  ,\n    -17778  ,-16351  ,-14929  ,-13602  ,-12463  ,-11490  ,-10593  ,-9748   ,-9021   ,-8438   ,-7879   ,-7173   ,-6286   ,-5366   ,-4568   ,\n    -3861   ,-3054   ,-2010   ,-786    ,460     ,1658    ,2875    ,4189    ,5578    ,6948    ,8229    ,9409    ,10481   ,11431   ,12280   ,\n    13084   ,13851   ,14470   ,14811   ,14889   ,14880   ,14949   ,15086   ,15152   ,15097   ,15038   ,15136   ,15426   ,15817   ,16238   ,\n    16703   ,17252   ,17858   ,18455   ,18989   ,19424   ,19688   ,19698   ,19451   ,19072   ,18712   ,18420   ,18136   ,17799   ,17452   ,\n    17196   ,17113   ,17208   ,17431   ,17695   ,17915   ,18052   ,18153   ,18293   ,18479   ,18620   ,18615   ,18468   ,18264   ,18062   ,\n    17821   ,17467   ,16990   ,16478   ,16043   ,15770   ,15680   ,15731   ,15827   ,15883   ,15894   ,15948   ,16119   ,16382   ,16640   ,\n    16866   ,17149   ,17598   ,18184   ,18755   ,19180   ,19475   ,19737   ,20005   ,20194   ,20196   ,19990   ,19637   ,19183   ,18617   ,\n    17926   ,17158   ,16380   ,15615   ,14855   ,14132   ,13544   ,13141   ,12847   ,12535   ,12213   ,12036   ,12129   ,12416   ,12691   ,\n    12834   ,12903   ,12970   ,12972   ,12766   ,12340   ,11861   ,11501   ,11257   ,10994   ,10640   ,10275   ,10028   ,9936    ,9947    ,\n    10038   ,10267   ,10694   ,11266   ,11838   ,12314   ,12729   ,13173   ,13642   ,14028   ,14269   ,14441   ,14626   ,14742   ,14617   ,\n    14269   ,13968   ,13889   ,13776   ,13207   ,12242   ,11634   ,12144   ,13665   ,15223   ,15916   ,15731   ,15349   ,15304   ,15507   ,\n    15586   ,15422   ,15222   ,15164   ,15162   ,15007   ,14585   ,13914   ,13036   ,11976   ,10774   ,9494    ,8181    ,6869    ,5625    ,\n    4531    ,3609    ,2790    ,2010    ,1314    ,811     ,504     ,214     ,-268    ,-991    ,-1813   ,-2582   ,-3295   ,-4083   ,-5045   ,\n    -6152   ,-7302   ,-8440   ,-9582   ,-10765  ,-11999  ,-13287  ,-14663  ,-16160  ,-17766  ,-19416  ,-21031  ,-22569  ,-24007  ,-25301  ,\n    -26378  ,-27169  ,-27654  ,-27876  ,-27930  ,-27917  ,-27904  ,-27898  ,-27886  ,-27900  ,-28044  ,-28418  ,-29014  ,-29692  ,-30284  ,\n    -30715  ,-31019  ,-31240  ,-31338  ,-31212  ,-30815  ,-30234  ,-29635  ,-29144  ,-28770  ,-28463  ,-28214  ,-28101  ,-28199  ,-28481  ,\n    -28821  ,-29107  ,-29326  ,-29519  ,-29660  ,-29610  ,-29227  ,-28496  ,-27548  ,-26547  ,-25580  ,-24639  ,-23687  ,-22730  ,-21826  ,\n    -21029  ,-20338  ,-19686  ,-18983  ,-18188  ,-17312  ,-16382  ,-15393  ,-14328  ,-13192  ,-12044  ,-10955  ,-9973   ,-9128   ,-8453   ,\n    -7975   ,-7686   ,-7525   ,-7404   ,-7235   ,-6946   ,-6484   ,-5842   ,-5053   ,-4149   ,-3133   ,-1994   ,-766    ,463     ,1600    ,\n    2599    ,3438    ,4072    ,4455    ,4615    ,4693    ,4870    ,5258    ,5872    ,6688    ,7700    ,8894    ,10224   ,11628   ,13061   ,\n    14495   ,15879   ,17125   ,18152   ,18938   ,19490   ,19817   ,19923   ,19863   ,19759   ,19750   ,19917   ,20269   ,20779   ,21431   ,\n    22234   ,23205   ,24345   ,25602   ,26861   ,27993   ,28937   ,29734   ,30451   ,31073   ,31505   ,31691   ,31708   ,31714   ,31794   ,\n    31895   ,31928   ,31881   ,31829   ,31837   ,31902   ,31989   ,32096   ,32242   ,32416   ,32558   ,32593   ,32476   ,32185   ,31705   ,\n    31028   ,30165   ,29141   ,27972   ,26653   ,25170   ,23528   ,21772   ,19982   ,18251   ,16627   ,15092   ,13578   ,12038   ,10483   ,\n    8951    ,7442    ,5913    ,4328    ,2698    ,1049    ,-621    ,-2325   ,-4026   ,-5621   ,-7013   ,-8187   ,-9182   ,-10008  ,-10615  ,\n    -10965  ,-11090  ,-11066  ,-10931  ,-10686  ,-10361  ,-10050  ,-9831   ,-9666   ,-9425   ,-9012   ,-8461   ,-7893   ,-7394   ,-6943   ,\n    -6454   ,-5872   ,-5232   ,-4600   ,-3991   ,-3366   ,-2742   ,-2236   ,-1919   ,-1619   ,-1000   ,64      ,1288    ,2313    ,3220    ,\n    4467    ,6221    ,7998    ,9259    ,10243   ,11721   ,13725   ,14927   ,13828   ,10623   ,7418    ,6327    ,7521    ,9402    ,10497   ,\n    10793   ,11187   ,12132   ,13223   ,13933   ,14287   ,14644   ,15089   ,15331   ,15135   ,14615   ,14059   ,13573   ,13054   ,12422   ,\n    11797   ,11377   ,11229   ,11247   ,11306   ,11423   ,11728   ,12262   ,12854   ,13227   ,13252   ,13056   ,12863   ,12730   ,12480   ,\n    11918   ,11065   ,10157   ,9428    ,8913    ,8474    ,7979    ,7417    ,6869    ,6389    ,5937    ,5402    ,4696    ,3798    ,2745    ,\n    1592    ,386     ,-835    ,-2046   ,-3251   ,-4477   ,-5711   ,-6871   ,-7864   ,-8704   ,-9527   ,-10463  ,-11488  ,-12463  ,-13316  ,\n    -14150  ,-15121  ,-16250  ,-17370  ,-18296  ,-18991  ,-19576  ,-20170  ,-20774  ,-21297  ,-21678  ,-21970  ,-22310  ,-22816  ,-23505  ,\n    -24297  ,-25095  ,-25863  ,-26626  ,-27394  ,-28108  ,-28654  ,-28942  ,-28953  ,-28739  ,-28379  ,-27933  ,-27435  ,-26895  ,-26316  ,\n    -25717  ,-25139  ,-24639  ,-24264  ,-24020  ,-23861  ,-23710  ,-23496  ,-23197  ,-22836  ,-22434  ,-21960  ,-21342  ,-20536  ,-19589  ,\n    -18625  ,-17744  ,-16965  ,-16240  ,-15537  ,-14852  ,-14165  ,-13395  ,-12457  ,-11332  ,-10065  ,-8672   ,-7101   ,-5311   ,-3375   ,\n    -1465   ,281     ,1856    ,3321    ,4684    ,5882    ,6869    ,7691    ,8449    ,9207    ,9973    ,10753   ,11593   ,12552   ,13646   ,\n    14827   ,16023   ,17185   ,18304   ,19408   ,20506   ,21561   ,22492   ,23225   ,23750   ,24142   ,24525   ,24998   ,25579   ,26203   ,\n    26783   ,27298   ,27833   ,28498   ,29309   ,30135   ,30812   ,31284   ,31632   ,31964   ,32290   ,32527   ,32600   ,32505   ,32290   ,\n    31998   ,31649   ,31228   ,30688   ,29962   ,29012   ,27876   ,26646   ,25383   ,24083   ,22728   ,21352   ,20028   ,18791   ,17601   ,\n    16395   ,15158   ,13932   ,12759   ,11638   ,10518   ,9313    ,7932    ,6334    ,4597    ,2882    ,1299    ,-211    ,-1812   ,-3576   ,\n    -5364   ,-6939   ,-8190   ,-9230   ,-10258  ,-11373  ,-12509  ,-13535  ,-14384  ,-15105  ,-15818  ,-16612  ,-17456  ,-18188  ,-18655  ,\n    -18853  ,-18948  ,-19088  ,-19226  ,-19187  ,-18881  ,-18428  ,-18011  ,-17671  ,-17293  ,-16794  ,-16253  ,-15809  ,-15490  ,-15170  ,\n    -14700  ,-14028  ,-13235  ,-12461  ,-11805  ,-11216  ,-10521  ,-9614   ,-8628   ,-7828   ,-7266   ,-6676   ,-5816   ,-4835   ,-4075   ,\n    -3521   ,-2743   ,-1540   ,-371    ,246     ,656     ,1826    ,3887    ,5317    ,4196    ,397     ,-3939   ,-6382   ,-6453   ,-5650   ,\n    -5500   ,-6096   ,-6581   ,-6534   ,-6406   ,-6754   ,-7534   ,-8317   ,-8930   ,-9588   ,-10496  ,-11558  ,-12541  ,-13362  ,-14098  ,\n    -14782  ,-15329  ,-15674  ,-15903  ,-16192  ,-16612  ,-17071  ,-17424  ,-17657  ,-17910  ,-18340  ,-18949  ,-19558  ,-19962  ,-20076  ,\n    -19971  ,-19753  ,-19453  ,-19026  ,-18426  ,-17687  ,-16906  ,-16189  ,-15597  ,-15156  ,-14870  ,-14755  ,-14819  ,-15049  ,-15390  ,\n    -15766  ,-16092  ,-16315  ,-16422  ,-16426  ,-16341  ,-16172  ,-15915  ,-15603  ,-15312  ,-15142  ,-15147  ,-15310  ,-15576  ,-15934  ,\n    -16410  ,-17009  ,-17653  ,-18231  ,-18678  ,-19007  ,-19226  ,-19294  ,-19157  ,-18849  ,-18479  ,-18149  ,-17870  ,-17625  ,-17449  ,\n    -17434  ,-17632  ,-18002  ,-18448  ,-18927  ,-19446  ,-19991  ,-20479  ,-20816  ,-20995  ,-21105  ,-21239  ,-21400  ,-21513  ,-21528  ,\n    -21486  ,-21472  ,-21526  ,-21622  ,-21727  ,-21859  ,-22053  ,-22288  ,-22483  ,-22571  ,-22570  ,-22538  ,-22486  ,-22346  ,-22051  ,\n    -21635  ,-21213  ,-20856  ,-20510  ,-20052  ,-19423  ,-18689  ,-17948  ,-17208  ,-16361  ,-15314  ,-14090  ,-12801  ,-11523  ,-10246  ,\n    -8942   ,-7644   ,-6428   ,-5328   ,-4322   ,-3396   ,-2584   ,-1901   ,-1271   ,-567    ,265     ,1157    ,2022    ,2888    ,3878    ,\n    5060    ,6356    ,7609    ,8750    ,9839    ,10961   ,12092   ,13105   ,13908   ,14536   ,15103   ,15678   ,16254   ,16825   ,17462   ,\n    18247   ,19178   ,20154   ,21104   ,22068   ,23132   ,24289   ,25413   ,26367   ,27110   ,27673   ,28086   ,28365   ,28556   ,28732   ,\n    28928   ,29120   ,29292   ,29489   ,29782   ,30174   ,30594   ,30982   ,31356   ,31758   ,32164   ,32475   ,32607   ,32558   ,32398   ,\n    32198   ,31996   ,31801   ,31615   ,31427   ,31231   ,31030   ,30839   ,30666   ,30488   ,30253   ,29904   ,29399   ,28733   ,27934   ,\n    27041   ,26085   ,25087   ,24082   ,23123   ,22255   ,21478   ,20749   ,20054   ,19440   ,18987   ,18701   ,18476   ,18163   ,17703   ,\n    17156   ,16622   ,16134   ,15640   ,15082   ,14466   ,13862   ,13353   ,13004   ,12847   ,12857   ,12946   ,13000   ,12958   ,12845   ,\n    12707   ,12511   ,12151   ,11539   ,10698   ,9715    ,8636    ,7438    ,6131    ,4843    ,3736    ,2836    ,2034    ,1281    ,712     ,\n    456     ,372     ,153     ,-255    ,-540    ,-516    ,-598    ,-1420   ,-2853   ,-3732   ,-2961   ,-910    ,656     ,230     ,-2008   ,\n    -4576   ,-6312   ,-7331   ,-8435   ,-9987   ,-11640  ,-12985  ,-14074  ,-15228  ,-16576  ,-17971  ,-19288  ,-20576  ,-21934  ,-23331  ,\n    -24628  ,-25721  ,-26599  ,-27305  ,-27899  ,-28439  ,-28948  ,-29378  ,-29661  ,-29816  ,-29990  ,-30352  ,-30930  ,-31569  ,-32045  ,\n    -32243  ,-32205  ,-32043  ,-31792  ,-31371  ,-30669  ,-29668  ,-28458  ,-27153  ,-25821  ,-24509  ,-23317  ,-22377  ,-21747  ,-21340  ,\n    -20993  ,-20613  ,-20221  ,-19854  ,-19459  ,-18916  ,-18165  ,-17283  ,-16400  ,-15589  ,-14826  ,-14067  ,-13333  ,-12708  ,-12272  ,\n    -12056  ,-12036  ,-12144  ,-12299  ,-12436  ,-12514  ,-12497  ,-12334  ,-11981  ,-11461  ,-10872  ,-10303  ,-9751   ,-9154   ,-8522   ,\n    -7987   ,-7695   ,-7646   ,-7691   ,-7697   ,-7666   ,-7675   ,-7719   ,-7682   ,-7476   ,-7159   ,-6871   ,-6679   ,-6529   ,-6361   ,\n    -6215   ,-6195   ,-6344   ,-6600   ,-6890   ,-7221   ,-7643   ,-8147   ,-8636   ,-8991   ,-9168   ,-9198   ,-9125   ,-8965   ,-8725   ,\n    -8456   ,-8248   ,-8171   ,-8200   ,-8225   ,-8130   ,-7892   ,-7573   ,-7219   ,-6769   ,-6091   ,-5110   ,-3886   ,-2562   ,-1247   ,\n    28      ,1264    ,2453    ,3582    ,4652    ,5648    ,6503    ,7144    ,7588    ,7960    ,8400    ,8942    ,9504    ,9991    ,10389   ,\n    10755   ,11133   ,11509   ,11830   ,12043   ,12112   ,12026   ,11810   ,11515   ,11173   ,10767   ,10268   ,9704    ,9169    ,8732    ,\n    8352    ,7909    ,7329    ,6677    ,6083    ,5620    ,5242    ,4867    ,4472    ,4102    ,3800    ,3572    ,3412    ,3344    ,3401    ,\n    3566    ,3751    ,3858    ,3861    ,3821    ,3818    ,3859    ,3880    ,3819    ,3696    ,3606    ,3642    ,3817    ,4079    ,4374    ,\n    4702    ,5099    ,5591    ,6162    ,6775    ,7410    ,8063    ,8712    ,9292    ,9726    ,10007   ,10232   ,10545   ,11024   ,11628   ,\n    12264   ,12900   ,13594   ,14411   ,15336   ,16279   ,17170   ,18027   ,18929   ,19927   ,20998   ,22062   ,23032   ,23863   ,24585   ,\n    25293   ,26091   ,27002   ,27935   ,28753   ,29389   ,29874   ,30269   ,30607   ,30904   ,31204   ,31555   ,31924   ,32197   ,32295   ,\n    32293   ,32346   ,32488   ,32537   ,32272   ,31677   ,30944   ,30182   ,29243   ,27917   ,26272   ,24625   ,23144   ,21636   ,19903   ,\n    18165   ,16840   ,15909   ,14849   ,13390   ,12024   ,11305   ,10778   ,9277    ,6659    ,4744    ,5751    ,9703    ,13974   ,15774   ,\n    14808   ,13119   ,12568   ,13057   ,13262   ,12453   ,11065   ,9738    ,8445    ,6738    ,4477    ,1980    ,-430    ,-2718   ,-4952   ,\n    -7055   ,-8836   ,-10191  ,-11173  ,-11922  ,-12599  ,-13365  ,-14303  ,-15356  ,-16406  ,-17452  ,-18663  ,-20213  ,-22042  ,-23848  ,\n    -25312  ,-26311  ,-26907  ,-27180  ,-27115  ,-26665  ,-25857  ,-24793  ,-23570  ,-22256  ,-20946  ,-19805  ,-19012  ,-18634  ,-18601  ,\n    -18774  ,-19038  ,-19332  ,-19613  ,-19858  ,-20061  ,-20238  ,-20391  ,-20503  ,-20557  ,-20587  ,-20668  ,-20888  ,-21300  ,-21922  ,\n    -22744  ,-23741  ,-24852  ,-25950  ,-26873  ,-27514  ,-27892  ,-28101  ,-28181  ,-28053  ,-27619  ,-26917  ,-26132  ,-25431  ,-24824  ,\n    -24208  ,-23535  ,-22878  ,-22313  ,-21796  ,-21181  ,-20350  ,-19281  ,-18006  ,-16550  ,-14918  ,-13143  ,-11280  ,-9396   ,-7579   ,\n    -5948   ,-4602   ,-3541   ,-2650   ,-1820   ,-1063   ,-494    ,-179    ,-10     ,245     ,775     ,1592    ,2553    ,3495    ,4364    ,\n    5217    ,6123    ,7069    ,7969    ,8751    ,9422    ,10026   ,10563   ,11014   ,11437   ,12006   ,12891   ,14109   ,15520   ,16992   ,\n    18517   ,20169   ,21946   ,23730   ,25387   ,26859   ,28139   ,29193   ,29946   ,30361   ,30484   ,30405   ,30173   ,29780   ,29220   ,\n    28548   ,27864   ,27243   ,26657   ,25975   ,25060   ,23883   ,22543   ,21152   ,19705   ,18070   ,16123   ,13891   ,11528   ,9187    ,\n    6902    ,4619    ,2312    ,47      ,-2050   ,-3870   ,-5383   ,-6626   ,-7662   ,-8533   ,-9243   ,-9787   ,-10207  ,-10598  ,-11043  ,\n    -11540  ,-11997  ,-12337  ,-12574  ,-12790  ,-13032  ,-13246  ,-13329  ,-13239  ,-13046  ,-12875  ,-12802  ,-12803  ,-12805  ,-12777  ,\n    -12788  ,-12954  ,-13328  ,-13834  ,-14319  ,-14668  ,-14859  ,-14913  ,-14844  ,-14642  ,-14329  ,-13966  ,-13583  ,-13128  ,-12525  ,\n    -11785  ,-11024  ,-10347  ,-9717   ,-8965   ,-7938   ,-6625   ,-5127   ,-3522   ,-1779   ,217     ,2544    ,5170    ,7950    ,10705   ,\n    13304   ,15707   ,17914   ,19888   ,21521   ,22719   ,23518   ,24088   ,24618   ,25195   ,25805   ,26446   ,27187   ,28095   ,29129   ,\n    30151   ,31025   ,31705   ,32209   ,32524   ,32542   ,32123   ,31221   ,29981   ,28645   ,27327   ,25916   ,24306   ,22706   ,21557   ,\n    21032   ,20762   ,20290   ,19746   ,19704   ,20234   ,20488   ,19697   ,18401   ,17993   ,18692   ,18549   ,15225   ,8849    ,2424    ,\n    -954    ,-989    ,27      ,-34     ,-1255   ,-2486   ,-3243   ,-4186   ,-5981   ,-8415   ,-10818  ,-12938  ,-15032  ,-17243  ,-19301  ,\n    -20866  ,-21929  ,-22705  ,-23288  ,-23577  ,-23524  ,-23302  ,-23173  ,-23271  ,-23585  ,-24088  ,-24821  ,-25831  ,-27079  ,-28436  ,\n    -29762  ,-30950  ,-31912  ,-32538  ,-32731  ,-32479  ,-31868  ,-31004  ,-29931  ,-28648  ,-27227  ,-25863  ,-24778  ,-24073  ,-23690  ,\n    -23515  ,-23488  ,-23611  ,-23877  ,-24238  ,-24616  ,-24924  ,-25072  ,-24987  ,-24660  ,-24158  ,-23569  ,-22955  ,-22356  ,-21824  ,\n    -21425  ,-21200  ,-21151  ,-21272  ,-21564  ,-22008  ,-22529  ,-23030  ,-23461  ,-23824  ,-24119  ,-24294  ,-24283  ,-24087  ,-23795  ,\n    -23531  ,-23370  ,-23305  ,-23289  ,-23297  ,-23359  ,-23531  ,-23810  ,-24102  ,-24274  ,-24261  ,-24105  ,-23877  ,-23591  ,-23219  ,\n    -22775  ,-22340  ,-21985  ,-21702  ,-21456  ,-21283  ,-21281  ,-21486  ,-21788  ,-22015  ,-22083  ,-22021  ,-21850  ,-21499  ,-20870  ,\n    -19956  ,-18862  ,-17691  ,-16494  ,-15311  ,-14238  ,-13373  ,-12726  ,-12224  ,-11825  ,-11573  ,-11497  ,-11484  ,-11299  ,-10766  ,\n    -9873   ,-8709   ,-7309   ,-5613   ,-3584   ,-1302   ,1059    ,3347    ,5481    ,7412    ,9095    ,10499   ,11636   ,12546   ,13262   ,\n    13819   ,14304   ,14850   ,15548   ,16388   ,17279   ,18164   ,19054   ,19983   ,20913   ,21740   ,22375   ,22797   ,23018   ,23035   ,\n    22849   ,22514   ,22133   ,21788   ,21485   ,21202   ,20954   ,20788   ,20716   ,20680   ,20617   ,20528   ,20465   ,20437   ,20387   ,\n    20256   ,20074   ,19938   ,19920   ,19992   ,20088   ,20201   ,20405   ,20751   ,21169   ,21492   ,21599   ,21503   ,21292   ,21001   ,\n    20570   ,19946   ,19194   ,18457   ,17846   ,17379   ,17055   ,16916   ,17033   ,17398   ,17906   ,18421   ,18865   ,19226   ,19503   ,\n    19666   ,19675   ,19513   ,19217   ,18875   ,18606   ,18501   ,18596   ,18877   ,19343   ,20018   ,20913   ,21984   ,23148   ,24321   ,\n    25431   ,26392   ,27120   ,27592   ,27858   ,27983   ,27970   ,27801   ,27516   ,27249   ,27146   ,27271   ,27590   ,28015   ,28453   ,\n    28829   ,29099   ,29258   ,29291   ,29131   ,28687   ,27930   ,26943   ,25847   ,24711   ,23544   ,22368   ,21258   ,20285   ,19444   ,\n    18673   ,17922   ,17176   ,16388   ,15465   ,14323   ,12983   ,11532   ,10026   ,8438    ,6760    ,5124    ,3760    ,2819    ,2234    ,\n    1784    ,1297    ,778     ,329     ,-7      ,-323    ,-766    ,-1424   ,-2299   ,-3365   ,-4618   ,-6063   ,-7668   ,-9352   ,-11019  ,\n    -12601  ,-14072  ,-15426  ,-16639  ,-17661  ,-18439  ,-18994  ,-19436  ,-19916  ,-20504  ,-21143  ,-21731  ,-22252  ,-22806  ,-23498  ,\n    -24301  ,-25055  ,-25609  ,-25934  ,-26105  ,-26176  ,-26112  ,-25838  ,-25342  ,-24708  ,-24064  ,-23497  ,-23037  ,-22702  ,-22527  ,\n    -22555  ,-22782  ,-23143  ,-23550  ,-23944  ,-24318  ,-24696  ,-25089  ,-25483  ,-25849  ,-26155  ,-26374  ,-26508  ,-26612  ,-26790  ,\n    -27146  ,-27708  ,-28402  ,-29099  ,-29706  ,-30221  ,-30708  ,-31222  ,-31749  ,-32208  ,-32505  ,-32599  ,-32513  ,-32298  ,-31998  ,\n    -31632  ,-31230  ,-30832  ,-30460  ,-30096  ,-29701  ,-29283  ,-28910  ,-28640  ,-28442  ,-28211  ,-27861  ,-27408  ,-26930  ,-26481  ,\n    -26051  ,-25608  ,-25148  ,-24691  ,-24261  ,-23885  ,-23598  ,-23408  ,-23263  ,-23077  ,-22796  ,-22431  ,-22017  ,-21547  ,-20975  ,\n    -20277  ,-19474  ,-18595  ,-17648  ,-16644  ,-15618  ,-14602  ,-13583  ,-12532  ,-11486  ,-10551  ,-9774   ,-9040   ,-8143   ,-6988   ,\n    -5671   ,-4347   ,-3053   ,-1706   ,-247    ,1275    ,2777    ,4242    ,5695    ,7105    ,8370    ,9426    ,10321   ,11153   ,11957   ,\n    12700   ,13374   ,14048   ,14798   ,15617   ,16421   ,17164   ,17888   ,18666   ,19479   ,20208   ,20716   ,20961   ,21001   ,20913   ,\n    20735   ,20486   ,20207   ,19953   ,19743   ,19561   ,19407   ,19359   ,19514   ,19897   ,20411   ,20912   ,21316   ,21639   ,21947   ,\n    22273   ,22586   ,22830   ,22993   ,23131   ,23318   ,23563   ,23812   ,24030   ,24279   ,24655   ,25159   ,25659   ,26010   ,26181   ,\n    26228   ,26177   ,25987   ,25640   ,25202   ,24739   ,24223   ,23583   ,22848   ,22179   ,21725   ,21464   ,21251   ,20994   ,20751   ,\n    20643   ,20706   ,20865   ,21020   ,21131   ,21224   ,21343   ,21514   ,21740   ,22016   ,22351   ,22765   ,23267   ,23839   ,24441   ,\n    25039   ,25619   ,26171   ,26665   ,27060   ,27328   ,27477   ,27538   ,27549   ,27535   ,27494   ,27413   ,27285   ,27133   ,26976   ,\n    26796   ,26539   ,26161   ,25664   ,25050   ,24274   ,23270   ,22040   ,20712   ,19442   ,18284   ,17157   ,15992   ,14843   ,13847   ,\n    13055   ,12394   ,11794   ,11296   ,10949   ,10631   ,10106   ,9318    ,8497    ,7853    ,7208    ,6167    ,4750    ,3672    ,3739    ,\n    4926    ,6245    ,6652    ,6000    ,4998    ,4313    ,3912    ,3279    ,2071    ,386     ,-1512   ,-3523   ,-5685   ,-7955   ,-10136  ,\n    -12033  ,-13585  ,-14841  ,-15855  ,-16643  ,-17226  ,-17661  ,-18036  ,-18433  ,-18896  ,-19454  ,-20136  ,-20992  ,-22054  ,-23292  ,\n    -24603  ,-25856  ,-26963  ,-27899  ,-28654  ,-29188  ,-29447  ,-29431  ,-29220  ,-28934  ,-28655  ,-28409  ,-28221  ,-28156  ,-28298  ,\n    -28680  ,-29256  ,-29931  ,-30618  ,-31258  ,-31806  ,-32219  ,-32470  ,-32550  ,-32462  ,-32213  ,-31810  ,-31269  ,-30620  ,-29917  ,\n    -29242  ,-28695  ,-28335  ,-28145  ,-28034  ,-27906  ,-27701  ,-27395  ,-26958  ,-26357  ,-25568  ,-24585  ,-23402  ,-22005  ,-20410  ,\n    -18693  ,-16977  ,-15358  ,-13876  ,-12539  ,-11388  ,-10507  ,-9960   ,-9710   ,-9613   ,-9495   ,-9260   ,-8933   ,-8587   ,-8220   ,\n    -7705   ,-6886   ,-5729   ,-4371   ,-3014   ,-1783   ,-693    ,258     ,1020    ,1525    ,1765    ,1806    ,1717    ,1525    ,1265    ,\n    1024    ,926     ,1039    ,1339    ,1760    ,2266    ,2864    ,3556    ,4291    ,4963    ,5445    ,5646    ,5559    ,5278    ,4936    ,\n    4607    ,4286    ,3948    ,3639    ,3472    ,3545    ,3868    ,4374    ,4979    ,5628    ,6284    ,6898    ,7399    ,7709    ,7783    ,\n    7639    ,7342    ,6962    ,6534    ,6091    ,5695    ,5425    ,5317    ,5337    ,5446    ,5655    ,5989    ,6396    ,6739    ,6895    ,\n    6854    ,6691    ,6452    ,6095    ,5570    ,4919    ,4277    ,3784    ,3494    ,3382    ,3401    ,3536    ,3788    ,4137    ,4513    ,\n    4831    ,5040    ,5142    ,5161    ,5112    ,5001    ,4856    ,4724    ,4632    ,4577    ,4568    ,4658    ,4914    ,5334    ,5836    ,\n    6313    ,6701    ,6978    ,7137    ,7187    ,7179    ,7177    ,7177    ,7099    ,6888    ,6613    ,6432    ,6447    ,6622    ,6872    ,\n    7196    ,7693    ,8428    ,9330    ,10255   ,11133   ,12017   ,13000   ,14097   ,15239   ,16358   ,17437   ,18462   ,19394   ,20190   ,\n    20878   ,21531   ,22181   ,22766   ,23214   ,23548   ,23889   ,24342   ,24915   ,25551   ,26220   ,26945   ,27748   ,28590   ,29386   ,\n    30036   ,30463   ,30633   ,30560   ,30283   ,29812   ,29121   ,28213   ,27169   ,26101   ,25090   ,24194   ,23502   ,23084   ,22869   ,\n    22678   ,22426   ,22206   ,22083   ,21862   ,21278   ,20387   ,19510   ,18656   ,17320   ,15182   ,12905   ,11621   ,11361   ,10425   ,\n    6951    ,1173    ,-4384   ,-7246   ,-7286   ,-6448   ,-6470   ,-7373   ,-8151   ,-8342   ,-8448   ,-9051   ,-10074  ,-11050  ,-11786  ,\n    -12472  ,-13264  ,-14046  ,-14633  ,-15023  ,-15346  ,-15648  ,-15856  ,-15920  ,-15907  ,-15939  ,-16083  ,-16339  ,-16681  ,-17107  ,\n    -17626  ,-18252  ,-18971  ,-19735  ,-20459  ,-21063  ,-21511  ,-21818  ,-22021  ,-22156  ,-22246  ,-22297  ,-22314  ,-22338  ,-22466  ,\n    -22802  ,-23366  ,-24059  ,-24756  ,-25436  ,-26177  ,-27017  ,-27854  ,-28519  ,-28949  ,-29224  ,-29444  ,-29610  ,-29663  ,-29596  ,\n    -29487  ,-29411  ,-29384  ,-29399  ,-29486  ,-29672  ,-29917  ,-30120  ,-30222  ,-30243  ,-30206  ,-30051  ,-29686  ,-29104  ,-28421  ,\n    -27760  ,-27136  ,-26494  ,-25838  ,-25266  ,-24859  ,-24572  ,-24281  ,-23933  ,-23586  ,-23298  ,-23013  ,-22604  ,-22026  ,-21368  ,\n    -20736  ,-20124  ,-19447  ,-18678  ,-17925  ,-17322  ,-16899  ,-16596  ,-16362  ,-16215  ,-16165  ,-16151  ,-16075  ,-15903  ,-15674  ,\n    -15406  ,-15048  ,-14530  ,-13867  ,-13161  ,-12519  ,-11978  ,-11522  ,-11126  ,-10774  ,-10462  ,-10195  ,-9980   ,-9790   ,-9544   ,\n    -9143   ,-8539   ,-7752   ,-6830   ,-5826   ,-4814   ,-3880   ,-3060   ,-2294   ,-1510   ,-742    ,-137    ,195     ,303     ,347     ,\n    453     ,657     ,962     ,1397    ,1985    ,2707    ,3526    ,4441    ,5473    ,6596    ,7715    ,8728    ,9577    ,10253   ,10779   ,\n    11216   ,11646   ,12107   ,12559   ,12963   ,13373   ,13919   ,14664   ,15531   ,16391   ,17211   ,18045   ,18917   ,19753   ,20468   ,\n    21053   ,21545   ,21939   ,22205   ,22383   ,22602   ,22970   ,23478   ,24043   ,24633   ,25298   ,26070   ,26893   ,27668   ,28343   ,\n    28920   ,29389   ,29690   ,29780   ,29703   ,29560   ,29430   ,29317   ,29185   ,29035   ,28930   ,28959   ,29171   ,29538   ,29969   ,\n    30367   ,30695   ,30978   ,31252   ,31513   ,31725   ,31879   ,32007   ,32141   ,32254   ,32290   ,32246   ,32208   ,32265   ,32403   ,\n    32501   ,32450   ,32257   ,32007   ,31746   ,31423   ,30962   ,30366   ,29713   ,29061   ,28393   ,27666   ,26897   ,26177   ,25581   ,\n    25088   ,24589   ,23989   ,23282   ,22530   ,21769   ,20945   ,19959   ,18763   ,17409   ,15995   ,14600   ,13261   ,12010   ,10857   ,\n    9762    ,8678    ,7645    ,6789    ,6156    ,5595    ,4911    ,4126    ,3437    ,2855    ,2071    ,868     ,-419    ,-1198   ,-1510   ,\n    -2345   ,-4705   ,-8330   ,-11676  ,-13335  ,-13344  ,-12932  ,-13143  ,-13984  ,-14871  ,-15538  ,-16246  ,-17255  ,-18457  ,-19570  ,\n    -20527  ,-21464  ,-22444  ,-23316  ,-23898  ,-24164  ,-24236  ,-24219  ,-24134  ,-23968  ,-23745  ,-23526  ,-23345  ,-23179  ,-22999  ,\n    -22839  ,-22808  ,-22981  ,-23285  ,-23526  ,-23544  ,-23348  ,-23053  ,-22714  ,-22256  ,-21589  ,-20741  ,-19834  ,-18953  ,-18065  ,\n    -17124  ,-16186  ,-15402  ,-14869  ,-14535  ,-14242  ,-13891  ,-13520  ,-13234  ,-13061  ,-12886  ,-12538  ,-11940  ,-11162  ,-10334  ,\n    -9505   ,-8609   ,-7584   ,-6494   ,-5510   ,-4772   ,-4279   ,-3930   ,-3658   ,-3493   ,-3503   ,-3675   ,-3890   ,-4004   ,-3934   ,\n    -3677   ,-3264   ,-2722   ,-2078   ,-1371   ,-642    ,86      ,797     ,1458    ,2005    ,2373    ,2531    ,2501    ,2338    ,2098    ,\n    1813    ,1497    ,1155    ,795     ,411     ,-12     ,-491    ,-1024   ,-1614   ,-2296   ,-3124   ,-4107   ,-5152   ,-6137   ,-7032   ,\n    -7932   ,-8935   ,-10001  ,-10970  ,-11742  ,-12397  ,-13103  ,-13931  ,-14792  ,-15551  ,-16183  ,-16762  ,-17358  ,-17956  ,-18466  ,\n    -18805  ,-18923  ,-18798  ,-18435  ,-17869  ,-17163  ,-16382  ,-15589  ,-14824  ,-14119  ,-13500  ,-13009  ,-12699  ,-12592  ,-12644  ,\n    -12753  ,-12830  ,-12836  ,-12753  ,-12517  ,-12039  ,-11277  ,-10297  ,-9214   ,-8089   ,-6905   ,-5642   ,-4364   ,-3211   ,-2287   ,\n    -1591   ,-1048   ,-597    ,-221    ,105     ,465     ,956     ,1594    ,2300    ,3009    ,3762    ,4668    ,5744    ,6862    ,7867    ,\n    8739    ,9586    ,10476   ,11331   ,12042   ,12641   ,13300   ,14146   ,15126   ,16116   ,17106   ,18219   ,19526   ,20911   ,22178   ,\n    23241   ,24168   ,25024   ,25751   ,26234   ,26455   ,26521   ,26556   ,26605   ,26660   ,26734   ,26870   ,27091   ,27373   ,27669   ,\n    27937   ,28163   ,28371   ,28625   ,28967   ,29352   ,29666   ,29843   ,29957   ,30151   ,30479   ,30859   ,31191   ,31480   ,31799   ,\n    32154   ,32444   ,32577   ,32573   ,32523   ,32458   ,32314   ,32035   ,31644   ,31210   ,30748   ,30218   ,29595   ,28915   ,28202   ,\n    27410   ,26455   ,25305   ,24001   ,22584   ,21045   ,19381   ,17658   ,15950   ,14247   ,12477   ,10667   ,8992    ,7600    ,6415    ,\n    5238    ,4034    ,2973    ,2130    ,1291    ,206     ,-1018   ,-2111   ,-3097   ,-4346   ,-6007   ,-7383   ,-8099   ,-8455   ,-9624   ,\n    -11810  ,-12696  ,-11159  ,-5862   ,\n    // sounds/wavetables/PPG_WA00.WAV\n    768     ,768     ,2304    ,2304    ,4096    ,4096    ,5376    ,5376    ,6912    ,6912    ,7936    ,7936    ,9216    ,9216    ,10752   ,\n    10752   ,11776   ,11776   ,13312   ,13312   ,14848   ,14848   ,16128   ,16128   ,17407   ,17407   ,18687   ,18687   ,19711   ,19711   ,\n    20991   ,20991   ,22015   ,22015   ,23039   ,23039   ,23551   ,23551   ,24319   ,24319   ,25087   ,25087   ,26111   ,26111   ,26623   ,\n    26623   ,27391   ,27391   ,27647   ,27647   ,28415   ,28415   ,28671   ,28671   ,29183   ,29183   ,29439   ,29439   ,29695   ,29695   ,\n    29951   ,29951   ,29951   ,29951   ,29951   ,29951   ,29951   ,29951   ,29695   ,29695   ,29439   ,29439   ,29183   ,29183   ,28671   ,\n    28671   ,28415   ,28415   ,27647   ,27647   ,27391   ,27391   ,26623   ,26623   ,26111   ,26111   ,25087   ,25087   ,24319   ,24319   ,\n    23551   ,23551   ,23039   ,23039   ,22015   ,22015   ,20991   ,20991   ,19711   ,19711   ,18687   ,18687   ,17407   ,17407   ,16128   ,\n    16128   ,14848   ,14848   ,13312   ,13312   ,11776   ,11776   ,10752   ,10752   ,9216    ,9216    ,7936    ,7936    ,6912    ,6912    ,\n    5376    ,5376    ,4096    ,4096    ,2304    ,2304    ,768     ,768     ,-1024   ,-1024   ,-2560   ,-2560   ,-4352   ,-4352   ,-5632   ,\n    -5632   ,-7168   ,-7168   ,-8192   ,-8192   ,-9472   ,-9472   ,-11008  ,-11008  ,-12032  ,-12032  ,-13568  ,-13568  ,-15104  ,-15104  ,\n    -16384  ,-16384  ,-17663  ,-17663  ,-18943  ,-18943  ,-19967  ,-19967  ,-21247  ,-21247  ,-22271  ,-22271  ,-23295  ,-23295  ,-23807  ,\n    -23807  ,-24575  ,-24575  ,-25343  ,-25343  ,-26367  ,-26367  ,-26879  ,-26879  ,-27647  ,-27647  ,-27903  ,-27903  ,-28671  ,-28671  ,\n    -28927  ,-28927  ,-29439  ,-29439  ,-29695  ,-29695  ,-29951  ,-29951  ,-30207  ,-30207  ,-30207  ,-30207  ,-30207  ,-30207  ,-30207  ,\n    -30207  ,-29951  ,-29951  ,-29695  ,-29695  ,-29439  ,-29439  ,-28927  ,-28927  ,-28671  ,-28671  ,-27903  ,-27903  ,-27647  ,-27647  ,\n    -26879  ,-26879  ,-26367  ,-26367  ,-25343  ,-25343  ,-24575  ,-24575  ,-23807  ,-23807  ,-23295  ,-23295  ,-22271  ,-22271  ,-21247  ,\n    -21247  ,-19967  ,-19967  ,-18943  ,-18943  ,-17663  ,-17663  ,-16384  ,-16384  ,-15104  ,-15104  ,-13568  ,-13568  ,-12032  ,-12032  ,\n    -11008  ,-11008  ,-9472   ,-9472   ,-8192   ,-8192   ,-7168   ,-7168   ,-5632   ,-5632   ,-4352   ,-4352   ,-2560   ,-2560   ,-1024   ,\n    -1024   ,512     ,512     ,2304    ,2304    ,4096    ,4096    ,5376    ,5376    ,6912    ,6912    ,8192    ,8192    ,9472    ,9472    ,\n    11008   ,11008   ,12032   ,12032   ,13568   ,13568   ,15104   ,15104   ,16384   ,16384   ,17663   ,17663   ,18943   ,18943   ,19967   ,\n    19967   ,21247   ,21247   ,22015   ,22015   ,23039   ,23039   ,23551   ,23551   ,24063   ,24063   ,24831   ,24831   ,25599   ,25599   ,\n    25855   ,25855   ,26623   ,26623   ,26623   ,26623   ,27135   ,27135   ,27391   ,27391   ,27647   ,27647   ,27647   ,27647   ,27647   ,\n    27647   ,27903   ,27903   ,27647   ,27647   ,27391   ,27391   ,27135   ,27135   ,26879   ,26879   ,26367   ,26367   ,26111   ,26111   ,\n    25343   ,25343   ,25087   ,25087   ,24063   ,24063   ,23807   ,23807   ,23039   ,23039   ,22271   ,22271   ,21247   ,21247   ,20479   ,\n    20479   ,19711   ,19711   ,19199   ,19199   ,18175   ,18175   ,17407   ,17407   ,16128   ,16128   ,15360   ,15360   ,14080   ,14080   ,\n    13056   ,13056   ,12032   ,12032   ,10752   ,10752   ,9216    ,9216    ,8448    ,8448    ,7168    ,7168    ,6144    ,6144    ,5376    ,\n    5376    ,4096    ,4096    ,3072    ,3072    ,1536    ,1536    ,512     ,512     ,-768    ,-768    ,-1792   ,-1792   ,-3328   ,-3328   ,\n    -4352   ,-4352   ,-5632   ,-5632   ,-6400   ,-6400   ,-7424   ,-7424   ,-8704   ,-8704   ,-9472   ,-9472   ,-11008  ,-11008  ,-12288  ,\n    -12288  ,-13312  ,-13312  ,-14336  ,-14336  ,-15616  ,-15616  ,-16384  ,-16384  ,-17663  ,-17663  ,-18431  ,-18431  ,-19455  ,-19455  ,\n    -19967  ,-19967  ,-20735  ,-20735  ,-21503  ,-21503  ,-22527  ,-22527  ,-23295  ,-23295  ,-24063  ,-24063  ,-24319  ,-24319  ,-25343  ,\n    -25343  ,-25599  ,-25599  ,-26367  ,-26367  ,-26623  ,-26623  ,-27135  ,-27135  ,-27391  ,-27391  ,-27647  ,-27647  ,-27903  ,-27903  ,\n    -28159  ,-28159  ,-27903  ,-27903  ,-27903  ,-27903  ,-27903  ,-27903  ,-27647  ,-27647  ,-27391  ,-27391  ,-26879  ,-26879  ,-26879  ,\n    -26879  ,-26111  ,-26111  ,-25855  ,-25855  ,-25087  ,-25087  ,-24319  ,-24319  ,-23807  ,-23807  ,-23295  ,-23295  ,-22271  ,-22271  ,\n    -21503  ,-21503  ,-20223  ,-20223  ,-19199  ,-19199  ,-17919  ,-17919  ,-16639  ,-16639  ,-15360  ,-15360  ,-13824  ,-13824  ,-12288  ,\n    -12288  ,-11264  ,-11264  ,-9728   ,-9728   ,-8448   ,-8448   ,-7168   ,-7168   ,-5632   ,-5632   ,-4352   ,-4352   ,-2560   ,-2560   ,\n    -768    ,-768    ,512     ,512     ,2304    ,2304    ,4352    ,4352    ,5632    ,5632    ,7168    ,7168    ,8448    ,8448    ,9728    ,\n    9728    ,11520   ,11520   ,12544   ,12544   ,14080   ,14080   ,15616   ,15616   ,16895   ,16895   ,18175   ,18175   ,19199   ,19199   ,\n    20223   ,20223   ,21503   ,21503   ,22271   ,22271   ,23039   ,23039   ,23551   ,23551   ,24063   ,24063   ,24575   ,24575   ,25087   ,\n    25087   ,25343   ,25343   ,25855   ,25855   ,25855   ,25855   ,26111   ,26111   ,26111   ,26111   ,26111   ,26111   ,26111   ,26111   ,\n    25855   ,25855   ,25855   ,25855   ,25343   ,25343   ,25087   ,25087   ,24575   ,24575   ,24063   ,24063   ,23551   ,23551   ,23039   ,\n    23039   ,22271   ,22271   ,21759   ,21759   ,20735   ,20735   ,20223   ,20223   ,19455   ,19455   ,18687   ,18687   ,17663   ,17663   ,\n    16895   ,16895   ,16128   ,16128   ,15616   ,15616   ,14592   ,14592   ,13824   ,13824   ,12800   ,12800   ,12032   ,12032   ,11008   ,\n    11008   ,9984    ,9984    ,9216    ,9216    ,8192    ,8192    ,6912    ,6912    ,6400    ,6400    ,5376    ,5376    ,4608    ,4608    ,\n    4096    ,4096    ,3072    ,3072    ,2304    ,2304    ,1024    ,1024    ,256     ,256     ,-512    ,-512    ,-1280   ,-1280   ,-2560   ,\n    -2560   ,-3328   ,-3328   ,-4352   ,-4352   ,-4864   ,-4864   ,-5632   ,-5632   ,-6656   ,-6656   ,-7168   ,-7168   ,-8448   ,-8448   ,\n    -9472   ,-9472   ,-10240  ,-10240  ,-11264  ,-11264  ,-12288  ,-12288  ,-13056  ,-13056  ,-14080  ,-14080  ,-14848  ,-14848  ,-15872  ,\n    -15872  ,-16384  ,-16384  ,-17151  ,-17151  ,-17919  ,-17919  ,-18943  ,-18943  ,-19711  ,-19711  ,-20479  ,-20479  ,-20991  ,-20991  ,\n    -22015  ,-22015  ,-22527  ,-22527  ,-23295  ,-23295  ,-23807  ,-23807  ,-24319  ,-24319  ,-24831  ,-24831  ,-25343  ,-25343  ,-25599  ,\n    -25599  ,-26111  ,-26111  ,-26111  ,-26111  ,-26367  ,-26367  ,-26367  ,-26367  ,-26367  ,-26367  ,-26367  ,-26367  ,-26111  ,-26111  ,\n    -26111  ,-26111  ,-25599  ,-25599  ,-25343  ,-25343  ,-24831  ,-24831  ,-24319  ,-24319  ,-23807  ,-23807  ,-23295  ,-23295  ,-22527  ,\n    -22527  ,-21759  ,-21759  ,-20479  ,-20479  ,-19455  ,-19455  ,-18431  ,-18431  ,-17151  ,-17151  ,-15872  ,-15872  ,-14336  ,-14336  ,\n    -12800  ,-12800  ,-11776  ,-11776  ,-9984   ,-9984   ,-8704   ,-8704   ,-7424   ,-7424   ,-5888   ,-5888   ,-4608   ,-4608   ,-2560   ,\n    -2560   ,-768    ,-768    ,512     ,512     ,2304    ,2304    ,4352    ,4352    ,5632    ,5632    ,7424    ,7424    ,8704    ,8704    ,\n    9984    ,9984    ,11776   ,11776   ,13056   ,13056   ,14592   ,14592   ,15872   ,15872   ,17151   ,17151   ,18431   ,18431   ,19455   ,\n    19455   ,20479   ,20479   ,21759   ,21759   ,22271   ,22271   ,23039   ,23039   ,23551   ,23551   ,23807   ,23807   ,24319   ,24319   ,\n    24575   ,24575   ,24831   ,24831   ,25087   ,25087   ,25087   ,25087   ,25087   ,25087   ,24831   ,24831   ,24575   ,24575   ,24319   ,\n    24319   ,24063   ,24063   ,23807   ,23807   ,23039   ,23039   ,22527   ,22527   ,22015   ,22015   ,21247   ,21247   ,20735   ,20735   ,\n    19967   ,19967   ,18943   ,18943   ,18431   ,18431   ,17407   ,17407   ,16639   ,16639   ,15872   ,15872   ,15104   ,15104   ,14080   ,\n    14080   ,13312   ,13312   ,12544   ,12544   ,11776   ,11776   ,11008   ,11008   ,10240   ,10240   ,9216    ,9216    ,8704    ,8704    ,\n    7680    ,7680    ,6912    ,6912    ,6400    ,6400    ,5632    ,5632    ,4608    ,4608    ,4096    ,4096    ,3328    ,3328    ,2816    ,\n    2816    ,2560    ,2560    ,2048    ,2048    ,1536    ,1536    ,512     ,512     ,0       ,0       ,-256    ,-256    ,-768    ,-768    ,\n    -1792   ,-1792   ,-2304   ,-2304   ,-2816   ,-2816   ,-3072   ,-3072   ,-3584   ,-3584   ,-4352   ,-4352   ,-4864   ,-4864   ,-5888   ,\n    -5888   ,-6656   ,-6656   ,-7168   ,-7168   ,-7936   ,-7936   ,-8960   ,-8960   ,-9472   ,-9472   ,-10496  ,-10496  ,-11264  ,-11264  ,\n    -12032  ,-12032  ,-12800  ,-12800  ,-13568  ,-13568  ,-14336  ,-14336  ,-15360  ,-15360  ,-16128  ,-16128  ,-16895  ,-16895  ,-17663  ,\n    -17663  ,-18687  ,-18687  ,-19199  ,-19199  ,-20223  ,-20223  ,-20991  ,-20991  ,-21503  ,-21503  ,-22271  ,-22271  ,-22783  ,-22783  ,\n    -23295  ,-23295  ,-24063  ,-24063  ,-24319  ,-24319  ,-24575  ,-24575  ,-24831  ,-24831  ,-25087  ,-25087  ,-25343  ,-25343  ,-25343  ,\n    -25343  ,-25343  ,-25343  ,-25087  ,-25087  ,-24831  ,-24831  ,-24575  ,-24575  ,-24063  ,-24063  ,-23807  ,-23807  ,-23295  ,-23295  ,\n    -22527  ,-22527  ,-22015  ,-22015  ,-20735  ,-20735  ,-19711  ,-19711  ,-18687  ,-18687  ,-17407  ,-17407  ,-16128  ,-16128  ,-14848  ,\n    -14848  ,-13312  ,-13312  ,-12032  ,-12032  ,-10240  ,-10240  ,-8960   ,-8960   ,-7680   ,-7680   ,-5888   ,-5888   ,-4608   ,-4608   ,\n    -2560   ,-2560   ,-768    ,-768    ,512     ,512     ,2560    ,2560    ,4608    ,4608    ,5888    ,5888    ,7680    ,7680    ,9216    ,\n    9216    ,10496   ,10496   ,12288   ,12288   ,13568   ,13568   ,15104   ,15104   ,16384   ,16384   ,17663   ,17663   ,18943   ,18943   ,\n    19967   ,19967   ,20991   ,20991   ,22015   ,22015   ,22527   ,22527   ,23295   ,23295   ,23551   ,23551   ,23807   ,23807   ,24063   ,\n    24063   ,24319   ,24319   ,24319   ,24319   ,24575   ,24575   ,24319   ,24319   ,24063   ,24063   ,23551   ,23551   ,23295   ,23295   ,\n    22783   ,22783   ,22271   ,22271   ,21759   ,21759   ,20991   ,20991   ,20223   ,20223   ,19455   ,19455   ,18687   ,18687   ,17919   ,\n    17919   ,16895   ,16895   ,15872   ,15872   ,15104   ,15104   ,14080   ,14080   ,13056   ,13056   ,12288   ,12288   ,11520   ,11520   ,\n    10496   ,10496   ,9728    ,9728    ,8960    ,8960    ,8192    ,8192    ,7424    ,7424    ,6656    ,6656    ,5888    ,5888    ,5376    ,\n    5376    ,4608    ,4608    ,4096    ,4096    ,3584    ,3584    ,3072    ,3072    ,2304    ,2304    ,2048    ,2048    ,1536    ,1536    ,\n    1280    ,1280    ,1280    ,1280    ,1024    ,1024    ,768     ,768     ,0       ,0       ,0       ,0       ,-256    ,-256    ,-256    ,\n    -256    ,-1024   ,-1024   ,-1280   ,-1280   ,-1536   ,-1536   ,-1536   ,-1536   ,-1792   ,-1792   ,-2304   ,-2304   ,-2560   ,-2560   ,\n    -3328   ,-3328   ,-3840   ,-3840   ,-4352   ,-4352   ,-4864   ,-4864   ,-5632   ,-5632   ,-6144   ,-6144   ,-6912   ,-6912   ,-7680   ,\n    -7680   ,-8448   ,-8448   ,-9216   ,-9216   ,-9984   ,-9984   ,-10752  ,-10752  ,-11776  ,-11776  ,-12544  ,-12544  ,-13312  ,-13312  ,\n    -14336  ,-14336  ,-15360  ,-15360  ,-16128  ,-16128  ,-17151  ,-17151  ,-18175  ,-18175  ,-18943  ,-18943  ,-19711  ,-19711  ,-20479  ,\n    -20479  ,-21247  ,-21247  ,-22015  ,-22015  ,-22527  ,-22527  ,-23039  ,-23039  ,-23551  ,-23551  ,-23807  ,-23807  ,-24319  ,-24319  ,\n    -24575  ,-24575  ,-24831  ,-24831  ,-24575  ,-24575  ,-24575  ,-24575  ,-24319  ,-24319  ,-24063  ,-24063  ,-23807  ,-23807  ,-23551  ,\n    -23551  ,-22783  ,-22783  ,-22271  ,-22271  ,-21247  ,-21247  ,-20223  ,-20223  ,-19199  ,-19199  ,-17919  ,-17919  ,-16639  ,-16639  ,\n    -15360  ,-15360  ,-13824  ,-13824  ,-12544  ,-12544  ,-10752  ,-10752  ,-9472   ,-9472   ,-7936   ,-7936   ,-6144   ,-6144   ,-4864   ,\n    -4864   ,-2816   ,-2816   ,-768    ,-768    ,512     ,512     ,2560    ,2560    ,4608    ,4608    ,5888    ,5888    ,7680    ,7680    ,\n    9472    ,9472    ,10752   ,10752   ,12544   ,12544   ,14080   ,14080   ,15360   ,15360   ,16639   ,16639   ,17919   ,17919   ,19199   ,\n    19199   ,20223   ,20223   ,21247   ,21247   ,22271   ,22271   ,22527   ,22527   ,23295   ,23295   ,23551   ,23551   ,23551   ,23551   ,\n    23807   ,23807   ,23807   ,23807   ,23551   ,23551   ,23807   ,23807   ,23295   ,23295   ,23039   ,23039   ,22271   ,22271   ,21759   ,\n    21759   ,20991   ,20991   ,20479   ,20479   ,19711   ,19711   ,18687   ,18687   ,17663   ,17663   ,16639   ,16639   ,15872   ,15872   ,\n    14848   ,14848   ,13824   ,13824   ,12544   ,12544   ,11776   ,11776   ,10496   ,10496   ,9472    ,9472    ,8704    ,8704    ,7680    ,\n    7680    ,6656    ,6656    ,5888    ,5888    ,5120    ,5120    ,4352    ,4352    ,3584    ,3584    ,3072    ,3072    ,2304    ,2304    ,\n    2048    ,2048    ,1280    ,1280    ,1024    ,1024    ,768     ,768     ,512     ,512     ,0       ,0       ,-256    ,-256    ,-512    ,\n    -512    ,-512    ,-512    ,-256    ,-256    ,-256    ,-256    ,0       ,0       ,-512    ,-512    ,-256    ,-256    ,0       ,0       ,\n    256     ,256     ,-256    ,-256    ,0       ,0       ,0       ,0       ,256     ,256     ,256     ,256     ,0       ,0       ,-256    ,\n    -256    ,-768    ,-768    ,-1024   ,-1024   ,-1280   ,-1280   ,-1536   ,-1536   ,-2304   ,-2304   ,-2560   ,-2560   ,-3328   ,-3328   ,\n    -3840   ,-3840   ,-4608   ,-4608   ,-5376   ,-5376   ,-6144   ,-6144   ,-6912   ,-6912   ,-7936   ,-7936   ,-8960   ,-8960   ,-9728   ,\n    -9728   ,-10752  ,-10752  ,-12032  ,-12032  ,-12800  ,-12800  ,-14080  ,-14080  ,-15104  ,-15104  ,-16128  ,-16128  ,-16895  ,-16895  ,\n    -17919  ,-17919  ,-18943  ,-18943  ,-19967  ,-19967  ,-20735  ,-20735  ,-21247  ,-21247  ,-22015  ,-22015  ,-22527  ,-22527  ,-23295  ,\n    -23295  ,-23551  ,-23551  ,-24063  ,-24063  ,-23807  ,-23807  ,-24063  ,-24063  ,-24063  ,-24063  ,-23807  ,-23807  ,-23807  ,-23807  ,\n    -23551  ,-23551  ,-22783  ,-22783  ,-22527  ,-22527  ,-21503  ,-21503  ,-20479  ,-20479  ,-19455  ,-19455  ,-18175  ,-18175  ,-16895  ,\n    -16895  ,-15616  ,-15616  ,-14336  ,-14336  ,-12800  ,-12800  ,-11008  ,-11008  ,-9728   ,-9728   ,-7936   ,-7936   ,-6144   ,-6144   ,\n    -4864   ,-4864   ,-2816   ,-2816   ,-768    ,-768    ,512     ,512     ,2560    ,2560    ,4864    ,4864    ,6144    ,6144    ,7936    ,\n    7936    ,9728    ,9728    ,11264   ,11264   ,13056   ,13056   ,14592   ,14592   ,15872   ,15872   ,17151   ,17151   ,18431   ,18431   ,\n    19711   ,19711   ,20479   ,20479   ,21503   ,21503   ,22527   ,22527   ,22783   ,22783   ,23295   ,23295   ,23551   ,23551   ,23551   ,\n    23551   ,23551   ,23551   ,23551   ,23551   ,23039   ,23039   ,23039   ,23039   ,22527   ,22527   ,22015   ,22015   ,20991   ,20991   ,\n    20479   ,20479   ,19455   ,19455   ,18687   ,18687   ,17663   ,17663   ,16384   ,16384   ,15360   ,15360   ,14080   ,14080   ,13056   ,\n    13056   ,12032   ,12032   ,10752   ,10752   ,9472    ,9472    ,8448    ,8448    ,7168    ,7168    ,5888    ,5888    ,5120    ,5120    ,\n    4096    ,4096    ,3072    ,3072    ,2304    ,2304    ,1536    ,1536    ,768     ,768     ,0       ,0       ,-512    ,-512    ,-1024   ,\n    -1024   ,-1280   ,-1280   ,-1792   ,-1792   ,-1792   ,-1792   ,-2048   ,-2048   ,-2048   ,-2048   ,-2304   ,-2304   ,-2304   ,-2304   ,\n    -2304   ,-2304   ,-2048   ,-2048   ,-1536   ,-1536   ,-1280   ,-1280   ,-768    ,-768    ,-1024   ,-1024   ,-512    ,-512    ,256     ,\n    256     ,768     ,768     ,512     ,512     ,1024    ,1024    ,1280    ,1280    ,1792    ,1792    ,2048    ,2048    ,2048    ,2048    ,\n    2048    ,2048    ,1792    ,1792    ,1792    ,1792    ,1536    ,1536    ,1536    ,1536    ,1024    ,1024    ,768     ,768     ,256     ,\n    256     ,-256    ,-256    ,-1024   ,-1024   ,-1792   ,-1792   ,-2560   ,-2560   ,-3328   ,-3328   ,-4352   ,-4352   ,-5376   ,-5376   ,\n    -6144   ,-6144   ,-7424   ,-7424   ,-8704   ,-8704   ,-9728   ,-9728   ,-11008  ,-11008  ,-12288  ,-12288  ,-13312  ,-13312  ,-14336  ,\n    -14336  ,-15616  ,-15616  ,-16639  ,-16639  ,-17919  ,-17919  ,-18943  ,-18943  ,-19711  ,-19711  ,-20735  ,-20735  ,-21247  ,-21247  ,\n    -22271  ,-22271  ,-22783  ,-22783  ,-23295  ,-23295  ,-23295  ,-23295  ,-23807  ,-23807  ,-23807  ,-23807  ,-23807  ,-23807  ,-23807  ,\n    -23807  ,-23551  ,-23551  ,-23039  ,-23039  ,-22783  ,-22783  ,-21759  ,-21759  ,-20735  ,-20735  ,-19967  ,-19967  ,-18687  ,-18687  ,\n    -17407  ,-17407  ,-16128  ,-16128  ,-14848  ,-14848  ,-13312  ,-13312  ,-11520  ,-11520  ,-9984   ,-9984   ,-8192   ,-8192   ,-6400   ,\n    -6400   ,-5120   ,-5120   ,-2816   ,-2816   ,-768    ,-768    ,512     ,512     ,2560    ,2560    ,4864    ,4864    ,6400    ,6400    ,\n    8192    ,8192    ,9984    ,9984    ,11520   ,11520   ,13312   ,13312   ,15104   ,15104   ,16384   ,16384   ,17663   ,17663   ,18943   ,\n    18943   ,19967   ,19967   ,20735   ,20735   ,21759   ,21759   ,22783   ,22783   ,23039   ,23039   ,23295   ,23295   ,23551   ,23551   ,\n    23551   ,23551   ,23295   ,23295   ,23039   ,23039   ,22527   ,22527   ,22271   ,22271   ,21759   ,21759   ,20991   ,20991   ,19711   ,\n    19711   ,18943   ,18943   ,17663   ,17663   ,16895   ,16895   ,15616   ,15616   ,14080   ,14080   ,13056   ,13056   ,11520   ,11520   ,\n    10240   ,10240   ,9216    ,9216    ,7680    ,7680    ,6144    ,6144    ,5120    ,5120    ,3840    ,3840    ,2304    ,2304    ,1536    ,\n    1536    ,512     ,512     ,-512    ,-512    ,-1280   ,-1280   ,-2048   ,-2048   ,-2816   ,-2816   ,-3584   ,-3584   ,-4096   ,-4096   ,\n    -4352   ,-4352   ,-4608   ,-4608   ,-4864   ,-4864   ,-4864   ,-4864   ,-4864   ,-4864   ,-4608   ,-4608   ,-4608   ,-4608   ,-4608   ,\n    -4608   ,-4096   ,-4096   ,-3584   ,-3584   ,-3072   ,-3072   ,-2304   ,-2304   ,-1536   ,-1536   ,-1536   ,-1536   ,-768    ,-768    ,\n    512     ,512     ,1280    ,1280    ,1280    ,1280    ,2048    ,2048    ,2816    ,2816    ,3328    ,3328    ,3840    ,3840    ,4352    ,\n    4352    ,4352    ,4352    ,4352    ,4352    ,4608    ,4608    ,4608    ,4608    ,4608    ,4608    ,4352    ,4352    ,4096    ,4096    ,\n    3840    ,3840    ,3328    ,3328    ,2560    ,2560    ,1792    ,1792    ,1024    ,1024    ,256     ,256     ,-768    ,-768    ,-1792   ,\n    -1792   ,-2560   ,-2560   ,-4096   ,-4096   ,-5376   ,-5376   ,-6400   ,-6400   ,-7936   ,-7936   ,-9472   ,-9472   ,-10496  ,-10496  ,\n    -11776  ,-11776  ,-13312  ,-13312  ,-14336  ,-14336  ,-15872  ,-15872  ,-17151  ,-17151  ,-17919  ,-17919  ,-19199  ,-19199  ,-19967  ,\n    -19967  ,-21247  ,-21247  ,-22015  ,-22015  ,-22527  ,-22527  ,-22783  ,-22783  ,-23295  ,-23295  ,-23551  ,-23551  ,-23807  ,-23807  ,\n    -23807  ,-23807  ,-23551  ,-23551  ,-23295  ,-23295  ,-23039  ,-23039  ,-22015  ,-22015  ,-20991  ,-20991  ,-20223  ,-20223  ,-19199  ,\n    -19199  ,-17919  ,-17919  ,-16639  ,-16639  ,-15360  ,-15360  ,-13568  ,-13568  ,-11776  ,-11776  ,-10240  ,-10240  ,-8448   ,-8448   ,\n    -6656   ,-6656   ,-5120   ,-5120   ,-2816   ,-2816   ,-768    ,-768    ,512     ,512     ,2816    ,2816    ,5120    ,5120    ,6656    ,\n    6656    ,8448    ,8448    ,10496   ,10496   ,12032   ,12032   ,13824   ,13824   ,15616   ,15616   ,16895   ,16895   ,18175   ,18175   ,\n    19455   ,19455   ,20479   ,20479   ,21247   ,21247   ,22271   ,22271   ,23039   ,23039   ,23295   ,23295   ,23551   ,23551   ,23551   ,\n    23551   ,23551   ,23551   ,23039   ,23039   ,22783   ,22783   ,22015   ,22015   ,21759   ,21759   ,20991   ,20991   ,19967   ,19967   ,\n    18687   ,18687   ,17663   ,17663   ,16128   ,16128   ,15104   ,15104   ,13824   ,13824   ,12032   ,12032   ,10752   ,10752   ,8960    ,\n    8960    ,7680    ,7680    ,6400    ,6400    ,4864    ,4864    ,3072    ,3072    ,2048    ,2048    ,512     ,512     ,-1024   ,-1024   ,\n    -1792   ,-1792   ,-3072   ,-3072   ,-4096   ,-4096   ,-4864   ,-4864   ,-5632   ,-5632   ,-6400   ,-6400   ,-7168   ,-7168   ,-7424   ,\n    -7424   ,-7680   ,-7680   ,-7936   ,-7936   ,-7936   ,-7936   ,-7680   ,-7680   ,-7680   ,-7680   ,-7168   ,-7168   ,-6912   ,-6912   ,\n    -6656   ,-6656   ,-5888   ,-5888   ,-5120   ,-5120   ,-4352   ,-4352   ,-3328   ,-3328   ,-2304   ,-2304   ,-2048   ,-2048   ,-768    ,\n    -768    ,512     ,512     ,1792    ,1792    ,2048    ,2048    ,3072    ,3072    ,4096    ,4096    ,4864    ,4864    ,5632    ,5632    ,\n    6400    ,6400    ,6656    ,6656    ,6912    ,6912    ,7424    ,7424    ,7424    ,7424    ,7680    ,7680    ,7680    ,7680    ,7424    ,\n    7424    ,7168    ,7168    ,6912    ,6912    ,6144    ,6144    ,5376    ,5376    ,4608    ,4608    ,3840    ,3840    ,2816    ,2816    ,\n    1536    ,1536    ,768     ,768     ,-768    ,-768    ,-2304   ,-2304   ,-3328   ,-3328   ,-5120   ,-5120   ,-6656   ,-6656   ,-7936   ,\n    -7936   ,-9216   ,-9216   ,-11008  ,-11008  ,-12288  ,-12288  ,-14080  ,-14080  ,-15360  ,-15360  ,-16384  ,-16384  ,-17919  ,-17919  ,\n    -18943  ,-18943  ,-20223  ,-20223  ,-21247  ,-21247  ,-22015  ,-22015  ,-22271  ,-22271  ,-23039  ,-23039  ,-23295  ,-23295  ,-23807  ,\n    -23807  ,-23807  ,-23807  ,-23807  ,-23807  ,-23551  ,-23551  ,-23295  ,-23295  ,-22527  ,-22527  ,-21503  ,-21503  ,-20735  ,-20735  ,\n    -19711  ,-19711  ,-18431  ,-18431  ,-17151  ,-17151  ,-15872  ,-15872  ,-14080  ,-14080  ,-12288  ,-12288  ,-10752  ,-10752  ,-8704   ,\n    -8704   ,-6912   ,-6912   ,-5376   ,-5376   ,-3072   ,-3072   ,-768    ,-768    ,512     ,512     ,2816    ,2816    ,5120    ,5120    ,\n    6912    ,6912    ,8704    ,8704    ,10752   ,10752   ,12288   ,12288   ,14336   ,14336   ,15872   ,15872   ,17151   ,17151   ,18431   ,\n    18431   ,19711   ,19711   ,20735   ,20735   ,21247   ,21247   ,22271   ,22271   ,22783   ,22783   ,22783   ,22783   ,23039   ,23039   ,\n    22783   ,22783   ,22527   ,22527   ,21759   ,21759   ,21503   ,21503   ,20479   ,20479   ,20223   ,20223   ,19199   ,19199   ,18175   ,\n    18175   ,16895   ,16895   ,15616   ,15616   ,14336   ,14336   ,13312   ,13312   ,12032   ,12032   ,10496   ,10496   ,9216    ,9216    ,\n    7680    ,7680    ,6656    ,6656    ,5632    ,5632    ,4352    ,4352    ,3072    ,3072    ,2304    ,2304    ,1024    ,1024    ,0       ,\n    0       ,-512    ,-512    ,-1280   ,-1280   ,-2048   ,-2048   ,-2560   ,-2560   ,-3072   ,-3072   ,-3328   ,-3328   ,-3840   ,-3840   ,\n    -4096   ,-4096   ,-4096   ,-4096   ,-4352   ,-4352   ,-4352   ,-4352   ,-4096   ,-4096   ,-4096   ,-4096   ,-3840   ,-3840   ,-3584   ,\n    -3584   ,-3584   ,-3584   ,-3072   ,-3072   ,-2816   ,-2816   ,-2304   ,-2304   ,-1792   ,-1792   ,-1024   ,-1024   ,-1280   ,-1280   ,\n    -512    ,-512    ,256     ,256     ,1024    ,1024    ,768     ,768     ,1536    ,1536    ,2048    ,2048    ,2560    ,2560    ,2816    ,\n    2816    ,3328    ,3328    ,3328    ,3328    ,3584    ,3584    ,3840    ,3840    ,3840    ,3840    ,4096    ,4096    ,4096    ,4096    ,\n    3840    ,3840    ,3840    ,3840    ,3584    ,3584    ,3072    ,3072    ,2816    ,2816    ,2304    ,2304    ,1792    ,1792    ,1024    ,\n    1024    ,256     ,256     ,-256    ,-256    ,-1280   ,-1280   ,-2560   ,-2560   ,-3328   ,-3328   ,-4608   ,-4608   ,-5888   ,-5888   ,\n    -6912   ,-6912   ,-7936   ,-7936   ,-9472   ,-9472   ,-10752  ,-10752  ,-12288  ,-12288  ,-13568  ,-13568  ,-14592  ,-14592  ,-15872  ,\n    -15872  ,-17151  ,-17151  ,-18431  ,-18431  ,-19455  ,-19455  ,-20479  ,-20479  ,-20735  ,-20735  ,-21759  ,-21759  ,-22015  ,-22015  ,\n    -22783  ,-22783  ,-23039  ,-23039  ,-23295  ,-23295  ,-23039  ,-23039  ,-23039  ,-23039  ,-22527  ,-22527  ,-21503  ,-21503  ,-20991  ,\n    -20991  ,-19967  ,-19967  ,-18687  ,-18687  ,-17407  ,-17407  ,-16128  ,-16128  ,-14592  ,-14592  ,-12544  ,-12544  ,-11008  ,-11008  ,\n    -8960   ,-8960   ,-7168   ,-7168   ,-5376   ,-5376   ,-3072   ,-3072   ,-768    ,-768    ,512     ,512     ,2816    ,2816    ,5376    ,\n    5376    ,7168    ,7168    ,9216    ,9216    ,11264   ,11264   ,12800   ,12800   ,14848   ,14848   ,16384   ,16384   ,17663   ,17663   ,\n    18943   ,18943   ,20223   ,20223   ,20991   ,20991   ,21503   ,21503   ,22271   ,22271   ,22527   ,22527   ,22527   ,22527   ,22527   ,\n    22527   ,22015   ,22015   ,21759   ,21759   ,20735   ,20735   ,20223   ,20223   ,19199   ,19199   ,18687   ,18687   ,17663   ,17663   ,\n    16384   ,16384   ,15104   ,15104   ,13824   ,13824   ,12544   ,12544   ,11520   ,11520   ,10496   ,10496   ,8960    ,8960    ,7936    ,\n    7936    ,6656    ,6656    ,5888    ,5888    ,5120    ,5120    ,4096    ,4096    ,3072    ,3072    ,2560    ,2560    ,1792    ,1792    ,\n    1280    ,1280    ,1024    ,1024    ,512     ,512     ,0       ,0       ,0       ,0       ,-256    ,-256    ,-256    ,-256    ,-512    ,\n    -512    ,-512    ,-512    ,-512    ,-512    ,-512    ,-512    ,-512    ,-512    ,-256    ,-256    ,-256    ,-256    ,-256    ,-256    ,\n    -256    ,-256    ,-512    ,-512    ,-256    ,-256    ,-256    ,-256    ,-256    ,-256    ,0       ,0       ,256     ,256     ,-512    ,\n    -512    ,0       ,0       ,-256    ,-256    ,256     ,256     ,-512    ,-512    ,-256    ,-256    ,0       ,0       ,0       ,0       ,\n    0       ,0       ,256     ,256     ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,0       ,256     ,256     ,256     ,\n    256     ,256     ,256     ,256     ,256     ,256     ,256     ,0       ,0       ,0       ,0       ,-256    ,-256    ,-256    ,-256    ,\n    -768    ,-768    ,-1280   ,-1280   ,-1536   ,-1536   ,-2048   ,-2048   ,-2816   ,-2816   ,-3328   ,-3328   ,-4352   ,-4352   ,-5376   ,\n    -5376   ,-6144   ,-6144   ,-6912   ,-6912   ,-8192   ,-8192   ,-9216   ,-9216   ,-10752  ,-10752  ,-11776  ,-11776  ,-12800  ,-12800  ,\n    -14080  ,-14080  ,-15360  ,-15360  ,-16639  ,-16639  ,-17919  ,-17919  ,-18943  ,-18943  ,-19455  ,-19455  ,-20479  ,-20479  ,-20991  ,\n    -20991  ,-22015  ,-22015  ,-22271  ,-22271  ,-22783  ,-22783  ,-22783  ,-22783  ,-22783  ,-22783  ,-22527  ,-22527  ,-21759  ,-21759  ,\n    -21247  ,-21247  ,-20479  ,-20479  ,-19199  ,-19199  ,-17919  ,-17919  ,-16639  ,-16639  ,-15104  ,-15104  ,-13056  ,-13056  ,-11520  ,\n    -11520  ,-9472   ,-9472   ,-7424   ,-7424   ,-5632   ,-5632   ,-3072   ,-3072   ,-768    ,-768    ,512     ,512     ,2816    ,2816    ,\n    5632    ,5632    ,7424    ,7424    ,9472    ,9472    ,11520   ,11520   ,13312   ,13312   ,15360   ,15360   ,16895   ,16895   ,18175   ,\n    18175   ,19455   ,19455   ,20479   ,20479   ,21247   ,21247   ,21503   ,21503   ,22271   ,22271   ,22271   ,22271   ,22271   ,22271   ,\n    22015   ,22015   ,21247   ,21247   ,20735   ,20735   ,19711   ,19711   ,18943   ,18943   ,17663   ,17663   ,17151   ,17151   ,15872   ,\n    15872   ,14592   ,14592   ,13312   ,13312   ,12032   ,12032   ,10752   ,10752   ,9728    ,9728    ,8704    ,8704    ,7424    ,7424    ,\n    6656    ,6656    ,5632    ,5632    ,4864    ,4864    ,4352    ,4352    ,3840    ,3840    ,3072    ,3072    ,2816    ,2816    ,2560    ,\n    2560    ,2304    ,2304    ,2304    ,2304    ,2304    ,2304    ,2048    ,2048    ,2560    ,2560    ,2560    ,2560    ,2816    ,2816    ,\n    2816    ,2816    ,3072    ,3072    ,3072    ,3072    ,3072    ,3072    ,3328    ,3328    ,3328    ,3328    ,3328    ,3328    ,3328    ,\n    3328    ,3072    ,3072    ,2560    ,2560    ,2560    ,2560    ,2304    ,2304    ,1792    ,1792    ,1536    ,1536    ,1536    ,1536    ,\n    256     ,256     ,256     ,256     ,-512    ,-512    ,-512    ,-512    ,-1792   ,-1792   ,-1792   ,-1792   ,-2048   ,-2048   ,-2560   ,\n    -2560   ,-2816   ,-2816   ,-2816   ,-2816   ,-3328   ,-3328   ,-3584   ,-3584   ,-3584   ,-3584   ,-3584   ,-3584   ,-3584   ,-3584   ,\n    -3328   ,-3328   ,-3328   ,-3328   ,-3328   ,-3328   ,-3072   ,-3072   ,-3072   ,-3072   ,-2816   ,-2816   ,-2816   ,-2816   ,-2304   ,\n    -2304   ,-2560   ,-2560   ,-2560   ,-2560   ,-2560   ,-2560   ,-2816   ,-2816   ,-3072   ,-3072   ,-3328   ,-3328   ,-4096   ,-4096   ,\n    -4608   ,-4608   ,-5120   ,-5120   ,-5888   ,-5888   ,-6912   ,-6912   ,-7680   ,-7680   ,-8960   ,-8960   ,-9984   ,-9984   ,-11008  ,\n    -11008  ,-12288  ,-12288  ,-13568  ,-13568  ,-14848  ,-14848  ,-16128  ,-16128  ,-17407  ,-17407  ,-17919  ,-17919  ,-19199  ,-19199  ,\n    -19967  ,-19967  ,-20991  ,-20991  ,-21503  ,-21503  ,-22271  ,-22271  ,-22527  ,-22527  ,-22527  ,-22527  ,-22527  ,-22527  ,-21759  ,\n    -21759  ,-21503  ,-21503  ,-20735  ,-20735  ,-19711  ,-19711  ,-18431  ,-18431  ,-17151  ,-17151  ,-15616  ,-15616  ,-13568  ,-13568  ,\n    -11776  ,-11776  ,-9728   ,-9728   ,-7680   ,-7680   ,-5888   ,-5888   ,-3072   ,-3072   ,-768    ,-768    ,512     ,512     ,3072    ,\n    3072    ,5888    ,5888    ,7680    ,7680    ,9984    ,9984    ,12032   ,12032   ,13824   ,13824   ,15872   ,15872   ,17407   ,17407   ,\n    18687   ,18687   ,19967   ,19967   ,20991   ,20991   ,21503   ,21503   ,21759   ,21759   ,22271   ,22271   ,22271   ,22271   ,22015   ,\n    22015   ,21503   ,21503   ,20735   ,20735   ,19967   ,19967   ,18687   ,18687   ,17663   ,17663   ,16384   ,16384   ,15616   ,15616   ,\n    14336   ,14336   ,13056   ,13056   ,11520   ,11520   ,10240   ,10240   ,9216    ,9216    ,8192    ,8192    ,7168    ,7168    ,6144    ,\n    6144    ,5376    ,5376    ,4608    ,4608    ,4096    ,4096    ,3840    ,3840    ,3584    ,3584    ,3072    ,3072    ,3328    ,3328    ,\n    3328    ,3328    ,3584    ,3584    ,3840    ,3840    ,4096    ,4096    ,4352    ,4352    ,5120    ,5120    ,5376    ,5376    ,5888    ,\n    5888    ,6144    ,6144    ,6656    ,6656    ,6912    ,6912    ,6912    ,6912    ,7168    ,7168    ,7168    ,7168    ,7168    ,7168    ,\n    6912    ,6912    ,6400    ,6400    ,5888    ,5888    ,5376    ,5376    ,4864    ,4864    ,4096    ,4096    ,3328    ,3328    ,2816    ,\n    2816    ,1280    ,1280    ,768     ,768     ,-1024   ,-1024   ,-1536   ,-1536   ,-3072   ,-3072   ,-3584   ,-3584   ,-4352   ,-4352   ,\n    -5120   ,-5120   ,-5632   ,-5632   ,-6144   ,-6144   ,-6656   ,-6656   ,-7168   ,-7168   ,-7424   ,-7424   ,-7424   ,-7424   ,-7424   ,\n    -7424   ,-7168   ,-7168   ,-7168   ,-7168   ,-6912   ,-6912   ,-6400   ,-6400   ,-6144   ,-6144   ,-5632   ,-5632   ,-5376   ,-5376   ,\n    -4608   ,-4608   ,-4352   ,-4352   ,-4096   ,-4096   ,-3840   ,-3840   ,-3584   ,-3584   ,-3584   ,-3584   ,-3328   ,-3328   ,-3840   ,\n    -3840   ,-4096   ,-4096   ,-4352   ,-4352   ,-4864   ,-4864   ,-5632   ,-5632   ,-6400   ,-6400   ,-7424   ,-7424   ,-8448   ,-8448   ,\n    -9472   ,-9472   ,-10496  ,-10496  ,-11776  ,-11776  ,-13312  ,-13312  ,-14592  ,-14592  ,-15872  ,-15872  ,-16639  ,-16639  ,-17919  ,\n    -17919  ,-18943  ,-18943  ,-20223  ,-20223  ,-20991  ,-20991  ,-21759  ,-21759  ,-22271  ,-22271  ,-22527  ,-22527  ,-22527  ,-22527  ,\n    -22015  ,-22015  ,-21759  ,-21759  ,-21247  ,-21247  ,-20223  ,-20223  ,-18943  ,-18943  ,-17663  ,-17663  ,-16128  ,-16128  ,-14080  ,\n    -14080  ,-12288  ,-12288  ,-10240  ,-10240  ,-7936   ,-7936   ,-6144   ,-6144   ,-3328   ,-3328   ,-768    ,-768    ,512     ,512     ,\n    3072    ,3072    ,5888    ,5888    ,7936    ,7936    ,10240   ,10240   ,12288   ,12288   ,14336   ,14336   ,16384   ,16384   ,17663   ,\n    17663   ,19199   ,19199   ,20479   ,20479   ,21247   ,21247   ,21759   ,21759   ,21759   ,21759   ,22271   ,22271   ,22015   ,22015   ,\n    21503   ,21503   ,20991   ,20991   ,19967   ,19967   ,18943   ,18943   ,17663   ,17663   ,16384   ,16384   ,14848   ,14848   ,14080   ,\n    14080   ,12544   ,12544   ,11264   ,11264   ,9728    ,9728    ,8448    ,8448    ,7424    ,7424    ,6400    ,6400    ,5376    ,5376    ,\n    4608    ,4608    ,3840    ,3840    ,3328    ,3328    ,3072    ,3072    ,3072    ,3072    ,3072    ,3072    ,3072    ,3072    ,3584    ,\n    3584    ,3840    ,3840    ,4608    ,4608    ,5120    ,5120    ,5888    ,5888    ,6400    ,6400    ,7424    ,7424    ,8192    ,8192    ,\n    8960    ,8960    ,9472    ,9472    ,9984    ,9984    ,10496   ,10496   ,10496   ,10496   ,10752   ,10752   ,10752   ,10752   ,10752   ,\n    10752   ,10240   ,10240   ,9728    ,9728    ,8960    ,8960    ,8192    ,8192    ,7168    ,7168    ,6144    ,6144    ,4864    ,4864    ,\n    4096    ,4096    ,2048    ,2048    ,1024    ,1024    ,-1280   ,-1280   ,-2304   ,-2304   ,-4352   ,-4352   ,-5120   ,-5120   ,-6400   ,\n    -6400   ,-7424   ,-7424   ,-8448   ,-8448   ,-9216   ,-9216   ,-9984   ,-9984   ,-10496  ,-10496  ,-11008  ,-11008  ,-11008  ,-11008  ,\n    -11008  ,-11008  ,-10752  ,-10752  ,-10752  ,-10752  ,-10240  ,-10240  ,-9728   ,-9728   ,-9216   ,-9216   ,-8448   ,-8448   ,-7680   ,\n    -7680   ,-6656   ,-6656   ,-6144   ,-6144   ,-5376   ,-5376   ,-4864   ,-4864   ,-4096   ,-4096   ,-3840   ,-3840   ,-3328   ,-3328   ,\n    -3328   ,-3328   ,-3328   ,-3328   ,-3328   ,-3328   ,-3584   ,-3584   ,-4096   ,-4096   ,-4864   ,-4864   ,-5632   ,-5632   ,-6656   ,\n    -6656   ,-7680   ,-7680   ,-8704   ,-8704   ,-9984   ,-9984   ,-11520  ,-11520  ,-12800  ,-12800  ,-14336  ,-14336  ,-15104  ,-15104  ,\n    -16639  ,-16639  ,-17919  ,-17919  ,-19199  ,-19199  ,-20223  ,-20223  ,-21247  ,-21247  ,-21759  ,-21759  ,-22271  ,-22271  ,-22527  ,\n    -22527  ,-22015  ,-22015  ,-22015  ,-22015  ,-21503  ,-21503  ,-20735  ,-20735  ,-19455  ,-19455  ,-17919  ,-17919  ,-16639  ,-16639  ,\n    -14592  ,-14592  ,-12544  ,-12544  ,-10496  ,-10496  ,-8192   ,-8192   ,-6144   ,-6144   ,-3328   ,-3328   ,-768    ,-768    ,512     ,\n    512     ,3328    ,3328    ,6144    ,6144    ,8192    ,8192    ,10752   ,10752   ,12800   ,12800   ,14848   ,14848   ,16895   ,16895   ,\n    18175   ,18175   ,19711   ,19711   ,20991   ,20991   ,21759   ,21759   ,22015   ,22015   ,22015   ,22015   ,22271   ,22271   ,21759   ,\n    21759   ,21247   ,21247   ,20479   ,20479   ,19199   ,19199   ,18175   ,18175   ,16639   ,16639   ,15104   ,15104   ,13568   ,13568   ,\n    12544   ,12544   ,11008   ,11008   ,9472    ,9472    ,7936    ,7936    ,6656    ,6656    ,5632    ,5632    ,4608    ,4608    ,3840    ,\n    3840    ,3072    ,3072    ,2560    ,2560    ,2304    ,2304    ,2304    ,2304    ,2560    ,2560    ,2816    ,2816    ,3072    ,3072    ,\n    4096    ,4096    ,4608    ,4608    ,5888    ,5888    ,6656    ,6656    ,7680    ,7680    ,8704    ,8704    ,9984    ,9984    ,11008   ,\n    11008   ,12032   ,12032   ,12800   ,12800   ,13568   ,13568   ,14080   ,14080   ,14336   ,14336   ,14592   ,14592   ,14592   ,14592   ,\n    14592   ,14592   ,13824   ,13824   ,13056   ,13056   ,12288   ,12288   ,11008   ,11008   ,9728    ,9728    ,8448    ,8448    ,6656    ,\n    6656    ,5376    ,5376    ,3072    ,3072    ,1536    ,1536    ,-1792   ,-1792   ,-3328   ,-3328   ,-5632   ,-5632   ,-6912   ,-6912   ,\n    -8704   ,-8704   ,-9984   ,-9984   ,-11264  ,-11264  ,-12544  ,-12544  ,-13312  ,-13312  ,-14080  ,-14080  ,-14848  ,-14848  ,-14848  ,\n    -14848  ,-14848  ,-14848  ,-14592  ,-14592  ,-14336  ,-14336  ,-13824  ,-13824  ,-13056  ,-13056  ,-12288  ,-12288  ,-11264  ,-11264  ,\n    -10240  ,-10240  ,-8960   ,-8960   ,-7936   ,-7936   ,-6912   ,-6912   ,-6144   ,-6144   ,-4864   ,-4864   ,-4352   ,-4352   ,-3328   ,\n    -3328   ,-3072   ,-3072   ,-2816   ,-2816   ,-2560   ,-2560   ,-2560   ,-2560   ,-2816   ,-2816   ,-3328   ,-3328   ,-4096   ,-4096   ,\n    -4864   ,-4864   ,-5888   ,-5888   ,-6912   ,-6912   ,-8192   ,-8192   ,-9728   ,-9728   ,-11264  ,-11264  ,-12800  ,-12800  ,-13824  ,\n    -13824  ,-15360  ,-15360  ,-16895  ,-16895  ,-18431  ,-18431  ,-19455  ,-19455  ,-20735  ,-20735  ,-21503  ,-21503  ,-22015  ,-22015  ,\n    -22527  ,-22527  ,-22271  ,-22271  ,-22271  ,-22271  ,-22015  ,-22015  ,-21247  ,-21247  ,-19967  ,-19967  ,-18431  ,-18431  ,-17151  ,\n    -17151  ,-15104  ,-15104  ,-13056  ,-13056  ,-11008  ,-11008  ,-8448   ,-8448   ,-6400   ,-6400   ,-3584   ,-3584   ,-768    ,-768    ,\n    512     ,512     ,3328    ,3328    ,6400    ,6400    ,8448    ,8448    ,11008   ,11008   ,13312   ,13312   ,15360   ,15360   ,17407   ,\n    17407   ,18687   ,18687   ,20223   ,20223   ,21503   ,21503   ,22015   ,22015   ,22271   ,22271   ,22271   ,22271   ,22271   ,22271   ,\n    21503   ,21503   ,20991   ,20991   ,19967   ,19967   ,18431   ,18431   ,17151   ,17151   ,15616   ,15616   ,13824   ,13824   ,12288   ,\n    12288   ,11008   ,11008   ,9216    ,9216    ,7680    ,7680    ,6144    ,6144    ,4864    ,4864    ,3840    ,3840    ,2816    ,2816    ,\n    2304    ,2304    ,1536    ,1536    ,1280    ,1280    ,1280    ,1280    ,1280    ,1280    ,2048    ,2048    ,2560    ,2560    ,3072    ,\n    3072    ,4352    ,4352    ,5376    ,5376    ,6912    ,6912    ,7936    ,7936    ,9472    ,9472    ,10752   ,10752   ,12544   ,12544   ,\n    13824   ,13824   ,15104   ,15104   ,16128   ,16128   ,17151   ,17151   ,17663   ,17663   ,18175   ,18175   ,18431   ,18431   ,18431   ,\n    18431   ,18175   ,18175   ,17407   ,17407   ,16384   ,16384   ,15360   ,15360   ,13824   ,13824   ,12288   ,12288   ,10496   ,10496   ,\n    8448    ,8448    ,6656    ,6656    ,3840    ,3840    ,1792    ,1792    ,-2048   ,-2048   ,-4096   ,-4096   ,-6912   ,-6912   ,-8704   ,\n    -8704   ,-10752  ,-10752  ,-12544  ,-12544  ,-14080  ,-14080  ,-15616  ,-15616  ,-16639  ,-16639  ,-17663  ,-17663  ,-18431  ,-18431  ,\n    -18687  ,-18687  ,-18687  ,-18687  ,-18431  ,-18431  ,-17919  ,-17919  ,-17407  ,-17407  ,-16384  ,-16384  ,-15360  ,-15360  ,-14080  ,\n    -14080  ,-12800  ,-12800  ,-11008  ,-11008  ,-9728   ,-9728   ,-8192   ,-8192   ,-7168   ,-7168   ,-5632   ,-5632   ,-4608   ,-4608   ,\n    -3328   ,-3328   ,-2816   ,-2816   ,-2304   ,-2304   ,-1536   ,-1536   ,-1536   ,-1536   ,-1536   ,-1536   ,-1792   ,-1792   ,-2560   ,\n    -2560   ,-3072   ,-3072   ,-4096   ,-4096   ,-5120   ,-5120   ,-6400   ,-6400   ,-7936   ,-7936   ,-9472   ,-9472   ,-11264  ,-11264  ,\n    -12544  ,-12544  ,-14080  ,-14080  ,-15872  ,-15872  ,-17407  ,-17407  ,-18687  ,-18687  ,-20223  ,-20223  ,-21247  ,-21247  ,-21759  ,\n    -21759  ,-22527  ,-22527  ,-22527  ,-22527  ,-22527  ,-22527  ,-22271  ,-22271  ,-21759  ,-21759  ,-20479  ,-20479  ,-18943  ,-18943  ,\n    -17663  ,-17663  ,-15616  ,-15616  ,-13568  ,-13568  ,-11264  ,-11264  ,-8704   ,-8704   ,-6656   ,-6656   ,-3584   ,-3584   ,-768    ,\n    -768    ,512     ,512     ,3584    ,3584    ,6656    ,6656    ,8960    ,8960    ,11520   ,11520   ,13824   ,13824   ,15872   ,15872   ,\n    17919   ,17919   ,19199   ,19199   ,20735   ,20735   ,22015   ,22015   ,22527   ,22527   ,22527   ,22527   ,22527   ,22527   ,22271   ,\n    22271   ,21503   ,21503   ,20735   ,20735   ,19455   ,19455   ,17919   ,17919   ,16384   ,16384   ,14592   ,14592   ,12800   ,12800   ,\n    11008   ,11008   ,9472    ,9472    ,7680    ,7680    ,6144    ,6144    ,4352    ,4352    ,3072    ,3072    ,2304    ,2304    ,1280    ,\n    1280    ,768     ,768     ,256     ,256     ,0       ,0       ,256     ,256     ,512     ,512     ,1536    ,1536    ,2304    ,2304    ,\n    3328    ,3328    ,4864    ,4864    ,6144    ,6144    ,8192    ,8192    ,9472    ,9472    ,11520   ,11520   ,13056   ,13056   ,15104   ,\n    15104   ,16639   ,16639   ,18431   ,18431   ,19711   ,19711   ,20735   ,20735   ,21503   ,21503   ,22015   ,22015   ,22271   ,22271   ,\n    22271   ,22271   ,22015   ,22015   ,20991   ,20991   ,19711   ,19711   ,18687   ,18687   ,16639   ,16639   ,14848   ,14848   ,12800   ,\n    12800   ,10240   ,10240   ,7936    ,7936    ,4864    ,4864    ,2304    ,2304    ,-2560   ,-2560   ,-5120   ,-5120   ,-8192   ,-8192   ,\n    -10496  ,-10496  ,-13056  ,-13056  ,-15104  ,-15104  ,-16895  ,-16895  ,-18943  ,-18943  ,-19967  ,-19967  ,-21247  ,-21247  ,-22271  ,\n    -22271  ,-22527  ,-22527  ,-22527  ,-22527  ,-22271  ,-22271  ,-21759  ,-21759  ,-20991  ,-20991  ,-19967  ,-19967  ,-18687  ,-18687  ,\n    -16895  ,-16895  ,-15360  ,-15360  ,-13312  ,-13312  ,-11776  ,-11776  ,-9728   ,-9728   ,-8448   ,-8448   ,-6400   ,-6400   ,-5120   ,\n    -5120   ,-3584   ,-3584   ,-2560   ,-2560   ,-1792   ,-1792   ,-768    ,-768    ,-512    ,-512    ,-256    ,-256    ,-512    ,-512    ,\n    -1024   ,-1024   ,-1536   ,-1536   ,-2560   ,-2560   ,-3328   ,-3328   ,-4608   ,-4608   ,-6400   ,-6400   ,-7936   ,-7936   ,-9728   ,\n    -9728   ,-11264  ,-11264  ,-13056  ,-13056  ,-14848  ,-14848  ,-16639  ,-16639  ,-18175  ,-18175  ,-19711  ,-19711  ,-20991  ,-20991  ,\n    -21759  ,-21759  ,-22527  ,-22527  ,-22783  ,-22783  ,-22783  ,-22783  ,-22783  ,-22783  ,-22271  ,-22271  ,-20991  ,-20991  ,-19455  ,\n    -19455  ,-18175  ,-18175  ,-16128  ,-16128  ,-14080  ,-14080  ,-11776  ,-11776  ,-9216   ,-9216   ,-6912   ,-6912   ,-3840   ,-3840   ,\n    -768    ,-768    ,512     ,512     ,3584    ,3584    ,6656    ,6656    ,8960    ,8960    ,11776   ,11776   ,14080   ,14080   ,16128   ,\n    16128   ,17919   ,17919   ,19199   ,19199   ,20735   ,20735   ,21759   ,21759   ,22015   ,22015   ,22015   ,22015   ,21759   ,21759   ,\n    21247   ,21247   ,20223   ,20223   ,19199   ,19199   ,17919   ,17919   ,16384   ,16384   ,14592   ,14592   ,12800   ,12800   ,11264   ,\n    11264   ,9472    ,9472    ,7936    ,7936    ,6400    ,6400    ,5120    ,5120    ,3840    ,3840    ,2816    ,2816    ,2560    ,2560    ,\n    1792    ,1792    ,1792    ,1792    ,1536    ,1536    ,1792    ,1792    ,2304    ,2304    ,2816    ,2816    ,4096    ,4096    ,4864    ,\n    4864    ,6144    ,6144    ,7424    ,7424    ,8704    ,8704    ,10496   ,10496   ,11520   ,11520   ,13312   ,13312   ,14336   ,14336   ,\n    15872   ,15872   ,16895   ,16895   ,18175   ,18175   ,18687   ,18687   ,19199   ,19199   ,19455   ,19455   ,19455   ,19455   ,19455   ,\n    19455   ,18943   ,18943   ,18431   ,18431   ,17407   ,17407   ,16128   ,16128   ,15104   ,15104   ,13312   ,13312   ,11776   ,11776   ,\n    9984    ,9984    ,7936    ,7936    ,6144    ,6144    ,3584    ,3584    ,1536    ,1536    ,-1792   ,-1792   ,-3840   ,-3840   ,-6400   ,\n    -6400   ,-8192   ,-8192   ,-10240  ,-10240  ,-12032  ,-12032  ,-13568  ,-13568  ,-15360  ,-15360  ,-16384  ,-16384  ,-17663  ,-17663  ,\n    -18687  ,-18687  ,-19199  ,-19199  ,-19711  ,-19711  ,-19711  ,-19711  ,-19711  ,-19711  ,-19455  ,-19455  ,-18943  ,-18943  ,-18431  ,\n    -18431  ,-17151  ,-17151  ,-16128  ,-16128  ,-14592  ,-14592  ,-13568  ,-13568  ,-11776  ,-11776  ,-10752  ,-10752  ,-8960   ,-8960   ,\n    -7680   ,-7680   ,-6400   ,-6400   ,-5120   ,-5120   ,-4352   ,-4352   ,-3072   ,-3072   ,-2560   ,-2560   ,-2048   ,-2048   ,-1792   ,\n    -1792   ,-2048   ,-2048   ,-2048   ,-2048   ,-2816   ,-2816   ,-3072   ,-3072   ,-4096   ,-4096   ,-5376   ,-5376   ,-6656   ,-6656   ,\n    -8192   ,-8192   ,-9728   ,-9728   ,-11520  ,-11520  ,-13056  ,-13056  ,-14848  ,-14848  ,-16639  ,-16639  ,-18175  ,-18175  ,-19455  ,\n    -19455  ,-20479  ,-20479  ,-21503  ,-21503  ,-22015  ,-22015  ,-22271  ,-22271  ,-22271  ,-22271  ,-22015  ,-22015  ,-20991  ,-20991  ,\n    -19455  ,-19455  ,-18175  ,-18175  ,-16384  ,-16384  ,-14336  ,-14336  ,-12032  ,-12032  ,-9216   ,-9216   ,-6912   ,-6912   ,-3840   ,\n    -3840   ,-768    ,-768    ,512     ,512     ,3584    ,3584    ,6912    ,6912    ,9216    ,9216    ,12032   ,12032   ,14336   ,14336   ,\n    16384   ,16384   ,18175   ,18175   ,19455   ,19455   ,20735   ,20735   ,21503   ,21503   ,21759   ,21759   ,21503   ,21503   ,20991   ,\n    20991   ,20223   ,20223   ,19199   ,19199   ,17919   ,17919   ,16384   ,16384   ,14848   ,14848   ,13056   ,13056   ,11264   ,11264   ,\n    9728    ,9728    ,7936    ,7936    ,6656    ,6656    ,5376    ,5376    ,4352    ,4352    ,3328    ,3328    ,2816    ,2816    ,2816    ,\n    2816    ,2560    ,2560    ,2816    ,2816    ,3072    ,3072    ,3584    ,3584    ,4608    ,4608    ,5376    ,5376    ,6656    ,6656    ,\n    7680    ,7680    ,8960    ,8960    ,10240   ,10240   ,11520   ,11520   ,13056   ,13056   ,13824   ,13824   ,15104   ,15104   ,15616   ,\n    15616   ,16639   ,16639   ,17151   ,17151   ,17919   ,17919   ,17919   ,17919   ,17919   ,17919   ,17663   ,17663   ,17151   ,17151   ,\n    16639   ,16639   ,15872   ,15872   ,15104   ,15104   ,13824   ,13824   ,12544   ,12544   ,11520   ,11520   ,9984    ,9984    ,8704    ,\n    8704    ,7424    ,7424    ,5632    ,5632    ,4352    ,4352    ,2560    ,2560    ,1024    ,1024    ,-1280   ,-1280   ,-2816   ,-2816   ,\n    -4608   ,-4608   ,-5888   ,-5888   ,-7680   ,-7680   ,-8960   ,-8960   ,-10240  ,-10240  ,-11776  ,-11776  ,-12800  ,-12800  ,-14080  ,\n    -14080  ,-15360  ,-15360  ,-16128  ,-16128  ,-16895  ,-16895  ,-17407  ,-17407  ,-17919  ,-17919  ,-18175  ,-18175  ,-18175  ,-18175  ,\n    -18175  ,-18175  ,-17407  ,-17407  ,-16895  ,-16895  ,-15872  ,-15872  ,-15360  ,-15360  ,-14080  ,-14080  ,-13312  ,-13312  ,-11776  ,\n    -11776  ,-10496  ,-10496  ,-9216   ,-9216   ,-7936   ,-7936   ,-6912   ,-6912   ,-5632   ,-5632   ,-4864   ,-4864   ,-3840   ,-3840   ,\n    -3328   ,-3328   ,-3072   ,-3072   ,-2816   ,-2816   ,-3072   ,-3072   ,-3072   ,-3072   ,-3584   ,-3584   ,-4608   ,-4608   ,-5632   ,\n    -5632   ,-6912   ,-6912   ,-8192   ,-8192   ,-9984   ,-9984   ,-11520  ,-11520  ,-13312  ,-13312  ,-15104  ,-15104  ,-16639  ,-16639  ,\n    -18175  ,-18175  ,-19455  ,-19455  ,-20479  ,-20479  ,-21247  ,-21247  ,-21759  ,-21759  ,-22015  ,-22015  ,-21759  ,-21759  ,-20991  ,\n    -20991  ,-19711  ,-19711  ,-18431  ,-18431  ,-16639  ,-16639  ,-14592  ,-14592  ,-12288  ,-12288  ,-9472   ,-9472   ,-7168   ,-7168   ,\n    -3840   ,-3840   ,-768    ,-768    ,512     ,512     ,3584    ,3584    ,6912    ,6912    ,9472    ,9472    ,12288   ,12288   ,14592   ,\n    14592   ,16639   ,16639   ,18431   ,18431   ,19455   ,19455   ,20735   ,20735   ,21247   ,21247   ,21247   ,21247   ,20991   ,20991   ,\n    20223   ,20223   ,19199   ,19199   ,17919   ,17919   ,16639   ,16639   ,14848   ,14848   ,13312   ,13312   ,11520   ,11520   ,9472    ,\n    9472    ,8192    ,8192    ,6400    ,6400    ,5376    ,5376    ,4096    ,4096    ,3584    ,3584    ,2816    ,2816    ,2560    ,2560    ,\n    3072    ,3072    ,3072    ,3072    ,3840    ,3840    ,4608    ,4608    ,5376    ,5376    ,6656    ,6656    ,7680    ,7680    ,9216    ,\n    9216    ,10496   ,10496   ,11776   ,11776   ,13056   ,13056   ,14080   ,14080   ,15360   ,15360   ,15872   ,15872   ,16895   ,16895   ,\n    16895   ,16895   ,17407   ,17407   ,17407   ,17407   ,17663   ,17663   ,17151   ,17151   ,16384   ,16384   ,15616   ,15616   ,14848   ,\n    14848   ,13824   ,13824   ,12800   ,12800   ,11776   ,11776   ,10240   ,10240   ,8960    ,8960    ,7936    ,7936    ,6656    ,6656    ,\n    5632    ,5632    ,4608    ,4608    ,3328    ,3328    ,2560    ,2560    ,1280    ,1280    ,512     ,512     ,-768    ,-768    ,-1536   ,\n    -1536   ,-2816   ,-2816   ,-3584   ,-3584   ,-4864   ,-4864   ,-5888   ,-5888   ,-6912   ,-6912   ,-8192   ,-8192   ,-9216   ,-9216   ,\n    -10496  ,-10496  ,-12032  ,-12032  ,-13056  ,-13056  ,-14080  ,-14080  ,-15104  ,-15104  ,-15872  ,-15872  ,-16639  ,-16639  ,-17407  ,\n    -17407  ,-17919  ,-17919  ,-17663  ,-17663  ,-17663  ,-17663  ,-17151  ,-17151  ,-17151  ,-17151  ,-16128  ,-16128  ,-15616  ,-15616  ,\n    -14336  ,-14336  ,-13312  ,-13312  ,-12032  ,-12032  ,-10752  ,-10752  ,-9472   ,-9472   ,-7936   ,-7936   ,-6912   ,-6912   ,-5632   ,\n    -5632   ,-4864   ,-4864   ,-4096   ,-4096   ,-3328   ,-3328   ,-3328   ,-3328   ,-2816   ,-2816   ,-3072   ,-3072   ,-3840   ,-3840   ,\n    -4352   ,-4352   ,-5632   ,-5632   ,-6656   ,-6656   ,-8448   ,-8448   ,-9728   ,-9728   ,-11776  ,-11776  ,-13568  ,-13568  ,-15104  ,\n    -15104  ,-16895  ,-16895  ,-18175  ,-18175  ,-19455  ,-19455  ,-20479  ,-20479  ,-21247  ,-21247  ,-21503  ,-21503  ,-21503  ,-21503  ,\n    -20991  ,-20991  ,-19711  ,-19711  ,-18687  ,-18687  ,-16895  ,-16895  ,-14848  ,-14848  ,-12544  ,-12544  ,-9728   ,-9728   ,-7168   ,\n    -7168   ,-3840   ,-3840   ,-768    ,-768    ,512     ,512     ,3840    ,3840    ,7168    ,7168    ,9728    ,9728    ,12544   ,12544   ,\n    14848   ,14848   ,16895   ,16895   ,18687   ,18687   ,19711   ,19711   ,20735   ,20735   ,21247   ,21247   ,20991   ,20991   ,20479   ,\n    20479   ,19711   ,19711   ,18431   ,18431   ,16895   ,16895   ,15360   ,15360   ,13568   ,13568   ,11776   ,11776   ,9984    ,9984    ,\n    7936    ,7936    ,6656    ,6656    ,5120    ,5120    ,4096    ,4096    ,3072    ,3072    ,2816    ,2816    ,2560    ,2560    ,2560    ,\n    2560    ,3328    ,3328    ,3840    ,3840    ,4864    ,4864    ,6144    ,6144    ,7424    ,7424    ,8960    ,8960    ,10240   ,10240   ,\n    12032   ,12032   ,13312   ,13312   ,14592   ,14592   ,15872   ,15872   ,16895   ,16895   ,17919   ,17919   ,18175   ,18175   ,18687   ,\n    18687   ,18431   ,18431   ,18431   ,18431   ,17919   ,17919   ,17407   ,17407   ,16384   ,16384   ,15104   ,15104   ,13824   ,13824   ,\n    12544   ,12544   ,11008   ,11008   ,9728    ,9728    ,8448    ,8448    ,6912    ,6912    ,5632    ,5632    ,4608    ,4608    ,3584    ,\n    3584    ,2816    ,2816    ,2048    ,2048    ,1280    ,1280    ,1024    ,1024    ,256     ,256     ,0       ,0       ,-256    ,-256    ,\n    -512    ,-512    ,-1280   ,-1280   ,-1536   ,-1536   ,-2304   ,-2304   ,-3072   ,-3072   ,-3840   ,-3840   ,-4864   ,-4864   ,-5888   ,\n    -5888   ,-7168   ,-7168   ,-8704   ,-8704   ,-9984   ,-9984   ,-11264  ,-11264  ,-12800  ,-12800  ,-14080  ,-14080  ,-15360  ,-15360  ,\n    -16639  ,-16639  ,-17663  ,-17663  ,-18175  ,-18175  ,-18687  ,-18687  ,-18687  ,-18687  ,-18943  ,-18943  ,-18431  ,-18431  ,-18175  ,\n    -18175  ,-17151  ,-17151  ,-16128  ,-16128  ,-14848  ,-14848  ,-13568  ,-13568  ,-12288  ,-12288  ,-10496  ,-10496  ,-9216   ,-9216   ,\n    -7680   ,-7680   ,-6400   ,-6400   ,-5120   ,-5120   ,-4096   ,-4096   ,-3584   ,-3584   ,-2816   ,-2816   ,-2816   ,-2816   ,-3072   ,\n    -3072   ,-3328   ,-3328   ,-4352   ,-4352   ,-5376   ,-5376   ,-6912   ,-6912   ,-8192   ,-8192   ,-10240  ,-10240  ,-12032  ,-12032  ,\n    -13824  ,-13824  ,-15616  ,-15616  ,-17151  ,-17151  ,-18687  ,-18687  ,-19967  ,-19967  ,-20735  ,-20735  ,-21247  ,-21247  ,-21503  ,\n    -21503  ,-20991  ,-20991  ,-19967  ,-19967  ,-18943  ,-18943  ,-17151  ,-17151  ,-15104  ,-15104  ,-12800  ,-12800  ,-9984   ,-9984   ,\n    -7424   ,-7424   ,-4096   ,-4096   ,-768    ,-768    ,512     ,512     ,3840    ,3840    ,7168    ,7168    ,9984    ,9984    ,12800   ,\n    12800   ,15104   ,15104   ,17151   ,17151   ,18943   ,18943   ,19711   ,19711   ,20735   ,20735   ,20991   ,20991   ,20479   ,20479   ,\n    19967   ,19967   ,18943   ,18943   ,17407   ,17407   ,15616   ,15616   ,14080   ,14080   ,12032   ,12032   ,10240   ,10240   ,8192    ,\n    8192    ,6144    ,6144    ,5120    ,5120    ,3584    ,3584    ,2816    ,2816    ,1792    ,1792    ,2048    ,2048    ,2048    ,2048    ,\n    2304    ,2304    ,3584    ,3584    ,4352    ,4352    ,5888    ,5888    ,7424    ,7424    ,9216    ,9216    ,11008   ,11008   ,12544   ,\n    12544   ,14592   ,14592   ,16128   ,16128   ,17407   ,17407   ,18687   ,18687   ,19455   ,19455   ,20223   ,20223   ,20223   ,20223   ,\n    20479   ,20479   ,19711   ,19711   ,19199   ,19199   ,18175   ,18175   ,17151   ,17151   ,15360   ,15360   ,13568   ,13568   ,11776   ,\n    11776   ,10240   ,10240   ,8192    ,8192    ,6400    ,6400    ,5120    ,5120    ,3328    ,3328    ,2048    ,2048    ,1024    ,1024    ,\n    256     ,256     ,-256    ,-256    ,-768    ,-768    ,-1024   ,-1024   ,-768    ,-768    ,-1024   ,-1024   ,-768    ,-768    ,512     ,\n    512     ,768     ,768     ,512     ,512     ,768     ,768     ,512     ,512     ,0       ,0       ,-512    ,-512    ,-1280   ,-1280   ,\n    -2304   ,-2304   ,-3584   ,-3584   ,-5376   ,-5376   ,-6656   ,-6656   ,-8448   ,-8448   ,-10496  ,-10496  ,-12032  ,-12032  ,-13824  ,\n    -13824  ,-15616  ,-15616  ,-17407  ,-17407  ,-18431  ,-18431  ,-19455  ,-19455  ,-19967  ,-19967  ,-20735  ,-20735  ,-20479  ,-20479  ,\n    -20479  ,-20479  ,-19711  ,-19711  ,-18943  ,-18943  ,-17663  ,-17663  ,-16384  ,-16384  ,-14848  ,-14848  ,-12800  ,-12800  ,-11264  ,\n    -11264  ,-9472   ,-9472   ,-7680   ,-7680   ,-6144   ,-6144   ,-4608   ,-4608   ,-3840   ,-3840   ,-2560   ,-2560   ,-2304   ,-2304   ,\n    -2304   ,-2304   ,-2048   ,-2048   ,-3072   ,-3072   ,-3840   ,-3840   ,-5376   ,-5376   ,-6400   ,-6400   ,-8448   ,-8448   ,-10496  ,\n    -10496  ,-12288  ,-12288  ,-14336  ,-14336  ,-15872  ,-15872  ,-17663  ,-17663  ,-19199  ,-19199  ,-20223  ,-20223  ,-20735  ,-20735  ,\n    -21247  ,-21247  ,-20991  ,-20991  ,-19967  ,-19967  ,-19199  ,-19199  ,-17407  ,-17407  ,-15360  ,-15360  ,-13056  ,-13056  ,-10240  ,\n    -10240  ,-7424   ,-7424   ,-4096   ,-4096   ,-768    ,-768    ,512     ,512     ,4096    ,4096    ,7424    ,7424    ,10240   ,10240   ,\n    13056   ,13056   ,15360   ,15360   ,17407   ,17407   ,19199   ,19199   ,19967   ,19967   ,20735   ,20735   ,20991   ,20991   ,20223   ,\n    20223   ,19455   ,19455   ,18175   ,18175   ,16639   ,16639   ,14592   ,14592   ,12800   ,12800   ,10752   ,10752   ,8704    ,8704    ,\n    6656    ,6656    ,4608    ,4608    ,3584    ,3584    ,2304    ,2304    ,1536    ,1536    ,768     ,768     ,1280    ,1280    ,1536    ,\n    1536    ,2304    ,2304    ,3840    ,3840    ,5120    ,5120    ,6912    ,6912    ,8960    ,8960    ,11008   ,11008   ,13312   ,13312   ,\n    15104   ,15104   ,17407   ,17407   ,18943   ,18943   ,20223   ,20223   ,21503   ,21503   ,22271   ,22271   ,22783   ,22783   ,22527   ,\n    22527   ,22271   ,22271   ,21247   ,21247   ,20223   ,20223   ,18431   ,18431   ,16895   ,16895   ,14592   ,14592   ,12288   ,12288   ,\n    9984    ,9984    ,7936    ,7936    ,5376    ,5376    ,3328    ,3328    ,1792    ,1792    ,0       ,0       ,-1536   ,-1536   ,-2304   ,\n    -2304   ,-3072   ,-3072   ,-3328   ,-3328   ,-3328   ,-3328   ,-3328   ,-3328   ,-2560   ,-2560   ,-2048   ,-2048   ,-1280   ,-1280   ,\n    1024    ,1024    ,1792    ,1792    ,2304    ,2304    ,3072    ,3072    ,3072    ,3072    ,3072    ,3072    ,2816    ,2816    ,2048    ,\n    2048    ,1280    ,1280    ,-256    ,-256    ,-2048   ,-2048   ,-3584   ,-3584   ,-5632   ,-5632   ,-8192   ,-8192   ,-10240  ,-10240  ,\n    -12544  ,-12544  ,-14848  ,-14848  ,-17151  ,-17151  ,-18687  ,-18687  ,-20479  ,-20479  ,-21503  ,-21503  ,-22527  ,-22527  ,-22783  ,\n    -22783  ,-23039  ,-23039  ,-22527  ,-22527  ,-21759  ,-21759  ,-20479  ,-20479  ,-19199  ,-19199  ,-17663  ,-17663  ,-15360  ,-15360  ,\n    -13568  ,-13568  ,-11264  ,-11264  ,-9216   ,-9216   ,-7168   ,-7168   ,-5376   ,-5376   ,-4096   ,-4096   ,-2560   ,-2560   ,-1792   ,\n    -1792   ,-1536   ,-1536   ,-1024   ,-1024   ,-1792   ,-1792   ,-2560   ,-2560   ,-3840   ,-3840   ,-4864   ,-4864   ,-6912   ,-6912   ,\n    -8960   ,-8960   ,-11008  ,-11008  ,-13056  ,-13056  ,-14848  ,-14848  ,-16895  ,-16895  ,-18431  ,-18431  ,-19711  ,-19711  ,-20479  ,\n    -20479  ,-21247  ,-21247  ,-20991  ,-20991  ,-20223  ,-20223  ,-19455  ,-19455  ,-17663  ,-17663  ,-15616  ,-15616  ,-13312  ,-13312  ,\n    -10496  ,-10496  ,-7680   ,-7680   ,-4352   ,-4352   ,-768    ,-768    ,512     ,512     ,4096    ,4096    ,7680    ,7680    ,10496   ,\n    10496   ,13312   ,13312   ,15616   ,15616   ,17663   ,17663   ,19455   ,19455   ,20223   ,20223   ,20735   ,20735   ,20735   ,20735   ,\n    19967   ,19967   ,18943   ,18943   ,17407   ,17407   ,15616   ,15616   ,13568   ,13568   ,11520   ,11520   ,9216    ,9216    ,7168    ,\n    7168    ,5120    ,5120    ,3072    ,3072    ,2048    ,2048    ,768     ,768     ,256     ,256     ,-256    ,-256    ,512     ,512     ,\n    1024    ,1024    ,2304    ,2304    ,4096    ,4096    ,5888    ,5888    ,7936    ,7936    ,10496   ,10496   ,12800   ,12800   ,15616   ,\n    15616   ,17663   ,17663   ,19967   ,19967   ,21759   ,21759   ,23039   ,23039   ,24319   ,24319   ,24831   ,24831   ,25343   ,25343   ,\n    24575   ,24575   ,24063   ,24063   ,22527   ,22527   ,20991   ,20991   ,18687   ,18687   ,16639   ,16639   ,13824   ,13824   ,11008   ,\n    11008   ,8192    ,8192    ,5632    ,5632    ,2560    ,2560    ,256     ,256     ,-1536   ,-1536   ,-3584   ,-3584   ,-5120   ,-5120   ,\n    -5888   ,-5888   ,-6400   ,-6400   ,-6400   ,-6400   ,-5888   ,-5888   ,-5632   ,-5632   ,-4352   ,-4352   ,-3328   ,-3328   ,-1792   ,\n    -1792   ,1536    ,1536    ,3072    ,3072    ,4096    ,4096    ,5376    ,5376    ,5632    ,5632    ,6144    ,6144    ,6144    ,6144    ,\n    5632    ,5632    ,4864    ,4864    ,3328    ,3328    ,1280    ,1280    ,-512    ,-512    ,-2816   ,-2816   ,-5888   ,-5888   ,-8448   ,\n    -8448   ,-11264  ,-11264  ,-14080  ,-14080  ,-16895  ,-16895  ,-18943  ,-18943  ,-21247  ,-21247  ,-22783  ,-22783  ,-24319  ,-24319  ,\n    -24831  ,-24831  ,-25599  ,-25599  ,-25087  ,-25087  ,-24575  ,-24575  ,-23295  ,-23295  ,-22015  ,-22015  ,-20223  ,-20223  ,-17919  ,\n    -17919  ,-15872  ,-15872  ,-13056  ,-13056  ,-10752  ,-10752  ,-8192   ,-8192   ,-6144   ,-6144   ,-4352   ,-4352   ,-2560   ,-2560   ,\n    -1280   ,-1280   ,-768    ,-768    ,0       ,0       ,-512    ,-512    ,-1024   ,-1024   ,-2304   ,-2304   ,-3328   ,-3328   ,-5376   ,\n    -5376   ,-7424   ,-7424   ,-9472   ,-9472   ,-11776  ,-11776  ,-13824  ,-13824  ,-15872  ,-15872  ,-17663  ,-17663  ,-19199  ,-19199  ,\n    -20223  ,-20223  ,-20991  ,-20991  ,-20991  ,-20991  ,-20479  ,-20479  ,-19711  ,-19711  ,-17919  ,-17919  ,-15872  ,-15872  ,-13568  ,\n    -13568  ,-10752  ,-10752  ,-7936   ,-7936   ,-4352   ,-4352   ,-768    ,-768    ,512     ,512     ,4352    ,4352    ,7936    ,7936    ,\n    10752   ,10752   ,13824   ,13824   ,15872   ,15872   ,17919   ,17919   ,19711   ,19711   ,20479   ,20479   ,20735   ,20735   ,20735   ,\n    20735   ,19711   ,19711   ,18431   ,18431   ,16895   ,16895   ,14848   ,14848   ,12544   ,12544   ,10240   ,10240   ,7936    ,7936    ,\n    5632    ,5632    ,3584    ,3584    ,1536    ,1536    ,512     ,512     ,-512    ,-512    ,-1024   ,-1024   ,-1280   ,-1280   ,-256    ,\n    -256    ,768     ,768     ,2304    ,2304    ,4352    ,4352    ,6656    ,6656    ,9216    ,9216    ,12032   ,12032   ,14848   ,14848   ,\n    17919   ,17919   ,20223   ,20223   ,22783   ,22783   ,24575   ,24575   ,25855   ,25855   ,27135   ,27135   ,27647   ,27647   ,27903   ,\n    27903   ,26879   ,26879   ,25855   ,25855   ,24063   ,24063   ,22015   ,22015   ,19199   ,19199   ,16384   ,16384   ,13056   ,13056   ,\n    9728    ,9728    ,6400    ,6400    ,3328    ,3328    ,0       ,0       ,-2816   ,-2816   ,-4864   ,-4864   ,-6912   ,-6912   ,-8448   ,\n    -8448   ,-9216   ,-9216   ,-9472   ,-9472   ,-9216   ,-9216   ,-8448   ,-8448   ,-7680   ,-7680   ,-5888   ,-5888   ,-4352   ,-4352   ,\n    -2304   ,-2304   ,2048    ,2048    ,4096    ,4096    ,5632    ,5632    ,7424    ,7424    ,8192    ,8192    ,8960    ,8960    ,9216    ,\n    9216    ,8960    ,8960    ,8192    ,8192    ,6656    ,6656    ,4608    ,4608    ,2560    ,2560    ,-256    ,-256    ,-3584   ,-3584   ,\n    -6656   ,-6656   ,-9984   ,-9984   ,-13312  ,-13312  ,-16639  ,-16639  ,-19455  ,-19455  ,-22271  ,-22271  ,-24319  ,-24319  ,-26111  ,\n    -26111  ,-27135  ,-27135  ,-28159  ,-28159  ,-27903  ,-27903  ,-27391  ,-27391  ,-26111  ,-26111  ,-24831  ,-24831  ,-23039  ,-23039  ,\n    -20479  ,-20479  ,-18175  ,-18175  ,-15104  ,-15104  ,-12288  ,-12288  ,-9472   ,-9472   ,-6912   ,-6912   ,-4608   ,-4608   ,-2560   ,\n    -2560   ,-1024   ,-1024   ,0       ,0       ,1024    ,1024    ,768     ,768     ,256     ,256     ,-768    ,-768    ,-1792   ,-1792   ,\n    -3840   ,-3840   ,-5888   ,-5888   ,-8192   ,-8192   ,-10496  ,-10496  ,-12800  ,-12800  ,-15104  ,-15104  ,-17151  ,-17151  ,-18687  ,\n    -18687  ,-19967  ,-19967  ,-20991  ,-20991  ,-20991  ,-20991  ,-20735  ,-20735  ,-19967  ,-19967  ,-18175  ,-18175  ,-16128  ,-16128  ,\n    -14080  ,-14080  ,-11008  ,-11008  ,-8192   ,-8192   ,-4608   ,-4608   ,-768    ,-768    ,512     ,512     ,4352    ,4352    ,7936    ,\n    7936    ,10752   ,10752   ,13824   ,13824   ,15872   ,15872   ,17919   ,17919   ,19711   ,19711   ,20223   ,20223   ,20223   ,20223   ,\n    19967   ,19967   ,18943   ,18943   ,17407   ,17407   ,15616   ,15616   ,13568   ,13568   ,11264   ,11264   ,8960    ,8960    ,6656    ,\n    6656    ,4608    ,4608    ,2560    ,2560    ,1024    ,1024    ,256     ,256     ,-256    ,-256    ,-256    ,-256    ,-256    ,-256    ,\n    1280    ,1280    ,2560    ,2560    ,4352    ,4352    ,6656    ,6656    ,8960    ,8960    ,11264   ,11264   ,14080   ,14080   ,16639   ,\n    16639   ,19199   ,19199   ,20991   ,20991   ,23039   ,23039   ,24063   ,24063   ,24831   ,24831   ,25599   ,25599   ,25343   ,25343   ,\n    25343   ,25343   ,23807   ,23807   ,22783   ,22783   ,20735   ,20735   ,18943   ,18943   ,16384   ,16384   ,13824   ,13824   ,11008   ,\n    11008   ,8448    ,8448    ,5888    ,5888    ,3584    ,3584    ,1024    ,1024    ,-1280   ,-1280   ,-2560   ,-2560   ,-4096   ,-4096   ,\n    -5376   ,-5376   ,-5888   ,-5888   ,-6144   ,-6144   ,-5888   ,-5888   ,-5376   ,-5376   ,-5120   ,-5120   ,-3840   ,-3840   ,-3072   ,\n    -3072   ,-1792   ,-1792   ,1536    ,1536    ,2816    ,2816    ,3584    ,3584    ,4864    ,4864    ,5120    ,5120    ,5632    ,5632    ,\n    5888    ,5888    ,5632    ,5632    ,5120    ,5120    ,3840    ,3840    ,2304    ,2304    ,1024    ,1024    ,-1280   ,-1280   ,-3840   ,\n    -3840   ,-6144   ,-6144   ,-8704   ,-8704   ,-11264  ,-11264  ,-14080  ,-14080  ,-16639  ,-16639  ,-19199  ,-19199  ,-20991  ,-20991  ,\n    -23039  ,-23039  ,-24063  ,-24063  ,-25599  ,-25599  ,-25599  ,-25599  ,-25855  ,-25855  ,-25087  ,-25087  ,-24319  ,-24319  ,-23295  ,\n    -23295  ,-21247  ,-21247  ,-19455  ,-19455  ,-16895  ,-16895  ,-14336  ,-14336  ,-11520  ,-11520  ,-9216   ,-9216   ,-6912   ,-6912   ,\n    -4608   ,-4608   ,-2816   ,-2816   ,-1536   ,-1536   ,0       ,0       ,0       ,0       ,0       ,0       ,-512    ,-512    ,-1280   ,\n    -1280   ,-2816   ,-2816   ,-4864   ,-4864   ,-6912   ,-6912   ,-9216   ,-9216   ,-11520  ,-11520  ,-13824  ,-13824  ,-15872  ,-15872  ,\n    -17663  ,-17663  ,-19199  ,-19199  ,-20223  ,-20223  ,-20479  ,-20479  ,-20479  ,-20479  ,-19967  ,-19967  ,-18175  ,-18175  ,-16128  ,\n    -16128  ,-14080  ,-14080  ,-11008  ,-11008  ,-8192   ,-8192   ,-4608   ,-4608   ,-768    ,-768    ,512     ,512     ,4352    ,4352    ,\n    8192    ,8192    ,11008   ,11008   ,14080   ,14080   ,16128   ,16128   ,18175   ,18175   ,19711   ,19711   ,19967   ,19967   ,19967   ,\n    19967   ,19455   ,19455   ,18175   ,18175   ,16384   ,16384   ,14592   ,14592   ,12288   ,12288   ,9984    ,9984    ,7680    ,7680    ,\n    5376    ,5376    ,3584    ,3584    ,1792    ,1792    ,512     ,512     ,256     ,256     ,0       ,0       ,512     ,512     ,1024    ,\n    1024    ,2816    ,2816    ,4352    ,4352    ,6400    ,6400    ,8960    ,8960    ,11264   ,11264   ,13568   ,13568   ,16128   ,16128   ,\n    18431   ,18431   ,20479   ,20479   ,21759   ,21759   ,23295   ,23295   ,23807   ,23807   ,23807   ,23807   ,24063   ,24063   ,23295   ,\n    23295   ,22783   ,22783   ,20991   ,20991   ,19711   ,19711   ,17663   ,17663   ,15872   ,15872   ,13568   ,13568   ,11520   ,11520   ,\n    9216    ,9216    ,7168    ,7168    ,5376    ,5376    ,3840    ,3840    ,2048    ,2048    ,512     ,512     ,-256    ,-256    ,-1280   ,\n    -1280   ,-2048   ,-2048   ,-2304   ,-2304   ,-2560   ,-2560   ,-2560   ,-2560   ,-2304   ,-2304   ,-2304   ,-2304   ,-1536   ,-1536   ,\n    -1536   ,-1536   ,-1024   ,-1024   ,768     ,768     ,1280    ,1280    ,1280    ,1280    ,2048    ,2048    ,2048    ,2048    ,2304    ,\n    2304    ,2304    ,2304    ,2048    ,2048    ,1792    ,1792    ,1024    ,1024    ,0       ,0       ,-768    ,-768    ,-2304   ,-2304   ,\n    -4096   ,-4096   ,-5632   ,-5632   ,-7424   ,-7424   ,-9472   ,-9472   ,-11776  ,-11776  ,-13824  ,-13824  ,-16128  ,-16128  ,-17919  ,\n    -17919  ,-19967  ,-19967  ,-21247  ,-21247  ,-23039  ,-23039  ,-23551  ,-23551  ,-24319  ,-24319  ,-24063  ,-24063  ,-24063  ,-24063  ,\n    -23551  ,-23551  ,-22015  ,-22015  ,-20735  ,-20735  ,-18687  ,-18687  ,-16384  ,-16384  ,-13824  ,-13824  ,-11520  ,-11520  ,-9216   ,\n    -9216   ,-6656   ,-6656   ,-4608   ,-4608   ,-3072   ,-3072   ,-1280   ,-1280   ,-768    ,-768    ,-256    ,-256    ,-512    ,-512    ,\n    -768    ,-768    ,-2048   ,-2048   ,-3840   ,-3840   ,-5632   ,-5632   ,-7936   ,-7936   ,-10240  ,-10240  ,-12544  ,-12544  ,-14848  ,\n    -14848  ,-16639  ,-16639  ,-18431  ,-18431  ,-19711  ,-19711  ,-20223  ,-20223  ,-20223  ,-20223  ,-19967  ,-19967  ,-18431  ,-18431  ,\n    -16384  ,-16384  ,-14336  ,-14336  ,-11264  ,-11264  ,-8448   ,-8448   ,-4608   ,-4608   ,-768    ,-768    ,512     ,512     ,4352    ,\n    4352    ,8192    ,8192    ,11264   ,11264   ,14336   ,14336   ,16384   ,16384   ,18175   ,18175   ,19711   ,19711   ,19711   ,19711   ,\n    19455   ,19455   ,18943   ,18943   ,17407   ,17407   ,15360   ,15360   ,13568   ,13568   ,11008   ,11008   ,8704    ,8704    ,6400    ,\n    6400    ,4096    ,4096    ,2560    ,2560    ,1024    ,1024    ,0       ,0       ,0       ,0       ,256     ,256     ,1280    ,1280    ,\n    2048    ,2048    ,4352    ,4352    ,6144    ,6144    ,8448    ,8448    ,11264   ,11264   ,13568   ,13568   ,15872   ,15872   ,18175   ,\n    18175   ,20223   ,20223   ,21759   ,21759   ,22527   ,22527   ,23551   ,23551   ,23551   ,23551   ,22783   ,22783   ,22527   ,22527   ,\n    21247   ,21247   ,20223   ,20223   ,18175   ,18175   ,16639   ,16639   ,14592   ,14592   ,12800   ,12800   ,10752   ,10752   ,8960    ,\n    8960    ,7424    ,7424    ,5888    ,5888    ,4864    ,4864    ,4096    ,4096    ,3072    ,3072    ,2304    ,2304    ,2048    ,2048    ,\n    1536    ,1536    ,1280    ,1280    ,1024    ,1024    ,1024    ,1024    ,768     ,768     ,768     ,768     ,512     ,512     ,512     ,\n    512     ,0       ,0       ,-256    ,-256    ,0       ,0       ,-256    ,-256    ,-768    ,-768    ,-768    ,-768    ,-1024   ,-1024   ,\n    -1024   ,-1024   ,-1280   ,-1280   ,-1280   ,-1280   ,-1536   ,-1536   ,-1792   ,-1792   ,-2304   ,-2304   ,-2560   ,-2560   ,-3328   ,\n    -3328   ,-4352   ,-4352   ,-5120   ,-5120   ,-6144   ,-6144   ,-7680   ,-7680   ,-9216   ,-9216   ,-11008  ,-11008  ,-13056  ,-13056  ,\n    -14848  ,-14848  ,-16895  ,-16895  ,-18431  ,-18431  ,-20479  ,-20479  ,-21503  ,-21503  ,-22783  ,-22783  ,-23039  ,-23039  ,-23807  ,\n    -23807  ,-23807  ,-23807  ,-22783  ,-22783  ,-22015  ,-22015  ,-20479  ,-20479  ,-18431  ,-18431  ,-16128  ,-16128  ,-13824  ,-13824  ,\n    -11520  ,-11520  ,-8704   ,-8704   ,-6400   ,-6400   ,-4608   ,-4608   ,-2304   ,-2304   ,-1536   ,-1536   ,-512    ,-512    ,-256    ,\n    -256    ,-256    ,-256    ,-1280   ,-1280   ,-2816   ,-2816   ,-4352   ,-4352   ,-6656   ,-6656   ,-8960   ,-8960   ,-11264  ,-11264  ,\n    -13824  ,-13824  ,-15616  ,-15616  ,-17663  ,-17663  ,-19199  ,-19199  ,-19711  ,-19711  ,-19967  ,-19967  ,-19967  ,-19967  ,-18431  ,\n    -18431  ,-16639  ,-16639  ,-14592  ,-14592  ,-11520  ,-11520  ,-8448   ,-8448   ,-4608   ,-4608   ,-768    ,-768    ,512     ,512     ,\n    4608    ,4608    ,8448    ,8448    ,11520   ,11520   ,14592   ,14592   ,16639   ,16639   ,18431   ,18431   ,19711   ,19711   ,19711   ,\n    19711   ,19199   ,19199   ,18431   ,18431   ,16639   ,16639   ,14592   ,14592   ,12544   ,12544   ,9984    ,9984    ,7424    ,7424    ,\n    5120    ,5120    ,3072    ,3072    ,1536    ,1536    ,256     ,256     ,-256    ,-256    ,0       ,0       ,512     ,512     ,2048    ,\n    2048    ,3328    ,3328    ,5888    ,5888    ,8192    ,8192    ,10752   ,10752   ,13568   ,13568   ,15872   ,15872   ,18175   ,18175   ,\n    20223   ,20223   ,22015   ,22015   ,23039   ,23039   ,23551   ,23551   ,23807   ,23807   ,23295   ,23295   ,22015   ,22015   ,20991   ,\n    20991   ,19199   ,19199   ,17663   ,17663   ,15360   ,15360   ,13568   ,13568   ,11520   ,11520   ,9728    ,9728    ,7936    ,7936    ,\n    6656    ,6656    ,5632    ,5632    ,4864    ,4864    ,4352    ,4352    ,4352    ,4352    ,4096    ,4096    ,4096    ,4096    ,4352    ,\n    4352    ,4608    ,4608    ,4608    ,4608    ,4608    ,4608    ,4608    ,4608    ,4352    ,4352    ,4096    ,4096    ,3328    ,3328    ,\n    2816    ,2816    ,1536    ,1536    ,512     ,512     ,-768    ,-768    ,-1792   ,-1792   ,-3072   ,-3072   ,-3584   ,-3584   ,-4352   ,\n    -4352   ,-4608   ,-4608   ,-4864   ,-4864   ,-4864   ,-4864   ,-4864   ,-4864   ,-4864   ,-4864   ,-4608   ,-4608   ,-4352   ,-4352   ,\n    -4352   ,-4352   ,-4608   ,-4608   ,-4608   ,-4608   ,-5120   ,-5120   ,-5888   ,-5888   ,-6912   ,-6912   ,-8192   ,-8192   ,-9984   ,\n    -9984   ,-11776  ,-11776  ,-13824  ,-13824  ,-15616  ,-15616  ,-17919  ,-17919  ,-19455  ,-19455  ,-21247  ,-21247  ,-22271  ,-22271  ,\n    -23551  ,-23551  ,-24063  ,-24063  ,-23807  ,-23807  ,-23295  ,-23295  ,-22271  ,-22271  ,-20479  ,-20479  ,-18431  ,-18431  ,-16128  ,\n    -16128  ,-13824  ,-13824  ,-11008  ,-11008  ,-8448   ,-8448   ,-6144   ,-6144   ,-3584   ,-3584   ,-2304   ,-2304   ,-768    ,-768    ,\n    -256    ,-256    ,0       ,0       ,-512    ,-512    ,-1792   ,-1792   ,-3328   ,-3328   ,-5376   ,-5376   ,-7680   ,-7680   ,-10240  ,\n    -10240  ,-12800  ,-12800  ,-14848  ,-14848  ,-16895  ,-16895  ,-18687  ,-18687  ,-19455  ,-19455  ,-19967  ,-19967  ,-19967  ,-19967  ,\n    -18687  ,-18687  ,-16895  ,-16895  ,-14848  ,-14848  ,-11776  ,-11776  ,-8704   ,-8704   ,-4864   ,-4864   ,-768    ,-768    ,512     ,\n    512     ,4608    ,4608    ,8448    ,8448    ,11776   ,11776   ,14592   ,14592   ,16895   ,16895   ,18431   ,18431   ,19711   ,19711   ,\n    19455   ,19455   ,18687   ,18687   ,17919   ,17919   ,15872   ,15872   ,13568   ,13568   ,11264   ,11264   ,8704    ,8704    ,6144    ,\n    6144    ,3840    ,3840    ,1792    ,1792    ,512     ,512     ,-512    ,-512    ,-768    ,-768    ,-256    ,-256    ,768     ,768     ,\n    2816    ,2816    ,4352    ,4352    ,7424    ,7424    ,9984    ,9984    ,12800   ,12800   ,15872   ,15872   ,18175   ,18175   ,20479   ,\n    20479   ,22271   ,22271   ,23807   ,23807   ,24319   ,24319   ,24319   ,24319   ,24063   ,24063   ,22783   ,22783   ,20991   ,20991   ,\n    19455   ,19455   ,16895   ,16895   ,15104   ,15104   ,12288   ,12288   ,10496   ,10496   ,8192    ,8192    ,6656    ,6656    ,5120    ,\n    5120    ,4096    ,4096    ,3840    ,3840    ,3584    ,3584    ,3840    ,3840    ,4608    ,4608    ,5120    ,5120    ,5632    ,5632    ,\n    6656    ,6656    ,7424    ,7424    ,7680    ,7680    ,7936    ,7936    ,8192    ,8192    ,7680    ,7680    ,7168    ,7168    ,5888    ,\n    5888    ,4864    ,4864    ,3072    ,3072    ,1280    ,1280    ,-1536   ,-1536   ,-3328   ,-3328   ,-5120   ,-5120   ,-6144   ,-6144   ,\n    -7424   ,-7424   ,-7936   ,-7936   ,-8448   ,-8448   ,-8192   ,-8192   ,-7936   ,-7936   ,-7680   ,-7680   ,-6912   ,-6912   ,-5888   ,\n    -5888   ,-5376   ,-5376   ,-4864   ,-4864   ,-4096   ,-4096   ,-3840   ,-3840   ,-4096   ,-4096   ,-4352   ,-4352   ,-5376   ,-5376   ,\n    -6912   ,-6912   ,-8448   ,-8448   ,-10752  ,-10752  ,-12544  ,-12544  ,-15360  ,-15360  ,-17151  ,-17151  ,-19711  ,-19711  ,-21247  ,\n    -21247  ,-23039  ,-23039  ,-24319  ,-24319  ,-24575  ,-24575  ,-24575  ,-24575  ,-24063  ,-24063  ,-22527  ,-22527  ,-20735  ,-20735  ,\n    -18431  ,-18431  ,-16128  ,-16128  ,-13056  ,-13056  ,-10240  ,-10240  ,-7680   ,-7680   ,-4608   ,-4608   ,-3072   ,-3072   ,-1024   ,\n    -1024   ,0       ,0       ,512     ,512     ,256     ,256     ,-768    ,-768    ,-2048   ,-2048   ,-4096   ,-4096   ,-6400   ,-6400   ,\n    -8960   ,-8960   ,-11520  ,-11520  ,-13824  ,-13824  ,-16128  ,-16128  ,-18175  ,-18175  ,-18943  ,-18943  ,-19711  ,-19711  ,-19967  ,\n    -19967  ,-18687  ,-18687  ,-17151  ,-17151  ,-14848  ,-14848  ,-12032  ,-12032  ,-8704   ,-8704   ,-4864   ,-4864   ,-768    ,-768    ,\n    512     ,512     ,4608    ,4608    ,8704    ,8704    ,12032   ,12032   ,14848   ,14848   ,17151   ,17151   ,18687   ,18687   ,19711   ,\n    19711   ,19455   ,19455   ,18431   ,18431   ,17407   ,17407   ,15104   ,15104   ,12544   ,12544   ,10240   ,10240   ,7424    ,7424    ,\n    4864    ,4864    ,2560    ,2560    ,768     ,768     ,-512    ,-512    ,-1280   ,-1280   ,-1280   ,-1280   ,-256    ,-256    ,1024    ,\n    1024    ,3584    ,3584    ,5632    ,5632    ,8960    ,8960    ,12032   ,12032   ,15104   ,15104   ,18175   ,18175   ,20479   ,20479   ,\n    22783   ,22783   ,24319   ,24319   ,25599   ,25599   ,25599   ,25599   ,25087   ,25087   ,24319   ,24319   ,22527   ,22527   ,20223   ,\n    20223   ,17919   ,17919   ,14848   ,14848   ,12544   ,12544   ,9472    ,9472    ,7424    ,7424    ,5120    ,5120    ,3584    ,3584    ,\n    2304    ,2304    ,1792    ,1792    ,2048    ,2048    ,2304    ,2304    ,3328    ,3328    ,4864    ,4864    ,6144    ,6144    ,7424    ,\n    7424    ,8960    ,8960    ,10240   ,10240   ,11008   ,11008   ,11520   ,11520   ,11776   ,11776   ,11264   ,11264   ,10240   ,10240   ,\n    8704    ,8704    ,7168    ,7168    ,4608    ,4608    ,2048    ,2048    ,-2304   ,-2304   ,-4864   ,-4864   ,-7424   ,-7424   ,-8960   ,\n    -8960   ,-10496  ,-10496  ,-11520  ,-11520  ,-12032  ,-12032  ,-11776  ,-11776  ,-11264  ,-11264  ,-10496  ,-10496  ,-9216   ,-9216   ,\n    -7680   ,-7680   ,-6400   ,-6400   ,-5120   ,-5120   ,-3584   ,-3584   ,-2560   ,-2560   ,-2304   ,-2304   ,-2048   ,-2048   ,-2560   ,\n    -2560   ,-3840   ,-3840   ,-5376   ,-5376   ,-7680   ,-7680   ,-9728   ,-9728   ,-12800  ,-12800  ,-15104  ,-15104  ,-18175  ,-18175  ,\n    -20479  ,-20479  ,-22783  ,-22783  ,-24575  ,-24575  ,-25343  ,-25343  ,-25855  ,-25855  ,-25855  ,-25855  ,-24575  ,-24575  ,-23039  ,\n    -23039  ,-20735  ,-20735  ,-18431  ,-18431  ,-15360  ,-15360  ,-12288  ,-12288  ,-9216   ,-9216   ,-5888   ,-5888   ,-3840   ,-3840   ,\n    -1280   ,-1280   ,0       ,0       ,1024    ,1024    ,1024    ,1024    ,256     ,256     ,-1024   ,-1024   ,-2816   ,-2816   ,-5120   ,\n    -5120   ,-7680   ,-7680   ,-10496  ,-10496  ,-12800  ,-12800  ,-15360  ,-15360  ,-17663  ,-17663  ,-18687  ,-18687  ,-19711  ,-19711  ,\n    -19967  ,-19967  ,-18943  ,-18943  ,-17407  ,-17407  ,-15104  ,-15104  ,-12288  ,-12288  ,-8960   ,-8960   ,-4864   ,-4864   ,-768    ,\n    -768    ,512     ,512     ,4608    ,4608    ,8960    ,8960    ,12288   ,12288   ,15104   ,15104   ,17407   ,17407   ,18943   ,18943   ,\n    19711   ,19711   ,19199   ,19199   ,18175   ,18175   ,16895   ,16895   ,14336   ,14336   ,11520   ,11520   ,9216    ,9216    ,6144    ,\n    6144    ,3584    ,3584    ,1280    ,1280    ,-512    ,-512    ,-1536   ,-1536   ,-2048   ,-2048   ,-1792   ,-1792   ,-256    ,-256    ,\n    1280    ,1280    ,4352    ,4352    ,6912    ,6912    ,10496   ,10496   ,13824   ,13824   ,17151   ,17151   ,20479   ,20479   ,22783   ,\n    22783   ,25087   ,25087   ,26367   ,26367   ,27391   ,27391   ,26879   ,26879   ,25855   ,25855   ,24575   ,24575   ,22271   ,22271   ,\n    19199   ,19199   ,16384   ,16384   ,12800   ,12800   ,9984    ,9984    ,6656    ,6656    ,4352    ,4352    ,2048    ,2048    ,512     ,\n    512     ,-512    ,-512    ,-512    ,-512    ,256     ,256     ,1024    ,1024    ,2816    ,2816    ,5120    ,5120    ,7168    ,7168    ,\n    9216    ,9216    ,11264   ,11264   ,13056   ,13056   ,14336   ,14336   ,15104   ,15104   ,15360   ,15360   ,14592   ,14592   ,13312   ,\n    13312   ,11520   ,11520   ,9216    ,9216    ,6144    ,6144    ,2816    ,2816    ,-3072   ,-3072   ,-6400   ,-6400   ,-9472   ,-9472   ,\n    -11776  ,-11776  ,-13568  ,-13568  ,-14848  ,-14848  ,-15616  ,-15616  ,-15360  ,-15360  ,-14592  ,-14592  ,-13312  ,-13312  ,-11520  ,\n    -11520  ,-9472   ,-9472   ,-7424   ,-7424   ,-5376   ,-5376   ,-3072   ,-3072   ,-1280   ,-1280   ,-512    ,-512    ,256     ,256     ,\n    256     ,256     ,-768    ,-768    ,-2304   ,-2304   ,-4608   ,-4608   ,-6912   ,-6912   ,-10240  ,-10240  ,-13056  ,-13056  ,-16639  ,\n    -16639  ,-19455  ,-19455  ,-22527  ,-22527  ,-24831  ,-24831  ,-26111  ,-26111  ,-27135  ,-27135  ,-27647  ,-27647  ,-26623  ,-26623  ,\n    -25343  ,-25343  ,-23039  ,-23039  ,-20735  ,-20735  ,-17407  ,-17407  ,-14080  ,-14080  ,-10752  ,-10752  ,-7168   ,-7168   ,-4608   ,\n    -4608   ,-1536   ,-1536   ,0       ,0       ,1536    ,1536    ,1792    ,1792    ,1280    ,1280    ,256     ,256     ,-1536   ,-1536   ,\n    -3840   ,-3840   ,-6400   ,-6400   ,-9472   ,-9472   ,-11776  ,-11776  ,-14592  ,-14592  ,-17151  ,-17151  ,-18431  ,-18431  ,-19455  ,\n    -19455  ,-19967  ,-19967  ,-19199  ,-19199  ,-17663  ,-17663  ,-15360  ,-15360  ,-12544  ,-12544  ,-9216   ,-9216   ,-4864   ,-4864   ,\n    -768    ,-768    ,512     ,512     ,4864    ,4864    ,9216    ,9216    ,12544   ,12544   ,15360   ,15360   ,17663   ,17663   ,19199   ,\n    19199   ,19711   ,19711   ,19199   ,19199   ,17919   ,17919   ,16384   ,16384   ,13568   ,13568   ,10752   ,10752   ,8192    ,8192    ,\n    5120    ,5120    ,2304    ,2304    ,0       ,0       ,-1536   ,-1536   ,-2560   ,-2560   ,-2816   ,-2816   ,-2048   ,-2048   ,-256    ,\n    -256    ,1792    ,1792    ,5120    ,5120    ,8192    ,8192    ,12032   ,12032   ,15872   ,15872   ,19455   ,19455   ,22783   ,22783   ,\n    25343   ,25343   ,27391   ,27391   ,28671   ,28671   ,29183   ,29183   ,28415   ,28415   ,26879   ,26879   ,24831   ,24831   ,22015   ,\n    22015   ,18431   ,18431   ,14848   ,14848   ,10752   ,10752   ,7680    ,7680    ,3840    ,3840    ,1280    ,1280    ,-1024   ,-1024   ,\n    -2560   ,-2560   ,-3328   ,-3328   ,-2816   ,-2816   ,-1536   ,-1536   ,0       ,0       ,2304    ,2304    ,5376    ,5376    ,8192    ,\n    8192    ,11008   ,11008   ,13824   ,13824   ,16128   ,16128   ,17663   ,17663   ,18687   ,18687   ,18943   ,18943   ,18175   ,18175   ,\n    16639   ,16639   ,14336   ,14336   ,11520   ,11520   ,7680    ,7680    ,3584    ,3584    ,-3840   ,-3840   ,-7936   ,-7936   ,-11776  ,\n    -11776  ,-14592  ,-14592  ,-16895  ,-16895  ,-18431  ,-18431  ,-19199  ,-19199  ,-18943  ,-18943  ,-17919  ,-17919  ,-16384  ,-16384  ,\n    -14080  ,-14080  ,-11264  ,-11264  ,-8448   ,-8448   ,-5632   ,-5632   ,-2560   ,-2560   ,-256    ,-256    ,1280    ,1280    ,2560    ,\n    2560    ,3072    ,3072    ,2304    ,2304    ,768     ,768     ,-1536   ,-1536   ,-4096   ,-4096   ,-7936   ,-7936   ,-11008  ,-11008  ,\n    -15104  ,-15104  ,-18687  ,-18687  ,-22271  ,-22271  ,-25087  ,-25087  ,-27135  ,-27135  ,-28671  ,-28671  ,-29439  ,-29439  ,-28927  ,\n    -28927  ,-27647  ,-27647  ,-25599  ,-25599  ,-23039  ,-23039  ,-19711  ,-19711  ,-16128  ,-16128  ,-12288  ,-12288  ,-8448   ,-8448   ,\n    -5376   ,-5376   ,-2048   ,-2048   ,0       ,0       ,1792    ,1792    ,2560    ,2560    ,2304    ,2304    ,1280    ,1280    ,-256    ,\n    -256    ,-2560   ,-2560   ,-5376   ,-5376   ,-8448   ,-8448   ,-11008  ,-11008  ,-13824  ,-13824  ,-16639  ,-16639  ,-18175  ,-18175  ,\n    -19455  ,-19455  ,-19967  ,-19967  ,-19455  ,-19455  ,-17919  ,-17919  ,-15616  ,-15616  ,-12800  ,-12800  ,-9472   ,-9472   ,-5120   ,\n    -5120   ,-768    ,-768    ,512     ,512     ,4864    ,4864    ,9216    ,9216    ,12544   ,12544   ,15360   ,15360   ,17663   ,17663   ,\n    18943   ,18943   ,19455   ,19455   ,18687   ,18687   ,17151   ,17151   ,15360   ,15360   ,12544   ,12544   ,9728    ,9728    ,6912    ,\n    6912    ,4096    ,4096    ,1536    ,1536    ,-512    ,-512    ,-1792   ,-1792   ,-2304   ,-2304   ,-2304   ,-2304   ,-1024   ,-1024   ,\n    1024    ,1024    ,3584    ,3584    ,6912    ,6912    ,9984    ,9984    ,13824   ,13824   ,17407   ,17407   ,20479   ,20479   ,23295   ,\n    23295   ,25343   ,25343   ,26623   ,26623   ,27391   ,27391   ,27135   ,27135   ,26111   ,26111   ,24063   ,24063   ,22015   ,22015   ,\n    19199   ,19199   ,15872   ,15872   ,12800   ,12800   ,9472    ,9472    ,6912    ,6912    ,4096    ,4096    ,2304    ,2304    ,768     ,\n    768     ,-256    ,-256    ,-512    ,-512    ,256     ,256     ,1536    ,1536    ,3072    ,3072    ,4864    ,4864    ,7168    ,7168    ,\n    9216    ,9216    ,11264   ,11264   ,13056   ,13056   ,14336   ,14336   ,15104   ,15104   ,15616   ,15616   ,15360   ,15360   ,14592   ,\n    14592   ,13056   ,13056   ,11008   ,11008   ,8960    ,8960    ,5632    ,5632    ,2560    ,2560    ,-2816   ,-2816   ,-5888   ,-5888   ,\n    -9216   ,-9216   ,-11264  ,-11264  ,-13312  ,-13312  ,-14848  ,-14848  ,-15616  ,-15616  ,-15872  ,-15872  ,-15360  ,-15360  ,-14592  ,\n    -14592  ,-13312  ,-13312  ,-11520  ,-11520  ,-9472   ,-9472   ,-7424   ,-7424   ,-5120   ,-5120   ,-3328   ,-3328   ,-1792   ,-1792   ,\n    -512    ,-512    ,256     ,256     ,0       ,0       ,-1024   ,-1024   ,-2560   ,-2560   ,-4352   ,-4352   ,-7168   ,-7168   ,-9728   ,\n    -9728   ,-13056  ,-13056  ,-16128  ,-16128  ,-19455  ,-19455  ,-22271  ,-22271  ,-24319  ,-24319  ,-26367  ,-26367  ,-27391  ,-27391  ,\n    -27647  ,-27647  ,-26879  ,-26879  ,-25599  ,-25599  ,-23551  ,-23551  ,-20735  ,-20735  ,-17663  ,-17663  ,-14080  ,-14080  ,-10240  ,\n    -10240  ,-7168   ,-7168   ,-3840   ,-3840   ,-1280   ,-1280   ,768     ,768     ,2048    ,2048    ,2048    ,2048    ,1536    ,1536    ,\n    256     ,256     ,-1792   ,-1792   ,-4352   ,-4352   ,-7168   ,-7168   ,-9984   ,-9984   ,-12800  ,-12800  ,-15616  ,-15616  ,-17407  ,\n    -17407  ,-18943  ,-18943  ,-19711  ,-19711  ,-19199  ,-19199  ,-17919  ,-17919  ,-15616  ,-15616  ,-12800  ,-12800  ,-9472   ,-9472   ,\n    -5120   ,-5120   ,-768    ,-768    ,512     ,512     ,4864    ,4864    ,9472    ,9472    ,12800   ,12800   ,15616   ,15616   ,17663   ,\n    17663   ,18943   ,18943   ,19199   ,19199   ,18175   ,18175   ,16639   ,16639   ,14592   ,14592   ,11520   ,11520   ,8704    ,8704    ,\n    5888    ,5888    ,3072    ,3072    ,768     ,768     ,-1024   ,-1024   ,-2048   ,-2048   ,-2048   ,-2048   ,-1536   ,-1536   ,0       ,\n    0       ,2560    ,2560    ,5376    ,5376    ,8960    ,8960    ,12032   ,12032   ,15616   ,15616   ,18943   ,18943   ,21503   ,21503   ,\n    23807   ,23807   ,25343   ,25343   ,26111   ,26111   ,26111   ,26111   ,25343   ,25343   ,23807   ,23807   ,21503   ,21503   ,19199   ,\n    19199   ,16639   ,16639   ,13568   ,13568   ,11008   ,11008   ,8192    ,8192    ,6400    ,6400    ,4352    ,4352    ,3328    ,3328    ,\n    2560    ,2560    ,2304    ,2304    ,2560    ,2560    ,3584    ,3584    ,4864    ,4864    ,6144    ,6144    ,7424    ,7424    ,9216    ,\n    9216    ,10496   ,10496   ,11520   ,11520   ,12288   ,12288   ,12800   ,12800   ,12800   ,12800   ,12544   ,12544   ,12032   ,12032   ,\n    11008   ,11008   ,9728    ,9728    ,7936    ,7936    ,6400    ,6400    ,3840    ,3840    ,1792    ,1792    ,-2048   ,-2048   ,-4096   ,\n    -4096   ,-6656   ,-6656   ,-8192   ,-8192   ,-9984   ,-9984   ,-11264  ,-11264  ,-12288  ,-12288  ,-12800  ,-12800  ,-13056  ,-13056  ,\n    -13056  ,-13056  ,-12544  ,-12544  ,-11776  ,-11776  ,-10752  ,-10752  ,-9472   ,-9472   ,-7680   ,-7680   ,-6400   ,-6400   ,-5120   ,\n    -5120   ,-3840   ,-3840   ,-2816   ,-2816   ,-2560   ,-2560   ,-2816   ,-2816   ,-3584   ,-3584   ,-4608   ,-4608   ,-6656   ,-6656   ,\n    -8448   ,-8448   ,-11264  ,-11264  ,-13824  ,-13824  ,-16895  ,-16895  ,-19455  ,-19455  ,-21759  ,-21759  ,-24063  ,-24063  ,-25599  ,\n    -25599  ,-26367  ,-26367  ,-26367  ,-26367  ,-25599  ,-25599  ,-24063  ,-24063  ,-21759  ,-21759  ,-19199  ,-19199  ,-15872  ,-15872  ,\n    -12288  ,-12288  ,-9216   ,-9216   ,-5632   ,-5632   ,-2816   ,-2816   ,-256    ,-256    ,1280    ,1280    ,1792    ,1792    ,1792    ,\n    1792    ,768     ,768     ,-1024   ,-1024   ,-3328   ,-3328   ,-6144   ,-6144   ,-8960   ,-8960   ,-11776  ,-11776  ,-14848  ,-14848  ,\n    -16895  ,-16895  ,-18431  ,-18431  ,-19455  ,-19455  ,-19199  ,-19199  ,-17919  ,-17919  ,-15872  ,-15872  ,-13056  ,-13056  ,-9728   ,\n    -9728   ,-5120   ,-5120   ,-768    ,-768    ,512     ,512     ,4864    ,4864    ,9472    ,9472    ,12800   ,12800   ,15616   ,15616   ,\n    17663   ,17663   ,18943   ,18943   ,18943   ,18943   ,17663   ,17663   ,15872   ,15872   ,13824   ,13824   ,10496   ,10496   ,7680    ,\n    7680    ,4864    ,4864    ,2048    ,2048    ,0       ,0       ,-1536   ,-1536   ,-2304   ,-2304   ,-1792   ,-1792   ,-768    ,-768    ,\n    1024    ,1024    ,4096    ,4096    ,7168    ,7168    ,10752   ,10752   ,14080   ,14080   ,17407   ,17407   ,20479   ,20479   ,22527   ,\n    22527   ,24319   ,24319   ,25343   ,25343   ,25343   ,25343   ,24831   ,24831   ,23551   ,23551   ,21503   ,21503   ,18943   ,18943   ,\n    16384   ,16384   ,13824   ,13824   ,11008   ,11008   ,8960    ,8960    ,6912    ,6912    ,5888    ,5888    ,4608    ,4608    ,4352    ,\n    4352    ,4352    ,4352    ,4864    ,4864    ,5632    ,5632    ,6912    ,6912    ,7936    ,7936    ,9216    ,9216    ,9984    ,9984    ,\n    11008   ,11008   ,11520   ,11520   ,11776   ,11776   ,11520   ,11520   ,11264   ,11264   ,10240   ,10240   ,9472    ,9472    ,8704    ,\n    8704    ,7424    ,7424    ,6144    ,6144    ,4864    ,4864    ,3840    ,3840    ,2048    ,2048    ,768     ,768     ,-1024   ,-1024   ,\n    -2304   ,-2304   ,-4096   ,-4096   ,-5120   ,-5120   ,-6400   ,-6400   ,-7680   ,-7680   ,-8960   ,-8960   ,-9728   ,-9728   ,-10496  ,\n    -10496  ,-11520  ,-11520  ,-11776  ,-11776  ,-12032  ,-12032  ,-11776  ,-11776  ,-11264  ,-11264  ,-10240  ,-10240  ,-9472   ,-9472   ,\n    -8192   ,-8192   ,-7168   ,-7168   ,-5888   ,-5888   ,-5120   ,-5120   ,-4608   ,-4608   ,-4608   ,-4608   ,-4864   ,-4864   ,-6144   ,\n    -6144   ,-7168   ,-7168   ,-9216   ,-9216   ,-11264  ,-11264  ,-14080  ,-14080  ,-16639  ,-16639  ,-19199  ,-19199  ,-21759  ,-21759  ,\n    -23807  ,-23807  ,-25087  ,-25087  ,-25599  ,-25599  ,-25599  ,-25599  ,-24575  ,-24575  ,-22783  ,-22783  ,-20735  ,-20735  ,-17663  ,\n    -17663  ,-14336  ,-14336  ,-11008  ,-11008  ,-7424   ,-7424   ,-4352   ,-4352   ,-1280   ,-1280   ,512     ,512     ,1536    ,1536    ,\n    2048    ,2048    ,1280    ,1280    ,-256    ,-256    ,-2304   ,-2304   ,-5120   ,-5120   ,-7936   ,-7936   ,-10752  ,-10752  ,-14080  ,\n    -14080  ,-16128  ,-16128  ,-17919  ,-17919  ,-19199  ,-19199  ,-19199  ,-19199  ,-17919  ,-17919  ,-15872  ,-15872  ,-13056  ,-13056  ,\n    -9728   ,-9728   ,-5120   ,-5120   ,-768    ,-768    ,512     ,512     ,5120    ,5120    ,9728    ,9728    ,13056   ,13056   ,15872   ,\n    15872   ,17919   ,17919   ,18943   ,18943   ,18687   ,18687   ,17407   ,17407   ,15360   ,15360   ,13056   ,13056   ,9728    ,9728    ,\n    6656    ,6656    ,3840    ,3840    ,1280    ,1280    ,-768    ,-768    ,-2048   ,-2048   ,-2304   ,-2304   ,-1536   ,-1536   ,0       ,\n    0       ,2304    ,2304    ,5632    ,5632    ,8960    ,8960    ,12800   ,12800   ,16128   ,16128   ,19199   ,19199   ,22015   ,22015   ,\n    23807   ,23807   ,25087   ,25087   ,25343   ,25343   ,24831   ,24831   ,23551   ,23551   ,21759   ,21759   ,19199   ,19199   ,16384   ,\n    16384   ,13824   ,13824   ,11264   ,11264   ,8704    ,8704    ,7168    ,7168    ,5632    ,5632    ,5376    ,5376    ,5120    ,5120    ,\n    5632    ,5632    ,6400    ,6400    ,7424    ,7424    ,8704    ,8704    ,10240   ,10240   ,11264   ,11264   ,12288   ,12288   ,12800   ,\n    12800   ,13056   ,13056   ,12800   ,12800   ,12032   ,12032   ,11008   ,11008   ,9728    ,9728    ,7936    ,7936    ,6656    ,6656    ,\n    5376    ,5376    ,3840    ,3840    ,2816    ,2816    ,1792    ,1792    ,1280    ,1280    ,256     ,256     ,0       ,0       ,-256    ,\n    -256    ,-512    ,-512    ,-1536   ,-1536   ,-2048   ,-2048   ,-3072   ,-3072   ,-4096   ,-4096   ,-5632   ,-5632   ,-6912   ,-6912   ,\n    -8192   ,-8192   ,-9984   ,-9984   ,-11264  ,-11264  ,-12288  ,-12288  ,-13056  ,-13056  ,-13312  ,-13312  ,-13056  ,-13056  ,-12544  ,\n    -12544  ,-11520  ,-11520  ,-10496  ,-10496  ,-8960   ,-8960   ,-7680   ,-7680   ,-6656   ,-6656   ,-5888   ,-5888   ,-5376   ,-5376   ,\n    -5632   ,-5632   ,-5888   ,-5888   ,-7424   ,-7424   ,-8960   ,-8960   ,-11520  ,-11520  ,-14080  ,-14080  ,-16639  ,-16639  ,-19455  ,\n    -19455  ,-22015  ,-22015  ,-23807  ,-23807  ,-25087  ,-25087  ,-25599  ,-25599  ,-25343  ,-25343  ,-24063  ,-24063  ,-22271  ,-22271  ,\n    -19455  ,-19455  ,-16384  ,-16384  ,-13056  ,-13056  ,-9216   ,-9216   ,-5888   ,-5888   ,-2560   ,-2560   ,-256    ,-256    ,1280    ,\n    1280    ,2048    ,2048    ,1792    ,1792    ,512     ,512     ,-1536   ,-1536   ,-4096   ,-4096   ,-6912   ,-6912   ,-9984   ,-9984   ,\n    -13312  ,-13312  ,-15616  ,-15616  ,-17663  ,-17663  ,-18943  ,-18943  ,-19199  ,-19199  ,-18175  ,-18175  ,-16128  ,-16128  ,-13312  ,\n    -13312  ,-9984   ,-9984   ,-5376   ,-5376   ,-768    ,-768    ,512     ,512     ,5120    ,5120    ,9728    ,9728    ,13056   ,13056   ,\n    15872   ,15872   ,17919   ,17919   ,18687   ,18687   ,18431   ,18431   ,16895   ,16895   ,14592   ,14592   ,12032   ,12032   ,8704    ,\n    8704    ,5632    ,5632    ,2560    ,2560    ,256     ,256     ,-1536   ,-1536   ,-2560   ,-2560   ,-2560   ,-2560   ,-1280   ,-1280   ,\n    512     ,512     ,3328    ,3328    ,6912    ,6912    ,10752   ,10752   ,14592   ,14592   ,17919   ,17919   ,20991   ,20991   ,23551   ,\n    23551   ,24831   ,24831   ,25599   ,25599   ,25343   ,25343   ,24063   ,24063   ,22271   ,22271   ,19711   ,19711   ,16895   ,16895   ,\n    13824   ,13824   ,11008   ,11008   ,8448    ,8448    ,6144    ,6144    ,5120    ,5120    ,4352    ,4352    ,4864    ,4864    ,5376    ,\n    5376    ,6656    ,6656    ,8192    ,8192    ,9984    ,9984    ,11776   ,11776   ,13312   ,13312   ,14336   ,14336   ,15360   ,15360   ,\n    15360   ,15360   ,14848   ,14848   ,13824   ,13824   ,12288   ,12288   ,10240   ,10240   ,7936    ,7936    ,5376    ,5376    ,3584    ,\n    3584    ,1792    ,1792    ,256     ,256     ,-768    ,-768    ,-1280   ,-1280   ,-1280   ,-1280   ,-1536   ,-1536   ,-1024   ,-1024   ,\n    768     ,768     ,1280    ,1280    ,1024    ,1024    ,1024    ,1024    ,512     ,512     ,-512    ,-512    ,-2048   ,-2048   ,-3840   ,\n    -3840   ,-5632   ,-5632   ,-8192   ,-8192   ,-10496  ,-10496  ,-12544  ,-12544  ,-14080  ,-14080  ,-15104  ,-15104  ,-15616  ,-15616  ,\n    -15616  ,-15616  ,-14592  ,-14592  ,-13568  ,-13568  ,-12032  ,-12032  ,-10240  ,-10240  ,-8448   ,-8448   ,-6912   ,-6912   ,-5632   ,\n    -5632   ,-5120   ,-5120   ,-4608   ,-4608   ,-5376   ,-5376   ,-6400   ,-6400   ,-8704   ,-8704   ,-11264  ,-11264  ,-14080  ,-14080  ,\n    -17151  ,-17151  ,-19967  ,-19967  ,-22527  ,-22527  ,-24319  ,-24319  ,-25599  ,-25599  ,-25855  ,-25855  ,-25087  ,-25087  ,-23807  ,\n    -23807  ,-21247  ,-21247  ,-18175  ,-18175  ,-14848  ,-14848  ,-11008  ,-11008  ,-7168   ,-7168   ,-3584   ,-3584   ,-768    ,-768    ,\n    1024    ,1024    ,2304    ,2304    ,2304    ,2304    ,1280    ,1280    ,-512    ,-512    ,-2816   ,-2816   ,-5888   ,-5888   ,-8960   ,\n    -8960   ,-12288  ,-12288  ,-14848  ,-14848  ,-17151  ,-17151  ,-18687  ,-18687  ,-18943  ,-18943  ,-18175  ,-18175  ,-16128  ,-16128  ,\n    -13312  ,-13312  ,-9984   ,-9984   ,-5376   ,-5376   ,-768    ,-768    ,512     ,512     ,5376    ,5376    ,9984    ,9984    ,13312   ,\n    13312   ,16128   ,16128   ,18175   ,18175   ,18687   ,18687   ,18175   ,18175   ,16639   ,16639   ,14080   ,14080   ,11264   ,11264   ,\n    7936    ,7936    ,4608    ,4608    ,1536    ,1536    ,-768    ,-768    ,-2304   ,-2304   ,-3072   ,-3072   ,-2560   ,-2560   ,-1024   ,\n    -1024   ,1280    ,1280    ,4608    ,4608    ,8448    ,8448    ,12544   ,12544   ,16639   ,16639   ,19967   ,19967   ,22783   ,22783   ,\n    25087   ,25087   ,26111   ,26111   ,26367   ,26367   ,25343   ,25343   ,23551   ,23551   ,20991   ,20991   ,17919   ,17919   ,14592   ,\n    14592   ,11264   ,11264   ,8448    ,8448    ,5888    ,5888    ,3840    ,3840    ,3328    ,3328    ,3072    ,3072    ,4352    ,4352    ,\n    5632    ,5632    ,7680    ,7680    ,10240   ,10240   ,12544   ,12544   ,14848   ,14848   ,16639   ,16639   ,17663   ,17663   ,18431   ,\n    18431   ,18175   ,18175   ,16895   ,16895   ,15104   ,15104   ,12544   ,12544   ,9472    ,9472    ,6400    ,6400    ,3072    ,3072    ,\n    512     ,512     ,-1536   ,-1536   ,-3328   ,-3328   ,-4096   ,-4096   ,-4352   ,-4352   ,-3840   ,-3840   ,-3328   ,-3328   ,-1792   ,\n    -1792   ,1536    ,1536    ,3072    ,3072    ,3584    ,3584    ,4096    ,4096    ,3840    ,3840    ,3072    ,3072    ,1280    ,1280    ,\n    -768    ,-768    ,-3328   ,-3328   ,-6656   ,-6656   ,-9728   ,-9728   ,-12800  ,-12800  ,-15360  ,-15360  ,-17151  ,-17151  ,-18431  ,\n    -18431  ,-18687  ,-18687  ,-17919  ,-17919  ,-16895  ,-16895  ,-15104  ,-15104  ,-12800  ,-12800  ,-10496  ,-10496  ,-7936   ,-7936   ,\n    -5888   ,-5888   ,-4608   ,-4608   ,-3328   ,-3328   ,-3584   ,-3584   ,-4096   ,-4096   ,-6144   ,-6144   ,-8704   ,-8704   ,-11520  ,\n    -11520  ,-14848  ,-14848  ,-18175  ,-18175  ,-21247  ,-21247  ,-23807  ,-23807  ,-25599  ,-25599  ,-26623  ,-26623  ,-26367  ,-26367  ,\n    -25343  ,-25343  ,-23039  ,-23039  ,-20223  ,-20223  ,-16895  ,-16895  ,-12800  ,-12800  ,-8704   ,-8704   ,-4864   ,-4864   ,-1536   ,\n    -1536   ,768     ,768     ,2304    ,2304    ,2816    ,2816    ,2048    ,2048    ,512     ,512     ,-1792   ,-1792   ,-4864   ,-4864   ,\n    -8192   ,-8192   ,-11520  ,-11520  ,-14336  ,-14336  ,-16895  ,-16895  ,-18431  ,-18431  ,-18943  ,-18943  ,-18431  ,-18431  ,-16384  ,\n    -16384  ,-13568  ,-13568  ,-10240  ,-10240  ,-5632   ,-5632   ,-768    ,-768    ,512     ,512     ,5376    ,5376    ,9984    ,9984    ,\n    13568   ,13568   ,16384   ,16384   ,18175   ,18175   ,18687   ,18687   ,17919   ,17919   ,16128   ,16128   ,13568   ,13568   ,10496   ,\n    10496   ,6912    ,6912    ,3584    ,3584    ,512     ,512     ,-1792   ,-1792   ,-3072   ,-3072   ,-3584   ,-3584   ,-2816   ,-2816   ,\n    -768    ,-768    ,2048    ,2048    ,5632    ,5632    ,9984    ,9984    ,14336   ,14336   ,18687   ,18687   ,22015   ,22015   ,24575   ,\n    24575   ,26623   ,26623   ,27135   ,27135   ,26879   ,26879   ,25343   ,25343   ,23039   ,23039   ,19711   ,19711   ,16128   ,16128   ,\n    12288   ,12288   ,8704    ,8704    ,5632    ,5632    ,3328    ,3328    ,1536    ,1536    ,1536    ,1536    ,1792    ,1792    ,3840    ,\n    3840    ,5888    ,5888    ,8704    ,8704    ,12032   ,12032   ,15104   ,15104   ,17919   ,17919   ,19967   ,19967   ,20991   ,20991   ,\n    21503   ,21503   ,20735   ,20735   ,18943   ,18943   ,16128   ,16128   ,12800   ,12800   ,8704    ,8704    ,4864    ,4864    ,768     ,\n    768     ,-2560   ,-2560   ,-4864   ,-4864   ,-6912   ,-6912   ,-7680   ,-7680   ,-7424   ,-7424   ,-6400   ,-6400   ,-5120   ,-5120   ,\n    -2816   ,-2816   ,2560    ,2560    ,4864    ,4864    ,6144    ,6144    ,7168    ,7168    ,7424    ,7424    ,6656    ,6656    ,4608    ,\n    4608    ,2304    ,2304    ,-1024   ,-1024   ,-5120   ,-5120   ,-8960   ,-8960   ,-13056  ,-13056  ,-16384  ,-16384  ,-19199  ,-19199  ,\n    -20991  ,-20991  ,-21759  ,-21759  ,-21247  ,-21247  ,-20223  ,-20223  ,-18175  ,-18175  ,-15360  ,-15360  ,-12288  ,-12288  ,-8960   ,\n    -8960   ,-6144   ,-6144   ,-4096   ,-4096   ,-2048   ,-2048   ,-1792   ,-1792   ,-1792   ,-1792   ,-3584   ,-3584   ,-5888   ,-5888   ,\n    -8960   ,-8960   ,-12544  ,-12544  ,-16384  ,-16384  ,-19967  ,-19967  ,-23295  ,-23295  ,-25599  ,-25599  ,-27135  ,-27135  ,-27391  ,\n    -27391  ,-26879  ,-26879  ,-24831  ,-24831  ,-22271  ,-22271  ,-18943  ,-18943  ,-14592  ,-14592  ,-10240  ,-10240  ,-5888   ,-5888   ,\n    -2304   ,-2304   ,512     ,512     ,2560    ,2560    ,3328    ,3328    ,2816    ,2816    ,1536    ,1536    ,-768    ,-768    ,-3840   ,\n    -3840   ,-7168   ,-7168   ,-10752  ,-10752  ,-13824  ,-13824  ,-16384  ,-16384  ,-18175  ,-18175  ,-18943  ,-18943  ,-18431  ,-18431  ,\n    -16639  ,-16639  ,-13824  ,-13824  ,-10240  ,-10240  ,-5632   ,-5632   ,-768    ,-768    ,512     ,512     ,5632    ,5632    ,10240   ,\n    10240   ,13824   ,13824   ,16639   ,16639   ,18431   ,18431   ,18687   ,18687   ,17919   ,17919   ,15872   ,15872   ,13056   ,13056   ,\n    9728    ,9728    ,6144    ,6144    ,2560    ,2560    ,-512    ,-512    ,-2560   ,-2560   ,-3840   ,-3840   ,-4096   ,-4096   ,-2816   ,\n    -2816   ,-512    ,-512    ,2816    ,2816    ,6912    ,6912    ,11520   ,11520   ,16128   ,16128   ,20735   ,20735   ,24063   ,24063   ,\n    26623   ,26623   ,28159   ,28159   ,28415   ,28415   ,27647   ,27647   ,25343   ,25343   ,22527   ,22527   ,18431   ,18431   ,14336   ,\n    14336   ,9984    ,9984    ,6144    ,6144    ,3072    ,3072    ,768     ,768     ,-768    ,-768    ,-256    ,-256    ,768     ,768     ,\n    3328    ,3328    ,6400    ,6400    ,9984    ,9984    ,14080   ,14080   ,17663   ,17663   ,20991   ,20991   ,23295   ,23295   ,24319   ,\n    24319   ,24575   ,24575   ,23551   ,23551   ,20991   ,20991   ,17407   ,17407   ,13056   ,13056   ,8192    ,8192    ,3328    ,3328    ,\n    -1536   ,-1536   ,-5376   ,-5376   ,-8192   ,-8192   ,-10496  ,-10496  ,-11008  ,-11008  ,-10496  ,-10496  ,-8960   ,-8960   ,-6912   ,\n    -6912   ,-3584   ,-3584   ,3328    ,3328    ,6656    ,6656    ,8704    ,8704    ,10240   ,10240   ,10752   ,10752   ,10240   ,10240   ,\n    7936    ,7936    ,5120    ,5120    ,1280    ,1280    ,-3584   ,-3584   ,-8448   ,-8448   ,-13312  ,-13312  ,-17663  ,-17663  ,-21247  ,\n    -21247  ,-23807  ,-23807  ,-24831  ,-24831  ,-24575  ,-24575  ,-23551  ,-23551  ,-21247  ,-21247  ,-17919  ,-17919  ,-14336  ,-14336  ,\n    -10240  ,-10240  ,-6656   ,-6656   ,-3584   ,-3584   ,-1024   ,-1024   ,0       ,0       ,512     ,512     ,-1024   ,-1024   ,-3328   ,\n    -3328   ,-6400   ,-6400   ,-10240  ,-10240  ,-14592  ,-14592  ,-18687  ,-18687  ,-22783  ,-22783  ,-25599  ,-25599  ,-27903  ,-27903  ,\n    -28671  ,-28671  ,-28415  ,-28415  ,-26879  ,-26879  ,-24319  ,-24319  ,-20991  ,-20991  ,-16384  ,-16384  ,-11776  ,-11776  ,-7168   ,\n    -7168   ,-3072   ,-3072   ,256     ,256     ,2560    ,2560    ,3840    ,3840    ,3584    ,3584    ,2304    ,2304    ,256     ,256     ,\n    -2816   ,-2816   ,-6400   ,-6400   ,-9984   ,-9984   ,-13312  ,-13312  ,-16128  ,-16128  ,-18175  ,-18175  ,-18943  ,-18943  ,-18687  ,\n    -18687  ,-16895  ,-16895  ,-14080  ,-14080  ,-10496  ,-10496  ,-5888   ,-5888   ,-768    ,-768    ,512     ,512     ,5632    ,5632    ,\n    10496   ,10496   ,14080   ,14080   ,17151   ,17151   ,18687   ,18687   ,18687   ,18687   ,17663   ,17663   ,15104   ,15104   ,12032   ,\n    12032   ,8704    ,8704    ,4864    ,4864    ,1280    ,1280    ,-1536   ,-1536   ,-3072   ,-3072   ,-3840   ,-3840   ,-3584   ,-3584   ,\n    -1792   ,-1792   ,768     ,768     ,4352    ,4352    ,8704    ,8704    ,13056   ,13056   ,17407   ,17407   ,21503   ,21503   ,24319   ,\n    24319   ,26367   ,26367   ,27135   ,27135   ,26879   ,26879   ,25343   ,25343   ,22783   ,22783   ,19967   ,19967   ,16128   ,16128   ,\n    12544   ,12544   ,8704    ,8704    ,5632    ,5632    ,3584    ,3584    ,2048    ,2048    ,1280    ,1280    ,2304    ,2304    ,3584    ,\n    3584    ,6144    ,6144    ,8960    ,8960    ,11776   ,11776   ,15104   ,15104   ,17663   ,17663   ,19967   ,19967   ,21247   ,21247   ,\n    21759   ,21759   ,21503   ,21503   ,20223   ,20223   ,17663   ,17663   ,14592   ,14592   ,11008   ,11008   ,7168    ,7168    ,3328    ,\n    3328    ,-512    ,-512    ,-3584   ,-3584   ,-5632   ,-5632   ,-7424   ,-7424   ,-7936   ,-7936   ,-7680   ,-7680   ,-6400   ,-6400   ,\n    -5120   ,-5120   ,-2816   ,-2816   ,2560    ,2560    ,4864    ,4864    ,6144    ,6144    ,7424    ,7424    ,7680    ,7680    ,7168    ,\n    7168    ,5376    ,5376    ,3328    ,3328    ,256     ,256     ,-3584   ,-3584   ,-7424   ,-7424   ,-11264  ,-11264  ,-14848  ,-14848  ,\n    -17919  ,-17919  ,-20479  ,-20479  ,-21759  ,-21759  ,-22015  ,-22015  ,-21503  ,-21503  ,-20223  ,-20223  ,-17919  ,-17919  ,-15360  ,\n    -15360  ,-12032  ,-12032  ,-9216   ,-9216   ,-6400   ,-6400   ,-3840   ,-3840   ,-2560   ,-2560   ,-1536   ,-1536   ,-2304   ,-2304   ,\n    -3840   ,-3840   ,-5888   ,-5888   ,-8960   ,-8960   ,-12800  ,-12800  ,-16384  ,-16384  ,-20223  ,-20223  ,-23039  ,-23039  ,-25599  ,\n    -25599  ,-27135  ,-27135  ,-27391  ,-27391  ,-26623  ,-26623  ,-24575  ,-24575  ,-21759  ,-21759  ,-17663  ,-17663  ,-13312  ,-13312  ,\n    -8960   ,-8960   ,-4608   ,-4608   ,-1024   ,-1024   ,1536    ,1536    ,3328    ,3328    ,3584    ,3584    ,2816    ,2816    ,1280    ,\n    1280    ,-1536   ,-1536   ,-5120   ,-5120   ,-8960   ,-8960   ,-12288  ,-12288  ,-15360  ,-15360  ,-17919  ,-17919  ,-18943  ,-18943  ,\n    -18943  ,-18943  ,-17407  ,-17407  ,-14336  ,-14336  ,-10752  ,-10752  ,-5888   ,-5888   ,-768    ,-768    ,512     ,512     ,5888    ,\n    5888    ,11008   ,11008   ,14592   ,14592   ,17663   ,17663   ,18943   ,18943   ,18687   ,18687   ,17407   ,17407   ,14592   ,14592   ,\n    11264   ,11264   ,7680    ,7680    ,3840    ,3840    ,256     ,256     ,-2304   ,-2304   ,-3584   ,-3584   ,-3840   ,-3840   ,-3072   ,\n    -3072   ,-768    ,-768    ,2304    ,2304    ,6144    ,6144    ,10496   ,10496   ,14848   ,14848   ,18943   ,18943   ,22527   ,22527   ,\n    24831   ,24831   ,26111   ,26111   ,26111   ,26111   ,25343   ,25343   ,23295   ,23295   ,20479   ,20479   ,17663   ,17663   ,13824   ,\n    13824   ,10752   ,10752   ,7680    ,7680    ,5376    ,5376    ,4096    ,4096    ,3328    ,3328    ,3328    ,3328    ,5120    ,5120    ,\n    6656    ,6656    ,8960    ,8960    ,11520   ,11520   ,13824   ,13824   ,16128   ,16128   ,17919   ,17919   ,19199   ,19199   ,19455   ,\n    19455   ,19199   ,19199   ,18431   ,18431   ,16895   ,16895   ,14592   ,14592   ,12032   ,12032   ,9216    ,9216    ,6144    ,6144    ,\n    3328    ,3328    ,512     ,512     ,-1536   ,-1536   ,-2816   ,-2816   ,-4352   ,-4352   ,-4608   ,-4608   ,-4608   ,-4608   ,-3840   ,\n    -3840   ,-3328   ,-3328   ,-1792   ,-1792   ,1536    ,1536    ,3072    ,3072    ,3584    ,3584    ,4352    ,4352    ,4352    ,4352    ,\n    4096    ,4096    ,2560    ,2560    ,1280    ,1280    ,-768    ,-768    ,-3584   ,-3584   ,-6400   ,-6400   ,-9472   ,-9472   ,-12288  ,\n    -12288  ,-14848  ,-14848  ,-17151  ,-17151  ,-18687  ,-18687  ,-19455  ,-19455  ,-19711  ,-19711  ,-19455  ,-19455  ,-18175  ,-18175  ,\n    -16384  ,-16384  ,-14080  ,-14080  ,-11776  ,-11776  ,-9216   ,-9216   ,-6912   ,-6912   ,-5376   ,-5376   ,-3584   ,-3584   ,-3584   ,\n    -3584   ,-4352   ,-4352   ,-5632   ,-5632   ,-7936   ,-7936   ,-11008  ,-11008  ,-14080  ,-14080  ,-17919  ,-17919  ,-20735  ,-20735  ,\n    -23551  ,-23551  ,-25599  ,-25599  ,-26367  ,-26367  ,-26367  ,-26367  ,-25087  ,-25087  ,-22783  ,-22783  ,-19199  ,-19199  ,-15104  ,\n    -15104  ,-10752  ,-10752  ,-6400   ,-6400   ,-2560   ,-2560   ,512     ,512     ,2816    ,2816    ,3584    ,3584    ,3328    ,3328    ,\n    2048    ,2048    ,-512    ,-512    ,-4096   ,-4096   ,-7936   ,-7936   ,-11520  ,-11520  ,-14848  ,-14848  ,-17663  ,-17663  ,-18943  ,\n    -18943  ,-19199  ,-19199  ,-17919  ,-17919  ,-14848  ,-14848  ,-11264  ,-11264  ,-6144   ,-6144   ,-768    ,-768    ,512     ,512     ,\n    6144    ,6144    ,11264   ,11264   ,15104   ,15104   ,18175   ,18175   ,19199   ,19199   ,18687   ,18687   ,17151   ,17151   ,14080   ,\n    14080   ,10496   ,10496   ,6656    ,6656    ,2560    ,2560    ,-768    ,-768    ,-3072   ,-3072   ,-4096   ,-4096   ,-3840   ,-3840   ,\n    -2560   ,-2560   ,256     ,256     ,3584    ,3584    ,7680    ,7680    ,12288   ,12288   ,16639   ,16639   ,20223   ,20223   ,23551   ,\n    23551   ,25087   ,25087   ,25855   ,25855   ,25087   ,25087   ,23807   ,23807   ,21247   ,21247   ,18175   ,18175   ,15104   ,15104   ,\n    11520   ,11520   ,8960    ,8960    ,6656    ,6656    ,4864    ,4864    ,4608    ,4608    ,4608    ,4608    ,5376    ,5376    ,7680    ,\n    7680    ,9472    ,9472    ,11776   ,11776   ,14080   ,14080   ,15616   ,15616   ,17151   ,17151   ,17919   ,17919   ,18175   ,18175   ,\n    17663   ,17663   ,16639   ,16639   ,15360   ,15360   ,13568   ,13568   ,11520   ,11520   ,9216    ,9216    ,7168    ,7168    ,5120    ,\n    5120    ,3328    ,3328    ,1536    ,1536    ,512     ,512     ,-256    ,-256    ,-1280   ,-1280   ,-1280   ,-1280   ,-1536   ,-1536   ,\n    -1280   ,-1280   ,-1536   ,-1536   ,-1024   ,-1024   ,768     ,768     ,1280    ,1280    ,1024    ,1024    ,1280    ,1280    ,1024    ,\n    1024    ,1024    ,1024    ,0       ,0       ,-768    ,-768    ,-1792   ,-1792   ,-3584   ,-3584   ,-5376   ,-5376   ,-7424   ,-7424   ,\n    -9472   ,-9472   ,-11776  ,-11776  ,-13824  ,-13824  ,-15616  ,-15616  ,-16895  ,-16895  ,-17919  ,-17919  ,-18431  ,-18431  ,-18175  ,\n    -18175  ,-17407  ,-17407  ,-15872  ,-15872  ,-14336  ,-14336  ,-12032  ,-12032  ,-9728   ,-9728   ,-7936   ,-7936   ,-5632   ,-5632   ,\n    -4864   ,-4864   ,-4864   ,-4864   ,-5120   ,-5120   ,-6912   ,-6912   ,-9216   ,-9216   ,-11776  ,-11776  ,-15360  ,-15360  ,-18431  ,\n    -18431  ,-21503  ,-21503  ,-24063  ,-24063  ,-25343  ,-25343  ,-26111  ,-26111  ,-25343  ,-25343  ,-23807  ,-23807  ,-20479  ,-20479  ,\n    -16895  ,-16895  ,-12544  ,-12544  ,-7936   ,-7936   ,-3840   ,-3840   ,-512    ,-512    ,2304    ,2304    ,3584    ,3584    ,3840    ,\n    3840    ,2816    ,2816    ,512     ,512     ,-2816   ,-2816   ,-6912   ,-6912   ,-10752  ,-10752  ,-14336  ,-14336  ,-17407  ,-17407  ,\n    -18943  ,-18943  ,-19455  ,-19455  ,-18431  ,-18431  ,-15360  ,-15360  ,-11520  ,-11520  ,-6400   ,-6400   ,-768    ,-768    ,512     ,\n    512     ,6400    ,6400    ,11776   ,11776   ,15616   ,15616   ,18687   ,18687   ,19455   ,19455   ,18943   ,18943   ,16895   ,16895   ,\n    13568   ,13568   ,9728    ,9728    ,5632    ,5632    ,1536    ,1536    ,-1792   ,-1792   ,-3840   ,-3840   ,-4608   ,-4608   ,-3840   ,\n    -3840   ,-2048   ,-2048   ,1280    ,1280    ,5120    ,5120    ,9472    ,9472    ,14080   ,14080   ,18431   ,18431   ,21759   ,21759   ,\n    24575   ,24575   ,25599   ,25599   ,25599   ,25599   ,24319   ,24319   ,22271   ,22271   ,19199   ,19199   ,15872   ,15872   ,12800   ,\n    12800   ,9472    ,9472    ,7168    ,7168    ,5632    ,5632    ,4608    ,4608    ,5120    ,5120    ,6144    ,6144    ,7680    ,7680    ,\n    10496   ,10496   ,12544   ,12544   ,14592   ,14592   ,16639   ,16639   ,17663   ,17663   ,18431   ,18431   ,18175   ,18175   ,17407   ,\n    17407   ,15872   ,15872   ,14080   ,14080   ,12288   ,12288   ,10496   ,10496   ,8448    ,8448    ,6656    ,6656    ,5376    ,5376    ,\n    4352    ,4352    ,3584    ,3584    ,2816    ,2816    ,2560    ,2560    ,2560    ,2560    ,2048    ,2048    ,2048    ,2048    ,1536    ,\n    1536    ,1280    ,1280    ,512     ,512     ,0       ,0       ,-256    ,-256    ,-768    ,-768    ,-1536   ,-1536   ,-1792   ,-1792   ,\n    -2304   ,-2304   ,-2304   ,-2304   ,-2816   ,-2816   ,-2816   ,-2816   ,-3072   ,-3072   ,-3840   ,-3840   ,-4608   ,-4608   ,-5632   ,\n    -5632   ,-6912   ,-6912   ,-8704   ,-8704   ,-10752  ,-10752  ,-12544  ,-12544  ,-14336  ,-14336  ,-16128  ,-16128  ,-17663  ,-17663  ,\n    -18431  ,-18431  ,-18687  ,-18687  ,-17919  ,-17919  ,-16895  ,-16895  ,-14848  ,-14848  ,-12800  ,-12800  ,-10752  ,-10752  ,-7936   ,\n    -7936   ,-6400   ,-6400   ,-5376   ,-5376   ,-4864   ,-4864   ,-5888   ,-5888   ,-7424   ,-7424   ,-9728   ,-9728   ,-13056  ,-13056  ,\n    -16128  ,-16128  ,-19455  ,-19455  ,-22527  ,-22527  ,-24575  ,-24575  ,-25855  ,-25855  ,-25855  ,-25855  ,-24831  ,-24831  ,-22015  ,\n    -22015  ,-18687  ,-18687  ,-14336  ,-14336  ,-9728   ,-9728   ,-5376   ,-5376   ,-1536   ,-1536   ,1792    ,1792    ,3584    ,3584    ,\n    4352    ,4352    ,3584    ,3584    ,1536    ,1536    ,-1792   ,-1792   ,-5888   ,-5888   ,-9984   ,-9984   ,-13824  ,-13824  ,-17151  ,\n    -17151  ,-19199  ,-19199  ,-19711  ,-19711  ,-18943  ,-18943  ,-15872  ,-15872  ,-12032  ,-12032  ,-6656   ,-6656   ,-768    ,-768    ,\n    512     ,512     ,6656    ,6656    ,12032   ,12032   ,16128   ,16128   ,19199   ,19199   ,19711   ,19711   ,18943   ,18943   ,16639   ,\n    16639   ,13056   ,13056   ,8704    ,8704    ,4608    ,4608    ,256     ,256     ,-3072   ,-3072   ,-4864   ,-4864   ,-5120   ,-5120   ,\n    -3840   ,-3840   ,-1536   ,-1536   ,2304    ,2304    ,6400    ,6400    ,11008   ,11008   ,15872   ,15872   ,19967   ,19967   ,23039   ,\n    23039   ,25343   ,25343   ,25855   ,25855   ,25343   ,25343   ,23295   ,23295   ,20735   ,20735   ,17151   ,17151   ,13568   ,13568   ,\n    10240   ,10240   ,7168    ,7168    ,5376    ,5376    ,4352    ,4352    ,4096    ,4096    ,5632    ,5632    ,7424    ,7424    ,9728    ,\n    9728    ,13056   ,13056   ,15360   ,15360   ,17407   ,17407   ,19199   ,19199   ,19455   ,19455   ,19455   ,19455   ,18175   ,18175   ,\n    16384   ,16384   ,14080   ,14080   ,11520   ,11520   ,9216    ,9216    ,7168    ,7168    ,5120    ,5120    ,3840    ,3840    ,3328    ,\n    3328    ,3328    ,3328    ,3584    ,3584    ,3840    ,3840    ,4352    ,4352    ,5120    ,5120    ,5120    ,5120    ,5120    ,5120    ,\n    4608    ,4608    ,3840    ,3840    ,2304    ,2304    ,768     ,768     ,-1024   ,-1024   ,-2560   ,-2560   ,-4096   ,-4096   ,-4864   ,\n    -4864   ,-5376   ,-5376   ,-5376   ,-5376   ,-5376   ,-5376   ,-4608   ,-4608   ,-4096   ,-4096   ,-3840   ,-3840   ,-3584   ,-3584   ,\n    -3584   ,-3584   ,-4096   ,-4096   ,-5376   ,-5376   ,-7424   ,-7424   ,-9472   ,-9472   ,-11776  ,-11776  ,-14336  ,-14336  ,-16639  ,\n    -16639  ,-18431  ,-18431  ,-19711  ,-19711  ,-19711  ,-19711  ,-19455  ,-19455  ,-17663  ,-17663  ,-15616  ,-15616  ,-13312  ,-13312  ,\n    -9984   ,-9984   ,-7680   ,-7680   ,-5888   ,-5888   ,-4352   ,-4352   ,-4608   ,-4608   ,-5632   ,-5632   ,-7424   ,-7424   ,-10496  ,\n    -10496  ,-13824  ,-13824  ,-17407  ,-17407  ,-20991  ,-20991  ,-23551  ,-23551  ,-25599  ,-25599  ,-26111  ,-26111  ,-25599  ,-25599  ,\n    -23295  ,-23295  ,-20223  ,-20223  ,-16128  ,-16128  ,-11264  ,-11264  ,-6656   ,-6656   ,-2560   ,-2560   ,1280    ,1280    ,3584    ,\n    3584    ,4864    ,4864    ,4608    ,4608    ,2816    ,2816    ,-512    ,-512    ,-4864   ,-4864   ,-8960   ,-8960   ,-13312  ,-13312  ,\n    -16895  ,-16895  ,-19199  ,-19199  ,-19967  ,-19967  ,-19455  ,-19455  ,-16384  ,-16384  ,-12288  ,-12288  ,-6912   ,-6912   ,-768    ,\n    -768    ,512     ,512     ,6912    ,6912    ,12544   ,12544   ,16639   ,16639   ,19711   ,19711   ,19967   ,19967   ,18943   ,18943   ,\n    16384   ,16384   ,12544   ,12544   ,7936    ,7936    ,3584    ,3584    ,-768    ,-768    ,-4096   ,-4096   ,-5632   ,-5632   ,-5632   ,\n    -5632   ,-3840   ,-3840   ,-1024   ,-1024   ,3328    ,3328    ,7936    ,7936    ,12800   ,12800   ,17663   ,17663   ,21759   ,21759   ,\n    24575   ,24575   ,26367   ,26367   ,26367   ,26367   ,25087   ,25087   ,22271   ,22271   ,19199   ,19199   ,15104   ,15104   ,11264   ,\n    11264   ,7936    ,7936    ,5120    ,5120    ,3584    ,3584    ,3328    ,3328    ,3840    ,3840    ,6144    ,6144    ,8704    ,8704    ,\n    12032   ,12032   ,15872   ,15872   ,18431   ,18431   ,20223   ,20223   ,21759   ,21759   ,21503   ,21503   ,20479   ,20479   ,18431   ,\n    18431   ,15616   ,15616   ,12288   ,12288   ,8960    ,8960    ,6144    ,6144    ,3840    ,3840    ,2048    ,2048    ,1280    ,1280    ,\n    1536    ,1536    ,2560    ,2560    ,3840    ,3840    ,5120    ,5120    ,6400    ,6400    ,7936    ,7936    ,8192    ,8192    ,8448    ,\n    8448    ,7680    ,7680    ,6400    ,6400    ,4352    ,4352    ,1792    ,1792    ,-2048   ,-2048   ,-4608   ,-4608   ,-6656   ,-6656   ,\n    -7936   ,-7936   ,-8704   ,-8704   ,-8448   ,-8448   ,-8192   ,-8192   ,-6656   ,-6656   ,-5376   ,-5376   ,-4096   ,-4096   ,-2816   ,\n    -2816   ,-1792   ,-1792   ,-1536   ,-1536   ,-2304   ,-2304   ,-4096   ,-4096   ,-6400   ,-6400   ,-9216   ,-9216   ,-12544  ,-12544  ,\n    -15872  ,-15872  ,-18687  ,-18687  ,-20735  ,-20735  ,-21759  ,-21759  ,-22015  ,-22015  ,-20479  ,-20479  ,-18687  ,-18687  ,-16128  ,\n    -16128  ,-12288  ,-12288  ,-8960   ,-8960   ,-6400   ,-6400   ,-4096   ,-4096   ,-3584   ,-3584   ,-3840   ,-3840   ,-5376   ,-5376   ,\n    -8192   ,-8192   ,-11520  ,-11520  ,-15360  ,-15360  ,-19455  ,-19455  ,-22527  ,-22527  ,-25343  ,-25343  ,-26623  ,-26623  ,-26623  ,\n    -26623  ,-24831  ,-24831  ,-22015  ,-22015  ,-17919  ,-17919  ,-13056  ,-13056  ,-8192   ,-8192   ,-3584   ,-3584   ,768     ,768     ,\n    3584    ,3584    ,5376    ,5376    ,5376    ,5376    ,3840    ,3840    ,512     ,512     ,-3840   ,-3840   ,-8192   ,-8192   ,-12800  ,\n    -12800  ,-16639  ,-16639  ,-19199  ,-19199  ,-20223  ,-20223  ,-19967  ,-19967  ,-16895  ,-16895  ,-12800  ,-12800  ,-7168   ,-7168   ,\n    -768    ,-768    ,512     ,512     ,7168    ,7168    ,13056   ,13056   ,17151   ,17151   ,20223   ,20223   ,20223   ,20223   ,18943   ,\n    18943   ,16128   ,16128   ,12032   ,12032   ,7168    ,7168    ,2560    ,2560    ,-1792   ,-1792   ,-5120   ,-5120   ,-6400   ,-6400   ,\n    -6144   ,-6144   ,-3840   ,-3840   ,-512    ,-512    ,4352    ,4352    ,9216    ,9216    ,14592   ,14592   ,19455   ,19455   ,23551   ,\n    23551   ,25855   ,25855   ,27391   ,27391   ,26623   ,26623   ,24831   ,24831   ,21247   ,21247   ,17663   ,17663   ,13056   ,13056   ,\n    8960    ,8960    ,5632    ,5632    ,2816    ,2816    ,1792    ,1792    ,2304    ,2304    ,3584    ,3584    ,6656    ,6656    ,9984    ,\n    9984    ,14080   ,14080   ,18431   ,18431   ,21247   ,21247   ,23039   ,23039   ,24319   ,24319   ,23551   ,23551   ,21503   ,21503   ,\n    18687   ,18687   ,14848   ,14848   ,10496   ,10496   ,6400    ,6400    ,3072    ,3072    ,512     ,512     ,-1024   ,-1024   ,-1280   ,\n    -1280   ,-256    ,-256    ,1536    ,1536    ,3840    ,3840    ,6144    ,6144    ,8448    ,8448    ,10752   ,10752   ,11264   ,11264   ,\n    11776   ,11776   ,10752   ,10752   ,8960    ,8960    ,6144    ,6144    ,2816    ,2816    ,-3072   ,-3072   ,-6400   ,-6400   ,-9216   ,\n    -9216   ,-11008  ,-11008  ,-12032  ,-12032  ,-11520  ,-11520  ,-11008  ,-11008  ,-8704   ,-8704   ,-6400   ,-6400   ,-4096   ,-4096   ,\n    -1792   ,-1792   ,0       ,0       ,1024    ,1024    ,768     ,768     ,-768    ,-768    ,-3328   ,-3328   ,-6656   ,-6656   ,-10752  ,\n    -10752  ,-15104  ,-15104  ,-18943  ,-18943  ,-21759  ,-21759  ,-23807  ,-23807  ,-24575  ,-24575  ,-23295  ,-23295  ,-21503  ,-21503  ,\n    -18687  ,-18687  ,-14336  ,-14336  ,-10240  ,-10240  ,-6912   ,-6912   ,-3840   ,-3840   ,-2560   ,-2560   ,-2048   ,-2048   ,-3072   ,\n    -3072   ,-5888   ,-5888   ,-9216   ,-9216   ,-13312  ,-13312  ,-17919  ,-17919  ,-21503  ,-21503  ,-25087  ,-25087  ,-26879  ,-26879  ,\n    -27647  ,-27647  ,-26111  ,-26111  ,-23807  ,-23807  ,-19711  ,-19711  ,-14848  ,-14848  ,-9472   ,-9472   ,-4608   ,-4608   ,256     ,\n    256     ,3584    ,3584    ,5888    ,5888    ,6144    ,6144    ,4864    ,4864    ,1536    ,1536    ,-2816   ,-2816   ,-7424   ,-7424   ,\n    -12288  ,-12288  ,-16384  ,-16384  ,-19199  ,-19199  ,-20479  ,-20479  ,-20479  ,-20479  ,-17407  ,-17407  ,-13312  ,-13312  ,-7424   ,\n    -7424   ,-768    ,-768    ,512     ,512     ,7424    ,7424    ,13568   ,13568   ,17663   ,17663   ,20735   ,20735   ,20735   ,20735   ,\n    19199   ,19199   ,15872   ,15872   ,11520   ,11520   ,6400    ,6400    ,1536    ,1536    ,-2816   ,-2816   ,-6144   ,-6144   ,-7168   ,\n    -7168   ,-6400   ,-6400   ,-3840   ,-3840   ,0       ,0       ,5376    ,5376    ,10752   ,10752   ,16384   ,16384   ,21503   ,21503   ,\n    25343   ,25343   ,27391   ,27391   ,28415   ,28415   ,27135   ,27135   ,24575   ,24575   ,20479   ,20479   ,16128   ,16128   ,11008   ,\n    11008   ,6656    ,6656    ,3328    ,3328    ,768     ,768     ,0       ,0       ,1280    ,1280    ,3328    ,3328    ,7168    ,7168    ,\n    11520   ,11520   ,16384   ,16384   ,21247   ,21247   ,24319   ,24319   ,26111   ,26111   ,26879   ,26879   ,25599   ,25599   ,22783   ,\n    22783   ,18943   ,18943   ,14080   ,14080   ,8704    ,8704    ,4096    ,4096    ,0       ,0       ,-2560   ,-2560   ,-4096   ,-4096   ,\n    -3840   ,-3840   ,-2048   ,-2048   ,768     ,768     ,4096    ,4096    ,7424    ,7424    ,10496   ,10496   ,13568   ,13568   ,14592   ,\n    14592   ,15104   ,15104   ,13824   ,13824   ,11520   ,11520   ,8192    ,8192    ,3840    ,3840    ,-4096   ,-4096   ,-8448   ,-8448   ,\n    -11776  ,-11776  ,-14080  ,-14080  ,-15360  ,-15360  ,-14848  ,-14848  ,-13824  ,-13824  ,-10752  ,-10752  ,-7680   ,-7680   ,-4352   ,\n    -4352   ,-1024   ,-1024   ,1792    ,1792    ,3584    ,3584    ,3840    ,3840    ,2304    ,2304    ,-256    ,-256    ,-4352   ,-4352   ,\n    -8960   ,-8960   ,-14336  ,-14336  ,-19199  ,-19199  ,-23039  ,-23039  ,-25855  ,-25855  ,-27135  ,-27135  ,-26367  ,-26367  ,-24575  ,\n    -24575  ,-21503  ,-21503  ,-16639  ,-16639  ,-11776  ,-11776  ,-7424   ,-7424   ,-3584   ,-3584   ,-1536   ,-1536   ,-256    ,-256    ,\n    -1024   ,-1024   ,-3584   ,-3584   ,-6912   ,-6912   ,-11264  ,-11264  ,-16384  ,-16384  ,-20735  ,-20735  ,-24831  ,-24831  ,-27391  ,\n    -27391  ,-28671  ,-28671  ,-27647  ,-27647  ,-25599  ,-25599  ,-21759  ,-21759  ,-16639  ,-16639  ,-11008  ,-11008  ,-5632   ,-5632   ,\n    -256    ,-256    ,3584    ,3584    ,6144    ,6144    ,6912    ,6912    ,5888    ,5888    ,2560    ,2560    ,-1792   ,-1792   ,-6656   ,\n    -6656   ,-11776  ,-11776  ,-16128  ,-16128  ,-19455  ,-19455  ,-20991  ,-20991  ,-20991  ,-20991  ,-17919  ,-17919  ,-13824  ,-13824  ,\n    -7680   ,-7680   ,-768    ,-768    ,512     ,512     ,7424    ,7424    ,13568   ,13568   ,17663   ,17663   ,20735   ,20735   ,20479   ,\n    20479   ,18687   ,18687   ,15104   ,15104   ,10496   ,10496   ,5376    ,5376    ,512     ,512     ,-3584   ,-3584   ,-6400   ,-6400   ,\n    -7168   ,-7168   ,-5888   ,-5888   ,-2816   ,-2816   ,1280    ,1280    ,6912    ,6912    ,12288   ,12288   ,17407   ,17407   ,22015   ,\n    22015   ,25343   ,25343   ,26879   ,26879   ,27135   ,27135   ,25343   ,25343   ,22271   ,22271   ,18175   ,18175   ,14080   ,14080   ,\n    9472    ,9472    ,5888    ,5888    ,3328    ,3328    ,1792    ,1792    ,1792    ,1792    ,3584    ,3584    ,5888    ,5888    ,9472    ,\n    9472    ,13568   ,13568   ,17663   ,17663   ,21503   ,21503   ,23551   ,23551   ,24319   ,24319   ,24319   ,24319   ,22527   ,22527   ,\n    19711   ,19711   ,16128   ,16128   ,12032   ,12032   ,7936    ,7936    ,4352    ,4352    ,1280    ,1280    ,-512    ,-512    ,-1280   ,\n    -1280   ,-1024   ,-1024   ,768     ,768     ,2816    ,2816    ,5376    ,5376    ,7680    ,7680    ,9728    ,9728    ,11776   ,11776   ,\n    12032   ,12032   ,12032   ,12032   ,10752   ,10752   ,8960    ,8960    ,6144    ,6144    ,2816    ,2816    ,-3072   ,-3072   ,-6400   ,\n    -6400   ,-9216   ,-9216   ,-11008  ,-11008  ,-12288  ,-12288  ,-12288  ,-12288  ,-12032  ,-12032  ,-9984   ,-9984   ,-7936   ,-7936   ,\n    -5632   ,-5632   ,-3072   ,-3072   ,-1024   ,-1024   ,768     ,768     ,1024    ,1024    ,256     ,256     ,-1536   ,-1536   ,-4608   ,\n    -4608   ,-8192   ,-8192   ,-12288  ,-12288  ,-16384  ,-16384  ,-19967  ,-19967  ,-22783  ,-22783  ,-24575  ,-24575  ,-24575  ,-24575  ,\n    -23807  ,-23807  ,-21759  ,-21759  ,-17919  ,-17919  ,-13824  ,-13824  ,-9728   ,-9728   ,-6144   ,-6144   ,-3840   ,-3840   ,-2048   ,\n    -2048   ,-2048   ,-2048   ,-3584   ,-3584   ,-6144   ,-6144   ,-9728   ,-9728   ,-14336  ,-14336  ,-18431  ,-18431  ,-22527  ,-22527  ,\n    -25599  ,-25599  ,-27391  ,-27391  ,-27135  ,-27135  ,-25599  ,-25599  ,-22271  ,-22271  ,-17663  ,-17663  ,-12544  ,-12544  ,-7168   ,\n    -7168   ,-1536   ,-1536   ,2560    ,2560    ,5632    ,5632    ,6912    ,6912    ,6144    ,6144    ,3328    ,3328    ,-768    ,-768    ,\n    -5632   ,-5632   ,-10752  ,-10752  ,-15360  ,-15360  ,-18943  ,-18943  ,-20735  ,-20735  ,-20991  ,-20991  ,-17919  ,-17919  ,-13824  ,\n    -13824  ,-7680   ,-7680   ,-768    ,-768    ,512     ,512     ,7424    ,7424    ,13568   ,13568   ,17663   ,17663   ,20735   ,20735   ,\n    20479   ,20479   ,18431   ,18431   ,14848   ,14848   ,9984    ,9984    ,4864    ,4864    ,0       ,0       ,-3840   ,-3840   ,-6656   ,\n    -6656   ,-7168   ,-7168   ,-5632   ,-5632   ,-2304   ,-2304   ,2048    ,2048    ,7680    ,7680    ,13056   ,13056   ,17919   ,17919   ,\n    22271   ,22271   ,25343   ,25343   ,26623   ,26623   ,26367   ,26367   ,24319   ,24319   ,21247   ,21247   ,17151   ,17151   ,13056   ,\n    13056   ,8704    ,8704    ,5376    ,5376    ,3328    ,3328    ,2304    ,2304    ,2560    ,2560    ,4608    ,4608    ,7168    ,7168    ,\n    10752   ,10752   ,14592   ,14592   ,18175   ,18175   ,21503   ,21503   ,23039   ,23039   ,23551   ,23551   ,23039   ,23039   ,20991   ,\n    20991   ,18175   ,18175   ,14848   ,14848   ,11008   ,11008   ,7424    ,7424    ,4352    ,4352    ,1792    ,1792    ,512     ,512     ,\n    0       ,0       ,512     ,512     ,2048    ,2048    ,3840    ,3840    ,5888    ,5888    ,7680    ,7680    ,9216    ,9216    ,10752   ,\n    10752   ,10752   ,10752   ,10496   ,10496   ,9216    ,9216    ,7680    ,7680    ,5120    ,5120    ,2304    ,2304    ,-2560   ,-2560   ,\n    -5376   ,-5376   ,-7936   ,-7936   ,-9472   ,-9472   ,-10752  ,-10752  ,-11008  ,-11008  ,-11008  ,-11008  ,-9472   ,-9472   ,-7936   ,\n    -7936   ,-6144   ,-6144   ,-4096   ,-4096   ,-2304   ,-2304   ,-768    ,-768    ,-256    ,-256    ,-768    ,-768    ,-2048   ,-2048   ,\n    -4608   ,-4608   ,-7680   ,-7680   ,-11264  ,-11264  ,-15104  ,-15104  ,-18431  ,-18431  ,-21247  ,-21247  ,-23295  ,-23295  ,-23807  ,\n    -23807  ,-23295  ,-23295  ,-21759  ,-21759  ,-18431  ,-18431  ,-14848  ,-14848  ,-11008  ,-11008  ,-7424   ,-7424   ,-4864   ,-4864   ,\n    -2816   ,-2816   ,-2560   ,-2560   ,-3584   ,-3584   ,-5632   ,-5632   ,-8960   ,-8960   ,-13312  ,-13312  ,-17407  ,-17407  ,-21503  ,\n    -21503  ,-24575  ,-24575  ,-26623  ,-26623  ,-26879  ,-26879  ,-25599  ,-25599  ,-22527  ,-22527  ,-18175  ,-18175  ,-13312  ,-13312  ,\n    -7936   ,-7936   ,-2304   ,-2304   ,2048    ,2048    ,5376    ,5376    ,6912    ,6912    ,6400    ,6400    ,3584    ,3584    ,-256    ,\n    -256    ,-5120   ,-5120   ,-10240  ,-10240  ,-15104  ,-15104  ,-18687  ,-18687  ,-20735  ,-20735  ,-20991  ,-20991  ,-17919  ,-17919  ,\n    -13824  ,-13824  ,-7680   ,-7680   ,-768    ,-768    ,512     ,512     ,7424    ,7424    ,13824   ,13824   ,17919   ,17919   ,20735   ,\n    20735   ,20479   ,20479   ,18431   ,18431   ,14592   ,14592   ,9728    ,9728    ,4608    ,4608    ,-256    ,-256    ,-4096   ,-4096   ,\n    -6656   ,-6656   ,-6912   ,-6912   ,-5120   ,-5120   ,-1792   ,-1792   ,2816    ,2816    ,8448    ,8448    ,13824   ,13824   ,18687   ,\n    18687   ,22783   ,22783   ,25599   ,25599   ,26367   ,26367   ,25855   ,25855   ,23551   ,23551   ,20223   ,20223   ,16128   ,16128   ,\n    12288   ,12288   ,7936    ,7936    ,5120    ,5120    ,3584    ,3584    ,2816    ,2816    ,3584    ,3584    ,5888    ,5888    ,8704    ,\n    8704    ,12032   ,12032   ,15616   ,15616   ,18943   ,18943   ,21759   ,21759   ,22783   ,22783   ,22783   ,22783   ,21759   ,21759   ,\n    19711   ,19711   ,16895   ,16895   ,13568   ,13568   ,10240   ,10240   ,7168    ,7168    ,4608    ,4608    ,2560    ,2560    ,1792    ,\n    1792    ,1536    ,1536    ,2048    ,2048    ,3584    ,3584    ,5120    ,5120    ,6656    ,6656    ,7936    ,7936    ,8960    ,8960    ,\n    9984    ,9984    ,9472    ,9472    ,9216    ,9216    ,7936    ,7936    ,6400    ,6400    ,4352    ,4352    ,1792    ,1792    ,-2048   ,\n    -2048   ,-4608   ,-4608   ,-6656   ,-6656   ,-8192   ,-8192   ,-9472   ,-9472   ,-9728   ,-9728   ,-10240  ,-10240  ,-9216   ,-9216   ,\n    -8192   ,-8192   ,-6912   ,-6912   ,-5376   ,-5376   ,-3840   ,-3840   ,-2304   ,-2304   ,-1792   ,-1792   ,-2048   ,-2048   ,-2816   ,\n    -2816   ,-4864   ,-4864   ,-7424   ,-7424   ,-10496  ,-10496  ,-13824  ,-13824  ,-17151  ,-17151  ,-19967  ,-19967  ,-22015  ,-22015  ,\n    -23039  ,-23039  ,-23039  ,-23039  ,-22015  ,-22015  ,-19199  ,-19199  ,-15872  ,-15872  ,-12288  ,-12288  ,-8960   ,-8960   ,-6144   ,\n    -6144   ,-3840   ,-3840   ,-3072   ,-3072   ,-3840   ,-3840   ,-5376   ,-5376   ,-8192   ,-8192   ,-12544  ,-12544  ,-16384  ,-16384  ,\n    -20479  ,-20479  ,-23807  ,-23807  ,-26111  ,-26111  ,-26623  ,-26623  ,-25855  ,-25855  ,-23039  ,-23039  ,-18943  ,-18943  ,-14080  ,\n    -14080  ,-8704   ,-8704   ,-3072   ,-3072   ,1536    ,1536    ,4864    ,4864    ,6656    ,6656    ,6400    ,6400    ,3840    ,3840    ,\n    0       ,0       ,-4864   ,-4864   ,-9984   ,-9984   ,-14848  ,-14848  ,-18687  ,-18687  ,-20735  ,-20735  ,-20991  ,-20991  ,-18175  ,\n    -18175  ,-14080  ,-14080  ,-7680   ,-7680   ,-768    ,-768    ,512     ,512     ,7424    ,7424    ,14080   ,14080   ,17919   ,17919   ,\n    20735   ,20735   ,20223   ,20223   ,17919   ,17919   ,13824   ,13824   ,8960    ,8960    ,3584    ,3584    ,-1280   ,-1280   ,-4864   ,\n    -4864   ,-6912   ,-6912   ,-6656   ,-6656   ,-4608   ,-4608   ,-768    ,-768    ,4096    ,4096    ,9984    ,9984    ,15360   ,15360   ,\n    19967   ,19967   ,23551   ,23551   ,25599   ,25599   ,25855   ,25855   ,24575   ,24575   ,21759   ,21759   ,18175   ,18175   ,13824   ,\n    13824   ,10240   ,10240   ,6400    ,6400    ,4352    ,4352    ,3584    ,3584    ,3840    ,3840    ,5376    ,5376    ,8192    ,8192    ,\n    11264   ,11264   ,14592   ,14592   ,17663   ,17663   ,20223   ,20223   ,22015   ,22015   ,22015   ,22015   ,20991   ,20991   ,19199   ,\n    19199   ,16895   ,16895   ,13824   ,13824   ,11008   ,11008   ,8448    ,8448    ,6400    ,6400    ,4864    ,4864    ,3840    ,3840    ,\n    4096    ,4096    ,4352    ,4352    ,5120    ,5120    ,6400    ,6400    ,7168    ,7168    ,7936    ,7936    ,8192    ,8192    ,8192    ,\n    8192    ,8192    ,8192    ,6912    ,6912    ,6400    ,6400    ,5120    ,5120    ,3840    ,3840    ,2304    ,2304    ,768     ,768     ,\n    -1024   ,-1024   ,-2560   ,-2560   ,-4096   ,-4096   ,-5376   ,-5376   ,-6656   ,-6656   ,-7168   ,-7168   ,-8448   ,-8448   ,-8448   ,\n    -8448   ,-8448   ,-8448   ,-8192   ,-8192   ,-7424   ,-7424   ,-6656   ,-6656   ,-5376   ,-5376   ,-4608   ,-4608   ,-4352   ,-4352   ,\n    -4096   ,-4096   ,-5120   ,-5120   ,-6656   ,-6656   ,-8704   ,-8704   ,-11264  ,-11264  ,-14080  ,-14080  ,-17151  ,-17151  ,-19455  ,\n    -19455  ,-21247  ,-21247  ,-22271  ,-22271  ,-22271  ,-22271  ,-20479  ,-20479  ,-17919  ,-17919  ,-14848  ,-14848  ,-11520  ,-11520  ,\n    -8448   ,-8448   ,-5632   ,-5632   ,-4096   ,-4096   ,-3840   ,-3840   ,-4608   ,-4608   ,-6656   ,-6656   ,-10496  ,-10496  ,-14080  ,\n    -14080  ,-18431  ,-18431  ,-22015  ,-22015  ,-24831  ,-24831  ,-26111  ,-26111  ,-25855  ,-25855  ,-23807  ,-23807  ,-20223  ,-20223  ,\n    -15616  ,-15616  ,-10240  ,-10240  ,-4352   ,-4352   ,512     ,512     ,4352    ,4352    ,6400    ,6400    ,6656    ,6656    ,4608    ,\n    4608    ,1024    ,1024    ,-3840   ,-3840   ,-9216   ,-9216   ,-14080  ,-14080  ,-18175  ,-18175  ,-20479  ,-20479  ,-20991  ,-20991  ,\n    -18175  ,-18175  ,-14336  ,-14336  ,-7680   ,-7680   ,-768    ,-768    ,512     ,512     ,7424    ,7424    ,14080   ,14080   ,17919   ,\n    17919   ,20735   ,20735   ,20223   ,20223   ,17663   ,17663   ,13568   ,13568   ,8448    ,8448    ,3072    ,3072    ,-1792   ,-1792   ,\n    -5120   ,-5120   ,-7168   ,-7168   ,-6656   ,-6656   ,-4352   ,-4352   ,-256    ,-256    ,4864    ,4864    ,10752   ,10752   ,16128   ,\n    16128   ,20479   ,20479   ,23807   ,23807   ,25599   ,25599   ,25599   ,25599   ,24063   ,24063   ,20735   ,20735   ,17151   ,17151   ,\n    12800   ,12800   ,9216    ,9216    ,5632    ,5632    ,4096    ,4096    ,3584    ,3584    ,4352    ,4352    ,6400    ,6400    ,9472    ,\n    9472    ,12544   ,12544   ,15872   ,15872   ,18687   ,18687   ,20735   ,20735   ,22271   ,22271   ,21503   ,21503   ,20223   ,20223   ,\n    17919   ,17919   ,15360   ,15360   ,12288   ,12288   ,9728    ,9728    ,7424    ,7424    ,5888    ,5888    ,4864    ,4864    ,4608    ,\n    4608    ,5120    ,5120    ,5888    ,5888    ,6656    ,6656    ,7680    ,7680    ,8192    ,8192    ,8704    ,8704    ,8192    ,8192    ,\n    7680    ,7680    ,7168    ,7168    ,5632    ,5632    ,4864    ,4864    ,3584    ,3584    ,2560    ,2560    ,1280    ,1280    ,256     ,\n    256     ,-512    ,-512    ,-1536   ,-1536   ,-2816   ,-2816   ,-3840   ,-3840   ,-5120   ,-5120   ,-5888   ,-5888   ,-7424   ,-7424   ,\n    -7936   ,-7936   ,-8448   ,-8448   ,-8960   ,-8960   ,-8448   ,-8448   ,-7936   ,-7936   ,-6912   ,-6912   ,-6144   ,-6144   ,-5376   ,\n    -5376   ,-4864   ,-4864   ,-5120   ,-5120   ,-6144   ,-6144   ,-7680   ,-7680   ,-9984   ,-9984   ,-12544  ,-12544  ,-15616  ,-15616  ,\n    -18175  ,-18175  ,-20479  ,-20479  ,-21759  ,-21759  ,-22527  ,-22527  ,-20991  ,-20991  ,-18943  ,-18943  ,-16128  ,-16128  ,-12800  ,\n    -12800  ,-9728   ,-9728   ,-6656   ,-6656   ,-4608   ,-4608   ,-3840   ,-3840   ,-4352   ,-4352   ,-5888   ,-5888   ,-9472   ,-9472   ,\n    -13056  ,-13056  ,-17407  ,-17407  ,-20991  ,-20991  ,-24319  ,-24319  ,-25855  ,-25855  ,-25855  ,-25855  ,-24063  ,-24063  ,-20735  ,\n    -20735  ,-16384  ,-16384  ,-11008  ,-11008  ,-5120   ,-5120   ,0       ,0       ,4096    ,4096    ,6400    ,6400    ,6912    ,6912    ,\n    4864    ,4864    ,1536    ,1536    ,-3328   ,-3328   ,-8704   ,-8704   ,-13824  ,-13824  ,-17919  ,-17919  ,-20479  ,-20479  ,-20991  ,\n    -20991  ,-18175  ,-18175  ,-14336  ,-14336  ,-7680   ,-7680   ,-768    ,-768    ,512     ,512     ,7680    ,7680    ,14336   ,14336   ,\n    18175   ,18175   ,20735   ,20735   ,20223   ,20223   ,17663   ,17663   ,13312   ,13312   ,8192    ,8192    ,2816    ,2816    ,-2048   ,\n    -2048   ,-5376   ,-5376   ,-7168   ,-7168   ,-6400   ,-6400   ,-3840   ,-3840   ,512     ,512     ,5632    ,5632    ,11520   ,11520   ,\n    16895   ,16895   ,21247   ,21247   ,24319   ,24319   ,25855   ,25855   ,25343   ,25343   ,23551   ,23551   ,19967   ,19967   ,16128   ,\n    16128   ,11776   ,11776   ,8448    ,8448    ,5120    ,5120    ,3840    ,3840    ,3840    ,3840    ,4864    ,4864    ,7424    ,7424    ,\n    10752   ,10752   ,14080   ,14080   ,17151   ,17151   ,19967   ,19967   ,21503   ,21503   ,22527   ,22527   ,21247   ,21247   ,19455   ,\n    19455   ,16895   ,16895   ,14080   ,14080   ,11008   ,11008   ,8448    ,8448    ,6656    ,6656    ,5632    ,5632    ,5120    ,5120    ,\n    5376    ,5376    ,6400    ,6400    ,7424    ,7424    ,8192    ,8192    ,9216    ,9216    ,9472    ,9472    ,9472    ,9472    ,8448    ,\n    8448    ,7424    ,7424    ,6400    ,6400    ,4608    ,4608    ,3584    ,3584    ,2304    ,2304    ,1536    ,1536    ,512     ,512     ,\n    -256    ,-256    ,0       ,0       ,-768    ,-768    ,-1792   ,-1792   ,-2560   ,-2560   ,-3840   ,-3840   ,-4864   ,-4864   ,-6656   ,\n    -6656   ,-7680   ,-7680   ,-8704   ,-8704   ,-9728   ,-9728   ,-9728   ,-9728   ,-9472   ,-9472   ,-8448   ,-8448   ,-7680   ,-7680   ,\n    -6656   ,-6656   ,-5632   ,-5632   ,-5376   ,-5376   ,-5888   ,-5888   ,-6912   ,-6912   ,-8704   ,-8704   ,-11264  ,-11264  ,-14336  ,\n    -14336  ,-17151  ,-17151  ,-19711  ,-19711  ,-21503  ,-21503  ,-22783  ,-22783  ,-21759  ,-21759  ,-20223  ,-20223  ,-17407  ,-17407  ,\n    -14336  ,-14336  ,-11008  ,-11008  ,-7680   ,-7680   ,-5120   ,-5120   ,-4096   ,-4096   ,-4096   ,-4096   ,-5376   ,-5376   ,-8704   ,\n    -8704   ,-12032  ,-12032  ,-16384  ,-16384  ,-20223  ,-20223  ,-23807  ,-23807  ,-25599  ,-25599  ,-26111  ,-26111  ,-24575  ,-24575  ,\n    -21503  ,-21503  ,-17151  ,-17151  ,-11776  ,-11776  ,-5888   ,-5888   ,-768    ,-768    ,3584    ,3584    ,6144    ,6144    ,6912    ,\n    6912    ,5120    ,5120    ,1792    ,1792    ,-3072   ,-3072   ,-8448   ,-8448   ,-13568  ,-13568  ,-17919  ,-17919  ,-20479  ,-20479  ,\n    -20991  ,-20991  ,-18431  ,-18431  ,-14592  ,-14592  ,-7936   ,-7936   ,-768    ,-768    ,512     ,512     ,7680    ,7680    ,14336   ,\n    14336   ,18175   ,18175   ,20735   ,20735   ,19967   ,19967   ,17151   ,17151   ,12544   ,12544   ,7168    ,7168    ,1792    ,1792    ,\n    -3072   ,-3072   ,-6144   ,-6144   ,-7424   ,-7424   ,-6400   ,-6400   ,-3328   ,-3328   ,1536    ,1536    ,6912    ,6912    ,13056   ,\n    13056   ,18431   ,18431   ,22527   ,22527   ,25087   ,25087   ,25855   ,25855   ,24831   ,24831   ,22271   ,22271   ,18175   ,18175   ,\n    14080   ,14080   ,9472    ,9472    ,6400    ,6400    ,3584    ,3584    ,3072    ,3072    ,3840    ,3840    ,5888    ,5888    ,9216    ,\n    9216    ,13056   ,13056   ,16639   ,16639   ,19711   ,19711   ,22015   ,22015   ,22783   ,22783   ,22783   ,22783   ,20479   ,20479   ,\n    17663   ,17663   ,14336   ,14336   ,11008   ,11008   ,7936    ,7936    ,5632    ,5632    ,4864    ,4864    ,4864    ,4864    ,5376    ,\n    5376    ,6656    ,6656    ,8704    ,8704    ,10240   ,10240   ,11008   ,11008   ,12032   ,12032   ,11520   ,11520   ,10752   ,10752   ,\n    8704    ,8704    ,6656    ,6656    ,4608    ,4608    ,2048    ,2048    ,768     ,768     ,-512    ,-512    ,-1024   ,-1024   ,-1536   ,\n    -1536   ,-1280   ,-1280   ,1024    ,1024    ,1280    ,1280    ,768     ,768     ,256     ,256     ,-1024   ,-1024   ,-2304   ,-2304   ,\n    -4864   ,-4864   ,-6912   ,-6912   ,-8960   ,-8960   ,-11008  ,-11008  ,-11776  ,-11776  ,-12288  ,-12288  ,-11264  ,-11264  ,-10496  ,\n    -10496  ,-8960   ,-8960   ,-6912   ,-6912   ,-5632   ,-5632   ,-5120   ,-5120   ,-5120   ,-5120   ,-5888   ,-5888   ,-8192   ,-8192   ,\n    -11264  ,-11264  ,-14592  ,-14592  ,-17919  ,-17919  ,-20735  ,-20735  ,-23039  ,-23039  ,-23039  ,-23039  ,-22271  ,-22271  ,-19967  ,\n    -19967  ,-16895  ,-16895  ,-13312  ,-13312  ,-9472   ,-9472   ,-6144   ,-6144   ,-4096   ,-4096   ,-3328   ,-3328   ,-3840   ,-3840   ,\n    -6656   ,-6656   ,-9728   ,-9728   ,-14336  ,-14336  ,-18431  ,-18431  ,-22527  ,-22527  ,-25087  ,-25087  ,-26111  ,-26111  ,-25343  ,\n    -25343  ,-22783  ,-22783  ,-18687  ,-18687  ,-13312  ,-13312  ,-7168   ,-7168   ,-1792   ,-1792   ,3072    ,3072    ,6144    ,6144    ,\n    7168    ,7168    ,5888    ,5888    ,2816    ,2816    ,-2048   ,-2048   ,-7424   ,-7424   ,-12800  ,-12800  ,-17407  ,-17407  ,-20223  ,\n    -20223  ,-20991  ,-20991  ,-18431  ,-18431  ,-14592  ,-14592  ,-7936   ,-7936   ,-768    ,-768    ,512     ,512     ,7680    ,7680    ,\n    14336   ,14336   ,18175   ,18175   ,20735   ,20735   ,19967   ,19967   ,16895   ,16895   ,12288   ,12288   ,6656    ,6656    ,1280    ,\n    1280    ,-3584   ,-3584   ,-6400   ,-6400   ,-7680   ,-7680   ,-6400   ,-6400   ,-3072   ,-3072   ,2048    ,2048    ,7680    ,7680    ,\n    13824   ,13824   ,19199   ,19199   ,23039   ,23039   ,25343   ,25343   ,25855   ,25855   ,24575   ,24575   ,21503   ,21503   ,17151   ,\n    17151   ,13056   ,13056   ,8448    ,8448    ,5376    ,5376    ,2816    ,2816    ,2816    ,2816    ,3840    ,3840    ,6400    ,6400    ,\n    9984    ,9984    ,14080   ,14080   ,17919   ,17919   ,20991   ,20991   ,23039   ,23039   ,23295   ,23295   ,22783   ,22783   ,19967   ,\n    19967   ,16895   ,16895   ,13056   ,13056   ,9472    ,9472    ,6400    ,6400    ,4352    ,4352    ,3840    ,3840    ,4352    ,4352    ,\n    5376    ,5376    ,7168    ,7168    ,9728    ,9728    ,11520   ,11520   ,12544   ,12544   ,13312   ,13312   ,12544   ,12544   ,11264   ,\n    11264   ,8704    ,8704    ,6144    ,6144    ,3584    ,3584    ,768     ,768     ,-768    ,-768    ,-2048   ,-2048   ,-2304   ,-2304   ,\n    -2560   ,-2560   ,-1792   ,-1792   ,1536    ,1536    ,2304    ,2304    ,2048    ,2048    ,1792    ,1792    ,512     ,512     ,-1024   ,\n    -1024   ,-3840   ,-3840   ,-6400   ,-6400   ,-8960   ,-8960   ,-11520  ,-11520  ,-12800  ,-12800  ,-13568  ,-13568  ,-12800  ,-12800  ,\n    -11776  ,-11776  ,-9984   ,-9984   ,-7424   ,-7424   ,-5632   ,-5632   ,-4608   ,-4608   ,-4096   ,-4096   ,-4608   ,-4608   ,-6656   ,\n    -6656   ,-9728   ,-9728   ,-13312  ,-13312  ,-17151  ,-17151  ,-20223  ,-20223  ,-23039  ,-23039  ,-23551  ,-23551  ,-23295  ,-23295  ,\n    -21247  ,-21247  ,-18175  ,-18175  ,-14336  ,-14336  ,-10240  ,-10240  ,-6656   ,-6656   ,-4096   ,-4096   ,-3072   ,-3072   ,-3072   ,\n    -3072   ,-5632   ,-5632   ,-8704   ,-8704   ,-13312  ,-13312  ,-17407  ,-17407  ,-21759  ,-21759  ,-24831  ,-24831  ,-26111  ,-26111  ,\n    -25599  ,-25599  ,-23295  ,-23295  ,-19455  ,-19455  ,-14080  ,-14080  ,-7936   ,-7936   ,-2304   ,-2304   ,2816    ,2816    ,6144    ,\n    6144    ,7424    ,7424    ,6144    ,6144    ,3328    ,3328    ,-1536   ,-1536   ,-6912   ,-6912   ,-12544  ,-12544  ,-17151  ,-17151  ,\n    -20223  ,-20223  ,-20991  ,-20991  ,-18431  ,-18431  ,-14592  ,-14592  ,-7936   ,-7936   ,-768    ,-768    ,512     ,512     ,7936    ,\n    7936    ,14592   ,14592   ,18431   ,18431   ,20735   ,20735   ,19967   ,19967   ,16895   ,16895   ,12032   ,12032   ,6400    ,6400    ,\n    1024    ,1024    ,-3840   ,-3840   ,-6656   ,-6656   ,-7680   ,-7680   ,-6144   ,-6144   ,-2560   ,-2560   ,2816    ,2816    ,8448    ,\n    8448    ,14592   ,14592   ,19967   ,19967   ,23807   ,23807   ,25855   ,25855   ,26111   ,26111   ,24319   ,24319   ,20991   ,20991   ,\n    16384   ,16384   ,12032   ,12032   ,7424    ,7424    ,4608    ,4608    ,2304    ,2304    ,2560    ,2560    ,4096    ,4096    ,6912    ,\n    6912    ,11008   ,11008   ,15360   ,15360   ,19455   ,19455   ,22271   ,22271   ,24063   ,24063   ,24063   ,24063   ,23039   ,23039   ,\n    19711   ,19711   ,16128   ,16128   ,12032   ,12032   ,8192    ,8192    ,5120    ,5120    ,3072    ,3072    ,3072    ,3072    ,4096    ,\n    4096    ,5632    ,5632    ,7936    ,7936    ,11008   ,11008   ,13056   ,13056   ,14080   ,14080   ,14848   ,14848   ,13824   ,13824   ,\n    12032   ,12032   ,8960    ,8960    ,5888    ,5888    ,2816    ,2816    ,-512    ,-512    ,-2048   ,-2048   ,-3328   ,-3328   ,-3328   ,\n    -3328   ,-3328   ,-3328   ,-2304   ,-2304   ,2048    ,2048    ,3072    ,3072    ,3072    ,3072    ,3072    ,3072    ,1792    ,1792    ,\n    256     ,256     ,-3072   ,-3072   ,-6144   ,-6144   ,-9216   ,-9216   ,-12288  ,-12288  ,-14080  ,-14080  ,-15104  ,-15104  ,-14336  ,\n    -14336  ,-13312  ,-13312  ,-11264  ,-11264  ,-8192   ,-8192   ,-5888   ,-5888   ,-4352   ,-4352   ,-3328   ,-3328   ,-3328   ,-3328   ,\n    -5376   ,-5376   ,-8448   ,-8448   ,-12288  ,-12288  ,-16384  ,-16384  ,-19967  ,-19967  ,-23295  ,-23295  ,-24319  ,-24319  ,-24319  ,\n    -24319  ,-22527  ,-22527  ,-19711  ,-19711  ,-15616  ,-15616  ,-11264  ,-11264  ,-7168   ,-7168   ,-4352   ,-4352   ,-2816   ,-2816   ,\n    -2560   ,-2560   ,-4864   ,-4864   ,-7680   ,-7680   ,-12288  ,-12288  ,-16639  ,-16639  ,-21247  ,-21247  ,-24575  ,-24575  ,-26367  ,\n    -26367  ,-26111  ,-26111  ,-24063  ,-24063  ,-20223  ,-20223  ,-14848  ,-14848  ,-8704   ,-8704   ,-3072   ,-3072   ,2304    ,2304    ,\n    5888    ,5888    ,7424    ,7424    ,6400    ,6400    ,3584    ,3584    ,-1280   ,-1280   ,-6656   ,-6656   ,-12288  ,-12288  ,-17151  ,\n    -17151  ,-20223  ,-20223  ,-20991  ,-20991  ,-18687  ,-18687  ,-14848  ,-14848  ,-8192   ,-8192   ,-768    ,-768    ,512     ,512     ,\n    7936    ,7936    ,14848   ,14848   ,18431   ,18431   ,20735   ,20735   ,19711   ,19711   ,16384   ,16384   ,11520   ,11520   ,5632    ,\n    5632    ,0       ,0       ,-4608   ,-4608   ,-7424   ,-7424   ,-7936   ,-7936   ,-5888   ,-5888   ,-1792   ,-1792   ,3840    ,3840    ,\n    9728    ,9728    ,16128   ,16128   ,21503   ,21503   ,25087   ,25087   ,26623   ,26623   ,26111   ,26111   ,23807   ,23807   ,19711   ,\n    19711   ,14592   ,14592   ,9984    ,9984    ,5120    ,5120    ,2560    ,2560    ,768     ,768     ,1792    ,1792    ,4352    ,4352    ,\n    7936    ,7936    ,12800   ,12800   ,17663   ,17663   ,22015   ,22015   ,24831   ,24831   ,26111   ,26111   ,25343   ,25343   ,23295   ,\n    23295   ,18943   ,18943   ,14592   ,14592   ,9472    ,9472    ,5376    ,5376    ,2048    ,2048    ,512     ,512     ,1280    ,1280    ,\n    3328    ,3328    ,5888    ,5888    ,9216    ,9216    ,13312   ,13312   ,15872   ,15872   ,17151   ,17151   ,17663   ,17663   ,16128   ,\n    16128   ,13312   ,13312   ,9216    ,9216    ,5120    ,5120    ,1024    ,1024    ,-3072   ,-3072   ,-4864   ,-4864   ,-6144   ,-6144   ,\n    -5888   ,-5888   ,-5376   ,-5376   ,-3328   ,-3328   ,3072    ,3072    ,5120    ,5120    ,5632    ,5632    ,5888    ,5888    ,4608    ,\n    4608    ,2816    ,2816    ,-1280   ,-1280   ,-5376   ,-5376   ,-9472   ,-9472   ,-13568  ,-13568  ,-16384  ,-16384  ,-17919  ,-17919  ,\n    -17407  ,-17407  ,-16128  ,-16128  ,-13568  ,-13568  ,-9472   ,-9472   ,-6144   ,-6144   ,-3584   ,-3584   ,-1536   ,-1536   ,-768    ,\n    -768    ,-2304   ,-2304   ,-5632   ,-5632   ,-9728   ,-9728   ,-14848  ,-14848  ,-19199  ,-19199  ,-23551  ,-23551  ,-25599  ,-25599  ,\n    -26367  ,-26367  ,-25087  ,-25087  ,-22271  ,-22271  ,-17919  ,-17919  ,-13056  ,-13056  ,-8192   ,-8192   ,-4608   ,-4608   ,-2048   ,\n    -2048   ,-1024   ,-1024   ,-2816   ,-2816   ,-5376   ,-5376   ,-10240  ,-10240  ,-14848  ,-14848  ,-19967  ,-19967  ,-24063  ,-24063  ,\n    -26367  ,-26367  ,-26879  ,-26879  ,-25343  ,-25343  ,-21759  ,-21759  ,-16384  ,-16384  ,-9984   ,-9984   ,-4096   ,-4096   ,1536    ,\n    1536    ,5632    ,5632    ,7680    ,7680    ,7168    ,7168    ,4352    ,4352    ,-256    ,-256    ,-5888   ,-5888   ,-11776  ,-11776  ,\n    -16639  ,-16639  ,-19967  ,-19967  ,-20991  ,-20991  ,-18687  ,-18687  ,-15104  ,-15104  ,-8192   ,-8192   ,-768    ,-768    ,512     ,\n    512     ,7936    ,7936    ,14848   ,14848   ,18431   ,18431   ,20735   ,20735   ,19711   ,19711   ,16128   ,16128   ,11264   ,11264   ,\n    5120    ,5120    ,-512    ,-512    ,-5120   ,-5120   ,-7680   ,-7680   ,-8192   ,-8192   ,-5888   ,-5888   ,-1536   ,-1536   ,4352    ,\n    4352    ,10496   ,10496   ,16895   ,16895   ,22271   ,22271   ,25599   ,25599   ,26879   ,26879   ,26111   ,26111   ,23551   ,23551   ,\n    19199   ,19199   ,13824   ,13824   ,8960    ,8960    ,4096    ,4096    ,1536    ,1536    ,0       ,0       ,1536    ,1536    ,4352    ,\n    4352    ,8448    ,8448    ,13824   ,13824   ,18943   ,18943   ,23295   ,23295   ,26111   ,26111   ,27135   ,27135   ,26111   ,26111   ,\n    23551   ,23551   ,18687   ,18687   ,13824   ,13824   ,8192    ,8192    ,3840    ,3840    ,512     ,512     ,-768    ,-768    ,256     ,\n    256     ,2816    ,2816    ,6144    ,6144    ,9984    ,9984    ,14336   ,14336   ,17407   ,17407   ,18687   ,18687   ,18943   ,18943   ,\n    17151   ,17151   ,14080   ,14080   ,9216    ,9216    ,4864    ,4864    ,0       ,0       ,-4352   ,-4352   ,-6400   ,-6400   ,-7680   ,\n    -7680   ,-7168   ,-7168   ,-6400   ,-6400   ,-3840   ,-3840   ,3584    ,3584    ,6144    ,6144    ,6912    ,6912    ,7424    ,7424    ,\n    6144    ,6144    ,4096    ,4096    ,-256    ,-256    ,-5120   ,-5120   ,-9472   ,-9472   ,-14336  ,-14336  ,-17407  ,-17407  ,-19199  ,\n    -19199  ,-18943  ,-18943  ,-17663  ,-17663  ,-14592  ,-14592  ,-10240  ,-10240  ,-6400   ,-6400   ,-3072   ,-3072   ,-512    ,-512    ,\n    512     ,512     ,-768    ,-768    ,-4096   ,-4096   ,-8448   ,-8448   ,-14080  ,-14080  ,-18943  ,-18943  ,-23807  ,-23807  ,-26367  ,\n    -26367  ,-27391  ,-27391  ,-26367  ,-26367  ,-23551  ,-23551  ,-19199  ,-19199  ,-14080  ,-14080  ,-8704   ,-8704   ,-4608   ,-4608   ,\n    -1792   ,-1792   ,-256    ,-256    ,-1792   ,-1792   ,-4352   ,-4352   ,-9216   ,-9216   ,-14080  ,-14080  ,-19455  ,-19455  ,-23807  ,\n    -23807  ,-26367  ,-26367  ,-27135  ,-27135  ,-25855  ,-25855  ,-22527  ,-22527  ,-17151  ,-17151  ,-10752  ,-10752  ,-4608   ,-4608   ,\n    1280    ,1280    ,5632    ,5632    ,7936    ,7936    ,7424    ,7424    ,4864    ,4864    ,256     ,256     ,-5376   ,-5376   ,-11520  ,\n    -11520  ,-16384  ,-16384  ,-19967  ,-19967  ,-20991  ,-20991  ,-18687  ,-18687  ,-15104  ,-15104  ,-8192   ,-8192   ,-768    ,-768    ,\n    0       ,512     ,1024    ,1536    ,2048    ,2560    ,3072    ,3584    ,4096    ,4608    ,5120    ,5632    ,6144    ,6656    ,7168    ,\n    7680    ,8192    ,8704    ,9216    ,9728    ,10240   ,10752   ,11264   ,11776   ,12288   ,12800   ,13312   ,13824   ,14336   ,14848   ,\n    15360   ,15872   ,16384   ,16895   ,17407   ,17919   ,18431   ,18943   ,19455   ,19967   ,20479   ,20991   ,21503   ,22015   ,22527   ,\n    23039   ,23551   ,24063   ,24575   ,25087   ,25599   ,26111   ,26623   ,27135   ,27647   ,28159   ,28671   ,29183   ,29695   ,30207   ,\n    30719   ,31231   ,31743   ,32255   ,32766   ,32254   ,31742   ,31230   ,30718   ,30206   ,29694   ,29182   ,28670   ,28158   ,27646   ,\n    27134   ,26622   ,26110   ,25598   ,25086   ,24574   ,24062   ,23550   ,23038   ,22526   ,22014   ,21502   ,20990   ,20478   ,19966   ,\n    19454   ,18942   ,18430   ,17918   ,17406   ,16894   ,16383   ,15871   ,15359   ,14847   ,14335   ,13823   ,13311   ,12799   ,12287   ,\n    11775   ,11263   ,10751   ,10239   ,9727    ,9215    ,8703    ,8191    ,7679    ,7167    ,6655    ,6143    ,5631    ,5119    ,4607    ,\n    4095    ,3583    ,3071    ,2559    ,2047    ,1535    ,1023    ,511     ,0       ,-512    ,-1024   ,-1536   ,-2048   ,-2560   ,-3072   ,\n    -3584   ,-4096   ,-4608   ,-5120   ,-5632   ,-6144   ,-6656   ,-7168   ,-7680   ,-8192   ,-8704   ,-9216   ,-9728   ,-10240  ,-10752  ,\n    -11264  ,-11776  ,-12288  ,-12800  ,-13312  ,-13824  ,-14336  ,-14848  ,-15360  ,-15872  ,-16384  ,-16895  ,-17407  ,-17919  ,-18431  ,\n    -18943  ,-19455  ,-19967  ,-20479  ,-20991  ,-21503  ,-22015  ,-22527  ,-23039  ,-23551  ,-24063  ,-24575  ,-25087  ,-25599  ,-26111  ,\n    -26623  ,-27135  ,-27647  ,-28159  ,-28671  ,-29183  ,-29695  ,-30207  ,-30719  ,-31231  ,-31743  ,-32255  ,-32766  ,-32254  ,-31742  ,\n    -31230  ,-30718  ,-30206  ,-29694  ,-29182  ,-28670  ,-28158  ,-27646  ,-27134  ,-26622  ,-26110  ,-25598  ,-25086  ,-24574  ,-24062  ,\n    -23550  ,-23038  ,-22526  ,-22014  ,-21502  ,-20990  ,-20478  ,-19966  ,-19454  ,-18942  ,-18430  ,-17918  ,-17406  ,-16894  ,-16383  ,\n    -15871  ,-15359  ,-14847  ,-14335  ,-13823  ,-13311  ,-12799  ,-12287  ,-11775  ,-11263  ,-10751  ,-10239  ,-9727   ,-9215   ,-8703   ,\n    -8191   ,-7679   ,-7167   ,-6655   ,-6143   ,-5631   ,-5119   ,-4607   ,-4095   ,-3583   ,-3071   ,-2559   ,-2047   ,-1535   ,-1023   ,\n    -511    ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,\n    -32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,-32767  ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,-32767  ,-32511  ,-32255  ,-31999  ,-31743  ,-31487  ,-31231  ,-30975  ,-30719  ,-30463  ,-30207  ,-29951  ,\n    -29695  ,-29439  ,-29183  ,-28927  ,-28671  ,-28415  ,-28159  ,-27903  ,-27647  ,-27391  ,-27135  ,-26879  ,-26623  ,-26367  ,-26111  ,\n    -25855  ,-25599  ,-25343  ,-25087  ,-24831  ,-24575  ,-24319  ,-24063  ,-23807  ,-23551  ,-23295  ,-23039  ,-22783  ,-22527  ,-22271  ,\n    -22015  ,-21759  ,-21503  ,-21247  ,-20991  ,-20735  ,-20479  ,-20223  ,-19967  ,-19711  ,-19455  ,-19199  ,-18943  ,-18687  ,-18431  ,\n    -18175  ,-17919  ,-17663  ,-17407  ,-17151  ,-16895  ,-16639  ,-16384  ,-16128  ,-15872  ,-15616  ,-15360  ,-15104  ,-14848  ,-14592  ,\n    -14336  ,-14080  ,-13824  ,-13568  ,-13312  ,-13056  ,-12800  ,-12544  ,-12288  ,-12032  ,-11776  ,-11520  ,-11264  ,-11008  ,-10752  ,\n    -10496  ,-10240  ,-9984   ,-9728   ,-9472   ,-9216   ,-8960   ,-8704   ,-8448   ,-8192   ,-7936   ,-7680   ,-7424   ,-7168   ,-6912   ,\n    -6656   ,-6400   ,-6144   ,-5888   ,-5632   ,-5376   ,-5120   ,-4864   ,-4608   ,-4352   ,-4096   ,-3840   ,-3584   ,-3328   ,-3072   ,\n    -2816   ,-2560   ,-2304   ,-2048   ,-1792   ,-1536   ,-1280   ,-1024   ,-768    ,-512    ,-256    ,0       ,256     ,512     ,768     ,\n    1024    ,1280    ,1536    ,1792    ,2048    ,2304    ,2560    ,2816    ,3072    ,3328    ,3584    ,3840    ,4096    ,4352    ,4608    ,\n    4864    ,5120    ,5376    ,5632    ,5888    ,6144    ,6400    ,6656    ,6912    ,7168    ,7424    ,7680    ,7936    ,8192    ,8448    ,\n    8704    ,8960    ,9216    ,9472    ,9728    ,9984    ,10240   ,10496   ,10752   ,11008   ,11264   ,11520   ,11776   ,12032   ,12288   ,\n    12544   ,12800   ,13056   ,13312   ,13568   ,13824   ,14080   ,14336   ,14592   ,14848   ,15104   ,15360   ,15616   ,15872   ,16128   ,\n    16384   ,16639   ,16895   ,17151   ,17407   ,17663   ,17919   ,18175   ,18431   ,18687   ,18943   ,19199   ,19455   ,19711   ,19967   ,\n    20223   ,20479   ,20735   ,20991   ,21247   ,21503   ,21759   ,22015   ,22271   ,22527   ,22783   ,23039   ,23295   ,23551   ,23807   ,\n    24063   ,24319   ,24575   ,24831   ,25087   ,25343   ,25599   ,25855   ,26111   ,26367   ,26623   ,26879   ,27135   ,27391   ,27647   ,\n    27903   ,28159   ,28415   ,28671   ,28927   ,29183   ,29439   ,29695   ,29951   ,30207   ,30463   ,30719   ,30975   ,31231   ,31487   ,\n    31743   ,31999   ,32255   ,32511   ,\n    // sounds/wavetables/SINE2SAW.WAV\n    0       ,804     ,1607    ,2410    ,3211    ,4011    ,4807    ,5601    ,6392    ,7179    ,7961    ,8739    ,9511    ,10278   ,11038   ,\n    11792   ,12539   ,13278   ,14009   ,14732   ,15446   ,16150   ,16844   ,17529   ,18203   ,18866   ,19518   ,20158   ,20786   ,21401   ,\n    22003   ,22593   ,23168   ,23730   ,24277   ,24810   ,25328   ,25830   ,26317   ,26788   ,27243   ,27682   ,28104   ,28509   ,28896   ,\n    29267   ,29620   ,29954   ,30271   ,30570   ,30850   ,31112   ,31355   ,31579   ,31784   ,31969   ,32136   ,32283   ,32411   ,32519   ,\n    32608   ,32677   ,32726   ,32756   ,32766   ,32756   ,32726   ,32677   ,32608   ,32519   ,32411   ,32283   ,32136   ,31969   ,31784   ,\n    31579   ,31355   ,31112   ,30850   ,30570   ,30271   ,29954   ,29620   ,29267   ,28896   ,28509   ,28104   ,27682   ,27243   ,26788   ,\n    26317   ,25830   ,25328   ,24810   ,24277   ,23730   ,23168   ,22593   ,22003   ,21401   ,20786   ,20158   ,19518   ,18866   ,18203   ,\n    17529   ,16844   ,16150   ,15446   ,14732   ,14009   ,13278   ,12539   ,11792   ,11038   ,10278   ,9511    ,8739    ,7961    ,7179    ,\n    6392    ,5601    ,4807    ,4011    ,3211    ,2410    ,1607    ,804     ,0       ,-804    ,-1607   ,-2410   ,-3211   ,-4011   ,-4807   ,\n    -5601   ,-6392   ,-7179   ,-7961   ,-8739   ,-9511   ,-10278  ,-11038  ,-11792  ,-12539  ,-13278  ,-14009  ,-14732  ,-15446  ,-16150  ,\n    -16844  ,-17529  ,-18203  ,-18866  ,-19518  ,-20158  ,-20786  ,-21401  ,-22003  ,-22593  ,-23168  ,-23730  ,-24277  ,-24810  ,-25328  ,\n    -25830  ,-26317  ,-26788  ,-27243  ,-27682  ,-28104  ,-28509  ,-28896  ,-29267  ,-29620  ,-29954  ,-30271  ,-30570  ,-30850  ,-31112  ,\n    -31355  ,-31579  ,-31784  ,-31969  ,-32136  ,-32283  ,-32411  ,-32519  ,-32608  ,-32677  ,-32726  ,-32756  ,-32766  ,-32756  ,-32726  ,\n    -32677  ,-32608  ,-32519  ,-32411  ,-32283  ,-32136  ,-31969  ,-31784  ,-31579  ,-31355  ,-31112  ,-30850  ,-30570  ,-30271  ,-29954  ,\n    -29620  ,-29267  ,-28896  ,-28509  ,-28104  ,-27682  ,-27243  ,-26788  ,-26317  ,-25830  ,-25328  ,-24810  ,-24277  ,-23730  ,-23168  ,\n    -22593  ,-22003  ,-21401  ,-20786  ,-20158  ,-19518  ,-18866  ,-18203  ,-17529  ,-16844  ,-16150  ,-15446  ,-14732  ,-14009  ,-13278  ,\n    -12539  ,-11792  ,-11038  ,-10278  ,-9511   ,-8739   ,-7961   ,-7179   ,-6392   ,-5601   ,-4807   ,-4011   ,-3211   ,-2410   ,-1607   ,\n    -804    ,2065    ,2866    ,3411    ,4211    ,5010    ,5808    ,6346    ,7139    ,7928    ,8731    ,9256    ,10033   ,10805   ,11316   ,\n    12077   ,12831   ,13563   ,14048   ,14781   ,15507   ,16225   ,16676   ,17359   ,18049   ,18730   ,19127   ,19786   ,20418   ,21055   ,\n    21663   ,22003   ,22605   ,23176   ,23735   ,24023   ,24555   ,25072   ,25575   ,26064   ,26282   ,26740   ,27184   ,27595   ,28007   ,\n    28386   ,28510   ,28856   ,29202   ,29515   ,29811   ,30090   ,30351   ,30339   ,30565   ,30774   ,30946   ,31119   ,31274   ,31393   ,\n    31511   ,31594   ,31402   ,31448   ,31476   ,31486   ,31476   ,31448   ,31402   ,31338   ,31255   ,31137   ,31018   ,30863   ,30690   ,\n    30518   ,30309   ,30083   ,29839   ,29578   ,29299   ,29003   ,28690   ,28344   ,27998   ,27618   ,27239   ,26827   ,26416   ,25972   ,\n    25514   ,25040   ,24551   ,24048   ,23531   ,22999   ,22711   ,22152   ,21581   ,20979   ,20383   ,19775   ,19138   ,18506   ,17847   ,\n    17194   ,16513   ,16080   ,15397   ,14689   ,13971   ,13245   ,12512   ,11771   ,11039   ,10541   ,9780    ,9013    ,8241    ,7464    ,\n    6683    ,5880    ,5347    ,4554    ,3760    ,2962    ,2163    ,1363    ,562     ,0       ,-819    ,-1620   ,-2420   ,-3219   ,-4017   ,\n    -4811   ,-5347   ,-6137   ,-6940   ,-7721   ,-8498   ,-9270   ,-10037  ,-10541  ,-11296  ,-12028  ,-12769  ,-13502  ,-14228  ,-14946  ,\n    -15654  ,-16337  ,-16770  ,-17451  ,-18104  ,-18763  ,-19395  ,-20032  ,-20640  ,-21236  ,-21838  ,-22409  ,-22712  ,-23256  ,-23788  ,\n    -24305  ,-24808  ,-25297  ,-25770  ,-26229  ,-26673  ,-27084  ,-27496  ,-27874  ,-28255  ,-28601  ,-28947  ,-29260  ,-29556  ,-29835  ,\n    -30096  ,-30340  ,-30566  ,-30775  ,-30947  ,-31120  ,-31275  ,-31394  ,-31512  ,-31595  ,-31659  ,-31705  ,-31733  ,-31742  ,-31733  ,\n    -31705  ,-31659  ,-31595  ,-31768  ,-31650  ,-31531  ,-31376  ,-31203  ,-31031  ,-30822  ,-30596  ,-30352  ,-30347  ,-30068  ,-29772  ,\n    -29459  ,-29113  ,-28767  ,-28642  ,-28264  ,-27852  ,-27441  ,-26997  ,-26538  ,-26321  ,-25832  ,-25329  ,-24812  ,-24280  ,-23992  ,\n    -23433  ,-22862  ,-22260  ,-21664  ,-21312  ,-20675  ,-20043  ,-19384  ,-18987  ,-18306  ,-17616  ,-16933  ,-16481  ,-15764  ,-15038  ,\n    -14305  ,-13820  ,-13088  ,-12333  ,-11573  ,-11062  ,-10290  ,-9513   ,-8732   ,-8185   ,-7395   ,-6603   ,-6065   ,-5267   ,-4468   ,\n    -3668   ,-3123   ,4130    ,4929    ,5471    ,6269    ,6810    ,7606    ,8142    ,8933    ,9464    ,10283   ,10807   ,11328   ,12099   ,\n    12610   ,13372   ,13871   ,14587   ,15074   ,15810   ,16283   ,17003   ,17460   ,18130   ,18570   ,19257   ,19644   ,20311   ,20678   ,\n    21325   ,21926   ,22260   ,22874   ,23184   ,23740   ,24026   ,24556   ,25073   ,25321   ,25811   ,26032   ,26494   ,26943   ,27087   ,\n    27506   ,27876   ,28009   ,28349   ,28707   ,28760   ,29053   ,29330   ,29591   ,29580   ,29808   ,30020   ,30180   ,30103   ,30265   ,\n    30376   ,30503   ,30581   ,30384   ,30427   ,30453   ,30462   ,30453   ,30427   ,30384   ,30069   ,29991   ,29864   ,29753   ,29591   ,\n    29412   ,29252   ,29040   ,28812   ,28567   ,28306   ,28029   ,27736   ,27427   ,27069   ,26729   ,26340   ,25970   ,25551   ,25151   ,\n    24958   ,24496   ,24019   ,23529   ,23025   ,22508   ,21978   ,21692   ,21136   ,20570   ,19956   ,19366   ,18765   ,18374   ,17751   ,\n    17084   ,16441   ,15755   ,15315   ,14645   ,13932   ,13211   ,12738   ,12002   ,11259   ,10543   ,10044   ,9282    ,8515    ,7744    ,\n    7223    ,6443    ,5624    ,5093    ,4302    ,3510    ,2714    ,2173    ,1375    ,577     ,0       ,-834    ,-1632   ,-2430   ,-2971   ,\n    -3767   ,-4559   ,-5093   ,-5881   ,-6700   ,-7480   ,-8001   ,-8772   ,-9539   ,-10044  ,-10800  ,-11516  ,-12259  ,-12995  ,-13468  ,\n    -14189  ,-14902  ,-15572  ,-16012  ,-16698  ,-17341  ,-18008  ,-18631  ,-19022  ,-19623  ,-20213  ,-20827  ,-21393  ,-21693  ,-22235  ,\n    -22765  ,-23282  ,-23786  ,-24276  ,-24752  ,-25215  ,-25408  ,-25808  ,-26227  ,-26596  ,-26986  ,-27326  ,-27684  ,-27993  ,-28286  ,\n    -28563  ,-28824  ,-29069  ,-29297  ,-29509  ,-29669  ,-29848  ,-30010  ,-30121  ,-30248  ,-30326  ,-30641  ,-30684  ,-30710  ,-30718  ,\n    -30710  ,-30684  ,-30641  ,-30582  ,-30760  ,-30633  ,-30522  ,-30360  ,-30437  ,-30277  ,-30065  ,-29837  ,-29592  ,-29587  ,-29310  ,\n    -29017  ,-28964  ,-28606  ,-28266  ,-28132  ,-27763  ,-27344  ,-27200  ,-26751  ,-26288  ,-26068  ,-25578  ,-25330  ,-24813  ,-24283  ,\n    -23997  ,-23441  ,-23131  ,-22517  ,-21927  ,-21582  ,-20935  ,-20568  ,-19901  ,-19514  ,-18827  ,-18387  ,-17717  ,-17260  ,-16539  ,\n    -16067  ,-15331  ,-14844  ,-14128  ,-13628  ,-12867  ,-12356  ,-11585  ,-11064  ,-10284  ,-9721   ,-9189   ,-8399   ,-7863   ,-7067   ,\n    -6526   ,-5728   ,-5186   ,6451    ,6991    ,7531    ,8327    ,8866    ,9403    ,9938    ,10471   ,11257   ,11835   ,12359   ,12879   ,\n    13394   ,13905   ,14667   ,15167   ,15611   ,16100   ,16838   ,17314   ,17782   ,18243   ,18902   ,19347   ,19784   ,20161   ,20836   ,\n    21194   ,21594   ,22189   ,22517   ,22886   ,23449   ,23745   ,24029   ,24558   ,24818   ,25322   ,25558   ,25782   ,26248   ,26446   ,\n    26834   ,27005   ,27366   ,27509   ,27842   ,27956   ,28261   ,28295   ,28570   ,28831   ,28821   ,29051   ,29010   ,29158   ,29343   ,\n    29256   ,29358   ,29496   ,29567   ,29366   ,29406   ,29430   ,29438   ,29430   ,29150   ,29110   ,29055   ,28984   ,28846   ,28744   ,\n    28575   ,28390   ,27986   ,27771   ,27541   ,27295   ,27034   ,26759   ,26469   ,26164   ,26050   ,25717   ,25318   ,24957   ,24530   ,\n    24142   ,23688   ,23222   ,22998   ,22506   ,22002   ,21486   ,20957   ,20673   ,20121   ,19558   ,18933   ,18605   ,18010   ,17354   ,\n    16740   ,16322   ,15689   ,14996   ,14551   ,13892   ,13175   ,12707   ,11975   ,11492   ,10747   ,10047   ,9547    ,8785    ,8018    ,\n    7503    ,6727    ,6203    ,5369    ,4839    ,4050    ,3259    ,2722    ,1927    ,1387    ,591     ,0       ,-848    ,-1388   ,-2184   ,\n    -2979   ,-3516   ,-4307   ,-4839   ,-5626   ,-6204   ,-6983   ,-7759   ,-8275   ,-9042   ,-9547   ,-10304  ,-11004  ,-11493  ,-12231  ,\n    -12963  ,-13432  ,-14149  ,-14807  ,-15253  ,-15946  ,-16578  ,-16997  ,-17611  ,-18267  ,-18606  ,-19190  ,-19815  ,-20378  ,-20674  ,\n    -21214  ,-21742  ,-22259  ,-22763  ,-22999  ,-23478  ,-23945  ,-24398  ,-24787  ,-25214  ,-25574  ,-25718  ,-26051  ,-26421  ,-26726  ,\n    -27016  ,-27291  ,-27552  ,-27798  ,-28028  ,-28243  ,-28391  ,-28576  ,-28745  ,-29103  ,-29241  ,-29312  ,-29367  ,-29406  ,-29430  ,\n    -29694  ,-29686  ,-29662  ,-29623  ,-29568  ,-29753  ,-29615  ,-29513  ,-29600  ,-29415  ,-29267  ,-29308  ,-29078  ,-28832  ,-28827  ,\n    -28552  ,-28518  ,-28213  ,-28099  ,-27766  ,-27622  ,-27262  ,-27091  ,-26702  ,-26505  ,-26038  ,-25815  ,-25323  ,-25075  ,-24814  ,\n    -24286  ,-24002  ,-23450  ,-23143  ,-22774  ,-22190  ,-21851  ,-21451  ,-20837  ,-20418  ,-20041  ,-19604  ,-18902  ,-18500  ,-18039  ,\n    -17570  ,-16838  ,-16357  ,-15868  ,-15424  ,-14667  ,-14162  ,-13651  ,-13135  ,-12615  ,-11836  ,-11258  ,-10727  ,-10195  ,-9660   ,\n    -9123   ,-8328   ,-7788   ,-7248   ,8516    ,9054    ,9592    ,10129   ,10665   ,11201   ,11733   ,12265   ,12793   ,13388   ,13654   ,\n    14173   ,14688   ,15199   ,15706   ,16207   ,16635   ,17125   ,17610   ,18089   ,18562   ,19027   ,19417   ,19868   ,20311   ,20678   ,\n    21105   ,21455   ,21864   ,22451   ,22773   ,23155   ,23457   ,23750   ,24031   ,24303   ,24819   ,25068   ,25306   ,25532   ,25746   ,\n    26204   ,26326   ,26503   ,26856   ,27008   ,27079   ,27461   ,27505   ,27793   ,27811   ,28071   ,28061   ,28038   ,28257   ,28392   ,\n    28327   ,28503   ,28341   ,28488   ,28554   ,28348   ,28384   ,28406   ,28158   ,28150   ,28128   ,28092   ,27786   ,27720   ,27573   ,\n    27479   ,27303   ,27112   ,26977   ,26758   ,26525   ,26279   ,26019   ,25745   ,25457   ,25157   ,24775   ,24448   ,24040   ,23687   ,\n    23254   ,22876   ,22674   ,22204   ,21722   ,21228   ,20979   ,20463   ,19935   ,19654   ,19105   ,18547   ,18165   ,17587   ,17000   ,\n    16591   ,15986   ,15303   ,14936   ,14237   ,13786   ,13140   ,12675   ,11946   ,11467   ,10726   ,10236   ,9551    ,9050    ,8287    ,\n    7776    ,7005    ,6486    ,5708    ,5113    ,4585    ,3797    ,3265    ,2473    ,1937    ,1144    ,606     ,0       ,-863    ,-1401   ,\n    -2194   ,-2730   ,-3522   ,-4054   ,-4585   ,-5370   ,-5965   ,-6743   ,-7262   ,-8033   ,-8544   ,-9050   ,-9808   ,-10493  ,-10983  ,\n    -11724  ,-12203  ,-12932  ,-13397  ,-14043  ,-14494  ,-15193  ,-15560  ,-16243  ,-16848  ,-17257  ,-17844  ,-18422  ,-18804  ,-19362  ,\n    -19655  ,-20192  ,-20720  ,-21236  ,-21485  ,-21979  ,-22460  ,-22931  ,-23133  ,-23511  ,-23944  ,-24296  ,-24705  ,-25032  ,-25414  ,\n    -25714  ,-26002  ,-26276  ,-26536  ,-26782  ,-27015  ,-27234  ,-27369  ,-27560  ,-27736  ,-27830  ,-27977  ,-28043  ,-28349  ,-28385  ,\n    -28407  ,-28414  ,-28663  ,-28641  ,-28605  ,-28555  ,-28745  ,-28598  ,-28760  ,-28584  ,-28649  ,-28514  ,-28295  ,-28318  ,-28072  ,\n    -28068  ,-28050  ,-27762  ,-27718  ,-27336  ,-27265  ,-27112  ,-26760  ,-26583  ,-26461  ,-26003  ,-25788  ,-25563  ,-25325  ,-25076  ,\n    -24560  ,-24288  ,-24007  ,-23714  ,-23412  ,-23030  ,-22452  ,-22121  ,-21712  ,-21362  ,-20935  ,-20568  ,-20125  ,-19674  ,-19284  ,\n    -18819  ,-18346  ,-17867  ,-17382  ,-16892  ,-16463  ,-15962  ,-15456  ,-14945  ,-14430  ,-13911  ,-13389  ,-13050  ,-12521  ,-11990  ,\n    -11458  ,-10922  ,-10386  ,-9849   ,-9311   ,10837   ,11373   ,11652   ,12187   ,12721   ,12999   ,13529   ,14059   ,14330   ,14940   ,\n    15205   ,15724   ,16239   ,16493   ,17000   ,17502   ,17915   ,18152   ,18639   ,19121   ,19341   ,19810   ,20188   ,20645   ,20838   ,\n    21195   ,21630   ,21971   ,22390   ,22714   ,23030   ,23168   ,23466   ,23755   ,24034   ,24304   ,24564   ,24814   ,25053   ,25282   ,\n    25500   ,25707   ,26074   ,26258   ,26346   ,26508   ,26572   ,26710   ,27006   ,27035   ,27051   ,27311   ,27302   ,27281   ,27503   ,\n    27370   ,27567   ,27494   ,27580   ,27481   ,27540   ,27330   ,27363   ,27383   ,27134   ,27127   ,27107   ,26818   ,26772   ,26713   ,\n    26556   ,26214   ,26031   ,25834   ,25711   ,25489   ,25254   ,25007   ,24747   ,24475   ,24190   ,23894   ,23500   ,23180   ,23018   ,\n    22674   ,22234   ,21867   ,21404   ,21186   ,20701   ,20206   ,19956   ,19440   ,18914   ,18635   ,18090   ,17536   ,17142   ,16570   ,\n    16247   ,15572   ,15231   ,14540   ,14183   ,13478   ,13021   ,12387   ,11918   ,11442   ,10704   ,10217   ,9724    ,9055    ,8553    ,\n    7790    ,7279    ,6764    ,5989    ,5468    ,4858    ,4331    ,3545    ,3015    ,2481    ,1691    ,1156    ,621     ,0       ,-621    ,\n    -1413   ,-1948   ,-2482   ,-3271   ,-3802   ,-4331   ,-5115   ,-5725   ,-6246   ,-6765   ,-7535   ,-8047   ,-8553   ,-9312   ,-9725   ,\n    -10473  ,-10961  ,-11443  ,-12175  ,-12644  ,-13278  ,-13735  ,-14184  ,-14797  ,-15231  ,-15829  ,-16247  ,-16827  ,-17399  ,-17792  ,\n    -18346  ,-18636  ,-19171  ,-19697  ,-19957  ,-20462  ,-20958  ,-21186  ,-21660  ,-22124  ,-22490  ,-22675  ,-23018  ,-23436  ,-23757  ,\n    -24150  ,-24447  ,-24732  ,-25004  ,-25264  ,-25511  ,-25746  ,-25968  ,-26091  ,-26288  ,-26471  ,-26556  ,-26714  ,-27029  ,-27075  ,\n    -27108  ,-27384  ,-27390  ,-27384  ,-27620  ,-27587  ,-27541  ,-27738  ,-27580  ,-27751  ,-27568  ,-27627  ,-27504  ,-27538  ,-27559  ,\n    -27312  ,-27308  ,-27292  ,-27007  ,-26966  ,-26829  ,-26764  ,-26602  ,-26259  ,-26074  ,-25964  ,-25756  ,-25538  ,-25310  ,-25070  ,\n    -24821  ,-24561  ,-24291  ,-24012  ,-23722  ,-23424  ,-23031  ,-22715  ,-22390  ,-22228  ,-21886  ,-21452  ,-21095  ,-20646  ,-20445  ,\n    -20067  ,-19598  ,-19122  ,-18896  ,-18408  ,-17916  ,-17503  ,-17256  ,-16750  ,-16239  ,-15981  ,-15462  ,-14941  ,-14587  ,-14059  ,\n    -13786  ,-13255  ,-12722  ,-12444  ,-11909  ,-11373  ,12902   ,13435   ,13712   ,14245   ,14521   ,14796   ,15325   ,15597   ,16122   ,\n    16491   ,16756   ,17018   ,17532   ,17787   ,18295   ,18542   ,18939   ,19178   ,19668   ,19897   ,20120   ,20594   ,20960   ,21166   ,\n    21365   ,21712   ,22154   ,22231   ,22659   ,22977   ,23031   ,23436   ,23730   ,23760   ,24037   ,24306   ,24565   ,24815   ,24800   ,\n    25032   ,25253   ,25466   ,25565   ,25757   ,25836   ,26007   ,26065   ,26214   ,26251   ,26277   ,26291   ,26551   ,26543   ,26524   ,\n    26493   ,26604   ,26551   ,26485   ,26562   ,26473   ,26527   ,26312   ,26342   ,26104   ,26110   ,26104   ,25830   ,25800   ,25503   ,\n    25449   ,25282   ,25205   ,25015   ,24812   ,24445   ,24220   ,23983   ,23735   ,23475   ,23205   ,22923   ,22630   ,22481   ,22167   ,\n    21740   ,21405   ,20957   ,20602   ,20389   ,19912   ,19680   ,19183   ,18677   ,18418   ,17893   ,17616   ,17074   ,16524   ,16120   ,\n    15810   ,15236   ,14808   ,14219   ,13777   ,13174   ,12719   ,12257   ,11635   ,11161   ,10682   ,10197   ,9707    ,8956    ,8559    ,\n    8056    ,7292    ,6781    ,6267    ,5749    ,5228    ,4602    ,4077    ,3293    ,2764    ,2233    ,1701    ,1168    ,379     ,0       ,\n    -636    ,-1169   ,-1958   ,-2490   ,-3021   ,-3550   ,-4077   ,-4859   ,-5229   ,-6005   ,-6523   ,-7038   ,-7549   ,-8056   ,-8816   ,\n    -9213   ,-9708   ,-10453  ,-10938  ,-11418  ,-11892  ,-12513  ,-12976  ,-13431  ,-14034  ,-14476  ,-15065  ,-15493  ,-15811  ,-16377  ,\n    -16781  ,-17331  ,-17617  ,-18150  ,-18674  ,-18934  ,-19440  ,-19681  ,-20168  ,-20646  ,-20858  ,-21214  ,-21662  ,-21996  ,-22168  ,\n    -22482  ,-22887  ,-23180  ,-23462  ,-23732  ,-23992  ,-24240  ,-24477  ,-24702  ,-24813  ,-25016  ,-25206  ,-25539  ,-25706  ,-25760  ,\n    -26057  ,-26086  ,-26104  ,-26366  ,-26360  ,-26598  ,-26569  ,-26528  ,-26730  ,-26819  ,-26742  ,-26808  ,-26861  ,-26750  ,-26781  ,\n    -26800  ,-26552  ,-26548  ,-26534  ,-26508  ,-26471  ,-26322  ,-26264  ,-26092  ,-26014  ,-25822  ,-25722  ,-25510  ,-25288  ,-25057  ,\n    -24816  ,-24822  ,-24562  ,-24294  ,-24017  ,-23731  ,-23693  ,-23288  ,-22978  ,-22916  ,-22488  ,-22155  ,-21969  ,-21622  ,-21423  ,\n    -20960  ,-20851  ,-20377  ,-20153  ,-19668  ,-19435  ,-19196  ,-18799  ,-18295  ,-18044  ,-17789  ,-17274  ,-17012  ,-16492  ,-16123  ,\n    -15853  ,-15582  ,-15053  ,-14778  ,-14246  ,-13969  ,-13692  ,15223   ,15498   ,15772   ,16047   ,16321   ,16593   ,17120   ,17390   ,\n    17658   ,18043   ,18307   ,18568   ,18826   ,19082   ,19334   ,19582   ,19963   ,20204   ,20440   ,20672   ,20899   ,21377   ,21475   ,\n    21687   ,21892   ,22229   ,22423   ,22747   ,22929   ,23240   ,23288   ,23449   ,23738   ,23765   ,24040   ,24307   ,24310   ,24561   ,\n    24547   ,24782   ,25007   ,24968   ,25057   ,25256   ,25326   ,25506   ,25558   ,25463   ,25496   ,25519   ,25531   ,25791   ,25784   ,\n    25767   ,25739   ,25582   ,25535   ,25476   ,25545   ,25466   ,25513   ,25294   ,25320   ,25080   ,25086   ,24824   ,24808   ,24526   ,\n    24489   ,24186   ,24009   ,23940   ,23743   ,23534   ,23179   ,22951   ,22712   ,22463   ,22203   ,21935   ,21656   ,21367   ,21206   ,\n    20898   ,20462   ,20136   ,19937   ,19592   ,19119   ,18894   ,18403   ,18161   ,17654   ,17395   ,16872   ,16597   ,16059   ,15514   ,\n    15097   ,14793   ,14226   ,13788   ,13464   ,13014   ,12421   ,11960   ,11492   ,10882   ,10404   ,9921    ,9433    ,8941    ,8444    ,\n    8063    ,7559    ,6795    ,6283    ,5769    ,5252    ,4732    ,4347    ,3823    ,3041    ,2514    ,1985    ,1455    ,924     ,394     ,\n    0       ,-651    ,-1181   ,-1712   ,-2242   ,-2771   ,-3298   ,-3823   ,-4604   ,-4989   ,-5509   ,-6026   ,-6540   ,-7052   ,-7559   ,\n    -8320   ,-8701   ,-9198   ,-9690   ,-10178  ,-10661  ,-11139  ,-11749  ,-12217  ,-12678  ,-13271  ,-13721  ,-14045  ,-14483  ,-15050  ,\n    -15354  ,-15771  ,-16316  ,-16598  ,-17129  ,-17652  ,-17911  ,-18418  ,-18660  ,-19150  ,-19376  ,-19849  ,-20194  ,-20393  ,-20718  ,\n    -21155  ,-21463  ,-21624  ,-21913  ,-22192  ,-22460  ,-22720  ,-22969  ,-23208  ,-23436  ,-23791  ,-24000  ,-24197  ,-24266  ,-24443  ,\n    -24746  ,-24783  ,-25065  ,-25081  ,-25342  ,-25337  ,-25577  ,-25551  ,-25514  ,-25723  ,-25802  ,-25733  ,-25792  ,-25839  ,-25996  ,\n    -26024  ,-26041  ,-25792  ,-25788  ,-25776  ,-25753  ,-25720  ,-25815  ,-25763  ,-25582  ,-25513  ,-25314  ,-25225  ,-25264  ,-25038  ,\n    -24804  ,-24818  ,-24567  ,-24564  ,-24297  ,-24022  ,-23995  ,-23706  ,-23545  ,-23241  ,-23186  ,-23004  ,-22680  ,-22486  ,-22149  ,\n    -21944  ,-21732  ,-21634  ,-21156  ,-20929  ,-20697  ,-20461  ,-20220  ,-19839  ,-19590  ,-19339  ,-19083  ,-18825  ,-18564  ,-18044  ,\n    -17915  ,-17646  ,-17377  ,-16850  ,-16577  ,-16304  ,-16029  ,-15755  ,17287   ,17559   ,17832   ,18104   ,18375   ,18646   ,18659   ,\n    18928   ,19194   ,19596   ,19602   ,19863   ,20121   ,20376   ,20629   ,20878   ,20988   ,21230   ,21469   ,21704   ,21935   ,21905   ,\n    22246   ,22463   ,22676   ,22746   ,22948   ,23008   ,23198   ,23502   ,23544   ,23717   ,23747   ,24026   ,24042   ,24052   ,24311   ,\n    24306   ,24551   ,24532   ,24505   ,24727   ,24804   ,24754   ,24816   ,24750   ,24795   ,24968   ,24996   ,25016   ,25028   ,25030   ,\n    24768   ,24753   ,24730   ,24816   ,24774   ,24724   ,24527   ,24458   ,24500   ,24276   ,24043   ,24057   ,23806   ,23801   ,23531   ,\n    23508   ,23220   ,23178   ,22991   ,22676   ,22470   ,22256   ,22170   ,21937   ,21696   ,21446   ,21188   ,20920   ,20644   ,20360   ,\n    19931   ,19630   ,19440   ,19122   ,18660   ,18327   ,18105   ,17620   ,17383   ,16882   ,16631   ,16117   ,15851   ,15579   ,15044   ,\n    14758   ,14329   ,13775   ,13471   ,13025   ,12453   ,11995   ,11669   ,11200   ,10727   ,10386   ,9904    ,9417    ,8926    ,8431    ,\n    7933    ,7311    ,7062    ,6553    ,6042    ,5528    ,5011    ,4493    ,3835    ,3569    ,3044    ,2519    ,1992    ,1465    ,937     ,\n    408     ,0       ,-665    ,-1194   ,-1722   ,-2249   ,-2776   ,-3301   ,-3569   ,-4092   ,-4750   ,-5268   ,-5785   ,-6299   ,-6810   ,\n    -7062   ,-7568   ,-8190   ,-8688   ,-9183   ,-9674   ,-10161  ,-10643  ,-10984  ,-11457  ,-11926  ,-12252  ,-12710  ,-13282  ,-13728  ,\n    -14032  ,-14586  ,-15015  ,-15301  ,-15580  ,-16108  ,-16374  ,-16888  ,-17139  ,-17640  ,-17876  ,-18362  ,-18584  ,-18917  ,-19379  ,\n    -19696  ,-19887  ,-20188  ,-20617  ,-20901  ,-21177  ,-21445  ,-21703  ,-21953  ,-22194  ,-22427  ,-22513  ,-22727  ,-22933  ,-23248  ,\n    -23435  ,-23477  ,-23765  ,-23788  ,-24058  ,-24062  ,-24314  ,-24300  ,-24533  ,-24501  ,-24715  ,-24784  ,-24981  ,-25031  ,-25073  ,\n    -24987  ,-25010  ,-25025  ,-25031  ,-25285  ,-25273  ,-25253  ,-25225  ,-25052  ,-25007  ,-25072  ,-25011  ,-25061  ,-24984  ,-24762  ,\n    -24788  ,-24808  ,-24563  ,-24568  ,-24309  ,-24299  ,-24283  ,-24004  ,-23974  ,-23801  ,-23503  ,-23455  ,-23265  ,-23205  ,-23003  ,\n    -22933  ,-22720  ,-22503  ,-22162  ,-22192  ,-21961  ,-21726  ,-21487  ,-21245  ,-21135  ,-20885  ,-20633  ,-20378  ,-20120  ,-19859  ,\n    -19597  ,-19451  ,-19184  ,-18916  ,-18903  ,-18632  ,-18361  ,-18089  ,-17816  ,19608   ,19622   ,19892   ,20162   ,20175   ,20444   ,\n    20455   ,20722   ,20987   ,21148   ,21154   ,21414   ,21415   ,21671   ,21924   ,21918   ,22012   ,22256   ,22498   ,22480   ,22714   ,\n    22688   ,23018   ,22984   ,23203   ,23263   ,23473   ,23524   ,23468   ,23765   ,23801   ,23730   ,24011   ,24031   ,24045   ,24054   ,\n    24056   ,24308   ,24298   ,24282   ,24259   ,24230   ,24296   ,24253   ,24306   ,24249   ,24288   ,24217   ,24241   ,24258   ,24268   ,\n    24270   ,24009   ,23996   ,23976   ,23794   ,23758   ,23715   ,23510   ,23451   ,23486   ,23258   ,23022   ,23034   ,22782   ,22778   ,\n    22510   ,22234   ,22206   ,21915   ,21718   ,21667   ,21454   ,21234   ,20904   ,20668   ,20425   ,20174   ,19916   ,19650   ,19377   ,\n    19097   ,18912   ,18617   ,18162   ,17853   ,17640   ,17318   ,16835   ,16602   ,16363   ,15861   ,15609   ,15095   ,14830   ,14560   ,\n    14028   ,13747   ,13306   ,13014   ,12461   ,12005   ,11698   ,11232   ,10916   ,10441   ,9963    ,9633    ,9147    ,8657    ,8163    ,\n    7921    ,7421    ,6815    ,6565    ,6056    ,5544    ,5031    ,4515    ,4253    ,3580    ,3315    ,2792    ,2269    ,1744    ,1219    ,\n    949     ,423     ,0       ,-680    ,-950    ,-1476   ,-2001   ,-2526   ,-3049   ,-3315   ,-3837   ,-4254   ,-4771   ,-5287   ,-5801   ,\n    -6313   ,-6565   ,-7072   ,-7678   ,-7922   ,-8419   ,-8913   ,-9404   ,-9890   ,-10219  ,-10698  ,-11173  ,-11489  ,-11955  ,-12262  ,\n    -12718  ,-13015  ,-13563  ,-14004  ,-14285  ,-14561  ,-15087  ,-15351  ,-15866  ,-16118  ,-16364  ,-16858  ,-17092  ,-17574  ,-17897  ,\n    -18110  ,-18418  ,-18618  ,-18913  ,-19354  ,-19634  ,-19907  ,-20173  ,-20431  ,-20682  ,-20925  ,-21161  ,-21235  ,-21455  ,-21668  ,\n    -21975  ,-22172  ,-22463  ,-22491  ,-22766  ,-22778  ,-23038  ,-23290  ,-23278  ,-23515  ,-23487  ,-23708  ,-23767  ,-23972  ,-24015  ,\n    -24051  ,-24233  ,-24253  ,-24266  ,-24271  ,-24525  ,-24515  ,-24498  ,-24474  ,-24545  ,-24506  ,-24562  ,-24510  ,-24553  ,-24486  ,\n    -24516  ,-24538  ,-24555  ,-24309  ,-24313  ,-24310  ,-24302  ,-24288  ,-24012  ,-23987  ,-24058  ,-23766  ,-23725  ,-23781  ,-23474  ,\n    -23520  ,-23460  ,-23241  ,-23018  ,-22945  ,-22971  ,-22736  ,-22498  ,-22513  ,-22269  ,-22175  ,-21924  ,-21928  ,-21672  ,-21670  ,\n    -21410  ,-21149  ,-20988  ,-20978  ,-20712  ,-20701  ,-20432  ,-20163  ,-20149  ,-19879  ,21673   ,21941   ,21952   ,21964   ,22231   ,\n    22242   ,22251   ,22516   ,22523   ,22700   ,22705   ,22708   ,22966   ,22965   ,22963   ,23214   ,23292   ,23283   ,23270   ,23511   ,\n    23493   ,23472   ,23533   ,23761   ,23730   ,23780   ,23742   ,23784   ,23994   ,24028   ,24058   ,23999   ,24020   ,24036   ,24048   ,\n    24055   ,24057   ,24054   ,24045   ,24032   ,24013   ,23988   ,24044   ,24008   ,23796   ,23749   ,23781   ,23722   ,23742   ,23500   ,\n    23508   ,23510   ,23250   ,23239   ,23222   ,23028   ,22998   ,22706   ,22749   ,22443   ,22473   ,22240   ,22000   ,22010   ,21758   ,\n    21498   ,21488   ,21216   ,20937   ,20907   ,20701   ,20402   ,20182   ,19956   ,19638   ,19399   ,19154   ,18902   ,18644   ,18380   ,\n    18110   ,17834   ,17637   ,17349   ,17140   ,16840   ,16365   ,16053   ,15822   ,15585   ,15086   ,14839   ,14586   ,14072   ,13809   ,\n    13541   ,13013   ,12736   ,12283   ,11997   ,11707   ,11241   ,10943   ,10469   ,10163   ,9682    ,9198    ,8881    ,8390    ,8152    ,\n    7655    ,7156    ,6909    ,6319    ,6068    ,5558    ,5047    ,4789    ,4274    ,3757    ,3324    ,3061    ,2540    ,2019    ,1752    ,\n    1229    ,705     ,438     ,0       ,-438    ,-962    ,-1486   ,-1753   ,-2275   ,-2797   ,-3061   ,-3581   ,-4014   ,-4531   ,-4790   ,\n    -5303   ,-5815   ,-6068   ,-6576   ,-6910   ,-7412   ,-7912   ,-8153   ,-8647   ,-9138   ,-9455   ,-9939   ,-10164  ,-10726  ,-10943  ,\n    -11498  ,-11707  ,-12254  ,-12540  ,-12992  ,-13269  ,-13542  ,-14066  ,-14329  ,-14587  ,-15095  ,-15343  ,-15585  ,-16078  ,-16310  ,\n    -16620  ,-16841  ,-17140  ,-17605  ,-17894  ,-18090  ,-18367  ,-18637  ,-18901  ,-19159  ,-19411  ,-19656  ,-19895  ,-20213  ,-20439  ,\n    -20659  ,-20701  ,-20908  ,-21194  ,-21473  ,-21489  ,-21755  ,-22014  ,-22011  ,-22257  ,-22497  ,-22474  ,-22700  ,-22749  ,-22963  ,\n    -22999  ,-23285  ,-23223  ,-23496  ,-23507  ,-23511  ,-23765  ,-23757  ,-23743  ,-23978  ,-24038  ,-24005  ,-24052  ,-24009  ,-24044  ,\n    -24245  ,-24269  ,-24288  ,-24302  ,-24310  ,-24314  ,-24312  ,-24305  ,-24293  ,-24276  ,-24255  ,-24059  ,-24029  ,-23994  ,-24041  ,\n    -23998  ,-24037  ,-23987  ,-23762  ,-23790  ,-23729  ,-23750  ,-23512  ,-23527  ,-23539  ,-23293  ,-23215  ,-23219  ,-23222  ,-22966  ,\n    -22965  ,-22962  ,-22701  ,-22780  ,-22516  ,-22508  ,-22498  ,-22232  ,-22221  ,-22209  ,-21941  ,23994   ,24003   ,24012   ,24022   ,\n    24031   ,24039   ,24047   ,24054   ,24060   ,24252   ,24256   ,24259   ,24260   ,24260   ,24258   ,24254   ,24316   ,24309   ,24299   ,\n    24287   ,24272   ,24255   ,24304   ,24282   ,24257   ,24297   ,24266   ,24300   ,24263   ,24291   ,24059   ,24011   ,24028   ,24041   ,\n    24051   ,24056   ,23802   ,23799   ,23792   ,23782   ,23766   ,23491   ,23535   ,23507   ,23286   ,23248   ,23274   ,22970   ,22987   ,\n    22742   ,22748   ,22750   ,22491   ,22482   ,22212   ,22006   ,21982   ,21697   ,21731   ,21436   ,21459   ,21222   ,20979   ,20731   ,\n    20734   ,20475   ,20211   ,19942   ,19923   ,19644   ,19427   ,19137   ,18910   ,18678   ,18372   ,18130   ,17883   ,17630   ,17372   ,\n    17110   ,16843   ,16570   ,16363   ,16081   ,15863   ,15572   ,15344   ,15044   ,14551   ,14311   ,14065   ,13816   ,13307   ,13049   ,\n    12788   ,12522   ,11997   ,11724   ,11260   ,10980   ,10696   ,10221   ,9931    ,9706    ,9154    ,8923    ,8433    ,8128    ,7633    ,\n    7392    ,6892    ,6646    ,6141    ,5823    ,5571    ,5061    ,4549    ,4292    ,3777    ,3517    ,3069    ,2807    ,2288    ,1768    ,\n    1504    ,983     ,717     ,196     ,0       ,-453    ,-974    ,-1240   ,-1761   ,-2025   ,-2545   ,-2807   ,-3326   ,-3774   ,-4034   ,\n    -4549   ,-4806   ,-5318   ,-5571   ,-6080   ,-6398   ,-6903   ,-7149   ,-7649   ,-7890   ,-8385   ,-8690   ,-9180   ,-9411   ,-9963   ,\n    -10188  ,-10478  ,-10953  ,-11237  ,-11517  ,-11981  ,-12254  ,-12523  ,-13045  ,-13306  ,-13564  ,-14073  ,-14322  ,-14567  ,-14808  ,\n    -15301  ,-15601  ,-15829  ,-16119  ,-16338  ,-16619  ,-16827  ,-17100  ,-17367  ,-17629  ,-17887  ,-18140  ,-18387  ,-18629  ,-18935  ,\n    -19167  ,-19394  ,-19684  ,-19901  ,-20180  ,-20199  ,-20468  ,-20732  ,-20990  ,-20988  ,-21236  ,-21479  ,-21460  ,-21693  ,-21988  ,\n    -21954  ,-22239  ,-22263  ,-22469  ,-22739  ,-22748  ,-22751  ,-23005  ,-22999  ,-23244  ,-23227  ,-23531  ,-23505  ,-23542  ,-23764  ,\n    -23792  ,-23748  ,-24023  ,-24038  ,-24049  ,-24056  ,-24059  ,-24313  ,-24308  ,-24298  ,-24285  ,-24268  ,-24316  ,-24292  ,-24520  ,\n    -24557  ,-24523  ,-24554  ,-24514  ,-24539  ,-24561  ,-24512  ,-24529  ,-24544  ,-24556  ,-24566  ,-24573  ,-24511  ,-24514  ,-24517  ,\n    -24517  ,-24516  ,-24513  ,-24253  ,-24317  ,-24310  ,-24304  ,-24296  ,-24288  ,-24279  ,-24269  ,-24260  ,26059   ,26066   ,26073   ,\n    26080   ,25830   ,25837   ,25842   ,25848   ,25852   ,25805   ,25552   ,25554   ,25554   ,25554   ,25553   ,25294   ,25341   ,25335   ,\n    25328   ,25063   ,25052   ,25039   ,25076   ,24803   ,24784   ,24814   ,24791   ,24561   ,24533   ,24553   ,24315   ,24280   ,24292   ,\n    24046   ,24053   ,23802   ,23803   ,23801   ,23540   ,23532   ,23264   ,23250   ,23027   ,23005   ,22776   ,22747   ,22511   ,22475   ,\n    22231   ,22240   ,21989   ,21990   ,21731   ,21469   ,21459   ,21240   ,20966   ,20944   ,20714   ,20428   ,20446   ,20204   ,19958   ,\n    19708   ,19454   ,19452   ,19190   ,18924   ,18654   ,18380   ,18154   ,18128   ,17894   ,17656   ,17363   ,17117   ,16867   ,16614   ,\n    16358   ,16097   ,15832   ,15564   ,15344   ,15068   ,14585   ,14302   ,14068   ,13779   ,13537   ,13293   ,13045   ,12538   ,12284   ,\n    12027   ,11766   ,11503   ,10981   ,10713   ,10492   ,10218   ,9686    ,9458    ,9176    ,8687    ,8401    ,8164    ,7669    ,7376    ,\n    7133    ,6632    ,6385    ,6136    ,5630    ,5327    ,5074    ,4563    ,4307    ,3795    ,3537    ,3278    ,2813    ,2553    ,2035    ,\n    1774    ,1255    ,993     ,730     ,211     ,0       ,-468    ,-731    ,-1250   ,-1512   ,-2031   ,-2292   ,-2553   ,-3070   ,-3279   ,\n    -3793   ,-4051   ,-4564   ,-4820   ,-5074   ,-5584   ,-5887   ,-6137   ,-6641   ,-6888   ,-7390   ,-7633   ,-7925   ,-8421   ,-8658   ,\n    -8944   ,-9433   ,-9715   ,-9943   ,-10219  ,-10749  ,-10970  ,-11238  ,-11504  ,-12023  ,-12283  ,-12541  ,-12795  ,-13046  ,-13549  ,\n    -13794  ,-14035  ,-14325  ,-14559  ,-14841  ,-15069  ,-15345  ,-15821  ,-16089  ,-16354  ,-16614  ,-16871  ,-17124  ,-17374  ,-17620  ,\n    -17657  ,-17895  ,-18129  ,-18411  ,-18637  ,-18911  ,-19181  ,-19446  ,-19452  ,-19710  ,-19964  ,-20214  ,-20461  ,-20447  ,-20685  ,\n    -20971  ,-21201  ,-21223  ,-21497  ,-21716  ,-21726  ,-21988  ,-21991  ,-22246  ,-22497  ,-22488  ,-22732  ,-22768  ,-23004  ,-23032  ,\n    -23262  ,-23284  ,-23506  ,-23521  ,-23788  ,-23797  ,-23802  ,-24060  ,-24058  ,-24310  ,-24303  ,-24293  ,-24537  ,-24572  ,-24554  ,\n    -24790  ,-24818  ,-24792  ,-25071  ,-25041  ,-25060  ,-25076  ,-25296  ,-25309  ,-25319  ,-25328  ,-25592  ,-25598  ,-25551  ,-25553  ,\n    -25811  ,-25811  ,-25810  ,-25808  ,-25806  ,-25853  ,-26104  ,-26099  ,-26094  ,-26087  ,-26081  ,-26330  ,-26323  ,28380   ,28128   ,\n    28133   ,27882   ,27886   ,27634   ,27638   ,27386   ,27389   ,27357   ,27103   ,27104   ,26849   ,26849   ,26592   ,26590   ,26365   ,\n    26361   ,26100   ,26094   ,25831   ,25822   ,25591   ,25580   ,25311   ,25331   ,25060   ,25077   ,24802   ,24816   ,24572   ,24292   ,\n    24301   ,24051   ,24056   ,23803   ,23548   ,23546   ,23287   ,23282   ,23018   ,22752   ,22774   ,22504   ,22266   ,22247   ,22004   ,\n    21724   ,21732   ,21482   ,21229   ,21230   ,20972   ,20712   ,20449   ,20218   ,20206   ,19935   ,19696   ,19421   ,19432   ,19186   ,\n    18936   ,18684   ,18430   ,18172   ,17912   ,17650   ,17640   ,17373   ,17136   ,16863   ,16622   ,16379   ,16098   ,15849   ,15597   ,\n    15343   ,15086   ,14827   ,14565   ,14301   ,14069   ,13800   ,13563   ,13289   ,13047   ,12769   ,12267   ,12019   ,11768   ,11515   ,\n    11261   ,11004   ,10745   ,10484   ,9966    ,9701    ,9469    ,9201    ,8931    ,8438    ,8165    ,7924    ,7648    ,7405    ,6904    ,\n    6623    ,6376    ,6127    ,5621    ,5370    ,5118    ,4831    ,4577    ,4066    ,3810    ,3553    ,3040    ,2782    ,2558    ,2299    ,\n    1783    ,1523    ,1263    ,747     ,486     ,225     ,0       ,-482    ,-743    ,-1004   ,-1520   ,-1780   ,-2040   ,-2299   ,-2815   ,\n    -3039   ,-3297   ,-3810   ,-4067   ,-4323   ,-4577   ,-5088   ,-5375   ,-5627   ,-5878   ,-6384   ,-6633   ,-6880   ,-7161   ,-7662   ,\n    -7905   ,-8181   ,-8422   ,-8695   ,-9188   ,-9458   ,-9726   ,-9958   ,-10223  ,-10485  ,-11002  ,-11261  ,-11518  ,-11772  ,-12025  ,\n    -12275  ,-12524  ,-13026  ,-13304  ,-13546  ,-13819  ,-14057  ,-14326  ,-14558  ,-14822  ,-15084  ,-15343  ,-15600  ,-15854  ,-16106  ,\n    -16355  ,-16635  ,-16879  ,-17120  ,-17393  ,-17630  ,-17897  ,-17907  ,-18169  ,-18429  ,-18686  ,-18941  ,-19193  ,-19443  ,-19433  ,\n    -19678  ,-19953  ,-20192  ,-20463  ,-20475  ,-20706  ,-20969  ,-21229  ,-21231  ,-21486  ,-21739  ,-21989  ,-21981  ,-22261  ,-22504  ,\n    -22522  ,-22761  ,-23031  ,-23009  ,-23275  ,-23538  ,-23544  ,-23803  ,-23805  ,-24060  ,-24313  ,-24308  ,-24558  ,-24549  ,-24829  ,\n    -24817  ,-25059  ,-25334  ,-25317  ,-25588  ,-25568  ,-25837  ,-25848  ,-26079  ,-26088  ,-26351  ,-26357  ,-26618  ,-26622  ,-26847  ,\n    -26848  ,-27106  ,-27106  ,-27361  ,-27360  ,-27358  ,-27646  ,-27642  ,-27895  ,-27891  ,-28143  ,-28139  ,-28390  ,-28385  ,30445   ,\n    30191   ,30193   ,29940   ,29686   ,29432   ,29434   ,29180   ,28925   ,28909   ,28654   ,28399   ,28143   ,28143   ,27887   ,27630   ,\n    27389   ,27387   ,27129   ,26870   ,26610   ,26606   ,26362   ,26101   ,25838   ,25848   ,25585   ,25337   ,25072   ,25079   ,24829   ,\n    24561   ,24309   ,24056   ,24059   ,23804   ,23549   ,23292   ,23034   ,23032   ,22772   ,22511   ,22266   ,22003   ,21756   ,21746   ,\n    21497   ,21229   ,20977   ,20724   ,20469   ,20470   ,20213   ,19955   ,19695   ,19452   ,19190   ,18926   ,18679   ,18413   ,18419   ,\n    18168   ,17915   ,17661   ,17406   ,17149   ,16891   ,16632   ,16372   ,16110   ,15864   ,15599   ,15351   ,15101   ,14832   ,14580   ,\n    14326   ,14071   ,13814   ,13557   ,13298   ,13038   ,12794   ,12531   ,12285   ,12020   ,11771   ,11504   ,11253   ,11001   ,10747   ,\n    10493   ,10238   ,9981    ,9724    ,9465    ,8950    ,8690    ,8446    ,8184    ,7921    ,7674    ,7410    ,7161    ,6895    ,6646    ,\n    6139    ,5871    ,5619    ,5367    ,5114    ,4860    ,4606    ,4335    ,4080    ,3568    ,3312    ,3056    ,2799    ,2542    ,2302    ,\n    2045    ,1531    ,1273    ,1015    ,757     ,498     ,240     ,0       ,-497    ,-755    ,-1014   ,-1272   ,-1530   ,-1788   ,-2045   ,\n    -2559   ,-2799   ,-3056   ,-3313   ,-3569   ,-3825   ,-4080   ,-4592   ,-4863   ,-5117   ,-5371   ,-5624   ,-5876   ,-6128   ,-6396   ,\n    -6903   ,-7152   ,-7418   ,-7667   ,-7931   ,-8178   ,-8441   ,-8703   ,-8947   ,-9207   ,-9466   ,-9981   ,-10238  ,-10495  ,-10750  ,\n    -11004  ,-11257  ,-11510  ,-11761  ,-12028  ,-12277  ,-12541  ,-12788  ,-13051  ,-13295  ,-13555  ,-13814  ,-14071  ,-14328  ,-14583  ,\n    -14837  ,-15089  ,-15358  ,-15608  ,-15856  ,-16121  ,-16367  ,-16628  ,-16889  ,-17148  ,-17406  ,-17662  ,-17918  ,-18172  ,-18425  ,\n    -18420  ,-18670  ,-18936  ,-19183  ,-19447  ,-19709  ,-19952  ,-20212  ,-20470  ,-20471  ,-20726  ,-20981  ,-21234  ,-21486  ,-21754  ,\n    -22003  ,-22012  ,-22260  ,-22523  ,-22768  ,-23029  ,-23288  ,-23291  ,-23549  ,-23806  ,-24061  ,-24316  ,-24313  ,-24566  ,-24818  ,\n    -25086  ,-25080  ,-25329  ,-25594  ,-25842  ,-26105  ,-26095  ,-26358  ,-26619  ,-26863  ,-26867  ,-27127  ,-27386  ,-27644  ,-27646  ,\n    -27887  ,-28143  ,-28400  ,-28400  ,-28656  ,-28911  ,-28910  ,-29182  ,-29436  ,-29691  ,-29689  ,-29943  ,-30197  ,-30450  ,-30448  ,\n    32766   ,32510   ,32254   ,31998   ,31742   ,31486   ,31230   ,30974   ,30718   ,30462   ,30206   ,29950   ,29694   ,29438   ,29182   ,\n    28926   ,28670   ,28414   ,28158   ,27902   ,27646   ,27390   ,27134   ,26878   ,26622   ,26366   ,26110   ,25854   ,25598   ,25342   ,\n    25086   ,24830   ,24574   ,24318   ,24062   ,23806   ,23550   ,23294   ,23038   ,22782   ,22526   ,22270   ,22014   ,21758   ,21502   ,\n    21246   ,20990   ,20734   ,20478   ,20222   ,19966   ,19710   ,19454   ,19198   ,18942   ,18686   ,18430   ,18174   ,17918   ,17662   ,\n    17406   ,17150   ,16894   ,16638   ,16383   ,16127   ,15871   ,15615   ,15359   ,15103   ,14847   ,14591   ,14335   ,14079   ,13823   ,\n    13567   ,13311   ,13055   ,12799   ,12543   ,12287   ,12031   ,11775   ,11519   ,11263   ,11007   ,10751   ,10495   ,10239   ,9983    ,\n    9727    ,9471    ,9215    ,8959    ,8703    ,8447    ,8191    ,7935    ,7679    ,7423    ,7167    ,6911    ,6655    ,6399    ,6143    ,\n    5887    ,5631    ,5375    ,5119    ,4863    ,4607    ,4351    ,4095    ,3839    ,3583    ,3327    ,3071    ,2815    ,2559    ,2303    ,\n    2047    ,1791    ,1535    ,1279    ,1023    ,767     ,511     ,255     ,0       ,-255    ,-511    ,-767    ,-1023   ,-1279   ,-1535   ,\n    -1791   ,-2047   ,-2303   ,-2559   ,-2815   ,-3071   ,-3327   ,-3583   ,-3839   ,-4095   ,-4351   ,-4607   ,-4863   ,-5119   ,-5375   ,\n    -5631   ,-5887   ,-6143   ,-6399   ,-6655   ,-6911   ,-7167   ,-7423   ,-7679   ,-7935   ,-8191   ,-8447   ,-8703   ,-8959   ,-9215   ,\n    -9471   ,-9727   ,-9983   ,-10239  ,-10495  ,-10751  ,-11007  ,-11263  ,-11519  ,-11775  ,-12031  ,-12287  ,-12543  ,-12799  ,-13055  ,\n    -13311  ,-13567  ,-13823  ,-14079  ,-14335  ,-14591  ,-14847  ,-15103  ,-15359  ,-15615  ,-15871  ,-16127  ,-16383  ,-16638  ,-16894  ,\n    -17150  ,-17406  ,-17662  ,-17918  ,-18174  ,-18430  ,-18686  ,-18942  ,-19198  ,-19454  ,-19710  ,-19966  ,-20222  ,-20478  ,-20734  ,\n    -20990  ,-21246  ,-21502  ,-21758  ,-22014  ,-22270  ,-22526  ,-22782  ,-23038  ,-23294  ,-23550  ,-23806  ,-24062  ,-24318  ,-24574  ,\n    -24830  ,-25086  ,-25342  ,-25598  ,-25854  ,-26110  ,-26366  ,-26622  ,-26878  ,-27134  ,-27390  ,-27646  ,-27902  ,-28158  ,-28414  ,\n    -28670  ,-28926  ,-29182  ,-29438  ,-29694  ,-29950  ,-30206  ,-30462  ,-30718  ,-30974  ,-31230  ,-31486  ,-31742  ,-31998  ,-32254  ,\n    -32510  ,30445   ,30206   ,29950   ,29950   ,29694   ,29438   ,29182   ,28926   ,28926   ,28670   ,28414   ,28158   ,27902   ,27902   ,\n    27646   ,27390   ,27134   ,26878   ,26878   ,26622   ,26366   ,26110   ,25854   ,25854   ,25598   ,25342   ,25086   ,24830   ,24830   ,\n    24574   ,24318   ,24062   ,23805   ,23805   ,23549   ,23293   ,23037   ,22781   ,22781   ,22525   ,22269   ,22013   ,21757   ,21757   ,\n    21501   ,21245   ,20989   ,20733   ,20733   ,20477   ,20221   ,19965   ,19709   ,19709   ,19453   ,19197   ,18941   ,18685   ,18685   ,\n    18429   ,18173   ,17917   ,17661   ,17661   ,17405   ,17149   ,16893   ,16637   ,16382   ,15870   ,15614   ,15358   ,15102   ,14846   ,\n    14590   ,14334   ,14078   ,13822   ,13566   ,13310   ,13054   ,12798   ,12542   ,12286   ,11774   ,11518   ,11262   ,11006   ,10750   ,\n    10494   ,10238   ,9982    ,9726    ,9470    ,9214    ,8958    ,8703    ,8447    ,8191    ,7679    ,7423    ,7167    ,6911    ,6655    ,\n    6399    ,6143    ,5887    ,5631    ,5375    ,5119    ,4863    ,4607    ,4351    ,4095    ,3583    ,3327    ,3071    ,2815    ,2559    ,\n    2303    ,2047    ,1791    ,1535    ,1279    ,1023    ,767     ,511     ,255     ,0       ,-511    ,-767    ,-1023   ,-1279   ,-1535   ,\n    -1791   ,-2047   ,-2303   ,-2559   ,-2815   ,-3071   ,-3327   ,-3583   ,-3839   ,-4095   ,-4607   ,-4863   ,-5119   ,-5375   ,-5631   ,\n    -5887   ,-6143   ,-6399   ,-6655   ,-6911   ,-7167   ,-7423   ,-7679   ,-7935   ,-8191   ,-8703   ,-8959   ,-9215   ,-9471   ,-9727   ,\n    -9983   ,-10239  ,-10495  ,-10751  ,-11007  ,-11263  ,-11519  ,-11775  ,-12031  ,-12287  ,-12799  ,-13055  ,-13311  ,-13567  ,-13823  ,\n    -14079  ,-14335  ,-14591  ,-14847  ,-15103  ,-15359  ,-15615  ,-15871  ,-16127  ,-16383  ,-16894  ,-17150  ,-17406  ,-17662  ,-17918  ,\n    -17918  ,-18174  ,-18430  ,-18686  ,-18942  ,-18942  ,-19198  ,-19454  ,-19710  ,-19966  ,-19966  ,-20222  ,-20478  ,-20734  ,-20990  ,\n    -20990  ,-21246  ,-21502  ,-21758  ,-22014  ,-22014  ,-22270  ,-22526  ,-22782  ,-23038  ,-23038  ,-23294  ,-23550  ,-23806  ,-24062  ,\n    -24062  ,-24318  ,-24574  ,-24830  ,-25086  ,-25086  ,-25342  ,-25598  ,-25854  ,-26110  ,-26110  ,-26366  ,-26622  ,-26878  ,-27134  ,\n    -27134  ,-27390  ,-27646  ,-27902  ,-28158  ,-28158  ,-28414  ,-28670  ,-28926  ,-29182  ,-29182  ,-29438  ,-29694  ,-29950  ,-30206  ,\n    -30206  ,-30462  ,28380   ,28158   ,27902   ,27902   ,27646   ,27390   ,27390   ,27134   ,27134   ,26878   ,26622   ,26622   ,26366   ,\n    26366   ,26110   ,25854   ,25854   ,25598   ,25598   ,25342   ,25086   ,25086   ,24830   ,24830   ,24574   ,24318   ,24318   ,24062   ,\n    24062   ,23806   ,23550   ,23550   ,23293   ,23293   ,23037   ,22781   ,22781   ,22525   ,22525   ,22269   ,22013   ,22013   ,21757   ,\n    21757   ,21501   ,21245   ,21245   ,20989   ,20989   ,20733   ,20477   ,20477   ,20221   ,20221   ,19965   ,19709   ,19709   ,19453   ,\n    19453   ,19197   ,18941   ,18941   ,18685   ,18685   ,18429   ,18173   ,17917   ,17661   ,17405   ,16893   ,16637   ,16382   ,16126   ,\n    15870   ,15614   ,15358   ,14846   ,14590   ,14334   ,14078   ,13822   ,13566   ,13310   ,13054   ,12542   ,12286   ,12030   ,11774   ,\n    11518   ,11262   ,11006   ,10494   ,10238   ,9982    ,9726    ,9470    ,9215    ,8959    ,8703    ,8191    ,7935    ,7679    ,7423    ,\n    7167    ,6911    ,6655    ,6143    ,5887    ,5631    ,5375    ,5119    ,4863    ,4607    ,4351    ,3839    ,3583    ,3327    ,3071    ,\n    2815    ,2559    ,2303    ,1791    ,1535    ,1279    ,1023    ,767     ,511     ,255     ,0       ,-511    ,-767    ,-1023   ,-1279   ,\n    -1535   ,-1791   ,-2047   ,-2559   ,-2815   ,-3071   ,-3327   ,-3583   ,-3839   ,-4095   ,-4351   ,-4863   ,-5119   ,-5375   ,-5631   ,\n    -5887   ,-6143   ,-6399   ,-6911   ,-7167   ,-7423   ,-7679   ,-7935   ,-8191   ,-8447   ,-8703   ,-9215   ,-9471   ,-9727   ,-9983   ,\n    -10239  ,-10495  ,-10751  ,-11263  ,-11519  ,-11775  ,-12031  ,-12287  ,-12543  ,-12799  ,-13055  ,-13567  ,-13823  ,-14079  ,-14335  ,\n    -14591  ,-14847  ,-15103  ,-15615  ,-15871  ,-16127  ,-16383  ,-16638  ,-16894  ,-17150  ,-17406  ,-17918  ,-18174  ,-18430  ,-18686  ,\n    -18942  ,-18942  ,-19198  ,-19198  ,-19454  ,-19710  ,-19710  ,-19966  ,-19966  ,-20222  ,-20478  ,-20478  ,-20734  ,-20734  ,-20990  ,\n    -21246  ,-21246  ,-21502  ,-21502  ,-21758  ,-22014  ,-22014  ,-22270  ,-22270  ,-22526  ,-22782  ,-22782  ,-23038  ,-23038  ,-23294  ,\n    -23550  ,-23550  ,-23806  ,-23806  ,-24062  ,-24318  ,-24318  ,-24574  ,-24574  ,-24830  ,-25086  ,-25086  ,-25342  ,-25342  ,-25598  ,\n    -25854  ,-25854  ,-26110  ,-26110  ,-26366  ,-26622  ,-26622  ,-26878  ,-26878  ,-27134  ,-27390  ,-27390  ,-27646  ,-27646  ,-27902  ,\n    -28158  ,-28158  ,-28414  ,26059   ,26110   ,25854   ,25854   ,25598   ,25598   ,25598   ,25342   ,25342   ,25086   ,25086   ,25086   ,\n    24830   ,24830   ,24574   ,24574   ,24574   ,24318   ,24318   ,24062   ,24062   ,24062   ,23806   ,23806   ,23550   ,23550   ,23550   ,\n    23294   ,23294   ,23038   ,23038   ,23038   ,22781   ,22781   ,22525   ,22525   ,22525   ,22269   ,22269   ,22013   ,22013   ,22013   ,\n    21757   ,21757   ,21501   ,21501   ,21501   ,21245   ,21245   ,20989   ,20989   ,20989   ,20733   ,20733   ,20477   ,20477   ,20477   ,\n    20221   ,20221   ,19965   ,19965   ,19965   ,19709   ,19709   ,19453   ,19197   ,18941   ,18685   ,18429   ,17917   ,17661   ,17405   ,\n    17149   ,16893   ,16382   ,16126   ,15870   ,15614   ,15358   ,14846   ,14590   ,14334   ,14078   ,13822   ,13310   ,13054   ,12798   ,\n    12542   ,12286   ,11774   ,11518   ,11262   ,11006   ,10750   ,10238   ,9982    ,9727    ,9471    ,9215    ,8703    ,8447    ,8191    ,\n    7935    ,7679    ,7167    ,6911    ,6655    ,6399    ,6143    ,5631    ,5375    ,5119    ,4863    ,4607    ,4095    ,3839    ,3583    ,\n    3327    ,3071    ,2559    ,2303    ,2047    ,1791    ,1535    ,1023    ,767     ,511     ,255     ,0       ,-511    ,-767    ,-1023   ,\n    -1279   ,-1535   ,-2047   ,-2303   ,-2559   ,-2815   ,-3071   ,-3583   ,-3839   ,-4095   ,-4351   ,-4607   ,-5119   ,-5375   ,-5631   ,\n    -5887   ,-6143   ,-6655   ,-6911   ,-7167   ,-7423   ,-7679   ,-8191   ,-8447   ,-8703   ,-8959   ,-9215   ,-9727   ,-9983   ,-10239  ,\n    -10495  ,-10751  ,-11263  ,-11519  ,-11775  ,-12031  ,-12287  ,-12799  ,-13055  ,-13311  ,-13567  ,-13823  ,-14335  ,-14591  ,-14847  ,\n    -15103  ,-15359  ,-15871  ,-16127  ,-16383  ,-16638  ,-16894  ,-17406  ,-17662  ,-17918  ,-18174  ,-18430  ,-18942  ,-19198  ,-19454  ,\n    -19710  ,-19966  ,-19966  ,-19966  ,-20222  ,-20222  ,-20478  ,-20478  ,-20478  ,-20734  ,-20734  ,-20990  ,-20990  ,-20990  ,-21246  ,\n    -21246  ,-21502  ,-21502  ,-21502  ,-21758  ,-21758  ,-22014  ,-22014  ,-22014  ,-22270  ,-22270  ,-22526  ,-22526  ,-22526  ,-22782  ,\n    -22782  ,-23038  ,-23038  ,-23038  ,-23294  ,-23294  ,-23550  ,-23550  ,-23550  ,-23806  ,-23806  ,-24062  ,-24062  ,-24062  ,-24318  ,\n    -24318  ,-24574  ,-24574  ,-24574  ,-24830  ,-24830  ,-25086  ,-25086  ,-25086  ,-25342  ,-25342  ,-25598  ,-25598  ,-25598  ,-25854  ,\n    -25854  ,-26110  ,-26110  ,-26110  ,23994   ,23806   ,23806   ,23806   ,23806   ,23550   ,23550   ,23550   ,23550   ,23550   ,23294   ,\n    23294   ,23294   ,23294   ,23294   ,23038   ,23038   ,23038   ,23038   ,23038   ,22782   ,22782   ,22782   ,22782   ,22782   ,22526   ,\n    22526   ,22526   ,22526   ,22526   ,22270   ,22270   ,22269   ,22269   ,22269   ,22013   ,22013   ,22013   ,22013   ,22013   ,21757   ,\n    21757   ,21757   ,21757   ,21757   ,21501   ,21501   ,21501   ,21501   ,21501   ,21245   ,21245   ,21245   ,21245   ,21245   ,20989   ,\n    20989   ,20989   ,20989   ,20989   ,20733   ,20733   ,20733   ,20733   ,20733   ,20221   ,19965   ,19709   ,19453   ,18941   ,18685   ,\n    18429   ,17917   ,17661   ,17405   ,17149   ,16637   ,16382   ,16126   ,15870   ,15358   ,15102   ,14846   ,14590   ,14078   ,13822   ,\n    13566   ,13054   ,12798   ,12542   ,12286   ,11774   ,11518   ,11262   ,11006   ,10494   ,10239   ,9983    ,9727    ,9215    ,8959    ,\n    8703    ,8191    ,7935    ,7679    ,7423    ,6911    ,6655    ,6399    ,6143    ,5631    ,5375    ,5119    ,4863    ,4351    ,4095    ,\n    3839    ,3327    ,3071    ,2815    ,2559    ,2047    ,1791    ,1535    ,1279    ,767     ,511     ,255     ,0       ,-511    ,-767    ,\n    -1023   ,-1535   ,-1791   ,-2047   ,-2303   ,-2815   ,-3071   ,-3327   ,-3583   ,-4095   ,-4351   ,-4607   ,-4863   ,-5375   ,-5631   ,\n    -5887   ,-6399   ,-6655   ,-6911   ,-7167   ,-7679   ,-7935   ,-8191   ,-8447   ,-8959   ,-9215   ,-9471   ,-9727   ,-10239  ,-10495  ,\n    -10751  ,-11263  ,-11519  ,-11775  ,-12031  ,-12543  ,-12799  ,-13055  ,-13311  ,-13823  ,-14079  ,-14335  ,-14591  ,-15103  ,-15359  ,\n    -15615  ,-16127  ,-16383  ,-16638  ,-16894  ,-17406  ,-17662  ,-17918  ,-18174  ,-18686  ,-18942  ,-19198  ,-19454  ,-19966  ,-20222  ,\n    -20478  ,-20990  ,-20990  ,-20990  ,-20990  ,-20990  ,-21246  ,-21246  ,-21246  ,-21246  ,-21246  ,-21502  ,-21502  ,-21502  ,-21502  ,\n    -21502  ,-21758  ,-21758  ,-21758  ,-21758  ,-21758  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22270  ,-22270  ,-22270  ,-22270  ,\n    -22270  ,-22526  ,-22526  ,-22526  ,-22526  ,-22526  ,-22782  ,-22782  ,-22782  ,-22782  ,-22782  ,-23038  ,-23038  ,-23038  ,-23038  ,\n    -23038  ,-23294  ,-23294  ,-23294  ,-23294  ,-23294  ,-23550  ,-23550  ,-23550  ,-23550  ,-23550  ,-23806  ,-23806  ,-23806  ,-23806  ,\n    -23806  ,-24062  ,-24062  ,-24062  ,-24062  ,21673   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,\n    21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,\n    21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21758   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,\n    21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,\n    21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21757   ,21501   ,20989   ,20733   ,20477   ,19965   ,\n    19709   ,19453   ,18941   ,18685   ,18429   ,17917   ,17661   ,17405   ,16893   ,16637   ,16382   ,15870   ,15614   ,15358   ,14846   ,\n    14590   ,14334   ,13822   ,13566   ,13310   ,12798   ,12542   ,12286   ,11774   ,11518   ,11262   ,10751   ,10495   ,10239   ,9727    ,\n    9471    ,9215    ,8703    ,8447    ,8191    ,7679    ,7423    ,7167    ,6655    ,6399    ,6143    ,5631    ,5375    ,5119    ,4607    ,\n    4351    ,4095    ,3583    ,3327    ,3071    ,2559    ,2303    ,2047    ,1535    ,1279    ,1023    ,511     ,255     ,0       ,-511    ,\n    -767    ,-1023   ,-1535   ,-1791   ,-2047   ,-2559   ,-2815   ,-3071   ,-3583   ,-3839   ,-4095   ,-4607   ,-4863   ,-5119   ,-5631   ,\n    -5887   ,-6143   ,-6655   ,-6911   ,-7167   ,-7679   ,-7935   ,-8191   ,-8703   ,-8959   ,-9215   ,-9727   ,-9983   ,-10239  ,-10751  ,\n    -11007  ,-11263  ,-11775  ,-12031  ,-12287  ,-12799  ,-13055  ,-13311  ,-13823  ,-14079  ,-14335  ,-14847  ,-15103  ,-15359  ,-15871  ,\n    -16127  ,-16383  ,-16894  ,-17150  ,-17406  ,-17918  ,-18174  ,-18430  ,-18942  ,-19198  ,-19454  ,-19966  ,-20222  ,-20478  ,-20990  ,\n    -21246  ,-21502  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,\n    -22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,\n    -22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,\n    -22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,\n    -22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,19608   ,19710   ,19710   ,19710   ,19710   ,19710   ,19966   ,19966   ,19966   ,\n    19966   ,19966   ,20222   ,20222   ,20222   ,20222   ,20222   ,20478   ,20478   ,20478   ,20478   ,20478   ,20734   ,20734   ,20734   ,\n    20734   ,20734   ,20990   ,20990   ,20990   ,20990   ,20990   ,21246   ,21245   ,21245   ,21245   ,21245   ,21501   ,21501   ,21501   ,\n    21501   ,21501   ,21757   ,21757   ,21757   ,21757   ,21757   ,22013   ,22013   ,22013   ,22013   ,22013   ,22269   ,22269   ,22269   ,\n    22269   ,22269   ,22525   ,22525   ,22525   ,22525   ,22525   ,22781   ,22781   ,22781   ,22781   ,22525   ,22013   ,21757   ,21501   ,\n    20989   ,20733   ,20221   ,19965   ,19709   ,19197   ,18941   ,18429   ,18173   ,17917   ,17405   ,17149   ,16637   ,16382   ,16126   ,\n    15614   ,15358   ,14846   ,14590   ,14334   ,13822   ,13566   ,13054   ,12798   ,12542   ,12030   ,11774   ,11263   ,11007   ,10751   ,\n    10239   ,9983    ,9471    ,9215    ,8959    ,8447    ,8191    ,7679    ,7423    ,7167    ,6655    ,6399    ,5887    ,5631    ,5375    ,\n    4863    ,4607    ,4095    ,3839    ,3583    ,3071    ,2815    ,2303    ,2047    ,1791    ,1279    ,1023    ,511     ,255     ,0       ,\n    -511    ,-767    ,-1279   ,-1535   ,-1791   ,-2303   ,-2559   ,-3071   ,-3327   ,-3583   ,-4095   ,-4351   ,-4863   ,-5119   ,-5375   ,\n    -5887   ,-6143   ,-6655   ,-6911   ,-7167   ,-7679   ,-7935   ,-8447   ,-8703   ,-8959   ,-9471   ,-9727   ,-10239  ,-10495  ,-10751  ,\n    -11263  ,-11519  ,-12031  ,-12287  ,-12543  ,-13055  ,-13311  ,-13823  ,-14079  ,-14335  ,-14847  ,-15103  ,-15615  ,-15871  ,-16127  ,\n    -16638  ,-16894  ,-17406  ,-17662  ,-17918  ,-18430  ,-18686  ,-19198  ,-19454  ,-19710  ,-20222  ,-20478  ,-20990  ,-21246  ,-21502  ,\n    -22014  ,-22270  ,-22782  ,-23038  ,-23038  ,-23038  ,-22782  ,-22782  ,-22782  ,-22782  ,-22782  ,-22526  ,-22526  ,-22526  ,-22526  ,\n    -22526  ,-22270  ,-22270  ,-22270  ,-22270  ,-22270  ,-22014  ,-22014  ,-22014  ,-22014  ,-22014  ,-21758  ,-21758  ,-21758  ,-21758  ,\n    -21758  ,-21502  ,-21502  ,-21502  ,-21502  ,-21502  ,-21246  ,-21246  ,-21246  ,-21246  ,-21246  ,-20990  ,-20990  ,-20990  ,-20990  ,\n    -20990  ,-20734  ,-20734  ,-20734  ,-20734  ,-20734  ,-20478  ,-20478  ,-20478  ,-20478  ,-20478  ,-20222  ,-20222  ,-20222  ,-20222  ,\n    -20222  ,-19966  ,-19966  ,-19966  ,-19966  ,-19966  ,-19710  ,17287   ,17406   ,17662   ,17662   ,17662   ,17918   ,17918   ,18174   ,\n    18174   ,18174   ,18430   ,18430   ,18686   ,18686   ,18686   ,18942   ,18942   ,19198   ,19198   ,19198   ,19454   ,19454   ,19710   ,\n    19710   ,19710   ,19966   ,19966   ,20222   ,20222   ,20222   ,20478   ,20478   ,20733   ,20733   ,20733   ,20989   ,20989   ,21245   ,\n    21245   ,21245   ,21501   ,21501   ,21757   ,21757   ,21757   ,22013   ,22013   ,22269   ,22269   ,22269   ,22525   ,22525   ,22781   ,\n    22781   ,22781   ,23037   ,23037   ,23293   ,23293   ,23293   ,23549   ,23549   ,23805   ,23805   ,23805   ,23549   ,23037   ,22781   ,\n    22525   ,22013   ,21757   ,21245   ,20989   ,20477   ,20221   ,19709   ,19453   ,18941   ,18685   ,18173   ,17917   ,17405   ,17149   ,\n    16893   ,16382   ,16126   ,15614   ,15358   ,14846   ,14590   ,14078   ,13822   ,13310   ,13054   ,12542   ,12286   ,11775   ,11519   ,\n    11263   ,10751   ,10495   ,9983    ,9727    ,9215    ,8959    ,8447    ,8191    ,7679    ,7423    ,6911    ,6655    ,6143    ,5887    ,\n    5631    ,5119    ,4863    ,4351    ,4095    ,3583    ,3327    ,2815    ,2559    ,2047    ,1791    ,1279    ,1023    ,511     ,255     ,\n    0       ,-511    ,-767    ,-1279   ,-1535   ,-2047   ,-2303   ,-2815   ,-3071   ,-3583   ,-3839   ,-4351   ,-4607   ,-5119   ,-5375   ,\n    -5631   ,-6143   ,-6399   ,-6911   ,-7167   ,-7679   ,-7935   ,-8447   ,-8703   ,-9215   ,-9471   ,-9983   ,-10239  ,-10751  ,-11007  ,\n    -11263  ,-11775  ,-12031  ,-12543  ,-12799  ,-13311  ,-13567  ,-14079  ,-14335  ,-14847  ,-15103  ,-15615  ,-15871  ,-16383  ,-16638  ,\n    -16894  ,-17406  ,-17662  ,-18174  ,-18430  ,-18942  ,-19198  ,-19710  ,-19966  ,-20478  ,-20734  ,-21246  ,-21502  ,-22014  ,-22270  ,\n    -22526  ,-23038  ,-23294  ,-23806  ,-24062  ,-24062  ,-24062  ,-23806  ,-23806  ,-23550  ,-23550  ,-23550  ,-23294  ,-23294  ,-23038  ,\n    -23038  ,-23038  ,-22782  ,-22782  ,-22526  ,-22526  ,-22526  ,-22270  ,-22270  ,-22014  ,-22014  ,-22014  ,-21758  ,-21758  ,-21502  ,\n    -21502  ,-21502  ,-21246  ,-21246  ,-20990  ,-20990  ,-20990  ,-20734  ,-20734  ,-20478  ,-20478  ,-20478  ,-20222  ,-20222  ,-19966  ,\n    -19966  ,-19966  ,-19710  ,-19710  ,-19454  ,-19454  ,-19454  ,-19198  ,-19198  ,-18942  ,-18942  ,-18942  ,-18686  ,-18686  ,-18430  ,\n    -18430  ,-18430  ,-18174  ,-18174  ,-17918  ,-17918  ,-17918  ,-17662  ,15223   ,15359   ,15359   ,15615   ,15871   ,15871   ,16127   ,\n    16127   ,16383   ,16638   ,16638   ,16894   ,16894   ,17150   ,17406   ,17406   ,17662   ,17662   ,17918   ,18174   ,18174   ,18430   ,\n    18430   ,18686   ,18942   ,18942   ,19198   ,19198   ,19454   ,19710   ,19710   ,19966   ,19965   ,20221   ,20477   ,20477   ,20733   ,\n    20733   ,20989   ,21245   ,21245   ,21501   ,21501   ,21757   ,22013   ,22013   ,22269   ,22269   ,22525   ,22781   ,22781   ,23037   ,\n    23037   ,23293   ,23549   ,23549   ,23805   ,23805   ,24061   ,24317   ,24317   ,24573   ,24573   ,24829   ,25085   ,24573   ,24317   ,\n    23805   ,23549   ,23037   ,22525   ,22269   ,21757   ,21501   ,20989   ,20733   ,20221   ,19965   ,19453   ,19197   ,18685   ,18429   ,\n    17917   ,17661   ,17149   ,16637   ,16382   ,15870   ,15614   ,15102   ,14846   ,14334   ,14078   ,13566   ,13310   ,12798   ,12543   ,\n    12031   ,11775   ,11263   ,10751   ,10495   ,9983    ,9727    ,9215    ,8959    ,8447    ,8191    ,7679    ,7423    ,6911    ,6655    ,\n    6143    ,5887    ,5375    ,4863    ,4607    ,4095    ,3839    ,3327    ,3071    ,2559    ,2303    ,1791    ,1535    ,1023    ,767     ,\n    255     ,0       ,-511    ,-1023   ,-1279   ,-1791   ,-2047   ,-2559   ,-2815   ,-3327   ,-3583   ,-4095   ,-4351   ,-4863   ,-5119   ,\n    -5631   ,-5887   ,-6399   ,-6911   ,-7167   ,-7679   ,-7935   ,-8447   ,-8703   ,-9215   ,-9471   ,-9983   ,-10239  ,-10751  ,-11007  ,\n    -11519  ,-11775  ,-12287  ,-12799  ,-13055  ,-13567  ,-13823  ,-14335  ,-14591  ,-15103  ,-15359  ,-15871  ,-16127  ,-16638  ,-16894  ,\n    -17406  ,-17662  ,-18174  ,-18686  ,-18942  ,-19454  ,-19710  ,-20222  ,-20478  ,-20990  ,-21246  ,-21758  ,-22014  ,-22526  ,-22782  ,\n    -23294  ,-23550  ,-24062  ,-24574  ,-24830  ,-25342  ,-25086  ,-24830  ,-24830  ,-24574  ,-24574  ,-24318  ,-24062  ,-24062  ,-23806  ,\n    -23806  ,-23550  ,-23294  ,-23294  ,-23038  ,-23038  ,-22782  ,-22526  ,-22526  ,-22270  ,-22270  ,-22014  ,-21758  ,-21758  ,-21502  ,\n    -21502  ,-21246  ,-20990  ,-20990  ,-20734  ,-20734  ,-20478  ,-20222  ,-20222  ,-19966  ,-19966  ,-19710  ,-19454  ,-19454  ,-19198  ,\n    -19198  ,-18942  ,-18686  ,-18686  ,-18430  ,-18430  ,-18174  ,-17918  ,-17918  ,-17662  ,-17662  ,-17406  ,-17150  ,-17150  ,-16894  ,\n    -16894  ,-16638  ,-16383  ,-16383  ,-16127  ,-16127  ,-15871  ,-15615  ,-15615  ,12902   ,13311   ,13311   ,13567   ,13823   ,14079   ,\n    14335   ,14335   ,14591   ,14847   ,15103   ,15359   ,15359   ,15615   ,15871   ,16127   ,16383   ,16383   ,16638   ,16894   ,17150   ,\n    17406   ,17406   ,17662   ,17918   ,18174   ,18430   ,18430   ,18686   ,18942   ,19198   ,19454   ,19453   ,19709   ,19965   ,20221   ,\n    20477   ,20477   ,20733   ,20989   ,21245   ,21501   ,21501   ,21757   ,22013   ,22269   ,22525   ,22525   ,22781   ,23037   ,23293   ,\n    23549   ,23549   ,23805   ,24061   ,24317   ,24573   ,24573   ,24829   ,25085   ,25341   ,25597   ,25597   ,25853   ,26109   ,25597   ,\n    25341   ,24829   ,24573   ,24061   ,23549   ,23293   ,22781   ,22525   ,22013   ,21501   ,21245   ,20733   ,20477   ,19965   ,19453   ,\n    19197   ,18685   ,18429   ,17917   ,17405   ,17149   ,16637   ,16382   ,15870   ,15358   ,15102   ,14590   ,14334   ,13822   ,13310   ,\n    13055   ,12543   ,12287   ,11775   ,11263   ,11007   ,10495   ,10239   ,9727    ,9215    ,8959    ,8447    ,8191    ,7679    ,7167    ,\n    6911    ,6399    ,6143    ,5631    ,5119    ,4863    ,4351    ,4095    ,3583    ,3071    ,2815    ,2303    ,2047    ,1535    ,1023    ,\n    767     ,255     ,0       ,-511    ,-1023   ,-1279   ,-1791   ,-2047   ,-2559   ,-3071   ,-3327   ,-3839   ,-4095   ,-4607   ,-5119   ,\n    -5375   ,-5887   ,-6143   ,-6655   ,-7167   ,-7423   ,-7935   ,-8191   ,-8703   ,-9215   ,-9471   ,-9983   ,-10239  ,-10751  ,-11263  ,\n    -11519  ,-12031  ,-12287  ,-12799  ,-13311  ,-13567  ,-14079  ,-14335  ,-14847  ,-15359  ,-15615  ,-16127  ,-16383  ,-16894  ,-17406  ,\n    -17662  ,-18174  ,-18430  ,-18942  ,-19454  ,-19710  ,-20222  ,-20478  ,-20990  ,-21502  ,-21758  ,-22270  ,-22526  ,-23038  ,-23550  ,\n    -23806  ,-24318  ,-24574  ,-25086  ,-25598  ,-25854  ,-26366  ,-26110  ,-25854  ,-25598  ,-25598  ,-25342  ,-25086  ,-24830  ,-24574  ,\n    -24574  ,-24318  ,-24062  ,-23806  ,-23550  ,-23550  ,-23294  ,-23038  ,-22782  ,-22526  ,-22526  ,-22270  ,-22014  ,-21758  ,-21502  ,\n    -21502  ,-21246  ,-20990  ,-20734  ,-20478  ,-20478  ,-20222  ,-19966  ,-19710  ,-19454  ,-19454  ,-19198  ,-18942  ,-18686  ,-18430  ,\n    -18430  ,-18174  ,-17918  ,-17662  ,-17406  ,-17406  ,-17150  ,-16894  ,-16638  ,-16383  ,-16383  ,-16127  ,-15871  ,-15615  ,-15359  ,\n    -15359  ,-15103  ,-14847  ,-14591  ,-14335  ,-14335  ,-14079  ,-13823  ,-13567  ,-13311  ,10837   ,11007   ,11263   ,11519   ,11775   ,\n    12031   ,12287   ,12543   ,12799   ,13055   ,13311   ,13567   ,13823   ,14079   ,14335   ,14591   ,14847   ,15103   ,15359   ,15615   ,\n    15871   ,16127   ,16383   ,16638   ,16894   ,17150   ,17406   ,17662   ,17918   ,18174   ,18430   ,18686   ,18941   ,19197   ,19453   ,\n    19709   ,19965   ,20221   ,20477   ,20733   ,20989   ,21245   ,21501   ,21757   ,22013   ,22269   ,22525   ,22781   ,23037   ,23293   ,\n    23549   ,23805   ,24061   ,24317   ,24573   ,24829   ,25085   ,25341   ,25597   ,25853   ,26109   ,26365   ,26621   ,26877   ,27133   ,\n    26877   ,26365   ,25853   ,25597   ,25085   ,24573   ,24317   ,23805   ,23293   ,23037   ,22525   ,22013   ,21757   ,21245   ,20733   ,\n    20477   ,19965   ,19453   ,19197   ,18685   ,18173   ,17917   ,17405   ,16893   ,16637   ,16126   ,15614   ,15358   ,14846   ,14334   ,\n    14078   ,13567   ,13055   ,12799   ,12287   ,11775   ,11519   ,11007   ,10495   ,10239   ,9727    ,9215    ,8959    ,8447    ,7935    ,\n    7679    ,7167    ,6655    ,6399    ,5887    ,5375    ,5119    ,4607    ,4095    ,3839    ,3327    ,2815    ,2559    ,2047    ,1535    ,\n    1279    ,767     ,255     ,0       ,-511    ,-1023   ,-1279   ,-1791   ,-2303   ,-2559   ,-3071   ,-3583   ,-3839   ,-4351   ,-4863   ,\n    -5119   ,-5631   ,-6143   ,-6399   ,-6911   ,-7423   ,-7679   ,-8191   ,-8703   ,-8959   ,-9471   ,-9983   ,-10239  ,-10751  ,-11263  ,\n    -11519  ,-12031  ,-12543  ,-12799  ,-13311  ,-13823  ,-14079  ,-14591  ,-15103  ,-15359  ,-15871  ,-16383  ,-16638  ,-17150  ,-17662  ,\n    -17918  ,-18430  ,-18942  ,-19198  ,-19710  ,-20222  ,-20478  ,-20990  ,-21502  ,-21758  ,-22270  ,-22782  ,-23038  ,-23550  ,-24062  ,\n    -24318  ,-24830  ,-25342  ,-25598  ,-26110  ,-26622  ,-26878  ,-27390  ,-27134  ,-26878  ,-26622  ,-26366  ,-26110  ,-25854  ,-25598  ,\n    -25342  ,-25086  ,-24830  ,-24574  ,-24318  ,-24062  ,-23806  ,-23550  ,-23294  ,-23038  ,-22782  ,-22526  ,-22270  ,-22014  ,-21758  ,\n    -21502  ,-21246  ,-20990  ,-20734  ,-20478  ,-20222  ,-19966  ,-19710  ,-19454  ,-19198  ,-18942  ,-18686  ,-18430  ,-18174  ,-17918  ,\n    -17662  ,-17406  ,-17150  ,-16894  ,-16638  ,-16383  ,-16127  ,-15871  ,-15615  ,-15359  ,-15103  ,-14847  ,-14591  ,-14335  ,-14079  ,\n    -13823  ,-13567  ,-13311  ,-13055  ,-12799  ,-12543  ,-12287  ,-12031  ,-11775  ,-11519  ,-11263  ,8516    ,8959    ,9215    ,9471    ,\n    9727    ,10239   ,10495   ,10751   ,11007   ,11263   ,11775   ,12031   ,12287   ,12543   ,12799   ,13311   ,13567   ,13823   ,14079   ,\n    14335   ,14847   ,15103   ,15359   ,15615   ,15871   ,16383   ,16638   ,16894   ,17150   ,17406   ,17918   ,18174   ,18429   ,18685   ,\n    18941   ,19453   ,19709   ,19965   ,20221   ,20477   ,20989   ,21245   ,21501   ,21757   ,22013   ,22525   ,22781   ,23037   ,23293   ,\n    23549   ,24061   ,24317   ,24573   ,24829   ,25085   ,25597   ,25853   ,26109   ,26365   ,26621   ,27133   ,27389   ,27645   ,27901   ,\n    28157   ,27901   ,27389   ,26877   ,26621   ,26109   ,25597   ,25085   ,24829   ,24317   ,23805   ,23293   ,23037   ,22525   ,22013   ,\n    21501   ,21245   ,20733   ,20221   ,19965   ,19453   ,18941   ,18429   ,18173   ,17661   ,17149   ,16637   ,16382   ,15870   ,15358   ,\n    14846   ,14590   ,14079   ,13567   ,13311   ,12799   ,12287   ,11775   ,11519   ,11007   ,10495   ,9983    ,9727    ,9215    ,8703    ,\n    8191    ,7935    ,7423    ,6911    ,6655    ,6143    ,5631    ,5119    ,4863    ,4351    ,3839    ,3327    ,3071    ,2559    ,2047    ,\n    1535    ,1279    ,767     ,255     ,0       ,-511    ,-1023   ,-1535   ,-1791   ,-2303   ,-2815   ,-3327   ,-3583   ,-4095   ,-4607   ,\n    -5119   ,-5375   ,-5887   ,-6399   ,-6655   ,-7167   ,-7679   ,-8191   ,-8447   ,-8959   ,-9471   ,-9983   ,-10239  ,-10751  ,-11263  ,\n    -11775  ,-12031  ,-12543  ,-13055  ,-13311  ,-13823  ,-14335  ,-14847  ,-15103  ,-15615  ,-16127  ,-16638  ,-16894  ,-17406  ,-17918  ,\n    -18430  ,-18686  ,-19198  ,-19710  ,-19966  ,-20478  ,-20990  ,-21502  ,-21758  ,-22270  ,-22782  ,-23294  ,-23550  ,-24062  ,-24574  ,\n    -25086  ,-25342  ,-25854  ,-26366  ,-26622  ,-27134  ,-27646  ,-28158  ,-28414  ,-28158  ,-27902  ,-27646  ,-27390  ,-26878  ,-26622  ,\n    -26366  ,-26110  ,-25854  ,-25342  ,-25086  ,-24830  ,-24574  ,-24318  ,-23806  ,-23550  ,-23294  ,-23038  ,-22782  ,-22270  ,-22014  ,\n    -21758  ,-21502  ,-21246  ,-20734  ,-20478  ,-20222  ,-19966  ,-19710  ,-19198  ,-18942  ,-18686  ,-18430  ,-18174  ,-17662  ,-17406  ,\n    -17150  ,-16894  ,-16638  ,-16127  ,-15871  ,-15615  ,-15359  ,-15103  ,-14591  ,-14335  ,-14079  ,-13823  ,-13567  ,-13055  ,-12799  ,\n    -12543  ,-12287  ,-12031  ,-11519  ,-11263  ,-11007  ,-10751  ,-10495  ,-9983   ,-9727   ,-9471   ,-9215   ,6451    ,6911    ,7167    ,\n    7423    ,7935    ,8191    ,8703    ,8959    ,9215    ,9727    ,9983    ,10495   ,10751   ,11007   ,11519   ,11775   ,12287   ,12543   ,\n    12799   ,13311   ,13567   ,14079   ,14335   ,14591   ,15103   ,15359   ,15871   ,16127   ,16383   ,16894   ,17150   ,17662   ,17917   ,\n    18173   ,18685   ,18941   ,19453   ,19709   ,19965   ,20477   ,20733   ,21245   ,21501   ,21757   ,22269   ,22525   ,23037   ,23293   ,\n    23549   ,24061   ,24317   ,24829   ,25085   ,25341   ,25853   ,26109   ,26621   ,26877   ,27133   ,27645   ,27901   ,28413   ,28669   ,\n    28925   ,29437   ,28925   ,28413   ,27901   ,27645   ,27133   ,26621   ,26109   ,25597   ,25341   ,24829   ,24317   ,23805   ,23293   ,\n    23037   ,22525   ,22013   ,21501   ,20989   ,20733   ,20221   ,19709   ,19197   ,18685   ,18429   ,17917   ,17405   ,16893   ,16382   ,\n    16126   ,15614   ,15102   ,14591   ,14079   ,13823   ,13311   ,12799   ,12287   ,11775   ,11519   ,11007   ,10495   ,9983    ,9471    ,\n    9215    ,8703    ,8191    ,7679    ,7167    ,6911    ,6399    ,5887    ,5375    ,4863    ,4607    ,4095    ,3583    ,3071    ,2559    ,\n    2303    ,1791    ,1279    ,767     ,255     ,0       ,-511    ,-1023   ,-1535   ,-2047   ,-2303   ,-2815   ,-3327   ,-3839   ,-4351   ,\n    -4607   ,-5119   ,-5631   ,-6143   ,-6655   ,-6911   ,-7423   ,-7935   ,-8447   ,-8959   ,-9215   ,-9727   ,-10239  ,-10751  ,-11263  ,\n    -11519  ,-12031  ,-12543  ,-13055  ,-13567  ,-13823  ,-14335  ,-14847  ,-15359  ,-15871  ,-16127  ,-16638  ,-17150  ,-17662  ,-18174  ,\n    -18430  ,-18942  ,-19454  ,-19966  ,-20478  ,-20734  ,-21246  ,-21758  ,-22270  ,-22782  ,-23038  ,-23550  ,-24062  ,-24574  ,-25086  ,\n    -25342  ,-25854  ,-26366  ,-26878  ,-27390  ,-27646  ,-28158  ,-28670  ,-29182  ,-29694  ,-29182  ,-28926  ,-28414  ,-28158  ,-27902  ,\n    -27390  ,-27134  ,-26622  ,-26366  ,-26110  ,-25598  ,-25342  ,-24830  ,-24574  ,-24318  ,-23806  ,-23550  ,-23038  ,-22782  ,-22526  ,\n    -22014  ,-21758  ,-21246  ,-20990  ,-20734  ,-20222  ,-19966  ,-19454  ,-19198  ,-18942  ,-18430  ,-18174  ,-17662  ,-17406  ,-17150  ,\n    -16638  ,-16383  ,-15871  ,-15615  ,-15359  ,-14847  ,-14591  ,-14079  ,-13823  ,-13567  ,-13055  ,-12799  ,-12287  ,-12031  ,-11775  ,\n    -11263  ,-11007  ,-10495  ,-10239  ,-9983   ,-9471   ,-9215   ,-8703   ,-8447   ,-8191   ,-7679   ,-7423   ,-6911   ,4130    ,4607    ,\n    5119    ,5375    ,5887    ,6399    ,6655    ,7167    ,7423    ,7935    ,8447    ,8703    ,9215    ,9471    ,9983    ,10495   ,10751   ,\n    11263   ,11519   ,12031   ,12543   ,12799   ,13311   ,13567   ,14079   ,14591   ,14847   ,15359   ,15615   ,16127   ,16638   ,16894   ,\n    17405   ,17661   ,18173   ,18685   ,18941   ,19453   ,19709   ,20221   ,20733   ,20989   ,21501   ,21757   ,22269   ,22781   ,23037   ,\n    23549   ,23805   ,24317   ,24829   ,25085   ,25597   ,25853   ,26365   ,26877   ,27133   ,27645   ,27901   ,28413   ,28925   ,29181   ,\n    29693   ,29949   ,30461   ,29949   ,29437   ,28925   ,28669   ,28157   ,27645   ,27133   ,26621   ,26109   ,25597   ,25085   ,24829   ,\n    24317   ,23805   ,23293   ,22781   ,22269   ,21757   ,21501   ,20989   ,20477   ,19965   ,19453   ,18941   ,18429   ,17917   ,17661   ,\n    17149   ,16637   ,16126   ,15614   ,15103   ,14591   ,14335   ,13823   ,13311   ,12799   ,12287   ,11775   ,11263   ,10751   ,10495   ,\n    9983    ,9471    ,8959    ,8447    ,7935    ,7423    ,7167    ,6655    ,6143    ,5631    ,5119    ,4607    ,4095    ,3583    ,3327    ,\n    2815    ,2303    ,1791    ,1279    ,767     ,255     ,0       ,-511    ,-1023   ,-1535   ,-2047   ,-2559   ,-3071   ,-3583   ,-3839   ,\n    -4351   ,-4863   ,-5375   ,-5887   ,-6399   ,-6911   ,-7167   ,-7679   ,-8191   ,-8703   ,-9215   ,-9727   ,-10239  ,-10751  ,-11007  ,\n    -11519  ,-12031  ,-12543  ,-13055  ,-13567  ,-14079  ,-14335  ,-14847  ,-15359  ,-15871  ,-16383  ,-16894  ,-17406  ,-17918  ,-18174  ,\n    -18686  ,-19198  ,-19710  ,-20222  ,-20734  ,-21246  ,-21502  ,-22014  ,-22526  ,-23038  ,-23550  ,-24062  ,-24574  ,-25086  ,-25342  ,\n    -25854  ,-26366  ,-26878  ,-27390  ,-27902  ,-28414  ,-28670  ,-29182  ,-29694  ,-30206  ,-30718  ,-30206  ,-29950  ,-29438  ,-29182  ,\n    -28670  ,-28158  ,-27902  ,-27390  ,-27134  ,-26622  ,-26110  ,-25854  ,-25342  ,-25086  ,-24574  ,-24062  ,-23806  ,-23294  ,-23038  ,\n    -22526  ,-22014  ,-21758  ,-21246  ,-20990  ,-20478  ,-19966  ,-19710  ,-19198  ,-18942  ,-18430  ,-17918  ,-17662  ,-17150  ,-16894  ,\n    -16383  ,-15871  ,-15615  ,-15103  ,-14847  ,-14335  ,-13823  ,-13567  ,-13055  ,-12799  ,-12287  ,-11775  ,-11519  ,-11007  ,-10751  ,\n    -10239  ,-9727   ,-9471   ,-8959   ,-8703   ,-8191   ,-7679   ,-7423   ,-6911   ,-6655   ,-6143   ,-5631   ,-5375   ,-4863   ,2065    ,\n    2559    ,3071    ,3327    ,3839    ,4351    ,4863    ,5375    ,5631    ,6143    ,6655    ,7167    ,7679    ,7935    ,8447    ,8959    ,\n    9471    ,9983    ,10239   ,10751   ,11263   ,11775   ,12287   ,12543   ,13055   ,13567   ,14079   ,14591   ,14847   ,15359   ,15871   ,\n    16383   ,16893   ,17149   ,17661   ,18173   ,18685   ,19197   ,19453   ,19965   ,20477   ,20989   ,21501   ,21757   ,22269   ,22781   ,\n    23293   ,23805   ,24061   ,24573   ,25085   ,25597   ,26109   ,26365   ,26877   ,27389   ,27901   ,28413   ,28669   ,29181   ,29693   ,\n    30205   ,30717   ,30973   ,31485   ,30973   ,30461   ,29949   ,29693   ,29181   ,28669   ,28157   ,27645   ,27133   ,26621   ,26109   ,\n    25597   ,25085   ,24573   ,24061   ,23549   ,23037   ,22525   ,22269   ,21757   ,21245   ,20733   ,20221   ,19709   ,19197   ,18685   ,\n    18173   ,17661   ,17149   ,16637   ,16126   ,15615   ,15103   ,14847   ,14335   ,13823   ,13311   ,12799   ,12287   ,11775   ,11263   ,\n    10751   ,10239   ,9727    ,9215    ,8703    ,8191    ,7679    ,7423    ,6911    ,6399    ,5887    ,5375    ,4863    ,4351    ,3839    ,\n    3327    ,2815    ,2303    ,1791    ,1279    ,767     ,255     ,0       ,-511    ,-1023   ,-1535   ,-2047   ,-2559   ,-3071   ,-3583   ,\n    -4095   ,-4607   ,-5119   ,-5631   ,-6143   ,-6655   ,-7167   ,-7423   ,-7935   ,-8447   ,-8959   ,-9471   ,-9983   ,-10495  ,-11007  ,\n    -11519  ,-12031  ,-12543  ,-13055  ,-13567  ,-14079  ,-14591  ,-14847  ,-15359  ,-15871  ,-16383  ,-16894  ,-17406  ,-17918  ,-18430  ,\n    -18942  ,-19454  ,-19966  ,-20478  ,-20990  ,-21502  ,-22014  ,-22270  ,-22782  ,-23294  ,-23806  ,-24318  ,-24830  ,-25342  ,-25854  ,\n    -26366  ,-26878  ,-27390  ,-27902  ,-28414  ,-28926  ,-29438  ,-29694  ,-30206  ,-30718  ,-31230  ,-31742  ,-31230  ,-30974  ,-30462  ,\n    -29950  ,-29438  ,-28926  ,-28670  ,-28158  ,-27646  ,-27134  ,-26622  ,-26366  ,-25854  ,-25342  ,-24830  ,-24318  ,-24062  ,-23550  ,\n    -23038  ,-22526  ,-22014  ,-21758  ,-21246  ,-20734  ,-20222  ,-19710  ,-19454  ,-18942  ,-18430  ,-17918  ,-17406  ,-17150  ,-16638  ,\n    -16127  ,-15615  ,-15103  ,-14847  ,-14335  ,-13823  ,-13311  ,-12799  ,-12543  ,-12031  ,-11519  ,-11007  ,-10495  ,-10239  ,-9727   ,\n    -9215   ,-8703   ,-8191   ,-7935   ,-7423   ,-6911   ,-6399   ,-5887   ,-5631   ,-5119   ,-4607   ,-4095   ,-3583   ,-3327   ,-2815   ,\n    0       ,511     ,1023    ,1535    ,2047    ,2559    ,3071    ,3583    ,4095    ,4607    ,5119    ,5631    ,6143    ,6655    ,7167    ,\n    7679    ,8191    ,8703    ,9215    ,9727    ,10239   ,10751   ,11263   ,11775   ,12287   ,12799   ,13311   ,13823   ,14335   ,14847   ,\n    15359   ,15871   ,16382   ,16893   ,17405   ,17917   ,18429   ,18941   ,19453   ,19965   ,20477   ,20989   ,21501   ,22013   ,22525   ,\n    23037   ,23549   ,24061   ,24573   ,25085   ,25597   ,26109   ,26621   ,27133   ,27645   ,28157   ,28669   ,29181   ,29693   ,30205   ,\n    30717   ,31229   ,31741   ,32253   ,32765   ,32253   ,31741   ,31229   ,30717   ,30205   ,29693   ,29181   ,28669   ,28157   ,27645   ,\n    27133   ,26621   ,26109   ,25597   ,25085   ,24573   ,24061   ,23549   ,23037   ,22525   ,22013   ,21501   ,20989   ,20477   ,19965   ,\n    19453   ,18941   ,18429   ,17917   ,17405   ,16893   ,16383   ,15871   ,15359   ,14847   ,14335   ,13823   ,13311   ,12799   ,12287   ,\n    11775   ,11263   ,10751   ,10239   ,9727    ,9215    ,8703    ,8191    ,7679    ,7167    ,6655    ,6143    ,5631    ,5119    ,4607    ,\n    4095    ,3583    ,3071    ,2559    ,2047    ,1535    ,1023    ,511     ,0       ,-511    ,-1023   ,-1535   ,-2047   ,-2559   ,-3071   ,\n    -3583   ,-4095   ,-4607   ,-5119   ,-5631   ,-6143   ,-6655   ,-7167   ,-7679   ,-8191   ,-8703   ,-9215   ,-9727   ,-10239  ,-10751  ,\n    -11263  ,-11775  ,-12287  ,-12799  ,-13311  ,-13823  ,-14335  ,-14847  ,-15359  ,-15871  ,-16382  ,-16893  ,-17405  ,-17917  ,-18429  ,\n    -18941  ,-19453  ,-19965  ,-20477  ,-20989  ,-21501  ,-22013  ,-22525  ,-23037  ,-23549  ,-24061  ,-24573  ,-25085  ,-25597  ,-26109  ,\n    -26621  ,-27133  ,-27645  ,-28157  ,-28669  ,-29181  ,-29693  ,-30205  ,-30717  ,-31229  ,-31741  ,-32253  ,-32765  ,-32253  ,-31741  ,\n    -31229  ,-30717  ,-30205  ,-29693  ,-29181  ,-28669  ,-28157  ,-27645  ,-27133  ,-26621  ,-26109  ,-25597  ,-25085  ,-24573  ,-24061  ,\n    -23549  ,-23037  ,-22525  ,-22013  ,-21501  ,-20989  ,-20477  ,-19965  ,-19453  ,-18941  ,-18429  ,-17917  ,-17405  ,-16893  ,-16383  ,\n    -15871  ,-15359  ,-14847  ,-14335  ,-13823  ,-13311  ,-12799  ,-12287  ,-11775  ,-11263  ,-10751  ,-10239  ,-9727   ,-9215   ,-8703   ,\n    -8191   ,-7679   ,-7167   ,-6655   ,-6143   ,-5631   ,-5119   ,-4607   ,-4095   ,-3583   ,-3071   ,-2559   ,-2047   ,-1535   ,-1023   ,\n    -511    ,2065    ,2559    ,3071    ,3583    ,4095    ,4351    ,4863    ,5375    ,5887    ,6399    ,6911    ,7423    ,7679    ,8191    ,\n    8703    ,9215    ,9727    ,10239   ,10751   ,11263   ,11519   ,12031   ,12543   ,13055   ,13567   ,14079   ,14591   ,14847   ,15359   ,\n    15871   ,16383   ,16894   ,17405   ,17917   ,18429   ,18685   ,19197   ,19709   ,20221   ,20733   ,21245   ,21757   ,22013   ,22525   ,\n    23037   ,23549   ,24061   ,24573   ,25085   ,25597   ,25853   ,26365   ,26877   ,27389   ,27901   ,28413   ,28925   ,29181   ,29693   ,\n    30205   ,30717   ,31229   ,31741   ,32253   ,32765   ,32253   ,31741   ,31229   ,30717   ,30205   ,29693   ,29181   ,28925   ,28413   ,\n    27901   ,27389   ,26877   ,26365   ,25853   ,25597   ,25085   ,24573   ,24061   ,23549   ,23037   ,22525   ,22013   ,21757   ,21245   ,\n    20733   ,20221   ,19709   ,19197   ,18685   ,18429   ,17917   ,17406   ,16894   ,16383   ,15871   ,15359   ,14847   ,14591   ,14079   ,\n    13567   ,13055   ,12543   ,12031   ,11519   ,11263   ,10751   ,10239   ,9727    ,9215    ,8703    ,8191    ,7679    ,7423    ,6911    ,\n    6399    ,5887    ,5375    ,4863    ,4351    ,4095    ,3583    ,3071    ,2559    ,2048    ,-2815   ,-3327   ,-3839   ,-4095   ,-4607   ,\n    -5119   ,-5631   ,-6143   ,-6655   ,-7167   ,-7679   ,-7935   ,-8447   ,-8959   ,-9471   ,-9983   ,-10495  ,-11007  ,-11263  ,-11775  ,\n    -12287  ,-12799  ,-13311  ,-13823  ,-14335  ,-14847  ,-15103  ,-15615  ,-16127  ,-16638  ,-17150  ,-17662  ,-18174  ,-18430  ,-18942  ,\n    -19454  ,-19966  ,-20478  ,-20990  ,-21502  ,-22014  ,-22270  ,-22782  ,-23294  ,-23806  ,-24318  ,-24830  ,-25342  ,-25598  ,-26110  ,\n    -26622  ,-27134  ,-27646  ,-28158  ,-28670  ,-29182  ,-29438  ,-29950  ,-30462  ,-30974  ,-31486  ,-31998  ,-32510  ,-32766  ,-32510  ,\n    -31998  ,-31486  ,-30974  ,-30462  ,-29950  ,-29438  ,-29182  ,-28670  ,-28158  ,-27646  ,-27134  ,-26622  ,-26110  ,-25598  ,-25342  ,\n    -24830  ,-24318  ,-23806  ,-23294  ,-22782  ,-22270  ,-22014  ,-21502  ,-20990  ,-20478  ,-19966  ,-19454  ,-18942  ,-18430  ,-18174  ,\n    -17662  ,-17150  ,-16638  ,-16127  ,-15615  ,-15103  ,-14847  ,-14335  ,-13823  ,-13311  ,-12799  ,-12287  ,-11775  ,-11263  ,-11007  ,\n    -10495  ,-9983   ,-9471   ,-8959   ,-8447   ,-7935   ,-7679   ,-7167   ,-6655   ,-6143   ,-5631   ,-5119   ,-4607   ,-4095   ,-3839   ,\n    -3327   ,-2815   ,4130    ,4607    ,5119    ,5631    ,6143    ,6399    ,6911    ,7423    ,7679    ,8191    ,8703    ,9215    ,9471    ,\n    9983    ,10495   ,11007   ,11263   ,11775   ,12287   ,12799   ,13055   ,13567   ,14079   ,14335   ,14847   ,15359   ,15871   ,16127   ,\n    16638   ,17150   ,17662   ,17918   ,18429   ,18941   ,19453   ,19709   ,20221   ,20733   ,20989   ,21501   ,22013   ,22525   ,22781   ,\n    23293   ,23805   ,24317   ,24573   ,25085   ,25597   ,26109   ,26365   ,26877   ,27389   ,27645   ,28157   ,28669   ,29181   ,29437   ,\n    29949   ,30461   ,30973   ,31229   ,31741   ,32253   ,32765   ,32253   ,31741   ,31229   ,30973   ,30461   ,29949   ,29437   ,29181   ,\n    28669   ,28157   ,27645   ,27389   ,26877   ,26365   ,26109   ,25597   ,25085   ,24573   ,24317   ,23805   ,23293   ,22781   ,22525   ,\n    22013   ,21501   ,20989   ,20733   ,20221   ,19709   ,19453   ,18941   ,18430   ,17918   ,17662   ,17150   ,16638   ,16127   ,15871   ,\n    15359   ,14847   ,14335   ,14079   ,13567   ,13055   ,12799   ,12287   ,11775   ,11263   ,11007   ,10495   ,9983    ,9471    ,9215    ,\n    8703    ,8191    ,7679    ,7423    ,6911    ,6399    ,6143    ,5631    ,5119    ,4607    ,4352    ,-4863   ,-5375   ,-5887   ,-6143   ,\n    -6655   ,-7167   ,-7679   ,-7935   ,-8447   ,-8959   ,-9471   ,-9727   ,-10239  ,-10751  ,-11263  ,-11519  ,-12031  ,-12543  ,-12799  ,\n    -13311  ,-13823  ,-14335  ,-14591  ,-15103  ,-15615  ,-16127  ,-16383  ,-16894  ,-17406  ,-17918  ,-18174  ,-18686  ,-19198  ,-19454  ,\n    -19966  ,-20478  ,-20990  ,-21246  ,-21758  ,-22270  ,-22782  ,-23038  ,-23550  ,-24062  ,-24574  ,-24830  ,-25342  ,-25854  ,-26110  ,\n    -26622  ,-27134  ,-27646  ,-27902  ,-28414  ,-28926  ,-29438  ,-29694  ,-30206  ,-30718  ,-31230  ,-31486  ,-31998  ,-32510  ,-32766  ,\n    -32510  ,-31998  ,-31486  ,-31230  ,-30718  ,-30206  ,-29694  ,-29438  ,-28926  ,-28414  ,-27902  ,-27646  ,-27134  ,-26622  ,-26110  ,\n    -25854  ,-25342  ,-24830  ,-24574  ,-24062  ,-23550  ,-23038  ,-22782  ,-22270  ,-21758  ,-21246  ,-20990  ,-20478  ,-19966  ,-19454  ,\n    -19198  ,-18686  ,-18174  ,-17918  ,-17406  ,-16894  ,-16383  ,-16127  ,-15615  ,-15103  ,-14591  ,-14335  ,-13823  ,-13311  ,-12799  ,\n    -12543  ,-12031  ,-11519  ,-11263  ,-10751  ,-10239  ,-9727   ,-9471   ,-8959   ,-8447   ,-7935   ,-7679   ,-7167   ,-6655   ,-6143   ,\n    -5887   ,-5375   ,-4863   ,6451    ,6911    ,7167    ,7679    ,8191    ,8447    ,8959    ,9215    ,9727    ,10239   ,10495   ,11007   ,\n    11263   ,11775   ,12287   ,12543   ,13055   ,13311   ,13823   ,14335   ,14591   ,15103   ,15359   ,15871   ,16383   ,16638   ,17150   ,\n    17406   ,17918   ,18430   ,18686   ,19198   ,19453   ,19965   ,20477   ,20733   ,21245   ,21501   ,22013   ,22525   ,22781   ,23293   ,\n    23549   ,24061   ,24573   ,24829   ,25341   ,25597   ,26109   ,26621   ,26877   ,27389   ,27645   ,28157   ,28669   ,28925   ,29437   ,\n    29693   ,30205   ,30717   ,30973   ,31485   ,31741   ,32253   ,32765   ,32253   ,31741   ,31485   ,30973   ,30717   ,30205   ,29693   ,\n    29437   ,28925   ,28669   ,28157   ,27645   ,27389   ,26877   ,26621   ,26109   ,25597   ,25341   ,24829   ,24573   ,24061   ,23549   ,\n    23293   ,22781   ,22525   ,22013   ,21501   ,21245   ,20733   ,20477   ,19965   ,19454   ,19198   ,18686   ,18430   ,17918   ,17406   ,\n    17150   ,16638   ,16383   ,15871   ,15359   ,15103   ,14591   ,14335   ,13823   ,13311   ,13055   ,12543   ,12287   ,11775   ,11263   ,\n    11007   ,10495   ,10239   ,9727    ,9215    ,8959    ,8447    ,8191    ,7679    ,7167    ,6911    ,6400    ,-7167   ,-7423   ,-7935   ,\n    -8191   ,-8703   ,-9215   ,-9471   ,-9983   ,-10239  ,-10751  ,-11263  ,-11519  ,-12031  ,-12287  ,-12799  ,-13311  ,-13567  ,-14079  ,\n    -14335  ,-14847  ,-15359  ,-15615  ,-16127  ,-16383  ,-16894  ,-17406  ,-17662  ,-18174  ,-18430  ,-18942  ,-19454  ,-19710  ,-20222  ,\n    -20478  ,-20990  ,-21502  ,-21758  ,-22270  ,-22526  ,-23038  ,-23550  ,-23806  ,-24318  ,-24574  ,-25086  ,-25598  ,-25854  ,-26366  ,\n    -26622  ,-27134  ,-27646  ,-27902  ,-28414  ,-28670  ,-29182  ,-29694  ,-29950  ,-30462  ,-30718  ,-31230  ,-31742  ,-31998  ,-32510  ,\n    -32766  ,-32510  ,-31998  ,-31742  ,-31230  ,-30718  ,-30462  ,-29950  ,-29694  ,-29182  ,-28670  ,-28414  ,-27902  ,-27646  ,-27134  ,\n    -26622  ,-26366  ,-25854  ,-25598  ,-25086  ,-24574  ,-24318  ,-23806  ,-23550  ,-23038  ,-22526  ,-22270  ,-21758  ,-21502  ,-20990  ,\n    -20478  ,-20222  ,-19710  ,-19454  ,-18942  ,-18430  ,-18174  ,-17662  ,-17406  ,-16894  ,-16383  ,-16127  ,-15615  ,-15359  ,-14847  ,\n    -14335  ,-14079  ,-13567  ,-13311  ,-12799  ,-12287  ,-12031  ,-11519  ,-11263  ,-10751  ,-10239  ,-9983   ,-9471   ,-9215   ,-8703   ,\n    -8191   ,-7935   ,-7423   ,-7167   ,8516    ,8959    ,9471    ,9727    ,10239   ,10495   ,10751   ,11263   ,11519   ,12031   ,12287   ,\n    12799   ,13055   ,13567   ,13823   ,14335   ,14591   ,15103   ,15359   ,15871   ,16127   ,16383   ,16894   ,17150   ,17662   ,17918   ,\n    18430   ,18686   ,19198   ,19454   ,19966   ,20222   ,20733   ,20989   ,21501   ,21757   ,22013   ,22525   ,22781   ,23293   ,23549   ,\n    24061   ,24317   ,24829   ,25085   ,25597   ,25853   ,26365   ,26621   ,27133   ,27389   ,27645   ,28157   ,28413   ,28925   ,29181   ,\n    29693   ,29949   ,30461   ,30717   ,31229   ,31485   ,31997   ,32253   ,32765   ,32253   ,31997   ,31485   ,31229   ,30717   ,30461   ,\n    29949   ,29693   ,29181   ,28925   ,28413   ,28157   ,27645   ,27389   ,27133   ,26621   ,26365   ,25853   ,25597   ,25085   ,24829   ,\n    24317   ,24061   ,23549   ,23293   ,22781   ,22525   ,22013   ,21757   ,21501   ,20989   ,20734   ,20222   ,19966   ,19454   ,19198   ,\n    18686   ,18430   ,17918   ,17662   ,17150   ,16894   ,16383   ,16127   ,15871   ,15359   ,15103   ,14591   ,14335   ,13823   ,13567   ,\n    13055   ,12799   ,12287   ,12031   ,11519   ,11263   ,10751   ,10495   ,10239   ,9727    ,9471    ,8959    ,8704    ,-9215   ,-9727   ,\n    -9983   ,-10239  ,-10751  ,-11007  ,-11519  ,-11775  ,-12287  ,-12543  ,-13055  ,-13311  ,-13823  ,-14079  ,-14591  ,-14847  ,-15359  ,\n    -15615  ,-15871  ,-16383  ,-16638  ,-17150  ,-17406  ,-17918  ,-18174  ,-18686  ,-18942  ,-19454  ,-19710  ,-20222  ,-20478  ,-20990  ,\n    -21246  ,-21502  ,-22014  ,-22270  ,-22782  ,-23038  ,-23550  ,-23806  ,-24318  ,-24574  ,-25086  ,-25342  ,-25854  ,-26110  ,-26622  ,\n    -26878  ,-27134  ,-27646  ,-27902  ,-28414  ,-28670  ,-29182  ,-29438  ,-29950  ,-30206  ,-30718  ,-30974  ,-31486  ,-31742  ,-32254  ,\n    -32510  ,-32766  ,-32510  ,-32254  ,-31742  ,-31486  ,-30974  ,-30718  ,-30206  ,-29950  ,-29438  ,-29182  ,-28670  ,-28414  ,-27902  ,\n    -27646  ,-27134  ,-26878  ,-26622  ,-26110  ,-25854  ,-25342  ,-25086  ,-24574  ,-24318  ,-23806  ,-23550  ,-23038  ,-22782  ,-22270  ,\n    -22014  ,-21502  ,-21246  ,-20990  ,-20478  ,-20222  ,-19710  ,-19454  ,-18942  ,-18686  ,-18174  ,-17918  ,-17406  ,-17150  ,-16638  ,\n    -16383  ,-15871  ,-15615  ,-15359  ,-14847  ,-14591  ,-14079  ,-13823  ,-13311  ,-13055  ,-12543  ,-12287  ,-11775  ,-11519  ,-11007  ,\n    -10751  ,-10239  ,-9983   ,-9727   ,-9215   ,10837   ,11263   ,11519   ,11775   ,12287   ,12543   ,12799   ,13311   ,13567   ,13823   ,\n    14335   ,14591   ,14847   ,15359   ,15615   ,15871   ,16383   ,16638   ,16894   ,17406   ,17662   ,17918   ,18430   ,18686   ,18942   ,\n    19454   ,19710   ,19966   ,20478   ,20734   ,20990   ,21502   ,21757   ,22013   ,22525   ,22781   ,23037   ,23549   ,23805   ,24061   ,\n    24573   ,24829   ,25085   ,25597   ,25853   ,26109   ,26621   ,26877   ,27133   ,27645   ,27901   ,28157   ,28669   ,28925   ,29181   ,\n    29693   ,29949   ,30205   ,30717   ,30973   ,31229   ,31741   ,31997   ,32253   ,32765   ,32253   ,31997   ,31741   ,31229   ,30973   ,\n    30717   ,30205   ,29949   ,29693   ,29181   ,28925   ,28669   ,28157   ,27901   ,27645   ,27133   ,26877   ,26621   ,26109   ,25853   ,\n    25597   ,25085   ,24829   ,24573   ,24061   ,23805   ,23549   ,23037   ,22781   ,22525   ,22013   ,21758   ,21502   ,20990   ,20734   ,\n    20478   ,19966   ,19710   ,19454   ,18942   ,18686   ,18430   ,17918   ,17662   ,17406   ,16894   ,16638   ,16383   ,15871   ,15615   ,\n    15359   ,14847   ,14591   ,14335   ,13823   ,13567   ,13311   ,12799   ,12543   ,12287   ,11775   ,11519   ,11263   ,10752   ,-11263  ,\n    -11775  ,-12031  ,-12287  ,-12799  ,-13055  ,-13311  ,-13823  ,-14079  ,-14335  ,-14847  ,-15103  ,-15359  ,-15871  ,-16127  ,-16383  ,\n    -16894  ,-17150  ,-17406  ,-17918  ,-18174  ,-18430  ,-18942  ,-19198  ,-19454  ,-19966  ,-20222  ,-20478  ,-20990  ,-21246  ,-21502  ,\n    -22014  ,-22270  ,-22526  ,-23038  ,-23294  ,-23550  ,-24062  ,-24318  ,-24574  ,-25086  ,-25342  ,-25598  ,-26110  ,-26366  ,-26622  ,\n    -27134  ,-27390  ,-27646  ,-28158  ,-28414  ,-28670  ,-29182  ,-29438  ,-29694  ,-30206  ,-30462  ,-30718  ,-31230  ,-31486  ,-31742  ,\n    -32254  ,-32510  ,-32766  ,-32510  ,-32254  ,-31742  ,-31486  ,-31230  ,-30718  ,-30462  ,-30206  ,-29694  ,-29438  ,-29182  ,-28670  ,\n    -28414  ,-28158  ,-27646  ,-27390  ,-27134  ,-26622  ,-26366  ,-26110  ,-25598  ,-25342  ,-25086  ,-24574  ,-24318  ,-24062  ,-23550  ,\n    -23294  ,-23038  ,-22526  ,-22270  ,-22014  ,-21502  ,-21246  ,-20990  ,-20478  ,-20222  ,-19966  ,-19454  ,-19198  ,-18942  ,-18430  ,\n    -18174  ,-17918  ,-17406  ,-17150  ,-16894  ,-16383  ,-16127  ,-15871  ,-15359  ,-15103  ,-14847  ,-14335  ,-14079  ,-13823  ,-13311  ,\n    -13055  ,-12799  ,-12287  ,-12031  ,-11775  ,-11263  ,12902   ,13311   ,13567   ,13823   ,14335   ,14591   ,14847   ,15103   ,15359   ,\n    15871   ,16127   ,16383   ,16638   ,16894   ,17406   ,17662   ,17918   ,18174   ,18430   ,18942   ,19198   ,19454   ,19710   ,19966   ,\n    20478   ,20734   ,20990   ,21246   ,21502   ,22014   ,22270   ,22526   ,22781   ,23037   ,23549   ,23805   ,24061   ,24317   ,24573   ,\n    25085   ,25341   ,25597   ,25853   ,26109   ,26621   ,26877   ,27133   ,27389   ,27645   ,28157   ,28413   ,28669   ,28925   ,29181   ,\n    29693   ,29949   ,30205   ,30461   ,30717   ,31229   ,31485   ,31741   ,31997   ,32253   ,32765   ,32253   ,31997   ,31741   ,31485   ,\n    31229   ,30717   ,30461   ,30205   ,29949   ,29693   ,29181   ,28925   ,28669   ,28413   ,28157   ,27645   ,27389   ,27133   ,26877   ,\n    26621   ,26109   ,25853   ,25597   ,25341   ,25085   ,24573   ,24317   ,24061   ,23805   ,23549   ,23037   ,22782   ,22526   ,22270   ,\n    22014   ,21502   ,21246   ,20990   ,20734   ,20478   ,19966   ,19710   ,19454   ,19198   ,18942   ,18430   ,18174   ,17918   ,17662   ,\n    17406   ,16894   ,16638   ,16383   ,16127   ,15871   ,15359   ,15103   ,14847   ,14591   ,14335   ,13823   ,13567   ,13311   ,13056   ,\n    -13567  ,-13823  ,-14079  ,-14335  ,-14847  ,-15103  ,-15359  ,-15615  ,-15871  ,-16383  ,-16638  ,-16894  ,-17150  ,-17406  ,-17918  ,\n    -18174  ,-18430  ,-18686  ,-18942  ,-19454  ,-19710  ,-19966  ,-20222  ,-20478  ,-20990  ,-21246  ,-21502  ,-21758  ,-22014  ,-22526  ,\n    -22782  ,-23038  ,-23294  ,-23550  ,-24062  ,-24318  ,-24574  ,-24830  ,-25086  ,-25598  ,-25854  ,-26110  ,-26366  ,-26622  ,-27134  ,\n    -27390  ,-27646  ,-27902  ,-28158  ,-28670  ,-28926  ,-29182  ,-29438  ,-29694  ,-30206  ,-30462  ,-30718  ,-30974  ,-31230  ,-31742  ,\n    -31998  ,-32254  ,-32510  ,-32766  ,-32510  ,-32254  ,-31998  ,-31742  ,-31230  ,-30974  ,-30718  ,-30462  ,-30206  ,-29694  ,-29438  ,\n    -29182  ,-28926  ,-28670  ,-28158  ,-27902  ,-27646  ,-27390  ,-27134  ,-26622  ,-26366  ,-26110  ,-25854  ,-25598  ,-25086  ,-24830  ,\n    -24574  ,-24318  ,-24062  ,-23550  ,-23294  ,-23038  ,-22782  ,-22526  ,-22014  ,-21758  ,-21502  ,-21246  ,-20990  ,-20478  ,-20222  ,\n    -19966  ,-19710  ,-19454  ,-18942  ,-18686  ,-18430  ,-18174  ,-17918  ,-17406  ,-17150  ,-16894  ,-16638  ,-16383  ,-15871  ,-15615  ,\n    -15359  ,-15103  ,-14847  ,-14335  ,-14079  ,-13823  ,-13567  ,15224   ,15360   ,15616   ,15872   ,16384   ,16640   ,16896   ,17152   ,\n    17408   ,17664   ,17920   ,18176   ,18432   ,18688   ,18944   ,19200   ,19456   ,19712   ,19968   ,20480   ,20736   ,20992   ,21248   ,\n    21504   ,21760   ,22016   ,22272   ,22528   ,22784   ,23040   ,23296   ,23552   ,23807   ,24063   ,24575   ,24831   ,25087   ,25343   ,\n    25599   ,25855   ,26111   ,26367   ,26623   ,26879   ,27135   ,27391   ,27647   ,27903   ,28159   ,28671   ,28927   ,29183   ,29439   ,\n    29695   ,29951   ,30207   ,30463   ,30719   ,30975   ,31231   ,31487   ,31743   ,31999   ,32255   ,32767   ,32255   ,31999   ,31743   ,\n    31487   ,31231   ,30975   ,30719   ,30463   ,30207   ,29951   ,29695   ,29439   ,29183   ,28927   ,28671   ,28159   ,27903   ,27647   ,\n    27391   ,27135   ,26879   ,26623   ,26367   ,26111   ,25855   ,25599   ,25343   ,25087   ,24831   ,24575   ,24063   ,23808   ,23552   ,\n    23296   ,23040   ,22784   ,22528   ,22272   ,22016   ,21760   ,21504   ,21248   ,20992   ,20736   ,20480   ,19968   ,19712   ,19456   ,\n    19200   ,18944   ,18688   ,18432   ,18176   ,17920   ,17664   ,17408   ,17152   ,16896   ,16640   ,16384   ,15872   ,15616   ,15360   ,\n    15105   ,-15615  ,-15871  ,-16127  ,-16383  ,-16895  ,-17151  ,-17407  ,-17663  ,-17919  ,-18175  ,-18431  ,-18687  ,-18943  ,-19199  ,\n    -19455  ,-19711  ,-19967  ,-20223  ,-20479  ,-20991  ,-21247  ,-21503  ,-21759  ,-22015  ,-22271  ,-22527  ,-22783  ,-23039  ,-23295  ,\n    -23551  ,-23807  ,-24063  ,-24319  ,-24575  ,-25087  ,-25343  ,-25599  ,-25855  ,-26111  ,-26367  ,-26623  ,-26879  ,-27135  ,-27391  ,\n    -27647  ,-27903  ,-28159  ,-28415  ,-28671  ,-29183  ,-29439  ,-29695  ,-29951  ,-30207  ,-30463  ,-30719  ,-30975  ,-31231  ,-31487  ,\n    -31743  ,-31999  ,-32255  ,-32511  ,-32767  ,-32511  ,-32255  ,-31999  ,-31743  ,-31487  ,-31231  ,-30975  ,-30719  ,-30463  ,-30207  ,\n    -29951  ,-29695  ,-29439  ,-29183  ,-28671  ,-28415  ,-28159  ,-27903  ,-27647  ,-27391  ,-27135  ,-26879  ,-26623  ,-26367  ,-26111  ,\n    -25855  ,-25599  ,-25343  ,-25087  ,-24575  ,-24319  ,-24063  ,-23807  ,-23551  ,-23295  ,-23039  ,-22783  ,-22527  ,-22271  ,-22015  ,\n    -21759  ,-21503  ,-21247  ,-20991  ,-20479  ,-20223  ,-19967  ,-19711  ,-19455  ,-19199  ,-18943  ,-18687  ,-18431  ,-18175  ,-17919  ,\n    -17663  ,-17407  ,-17151  ,-16895  ,-16383  ,-16127  ,-15871  ,-15615  ,17287   ,17662   ,17918   ,18174   ,18430   ,18430   ,18686   ,\n    18942   ,19198   ,19454   ,19710   ,19966   ,20222   ,20478   ,20734   ,20990   ,21246   ,21502   ,21758   ,22014   ,22014   ,22270   ,\n    22526   ,22782   ,23038   ,23294   ,23550   ,23806   ,24062   ,24318   ,24574   ,24830   ,25085   ,25341   ,25597   ,25597   ,25853   ,\n    26109   ,26365   ,26621   ,26877   ,27133   ,27389   ,27645   ,27901   ,28157   ,28413   ,28669   ,28925   ,29181   ,29181   ,29437   ,\n    29693   ,29949   ,30205   ,30461   ,30717   ,30973   ,31229   ,31485   ,31741   ,31997   ,32253   ,32509   ,32765   ,32509   ,32253   ,\n    31997   ,31741   ,31485   ,31229   ,30973   ,30717   ,30461   ,30205   ,29949   ,29693   ,29437   ,29181   ,29181   ,28925   ,28669   ,\n    28413   ,28157   ,27901   ,27645   ,27389   ,27133   ,26877   ,26621   ,26365   ,26109   ,25853   ,25597   ,25597   ,25341   ,25086   ,\n    24830   ,24574   ,24318   ,24062   ,23806   ,23550   ,23294   ,23038   ,22782   ,22526   ,22270   ,22014   ,22014   ,21758   ,21502   ,\n    21246   ,20990   ,20734   ,20478   ,20222   ,19966   ,19710   ,19454   ,19198   ,18942   ,18686   ,18430   ,18430   ,18174   ,17918   ,\n    17662   ,17407   ,-17918  ,-18174  ,-18430  ,-18430  ,-18686  ,-18942  ,-19198  ,-19454  ,-19710  ,-19966  ,-20222  ,-20478  ,-20734  ,\n    -20990  ,-21246  ,-21502  ,-21758  ,-22014  ,-22014  ,-22270  ,-22526  ,-22782  ,-23038  ,-23294  ,-23550  ,-23806  ,-24062  ,-24318  ,\n    -24574  ,-24830  ,-25086  ,-25342  ,-25598  ,-25598  ,-25854  ,-26110  ,-26366  ,-26622  ,-26878  ,-27134  ,-27390  ,-27646  ,-27902  ,\n    -28158  ,-28414  ,-28670  ,-28926  ,-29182  ,-29182  ,-29438  ,-29694  ,-29950  ,-30206  ,-30462  ,-30718  ,-30974  ,-31230  ,-31486  ,\n    -31742  ,-31998  ,-32254  ,-32510  ,-32766  ,-32766  ,-32766  ,-32510  ,-32254  ,-31998  ,-31742  ,-31486  ,-31230  ,-30974  ,-30718  ,\n    -30462  ,-30206  ,-29950  ,-29694  ,-29438  ,-29182  ,-29182  ,-28926  ,-28670  ,-28414  ,-28158  ,-27902  ,-27646  ,-27390  ,-27134  ,\n    -26878  ,-26622  ,-26366  ,-26110  ,-25854  ,-25598  ,-25598  ,-25342  ,-25086  ,-24830  ,-24574  ,-24318  ,-24062  ,-23806  ,-23550  ,\n    -23294  ,-23038  ,-22782  ,-22526  ,-22270  ,-22014  ,-22014  ,-21758  ,-21502  ,-21246  ,-20990  ,-20734  ,-20478  ,-20222  ,-19966  ,\n    -19710  ,-19454  ,-19198  ,-18942  ,-18686  ,-18430  ,-18430  ,-18174  ,-17918  ,19608   ,19710   ,19966   ,20222   ,20478   ,20478   ,\n    20734   ,20990   ,21246   ,21502   ,21502   ,21758   ,22014   ,22270   ,22526   ,22526   ,22782   ,23038   ,23294   ,23550   ,23550   ,\n    23806   ,24062   ,24318   ,24574   ,24574   ,24830   ,25086   ,25342   ,25598   ,25598   ,25854   ,26109   ,26365   ,26621   ,26621   ,\n    26877   ,27133   ,27389   ,27645   ,27645   ,27901   ,28157   ,28413   ,28669   ,28669   ,28925   ,29181   ,29437   ,29693   ,29693   ,\n    29949   ,30205   ,30461   ,30717   ,30717   ,30973   ,31229   ,31485   ,31741   ,31741   ,31997   ,32253   ,32509   ,32765   ,32509   ,\n    32253   ,31997   ,31741   ,31741   ,31485   ,31229   ,30973   ,30717   ,30717   ,30461   ,30205   ,29949   ,29693   ,29693   ,29437   ,\n    29181   ,28925   ,28669   ,28669   ,28413   ,28157   ,27901   ,27645   ,27645   ,27389   ,27133   ,26877   ,26621   ,26621   ,26365   ,\n    26110   ,25854   ,25598   ,25598   ,25342   ,25086   ,24830   ,24574   ,24574   ,24318   ,24062   ,23806   ,23550   ,23550   ,23294   ,\n    23038   ,22782   ,22526   ,22526   ,22270   ,22014   ,21758   ,21502   ,21502   ,21246   ,20990   ,20734   ,20478   ,20478   ,20222   ,\n    19966   ,19710   ,19455   ,-19966  ,-20222  ,-20478  ,-20478  ,-20734  ,-20990  ,-21246  ,-21502  ,-21502  ,-21758  ,-22014  ,-22270  ,\n    -22526  ,-22526  ,-22782  ,-23038  ,-23294  ,-23550  ,-23550  ,-23806  ,-24062  ,-24318  ,-24574  ,-24574  ,-24830  ,-25086  ,-25342  ,\n    -25598  ,-25598  ,-25854  ,-26110  ,-26366  ,-26622  ,-26622  ,-26878  ,-27134  ,-27390  ,-27646  ,-27646  ,-27902  ,-28158  ,-28414  ,\n    -28670  ,-28670  ,-28926  ,-29182  ,-29438  ,-29694  ,-29694  ,-29950  ,-30206  ,-30462  ,-30718  ,-30718  ,-30974  ,-31230  ,-31486  ,\n    -31742  ,-31742  ,-31998  ,-32254  ,-32510  ,-32766  ,-32766  ,-32766  ,-32510  ,-32254  ,-31998  ,-31742  ,-31742  ,-31486  ,-31230  ,\n    -30974  ,-30718  ,-30718  ,-30462  ,-30206  ,-29950  ,-29694  ,-29694  ,-29438  ,-29182  ,-28926  ,-28670  ,-28670  ,-28414  ,-28158  ,\n    -27902  ,-27646  ,-27646  ,-27390  ,-27134  ,-26878  ,-26622  ,-26622  ,-26366  ,-26110  ,-25854  ,-25598  ,-25598  ,-25342  ,-25086  ,\n    -24830  ,-24574  ,-24574  ,-24318  ,-24062  ,-23806  ,-23550  ,-23550  ,-23294  ,-23038  ,-22782  ,-22526  ,-22526  ,-22270  ,-22014  ,\n    -21758  ,-21502  ,-21502  ,-21246  ,-20990  ,-20734  ,-20478  ,-20478  ,-20222  ,-19966  ,21673   ,22014   ,22014   ,22270   ,22526   ,\n    22526   ,22782   ,23038   ,23038   ,23294   ,23550   ,23550   ,23806   ,24062   ,24062   ,24318   ,24574   ,24574   ,24830   ,25086   ,\n    25086   ,25342   ,25598   ,25598   ,25854   ,26110   ,26110   ,26366   ,26622   ,26622   ,26878   ,27134   ,27133   ,27389   ,27645   ,\n    27645   ,27901   ,28157   ,28157   ,28413   ,28669   ,28669   ,28925   ,29181   ,29181   ,29437   ,29693   ,29693   ,29949   ,30205   ,\n    30205   ,30461   ,30717   ,30717   ,30973   ,31229   ,31229   ,31485   ,31741   ,31741   ,31997   ,32253   ,32253   ,32509   ,32765   ,\n    32509   ,32253   ,32253   ,31997   ,31741   ,31741   ,31485   ,31229   ,31229   ,30973   ,30717   ,30717   ,30461   ,30205   ,30205   ,\n    29949   ,29693   ,29693   ,29437   ,29181   ,29181   ,28925   ,28669   ,28669   ,28413   ,28157   ,28157   ,27901   ,27645   ,27645   ,\n    27389   ,27134   ,27134   ,26878   ,26622   ,26622   ,26366   ,26110   ,26110   ,25854   ,25598   ,25598   ,25342   ,25086   ,25086   ,\n    24830   ,24574   ,24574   ,24318   ,24062   ,24062   ,23806   ,23550   ,23550   ,23294   ,23038   ,23038   ,22782   ,22526   ,22526   ,\n    22270   ,22014   ,22014   ,21759   ,-22014  ,-22270  ,-22526  ,-22526  ,-22782  ,-23038  ,-23038  ,-23294  ,-23550  ,-23550  ,-23806  ,\n    -24062  ,-24062  ,-24318  ,-24574  ,-24574  ,-24830  ,-25086  ,-25086  ,-25342  ,-25598  ,-25598  ,-25854  ,-26110  ,-26110  ,-26366  ,\n    -26622  ,-26622  ,-26878  ,-27134  ,-27134  ,-27390  ,-27646  ,-27646  ,-27902  ,-28158  ,-28158  ,-28414  ,-28670  ,-28670  ,-28926  ,\n    -29182  ,-29182  ,-29438  ,-29694  ,-29694  ,-29950  ,-30206  ,-30206  ,-30462  ,-30718  ,-30718  ,-30974  ,-31230  ,-31230  ,-31486  ,\n    -31742  ,-31742  ,-31998  ,-32254  ,-32254  ,-32510  ,-32766  ,-32766  ,-32766  ,-32510  ,-32254  ,-32254  ,-31998  ,-31742  ,-31742  ,\n    -31486  ,-31230  ,-31230  ,-30974  ,-30718  ,-30718  ,-30462  ,-30206  ,-30206  ,-29950  ,-29694  ,-29694  ,-29438  ,-29182  ,-29182  ,\n    -28926  ,-28670  ,-28670  ,-28414  ,-28158  ,-28158  ,-27902  ,-27646  ,-27646  ,-27390  ,-27134  ,-27134  ,-26878  ,-26622  ,-26622  ,\n    -26366  ,-26110  ,-26110  ,-25854  ,-25598  ,-25598  ,-25342  ,-25086  ,-25086  ,-24830  ,-24574  ,-24574  ,-24318  ,-24062  ,-24062  ,\n    -23806  ,-23550  ,-23550  ,-23294  ,-23038  ,-23038  ,-22782  ,-22526  ,-22526  ,-22270  ,-22014  ,23994   ,24062   ,24062   ,24318   ,\n    24574   ,24574   ,24830   ,24830   ,25086   ,25086   ,25342   ,25342   ,25598   ,25598   ,25854   ,25854   ,26110   ,26110   ,26366   ,\n    26622   ,26622   ,26878   ,26878   ,27134   ,27134   ,27390   ,27390   ,27646   ,27646   ,27902   ,27902   ,28158   ,28157   ,28413   ,\n    28669   ,28669   ,28925   ,28925   ,29181   ,29181   ,29437   ,29437   ,29693   ,29693   ,29949   ,29949   ,30205   ,30205   ,30461   ,\n    30717   ,30717   ,30973   ,30973   ,31229   ,31229   ,31485   ,31485   ,31741   ,31741   ,31997   ,31997   ,32253   ,32253   ,32509   ,\n    32765   ,32509   ,32253   ,32253   ,31997   ,31997   ,31741   ,31741   ,31485   ,31485   ,31229   ,31229   ,30973   ,30973   ,30717   ,\n    30717   ,30461   ,30205   ,30205   ,29949   ,29949   ,29693   ,29693   ,29437   ,29437   ,29181   ,29181   ,28925   ,28925   ,28669   ,\n    28669   ,28413   ,28158   ,28158   ,27902   ,27902   ,27646   ,27646   ,27390   ,27390   ,27134   ,27134   ,26878   ,26878   ,26622   ,\n    26622   ,26366   ,26110   ,26110   ,25854   ,25854   ,25598   ,25598   ,25342   ,25342   ,25086   ,25086   ,24830   ,24830   ,24574   ,\n    24574   ,24318   ,24062   ,24062   ,23807   ,-24318  ,-24318  ,-24574  ,-24574  ,-24830  ,-25086  ,-25086  ,-25342  ,-25342  ,-25598  ,\n    -25598  ,-25854  ,-25854  ,-26110  ,-26110  ,-26366  ,-26366  ,-26622  ,-26622  ,-26878  ,-27134  ,-27134  ,-27390  ,-27390  ,-27646  ,\n    -27646  ,-27902  ,-27902  ,-28158  ,-28158  ,-28414  ,-28414  ,-28670  ,-28670  ,-28926  ,-29182  ,-29182  ,-29438  ,-29438  ,-29694  ,\n    -29694  ,-29950  ,-29950  ,-30206  ,-30206  ,-30462  ,-30462  ,-30718  ,-30718  ,-30974  ,-31230  ,-31230  ,-31486  ,-31486  ,-31742  ,\n    -31742  ,-31998  ,-31998  ,-32254  ,-32254  ,-32510  ,-32510  ,-32766  ,-32766  ,-32766  ,-32510  ,-32510  ,-32254  ,-32254  ,-31998  ,\n    -31998  ,-31742  ,-31742  ,-31486  ,-31486  ,-31230  ,-31230  ,-30974  ,-30718  ,-30718  ,-30462  ,-30462  ,-30206  ,-30206  ,-29950  ,\n    -29950  ,-29694  ,-29694  ,-29438  ,-29438  ,-29182  ,-29182  ,-28926  ,-28670  ,-28670  ,-28414  ,-28414  ,-28158  ,-28158  ,-27902  ,\n    -27902  ,-27646  ,-27646  ,-27390  ,-27390  ,-27134  ,-27134  ,-26878  ,-26622  ,-26622  ,-26366  ,-26366  ,-26110  ,-26110  ,-25854  ,\n    -25854  ,-25598  ,-25598  ,-25342  ,-25342  ,-25086  ,-25086  ,-24830  ,-24574  ,-24574  ,-24318  ,-24318  ,26059   ,26110   ,26366   ,\n    26366   ,26622   ,26622   ,26622   ,26878   ,26878   ,27134   ,27134   ,27134   ,27390   ,27390   ,27646   ,27646   ,27646   ,27902   ,\n    27902   ,28158   ,28158   ,28158   ,28414   ,28414   ,28670   ,28670   ,28670   ,28926   ,28926   ,29182   ,29182   ,29182   ,29437   ,\n    29437   ,29693   ,29693   ,29693   ,29949   ,29949   ,30205   ,30205   ,30205   ,30461   ,30461   ,30717   ,30717   ,30717   ,30973   ,\n    30973   ,31229   ,31229   ,31229   ,31485   ,31485   ,31741   ,31741   ,31741   ,31997   ,31997   ,32253   ,32253   ,32253   ,32509   ,\n    32509   ,32765   ,32509   ,32509   ,32253   ,32253   ,32253   ,31997   ,31997   ,31741   ,31741   ,31741   ,31485   ,31485   ,31229   ,\n    31229   ,31229   ,30973   ,30973   ,30717   ,30717   ,30717   ,30461   ,30461   ,30205   ,30205   ,30205   ,29949   ,29949   ,29693   ,\n    29693   ,29693   ,29437   ,29438   ,29182   ,29182   ,29182   ,28926   ,28926   ,28670   ,28670   ,28670   ,28414   ,28414   ,28158   ,\n    28158   ,28158   ,27902   ,27902   ,27646   ,27646   ,27646   ,27390   ,27390   ,27134   ,27134   ,27134   ,26878   ,26878   ,26622   ,\n    26622   ,26622   ,26366   ,26366   ,26110   ,26111   ,-26366  ,-26622  ,-26622  ,-26622  ,-26878  ,-26878  ,-27134  ,-27134  ,-27134  ,\n    -27390  ,-27390  ,-27646  ,-27646  ,-27646  ,-27902  ,-27902  ,-28158  ,-28158  ,-28158  ,-28414  ,-28414  ,-28670  ,-28670  ,-28670  ,\n    -28926  ,-28926  ,-29182  ,-29182  ,-29182  ,-29438  ,-29438  ,-29694  ,-29694  ,-29694  ,-29950  ,-29950  ,-30206  ,-30206  ,-30206  ,\n    -30462  ,-30462  ,-30718  ,-30718  ,-30718  ,-30974  ,-30974  ,-31230  ,-31230  ,-31230  ,-31486  ,-31486  ,-31742  ,-31742  ,-31742  ,\n    -31998  ,-31998  ,-32254  ,-32254  ,-32254  ,-32510  ,-32510  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32510  ,-32510  ,-32254  ,\n    -32254  ,-32254  ,-31998  ,-31998  ,-31742  ,-31742  ,-31742  ,-31486  ,-31486  ,-31230  ,-31230  ,-31230  ,-30974  ,-30974  ,-30718  ,\n    -30718  ,-30718  ,-30462  ,-30462  ,-30206  ,-30206  ,-30206  ,-29950  ,-29950  ,-29694  ,-29694  ,-29694  ,-29438  ,-29438  ,-29182  ,\n    -29182  ,-29182  ,-28926  ,-28926  ,-28670  ,-28670  ,-28670  ,-28414  ,-28414  ,-28158  ,-28158  ,-28158  ,-27902  ,-27902  ,-27646  ,\n    -27646  ,-27646  ,-27390  ,-27390  ,-27134  ,-27134  ,-27134  ,-26878  ,-26878  ,-26622  ,-26622  ,-26622  ,-26366  ,28380   ,28414   ,\n    28414   ,28414   ,28670   ,28670   ,28670   ,28670   ,28926   ,28926   ,28926   ,28926   ,29182   ,29182   ,29182   ,29182   ,29438   ,\n    29438   ,29438   ,29694   ,29694   ,29694   ,29694   ,29950   ,29950   ,29950   ,29950   ,30206   ,30206   ,30206   ,30206   ,30462   ,\n    30461   ,30461   ,30717   ,30717   ,30717   ,30717   ,30973   ,30973   ,30973   ,30973   ,31229   ,31229   ,31229   ,31229   ,31485   ,\n    31485   ,31485   ,31741   ,31741   ,31741   ,31741   ,31997   ,31997   ,31997   ,31997   ,32253   ,32253   ,32253   ,32253   ,32509   ,\n    32509   ,32509   ,32765   ,32509   ,32509   ,32509   ,32253   ,32253   ,32253   ,32253   ,31997   ,31997   ,31997   ,31997   ,31741   ,\n    31741   ,31741   ,31741   ,31485   ,31485   ,31485   ,31229   ,31229   ,31229   ,31229   ,30973   ,30973   ,30973   ,30973   ,30717   ,\n    30717   ,30717   ,30717   ,30461   ,30462   ,30462   ,30206   ,30206   ,30206   ,30206   ,29950   ,29950   ,29950   ,29950   ,29694   ,\n    29694   ,29694   ,29694   ,29438   ,29438   ,29438   ,29182   ,29182   ,29182   ,29182   ,28926   ,28926   ,28926   ,28926   ,28670   ,\n    28670   ,28670   ,28670   ,28414   ,28414   ,28414   ,28159   ,-28670  ,-28670  ,-28670  ,-28670  ,-28926  ,-28926  ,-28926  ,-29182  ,\n    -29182  ,-29182  ,-29182  ,-29438  ,-29438  ,-29438  ,-29438  ,-29694  ,-29694  ,-29694  ,-29694  ,-29950  ,-29950  ,-29950  ,-30206  ,\n    -30206  ,-30206  ,-30206  ,-30462  ,-30462  ,-30462  ,-30462  ,-30718  ,-30718  ,-30718  ,-30718  ,-30974  ,-30974  ,-30974  ,-31230  ,\n    -31230  ,-31230  ,-31230  ,-31486  ,-31486  ,-31486  ,-31486  ,-31742  ,-31742  ,-31742  ,-31742  ,-31998  ,-31998  ,-31998  ,-32254  ,\n    -32254  ,-32254  ,-32254  ,-32510  ,-32510  ,-32510  ,-32510  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32510  ,\n    -32510  ,-32510  ,-32510  ,-32254  ,-32254  ,-32254  ,-32254  ,-31998  ,-31998  ,-31998  ,-31742  ,-31742  ,-31742  ,-31742  ,-31486  ,\n    -31486  ,-31486  ,-31486  ,-31230  ,-31230  ,-31230  ,-31230  ,-30974  ,-30974  ,-30974  ,-30718  ,-30718  ,-30718  ,-30718  ,-30462  ,\n    -30462  ,-30462  ,-30462  ,-30206  ,-30206  ,-30206  ,-30206  ,-29950  ,-29950  ,-29950  ,-29694  ,-29694  ,-29694  ,-29694  ,-29438  ,\n    -29438  ,-29438  ,-29438  ,-29182  ,-29182  ,-29182  ,-29182  ,-28926  ,-28926  ,-28926  ,-28670  ,-28670  ,-28670  ,-28670  ,30445   ,\n    30462   ,30462   ,30462   ,30718   ,30718   ,30718   ,30718   ,30718   ,30718   ,30718   ,30718   ,30974   ,30974   ,30974   ,30974   ,\n    30974   ,30974   ,30974   ,31230   ,31230   ,31230   ,31230   ,31230   ,31230   ,31230   ,31230   ,31486   ,31486   ,31486   ,31486   ,\n    31486   ,31485   ,31485   ,31741   ,31741   ,31741   ,31741   ,31741   ,31741   ,31741   ,31741   ,31997   ,31997   ,31997   ,31997   ,\n    31997   ,31997   ,31997   ,32253   ,32253   ,32253   ,32253   ,32253   ,32253   ,32253   ,32253   ,32509   ,32509   ,32509   ,32509   ,\n    32509   ,32509   ,32509   ,32765   ,32509   ,32509   ,32509   ,32509   ,32509   ,32509   ,32509   ,32253   ,32253   ,32253   ,32253   ,\n    32253   ,32253   ,32253   ,32253   ,31997   ,31997   ,31997   ,31997   ,31997   ,31997   ,31997   ,31741   ,31741   ,31741   ,31741   ,\n    31741   ,31741   ,31741   ,31741   ,31485   ,31486   ,31486   ,31486   ,31486   ,31486   ,31486   ,31230   ,31230   ,31230   ,31230   ,\n    31230   ,31230   ,31230   ,31230   ,30974   ,30974   ,30974   ,30974   ,30974   ,30974   ,30974   ,30718   ,30718   ,30718   ,30718   ,\n    30718   ,30718   ,30718   ,30718   ,30462   ,30462   ,30462   ,30463   ,-30718  ,-30718  ,-30718  ,-30718  ,-30974  ,-30974  ,-30974  ,\n    -30974  ,-30974  ,-30974  ,-30974  ,-31230  ,-31230  ,-31230  ,-31230  ,-31230  ,-31230  ,-31230  ,-31230  ,-31486  ,-31486  ,-31486  ,\n    -31486  ,-31486  ,-31486  ,-31486  ,-31742  ,-31742  ,-31742  ,-31742  ,-31742  ,-31742  ,-31742  ,-31742  ,-31998  ,-31998  ,-31998  ,\n    -31998  ,-31998  ,-31998  ,-31998  ,-32254  ,-32254  ,-32254  ,-32254  ,-32254  ,-32254  ,-32254  ,-32254  ,-32510  ,-32510  ,-32510  ,\n    -32510  ,-32510  ,-32510  ,-32510  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32510  ,-32510  ,-32510  ,-32510  ,-32510  ,-32510  ,-32510  ,-32254  ,-32254  ,-32254  ,-32254  ,\n    -32254  ,-32254  ,-32254  ,-32254  ,-31998  ,-31998  ,-31998  ,-31998  ,-31998  ,-31998  ,-31998  ,-31742  ,-31742  ,-31742  ,-31742  ,\n    -31742  ,-31742  ,-31742  ,-31742  ,-31486  ,-31486  ,-31486  ,-31486  ,-31486  ,-31486  ,-31486  ,-31230  ,-31230  ,-31230  ,-31230  ,\n    -31230  ,-31230  ,-31230  ,-31230  ,-30974  ,-30974  ,-30974  ,-30974  ,-30974  ,-30974  ,-30974  ,-30718  ,-30718  ,-30718  ,-30718  ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,32766   ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,32766   ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,-32766  ,\n    -32766  ,32765   ,32765   ,32765   ,32765   ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,32765   ,32765   ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,32765   ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,-32765  ,\n    -32765  ,-32765  ,-32765  ,-32765  ,\n    // sounds/wavetables/VIRAL.WAV\n    1       ,802     ,1602    ,2403    ,3202    ,4000    ,4795    ,5587    ,6375    ,7160    ,7940    ,8716    ,9485    ,10250   ,11010   ,\n    11760   ,12507   ,13243   ,13973   ,14694   ,15406   ,16110   ,16803   ,17487   ,18159   ,18822   ,19472   ,20111   ,20739   ,21355   ,\n    21956   ,22544   ,23121   ,23682   ,24229   ,24761   ,25279   ,25784   ,26270   ,26742   ,27197   ,27638   ,28060   ,28466   ,28855   ,\n    29227   ,29581   ,29916   ,30234   ,30535   ,30818   ,31081   ,31325   ,31552   ,31759   ,31946   ,32115   ,32265   ,32396   ,32506   ,\n    32597   ,32669   ,32722   ,32753   ,32766   ,32760   ,32734   ,32687   ,32621   ,32535   ,32431   ,32306   ,32161   ,31998   ,31817   ,\n    31615   ,31394   ,31155   ,30898   ,30621   ,30325   ,30011   ,29680   ,29332   ,28964   ,28580   ,28179   ,27761   ,27324   ,26871   ,\n    26404   ,25922   ,25421   ,24906   ,24377   ,23834   ,23275   ,22703   ,22116   ,21517   ,20904   ,20279   ,19642   ,18993   ,18332   ,\n    17660   ,16979   ,16287   ,15584   ,14872   ,14151   ,13422   ,12685   ,11940   ,11188   ,10429   ,9664    ,8893    ,8117    ,7336    ,\n    6550    ,5760    ,4966    ,4170    ,3370    ,2570    ,1767    ,964     ,162     ,-640    ,-1444   ,-2247   ,-3049   ,-3849   ,-4647   ,\n    -5441   ,-6234   ,-7021   ,-7805   ,-8584   ,-9357   ,-10125  ,-10887  ,-11643  ,-12391  ,-13133  ,-13865  ,-14590  ,-15307  ,-16013  ,\n    -16710  ,-17397  ,-18074  ,-18739  ,-19393  ,-20036  ,-20667  ,-21286  ,-21890  ,-22482  ,-23061  ,-23627  ,-24176  ,-24712  ,-25234  ,\n    -25740  ,-26229  ,-26703  ,-27162  ,-27606  ,-28031  ,-28438  ,-28829  ,-29205  ,-29560  ,-29898  ,-30219  ,-30522  ,-30806  ,-31069  ,\n    -31316  ,-31544  ,-31753  ,-31940  ,-32111  ,-32262  ,-32394  ,-32504  ,-32595  ,-32667  ,-32721  ,-32753  ,-32766  ,-32759  ,-32733  ,\n    -32686  ,-32618  ,-32533  ,-32428  ,-32302  ,-32157  ,-31993  ,-31810  ,-31608  ,-31385  ,-31144  ,-30885  ,-30606  ,-30309  ,-29993  ,\n    -29660  ,-29309  ,-28939  ,-28552  ,-28149  ,-27728  ,-27289  ,-26835  ,-26364  ,-25879  ,-25375  ,-24858  ,-24325  ,-23779  ,-23217  ,\n    -22641  ,-22051  ,-21449  ,-20832  ,-20204  ,-19563  ,-18910  ,-18247  ,-17571  ,-16885  ,-16191  ,-15483  ,-14768  ,-14043  ,-13312  ,\n    -12570  ,-11822  ,-11066  ,-10304  ,-9535   ,-8760   ,-7981   ,-7196   ,-6407   ,-5614   ,-4816   ,-4017   ,-3215   ,-2412   ,-1606   ,\n    -801    ,401     ,946     ,1495    ,2040    ,2580    ,3118    ,3657    ,4191    ,4722    ,5253    ,5780    ,6305    ,6828    ,7349    ,\n    7864    ,8380    ,8893    ,9402    ,9910    ,10415   ,10919   ,11421   ,11918   ,12415   ,12909   ,13401   ,13889   ,14377   ,14862   ,\n    15345   ,15824   ,16300   ,16775   ,17250   ,17722   ,18192   ,18656   ,19122   ,19584   ,20043   ,20501   ,20955   ,21410   ,21862   ,\n    22311   ,22760   ,23204   ,23647   ,24088   ,24528   ,24964   ,25398   ,25831   ,26259   ,26689   ,27115   ,27539   ,27962   ,28383   ,\n    28802   ,29218   ,29633   ,30044   ,30454   ,30861   ,31264   ,31668   ,32069   ,32469   ,32766   ,32669   ,32257   ,31833   ,31388   ,\n    30925   ,30443   ,29944   ,29432   ,28908   ,28369   ,27820   ,27262   ,26698   ,26126   ,25545   ,24961   ,24370   ,23776   ,23179   ,\n    22578   ,21975   ,21371   ,20766   ,20159   ,19549   ,18940   ,18332   ,17724   ,17114   ,16506   ,15899   ,15292   ,14688   ,14082   ,\n    13480   ,12880   ,12279   ,11681   ,11085   ,10490   ,9897    ,9309    ,8719    ,8132    ,7547    ,6966    ,6385    ,5809    ,5233    ,\n    4660    ,4089    ,3521    ,2955    ,2392    ,1834    ,1274    ,717     ,167     ,-381    ,-928    ,-1474   ,-2017   ,-2559   ,-3101   ,\n    -3644   ,-4180   ,-4711   ,-5239   ,-5764   ,-6289   ,-6810   ,-7328   ,-7847   ,-8361   ,-8872   ,-9381   ,-9887   ,-10391  ,-10893  ,\n    -11391  ,-11891  ,-12384  ,-12877  ,-13367  ,-13853  ,-14339  ,-14823  ,-15301  ,-15780  ,-16256  ,-16730  ,-17200  ,-17667  ,-18134  ,\n    -18599  ,-19061  ,-19521  ,-19978  ,-20437  ,-20889  ,-21339  ,-21789  ,-22236  ,-22679  ,-23123  ,-23562  ,-24001  ,-24435  ,-24868  ,\n    -25300  ,-25726  ,-26151  ,-26577  ,-27000  ,-27421  ,-27840  ,-28256  ,-28671  ,-29085  ,-29498  ,-29902  ,-30312  ,-30715  ,-31118  ,\n    -31520  ,-31920  ,-32316  ,-32698  ,-32766  ,-32348  ,-31924  ,-31483  ,-31019  ,-30538  ,-30039  ,-29523  ,-28998  ,-28459  ,-27909  ,\n    -27347  ,-26780  ,-26206  ,-25624  ,-25037  ,-24446  ,-23853  ,-23253  ,-22649  ,-22044  ,-21434  ,-20825  ,-20218  ,-19606  ,-18993  ,\n    -18381  ,-17770  ,-17160  ,-16550  ,-15941  ,-15332  ,-14725  ,-14121  ,-13509  ,-12906  ,-12306  ,-11705  ,-11109  ,-10513  ,-9918   ,\n    -9323   ,-8735   ,-8148   ,-7562   ,-6979   ,-6399   ,-5819   ,-5243   ,-4671   ,-4097   ,-3530   ,-2962   ,-2398   ,-1837   ,-1278   ,\n    -722    ,-170    ,5756    ,6205    ,6555    ,6694    ,6658    ,6874    ,7693    ,8914    ,9709    ,8995    ,7364    ,6479    ,7710    ,\n    10825   ,13663   ,14441   ,13011   ,10870   ,10030   ,11202   ,13423   ,14901   ,14156   ,12278   ,11104   ,11881   ,13728   ,14445   ,\n    13120   ,10691   ,9488    ,10571   ,13141   ,15434   ,15639   ,13945   ,11982   ,11546   ,13772   ,16870   ,18875   ,18754   ,17368   ,\n    16412   ,16357   ,16834   ,17241   ,17477   ,17756   ,18139   ,18631   ,19152   ,19666   ,19890   ,19778   ,19776   ,20104   ,20636   ,\n    21161   ,21837   ,22729   ,23365   ,23048   ,21815   ,20851   ,21299   ,23326   ,25983   ,27376   ,26627   ,24141   ,22048   ,22134   ,\n    24334   ,26915   ,27753   ,26600   ,25054   ,24752   ,26328   ,28402   ,29274   ,28456   ,26935   ,26733   ,28394   ,31056   ,32766   ,\n    32201   ,30126   ,28363   ,28391   ,30205   ,31977   ,32400   ,31232   ,29091   ,27071   ,25688   ,25226   ,25825   ,26807   ,27613   ,\n    27854   ,27210   ,25886   ,24433   ,23569   ,23676   ,24120   ,23859   ,22336   ,20149   ,18660   ,18374   ,18554   ,17907   ,15871   ,\n    13361   ,11731   ,11732   ,12768   ,12870   ,10941   ,7316    ,4261    ,3454    ,4974    ,7275    ,8246    ,7169    ,4809    ,2706    ,\n    2422    ,3607    ,5025    ,5631    ,5170    ,4607    ,4604    ,5307    ,6268    ,6826    ,6619    ,5988    ,5705    ,6471    ,8014    ,\n    9547    ,10073   ,9312    ,8006    ,7363    ,8265    ,10682   ,12946   ,13398   ,11140   ,7228    ,4212    ,3535    ,4899    ,6136    ,\n    5554    ,3489    ,1967    ,3453    ,7779    ,12402   ,14642   ,12831   ,9756    ,8833    ,11736   ,16199   ,17528   ,13264   ,5087    ,\n    -2631   ,-5535   ,-3563   ,-374    ,-745    ,-6847   ,-14876  ,-20225  ,-19747  ,-15345  ,-12041  ,-13006  ,-17452  ,-21680  ,-21915  ,\n    -18718  ,-15229  ,-15661  ,-20117  ,-25750  ,-28720  ,-26946  ,-23241  ,-21520  ,-23619  ,-28523  ,-32248  ,-32766  ,-30265  ,-27220  ,\n    -26090  ,-27558  ,-30299  ,-32415  ,-32603  ,-31412  ,-29954  ,-29120  ,-29145  ,-29500  ,-29783  ,-29620  ,-29121  ,-28480  ,-28181  ,\n    -28256  ,-28607  ,-28392  ,-27207  ,-24974  ,-22575  ,-21150  ,-21189  ,-21991  ,-21998  ,-20152  ,-17015  ,-14232  ,-13341  ,-14122  ,\n    -14899  ,-14547  ,-12693  ,-10276  ,-8127   ,-6684   ,-5702   ,-4741   ,-3451   ,-2158   ,-1347   ,-931    ,-69     ,1623    ,3637    ,\n    4964    ,5401    ,5519    ,11971   ,11626   ,11533   ,11988   ,12921   ,14602   ,17243   ,20141   ,22658   ,24220   ,24996   ,25495   ,\n    25844   ,25362   ,23343   ,20287   ,17250   ,15763   ,16172   ,17619   ,19165   ,20519   ,22112   ,24025   ,25736   ,26674   ,26631   ,\n    25941   ,25396   ,25256   ,25399   ,25413   ,25069   ,24693   ,25270   ,26932   ,28334   ,27842   ,24205   ,18817   ,14582   ,12925   ,\n    14196   ,16973   ,19765   ,22327   ,24718   ,27106   ,29083   ,30029   ,29779   ,28824   ,27849   ,27145   ,26773   ,26427   ,25973   ,\n    25372   ,24948   ,24852   ,24705   ,24401   ,24112   ,24339   ,25346   ,26816   ,28036   ,28528   ,28605   ,28871   ,29718   ,30592   ,\n    30188   ,28030   ,24811   ,22139   ,20990   ,21044   ,21976   ,22882   ,23436   ,23900   ,24364   ,24848   ,25131   ,25236   ,25463   ,\n    26119   ,27201   ,28410   ,29287   ,29397   ,29099   ,28736   ,28404   ,28088   ,27929   ,28035   ,28345   ,28635   ,28614   ,28033   ,\n    27216   ,26510   ,26000   ,25464   ,25100   ,24970   ,24988   ,25308   ,25860   ,26717   ,27959   ,29111   ,29768   ,29775   ,29303   ,\n    28581   ,28025   ,27795   ,27765   ,28061   ,28742   ,29303   ,29743   ,30016   ,29979   ,29462   ,29368   ,29924   ,30953   ,32184   ,\n    32765   ,31194   ,27182   ,20773   ,12832   ,3596    ,-6696   ,-16566  ,-25209  ,-30692  ,-32765  ,-32369  ,-30519  ,-28584  ,-27030  ,\n    -25241  ,-22766  ,-19911  ,-17464  ,-15995  ,-15419  ,-15140  ,-14659  ,-13958  ,-13702  ,-14158  ,-14915  ,-15158  ,-14410  ,-12890  ,\n    -11586  ,-10822  ,-10198  ,-9277   ,-7807   ,-6776   ,-7664   ,-11173  ,-15844  ,-19304  ,-20334  ,-19065  ,-16621  ,-14127  ,-11787  ,\n    -9201   ,-6462   ,-3959   ,-2347   ,-1888   ,-2434   ,-2846   ,-2585   ,-1985   ,-1201   ,-510    ,-48     ,299     ,694     ,1057    ,\n    1215    ,1041    ,754     ,529     ,624     ,924     ,947     ,698     ,776     ,1529    ,2666    ,3185    ,2512    ,2213    ,2493    ,\n    2917    ,3030    ,2514    ,1922    ,1813    ,2419    ,3403    ,4568    ,5680    ,6643    ,7243    ,7529    ,7628    ,7982    ,8823    ,\n    9697    ,10496   ,10971   ,10917   ,10473   ,9774    ,9057    ,8768    ,8771    ,8481    ,7718    ,6682    ,5798    ,5292    ,5225    ,\n    5345    ,5694    ,6334    ,7097    ,7548    ,7778    ,8142    ,8873    ,9979    ,10899   ,11209   ,11175   ,10967   ,10587   ,10328   ,\n    10435   ,10951   ,11598   ,12005   ,11391   ,11098   ,11600   ,13102   ,15204   ,16746   ,17300   ,17588   ,18605   ,20551   ,21453   ,\n    19327   ,14800   ,11223   ,11257   ,14134   ,17399   ,19111   ,19692   ,20695   ,22640   ,24383   ,24502   ,23675   ,23076   ,23499   ,\n    25327   ,27669   ,29403   ,29482   ,27963   ,26537   ,26485   ,27779   ,28975   ,29020   ,28328   ,28256   ,29872   ,32093   ,32766   ,\n    30616   ,26274   ,22468   ,20763   ,20529   ,20340   ,19885   ,19933   ,20820   ,21885   ,22057   ,21041   ,19382   ,18275   ,18516   ,\n    19690   ,21050   ,22003   ,22204   ,21853   ,21195   ,20291   ,19267   ,18615   ,18525   ,19093   ,20645   ,22488   ,23947   ,24701   ,\n    24599   ,23578   ,21662   ,19131   ,16696   ,15313   ,14917   ,14925   ,14926   ,14554   ,13832   ,13105   ,12784   ,12784   ,12417   ,\n    12172   ,12745   ,14679   ,17006   ,18732   ,18585   ,16808   ,15212   ,14567   ,14466   ,13727   ,12567   ,11777   ,11952   ,12896   ,\n    13491   ,12872   ,11299   ,10057   ,10039   ,11089   ,12637   ,13843   ,14108   ,13467   ,12681   ,12373   ,11761   ,9695    ,6825    ,\n    4618    ,4164    ,5233    ,6432    ,6249    ,4399    ,2500    ,1355    ,1218    ,1093    ,270     ,-391    ,469     ,2668    ,4515    ,\n    5369    ,5366    ,4809    ,3886    ,3019    ,3020    ,4669    ,7592    ,10763   ,13518   ,16090   ,19138   ,22027   ,23491   ,23016   ,\n    22418   ,23711   ,26609   ,28919   ,28985   ,27491   ,24678   ,19868   ,12753   ,5564    ,264     ,-2652   ,-3879   ,-4296   ,-3742   ,\n    -2497   ,-2294   ,-4256   ,-6811   ,-7507   ,-6297   ,-5146   ,-4639   ,-4773   ,-5669   ,-7307   ,-9289   ,-10868  ,-11778  ,-11853  ,\n    -11613  ,-11267  ,-11165  ,-11291  ,-11955  ,-13613  ,-16044  ,-18280  ,-19815  ,-20808  ,-21935  ,-23124  ,-23762  ,-23851  ,-24134  ,\n    -25232  ,-26840  ,-28620  ,-30436  ,-32023  ,-32766  ,-32608  ,-31898  ,-30989  ,-30352  ,-30196  ,-30423  ,-30394  ,-30056  ,-29436  ,\n    -28898  ,-28478  ,-27988  ,-27796  ,-28140  ,-28740  ,-29261  ,-29670  ,-29775  ,-28793  ,-26382  ,-23337  ,-20341  ,-17906  ,-16198  ,\n    -14796  ,-13411  ,-11808  ,-10129  ,-8853   ,-8370   ,-8336   ,-8070   ,-7470   ,-6949   ,-6749   ,-6990   ,-7169   ,-7035   ,-6759   ,\n    -6596   ,-6840   ,-7555   ,-8185   ,-7953   ,-6094   ,-3152   ,-339    ,888     ,508     ,486     ,1394    ,2838    ,3360    ,3281    ,\n    3719    ,5605    ,8251    ,10615   ,11613   ,-2389   ,-1480   ,-294    ,867     ,1783    ,2548    ,3604    ,5237    ,7474    ,9875    ,\n    11768   ,13089   ,13915   ,14692   ,15810   ,17322   ,18914   ,20116   ,20284   ,19487   ,18041   ,16493   ,15189   ,14359   ,13705   ,\n    12538   ,10126   ,6524    ,2450    ,-1174   ,-3596   ,-4661   ,-4721   ,-4529   ,-4851   ,-6061   ,-8049   ,-10173  ,-11637  ,-11984  ,\n    -11280  ,-10043  ,-9143   ,-8838   ,-8852   ,-8402   ,-6846   ,-4123   ,-801    ,2374    ,4416    ,4985    ,4213    ,2877    ,2195    ,\n    3053    ,5432    ,8606    ,11397   ,12884   ,12938   ,11916   ,10429   ,9026    ,7931    ,7049    ,5933    ,4123    ,1658    ,-921    ,\n    -2836   ,-2992   ,-1610   ,721     ,2860    ,3634    ,2812    ,995     ,-820    ,-1001   ,989     ,5147    ,10587   ,15957   ,19796   ,\n    22023   ,23030   ,24104   ,26145   ,28873   ,31447   ,32765   ,31814   ,28936   ,25203   ,22190   ,21009   ,21361   ,22106   ,21665   ,\n    17859   ,10830   ,1754    ,-7296   ,-13207  ,-15868  ,-15912  ,-14967  ,-14891  ,-16536  ,-19661  ,-23077  ,-25481  ,-26052  ,-25120  ,\n    -23453  ,-22183  ,-21955  ,-22458  ,-22778  ,-21617  ,-18510  ,-14260  ,-10119  ,-7367   ,-6676   ,-7300   ,-8378   ,-8912   ,-8324   ,\n    -6915   ,-5064   ,-3828   ,-4196   ,-5723   ,-7894   ,-10050  ,-11980  ,-13808  ,-15712  ,-17700  ,-19540  ,-20958  ,-21748  ,-21908  ,\n    -21216  ,-19884  ,-18302  ,-16961  ,-16012  ,-15368  ,-14562  ,-13491  ,-12146  ,-11125  ,-10136  ,-8437   ,-6302   ,-3697   ,-1045   ,\n    1580    ,3952    ,5263    ,4638    ,2908    ,299     ,-2759   ,-5987   ,-9258   ,-12578  ,-15778  ,-18744  ,-20866  ,-21665  ,-22229  ,\n    -22712  ,-23236  ,-24083  ,-25599  ,-27734  ,-30192  ,-32097  ,-32765  ,-32419  ,-31148  ,-29289  ,-27561  ,-26624  ,-26481  ,-26917  ,\n    -27345  ,-27162  ,-26248  ,-24894  ,-23488  ,-22351  ,-21607  ,-21051  ,-20132  ,-18087  ,-14946  ,-11240  ,-8051   ,-6555   ,-6755   ,\n    -7877   ,-8938   ,-9032   ,-7933   ,-5985   ,-4025   ,-3164   ,-4145   ,-6715   ,-10004  ,-12557  ,-13552  ,-13157  ,-12188  ,-11597  ,\n    -11843  ,-12681  ,-13514  ,-13675  ,-12633  ,-10743  ,-8520   ,-6897   ,-6727   ,-7789   ,-9353   ,-10295  ,-9652   ,-7621   ,-4849   ,\n    -2174   ,-443    ,294     ,340     ,154     ,237     ,807     ,1620    ,2261    ,2169    ,1406    ,351     ,-364    ,-367    ,228     ,\n    798     ,887     ,243     ,-945    ,-2037   ,-2596   ,-5266   ,-4943   ,-4970   ,-5193   ,-5749   ,-6634   ,-7572   ,-7953   ,-7404   ,\n    -5906   ,-3819   ,-1748   ,266     ,2197    ,4221    ,6133    ,7884    ,9164    ,9885    ,10243   ,10629   ,11298   ,12264   ,13037   ,\n    13261   ,12875   ,12141   ,11613   ,11539   ,11938   ,12464   ,12806   ,12922   ,13104   ,13798   ,15142   ,16791   ,18257   ,18966   ,\n    18659   ,17716   ,16570   ,15683   ,14908   ,13889   ,12289   ,10192   ,7887    ,5926    ,4519    ,3721    ,3211    ,2452    ,1289    ,\n    -85     ,-1121   ,-1600   ,-1724   ,-1919   ,-2409   ,-3144   ,-3836   ,-4181   ,-3935   ,-3222   ,-2382   ,-1723   ,-1322   ,-931    ,\n    -417    ,215     ,659     ,719     ,87      ,-687    ,-966    ,-827    ,-496    ,-117    ,178     ,325     ,287     ,16      ,-718    ,\n    -2288   ,-4520   ,-6903   ,-8755   ,-9693   ,-9883   ,-9837   ,-9829   ,-10018  ,-10220  ,-10162  ,-9668   ,-8919   ,-8545   ,-8830   ,\n    -9585   ,-10002  ,-9327   ,-7583   ,-5232   ,-3143   ,-2065   ,-1804   ,-1811   ,-1461   ,-475    ,361     ,617     ,259     ,2       ,\n    540     ,2161    ,4383    ,6239    ,6955    ,6467    ,5384    ,4539    ,4362    ,4402    ,4115    ,3219    ,2118    ,1472    ,1786    ,\n    2967    ,4235    ,4576    ,3731    ,2038    ,611     ,156     ,701     ,1711    ,2598    ,3355    ,4089    ,5112    ,6321    ,7407    ,\n    7926    ,7707    ,6871    ,5962    ,5284    ,5112    ,5689    ,7047    ,9111    ,11570   ,13761   ,14869   ,14706   ,13470   ,12048   ,\n    11092   ,10734   ,10336   ,9260    ,7361    ,5663    ,5316    ,7185    ,10521   ,13276   ,13975   ,12278   ,9792    ,9088    ,11480   ,\n    16572   ,22179   ,25660   ,26662   ,26298   ,27009   ,29303   ,32143   ,32765   ,28584   ,19718   ,8729    ,-1120   ,-6928   ,-8962   ,\n    -9695   ,-11648  ,-15977  ,-21044  ,-24352  ,-24242  ,-21177  ,-17852  ,-17270  ,-20326  ,-25817  ,-30493  ,-32219  ,-30717  ,-27720  ,\n    -26078  ,-27147  ,-30187  ,-32765  ,-31975  ,-27559  ,-20745  ,-13974  ,-9171   ,-6293   ,-3907   ,-455    ,4616    ,9808    ,12805   ,\n    11762   ,6324    ,-1286   ,-8622   ,-14019  ,-17198  ,-19308  ,-21599  ,-24310  ,-26743  ,-27570  ,-26423  ,-23856  ,-21376  ,-20578  ,\n    -21751  ,-24280  ,-26904  ,-28452  ,-28844  ,-28724  ,-28857  ,-29730  ,-30666  ,-31036  ,-30329  ,-28662  ,-26646  ,-24926  ,-23604  ,\n    -22307  ,-20365  ,-17504  ,-13955  ,-10473  ,-7813   ,-6119   ,16677   ,16674   ,18382   ,21870   ,26468   ,30743   ,32765   ,30973   ,\n    24568   ,14472   ,4145    ,-3674   ,-7489   ,-6224   ,-1782   ,3789    ,8480    ,10673   ,10559   ,8836    ,6416    ,4148    ,2513    ,\n    1701    ,1581    ,1960    ,2568    ,3199    ,3758    ,4001    ,4089    ,4073    ,4202    ,4615    ,5395    ,6436    ,7588    ,8782    ,\n    9758    ,10602   ,11360   ,12025   ,12667   ,13282   ,14020   ,14880   ,15803   ,16834   ,17872   ,18702   ,19268   ,19667   ,19839   ,\n    19727   ,19451   ,19193   ,19020   ,18813   ,18693   ,18671   ,18740   ,18814   ,18755   ,18930   ,18963   ,18862   ,18909   ,19122   ,\n    19153   ,19378   ,19665   ,20148   ,20509   ,20827   ,21302   ,21818   ,22346   ,22682   ,23022   ,23349   ,23531   ,23677   ,23869   ,\n    23854   ,23931   ,23952   ,23991   ,24165   ,24306   ,24376   ,24437   ,24589   ,24675   ,24880   ,25313   ,25709   ,26009   ,26124   ,\n    25942   ,25456   ,24883   ,24400   ,24201   ,24258   ,24642   ,25135   ,25698   ,26277   ,26905   ,27680   ,28215   ,28069   ,27808   ,\n    27680   ,27438   ,27095   ,26900   ,26708   ,26186   ,25475   ,24541   ,23330   ,21713   ,19964   ,18320   ,17593   ,18469   ,21297   ,\n    25474   ,29403   ,31298   ,29315   ,22437   ,11832   ,886     ,-7261   ,-10762  ,-8492   ,-2503   ,4944    ,10824   ,14868   ,16189   ,\n    15194   ,12721   ,9170    ,5023    ,401     ,-4647   ,-9999   ,-15397  ,-20401  ,-24916  ,-28504  ,-30977  ,-32429  ,-32765  ,-31861  ,\n    -30114  ,-27878  ,-25439  ,-23082  ,-21325  ,-19975  ,-19046  ,-18354  ,-17891  ,-17482  ,-17027  ,-16416  ,-15821  ,-15181  ,-14586  ,\n    -14137  ,-13931  ,-13883  ,-13776  ,-13550  ,-13101  ,-12633  ,-12063  ,-11668  ,-11317  ,-10982  ,-10788  ,-10600  ,-10400  ,-10051  ,\n    -9818   ,-9591   ,-9355   ,-9001   ,-8499   ,-7849   ,-7009   ,-6048   ,-5005   ,-3898   ,-2677   ,-1449   ,-250    ,907     ,1985    ,\n    3011    ,3950    ,4790    ,5636    ,6435    ,7190    ,7926    ,8738    ,9660    ,10471   ,11261   ,11914   ,12492   ,13026   ,13606   ,\n    14239   ,14880   ,15392   ,15604   ,15535   ,15144   ,14702   ,14307   ,14199   ,14300   ,14677   ,15072   ,15398   ,15638   ,15904   ,\n    16244   ,16565   ,16975   ,17314   ,17675   ,17976   ,18294   ,18776   ,19289   ,19680   ,20160   ,20656   ,20908   ,21283   ,21754   ,\n    22261   ,22330   ,22227   ,22006   ,21333   ,20397   ,19074   ,17720   ,-1396   ,854     ,5052    ,8110    ,6223    ,5522    ,8404    ,\n    8896    ,7667    ,8921    ,9953    ,9730    ,10253   ,11379   ,11934   ,12643   ,13763   ,14779   ,15688   ,16711   ,17747   ,18722   ,\n    19723   ,20745   ,21737   ,22696   ,23649   ,24561   ,25484   ,26320   ,27075   ,27685   ,28209   ,28692   ,29103   ,29513   ,29928   ,\n    30339   ,30833   ,31365   ,31954   ,32563   ,32765   ,31306   ,27304   ,24754   ,27887   ,29734   ,27596   ,27613   ,29721   ,29360   ,\n    28865   ,29844   ,30245   ,29814   ,29923   ,30046   ,29694   ,29284   ,28938   ,28420   ,27868   ,27422   ,27017   ,26629   ,26285   ,\n    26007   ,25783   ,25570   ,25392   ,25088   ,24773   ,24502   ,24296   ,24154   ,23908   ,23594   ,23219   ,22722   ,22064   ,21293   ,\n    20394   ,19352   ,18235   ,17079   ,15929   ,14807   ,13739   ,12728   ,11785   ,10869   ,9976    ,9084    ,8232    ,7391    ,6671    ,\n    6057    ,5605    ,5335    ,5297    ,5413    ,5575    ,5786    ,5960    ,5917    ,5541    ,4758    ,3558    ,2054    ,236     ,-1905   ,\n    -4285   ,-6624   ,-8948   ,-11201  ,-13263  ,-15116  ,-16789  ,-18269  ,-19464  ,-20386  ,-21033  ,-21397  ,-21583  ,-21564  ,-21183  ,\n    -20429  ,-18951  ,-15892  ,-12690  ,-12953  ,-16173  ,-16663  ,-17296  ,-20896  ,-24000  ,-25814  ,-28516  ,-30758  ,-31729  ,-32377  ,\n    -32765  ,-32565  ,-32225  ,-32025  ,-31831  ,-31702  ,-31701  ,-31721  ,-31696  ,-31658  ,-31554  ,-31388  ,-31166  ,-30883  ,-30520  ,\n    -30144  ,-29796  ,-29510  ,-29239  ,-28986  ,-28693  ,-28306  ,-27764  ,-27070  ,-26108  ,-24983  ,-23712  ,-22353  ,-21346  ,-22041  ,\n    -25431  ,-27221  ,-23286  ,-21429  ,-23258  ,-22396  ,-20196  ,-20605  ,-20497  ,-19157  ,-18809  ,-18787  ,-18169  ,-17790  ,-17729  ,\n    -17505  ,-17257  ,-17136  ,-16872  ,-16436  ,-15949  ,-15368  ,-14731  ,-14021  ,-13267  ,-12550  ,-11824  ,-11236  ,-10763  ,-10309  ,\n    -9929   ,-9561   ,-9301   ,-9071   ,-8934   ,-8848   ,-8799   ,-8806   ,-8896   ,-9090   ,-9337   ,-9609   ,-9865   ,-10083  ,-10218  ,\n    -10265  ,-10170  ,-9999   ,-9807   ,-9582   ,-9339   ,-9179   ,-9008   ,-8908   ,-8846   ,-8843   ,-8870   ,-8871   ,-8957   ,-8999   ,\n    -9001   ,-9032   ,-9091   ,-9239   ,-9388   ,-9469   ,-9549   ,-9678   ,-9896   ,-9925   ,-9881   ,-9773   ,-9484   ,-9075   ,-8592   ,\n    -8050   ,-7483   ,-6920   ,-6339   ,-5787   ,-5262   ,-4768   ,-4074   ,-3017   ,6053    ,6338    ,6562    ,6530    ,6572    ,6505    ,\n    6390    ,6219    ,6010    ,5738    ,5437    ,5134    ,4832    ,4523    ,4187    ,3848    ,3488    ,3114    ,2715    ,2319    ,1937    ,\n    1576    ,1255    ,963     ,708     ,467     ,250     ,28      ,-186    ,-397    ,-584    ,-768    ,-914    ,-1050   ,-1153   ,-1259   ,\n    -1363   ,-1468   ,-1562   ,-1648   ,-1712   ,-1754   ,-1751   ,-1684   ,-1560   ,-1382   ,-1164   ,-906    ,-658    ,-410    ,-162    ,\n    111     ,427     ,801     ,1217    ,1669    ,2121    ,2557    ,2956    ,3331    ,3711    ,4109    ,4548    ,5030    ,5553    ,6080    ,\n    6617    ,7126    ,7610    ,8057    ,8503    ,8954    ,9447    ,10012   ,10676   ,11433   ,12264   ,13100   ,13910   ,14642   ,15302   ,\n    15973   ,16716   ,17600   ,18633   ,19750   ,20849   ,21828   ,22576   ,23104   ,23481   ,23799   ,24143   ,24565   ,25046   ,25562   ,\n    26039   ,26440   ,26775   ,27039   ,27259   ,27468   ,27706   ,27976   ,28318   ,28770   ,29347   ,30035   ,30835   ,31664   ,32367   ,\n    32765   ,32603   ,31510   ,29197   ,25453   ,20119   ,13369   ,5920    ,-1346   ,-7644   ,-12212  ,-14749  ,-15301  ,-13905  ,-10807  ,\n    -6619   ,-2267   ,1660    ,4439    ,5743    ,5665    ,4347    ,2068    ,-756    ,-3555   ,-6080   ,-8032   ,-9323   ,-10107  ,-10533  ,\n    -10840  ,-11269  ,-12035  ,-13216  ,-14869  ,-16896  ,-19148  ,-21438  ,-23624  ,-25538  ,-27120  ,-28359  ,-29275  ,-29901  ,-30339  ,\n    -30708  ,-31029  ,-31331  ,-31623  ,-31899  ,-32136  ,-32323  ,-32449  ,-32556  ,-32632  ,-32701  ,-32739  ,-32765  ,-32744  ,-32687  ,\n    -32576  ,-32434  ,-32260  ,-32090  ,-31936  ,-31795  ,-31684  ,-31575  ,-31480  ,-31354  ,-31193  ,-30981  ,-30733  ,-30430  ,-30109  ,\n    -29770  ,-29433  ,-29075  ,-28722  ,-28330  ,-27905  ,-27448  ,-26954  ,-26404  ,-25828  ,-25270  ,-24698  ,-24131  ,-23543  ,-22951  ,\n    -22309  ,-21649  ,-20924  ,-20172  ,-19389  ,-18602  ,-17805  ,-17021  ,-16240  ,-15463  ,-14685  ,-13902  ,-13117  ,-12336  ,-11568  ,\n    -10815  ,-10113  ,-9424   ,-8783   ,-8149   ,-7534   ,-6895   ,-6262   ,-5598   ,-4964   ,-4297   ,-3736   ,-3223   ,-2607   ,-2061   ,\n    -1502   ,-973    ,-430    ,115     ,675     ,1226    ,1760    ,2267    ,2720    ,3140    ,3492    ,3811    ,4098    ,4354    ,4583    ,\n    4802    ,5005    ,5196    ,5365    ,5498    ,5625    ,5726    ,5837    ,5895    ,5991    ,6469    ,7301    ,8144    ,8969    ,9749    ,\n    10505   ,11206   ,11847   ,12459   ,12988   ,13491   ,13942   ,14357   ,14770   ,15151   ,15515   ,15828   ,16148   ,16429   ,16681   ,\n    16915   ,17091   ,17247   ,17342   ,17398   ,17447   ,17423   ,17368   ,17301   ,17207   ,17114   ,17010   ,16919   ,16818   ,16715   ,\n    16640   ,16541   ,16453   ,16312   ,16188   ,16050   ,15860   ,15661   ,15431   ,15191   ,14904   ,14641   ,14338   ,14018   ,13724   ,\n    13446   ,13175   ,12936   ,12673   ,12484   ,12274   ,12063   ,11876   ,11659   ,11450   ,11226   ,10987   ,10701   ,10436   ,10131   ,\n    9835    ,9527    ,9237    ,8936    ,8667    ,8397    ,8173    ,7925    ,7701    ,7492    ,7289    ,7045    ,6789    ,6597    ,6409    ,\n    6206    ,6023    ,5814    ,5572    ,5406    ,5248    ,5047    ,4915    ,4772    ,4673    ,4604    ,4592    ,4609    ,4666    ,4740    ,\n    4827    ,4956    ,5085    ,5213    ,5360    ,5507    ,5654    ,5804    ,5952    ,6143    ,6329    ,6553    ,6803    ,7096    ,7427    ,\n    7784    ,8157    ,8594    ,9165    ,10613   ,16163   ,23485   ,23987   ,23603   ,24166   ,24728   ,25326   ,25874   ,26424   ,26951   ,\n    27466   ,27982   ,28486   ,28973   ,29424   ,29848   ,30231   ,30575   ,30870   ,31115   ,31300   ,31467   ,31600   ,31714   ,31821   ,\n    31941   ,32074   ,32209   ,32349   ,32492   ,32618   ,32712   ,32765   ,32746   ,32679   ,32505   ,32260   ,31952   ,31591   ,31154   ,\n    30698   ,30227   ,29762   ,29307   ,28851   ,28412   ,27981   ,27521   ,27034   ,26502   ,25891   ,25213   ,24452   ,23666   ,22836   ,\n    21974   ,21100   ,20228   ,19353   ,18454   ,17503   ,16459   ,15290   ,13916   ,12293   ,10344   ,8036    ,5237    ,1986    ,-1625   ,\n    -5434   ,-9246   ,-12789  ,-15887  ,-18462  ,-20414  ,-21688  ,-22491  ,-22941  ,-23102  ,-23214  ,-23240  ,-23307  ,-23390  ,-23523  ,\n    -23628  ,-23729  ,-23775  ,-23705  ,-23569  ,-23350  ,-23086  ,-22910  ,-22862  ,-23065  ,-23581  ,-24212  ,-21349  ,-15160  ,-18298  ,\n    -22351  ,-25510  ,-28437  ,-30709  ,-32135  ,-32765  ,-32704  ,-32198  ,-31458  ,-30415  ,-29348  ,-28176  ,-26931  ,-25731  ,-24577  ,\n    -23503  ,-22479  ,-21553  ,-20665  ,-19828  ,-19029  ,-18248  ,-17470  ,-16689  ,-15899  ,-15136  ,-14363  ,-13650  ,-12959  ,-12303  ,\n    -11585  ,-10881  ,-9853   ,-5996   ,833     ,2547    ,2392    ,3217    ,3993    ,4837    ,5666    ,6682    ,7430    ,8074    ,7377    ,\n    6085    ,6026    ,6817    ,6174    ,6576    ,8444    ,8133    ,7739    ,8914    ,8103    ,8405    ,10073   ,9442    ,8722    ,10183   ,\n    9712    ,8066    ,7570    ,7334    ,7257    ,7031    ,6349    ,6678    ,7699    ,7181    ,7018    ,8515    ,8562    ,7342    ,8843    ,\n    10223   ,9966    ,11071   ,11496   ,10066   ,10722   ,13071   ,12054   ,11526   ,12929   ,11754   ,10690   ,10907   ,11388   ,11196   ,\n    10293   ,8992    ,9738    ,11539   ,10448   ,11020   ,12214   ,10135   ,10827   ,13346   ,13304   ,12120   ,13607   ,12436   ,10587   ,\n    13486   ,14293   ,12641   ,12926   ,13828   ,13653   ,13734   ,15030   ,15052   ,14797   ,15859   ,16849   ,18278   ,18478   ,18868   ,\n    20236   ,20922   ,21671   ,22564   ,22952   ,22475   ,22585   ,23649   ,22725   ,21741   ,22289   ,22436   ,22693   ,23865   ,24792   ,\n    24170   ,23873   ,25712   ,26355   ,26837   ,27856   ,26943   ,26230   ,27053   ,27394   ,27565   ,28058   ,28739   ,28607   ,30538   ,\n    31566   ,31059   ,32765   ,32261   ,30829   ,31080   ,29857   ,27434   ,24560   ,21874   ,17648   ,14239   ,11800   ,8181    ,6919    ,\n    4602    ,2098    ,1686    ,201     ,-3      ,290     ,134     ,-758    ,-719    ,-80     ,-1395   ,-970    ,-981    ,-2656   ,-2390   ,\n    -2740   ,-4209   ,-6967   ,-9765   ,-12165  ,-15369  ,-18077  ,-21368  ,-24507  ,-27853  ,-30806  ,-30650  ,-31369  ,-32341  ,-32632  ,\n    -32765  ,-31071  ,-29162  ,-28700  ,-29736  ,-29431  ,-27961  ,-27728  ,-26600  ,-26205  ,-26911  ,-27411  ,-27268  ,-25327  ,-23580  ,\n    -22468  ,-22789  ,-22290  ,-19642  ,-18726  ,-19090  ,-19450  ,-19010  ,-17955  ,-17740  ,-17834  ,-18308  ,-18079  ,-18112  ,-17283  ,\n    -14690  ,-13595  ,-12779  ,-12041  ,-11177  ,-8878   ,-6880   ,-7249   ,-7883   ,-5787   ,-3658   ,-3517   ,-3683   ,-4111   ,-4292   ,\n    -4029   ,-3285   ,-2152   ,-1654   ,-2533   ,-3510   ,-3016   ,-1735   ,-484    ,30      ,-441    ,199     ,2152    ,2399    ,1222    ,\n    1794    ,2477    ,1812    ,1511    ,1928    ,1541    ,559     ,-229    ,-300    ,552     ,1068    ,801     ,1714    ,2603    ,3442    ,\n    4168    ,3779    ,4172    ,6293    ,7465    ,7278    ,7718    ,8136    ,6877    ,6563    ,7510    ,8600    ,8641    ,7027    ,6219    ,\n    6106    ,5563    ,5684    ,5520    ,4931    ,4873    ,5785    ,5422    ,5617    ,7055    ,6435    ,5645    ,17983   ,19051   ,15815   ,\n    9722    ,4363    ,2591    ,3945    ,5628    ,5384    ,3665    ,3186    ,5156    ,8678    ,11297   ,11709   ,10553   ,9042    ,7634    ,\n    6111    ,3863    ,1553    ,847     ,3100    ,7690    ,11820   ,12398   ,10412   ,8417    ,8697    ,11028   ,13640   ,14535   ,13182   ,\n    10535   ,8629    ,8432    ,9634    ,11763   ,14627   ,17347   ,18821   ,17948   ,15091   ,12451   ,11692   ,13974   ,17831   ,20621   ,\n    20741   ,18362   ,16564   ,17339   ,20776   ,24500   ,25089   ,21916   ,16422   ,11507   ,9881    ,10512   ,11378   ,11277   ,10749   ,\n    11136   ,12117   ,13555   ,14337   ,14468   ,14012   ,13031   ,11285   ,8176    ,5026    ,3090    ,3637    ,7702    ,13217   ,17214   ,\n    18522   ,18313   ,19367   ,21921   ,23618   ,22247   ,18265   ,14055   ,12614   ,14665   ,18001   ,18940   ,17677   ,18492   ,23328   ,\n    29743   ,32728   ,29402   ,20841   ,13346   ,12278   ,14715   ,15436   ,10290   ,-431    ,-8872   ,-9902   ,-5548   ,-20     ,2443    ,\n    -530    ,-5299   ,-9548   ,-12075  ,-10965  ,-8211   ,-6291   ,-4601   ,-2998   ,-972    ,1091    ,3889    ,8049    ,14234   ,20456   ,\n    24133   ,22892   ,20280   ,20142   ,24175   ,29636   ,32765   ,31793   ,27135   ,24092   ,25098   ,26735   ,26048   ,20664   ,12021   ,\n    6194    ,3927    ,2890    ,1140    ,-1518   ,-4761   ,-6093   ,-5747   ,-5603   ,-6479   ,-9683   ,-15115  ,-19225  ,-20873  ,-20720  ,\n    -21503  ,-23602  ,-24939  ,-22830  ,-16334  ,-8025   ,-944    ,3711    ,5312    ,5437    ,4555    ,2857    ,898     ,304     ,1703    ,\n    4019    ,3803    ,1897    ,341     ,-206    ,2861    ,8199    ,9674    ,6295    ,-2933   ,-14562  ,-20745  ,-20551  ,-19574  ,-20711  ,\n    -25418  ,-31043  ,-32765  ,-30237  ,-26478  ,-22107  ,-19935  ,-20559  ,-21025  ,-19963  ,-18052  ,-16919  ,-17081  ,-16441  ,-13802  ,\n    -9840   ,-6858   ,-5394   ,-4275   ,-2355   ,369     ,2248    ,1868    ,-1607   ,-6059   ,-8345   ,-7471   ,-5450   ,-5192   ,-6874   ,\n    -8720   ,-9311   ,-8922   ,-8683   ,-10128  ,-12851  ,-14905  ,-14110  ,-11498  ,-9979   ,-11346  ,-12870  ,-10992  ,-4932   ,2175    ,\n    5120    ,2399    ,-4182   ,-9549   ,-9634   ,-5173   ,21      ,1761    ,55      ,-1670   ,-571    ,3307    ,8274    ,12049   ,13670   ,\n    13154   ,11035   ,7923    ,4343    ,1532    ,1615    ,4435    ,7773    ,9755    ,9087    ,8241    ,9567    ,13623   ,-4062   ,-2646   ,\n    -900    ,1838    ,5506    ,9608    ,13744   ,17554   ,20356   ,22293   ,24024   ,25967   ,28080   ,30283   ,31933   ,32765   ,32615   ,\n    31578   ,30395   ,29459   ,28879   ,28467   ,28000   ,27024   ,25382   ,23459   ,21473   ,19998   ,18869   ,17996   ,16765   ,15438   ,\n    13793   ,12115   ,10474   ,9320    ,8690    ,8469    ,8288    ,8094    ,8078    ,8259    ,8742    ,9621    ,10976   ,12918   ,14939   ,\n    16917   ,18685   ,20608   ,22360   ,24034   ,25622   ,27291   ,28781   ,29820   ,30372   ,30614   ,30587   ,30438   ,30404   ,30463   ,\n    30495   ,30229   ,29560   ,28470   ,27119   ,25755   ,24510   ,23360   ,22090   ,20614   ,18567   ,16054   ,13044   ,10274   ,7818    ,\n    5817    ,4074    ,2323    ,283     ,-2060   ,-4122   ,-5348   ,-5537   ,-4791   ,-3468   ,-2141   ,-932    ,244     ,1368    ,3065    ,\n    5742    ,8843    ,11994   ,14691   ,16188   ,16882   ,17292   ,18006   ,19249   ,20655   ,21506   ,21096   ,19605   ,17469   ,15220   ,\n    13402   ,12169   ,10948   ,9246    ,6729    ,3614    ,943     ,-1840   ,-5411   ,-8569   ,-10817  ,-12817  ,-14989  ,-17677  ,-20921  ,\n    -23675  ,-25496  ,-26241  ,-26238  ,-25358  ,-24429  ,-23827  ,-23514  ,-22799  ,-21337  ,-18676  ,-15111  ,-11643  ,-8532   ,-6348   ,\n    -4992   ,-3709   ,-2195   ,-495    ,1073    ,2065    ,2169    ,1349    ,-297    ,-2035   ,-3607   ,-4847   ,-6050   ,-7246   ,-9167   ,\n    -11679  ,-14375  ,-16764  ,-18660  ,-20133  ,-21283  ,-22417  ,-23698  ,-25467  ,-27461  ,-29039  ,-30176  ,-30914  ,-31502  ,-31820  ,\n    -32103  ,-32430  ,-32765  ,-32539  ,-31860  ,-30712  ,-29061  ,-27063  ,-25184  ,-23230  ,-21052  ,-18877  ,-16858  ,-14801  ,-12612  ,\n    -10590  ,-9116   ,-8047   ,-7338   ,-6894   ,-6623   ,-6286   ,-5889   ,-5632   ,-5671   ,-6190   ,-7206   ,-8420   ,-9546   ,-10339  ,\n    -10929  ,-11558  ,-12466  ,-13803  ,-15822  ,-18219  ,-20271  ,-21688  ,-22598  ,-23447  ,-24703  ,-26223  ,-27802  ,-29236  ,-30024  ,\n    -29627  ,-28135  ,-26078  ,-23967  ,-22170  ,-20248  ,-18207  ,-15473  ,-11384  ,-6859   ,-2125   ,2011    ,4777    ,6735    ,8283    ,\n    10108   ,12424   ,14816   ,16697   ,17547   ,17128   ,15906   ,14309   ,12952   ,12429   ,12050   ,11327   ,9793    ,7406    ,5204    ,\n    3211    ,822     ,-1300   ,-2540   ,-3272   ,-4058   ,-5599   ,-7796   ,-10160  ,-11843  ,-11836  ,-10365  ,-8172   ,-5839   ,356     ,\n    2412    ,4099    ,5943    ,8820    ,12785   ,17268   ,21499   ,25080   ,27295   ,27358   ,25602   ,22602   ,19592   ,17773   ,17656   ,\n    19883   ,23957   ,28611   ,32089   ,32708   ,29760   ,22522   ,13558   ,6942    ,3336    ,-2093   ,-10737  ,-19766  ,-26267  ,-27465  ,\n    -24814  ,-20098  ,-15148  ,-12367  ,-12163  ,-14420  ,-18358  ,-22950  ,-26971  ,-28892  ,-28124  ,-24766  ,-20006  ,-14750  ,-9961   ,\n    -6645   ,-4671   ,-3371   ,-2197   ,-612    ,1477    ,4060    ,6800    ,9003    ,10095   ,9786    ,8248    ,5810    ,3049    ,520     ,\n    -1356   ,-1989   ,-1105   ,646     ,2745    ,4713    ,6250    ,7334    ,8010    ,8161    ,7843    ,7606    ,7744    ,8298    ,9108    ,\n    9898    ,10630   ,11387   ,12218   ,13063   ,13825   ,14388   ,14652   ,14534   ,14069   ,13212   ,11856   ,9708    ,6676    ,3174    ,\n    -523    ,-4115   ,-7392   ,-10147  ,-12246  ,-13538  ,-14162  ,-14295  ,-14150  ,-13771  ,-13071  ,-12144  ,-11216  ,-10431  ,-9687   ,\n    -8849   ,-7819   ,-6738   ,-5880   ,-5324   ,-4923   ,-4625   ,-4512   ,-4325   ,-3745   ,-2583   ,-946    ,717     ,1972    ,2380    ,\n    1728    ,121     ,-2472   ,-5648   ,-8771   ,-11072  ,-12101  ,-11739  ,-9912   ,-7440   ,-4773   ,-2318   ,-299    ,1416    ,3114    ,\n    5480    ,9277    ,14202   ,19586   ,24554   ,28152   ,29350   ,27932   ,24552   ,20224   ,16612   ,14888   ,15786   ,19475   ,24772   ,\n    29873   ,32765   ,31847   ,25743   ,16137   ,7109    ,1565    ,-3386   ,-11635  ,-21448  ,-29558  ,-32765  ,-31521  ,-27487  ,-22393  ,\n    -18531  ,-16967  ,-17833  ,-20780  ,-24774  ,-28589  ,-30887  ,-30828  ,-28343  ,-24041  ,-18846  ,-13602  ,-9471   ,-6814   ,-4892   ,\n    -2965   ,-457    ,2664    ,6156    ,9894    ,13266   ,15632   ,16586   ,16107   ,14550   ,12500   ,10876   ,9810    ,9398    ,9884    ,\n    11007   ,12276   ,13100   ,13089   ,12260   ,10864   ,9308    ,7888    ,6843    ,6262    ,6154    ,6306    ,6335    ,6124    ,5733    ,\n    5282    ,4876    ,4404    ,3708    ,2838    ,2091    ,1740    ,1715    ,1839    ,1687    ,1071    ,25      ,-1202   ,-2277   ,-3168   ,\n    -3923   ,-4617   ,-5261   ,-5693   ,-5772   ,-5680   ,-5753   ,-6229   ,-7125   ,-8351   ,-9900   ,-11343  ,-12307  ,-12494  ,-11842  ,\n    -10764  ,-9658   ,-9119   ,-9118   ,-9621   ,-10671  ,-12138  ,-13627  ,-14289  ,-13850  ,-12288  ,-9832   ,-7034   ,-4074   ,-1279   ,\n    2244    ,5446    ,8662    ,11827   ,15085   ,18468   ,21704   ,24414   ,26386   ,27591   ,28430   ,29275   ,30279   ,31355   ,32213   ,\n    32735   ,32765   ,32161   ,30762   ,28524   ,25419   ,21611   ,17569   ,14096   ,11830   ,11160   ,11968   ,13446   ,15165   ,16903   ,\n    18731   ,20559   ,22117   ,22866   ,22386   ,21261   ,20268   ,19742   ,19323   ,18353   ,16579   ,14124   ,11415   ,8971    ,6859    ,\n    4917    ,2964    ,1001    ,-1128   ,-3798   ,-7565   ,-12502  ,-18134  ,-23555  ,-27674  ,-29634  ,-29700  ,-28426  ,-26577  ,-25057  ,\n    -24430  ,-24687  ,-25340  ,-25545  ,-24938  ,-23570  ,-21479  ,-18462  ,-14596  ,-10261  ,-6072   ,-2809   ,-499    ,1039    ,2106    ,\n    2892    ,3435    ,3548    ,3038    ,1898    ,312     ,-1553   ,-3764   ,-6319   ,-9030   ,-11388  ,-12878  ,-13066  ,-11929  ,-10052  ,\n    -8128   ,-6722   ,-5946   ,-5123   ,-3683   ,-1608   ,479     ,1932    ,2869    ,3846    ,5446    ,7259    ,8512    ,8586    ,7295    ,\n    5233    ,2912    ,493     ,-1994   ,-4229   ,-5678   ,-5933   ,-5031   ,-3723   ,-2934   ,-3259   ,-4806   ,-6761   ,-8139   ,-8532   ,\n    -8178   ,-7664   ,-7212   ,-6731   ,-6007   ,-4825   ,-3119   ,-909    ,1770    ,4725    ,7738    ,10478   ,12775   ,14750   ,16490   ,\n    18116   ,19670   ,20990   ,21998   ,22852   ,23801   ,25068   ,26438   ,27550   ,27988   ,27450   ,25921   ,23784   ,21344   ,18850   ,\n    16481   ,14386   ,12731   ,11728   ,11724   ,12712   ,14493   ,16524   ,18313   ,19824   ,21286   ,22689   ,23575   ,23563   ,22761   ,\n    21620   ,20585   ,19703   ,18689   ,17267   ,15339   ,13175   ,10948   ,8554    ,5563    ,1890    ,-2170   ,-6246   ,-10199  ,-14134  ,\n    -18325  ,-22796  ,-27094  ,-30370  ,-32251  ,-32765  ,-32263  ,-31294  ,-30495  ,-30212  ,-30389  ,-30617  ,-30405  ,-29523  ,-27902  ,\n    -25389  ,-21962  ,-17686  ,-12783  ,-7719   ,-3062   ,797     ,3615    ,5352    ,6257    ,6676    ,6723    ,6442    ,5850    ,5013    ,\n    3913    ,2462    ,499     ,-1804   ,-4089   ,-5815   ,-6503   ,-6288   ,-5472   ,-4511   ,-3817   ,-3480   ,-3258   ,-2731   ,-1376   ,\n    540     ,2472    ,3909    ,4845    ,5691    ,6612    ,7366    ,7421    ,6495    ,4590    ,2012    ,-848    ,-3678   ,-6208   ,-8024   ,\n    -8689   ,-8100   ,-6909   ,-5849   ,-5733   ,-6785   ,-8352   ,-9697   ,-10296  ,-9966   ,-8965   ,-7496   ,-5852   ,-4253   ,-2549   ,\n    -439    ,8670    ,10275   ,10197   ,9639    ,8747    ,6935    ,4032    ,995     ,-696    ,405     ,3736    ,7700    ,11035   ,13571   ,\n    16044   ,18608   ,20409   ,20230   ,17197   ,12444   ,7661    ,4918    ,5048    ,7033    ,9364    ,10474   ,9507    ,7589    ,6351    ,\n    7048    ,9556    ,11645   ,11358   ,7938    ,3201    ,257     ,513     ,2900    ,5327    ,6211    ,5180    ,3974    ,4559    ,7104    ,\n    10309   ,13129   ,14931   ,15635   ,15449   ,14464   ,12829   ,11218   ,10053   ,9178    ,8508    ,8292    ,8983    ,10589   ,12623   ,\n    14260   ,15472   ,16704   ,18563   ,20492   ,21298   ,20448   ,18373   ,16543   ,16398   ,17975   ,19873   ,20168   ,18425   ,15416   ,\n    12370   ,10332   ,9240    ,8430    ,7609    ,7092    ,7586    ,9508    ,12849   ,17126   ,21182   ,23750   ,23866   ,21665   ,18691   ,\n    16592   ,15790   ,15393   ,14284   ,13295   ,14064   ,17641   ,22856   ,27049   ,28505   ,27372   ,24955   ,22537   ,20256   ,19511   ,\n    19970   ,21221   ,22755   ,24025   ,24887   ,25556   ,25842   ,25189   ,22745   ,18114   ,12554   ,7787    ,5815    ,7121    ,10463   ,\n    14478   ,17690   ,19271   ,19549   ,18832   ,17156   ,14686   ,11872   ,9284    ,7456    ,6296    ,5296    ,5498    ,8323    ,14447   ,\n    21213   ,25700   ,26044   ,22910   ,19483   ,18392   ,20166   ,23627   ,26265   ,26580   ,24639   ,22089   ,21618   ,24323   ,28578   ,\n    30153   ,26183   ,18003   ,9757    ,6889    ,12348   ,21809   ,29711   ,32216   ,29344   ,26309   ,26575   ,30181   ,32765   ,29923   ,\n    20795   ,8393    ,-1620   ,-5260   ,-3090   ,1504    ,4162    ,3136    ,284     ,-1914   ,-920    ,2366    ,5463    ,5814    ,2764    ,\n    -1868   ,-4732   ,-4425   ,-1600   ,529     ,223     ,-2229   ,-5104   ,-6648   ,-7055   ,-6904   ,-6583   ,-5368   ,-2578   ,1552    ,\n    5598    ,7671    ,7269    ,5729    ,4593    ,4914    ,5522    ,4980    ,1944    ,-2275   ,-4529   ,-2023   ,5202    ,14424   ,20794   ,\n    22156   ,19053   ,14875   ,13700   ,15735   ,18371   ,17708   ,11441   ,2023    ,-6494   ,-10318  ,-8802   ,-6214   ,-7042   ,-12358  ,\n    -20501  ,-25636  ,-24758  ,-18104  ,-9828   ,-4304   ,-2794   ,-3521   ,-3894   ,-2595   ,-1554   ,-3362   ,-9842   ,-19118  ,-27712  ,\n    -32765  ,-32745  ,-30107  ,-27413  ,-25753  ,-24414  ,-22829  ,-20516  ,-18169  ,-16888  ,-17458  ,-18988  ,-19784  ,-17807  ,-11867  ,\n    -3898   ,3630    ,6893    ,12578   ,18381   ,24013   ,29501   ,32765   ,32400   ,29195   ,24727   ,20444   ,17273   ,15819   ,15534   ,\n    15706   ,16194   ,16986   ,17566   ,17942   ,18594   ,19433   ,20395   ,21712   ,23438   ,24929   ,26106   ,27160   ,27704   ,27363   ,\n    26662   ,26066   ,25509   ,25214   ,25325   ,25396   ,24959   ,24698   ,24560   ,24119   ,23547   ,23368   ,23223   ,22917   ,22745   ,\n    22363   ,21562   ,20867   ,20634   ,20125   ,19073   ,17227   ,13525   ,7969    ,2996    ,598     ,857     ,2529    ,3961    ,4060    ,\n    2498    ,294     ,-1747   ,-3453   ,-4443   ,-3895   ,-2701   ,-1991   ,-2144   ,-3407   ,-5681   ,-8545   ,-11650  ,-15835  ,-20918  ,\n    -25589  ,-28827  ,-29844  ,-28544  ,-26411  ,-25580  ,-26699  ,-28459  ,-30140  ,-31416  ,-31081  ,-28892  ,-26208  ,-24300  ,-24119  ,\n    -26393  ,-29122  ,-29158  ,-25067  ,-17248  ,-7633   ,1321    ,5856    ,3126    ,-3052   ,-8436   ,-10415  ,-8002   ,-3782   ,-388    ,\n    1294    ,2168    ,3246    ,4460    ,5862    ,7135    ,7833    ,8144    ,8725    ,10052   ,12237   ,14480   ,14617   ,9960    ,677     ,\n    -9050   ,-15107  ,-14224  ,-6088   ,4361    ,12162   ,15103   ,14123   ,11619   ,8487    ,5359    ,3598    ,3967    ,6976    ,11938   ,\n    17227   ,22278   ,27493   ,31716   ,32600   ,30401   ,26595   ,22373   ,19005   ,17353   ,16725   ,16376   ,16164   ,16137   ,15938   ,\n    15719   ,16134   ,17388   ,19340   ,22008   ,25090   ,27455   ,28906   ,29674   ,29720   ,28892   ,27954   ,27232   ,26458   ,25748   ,\n    25431   ,25333   ,25146   ,25297   ,25416   ,25059   ,24557   ,24482   ,24499   ,24519   ,24790   ,24981   ,24602   ,23947   ,23331   ,\n    22248   ,20741   ,18792   ,15398   ,9877    ,4104    ,355     ,-808    ,117     ,1901    ,3022    ,2634    ,1251    ,-509    ,-2345   ,\n    -3682   ,-3854   ,-3325   ,-3106   ,-3420   ,-4387   ,-6331   ,-8855   ,-11813  ,-16006  ,-21375  ,-26109  ,-28799  ,-28944  ,-26929  ,\n    -25113  ,-25448  ,-27634  ,-30090  ,-31867  ,-32765  ,-31911  ,-29046  ,-24601  ,-18464  ,-9649   ,313     ,6492    ,6253    ,726     ,\n    -5946   ,-9175   ,-7955   ,-3841   ,159     ,2242    ,3388    ,4498    ,5674    ,7118    ,8423    ,9007    ,8963    ,8951    ,9361    ,\n    10671   ,12929   ,14194   ,11409   ,4073    ,-5179   ,-11754  ,-11089  ,-3929   ,5668    ,12591   ,14505   ,13627   ,11232   ,7740    ,\n    4202    ,2423    ,3218    ,-638    ,1296    ,4283    ,8402    ,13370   ,18960   ,24181   ,28510   ,31650   ,32765   ,32544   ,31064   ,\n    28791   ,26195   ,23635   ,21475   ,19789   ,18826   ,18305   ,18246   ,18508   ,18882   ,19274   ,19583   ,19814   ,19969   ,20012   ,\n    20053   ,20123   ,20294   ,20519   ,20788   ,21066   ,21302   ,21433   ,21382   ,21191   ,20900   ,20452   ,19915   ,19284   ,18601   ,\n    17848   ,16972   ,15894   ,14436   ,12289   ,9141    ,5075    ,351     ,-4336   ,-8515   ,-11554  ,-13046  ,-13295  ,-11806  ,-9627   ,\n    -6913   ,-4055   ,-1465   ,854     ,2662    ,3921    ,4446    ,4629    ,4489    ,4192    ,3863    ,3546    ,3267    ,3051    ,2930    ,\n    2848    ,2792    ,2754    ,2790    ,2864    ,2949    ,3048    ,3189    ,3414    ,3696    ,4132    ,4909    ,6448    ,8938    ,12463   ,\n    16893   ,21698   ,26130   ,29403   ,31457   ,31380   ,30049   ,27521   ,24169   ,20686   ,17370   ,14508   ,12247   ,10628   ,9581    ,\n    8877    ,8378    ,7953    ,7524    ,7049    ,6468    ,5884    ,5355    ,4925    ,4612    ,4435    ,4421    ,4515    ,4673    ,4821    ,\n    4961    ,5080    ,5136    ,5130    ,5061    ,5005    ,4948    ,4867    ,4746    ,4564    ,4263    ,3604    ,2397    ,274     ,-2948   ,\n    -7193   ,-12673  ,-18287  ,-23570  ,-27771  ,-30383  ,-31181  ,-30413  ,-28372  ,-25447  ,-22311  ,-19376  ,-16857  ,-15277  ,-14340  ,\n    -14132  ,-14408  ,-14971  ,-15720  ,-16414  ,-16962  ,-17312  ,-17522  ,-17618  ,-17620  ,-17611  ,-17635  ,-17730  ,-17823  ,-17908  ,\n    -17962  ,-17967  ,-17891  ,-17706  ,-17447  ,-17153  ,-16865  ,-16583  ,-16340  ,-16227  ,-16194  ,-16224  ,-16299  ,-16355  ,-16260  ,\n    -15752  ,-14464  ,-12114  ,-8792   ,-4781   ,-471    ,3126    ,5682    ,6883    ,6313    ,4546    ,1673    ,-1646   ,-4998   ,-7916   ,\n    -10235  ,-11837  ,-12740  ,-12904  ,-12636  ,-12078  ,-11335  ,-10519  ,-9738   ,-9068   ,-8518   ,-8131   ,-7869   ,-7752   ,-7751   ,\n    -7787   ,-7838   ,-7906   ,-8001   ,-8126   ,-8310   ,-8752   ,-9610   ,-11451  ,-14175  ,-17933  ,-22287  ,-26536  ,-30027  ,-32182  ,\n    -32765  ,-31946  ,-29471  ,-26262  ,-22601  ,-19102  ,-15953  ,-13537  ,-11796  ,-10656  ,-10215  ,-10000  ,-9947   ,-9928   ,-9814   ,\n    -9579   ,-9198   ,-8753   ,-8288   ,-7837   ,-7419   ,-7050   ,-6797   ,-6556   ,-6325   ,-6085   ,-5838   ,-5553   ,-5187   ,-4741   ,\n    -4234   ,-3630   ,-2908   ,-1994   ,4734    ,7549    ,10120   ,12489   ,14572   ,16294   ,17652   ,18663   ,19543   ,20661   ,22283   ,\n    24255   ,26349   ,28073   ,29219   ,29785   ,30103   ,30568   ,31348   ,32253   ,32765   ,31849   ,26748   ,16781   ,4998    ,-2613   ,\n    -1933   ,4312    ,12027   ,17493   ,18851   ,17402   ,14464   ,10977   ,7595    ,4477    ,1870    ,-330    ,-2261   ,-4342   ,-6744   ,\n    -9398   ,-11960  ,-14024  ,-15654  ,-17032  ,-18552  ,-20223  ,-22009  ,-23709  ,-25328  ,-26877  ,-28291  ,-29373  ,-29945  ,-30113  ,\n    -29805  ,-28237  ,-23040  ,-12713  ,-1553   ,4931    ,4040    ,-2653   ,-9732   ,-14031  ,-14569  ,-11796  ,-7856   ,-3727   ,34      ,\n    3432    ,6523    ,9329    ,11785   ,13872   ,15736   ,17483   ,19231   ,20983   ,22908   ,24896   ,26809   ,28349   ,29452   ,30185   ,\n    30635   ,30619   ,28834   ,23307   ,13657   ,3591    ,-666    ,2187    ,9501    ,17162   ,21325   ,21863   ,19868   ,16761   ,13744   ,\n    11160   ,9002    ,7006    ,5168    ,3496    ,2128    ,988     ,-56     ,-1311   ,-2845   ,-4567   ,-6312   ,-7894   ,-9288   ,-10319  ,\n    -11017  ,-11226  ,-10523  ,-7139   ,702     ,10883   ,17723   ,18067   ,12522   ,4767    ,-977    ,-3368   ,-2720   ,-337    ,2367    ,\n    4997    ,7659    ,10419   ,13117   ,15537   ,17483   ,18916   ,19876   ,20639   ,21388   ,22560   ,24218   ,26238   ,28232   ,28731   ,\n    24877   ,16275   ,5163    ,-2877   ,-3398   ,1879    ,9223    ,14723   ,16434   ,15449   ,13149   ,10414   ,7471    ,4371    ,1267    ,\n    -1489   ,-3768   ,-5758   ,-7804   ,-9997   ,-12376  ,-14652  ,-16754  ,-18728  ,-20696  ,-22702  ,-24596  ,-26263  ,-27503  ,-28605  ,\n    -29725  ,-30915  ,-31912  ,-32547  ,-32765  ,-32382  ,-30181  ,-23515  ,-12826  ,-2207   ,2959    ,341     ,-6353   ,-12929  ,-16543  ,\n    -15882  ,-12651  ,-8374   ,-4081   ,-386    ,2904    ,5848    ,8535    ,10740   ,12642   ,14325   ,15974   ,17661   ,19505   ,21533   ,\n    23584   ,25461   ,26936   ,28105   ,28944   ,29473   ,29352   ,27561   ,22031   ,12374   ,2911    ,-1237   ,1517    ,8630    ,15802   ,\n    19984   ,20826   ,19138   ,16282   ,13355   ,10781   ,8574    ,6614    ,4842    ,3274    ,2039    ,997     ,-24     ,-1333   ,-2935   ,\n    -4766   ,-6494   ,-8014   ,-9237   ,-10066  ,-10535  ,-10762  ,-10874  ,-9509   ,-3693   ,6308    ,15933   ,19698   ,15843   ,8278    ,\n    1087    ,-3019   ,-3185   ,-1142   ,1818    ,-2953   ,2215    ,7440    ,9964    ,8486    ,5232    ,4639    ,9251    ,17496   ,25510   ,\n    30688   ,32765   ,32376   ,30161   ,27697   ,26670   ,27643   ,29536   ,30254   ,29203   ,26780   ,23358   ,20011   ,18087   ,17990   ,\n    17922   ,15854   ,12036   ,6762    ,734     ,-3110   ,-2305   ,1939    ,5131    ,4128    ,1403    ,-1230   ,-3448   ,-5394   ,-6061   ,\n    -4989   ,-3088   ,-2660   ,-4439   ,-7080   ,-8404   ,-7689   ,-6826   ,-7571   ,-9571   ,-10921  ,-10376  ,-9424   ,-10306  ,-13519  ,\n    -17049  ,-19125  ,-20770  ,-23446  ,-26510  ,-27464  ,-25328  ,-21457  ,-18838  ,-19108  ,-22437  ,-27634  ,-31812  ,-32765  ,-31107  ,\n    -28720  ,-26561  ,-25580  ,-26994  ,-30565  ,-32387  ,-29693  ,-25233  ,-22311  ,-21211  ,-20649  ,-20284  ,-20100  ,-18477  ,-15016  ,\n    -11720  ,-9869   ,-9864   ,-11103  ,-11987  ,-11160  ,-9006   ,-7960   ,-8316   ,-7680   ,-5374   ,-3930   ,-5048   ,-7068   ,-7752   ,\n    -6668   ,-5025   ,-4014   ,-5194   ,-8787   ,-11855  ,-11929  ,-9554   ,-7581   ,-6969   ,-7715   ,-10104  ,-13553  ,-15936  ,-16509  ,\n    -16473  ,-16921  ,-16643  ,-15356  ,-13769  ,-12109  ,-8891   ,-4233   ,-764    ,-993    ,-4151   ,-6268   ,-6404   ,-5974   ,-6280   ,\n    -5657   ,-2549   ,2073    ,5646    ,6946    ,6323    ,4727    ,2862    ,1525    ,1671    ,3530    ,5671    ,5830    ,4197    ,2969    ,\n    3542    ,4515    ,4844    ,4781    ,5514    ,7113    ,8754    ,9325    ,8731    ,8049    ,7717    ,5751    ,1231    ,-3108   ,-4961   ,\n    -6361   ,-6613   ,-5490   ,-5107   ,-6422   ,-9056   ,-11866  ,-14153  ,-15095  ,-14712  ,-14511  ,-14958  ,-14270  ,-10926  ,-6428   ,\n    -4652   ,-6134   ,-8941   ,-10690  ,-10859  ,-9475   ,-6485   ,-3783   ,-3299   ,-4090   ,-4052   ,-2331   ,-34     ,1955    ,3583    ,\n    4935    ,7461    ,11069   ,14008   ,14802   ,13381   ,10763   ,7265    ,4571    ,6408    ,11082   ,14460   ,15619   ,17514   ,21672   ,\n    24875   ,25346   ,23697   ,19476   ,11630   ,2390    ,-1963   ,1255    ,6635    ,8733    ,5346    ,-1698   ,-9056   ,-14371  ,-15588  ,\n    -11825  ,-5840   ,-1244   ,-176    ,-2457   ,-5509   ,-8084   ,-9093   ,-7720   ,-5312   ,-3500   ,-2360   ,-2467   ,-4377   ,-6601   ,\n    -6702   ,-3742   ,-556    ,373     ,-2108   ,-8853   ,-16651  ,-20728  ,-20287  ,-18032  ,-17320  ,-18663  ,-21549  ,-24998  ,-26024  ,\n    -23560  ,-19098  ,-14356  ,-10560  ,-8020   ,-5910   ,-4279   ,-1757   ,1184    ,4221    ,6197    ,5763    ,3787    ,2345    ,3117    ,\n    7633    ,14724   ,21527   ,25886   ,27325   ,27542   ,28195   ,29883   ,31745   ,32765   ,32651   ,31230   ,28158   ,23693   ,19243   ,\n    15761   ,13004   ,10897   ,10134   ,10853   ,12568   ,14080   ,15543   ,17033   ,18205   ,18119   ,16663   ,14109   ,10792   ,7072    ,\n    3806    ,1513    ,26      ,-1149   ,-1979   ,-1995   ,-1459   ,-755    ,-38     ,497     ,77      ,-2224   ,-5759   ,-8696   ,-10055  ,\n    -10094  ,-10052  ,-10707  ,-12130  ,-14598  ,-18118  ,-21909  ,-24598  ,-25301  ,-23911  ,-21594  ,-19179  ,-17092  ,-15839  ,-15401  ,\n    -15784  ,-16133  ,-15646  ,-13946  ,-11162  ,-7970   ,-6192   ,-6636   ,-8317   ,-9491   ,-10128  ,-11572  ,-13616  ,-15582  ,-16653  ,\n    -16366  ,-15093  ,-13954  ,-14569  ,-17020  ,-19078  ,-19658  ,-18851  ,-17703  ,-17566  ,-18581  ,-19724  ,-20141  ,-20605  ,-21611  ,\n    -22567  ,-22288  ,-22169  ,-22982  ,-23725  ,-23525  ,-22790  ,-22105  ,-21356  ,-20491  ,-20504  ,-21941  ,-24682  ,-28145  ,-30219  ,\n    -30535  ,-29911  ,-29576  ,-29878  ,-30659  ,-31548  ,-32491  ,-32765  ,-32163  ,-30964  ,-29833  ,-28821  ,-26766  ,-22984  ,-18143  ,\n    -14778  ,-13671  ,-13696  ,-13228  ,-12207  ,-11808  ,-12046  ,-12362  ,-12936  ,-12592  ,-10373  ,-6832   ,-4451   ,-4312   ,-4132   ,\n    -2578   ,-170    ,2648    ,5272    ,6812    ,7125    ,7276    ,7945    ,7921    ,6296    ,4321    ,2374    ,260     ,-1017   ,-273    ,\n    1457    ,3263    ,4733    ,5661    ,4302    ,541     ,-3436   ,-6303   ,-8942   ,-11514  ,-13223  ,-13563  ,-13966  ,-15192  ,-16135  ,\n    -15803  ,-13751  ,-11106  ,-9579   ,-10476  ,-12392  ,-12940  ,-11578  ,-9778   ,-8259   ,-6187   ,-3853   ,-2330   ,-2244   ,-2257   ,\n    -2148   ,-2653   ,-2458   ,-616    ,1613    ,2744    ,3260    ,5237    ,7942    ,8735    ,7509    ,6426    ,7196    ,9772    ,12942   ,\n    15688   ,18242   ,20812   ,22503   ,22141   ,20446   ,19647   ,20465   ,21638   ,22188   ,22391   ,22355   ,20710   ,15925   ,8244    ,\n    -535    ,-7892   ,-13370  ,-17303  ,-20127  ,-21944  ,-22662  ,-21949  ,-19693  ,-17111  ,-15170  ,-13128  ,-10022  ,-6481   ,-4362   ,\n    -4844   ,-7920   ,-12758  ,-18027  ,-22109  ,-23665  ,-21570  ,-17074  ,-12701  ,-10233  ,-9145   ,-8465   ,-8060   ,-7757   ,-7480   ,\n    -7754   ,-8548   ,-8975   ,-8327   ,-7300   ,-6830   ,-5884   ,4328    ,5175    ,6400    ,8340    ,11204   ,14741   ,17500   ,18514   ,\n    18250   ,18834   ,21195   ,24460   ,27198   ,28585   ,28389   ,27098   ,25858   ,25561   ,26557   ,28543   ,30338   ,29783   ,25671   ,\n    19512   ,13495   ,8866    ,6820    ,7533    ,10847   ,15853   ,20905   ,23725   ,24124   ,23577   ,24111   ,25878   ,28365   ,31071   ,\n    32765   ,32498   ,31336   ,30421   ,28846   ,25972   ,23108   ,22449   ,23826   ,24911   ,24745   ,23667   ,22015   ,20274   ,19373   ,\n    19966   ,20663   ,19306   ,15894   ,11812   ,7669    ,3010    ,-1174   ,-3942   ,-4999   ,-4917   ,-4358   ,-3948   ,-4684   ,-6674   ,\n    -8133   ,-8634   ,-8228   ,-7157   ,-5218   ,-2931   ,-1665   ,-2936   ,-5920   ,-8811   ,-10654  ,-11588  ,-11836  ,-11157  ,-9845   ,\n    -8954   ,-8954   ,-9333   ,-9600   ,-9002   ,-7406   ,-5696   ,-5140   ,-5967   ,-7061   ,-7560   ,-7899   ,-8738   ,-10390  ,-12222  ,\n    -13827  ,-15397  ,-17282  ,-19233  ,-20394  ,-20310  ,-19114  ,-17931  ,-17197  ,-17232  ,-17833  ,-18682  ,-19440  ,-20252  ,-20889  ,\n    -20684  ,-19393  ,-17484  ,-15266  ,-13257  ,-11959  ,-11314  ,-10489  ,-9049   ,-8096   ,-7257   ,-4818   ,-867    ,2162    ,3761    ,\n    4941    ,5876    ,4945    ,2978    ,1194    ,143     ,-265    ,-99     ,81      ,-31     ,-769    ,-1818   ,-2323   ,-1885   ,-2005   ,\n    -2893   ,-3504   ,-2872   ,-2108   ,-2319   ,-2878   ,-3033   ,-2709   ,-1358   ,1455    ,4861    ,6609    ,6009    ,4505    ,3681    ,\n    4684    ,6463    ,7772    ,8143    ,8206    ,8340    ,8321    ,8223    ,9245    ,11103   ,12202   ,12042   ,11994   ,13096   ,13800   ,\n    12655   ,10079   ,7150    ,4049    ,1299    ,-57     ,166     ,349     ,464     ,1278    ,2783    ,4250    ,5473    ,6579    ,7276    ,\n    7262    ,6943    ,6248    ,4520    ,2580    ,1851    ,3378    ,6375    ,9061    ,10640   ,11054   ,10429   ,9461    ,8722    ,8490    ,\n    8950    ,10859   ,14187   ,17799   ,20123   ,20937   ,21237   ,21301   ,21098   ,20773   ,20835   ,21576   ,23256   ,25570   ,27779   ,\n    28868   ,28365   ,26586   ,24968   ,24097   ,23649   ,21795   ,17253   ,9995    ,1694    ,-4734   ,-8132   ,-9394   ,-9406   ,-8150   ,\n    -6308   ,-4918   ,-5050   ,-7031   ,-10462  ,-14188  ,-16851  ,-18007  ,-19441  ,-22587  ,-27195  ,-31187  ,-32765  ,-31773  ,-28178  ,\n    -21954  ,-14267  ,-7792   ,-3851   ,-1850   ,-102    ,1666    ,3075    ,4720    ,-2190   ,-8106   ,-2074   ,5145    ,6154    ,5762    ,\n    8391    ,8844    ,-634    ,-11047  ,-9913   ,-6413   ,-6232   ,-5882   ,653     ,6118    ,689     ,-7002   ,-8522   ,-7565   ,-5847   ,\n    -3616   ,-2268   ,-1515   ,-3008   ,-5342   ,-9672   ,-12069  ,-4572   ,5116    ,6652    ,4207    ,-1367   ,-6700   ,-3560   ,796     ,\n    -4620   ,-11803  ,-8126   ,-921    ,2775    ,4585    ,1856    ,-1605   ,1345    ,6280    ,8119    ,9367    ,14042   ,17323   ,2903    ,\n    -15977  ,-15823  ,-8255   ,-3916   ,-1735   ,-5437   ,-9224   ,-6401   ,-2057   ,1719    ,3541    ,-1042   ,-6207   ,-6209   ,-5950   ,\n    -10146  ,-14331  ,-12809  ,-9468   ,-5233   ,-908    ,4081    ,8513    ,10593   ,11504   ,9025    ,5336    ,78      ,-4075   ,1532    ,\n    9344    ,11502   ,11221   ,3774    ,-3550   ,-2830   ,379     ,216     ,459     ,5915    ,11473   ,4723    ,-3585   ,707     ,8048    ,\n    5904    ,488     ,-4486   ,-8963   ,-10018  ,-8999   ,-5406   ,-1609   ,-2015   ,-4035   ,-5017   ,-5617   ,-4900   ,-3205   ,612     ,\n    3957    ,-1001   ,-5936   ,5805    ,17725   ,13002   ,5449    ,2211    ,925     ,2726    ,5343    ,5698    ,5750    ,6353    ,7173    ,\n    8271    ,9984    ,13442   ,17056   ,19863   ,23435   ,28617   ,32765   ,17977   ,2341    ,-21     ,-211    ,-17175  ,-32765  ,-30184  ,\n    -23878  ,-21315  ,-19888  ,-16097  ,-13178  ,-11562  ,-10969  ,-10063  ,-9629   ,-9110   ,-8582   ,-6026   ,-3855   ,-6191   ,-10790  ,\n    -17111  ,-21878  ,-9966   ,3200    ,-673    ,-8552   ,-5529   ,140     ,1995    ,2563    ,2315    ,1406    ,215     ,-489    ,3288    ,\n    7886    ,8913    ,8285    ,4116    ,-1319   ,-5652   ,-8166   ,-2981   ,3386    ,-2932   ,-12073  ,-8379   ,-725    ,146     ,-833    ,\n    1428    ,3598    ,-2820   ,-11849  ,-13024  ,-9825   ,-2499   ,2579    ,-1673   ,-7979   ,-11489  ,-13588  ,-12825  ,-10983  ,-6182   ,\n    -1045   ,3790    ,7940    ,10972   ,12158   ,8634    ,4488    ,4668    ,4869    ,-52     ,-5084   ,-2506   ,2353    ,6186    ,8818    ,\n    5300    ,1200    ,3903    ,8949    ,14430   ,16018   ,256     ,-17904  ,-16748  ,-9535   ,-8024   ,-7746   ,-3682   ,48      ,-2615   ,\n    -6712   ,-4860   ,-391    ,5338    ,9917    ,4826    ,-2344   ,514     ,5560    ,1032    ,-6370   ,-8029   ,-6531   ,1553    ,10762   ,\n    9298    ,3819    ,1344    ,181     ,926     ,2600    ,5122    ,6964    ,6898    ,-31566  ,-31267  ,-8046   ,29782   ,26236   ,20602   ,\n    23845   ,21780   ,-15294  ,-30074  ,-8789   ,22187   ,26476   ,26553   ,20904   ,13736   ,5774    ,2845    ,9045    ,20972   ,32766   ,\n    30516   ,19262   ,-20354  ,-26707  ,-21265  ,6300    ,25196   ,6879    ,-7502   ,24681   ,31174   ,30744   ,10938   ,-8093   ,-16209  ,\n    -791    ,12935   ,-5154   ,-23803  ,-29653  ,-32714  ,-10508  ,9614    ,-20613  ,30910   ,32270   ,26462   ,10543   ,3486    ,23752   ,\n    31685   ,24994   ,9557    ,-12658  ,-19641  ,2487    ,21334   ,19331   ,22327   ,32760   ,24131   ,26693   ,31330   ,31501   ,21534   ,\n    -3988   ,-23312  ,-31602  ,-32758  ,-31491  ,-23272  ,4266    ,21413   ,-9585   ,-31706  ,-31450  ,-31465  ,-19322  ,10601   ,5094    ,\n    -4287   ,285     ,-2685   ,-30163  ,-30794  ,-20145  ,10256   ,-18281  ,-32766  ,-30560  ,-16632  ,8525    ,27180   ,31043   ,30638   ,\n    20031   ,6250    ,10282   ,18420   ,23245   ,26683   ,25810   ,21182   ,923     ,-10908  ,21699   ,30953   ,-25880  ,-20051  ,-32442  ,\n    -23805  ,-11361  ,-4022   ,-13581  ,-21530  ,-22514  ,-22732  ,-25089  ,-26843  ,-29722  ,-32281  ,-28807  ,-14800  ,10315   ,32059   ,\n    17851   ,32707   ,31127   ,-28227  ,-27459  ,-31768  ,31468   ,-18232  ,-11830  ,9041    ,10618   ,15689   ,27623   ,32167   ,32762   ,\n    32675   ,32250   ,31911   ,31661   ,30578   ,21658   ,12868   ,23233   ,32661   ,5911    ,-20245  ,32435   ,-5765   ,19997   ,32738   ,\n    27314   ,9371    ,-224    ,-4949   ,-5310   ,-1688   ,5388    ,7612    ,-14879  ,-29835  ,-32571  ,-32650  ,-25523  ,-4752   ,18611   ,\n    27239   ,-388    ,-22727  ,15376   ,32431   ,27075   ,1727    ,595     ,992     ,-16447  ,-24359  ,10050   ,32762   ,31579   ,32391   ,\n    6786    ,-13494  ,8176    ,29031   ,32314   ,26557   ,24932   ,27689   ,32524   ,22768   ,-255    ,-20668  ,-31916  ,-32742  ,-29449  ,\n    -20380  ,-24849  ,-23726  ,2456    ,22985   ,11471   ,-7629   ,-26107  ,-31558  ,-20616  ,-6979   ,-22055  ,-32765  ,-6817   ,2134    ,\n    -10268  ,26990   ,31105   ,30444   ,30616   ,30183   ,14938   ,1335    ,18167   ,30064   ,24910   ,8566    ,-22998  ,-32509  ,-16655  ,\n    9965    ,-12044  ,-27352  ,-4060   ,25773   ,31354   ,29941   ,-8000   ,-32737  ,-30968  ,-18751  ,-9068   ,-3068   ,-6333   ,-14013  ,\n    -25364  ,-30708  ,-31748  ,-27399  ,8279    ,27823   ,346     ,-24836  ,-27703  ,-29768  ,21270   ,22734   ,24025   ,25575   ,28419   ,\n    31278   ,32706   ,32531   ,30941   ,29222   ,28463   ,28402   ,28396   ,28424   ,29132   ,30089   ,30731   ,31065   ,31454   ,31921   ,\n    32428   ,32763   ,32765   ,32677   ,32552   ,32156   ,31698   ,31249   ,30992   ,30833   ,30666   ,30441   ,30276   ,29884   ,29426   ,\n    29005   ,28447   ,27915   ,27504   ,27399   ,27444   ,27486   ,27285   ,27145   ,26969   ,26795   ,26485   ,26804   ,27506   ,26678   ,\n    25709   ,27031   ,27474   ,25761   ,24761   ,24682   ,24920   ,25176   ,25163   ,24714   ,24500   ,24323   ,24020   ,23951   ,24415   ,\n    25223   ,25848   ,26106   ,26474   ,26911   ,26729   ,26152   ,25793   ,25840   ,25878   ,25951   ,26575   ,27070   ,26650   ,25807   ,\n    25751   ,25849   ,25238   ,25173   ,26629   ,27860   ,28552   ,29634   ,30259   ,29773   ,28884   ,28391   ,28497   ,29219   ,29794   ,\n    29760   ,29015   ,28106   ,27293   ,26858   ,26174   ,25376   ,25620   ,26910   ,28339   ,29347   ,29960   ,30348   ,30746   ,30600   ,\n    29928   ,29039   ,28440   ,27857   ,27571   ,27820   ,28270   ,27764   ,26335   ,25285   ,25276   ,25517   ,24617   ,22098   ,17643   ,\n    11048   ,3006    ,-5268   ,-12606  ,-18541  ,-20996  ,-16115  ,-8529   ,-5553   ,-7526   ,-11263  ,-13629  ,-17246  ,-23436  ,-28871  ,\n    -32014  ,-32475  ,-30503  ,-28654  ,-28121  ,-27724  ,-27102  ,-27174  ,-28115  ,-29165  ,-30451  ,-31671  ,-32584  ,-32765  ,-31885  ,\n    -29374  ,-25340  ,-19842  ,-14007  ,-8684   ,-4355   ,-1913   ,-4181   ,-8488   ,-10053  ,-9115   ,-6566   ,-4053   ,-1405   ,2171    ,\n    5331    ,7744    ,8667    ,6898    ,5129    ,6075    ,7348    ,7581    ,7657    ,8787    ,10872   ,12626   ,13194   ,13920   ,14801   ,\n    14248   ,12266   ,10271   ,8701    ,6991    ,5407    ,5099    ,6686    ,8317    ,8712    ,8043    ,7317    ,6371    ,4890    ,3121    ,\n    1848    ,1396    ,1645    ,2575    ,3443    ,3674    ,3448    ,3491    ,3291    ,2329    ,936     ,-141    ,-101    ,401     ,279     ,\n    -464    ,-173    ,1057    ,2046    ,2702    ,3193    ,2983    ,2379    ,2113    ,1910    ,1314    ,795     ,971     ,1865    ,2573    ,\n    2504    ,2380    ,2060    ,1323    ,212     ,-589    ,-1205   ,-1440   ,-1251   ,-596    ,231     ,990     ,1394    ,1610    ,1771    ,\n    2604    ,4607    ,8604    ,12831   ,17741   ,23138   ,27524   ,30684   ,28802   ,23903   ,21178   ,660     ,10845   ,8228    ,1292    ,\n    179     ,1036    ,1718    ,1944    ,1700    ,1480    ,2953    ,9990    ,20291   ,19795   ,14906   ,14262   ,19783   ,32765   ,26989   ,\n    17995   ,17603   ,16020   ,15730   ,16051   ,15780   ,14453   ,12505   ,11334   ,11748   ,11654   ,4392    ,-3156   ,-699    ,2530    ,\n    1253    ,354     ,-1011   ,-9545   ,-20789  ,-10855  ,-5420   ,-6921   ,-6696   ,-8815   ,-11937  ,-13449  ,-13175  ,-12328  ,-12180  ,\n    -13269  ,-15813  ,-19402  ,-19856  ,-15482  ,-12309  ,-11865  ,-10605  ,-186    ,12056   ,2955    ,-44     ,991     ,-487    ,-1173   ,\n    -497    ,779     ,1303    ,-325    ,-2110   ,-1766   ,1262    ,4052    ,3011    ,-1576   ,-7925   ,-13535  ,-12832  ,-7997   ,-5607   ,\n    -4505   ,-2556   ,-356    ,2274    ,1579    ,-121    ,-367    ,97      ,-598    ,-3200   ,-6210   ,-7973   ,-8481   ,-8313   ,-7340   ,\n    -4145   ,1528    ,6265    ,6634    ,3062    ,643     ,4714    ,11733   ,18205   ,22509   ,5824    ,-3157   ,12019   ,21380   ,26522   ,\n    24212   ,15853   ,16575   ,21736   ,22314   ,24127   ,29503   ,28779   ,28206   ,28709   ,24867   ,23191   ,22717   ,20938   ,19583   ,\n    18192   ,7739    ,5029    ,10979   ,256     ,-10141  ,-17029  ,-18364  ,-14593  ,-10055  ,-8297   ,-9436   ,-11713  ,-13476  ,-14491  ,\n    -15356  ,-15771  ,-11187  ,-975    ,1067    ,-2402   ,2057    ,18987   ,24618   ,19621   ,18387   ,10040   ,1187    ,-3422   ,-2763   ,\n    -3688   ,-9033   ,-7073   ,-1583   ,-934    ,-725    ,-14     ,363     ,-150    ,-1390   ,-3391   ,-6175   ,-14287  ,-28228  ,-23813  ,\n    -23195  ,-32765  ,-28629  ,-24252  ,-22670  ,-21587  ,-22237  ,-21912  ,-20430  ,-19075  ,-19432  ,-21805  ,-24951  ,-26605  ,-25575  ,\n    -22881  ,-19596  ,-11245  ,-137    ,-8676   ,-12525  ,-10209  ,-8844   ,-436    ,6386    ,2222    ,29      ,1052    ,1162    ,2220    ,\n    9786    ,15231   ,13411   ,12128   ,12041   ,10444   ,8155    ,6336    ,5277    ,5700    ,7047    ,6175    ,3524    ,1217    ,1693    ,\n    2612    ,3579    ,4140    ,3948    ,3305    ,2509    ,1774    ,1164    ,846     ,1054    ,2280    ,3884    ,5140    ,4934    ,-1276   ,\n    -15564  ,-23990  ,-17612  ,-1689   ,-378    ,-6460   ,4355    ,206     ,-4136   ,-1255   ,-504    ,-36     ,898     ,1963    ,2977    ,\n    3411    ,2961    ,2368    ,2067    ,2146    ,2362    ,1788    ,-3388   ,-18705  ,-13622  ,-4476   ,-5193   ,-871    ,-568    ,9191    ,\n    17174   ,13153   ,8606    ,19390   ,28916   ,20582   ,18317   ,18358   ,18242   ,17869   ,17505   ,15616   ,4013    ,-5924   ,1171    ,\n    4155    ,2393    ,1989    ,400     ,366     ,-13737  ,-20800  ,-10559  ,-12855  ,-10472  ,-14012  ,-13364  ,-27939  ,-32571  ,-28515  ,\n    -24454  ,-24310  ,-23383  ,-26084  ,-23474  ,-26253  ,-22561  ,-25650  ,-4606   ,-4113   ,-16868  ,-13178  ,-14655  ,-13294  ,-13777  ,\n    -13256  ,-12423  ,-12186  ,-11092  ,-8272   ,6693    ,9032    ,770     ,-1650   ,-687    ,-14751  ,-11451  ,12357   ,12655   ,9342    ,\n    6098    ,7993    ,7415    ,8643    ,8201    ,9062    ,8749    ,8824    ,8776    ,9565    ,9383    ,9697    ,9791    ,9813    ,10221   ,\n    9805    ,10522   ,9547    ,8254    ,-6450   ,-2467   ,3839    ,-1740   ,1106    ,-1144   ,374     ,-7878   ,-24354  ,-32765  ,-26158  ,\n    -24384  ,-24471  ,-13592  ,2229    ,-9301   ,-9126   ,7320    ,3590    ,-3199   ,478     ,-2155   ,366     ,-1406   ,486     ,-1014   ,\n    628     ,-772    ,768     ,-591    ,830     ,-373    ,793     ,-66     ,-5251   ,-14773  ,7094    ,9524    ,620     ,2069    ,1616    ,\n    2052    ,2002    ,1807    ,2158    ,2131    ,10171   ,21266   ,17840   ,12344   ,11777   ,18656   ,32765   ,24937   ,19177   ,20541   ,\n    19661   ,19583   ,19015   ,18542   ,18063   ,16940   ,15898   ,14995   ,12954   ,2155    ,-9318   ,-1813   ,-8718   ,-22933  ,-14187  ,\n    -11960  ,-13039  ,-14143  ,-13770  ,-14952  ,-14415  ,-15115  ,-14330  ,-15953  ,-14838  ,-16547  ,-15092  ,-17037  ,-14839  ,-17584  ,\n    -5284   ,-4177   ,-10942  ,-8340   ,-9029   ,-8115   ,-7881   ,-3612   ,-257    ,-3294   ,-3622   ,-4024   ,-3440   ,-5016   ,-4011   ,\n    -5617   ,-4888   ,-17349  ,-17423  ,-7456   ,-9836   ,-7987   ,-9095   ,-8073   ,-13508  ,-14613  ,-12745  ,-11034  ,-11635  ,-11354  ,\n    -10763  ,-4915   ,-3240   ,-3651   ,-3272   ,-3118   ,-2986   ,-2754   ,-2702   ,-2487   ,-2450   ,-2265   ,-2247   ,-2089   ,-2103   ,\n    -1939   ,-1964   ,-1829   ,-1846   ,-1729   ,-1759   ,-1644   ,-1669   ,-1585   ,-1607   ,-1526   ,-1558   ,-1496   ,-1513   ,-1452   ,\n    -1478   ,-1424   ,-1443   ,-1403   ,-1418   ,-1382   ,-1389   ,-1368   ,-1353   ,-1349   ,-1337   ,-1327   ,-1311   ,-1331   ,-1284   ,\n    -1318   ,-1265   ,-1324   ,-1248   ,-1328   ,-1219   ,-1345   ,-1194   ,-1380   ,-1150   ,-1429   ,-1075   ,-1540   ,8055    ,7772    ,\n    7270    ,6084    ,3973    ,693     ,-2497   ,-4449   ,-4378   ,-2707   ,-137    ,2957    ,5805    ,8651    ,11070   ,12667   ,13117   ,\n    12371   ,10212   ,7308    ,5290    ,4827    ,5934    ,8377    ,11691   ,14441   ,17167   ,19523   ,20954   ,22613   ,23766   ,23658   ,\n    22364   ,20270   ,17810   ,15666   ,14232   ,13645   ,13597   ,13852   ,13132   ,11383   ,9579    ,7366    ,5779    ,5117    ,4488    ,\n    3414    ,1879    ,444     ,169     ,570     ,1307    ,1058    ,-667    ,-2783   ,-4757   ,-6093   ,-6538   ,-5851   ,-5284   ,-5548   ,\n    -6359   ,-7109   ,-7150   ,-6716   ,-6024   ,-4708   ,-3043   ,-1960   ,-1501   ,-1517   ,-1064   ,543     ,3110    ,4964    ,5778    ,\n    5691    ,4742    ,5287    ,6962    ,9486    ,11418   ,11481   ,9963    ,7902    ,5413    ,3102    ,1764    ,506     ,-1193   ,-2314   ,\n    -1633   ,1351    ,5705    ,9972    ,13283   ,13552   ,11800   ,10049   ,8076    ,6443    ,4878    ,4035    ,4967    ,6565    ,6764    ,\n    5827    ,6169    ,9706    ,17217   ,24490   ,27281   ,25465   ,22002   ,20729   ,21547   ,21769   ,19898   ,17121   ,15686   ,16512   ,\n    18886   ,22917   ,27382   ,30958   ,32206   ,29789   ,24805   ,20963   ,20872   ,24231   ,28915   ,32197   ,32765   ,31520   ,28745   ,\n    24912   ,17867   ,6172    ,-8541   ,-21721  ,-30094  ,-32765  ,-30825  ,-26712  ,-22568  ,-17943  ,-12146  ,-6441   ,-3442   ,-4651   ,\n    -9018   ,-13640  ,-15242  ,-12240  ,-5616   ,4002    ,13730   ,19796   ,18950   ,11573   ,2240    ,-4792   ,-8077   ,-9144   ,-11040  ,\n    -12955  ,-12698  ,-8429   ,-1841   ,3980    ,6462    ,5636    ,2724    ,-376    ,-2717   ,-5456   ,-8298   ,-10594  ,-13400  ,-16849  ,\n    -20732  ,-23605  ,-24318  ,-21686  ,-17048  ,-12428  ,-8970   ,-7818   ,-8748   ,-10768  ,-12489  ,-13507  ,-14320  ,-15355  ,-15408  ,\n    -14636  ,-13201  ,-10746  ,-7907   ,-4750   ,-2388   ,-344    ,1686    ,4269    ,7104    ,9393    ,11611   ,12838   ,13462   ,13855   ,\n    13959   ,14630   ,15191   ,15733   ,15587   ,14543   ,13129   ,11427   ,9685    ,8840    ,8956    ,9058    ,9167    ,8620    ,8020    ,\n    8170    ,8956    ,10289   ,10624   ,9821    ,9139    ,8586    ,8620    ,10178   ,12447   ,14554   ,15467   ,13805   ,10785   ,6696    ,\n    2472    ,-487    ,-2066   ,-2497   ,-1928   ,123     ,3338    ,6420    ,8795    ,10983   ,11786   ,11214   ,9706    ,8505    ,-7485   ,\n    -5558   ,-3734   ,-2038   ,-547    ,698     ,1738    ,2563    ,3264    ,3821    ,4402    ,4979    ,5660    ,6374    ,7224    ,8095    ,\n    9036    ,9953    ,10898   ,11838   ,12820   ,13867   ,15045   ,16374   ,17836   ,19450   ,21150   ,22939   ,24709   ,26482   ,28100   ,\n    29598   ,30831   ,31852   ,32490   ,32765   ,32631   ,32045   ,30934   ,29318   ,27224   ,24677   ,21706   ,18365   ,14801   ,11020   ,\n    7290    ,3608    ,171     ,-3073   ,-5961   ,-8495   ,-10682  ,-12539  ,-14021  ,-15080  ,-15789  ,-16099  ,-16043  ,-15576  ,-14849  ,\n    -13871  ,-12765  ,-11510  ,-10276  ,-9039   ,-7892   ,-6824   ,-5896   ,-5119   ,-4546   ,-4236   ,-4179   ,-4402   ,-4857   ,-5597   ,\n    -6480   ,-7531   ,-8637   ,-9821   ,-10950  ,-12048  ,-13043  ,-13946  ,-14650  ,-15214  ,-15601  ,-15818  ,-15827  ,-15596  ,-15153  ,\n    -14402  ,-13354  ,-11997  ,-10414  ,-8594   ,-6686   ,-4732   ,-2876   ,-1120   ,352     ,1564    ,2468    ,3097    ,3416    ,3479    ,\n    3353    ,3061    ,2655    ,2114    ,1533    ,870     ,202     ,-524    ,-1262   ,-1995   ,-2686   ,-3347   ,-3922   ,-4423   ,-4809   ,\n    -5063   ,-5232   ,-5295   ,-5319   ,-5268   ,-5262   ,-5262   ,-5382   ,-5597   ,-5982   ,-6520   ,-7265   ,-8219   ,-9409   ,-10789  ,\n    -12346  ,-14074  ,-15897  ,-17770  ,-19628  ,-21451  ,-23113  ,-24654  ,-26003  ,-27182  ,-28116  ,-28876  ,-29413  ,-29779  ,-29892  ,\n    -29792  ,-29481  ,-28921  ,-28111  ,-27074  ,-25867  ,-24492  ,-23088  ,-21662  ,-20356  ,-19156  ,-18258  ,-17591  ,-17228  ,-17141  ,\n    -17428  ,-18002  ,-18851  ,-19943  ,-21247  ,-22749  ,-24321  ,-25948  ,-27521  ,-29039  ,-30359  ,-31464  ,-32238  ,-32692  ,-32765  ,\n    -32480  ,-31803  ,-30738  ,-29353  ,-27668  ,-25687  ,-23383  ,-20873  ,-18165  ,-15380  ,-12521  ,-9748   ,-7105   ,-4750   ,-2643   ,\n    -824    ,667     ,1790    ,2574    ,3027    ,3125    ,2919    ,2378    ,1594    ,537     ,-664    ,-2076   ,-3525   ,-5059   ,-6551   ,\n    -8013   ,-9384   ,-10665  ,-11807  ,-12830  ,-13729  ,-14477  ,-15067  ,-15456  ,-15657  ,-15609  ,-15394  ,-14944  ,-14407  ,-13748  ,\n    -13096  ,-12460  ,-11956  ,-11594  ,-11407  ,-11409  ,-11626  ,-12067  ,-12667  ,-13451  ,-14311  ,-15289  ,-16248  ,-17218  ,-18058  ,\n    -18777  ,-19314  ,-19711  ,-19858  ,-19832  ,-19621  ,-19249  ,-18708  ,-17935  ,-17004  ,-15833  ,-14496  ,-12914  ,-11207  ,-9361   ,\n    -1827   ,1003    ,3006    ,4165    ,4429    ,3714    ,2224    ,175     ,-2216   ,-4672   ,-6848   ,-8614   ,-9840   ,-10474  ,-10554  ,\n    -10176  ,-9247   ,-7720   ,-5611   ,-3167   ,-517    ,2085    ,4495    ,6614    ,8363    ,9653    ,10274   ,10215   ,9340    ,7732    ,\n    5541    ,3341    ,1511    ,539     ,775     ,2051    ,4106    ,6595    ,9108    ,11333   ,13108   ,14364   ,15053   ,15268   ,15169   ,\n    14834   ,14381   ,13878   ,13369   ,12771   ,12005   ,10994   ,9853    ,8691    ,7732    ,7244    ,7321    ,7920    ,8881    ,10027   ,\n    11158   ,12190   ,12954   ,13332   ,13191   ,12450   ,11064   ,9169    ,7146    ,5419    ,4261    ,3968    ,4400    ,5345    ,6535    ,\n    7777    ,9010    ,10268   ,11615   ,13002   ,14339   ,15449   ,16221   ,16551   ,16551   ,16320   ,15942   ,15405   ,14705   ,13883   ,\n    13008   ,12260   ,11901   ,12090   ,12824   ,14049   ,15548   ,17118   ,18553   ,19849   ,20927   ,21807   ,22436   ,22739   ,22639   ,\n    22147   ,21461   ,20804   ,20458   ,20577   ,21176   ,22144   ,23397   ,24747   ,26135   ,27528   ,28963   ,30335   ,31562   ,32452   ,\n    32765   ,32196   ,30611   ,27848   ,23761   ,18220   ,11590   ,4325    ,-2990   ,-9331   ,-14142  ,-16942  ,-17666  ,-16264  ,-13556  ,\n    -10127  ,-6501   ,-3098   ,-78     ,2531    ,4775    ,6669    ,8236    ,9412    ,10169   ,10268   ,9547    ,7901    ,5319    ,1786    ,\n    -2324   ,-6540   ,-10376  ,-13427  ,-15455  ,-16631  ,-17263  ,-17649  ,-18127  ,-18718  ,-19389  ,-20018  ,-20521  ,-20884  ,-21176  ,\n    -21415  ,-21673  ,-21865  ,-21877  ,-21631  ,-21029  ,-20109  ,-18891  ,-17460  ,-15807  ,-14025  ,-12201  ,-10538  ,-9244   ,-8637   ,\n    -8771   ,-9696   ,-11309  ,-13429  ,-15789  ,-18263  ,-20779  ,-23271  ,-25708  ,-28062  ,-30270  ,-31919  ,-32765  ,-32635  ,-31505  ,\n    -29351  ,-26636  ,-23624  ,-20697  ,-18245  ,-16434  ,-15295  ,-14801  ,-14850  ,-15193  ,-15695  ,-16231  ,-16838  ,-17526  ,-18374  ,\n    -19360  ,-20475  ,-21555  ,-22483  ,-23058  ,-23191  ,-22757  ,-21904  ,-20757  ,-19528  ,-18424  ,-17649  ,-17372  ,-17638  ,-18486  ,\n    -19646  ,-20891  ,-21918  ,-22464  ,-22439  ,-21935  ,-21063  ,-20073  ,-19141  ,-18399  ,-17870  ,-17526  ,-17343  ,-17301  ,-17428  ,\n    -17709  ,-18201  ,-18812  ,-19504  ,-20195  ,-20876  ,-21434  ,-21834  ,-21882  ,-21372  ,-20189  ,-18235  ,-15513  ,-12111  ,-8428   ,\n    -4768   ,-5562   ,-4649   ,-3902   ,-3472   ,-3368   ,-3671   ,-4204   ,-4885   ,-5574   ,-6279   ,-7042   ,-7831   ,-8601   ,-9245   ,\n    -9641   ,-9652   ,-9352   ,-8752   ,-8080   ,-7362   ,-6614   ,-5639   ,-4366   ,-2655   ,-616    ,1643    ,3924    ,6029    ,7978    ,\n    9797    ,11634   ,13410   ,15213   ,16845   ,18192   ,19088   ,19621   ,19727   ,19492   ,18918   ,18004   ,16678   ,15006   ,13188   ,\n    11385   ,9814    ,8507    ,7514    ,6662    ,5860    ,5082    ,4572    ,4378    ,4666    ,5362    ,6404    ,7533    ,8598    ,9517    ,\n    10305   ,11088   ,11768   ,12265   ,12440   ,12396   ,12108   ,11770   ,11468   ,11348   ,11312   ,11256   ,11018   ,10692   ,10295   ,\n    9999    ,10021   ,10444   ,11132   ,11921   ,12678   ,13204   ,13624   ,13933   ,14368   ,14861   ,15490   ,16130   ,16785   ,17409   ,\n    18117   ,18892   ,19729   ,20561   ,21234   ,21769   ,22130   ,22554   ,23114   ,23964   ,25002   ,26187   ,27191   ,27939   ,28362   ,\n    28657   ,28978   ,29478   ,30176   ,31016   ,31827   ,32423   ,32759   ,32765   ,32481   ,31781   ,30630   ,28858   ,26532   ,23732   ,\n    20710   ,17596   ,14539   ,11460   ,8315    ,5020    ,1672    ,-1457   ,-4101   ,-5999   ,-6937   ,-7065   ,-6649   ,-5815   ,-4779   ,\n    -3590   ,-2367   ,-1124   ,-85     ,667     ,998     ,917     ,421     ,-439    ,-1554   ,-3081   ,-5083   ,-7742   ,-10855  ,-14229  ,\n    -17514  ,-20425  ,-22827  ,-24775  ,-26380  ,-27827  ,-29233  ,-30562  ,-31661  ,-32375  ,-32735  ,-32765  ,-32657  ,-32424  ,-32237  ,\n    -32044  ,-31907  ,-31733  ,-31661  ,-31661  ,-31804  ,-32005  ,-32199  ,-32247  ,-32087  ,-31764  ,-31356  ,-31028  ,-30820  ,-30758  ,\n    -30663  ,-30477  ,-30080  ,-29493  ,-28650  ,-27922  ,-27350  ,-27031  ,-26824  ,-26604  ,-26440  ,-26291  ,-26225  ,-26200  ,-26346  ,\n    -26581  ,-26871  ,-27022  ,-27191  ,-27451  ,-28032  ,-28770  ,-29553  ,-30189  ,-30511  ,-30450  ,-30067  ,-29541  ,-28978  ,-28496  ,\n    -27957  ,-27310  ,-26447  ,-25418  ,-24299  ,-23347  ,-22570  ,-22099  ,-21803  ,-21647  ,-21606  ,-21742  ,-22179  ,-22943  ,-23997  ,\n    -25071  ,-26077  ,-26894  ,-27623  ,-28161  ,-28754  ,-29372  ,-30013  ,-30471  ,-30684  ,-30586  ,-30330  ,-29990  ,-29625  ,-29311  ,\n    -28932  ,-28413  ,-27576  ,-26543  ,-25320  ,-24084  ,-22763  ,-21418  ,-19907  ,-18205  ,-16210  ,-14146  ,-12137  ,-10310  ,-8770   ,\n    -7433   ,-6285   ,4508    ,5284    ,5726    ,6062    ,6376    ,6827    ,7428    ,8282    ,9462    ,10691   ,11771   ,12372   ,12405   ,\n    12043   ,11678   ,11520   ,11571   ,11688   ,11849   ,12155   ,12848   ,13636   ,14256   ,14219   ,13522   ,12299   ,10907   ,9628    ,\n    8602    ,8048    ,7742    ,7633    ,7421    ,7377    ,6979    ,6456    ,6053    ,5985    ,6695    ,7870    ,9474    ,11619   ,14119   ,\n    16914   ,19139   ,20536   ,20386   ,19552   ,18358   ,17418   ,17154   ,17461   ,18236   ,19254   ,20329   ,21196   ,21769   ,22112   ,\n    22501   ,23291   ,24539   ,26111   ,27925   ,29888   ,31776   ,32765   ,32758   ,30485   ,27720   ,24888   ,23532   ,23431   ,24743   ,\n    26221   ,27500   ,28301   ,28732   ,28749   ,28373   ,27531   ,26648   ,25917   ,25392   ,24811   ,23836   ,22360   ,20271   ,17456   ,\n    14188   ,10923   ,8099    ,6717    ,6443    ,7384    ,8579    ,9757    ,10421   ,10982   ,11377   ,11575   ,11534   ,11404   ,11523   ,\n    12116   ,13070   ,14134   ,15006   ,15626   ,15737   ,15672   ,15504   ,15503   ,15876   ,16747   ,17850   ,18763   ,19294   ,19084   ,\n    18608   ,17957   ,17098   ,16010   ,14669   ,13469   ,12636   ,12540   ,12831   ,13276   ,13633   ,13693   ,13642   ,13561   ,13575   ,\n    13717   ,14128   ,14862   ,15816   ,16906   ,17921   ,18879   ,19850   ,20484   ,20642   ,20037   ,18900   ,17532   ,16291   ,15023   ,\n    13544   ,11281   ,8259    ,4465    ,288     ,-4040   ,-8345   ,-12420  ,-15823  ,-18519  ,-19834  ,-20534  ,-20643  ,-20411  ,-20172  ,\n    -20121  ,-20458  ,-20841  ,-20946  ,-20218  ,-18719  ,-16634  ,-14553  ,-12716  ,-11318  ,-10139  ,-9008   ,-7849   ,-6716   ,-5444   ,\n    -3810   ,-1737   ,379     ,2133    ,2739    ,2323    ,656     ,-1791   ,-4558   ,-6964   ,-8579   ,-9261   ,-8987   ,-8476   ,-7973   ,\n    -7802   ,-7770   ,-7711   ,-7465   ,-7135   ,-6714   ,-5986   ,-4992   ,-3859   ,-3172   ,-3423   ,-4860   ,-7122   ,-9684   ,-12124  ,\n    -13668  ,-14371  ,-14287  ,-13528  ,-12791  ,-12443  ,-12875  ,-13852  ,-15409  ,-17025  ,-18751  ,-20547  ,-22175  ,-23536  ,-24556  ,\n    -25516  ,-26736  ,-28504  ,-30408  ,-32105  ,-32765  ,-32451  ,-31142  ,-29118  ,-26793  ,-24402  ,-22191  ,-20501  ,-19206  ,-18343  ,\n    -17480  ,-16581  ,-15595  ,-14453  ,-13029  ,-11208  ,-9308   ,-7561   ,-6370   ,-5650   ,-5179   ,-4389   ,-3241   ,-1754   ,-287    ,\n    1040    ,2181    ,3329    ,5319    ,8332    ,10988   ,12926   ,13749   ,13831   ,13104   ,12120   ,11018   ,10382   ,10190   ,10724   ,\n    12213   ,14295   ,17055   ,19681   ,22010   ,23213   ,23643   ,22976   ,21392   ,19322   ,16975   ,14955   ,13346   ,12444   ,11957   ,\n    12028   ,12543   ,13367   ,14541   ,15646   ,16604   ,17201   ,17571   ,17707   ,17786   ,17736   ,17442   ,17025   ,16504   ,15943   ,\n    15377   ,14925   ,14784   ,15078   ,15981   ,17201   ,18657   ,20187   ,21734   ,23219   ,24503   ,25389   ,25730   ,25358   ,24496   ,\n    23344   ,22221   ,21199   ,20364   ,19842   ,19680   ,20082   ,20802   ,21752   ,22843   ,24000   ,25109   ,25941   ,26433   ,26449   ,\n    26255   ,25905   ,25450   ,24910   ,24297   ,23842   ,23649   ,24211   ,25250   ,26770   ,28350   ,29871   ,31133   ,32129   ,32765   ,\n    32626   ,31909   ,30496   ,28645   ,26459   ,23828   ,21089   ,18569   ,16978   ,15688   ,14573   ,13691   ,13285   ,13407   ,14254   ,\n    15629   ,17423   ,19423   ,21305   ,22800   ,23659   ,23865   ,23062   ,21501   ,19287   ,16742   ,14310   ,12287   ,10851   ,9937    ,\n    9833    ,10155   ,10800   ,11479   ,12093   ,12563   ,12784   ,12716   ,12021   ,11095   ,10045   ,9279    ,8900    ,9001    ,9270    ,\n    9557    ,9666    ,9947    ,10532   ,11655   ,12976   ,14344   ,15480   ,16408   ,17059   ,17416   ,17414   ,16967   ,15936   ,14217   ,\n    11970   ,9625    ,7636    ,6832    ,7120    ,8408    ,9961    ,11426   ,12339   ,12794   ,12822   ,12089   ,10444   ,7482    ,3381    ,\n    -1461   ,-6021   ,-9810   ,-12630  ,-14061  ,-14838  ,-15247  ,-15644  ,-16073  ,-16424  ,-16639  ,-16743  ,-17339  ,-18575  ,-20814  ,\n    -23615  ,-26551  ,-28634  ,-29980  ,-30597  ,-30843  ,-30892  ,-30742  ,-30203  ,-29371  ,-28324  ,-27469  ,-26962  ,-27152  ,-27726  ,\n    -28634  ,-29444  ,-30160  ,-30736  ,-31383  ,-32076  ,-32633  ,-32765  ,-32182  ,-30964  ,-29315  ,-27455  ,-25761  ,-24212  ,-22630  ,\n    -20939  ,-19143  ,-17539  ,-16259  ,-15525  ,-15335  ,-15671  ,-16429  ,-17266  ,-17954  ,-18252  ,-18149  ,-17603  ,-16602  ,-15266  ,\n    -13729  ,-12213  ,-10849  ,-9879   ,-9365   ,-9343   ,-9815   ,-10564  ,-11474  ,-12286  ,-12837  ,-12614  ,-11657  ,-9998   ,-7864   ,\n    -5562   ,-3279   ,-1134   ,873     ,2533    ,3848    ,4780    ,4949    ,4591    ,3623    ,2287    ,729     ,-827    ,-2068   ,-2840   ,\n    -2549   ,-1558   ,401     ,3001    ,2393    ,4418    ,6355    ,7960    ,9190    ,9784    ,10091   ,10205   ,10334   ,10767   ,11544   ,\n    12767   ,14381   ,16166   ,17897   ,19364   ,20497   ,21026   ,21211   ,21053   ,20872   ,20884   ,21334   ,22275   ,23688   ,25480   ,\n    27393   ,29153   ,30592   ,31356   ,31574   ,31099   ,30264   ,29278   ,28463   ,27996   ,28014   ,28594   ,29577   ,30761   ,31828   ,\n    32513   ,32765   ,32368   ,31499   ,30270   ,28934   ,27735   ,26828   ,26382   ,26279   ,26562   ,26795   ,26814   ,26436   ,25457   ,\n    24008   ,22206   ,20495   ,19089   ,18388   ,18500   ,19245   ,20971   ,22856   ,24761   ,26205   ,26947   ,26833   ,25913   ,24373   ,\n    22428   ,20565   ,19040   ,17950   ,17850   ,18231   ,19141   ,20202   ,21187   ,21806   ,21958   ,21620   ,20785   ,19865   ,19039   ,\n    18515   ,18588   ,19226   ,20475   ,22021   ,23682   ,25030   ,25985   ,26395   ,26048   ,25268   ,24118   ,22950   ,21899   ,21107   ,\n    20610   ,20246   ,19878   ,19026   ,17664   ,15529   ,12346   ,8421    ,3630    ,-1198   ,-5742   ,-9158   ,-11176  ,-11558  ,-10532  ,\n    -8521   ,-6010   ,-3738   ,-2258   ,-1524   ,-2240   ,-3616   ,-5545   ,-7568   ,-9322   ,-10474  ,-10927  ,-10837  ,-10119  ,-9355   ,\n    -8742   ,-8460   ,-8858   ,-9723   ,-11021  ,-12465  ,-13860  ,-14677  ,-14950  ,-14789  ,-14447  ,-14062  ,-13900  ,-14096  ,-14780  ,\n    -15894  ,-17189  ,-18454  ,-19257  ,-19629  ,-19362  ,-18423  ,-17056  ,-15356  ,-13735  ,-12339  ,-11457  ,-11068  ,-11203  ,-11623  ,\n    -12137  ,-12598  ,-12806  ,-12716  ,-12366  ,-11863  ,-11494  ,-11429  ,-11924  ,-12943  ,-14774  ,-16996  ,-19511  ,-22133  ,-24533  ,\n    -26601  ,-28262  ,-29448  ,-30307  ,-30934  ,-31432  ,-31859  ,-32244  ,-32562  ,-32765  ,-32646  ,-32200  ,-31315  ,-30048  ,-28455  ,\n    -26588  ,-24772  ,-23204  ,-21972  ,-21440  ,-21405  ,-21900  ,-22707  ,-23575  ,-24194  ,-24394  ,-24148  ,-23146  ,-21753  ,-20073  ,\n    -18399  ,-17021  ,-16063  ,-15650  ,-15741  ,-16170  ,-16718  ,-17129  ,-17278  ,-16802  ,-15912  ,-14499  ,-12903  ,-11302  ,-9898   ,\n    -8843   ,-8228   ,-8024   ,-8020   ,-8000   ,-7805   ,-7167   ,-6155   ,-4561   ,-2754   ,-892    ,608     ,1663    ,2093    ,1801    ,\n    941     ,-370    ,-1708   ,-2834   ,-3617   ,-3713   ,-3316   ,-2477   ,-1430   ,-453    ,258     ,517     ,379     ,-304    ,-1079   ,\n    -1793   ,-2227   ,-2046   ,-1274   ,111     ,1996    ,5139    ,7252    ,7218    ,5435    ,3848    ,4665    ,8589    ,14402   ,19702   ,\n    22587   ,23544   ,24135   ,26045   ,29122   ,31865   ,32765   ,31097   ,28118   ,25883   ,25609   ,27175   ,28960   ,29409   ,28510   ,\n    27429   ,27753   ,29227   ,30594   ,30198   ,27041   ,22434   ,18311   ,16293   ,16801   ,17892   ,17837   ,16106   ,13521   ,11779   ,\n    11630   ,12863   ,14148   ,14110   ,12664   ,10915   ,10238   ,11022   ,12341   ,13272   ,13228   ,12501   ,11809   ,11523   ,11671   ,\n    11533   ,10592   ,8719    ,6665    ,5579    ,5863    ,7010    ,8158    ,8283    ,7356    ,5622    ,3611    ,2187    ,1561    ,1376    ,\n    796     ,-584    ,-2286   ,-3427   ,-3586   ,-2563   ,-894    ,675     ,1341    ,886     ,-2      ,-597    ,-840    ,-1261   ,-2147   ,\n    -3276   ,-4032   ,-3842   ,-2228   ,263     ,2697    ,3803    ,3209    ,2067    ,1590    ,2317    ,3610    ,4214    ,3420    ,1468    ,\n    -754    ,-2026   ,-1957   ,-991    ,-513    ,-1322   ,-3063   ,-4486   ,-4553   ,-3519   ,-2418   ,-1941   ,-2009   ,-1914   ,-1047   ,\n    505     ,1986    ,2034    ,216     ,-2905   ,-5750   ,-6852   ,-6326   ,-5284   ,-4798   ,-5357   ,-6283   ,-6764   ,-6258   ,-4869   ,\n    -3791   ,-3823   ,-5170   ,-7141   ,-8903   ,-9938   ,-10349  ,-10164  ,-9631   ,-8818   ,-7714   ,-6306   ,-4774   ,-3556   ,-2954   ,\n    -3186   ,-3961   ,-4734   ,-4892   ,-4114   ,-2234   ,45      ,1958    ,2702    ,2345    ,1959    ,2348    ,3649    ,5077    ,5645    ,\n    4986    ,3692    ,3350    ,5047    ,8423    ,12035   ,13873   ,13800   ,12630   ,11537   ,11084   ,10721   ,9486    ,7032    ,4545    ,\n    4164    ,6886    ,11676   ,16158   ,17924   ,16933   ,14552   ,12808   ,12673   ,12882   ,11538   ,7579    ,1937    ,-2741   ,-4758   ,\n    -3940   ,-1956   ,-1641   ,-3987   ,-7387   ,-9327   ,-9081   ,-8043   ,-7270   ,-8487   ,-11441  ,-14163  ,-14513  ,-11450  ,-7241   ,\n    -4775   ,-5712   ,-9396   ,-13216  ,-15073  ,-14640  ,-13302  ,-13368  ,-15670  ,-18974  ,-20877  ,-19446  ,-16044  ,-13194  ,-13337  ,\n    -17203  ,-22434  ,-26651  ,-28661  ,-28815  ,-29136  ,-30564  ,-32528  ,-32765  ,-29732  ,-24084  ,-18055  ,-14809  ,-14778  ,-16412  ,\n    -17455  ,-16271  ,-13266  ,-10525  ,-9829   ,-11465  ,-13349  ,-13333  ,-10969  ,-7461   ,-5124   ,-5021   ,-6682   ,-8322   ,-7980   ,\n    -5440   ,-2088   ,267     ,388     ,-413    ,-452    ,6372    ,10816   ,15329   ,18753   ,20717   ,21547   ,22496   ,24065   ,25898   ,\n    26959   ,26746   ,25719   ,24658   ,24515   ,25331   ,26639   ,27576   ,27709   ,27396   ,27585   ,28585   ,29978   ,30785   ,30594   ,\n    29356   ,27975   ,27197   ,27243   ,27882   ,28478   ,28307   ,27485   ,26669   ,26351   ,26759   ,27236   ,27455   ,27192   ,26746   ,\n    26588   ,27187   ,28510   ,29932   ,30707   ,30812   ,30700   ,30855   ,31446   ,32175   ,32765   ,32688   ,32030   ,31147   ,30670   ,\n    30743   ,31048   ,30902   ,30165   ,29181   ,28565   ,28479   ,28691   ,28845   ,28528   ,27887   ,27077   ,26430   ,25938   ,25441   ,\n    24676   ,23691   ,22720   ,22112   ,21843   ,21861   ,21959   ,21937   ,21731   ,21312   ,20696   ,19844   ,18964   ,18213   ,17758   ,\n    17258   ,16514   ,15500   ,14552   ,13951   ,13871   ,14124   ,14240   ,13631   ,12558   ,11511   ,10838   ,10602   ,10441   ,10227   ,\n    9925    ,10020   ,10841   ,12641   ,14993   ,17162   ,18564   ,19317   ,19876   ,20654   ,21557   ,22011   ,21584   ,20103   ,18189   ,\n    16537   ,15693   ,15488   ,15388   ,14786   ,13726   ,12636   ,12110   ,12042   ,11982   ,11317   ,9463    ,6952    ,4460    ,2739    ,\n    1866    ,1123    ,-117    ,-1715   ,-3217   ,-4062   ,-4143   ,-3654   ,-3352   ,-3867   ,-5080   ,-6260   ,-6445   ,-5637   ,-4524   ,\n    -3844   ,-3691   ,-3602   ,-2806   ,-1134   ,993     ,2444    ,2710    ,1885    ,684     ,-266    ,-1079   ,-2396   ,-4848   ,-8443   ,\n    -12168  ,-15040  ,-16749  ,-17686  ,-18996  ,-20972  ,-23387  ,-25342  ,-26541  ,-27211  ,-27995  ,-29330  ,-30910  ,-32169  ,-32754  ,\n    -32765  ,-32571  ,-32420  ,-32152  ,-31447  ,-29892  ,-27738  ,-25465  ,-23792  ,-22642  ,-21633  ,-20411  ,-19156  ,-18345  ,-18197  ,\n    -18546  ,-18957  ,-19004  ,-18565  ,-17961  ,-17505  ,-17464  ,-17283  ,-16651  ,-15505  ,-14593  ,-14468  ,-15159  ,-16111  ,-16658  ,\n    -16515  ,-15857  ,-15139  ,-14845  ,-15063  ,-15136  ,-14559  ,-13154  ,-11778  ,-11039  ,-11076  ,-11305  ,-11192  ,-10683  ,-10021  ,\n    -9520   ,-9512   ,-9741   ,-9513   ,-8218   ,-5647   ,-2982   ,-1093   ,-407    ,-367    ,-157    ,553     ,1450    ,1836    ,1029    ,\n    -833    ,-2995   ,-4182   ,-3943   ,-3027   ,-2339   ,-2517   ,-3008   ,-3033   ,-2062   ,-533    ,495     ,164     ,-1345   ,-3123   ,\n    -3691   ,-2818   ,-1092   ,394     ,1145    ,1969    ,3845    ,2919    ,3627    ,4307    ,4884    ,5350    ,5720    ,6005    ,6435    ,\n    7044    ,8001    ,9063    ,10167   ,11172   ,11872   ,12225   ,12229   ,12005   ,11658   ,11376   ,11227   ,11231   ,11435   ,11650   ,\n    11819   ,11802   ,11604   ,11148   ,10660   ,10174   ,9740    ,9508    ,9419    ,9337    ,9104    ,8677    ,8002    ,7034    ,5816    ,\n    4497    ,3247    ,2178    ,1402    ,899     ,830     ,974     ,1269    ,1611    ,1876    ,2006    ,1977    ,1781    ,1479    ,1173    ,\n    987     ,943     ,1213    ,1754    ,2603    ,3775    ,5125    ,6609    ,8072    ,9427    ,10364   ,10992   ,11260   ,11180   ,10893   ,\n    10516   ,10241   ,10145   ,10240   ,10480   ,10815   ,11201   ,11464   ,11615   ,11604   ,11487   ,11322   ,11131   ,11056   ,11143   ,\n    11516   ,12090   ,12856   ,13708   ,14572   ,15403   ,16117   ,16776   ,17419   ,18216   ,19382   ,20824   ,22607   ,24490   ,26323   ,\n    27850   ,29110   ,29949   ,30627   ,31184   ,31764   ,32281   ,32668   ,32765   ,32364   ,31443   ,29993   ,28233   ,26244   ,24003   ,\n    21621   ,19079   ,16306   ,13423   ,10532   ,7867    ,5485    ,3528    ,1797    ,269     ,-1141   ,-2444   ,-3621   ,-4628   ,-5489   ,\n    -6235   ,-6856   ,-7405   ,-7875   ,-8247   ,-8552   ,-8757   ,-8881   ,-8902   ,-8728   ,-8416   ,-7952   ,-7355   ,-6711   ,-6027   ,\n    -5300   ,-4495   ,-3619   ,-2742   ,-1821   ,-856    ,-66     ,509     ,728     ,721     ,521     ,23      ,-510    ,-1033   ,-1406   ,\n    -1578   ,-1436   ,-863    ,347     ,2353    ,5159    ,8685    ,12774   ,17296   ,21734   ,25757   ,28737   ,30881   ,31740   ,31963   ,\n    31745   ,31351   ,30606   ,28990   ,25566   ,19462   ,10252   ,-1054   ,-12659  ,-23355  ,-29788  ,-32765  ,-32164  ,-29063  ,-25314  ,\n    -22235  ,-20639  ,-20064  ,-20675  ,-20917  ,-20673  ,-19636  ,-18157  ,-16469  ,-15228  ,-14665  ,-14969  ,-15908  ,-17237  ,-18769  ,\n    -20084  ,-21151  ,-21831  ,-22214  ,-22417  ,-22411  ,-22304  ,-22119  ,-21909  ,-21651  ,-21369  ,-21136  ,-20972  ,-20915  ,-20860  ,\n    -20758  ,-20571  ,-20134  ,-19450  ,-18462  ,-17174  ,-15710  ,-14131  ,-12518  ,-10896  ,-9407   ,-7998   ,-6705   ,-5555   ,-4545   ,\n    -3695   ,-2933   ,-2280   ,-1756   ,-1459   ,-1267   ,-1101   ,-887    ,-661    ,-454    ,-310    ,-204    ,-164    ,-72     ,117     ,\n    535     ,1012    ,1493    ,1808    ,2022    ,2134    ,2253    ,2490    ,6543    ,7260    ,8078    ,8917    ,9803    ,10613   ,11391   ,\n    12113   ,12819   ,13517   ,14212   ,14942   ,15659   ,16422   ,17137   ,17864   ,18489   ,19111   ,19614   ,20082   ,20464   ,20774   ,\n    21019   ,21173   ,21287   ,21294   ,21310   ,21279   ,21250   ,21221   ,21246   ,21301   ,21391   ,21536   ,21696   ,21931   ,22178   ,\n    22494   ,22775   ,23124   ,23435   ,23757   ,24008   ,24208   ,24371   ,24467   ,24559   ,24561   ,24571   ,24544   ,24543   ,24521   ,\n    24525   ,24520   ,24521   ,24525   ,24522   ,24544   ,24564   ,24628   ,24691   ,24795   ,24853   ,24943   ,24998   ,25059   ,25064   ,\n    25067   ,25083   ,25070   ,25059   ,25001   ,24986   ,24915   ,24846   ,24709   ,24608   ,24483   ,24310   ,24096   ,23837   ,23594   ,\n    23316   ,23073   ,22818   ,22638   ,22467   ,22329   ,22170   ,22003   ,21819   ,21625   ,21468   ,21267   ,21020   ,20658   ,20202   ,\n    19623   ,18780   ,17112   ,14182   ,10765   ,8241    ,7993    ,11179   ,16827   ,22861   ,27346   ,28838   ,27752   ,24708   ,20192   ,\n    15067   ,11002   ,9107    ,9512    ,11505   ,13700   ,15274   ,16225   ,16743   ,17168   ,18414   ,20942   ,24749   ,28718   ,31604   ,\n    32765   ,32305   ,30846   ,29371   ,28462   ,28252   ,28821   ,29718   ,30702   ,31523   ,32100   ,32363   ,32363   ,32166   ,31857   ,\n    31470   ,30894   ,30173   ,29416   ,28827   ,28390   ,28111   ,27414   ,24781   ,19573   ,12873   ,7112    ,4393    ,4498    ,6315    ,\n    8503    ,9780    ,9965    ,9169    ,7852    ,6448    ,5309    ,4481    ,3863    ,3424    ,3055    ,2687    ,2141    ,1422    ,576     ,\n    -381    ,-1554   ,-2902   ,-4433   ,-6671   ,-10254  ,-15201  ,-19899  ,-23005  ,-24218  ,-24267  ,-24116  ,-24315  ,-24859  ,-25677  ,\n    -26610  ,-27457  ,-28144  ,-28644  ,-29124  ,-29554  ,-29977  ,-30362  ,-30831  ,-31298  ,-31716  ,-32069  ,-32342  ,-32548  ,-32649  ,\n    -32705  ,-32703  ,-32751  ,-32761  ,-32765  ,-32729  ,-32688  ,-32615  ,-32501  ,-32339  ,-32109  ,-31860  ,-31524  ,-31198  ,-30788  ,\n    -30379  ,-29907  ,-29453  ,-29001  ,-28562  ,-28145  ,-27732  ,-27385  ,-27045  ,-26752  ,-26448  ,-26212  ,-25969  ,-25708  ,-25399  ,\n    -25088  ,-24741  ,-24350  ,-23909  ,-23183  ,-21613  ,-18318  ,-13324  ,-7673   ,-3245   ,-899    ,-597    ,-1674   ,-2942   ,-3646   ,\n    -3450   ,-2450   ,-856    ,782     ,2283    ,3475    ,4386    ,5125    ,5819    ,3574    ,3965    ,4372    ,4833    ,5225    ,5544    ,\n    5781    ,6044    ,6328    ,6687    ,7008    ,7296    ,7478    ,7640    ,7736    ,7814    ,7888    ,7968    ,8065    ,8152    ,8258    ,\n    8348    ,8497    ,8688    ,8984    ,9304    ,9688    ,9984    ,10261   ,10491   ,10707   ,10908   ,11076   ,11193   ,11206   ,11168   ,\n    11051   ,10908   ,10753   ,10675   ,10633   ,10680   ,10712   ,10776   ,10871   ,11020   ,11187   ,11357   ,11545   ,11760   ,12013   ,\n    12265   ,12513   ,12733   ,12999   ,13266   ,13605   ,13915   ,14188   ,14328   ,14388   ,14393   ,14423   ,14523   ,14722   ,14992   ,\n    15302   ,15618   ,15892   ,16143   ,16302   ,16436   ,16503   ,16572   ,16636   ,16749   ,16872   ,17029   ,17227   ,17510   ,17788   ,\n    18004   ,18110   ,18094   ,17956   ,17723   ,17437   ,17134   ,16860   ,16487   ,15856   ,14796   ,13362   ,11695   ,10049   ,8583    ,\n    7542    ,6938    ,6753    ,6902    ,7299    ,7741    ,8122    ,8342    ,8321    ,8165    ,7911    ,7636    ,7325    ,7003    ,6613    ,\n    6156    ,5614    ,5005    ,4321    ,3597    ,2806    ,1980    ,1313    ,1370    ,3291    ,8172    ,15304   ,23063   ,29458   ,32624   ,\n    32765   ,30608   ,27397   ,24380   ,22316   ,21356   ,21352   ,22000   ,22847   ,23616   ,24167   ,24481   ,24620   ,24709   ,24809   ,\n    24982   ,25067   ,24819   ,23990   ,22529   ,20581   ,18505   ,16535   ,14957   ,13933   ,13431   ,13408   ,13776   ,14438   ,15249   ,\n    16077   ,16764   ,17224   ,17408   ,17332   ,16848   ,15626   ,13474   ,10390   ,6574    ,2420    ,-1576   ,-5023   ,-7673   ,-9313   ,\n    -10014  ,-9968   ,-9365   ,-8460   ,-7470   ,-6735   ,-6482   ,-7101   ,-8733   ,-11273  ,-14497  ,-18138  ,-21753  ,-24965  ,-27482  ,\n    -29123  ,-29872  ,-30026  ,-29849  ,-29522  ,-29310  ,-29258  ,-29454  ,-29781  ,-30230  ,-30707  ,-31165  ,-31515  ,-31886  ,-32215  ,\n    -32506  ,-32705  ,-32765  ,-32523  ,-31537  ,-29305  ,-25491  ,-20941  ,-16777  ,-13934  ,-12863  ,-13366  ,-14602  ,-15991  ,-16941  ,\n    -17143  ,-16713  ,-15842  ,-14807  ,-13823  ,-13010  ,-12311  ,-11711  ,-11137  ,-10607  ,-10085  ,-9661   ,-9236   ,-8881   ,-8488   ,\n    -8080   ,-7602   ,-7038   ,-6377   ,-5641   ,-4884   ,-4144   ,-3490   ,-2899   ,-2409   ,-1972   ,-1617   ,-1289   ,-1030   ,-766    ,\n    -521    ,-237    ,34      ,334     ,710     ,1190    ,1754    ,2305    ,2806    ,3210    ,1192    ,2636    ,4025    ,5305    ,5656    ,\n    1662    ,2788    ,3509    ,403     ,344     ,1207    ,2137    ,3072    ,4015    ,4938    ,5860    ,6779    ,7684    ,8570    ,9454    ,\n    10269   ,9867    ,5895    ,6607    ,7034    ,3489    ,6501    ,22335   ,28522   ,28841   ,29566   ,30177   ,30703   ,31147   ,31522   ,\n    31853   ,32145   ,32402   ,32599   ,32765   ,32471   ,31119   ,31256   ,31116   ,29636   ,29209   ,29252   ,29308   ,29362   ,29405   ,\n    29446   ,29472   ,29488   ,29501   ,29495   ,29447   ,27845   ,15695   ,9793    ,9944    ,9298    ,5349    ,4938    ,4972    ,5177    ,\n    5447    ,5765    ,6119    ,6508    ,6928    ,7369    ,7850    ,8316    ,8734    ,6919    ,3573    ,4301    ,4122    ,73      ,434     ,\n    828     ,1326    ,1873    ,3217    ,12822   ,20467   ,20516   ,21116   ,21598   ,22029   ,22393   ,21720   ,19986   ,20452   ,20379   ,\n    17711   ,18005   ,18225   ,18481   ,18724   ,18960   ,19186   ,19397   ,19598   ,19796   ,19972   ,20137   ,20251   ,18919   ,16877   ,\n    17120   ,16818   ,13647   ,9472    ,-2955   ,-5757   ,-5563   ,-5425   ,-5214   ,-4941   ,-4616   ,-4228   ,-3804   ,-3338   ,-3001   ,\n    -5583   ,-8139   ,-7450   ,-7648   ,-11657  ,-11163  ,-10698  ,-10127  ,-9526   ,-8875   ,-8198   ,-7503   ,-6776   ,-6053   ,-5277   ,\n    -3968   ,9067    ,11980   ,11019   ,11728   ,11651   ,9354    ,9769    ,10334   ,10886   ,11418   ,11938   ,12417   ,12879   ,13319   ,\n    13741   ,14136   ,14509   ,14586   ,12563   ,11323   ,11590   ,10748   ,8197    ,8246    ,8568    ,8899    ,9233    ,9573    ,9798    ,\n    5870    ,-7676   ,-8732   ,-8656   ,-8377   ,-8661   ,-12216  ,-13239  ,-13011  ,-14455  ,-16940  ,-16907  ,-20954  ,-31275  ,-31006  ,\n    -31464  ,-31747  ,-31941  ,-32078  ,-32151  ,-32149  ,-32083  ,-32040  ,-32640  ,-32765  ,-32646  ,-32724  ,-32530  ,-25937  ,-23306  ,\n    -22300  ,-21263  ,-20208  ,-19148  ,-18066  ,-16979  ,-15895  ,-14812  ,-13746  ,-13219  ,-16759  ,-16222  ,-15498  ,-16867  ,-18119  ,\n    -17462  ,-16630  ,-15758  ,-14869  ,-13952  ,-13013  ,-12049  ,-11083  ,-10100  ,-9118   ,-8151   ,-7836   ,-16499  ,-24701  ,-24180  ,\n    -24735  ,-25344  ,-25274  ,-25128  ,-24916  ,-24637  ,-24316  ,-23922  ,-23475  ,-22978  ,-22435  ,-21834  ,-21203  ,-20719  ,-22430  ,\n    -22328  ,-21821  ,-22305  ,-22915  ,-22408  ,-21893  ,-21322  ,-20703  ,-19943  ,-16161  ,-2306   ,2810    ,4099    ,4607    ,4277    ,\n    3437    ,2587    ,1828    ,1384    ,1560    ,2838    ,4876    ,7226    ,9761    ,12123   ,13971   ,15580   ,16851   ,17877   ,19187   ,\n    20768   ,22599   ,24966   ,27444   ,29692   ,31450   ,32376   ,32188   ,31244   ,29591   ,27707   ,25939   ,24286   ,23015   ,22237   ,\n    21619   ,20940   ,19975   ,18597   ,16616   ,14176   ,11679   ,9461    ,7741    ,6480    ,5928    ,6091    ,6400    ,6518    ,6341    ,\n    5741    ,4675    ,3219    ,1642    ,234     ,-578    ,-558    ,-24     ,831     ,1799    ,2462    ,2637    ,2296    ,1368    ,269     ,\n    -557    ,-1799   ,-3311   ,-4345   ,-4769   ,-4801   ,-4736   ,-4962   ,-5416   ,-6253   ,-7674   ,-9394   ,-10833  ,-11826  ,-12322  ,\n    -11865  ,-10400  ,-8355   ,-5747   ,-2850   ,-233    ,1753    ,3446    ,5025    ,6176    ,7075    ,8189    ,9405    ,10621   ,11644   ,\n    12223   ,11990   ,10389   ,7731    ,4291    ,248     ,-4389   ,-8910   ,-12897  ,-15433  ,-17779  ,-20410  ,-22742  ,-24745  ,-26739  ,\n    -28650  ,-30551  ,-31986  ,-32419  ,-31815  ,-30210  ,-27402  ,-23819  ,-19940  ,-16067  ,-12397  ,-9221   ,-7130   ,-5659   ,-4273   ,\n    -3078   ,-1951   ,-502    ,1152    ,2898    ,4298    ,4905    ,4655    ,3812    ,2684    ,1709    ,1210    ,1441    ,2685    ,4671    ,\n    7114    ,9843    ,12389   ,14544   ,16368   ,17720   ,18933   ,20244   ,21620   ,23340   ,25607   ,28079   ,30344   ,31972   ,32765   ,\n    32666   ,31743   ,30058   ,28032   ,26026   ,24222   ,22775   ,21798   ,21213   ,20547   ,19496   ,18164   ,16330   ,13966   ,11476   ,\n    9078    ,7225    ,5961    ,5289    ,5277    ,5574    ,5801    ,5898    ,5553    ,4607    ,3351    ,1938    ,646     ,-32     ,12      ,\n    600     ,1483    ,2471    ,3384    ,3907    ,3635    ,2619    ,1522    ,487     ,-817    ,-2294   ,-3607   ,-4391   ,-4689   ,-4823   ,\n    -5129   ,-5606   ,-6427   ,-7703   ,-9180   ,-10521  ,-11515  ,-11970  ,-11450  ,-9946   ,-7690   ,-4756   ,-1595   ,1068    ,3276    ,\n    5425    ,7033    ,7896    ,8637    ,9500    ,10383   ,11225   ,11827   ,11944   ,11262   ,9447    ,6612    ,2941    ,-1629   ,-6657   ,\n    -11408  ,-14929  ,-17697  ,-20869  ,-23567  ,-25515  ,-27315  ,-28794  ,-30305  ,-31764  ,-32715  ,-32765  ,-31881  ,-30110  ,-27252  ,\n    -23513  ,-19281  ,-14946  ,-10973  ,-7916   ,-5796   ,-4102   ,-2861   ,-2039   ,-1221   ,-97     ,1262    ,1780    ,13227   ,20300   ,\n    23754   ,26160   ,28706   ,31317   ,32765   ,32480   ,29664   ,23474   ,15316   ,10061   ,9616    ,9960    ,9183    ,7619    ,6676    ,\n    7309    ,10180   ,15134   ,18518   ,18072   ,18149   ,18804   ,19033   ,19069   ,19227   ,19826   ,21186   ,22854   ,22234   ,20258   ,\n    20469   ,21781   ,22589   ,23244   ,23997   ,24834   ,26038   ,26695   ,23695   ,18225   ,15595   ,14445   ,13195   ,12100   ,10980   ,\n    9803    ,9930    ,13726   ,19320   ,21751   ,21741   ,21362   ,20492   ,19431   ,18307   ,17333   ,15472   ,10716   ,2008    ,-6706   ,\n    -10857  ,-13350  ,-15121  ,-16557  ,-18510  ,-20998  ,-22725  ,-21898  ,-17348  ,-12591  ,-10985  ,-11667  ,-13665  ,-15626  ,-16275  ,\n    -15251  ,-14865  ,-18721  ,-25689  ,-30582  ,-31964  ,-32484  ,-32695  ,-32726  ,-32765  ,-32240  ,-31017  ,-30826  ,-31506  ,-30055  ,\n    -28535  ,-28138  ,-28032  ,-27420  ,-26150  ,-24037  ,-21250  ,-20692  ,-21590  ,-20532  ,-18425  ,-17405  ,-16779  ,-15789  ,-13611  ,\n    -9233   ,-3910   ,-2237   ,-5361   ,-8799   ,-9953   ,-9733   ,-9103   ,-9719   ,-13014  ,-18430  ,-23324  ,-25447  ,-25284  ,-23591  ,\n    -22171  ,-21512  ,-19977  ,-16281  ,-9355   ,1283    ,12740   ,19942   ,23614   ,25879   ,28434   ,31054   ,32591   ,32407   ,29674   ,\n    23648   ,15548   ,10111   ,9556    ,10005   ,9275    ,7738    ,6755    ,7281    ,10019   ,14884   ,18341   ,18086   ,18045   ,18766   ,\n    19002   ,19032   ,19166   ,19725   ,21034   ,22749   ,22243   ,20177   ,20322   ,21695   ,22489   ,23120   ,23853   ,24763   ,25950   ,\n    26634   ,23826   ,18356   ,15629   ,14455   ,13201   ,12075   ,10956   ,9765    ,9817    ,13496   ,19004   ,21648   ,21673   ,21279   ,\n    20436   ,19396   ,18283   ,17289   ,15469   ,10915   ,2369    ,-6536   ,-10829  ,-13289  ,-15101  ,-16536  ,-18452  ,-20910  ,-22628  ,\n    -22011  ,-17525  ,-12692  ,-10946  ,-11537  ,-13416  ,-15382  ,-16129  ,-15287  ,-14804  ,-18459  ,-25346  ,-30471  ,-31881  ,-32424  ,\n    -32660  ,-32693  ,-32681  ,-32228  ,-31026  ,-30699  ,-31397  ,-30084  ,-28470  ,-28029  ,-27951  ,-27397  ,-26162  ,-24086  ,-21296  ,\n    -20596  ,-21547  ,-20544  ,-18492  ,-17455  ,-16833  ,-15846  ,-13773  ,-9439   ,-4073   ,-2203   ,-5139   ,-8579   ,-9793   ,-9604   ,\n    -8916   ,-9489   ,-12702  ,-18072  ,-23036  ,-25334  ,-25250  ,-23672  ,-22224  ,-21605  ,-20134  ,-16562  ,-9851   ,-180    ,8843    ,\n    7202    ,-1296   ,-7299   ,-6504   ,-1732   ,6326    ,17414   ,26806   ,27822   ,21076   ,11971   ,5774    ,5655    ,11007   ,20243   ,\n    28596   ,32601   ,31268   ,26334   ,19893   ,11985   ,4526    ,425     ,2814    ,8445    ,12722   ,16247   ,21150   ,25858   ,26210   ,\n    22224   ,17205   ,11911   ,6082    ,1198    ,-1221   ,-746    ,924     ,5678    ,13231   ,20678   ,26057   ,29576   ,29872   ,25388   ,\n    17974   ,11444   ,4102    ,-5091   ,-11639  ,-12039  ,-8139   ,-3438   ,1073    ,5991    ,8176    ,6592    ,2308    ,-3156   ,-10337  ,\n    -18750  ,-21231  ,-16737  ,-9134   ,-3340   ,2313    ,10299   ,16625   ,15857   ,8459    ,927     ,-3864   ,-7512   ,-9503   ,-7443   ,\n    -1752   ,5197    ,10387   ,14304   ,14113   ,8265    ,-1946   ,-10641  ,-16777  ,-23599  ,-29516  ,-29430  ,-24000  ,-17561  ,-12526  ,\n    -8361   ,-5977   ,-7200   ,-10549  ,-15216  ,-20778  ,-26293  ,-29959  ,-30899  ,-29691  ,-25935  ,-19050  ,-12496  ,-8306   ,-5516   ,\n    -2934   ,-2769   ,-7206   ,-14324  ,-20950  ,-26710  ,-30815  ,-32646  ,-30766  ,-25317  ,-17978  ,-10473  ,-5127   ,-3657   ,-7323   ,\n    -14433  ,-22400  ,-27434  ,-26982  ,-21594  ,-10988  ,1860    ,9163    ,5865    ,-2738   ,-7832   ,-5998   ,-522    ,8294    ,19498   ,\n    27740   ,27046   ,19429   ,10528   ,5378    ,6364    ,12411   ,21561   ,29457   ,32765   ,30794   ,25700   ,18953   ,10925   ,3691    ,\n    432     ,3676    ,9070    ,13076   ,16764   ,22039   ,26282   ,25896   ,21569   ,16708   ,11260   ,5464    ,811     ,-1151   ,-578    ,\n    1375    ,6645    ,14337   ,21528   ,26714   ,29909   ,29619   ,24505   ,17076   ,10663   ,2848    ,-6484   ,-12158  ,-11719  ,-7620   ,\n    -3022   ,1717    ,6551    ,8099    ,6159    ,1678    ,-3855   ,-11570  ,-19657  ,-20921  ,-15669  ,-8191   ,-2823   ,3340    ,11658   ,\n    17181   ,15139   ,7376    ,235     ,-4202   ,-8021   ,-9538   ,-6892   ,-782    ,5953    ,11065   ,14640   ,13618   ,6920    ,-3541   ,\n    -11510  ,-17704  ,-24798  ,-30344  ,-29106  ,-23195  ,-16891  ,-12047  ,-7875   ,-5927   ,-7505   ,-11033  ,-15841  ,-21545  ,-26902  ,\n    -30293  ,-30952  ,-29532  ,-25298  ,-18085  ,-11856  ,-7996   ,-5203   ,-2593   ,-2974   ,-8091   ,-15339  ,-21844  ,-27529  ,-31320  ,\n    -32765  ,-30244  ,-24522  ,-16941  ,-9556   ,-4607   ,-3732   ,-8073   ,-15580  ,-23430  ,-27798  ,-26687  ,-20521  ,-9145   ,591     ,\n    3451    ,6242    ,9151    ,11965   ,14864   ,17747   ,20681   ,23110   ,25471   ,27395   ,28957   ,30126   ,31139   ,31843   ,32341   ,\n    32597   ,32765   ,32686   ,32363   ,31845   ,31287   ,30591   ,29484   ,28170   ,26378   ,24354   ,22011   ,19591   ,16665   ,13932   ,\n    11054   ,8338    ,6709    ,5443    ,2894    ,-170    ,-3016   ,-5609   ,-8237   ,-10777  ,-13352  ,-15583  ,-17574  ,-19349  ,-21035  ,\n    -22556  ,-23713  ,-24777  ,-25622  ,-26429  ,-26997  ,-27508  ,-27757  ,-27691  ,-27370  ,-26730  ,-25815  ,-24560  ,-23410  ,-22010  ,\n    -20315  ,-18350  ,-16624  ,-14709  ,-12995  ,-11143  ,-9287   ,-7076   ,-4987   ,-2741   ,-918    ,1152    ,3149    ,5222    ,6966    ,\n    8876    ,10592   ,12204   ,13446   ,14550   ,15244   ,15815   ,16231   ,16700   ,17016   ,17342   ,17295   ,17015   ,16630   ,16138   ,\n    15790   ,15180   ,14432   ,13304   ,12266   ,10906   ,9277    ,7368    ,5653    ,4035    ,2842    ,1860    ,1060    ,106     ,-658    ,\n    -1538   ,-2069   ,-2709   ,-3361   ,-4126   ,-4926   ,-5742   ,-6483   ,-6988   ,-7508   ,-7775   ,-7480   ,-6926   ,-6189   ,-5335   ,\n    -4448   ,-3534   ,-2454   ,-1537   ,-535    ,192     ,691     ,1529    ,2394    ,3335    ,4053    ,4796    ,5382    ,6112    ,6892    ,\n    7567    ,8098    ,8334    ,8500    ,8657    ,8355    ,8027    ,7340    ,6915    ,5990    ,5329    ,4560    ,3723    ,2657    ,1646    ,\n    664     ,-330    ,-1317   ,-2471   ,-3936   ,-5494   ,-7409   ,-8773   ,-10183  ,-11399  ,-12831  ,-13928  ,-14979  ,-16062  ,-16960  ,\n    -17520  ,-17914  ,-18042  ,-17830  ,-17491  ,-17116  ,-16686  ,-16230  ,-15610  ,-14669  ,-13675  ,-12387  ,-11245  ,-9618   ,-7997   ,\n    -6044   ,-4337   ,-2211   ,65      ,2439    ,4628    ,6969    ,9024    ,10966   ,12698   ,14623   ,16238   ,18079   ,19482   ,21038   ,\n    22616   ,24226   ,25440   ,26401   ,27144   ,27610   ,27889   ,27753   ,27417   ,26798   ,26108   ,25092   ,23903   ,22497   ,21122   ,\n    19394   ,17758   ,15706   ,13737   ,11351   ,9124    ,6600    ,3951    ,586     ,-1848   ,-3306   ,-4705   ,-7977   ,-11039  ,-14058  ,\n    -16650  ,-19405  ,-21606  ,-23723  ,-25465  ,-27101  ,-28284  ,-29273  ,-30101  ,-31010  ,-31776  ,-32207  ,-32548  ,-32706  ,-32765  ,\n    -32373  ,-31737  ,-30663  ,-29396  ,-27503  ,-25407  ,-22941  ,-20577  ,-17945  ,-15429  ,-12619  ,-10210  ,-7493   ,-4995   ,-2166   ,\n    -1130   ,12172   ,19582   ,15951   ,4121    ,-1356   ,-1032   ,-1521   ,-127    ,6657    ,18104   ,26921   ,31666   ,32657   ,30794   ,\n    26482   ,19868   ,11742   ,6763    ,10801   ,20390   ,22314   ,16806   ,14568   ,16921   ,14387   ,5491    ,-1276   ,-4975   ,-6794   ,\n    -7866   ,-7342   ,-2820   ,7299    ,18349   ,22396   ,21748   ,22545   ,20484   ,11302   ,279     ,-706    ,7477    ,14218   ,17354   ,\n    17537   ,16818   ,14567   ,9847    ,2024    ,-6665   ,-12673  ,-16872  ,-20764  ,-23008  ,-15182  ,-43     ,7303    ,6639    ,1561    ,\n    -6902   ,-15894  ,-22357  ,-22675  ,-16705  ,-6241   ,3419    ,7412    ,8577    ,13034   ,20809   ,17671   ,7639    ,3473    ,730     ,\n    -2593   ,-4862   ,-3478   ,1650    ,8795    ,14691   ,17838   ,18397   ,16722   ,10574   ,-4534   ,-24596  ,-32397  ,-30392  ,-29572  ,\n    -26663  ,-21304  ,-13569  ,-7212   ,-4653   ,-6437   ,-10471  ,-15366  ,-20513  ,-25641  ,-28807  ,-21952  ,-7792   ,-1392   ,-368    ,\n    476     ,-319    ,-3834   ,-9124   ,-15619  ,-23415  ,-29706  ,-32087  ,-30978  ,-26868  ,-18114  ,-7075   ,-6043   ,-10875  ,-11092  ,\n    -12524  ,-18115  ,-25565  ,-30856  ,-32140  ,-29170  ,-22532  ,-12364  ,653     ,13366   ,19427   ,14374   ,2617    ,-1368   ,-1126   ,\n    -1578   ,447     ,8158    ,19629   ,27902   ,32161   ,32765   ,30520   ,25822   ,18846   ,10827   ,6869    ,12226   ,21573   ,22310   ,\n    16810   ,15217   ,17248   ,13532   ,4415    ,-2016   ,-5399   ,-7083   ,-8024   ,-7030   ,-1729   ,8992    ,19452   ,22504   ,21861   ,\n    22729   ,19828   ,9733    ,-538    ,189     ,8687    ,15287   ,17974   ,17928   ,16957   ,14267   ,8990    ,660     ,-7948   ,-13773  ,\n    -18002  ,-21895  ,-22925  ,-12286  ,2355    ,7485    ,6185    ,76      ,-8776   ,-17643  ,-23253  ,-22279  ,-14909  ,-4068   ,4706    ,\n    7520    ,8863    ,14731   ,21793   ,15689   ,6496    ,3313    ,162     ,-3280   ,-5223   ,-3094   ,2742    ,10126   ,15670   ,18371   ,\n    18460   ,16214   ,8448    ,-9031   ,-28564  ,-32600  ,-30803  ,-29957  ,-26539  ,-20447  ,-12559  ,-6540   ,-4784   ,-7056   ,-11346  ,\n    -16519  ,-21802  ,-27082  ,-29238  ,-19602  ,-5626   ,-1385   ,-376    ,218     ,-1017   ,-4996   ,-10270  ,-17249  ,-25204  ,-31036  ,\n    -32765  ,-31054  ,-26071  ,-16025  ,-5491   ,-7001   ,-11293  ,-10929  ,-13340  ,-19708  ,-27373  ,-31928  ,-32469  ,-28733  ,-21259  ,\n    -10126  ,5675    ,7865    ,8250    ,17528   ,27041   ,30809   ,27726   ,26742   ,28266   ,22369   ,5882    ,-1625   ,-1205   ,-869    ,\n    1734    ,5223    ,14705   ,25812   ,24898   ,20510   ,27281   ,32164   ,32230   ,32335   ,30323   ,25942   ,17394   ,2329    ,-4551   ,\n    -3592   ,-5601   ,-1876   ,7296    ,15939   ,18213   ,16727   ,12667   ,16593   ,15539   ,6071    ,2743    ,1680    ,2124    ,-3596   ,\n    -10270  ,-11187  ,-11753  ,-13908  ,-13929  ,-12950  ,-9547   ,-2954   ,1671    ,1891    ,3130    ,-3125   ,-10858  ,-10792  ,-17919  ,\n    -23952  ,-23553  ,-19054  ,-13997  ,-12493  ,-10333  ,2060    ,16566   ,20262   ,20765   ,20409   ,20328   ,16440   ,3435    ,-5630   ,\n    -1511   ,-6003   ,-14345  ,-20631  ,-24595  ,-21655  ,-17970  ,-13933  ,219     ,16404   ,17744   ,17675   ,14033   ,7415    ,1871    ,\n    -5353   ,-10177  ,-6750   ,-8847   ,-19031  ,-19910  ,-20041  ,-21942  ,-20305  ,-14684  ,-3416   ,6051    ,5983    ,6182    ,5222    ,\n    1569    ,-9121   ,-22036  ,-28784  ,-29205  ,-30544  ,-32442  ,-24293  ,-17841  ,-12578  ,-6913   ,-4889   ,-2469   ,-2756   ,-3451   ,\n    -863    ,-3343   ,-11200  ,-15859  ,-15851  ,-17414  ,-19417  ,-18094  ,-10354  ,5479    ,7942    ,8424    ,17621   ,27177   ,31581   ,\n    27949   ,26952   ,28480   ,23036   ,6605    ,-1681   ,-1415   ,-729    ,1657    ,5203    ,14582   ,26087   ,25546   ,20597   ,27449   ,\n    32765   ,32575   ,32743   ,30703   ,26347   ,17791   ,2563    ,-4353   ,-3666   ,-5784   ,-1907   ,7144    ,16186   ,18367   ,17116   ,\n    13054   ,16277   ,15720   ,6414    ,2605    ,1699    ,2304    ,-3577   ,-10408  ,-11326  ,-11607  ,-14197  ,-13989  ,-13163  ,-9575   ,\n    -3005   ,1694    ,2051    ,3185    ,-3199   ,-11012  ,-10744  ,-18420  ,-24230  ,-24033  ,-19396  ,-14281  ,-12580  ,-10610  ,1699    ,\n    16423   ,20456   ,21051   ,20580   ,20597   ,16754   ,3751    ,-5908   ,-1812   ,-5655   ,-14541  ,-20744  ,-24838  ,-21972  ,-18148  ,\n    -14307  ,-190    ,16629   ,17533   ,17928   ,14106   ,7535    ,2013    ,-5225   ,-10086  ,-6699   ,-8975   ,-18833  ,-20019  ,-20338  ,\n    -21994  ,-20554  ,-14932  ,-3666   ,6225    ,6047    ,6088    ,5433    ,1627    ,-8887   ,-21974  ,-28818  ,-29312  ,-30687  ,-32765  ,\n    -24217  ,-18209  ,-12926  ,-6878   ,-5044   ,-2429   ,-2715   ,-3349   ,-917    ,-3283   ,-11246  ,-15941  ,-15794  ,-17515  ,-19418  ,\n    -18134  ,-10618  ,1076    ,9846    ,13358   ,11807   ,11524   ,11278   ,11246   ,11140   ,11843   ,13366   ,14667   ,17102   ,21059   ,\n    22537   ,25984   ,29846   ,31568   ,32675   ,32765   ,31827   ,29760   ,27831   ,23582   ,13267   ,181     ,-5193   ,-6137   ,-7996   ,\n    -9941   ,-10485  ,-9374   ,-8046   ,-5572   ,-2297   ,-929    ,-395    ,2055    ,2475    ,3483    ,4846    ,4258    ,3432    ,3087    ,\n    3191    ,3419    ,6010    ,14689   ,22985   ,23973   ,23379   ,23696   ,26070   ,28034   ,27776   ,26948   ,26750   ,27307   ,30008   ,\n    32561   ,31830   ,30417   ,25943   ,22591   ,23537   ,25522   ,26746   ,25979   ,23377   ,17430   ,8211    ,2510    ,2974    ,4005    ,\n    4952    ,2813    ,299     ,-391    ,1320    ,2587    ,1586    ,-1742   ,-4394   ,-4079   ,-12     ,7532    ,10644   ,10463   ,7332    ,\n    2134    ,-1671   ,-2432   ,404     ,4617    ,5225    ,4160    ,2186    ,1150    ,3546    ,6219    ,8667    ,7606    ,5251    ,4488    ,\n    5822    ,6084    ,1885    ,-8067   ,-18695  ,-23298  ,-26902  ,-28664  ,-28187  ,-26343  ,-26506  ,-28989  ,-30941  ,-30756  ,-31067  ,\n    -29692  ,-29240  ,-31116  ,-31798  ,-32672  ,-32765  ,-31264  ,-30010  ,-30374  ,-29344  ,-23032  ,-9217   ,1184    ,6523    ,12133   ,\n    16628   ,19720   ,21398   ,22604   ,23230   ,22349   ,21247   ,21114   ,17841   ,16646   ,17214   ,16596   ,16945   ,17820   ,18944   ,\n    20240   ,22556   ,23069   ,17186   ,7056    ,3223    ,2908    ,914     ,-1455   ,-3051   ,-2944   ,-2890   ,-1931   ,-246    ,-601    ,\n    -1778   ,-692    ,-1371   ,-1091   ,-170    ,-1491   ,-3228   ,-5005   ,-6557   ,-7977   ,-7201   ,-380    ,6394    ,6295    ,4472    ,\n    3251    ,4464    ,5380    ,4111    ,2253    ,1389    ,1556    ,4073    ,6773    ,6244    ,4333    ,-1057   ,-5691   ,-6464   ,-5625   ,\n    -5076   ,-6203   ,-8762   ,-14320  ,-22940  ,-28462  ,-27674  ,-26258  ,-25215  ,-27047  ,-29459  ,-29945  ,-27705  ,-25646  ,-25619  ,\n    -27892  ,-29648  ,-28403  ,-23447  ,-15015  ,-10358  ,-9101   ,-10362  ,-13355  ,-14816  ,-13135  ,-7949   ,-1808   ,155     ,6       ,\n    -1052   ,-1695   ,1429    ,5195    ,8879    ,9638    ,8789    ,9560    ,12407   ,14244   ,11819   ,3545    ,-6039   ,-9793   ,-13214  ,\n    -15690  ,-16422  ,-15953  ,-16979  ,-19774  ,-21299  ,-19751  ,-17816  ,-13373  ,-9488   ,-8299   ,-6206   ,-5053   ,-3764   ,-1606   ,\n    -156    ,-1090   ,-2062   ,442     ,5171    ,8389    ,10505   ,10692   ,7735    ,3601    ,993     ,529     ,2147    ,5767    ,8429    ,\n    7927    ,5610    ,3211    ,1647    ,1169    ,1447    ,1652    ,2861    ,9096    ,21702   ,30314   ,31104   ,30547   ,29975   ,28559   ,\n    26778   ,25488   ,25401   ,27193   ,30027   ,32367   ,32765   ,31109   ,26226   ,15670   ,4464    ,1609    ,4003    ,7677    ,11649   ,\n    15784   ,20070   ,23493   ,24668   ,21622   ,13609   ,3650    ,-3414   ,-6211   ,-5400   ,-1689   ,3854    ,10215   ,16365   ,20635   ,\n    19983   ,11837   ,695     ,-4994   ,-7698   ,-11670  ,-15826  ,-19684  ,-23328  ,-26470  ,-28263  ,-28583  ,-27560  ,-25404  ,-22944  ,\n    -19593  ,-11237  ,2585    ,10052   ,7704    ,2307    ,-4368   ,-11381  ,-17682  ,-22453  ,-24868  ,-23948  ,-19130  ,-12492  ,-7823   ,\n    -6347   ,-7412   ,-11416  ,-16857  ,-21692  ,-25495  ,-28115  ,-28252  ,-23958  ,-15207  ,-7917   ,-4621   ,-3284   ,-4358   ,-7781   ,\n    -10832  ,-12165  ,-11931  ,-10720  ,-9137   ,-7376   ,-5373   ,-3700   ,-5160   ,-14076  ,-25548  ,-26994  ,-22567  ,-17958  ,-13612  ,\n    -9759   ,-6699   ,-5236   ,-6212   ,-10348  ,-16412  ,-21727  ,-24237  ,-23685  ,-18468  ,-8694   ,406     ,5569    ,8675    ,10291   ,\n    9924    ,6866    ,3027    ,937     ,1265    ,4173    ,9485    ,13744   ,14123   ,11359   ,7034    ,2497    ,-1527   ,-4528   ,-6203   ,\n    -5131   ,2399    ,17123   ,27839   ,30128   ,30426   ,31065   ,31515   ,31649   ,31483   ,31041   ,30630   ,30483   ,30158   ,29409   ,\n    28611   ,25809   ,17459   ,7374    ,3683    ,4049    ,5234    ,6862    ,9502    ,12973   ,16303   ,18316   ,17397   ,12699   ,6783    ,\n    3621    ,3917    ,6480    ,10253   ,13957   ,16578   ,17388   ,15864   ,10161   ,-1582   ,-14594  ,-20574  ,-20928  ,-20098  ,-17598  ,\n    -14389  ,-11971  ,-10894  ,-10903  ,-11792  ,-13567  ,-16426  ,-20684  ,-24321  ,-22079  ,-12576  ,-6107   ,-7148   ,-9687   ,-11660  ,\n    -12902  ,-13571  ,-13781  ,-13369  ,-11665  ,-7955   ,-3839   ,-2585   ,-4951   ,-9356   ,-15615  ,-22403  ,-27792  ,-31247  ,-32765  ,\n    -31138  ,-24639  ,-14031  ,-5769   ,-2852   ,-3215   ,-6225   ,-10783  ,-13455  ,-12763  ,-9565   ,-5946   ,-3201   ,-1844   ,-1347   ,\n    -1297   ,-4137   ,-13870  ,-25958  ,-29159  ,-27263  ,-25041  ,-21630  ,-16607  ,-10805  ,-5997   ,-3766   ,-5664   ,-10564  ,-15875  ,\n    -19429  ,-20261  ,-16467  ,-8001   ,2045    ,3017    ,3975    ,4903    ,5846    ,6906    ,7941    ,8547    ,8258    ,7765    ,10345   ,\n    18543   ,28627   ,32765   ,31472   ,29634   ,28843   ,28877   ,28955   ,28839   ,28390   ,27703   ,26779   ,25746   ,24606   ,23274   ,\n    21327   ,18176   ,13025   ,5872    ,196     ,1198    ,8684    ,16515   ,19925   ,20736   ,19773   ,17698   ,15847   ,15037   ,15471   ,\n    17010   ,19491   ,22524   ,25864   ,29171   ,31729   ,32461   ,29964   ,23231   ,13868   ,7304    ,5975    ,6997    ,6493    ,4119    ,\n    2008    ,1319    ,1375    ,848     ,-146    ,-732    ,22      ,2909    ,7460    ,13116   ,18978   ,23505   ,25121   ,22760   ,16952   ,\n    10564   ,6433    ,5117    ,6433    ,10495   ,15484   ,18938   ,19547   ,17001   ,11752   ,5722    ,1591    ,1314    ,4623    ,9885    ,\n    15706   ,20952   ,24493   ,26007   ,25710   ,24482   ,23833   ,24437   ,25779   ,26344   ,25409   ,24653   ,25047   ,24902   ,19978   ,\n    10976   ,2386    ,-2401   ,-2868   ,-1205   ,1396    ,4238    ,6783    ,8700    ,9793    ,9798    ,8285    ,5227    ,1031    ,-3255   ,\n    -5844   ,-5202   ,-928    ,5524    ,8403    ,3032    ,-5728   ,-12913  ,-17544  ,-20520  ,-22686  ,-24414  ,-25870  ,-27107  ,-28180  ,\n    -29076  ,-29744  ,-30104  ,-30216  ,-30596  ,-31725  ,-32765  ,-30457  ,-22384  ,-12327  ,-8215   ,-9360   ,-10840  ,-11108  ,-10426  ,\n    -9524   ,-8792   ,-8253   ,-8007   ,-7975   ,-8072   ,-8302   ,-8838   ,-10105  ,-12692  ,-17387  ,-24270  ,-29769  ,-28597  ,-20898  ,\n    -13137  ,-10020  ,-9680   ,-11157  ,-13758  ,-16281  ,-17638  ,-17705  ,-16591  ,-14445  ,-11585  ,-8324   ,-4971   ,-2142   ,-1071   ,\n    -3145   ,-9355   ,-18070  ,-23853  ,-24267  ,-22352  ,-22003  ,-23557  ,-24942  ,-24919  ,-24251  ,-24242  ,-24812  ,-25047  ,-24014  ,\n    -20958  ,-16300  ,-10598  ,-4754   ,-331    ,1098    ,-1473   ,-7403   ,-13914  ,-17970  ,-19020  ,-17305  ,-12711  ,-6915   ,-2614   ,\n    -976    ,-2444   ,-6597   ,-11418  ,-14283  ,-13149  ,-8475   ,-2018   ,4995    ,11297   ,15742   ,17973   ,18249   ,17443   ,17058   ,\n    17796   ,19181   ,19674   ,18488   ,17340   ,17368   ,16889   ,11701   ,2234    ,-6929   ,-12208  ,-13072  ,-11495  ,-8898   ,-5904   ,\n    -3013   ,-620    ,1039    ,1745    ,1198    ,-846    ,-3862   ,-6749   ,-7843   ,-5506   ,711     ,9456    ,15075   ,12279   ,6211    ,\n    1774    ,-112    ,-313    ,180     ,1047    ,1862    ,3995    ,4030    ,3955    ,1630    ,1653    ,2482    ,2115    ,-38     ,-328    ,\n    2752    ,1582    ,210     ,5647    ,8112    ,8975    ,9199    ,10768   ,13296   ,15087   ,16244   ,16866   ,13643   ,2304    ,-15027  ,\n    -20777  ,-18090  ,-17700  ,-20636  ,-24249  ,-24765  ,-24920  ,-24823  ,-25302  ,-23365  ,-16940  ,-3322   ,11155   ,5736    ,-3967   ,\n    -6666   ,-3282   ,2715    ,5339    ,3951    ,2199    ,1623    ,-2950   ,-13021  ,-13449  ,5316    ,15365   ,16658   ,19106   ,22998   ,\n    23138   ,18778   ,14876   ,15825   ,23479   ,30781   ,28592   ,10219   ,-6789   ,-8745   ,-6631   ,-5847   ,-8049   ,-6228   ,497     ,\n    8092    ,8520    ,3224    ,2492    ,16784   ,29560   ,26608   ,28292   ,30252   ,27867   ,24070   ,21953   ,23304   ,24453   ,22104   ,\n    17664   ,16783   ,21959   ,24636   ,24760   ,29783   ,31120   ,30149   ,28243   ,24952   ,21696   ,19175   ,20095   ,24175   ,26021   ,\n    15127   ,8624    ,10918   ,4586    ,4073    ,7939    ,13274   ,14547   ,11824   ,11659   ,15505   ,18936   ,10479   ,-25     ,5962    ,\n    8051    ,1954    ,2289    ,2811    ,4063    ,3075    ,2282    ,2747    ,2768    ,1636    ,6114    ,23464   ,31491   ,26803   ,29618   ,\n    29654   ,30029   ,29492   ,31631   ,32765   ,31895   ,28496   ,25862   ,29252   ,23188   ,10139   ,15625   ,19898   ,18561   ,14575   ,\n    13774   ,17604   ,20114   ,18802   ,16075   ,18265   ,19610   ,6611    ,9       ,2280    ,58      ,-1816   ,-3658   ,-3106   ,-3372   ,\n    -3437   ,-4429   ,-5466   ,-9912   ,-12893  ,-1436   ,5701    ,4202    ,2705    ,2594    ,280     ,-7245   ,-15178  ,-18871  ,-15806  ,\n    -9016   ,-6174   ,-4216   ,3610    ,-2956   ,-9970   ,-9575   ,-4167   ,2781    ,6770    ,8252    ,8310    ,7252    ,1737    ,-6653   ,\n    -15882  ,-14319  ,-7341   ,-4401   ,-3002   ,-6307   ,-8292   ,-8714   ,-6673   ,-5059   ,-3883   ,-378    ,5143    ,-2150   ,-14908  ,\n    -13207  ,-11798  ,-14926  ,-20908  ,-23773  ,-22171  ,-20554  ,-23591  ,-28457  ,-26578  ,-9470   ,7941    ,7277    ,3463    ,471     ,\n    2195    ,6218    ,8488    ,7387    ,4373    ,4027    ,2251    ,-8624   ,-25845  ,-30950  ,-28037  ,-28888  ,-27401  ,-26775  ,-25244  ,\n    -25645  ,-27253  ,-27026  ,-23413  ,-18488  ,-18698  ,-25239  ,-28029  ,-29615  ,-31897  ,-31370  ,-31678  ,-31946  ,-32765  ,-31900  ,\n    -31093  ,-31655  ,-29605  ,-20294  ,-7104   ,-316    ,1888    ,11636   ,13436   ,10761   ,7870    ,10329   ,17140   ,23568   ,27995   ,\n    29982   ,30063   ,29140   ,28446   ,29388   ,32077   ,32765   ,30707   ,29043   ,26227   ,20184   ,14984   ,16433   ,21790   ,23564   ,\n    16247   ,1666    ,-10786  ,-12820  ,-6999   ,-1257   ,-3218   ,-10482  ,-17272  ,-22180  ,-22124  ,-19541  ,-21742  ,-27366  ,-31907  ,\n    -32057  ,-30633  ,-31631  ,-32765  ,-28931  ,-22470  ,-18587  ,-18815  ,-23081  ,-27343  ,-25952  ,-19371  ,-12469  ,-6544   ,-3597   ,\n    -2146   ,1969    ,8133    ,9699    ,2496    ,-2868   ,1984    ,15794   ,25548   ,23662   ,19367   ,16685   ,18912   ,24672   ,29871   ,\n    31568   ,29607   ,22992   ,16164   ,13879   ,16296   ,22040   ,25890   ,26511   ,22994   ,13365   ,1529    ,-4409   ,-3173   ,1271    ,\n    5747    ,6527    ,519     ,-10218  ,-15005  ,-11175  ,-4592   ,-6235   ,-17826  ,-25750  ,-23645  ,-17347  ,-14792  ,-18659  ,-21224  ,\n    -17412  ,-14079  ,-14687  ,-15267  ,-13857  ,-11765  ,-11749  ,-11957  ,-8842   ,-2871   ,1362    ,3058    ,2422    ,663     ,-148    ,\n    -327    ,178     ,2568    ,7927    ,11084   ,8582    ,2795    ,-530    ,1668    ,8155    ,11301   ,4647    ,-3998   ,-5688   ,1585    ,\n    6331    ,4003    ,-1250   ,-6423   ,-8486   ,-6729   ,-3278   ,-735    ,-325    ,-1031   ,142     ,5034    ,10518   ,11625   ,9912    ,\n    9134    ,10836   ,11714   ,9632    ,8955    ,14350   ,21721   ,26287   ,24852   ,16597   ,8621    ,10054   ,17319   ,20222   ,8343    ,\n    -6355   ,-10829  ,-5919   ,1931    ,5608    ,1510    ,-7617   ,-18598  ,-26805  ,-29677  ,-30504  ,-31493  ,-30372  ,-28530  ,-28626  ,\n    -30697  ,-31385  ,-25587  ,-14703  ,-7298   ,-8281   ,-16288  ,-24164  ,-25056  ,-17193  ,-719    ,13999   ,13795   ,7248    ,8212    ,\n    16449   ,23011   ,22117   ,19399   ,15909   ,13068   ,12726   ,14312   ,15759   ,19798   ,24681   ,25282   ,21024   ,12710   ,4212    ,\n    1671    ,2115    ,690     ,-2817   ,-5328   ,-4908   ,-3504   ,-1335   ,3295    ,7466    ,5196    ,-1868   ,-4224   ,-1615   ,664     ,\n    -1159   ,-4477   ,-2243   ,4883    ,12706   ,15311   ,9873    ,2231    ,-1842   ,-1412   ,290     ,1171    ,83      ,-1609   ,-5550   ,\n    -10081  ,-11178  ,-8210   ,-6558   ,-9493   ,-16054  ,-21811  ,-25141  ,-27705  ,-29654  ,-28238  ,-21116  ,-15608  ,-18633  ,-25669  ,\n    -27057  ,-21227  ,-10893  ,-5021   ,-7966   ,-12521  ,-10153  ,1751    ,6761    ,11163   ,14157   ,15426   ,15289   ,14672   ,14296   ,\n    14856   ,16846   ,20085   ,24268   ,28591   ,31605   ,32765   ,31899   ,28991   ,24550   ,19261   ,14523   ,11202   ,9604    ,9715    ,\n    10790   ,11889   ,12352   ,11520   ,9191    ,5744    ,2019    ,-896    ,-2395   ,-2136   ,95      ,4116    ,8788    ,13513   ,17257   ,\n    18764   ,18345   ,16553   ,14046   ,11809   ,10502   ,10498   ,11604   ,13478   ,15312   ,16164   ,15056   ,11611   ,6749    ,1644    ,\n    -3020   ,-8239   ,-13548  ,-17215  ,-18625  ,-18037  ,-16365  ,-14769  ,-13906  ,-14069  ,-15698  ,-18287  ,-21046  ,-23320  ,-23782  ,\n    -22029  ,-18399  ,-13420  ,-8112   ,-3789   ,-1023   ,-198    ,-1373   ,-3932   ,-7376   ,-10570  ,-12426  ,-12658  ,-11664  ,-10084  ,\n    -8586   ,-8198   ,-9655   ,-12992  ,-17664  ,-22956  ,-27970  ,-31398  ,-32765  ,-31662  ,-28520  ,-24238  ,-20070  ,-16843  ,-15035  ,\n    -14538  ,-15021  ,-15769  ,-15820  ,-14482  ,-11531  ,-7379   ,-2875   ,1861    ,6125    ,9084    ,10462   ,10200   ,8329    ,5723    ,\n    3201    ,1281    ,637     ,1235    ,2396    ,3826    ,4230    ,3039    ,603     ,-2456   ,-5460   ,-7505   ,-7822   ,-6392   ,-3197   ,\n    1037    ,5459    ,9512    ,12531   ,14207   ,14595   ,14350   ,14137   ,14631   ,16195   ,18832   ,22165   ,25641   ,28624   ,30022   ,\n    29694   ,27538   ,23895   ,19522   ,15325   ,12075   ,10136   ,9596    ,10080   ,10974   ,11362   ,10762   ,9050    ,6398    ,3255    ,\n    583     ,-1114   ,-1209   ,418     ,3511    ,7488    ,11573   ,14923   ,16771   ,16960   ,15811   ,13886   ,11828   ,10532   ,10216   ,\n    10851   ,12258   ,13791   ,14608   ,13973   ,11314   ,7348    ,2891    ,-1863   ,-6316   ,-10953  ,-14776  ,-16677  ,-16670  ,-15671  ,\n    -14343  ,-13399  ,-13429  ,-14507  ,-16526  ,-19007  ,-21067  ,-21746  ,-20611  ,-17787  ,-13758  ,-9011   ,-4816   ,-1808   ,-400    ,\n    -1102   ,-3167   ,-5876   ,-8688   ,-10727  ,-11388  ,-10830  ,-9614   ,-8343   ,-7848   ,-8832   ,-11381  ,-15419  ,-20158  ,-24824  ,\n    -28570  ,-30310  ,-29740  ,-27493  ,-23979  ,-20067  ,-16768  ,-14609  ,-13758  ,-13905  ,-14396  ,-14510  ,-13513  ,-11002  ,-6831   ,\n    -1472   ,4062    ,8681    ,11582   ,12347   ,11200   ,8735    ,5553    ,2575    ,528     ,7       ,1285    ,3595    ,5255    ,5150    ,\n    3331    ,77      ,-3687   ,-6993   ,-9105   ,-8964   ,-6702   ,-2744   ,5776    ,15999   ,20758   ,23080   ,23898   ,24299   ,24542   ,\n    25038   ,25205   ,23288   ,18225   ,13508   ,14078   ,20368   ,24379   ,17742   ,6686    ,-2514   ,-9591   ,-13865  ,-13566  ,-8294   ,\n    -350    ,6744    ,11598   ,15176   ,20417   ,25317   ,23845   ,15459   ,11141   ,16143   ,23770   ,28379   ,29543   ,29755   ,28855   ,\n    26623   ,22578   ,17237   ,11380   ,5962    ,1576    ,981     ,9667    ,25005   ,32765   ,29879   ,22610   ,15932   ,12295   ,9938    ,\n    8751    ,8303    ,8558    ,9031    ,10110   ,12860   ,17590   ,19803   ,16612   ,8751    ,244     ,1713    ,5089    ,7536    ,12485   ,\n    19897   ,27079   ,31741   ,32598   ,29497   ,24307   ,18531   ,11940   ,4594    ,2922    ,5546    ,4387    ,3624    ,1878    ,-1077   ,\n    -1818   ,-2166   ,-2127   ,-2090   ,-1763   ,-1119   ,666     ,4433    ,9430    ,13064   ,18599   ,25115   ,27121   ,28928   ,25222   ,\n    16491   ,8580    ,2314    ,-609    ,-601    ,1720    ,5136    ,9297    ,14379   ,19531   ,22050   ,22557   ,21327   ,18561   ,21743   ,\n    25023   ,25145   ,25713   ,26645   ,27831   ,28940   ,29612   ,29027   ,26317   ,20161   ,9738    ,-2441   ,-6671   ,-490    ,4649    ,\n    8256    ,9580    ,10209   ,11457   ,11482   ,10867   ,9844    ,9129    ,8634    ,8967    ,11796   ,17299   ,21272   ,19265   ,10985   ,\n    5037    ,6397    ,7192    ,3078    ,-2631   ,-5851   ,-4801   ,836     ,8258    ,14279   ,16870   ,14504   ,6797    ,-489    ,-11     ,\n    7335    ,10082   ,5047    ,-1179   ,-4436   ,-5400   ,-6887   ,-9063   ,-12396  ,-17236  ,-23190  ,-28291  ,-29409  ,-22378  ,-11290  ,\n    -6091   ,-7608   ,-6613   ,-2488   ,851     ,1496    ,-508    ,-2159   ,-3265   ,-3769   ,-3934   ,-3945   ,-4844   ,-8253   ,-14538  ,\n    -19155  ,-20207  ,-18563  ,-18679  ,-27303  ,-32765  ,-31482  ,-26301  ,-18856  ,-12016  ,-7905   ,-7573   ,-10890  ,-15963  ,-20900  ,\n    -23258  ,-22888  ,-26597  ,-31640  ,-31807  ,-32059  ,-30093  ,-27831  ,-27341  ,-27210  ,-27306  ,-27176  ,-27023  ,-26353  ,-25422  ,\n    -24326  ,-21312  ,-14335  ,-8583   ,-3726   ,1079    ,-992    ,-4012   ,-8216   ,-14268  ,-18958  ,-20443  ,-18846  ,-15293  ,-10765  ,\n    -6901   ,-5219   ,-4700   ,-2692   ,-728    ,2878    ,6274    ,2782    ,822     ,1826    ,2445    ,3426    ,4558    ,6041    ,7037    ,\n    7074    ,5244    ,1453    ,-1976   ,-3642   ,-8391   ,-15994  ,-14771  ,-6106   ,8526    ,9002    ,9222    ,10455   ,9530    ,4397    ,\n    -2999   ,-5180   ,-39     ,6064    ,8162    ,-1082   ,-10688  ,-5869   ,283     ,4936    ,7976    ,8945    ,6507    ,5237    ,8716    ,\n    11144   ,11901   ,17578   ,22383   ,19427   ,7153    ,-5366   ,-10765  ,-4679   ,16423   ,27450   ,25287   ,20533   ,16051   ,16921   ,\n    19616   ,22078   ,21975   ,19805   ,14922   ,3635    ,-7907   ,1563    ,17070   ,20254   ,16765   ,12643   ,15247   ,20812   ,26042   ,\n    26617   ,26539   ,31878   ,32765   ,20614   ,12635   ,10691   ,10727   ,12066   ,12621   ,11462   ,9457    ,9374    ,10571   ,11387   ,\n    11686   ,11942   ,14271   ,18063   ,20367   ,15908   ,4400    ,-1734   ,1810    ,1413    ,2672    ,6178    ,7450    ,7742    ,6724    ,\n    2710    ,4349    ,18910   ,30790   ,23894   ,11195   ,8215    ,4348    ,2188    ,1854    ,3108    ,2846    ,408     ,-1595   ,-981    ,\n    6586    ,23862   ,32562   ,28662   ,25388   ,16580   ,9496    ,8528    ,7347    ,7058    ,11690   ,16804   ,12965   ,7043    ,4408    ,\n    5259    ,9240    ,17578   ,27460   ,28605   ,19041   ,18504   ,22153   ,24420   ,28426   ,25186   ,19931   ,17164   ,14653   ,10650   ,\n    7367    ,15213   ,29990   ,28030   ,23965   ,20186   ,14642   ,11692   ,13537   ,17149   ,21021   ,22717   ,11857   ,-669    ,115     ,\n    12766   ,20550   ,25352   ,28823   ,29530   ,26966   ,25583   ,28806   ,29559   ,26098   ,21949   ,13137   ,6357    ,7466    ,7234    ,\n    782     ,-3364   ,1575    ,6298    ,5854    ,4291    ,3006    ,5434    ,8874    ,12228   ,14606   ,16976   ,17916   ,10902   ,-3461   ,\n    -6851   ,-8283   ,-8561   ,2427    ,13467   ,16609   ,12689   ,5535    ,-2326   ,-6919   ,-4167   ,-4543   ,-18187  ,-27834  ,-30498  ,\n    -29950  ,-24111  ,-12273  ,768     ,2122    ,-13688  ,-27641  ,-26812  ,-17064  ,-2588   ,6330    ,9482    ,9290    ,2340    ,-11025  ,\n    -18864  ,-17759  ,-22504  ,-27448  ,-30607  ,-32765  ,-31784  ,-26996  ,-18079  ,-13375  ,-13608  ,-8980   ,-14831  ,-27250  ,-27153  ,\n    -26357  ,-25419  ,-24293  ,-21951  ,-21149  ,-21924  ,-21965  ,-20620  ,-17700  ,-8513   ,-1777   ,-3367   ,-7813   ,-9694   ,-14927  ,\n    -24907  ,-26224  ,-22815  ,-16794  ,-11334  ,-14666  ,-20407  ,-22793  ,-22204  ,-19378  ,-12816  ,-2761   ,2227    ,-6393   ,-9988   ,\n    -1191   ,4832    ,346     ,-2181   ,-4911   ,-10179  ,-13370  ,-15773  ,-17098  ,-7543   ,5315    ,8099    ,7728    ,5273    ,6884    ,\n    10443   ,11733   ,17778   ,22689   ,16416   ,1965    ,-9341   ,-9061   ,10579   ,27036   ,25853   ,20146   ,16325   ,18089   ,21185   ,\n    22658   ,20928   ,15478   ,3355    ,-7002   ,5348    ,19306   ,19200   ,14029   ,13879   ,19983   ,25680   ,26713   ,27016   ,32765   ,\n    27774   ,15917   ,10944   ,10632   ,11887   ,12559   ,11066   ,9325    ,9761    ,10966   ,11503   ,11774   ,13961   ,18081   ,19722   ,\n    12758   ,872     ,-434    ,1251    ,1368    ,5360    ,7129    ,7526    ,5735    ,2185    ,11010   ,27412   ,27748   ,13736   ,7703    ,\n    3579    ,1697    ,1762    ,2608    ,1008    ,-1677   ,-1309   ,6774    ,25041   ,32618   ,28110   ,21426   ,11983   ,8563    ,7453    ,\n    7133    ,11855   ,15651   ,10820   ,5403    ,4412    ,7525    ,15607   ,26082   ,26834   ,19027   ,20390   ,23300   ,26456   ,26552   ,\n    20889   ,17294   ,14282   ,9544    ,6885    ,20315   ,28646   ,25451   ,21415   ,15291   ,11924   ,13964   ,18119   ,21864   ,17181   ,\n    3185    ,-1445   ,10860   ,20389   ,25731   ,29098   ,28801   ,26000   ,27368   ,29641   ,26668   ,21518   ,12572   ,6871    ,8188    ,\n    4751    ,-1779   ,-87     ,5728    ,5684    ,3770    ,3171    ,6339    ,10159   ,13400   ,16128   ,17977   ,10816   ,-3501   ,-7215   ,\n    -9053   ,-4360   ,8504    ,15762   ,13458   ,5895    ,-2610   ,-6447   ,-4127   ,-10557  ,-24584  ,-30156  ,-30488  ,-25087  ,-12253  ,\n    -213    ,-3342   ,-21704  ,-29248  ,-20905  ,-6293   ,5353    ,9006    ,7752    ,-1362   ,-15969  ,-19480  ,-21014  ,-26361  ,-30451  ,\n    -32765  ,-31385  ,-25069  ,-15980  ,-13575  ,-10827  ,-12931  ,-26344  ,-27762  ,-26318  ,-25318  ,-23560  ,-21535  ,-21691  ,-22154  ,\n    -20926  ,-17834  ,-8401   ,-2665   ,-5247   ,-9244   ,-11974  ,-20996  ,-25688  ,-23119  ,-16594  ,-12579  ,-16891  ,-21945  ,-22610  ,\n    -20137  ,-14092  ,-3573   ,1201    ,-6956   ,-7494   ,1791    ,2618    ,-1364   ,-4280   ,-9804   ,-13418  ,-15924  ,-14380  ,-1169   ,\n    8828    ,8556    ,10053   ,9075    ,3727    ,-3760   ,-4224   ,1943    ,8126    ,3615    ,-7896   ,-6976   ,-672    ,-5632   ,-13355  ,\n    -19756  ,-20664  ,-14143  ,225     ,15963   ,16490   ,1636    ,-5931   ,-991    ,4687    ,2641    ,-3078   ,-10931  ,-18846  ,-22837  ,\n    -20116  ,-8236   ,3535    ,121     ,-10548  ,-15228  ,-9087   ,2275    ,3023    ,900     ,747     ,4100    ,29583   ,32765   ,30110   ,\n    31470   ,32639   ,32155   ,31250   ,30303   ,29364   ,28267   ,27151   ,25764   ,24523   ,22968   ,21527   ,19836   ,18497   ,16729   ,\n    15178   ,13488   ,12056   ,10209   ,8469    ,6496    ,4785    ,2959    ,1208    ,-700    ,-2304   ,-4239   ,-5908   ,-7796   ,-9318   ,\n    -11303  ,-13083  ,-15162  ,-16946  ,-18748  ,-20242  ,-22001  ,-23548  ,-24930  ,-16343  ,10349   ,28672   ,28651   ,26040   ,25816   ,\n    25372   ,24471   ,23559   ,22458   ,21434   ,20033   ,18804   ,17414   ,16058   ,14400   ,13015   ,11458   ,9894    ,8010    ,6523    ,\n    4789    ,3310    ,1503    ,-36     ,-2088   ,-3868   ,-5784   ,-7514   ,-9396   ,-11010  ,-12781  ,-14403  ,-16356  ,-18175  ,-20013  ,\n    -21625  ,-23480  ,-25047  ,-26671  ,-28078  ,-29818  ,-31362  ,-32765  ,-23915  ,8660    ,28039   ,28498   ,25901   ,26293   ,25930   ,\n    25205   ,24488   ,23476   ,22519   ,21285   ,20252   ,18764   ,17442   ,15853   ,14567   ,13012   ,11505   ,9797    ,8297    ,6476    ,\n    4766    ,3010    ,1401    ,-422    ,-2043   ,-3767   ,-5329   ,-7199   ,-8906   ,-10693  ,-12411  ,-14478  ,-16248  ,-17862  ,-19369  ,\n    -21159  ,-22737  ,-24455  ,-22823  ,-2048   ,23774   ,29333   ,26851   ,27246   ,28341   ,27953   ,26950   ,26021   ,24947   ,23720   ,\n    22381   ,21092   ,19777   ,18371   ,16858   ,15208   ,13722   ,12026   ,10434   ,8790    ,7149    ,5324    ,3581    ,1714    ,47      ,\n    -1692   ,-3428   ,-5231   ,-6910   ,-8631   ,-10381  ,-12194  ,-13982  ,-15647  ,-17330  ,-19128  ,-21030  ,-22736  ,-24255  ,-25884  ,\n    -27777  ,-29366  ,-25842  ,-1077   ,27137   ,31926   ,28772   ,28157   ,28091   ,27613   ,26778   ,25886   ,24798   ,23577   ,22292   ,\n    21002   ,19632   ,18224   ,16811   ,15366   ,13903   ,12290   ,10693   ,9113    ,7419    ,5653    ,3868    ,1981    ,278     ,-1423   ,\n    -3116   ,-4872   ,-6520   ,-8238   ,-9927   ,-11896  ,-13929  ,-15768  ,-17353  ,-19057  ,-20655  ,-22199  ,-23720  ,-25380  ,-27032  ,\n    -27028  ,-9668   ,17292   ,26086   ,23679   ,22766   ,22598   ,21997   ,21006   ,20282   ,19029   ,17884   ,16640   ,15430   ,13880   ,\n    12548   ,11093   ,9711    ,8189    ,6694    ,5022    ,3501    ,1701    ,-20     ,-1843   ,-3424   ,-5235   ,-6762   ,-8462   ,-10004  ,\n    -11780  ,-13369  ,-15067  ,-16840  ,-18774  ,-20453  ,-22090  ,-23534  ,-25137  ,-26612  ,-28006  ,-23009  ,655     ,6223    ,11459   ,\n    16767   ,22481   ,27890   ,31526   ,31796   ,27788   ,20165   ,12221   ,5912    ,1695    ,-1044   ,-3185   ,-4818   ,-5168   ,-2651   ,\n    3225    ,9480    ,12595   ,11728   ,9217    ,6364    ,3030    ,-1597   ,-8433   ,-16897  ,-25052  ,-30201  ,-30248  ,-26872  ,-22022  ,\n    -17050  ,-12639  ,-8643   ,-4646   ,-443    ,3203    ,4605    ,2116    ,-3873   ,-9892   ,-12984  ,-13687  ,-13188  ,-12142  ,-10194  ,\n    -6035   ,1664    ,11921   ,20800   ,26324   ,28903   ,29762   ,29544   ,28454   ,26238   ,22443   ,16889   ,10605   ,5505    ,3921    ,\n    7051    ,12232   ,16876   ,19896   ,21676   ,23339   ,25432   ,26907   ,24606   ,17451   ,8319    ,486     ,-4866   ,-8847   ,-12397  ,\n    -15536  ,-17425  ,-16841  ,-13111  ,-6989   ,-906    ,2434    ,2494    ,84      ,-3425   ,-6953   ,-10531  ,-14744  ,-20301  ,-26967  ,\n    -32179  ,-32765  ,-28474  ,-22350  ,-17142  ,-12696  ,-7734   ,-1184   ,6119    ,11772   ,13461   ,10744   ,6606    ,3198    ,1238    ,\n    429     ,69      ,-245    ,-424    ,137     ,2391    ,6586    ,11440   ,13868   ,11742   ,6841    ,1612    ,-2842   ,-6997   ,-11850  ,\n    -17999  ,-23907  ,-25160  ,-20701  ,-12893  ,-4483   ,3368    ,10478   ,17056   ,23114   ,27826   ,29716   ,27296   ,19869   ,8453    ,\n    -3519   ,-13515  ,-20850  ,-25929  ,-29211  ,-30840  ,-30029  ,-25068  ,-15402  ,-4620   ,3669    ,8438    ,11668   ,14580   ,16694   ,\n    17176   ,14705   ,9928    ,4598    ,1653    ,2877    ,6715    ,11343   ,15310   ,17933   ,19655   ,20876   ,21822   ,21911   ,19456   ,\n    12808   ,2510    ,-7828   ,-15108  ,-19852  ,-23235  ,-25847  ,-27367  ,-26250  ,-21253  ,-13367  ,-6648   ,-3169   ,-2321   ,-3010   ,\n    -4428   ,-6396   ,-9182   ,-13297  ,-18984  ,-25048  ,-29590  ,-30137  ,-25510  ,-18600  ,-12072  ,-6994   ,-3005   ,1136    ,5851    ,\n    10197   ,10707   ,6386    ,97      ,-4594   ,-6683   ,-7396   ,-7509   ,-7194   ,-5701   ,-1702   ,5441    ,14891   ,24043   ,30220   ,\n    32765   ,32639   ,31136   ,29132   ,26665   ,23140   ,17767   ,10626   ,4549    ,2638    ,5190    ,8808    ,10867   ,11690   ,12558   ,\n    14502   ,16728   ,17012   ,13075   ,4623    ,-5150   ,-13678  ,-20349  ,-25043  ,-28422  ,-30746  ,-31815  ,-30887  ,-26860  ,-19724  ,\n    -11027  ,-4081   ,-1284   ,-1090   ,-1277   ,-1093   ,-1458   ,-3577   ,-8008   ,-13172  ,-14752  ,-11468  ,-5471   ,1036    ,4920    ,\n    3067    ,-1309   ,-7194   ,-15242  ,-11098  ,8966    ,16140   ,5533    ,-468    ,-3916   ,-1267   ,8202    ,16947   ,20512   ,22557   ,\n    25087   ,26552   ,18549   ,1262    ,816     ,18763   ,27537   ,30904   ,31235   ,32056   ,32762   ,27932   ,17105   ,11557   ,14125   ,\n    22690   ,31851   ,25840   ,10535   ,7996    ,12882   ,15419   ,19591   ,23030   ,22468   ,15930   ,7954    ,3680    ,3704    ,6299    ,\n    15887   ,26726   ,23042   ,11455   ,7957    ,4917    ,1226    ,-1002   ,-952    ,-2039   ,-3903   ,-3265   ,-1152   ,-3993   ,-7361   ,\n    443     ,14891   ,19432   ,17627   ,14859   ,15700   ,16290   ,10273   ,2177    ,1860    ,6108    ,6126    ,59      ,-9428   ,-16089  ,\n    -18132  ,-20450  ,-24179  ,-23807  ,-23412  ,-24091  ,-18096  ,-5643   ,1171    ,1066    ,-728    ,-920    ,-983    ,-5350   ,-10486  ,\n    -7759   ,-1554   ,557     ,-1506   ,-3913   ,-11361  ,-24489  ,-31025  ,-27151  ,-24115  ,-21061  ,-16977  ,-12969  ,-12362  ,-17776  ,\n    -26743  ,-30826  ,-30778  ,-30589  ,-25171  ,-11592  ,-4172   ,-11353  ,-19205  ,-22219  ,-24846  ,-27184  ,-26244  ,-18902  ,-5246   ,\n    4468    ,6954    ,7806    ,4232    ,-8854   ,-19262  ,-9567   ,4479    ,10639   ,14592   ,16062   ,16402   ,9583    ,-5051   ,-14167  ,\n    -13914  ,-11316  ,-3585   ,8978    ,19736   ,12594   ,-3989   ,-8733   ,-6380   ,-5476   ,-3986   ,2976    ,15692   ,24041   ,24221   ,\n    21028   ,17098   ,10572   ,3853    ,10006   ,28003   ,32765   ,29072   ,27646   ,29733   ,29757   ,21955   ,16498   ,18279   ,21840   ,\n    25520   ,29051   ,32115   ,28547   ,15224   ,6948    ,9697    ,9825    ,6101    ,4785    ,8826    ,10891   ,7342    ,3721    ,2352    ,\n    1202    ,769     ,5967    ,18468   ,28151   ,25316   ,22782   ,25397   ,27735   ,25088   ,23270   ,22950   ,18497   ,11626   ,8252    ,\n    8547    ,7283    ,-1645   ,-10146  ,-9633   ,-5254   ,-7089   ,-12701  ,-14409  ,-8895   ,1961    ,8548    ,8240    ,8951    ,10270   ,\n    7358    ,4642    ,4612    ,2615    ,-2291   ,-6234   ,-7302   ,-10229  ,-20338  ,-26470  ,-18104  ,-7713   ,-5998   ,-10026  ,-17849  ,\n    -23156  ,-23522  ,-21369  ,-17371  ,-13775  ,-10588  ,-6653   ,-9267   ,-23702  ,-32296  ,-26592  ,-23213  ,-25663  ,-31515  ,-32765  ,\n    -30226  ,-29901  ,-31651  ,-32145  ,-29394  ,-21129  ,-7198   ,-5462   ,-21007  ,-29080  ,-28280  ,-27473  ,-22361  ,-10617  ,2326    ,\n    13833   ,20882   ,22668   ,22834   ,21061   ,17290   ,14555   ,15497   ,17340   ,13790   ,5436    ,-419    ,2       ,4496    ,9959    ,\n    13144   ,12613   ,7720    ,1066    ,-1205   ,1738    ,3230    ,3172    ,3747    ,4858    ,4772    ,5729    ,11313   ,20617   ,26708   ,\n    28023   ,26366   ,23316   ,22164   ,24252   ,28678   ,32765   ,31832   ,27659   ,25435   ,26488   ,28289   ,28292   ,26259   ,21858   ,\n    14813   ,7782    ,3952    ,2954    ,2316    ,1798    ,1403    ,1316    ,2439    ,5823    ,11448   ,17271   ,20598   ,21457   ,21899   ,\n    23103   ,24647   ,25005   ,24094   ,21536   ,17251   ,12747   ,9301    ,5718    ,907     ,-4030   ,-7373   ,-9376   ,-10648  ,-10738  ,\n    -9517   ,-7465   ,-4176   ,1214    ,6712    ,9803    ,10655   ,10785   ,10530   ,9341    ,6472    ,986     ,-7978   ,-17512  ,-23939  ,\n    -27146  ,-29170  ,-31020  ,-32566  ,-32765  ,-29124  ,-20894  ,-11507  ,-6209   ,-4846   ,-4515   ,-4413   ,-3814   ,-3754   ,-7249   ,\n    -15938  ,-25811  ,-29984  ,-30546  ,-30769  ,-30763  ,-31201  ,-31077  ,-26835  ,-15879  ,-3763   ,1667    ,4601    ,8137    ,10805   ,\n    12164   ,11808   ,6591    ,-5597   ,-16086  ,-18770  ,-19300  ,-21753  ,-24002  ,-24426  ,-22221  ,-14994  ,-1614   ,8037    ,9581    ,\n    10382   ,14702   ,19646   ,22399   ,21442   ,14656   ,4056    ,-678    ,2639    ,5006    ,2968    ,-850    ,-3529   ,-1769   ,5977    ,\n    15604   ,18813   ,14684   ,12140   ,12906   ,15451   ,17574   ,15739   ,9584    ,3308    ,4077    ,11452   ,17055   ,19440   ,19433   ,\n    18503   ,19532   ,23651   ,27628   ,25305   ,18656   ,13305   ,10291   ,9285    ,9112    ,7596    ,3600    ,-314    ,187     ,3631    ,\n    6643    ,8618    ,9237    ,8974    ,9031    ,10606   ,12124   ,10789   ,7163    ,3053    ,-1438   ,-5923   ,-9650   ,-12887  ,-16783  ,\n    -20660  ,-22783  ,-23109  ,-22651  ,-20927  ,-17597  ,-13628  ,-10141  ,-6699   ,-3371   ,-1164   ,-331    ,29      ,213     ,-993    ,\n    -4642   ,-9394   ,-13812  ,-17653  ,-20030  ,-20646  ,-21259  ,-23818  ,-27947  ,-29888  ,-28433  ,-25558  ,-23102  ,-22488  ,-23364  ,\n    -23969  ,-22135  ,-16152  ,-8171   ,-2416   ,-508    ,-175    ,371     ,888     ,792     ,959     ,754     ,-3441   ,-11543  ,-18021  ,\n    -20344  ,-19711  ,-16729  ,-13243  ,-13064  ,-17168  ,-22232  ,-22234  ,-16380  ,-11680  ,-10441  ,-11449  ,-11406  ,-9351   ,-5278   ,\n    -1630   ,-476    ,253     ,780     ,1098    ,131     ,-1276   ,-2947   ,-4107   ,-4057   ,-1946   ,2196    ,6923    ,10483   ,9229    ,\n    5494    ,1366    ,3449    ,8596    ,14810   ,15751   ,12985   ,7891    ,7034    ,10298   ,16698   ,20727   ,22193   ,21200   ,19619   ,\n    17978   ,16567   ,15759   ,15592   ,16312   ,17140   ,18382   ,20251   ,22806   ,25503   ,27773   ,29010   ,28994   ,27364   ,24765   ,\n    22444   ,22613   ,25965   ,30253   ,32082   ,30110   ,26532   ,24791   ,25867   ,28876   ,32074   ,32765   ,31431   ,29480   ,27958   ,\n    26680   ,25476   ,25738   ,27033   ,27707   ,27761   ,27502   ,27364   ,26952   ,26499   ,26594   ,27564   ,28972   ,29833   ,29706   ,\n    28950   ,28644   ,28441   ,28063   ,27386   ,27450   ,27873   ,27511   ,26972   ,26739   ,26867   ,26422   ,25300   ,24488   ,24148   ,\n    24503   ,25596   ,25632   ,24596   ,23887   ,23945   ,24357   ,23845   ,23268   ,23024   ,22783   ,22474   ,21943   ,21402   ,20761   ,\n    19523   ,17131   ,14288   ,12543   ,13624   ,16142   ,17964   ,16727   ,13369   ,9825    ,7982    ,9078    ,12279   ,14110   ,12734   ,\n    8296    ,4358    ,1863    ,1251    ,2562    ,4748    ,6414    ,6836    ,6685    ,6479    ,5876    ,4835    ,3307    ,1069    ,-1913   ,\n    -5322   ,-8351   ,-9443   ,-8095   ,-4959   ,-2032   ,-1574   ,-5127   ,-10445  ,-14478  ,-13504  ,-9299   ,-5941   ,-7302   ,-12597  ,\n    -18065  ,-19172  ,-16425  ,-12056  ,-9997   ,-10498  ,-13074  ,-16541  ,-19760  ,-22037  ,-23492  ,-24423  ,-25088  ,-25436  ,-25342  ,\n    -24707  ,-23286  ,-21409  ,-19596  ,-18990  ,-20554  ,-24199  ,-27956  ,-30014  ,-29138  ,-26375  ,-23824  ,-23239  ,-26170  ,-30195  ,\n    -32147  ,-30693  ,-27499  ,-25630  ,-25678  ,-27602  ,-30742  ,-32531  ,-32765  ,-31980  ,-32004  ,-32652  ,-32733  ,-32584  ,-32444  ,\n    -32500  ,-32281  ,-31911  ,-31753  ,-31822  ,-31655  ,-30674  ,-29509  ,-28948  ,-30051  ,-30868  ,-30791  ,-29722  ,-29381  ,-29652  ,\n    -29292  ,-28804  ,-28467  ,-28300  ,-28359  ,-28554  ,-28566  ,-28096  ,-27206  ,-26468  ,-24934  ,-22996  ,-22597  ,-22985  ,-23325  ,\n    -22600  ,-21729  ,-21043  ,-19890  ,-18802  ,-18203  ,-18910  ,-20431  ,-22207  ,-22945  ,-22533  ,-20903  ,-18112  ,-15411  ,-13710  ,\n    -16355  ,-19424  ,-20453  ,-16991  ,-12380  ,-9615   ,-9837   ,-12429  ,-16119  ,-16693  ,-15248  ,-12521  ,-10164  ,-7677   ,-4659   ,\n    -2761   ,678     ,7880    ,7168    ,5400    ,3587    ,3295    ,2588    ,3648    ,9782    ,11813   ,10000   ,6874    ,9650    ,15231   ,\n    12538   ,11032   ,12636   ,20872   ,21036   ,13045   ,11292   ,13805   ,19114   ,20627   ,22212   ,24858   ,21769   ,19105   ,19515   ,\n    24767   ,26954   ,22302   ,22535   ,25744   ,29473   ,24054   ,18464   ,22623   ,27295   ,28797   ,24359   ,23338   ,25079   ,27661   ,\n    30022   ,31289   ,29227   ,28257   ,28977   ,31233   ,30732   ,28602   ,30746   ,32765   ,32693   ,27697   ,25609   ,27422   ,28222   ,\n    28710   ,29426   ,31593   ,32614   ,30744   ,29472   ,29555   ,31203   ,30509   ,29435   ,29186   ,30114   ,30481   ,28651   ,27519   ,\n    27320   ,28355   ,28126   ,27497   ,27657   ,27611   ,27150   ,26265   ,26490   ,27115   ,26118   ,25066   ,24358   ,24637   ,24249   ,\n    23666   ,24661   ,25224   ,24668   ,23626   ,23284   ,23702   ,22517   ,20595   ,18420   ,17688   ,18230   ,19305   ,17583   ,15696   ,\n    15898   ,16758   ,15394   ,10343   ,11405   ,15145   ,18119   ,16294   ,13152   ,12843   ,10586   ,7192    ,4859    ,7262    ,10563   ,\n    8078    ,4177    ,2345    ,6687    ,5720    ,152     ,575     ,4843    ,9220    ,1558    ,-3626   ,-2763   ,381     ,2050    ,389     ,\n    -1523   ,-4940   ,-9486   ,-7262   ,-4721   ,-5185   ,-10133  ,-12184  ,-6894   ,-8413   ,-14152  ,-19819  ,-15341  ,-9504   ,-11701  ,\n    -15666  ,-18797  ,-19136  ,-18748  ,-17549  ,-14428  ,-16032  ,-20401  ,-21265  ,-18876  ,-16961  ,-22210  ,-23263  ,-18567  ,-17293  ,\n    -22181  ,-31079  ,-28125  ,-25356  ,-25208  ,-25286  ,-23623  ,-20900  ,-24121  ,-27812  ,-27884  ,-24807  ,-23988  ,-28041  ,-27829  ,\n    -25693  ,-24271  ,-28458  ,-32765  ,-30154  ,-28621  ,-28715  ,-30810  ,-30202  ,-28352  ,-27605  ,-27468  ,-27763  ,-28352  ,-28126  ,\n    -27414  ,-27893  ,-28431  ,-28405  ,-26512  ,-26330  ,-27888  ,-27638  ,-26475  ,-25233  ,-25996  ,-26388  ,-25786  ,-26231  ,-26370  ,\n    -25633  ,-24649  ,-24512  ,-25792  ,-24971  ,-23385  ,-22501  ,-24223  ,-25110  ,-22428  ,-19570  ,-17843  ,-18375  ,-18180  ,-17906  ,\n    -19647  ,-21271  ,-21605  ,-18687  ,-16772  ,-16878  ,-19324  ,-18317  ,-14544  ,-14794  ,-16740  ,-18451  ,-10889  ,-7083   ,-9430   ,\n    -12875  ,-12596  ,-7157   ,-5398   ,-6173   ,-8696   ,-10520  ,-9693   ,-5492   ,-4112   ,-4949   ,-7467   ,-3487   ,666     ,-3331   ,\n    -6815   ,-6074   ,2793    ,13795   ,20681   ,17060   ,13269   ,10560   ,3953    ,-3615   ,-9736   ,-1343   ,2819    ,1182    ,3940    ,\n    12598   ,25386   ,24640   ,20556   ,19883   ,22646   ,17738   ,859     ,-1848   ,2310    ,9446    ,8390    ,8593    ,23463   ,28709   ,\n    25582   ,16862   ,21997   ,30772   ,26181   ,12644   ,-535    ,5379    ,10509   ,13357   ,18048   ,25125   ,30718   ,20081   ,14109   ,\n    19352   ,31079   ,32765   ,18258   ,7355    ,4372    ,10504   ,16154   ,22313   ,28522   ,25751   ,17784   ,7907    ,13725   ,26175   ,\n    32643   ,26152   ,14433   ,6988    ,8055    ,15021   ,24702   ,28140   ,25616   ,12703   ,5239    ,5792    ,16854   ,25678   ,28216   ,\n    23384   ,14816   ,6846    ,11326   ,20282   ,29603   ,24602   ,14591   ,2341    ,33      ,3892    ,14046   ,22150   ,26034   ,23176   ,\n    14507   ,8305    ,11686   ,19806   ,25059   ,17885   ,5718    ,-6289   ,-4990   ,-134    ,8082    ,16372   ,21493   ,21087   ,13217   ,\n    7967    ,8568    ,15178   ,16974   ,11760   ,-2123   ,-11206  ,-11487  ,-6798   ,-615    ,6034    ,14105   ,17236   ,11080   ,6120    ,\n    5099    ,9626    ,9057    ,3046    ,-9323   ,-16455  ,-18709  ,-13919  ,-10926  ,-6609   ,4556    ,9830    ,8420    ,1692    ,487     ,\n    3785    ,2224    ,-5476   ,-17122  ,-22232  ,-22012  ,-17728  ,-20327  ,-19563  ,-10645  ,1798    ,6470    ,-2439   ,-4053   ,-3026   ,\n    -2036   ,-13424  ,-24594  ,-26799  ,-20784  ,-15690  ,-23532  ,-27583  ,-23781  ,-6258   ,-635    ,-3310   ,-7726   ,-8857   ,-10373  ,\n    -22113  ,-28983  ,-29121  ,-16508  ,-13841  ,-22638  ,-32444  ,-31066  ,-16504  ,-6632   ,-4218   ,-9881   ,-14955  ,-21452  ,-29392  ,\n    -29457  ,-22883  ,-10192  ,-13138  ,-22952  ,-32765  ,-30483  ,-20770  ,-10125  ,-8044   ,-12871  ,-22905  ,-29809  ,-31125  ,-22608  ,\n    -12452  ,-4793   ,-15287  ,-25488  ,-32576  ,-29518  ,-21291  ,-11997  ,-11387  ,-19017  ,-30889  ,-31024  ,-22761  ,-9205   ,-4902   ,\n    -7929   ,-19274  ,-28013  ,-31947  ,-26474  ,-17578  ,-11944  ,-16731  ,-25707  ,-29635  ,-20951  ,-8078   ,847     ,-3820   ,-12671  ,\n    -22615  ,-27649  ,-26916  ,-20569  ,-12565  ,-13862  ,-21232  ,-23841  ,-16123  ,-1511   ,5193    ,2839    ,-6699   ,-14562  ,-20493  ,\n    -20581  ,-12593  ,-9024   ,-13962  ,-15560  ,-9630   ,5120    ,11551   ,10938   ,4065    ,-1993   ,-8276   ,-14830  ,-13257  ,-7965   ,\n    -4303   ,-6008   ,-6863   ,1419    ,9552    ,16995   ,18996   ,17668   ,15752   ,17750   ,21861   ,23959   ,24602   ,23734   ,21213   ,\n    16947   ,12366   ,10824   ,9095    ,6832    ,4161    ,2760    ,2763    ,2662    ,2611    ,2686    ,3072    ,3636    ,4499    ,8066    ,\n    13939   ,21876   ,27961   ,29830   ,25075   ,20457   ,17853   ,19971   ,20114   ,20202   ,21512   ,25430   ,29602   ,32301   ,32765   ,\n    31133   ,26238   ,21288   ,16829   ,14170   ,11819   ,9920    ,8512    ,7842    ,7845    ,8450    ,10375   ,13591   ,19061   ,24757   ,\n    29700   ,30920   ,29451   ,25299   ,20778   ,16143   ,11905   ,9250    ,7981    ,7669    ,7751    ,8702    ,10971   ,14641   ,18774   ,\n    22828   ,25848   ,27720   ,28014   ,27405   ,25613   ,22561   ,18353   ,14200   ,11278   ,10349   ,10736   ,12566   ,14773   ,17267   ,\n    19743   ,21715   ,23024   ,23618   ,23071   ,21110   ,16849   ,10484   ,2967    ,-2894   ,-6114   ,-6568   ,-6727   ,-7531   ,-8749   ,\n    -8382   ,-6940   ,-4644   ,-1999   ,777     ,3527    ,5526    ,7494    ,9551    ,11329   ,12673   ,13232   ,13368   ,12867   ,11554   ,\n    9761    ,8056    ,6937    ,6932    ,7597    ,8701    ,9462    ,9797    ,9112    ,7611    ,4586    ,-810    ,-8171   ,-15594  ,-19861  ,\n    -19580  ,-16791  ,-16596  ,-18129  ,-20542  ,-21237  ,-22775  ,-25199  ,-26711  ,-26261  ,-23468  ,-20655  ,-18282  ,-16553  ,-14440  ,\n    -11926  ,-9080   ,-7043   ,-5325   ,-3893   ,-2817   ,-2167   ,-2190   ,-2194   ,-2233   ,-2345   ,-3030   ,-4515   ,-7141   ,-11792  ,\n    -17713  ,-24396  ,-28545  ,-29816  ,-25155  ,-21357  ,-19083  ,-19170  ,-18122  ,-16304  ,-15627  ,-16446  ,-18337  ,-20492  ,-23786  ,\n    -28005  ,-31456  ,-32765  ,-31052  ,-27172  ,-23132  ,-19898  ,-17267  ,-14645  ,-11840  ,-10516  ,-10088  ,-10589  ,-11972  ,-14361  ,\n    -18179  ,-22499  ,-26711  ,-29792  ,-30831  ,-29233  ,-25058  ,-19921  ,-14947  ,-11080  ,-8280   ,-6337   ,-6083   ,-6770   ,-8298   ,\n    -10739  ,-13970  ,-17741  ,-21352  ,-24476  ,-26842  ,-28079  ,-27533  ,-25472  ,-21942  ,-18475  ,-15530  ,-14366  ,-14769  ,-16974  ,\n    -19773  ,-22352  ,-24066  ,-24831  ,-24078  ,-21743  ,-15769  ,-8604   ,-1471   ,3844    ,4272    ,4405    ,4622    ,5725    ,4814    ,\n    1698    ,-1793   ,-4583   ,-6658   ,-9235   ,-11708  ,-13817  ,-14528  ,-14492  ,-13502  ,-11751  ,-9866   ,-8526   ,-8684   ,-9661   ,\n    -10845  ,-10471  ,-8645   ,-4977   ,\n#endif\n};\n\n#endif  // __PCM_SAMPLES_H\n"
  },
  {
    "path": "src/pcm_tiny.h",
    "content": "// Automatically generated by amy.headers.generate_pcm_header()\n#ifndef __PCM_H\n#define __PCM_H\n#define PCM_AMY_SAMPLE_RATE 22050\n#define PCM_BASE_SAMPLES 11\n#define PCM_BASE_LENGTH 51053\n#if defined(AMY_WAVETABLE)\n#define PCM_WAVETABLE_BASE PCM_BASE_SAMPLES\n#define PCM_WAVETABLE_SAMPLES 5\n#define PCM_WAVETABLE_LEN 16384\n#define PCM_LENGTH (PCM_BASE_LENGTH + (PCM_WAVETABLE_SAMPLES * PCM_WAVETABLE_LEN))\n#define PCM_MAP_ENTRIES (PCM_BASE_SAMPLES + PCM_WAVETABLE_SAMPLES)\n#else\n#define PCM_WAVETABLE_BASE PCM_BASE_SAMPLES\n#define PCM_WAVETABLE_SAMPLES 0\n#define PCM_WAVETABLE_LEN 0\n#define PCM_LENGTH PCM_BASE_LENGTH\n#define PCM_MAP_ENTRIES PCM_BASE_SAMPLES\n#endif\n#include \"pcm_samples_tiny.h\"\nconst uint16_t pcm_samples = PCM_MAP_ENTRIES;\nconst uint16_t pcm_wavetable_base = PCM_WAVETABLE_BASE;\nconst uint16_t pcm_wavetable_samples = PCM_WAVETABLE_SAMPLES;\nconst uint32_t pcm_wavetable_len = PCM_WAVETABLE_LEN;\nconst pcm_map_t pcm_map[PCM_MAP_ENTRIES] PROGMEM = {\n    /* [0] 0 */ {0, 707, 342, 684, 89}, /* 808-MARACA-D */\n    /* [1] 3 */ {707, 8186, 4282, 7439, 39}, /* 808-KIK 4-D */\n    /* [2] 8 */ {8893, 2766, 1377, 2744, 45}, /* 808-SNR 4-D */\n    /* [3] 11 */ {11659, 1311, 898, 1288, 52}, /* 808-SNR 7-D */\n    /* [4] 14 */ {12970, 2276, 1164, 2254, 51}, /* 808-SNR 10D */\n    /* [5] 16 */ {15246, 2872, 1430, 2849, 41}, /* 808-SNR 12-D */\n    /* [6] 17 */ {18118, 1751, 888, 1728, 53}, /* 808-C-HAT1-D */\n    /* [7] 18 */ {19869, 15400, 7815, 15377, 56}, /* 808-O-HAT1-D */\n    /* [8] 20 */ {35269, 8995, 4588, 8973, 61}, /* 808-LTOM M-D */\n    /* [9] 23 */ {44264, 3027, 1504, 3004, 94}, /* 808-DRYCLP-D */\n    /* [10] 25 */ {47291, 3762, 22, 1871, 69}, /* 808-CWBELL-D */\n#if defined(AMY_WAVETABLE)\n    /* [11] WT */ {51053, 16384, 0, 16384, 69}, /* 111.WAV */\n    /* [12] WT */ {67437, 16384, 0, 16384, 69}, /* BRAIDS01.WAV */\n    /* [13] WT */ {83821, 16384, 0, 16384, 69}, /* PPG_WA00.WAV */\n    /* [14] WT */ {100205, 16384, 0, 16384, 69}, /* SINE2SAW.WAV */\n    /* [15] WT */ {116589, 16384, 0, 16384, 69}, /* VIRAL.WAV */\n#endif\n};\n\n#endif  // __PCM_H\n"
  },
  {
    "path": "src/pico-audio/audio.cpp",
    "content": "#if (defined PICO_RP2350) || (defined PICO_RP2040)\n/*\n * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n#include <cstring>\n#include \"audio.h\"\n#include \"sample_conversion.h\"\n\n// ======================\n// == DEBUGGING =========\n\n#define ENABLE_AUDIO_ASSERTIONS\n\n#ifdef ENABLE_AUDIO_ASSERTIONS\n#define audio_assert(x) assert(x)\n#else\n#define audio_assert(x) (void)0\n#endif\n\ninline static audio_buffer_t *list_remove_head(audio_buffer_t **phead) {\n    audio_buffer_t *ab = *phead;\n\n    if (ab) {\n        *phead = ab->next;\n        ab->next = NULL;\n    }\n\n    return ab;\n}\n\ninline static audio_buffer_t *list_remove_head_with_tail(audio_buffer_t **phead,\n                                                              audio_buffer_t **ptail) {\n    audio_buffer_t *ab = *phead;\n\n    if (ab) {\n        *phead = ab->next;\n\n        if (!ab->next) {\n            audio_assert(*ptail == ab);\n            *ptail = NULL;\n        } else {\n            ab->next = NULL;\n        }\n    }\n\n    return ab;\n}\n\ninline static void list_prepend(audio_buffer_t **phead, audio_buffer_t *ab) {\n    audio_assert(ab->next == NULL);\n    audio_assert(ab != *phead);\n    ab->next = *phead;\n    *phead = ab;\n}\n\n// todo add a tail for these already sorted lists as we generally insert on the end\ninline static void list_append_with_tail(audio_buffer_t **phead, audio_buffer_t **ptail,\n                                         audio_buffer_t *ab) {\n    audio_assert(ab->next == NULL);\n    audio_assert(ab != *phead);\n    audio_assert(ab != *ptail);\n\n    if (!*phead) {\n        audio_assert(!*ptail);\n        *ptail = ab;\n        // insert at the beginning\n        list_prepend(phead, ab);\n    } else {\n        // insert at end\n        (*ptail)->next = ab;\n        *ptail = ab;\n    }\n}\n\naudio_buffer_t *get_free_audio_buffer(audio_buffer_pool_t *context, bool block) {\n    audio_buffer_t *ab;\n\n    do {\n        uint32_t save = spin_lock_blocking(context->free_list_spin_lock);\n        ab = list_remove_head(&context->free_list);\n        spin_unlock(context->free_list_spin_lock, save);\n        if (ab || !block) break;\n        __wfe();\n    } while (true);\n    return ab;\n}\n\nvoid queue_free_audio_buffer(audio_buffer_pool_t *context, audio_buffer_t *ab) {\n    assert(!ab->next);\n    uint32_t save = spin_lock_blocking(context->free_list_spin_lock);\n    list_prepend(&context->free_list, ab);\n    spin_unlock(context->free_list_spin_lock, save);\n    __sev();\n}\n\naudio_buffer_t *get_full_audio_buffer(audio_buffer_pool_t *context, bool block) {\n    audio_buffer_t *ab;\n\n    do {\n        uint32_t save = spin_lock_blocking(context->prepared_list_spin_lock);\n        ab = list_remove_head_with_tail(&context->prepared_list, &context->prepared_list_tail);\n        spin_unlock(context->prepared_list_spin_lock, save);\n        if (ab || !block) break;\n        __wfe();\n    } while (true);\n    return ab;\n}\n\nvoid queue_full_audio_buffer(audio_buffer_pool_t *context, audio_buffer_t *ab) {\n    assert(!ab->next);\n    uint32_t save = spin_lock_blocking(context->prepared_list_spin_lock);\n    list_append_with_tail(&context->prepared_list, &context->prepared_list_tail, ab);\n    spin_unlock(context->prepared_list_spin_lock, save);\n    __sev();\n}\n\nvoid producer_pool_give_buffer_default(audio_connection_t *connection, audio_buffer_t *buffer) {\n    queue_full_audio_buffer(connection->producer_pool, buffer);\n}\n\naudio_buffer_t *producer_pool_take_buffer_default(audio_connection_t *connection, bool block) {\n    return get_free_audio_buffer(connection->producer_pool, block);\n}\n\nvoid consumer_pool_give_buffer_default(audio_connection_t *connection, audio_buffer_t *buffer) {\n    queue_free_audio_buffer(connection->consumer_pool, buffer);\n}\n\naudio_buffer_t *consumer_pool_take_buffer_default(audio_connection_t *connection, bool block) {\n    return get_full_audio_buffer(connection->consumer_pool, block);\n}\n\nstatic audio_connection_t connection_default = {\n        .producer_pool_take = producer_pool_take_buffer_default,\n        .producer_pool_give = producer_pool_give_buffer_default,\n        .consumer_pool_take = consumer_pool_take_buffer_default,\n        .consumer_pool_give = consumer_pool_give_buffer_default,\n};\n\naudio_buffer_t *audio_new_buffer(audio_buffer_format_t *format, int buffer_sample_count) {\n    audio_buffer_t *buffer = (audio_buffer_t *) calloc(1, sizeof(audio_buffer_t));\n    audio_init_buffer(buffer, format, buffer_sample_count);\n    return buffer;\n}\n\nvoid audio_init_buffer(audio_buffer_t *audio_buffer, audio_buffer_format_t *format, int buffer_sample_count) {\n    audio_buffer->format = format;\n    audio_buffer->buffer = pico_buffer_alloc(buffer_sample_count * format->sample_stride);\n    audio_buffer->max_sample_count = buffer_sample_count;\n    audio_buffer->sample_count = 0;\n}\n\naudio_buffer_pool_t *\naudio_new_buffer_pool(audio_buffer_format_t *format, int buffer_count, int buffer_sample_count) {\n    audio_buffer_pool_t *ac = (audio_buffer_pool_t *) calloc(1, sizeof(audio_buffer_pool_t));\n    audio_buffer_t *audio_buffers = buffer_count ? (audio_buffer_t *) calloc(buffer_count,\n                                                                                       sizeof(audio_buffer_t)) : 0;\n    ac->format = format->format;\n    for (int i = 0; i < buffer_count; i++) {\n        audio_init_buffer(audio_buffers + i, format, buffer_sample_count);\n        audio_buffers[i].next = i != buffer_count - 1 ? &audio_buffers[i + 1] : NULL;\n    }\n    // todo one per channel?\n    ac->free_list_spin_lock = spin_lock_init(SPINLOCK_ID_AUDIO_FREE_LIST_LOCK);\n    ac->free_list = audio_buffers;\n    ac->prepared_list_spin_lock = spin_lock_init(SPINLOCK_ID_AUDIO_PREPARED_LISTS_LOCK);\n    ac->prepared_list = NULL;\n    ac->prepared_list_tail = NULL;\n    ac->connection = &connection_default;\n    return ac;\n}\n\naudio_buffer_t *audio_new_wrapping_buffer(audio_buffer_format_t *format, mem_buffer_t *buffer) {\n    audio_buffer_t *audio_buffer = (audio_buffer_t *) calloc(1, sizeof(audio_buffer_t));\n    if (audio_buffer) {\n        audio_buffer->format = format;\n        audio_buffer->buffer = buffer;\n        audio_buffer->max_sample_count = buffer->size / format->sample_stride;\n        audio_buffer->sample_count = 0;\n        audio_buffer->next = 0;\n    }\n    return audio_buffer;\n\n}\n\naudio_buffer_pool_t *\naudio_new_producer_pool(audio_buffer_format_t *format, int buffer_count, int buffer_sample_count) {\n    audio_buffer_pool_t *ac = audio_new_buffer_pool(format, buffer_count, buffer_sample_count);\n    ac->type = audio_buffer_pool::ac_producer;\n    return ac;\n}\n\naudio_buffer_pool_t *\naudio_new_consumer_pool(audio_buffer_format_t *format, int buffer_count, int buffer_sample_count) {\n    audio_buffer_pool_t *ac = audio_new_buffer_pool(format, buffer_count, buffer_sample_count);\n    ac->type = audio_buffer_pool::ac_consumer;\n    return ac;\n}\n\nvoid audio_complete_connection(audio_connection_t *connection, audio_buffer_pool_t *producer_pool,\n                               audio_buffer_pool_t *consumer_pool) {\n    assert(producer_pool->type == audio_buffer_pool::ac_producer);\n    assert(consumer_pool->type == audio_buffer_pool::ac_consumer);\n    producer_pool->connection = connection;\n    consumer_pool->connection = connection;\n    connection->producer_pool = producer_pool;\n    connection->consumer_pool = consumer_pool;\n}\n\nvoid give_audio_buffer(audio_buffer_pool_t *ac, audio_buffer_t *buffer) {\n    buffer->user_data = 0;\n    assert(ac->connection);\n    if (ac->type == audio_buffer_pool::ac_producer)\n        ac->connection->producer_pool_give(ac->connection, buffer);\n    else\n        ac->connection->consumer_pool_give(ac->connection, buffer);\n}\n\naudio_buffer_t *take_audio_buffer(audio_buffer_pool_t *ac, bool block) {\n    assert(ac->connection);\n    if (ac->type == audio_buffer_pool::ac_producer)\n        return ac->connection->producer_pool_take(ac->connection, block);\n    else\n        return ac->connection->consumer_pool_take(ac->connection, block);\n}\n\n// todo rename this - this is s16 to s16\naudio_buffer_t *mono_to_mono_consumer_take(audio_connection_t *connection, bool block) {\n    return consumer_pool_take<Mono<FmtS16>, Mono<FmtS16>>(connection, block);\n}\n\n// todo rename this - this is s16 to s16\naudio_buffer_t *stereo_to_stereo_consumer_take(audio_connection_t *connection, bool block) {\n    return consumer_pool_take<Stereo<FmtS16>, Stereo<FmtS16>>(connection, block);\n}\n\n// todo rename this - this is s16 to s16\naudio_buffer_t *mono_to_stereo_consumer_take(audio_connection_t *connection, bool block) {\n    return consumer_pool_take<Stereo<FmtS16>, Mono<FmtS16>>(connection, block);\n}\n\naudio_buffer_t *mono_s8_to_mono_consumer_take(audio_connection_t *connection, bool block) {\n    return consumer_pool_take<Mono<FmtS16>, Mono<FmtS8>>(connection, block);\n}\n\naudio_buffer_t *mono_s8_to_stereo_consumer_take(audio_connection_t *connection, bool block) {\n    return consumer_pool_take<Stereo<FmtS16>, Mono<FmtS8>>(connection, block);\n}\n\nvoid stereo_to_stereo_producer_give(audio_connection_t *connection, audio_buffer_t *buffer) {\n    return producer_pool_blocking_give<Stereo<FmtS16>, Stereo<FmtS16>>(connection, buffer);\n}\n\n#endif"
  },
  {
    "path": "src/pico-audio/audio.h",
    "content": "#if (defined PICO_RP2350) || (defined PICO_RP2040)\n/*\n * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n#ifndef _PICO_AUDIO_H\n#define _PICO_AUDIO_H\n\n#include \"pico.h\"\n#include \"buffer.h\"\n#include \"hardware/sync.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** \\file audio.h\n*  \\defgroup pico_audio pico_audio\n *\n * Common API for audio output\n *\n */\n\n// PICO_CONFIG: SPINLOCK_ID_AUDIO_FREE_LIST_LOCK, Spinlock number for the audio free list, min=0, max=31, default=6, group=audio\n#ifndef SPINLOCK_ID_AUDIO_FREE_LIST_LOCK\n#define SPINLOCK_ID_AUDIO_FREE_LIST_LOCK 6\n#endif\n\n// PICO_CONFIG: SPINLOCK_ID_AUDIO_PREPARED_LISTS_LOCK, Spinlock number for the audio prepared list, min=0, max=31, default=7, group=audio\n#ifndef SPINLOCK_ID_AUDIO_PREPARED_LISTS_LOCK\n#define SPINLOCK_ID_AUDIO_PREPARED_LISTS_LOCK 7\n#endif\n\n// PICO_CONFIG: PICO_AUDIO_NOOP, Enable/disable audio by forcing NOOPS, type=bool, default=0, group=audio\n#ifndef PICO_AUDIO_NOOP\n#define PICO_AUDIO_NOOP 0\n#endif\n\n\n#define AUDIO_BUFFER_FORMAT_PCM_S16 1          ///< signed 16bit PCM\n#define AUDIO_BUFFER_FORMAT_PCM_S8 2           ///< signed 8bit PCM\n#define AUDIO_BUFFER_FORMAT_PCM_U16 3          ///< unsigned 16bit PCM\n#define AUDIO_BUFFER_FORMAT_PCM_U8 4           ///< unsigned 8bit PCM\n\n/** \\brief Audio format definition\n */\ntypedef struct audio_format {\n    uint32_t sample_freq;      ///< Sample frequency in Hz\n    uint16_t format;           ///< Audio format \\ref audio_formats\n    uint16_t channel_count;    ///< Number of channels\n} audio_format_t;\n\n/** \\brief Audio buffer format definition\n */\ntypedef struct audio_buffer_format {\n    const audio_format_t *format;      ///< Audio format\n    uint16_t sample_stride;                 ///< Sample stride\n} audio_buffer_format_t;\n\n/** \\brief Audio buffer definition\n */\ntypedef struct audio_buffer {\n    mem_buffer_t *buffer;\n    const audio_buffer_format_t *format;\n    uint32_t sample_count;\n    uint32_t max_sample_count;\n    uint32_t user_data; // only valid while the user has the buffer\n    // private - todo make an internal version\n    struct audio_buffer *next;\n} audio_buffer_t;\n\ntypedef struct audio_connection audio_connection_t;\n\ntypedef struct audio_buffer_pool {\n    enum {\n        ac_producer, ac_consumer\n    } type;\n    const audio_format_t *format;\n    // private\n    audio_connection_t *connection;\n    spin_lock_t *free_list_spin_lock;\n    // ----- begin protected by free_list_spin_lock -----\n    audio_buffer_t *free_list;\n    spin_lock_t *prepared_list_spin_lock;\n    audio_buffer_t *prepared_list;\n    audio_buffer_t *prepared_list_tail;\n} audio_buffer_pool_t;\n\ntypedef struct audio_connection audio_connection_t;\n\nstruct audio_connection {\n    audio_buffer_t *(*producer_pool_take)(audio_connection_t *connection, bool block);\n\n    void (*producer_pool_give)(audio_connection_t *connection, audio_buffer_t *buffer);\n\n    audio_buffer_t *(*consumer_pool_take)(audio_connection_t *connection, bool block);\n\n    void (*consumer_pool_give)(audio_connection_t *connection, audio_buffer_t *buffer);\n\n    audio_buffer_pool_t *producer_pool;\n    audio_buffer_pool_t *consumer_pool;\n};\n\n/*! \\brief Allocate and initialise an audio producer pool\n *  \\ingroup pico_audio\n *\n * \\param format Format of the audio buffer\n * \\param buffer_count \\todo\n * \\param buffer_sample_count \\todo\n * \\return Pointer to an audio_buffer_pool\n */\naudio_buffer_pool_t *audio_new_producer_pool(audio_buffer_format_t *format, int buffer_count,\n                                                         int buffer_sample_count);\n\n/*! \\brief Allocate and initialise an audio consumer pool\n *  \\ingroup pico_audio\n *\n * \\param format Format of the audio buffer\n * \\param buffer_count\n * \\param buffer_sample_count\n * \\return Pointer to an audio_buffer_pool\n */\naudio_buffer_pool_t *audio_new_consumer_pool(audio_buffer_format_t *format, int buffer_count,\n                                                         int buffer_sample_count);\n\n/*! \\brief Allocate and initialise an audio wrapping buffer\n *  \\ingroup pico_audio\n *\n * \\param format Format of the audio buffer\n * \\param buffer \\todo\n * \\return Pointer to an audio_buffer\n */\naudio_buffer_t *audio_new_wrapping_buffer(audio_buffer_format_t *format, mem_buffer_t *buffer);\n\n/*! \\brief Allocate and initialise an new audio buffer\n *  \\ingroup pico_audio\n *\n * \\param format Format of the audio buffer\n * \\param buffer_sample_count \\todo\n * \\return Pointer to an audio_buffer\n */\naudio_buffer_t *audio_new_buffer(audio_buffer_format_t *format, int buffer_sample_count);\n\n/*! \\brief Initialise an audio buffer\n *  \\ingroup pico_audio\n *\n * \\param audio_buffer Pointer to an audio_buffer\n * \\param format Format of the audio buffer\n * \\param buffer_sample_count \\todo\n */\nvoid audio_init_buffer(audio_buffer_t *audio_buffer, audio_buffer_format_t *format, int buffer_sample_count);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n *\n * \\param ac \\todo\n * \\param buffer \\todo\n * \\return Pointer to an audio_buffer\n */\nvoid give_audio_buffer(audio_buffer_pool_t *ac, audio_buffer_t *buffer);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n *\n * \\return Pointer to an audio_buffer\n */\naudio_buffer_t *take_audio_buffer(audio_buffer_pool_t *ac, bool block);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n *\n */\nstatic inline void release_audio_buffer(audio_buffer_pool_t *ac, audio_buffer_t *buffer) {\n    buffer->sample_count = 0;\n    give_audio_buffer(ac, buffer);\n}\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n *\n * todo we are currently limited to 4095+1 input samples\n * step is fraction of an input sample per output sample * 0x1000 and should be < 0x1000 i.e. we we are up-sampling (otherwise results are undefined)\n */\nvoid audio_upsample(int16_t *input, int16_t *output, uint output_count, uint32_t step);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n * similar but the output buffer is word aligned, and we output an even number of samples.. this is slightly faster than the above\n * todo we are currently limited to 4095+1 input samples\n * step is fraction of an input sample per output sample * 0x1000 and should be < 0x1000 i.e. we we are up-sampling (otherwise results are undefined)\n */\nvoid audio_upsample_words(int16_t *input, int16_t *output_aligned, uint output_word_count, uint32_t step);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\nvoid audio_upsample_double(int16_t *input, int16_t *output, uint output_count, uint32_t step);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\nvoid audio_complete_connection(audio_connection_t *connection, audio_buffer_pool_t *producer,\n                                      audio_buffer_pool_t *consumer);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\naudio_buffer_t *get_free_audio_buffer(audio_buffer_pool_t *context, bool block);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\nvoid queue_free_audio_buffer(audio_buffer_pool_t *context, audio_buffer_t *ab);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\naudio_buffer_t *get_full_audio_buffer(audio_buffer_pool_t *context, bool block);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\nvoid queue_full_audio_buffer(audio_buffer_pool_t *context, audio_buffer_t *ab);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n *\n * generally an pico_audio connection uses 3 of the defaults and does the hard work in one of them\n */\nvoid consumer_pool_give_buffer_default(audio_connection_t *connection, audio_buffer_t *buffer);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\naudio_buffer_t *consumer_pool_take_buffer_default(audio_connection_t *connection, bool block);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\nvoid producer_pool_give_buffer_default(audio_connection_t *connection, audio_buffer_t *buffer);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\naudio_buffer_t *producer_pool_take_buffer_default(audio_connection_t *connection, bool block);\n\nenum audio_correction_mode {\n    none,\n    fixed_dither,\n    dither,\n    noise_shaped_dither,\n};\n\nstruct buffer_copying_on_consumer_take_connection {\n    struct audio_connection core;\n    audio_buffer_t *current_producer_buffer;\n    uint32_t current_producer_buffer_pos;\n};\n\nstruct producer_pool_blocking_give_connection {\n    audio_connection_t core;\n    audio_buffer_t *current_consumer_buffer;\n    uint32_t current_consumer_buffer_pos;\n};\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\naudio_buffer_t *mono_to_mono_consumer_take(audio_connection_t *connection, bool block);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\naudio_buffer_t *mono_s8_to_mono_consumer_take(audio_connection_t *connection, bool block);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\naudio_buffer_t *stereo_to_stereo_consumer_take(audio_connection_t *connection, bool block);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\naudio_buffer_t *mono_to_stereo_consumer_take(audio_connection_t *connection, bool block);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\naudio_buffer_t *mono_s8_to_stereo_consumer_take(audio_connection_t *connection, bool block);\n\n/*! \\brief \\todo\n *  \\ingroup pico_audio\n */\nvoid stereo_to_stereo_producer_give(audio_connection_t *connection, audio_buffer_t *buffer);\n\n// not worth a separate header for now\ntypedef struct __packed pio_audio_channel_config {\n    uint8_t base_pin;\n    uint8_t dma_channel;\n    uint8_t pio_sm;\n} pio_audio_channel_config_t;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif //_AUDIO_H\n#endif\n"
  },
  {
    "path": "src/pico-audio/audio_i2s.c",
    "content": "/*\n * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n#if (defined ARDUINO_ARCH_RP2040) || (defined ARDUINO_ARCH_RP2350)\n#include <stdio.h>\n\n#include \"audio_i2s.h\"\n#include \"audio_i2s.pio.h\"\n#include \"hardware/pio.h\"\n#include \"hardware/gpio.h\"\n#include \"hardware/dma.h\"\n#include \"hardware/irq.h\"\n#include \"hardware/clocks.h\"\n\n\nCU_REGISTER_DEBUG_PINS(audio_timing)\n\n// ---- select at most one ---\n//CU_SELECT_DEBUG_PINS(audio_timing)\n\n\n#if PICO_AUDIO_I2S_MONO_OUTPUT\n#define i2s_dma_configure_size DMA_SIZE_16\n#else\n#define i2s_dma_configure_size DMA_SIZE_32\n#endif\n\n#define audio_pio __CONCAT(pio, PICO_AUDIO_I2S_PIO)\n#define GPIO_FUNC_PIOx __CONCAT(GPIO_FUNC_PIO, PICO_AUDIO_I2S_PIO)\n#define DREQ_PIOx_TX0 __CONCAT(__CONCAT(DREQ_PIO, PICO_AUDIO_I2S_PIO), _TX0)\n\nstruct {\n    audio_buffer_t *playing_buffer;\n    uint32_t freq;\n    uint8_t pio_sm;\n    uint8_t dma_channel;\n} shared_state;\n\naudio_format_t pio_i2s_consumer_format;\naudio_buffer_format_t pio_i2s_consumer_buffer_format = {\n        .format = &pio_i2s_consumer_format,\n};\n\nstatic void __isr __time_critical_func(audio_i2s_dma_irq_handler)();\n\nconst audio_format_t *audio_i2s_setup(const audio_format_t *intended_audio_format,\n                                               const audio_i2s_config_t *config) {\n    uint func = GPIO_FUNC_PIOx;\n    gpio_set_function(config->data_pin, func);\n    gpio_set_function(config->clock_pin_base, func);\n    gpio_set_function(config->clock_pin_base + 1, func);\n\n#if PICO_PIO_USE_GPIO_BASE\n    if(config->data_pin >= 32 || config->clock_pin_base + 1 >= 32) {\n        assert(config->data_pin >= 16 && config->clock_pin_base >= 16);\n        pio_set_gpio_base(audio_pio, 16);\n    }\n#endif\n    uint8_t sm = shared_state.pio_sm = config->pio_sm;\n    pio_sm_claim(audio_pio, sm);\n\n\n    const struct pio_program *program =\n#if PICO_AUDIO_I2S_CLOCK_PINS_SWAPPED\n        &audio_i2s_swapped_program\n#else\n        &audio_i2s_program\n#endif\n        ;\n    uint offset = pio_add_program(audio_pio, program);\n\n    audio_i2s_program_init(audio_pio, sm, offset, config->data_pin, config->clock_pin_base);\n\n    __mem_fence_release();\n    uint8_t dma_channel = config->dma_channel;\n    dma_channel_claim(dma_channel);\n\n    shared_state.dma_channel = dma_channel;\n\n    dma_channel_config dma_config = dma_channel_get_default_config(dma_channel);\n\n    channel_config_set_dreq(&dma_config,\n                            DREQ_PIOx_TX0 + sm\n    );\n    channel_config_set_transfer_data_size(&dma_config, i2s_dma_configure_size);\n    dma_channel_configure(dma_channel,\n                          &dma_config,\n                          &audio_pio->txf[sm],  // dest\n                          NULL, // src\n                          0, // count\n                          false // trigger\n    );\n\n    irq_add_shared_handler(DMA_IRQ_0 + PICO_AUDIO_I2S_DMA_IRQ, audio_i2s_dma_irq_handler, PICO_SHARED_IRQ_HANDLER_DEFAULT_ORDER_PRIORITY);\n    dma_irqn_set_channel_enabled(PICO_AUDIO_I2S_DMA_IRQ, dma_channel, 1);\n    return intended_audio_format;\n}\n\nstatic audio_buffer_pool_t *audio_i2s_consumer;\n\nstatic void update_pio_frequency(uint32_t sample_freq) {\n    uint32_t system_clock_frequency = clock_get_hz(clk_sys);\n    assert(system_clock_frequency < 0x40000000);\n    uint32_t divider = system_clock_frequency * 4 / sample_freq; // avoid arithmetic overflow\n    assert(divider < 0x1000000);\n    pio_sm_set_clkdiv_int_frac(audio_pio, shared_state.pio_sm, divider >> 8u, divider & 0xffu);\n    shared_state.freq = sample_freq;\n}\n\nstatic audio_buffer_t *wrap_consumer_take(audio_connection_t *connection, bool block) {\n    // support dynamic frequency shifting\n    if (connection->producer_pool->format->sample_freq != shared_state.freq) {\n        update_pio_frequency(connection->producer_pool->format->sample_freq);\n    }\n#if PICO_AUDIO_I2S_MONO_INPUT\n#if PICO_AUDIO_I2S_MONO_OUTPUT\n    return mono_to_mono_consumer_take(connection, block);\n#else\n    return mono_to_stereo_consumer_take(connection, block);\n#endif\n#else\n#if PICO_AUDIO_I2S_MONO_OUTPUT\n    unsupported;\n#else\n    return stereo_to_stereo_consumer_take(connection, block);\n#endif\n#endif\n}\n\nstatic void wrap_producer_give(audio_connection_t *connection, audio_buffer_t *buffer) {\n    // support dynamic frequency shifting\n    if (connection->producer_pool->format->sample_freq != shared_state.freq) {\n        update_pio_frequency(connection->producer_pool->format->sample_freq);\n    }\n#if PICO_AUDIO_I2S_MONO_INPUT\n#if PICO_AUDIO_I2S_MONO_OUTPUT\n    assert(false);\n//    return mono_to_mono_producer_give(connection, block);\n#else\n    assert(false);\n    //return mono_to_stereo_producer_give(connection, buffer);\n#endif\n#else\n#if PICO_AUDIO_I2S_MONO_OUTPUT\n    unsupported;\n#else\n    return stereo_to_stereo_producer_give(connection, buffer);\n#endif\n#endif\n}\n\nstatic struct buffer_copying_on_consumer_take_connection m2s_audio_i2s_ct_connection = {\n        .core = {\n                .consumer_pool_take = wrap_consumer_take,\n                .consumer_pool_give = consumer_pool_give_buffer_default,\n                .producer_pool_take = producer_pool_take_buffer_default,\n                .producer_pool_give = producer_pool_give_buffer_default,\n        }\n};\n\nstatic struct producer_pool_blocking_give_connection m2s_audio_i2s_pg_connection = {\n        .core = {\n                .consumer_pool_take = consumer_pool_take_buffer_default,\n                .consumer_pool_give = consumer_pool_give_buffer_default,\n                .producer_pool_take = producer_pool_take_buffer_default,\n                .producer_pool_give = wrap_producer_give,\n        }\n};\n\nstatic void pass_thru_producer_give(audio_connection_t *connection, audio_buffer_t *buffer) {\n    queue_full_audio_buffer(connection->consumer_pool, buffer);\n}\n\nstatic void pass_thru_consumer_give(audio_connection_t *connection, audio_buffer_t *buffer) {\n    queue_free_audio_buffer(connection->producer_pool, buffer);\n}\n\nstatic struct producer_pool_blocking_give_connection audio_i2s_pass_thru_connection = {\n        .core = {\n                .consumer_pool_take = consumer_pool_take_buffer_default,\n                .consumer_pool_give = pass_thru_consumer_give,\n                .producer_pool_take = producer_pool_take_buffer_default,\n                .producer_pool_give = pass_thru_producer_give,\n        }\n};\n\nbool audio_i2s_connect_thru(audio_buffer_pool_t *producer, audio_connection_t *connection) {\n    return audio_i2s_connect_extra(producer, false, 2, 256, connection);\n}\n\nbool audio_i2s_connect(audio_buffer_pool_t *producer) {\n    return audio_i2s_connect_thru(producer, NULL);\n}\n\nbool audio_i2s_connect_extra(audio_buffer_pool_t *producer, bool buffer_on_give, uint buffer_count,\n                                 uint samples_per_buffer, audio_connection_t *connection) {\n    printf(\"Connecting PIO I2S audio\\n\");\n\n    // todo we need to pick a connection based on the frequency - e.g. 22050 can be more simply upsampled to 44100\n    assert(producer->format->format == AUDIO_BUFFER_FORMAT_PCM_S16);\n    pio_i2s_consumer_format.format = AUDIO_BUFFER_FORMAT_PCM_S16;\n    // todo we could do mono\n    // todo we can't match exact, so we should return what we can do\n    pio_i2s_consumer_format.sample_freq = producer->format->sample_freq;\n#if PICO_AUDIO_I2S_MONO_OUTPUT\n    pio_i2s_consumer_format.channel_count = 1;\n    pio_i2s_consumer_buffer_format.sample_stride = 2;\n#else\n    pio_i2s_consumer_format.channel_count = 2;\n    pio_i2s_consumer_buffer_format.sample_stride = 4;\n#endif\n\n    audio_i2s_consumer = audio_new_consumer_pool(&pio_i2s_consumer_buffer_format, buffer_count, samples_per_buffer);\n\n    update_pio_frequency(producer->format->sample_freq);\n\n    // todo cleanup threading\n    __mem_fence_release();\n\n    if (!connection) {\n        if (producer->format->channel_count == 2) {\n#if PICO_AUDIO_I2S_MONO_INPUT\n            panic(\"need to merge channels down\\n\");\n#else\n#if PICO_AUDIO_I2S_MONO_OUTPUT\n            panic(\"trying to play stereo thru mono not yet supported\");\n#else\n            printf(\"Copying stereo to stereo at %d Hz\\n\", (int) producer->format->sample_freq);\n#endif\n#endif\n        } else {\n#if PICO_AUDIO_I2S_MONO_OUTPUT\n            printf(\"Copying mono to mono at %d Hz\\n\", (int) producer->format->sample_freq);\n#else\n            printf(\"Converting mono to stereo at %d Hz\\n\", (int) producer->format->sample_freq);\n#endif\n        }\n        if (!buffer_count)\n            connection = &audio_i2s_pass_thru_connection.core;\n        else\n            connection = buffer_on_give ? &m2s_audio_i2s_pg_connection.core : &m2s_audio_i2s_ct_connection.core;\n    }\n    audio_complete_connection(connection, producer, audio_i2s_consumer);\n    return true;\n}\n\nstatic struct buffer_copying_on_consumer_take_connection m2s_audio_i2s_connection_s8 = {\n        .core = {\n#if PICO_AUDIO_I2S_MONO_OUTPUT\n                .consumer_pool_take = mono_s8_to_mono_consumer_take,\n#else\n                .consumer_pool_take = mono_s8_to_stereo_consumer_take,\n#endif\n                .consumer_pool_give = consumer_pool_give_buffer_default,\n                .producer_pool_take = producer_pool_take_buffer_default,\n                .producer_pool_give = producer_pool_give_buffer_default,\n        }\n};\n\nbool audio_i2s_connect_s8(audio_buffer_pool_t *producer) {\n    printf(\"Connecting PIO I2S audio (U8)\\n\");\n\n    // todo we need to pick a connection based on the frequency - e.g. 22050 can be more simply upsampled to 44100\n    assert(producer->format->format == AUDIO_BUFFER_FORMAT_PCM_S8);\n    pio_i2s_consumer_format.format = AUDIO_BUFFER_FORMAT_PCM_S16;\n    // todo we could do mono\n    // todo we can't match exact, so we should return what we can do\n    pio_i2s_consumer_format.sample_freq = producer->format->sample_freq;\n#if PICO_AUDIO_I2S_MONO_OUTPUT\n    pio_i2s_consumer_format.channel_count = 1;\n    pio_i2s_consumer_buffer_format.sample_stride = 2;\n#else\n    pio_i2s_consumer_format.channel_count = 2;\n    pio_i2s_consumer_buffer_format.sample_stride = 4;\n#endif\n\n    // we do this on take so should do it quickly...\n    uint samples_per_buffer = 256;\n    // todo with take we really only need 1 buffer\n    audio_i2s_consumer = audio_new_consumer_pool(&pio_i2s_consumer_buffer_format, 2, samples_per_buffer);\n\n    // todo we need a method to calculate this in clocks\n    uint32_t system_clock_frequency = clock_get_hz(clk_sys);\n//    uint32_t divider = system_clock_frequency * 256 / producer->format->sample_freq * 16 * 4;\n    uint32_t divider = system_clock_frequency * 4 / producer->format->sample_freq; // avoid arithmetic overflow\n    pio_sm_set_clkdiv_int_frac(audio_pio, shared_state.pio_sm, divider >> 8u, divider & 0xffu);\n\n    // todo cleanup threading\n    __mem_fence_release();\n\n    audio_connection_t *connection;\n    if (producer->format->channel_count == 2) {\n#if PICO_AUDIO_I2S_MONO_OUTPUT\n        panic(\"trying to play stereo thru mono not yet supported\");\n#endif\n        // todo we should support pass thru option anyway\n        printf(\"TODO... not completing stereo audio connection properly!\\n\");\n        connection = &m2s_audio_i2s_connection_s8.core;\n    } else {\n#if PICO_AUDIO_I2S_MONO_OUTPUT\n        printf(\"Copying mono to mono at %d Hz\\n\", (int) producer->format->sample_freq);\n#else\n        printf(\"Converting mono to stereo at %d Hz\\n\", (int) producer->format->sample_freq);\n#endif\n        connection = &m2s_audio_i2s_connection_s8.core;\n    }\n    audio_complete_connection(connection, producer, audio_i2s_consumer);\n    return true;\n}\n\nstatic inline void audio_start_dma_transfer() {\n    assert(!shared_state.playing_buffer);\n    audio_buffer_t *ab = take_audio_buffer(audio_i2s_consumer, false);\n\n    shared_state.playing_buffer = ab;\n    if (!ab) {\n        DEBUG_PINS_XOR(audio_timing, 1);\n        DEBUG_PINS_XOR(audio_timing, 2);\n        DEBUG_PINS_XOR(audio_timing, 1);\n        //DEBUG_PINS_XOR(audio_timing, 2);\n        // just play some silence\n        static uint32_t zero;\n        dma_channel_config c = dma_get_channel_config(shared_state.dma_channel);\n        channel_config_set_read_increment(&c, false);\n        dma_channel_set_config(shared_state.dma_channel, &c, false);\n        dma_channel_transfer_from_buffer_now(shared_state.dma_channel, &zero, PICO_AUDIO_I2S_SILENCE_BUFFER_SAMPLE_LENGTH);\n        return;\n    }\n    assert(ab->sample_count);\n    // todo better naming of format->format->format!!\n    assert(ab->format->format->format == AUDIO_BUFFER_FORMAT_PCM_S16);\n#if PICO_AUDIO_I2S_MONO_OUTPUT\n    assert(ab->format->format->channel_count == 1);\n    assert(ab->format->sample_stride == 2);\n#else\n    assert(ab->format->format->channel_count == 2);\n    assert(ab->format->sample_stride == 4);\n#endif\n    dma_channel_config c = dma_get_channel_config(shared_state.dma_channel);\n    channel_config_set_read_increment(&c, true);\n    dma_channel_set_config(shared_state.dma_channel, &c, false);\n    dma_channel_transfer_from_buffer_now(shared_state.dma_channel, ab->buffer->bytes, ab->sample_count);\n}\n\n// irq handler for DMA\nvoid __isr __time_critical_func(audio_i2s_dma_irq_handler)() {\n#if PICO_AUDIO_I2S_NOOP\n    assert(false);\n#else\n    uint dma_channel = shared_state.dma_channel;\n    if (dma_irqn_get_channel_status(PICO_AUDIO_I2S_DMA_IRQ, dma_channel)) {\n        dma_irqn_acknowledge_channel(PICO_AUDIO_I2S_DMA_IRQ, dma_channel);\n        DEBUG_PINS_SET(audio_timing, 4);\n        // free the buffer we just finished\n        if (shared_state.playing_buffer) {\n            give_audio_buffer(audio_i2s_consumer, shared_state.playing_buffer);\n#ifndef NDEBUG\n            shared_state.playing_buffer = NULL;\n#endif\n        }\n        audio_start_dma_transfer();\n        DEBUG_PINS_CLR(audio_timing, 4);\n    }\n#endif\n}\n\nstatic bool audio_enabled;\n\nvoid audio_i2s_set_enabled(bool enabled) {\n    if (enabled != audio_enabled) {\n#ifndef NDEBUG\n        if (enabled)\n        {\n            puts(\"Enabling PIO I2S audio\\n\");\n            printf(\"(on core %d\\n\", get_core_num());\n        }\n#endif\n        irq_set_enabled(DMA_IRQ_0 + PICO_AUDIO_I2S_DMA_IRQ, enabled);\n\n        if (enabled) {\n            audio_start_dma_transfer();\n        } else {\n            // if there was a buffer in flight, it will not be freed by DMA IRQ, let's do it manually\n            if (shared_state.playing_buffer) {\n                give_audio_buffer(audio_i2s_consumer, shared_state.playing_buffer);\n                shared_state.playing_buffer = NULL;\n            }\n        }\n\n        pio_sm_set_enabled(audio_pio, shared_state.pio_sm, enabled);\n\n        audio_enabled = enabled;\n    }\n}\n#endif"
  },
  {
    "path": "src/pico-audio/audio_i2s.h",
    "content": "/*\n * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n */\n#if (defined ARDUINO_ARCH_RP2040) || (defined ARDUINO_ARCH_RP2350)\n\n#ifndef _PICO_AUDIO_I2S_H\n#define _PICO_AUDIO_I2S_H\n\n#include \"audio.h\"\n\n/** \\file audio_i2s.h\n *  \\defgroup pico_audio_i2s pico_audio_i2s\n *  I2S audio output using the PIO\n *\n * This library uses the \\ref hardware_pio system to implement a I2S audio interface\n *\n * \\todo Must be more we need to say here.\n * \\todo certainly need an example\n *\n */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifndef PICO_AUDIO_I2S_DMA_IRQ\n#ifdef PICO_AUDIO_DMA_IRQ\n#define PICO_AUDIO_I2S_DMA_IRQ PICO_AUDIO_DMA_IRQ\n#else\n#define PICO_AUDIO_I2S_DMA_IRQ 0\n#endif\n#endif\n\n#ifndef PICO_AUDIO_I2S_PIO\n#ifdef PICO_AUDIO_PIO\n#define PICO_AUDIO_I2S_PIO PICO_AUDIO_PIO\n#else\n#define PICO_AUDIO_I2S_PIO 0\n#endif\n#endif\n\n#if !(PICO_AUDIO_I2S_DMA_IRQ == 0 || PICO_AUDIO_I2S_DMA_IRQ == 1)\n#error PICO_AUDIO_I2S_DMA_IRQ must be 0 or 1\n#endif\n\n#if !(PICO_AUDIO_I2S_PIO == 0 || PICO_AUDIO_I2S_PIO == 1)\n#error PICO_AUDIO_I2S_PIO ust be 0 or 1\n#endif\n\n#ifndef PICO_AUDIO_I2S_MAX_CHANNELS\n#ifdef PICO_AUDIO_MAX_CHANNELS\n#define PICO_AUDIO_I2S_MAX_CHANNELS PICO_AUDIO_MAX_CHANNELS\n#else\n#define PICO_AUDIO_I2S_MAX_CHANNELS 2u\n#endif\n#endif\n\n#ifndef PICO_AUDIO_I2S_BUFFERS_PER_CHANNEL\n#ifdef PICO_AUDIO_BUFFERS_PER_CHANNEL\n#define PICO_AUDIO_I2S_BUFFERS_PER_CHANNEL PICO_AUDIO_BUFFERS_PER_CHANNEL\n#else\n#define PICO_AUDIO_I2S_BUFFERS_PER_CHANNEL 3u\n#endif\n#endif\n\n#ifndef PICO_AUDIO_I2S_BUFFER_SAMPLE_LENGTH\n#ifdef PICO_AUDIO_BUFFER_SAMPLE_LENGTH\n#define PICO_AUDIO_I2S_BUFFER_SAMPLE_LENGTH PICO_AUDIO_BUFFER_SAMPLE_LENGTH\n#else\n#define PICO_AUDIO_I2S_BUFFER_SAMPLE_LENGTH 576u\n#endif\n#endif\n\n#ifndef PICO_AUDIO_I2S_SILENCE_BUFFER_SAMPLE_LENGTH\n#ifdef PICO_AUDIO_I2S_SILENCE_BUFFER_SAMPLE_LENGTH\n#define PICO_AUDIO_I2S_SILENCE_BUFFER_SAMPLE_LENGTH PICO_AUDIO_SILENCE_BUFFER_SAMPLE_LENGTH\n#else\n#define PICO_AUDIO_I2S_SILENCE_BUFFER_SAMPLE_LENGTH 256u\n#endif\n#endif\n\n// Allow use of pico_audio driver without actually doing anything much\n#ifndef PICO_AUDIO_I2S_NOOP\n#ifdef PICO_AUDIO_NOOP\n#define PICO_AUDIO_I2S_NOOP PICO_AUDIO_NOOP\n#else\n#define PICO_AUDIO_I2S_NOOP 0\n#endif\n#endif\n\n#ifndef PICO_AUDIO_I2S_MONO_INPUT\n#define PICO_AUDIO_I2S_MONO_INPUT 0\n#endif\n#ifndef PICO_AUDIO_I2S_MONO_OUTPUT\n#define PICO_AUDIO_I2S_MONO_OUTPUT 0\n#endif\n\n#ifndef PICO_AUDIO_I2S_DATA_PIN\n//#warning PICO_AUDIO_I2S_DATA_PIN should be defined when using AUDIO_I2S\n#define PICO_AUDIO_I2S_DATA_PIN 28\n#endif\n\n#ifndef PICO_AUDIO_I2S_CLOCK_PIN_BASE\n//#warning PICO_AUDIO_I2S_CLOCK_PIN_BASE should be defined when using AUDIO_I2S\n#define PICO_AUDIO_I2S_CLOCK_PIN_BASE 26\n#endif\n\n// The default order is CLOCK_PIN_BASE=LRCLK, CLOCK_PIN_BASE+1=BCLK\n// The swapped order is CLOCK_PIN_BASE=BCLK,  CLOCK_PIN_BASE+1=LRCLK\n#ifndef PICO_AUDIO_I2S_CLOCK_PINS_SWAPPED\n#define PICO_AUDIO_I2S_CLOCK_PINS_SWAPPED 0\n#endif\n\n// todo this needs to come from a build config\n/** \\brief Base configuration structure used when setting up\n * \\ingroup pico_audio_i2s\n */\ntypedef struct audio_i2s_config {\n    uint8_t data_pin;\n    uint8_t clock_pin_base;\n    uint8_t dma_channel;\n    uint8_t pio_sm;\n} audio_i2s_config_t;\n\n/** \\brief Set up system to output I2S audio\n * \\ingroup pico_audio_i2s\n *\n * \\param intended_audio_format \\todo\n * \\param config The configuration to apply.\n */\nconst audio_format_t *audio_i2s_setup(const audio_format_t *intended_audio_format,\n                                               const audio_i2s_config_t *config);\n\n\n/** \\brief \\todo\n * \\ingroup pico_audio_i2s\n *\n * \\param producer\n * \\param connection\n */\nbool audio_i2s_connect_thru(audio_buffer_pool_t *producer, audio_connection_t *connection);\n\n\n/** \\brief \\todo\n * \\ingroup pico_audio_i2s\n *\n * \\param producer\n *\n *  todo make a common version (or a macro) .. we don't want to pull in unnecessary code by default\n */\nbool audio_i2s_connect(audio_buffer_pool_t *producer);\n\n\n/** \\brief \\todo\n * \\ingroup pico_audio_i2s\n *\n * \\param producer\n */\nbool audio_i2s_connect_s8(audio_buffer_pool_t *producer);\n\n/** \\brief \\todo\n * \\ingroup pico_audio_i2s\n *\n * \\param producer\n * \\param buffer_on_give\n * \\param buffer_count\n * \\param samples_per_buffer\n * \\param connection\n * \\return\n */\nbool audio_i2s_connect_extra(audio_buffer_pool_t *producer, bool buffer_on_give, uint buffer_count,\n                                 uint samples_per_buffer, audio_connection_t *connection);\n\n\n/** \\brief Set up system to output I2S audio\n * \\ingroup pico_audio_i2s\n *\n * \\param enable true to enable I2S audio, false to disable.\n */\nvoid audio_i2s_set_enabled(bool enabled);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif //_AUDIO_I2S_H\n#endif\n"
  },
  {
    "path": "src/pico-audio/audio_i2s.pio",
    "content": ";\n; Copyright (c) 2020 Raspberry Pi (Trading) Ltd.\n;\n; SPDX-License-Identifier: BSD-3-Clause\n;\n\n; Transmit a mono or stereo I2S audio stream as stereo\n; This is 16 bits per sample; can be altered by modifying the \"set\" params,\n; or made programmable by replacing \"set x\" with \"mov x, y\" and using Y as a config register.\n;\n; Autopull must be enabled, with threshold set to 32.\n; Since I2S is MSB-first, shift direction should be to left.\n; Hence the format of the FIFO word is:\n;\n; | 31   :   16 | 15   :    0 |\n; | sample ws=0 | sample ws=1 |\n;\n; Data is output at 1 bit per clock. Use clock divider to adjust frequency.\n; Fractional divider will probably be needed to get correct bit clock period,\n; but for common syslck freqs this should still give a constant word select period.\n;\n; One output pin is used for the data output.\n; Two side-set pins are used. Two versions of the program are provided, so that\n; the clock and word select pins can be in either order.\n\n; Send 16 bit words to the PIO for mono, 32 bit words for stereo\n\n.program audio_i2s\n.side_set 2\n\n                    ;        /--- LRCLK\n                    ;        |/-- BCLK\nbitloop1:           ;        ||\n    out pins, 1       side 0b10\n    jmp x-- bitloop1  side 0b11\n    out pins, 1       side 0b00\n    set x, 14         side 0b01\n\nbitloop0:\n    out pins, 1       side 0b00\n    jmp x-- bitloop0  side 0b01\n    out pins, 1       side 0b10\npublic entry_point:\n    set x, 14         side 0b11\n\n.program audio_i2s_swapped\n.side_set 2\n\n                    ;        /--- BCLK\n                    ;        |/-- LRCLK\nbitloop1:           ;        ||\n    out pins, 1       side 0b01\n    jmp x-- bitloop1  side 0b11\n    out pins, 1       side 0b00\n    set x, 14         side 0b10\n                               \nbitloop0:                      \n    out pins, 1       side 0b00\n    jmp x-- bitloop0  side 0b10\n    out pins, 1       side 0b01\npublic entry_point:            \n    set x, 14         side 0b11\n\n% c-sdk {\n\nstatic inline void audio_i2s_program_init(PIO pio, uint sm, uint offset, uint data_pin, uint clock_pin_base) {\n    pio_sm_config sm_config = audio_i2s_program_get_default_config(offset);\n    \n    sm_config_set_out_pins(&sm_config, data_pin, 1);\n    sm_config_set_sideset_pins(&sm_config, clock_pin_base);\n    sm_config_set_out_shift(&sm_config, false, true, 32);\n    sm_config_set_fifo_join(&sm_config, PIO_FIFO_JOIN_TX);\n\n    pio_sm_init(pio, sm, offset, &sm_config);\n\n#if PICO_PIO_USE_GPIO_BASE\n    uint64_t pin_mask = (1ull << data_pin) | (3ull << clock_pin_base);\n    pio_sm_set_pindirs_with_mask64(pio, sm, pin_mask, pin_mask);\n#else\n    uint32_t pin_mask = (1u << data_pin) | (3u << clock_pin_base);\n    pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);\n#endif\n    pio_sm_set_pins(pio, sm, 0); // clear pins\n\n    pio_sm_exec(pio, sm, pio_encode_jmp(offset + audio_i2s_offset_entry_point));\n}\n\n%}"
  },
  {
    "path": "src/pico-audio/audio_i2s.pio.h",
    "content": "#if (defined PICO_RP2350) || (defined PICO_RP2040)\n// -------------------------------------------------- //\n// This file is autogenerated by pioasm; do not edit! //\n// -------------------------------------------------- //\n\n#pragma once\n\n#if !PICO_NO_HARDWARE\n#include \"hardware/pio.h\"\n#endif\n\n// --------- //\n// audio_i2s //\n// --------- //\n\n#define audio_i2s_wrap_target 0\n#define audio_i2s_wrap 7\n\n#define audio_i2s_offset_entry_point 7u\n\nstatic const uint16_t audio_i2s_program_instructions[] = {\n            //     .wrap_target\n    0x7001, //  0: out    pins, 1         side 2     \n    0x1840, //  1: jmp    x--, 0          side 3     \n    0x6001, //  2: out    pins, 1         side 0     \n    0xe82e, //  3: set    x, 14           side 1     \n    0x6001, //  4: out    pins, 1         side 0     \n    0x0844, //  5: jmp    x--, 4          side 1     \n    0x7001, //  6: out    pins, 1         side 2     \n    0xf82e, //  7: set    x, 14           side 3     \n            //     .wrap\n};\n\n#if !PICO_NO_HARDWARE\nstatic const struct pio_program audio_i2s_program = {\n    .instructions = audio_i2s_program_instructions,\n    .length = 8,\n    .origin = -1,\n};\n\nstatic inline pio_sm_config audio_i2s_program_get_default_config(uint offset) {\n    pio_sm_config c = pio_get_default_sm_config();\n    sm_config_set_wrap(&c, offset + audio_i2s_wrap_target, offset + audio_i2s_wrap);\n    sm_config_set_sideset(&c, 2, false, false);\n    return c;\n}\n#endif\n\n// ----------------- //\n// audio_i2s_swapped //\n// ----------------- //\n\n#define audio_i2s_swapped_wrap_target 0\n#define audio_i2s_swapped_wrap 7\n\n#define audio_i2s_swapped_offset_entry_point 7u\n\nstatic const uint16_t audio_i2s_swapped_program_instructions[] = {\n            //     .wrap_target\n    0x6801, //  0: out    pins, 1         side 1     \n    0x1840, //  1: jmp    x--, 0          side 3     \n    0x6001, //  2: out    pins, 1         side 0     \n    0xf02e, //  3: set    x, 14           side 2     \n    0x6001, //  4: out    pins, 1         side 0     \n    0x1044, //  5: jmp    x--, 4          side 2     \n    0x6801, //  6: out    pins, 1         side 1     \n    0xf82e, //  7: set    x, 14           side 3     \n            //     .wrap\n};\n\n#if !PICO_NO_HARDWARE\nstatic const struct pio_program audio_i2s_swapped_program = {\n    .instructions = audio_i2s_swapped_program_instructions,\n    .length = 8,\n    .origin = -1,\n};\n\nstatic inline pio_sm_config audio_i2s_swapped_program_get_default_config(uint offset) {\n    pio_sm_config c = pio_get_default_sm_config();\n    sm_config_set_wrap(&c, offset + audio_i2s_swapped_wrap_target, offset + audio_i2s_swapped_wrap);\n    sm_config_set_sideset(&c, 2, false, false);\n    return c;\n}\n\nstatic inline void audio_i2s_program_init(PIO pio, uint sm, uint offset, uint data_pin, uint clock_pin_base) {\n    pio_sm_config sm_config = audio_i2s_program_get_default_config(offset);\n    sm_config_set_out_pins(&sm_config, data_pin, 1);\n    sm_config_set_sideset_pins(&sm_config, clock_pin_base);\n    sm_config_set_out_shift(&sm_config, false, true, 32);\n    sm_config_set_fifo_join(&sm_config, PIO_FIFO_JOIN_TX);\n    pio_sm_init(pio, sm, offset, &sm_config);\n#if PICO_PIO_USE_GPIO_BASE\n    uint64_t pin_mask = (1ull << data_pin) | (3ull << clock_pin_base);\n    pio_sm_set_pindirs_with_mask64(pio, sm, pin_mask, pin_mask);\n#else\n    uint32_t pin_mask = (1u << data_pin) | (3u << clock_pin_base);\n    pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);\n#endif\n    pio_sm_set_pins(pio, sm, 0); // clear pins\n    pio_sm_exec(pio, sm, pio_encode_jmp(offset + audio_i2s_offset_entry_point));\n}\n\n#endif\n#endif"
  },
  {
    "path": "src/pico-audio/buffer.c",
    "content": "#if (defined PICO_RP2350) || (defined PICO_RP2040)\n#if 1\n/*\n * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n#ifdef ARDUINO_ARCH_RP2040\n#include \"buffer.h\"\n\n#ifdef PICO_BUFFER_USB_ALLOC_HACK\n#include <string.h>\n\nuint8_t *usb_ram_alloc_ptr = (uint8_t *)(USBCTRL_DPRAM_BASE + USB_DPRAM_MAX);\n\nstatic void __attribute__((constructor)) _clear_usb_ram() {\n    memset(usb_ram_alloc_ptr, 0, USB_DPRAM_SIZE - USB_DPRAM_MAX);\n}\n#endif\n#endif\n\n#endif\n#endif"
  },
  {
    "path": "src/pico-audio/buffer.h",
    "content": "/*\n * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n */\n#if 1\n#ifdef ARDUINO_ARCH_RP2040\n\n#ifndef _PICO_UTIL_BUFFER_H\n#define _PICO_UTIL_BUFFER_H\n\n#include \"pico/types.h\"\n\n/** \\file buffer.h\n * \\defgroup util_buffer buffer\n * \\brief Buffer management\n * \\ingroup pico_util\n */\n\n#ifdef PICO_BUFFER_USB_ALLOC_HACK\n#include \"hardware/address_mapped.h\"\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifdef DEBUG_MALLOC\n#include <stdio.h>\n#endif\n\n#include <stdlib.h>\n\n/** \\struct mem_buffer\n *  \\ingroup util_buffer\n *  \\brief Wrapper structure around a memory buffer\n * \n *   Wrapper could be around static or allocated memory\n * \n * \\todo This module needs to be checked - think there are issues with the free function\n */\ntypedef struct mem_buffer {\n    size_t size;\n    uint8_t *bytes;\n    uint8_t flags;\n} mem_buffer_t;\n\n#ifdef PICO_BUFFER_USB_ALLOC_HACK\n#if !defined(USB_DPRAM_MAX) || (USB_DPRAM_MAX > 0)\n#include \"hardware/structs/usb.h\"\n#else\n#define USB_DPRAM_SIZE 4096\n#endif\n#endif\n\ninline static bool pico_buffer_alloc_in_place(mem_buffer_t *buffer, size_t size) {\n#ifdef PICO_BUFFER_USB_ALLOC_HACK\n    extern uint8_t *usb_ram_alloc_ptr;\n    if ((usb_ram_alloc_ptr + size) <= (uint8_t *)USBCTRL_DPRAM_BASE + USB_DPRAM_SIZE) {\n        buffer->bytes = usb_ram_alloc_ptr;\n        buffer->size = size;\n#ifdef DEBUG_MALLOC\n        printf(\"balloc %d %p->%p\\n\", size, buffer->bytes, ((uint8_t *)buffer->bytes) + size);\n#endif\n        usb_ram_alloc_ptr += size;\n        return true;\n    }\n#endif    // inline for now\n    buffer->bytes = (uint8_t *) calloc(1, size);\n    if (buffer->bytes) {\n        buffer->size = size;\n        return true;\n    }\n    buffer->size = 0;\n    return false;\n}\n\ninline static mem_buffer_t *pico_buffer_wrap(uint8_t *bytes, size_t size) {\n    mem_buffer_t *buffer = (mem_buffer_t *) malloc(sizeof(mem_buffer_t));\n    if (buffer) {\n        buffer->bytes = bytes;\n        buffer->size = size;\n    }\n    return buffer;\n}\n\ninline static mem_buffer_t *pico_buffer_alloc(size_t size) {\n    mem_buffer_t *b = (mem_buffer_t *) malloc(sizeof(mem_buffer_t));\n    if (b) {\n        if (!pico_buffer_alloc_in_place(b, size)) {\n            free(b);\n            b = NULL;\n        }\n    }\n    return b;\n}\n\n#ifdef __cplusplus\n}\n#endif\n#endif\n#endif\n#endif"
  },
  {
    "path": "src/pico-audio/sample_conversion.h",
    "content": "/*\n * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n */\n#if (defined PICO_RP2350) || (defined PICO_RP2040)\n\n#ifndef SOFTWARE_SAMPLE_CONVERSION_H\n#define SOFTWARE_SAMPLE_CONVERSION_H\n\n#include <algorithm>\n#include <cstring>\n#include \"audio.h\"\n#include \"buffer.h\"\n\ntemplate<typename _sample_t>\nstruct FmtDetails {\npublic:\n    static const uint channel_count = 1;\n    static const uint frame_stride = channel_count * sizeof(_sample_t);\n    typedef _sample_t sample_t;\n};\n\nstruct FmtU8 : public FmtDetails<uint8_t> {\n};\n\nstruct FmtS8 : public FmtDetails<int8_t> {\n};\n\nstruct FmtU16 : public FmtDetails<uint16_t> {\n};\n\nstruct FmtS16 : public FmtDetails<int16_t> {\n};\n\n// Multi-channel is just N samples back to back\ntemplate<typename Fmt, uint ChannelCount>\nstruct MultiChannelFmt {\n    static const uint channel_count = ChannelCount;\n    static const uint frame_stride = ChannelCount * Fmt::frame_stride;\n    typedef typename Fmt::sample_t sample_t;\n};\n\n// define Mono<X> details as one channel\ntemplate<typename Fmt> using Mono = MultiChannelFmt<Fmt, 1>;\n\n// define Stereo<X> details as two channels\ntemplate<typename Fmt> using Stereo = MultiChannelFmt<Fmt, 2>;\n\ntemplate<typename ToFmt, typename FromFmt>\nstruct sample_converter {\n    static typename ToFmt::sample_t convert_sample(const typename FromFmt::sample_t &sample);\n};\n\n// noop conversion\n\ntemplate<typename Fmt>\nstruct sample_converter<Fmt, Fmt> {\n    static typename Fmt::sample_t convert_sample(const typename Fmt::sample_t &sample) {\n        return sample;\n    }\n};\n\n// converters to S16\ntemplate<>\nstruct sample_converter<FmtS16, FmtU16> {\n    static int16_t convert_sample(const uint16_t &sample) {\n        return sample ^ 0x8000u;\n    }\n};\n\ntemplate<>\nstruct sample_converter<FmtS16, FmtS8> {\n    static int16_t convert_sample(const int8_t &sample) {\n        return sample << 8u;\n    }\n};\n\ntemplate<>\nstruct sample_converter<FmtS16, FmtU8> {\n    static int16_t convert_sample(const uint8_t &sample) {\n        return (sample << 8u) ^ 0x8000u;\n    }\n};\n\n// converters to U16\n\ntemplate<>\nstruct sample_converter<FmtU16, FmtS8> {\n    static uint16_t convert_sample(const int8_t &sample) {\n        return (sample << 8u) ^ 0x8000u;\n    }\n};\n\ntemplate<>\nstruct sample_converter<FmtU16, FmtU8> {\n    static uint16_t convert_sample(const uint8_t &sample) {\n        return sample << 8u;\n    }\n};\n\ntemplate<>\nstruct sample_converter<FmtU16, FmtS16> {\n    static uint16_t convert_sample(const int16_t &sample) {\n        return sample ^ 0x8000u;\n    }\n};\n\n// converters to S8\n\ntemplate<>\nstruct sample_converter<FmtS8, FmtU16> {\n    static int8_t convert_sample(const uint16_t &sample) {\n        return (sample ^ 0x8000u) >> 8u;\n    }\n};\n\ntemplate<>\nstruct sample_converter<FmtS8, FmtU8> {\n    static int8_t convert_sample(const uint8_t &sample) {\n        return sample ^ 0x80;\n    }\n};\n\ntemplate<>\nstruct sample_converter<FmtS8, FmtS16> {\n    static int8_t convert_sample(const int16_t &sample) {\n        return sample >> 8u;\n    }\n};\n\n// converters to U8\n\ntemplate<>\nstruct sample_converter<FmtU8, FmtU16> {\n    static uint8_t convert_sample(const uint16_t &sample) {\n        return sample >> 8u;\n    }\n};\n\ntemplate<>\nstruct sample_converter<FmtU8, FmtS8> {\n    static uint8_t convert_sample(const int8_t &sample) {\n        return sample ^ 0x80;\n    }\n};\n\ntemplate<>\nstruct sample_converter<FmtU8, FmtS16> {\n    static uint8_t convert_sample(const int16_t &sample) {\n        return (sample ^ 0x8000u) >> 8u;\n    }\n};\n\n// template type for doing sample conversion\ntemplate<typename ToFmt, typename FromFmt>\nstruct converting_copy {\n    static void copy(typename ToFmt::sample_t *dest, const typename FromFmt::sample_t *src, uint sample_count);\n};\n\n// Efficient copies of same sample type\n\ntemplate<class Fmt, uint ChannelCount>\nstruct converting_copy<MultiChannelFmt<Fmt, ChannelCount>, MultiChannelFmt<Fmt, ChannelCount>> {\n    static void copy(typename MultiChannelFmt<Fmt, ChannelCount>::sample_t *dest,\n                     const typename MultiChannelFmt<Fmt, ChannelCount>::sample_t *src,\n                     uint sample_count) {\n        memcpy((void *) dest, (const void *) src, sample_count * MultiChannelFmt<Fmt, ChannelCount>::frame_stride);\n    }\n};\n\n// N channel to N channel\ntemplate<typename ToFmt, typename FromFmt, uint NumChannels>\nstruct converting_copy<MultiChannelFmt<ToFmt, NumChannels>, MultiChannelFmt<FromFmt, NumChannels>> {\n    static void copy(typename ToFmt::sample_t *dest, const typename FromFmt::sample_t *src, uint sample_count) {\n        for (uint i = 0; i < sample_count * NumChannels; i++) {\n            *dest++ = sample_converter<ToFmt, FromFmt>::convert_sample(*src++);\n        }\n    }\n};\n\n\n// mono->stereo conversion\ntemplate<typename ToFmt, typename FromFmt>\nstruct converting_copy<Stereo<ToFmt>, Mono<FromFmt>> {\n    static void copy(typename ToFmt::sample_t *dest, const typename FromFmt::sample_t *src, uint sample_count) {\n        for (; sample_count; sample_count--) {\n            typename ToFmt::sample_t mono_sample = sample_converter<ToFmt, FromFmt>::convert_sample(*src++);\n            *dest++ = mono_sample;\n            *dest++ = mono_sample;\n        }\n    }\n};\n\n// stereo->mono conversion\ntemplate<typename ToFmt, typename FromFmt>\nstruct converting_copy<Mono<ToFmt>, Stereo<FromFmt>> {\n    static void copy(typename ToFmt::sample_t *dest, const typename FromFmt::sample_t *src, uint sample_count) {\n        for (; sample_count; sample_count--) {\n            // average first in case precision is better in source\n            typename FromFmt::sample_t averaged_sample = (src[0] + src[1]) / 2;\n            src += 2;\n            *dest++ = sample_converter<ToFmt, FromFmt>::convert_sample(averaged_sample);\n        }\n    }\n};\n\ntemplate<typename ToFmt, typename FromFmt>\naudio_buffer_t *consumer_pool_take(audio_connection_t *connection, bool block) {\n    struct buffer_copying_on_consumer_take_connection *cc = (struct buffer_copying_on_consumer_take_connection *) connection;\n    // for now we block until we have all the data in consumer buffers\n    audio_buffer_t *buffer = get_free_audio_buffer(cc->core.consumer_pool, block);\n    if (!buffer) return NULL;\n    assert(buffer->format->sample_stride == ToFmt::frame_stride);\n\n    uint32_t pos = 0;\n    while (pos < buffer->max_sample_count) {\n        if (!cc->current_producer_buffer) {\n            cc->current_producer_buffer = get_full_audio_buffer(cc->core.producer_pool, block);\n            if (!cc->current_producer_buffer) {\n                assert(!block);\n                if (!pos) {\n                    queue_free_audio_buffer(cc->core.consumer_pool, buffer);\n                    return NULL;\n                }\n                break;\n            }\n            assert(cc->current_producer_buffer->format->format->channel_count == FromFmt::channel_count);\n            assert(cc->current_producer_buffer->format->sample_stride == FromFmt::frame_stride);\n            cc->current_producer_buffer_pos = 0;\n        }\n        uint sample_count = std::min(buffer->max_sample_count - pos,\n                                     cc->current_producer_buffer->sample_count - cc->current_producer_buffer_pos);\n        converting_copy<ToFmt, FromFmt>::copy(\n                ((typename ToFmt::sample_t *) buffer->buffer->bytes) + pos * ToFmt::channel_count,\n                ((typename FromFmt::sample_t *) cc->current_producer_buffer->buffer->bytes) +\n                cc->current_producer_buffer_pos * FromFmt::channel_count,\n                sample_count);\n        pos += sample_count;\n        cc->current_producer_buffer_pos += sample_count;\n        if (cc->current_producer_buffer_pos == cc->current_producer_buffer->sample_count) {\n            queue_free_audio_buffer(cc->core.producer_pool, cc->current_producer_buffer);\n            cc->current_producer_buffer = NULL;\n        }\n    }\n    buffer->sample_count = pos;\n    return buffer;\n}\n\ntemplate<typename ToFmt, typename FromFmt>\nvoid producer_pool_blocking_give(audio_connection_t *connection, audio_buffer_t *buffer) {\n    struct producer_pool_blocking_give_connection *pbc = (struct producer_pool_blocking_give_connection *) connection;\n    // for now we block until we have all the data in consumer buffers\n    uint32_t pos = 0;\n    while (pos < buffer->sample_count) {\n        if (!pbc->current_consumer_buffer) {\n            pbc->current_consumer_buffer = get_free_audio_buffer(pbc->core.consumer_pool, true);\n            pbc->current_consumer_buffer_pos = 0;\n        }\n        uint sample_count = std::min(buffer->sample_count - pos,\n                                     pbc->current_consumer_buffer->max_sample_count - pbc->current_consumer_buffer_pos);\n        assert(buffer->format->sample_stride == FromFmt::frame_stride);\n        assert(buffer->format->format->channel_count == FromFmt::channel_count);\n        converting_copy<ToFmt, FromFmt>::copy(\n                ((typename ToFmt::sample_t *) pbc->current_consumer_buffer->buffer->bytes) +\n                pbc->current_consumer_buffer_pos * ToFmt::channel_count,\n                ((typename FromFmt::sample_t *) buffer->buffer->bytes) + pos * FromFmt::channel_count, sample_count);\n        pos += sample_count;\n        pbc->current_consumer_buffer_pos += sample_count;\n        if (pbc->current_consumer_buffer_pos == pbc->current_consumer_buffer->max_sample_count) {\n            pbc->current_consumer_buffer->sample_count = pbc->current_consumer_buffer->max_sample_count;\n            queue_full_audio_buffer(pbc->core.consumer_pool, pbc->current_consumer_buffer);\n            pbc->current_consumer_buffer = NULL;\n        }\n    }\n    // todo this should be a connection configuration (or a seaparate connection type)\n#ifdef BLOCKING_GIVE_SYNCHRONIZE_BUFFERS\n    if (pbc->current_consumer_buffer) {\n        pbc->current_consumer_buffer->sample_count = pbc->current_consumer_buffer_pos;\n        queue_full_audio_buffer(pbc->core.consumer_pool, pbc->current_consumer_buffer);\n        pbc->current_consumer_buffer = NULL;\n    }\n#endif\n    assert(pos == buffer->sample_count);\n    queue_free_audio_buffer(pbc->core.producer_pool, buffer);\n}\n\n#endif //SOFTWARE_SAMPLE_CONVERSION_H\n#endif"
  },
  {
    "path": "src/pico_extras_import.cmake",
    "content": "# This is a copy of <PICO_EXTRAS_PATH>/external/pico_extras_import.cmake\n\n# This can be dropped into an external project to help locate pico-extras\n# It should be include()ed prior to project()\n\nif (DEFINED ENV{PICO_EXTRAS_PATH} AND (NOT PICO_EXTRAS_PATH))\n    set(PICO_EXTRAS_PATH $ENV{PICO_EXTRAS_PATH})\n    message(\"Using PICO_EXTRAS_PATH from environment ('${PICO_EXTRAS_PATH}')\")\nendif ()\n\nif (DEFINED ENV{PICO_EXTRAS_FETCH_FROM_GIT} AND (NOT PICO_EXTRAS_FETCH_FROM_GIT))\n    set(PICO_EXTRAS_FETCH_FROM_GIT $ENV{PICO_EXTRAS_FETCH_FROM_GIT})\n    message(\"Using PICO_EXTRAS_FETCH_FROM_GIT from environment ('${PICO_EXTRAS_FETCH_FROM_GIT}')\")\nendif ()\n\nif (DEFINED ENV{PICO_EXTRAS_FETCH_FROM_GIT_PATH} AND (NOT PICO_EXTRAS_FETCH_FROM_GIT_PATH))\n    set(PICO_EXTRAS_FETCH_FROM_GIT_PATH $ENV{PICO_EXTRAS_FETCH_FROM_GIT_PATH})\n    message(\"Using PICO_EXTRAS_FETCH_FROM_GIT_PATH from environment ('${PICO_EXTRAS_FETCH_FROM_GIT_PATH}')\")\nendif ()\n\nif (NOT PICO_EXTRAS_PATH)\n    if (PICO_EXTRAS_FETCH_FROM_GIT)\n        include(FetchContent)\n        set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR})\n        if (PICO_EXTRAS_FETCH_FROM_GIT_PATH)\n            get_filename_component(FETCHCONTENT_BASE_DIR \"${PICO_EXTRAS_FETCH_FROM_GIT_PATH}\" REALPATH BASE_DIR \"${CMAKE_SOURCE_DIR}\")\n        endif ()\n        FetchContent_Declare(\n                PICO_EXTRAS\n                GIT_REPOSITORY https://github.com/raspberrypi/pico-extras\n                GIT_TAG master\n        )\n        if (NOT PICO_EXTRAS)\n            message(\"Downloading PICO EXTRAS\")\n            FetchContent_Populate(PICO_EXTRAS)\n            set(PICO_EXTRAS_PATH ${PICO_EXTRAS_SOURCE_DIR})\n        endif ()\n        set(FETCHCONTENT_BASE_DIR ${FETCHCONTENT_BASE_DIR_SAVE})\n    else ()\n        if (PICO_SDK_PATH AND EXISTS \"${PICO_SDK_PATH}/../pico-extras\")\n            set(PICO_EXTRAS_PATH ${PICO_SDK_PATH}/../pico-extras)\n            message(\"Defaulting PICO_EXTRAS_PATH as sibling of PICO_SDK_PATH: ${PICO_EXTRAS_PATH}\")\n        else()\n            message(FATAL_ERROR\n                    \"PICO EXTRAS location was not specified. Please set PICO_EXTRAS_PATH or set PICO_EXTRAS_FETCH_FROM_GIT to on to fetch from git.\"\n                    )\n        endif()\n    endif ()\nendif ()\n\nset(PICO_EXTRAS_PATH \"${PICO_EXTRAS_PATH}\" CACHE PATH \"Path to the PICO EXTRAS\")\nset(PICO_EXTRAS_FETCH_FROM_GIT \"${PICO_EXTRAS_FETCH_FROM_GIT}\" CACHE BOOL \"Set to ON to fetch copy of PICO EXTRAS from git if not otherwise locatable\")\nset(PICO_EXTRAS_FETCH_FROM_GIT_PATH \"${PICO_EXTRAS_FETCH_FROM_GIT_PATH}\" CACHE FILEPATH \"location to download EXTRAS\")\n\nget_filename_component(PICO_EXTRAS_PATH \"${PICO_EXTRAS_PATH}\" REALPATH BASE_DIR \"${CMAKE_BINARY_DIR}\")\nif (NOT EXISTS ${PICO_EXTRAS_PATH})\n    message(FATAL_ERROR \"Directory '${PICO_EXTRAS_PATH}' not found\")\nendif ()\n\nset(PICO_EXTRAS_PATH ${PICO_EXTRAS_PATH} CACHE PATH \"Path to the PICO EXTRAS\" FORCE)\n\nadd_subdirectory(${PICO_EXTRAS_PATH} pico_extras)"
  },
  {
    "path": "src/pico_sdk_import.cmake",
    "content": "# This is a copy of <PICO_SDK_PATH>/external/pico_sdk_import.cmake\n\n# This can be dropped into an external project to help locate this SDK\n# It should be include()ed prior to project()\n\nif (DEFINED ENV{PICO_SDK_PATH} AND (NOT PICO_SDK_PATH))\n    set(PICO_SDK_PATH $ENV{PICO_SDK_PATH})\n    message(\"Using PICO_SDK_PATH from environment ('${PICO_SDK_PATH}')\")\nendif ()\n\nif (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT} AND (NOT PICO_SDK_FETCH_FROM_GIT))\n    set(PICO_SDK_FETCH_FROM_GIT $ENV{PICO_SDK_FETCH_FROM_GIT})\n    message(\"Using PICO_SDK_FETCH_FROM_GIT from environment ('${PICO_SDK_FETCH_FROM_GIT}')\")\nendif ()\n\nif (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_PATH} AND (NOT PICO_SDK_FETCH_FROM_GIT_PATH))\n    set(PICO_SDK_FETCH_FROM_GIT_PATH $ENV{PICO_SDK_FETCH_FROM_GIT_PATH})\n    message(\"Using PICO_SDK_FETCH_FROM_GIT_PATH from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH}')\")\nendif ()\n\nset(PICO_SDK_PATH \"${PICO_SDK_PATH}\" CACHE PATH \"Path to the Raspberry Pi Pico SDK\")\nset(PICO_SDK_FETCH_FROM_GIT \"${PICO_SDK_FETCH_FROM_GIT}\" CACHE BOOL \"Set to ON to fetch copy of SDK from git if not otherwise locatable\")\nset(PICO_SDK_FETCH_FROM_GIT_PATH \"${PICO_SDK_FETCH_FROM_GIT_PATH}\" CACHE FILEPATH \"location to download SDK\")\n\nif (NOT PICO_SDK_PATH)\n    if (PICO_SDK_FETCH_FROM_GIT)\n        include(FetchContent)\n        set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR})\n        if (PICO_SDK_FETCH_FROM_GIT_PATH)\n            get_filename_component(FETCHCONTENT_BASE_DIR \"${PICO_SDK_FETCH_FROM_GIT_PATH}\" REALPATH BASE_DIR \"${CMAKE_SOURCE_DIR}\")\n        endif ()\n        # GIT_SUBMODULES_RECURSE was added in 3.17\n        if (${CMAKE_VERSION} VERSION_GREATER_EQUAL \"3.17.0\")\n            FetchContent_Declare(\n                    pico_sdk\n                    GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk\n                    GIT_TAG master\n                    GIT_SUBMODULES_RECURSE FALSE\n            )\n        else ()\n            FetchContent_Declare(\n                    pico_sdk\n                    GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk\n                    GIT_TAG master\n            )\n        endif ()\n\n        if (NOT pico_sdk)\n            message(\"Downloading Raspberry Pi Pico SDK\")\n            FetchContent_Populate(pico_sdk)\n            set(PICO_SDK_PATH ${pico_sdk_SOURCE_DIR})\n        endif ()\n        set(FETCHCONTENT_BASE_DIR ${FETCHCONTENT_BASE_DIR_SAVE})\n    else ()\n        message(FATAL_ERROR\n                \"SDK location was not specified. Please set PICO_SDK_PATH or set PICO_SDK_FETCH_FROM_GIT to on to fetch from git.\"\n                )\n    endif ()\nendif ()\n\nget_filename_component(PICO_SDK_PATH \"${PICO_SDK_PATH}\" REALPATH BASE_DIR \"${CMAKE_BINARY_DIR}\")\nif (NOT EXISTS ${PICO_SDK_PATH})\n    message(FATAL_ERROR \"Directory '${PICO_SDK_PATH}' not found\")\nendif ()\n\nset(PICO_SDK_INIT_CMAKE_FILE ${PICO_SDK_PATH}/pico_sdk_init.cmake)\nif (NOT EXISTS ${PICO_SDK_INIT_CMAKE_FILE})\n    message(FATAL_ERROR \"Directory '${PICO_SDK_PATH}' does not appear to contain the Raspberry Pi Pico SDK\")\nendif ()\n\nset(PICO_SDK_PATH ${PICO_SDK_PATH} CACHE PATH \"Path to the Raspberry Pi Pico SDK\" FORCE)\n\ninclude(${PICO_SDK_INIT_CMAKE_FILE})\n"
  },
  {
    "path": "src/pico_support.cpp",
    "content": "// pico_support.cpp\n\n#if (defined ARDUINO_ARCH_RP2040) || (defined ARDUINO_ARCH_RP2350)\n\n// ------------- I2S -------------------\n#include <AMY-Arduino.h>\n#include <I2S.h>\n\n// Create the I2S port using a PIO state machine\nI2S i2s(INPUT_PULLUP);\n\nextern \"C\" {\n    void pico_setup_i2s(amy_config_t *config);\n    void pico_teardown_i2s(amy_config_t *config);\n    void pico_i2s_read_write_buffer(int16_t *in_samples, const int16_t *out_samples, int nframes);\n}\n\n// Setting of system clock/sampling rate.\n// On RPi Pico, the system clock rate needs to be a multiple of 512.Fs so the PIO clock can generate 256.Fs MCLK without jitter.\n// The sysclk also has to be divided down from a multiple of 12 MHz in the range 750..1600 MHz, and the divider is implemented by two div(1..7) dividers.\n// As a result, we can't hit 44,100 exactly (but we can get within 0.2%), and the exact sys_clk and sample_rate vary.\n// We predefine settings for each of the possible clock rates from Arduino menu - 50 100 120 125 128 133 150 176 200 225 240 250 276 300\n#if AMY_SAMPLE_RATE != 44100\n  #error \"Pico clock setting logic is defined only for sample_rate == 44100.\"\n#endif\n#ifndef F_CPU\n  #define F_CPU 276000000\n#endif\n\n#if F_CPU == 300000000 || F_CPU == 276000000\n// works\n  #define F_CPU_MOD_KHZ 271200\n  #define F_SAMP 44140\n  #define VCO_FREQ 1356000000\n  #define PLL_PD1 5\n  #define PLL_PD2 1\n#elif F_CPU == 250000000 || F_CPU == 240000000\n// works\n  #define F_CPU_MOD_KHZ 248000\n  #define F_SAMP 44034\n  #define VCO_FREQ 1488000000\n  #define PLL_PD1 6\n  #define PLL_PD2 1\n#elif F_CPU == 225000000\n// works\n  #define F_CPU_MOD_KHZ 226000\n  #define F_SAMP 44140\n  #define VCO_FREQ 1356000000\n  #define PLL_PD1 6\n  #define PLL_PD2 1\n#elif F_CPU == 200000000\n// works.  LRCK is 43.9 kHz\n  #define F_CPU_MOD_KHZ 203143\n  #define F_SAMP 44084\n  #define VCO_FREQ 1422000000\n  #define PLL_PD1 7\n  #define PLL_PD2 1\n#elif F_CPU == 176000000\n// works.  LRCK is 43.9 kHz\n  #define F_CPU_MOD_KHZ 180750\n  #define F_SAMP 44128\n  #define VCO_FREQ 1446000000\n  #define PLL_PD1 4\n  #define PLL_PD2 2\n#elif F_CPU == 150000000\n// works as long as CPU clock is modified *before* MIDI UART is initialized.  LRCK is 44.1 kHz.  MCLK is sync'd\n// If MIDI UART is initialized *before* sys_set_clock_pll in pico_setup_i2s, baud rates are wrong and MIDI doesn't work.\n  #define F_CPU_MOD_KHZ 158000\n  #define F_SAMP 44084\n  #define VCO_FREQ 948000000\n  #define PLL_PD1 6\n  #define PLL_PD2 1\n#elif F_CPU == 133000000 || F_CPU == 128000000 || F_CPU == 125000000\n// works\n  #define F_CPU_MOD_KHZ 135428\n  #define F_SAMP 44084\n  #define VCO_FREQ 948000000\n  #define PLL_PD1 7\n  #define PLL_PD2 1\n#elif F_CPU == 120000000 || F_CPU == 100000000\n// works\n  #define F_CPU_MOD_KHZ 112800\n  #define F_SAMP 44062\n  #define VCO_FREQ 1128000000\n  #define PLL_PD1 5\n  #define PLL_PD2 2\n#elif F_CPU == 50000000\n// works. rp2350 can only run 2 simultaneous juno patch 0s.  \n  #define F_CPU_MOD_KHZ 45142\n  #define F_SAMP 44084\n  #define VCO_FREQ 948000000\n  #define PLL_PD1 7\n  #define PLL_PD2 3\n#endif\n\n\nvoid pico_setup_i2s(amy_config_t *config) {\n    // Hardware limitation to pico\n    assert(config->i2s_lrc == config->i2s_bclk + 1);\n \n    i2s.setDOUT(config->i2s_dout);\n    if (config->i2s_din != -1)\n        i2s.setDIN(config->i2s_din);\n    i2s.setBCLK(config->i2s_bclk);\n    // mlck must be set before setFrequency() and i2s.begin()\n    if (config->i2s_mclk != -1) {\n        i2s.setMCLK(config->i2s_mclk);\n        // MCLK_mult must be set before i2s.begin()\n        i2s.setMCLKmult(config->i2s_mclk_mult);\n    }\n    i2s.setBitsPerSample(32);  // We always run with 32 bit I2S words.\n    // Buffer size is in units of 32 bit words, our I2S samples are 32 bits.\n    i2s.setBuffers(6, AMY_BLOCK_SIZE * AMY_NCHANS, 0);\n    // Set the system clock to a compatible value to the samplerate.\n    // Best to do this before starting anything clock-dependent.\n    // The system clock rate must be an integer multiple of Fs * MCLKmult * 2, e.g. 22.58 MHz\n    // but it also has to be something we can generate with the sysclk PLL i.e. a multiple of\n    // 12 MHz in range 750..1600 MHz, which then divides down by two dividers of 1..7.\n    //set_sys_clock_khz(F_CPU_MOD_KHZ, false);\n    // VCO_FREQ, PLL_PD1, PLL_PD2 from e.g. python pico-sdk/src/rp2_common/hardware_clocks/scripts/vcocalc.py 135.428\n    set_sys_clock_pll(VCO_FREQ, PLL_PD1, PLL_PD2); \n    // start I2S at the sample rate\n    //i2s.setFrequency(AMY_SAMPLE_RATE);\n    i2s.setFrequency(F_SAMP);  // Requested sample rate must be <= effective sample rate coming from sysclk because of int division (?).\n    i2s.begin();\n}\n\nvoid pico_teardown_i2s(amy_config_t *config) {\n    i2s.end();\n}\n\nstatic int32_t buffer32[AMY_BLOCK_SIZE * AMY_NCHANS];\n\nvoid pico_i2s_read_write_buffer(int16_t *in_samples, const int16_t *out_samples, int nframes) {\n    // write the same sample twice, once for left and once for the right channel\n    assert(nframes <= AMY_BLOCK_SIZE);\n    i2s.read((uint8_t *)buffer32, (size_t)(nframes * AMY_NCHANS * sizeof(int32_t)));\n    for (int i = 0; i < nframes * AMY_NCHANS; ++i) {\n        in_samples[i] = (int16_t)(buffer32[i] >> 16L);\n    }\n    for (int i = 0; i < nframes * AMY_NCHANS; ++i) {\n        buffer32[i] = (((int32_t)out_samples[i]) << 16);\n    }\n    while (i2s.availableForWrite() == 0)\n        ;  // block.\n    i2s.write((const uint8_t *)buffer32, (size_t)(nframes * AMY_NCHANS * sizeof(int32_t)));\n}\n\n// ---- USB gadget ----\n\n//#include <Arduino.h>\n//#include <MIDI.h>\n#ifdef USE_TUSB\n#include <Adafruit_TinyUSB.h>\n#endif\nextern \"C\" {\n    void check_tusb_midi();\n\t\n    void pico_setup_midi() {\n#ifdef USE_TUSB\n        if (!TinyUSBDevice.isInitialized()) {\n            TinyUSBDevice.begin(0);\n        }\n        //usb_midi.setStringDescriptor(\"AMY Synthesizer\");\n\n#endif\n    }\n\n    void pico_teardown_midi() {\n#ifdef USE_TUSB\n        // There's no TinUSBDevice.end(), so just leave it initialized.\n#endif\n    }\n\n    void pico_process_midi() {\n\n#ifdef USE_TUSB\n#ifdef TINYUSB_NEED_POLLING_TASK\n        // Manual call tud_task since it isn't called by Core's background\n        TinyUSBDevice.task();\n#endif\n        check_tusb_midi();\n#endif\n    }\n}\n#endif\n"
  },
  {
    "path": "src/pyamy.c",
    "content": "#if !defined(ESP_PLATFORM) && !defined(PICO_ON_DEVICE) && !defined(ARDUINO)\n\n#include <Python.h>\n#include <math.h>\n#include <limits.h>\n#include <string.h>\n#include \"amy.h\"\n#include \"amy_midi.h\"\n#include \"libminiaudio-audio.h\"\n\n// Python module wrapper for AMY commands\n\nstatic PyObject * send_wrapper(PyObject *self, PyObject *args) {\n    char *arg1;\n    if (! PyArg_ParseTuple(args, \"s\", &arg1)) {\n        return NULL;\n    }\n    amy_add_message(arg1);\n    return Py_None;\n}\n\n// Like send_wire but marks the message as coming from an external sysex\n// source, so file transfer routing (transfer_flag) applies. Used by\n// amy.transfer_file() to send chunked base64 data after the zT header.\nstatic PyObject * send_wire_from_sysex_wrapper(PyObject *self, PyObject *args) {\n    char *arg1;\n    if (! PyArg_ParseTuple(args, \"s\", &arg1)) {\n        return NULL;\n    }\n    amy_add_message_from_sysex(arg1);\n    return Py_None;\n}\n\n\nstatic int parse_live_kwarg(amy_config_t *cfg, const char *key, PyObject *value) {\n    long lv = 0;\n    long long llv = 0;\n\n    if (strcmp(key, \"chorus\") == 0) {\n        lv = PyLong_AsLong(value);\n        if (PyErr_Occurred()) return -1;\n        cfg->features.chorus = (lv != 0);\n        return 0;\n    } else if (strcmp(key, \"reverb\") == 0) {\n        lv = PyLong_AsLong(value);\n        if (PyErr_Occurred()) return -1;\n        cfg->features.reverb = (lv != 0);\n        return 0;\n    } else if (strcmp(key, \"echo\") == 0) {\n        lv = PyLong_AsLong(value);\n        if (PyErr_Occurred()) return -1;\n        cfg->features.echo = (lv != 0);\n        return 0;\n    } else if (strcmp(key, \"audio_in\") == 0) {\n        lv = PyLong_AsLong(value);\n        if (PyErr_Occurred()) return -1;\n        cfg->features.audio_in = (lv != 0);\n        return 0;\n    } else if (strcmp(key, \"default_synths\") == 0) {\n        lv = PyLong_AsLong(value);\n        if (PyErr_Occurred()) return -1;\n        cfg->features.default_synths = (lv != 0);\n        return 0;\n    } else if (strcmp(key, \"partials\") == 0) {\n        lv = PyLong_AsLong(value);\n        if (PyErr_Occurred()) return -1;\n        cfg->features.partials = (lv != 0);\n        return 0;\n    } else if (strcmp(key, \"custom\") == 0) {\n        lv = PyLong_AsLong(value);\n        if (PyErr_Occurred()) return -1;\n        cfg->features.custom = (lv != 0);\n        return 0;\n    } else if (strcmp(key, \"startup_bleep\") == 0) {\n        lv = PyLong_AsLong(value);\n        if (PyErr_Occurred()) return -1;\n        cfg->features.startup_bleep = (lv != 0);\n        return 0;\n    } else if (strcmp(key, \"max_oscs\") == 0) {\n        lv = PyLong_AsLong(value);\n        if (PyErr_Occurred()) return -1;\n        if (lv < 0 || lv > UINT16_MAX) {\n            PyErr_SetString(PyExc_ValueError, \"max_oscs must be in range [0, 65535]\");\n            return -1;\n        }\n        cfg->max_oscs = (uint16_t)lv;\n        return 0;\n    } else if (strcmp(key, \"ks_oscs\") == 0) {\n        lv = PyLong_AsLong(value);\n        if (PyErr_Occurred()) return -1;\n        if (lv < 0 || lv > UINT8_MAX) {\n            PyErr_SetString(PyExc_ValueError, \"ks_oscs must be in range [0, 255]\");\n            return -1;\n        }\n        cfg->ks_oscs = (uint8_t)lv;\n        return 0;\n    } else if (strcmp(key, \"max_sequencer_tags\") == 0) {\n        llv = PyLong_AsLongLong(value);\n        if (PyErr_Occurred()) return -1;\n        if (llv < 0 || (unsigned long long)llv > UINT32_MAX) {\n            PyErr_SetString(PyExc_ValueError, \"max_sequencer_tags must be in range [0, 4294967295]\");\n            return -1;\n        }\n        cfg->max_sequencer_tags = (uint32_t)llv;\n        return 0;\n    } else if (strcmp(key, \"max_voices\") == 0) {\n        llv = PyLong_AsLongLong(value);\n        if (PyErr_Occurred()) return -1;\n        if (llv < 0 || (unsigned long long)llv > UINT32_MAX) {\n            PyErr_SetString(PyExc_ValueError, \"max_voices must be in range [0, 4294967295]\");\n            return -1;\n        }\n        cfg->max_voices = (uint32_t)llv;\n        return 0;\n    } else if (strcmp(key, \"max_synths\") == 0) {\n        llv = PyLong_AsLongLong(value);\n        if (PyErr_Occurred()) return -1;\n        if (llv < 0 || (unsigned long long)llv > UINT32_MAX) {\n            PyErr_SetString(PyExc_ValueError, \"max_synths must be in range [0, 4294967295]\");\n            return -1;\n        }\n        cfg->max_synths = (uint32_t)llv;\n        return 0;\n    } else if (strcmp(key, \"max_memory_patches\") == 0) {\n        llv = PyLong_AsLongLong(value);\n        if (PyErr_Occurred()) return -1;\n        if (llv < 0 || (unsigned long long)llv > UINT32_MAX) {\n            PyErr_SetString(PyExc_ValueError, \"max_memory_patches must be in range [0, 4294967295]\");\n            return -1;\n        }\n        cfg->max_memory_patches = (uint32_t)llv;\n        return 0;\n    } else if (strcmp(key, \"capture_device_id\") == 0) {\n        lv = PyLong_AsLong(value);\n        if (PyErr_Occurred()) return -1;\n        if (lv < INT8_MIN || lv > INT8_MAX) {\n            PyErr_SetString(PyExc_ValueError, \"capture_device_id must be in range [-128, 127]\");\n            return -1;\n        }\n        cfg->capture_device_id = (int8_t)lv;\n        return 0;\n    } else if (strcmp(key, \"playback_device_id\") == 0) {\n        lv = PyLong_AsLong(value);\n        if (PyErr_Occurred()) return -1;\n        if (lv < INT8_MIN || lv > INT8_MAX) {\n            PyErr_SetString(PyExc_ValueError, \"playback_device_id must be in range [-128, 127]\");\n            return -1;\n        }\n        cfg->playback_device_id = (int8_t)lv;\n        return 0;\n    }\n\n    PyErr_Format(PyExc_TypeError, \"live() got an unexpected keyword argument '%s'\", key);\n    return -1;\n}\n\nstatic PyObject * live_wrapper(PyObject *self, PyObject *args, PyObject *kwargs) {\n    amy_stop();\n    amy_config_t amy_config = amy_global.config;\n    Py_ssize_t pos = 0;\n    PyObject *key_obj = NULL;\n    PyObject *value_obj = NULL;\n\n    if (PyTuple_Size(args) != 0) {\n        PyErr_SetString(PyExc_TypeError, \"live() no longer accepts positional args; use keyword args like live(playback_device_id=..., capture_device_id=...)\");\n        return NULL;\n    }\n\n    amy_config.features.audio_in = 1;\n\n    while (kwargs != NULL && PyDict_Next(kwargs, &pos, &key_obj, &value_obj)) {\n        const char *key = PyUnicode_AsUTF8(key_obj);\n        if (key == NULL) return NULL;\n        if (parse_live_kwarg(&amy_config, key, value_obj) != 0) {\n            return NULL;\n        }\n    }\n\n    amy_config.audio = AMY_AUDIO_IS_MINIAUDIO;\n    amy_start(amy_config); // initializes amy \n    Py_RETURN_NONE;\n}\n\nstatic PyObject * amystop_wrapper(PyObject *self, PyObject *args) {\n    amy_stop();\n    return Py_None;\n}\n\nstatic PyObject * amystart_wrapper(PyObject *self, PyObject *args) {\n    int default_synths = 0;\n    if(PyTuple_Size(args) == 1) {\n        PyArg_ParseTuple(args, \"i\", &default_synths);\n    }\n    amy_config_t amy_config = amy_global.config; // amy_default_config();\n    amy_config.features.default_synths = default_synths;\n    amy_start(amy_config); // initializes amy \n    return Py_None;\n}\n\nstatic PyObject * config_wrapper(PyObject *self, PyObject *args) {\n    PyObject* ret = PyList_New(5); \n    PyList_SetItem(ret, 0, Py_BuildValue(\"i\", AMY_BLOCK_SIZE));\n    PyList_SetItem(ret, 1, Py_BuildValue(\"i\", AMY_CORES));\n    PyList_SetItem(ret, 2, Py_BuildValue(\"i\", AMY_NCHANS));\n    PyList_SetItem(ret, 3, Py_BuildValue(\"i\", AMY_SAMPLE_RATE));\n    PyList_SetItem(ret, 4, Py_BuildValue(\"i\", AMY_OSCS));\n    return ret;\n}\n\nstatic PyObject * render_wrapper(PyObject *self, PyObject *args) {\n    int16_t * result = amy_simple_fill_buffer();\n    // Create a python list of ints (they are signed shorts that come back)\n    uint16_t bs = AMY_BLOCK_SIZE;\n    if(AMY_NCHANS == 2) {\n        bs = AMY_BLOCK_SIZE*2;\n    }\n    PyObject* ret = PyList_New(bs); \n    for (int i = 0; i < bs; i++) {\n        PyObject* python_int = Py_BuildValue(\"i\", result[i]);\n        PyList_SetItem(ret, i, python_int);\n    }\n    return ret;\n}\n\nstatic PyObject * inject_midi_wrapper(PyObject *self, PyObject *args) {\n#define MAX_MIDI_ARGS 16\n    int data[MAX_MIDI_ARGS];\n    uint8_t byte_data[MAX_MIDI_ARGS];\n    uint32_t time = AMY_UNSET_VALUE(time);\n    // But for now we accept only exactly 3 or 4 values: [time,] midi_bytes0..2\n    if (! PyArg_ParseTuple(args, \"iiii\", &time, &data[0], &data[1], &data[2]))\n      if (! PyArg_ParseTuple(args, \"iii\", &data[0], &data[1], &data[2]))\n        return NULL;\n    uint8_t sysex = 0;\n    for (int i = 0; i < 3; ++i)  byte_data[i] = (uint8_t)data[i];\n    amy_event_midi_message_received(byte_data, 3, sysex, time);\n    return Py_None;\n}\n\nstatic PyObject * get_synth_commands_wrapper(PyObject *self, PyObject *args) {\n    char s[MAX_MESSAGE_LEN];\n    void *state = NULL;\n    int synth, include_fx;\n    if(!(PyTuple_Size(args) == 1 || PyTuple_Size(args) == 2)) {\n        return NULL;\n    }\n    if (PyTuple_Size(args) == 1) {\n        if (!PyArg_ParseTuple(args, \"i\", &synth)) return NULL;\n        include_fx = 1;\n    } else {  // 2 args\n        if (!PyArg_ParseTuple(args, \"ip\", &synth, &include_fx)) return NULL;\n    }\n    PyObject* list_obj = PyList_New(0);\n    do {\n        state = yield_synth_commands(synth, s, MAX_MESSAGE_LEN, include_fx, state);\n        int slen = strlen(s);\n        if (slen)\n            PyList_Append(list_obj, PyUnicode_FromString(s));\n    } while (state != NULL);\n    return list_obj;\n}\n\n\nstatic PyMethodDef c_amyMethods[] = {\n    {\"render_to_list\", render_wrapper, METH_VARARGS, \"Render audio\"},\n    {\"send_wire\", send_wrapper, METH_VARARGS, \"Send a message\"},\n    {\"send_wire_from_sysex\", send_wire_from_sysex_wrapper, METH_VARARGS, \"Send a message as if from sysex (for transfer_file)\"},\n    {\"live\", (PyCFunction)live_wrapper, METH_VARARGS | METH_KEYWORDS, \"Live AMY\"},\n    {\"start\", amystart_wrapper, METH_VARARGS, \"Start AMY\"},\n    {\"stop\", amystop_wrapper, METH_VARARGS, \"Stop AMY\"},\n    {\"config\", config_wrapper, METH_VARARGS, \"Return config\"},\n    {\"inject_midi\", inject_midi_wrapper, METH_VARARGS, \"Inject a MIDI message\"},\n    {\"get_synth_commands\", get_synth_commands_wrapper, METH_VARARGS, \"Read synth configuration commands\"},\n    { NULL, NULL, 0, NULL }\n};\n\nstatic struct PyModuleDef c_amyDef =\n{\n    PyModuleDef_HEAD_INIT,\n    \"c_amy\", /* name of module */\n    \"\",          /* module documentation, may be NULL */\n    -1,          /* size of per-interpreter state of the module, or -1 if the module keeps state in global variables. */\n    c_amyMethods\n};\n\nPyMODINIT_FUNC PyInit_c_amy(void)\n{\n    // This is the first time it's called, so there's nothing in amy_global.\n    // But for later calls, we copy the existing amy_global.config.\n    amy_config_t amy_config = amy_default_config();\n    amy_start(amy_config);\n    return PyModule_Create(&c_amyDef);\n}\n#endif\n"
  },
  {
    "path": "src/saw_lutset_fxpt.h",
    "content": "// Automatically-generated LUTset\n#ifndef LUTSET_SAW_FXPT_DEFINED\n#define LUTSET_SAW_FXPT_DEFINED\n\n#ifndef LUTENTRY_FXPT_DEFINED\n#define LUTENTRY_FXPT_DEFINED\ntypedef struct {\n    const int16_t *table;\n    int table_size;\n    int log_2_table_size;\n    int highest_harmonic;\n    float scale_factor;\n} lut_entry_fxpt;\n#endif // LUTENTRY_FXPT_DEFINED\n\nconst int16_t saw_fxpt_lutable_0[2048] PROGMEM = {\n0,-13422,-24246,-30779,-32768,-31341,-28424,-25913,\n-24958,-25672,-27313,-28823,-29405,-28879,-27680,-26538,\n-26055,-26400,-27275,-28123,-28462,-28139,-27380,-26631,\n-26296,-26513,-27101,-27688,-27927,-27693,-27135,-26574,\n-26311,-26462,-26901,-27347,-27531,-27348,-26906,-26453,\n-26233,-26344,-26691,-27050,-27200,-27049,-26682,-26301,\n-26109,-26193,-26478,-26777,-26903,-26775,-26460,-26130,\n-25959,-26024,-26263,-26519,-26627,-26516,-26240,-25947,\n-25791,-25842,-26047,-26270,-26365,-26266,-26020,-25757,\n-25613,-25652,-25831,-26027,-26112,-26024,-25801,-25561,\n-25426,-25456,-25614,-25790,-25866,-25785,-25583,-25361,\n-25234,-25257,-25397,-25555,-25625,-25551,-25364,-25159,\n-25038,-25054,-25180,-25324,-25387,-25319,-25146,-24954,\n-24838,-24849,-24962,-25094,-25152,-25089,-24927,-24747,\n-24636,-24643,-24745,-24866,-24920,-24861,-24709,-24539,\n-24432,-24434,-24527,-24639,-24689,-24634,-24491,-24329,\n-24226,-24225,-24309,-24413,-24460,-24408,-24273,-24119,\n-24019,-24015,-24092,-24188,-24232,-24183,-24055,-23907,\n-23810,-23803,-23874,-23964,-24006,-23959,-23837,-23695,\n-23601,-23591,-23656,-23741,-23780,-23736,-23619,-23483,\n-23390,-23379,-23439,-23518,-23555,-23513,-23401,-23270,\n-23179,-23166,-23221,-23295,-23330,-23290,-23183,-23056,\n-22968,-22953,-23003,-23073,-23106,-23068,-22965,-22843,\n-22756,-22739,-22785,-22852,-22883,-22846,-22747,-22628,\n-22543,-22525,-22567,-22630,-22660,-22625,-22529,-22414,\n-22330,-22310,-22350,-22409,-22438,-22404,-22311,-22199,\n-22117,-22096,-22132,-22188,-22216,-22183,-22094,-21984,\n-21903,-21881,-21914,-21967,-21994,-21962,-21876,-21769,\n-21689,-21666,-21696,-21747,-21772,-21742,-21658,-21554,\n-21475,-21450,-21478,-21526,-21551,-21521,-21440,-21338,\n-21260,-21235,-21261,-21306,-21330,-21301,-21222,-21123,\n-21046,-21019,-21043,-21086,-21109,-21081,-21004,-20907,\n-20831,-20803,-20825,-20866,-20888,-20861,-20786,-20691,\n-20616,-20588,-20607,-20647,-20667,-20641,-20568,-20475,\n-20401,-20372,-20389,-20427,-20447,-20422,-20350,-20259,\n-20185,-20156,-20171,-20207,-20226,-20202,-20133,-20043,\n-19970,-19939,-19954,-19988,-20006,-19982,-19915,-19827,\n-19754,-19723,-19736,-19768,-19786,-19763,-19697,-19610,\n-19538,-19507,-19518,-19549,-19566,-19544,-19479,-19394,\n-19323,-19290,-19300,-19330,-19346,-19324,-19261,-19178,\n-19107,-19074,-19082,-19111,-19127,-19105,-19043,-18961,\n-18891,-18857,-18864,-18891,-18907,-18886,-18825,-18744,\n-18675,-18641,-18646,-18672,-18687,-18667,-18607,-18528,\n-18459,-18424,-18429,-18453,-18468,-18448,-18390,-18311,\n-18242,-18207,-18211,-18234,-18248,-18229,-18172,-18094,\n-18026,-17991,-17993,-18015,-18029,-18010,-17954,-17878,\n-17810,-17774,-17775,-17796,-17810,-17791,-17736,-17661,\n-17593,-17557,-17557,-17578,-17590,-17572,-17518,-17444,\n-17377,-17340,-17339,-17359,-17371,-17353,-17300,-17227,\n-17160,-17123,-17122,-17140,-17152,-17135,-17082,-17010,\n-16944,-16906,-16904,-16921,-16933,-16916,-16864,-16793,\n-16727,-16689,-16686,-16702,-16714,-16697,-16647,-16576,\n-16511,-16472,-16468,-16484,-16495,-16478,-16429,-16359,\n-16294,-16255,-16250,-16265,-16276,-16260,-16211,-16142,\n-16077,-16038,-16032,-16046,-16057,-16041,-15993,-15925,\n-15860,-15821,-15814,-15828,-15838,-15822,-15775,-15708,\n-15644,-15604,-15597,-15609,-15619,-15604,-15557,-15491,\n-15427,-15387,-15379,-15391,-15400,-15385,-15339,-15273,\n-15210,-15170,-15161,-15172,-15181,-15167,-15122,-15056,\n-14993,-14953,-14943,-14953,-14962,-14948,-14904,-14839,\n-14776,-14736,-14725,-14735,-14743,-14730,-14686,-14622,\n-14559,-14518,-14507,-14516,-14525,-14511,-14468,-14405,\n-14342,-14301,-14289,-14298,-14306,-14293,-14250,-14187,\n-14125,-14084,-14072,-14079,-14087,-14074,-14032,-13970,\n-13908,-13867,-13854,-13861,-13868,-13856,-13814,-13753,\n-13691,-13649,-13636,-13643,-13650,-13637,-13597,-13536,\n-13474,-13432,-13418,-13424,-13431,-13419,-13379,-13318,\n-13257,-13215,-13200,-13206,-13212,-13200,-13161,-13101,\n-13040,-12998,-12982,-12987,-12994,-12982,-12943,-12884,\n-12823,-12780,-12764,-12769,-12775,-12763,-12725,-12666,\n-12606,-12563,-12547,-12550,-12556,-12545,-12507,-12449,\n-12389,-12346,-12329,-12332,-12338,-12327,-12289,-12232,\n-12172,-12128,-12111,-12114,-12119,-12108,-12072,-12014,\n-11955,-11911,-11893,-11895,-11901,-11890,-11854,-11797,\n-11737,-11693,-11675,-11677,-11682,-11672,-11636,-11580,\n-11520,-11476,-11457,-11459,-11464,-11453,-11418,-11362,\n-11303,-11259,-11239,-11240,-11245,-11235,-11200,-11145,\n-11086,-11041,-11022,-11022,-11027,-11017,-10982,-10927,\n-10869,-10824,-10804,-10804,-10808,-10798,-10764,-10710,\n-10651,-10607,-10586,-10585,-10590,-10580,-10546,-10493,\n-10434,-10389,-10368,-10367,-10371,-10362,-10329,-10275,\n-10217,-10172,-10150,-10149,-10153,-10143,-10111,-10058,\n-10000,-9954,-9932,-9931,-9934,-9925,-9893,-9840,\n-9782,-9737,-9714,-9712,-9716,-9707,-9675,-9623,\n-9565,-9519,-9497,-9494,-9497,-9489,-9457,-9405,\n-9348,-9302,-9279,-9276,-9279,-9270,-9239,-9188,\n-9130,-9084,-9061,-9058,-9061,-9052,-9021,-8970,\n-8913,-8867,-8843,-8839,-8842,-8834,-8804,-8753,\n-8696,-8649,-8625,-8621,-8624,-8616,-8586,-8536,\n-8479,-8432,-8407,-8403,-8405,-8397,-8368,-8318,\n-8261,-8215,-8189,-8185,-8187,-8179,-8150,-8101,\n-8044,-7997,-7972,-7966,-7969,-7961,-7932,-7883,\n-7827,-7780,-7754,-7748,-7750,-7743,-7714,-7666,\n-7609,-7562,-7536,-7530,-7532,-7524,-7496,-7448,\n-7392,-7345,-7318,-7312,-7313,-7306,-7279,-7231,\n-7174,-7127,-7100,-7093,-7095,-7088,-7061,-7013,\n-6957,-6910,-6882,-6875,-6877,-6870,-6843,-6796,\n-6740,-6692,-6664,-6657,-6658,-6652,-6625,-6578,\n-6522,-6475,-6447,-6439,-6440,-6433,-6407,-6361,\n-6305,-6257,-6229,-6221,-6222,-6215,-6189,-6143,\n-6088,-6040,-6011,-6002,-6003,-5997,-5971,-5926,\n-5870,-5822,-5793,-5784,-5785,-5779,-5754,-5708,\n-5653,-5604,-5575,-5566,-5567,-5561,-5536,-5490,\n-5435,-5387,-5357,-5348,-5348,-5342,-5318,-5273,\n-5218,-5169,-5139,-5130,-5130,-5124,-5100,-5055,\n-5001,-4952,-4922,-4911,-4912,-4906,-4882,-4838,\n-4783,-4734,-4704,-4693,-4693,-4688,-4664,-4620,\n-4566,-4517,-4486,-4475,-4475,-4470,-4446,-4403,\n-4348,-4299,-4268,-4257,-4257,-4252,-4229,-4185,\n-4131,-4082,-4050,-4039,-4038,-4033,-4011,-3968,\n-3914,-3864,-3832,-3821,-3820,-3815,-3793,-3750,\n-3696,-3647,-3614,-3602,-3602,-3597,-3575,-3533,\n-3479,-3429,-3397,-3384,-3383,-3379,-3357,-3315,\n-3261,-3212,-3179,-3166,-3165,-3161,-3139,-3098,\n-3044,-2994,-2961,-2948,-2947,-2942,-2921,-2880,\n-2827,-2776,-2743,-2730,-2729,-2724,-2704,-2662,\n-2609,-2559,-2525,-2512,-2510,-2506,-2486,-2445,\n-2392,-2341,-2307,-2293,-2292,-2288,-2268,-2227,\n-2174,-2124,-2089,-2075,-2074,-2070,-2050,-2010,\n-1957,-1906,-1872,-1857,-1855,-1852,-1832,-1792,\n-1739,-1689,-1654,-1639,-1637,-1634,-1614,-1575,\n-1522,-1471,-1436,-1421,-1419,-1415,-1396,-1357,\n-1305,-1254,-1218,-1203,-1201,-1197,-1179,-1140,\n-1087,-1036,-1000,-984,-982,-979,-961,-922,\n-870,-818,-782,-766,-764,-761,-743,-704,\n-652,-601,-564,-548,-546,-543,-525,-487,\n-435,-383,-347,-330,-327,-325,-307,-269,\n-217,-166,-129,-112,-109,-106,-89,-52,\n0,52,89,106,109,112,129,166,\n217,269,307,325,327,330,347,383,\n435,487,525,543,546,548,564,601,\n652,704,743,761,764,766,782,818,\n870,922,961,979,982,984,1000,1036,\n1087,1140,1179,1197,1201,1203,1218,1254,\n1305,1357,1396,1415,1419,1421,1436,1471,\n1522,1575,1614,1634,1637,1639,1654,1689,\n1739,1792,1832,1852,1855,1857,1872,1906,\n1957,2010,2050,2070,2074,2075,2089,2124,\n2174,2227,2268,2288,2292,2293,2307,2341,\n2392,2445,2486,2506,2510,2512,2525,2559,\n2609,2662,2704,2724,2729,2730,2743,2776,\n2827,2880,2921,2942,2947,2948,2961,2994,\n3044,3098,3139,3161,3165,3166,3179,3212,\n3261,3315,3357,3379,3383,3384,3397,3429,\n3479,3533,3575,3597,3602,3602,3614,3647,\n3696,3750,3793,3815,3820,3821,3832,3864,\n3914,3968,4011,4033,4038,4039,4050,4082,\n4131,4185,4229,4252,4257,4257,4268,4299,\n4348,4403,4446,4470,4475,4475,4486,4517,\n4566,4620,4664,4688,4693,4693,4704,4734,\n4783,4838,4882,4906,4912,4911,4922,4952,\n5001,5055,5100,5124,5130,5130,5139,5169,\n5218,5273,5318,5342,5348,5348,5357,5387,\n5435,5490,5536,5561,5567,5566,5575,5604,\n5653,5708,5754,5779,5785,5784,5793,5822,\n5870,5926,5971,5997,6003,6002,6011,6040,\n6088,6143,6189,6215,6222,6221,6229,6257,\n6305,6361,6407,6433,6440,6439,6447,6475,\n6522,6578,6625,6652,6658,6657,6664,6692,\n6740,6796,6843,6870,6877,6875,6882,6910,\n6957,7013,7061,7088,7095,7093,7100,7127,\n7174,7231,7279,7306,7313,7312,7318,7345,\n7392,7448,7496,7524,7532,7530,7536,7562,\n7609,7666,7714,7743,7750,7748,7754,7780,\n7827,7883,7932,7961,7969,7966,7972,7997,\n8044,8101,8150,8179,8187,8185,8189,8215,\n8261,8318,8368,8397,8405,8403,8407,8432,\n8479,8536,8586,8616,8624,8621,8625,8649,\n8696,8753,8804,8834,8842,8839,8843,8867,\n8913,8970,9021,9052,9061,9058,9061,9084,\n9130,9188,9239,9270,9279,9276,9279,9302,\n9348,9405,9457,9489,9497,9494,9497,9519,\n9565,9623,9675,9707,9716,9712,9714,9737,\n9782,9840,9893,9925,9934,9931,9932,9954,\n10000,10058,10111,10143,10153,10149,10150,10172,\n10217,10275,10329,10362,10371,10367,10368,10389,\n10434,10493,10546,10580,10590,10585,10586,10607,\n10651,10710,10764,10798,10808,10804,10804,10824,\n10869,10927,10982,11017,11027,11022,11022,11041,\n11086,11145,11200,11235,11245,11240,11239,11259,\n11303,11362,11418,11453,11464,11459,11457,11476,\n11520,11580,11636,11672,11682,11677,11675,11693,\n11737,11797,11854,11890,11901,11895,11893,11911,\n11955,12014,12072,12108,12119,12114,12111,12128,\n12172,12232,12289,12327,12338,12332,12329,12346,\n12389,12449,12507,12545,12556,12550,12547,12563,\n12606,12666,12725,12763,12775,12769,12764,12780,\n12823,12884,12943,12982,12994,12987,12982,12998,\n13040,13101,13161,13200,13212,13206,13200,13215,\n13257,13318,13379,13419,13431,13424,13418,13432,\n13474,13536,13597,13637,13650,13643,13636,13649,\n13691,13753,13814,13856,13868,13861,13854,13867,\n13908,13970,14032,14074,14087,14079,14072,14084,\n14125,14187,14250,14293,14306,14298,14289,14301,\n14342,14405,14468,14511,14525,14516,14507,14518,\n14559,14622,14686,14730,14743,14735,14725,14736,\n14776,14839,14904,14948,14962,14953,14943,14953,\n14993,15056,15122,15167,15181,15172,15161,15170,\n15210,15273,15339,15385,15400,15391,15379,15387,\n15427,15491,15557,15604,15619,15609,15597,15604,\n15644,15708,15775,15822,15838,15828,15814,15821,\n15860,15925,15993,16041,16057,16046,16032,16038,\n16077,16142,16211,16260,16276,16265,16250,16255,\n16294,16359,16429,16478,16495,16484,16468,16472,\n16511,16576,16647,16697,16714,16702,16686,16689,\n16727,16793,16864,16916,16933,16921,16904,16906,\n16944,17010,17082,17135,17152,17140,17122,17123,\n17160,17227,17300,17353,17371,17359,17339,17340,\n17377,17444,17518,17572,17590,17578,17557,17557,\n17593,17661,17736,17791,17810,17796,17775,17774,\n17810,17878,17954,18010,18029,18015,17993,17991,\n18026,18094,18172,18229,18248,18234,18211,18207,\n18242,18311,18390,18448,18468,18453,18429,18424,\n18459,18528,18607,18667,18687,18672,18646,18641,\n18675,18744,18825,18886,18907,18891,18864,18857,\n18891,18961,19043,19105,19127,19111,19082,19074,\n19107,19178,19261,19324,19346,19330,19300,19290,\n19323,19394,19479,19544,19566,19549,19518,19507,\n19538,19610,19697,19763,19786,19768,19736,19723,\n19754,19827,19915,19982,20006,19988,19954,19939,\n19970,20043,20133,20202,20226,20207,20171,20156,\n20185,20259,20350,20422,20447,20427,20389,20372,\n20401,20475,20568,20641,20667,20647,20607,20588,\n20616,20691,20786,20861,20888,20866,20825,20803,\n20831,20907,21004,21081,21109,21086,21043,21019,\n21046,21123,21222,21301,21330,21306,21261,21235,\n21260,21338,21440,21521,21551,21526,21478,21450,\n21475,21554,21658,21742,21772,21747,21696,21666,\n21689,21769,21876,21962,21994,21967,21914,21881,\n21903,21984,22094,22183,22216,22188,22132,22096,\n22117,22199,22311,22404,22438,22409,22350,22310,\n22330,22414,22529,22625,22660,22630,22567,22525,\n22543,22628,22747,22846,22883,22852,22785,22739,\n22756,22843,22965,23068,23106,23073,23003,22953,\n22968,23056,23183,23290,23330,23295,23221,23166,\n23179,23270,23401,23513,23555,23518,23439,23379,\n23390,23483,23619,23736,23780,23741,23656,23591,\n23601,23695,23837,23959,24006,23964,23874,23803,\n23810,23907,24055,24183,24232,24188,24092,24015,\n24019,24119,24273,24408,24460,24413,24309,24225,\n24226,24329,24491,24634,24689,24639,24527,24434,\n24432,24539,24709,24861,24920,24866,24745,24643,\n24636,24747,24927,25089,25152,25094,24962,24849,\n24838,24954,25146,25319,25387,25324,25180,25054,\n25038,25159,25364,25551,25625,25555,25397,25257,\n25234,25361,25583,25785,25866,25790,25614,25456,\n25426,25561,25801,26024,26112,26027,25831,25652,\n25613,25757,26020,26266,26365,26270,26047,25842,\n25791,25947,26240,26516,26627,26519,26263,26024,\n25959,26130,26460,26775,26903,26777,26478,26193,\n26109,26301,26682,27049,27200,27050,26691,26344,\n26233,26453,26906,27348,27531,27347,26901,26462,\n26311,26574,27135,27693,27927,27688,27101,26513,\n26296,26631,27380,28139,28462,28123,27275,26400,\n26055,26538,27680,28879,29405,28823,27313,25672,\n24958,25913,28424,31341,32767,30779,24246,13422,\n};\n\nconst int16_t saw_fxpt_lutable_1[2048] PROGMEM = {\n0,-9680,-18396,-25357,-30080,-32461,-32768,-31558,\n-29546,-27445,-25831,-25039,-25135,-25944,-27128,-28297,\n-29119,-29397,-29108,-28386,-27474,-26641,-26109,-25997,\n-26293,-26870,-27533,-28077,-28346,-28274,-27896,-27335,\n-26756,-26320,-26137,-26238,-26570,-27014,-27429,-27687,\n-27712,-27501,-27119,-26678,-26300,-26086,-26083,-26275,\n-26589,-26920,-27164,-27243,-27133,-26865,-26516,-26184,\n-25956,-25888,-25987,-26210,-26479,-26705,-26816,-26773,\n-26588,-26310,-26016,-25785,-25676,-25708,-25860,-26077,\n-26283,-26411,-26417,-26295,-26075,-25817,-25590,-25453,\n-25435,-25530,-25701,-25885,-26022,-26062,-25989,-25819,\n-25595,-25378,-25223,-25167,-25215,-25344,-25505,-25642,\n-25707,-25674,-25547,-25357,-25153,-24988,-24903,-24912,\n-25003,-25139,-25272,-25353,-25352,-25263,-25104,-24917,\n-24749,-24642,-24618,-24674,-24785,-24909,-25000,-25024,\n-24967,-24839,-24671,-24505,-24383,-24331,-24357,-24442,\n-24553,-24649,-24692,-24664,-24564,-24417,-24257,-24125,\n-24051,-24049,-24109,-24205,-24299,-24357,-24352,-24280,\n-24153,-24004,-23867,-23776,-23749,-23784,-23863,-23953,\n-24019,-24035,-23987,-23882,-23745,-23608,-23504,-23456,\n-23468,-23528,-23610,-23681,-23712,-23686,-23603,-23481,\n-23348,-23235,-23168,-23159,-23200,-23271,-23343,-23386,\n-23379,-23317,-23211,-23084,-22967,-22886,-22856,-22879,\n-22937,-23006,-23057,-23067,-23024,-22935,-22818,-22700,\n-22608,-22560,-22564,-22608,-22671,-22727,-22750,-22725,\n-22653,-22547,-22431,-22332,-22270,-22255,-22284,-22339,\n-22396,-22429,-22420,-22366,-22273,-22162,-22058,-21983,\n-21952,-21965,-22010,-22065,-22105,-22111,-22072,-21993,\n-21890,-21785,-21701,-21655,-21652,-21685,-21735,-21779,\n-21796,-21773,-21709,-21615,-21511,-21421,-21362,-21344,\n-21364,-21407,-21453,-21479,-21470,-21420,-21337,-21237,\n-21143,-21073,-21041,-21048,-21082,-21126,-21159,-21161,\n-21126,-21055,-20961,-20866,-20788,-20743,-20736,-20760,\n-20801,-20837,-20849,-20827,-20769,-20683,-20589,-20505,\n-20449,-20428,-20442,-20476,-20513,-20534,-20524,-20478,\n-20403,-20311,-20224,-20158,-20125,-20127,-20154,-20190,\n-20216,-20217,-20184,-20118,-20033,-19944,-19871,-19827,\n-19816,-19834,-19867,-19897,-19906,-19885,-19831,-19752,\n-19665,-19586,-19532,-19509,-19517,-19545,-19576,-19592,\n-19582,-19539,-19469,-19385,-19303,-19240,-19207,-19204,\n-19225,-19255,-19276,-19275,-19244,-19183,-19104,-19021,\n-18951,-18908,-18894,-18907,-18934,-18959,-18966,-18945,\n-18894,-18821,-18739,-18665,-18612,-18588,-18592,-18614,\n-18640,-18653,-18642,-18602,-18537,-18458,-18380,-18320,\n-18285,-18280,-18296,-18320,-18338,-18336,-18306,-18249,\n-18175,-18097,-18030,-17986,-17971,-17979,-18001,-18022,\n-18027,-18007,-17959,-17891,-17813,-17742,-17690,-17665,\n-17665,-17683,-17705,-17716,-17704,-17666,-17605,-17530,\n-17456,-17397,-17363,-17354,-17366,-17387,-17402,-17399,\n-17370,-17316,-17246,-17171,-17107,-17064,-17046,-17051,\n-17069,-17087,-17090,-17070,-17025,-16960,-16887,-16818,\n-16767,-16741,-16738,-16753,-16771,-16779,-16768,-16731,\n-16673,-16602,-16531,-16474,-16439,-16428,-16437,-16454,\n-16466,-16462,-16435,-16384,-16316,-16245,-16183,-16140,\n-16121,-16123,-16138,-16152,-16154,-16135,-16092,-16030,\n-15959,-15893,-15843,-15816,-15811,-15822,-15837,-15844,\n-15832,-15797,-15742,-15674,-15605,-15549,-15514,-15501,\n-15507,-15522,-15532,-15527,-15500,-15451,-15387,-15318,\n-15258,-15215,-15194,-15194,-15206,-15218,-15219,-15200,\n-15159,-15100,-15032,-14968,-14918,-14890,-14883,-14891,\n-14904,-14909,-14898,-14864,-14810,-14745,-14679,-14624,\n-14588,-14574,-14577,-14589,-14598,-14592,-14566,-14520,\n-14458,-14391,-14332,-14289,-14267,-14265,-14275,-14285,\n-14285,-14266,-14226,-14169,-14104,-14041,-13993,-13963,\n-13955,-13961,-13971,-13975,-13964,-13931,-13880,-13816,\n-13752,-13698,-13662,-13646,-13648,-13657,-13664,-13658,\n-13633,-13588,-13528,-13464,-13406,-13363,-13340,-13336,\n-13343,-13352,-13351,-13333,-13294,-13239,-13176,-13115,\n-13066,-13036,-13026,-13030,-13039,-13042,-13030,-12999,\n-12949,-12888,-12825,-12772,-12735,-12718,-12718,-12726,\n-12731,-12725,-12700,-12657,-12599,-12536,-12479,-12436,\n-12413,-12407,-12412,-12419,-12418,-12400,-12363,-12309,\n-12248,-12188,-12139,-12109,-12097,-12100,-12107,-12109,\n-12097,-12066,-12018,-11959,-11898,-11845,-11808,-11790,\n-11788,-11794,-11799,-11792,-11768,-11726,-11670,-11608,\n-11552,-11509,-11485,-11477,-11481,-11487,-11485,-11467,\n-11431,-11379,-11319,-11260,-11212,-11181,-11168,-11169,\n-11175,-11176,-11164,-11135,-11088,-11030,-10970,-10918,\n-10880,-10861,-10858,-10863,-10866,-10859,-10836,-10795,\n-10740,-10680,-10624,-10582,-10556,-10548,-10550,-10555,\n-10552,-10535,-10500,-10450,-10391,-10333,-10285,-10253,\n-10239,-10239,-10243,-10244,-10232,-10203,-10158,-10101,\n-10042,-9990,-9953,-9932,-9928,-9931,-9934,-9927,\n-9904,-9864,-9811,-9752,-9697,-9654,-9628,-9618,\n-9619,-9623,-9620,-9603,-9569,-9520,-9462,-9405,\n-9357,-9325,-9310,-9308,-9312,-9312,-9300,-9272,\n-9227,-9172,-9114,-9062,-9024,-9003,-8997,-9000,\n-9002,-8995,-8973,-8934,-8881,-8823,-8769,-8726,\n-8699,-8688,-8688,-8691,-8688,-8671,-8638,-8590,\n-8533,-8477,-8429,-8397,-8380,-8377,-8380,-8380,\n-8368,-8341,-8297,-8243,-8186,-8134,-8096,-8074,\n-8067,-8069,-8070,-8063,-8041,-8003,-7952,-7895,\n-7841,-7798,-7770,-7758,-7758,-7760,-7756,-7740,\n-7707,-7660,-7604,-7548,-7501,-7468,-7451,-7447,\n-7449,-7448,-7437,-7410,-7367,-7314,-7257,-7206,\n-7168,-7145,-7137,-7138,-7139,-7132,-7110,-7073,\n-7023,-6966,-6912,-6869,-6841,-6828,-6827,-6828,\n-6825,-6809,-6777,-6731,-6676,-6620,-6573,-6539,\n-6521,-6516,-6518,-6517,-6505,-6479,-6437,-6385,\n-6329,-6278,-6239,-6216,-6207,-6207,-6207,-6200,\n-6179,-6143,-6093,-6038,-5984,-5940,-5912,-5898,\n-5896,-5897,-5893,-5878,-5846,-5801,-5747,-5692,\n-5644,-5610,-5591,-5586,-5586,-5585,-5574,-5548,\n-5508,-5456,-5400,-5349,-5310,-5286,-5276,-5276,\n-5276,-5269,-5248,-5213,-5164,-5109,-5055,-5012,\n-4982,-4968,-4965,-4966,-4962,-4947,-4916,-4871,\n-4818,-4763,-4715,-4681,-4661,-4655,-4655,-4654,\n-4643,-4618,-4578,-4526,-4471,-4420,-4381,-4356,\n-4346,-4345,-4345,-4338,-4318,-4283,-4235,-4180,\n-4127,-4083,-4053,-4038,-4034,-4035,-4031,-4016,\n-3986,-3942,-3889,-3834,-3786,-3751,-3731,-3724,\n-3724,-3723,-3712,-3687,-3648,-3597,-3542,-3492,\n-3452,-3427,-3415,-3414,-3413,-3407,-3387,-3353,\n-3305,-3251,-3198,-3154,-3123,-3108,-3103,-3103,\n-3100,-3085,-3056,-3013,-2960,-2905,-2857,-2822,\n-2801,-2794,-2793,-2792,-2781,-2757,-2718,-2668,\n-2614,-2563,-2522,-2497,-2485,-2483,-2482,-2476,\n-2457,-2423,-2376,-2322,-2269,-2225,-2194,-2177,\n-2173,-2172,-2169,-2155,-2126,-2083,-2031,-1977,\n-1928,-1892,-1871,-1863,-1862,-1860,-1851,-1827,\n-1789,-1739,-1685,-1634,-1593,-1567,-1554,-1552,\n-1551,-1545,-1526,-1493,-1447,-1393,-1340,-1295,\n-1264,-1247,-1242,-1241,-1238,-1224,-1196,-1154,\n-1102,-1048,-999,-963,-941,-932,-931,-930,\n-920,-897,-859,-810,-756,-705,-663,-636,\n-624,-621,-620,-614,-596,-564,-518,-464,\n-411,-366,-334,-316,-311,-310,-307,-294,\n-266,-225,-173,-119,-70,-33,-11,-1,\n0,1,11,33,70,119,173,225,\n266,294,307,310,311,316,334,366,\n411,464,518,564,596,614,620,621,\n624,636,663,705,756,810,859,897,\n920,930,931,932,941,963,999,1048,\n1102,1154,1196,1224,1238,1241,1242,1247,\n1264,1295,1340,1393,1447,1493,1526,1545,\n1551,1552,1554,1567,1593,1634,1685,1739,\n1789,1827,1851,1860,1862,1863,1871,1892,\n1928,1977,2031,2083,2126,2155,2169,2172,\n2173,2177,2194,2225,2269,2322,2376,2423,\n2457,2476,2482,2483,2485,2497,2522,2563,\n2614,2668,2718,2757,2781,2792,2793,2794,\n2801,2822,2857,2905,2960,3013,3056,3085,\n3100,3103,3103,3108,3123,3154,3198,3251,\n3305,3353,3387,3407,3413,3414,3415,3427,\n3452,3492,3542,3597,3648,3687,3712,3723,\n3724,3724,3731,3751,3786,3834,3889,3942,\n3986,4016,4031,4035,4034,4038,4053,4083,\n4127,4180,4235,4283,4318,4338,4345,4345,\n4346,4356,4381,4420,4471,4526,4578,4618,\n4643,4654,4655,4655,4661,4681,4715,4763,\n4818,4871,4916,4947,4962,4966,4965,4968,\n4982,5012,5055,5109,5164,5213,5248,5269,\n5276,5276,5276,5286,5310,5349,5400,5456,\n5508,5548,5574,5585,5586,5586,5591,5610,\n5644,5692,5747,5801,5846,5878,5893,5897,\n5896,5898,5912,5940,5984,6038,6093,6143,\n6179,6200,6207,6207,6207,6216,6239,6278,\n6329,6385,6437,6479,6505,6517,6518,6516,\n6521,6539,6573,6620,6676,6731,6777,6809,\n6825,6828,6827,6828,6841,6869,6912,6966,\n7023,7073,7110,7132,7139,7138,7137,7145,\n7168,7206,7257,7314,7367,7410,7437,7448,\n7449,7447,7451,7468,7501,7548,7604,7660,\n7707,7740,7756,7760,7758,7758,7770,7798,\n7841,7895,7952,8003,8041,8063,8070,8069,\n8067,8074,8096,8134,8186,8243,8297,8341,\n8368,8380,8380,8377,8380,8397,8429,8477,\n8533,8590,8638,8671,8688,8691,8688,8688,\n8699,8726,8769,8823,8881,8934,8973,8995,\n9002,9000,8997,9003,9024,9062,9114,9172,\n9227,9272,9300,9312,9312,9308,9310,9325,\n9357,9405,9462,9520,9569,9603,9620,9623,\n9619,9618,9628,9654,9697,9752,9811,9864,\n9904,9927,9934,9931,9928,9932,9953,9990,\n10042,10101,10158,10203,10232,10244,10243,10239,\n10239,10253,10285,10333,10391,10450,10500,10535,\n10552,10555,10550,10548,10556,10582,10624,10680,\n10740,10795,10836,10859,10866,10863,10858,10861,\n10880,10918,10970,11030,11088,11135,11164,11176,\n11175,11169,11168,11181,11212,11260,11319,11379,\n11431,11467,11485,11487,11481,11477,11485,11509,\n11552,11608,11670,11726,11768,11792,11799,11794,\n11788,11790,11808,11845,11898,11959,12018,12066,\n12097,12109,12107,12100,12097,12109,12139,12188,\n12248,12309,12363,12400,12418,12419,12412,12407,\n12413,12436,12479,12536,12599,12657,12700,12725,\n12731,12726,12718,12718,12735,12772,12825,12888,\n12949,12999,13030,13042,13039,13030,13026,13036,\n13066,13115,13176,13239,13294,13333,13351,13352,\n13343,13336,13340,13363,13406,13464,13528,13588,\n13633,13658,13664,13657,13648,13646,13662,13698,\n13752,13816,13880,13931,13964,13975,13971,13961,\n13955,13963,13993,14041,14104,14169,14226,14266,\n14285,14285,14275,14265,14267,14289,14332,14391,\n14458,14520,14566,14592,14598,14589,14577,14574,\n14588,14624,14679,14745,14810,14864,14898,14909,\n14904,14891,14883,14890,14918,14968,15032,15100,\n15159,15200,15219,15218,15206,15194,15194,15215,\n15258,15318,15387,15451,15500,15527,15532,15522,\n15507,15501,15514,15549,15605,15674,15742,15797,\n15832,15844,15837,15822,15811,15816,15843,15893,\n15959,16030,16092,16135,16154,16152,16138,16123,\n16121,16140,16183,16245,16316,16384,16435,16462,\n16466,16454,16437,16428,16439,16474,16531,16602,\n16673,16731,16768,16779,16771,16753,16738,16741,\n16767,16818,16887,16960,17025,17070,17090,17087,\n17069,17051,17046,17064,17107,17171,17246,17316,\n17370,17399,17402,17387,17366,17354,17363,17397,\n17456,17530,17605,17666,17704,17716,17705,17683,\n17665,17665,17690,17742,17813,17891,17959,18007,\n18027,18022,18001,17979,17971,17986,18030,18097,\n18175,18249,18306,18336,18338,18320,18296,18280,\n18285,18320,18380,18458,18537,18602,18642,18653,\n18640,18614,18592,18588,18612,18665,18739,18821,\n18894,18945,18966,18959,18934,18907,18894,18908,\n18951,19021,19104,19183,19244,19275,19276,19255,\n19225,19204,19207,19240,19303,19385,19469,19539,\n19582,19592,19576,19545,19517,19509,19532,19586,\n19665,19752,19831,19885,19906,19897,19867,19834,\n19816,19827,19871,19944,20033,20118,20184,20217,\n20216,20190,20154,20127,20125,20158,20224,20311,\n20403,20478,20524,20534,20513,20476,20442,20428,\n20449,20505,20589,20683,20769,20827,20849,20837,\n20801,20760,20736,20743,20788,20866,20961,21055,\n21126,21161,21159,21126,21082,21048,21041,21073,\n21143,21237,21337,21420,21470,21479,21453,21407,\n21364,21344,21362,21421,21511,21615,21709,21773,\n21796,21779,21735,21685,21652,21655,21701,21785,\n21890,21993,22072,22111,22105,22065,22010,21965,\n21952,21983,22058,22162,22273,22366,22420,22429,\n22396,22339,22284,22255,22270,22332,22431,22547,\n22653,22725,22750,22727,22671,22608,22564,22560,\n22608,22700,22818,22935,23024,23067,23057,23006,\n22937,22879,22856,22886,22967,23084,23211,23317,\n23379,23386,23343,23271,23200,23159,23168,23235,\n23348,23481,23603,23686,23712,23681,23610,23528,\n23468,23456,23504,23608,23745,23882,23987,24035,\n24019,23953,23863,23784,23749,23776,23867,24004,\n24153,24280,24352,24357,24299,24205,24109,24049,\n24051,24125,24257,24417,24564,24664,24692,24649,\n24553,24442,24357,24331,24383,24505,24671,24839,\n24967,25024,25000,24909,24785,24674,24618,24642,\n24749,24917,25104,25263,25352,25353,25272,25139,\n25003,24912,24903,24988,25153,25357,25547,25674,\n25707,25642,25505,25344,25215,25167,25223,25378,\n25595,25819,25989,26062,26022,25885,25701,25530,\n25435,25453,25590,25817,26075,26295,26417,26411,\n26283,26077,25860,25708,25676,25785,26016,26310,\n26588,26773,26816,26705,26479,26210,25987,25888,\n25956,26184,26516,26865,27133,27243,27164,26920,\n26589,26275,26083,26086,26300,26678,27119,27501,\n27712,27687,27429,27014,26570,26238,26137,26320,\n26756,27335,27896,28274,28346,28077,27533,26870,\n26293,25997,26109,26641,27474,28386,29108,29397,\n29119,28297,27128,25944,25135,25039,25831,27445,\n29546,31558,32767,32461,30080,25357,18396,9680,\n};\n\nconst int16_t saw_fxpt_lutable_2[1024] PROGMEM = {\n0,-13415,-24237,-30775,-32768,-31333,-28390,-25833,\n-24824,-25487,-27096,-28594,-29174,-28644,-27425,-26242,\n-25705,-26000,-26839,-27672,-28010,-27683,-26905,-26118,\n-25730,-25895,-26447,-27017,-27254,-27017,-26441,-25841,\n-25526,-25625,-26027,-26456,-26638,-26452,-25992,-25502,\n-25230,-25289,-25598,-25939,-26086,-25933,-25549,-25131,\n-24888,-24919,-25166,-25447,-25569,-25439,-25108,-24741,\n-24518,-24531,-24731,-24968,-25074,-24960,-24668,-24340,\n-24132,-24130,-24296,-24500,-24592,-24491,-24229,-23930,\n-23735,-23721,-23860,-24038,-24119,-24028,-23791,-23516,\n-23330,-23307,-23424,-23580,-23653,-23571,-23353,-23097,\n-22919,-22888,-22988,-23126,-23191,-23116,-22915,-22675,\n-22504,-22467,-22551,-22675,-22734,-22665,-22478,-22251,\n-22085,-22043,-22114,-22225,-22280,-22215,-22040,-21825,\n-21664,-21617,-21678,-21778,-21827,-21767,-21603,-21398,\n-21241,-21190,-21241,-21331,-21377,-21321,-21165,-20970,\n-20816,-20762,-20804,-20886,-20928,-20875,-20728,-20540,\n-20390,-20332,-20367,-20441,-20480,-20431,-20290,-20110,\n-19963,-19902,-19930,-19997,-20034,-19987,-19853,-19679,\n-19535,-19471,-19493,-19554,-19588,-19544,-19416,-19248,\n-19106,-19040,-19056,-19112,-19143,-19101,-18979,-18816,\n-18676,-18608,-18619,-18670,-18699,-18659,-18541,-18383,\n-18245,-18175,-18181,-18228,-18256,-18217,-18104,-17950,\n-17814,-17742,-17744,-17786,-17813,-17776,-17667,-17517,\n-17383,-17309,-17307,-17345,-17370,-17335,-17230,-17084,\n-16951,-16876,-16870,-16905,-16927,-16894,-16792,-16650,\n-16519,-16442,-16433,-16464,-16485,-16453,-16355,-16216,\n-16086,-16008,-15996,-16024,-16044,-16013,-15918,-15782,\n-15654,-15574,-15559,-15584,-15602,-15573,-15481,-15348,\n-15220,-15140,-15122,-15144,-15161,-15133,-15043,-14914,\n-14787,-14706,-14684,-14704,-14720,-14693,-14606,-14479,\n-14354,-14271,-14247,-14264,-14279,-14253,-14169,-14044,\n-13920,-13836,-13810,-13824,-13839,-13814,-13732,-13609,\n-13486,-13402,-13373,-13385,-13398,-13374,-13295,-13175,\n-13052,-12967,-12936,-12946,-12958,-12935,-12857,-12740,\n-12618,-12532,-12499,-12506,-12518,-12495,-12420,-12304,\n-12184,-12097,-12062,-12067,-12078,-12056,-11983,-11869,\n-11749,-11661,-11624,-11628,-11638,-11617,-11546,-11434,\n-11315,-11226,-11187,-11189,-11198,-11178,-11109,-10999,\n-10880,-10791,-10750,-10750,-10759,-10739,-10671,-10563,\n-10446,-10355,-10313,-10311,-10319,-10300,-10234,-10128,\n-10011,-9920,-9876,-9872,-9879,-9861,-9797,-9692,\n-9576,-9484,-9439,-9433,-9440,-9423,-9360,-9257,\n-9141,-9049,-9001,-8995,-9000,-8984,-8923,-8821,\n-8706,-8613,-8564,-8556,-8561,-8545,-8486,-8385,\n-8271,-8178,-8127,-8117,-8122,-8106,-8048,-7950,\n-7836,-7742,-7690,-7678,-7682,-7668,-7611,-7514,\n-7401,-7306,-7253,-7240,-7243,-7229,-7174,-7078,\n-6966,-6871,-6816,-6801,-6804,-6790,-6737,-6643,\n-6531,-6435,-6378,-6363,-6365,-6352,-6300,-6207,\n-6096,-5999,-5941,-5924,-5926,-5913,-5862,-5771,\n-5660,-5563,-5504,-5486,-5487,-5475,-5425,-5335,\n-5225,-5127,-5067,-5047,-5048,-5036,-4988,-4899,\n-4790,-4691,-4630,-4609,-4609,-4598,-4551,-4463,\n-4354,-4256,-4193,-4170,-4170,-4159,-4114,-4027,\n-3919,-3820,-3755,-3732,-3731,-3721,-3677,-3591,\n-3484,-3384,-3318,-3293,-3292,-3283,-3239,-3156,\n-3048,-2948,-2881,-2855,-2853,-2844,-2802,-2720,\n-2613,-2512,-2444,-2417,-2414,-2406,-2365,-2284,\n-2177,-2076,-2007,-1978,-1975,-1967,-1928,-1848,\n-1742,-1640,-1570,-1540,-1536,-1529,-1491,-1412,\n-1306,-1204,-1132,-1101,-1097,-1091,-1053,-976,\n-871,-768,-695,-663,-658,-652,-616,-540,\n-435,-332,-258,-225,-219,-214,-179,-104,\n0,104,179,214,219,225,258,332,\n435,540,616,652,658,663,695,768,\n871,976,1053,1091,1097,1101,1132,1204,\n1306,1412,1491,1529,1536,1540,1570,1640,\n1742,1848,1928,1967,1975,1978,2007,2076,\n2177,2284,2365,2406,2414,2417,2444,2512,\n2613,2720,2802,2844,2853,2855,2881,2948,\n3048,3156,3239,3283,3292,3293,3318,3384,\n3484,3591,3677,3721,3731,3732,3755,3820,\n3919,4027,4114,4159,4170,4170,4193,4256,\n4354,4463,4551,4598,4609,4609,4630,4691,\n4790,4899,4988,5036,5048,5047,5067,5127,\n5225,5335,5425,5475,5487,5486,5504,5563,\n5660,5771,5862,5913,5926,5924,5941,5999,\n6096,6207,6300,6352,6365,6363,6378,6435,\n6531,6643,6737,6790,6804,6801,6816,6871,\n6966,7078,7174,7229,7243,7240,7253,7306,\n7401,7514,7611,7668,7682,7678,7690,7742,\n7836,7950,8048,8106,8122,8117,8127,8178,\n8271,8385,8486,8545,8561,8556,8564,8613,\n8706,8821,8923,8984,9000,8995,9001,9049,\n9141,9257,9360,9423,9440,9433,9439,9484,\n9576,9692,9797,9861,9879,9872,9876,9920,\n10011,10128,10234,10300,10319,10311,10313,10355,\n10446,10563,10671,10739,10759,10750,10750,10791,\n10880,10999,11109,11178,11198,11189,11187,11226,\n11315,11434,11546,11617,11638,11628,11624,11661,\n11749,11869,11983,12056,12078,12067,12062,12097,\n12184,12304,12420,12495,12518,12506,12499,12532,\n12618,12740,12857,12935,12958,12946,12936,12967,\n13052,13175,13295,13374,13398,13385,13373,13402,\n13486,13609,13732,13814,13839,13824,13810,13836,\n13920,14044,14169,14253,14279,14264,14247,14271,\n14354,14479,14606,14693,14720,14704,14684,14706,\n14787,14914,15043,15133,15161,15144,15122,15140,\n15220,15348,15481,15573,15602,15584,15559,15574,\n15654,15782,15918,16013,16044,16024,15996,16008,\n16086,16216,16355,16453,16485,16464,16433,16442,\n16519,16650,16792,16894,16927,16905,16870,16876,\n16951,17084,17230,17335,17370,17345,17307,17309,\n17383,17517,17667,17776,17813,17786,17744,17742,\n17814,17950,18104,18217,18256,18228,18181,18175,\n18245,18383,18541,18659,18699,18670,18619,18608,\n18676,18816,18979,19101,19143,19112,19056,19040,\n19106,19248,19416,19544,19588,19554,19493,19471,\n19535,19679,19853,19987,20034,19997,19930,19902,\n19963,20110,20290,20431,20480,20441,20367,20332,\n20390,20540,20728,20875,20928,20886,20804,20762,\n20816,20970,21165,21321,21377,21331,21241,21190,\n21241,21398,21603,21767,21827,21778,21678,21617,\n21664,21825,22040,22215,22280,22225,22114,22043,\n22085,22251,22478,22665,22734,22675,22551,22467,\n22504,22675,22915,23116,23191,23126,22988,22888,\n22919,23097,23353,23571,23653,23580,23424,23307,\n23330,23516,23791,24028,24119,24038,23860,23721,\n23735,23930,24229,24491,24592,24500,24296,24130,\n24132,24340,24668,24960,25074,24968,24731,24531,\n24518,24741,25108,25439,25569,25447,25166,24919,\n24888,25131,25549,25933,26086,25939,25598,25289,\n25230,25502,25992,26452,26638,26456,26027,25625,\n25526,25841,26441,27017,27254,27017,26447,25895,\n25730,26118,26905,27683,28010,27672,26839,26000,\n25705,26242,27425,28644,29174,28594,27096,25487,\n24824,25833,28390,31333,32767,30775,24237,13415,\n};\n\nconst int16_t saw_fxpt_lutable_3[1024] PROGMEM = {\n0,-9730,-18483,-25459,-30169,-32514,-32768,-31500,\n-29435,-27296,-25659,-24860,-24957,-25764,-26936,-28079,\n-28860,-29086,-28742,-27970,-27020,-26165,-25625,-25511,\n-25805,-26372,-27012,-27518,-27736,-27609,-27180,-26578,\n-25973,-25525,-25340,-25441,-25765,-26190,-26570,-26780,\n-26751,-26487,-26061,-25589,-25195,-24976,-24973,-25160,\n-25459,-25761,-25961,-25987,-25822,-25507,-25123,-24769,\n-24534,-24466,-24563,-24774,-25018,-25204,-25264,-25167,\n-24931,-24613,-24294,-24052,-23940,-23971,-24116,-24313,\n-24484,-24564,-24516,-24340,-24076,-23788,-23546,-23404,\n-23386,-23477,-23632,-23786,-23878,-23866,-23738,-23520,\n-23261,-23024,-22862,-22804,-22851,-22969,-23105,-23202,\n-23216,-23128,-22950,-22719,-22491,-22315,-22227,-22235,\n-22319,-22436,-22533,-22567,-22511,-22368,-22165,-21948,\n-21764,-21653,-21629,-21681,-21777,-21871,-21918,-21889,\n-21777,-21601,-21397,-21211,-21081,-21029,-21052,-21127,\n-21214,-21269,-21262,-21178,-21027,-20839,-20654,-20511,\n-20435,-20432,-20485,-20562,-20622,-20631,-20572,-20446,\n-20275,-20094,-19942,-19846,-19819,-19851,-19915,-19976,\n-19998,-19960,-19857,-19704,-19531,-19373,-19261,-19212,\n-19223,-19273,-19331,-19363,-19343,-19261,-19127,-18963,\n-18804,-18680,-18611,-18602,-18637,-18689,-18727,-18722,\n-18660,-18544,-18392,-18234,-18101,-18015,-17986,-18006,\n-18050,-18090,-18097,-18053,-17955,-17817,-17663,-17523,\n-17424,-17377,-17379,-17414,-17454,-17470,-17442,-17361,\n-17237,-17089,-16947,-16836,-16772,-16758,-16781,-16818,\n-16841,-16826,-16762,-16652,-16514,-16371,-16250,-16172,\n-16142,-16152,-16184,-16210,-16206,-16158,-16064,-15935,\n-15794,-15667,-15576,-15530,-15527,-15552,-15579,-15584,\n-15550,-15470,-15353,-15216,-15086,-14983,-14923,-14907,\n-14922,-14947,-14959,-14938,-14873,-14767,-14637,-14505,\n-14394,-14320,-14290,-14295,-14317,-14333,-14322,-14270,\n-14178,-14056,-13925,-13807,-13722,-13677,-13671,-13687,\n-13705,-13703,-13664,-13585,-13472,-13344,-13222,-13126,\n-13069,-13050,-13060,-13077,-13081,-13054,-12988,-12886,\n-12763,-12638,-12534,-12464,-12433,-12434,-12449,-12458,\n-12441,-12387,-12296,-12179,-12055,-11944,-11863,-11820,\n-11811,-11822,-11833,-11825,-11783,-11704,-11595,-11472,\n-11356,-11266,-11211,-11191,-11196,-11208,-11206,-11175,\n-11107,-11007,-10889,-10770,-10671,-10605,-10574,-10572,\n-10582,-10585,-10563,-10507,-10418,-10304,-10185,-10079,\n-10002,-9960,-9949,-9956,-9962,-9949,-9904,-9825,\n-9718,-9600,-9489,-9403,-9350,-9329,-9331,-9338,\n-9332,-9297,-9229,-9130,-9015,-8901,-8807,-8743,\n-8712,-8708,-8714,-8713,-8688,-8630,-8540,-8430,\n-8314,-8213,-8139,-8098,-8086,-8090,-8092,-8075,\n-8028,-7948,-7843,-7728,-7621,-7538,-7487,-7466,\n-7466,-7469,-7459,-7422,-7352,-7255,-7142,-7032,\n-6940,-6879,-6849,-6843,-6846,-6842,-6813,-6754,\n-6665,-6556,-6444,-6345,-6274,-6234,-6221,-6223,\n-6222,-6202,-6153,-6072,-5969,-5856,-5753,-5672,\n-5622,-5601,-5600,-5601,-5588,-5548,-5477,-5380,\n-5269,-5162,-5073,-5013,-4984,-4977,-4979,-4971,\n-4941,-4880,-4790,-4683,-4572,-4477,-4407,-4369,\n-4356,-4356,-4353,-4330,-4279,-4198,-4095,-3984,\n-3883,-3804,-3756,-3736,-3733,-3732,-3717,-3676,\n-3604,-3506,-3397,-3291,-3204,-3146,-3118,-3111,\n-3111,-3102,-3069,-3007,-2917,-2809,-2701,-2607,\n-2540,-2502,-2490,-2489,-2484,-2460,-2407,-2325,\n-2222,-2112,-2012,-1936,-1889,-1870,-1867,-1865,\n-1848,-1804,-1731,-1633,-1524,-1420,-1335,-1279,\n-1251,-1245,-1244,-1233,-1198,-1134,-1043,-936,\n-829,-737,-671,-635,-623,-622,-616,-590,\n-535,-452,-349,-240,-141,-66,-21,-3,\n0,3,21,66,141,240,349,452,\n535,590,616,622,623,635,671,737,\n829,936,1043,1134,1198,1233,1244,1245,\n1251,1279,1335,1420,1524,1633,1731,1804,\n1848,1865,1867,1870,1889,1936,2012,2112,\n2222,2325,2407,2460,2484,2489,2490,2502,\n2540,2607,2701,2809,2917,3007,3069,3102,\n3111,3111,3118,3146,3204,3291,3397,3506,\n3604,3676,3717,3732,3733,3736,3756,3804,\n3883,3984,4095,4198,4279,4330,4353,4356,\n4356,4369,4407,4477,4572,4683,4790,4880,\n4941,4971,4979,4977,4984,5013,5073,5162,\n5269,5380,5477,5548,5588,5601,5600,5601,\n5622,5672,5753,5856,5969,6072,6153,6202,\n6222,6223,6221,6234,6274,6345,6444,6556,\n6665,6754,6813,6842,6846,6843,6849,6879,\n6940,7032,7142,7255,7352,7422,7459,7469,\n7466,7466,7487,7538,7621,7728,7843,7948,\n8028,8075,8092,8090,8086,8098,8139,8213,\n8314,8430,8540,8630,8688,8713,8714,8708,\n8712,8743,8807,8901,9015,9130,9229,9297,\n9332,9338,9331,9329,9350,9403,9489,9600,\n9718,9825,9904,9949,9962,9956,9949,9960,\n10002,10079,10185,10304,10418,10507,10563,10585,\n10582,10572,10574,10605,10671,10770,10889,11007,\n11107,11175,11206,11208,11196,11191,11211,11266,\n11356,11472,11595,11704,11783,11825,11833,11822,\n11811,11820,11863,11944,12055,12179,12296,12387,\n12441,12458,12449,12434,12433,12464,12534,12638,\n12763,12886,12988,13054,13081,13077,13060,13050,\n13069,13126,13222,13344,13472,13585,13664,13703,\n13705,13687,13671,13677,13722,13807,13925,14056,\n14178,14270,14322,14333,14317,14295,14290,14320,\n14394,14505,14637,14767,14873,14938,14959,14947,\n14922,14907,14923,14983,15086,15216,15353,15470,\n15550,15584,15579,15552,15527,15530,15576,15667,\n15794,15935,16064,16158,16206,16210,16184,16152,\n16142,16172,16250,16371,16514,16652,16762,16826,\n16841,16818,16781,16758,16772,16836,16947,17089,\n17237,17361,17442,17470,17454,17414,17379,17377,\n17424,17523,17663,17817,17955,18053,18097,18090,\n18050,18006,17986,18015,18101,18234,18392,18544,\n18660,18722,18727,18689,18637,18602,18611,18680,\n18804,18963,19127,19261,19343,19363,19331,19273,\n19223,19212,19261,19373,19531,19704,19857,19960,\n19998,19976,19915,19851,19819,19846,19942,20094,\n20275,20446,20572,20631,20622,20562,20485,20432,\n20435,20511,20654,20839,21027,21178,21262,21269,\n21214,21127,21052,21029,21081,21211,21397,21601,\n21777,21889,21918,21871,21777,21681,21629,21653,\n21764,21948,22165,22368,22511,22567,22533,22436,\n22319,22235,22227,22315,22491,22719,22950,23128,\n23216,23202,23105,22969,22851,22804,22862,23024,\n23261,23520,23738,23866,23878,23786,23632,23477,\n23386,23404,23546,23788,24076,24340,24516,24564,\n24484,24313,24116,23971,23940,24052,24294,24613,\n24931,25167,25264,25204,25018,24774,24563,24466,\n24534,24769,25123,25507,25822,25987,25961,25761,\n25459,25160,24973,24976,25195,25589,26061,26487,\n26751,26780,26570,26190,25765,25441,25340,25525,\n25973,26578,27180,27609,27736,27518,27012,26372,\n25805,25511,25625,26165,27020,27970,28742,29086,\n28860,28079,26936,25764,24957,24860,25659,27296,\n29435,31500,32767,32514,30169,25459,18483,9730,\n};\n\nconst int16_t saw_fxpt_lutable_4[512] PROGMEM = {\n0,-13401,-24220,-30767,-32768,-31318,-28322,-25673,\n-24553,-25116,-26659,-28130,-28708,-28170,-26910,-25646,\n-25002,-25193,-25960,-26761,-27094,-26761,-25947,-25081,\n-24588,-24648,-25124,-25660,-25891,-25649,-25039,-24365,\n-23945,-23938,-24261,-24654,-24829,-24639,-24147,-23584,\n-23208,-23160,-23390,-23692,-23832,-23675,-23261,-22772,\n-22425,-22349,-22514,-22755,-22870,-22736,-22377,-21940,\n-21615,-21519,-21637,-21832,-21929,-21813,-21494,-21097,\n-20788,-20677,-20759,-20919,-21002,-20899,-20612,-20246,\n-19950,-19826,-19880,-20012,-20084,-19992,-19731,-19390,\n-19103,-18970,-19001,-19110,-19172,-19090,-18850,-18530,\n-18251,-18110,-18121,-18212,-18266,-18191,-17969,-17666,\n-17395,-17247,-17241,-17316,-17364,-17295,-17088,-16801,\n-16536,-16382,-16361,-16422,-16464,-16401,-16207,-15933,\n-15674,-15514,-15482,-15530,-15567,-15508,-15327,-15064,\n-14810,-14645,-14602,-14639,-14671,-14617,-14446,-14194,\n-13944,-13775,-13722,-13749,-13777,-13727,-13566,-13323,\n-13077,-12905,-12842,-12860,-12884,-12838,-12685,-12452,\n-12208,-12033,-11961,-11971,-11993,-11950,-11805,-11579,\n-11339,-11160,-11081,-11084,-11102,-11062,-10925,-10706,\n-10469,-10287,-10201,-10196,-10212,-10175,-10044,-9833,\n-9599,-9414,-9321,-9309,-9322,-9288,-9164,-8959,\n-8728,-8540,-8441,-8423,-8433,-8401,-8284,-8085,\n-7856,-7666,-7561,-7537,-7544,-7515,-7403,-7210,\n-6984,-6792,-6681,-6651,-6656,-6629,-6523,-6336,\n-6112,-5917,-5800,-5765,-5768,-5744,-5643,-5461,\n-5239,-5042,-4920,-4880,-4880,-4858,-4763,-4586,\n-4366,-4167,-4040,-3994,-3993,-3973,-3882,-3711,\n-3493,-3292,-3160,-3109,-3105,-3087,-3002,-2835,\n-2620,-2417,-2279,-2224,-2218,-2202,-2122,-1960,\n-1747,-1541,-1399,-1338,-1331,-1317,-1241,-1085,\n-873,-666,-519,-453,-444,-432,-361,-209,\n0,209,361,432,444,453,519,666,\n873,1085,1241,1317,1331,1338,1399,1541,\n1747,1960,2122,2202,2218,2224,2279,2417,\n2620,2835,3002,3087,3105,3109,3160,3292,\n3493,3711,3882,3973,3993,3994,4040,4167,\n4366,4586,4763,4858,4880,4880,4920,5042,\n5239,5461,5643,5744,5768,5765,5800,5917,\n6112,6336,6523,6629,6656,6651,6681,6792,\n6984,7210,7403,7515,7544,7537,7561,7666,\n7856,8085,8284,8401,8433,8423,8441,8540,\n8728,8959,9164,9288,9322,9309,9321,9414,\n9599,9833,10044,10175,10212,10196,10201,10287,\n10469,10706,10925,11062,11102,11084,11081,11160,\n11339,11579,11805,11950,11993,11971,11961,12033,\n12208,12452,12685,12838,12884,12860,12842,12905,\n13077,13323,13566,13727,13777,13749,13722,13775,\n13944,14194,14446,14617,14671,14639,14602,14645,\n14810,15064,15327,15508,15567,15530,15482,15514,\n15674,15933,16207,16401,16464,16422,16361,16382,\n16536,16801,17088,17295,17364,17316,17241,17247,\n17395,17666,17969,18191,18266,18212,18121,18110,\n18251,18530,18850,19090,19172,19110,19001,18970,\n19103,19390,19731,19992,20084,20012,19880,19826,\n19950,20246,20612,20899,21002,20919,20759,20677,\n20788,21097,21494,21813,21929,21832,21637,21519,\n21615,21940,22377,22736,22870,22755,22514,22349,\n22425,22772,23261,23675,23832,23692,23390,23160,\n23208,23584,24147,24639,24829,24654,24261,23938,\n23945,24365,25039,25649,25891,25660,25124,24648,\n24588,25081,25947,26761,27094,26761,25960,25193,\n25002,25646,26910,28170,28708,28130,26659,25116,\n24553,25673,28322,31318,32767,30767,24220,13401,\n};\n\nconst int16_t saw_fxpt_lutable_5[512] PROGMEM = {\n0,-9600,-18263,-25211,-29965,-32404,-32768,-31582,\n-29534,-27325,-25536,-24530,-24408,-25032,-26093,-27213,\n-28050,-28378,-28136,-27420,-26446,-25478,-24754,-24422,\n-24511,-24931,-25507,-26036,-26341,-26322,-25973,-25385,\n-24705,-24100,-23706,-23589,-23737,-24062,-24431,-24705,\n-24781,-24615,-24233,-23724,-23205,-22794,-22570,-22559,\n-22724,-22977,-23213,-23333,-23275,-23031,-22646,-22202,\n-21798,-21515,-21399,-21445,-21605,-21795,-21930,-21941,\n-21795,-21509,-21136,-20754,-20440,-20252,-20208,-20284,\n-20425,-20555,-20607,-20535,-20331,-20025,-19676,-19353,\n-19116,-19000,-19003,-19091,-19203,-19275,-19256,-19121,\n-18879,-18570,-18252,-17986,-17815,-17754,-17787,-17871,\n-17948,-17965,-17886,-17703,-17439,-17139,-16859,-16647,\n-16531,-16511,-16558,-16628,-16666,-16630,-16500,-16283,\n-16011,-15730,-15491,-15330,-15259,-15266,-15317,-15363,\n-15359,-15276,-15105,-14866,-14597,-14343,-14146,-14030,\n-13995,-14018,-14061,-14078,-14032,-13906,-13705,-13455,\n-13198,-12976,-12820,-12743,-12734,-12764,-12790,-12773,\n-12687,-12525,-12302,-12052,-11815,-11627,-11511,-11466,\n-11474,-11499,-11502,-11450,-11326,-11135,-10901,-10659,\n-10448,-10296,-10215,-10196,-10211,-10223,-10198,-10110,\n-9954,-9742,-9505,-9279,-9098,-8981,-8930,-8927,\n-8941,-8934,-8878,-8756,-8572,-8348,-8116,-7913,\n-7763,-7679,-7652,-7658,-7662,-7631,-7542,-7389,\n-7185,-6957,-6738,-6561,-6444,-6388,-6378,-6384,\n-6372,-6313,-6192,-6013,-5796,-5571,-5372,-5224,\n-5138,-5106,-5105,-5104,-5069,-4980,-4830,-4630,\n-4407,-4193,-4018,-3901,-3843,-3828,-3829,-3813,\n-3753,-3634,-3458,-3244,-3023,-2826,-2679,-2591,\n-2557,-2553,-2548,-2512,-2423,-2274,-2078,-1857,\n-1646,-1472,-1354,-1294,-1277,-1276,-1258,-1198,\n-1079,-905,-693,-474,-278,-130,-42,-5,\n0,5,42,130,278,474,693,905,\n1079,1198,1258,1276,1277,1294,1354,1472,\n1646,1857,2078,2274,2423,2512,2548,2553,\n2557,2591,2679,2826,3023,3244,3458,3634,\n3753,3813,3829,3828,3843,3901,4018,4193,\n4407,4630,4830,4980,5069,5104,5105,5106,\n5138,5224,5372,5571,5796,6013,6192,6313,\n6372,6384,6378,6388,6444,6561,6738,6957,\n7185,7389,7542,7631,7662,7658,7652,7679,\n7763,7913,8116,8348,8572,8756,8878,8934,\n8941,8927,8930,8981,9098,9279,9505,9742,\n9954,10110,10198,10223,10211,10196,10215,10296,\n10448,10659,10901,11135,11326,11450,11502,11499,\n11474,11466,11511,11627,11815,12052,12302,12525,\n12687,12773,12790,12764,12734,12743,12820,12976,\n13198,13455,13705,13906,14032,14078,14061,14018,\n13995,14030,14146,14343,14597,14866,15105,15276,\n15359,15363,15317,15266,15259,15330,15491,15730,\n16011,16283,16500,16630,16666,16628,16558,16511,\n16531,16647,16859,17139,17439,17703,17886,17965,\n17948,17871,17787,17754,17815,17986,18252,18570,\n18879,19121,19256,19275,19203,19091,19003,19000,\n19116,19353,19676,20025,20331,20535,20607,20555,\n20425,20284,20208,20252,20440,20754,21136,21509,\n21795,21941,21930,21795,21605,21445,21399,21515,\n21798,22202,22646,23031,23275,23333,23213,22977,\n22724,22559,22570,22794,23205,23724,24233,24615,\n24781,24705,24431,24062,23737,23589,23706,24100,\n24705,25385,25973,26322,26341,26036,25507,24931,\n24511,24422,24754,25478,26446,27420,28136,28378,\n28050,27213,26093,25032,24408,24530,25536,27325,\n29534,31582,32767,32404,29965,25211,18263,9600,\n};\n\nconst int16_t saw_fxpt_lutable_6[256] PROGMEM = {\n0,-13373,-24186,-30752,-32768,-31289,-28184,-25350,\n-24004,-24361,-25766,-27181,-27753,-27200,-25861,-24435,\n-23574,-23552,-24165,-24896,-25218,-24874,-23992,-22976,\n-22269,-22112,-22426,-22882,-23099,-22850,-22180,-21362,\n-20732,-20505,-20659,-20965,-21122,-20928,-20383,-19684,\n-19101,-18830,-18883,-19093,-19212,-19053,-18592,-17973,\n-17422,-17120,-17103,-17245,-17337,-17204,-16804,-16243,\n-15716,-15392,-15321,-15411,-15483,-15370,-15017,-14502,\n-13993,-13651,-13539,-13588,-13642,-13546,-13230,-12753,\n-12260,-11903,-11755,-11770,-11811,-11728,-11445,-10999,\n-10518,-10149,-9971,-9957,-9986,-9914,-9659,-9241,\n-8772,-8391,-8187,-8147,-8165,-8104,-7874,-7480,\n-7021,-6631,-6403,-6340,-6348,-6297,-6089,-5718,\n-5268,-4868,-4619,-4533,-4533,-4490,-4304,-3954,\n-3513,-3105,-2835,-2728,-2719,-2685,-2519,-2189,\n-1757,-1340,-1050,-924,-906,-881,-735,-425,\n0,425,735,881,906,924,1050,1340,\n1757,2189,2519,2685,2719,2728,2835,3105,\n3513,3954,4304,4490,4533,4533,4619,4868,\n5268,5718,6089,6297,6348,6340,6403,6631,\n7021,7480,7874,8104,8165,8147,8187,8391,\n8772,9241,9659,9914,9986,9957,9971,10149,\n10518,10999,11445,11728,11811,11770,11755,11903,\n12260,12753,13230,13546,13642,13588,13539,13651,\n13993,14502,15017,15370,15483,15411,15321,15392,\n15716,16243,16804,17204,17337,17245,17103,17120,\n17422,17973,18592,19053,19212,19093,18883,18830,\n19101,19684,20383,20928,21122,20965,20659,20505,\n20732,21362,22180,22850,23099,22882,22426,22112,\n22269,22976,23992,24874,25218,24896,24165,23552,\n23574,24435,25861,27200,27753,27181,25766,24361,\n24004,25350,28184,31289,32767,30752,24186,13373,\n};\n\nconst int16_t saw_fxpt_lutable_7[256] PROGMEM = {\n0,-9802,-18615,-25623,-30329,-32620,-32768,-31341,\n-29070,-26692,-24803,-23757,-23631,-24251,-25274,-26298,\n-26975,-27094,-26621,-25688,-24542,-23463,-22686,-22342,\n-22429,-22822,-23321,-23711,-23822,-23576,-23002,-22221,\n-21405,-20725,-20306,-20188,-20324,-20597,-20853,-20955,\n-20814,-20416,-19823,-19149,-18528,-18072,-17843,-17831,\n-17966,-18137,-18227,-18146,-17857,-17386,-16809,-16233,\n-15759,-15458,-15345,-15382,-15488,-15564,-15520,-15308,\n-14926,-14425,-13887,-13406,-13055,-12866,-12827,-12877,\n-12935,-12916,-12760,-12450,-12013,-11513,-11031,-10643,\n-10395,-10290,-10291,-10328,-10324,-10212,-9962,-9582,\n-9118,-8642,-8228,-7931,-7769,-7722,-7735,-7738,\n-7662,-7464,-7136,-6709,-6244,-5812,-5473,-5259,\n-5166,-5153,-5157,-5109,-4956,-4677,-4289,-3840,\n-3396,-3021,-2760,-2621,-2579,-2578,-2551,-2439,\n-2208,-1860,-1431,-981,-577,-271,-87,-11,\n0,11,87,271,577,981,1431,1860,\n2208,2439,2551,2578,2579,2621,2760,3021,\n3396,3840,4289,4677,4956,5109,5157,5153,\n5166,5259,5473,5812,6244,6709,7136,7464,\n7662,7738,7735,7722,7769,7931,8228,8642,\n9118,9582,9962,10212,10324,10328,10291,10290,\n10395,10643,11031,11513,12013,12450,12760,12916,\n12935,12877,12827,12866,13055,13406,13887,14425,\n14926,15308,15520,15564,15488,15382,15345,15458,\n15759,16233,16809,17386,17857,18146,18227,18137,\n17966,17831,17843,18072,18528,19149,19823,20416,\n20814,20955,20853,20597,20324,20188,20306,20725,\n21405,22221,23002,23576,23822,23711,23321,22822,\n22429,22342,22686,23463,24542,25688,26621,27094,\n26975,26298,25274,24251,23631,23757,24803,26692,\n29070,31341,32767,32620,30329,25623,18615,9802,\n};\n\nconst int16_t saw_fxpt_lutable_8[128] PROGMEM = {\n0,-13316,-24119,-30721,-32768,-31229,-27906,-24693,\n-22880,-22802,-23908,-25193,-25746,-25167,-23681,-21937,\n-20632,-20155,-20426,-20986,-21273,-20919,-19924,-18622,\n-17485,-16860,-16801,-17057,-17227,-16980,-16225,-15150,\n-14101,-13395,-13148,-13226,-13326,-13144,-12543,-11614,\n-10623,-9862,-9486,-9439,-9489,-9355,-8866,-8046,\n-7100,-6296,-5819,-5674,-5683,-5588,-5192,-4464,\n-3555,-2714,-2150,-1919,-1893,-1833,-1520,-875,\n0,875,1520,1833,1893,1919,2150,2714,\n3555,4464,5192,5588,5683,5674,5819,6296,\n7100,8046,8866,9355,9489,9439,9486,9862,\n10623,11614,12543,13144,13326,13226,13148,13395,\n14101,15150,16225,16980,17227,17057,16801,16860,\n17485,18622,19924,20919,21273,20986,20426,20155,\n20632,21937,23681,25167,25746,25193,23908,22802,\n22880,24693,27906,31229,32767,30721,24119,13316,\n};\n\nconst int16_t saw_fxpt_lutable_9[128] PROGMEM = {\n0,-9287,-17732,-24627,-29495,-32164,-32768,-31706,\n-29555,-26956,-24496,-22619,-21558,-21327,-21748,-22518,\n-23292,-23764,-23737,-23150,-22087,-20737,-19342,-18136,\n-17288,-16866,-16828,-17039,-17314,-17459,-17328,-16849,\n-16042,-15007,-13899,-12882,-12090,-11596,-11394,-11405,\n-11498,-11526,-11365,-10940,-10247,-9350,-8362,-7419,\n-6640,-6101,-5814,-5727,-5739,-5722,-5561,-5178,\n-4551,-3724,-2791,-1870,-1079,-500,-158,-21,\n0,21,158,500,1079,1870,2791,3724,\n4551,5178,5561,5722,5739,5727,5814,6101,\n6640,7419,8362,9350,10247,10940,11365,11526,\n11498,11405,11394,11596,12090,12882,13899,15007,\n16042,16849,17328,17459,17314,17039,16828,16866,\n17288,18136,19342,20737,22087,23150,23737,23764,\n23292,22518,21748,21327,21558,22619,24496,26956,\n29555,31706,32767,32164,29495,24627,17732,9287,\n};\n\nconst int16_t saw_fxpt_lutable_10[64] PROGMEM = {\n0,-13204,-23984,-30659,-32768,-31107,-27335,-23326,\n-20510,-19462,-19863,-20806,-21293,-20689,-18957,-16600,\n-14361,-12851,-12269,-12344,-12507,-12184,-11078,-9298,\n-7283,-5569,-4520,-4153,-4141,-3983,-3266,-1863,\n0,1863,3266,3983,4141,4153,4520,5569,\n7283,9298,11078,12184,12507,12344,12269,12851,\n14361,16600,18957,20689,21293,20806,19863,19462,\n20510,23326,27335,31107,32767,30659,23984,13204,\n};\n\nconst int16_t saw_fxpt_lutable_11[64] PROGMEM = {\n0,-10023,-19010,-26098,-30737,-32768,-32426,-30267,\n-27046,-23557,-20481,-18276,-17111,-16873,-17235,-17758,\n-18012,-17680,-16630,-14927,-12807,-10597,-8628,-7150,\n-6264,-5907,-5877,-5888,-5650,-4951,-3709,-1992,\n0,1992,3709,4951,5650,5888,5877,5907,\n6264,7150,8628,10597,12807,14927,16630,17680,\n18012,17758,17235,16873,17111,18276,20481,23557,\n27046,30267,32426,32767,30737,26098,19010,10023,\n};\n\nconst int16_t saw_fxpt_lutable_12[32] PROGMEM = {\n0,-12982,-23715,-30534,-32768,-30852,-26115,-20326,\n-15141,-11635,-10056,-9869,-10057,-9551,-7656,-4291,\n0,4291,7656,9551,10057,9869,10056,11635,\n15141,20326,26115,30852,32767,30534,23715,12982,\n};\n\nconst int16_t saw_fxpt_lutable_13[16] PROGMEM = {\n0,-18886,-30964,-32768,-25651,-14630,-5313,-747,\n0,747,5313,14630,25651,32767,30964,18886,\n};\n\nconst int16_t saw_fxpt_lutable_14[8] PROGMEM = {\n0,-23170,-32768,-23170,0,23170,32767,23170,\n};\n\nlut_entry_fxpt saw_fxpt_lutset[16] = {\n    {saw_fxpt_lutable_0, 2048, 11, 255, 1.845797},\n    {saw_fxpt_lutable_1, 2048, 11, 180, 1.837728},\n    {saw_fxpt_lutable_2, 1024, 10, 127, 1.839649},\n    {saw_fxpt_lutable_3, 1024, 10, 90, 1.828025},\n    {saw_fxpt_lutable_4, 512, 9, 63, 1.827329},\n    {saw_fxpt_lutable_5, 512, 9, 44, 1.812372},\n    {saw_fxpt_lutable_6, 256, 8, 31, 1.802594},\n    {saw_fxpt_lutable_7, 256, 8, 22, 1.774038},\n    {saw_fxpt_lutable_8, 128, 7, 15, 1.752739},\n    {saw_fxpt_lutable_9, 128, 7, 10, 1.705475},\n    {saw_fxpt_lutable_10, 64, 6, 7, 1.651493},\n    {saw_fxpt_lutable_11, 64, 6, 5, 1.576708},\n    {saw_fxpt_lutable_12, 32, 5, 3, 1.442809},\n    {saw_fxpt_lutable_13, 16, 4, 2, 1.277433},\n    {saw_fxpt_lutable_14, 8, 3, 1, 1.000000},\n    {NULL, 0, 0, 0, 0.0},\n};\n\n#endif // LUTSET_x_DEFINED\n"
  },
  {
    "path": "src/sequencer.c",
    "content": "#include \"sequencer.h\"\n#include \"amy.h\"\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten.h>\n#endif\n\nuint32_t sequencer_ticks() { return amy_global.sequencer_tick_count; }\n\ntypedef struct sequence_info_t {\n    struct delta *deltas;\n    //uint32_t tag;  // tag is implicit, it's its index in the table\n    uint32_t tick; // 0 means not used\n    uint32_t period; // 0 means not used\n} sequence_info_t;\n\nstruct sequence_info_t *sequences = NULL;  // An array indexed by tag.\nint32_t max_sequences = 0;\nint32_t highest_tag = -1;\nstatic volatile bool sequencer_running = true;\nstatic volatile bool sequencer_external_clock = false;\n\n// Declared per-platform below.\nvoid _sequencer_start();\nvoid _sequencer_stop();\n\nvoid sequencer_init(int max_sequencer_tags) {\n    max_sequences = max_sequencer_tags;\n    sequences = (struct sequence_info_t *)malloc_caps(max_sequences * sizeof(struct sequence_info_t),\n                                                      amy_global.config.ram_caps_synth);\n    for (int32_t i = 0; i < max_sequences; ++i) {\n        sequences[i].deltas = NULL;\n        sequences[i].tick = 0;\n        sequences[i].period = 0;\n    }\n    // We are read to go.\n    //sequencer_start();\n    sequencer_recompute();\n    _sequencer_start();\n}\n\nvoid sequencer_reset() {\n    // Remove all events\n    for (int32_t i = 0; i < max_sequences; ++i) {\n        if (sequences[i].deltas) {\n            delta_release_list(sequences[i].deltas);\n            sequences[i].deltas = NULL;\n            sequences[i].tick = 0;\n            sequences[i].period = 0;\n        }\n    }\n    highest_tag = -1;\n}\n\nvoid sequencer_deinit() {\n    _sequencer_stop();\n    sequencer_reset();\n    if (sequences != NULL) free(sequences);\n    max_sequences = 0;\n}\n\nvoid sequencer_debug() {\n    fprintf(stderr, \"sequencer: max_sequences %\" PRIi32\" highest_tag %\" PRIi32 \"\\n\", max_sequences, highest_tag);\n    for (int32_t tag = 0; tag < max_sequences; ++tag) {\n        if (sequences[tag].deltas) {\n            fprintf(stderr, \"sequence tag %\" PRIu32\" tick %\" PRIu32 \" period %\"PRIu32 \" num_deltas %\"PRIu32 \"\\n\",\n                    tag, sequences[tag].tick, sequences[tag].period, delta_list_len(sequences[tag].deltas));\n        }\n    }\n}\n\nvoid sequencer_recompute() {\n    amy_global.us_per_tick = (uint32_t) (1000000.0 / ((amy_global.tempo/60.0) * (float)AMY_SEQUENCER_PPQ));    \n    amy_global.next_amy_tick_us = (((uint64_t)amy_sysclock()) * 1000L) + (uint64_t)amy_global.us_per_tick;\n}\n\nstatic void sequencer_process_tick(void) {\n    amy_global.sequencer_tick_count++;\n    // Scan through LL looking for matches\n    for (int32_t tag = 0; tag <= highest_tag; ++tag) {\n        if (sequences[tag].deltas != NULL) {\n            bool hit = false;\n            bool delete = false;\n            if(sequences[tag].period != 0) { // period set\n                uint32_t offset = amy_global.sequencer_tick_count % sequences[tag].period;\n                if (offset == sequences[tag].tick) hit = true;\n            } else {\n                // Test for absolute tick (no period set)\n                if (sequences[tag].tick == amy_global.sequencer_tick_count) { hit = true; delete = true; }\n            }\n            if(hit) {\n                struct delta *d = sequences[tag].deltas;\n                while(d) {\n                    // assume the d->time is 0 and that's good.\n                    add_delta_to_queue(d, &amy_global.delta_queue);\n                    d = d->next;\n                }\n                // Delete absolute tick addressed sequence entry if sent\n                if(delete) {\n                    delta_release_list(sequences[tag].deltas);\n                    sequences[tag].deltas = NULL;\n                }\n            }\n        }\n    }\n    // call the right hook:\n#ifdef __EMSCRIPTEN__\n    EM_ASM({\n        if(typeof amy_sequencer_js_hook === 'function') {\n            amy_sequencer_js_hook($0);\n        }\n    }, amy_global.sequencer_tick_count);\n#endif\n    if(amy_global.config.amy_external_sequencer_hook != NULL) {\n        amy_global.config.amy_external_sequencer_hook(amy_global.sequencer_tick_count);\n    }\n}\n\nvoid sequencer_midi_start() {\n    // MIDI \"Start\" restarts the sequencer.\n    // If external clock was not previously enabled, keep using internal clock\n    // so the sequencer advances on its own without needing F8 ticks.\n    if (sequencer_external_clock) {\n        amy_global.sequencer_tick_count = 0;\n    }\n    // Reset the tick timer to now so sequencer_check_and_fill doesn't try to\n    // catch up all the ticks that elapsed while stopped.\n    amy_global.next_amy_tick_us = (uint64_t)amy_sysclock() * 1000L;\n    sequencer_running = true;\n}\n\nvoid sequencer_midi_stop() {\n    sequencer_running = false;\n}\n\nvoid sequencer_midi_clock_tick() {\n    sequencer_external_clock = true;\n    if (!sequencer_running) return;\n    for (uint8_t i = 0; i < AMY_SEQUENCER_PPQ/MIDI_SEQUENCER_PPQ; ++i) { \n        sequencer_process_tick();\n    }\n}\n\nuint8_t sequencer_add_event(amy_event *e) {\n    // add this event to the list of sequencer events in the LL.\n    // e->sequence is set up.\n    // if the tag already exists - if there's tick/period, overwrite, if there's no tick / period, we should remove the entry\n    //fprintf(stderr, \"sequencer_add_event: e->instrument %d e->note %.0f e->vel %.2f tick %d period %d tag %d\\n\", e->instrument, e->midi_note, e->velocity, e->sequence[SEQUENCE_TICK], e->sequence[SEQUENCE_PERIOD], e->sequence[SEQUENCE_TAG]);\n    int32_t tag = e->sequence[SEQUENCE_TAG];\n    if (tag > max_sequences) {\n        fprintf(stderr, \"sequencer tag %\" PRIi32\" (with tick %\" PRIu32\", period %\" PRIu32\") is greater than or eq max_sequences %\" PRIi32\"\\n\",\n                tag, e->sequence[SEQUENCE_TICK], e->sequence[SEQUENCE_PERIOD], max_sequences);\n        // ignore\n        return 0;\n    }\n    // Release any existing deltas for this tag, even if we're just going to rewrite them.\n    delta_release_list(sequences[tag].deltas);\n    sequences[tag].deltas = NULL;\n\n    if(e->sequence[SEQUENCE_TICK] == 0 && e->sequence[SEQUENCE_PERIOD] == 0) return 0; // Ignore non-schedulable event.\n    if(e->sequence[SEQUENCE_TICK] != 0 && e->sequence[SEQUENCE_PERIOD] == 0 && e->sequence[SEQUENCE_TICK] <= amy_global.sequencer_tick_count) return 0; // don't schedule things in the past.\n\n    // Save the tick & period.\n    sequences[tag].tick = e->sequence[SEQUENCE_TICK];\n    sequences[tag].period = e->sequence[SEQUENCE_PERIOD];\n    // Copy all the deltas for this event to the sequences entry.\n    amy_event_to_deltas_queue(e, 0, &sequences[tag].deltas);\n\n    if (tag > highest_tag) highest_tag = tag;  // To limit scanning through tags.\n\n    return 1;\n}\n\n\nvoid sequencer_check_and_fill() {\n    if (!sequencer_running || sequencer_external_clock) return;\n    // If we've fallen behind by more than 1 second (e.g. sequencer was stopped\n    // and restarted, or a long blocking operation occurred), skip ahead instead\n    // of processing hundreds of backed-up ticks at once.\n    uint64_t now_us = (uint64_t)amy_sysclock() * 1000L;\n    if (now_us > amy_global.next_amy_tick_us + 1000000ULL) {\n        amy_global.next_amy_tick_us = now_us;\n    }\n    // The while is in case the timer fires later than a tick; (on esp this would be due to SPI or wifi ops)\n    while(amy_sysclock()  >= (uint32_t)(amy_global.next_amy_tick_us / 1000L)) {\n        sequencer_process_tick();\n        amy_global.next_amy_tick_us = amy_global.next_amy_tick_us + (uint64_t)amy_global.us_per_tick;\n    }\n}\n\n///// Sequencers per platform\n\n#ifdef ESP_PLATFORM\n// ESP: do it with hardware timer\n#include \"esp_timer.h\"\nesp_timer_handle_t periodic_timer = NULL;\n\nstatic void sequencer_timer_callback(void* arg) {\n    sequencer_check_and_fill();\n}\n\nvoid _sequencer_start() {\n    const esp_timer_create_args_t periodic_timer_args = {\n            .callback = &sequencer_timer_callback,\n            //.dispatch_method = ESP_TIMER_ISR,\n            .name = \"sequencer\"\n    };\n    ESP_ERROR_CHECK(esp_timer_create(&periodic_timer_args, &periodic_timer));\n    // 500us = 0.5ms\n    ESP_ERROR_CHECK(esp_timer_start_periodic(periodic_timer, 500));\n}\n\nvoid _sequencer_stop() {\n    if (periodic_timer) {\n        ESP_ERROR_CHECK(esp_timer_stop(periodic_timer));\n        ESP_ERROR_CHECK(esp_timer_delete(periodic_timer));\n        periodic_timer = NULL;\n    }\n}\n\n#elif defined(PICO_RP2350) || defined(PICO_RP2040)\n// pico: do it with a hardware timer\n\n#include \"pico/time.h\"\nrepeating_timer_t pico_sequencer_timer;\n\nstatic bool sequencer_timer_callback(repeating_timer_t *rt) {\n    sequencer_check_and_fill();\n    return true;\n}\n\nvoid _sequencer_start() {\n    add_repeating_timer_us(-500, sequencer_timer_callback, NULL, &pico_sequencer_timer);\n}\n\nvoid _sequencer_stop() {\n    cancel_repeating_timer(&pico_sequencer_timer);\n}\n\n#elif defined _POSIX_THREADS\n#include <pthread.h>\n\nstatic volatile bool sequencer_thread_should_exit = false;\n\n// posix: threads\nvoid * sequencer_thread(void *vargs) {\n    // Loop forever, checking for time and sleeping\n    while(!sequencer_thread_should_exit) {\n        sequencer_check_and_fill();            \n        // 500000ns = 500us = 0.5ms\n        nanosleep((const struct timespec[]){{0, 500000L}}, NULL);\n    }\n    return NULL;\n}\npthread_t sequencer_thread_id;\nvoid _sequencer_start() {\n    sequencer_thread_should_exit = false;\n    pthread_create(&sequencer_thread_id, NULL, sequencer_thread, NULL);\n}\nvoid _sequencer_stop() {\n    //pthread_cancel(sequencer_thread_id);\n    sequencer_thread_should_exit = true;\n}\n\n#elif defined AMY_DAISY\nvoid _sequencer_start() {\n    // Set up in DaisyMain.cc\n}\nvoid _sequencer_stop() {\n    // Not supported on Daisy.\n}\n\n#else\n\nvoid _sequencer_start() {\n    fprintf(stderr, \"No sequencer support for this chip / platform\\n\");\n}\nvoid _sequencer_stop() {\n    fprintf(stderr, \"No sequencer support for this chip / platform\\n\");\n}\n\n#endif\n"
  },
  {
    "path": "src/sequencer.h",
    "content": "//  sequencer.h\n#ifndef __SEQUENCERH\n#define __SEQUENCERH\n\n#include \"amy.h\"\n#define MIDI_SEQUENCER_PPQ 24  // MIDI clocks per quarter note\nuint32_t sequencer_ticks();\nvoid sequencer_init(int max_num_sequences);\nvoid sequencer_deinit();\nvoid sequencer_reset();\nvoid sequencer_debug();\n\nvoid sequencer_recompute();\nuint8_t sequencer_add_event(amy_event *e);\nvoid sequencer_midi_clock_tick();\nvoid sequencer_midi_start();\nvoid sequencer_midi_stop();\n\n#endif\n"
  },
  {
    "path": "src/sine_lutset_fxpt.h",
    "content": "// Automatically-generated LUTset\n#ifndef LUTSET_SINE_FXPT_DEFINED\n#define LUTSET_SINE_FXPT_DEFINED\n\n#ifndef LUTENTRY_FXPT_DEFINED\n#define LUTENTRY_FXPT_DEFINED\ntypedef struct {\n    const int16_t *table;\n    int table_size;\n    int log_2_table_size;\n    int highest_harmonic;\n    float scale_factor;\n} lut_entry_fxpt;\n#endif // LUTENTRY_FXPT_DEFINED\n\nconst int16_t sine_fxpt_lutable_0[256] PROGMEM = {\n0,804,1608,2411,3212,4011,4808,5602,\n6393,7180,7962,8740,9512,10279,11039,11793,\n12540,13279,14010,14733,15447,16151,16846,17531,\n18205,18868,19520,20160,20788,21403,22006,22595,\n23170,23732,24279,24812,25330,25833,26320,26791,\n27246,27684,28106,28511,28899,29269,29622,29957,\n30274,30572,30853,31114,31357,31581,31786,31972,\n32138,32286,32413,32522,32610,32679,32729,32758,\n32767,32758,32729,32679,32610,32522,32413,32286,\n32138,31972,31786,31581,31357,31114,30853,30572,\n30274,29957,29622,29269,28899,28511,28106,27684,\n27246,26791,26320,25833,25330,24812,24279,23732,\n23170,22595,22006,21403,20788,20160,19520,18868,\n18205,17531,16846,16151,15447,14733,14010,13279,\n12540,11793,11039,10279,9512,8740,7962,7180,\n6393,5602,4808,4011,3212,2411,1608,804,\n0,-804,-1608,-2411,-3212,-4011,-4808,-5602,\n-6393,-7180,-7962,-8740,-9512,-10279,-11039,-11793,\n-12540,-13279,-14010,-14733,-15447,-16151,-16846,-17531,\n-18205,-18868,-19520,-20160,-20788,-21403,-22006,-22595,\n-23170,-23732,-24279,-24812,-25330,-25833,-26320,-26791,\n-27246,-27684,-28106,-28511,-28899,-29269,-29622,-29957,\n-30274,-30572,-30853,-31114,-31357,-31581,-31786,-31972,\n-32138,-32286,-32413,-32522,-32610,-32679,-32729,-32758,\n-32768,-32758,-32729,-32679,-32610,-32522,-32413,-32286,\n-32138,-31972,-31786,-31581,-31357,-31114,-30853,-30572,\n-30274,-29957,-29622,-29269,-28899,-28511,-28106,-27684,\n-27246,-26791,-26320,-25833,-25330,-24812,-24279,-23732,\n-23170,-22595,-22006,-21403,-20788,-20160,-19520,-18868,\n-18205,-17531,-16846,-16151,-15447,-14733,-14010,-13279,\n-12540,-11793,-11039,-10279,-9512,-8740,-7962,-7180,\n-6393,-5602,-4808,-4011,-3212,-2411,-1608,-804,\n};\n\nlut_entry_fxpt sine_fxpt_lutset[2] = {\n    {sine_fxpt_lutable_0, 256, 8, 1, 1.000000},\n    {NULL, 0, 0, 0, 0.0},\n};\n\n#endif // LUTSET_x_DEFINED\n"
  },
  {
    "path": "src/teensy_support.cpp",
    "content": "// teensy_support.cpp\n#ifdef __IMXRT1062__\n\n#include \"teensy_support.h\"\n#include <Audio.h>\n#include \"amy.h\"\n\nAudioOutputPT8211           i2s1; \n//AudioOutputI2S unused;\nAudioPlayQueue           queue_l;\nAudioPlayQueue           queue_r;\n#if defined(USB_AUDIO) || defined(USB_MIDI_AUDIO_SERIAL) || defined(USB_MIDI16_AUDIO_SERIAL)\nAudioOutputUSB           usb_out;\nAudioConnection          patchCord1(queue_r, 0, usb_out, 1);\nAudioConnection          patchCord2(queue_l, 0, usb_out, 0);\n#endif\nAudioConnection          patchCord3(queue_r, 0, i2s1, 1);\nAudioConnection          patchCord4(queue_l, 0, i2s1, 0);\n\n\n\n\nint16_t * samples_l = NULL;\nint16_t * samples_r = NULL;\n\nextern \"C\" {\n\n\t#include \"usb_names.h\"\n\n\t// Edit these lines to create your own name.  The length must\n\t// match the number of characters in your custom name.\n\n\t#define MIDI_NAME   {'A','M','Y',' ','S','y','n','t','h','e','s','i','z','e','r'}\n\t#define MIDI_NAME_LEN  15\n\t#define SPSS_NAME   {'S','P','S','S'}\n\t#define SPSS_NAME_LEN 4\n\n\t// Do not change this part.  This exact format is required by USB.\n\n\tstruct usb_string_descriptor_struct usb_string_product_name = {\n\t        2 + MIDI_NAME_LEN * 2,\n\t        3,\n\t        MIDI_NAME\n\t};\n\tstruct usb_string_descriptor_struct usb_string_manufacturer_name = {\n\t\t\t2 + SPSS_NAME_LEN * 2,\n\t\t\t3,\n\t\t\tSPSS_NAME\n\t};\n\tvoid teensy_setup_i2s() {\n            if (samples_l == NULL) {\n                samples_l = (int16_t*)malloc(sizeof(int16_t)*AMY_BLOCK_SIZE);\n\t\tsamples_r = (int16_t*)malloc(sizeof(int16_t)*AMY_BLOCK_SIZE);\n\t\tAudioMemory(16);\n\t\tqueue_l.setMaxBuffers(4);\n\t\tqueue_r.setMaxBuffers(4);\n            }\n\n\t}\n        void teensy_teardown_i2s() {\n            if (samples_l != NULL) {\n                free(samples_l);\n                free(samples_r);\n                samples_l = NULL;\n                samples_r = NULL;\n            }\n        }\n\n        size_t teensy_i2s_write(const uint8_t *buffer, size_t nbytes) {\n            int16_t *samples = (int16_t *)buffer;\n            for(int16_t i=0;i<AMY_BLOCK_SIZE;i++) {\n    \t\tsamples_l[i] = samples[i*2];\n\t\t\tsamples_r[i] = samples[i*2+1];\n\t\t }  \n\t\tqueue_l.play(samples_l, AMY_BLOCK_SIZE);\n\t\tqueue_r.play(samples_r, AMY_BLOCK_SIZE);\n            return nbytes;\n\t}\n\n\tvoid teensy_start_midi() {\n\t\tSerial8.begin(31250);\n\t}\n\tint16_t teensy_get_serial_byte() {\n\t\tif(Serial8.available()) {\n\t\t\treturn Serial8.read();\n\t\t}\n\t\treturn -1;\n\t}\n}\n\n#endif\n"
  },
  {
    "path": "src/teensy_support.h",
    "content": "// teensy_support.h\n#ifdef __IMXRT1062__\n\n#endif"
  },
  {
    "path": "src/transfer.c",
    "content": "// transfer.c\n// data transfer over AMY messages\n\n#include <stdlib.h>\n#include <ctype.h>\n#include \"transfer.h\"\n#include \"amy_midi.h\"    // for midi_out, MAX_SYSEX_BYTES\n#include \"sequencer.h\"   // for sequencer_midi_stop/start\n#include <stdio.h>\n#include <stdint.h>\n#include <string.h>\n#include <stdbool.h>\n\n#ifdef __EMSCRIPTEN__\n#include \"emscripten.h\"\n#endif\n\n// per platform file reading / writing\n// posix (linux, mac)\n// micropython / littlefs - tulip & amybard\n// (later) arduino / SPIFFS / SD\n// if yours isnt' here, you just write your own amy_external_fopen_hook etc\n\n\n// mac / linux / generic posix \n\n#if defined(__unix__) || defined(__APPLE__) || defined(_POSIX_VERSION)\n\n// Map from FILE * to a uint32_t handle to pass to AMY\n\nstatic FILE *g_files[MAX_OPEN_FILES]; // index 1..MAX_OPEN_FILES-1 used\n#ifdef __EMSCRIPTEN__\nstatic uint32_t g_em_handle[MAX_OPEN_FILES];\nstatic uint32_t g_em_pos[MAX_OPEN_FILES];\n#endif\n\n#ifndef __EMSCRIPTEN__\nstatic uint32_t alloc_handle(FILE *f) {\n    for (uint32_t i = 1; i < MAX_OPEN_FILES; i++) {\n        if (g_files[i] == NULL) {\n            g_files[i] = f;\n            return i;\n        }\n    }\n    return HANDLE_INVALID; // table full\n}\n\nstatic FILE *lookup_handle(uint32_t h) {\n    if (h == 0 || h >= MAX_OPEN_FILES) return NULL;\n    return g_files[h];\n}\n#endif\nstatic void free_handle(uint32_t h) {\n    if (h == 0 || h >= MAX_OPEN_FILES) return;\n    g_files[h] = NULL;\n#ifdef __EMSCRIPTEN__\n    g_em_handle[h] = 0;\n    g_em_pos[h] = 0;\n#endif\n}\n\n\n// These should map to \n// uint32_t (*amy_external_fopen_hook)(char * filename, char * mode) = NULL;\n// uint32_t (*amy_external_fwrite_hook)(uint32_t fptr, uint8_t * bytes, uint32_t len) = NULL;\n// uint32_t (*amy_external_fread_hook)(uint32_t fptr, uint8_t * bytes, uint32_t len) = NULL;\n// void (*amy_external_fclose_hook)(uint32_t fptr) = NULL;\n\nuint32_t posix_external_fopen_hook(char * filename, const char *mode) {\n#ifdef __EMSCRIPTEN__\n    uint32_t js_handle = EM_ASM_INT({\n        if (typeof amy_shared_open === 'function') {\n            return amy_shared_open(UTF8ToString($0), UTF8ToString($1));\n        }\n        return 0;\n    }, filename, mode);\n    if (js_handle == 0) {\n        return HANDLE_INVALID;\n    }\n    for (uint32_t i = 1; i < MAX_OPEN_FILES; i++) {\n        if (g_em_handle[i] == 0) {\n            g_em_handle[i] = js_handle;\n            g_em_pos[i] = 0;\n            return i;\n        }\n    }\n    EM_ASM({\n        if (typeof amy_shared_close === 'function') {\n            amy_shared_close($0);\n        }\n    }, js_handle);\n    return HANDLE_INVALID;\n#else\n    FILE *f = fopen(filename, mode);\n    if (!f) {\n        return HANDLE_INVALID;\n    }\n    uint32_t h = alloc_handle(f);\n    if (h == HANDLE_INVALID) {\n        fclose(f);\n        return HANDLE_INVALID;\n    }\n    return h;\n#endif\n}\n\nuint32_t posix_external_fread_hook(uint32_t h, uint8_t *buf, uint32_t len) {\n#ifdef __EMSCRIPTEN__\n    if (h == 0 || h >= MAX_OPEN_FILES) {\n        return 0;\n    }\n    uint32_t js_handle = g_em_handle[h];\n    if (js_handle == 0) {\n        return 0;\n    }\n    uint32_t pos = g_em_pos[h];\n    uint32_t r = EM_ASM_INT({\n        if (typeof amy_shared_read === 'function') {\n            return amy_shared_read($0, $1, $2, $3);\n        }\n        return 0;\n    }, js_handle, pos, buf, len);\n    g_em_pos[h] += r;\n    return r;\n#else\n    FILE *f = lookup_handle(h);\n    if (!f) {\n        return 0;\n    }\n    uint32_t r = fread(buf, 1, len, f);\n    return r;\n#endif\n}\nvoid posix_external_fseek_hook(uint32_t h, uint32_t pos) {\n#ifdef __EMSCRIPTEN__\n    if (h == 0 || h >= MAX_OPEN_FILES) {\n        return;\n    }\n    g_em_pos[h] = pos;\n    return;\n#else\n    FILE *f = lookup_handle(h);\n    if (!f) {\n        return;\n    }\n    fseek(f, pos, SEEK_SET);\n#endif\n}\n\nuint32_t posix_external_fwrite_hook(uint32_t h, uint8_t *buf, uint32_t n) {\n#ifdef __EMSCRIPTEN__\n    if (h == 0 || h >= MAX_OPEN_FILES || g_em_handle[h] == 0) {\n        return 0;\n    }\n    uint32_t written = EM_ASM_INT({\n        if (typeof amy_shared_write === 'function') {\n            return amy_shared_write($0, $1, $2);\n        }\n        return 0;\n    }, g_em_handle[h], buf, n);\n    g_em_pos[h] += written;\n    return written;\n#else\n    FILE *f = lookup_handle(h);\n    if (!f) {\n        return 0;\n    }\n    uint32_t w = fwrite(buf, 1, n, f);\n    return w;\n#endif\n}\n\nvoid posix_external_fclose_hook(uint32_t h) {\n#ifdef __EMSCRIPTEN__\n    if (h == 0 || h >= MAX_OPEN_FILES) {\n        return;\n    }\n    uint32_t js_handle = g_em_handle[h];\n    if (js_handle != 0) {\n        EM_ASM({\n            if (typeof amy_shared_close === 'function') {\n                amy_shared_close($0);\n            }\n        }, js_handle);\n        free_handle(h);\n    }\n#else\n    FILE *f = lookup_handle(h);\n    if (f) {\n        fclose(f);\n        free_handle(h);\n    }\n#endif\n}\n\n#endif\n\n\n\n// We keep one decbuf around and reuse it during transfer\nb64_buffer_t decbuf;\n\n// signals to AMY that i'm now receiving a transfer of length (bytes!) into allocated storage\nvoid start_receiving_transfer(uint32_t length, uint8_t * storage) {\n    amy_global.transfer_flag = AMY_TRANSFER_TYPE_AUDIO;\n    amy_global.transfer_storage = storage;\n    amy_global.transfer_length_bytes = length;\n    amy_global.transfer_stored_bytes = 0;\n    amy_global.transfer_file_handle = 0;\n    amy_global.transfer_filename[0] = '\\0';\n    b64_buf_malloc(&decbuf);\n}\n\nvoid start_receiving_sample(uint32_t frames, uint8_t bus, int16_t *storage) {\n    amy_global.transfer_flag = AMY_TRANSFER_TYPE_SAMPLE;\n    amy_global.transfer_storage = (uint8_t *)storage;\n    amy_global.transfer_length_bytes = frames*sizeof(int16_t)*AMY_NCHANS;\n    amy_global.transfer_stored_bytes = 0;\n    amy_global.transfer_file_handle = bus; // use file handle to store bus number\n    amy_global.transfer_filename[0] = '\\0';\n}\n\nvoid stop_receiving_sample() {\n    amy_global.transfer_file_handle = 0;\n    amy_global.transfer_flag = AMY_TRANSFER_TYPE_NONE;\n    amy_global.transfer_stored_bytes = 0;\n    amy_global.transfer_length_bytes = 0;\n}\n\n// signals to AMY that i'm now receiving a file transfer of length (bytes!) to filename\nvoid start_receiving_file_transfer(uint32_t length, const char *filename) {\n\n    if (filename == NULL || filename[0] == '\\0') {\n        return;\n    }\n    if (amy_global.config.amy_external_fopen_hook == NULL || amy_global.config.amy_external_fwrite_hook == NULL || amy_global.config.amy_external_fclose_hook == NULL) {\n\n        fprintf(stderr, \"file transfer hooks not enabled on platform\\n\");\n        return;\n    }\n        uint32_t handle = amy_global.config.amy_external_fopen_hook((char *)filename, \"wb\");\n    if (handle == HANDLE_INVALID) {\n        fprintf(stderr, \"could not open file for transfer: %s\\n\", filename);\n        return;\n    }\n    amy_global.transfer_flag = AMY_TRANSFER_TYPE_FILE;\n    amy_global.transfer_storage = NULL;\n    amy_global.transfer_length_bytes = length;\n    amy_global.transfer_stored_bytes = 0;\n    amy_global.transfer_file_handle = handle;\n    strncpy(amy_global.transfer_filename, filename, sizeof(amy_global.transfer_filename) - 1);\n    amy_global.transfer_filename[sizeof(amy_global.transfer_filename) - 1] = '\\0';\n    b64_buf_malloc(&decbuf);\n}\n\n// takes a wire message and adds it to storage after decoding it. stops transfer when it's done\nvoid parse_transfer_message(char * message, uint16_t len) {\n    size_t decoded = 0;\n    uint8_t * block = b64_decode_ex (message, len, &decbuf, &decoded);\n    if (amy_global.transfer_flag == AMY_TRANSFER_TYPE_FILE) {\n        if (amy_global.config.amy_external_fwrite_hook != NULL && amy_global.transfer_file_handle != HANDLE_INVALID) {\n            uint32_t wrote = amy_global.config.amy_external_fwrite_hook(amy_global.transfer_file_handle, block, (uint32_t)decoded);\n            amy_global.transfer_stored_bytes += wrote;\n        }\n    } else {\n        for (uint16_t i = 0; i < decoded; i++) {\n            amy_global.transfer_storage[amy_global.transfer_stored_bytes++] = block[i];\n        }\n    }\n    if (amy_global.transfer_stored_bytes >= amy_global.transfer_length_bytes) { // we're done\n        if (amy_global.transfer_flag == AMY_TRANSFER_TYPE_FILE) {\n            if (amy_global.config.amy_external_fclose_hook != NULL && amy_global.transfer_file_handle != HANDLE_INVALID) {\n                amy_global.config.amy_external_fclose_hook(amy_global.transfer_file_handle);\n            }\n            // Pair the sequencer_midi_stop() that zT's start handler fired in\n            // amy_parse_transfer_layer_message(). Do it BEFORE the done hook so\n            // the hook can observe a running sequencer if it needs to, and so\n            // any platform that uses zT without a platform-specific restart in\n            // its file_transfer_done_hook doesn't leave playback wedged.\n            sequencer_midi_start();\n            if (amy_global.config.amy_external_file_transfer_done_hook != NULL) {\n                amy_global.config.amy_external_file_transfer_done_hook(amy_global.transfer_filename);\n            }\n            amy_global.transfer_file_handle = 0;\n            amy_global.transfer_filename[0] = '\\0';\n        }\n        amy_global.transfer_flag = AMY_TRANSFER_TYPE_NONE;\n        free(decbuf.ptr);\n    }\n}\n\nint b64_buf_malloc(b64_buffer_t * buf)\n{\n    buf->ptr = malloc(B64_BUFFER_SIZE);\n    if (!buf->ptr) return -1;\n\n    buf->bufc = 1;\n\n    return 0;\n}\n\n// We don't do encoding in AMY, we rely on python for that, but we'll leave it here if you want it in C\n// Just like decode you pass it an allocated encbuf. \nchar * b64_encode (const unsigned char *src, b64_buffer_t * encbuf, size_t len) {\n    int i = 0;\n    int j = 0;\n    size_t size = 0;\n    unsigned char buf[4];\n    unsigned char tmp[3];\n\n\n    // parse until end of source\n    while (len--) {\n        // read up to 3 bytes at a time into `tmp'\n        tmp[i++] = *(src++);\n\n        // if 3 bytes read then encode into `buf'\n        if (3 == i) {\n            buf[0] = (tmp[0] & 0xfc) >> 2;\n            buf[1] = ((tmp[0] & 0x03) << 4) + ((tmp[1] & 0xf0) >> 4);\n            buf[2] = ((tmp[1] & 0x0f) << 2) + ((tmp[2] & 0xc0) >> 6);\n            buf[3] = tmp[2] & 0x3f;\n\n            // allocate 4 new byts for `enc` and\n            // then translate each encoded buffer\n            // part by index from the base 64 index table\n            // into `encbuf.ptr' unsigned char array\n\n            for (i = 0; i < 4; ++i) {\n                encbuf->ptr[size++] = b64_table[buf[i]];\n            }\n\n            // reset index\n            i = 0;\n        }\n    }\n\n    // remainder\n    if (i > 0) {\n        // fill `tmp' with `\\0' at most 3 times\n        for (j = i; j < 3; ++j) {\n            tmp[j] = '\\0';\n        }\n\n        // perform same codec as above\n        buf[0] = (tmp[0] & 0xfc) >> 2;\n        buf[1] = ((tmp[0] & 0x03) << 4) + ((tmp[1] & 0xf0) >> 4);\n        buf[2] = ((tmp[1] & 0x0f) << 2) + ((tmp[2] & 0xc0) >> 6);\n        buf[3] = tmp[2] & 0x3f;\n\n        // perform same write to `encbuf->ptr` with new allocation\n        for (j = 0; (j < i + 1); ++j) {\n            encbuf->ptr[size++] = b64_table[buf[j]];\n        }\n\n        // while there is still a remainder\n        // append `=' to `encbuf.ptr'\n        while ((i++ < 3)) {\n            encbuf->ptr[size++] = '=';\n        }\n    }\n\n    // Make sure we have enough space to add '\\0' character at end.\n    encbuf->ptr[size] = '\\0';\n\n    return encbuf->ptr;\n}\n\n\n\nunsigned char *\nb64_decode_ex (const char *src, size_t len, b64_buffer_t * decbuf, size_t *decsize) {\n    int i = 0;\n    int j = 0;\n    int l = 0;\n    size_t size = 0;\n    unsigned char buf[3];\n    unsigned char tmp[4];\n\n    // alloc\n    //if (b64_buf_malloc(&decbuf) == -1) { return NULL; }\n\n    // parse until end of source\n    while (len--) {\n        // break if char is `=' or not base64 char\n        if ('=' == src[j]) { break; }\n        if (!(isalnum((unsigned char)src[j]) || '+' == src[j] || '/' == src[j])) { break; }\n\n        // read up to 4 bytes at a time into `tmp'\n        tmp[i++] = src[j++];\n\n        // if 4 bytes read then decode into `buf'\n        if (4 == i) {\n            // translate values in `tmp' from table\n            for (i = 0; i < 4; ++i) {\n                // find translation char in `b64_table'\n                for (l = 0; l < 64; ++l) {\n                    if (tmp[i] == b64_table[l]) {\n                        tmp[i] = l;\n                        break;\n                    }\n                }\n            }\n\n            // decode\n            buf[0] = (tmp[0] << 2) + ((tmp[1] & 0x30) >> 4);\n            buf[1] = ((tmp[1] & 0xf) << 4) + ((tmp[2] & 0x3c) >> 2);\n            buf[2] = ((tmp[2] & 0x3) << 6) + tmp[3];\n\n            // write decoded buffer to `decbuf.ptr'\n            //if (b64_buf_realloc(&decbuf, size + 3) == -1)  return NULL;\n            for (i = 0; i < 3; ++i) {\n                ((unsigned char*)decbuf->ptr)[size++] = buf[i];\n            }\n\n            // reset\n            i = 0;\n        }\n    }\n\n    // remainder\n    if (i > 0) {\n        // fill `tmp' with `\\0' at most 4 times\n        for (j = i; j < 4; ++j) {\n            tmp[j] = '\\0';\n        }\n\n        // translate remainder\n        for (j = 0; j < 4; ++j) {\n            // find translation char in `b64_table'\n            for (l = 0; l < 64; ++l) {\n                if (tmp[j] == b64_table[l]) {\n                    tmp[j] = l;\n                    break;\n                }\n            }\n        }\n\n        // decode remainder\n        buf[0] = (tmp[0] << 2) + ((tmp[1] & 0x30) >> 4);\n        buf[1] = ((tmp[1] & 0xf) << 4) + ((tmp[2] & 0x3c) >> 2);\n        buf[2] = ((tmp[2] & 0x3) << 6) + tmp[3];\n\n        // write remainer decoded buffer to `decbuf.ptr'\n        //if (b64_buf_realloc(&decbuf, size + (i - 1)) == -1)  return NULL;\n        for (j = 0; (j < i - 1); ++j) {\n            ((unsigned char*)decbuf->ptr)[size++] = buf[j];\n        }\n    }\n\n    // Make sure we have enough space to add '\\0' character at end.\n    //if (b64_buf_realloc(&decbuf, size + 1) == -1)  return NULL;\n    ((unsigned char*)decbuf->ptr)[size] = '\\0';\n\n    // Return back the size of decoded string if demanded.\n    if (decsize != NULL) {\n        *decsize = size;\n    }\n\n    return (unsigned char*) decbuf->ptr;\n}\n\n\n// ── State dump helpers ──────────────────────────────────────────────────────\n\n// Walk all active instruments and emit one wire-command line per callback.\nstatic void amy_emit_state_lines(void (*cb)(const char *line, int len, void *ctx), void *ctx) {\n    char buf[1024];\n    char line[1100];\n    bool include_fx = true;\n    for (int inst = 0; inst < instruments_max_instruments(); inst++) {\n        if (instrument_number_exists(inst, NULL)) {\n            uint16_t voices[MAX_VOICES_PER_INSTRUMENT];\n            int num_voices = instrument_get_num_voices(inst, voices);\n            if (num_voices < 1) continue;  // should never happen.\n            int oscs_per_voice = instrument_get_oscs_per_voice(inst);\n            int n = snprintf(line, sizeof(line), \"i%dic255Z\", inst);\n            cb(line, n, ctx);\n            n = snprintf(line, sizeof(line), \"i%div%din%dZ\", inst, num_voices, oscs_per_voice);\n            cb(line, n, ctx);\n            void *state = NULL;\n            do {\n                state = yield_synth_commands((uint8_t)inst, buf, sizeof(buf), include_fx, state);\n                if (buf[0] == '\\0') continue;\n                n = snprintf(line, sizeof(line), \"i%d%s\", inst, buf);  // Prepends to FX as well, that's OK.\n                cb(line, n, ctx);\n            } while (state);\n            // We include FX only in the first osc.\n            include_fx = false;\n        }\n    }\n}\n\ntypedef struct { char *buf; int pos; int cap; } _string_ctx;\nstatic void _dump_string_cb(const char *line, int len, void *ctx) {\n    _string_ctx *c = (_string_ctx *)ctx;\n    if (c->pos + len + 1 > c->cap) return;\n    memcpy(c->buf + c->pos, line, len);\n    c->pos += len;\n    c->buf[c->pos++] = '\\n';\n}\n\nchar *amy_dump_state_to_string(int *out_len) {\n    int cap = 16384;\n    char *buf = (char *)malloc_caps(cap, amy_global.config.ram_caps_sysex);\n    if (!buf) { *out_len = 0; return NULL; }\n    _string_ctx ctx = { buf, 0, cap };\n    amy_emit_state_lines(_dump_string_cb, &ctx);\n    buf[ctx.pos] = '\\0';\n    *out_len = ctx.pos;\n    return buf;\n}\n\n// Max base64 chars per sysex chunk. Empirically Chrome's Web MIDI has trouble\n// delivering sysex messages above a few KB reliably, so we split large dumps\n// into multiple smaller sysex frames. 1024 base64 chars → ~1030-byte sysex\n// frame including header/footer, well within the \"reliably delivered\" band.\n#define ZDUMP_CHUNK_B64_MAX 1024\n\n// Raw bytes per streamed chunk. 768 = 3 * 256 → exactly 1024 base64 chars with\n// no padding, so non-final chunks can be concatenated on the receiver and\n// decoded as one base64 string. Only the final chunk may emit '=' padding\n// (which is fine: it's appended last).\n#define ZDUMP_STREAM_RAW_CHUNK 768\n\n// Streaming sysex dump state. Lets amy_dump_state_to_sysex and\n// amy_dump_file_to_sysex produce arbitrarily-large dumps without holding the\n// whole payload in RAM. Each ZDUMP_STREAM_RAW_CHUNK bytes of raw data is\n// base64-encoded and emitted as one sysex frame (marker 'C' if more follow,\n// 'E' or '0' on the last frame). The effective upper bound is now the\n// web-side reassembler's SYSEX_REASM_MAX rather than MAX_SYSEX_BYTES.\ntypedef struct {\n    uint8_t *raw_buf;     // ZDUMP_STREAM_RAW_CHUNK-byte raw accumulator\n    int raw_pos;          // current fill of raw_buf\n    uint8_t *enc;         // base64 scratch: b64(raw_buf)\n    uint8_t *frame;       // sysex frame scratch: F0 00 03 45 <marker> <b64...> F7\n    int frames_sent;\n    int bytes_sent;       // raw bytes drained so far, for logging\n    bool ok;\n} _zdump_stream;\n\nstatic int _zdump_stream_init(_zdump_stream *c) {\n    c->raw_buf = NULL;\n    c->enc = NULL;\n    c->frame = NULL;\n    c->raw_pos = 0;\n    c->frames_sent = 0;\n    c->bytes_sent = 0;\n    c->ok = false;\n    c->raw_buf = (uint8_t *)malloc_caps(ZDUMP_STREAM_RAW_CHUNK, amy_global.config.ram_caps_sysex);\n    c->enc     = (uint8_t *)malloc_caps(ZDUMP_CHUNK_B64_MAX + 4, amy_global.config.ram_caps_sysex);\n    c->frame   = (uint8_t *)malloc_caps(ZDUMP_CHUNK_B64_MAX + 6, amy_global.config.ram_caps_sysex);\n    if (!c->raw_buf || !c->enc || !c->frame) {\n        fprintf(stderr, \"zD: stream init malloc failed (raw=%p enc=%p frame=%p)\\n\",\n                (void *)c->raw_buf, (void *)c->enc, (void *)c->frame);\n        return -1;\n    }\n    c->ok = true;\n    return 0;\n}\n\nstatic void _zdump_stream_destroy(_zdump_stream *c) {\n    if (c->raw_buf) { free(c->raw_buf); c->raw_buf = NULL; }\n    if (c->enc)     { free(c->enc);     c->enc = NULL; }\n    if (c->frame)   { free(c->frame);   c->frame = NULL; }\n    c->ok = false;\n}\n\n// Emit one sysex frame carrying b64(raw_buf[0..raw_pos]). If is_last is false\n// the marker is 'C' (more frames follow); otherwise it's 'E' when we've\n// already sent at least one frame, or '0' for a single-frame dump.\nstatic void _zdump_stream_drain(_zdump_stream *c, bool is_last) {\n    if (!c->ok) return;\n    uint8_t marker;\n    if (is_last) {\n        marker = (c->frames_sent == 0) ? '0' : 'E';\n    } else {\n        marker = 'C';\n    }\n    b64_buffer_t bb = { (char *)c->enc, 1 };\n    b64_encode(c->raw_buf, &bb, (size_t)c->raw_pos);\n    int enc_len = (int)strlen((char *)c->enc);\n    c->frame[0] = 0xF0;\n    c->frame[1] = 0x00;\n    c->frame[2] = 0x03;\n    c->frame[3] = 0x45;\n    c->frame[4] = marker;\n    memcpy(c->frame + 5, c->enc, enc_len);\n    c->frame[5 + enc_len] = 0xF7;\n    midi_out(c->frame, 6 + enc_len);\n    c->bytes_sent += c->raw_pos;\n    c->frames_sent++;\n    c->raw_pos = 0;\n}\n\n// Append `len` bytes from `data` to the raw accumulator, draining as 'C'\n// frames whenever the accumulator is full and more data arrives. The last\n// (possibly partial) chunk is held until _zdump_stream_finish is called.\nstatic void _zdump_stream_write(_zdump_stream *c, const uint8_t *data, int len) {\n    if (!c->ok) return;\n    while (len > 0) {\n        if (c->raw_pos == ZDUMP_STREAM_RAW_CHUNK) {\n            _zdump_stream_drain(c, false);\n        }\n        int space = ZDUMP_STREAM_RAW_CHUNK - c->raw_pos;\n        int take = len < space ? len : space;\n        memcpy(c->raw_buf + c->raw_pos, data, take);\n        c->raw_pos += take;\n        data += take;\n        len -= take;\n    }\n}\n\n// Emit any buffered data as the final frame. Always emits at least one frame\n// so the receiver sees a well-formed '0' (empty-payload) dump response for\n// empty inputs.\nstatic void _zdump_stream_finish(_zdump_stream *c) {\n    if (!c->ok) return;\n    _zdump_stream_drain(c, true);\n}\n\n// amy_emit_state_lines callback: forward each wire-command line (plus '\\n')\n// into the stream.\nstatic void _zdump_state_line_cb(const char *line, int len, void *ctx) {\n    _zdump_stream *c = (_zdump_stream *)ctx;\n    _zdump_stream_write(c, (const uint8_t *)line, len);\n    uint8_t nl = '\\n';\n    _zdump_stream_write(c, &nl, 1);\n}\n\nvoid amy_dump_state_to_sysex(void) {\n    if (!amy_global.config.midi) return;\n    sequencer_midi_stop();\n    _zdump_stream stream;\n    if (_zdump_stream_init(&stream) != 0) {\n        sequencer_midi_start();\n        return;\n    }\n    amy_emit_state_lines(_zdump_state_line_cb, &stream);\n    _zdump_stream_finish(&stream);\n    _zdump_stream_destroy(&stream);\n    sequencer_midi_start();\n}\n\nvoid amy_dump_file_to_sysex(const char *filename) {\n    // Only meaningful on platforms with MIDI sysex output (hardware, emscripten).\n    // On desktop, midi_out can overflow its stack buffer with large sysex.\n    if (!amy_global.config.midi) return;\n    sequencer_midi_stop();\n    if (!amy_global.config.amy_external_fopen_hook ||\n        !amy_global.config.amy_external_fread_hook  ||\n        !amy_global.config.amy_external_fclose_hook) {\n        fprintf(stderr, \"zD: file I/O hooks unavailable\\n\");\n        sequencer_midi_start();\n        return;\n    }\n    uint32_t fh = amy_global.config.amy_external_fopen_hook((char *)filename, \"r\");\n    if (!fh) {\n        fprintf(stderr, \"zD: could not open '%s'\\n\", filename);\n        sequencer_midi_start();\n        return;\n    }\n    _zdump_stream stream;\n    if (_zdump_stream_init(&stream) != 0) {\n        amy_global.config.amy_external_fclose_hook(fh);\n        sequencer_midi_start();\n        return;\n    }\n    uint8_t *read_buf = (uint8_t *)malloc_caps(ZDUMP_STREAM_RAW_CHUNK, amy_global.config.ram_caps_sysex);\n    if (!read_buf) {\n        fprintf(stderr, \"zD: malloc read_buf(%d) FAILED\\n\", ZDUMP_STREAM_RAW_CHUNK);\n        _zdump_stream_destroy(&stream);\n        amy_global.config.amy_external_fclose_hook(fh);\n        sequencer_midi_start();\n        return;\n    }\n    while (1) {\n        uint32_t n = amy_global.config.amy_external_fread_hook(fh, read_buf, ZDUMP_STREAM_RAW_CHUNK);\n        if (n == 0) break;\n        _zdump_stream_write(&stream, read_buf, (int)n);\n    }\n    free(read_buf);\n    _zdump_stream_finish(&stream);\n    _zdump_stream_destroy(&stream);\n    amy_global.config.amy_external_fclose_hook(fh);\n    sequencer_midi_start();\n}\n\n// ── End state dump helpers ──────────────────────────────────────────────────\n\nvoid transfer_init() {\n    #ifdef __EMSCRIPTEN__\n\n    #endif\n\n #if defined(_POSIX_VERSION) \n    amy_global.config.amy_external_fopen_hook = posix_external_fopen_hook;\n    amy_global.config.amy_external_fread_hook = posix_external_fread_hook;\n    amy_global.config.amy_external_fwrite_hook = posix_external_fwrite_hook;\n    amy_global.config.amy_external_fclose_hook = posix_external_fclose_hook;\n    amy_global.config.amy_external_fseek_hook = posix_external_fseek_hook;\n#endif\n}\n\nstatic uint16_t read_u16_le(const uint8_t *buf) {\n    return (uint16_t)buf[0] | ((uint16_t)buf[1] << 8);\n}\n\nstatic uint32_t read_u32_le(const uint8_t *buf) {\n    return (uint32_t)buf[0] | ((uint32_t)buf[1] << 8) |\n                  ((uint32_t)buf[2] << 16) | ((uint32_t)buf[3] << 24);\n}\n\nstatic int read_exact(uint32_t handle, uint8_t *buf, uint32_t len) {\n    if (amy_global.config.amy_external_fread_hook == NULL) {\n        return 0;\n    }\n    uint32_t offset = 0;\n    while (offset < len) {\n        uint32_t got = amy_global.config.amy_external_fread_hook(handle, buf + offset, len - offset);\n        if (got == 0) {\n            return 0;\n        }\n        offset += got;\n    }\n    return 1;\n}\n\nstatic int skip_bytes(uint32_t handle, uint32_t len) {\n    uint8_t scratch[64];\n    while (len > 0) {\n        uint32_t chunk = len > sizeof(scratch) ? sizeof(scratch) : len;\n        if (!read_exact(handle, scratch, chunk)) {\n            return 0;\n        }\n        len -= chunk;\n    }\n    return 1;\n}\n\nint wave_parse_header(uint32_t handle, wave_info_t *info, uint32_t *data_bytes) {\n    if (info == NULL || data_bytes == NULL) {\n        return 0;\n    }\n    uint8_t riff_header[12];\n    if (!read_exact(handle, riff_header, sizeof(riff_header))) {\n        return 0;\n    }\n    if (memcmp(riff_header, \"RIFF\", 4) != 0 || memcmp(riff_header + 8, \"WAVE\", 4) != 0) {\n        return 0;\n    }\n    uint8_t fmt_found = 0;\n    wave_info_t tmp_info = {0};\n    while (1) {\n        uint8_t chunk_header[8];\n        if (!read_exact(handle, chunk_header, sizeof(chunk_header))) {\n            return 0;\n        }\n        uint32_t chunk_size = read_u32_le(chunk_header + 4);\n        if (memcmp(chunk_header, \"fmt \", 4) == 0) {\n            if (chunk_size < 16) {\n                return 0;\n            }\n            uint8_t fmt_chunk[16];\n            if (!read_exact(handle, fmt_chunk, sizeof(fmt_chunk))) {\n                return 0;\n            }\n            uint16_t audio_format = read_u16_le(fmt_chunk);\n            tmp_info.channels = read_u16_le(fmt_chunk + 2);\n            tmp_info.sample_rate = read_u32_le(fmt_chunk + 4);\n            if (audio_format != 1 || tmp_info.channels == 0 || tmp_info.channels > 2) {\n                return 0;\n            }\n            if (!skip_bytes(handle, chunk_size - sizeof(fmt_chunk))) {\n                return 0;\n            }\n            if (chunk_size & 1) {\n                if (!skip_bytes(handle, 1)) {\n                    return 0;\n                }\n            }\n            fmt_found = 1;\n            continue;\n        }\n        if (memcmp(chunk_header, \"data\", 4) == 0) {\n            if (!fmt_found) {\n                return 0;\n            }\n            *info = tmp_info;\n            *data_bytes = chunk_size;\n            return 1;\n        }\n        if (!skip_bytes(handle, chunk_size)) {\n            return 0;\n        }\n        if (chunk_size & 1) {\n            if (!skip_bytes(handle, 1)) {\n                return 0;\n            }\n        }\n    }\n    return 0;\n}\nuint32_t wave_read_pcm_frames_s16(uint32_t handle, uint16_t channels, \n        uint32_t *bytes_remaining, int16_t *dest, uint32_t max_frames) {\n    if (dest == NULL || bytes_remaining == 0 || channels == 0 || channels > 2) {\n        return 0;\n    }\n    uint32_t bytes_per_frame = channels * 2;\n    if (*bytes_remaining < bytes_per_frame) {\n        return 0;\n    }\n    uint32_t max_bytes = max_frames * bytes_per_frame;\n    if (max_bytes > *bytes_remaining) {\n        max_bytes = *bytes_remaining - (*bytes_remaining % bytes_per_frame);\n    }\n    uint32_t frames_to_read = max_bytes / bytes_per_frame;\n    if (frames_to_read == 0) {\n        return 0;\n    }\n    uint8_t raw_buf[(AMY_BLOCK_SIZE * PCM_FILE_BUFFER_MULT + 1) * 4];\n    if (max_bytes > sizeof(raw_buf)) {\n        max_bytes = sizeof(raw_buf) - (sizeof(raw_buf) % bytes_per_frame);\n        frames_to_read = max_bytes / bytes_per_frame;\n    }\n    if (amy_global.config.amy_external_fread_hook == NULL) {\n        return 0;\n    }\n    uint32_t got = amy_global.config.amy_external_fread_hook(handle, raw_buf, max_bytes);\n    got -= got % bytes_per_frame;\n    if (got == 0) {\n        return 0;\n    }\n    frames_to_read = got / bytes_per_frame;\n    *bytes_remaining -= got;\n    if (channels == 1) {\n        for (uint32_t i = 0; i < frames_to_read; i++) {\n            dest[i] = (int16_t)read_u16_le(raw_buf + i * 2);\n        }\n    } else {\n        for (uint32_t i = 0; i < frames_to_read; i++) {\n            dest[i * 2] = (int16_t)read_u16_le(raw_buf + i * 4);\n            dest[i * 2 + 1] = (int16_t)read_u16_le(raw_buf + i * 4 + 2);\n        }\n    }\n    return frames_to_read;\n}\n"
  },
  {
    "path": "src/transfer.h",
    "content": "// transfer.h\n// data transfer over AMY messages\n// b64 stuff from https://github.com/jwerle/b64.c\n\n// bytes -> b64 length: 4 * n / 3 gives unpadded length.\n// ((4 * n / 3) + 3) & ~3 gives padded length \n\n// so if max AMY message is 255 chars, 252 bytes of b64 is max = 189 bytes of pcm \n\n#ifndef TRANSFER_H\n#define TRANSFER_H 1\n#include <stdint.h>\n#include \"amy.h\"\n\n\n#define MAX_OPEN_FILES 64\n#define HANDLE_INVALID 0\n\ntypedef struct b64_buffer {\n    char * ptr;\n    int bufc;\n} b64_buffer_t;\n\nvoid transfer_init();\n\ntypedef struct {\n    uint16_t channels;\n    uint32_t sample_rate;\n} wave_info_t;\n\nint wave_parse_header(uint32_t handle, wave_info_t *info, uint32_t *data_bytes);\nuint32_t wave_read_pcm_frames_s16(uint32_t handle, uint16_t channels,\n                                  uint32_t *bytes_remaining, int16_t *dest, uint32_t max_frames);\n\n // How much memory to allocate per buffer\n#define B64_BUFFER_SIZE     (256)\n\n // Start buffered memory\nint b64_buf_malloc(b64_buffer_t * buffer);\n\n\n/**\n * Base64 index table.\n */\n\nstatic const char b64_table[] = {\n  'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',\n  'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',\n  'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',\n  'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',\n  'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',\n  'o', 'p', 'q', 'r', 's', 't', 'u', 'v',\n  'w', 'x', 'y', 'z', '0', '1', '2', '3',\n  '4', '5', '6', '7', '8', '9', '+', '/'\n};\n\nvoid start_receiving_transfer(uint32_t length, uint8_t * storage);\nvoid start_receiving_file_transfer(uint32_t length, const char *filename);\nvoid parse_transfer_message(char * message, uint16_t len) ;\nvoid start_receiving_sample(uint32_t frames, uint8_t bus, int16_t *storage);\nvoid stop_receiving_sample();\n\n// State dump functions (used by zD wire command in parse.c)\nvoid amy_dump_state_to_sysex(void);\nvoid amy_dump_file_to_sysex(const char *filename);\nchar *amy_dump_state_to_string(int *out_len);\n\n\n\n/**\n * Encode `unsigned char *' source with `size_t' size.\n * Returns a `char *' base64 encoded string.\n */\n\nchar * b64_encode (const unsigned char *src, b64_buffer_t * encbuf, size_t len);\n\n\n/**\n * Decode `char *' source with `size_t' size.\n * Returns a `unsigned char *' base64 decoded string + size of decoded string.\n */\nunsigned char *\nb64_decode_ex (const char *, size_t, b64_buffer_t * decbuf, size_t *);\n\n#endif\n"
  },
  {
    "path": "src/triangle_lutset_fxpt.h",
    "content": "// Automatically-generated LUTset\n#ifndef LUTSET_TRIANGLE_FXPT_DEFINED\n#define LUTSET_TRIANGLE_FXPT_DEFINED\n\n#ifndef LUTENTRY_FXPT_DEFINED\n#define LUTENTRY_FXPT_DEFINED\ntypedef struct {\n    const int16_t *table;\n    int table_size;\n    int log_2_table_size;\n    int highest_harmonic;\n    float scale_factor;\n} lut_entry_fxpt;\n#endif // LUTENTRY_FXPT_DEFINED\n\nconst int16_t triangle_fxpt_lutable_0[512] PROGMEM = {\n0,255,512,771,1031,1290,1549,1806,\n2061,2316,2573,2832,3092,3352,3610,3867,\n4122,4377,4634,4893,5153,5413,5671,5928,\n6183,6438,6695,6954,7214,7474,7732,7989,\n8244,8499,8756,9015,9275,9535,9794,10050,\n10305,10560,10817,11076,11336,11596,11855,12111,\n12366,12621,12878,13136,13397,13657,13916,14173,\n14427,14682,14938,15197,15458,15719,15978,16234,\n16488,16743,16999,17258,17519,17780,18039,18295,\n18549,18803,19059,19319,19580,19842,20101,20357,\n20610,20864,21120,21379,21641,21903,22163,22418,\n22671,22924,23180,23440,23703,23966,24225,24480,\n24732,24984,25239,25499,25764,26028,26289,26543,\n26793,27042,27297,27559,27826,28093,28354,28606,\n28852,29098,29352,29616,29889,30162,30425,30672,\n30907,31143,31394,31672,31971,32268,32527,32705,\n32767,32705,32527,32268,31971,31672,31394,31143,\n30907,30672,30425,30162,29889,29616,29352,29098,\n28852,28606,28354,28093,27826,27559,27297,27042,\n26793,26543,26289,26028,25764,25499,25239,24984,\n24732,24480,24225,23966,23703,23440,23180,22924,\n22671,22418,22163,21903,21641,21379,21120,20864,\n20610,20357,20101,19842,19580,19319,19059,18803,\n18549,18295,18039,17780,17519,17258,16999,16743,\n16488,16234,15978,15719,15458,15197,14938,14682,\n14427,14173,13916,13657,13397,13136,12878,12621,\n12366,12111,11855,11596,11336,11076,10817,10560,\n10305,10050,9794,9535,9275,9015,8756,8499,\n8244,7989,7732,7474,7214,6954,6695,6438,\n6183,5928,5671,5413,5153,4893,4634,4377,\n4122,3867,3610,3352,3092,2832,2573,2316,\n2061,1806,1549,1290,1031,771,512,255,\n0,-255,-512,-771,-1031,-1290,-1549,-1806,\n-2061,-2316,-2573,-2832,-3092,-3352,-3610,-3867,\n-4122,-4377,-4634,-4893,-5153,-5413,-5671,-5928,\n-6183,-6438,-6695,-6954,-7214,-7474,-7732,-7989,\n-8244,-8499,-8756,-9015,-9275,-9535,-9794,-10050,\n-10305,-10560,-10817,-11076,-11336,-11596,-11855,-12111,\n-12366,-12621,-12878,-13136,-13397,-13657,-13916,-14173,\n-14427,-14682,-14938,-15197,-15458,-15719,-15978,-16234,\n-16488,-16743,-16999,-17258,-17519,-17780,-18039,-18295,\n-18549,-18803,-19059,-19319,-19580,-19842,-20101,-20357,\n-20610,-20864,-21120,-21379,-21641,-21903,-22163,-22418,\n-22671,-22924,-23180,-23440,-23703,-23966,-24225,-24480,\n-24732,-24984,-25239,-25499,-25764,-26028,-26289,-26543,\n-26793,-27042,-27297,-27559,-27826,-28093,-28354,-28606,\n-28852,-29098,-29352,-29616,-29889,-30162,-30425,-30672,\n-30907,-31143,-31394,-31672,-31971,-32268,-32527,-32705,\n-32768,-32705,-32527,-32268,-31971,-31672,-31394,-31143,\n-30907,-30672,-30425,-30162,-29889,-29616,-29352,-29098,\n-28852,-28606,-28354,-28093,-27826,-27559,-27297,-27042,\n-26793,-26543,-26289,-26028,-25764,-25499,-25239,-24984,\n-24732,-24480,-24225,-23966,-23703,-23440,-23180,-22924,\n-22671,-22418,-22163,-21903,-21641,-21379,-21120,-20864,\n-20610,-20357,-20101,-19842,-19580,-19319,-19059,-18803,\n-18549,-18295,-18039,-17780,-17519,-17258,-16999,-16743,\n-16488,-16234,-15978,-15719,-15458,-15197,-14938,-14682,\n-14427,-14173,-13916,-13657,-13397,-13136,-12878,-12621,\n-12366,-12111,-11855,-11596,-11336,-11076,-10817,-10560,\n-10305,-10050,-9794,-9535,-9275,-9015,-8756,-8499,\n-8244,-7989,-7732,-7474,-7214,-6954,-6695,-6438,\n-6183,-5928,-5671,-5413,-5153,-4893,-4634,-4377,\n-4122,-3867,-3610,-3352,-3092,-2832,-2573,-2316,\n-2061,-1806,-1549,-1290,-1031,-771,-512,-255,\n};\n\nconst int16_t triangle_fxpt_lutable_1[512] PROGMEM = {\n0,255,511,768,1028,1289,1551,1813,\n2073,2332,2589,2844,3099,3354,3611,3869,\n4129,4391,4653,4915,5175,5433,5689,5944,\n6198,6454,6711,6970,7231,7493,7755,8016,\n8276,8533,8788,9043,9297,9553,9811,10071,\n10332,10595,10857,11118,11377,11633,11888,12142,\n12396,12652,12911,13172,13434,13697,13959,14220,\n14477,14733,14987,15240,15495,15752,16011,16273,\n16537,16800,17062,17322,17578,17832,18085,18338,\n18593,18851,19112,19375,19640,19904,20165,20424,\n20679,20931,21183,21435,21691,21950,22213,22478,\n22744,23008,23269,23526,23779,24029,24278,24530,\n24787,25048,25314,25583,25851,26116,26376,26629,\n26877,27123,27369,27621,27879,28146,28419,28694,\n28967,29233,29488,29733,29969,30202,30441,30692,\n30961,31248,31549,31853,32141,32396,32596,32724,\n32767,32724,32596,32396,32141,31853,31549,31248,\n30961,30692,30441,30202,29969,29733,29488,29233,\n28967,28694,28419,28146,27879,27621,27369,27123,\n26877,26629,26376,26116,25851,25583,25314,25048,\n24787,24530,24278,24029,23779,23526,23269,23008,\n22744,22478,22213,21950,21691,21435,21183,20931,\n20679,20424,20165,19904,19640,19375,19112,18851,\n18593,18338,18085,17832,17578,17322,17062,16800,\n16537,16273,16011,15752,15495,15240,14987,14733,\n14477,14220,13959,13697,13434,13172,12911,12652,\n12396,12142,11888,11633,11377,11118,10857,10595,\n10332,10071,9811,9553,9297,9043,8788,8533,\n8276,8016,7755,7493,7231,6970,6711,6454,\n6198,5944,5689,5433,5175,4915,4653,4391,\n4129,3869,3611,3354,3099,2844,2589,2332,\n2073,1813,1551,1289,1028,768,511,255,\n0,-255,-511,-768,-1028,-1289,-1551,-1813,\n-2073,-2332,-2589,-2844,-3099,-3354,-3611,-3869,\n-4129,-4391,-4653,-4915,-5175,-5433,-5689,-5944,\n-6198,-6454,-6711,-6970,-7231,-7493,-7755,-8016,\n-8276,-8533,-8788,-9043,-9297,-9553,-9811,-10071,\n-10332,-10595,-10857,-11118,-11377,-11633,-11888,-12142,\n-12396,-12652,-12911,-13172,-13434,-13697,-13959,-14220,\n-14477,-14733,-14987,-15240,-15495,-15752,-16011,-16273,\n-16537,-16800,-17062,-17322,-17578,-17832,-18085,-18338,\n-18593,-18851,-19112,-19375,-19640,-19904,-20165,-20424,\n-20679,-20931,-21183,-21435,-21691,-21950,-22213,-22478,\n-22744,-23008,-23269,-23526,-23779,-24029,-24278,-24530,\n-24787,-25048,-25314,-25583,-25851,-26116,-26376,-26629,\n-26877,-27123,-27369,-27621,-27879,-28146,-28419,-28694,\n-28967,-29233,-29488,-29733,-29969,-30202,-30441,-30692,\n-30961,-31248,-31549,-31853,-32141,-32396,-32596,-32724,\n-32768,-32724,-32596,-32396,-32141,-31853,-31549,-31248,\n-30961,-30692,-30441,-30202,-29969,-29733,-29488,-29233,\n-28967,-28694,-28419,-28146,-27879,-27621,-27369,-27123,\n-26877,-26629,-26376,-26116,-25851,-25583,-25314,-25048,\n-24787,-24530,-24278,-24029,-23779,-23526,-23269,-23008,\n-22744,-22478,-22213,-21950,-21691,-21435,-21183,-20931,\n-20679,-20424,-20165,-19904,-19640,-19375,-19112,-18851,\n-18593,-18338,-18085,-17832,-17578,-17322,-17062,-16800,\n-16537,-16273,-16011,-15752,-15495,-15240,-14987,-14733,\n-14477,-14220,-13959,-13697,-13434,-13172,-12911,-12652,\n-12396,-12142,-11888,-11633,-11377,-11118,-10857,-10595,\n-10332,-10071,-9811,-9553,-9297,-9043,-8788,-8533,\n-8276,-8016,-7755,-7493,-7231,-6970,-6711,-6454,\n-6198,-5944,-5689,-5433,-5175,-4915,-4653,-4391,\n-4129,-3869,-3611,-3354,-3099,-2844,-2589,-2332,\n-2073,-1813,-1551,-1289,-1028,-768,-511,-255,\n};\n\nconst int16_t triangle_fxpt_lutable_2[256] PROGMEM = {\n0,509,1024,1546,2074,2602,3125,3639,\n4148,4657,5172,5695,6223,6751,7274,7788,\n8297,8805,9320,9843,10372,10901,11424,11938,\n12445,12952,13466,13990,14521,15051,15575,16088,\n16593,17098,17612,18137,18670,19203,19727,20239,\n20740,21242,21755,22282,22820,23358,23884,24392,\n24886,25381,25891,26424,26974,27523,28052,28550,\n29023,29496,30002,30561,31163,31762,32283,32641,\n32767,32641,32283,31762,31163,30561,30002,29496,\n29023,28550,28052,27523,26974,26424,25891,25381,\n24886,24392,23884,23358,22820,22282,21755,21242,\n20740,20239,19727,19203,18670,18137,17612,17098,\n16593,16088,15575,15051,14521,13990,13466,12952,\n12445,11938,11424,10901,10372,9843,9320,8805,\n8297,7788,7274,6751,6223,5695,5172,4657,\n4148,3639,3125,2602,2074,1546,1024,509,\n0,-509,-1024,-1546,-2074,-2602,-3125,-3639,\n-4148,-4657,-5172,-5695,-6223,-6751,-7274,-7788,\n-8297,-8805,-9320,-9843,-10372,-10901,-11424,-11938,\n-12445,-12952,-13466,-13990,-14521,-15051,-15575,-16088,\n-16593,-17098,-17612,-18137,-18670,-19203,-19727,-20239,\n-20740,-21242,-21755,-22282,-22820,-23358,-23884,-24392,\n-24886,-25381,-25891,-26424,-26974,-27523,-28052,-28550,\n-29023,-29496,-30002,-30561,-31163,-31762,-32283,-32641,\n-32768,-32641,-32283,-31762,-31163,-30561,-30002,-29496,\n-29023,-28550,-28052,-27523,-26974,-26424,-25891,-25381,\n-24886,-24392,-23884,-23358,-22820,-22282,-21755,-21242,\n-20740,-20239,-19727,-19203,-18670,-18137,-17612,-17098,\n-16593,-16088,-15575,-15051,-14521,-13990,-13466,-12952,\n-12445,-11938,-11424,-10901,-10372,-9843,-9320,-8805,\n-8297,-7788,-7274,-6751,-6223,-5695,-5172,-4657,\n-4148,-3639,-3125,-2602,-2074,-1546,-1024,-509,\n};\n\nconst int16_t triangle_fxpt_lutable_3[256] PROGMEM = {\n0,536,1068,1593,2109,2620,3126,3634,\n4146,4666,5194,5729,6266,6801,7331,7853,\n8366,8873,9379,9887,10401,10924,11456,11994,\n12533,13068,13596,14114,14623,15125,15628,16135,\n16652,17181,17719,18262,18805,19341,19866,20377,\n20877,21371,21868,22375,22897,23435,23987,24543,\n25095,25632,26148,26641,27117,27588,28069,28576,\n29119,29700,30307,30920,31503,32017,32421,32679,\n32767,32679,32421,32017,31503,30920,30307,29700,\n29119,28576,28069,27588,27117,26641,26148,25632,\n25095,24543,23987,23435,22897,22375,21868,21371,\n20877,20377,19866,19341,18805,18262,17719,17181,\n16652,16135,15628,15125,14623,14114,13596,13068,\n12533,11994,11456,10924,10401,9887,9379,8873,\n8366,7853,7331,6801,6266,5729,5194,4666,\n4146,3634,3126,2620,2109,1593,1068,536,\n0,-536,-1068,-1593,-2109,-2620,-3126,-3634,\n-4146,-4666,-5194,-5729,-6266,-6801,-7331,-7853,\n-8366,-8873,-9379,-9887,-10401,-10924,-11456,-11994,\n-12533,-13068,-13596,-14114,-14623,-15125,-15628,-16135,\n-16652,-17181,-17719,-18262,-18805,-19341,-19866,-20377,\n-20877,-21371,-21868,-22375,-22897,-23435,-23987,-24543,\n-25095,-25632,-26148,-26641,-27117,-27588,-28069,-28576,\n-29119,-29700,-30307,-30920,-31503,-32017,-32421,-32679,\n-32768,-32679,-32421,-32017,-31503,-30920,-30307,-29700,\n-29119,-28576,-28069,-27588,-27117,-26641,-26148,-25632,\n-25095,-24543,-23987,-23435,-22897,-22375,-21868,-21371,\n-20877,-20377,-19866,-19341,-18805,-18262,-17719,-17181,\n-16652,-16135,-15628,-15125,-14623,-14114,-13596,-13068,\n-12533,-11994,-11456,-10924,-10401,-9887,-9379,-8873,\n-8366,-7853,-7331,-6801,-6266,-5729,-5194,-4666,\n-4146,-3634,-3126,-2620,-2109,-1593,-1068,-536,\n};\n\nconst int16_t triangle_fxpt_lutable_4[128] PROGMEM = {\n0,1013,2048,3115,4204,5292,6358,7392,\n8402,9412,10446,11516,12612,13707,14775,15803,\n16801,17799,18830,19910,21027,22144,23217,24224,\n25180,26137,27162,28294,29514,30730,31786,32510,\n32767,32510,31786,30730,29514,28294,27162,26137,\n25180,24224,23217,22144,21027,19910,18830,17799,\n16801,15803,14775,13707,12612,11516,10446,9412,\n8402,7392,6358,5292,4204,3115,2048,1013,\n0,-1013,-2048,-3115,-4204,-5292,-6358,-7392,\n-8402,-9412,-10446,-11516,-12612,-13707,-14775,-15803,\n-16801,-17799,-18830,-19910,-21027,-22144,-23217,-24224,\n-25180,-26137,-27162,-28294,-29514,-30730,-31786,-32510,\n-32768,-32510,-31786,-30730,-29514,-28294,-27162,-26137,\n-25180,-24224,-23217,-22144,-21027,-19910,-18830,-17799,\n-16801,-15803,-14775,-13707,-12612,-11516,-10446,-9412,\n-8402,-7392,-6358,-5292,-4204,-3115,-2048,-1013,\n};\n\nconst int16_t triangle_fxpt_lutable_5[128] PROGMEM = {\n0,1132,2248,3337,4393,5418,6422,7419,\n8427,9459,10526,11630,12763,13911,15054,16174,\n17255,18290,19282,20246,21204,22186,23216,24315,\n25488,26720,27979,29215,30363,31353,32118,32602,\n32767,32602,32118,31353,30363,29215,27979,26720,\n25488,24315,23216,22186,21204,20246,19282,18290,\n17255,16174,15054,13911,12763,11630,10526,9459,\n8427,7419,6422,5418,4393,3337,2248,1132,\n0,-1132,-2248,-3337,-4393,-5418,-6422,-7419,\n-8427,-9459,-10526,-11630,-12763,-13911,-15054,-16174,\n-17255,-18290,-19282,-20246,-21204,-22186,-23216,-24315,\n-25488,-26720,-27979,-29215,-30363,-31353,-32118,-32602,\n-32768,-32602,-32118,-31353,-30363,-29215,-27979,-26720,\n-25488,-24315,-23216,-22186,-21204,-20246,-19282,-18290,\n-17255,-16174,-15054,-13911,-12763,-11630,-10526,-9459,\n-8427,-7419,-6422,-5418,-4393,-3337,-2248,-1132,\n};\n\nconst int16_t triangle_fxpt_lutable_6[64] PROGMEM = {\n0,2005,4101,6327,8648,10968,13184,15247,\n17193,19142,21236,23561,26075,28578,30750,32238,\n32767,32238,30750,28578,26075,23561,21236,19142,\n17193,15247,13184,10968,8648,6327,4101,2005,\n0,-2005,-4101,-6327,-8648,-10968,-13184,-15247,\n-17193,-19142,-21236,-23561,-26075,-28578,-30750,-32238,\n-32768,-32238,-30750,-28578,-26075,-23561,-21236,-19142,\n-17193,-15247,-13184,-10968,-8648,-6327,-4101,-2005,\n};\n\nconst int16_t triangle_fxpt_lutable_7[64] PROGMEM = {\n0,2409,4743,6952,9023,10994,12935,14939,\n17087,19424,21935,24535,27074,29359,31182,32360,\n32767,32360,31182,29359,27074,24535,21935,19424,\n17087,14939,12935,10994,9023,6952,4743,2409,\n0,-2409,-4743,-6952,-9023,-10994,-12935,-14939,\n-17087,-19424,-21935,-24535,-27074,-29359,-31182,-32360,\n-32768,-32360,-31182,-29359,-27074,-24535,-21935,-19424,\n-17087,-14939,-12935,-10994,-9023,-6952,-4743,-2409,\n};\n\nconst int16_t triangle_fxpt_lutable_8[32] PROGMEM = {\n0,3933,8258,13171,18536,23882,28500,31649,\n32767,31649,28500,23882,18536,13171,8258,3933,\n0,-3933,-8258,-13171,-18536,-23882,-28500,-31649,\n-32768,-31649,-28500,-23882,-18536,-13171,-8258,-3933,\n};\n\nconst int16_t triangle_fxpt_lutable_9[16] PROGMEM = {\n0,12540,23170,30274,32767,30274,23170,12540,\n0,-12540,-23170,-30274,-32768,-30274,-23170,-12540,\n};\n\nconst int16_t triangle_fxpt_lutable_10[8] PROGMEM = {\n0,23170,32767,23170,0,-23170,-32768,-23170,\n};\n\nlut_entry_fxpt triangle_fxpt_lutset[12] = {\n    {triangle_fxpt_lutable_0, 512, 9, 63, 1.225889},\n    {triangle_fxpt_lutable_1, 512, 9, 44, 1.222339},\n    {triangle_fxpt_lutable_2, 256, 8, 31, 1.218081},\n    {triangle_fxpt_lutable_3, 256, 8, 22, 1.210989},\n    {triangle_fxpt_lutable_4, 128, 7, 15, 1.202491},\n    {triangle_fxpt_lutable_5, 128, 7, 10, 1.183865},\n    {triangle_fxpt_lutable_6, 64, 6, 7, 1.171519},\n    {triangle_fxpt_lutable_7, 64, 6, 5, 1.151111},\n    {triangle_fxpt_lutable_8, 32, 5, 3, 1.111111},\n    {triangle_fxpt_lutable_9, 16, 4, 2, 1.000000},\n    {triangle_fxpt_lutable_10, 8, 3, 1, 1.000000},\n    {NULL, 0, 0, 0, 0.0},\n};\n\n#endif // LUTSET_x_DEFINED\n"
  },
  {
    "path": "src/usb.c",
    "content": "// usb.c\n// tinyusb stuff\n\n#include \"amy.h\"\n\n#if defined(AMY_MCU) && (!defined(ARDUINO) || defined(AMYBOARD_ARDUINO))\n\n#define CONFIG_TOTAL_LEN_MIDI  (TUD_CONFIG_DESC_LEN + TUD_MIDI_DESC_LEN + TUD_CDC_DESC_LEN)\n\n// For AMYBOARD_ARDUINO, provide defaults for MicroPython-originated macros\n#ifdef AMYBOARD_ARDUINO\n\n#ifndef MICROPY_HW_USB_VID\n#define MICROPY_HW_USB_VID (0xCAF0)\n#endif\n#ifndef MICROPY_HW_USB_PID\n#define MICROPY_HW_USB_PID (0x0001)\n#endif\n#ifndef MICROPY_HW_USB_DESC_STR_MAX\n#define MICROPY_HW_USB_DESC_STR_MAX (32)\n#endif\n#ifndef MICROPY_HW_USB_MANUFACTURER_STRING\n#define MICROPY_HW_USB_MANUFACTURER_STRING \"AMYboard\"\n#endif\n#ifndef MICROPY_HW_USB_PRODUCT_FS_STRING\n#define MICROPY_HW_USB_PRODUCT_FS_STRING \"AMYboard\"\n#endif\n#ifndef MICROPY_HW_USB_CDC_INTERFACE_STRING\n#define MICROPY_HW_USB_CDC_INTERFACE_STRING \"AMYboard\"\n#endif\n#ifndef MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE\n#define MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE (0)\n#endif\n\n#ifndef MICROPY_HW_USB_MSC_INTERFACE_STRING\n#define MICROPY_HW_USB_MSC_INTERFACE_STRING \"AMYboard\"\n#endif\n\n#define USBD_STR_MANUF  (0x01)\n#define USBD_STR_PRODUCT (0x02)\n#define USBD_STR_SERIAL (0x03)\n#define USBD_STR_CDC    (0x04)\n#define USBD_STR_MSC    (0x05)\n\n#endif // AMYBOARD_ARDUINO\n\n#include \"usb.h\"\n#include \"tusb.h\"\n\n\n#define USBD_CDC_CMD_MAX_SIZE (8)\n#define USBD_CDC_IN_OUT_MAX_SIZE ((CFG_TUD_MAX_SPEED == OPT_MODE_HIGH_SPEED) ? 512 : 64)\n\nconst tusb_desc_device_t amy_usbd_builtin_desc_dev = {\n    .bLength = sizeof(tusb_desc_device_t),\n    .bDescriptorType = TUSB_DESC_DEVICE,\n    .bcdUSB = 0x0200,\n    .bDeviceClass = TUSB_CLASS_MISC,\n    .bDeviceSubClass = MISC_SUBCLASS_COMMON,\n    .bDeviceProtocol = MISC_PROTOCOL_IAD,\n    .bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,\n    .idVendor = MICROPY_HW_USB_VID,\n    .idProduct = MICROPY_HW_USB_PID,\n    .bcdDevice = 0x0100,\n    .iManufacturer = USBD_STR_MANUF,\n    .iProduct = USBD_STR_PRODUCT,\n    .iSerialNumber = USBD_STR_SERIAL,\n    .bNumConfigurations = 1,\n};\n\n\nenum\n{\n    ITF_NUM_CDC            = 0,\n    ITF_NUM_CDC_DATA,\n    ITF_NUM_MIDI,\n    ITF_NUM_MIDI_STREAMING,\n    ITF_NUM_TOTAL\n};\n\n\n#define EPNUM_CDC_NOTIF 0x81\n#define EPNUM_CDC_OUT   0x02\n#define EPNUM_CDC_IN    0x82\n#define EPNUM_MIDI   0x04\n\nconst uint8_t amy_usbd_builtin_desc_cfg[CONFIG_TOTAL_LEN_MIDI] = {\n    // Config number, interface count, string index, total length, attribute, power in mA\n    TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN_MIDI, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100),\n\n    // Interface number, string index, EP Out & EP In address, EP size\n    TUD_CDC_DESCRIPTOR(ITF_NUM_CDC, 4, EPNUM_CDC_NOTIF,\n        8, EPNUM_CDC_OUT, EPNUM_CDC_IN, 64),\n\n    TUD_MIDI_DESCRIPTOR(ITF_NUM_MIDI, 0, EPNUM_MIDI, 0x80 | EPNUM_MIDI, 64),\n\n};\n\nconst uint16_t *tud_descriptor_string_cb(uint8_t index, uint16_t langid) {\n    char serial_buf[MICROPY_HW_USB_DESC_STR_MAX + 1]; // Includes terminating NUL byte\n    static uint16_t desc_wstr[MICROPY_HW_USB_DESC_STR_MAX + 1]; // Includes prefix uint16_t\n    const char *desc_str = NULL;\n    uint16_t desc_len;\n\n    #if MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE\n    desc_str = amy_usbd_runtime_string_cb(index);\n    #endif\n\n    if (index == 0) {\n        // String descriptor 0 is special, see USB 2.0 section 9.6.7 String\n        //\n        // Expect any runtime value in desc_str to be a fully formed descriptor\n        if (desc_str == NULL) {\n            desc_str = \"\\x04\\x03\\x09\\x04\"; // Descriptor for \"English\"\n        }\n        if (desc_str[0] < sizeof(desc_wstr)) {\n            memcpy(desc_wstr, desc_str, desc_str[0]);\n            return desc_wstr;\n        }\n        return NULL; // Descriptor length too long (or malformed), stall endpoint\n    }\n\n    // Otherwise, generate a \"UNICODE\" string descriptor from the C string\n\n    if (desc_str == NULL) {\n        // Fall back to the \"static\" string\n        switch (index) {\n            case USBD_STR_SERIAL:\n                amy_usbd_port_get_serial_number(serial_buf);\n                desc_str = serial_buf;\n                break;\n            case USBD_STR_MANUF:\n                desc_str = MICROPY_HW_USB_MANUFACTURER_STRING;\n                break;\n            case USBD_STR_PRODUCT:\n                desc_str = MICROPY_HW_USB_PRODUCT_FS_STRING;\n                break;\n            #if CFG_TUD_CDC\n            case USBD_STR_CDC:\n                desc_str = MICROPY_HW_USB_CDC_INTERFACE_STRING;\n                break;\n            #endif\n            #if CFG_TUD_MSC\n            case USBD_STR_MSC:\n                desc_str = MICROPY_HW_USB_MSC_INTERFACE_STRING;\n                break;\n            #endif\n            default:\n                break;\n        }\n    }\n\n    if (desc_str == NULL) {\n        return NULL; // No string, STALL the endpoint\n    }\n\n    // Convert from narrow string to wide string\n    desc_len = 2;\n    for (int i = 0; i < MICROPY_HW_USB_DESC_STR_MAX && desc_str[i] != 0; i++) {\n        desc_wstr[1 + i] = desc_str[i];\n        desc_len += 2;\n    }\n\n    // first byte is length (including header), second byte is string type\n    desc_wstr[0] = (TUSB_DESC_STRING << 8) | desc_len;\n\n    return desc_wstr;\n}\n\n\n#ifdef AMYBOARD_ARDUINO\n\n#include \"esp_mac.h\"\n#include \"esp32-hal-tinyusb.h\"\n\n// Override Arduino's weak descriptor callbacks with amy's MIDI+CDC descriptors\nuint8_t const *tud_descriptor_device_cb(void) {\n    return (uint8_t const *)&amy_usbd_builtin_desc_dev;\n}\n\nuint8_t const *tud_descriptor_configuration_cb(uint8_t index) {\n    (void)index;\n    return amy_usbd_builtin_desc_cfg;\n}\n\n// Provide serial number from ESP32 MAC address\nvoid amy_usbd_port_get_serial_number(char *buf) {\n    uint8_t mac[8];\n    esp_efuse_mac_get_default(mac);\n    amy_usbd_hex_str(buf, mac, sizeof(mac));\n}\n\nvoid amy_usbd_hex_str(char *out_str, const uint8_t *bytes, size_t bytes_len) {\n    for (size_t i = 0; i < bytes_len; i++) {\n        uint8_t b = bytes[i];\n        uint8_t hi = b >> 4;\n        uint8_t lo = b & 0x0F;\n        out_str[i * 2] = hi < 10 ? '0' + hi : 'A' + hi - 10;\n        out_str[i * 2 + 1] = lo < 10 ? '0' + lo : 'A' + lo - 10;\n    }\n    out_str[bytes_len * 2] = '\\0';\n}\n\nvoid amy_arduino_usb_setup(void) {\n    // Use Arduino's tinyusb_init which handles USB PHY setup, tusb_init(),\n    // and creates the TinyUSB device task. Our non-weak descriptor callbacks\n    // above ensure the host sees amy's MIDI+CDC descriptors.\n    tinyusb_device_config_t cfg = {\n        .vid = MICROPY_HW_USB_VID,\n        .pid = MICROPY_HW_USB_PID,\n        .product_name = MICROPY_HW_USB_PRODUCT_FS_STRING,\n        .manufacturer_name = MICROPY_HW_USB_MANUFACTURER_STRING,\n        .serial_number = \"\",\n        .fw_version = 0x0100,\n        .usb_version = 0x0200,\n        .usb_class = TUSB_CLASS_MISC,\n        .usb_subclass = MISC_SUBCLASS_COMMON,\n        .usb_protocol = MISC_PROTOCOL_IAD,\n        .usb_attributes = TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP,\n        .usb_power_ma = 100,\n        .webusb_enabled = false,\n        .webusb_url = \"\",\n    };\n    tinyusb_init(&cfg);\n}\n\n#endif // AMYBOARD_ARDUINO\n\n#endif // AMY_MCU"
  },
  {
    "path": "src/usb.h",
    "content": "// usb.h\n// tinyusb stuff\n\n#if defined(AMY_MCU) && (!defined(ARDUINO) || defined(AMYBOARD_ARDUINO))\n\n#include \"class/audio/audio.h\"\n#include \"class/midi/midi.h\"\n#include \"tusb.h\"\n#include \"device/dcd.h\"\n\n// Initialise TinyUSB device (MicroPython path only)\n#ifndef AMYBOARD_ARDUINO\nstatic inline void amy_usbd_init_tud(void) {\n    tusb_init();\n    tud_cdc_configure_fifo_t cfg = { .rx_persistent = 0, .tx_persistent = 1 };\n    tud_cdc_configure_fifo(&cfg);\n}\n\n// Run the TinyUSB device task\nvoid amy_usbd_task(void);\n\n// Schedule a call to mp_usbd_task(), even if no USB interrupt has occurred\nvoid amy_usbd_schedule_task(void);\n#endif\n\nextern void amy_usbd_port_get_serial_number(char *buf);\n\n// Most ports need to write a hexadecimal serial number from a byte array. This\n// is a helper function for this. out_str must be long enough to hold a string of total\n// length (2 * bytes_len + 1) (including NUL terminator).\nvoid amy_usbd_hex_str(char *out_str, const uint8_t *bytes, size_t bytes_len);\n\n// Built-in USB device and configuration descriptor values\nextern const tusb_desc_device_t amy_usbd_builtin_desc_dev;\nextern const uint8_t amy_usbd_builtin_desc_cfg[];\n\n#ifdef AMYBOARD_ARDUINO\n// Arduino: initialize TinyUSB with amy's MIDI+CDC descriptors\nvoid amy_arduino_usb_setup(void);\nvoid amy_usbd_port_get_serial_number(char *buf);\nvoid amy_usbd_hex_str(char *out_str, const uint8_t *bytes, size_t bytes_len);\n#else\nstatic inline void amy_usbd_init(void) {\n    mp_usbd_init_tud();\n}\n#endif\n\n#endif"
  },
  {
    "path": "valgrind.suppressions",
    "content": "{\n   libpulse_common\n   Memcheck:Leak\n   match-leak-kinds: reachable\n   ...\n   obj:/usr/lib/aarch64-linux-gnu/pulseaudio/libpulsecommon-16.1.so\n   ...\n}\n{\n   miniaudio_run\n   Memcheck:Leak\n   match-leak-kinds: reachable\n   ...\n   fun:miniaudio_run\n   ...\n}\n{\n   dlopen_catch_exception\n   Memcheck:Leak\n   match-leak-kinds: reachable\n   ...\n   fun:_dl_catch_exception\n   ...\n}\n{\n   pthread_create\n   Memcheck:Leak\n   match-leak-kinds: possible\n   ...\n   fun:pthread_create@@GLIBC_2.34\n   ...\n}\n"
  },
  {
    "path": "windows/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.10)\nproject(amy_sine C)\n\nset(CMAKE_C_STANDARD 11)\n\nset(AMY_SRC_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/../src\")\n\nset(AMY_SOURCES\n    ${AMY_SRC_DIR}/algorithms.c\n    ${AMY_SRC_DIR}/amy.c\n    ${AMY_SRC_DIR}/envelope.c\n    ${AMY_SRC_DIR}/examples.c\n    ${AMY_SRC_DIR}/parse.c\n    ${AMY_SRC_DIR}/filters.c\n    ${AMY_SRC_DIR}/oscillators.c\n    ${AMY_SRC_DIR}/pcm.c\n    ${AMY_SRC_DIR}/interp_partials.c\n    ${AMY_SRC_DIR}/custom.c\n    ${AMY_SRC_DIR}/delay.c\n    ${AMY_SRC_DIR}/log2_exp2.c\n    ${AMY_SRC_DIR}/patches.c\n    ${AMY_SRC_DIR}/transfer.c\n    ${AMY_SRC_DIR}/sequencer.c\n    ${AMY_SRC_DIR}/libminiaudio-audio.c\n    ${AMY_SRC_DIR}/instrument.c\n    ${AMY_SRC_DIR}/amy_midi.c\n    ${AMY_SRC_DIR}/api.c\n    ${AMY_SRC_DIR}/midi_mappings.c\n)\n\nadd_executable(amy_sine amy_sine.c ${AMY_SOURCES})\n\ntarget_include_directories(amy_sine PRIVATE ${AMY_SRC_DIR})\n\ntarget_compile_definitions(amy_sine PRIVATE AMY_WAVETABLE _CRT_SECURE_NO_WARNINGS)\n\nif(MSVC)\n    target_compile_options(amy_sine PRIVATE /O2 /W3 /std:c11)\nelse()\n    target_compile_options(amy_sine PRIVATE\n        -O3 -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter\n        -Wpointer-arith -Wno-float-conversion -Wno-missing-declarations\n    )\n    target_link_libraries(amy_sine PRIVATE m pthread)\nendif()\n"
  },
  {
    "path": "windows/README.md",
    "content": "# AMY on Windows\n\nA minimal example that plays a 440Hz sine wave using AMY on Windows.\n\n## Prerequisites\n\nInstall **Visual Studio Build Tools 2022** (free) with the C++ workload:\n\n```\nwinget install Microsoft.VisualStudio.2022.BuildTools --override \"--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive\"\n```\n\nOr download from https://visualstudio.microsoft.com/visual-cpp-build-tools/ and select **Desktop development with C++**.\n\n## Build\n\nOpen a **Developer Command Prompt for VS 2022** (search for it in the Start menu), then:\n\n```cmd\ncd path\\to\\amy\\windows\nbuild.bat\n```\n\nThis produces `amy_sine.exe`.\n\n## Run\n\n```cmd\namy_sine.exe\n```\n\nYou should hear a 440Hz sine wave. Press Enter to quit.\n\n## CMake (alternative)\n\nIf you have CMake installed, you can also build from a Developer Command Prompt:\n\n```cmd\ncd windows\nmkdir build && cd build\ncmake ..\ncmake --build . --config Release\n```\n"
  },
  {
    "path": "windows/amy_sine.c",
    "content": "// amy_sine.c - simplest possible AMY example for Windows\n// Plays a 440Hz sine wave through your default audio device.\n\n#include \"amy.h\"\n#include \"libminiaudio-audio.h\"\n\n// Required by examples.c but not used in this simple app.\n#ifdef _WIN32\n#include <windows.h>\nvoid delay_ms(uint32_t ms) { Sleep(ms); }\n#else\n#include <unistd.h>\nvoid delay_ms(uint32_t ms) { usleep(ms * 1000); }\n#endif\n\nint main(void) {\n    amy_config_t config = amy_default_config();\n    config.audio = AMY_AUDIO_IS_MINIAUDIO;\n    config.features.default_synths = 1;\n    amy_start(config);\n\n    // Play a 440Hz sine wave\n    amy_event e = amy_default_event();\n    e.wave = SINE;\n    e.freq_coefs[COEF_CONST] = 440.0f;\n    e.amp_coefs[COEF_CONST] = 1.0f;\n    e.velocity = 1.0f;\n    amy_add_event(&e);\n\n    printf(\"Playing 440Hz sine wave. Press Enter to quit.\\n\");\n    getchar();\n\n    amy_stop();\n    return 0;\n}\n"
  },
  {
    "path": "windows/build.bat",
    "content": "@echo off\ncall \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build\\vcvarsall.bat\" x64\nif errorlevel 1 (\n    echo Failed to set up MSVC environment\n    exit /b 1\n)\ncd /d \"%~dp0\"\ncl /O2 /W3 /std:c11 /D_CRT_SECURE_NO_WARNINGS /DAMY_WAVETABLE /I..\\src ^\n    amy_sine.c ^\n    ..\\src\\algorithms.c ^\n    ..\\src\\amy.c ^\n    ..\\src\\envelope.c ^\n    ..\\src\\examples.c ^\n    ..\\src\\parse.c ^\n    ..\\src\\filters.c ^\n    ..\\src\\oscillators.c ^\n    ..\\src\\pcm.c ^\n    ..\\src\\interp_partials.c ^\n    ..\\src\\custom.c ^\n    ..\\src\\delay.c ^\n    ..\\src\\log2_exp2.c ^\n    ..\\src\\patches.c ^\n    ..\\src\\transfer.c ^\n    ..\\src\\sequencer.c ^\n    ..\\src\\libminiaudio-audio.c ^\n    ..\\src\\instrument.c ^\n    ..\\src\\amy_midi.c ^\n    ..\\src\\api.c ^\n    ..\\src\\midi_mappings.c ^\n    /Fe:amy_sine.exe\n"
  }
]